eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
24 lines (23 loc) • 1.11 kB
TypeScript
import type { ModelMessage, SystemModelMessage } from "ai";
import type { HarnessEmissionState } from "#harness/emission.js";
import type { HarnessSession } from "#harness/types.js";
import type { InstrumentationDefinition } from "#public/instrumentation/index.js";
export interface BuildTelemetryRuntimeContextInput {
readonly eveVersion: string;
readonly authored: InstrumentationDefinition | undefined;
readonly emissionState: HarnessEmissionState;
readonly environment: string;
readonly modelInput: {
readonly instructions: string | SystemModelMessage | undefined;
readonly messages: readonly ModelMessage[];
};
readonly session: HarnessSession;
}
/**
* Builds per-model-call runtime context for AI SDK telemetry spans.
*
* Authored runtime context is parsed defensively. Invalid event results,
* reserved `eve.*` keys, and callback failures are warning-only so
* instrumentation cannot compromise the normal turn flow.
*/
export declare function buildTelemetryRuntimeContext(input: BuildTelemetryRuntimeContextInput): Record<string, unknown> | undefined;