eve 0.78.0 → 0.79.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/src/approval/definition.d.ts +42 -0
- package/dist/src/cli/commands/trace-detail.d.ts +2 -2
- package/dist/src/cli/commands/trace-detail.js +1 -1
- package/dist/src/cli/commands/trace.d.ts +1 -1
- package/dist/src/cli/commands/trace.js +1 -1
- package/dist/src/cli/dev/tui/traces/trace-conversation.d.ts +1 -1
- package/dist/src/cli/dev/tui/traces/trace-conversation.js +1 -1
- package/dist/src/cli/dev/tui/traces/trace-store.d.ts +1 -1
- package/dist/src/cli/dev/tui/traces/trace-store.js +1 -1
- package/dist/src/cli/dev/tui/traces/trace-view.d.ts +1 -1
- package/dist/src/cli/dev/tui/traces/trace-view.js +1 -1
- package/dist/src/cli/dev/tui/traces/trace-viewer-state.d.ts +1 -1
- package/dist/src/compiled/.vendor-stamp.json +3 -1
- package/dist/src/compiled/@eve/tracing/adapters/agent-transport.d.ts +8 -0
- package/dist/src/compiled/@eve/tracing/adapters/ai-sdk-payload.d.ts +15 -0
- package/dist/src/compiled/@eve/tracing/adapters/ai-sdk-telemetry.d.ts +14 -0
- package/dist/src/{tracing/agent-span-id-generator.d.ts → compiled/@eve/tracing/adapters/otel-ids.d.ts} +1 -1
- package/dist/src/compiled/@eve/tracing/adapters/otel.d.ts +33 -0
- package/dist/src/{tracing/agent-otel-content.d.ts → compiled/@eve/tracing/adapters/serialization.d.ts} +9 -3
- package/dist/src/compiled/@eve/tracing/agent-tracing.d.ts +84 -0
- package/dist/src/compiled/@eve/tracing/ai-sdk.d.ts +7 -0
- package/dist/src/compiled/@eve/tracing/ai-sdk.js +1 -0
- package/dist/src/compiled/@eve/tracing/capture.d.ts +5 -0
- package/dist/src/compiled/@eve/tracing/core/activation.d.ts +3 -0
- package/dist/src/compiled/@eve/tracing/core/attributes.d.ts +14 -0
- package/dist/src/{tracing/content-attributes.d.ts → compiled/@eve/tracing/core/content-policy.d.ts} +1 -1
- package/dist/src/compiled/@eve/tracing/core/context.d.ts +3 -0
- package/dist/src/compiled/@eve/tracing/core/delegation.d.ts +13 -0
- package/dist/src/compiled/@eve/tracing/core/mcp.d.ts +24 -0
- package/dist/src/compiled/@eve/tracing/core/scopes.d.ts +59 -0
- package/dist/src/compiled/@eve/tracing/core/snapshot.d.ts +7 -0
- package/dist/src/compiled/@eve/tracing/core/span-kinds.d.ts +12 -0
- package/dist/src/compiled/@eve/tracing/core/types.d.ts +292 -0
- package/dist/src/compiled/@eve/tracing/core/writer.d.ts +15 -0
- package/dist/src/compiled/@eve/tracing/delegation.d.ts +2 -0
- package/dist/src/compiled/@eve/tracing/delegation.js +1 -0
- package/dist/src/compiled/@eve/tracing/index.d.ts +6 -0
- package/dist/src/compiled/@eve/tracing/index.js +1 -0
- package/dist/src/compiled/@eve/tracing/operations.d.ts +96 -0
- package/dist/src/compiled/@eve/tracing/otel.d.ts +12 -0
- package/dist/src/compiled/@eve/tracing/otel.js +1 -0
- package/dist/src/compiled/@opentelemetry/api/index.d.ts +4 -0
- package/dist/src/compiled/@workflow/world-vercel/index.js +7 -7
- package/dist/src/compiled/_chunks/workflow/delegation-BqhZ398D.js +1 -0
- package/dist/src/compiled/_chunks/workflow/mcp-CrGp4EC8.js +5 -0
- package/dist/src/compiler/extension-compatibility.d.ts +6 -6
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/context/build-dynamic-tools.js +1 -1
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
- package/dist/src/evals/assertions/collector.d.ts +4 -1
- package/dist/src/evals/assertions/collector.js +1 -1
- package/dist/src/evals/context.js +1 -1
- package/dist/src/evals/index.d.ts +1 -1
- package/dist/src/evals/runner/artifacts.js +1 -1
- package/dist/src/evals/runner/reporters/assertion-diagnostics.js +2 -2
- package/dist/src/evals/runner/reporters/assertion-scores.d.ts +11 -2
- package/dist/src/evals/runner/reporters/assertion-scores.js +1 -1
- package/dist/src/evals/runner/reporters/braintrust.js +1 -1
- package/dist/src/evals/runner/reporters/console.js +1 -1
- package/dist/src/evals/runner/reporters/datadog.js +2 -2
- package/dist/src/evals/runner/reporters/junit.js +1 -1
- package/dist/src/evals/runner/verdict.d.ts +2 -2
- package/dist/src/evals/runner/verdict.js +1 -1
- package/dist/src/evals/types.d.ts +22 -6
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/stream-headers.d.ts +1 -0
- package/dist/src/eve-channel/stream-headers.js +1 -0
- package/dist/src/execution/agent-sessions/context.d.ts +1 -1
- package/dist/src/execution/agent-sessions/context.js +1 -1
- package/dist/src/execution/agent-sessions/remote.js +1 -1
- package/dist/src/execution/agent-sessions/steps.js +1 -1
- package/dist/src/execution/cancelled-model-call-batch.js +1 -1
- package/dist/src/execution/catalog/connection-entry.js +1 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/eve-workflow-attributes.js +1 -1
- package/dist/src/execution/invoke-tool.d.ts +1 -1
- package/dist/src/execution/invoke-tool.js +1 -1
- package/dist/src/execution/session/turn-step.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/harness/execute-tool.d.ts +2 -2
- package/dist/src/harness/input-extraction.js +1 -1
- package/dist/src/instrumentation/ai-sdk-hook-bridge.js +1 -1
- package/dist/src/instrumentation/dispatch.js +1 -1
- package/dist/src/instrumentation/memory.d.ts +1 -4
- package/dist/src/instrumentation/memory.js +1 -1
- package/dist/src/instrumentation/principal-summary.js +1 -1
- package/dist/src/instrumentation/providers.js +1 -1
- package/dist/src/instrumentation/runtime-context.d.ts +1 -1
- package/dist/src/instrumentation/runtime.d.ts +3 -3
- package/dist/src/instrumentation/runtime.js +1 -1
- package/dist/src/instrumentation/session-init.js +1 -1
- package/dist/src/internal/application/stamped-package-version.js +1 -1
- package/dist/src/internal/authored-definition/approval.d.ts +3 -1
- package/dist/src/internal/authored-definition/approval.js +1 -1
- package/dist/src/internal/authored-definition/schema-backed.js +1 -1
- package/dist/src/internal/logging.js +1 -1
- package/dist/src/internal/nitro/host/local-tracing-runtime-plugin.js +1 -1
- package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
- package/dist/src/internal/nitro/routes/channel-request-instrumentation.d.ts +10 -31
- package/dist/src/internal/nitro/routes/channel-request-instrumentation.js +1 -1
- package/dist/src/internal/nitro/routes/route-invoke-tool.d.ts +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.js +1 -1
- package/dist/src/public/channels/slack/hitl.js +1 -1
- package/dist/src/public/definitions/approval.d.ts +1 -1
- package/dist/src/public/instrumentation/otel.d.ts +2 -2
- package/dist/src/public/instrumentation/otel.js +1 -1
- package/dist/src/public/tools/approval/index.d.ts +1 -1
- package/dist/src/runtime/connections/mcp-tracing.d.ts +10 -18
- package/dist/src/runtime/connections/mcp-tracing.js +1 -1
- package/dist/src/runtime/resolve-tool.js +1 -1
- package/dist/src/runtime/types.d.ts +2 -2
- package/dist/src/self-modification/extension/subagents/agent/tools/inspect_trace.d.ts +12 -12
- package/dist/src/self-modification/extension/subagents/agent/tools/inspect_trace.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/tools/search_traces.d.ts +1 -1
- package/dist/src/self-modification/extension/subagents/agent/tools/search_traces.js +1 -1
- package/dist/src/self-modification/extension/trace-inspection.d.ts +1 -1
- package/dist/src/self-modification/extension/trace-inspection.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/shared/trace-policy.d.ts +3 -0
- package/dist/src/shared/trace-policy.js +1 -1
- package/dist/src/tools/definition.d.ts +3 -3
- package/dist/src/tools/durable-callbacks.d.ts +5 -3
- package/dist/src/tools/durable-callbacks.js +1 -1
- package/dist/src/tools/dynamic.d.ts +2 -2
- package/dist/src/tools/provided/ask-question-workflow.js +1 -1
- package/dist/src/tools/provided/sleep-workflow.js +1 -1
- package/dist/src/tools/workflow-definition.d.ts +2 -2
- package/dist/src/tracing/eve/agent-approval-instrumentation.d.ts +8 -0
- package/dist/src/tracing/eve/agent-approval-instrumentation.js +1 -0
- package/dist/src/tracing/{agent-channel-delivery-instrumentation.d.ts → eve/agent-channel-delivery-instrumentation.d.ts} +1 -1
- package/dist/src/tracing/{agent-channel-delivery-instrumentation.js → eve/agent-channel-delivery-instrumentation.js} +1 -1
- package/dist/src/tracing/eve/agent-invocation-coordinator.js +1 -0
- package/dist/src/tracing/eve/agent-memory-instrumentation.d.ts +12 -0
- package/dist/src/tracing/eve/agent-memory-instrumentation.js +1 -0
- package/dist/src/tracing/{agent-otel-provider.d.ts → eve/agent-otel-provider.d.ts} +6 -8
- package/dist/src/tracing/eve/agent-otel-provider.js +1 -0
- package/dist/src/tracing/eve/agent-tool-instrumentation.d.ts +44 -0
- package/dist/src/tracing/eve/agent-tool-instrumentation.js +1 -0
- package/dist/src/tracing/{agent-trace-context-store.d.ts → eve/agent-trace-context-store.d.ts} +8 -16
- package/dist/src/tracing/eve/agent-trace-context-store.js +1 -0
- package/dist/src/tracing/eve/agent-trace-context.js +1 -0
- package/dist/src/tracing/eve/agent-trace-state.d.ts +75 -0
- package/dist/src/tracing/{batch-span-processor.d.ts → eve/batch-span-processor.d.ts} +5 -1
- package/dist/src/tracing/eve/batch-span-processor.js +1 -0
- package/dist/src/tracing/{content-span-processor.d.ts → eve/content-span-processor.d.ts} +1 -1
- package/dist/src/tracing/eve/content-span-processor.js +1 -0
- package/dist/src/tracing/eve/delegation.d.ts +20 -0
- package/dist/src/tracing/eve/delegation.js +1 -0
- package/dist/src/tracing/eve/gateway.d.ts +16 -0
- package/dist/src/tracing/eve/gateway.js +1 -0
- package/dist/src/tracing/{install-instrumentation-runtime.d.ts → eve/install-instrumentation-runtime.d.ts} +1 -1
- package/dist/src/tracing/eve/install-instrumentation-runtime.js +1 -0
- package/dist/src/tracing/eve/invoke-tool-span.js +1 -0
- package/dist/src/tracing/eve/mcp.d.ts +29 -0
- package/dist/src/tracing/eve/mcp.js +1 -0
- package/dist/src/tracing/eve/metadata.d.ts +7 -0
- package/dist/src/tracing/eve/metadata.js +1 -0
- package/dist/src/tracing/eve/operation-input.d.ts +30 -0
- package/dist/src/tracing/eve/operation-input.js +1 -0
- package/dist/src/tracing/eve/otel-configuration.d.ts +70 -0
- package/dist/src/tracing/eve/otel-configuration.js +1 -0
- package/dist/src/tracing/{otel-declaration.d.ts → eve/otel-declaration.d.ts} +4 -11
- package/dist/src/tracing/eve/otel-declaration.js +1 -0
- package/dist/src/tracing/{otel-registration.d.ts → eve/otel-registration.d.ts} +12 -5
- package/dist/src/tracing/eve/otel-registration.js +1 -0
- package/dist/src/tracing/eve/policy.d.ts +15 -0
- package/dist/src/tracing/eve/policy.js +1 -0
- package/dist/src/tracing/eve/profile.d.ts +7 -0
- package/dist/src/tracing/eve/profile.js +1 -0
- package/dist/src/tracing/eve/session.d.ts +27 -0
- package/dist/src/tracing/eve/session.js +1 -0
- package/dist/src/tracing/{vercel-runtime-span-exporter.d.ts → eve/vercel-runtime-span-exporter.d.ts} +1 -1
- package/dist/src/tracing/local/agent-trace-span-processor.js +1 -0
- package/dist/src/tracing/local/inspection.d.ts +15 -0
- package/dist/src/tracing/local/inspection.js +1 -0
- package/dist/src/tracing/{local-instrumentation-runtime.d.ts → local/instrumentation-runtime.d.ts} +1 -1
- package/dist/src/tracing/local/instrumentation-runtime.js +1 -0
- package/dist/src/tracing/{local-trace-analysis.d.ts → local/trace-analysis.d.ts} +2 -2
- package/dist/src/tracing/{local-trace-analysis.js → local/trace-analysis.js} +1 -1
- package/dist/src/tracing/{local-trace-operations.d.ts → local/trace-operations.d.ts} +1 -1
- package/dist/src/tracing/{local-trace-query.d.ts → local/trace-query.d.ts} +1 -1
- package/dist/src/tracing/local/trace-reader.js +1 -0
- package/dist/src/tracing/{local-trace-retention.js → local/trace-retention.js} +1 -1
- package/dist/src/tracing/{local-trace-span-processor.js → local/trace-span-processor.js} +1 -1
- package/dist/src/tracing/{local-trace-summary.d.ts → local/trace-summary.d.ts} +1 -1
- package/dist/src/tracing/local/trace-summary.js +1 -0
- package/dist/src/tracing/{local-traces.d.ts → local/traces.d.ts} +1 -1
- package/dist/src/tracing/local/traces.js +1 -0
- package/docs/connections/mcp.mdx +22 -1
- package/docs/evals/assertions.mdx +50 -3
- package/docs/evals/overview.mdx +2 -1
- package/docs/evals/reporters.mdx +3 -1
- package/docs/tools/human-in-the-loop.md +23 -1
- package/package.json +2 -1
- package/dist/src/tracing/agent-approval-instrumentation.d.ts +0 -11
- package/dist/src/tracing/agent-approval-instrumentation.js +0 -1
- package/dist/src/tracing/agent-invocation-coordinator.js +0 -1
- package/dist/src/tracing/agent-memory-instrumentation.d.ts +0 -16
- package/dist/src/tracing/agent-memory-instrumentation.js +0 -1
- package/dist/src/tracing/agent-otel-attributes.d.ts +0 -10
- package/dist/src/tracing/agent-otel-attributes.js +0 -1
- package/dist/src/tracing/agent-otel-content.js +0 -4
- package/dist/src/tracing/agent-otel-provider.js +0 -2
- package/dist/src/tracing/agent-otel-runtime-context.d.ts +0 -36
- package/dist/src/tracing/agent-otel-runtime-context.js +0 -1
- package/dist/src/tracing/agent-otel-session-context.d.ts +0 -22
- package/dist/src/tracing/agent-otel-session-context.js +0 -1
- package/dist/src/tracing/agent-otel-turn-state.d.ts +0 -6
- package/dist/src/tracing/agent-otel-turn-state.js +0 -1
- package/dist/src/tracing/agent-otel-usage.d.ts +0 -10
- package/dist/src/tracing/agent-otel-usage.js +0 -1
- package/dist/src/tracing/agent-span-contract.d.ts +0 -34
- package/dist/src/tracing/agent-span-contract.js +0 -1
- package/dist/src/tracing/agent-span-error.js +0 -1
- package/dist/src/tracing/agent-span-id-generator.js +0 -1
- package/dist/src/tracing/agent-span-naming.d.ts +0 -1
- package/dist/src/tracing/agent-span-naming.js +0 -1
- package/dist/src/tracing/agent-tool-instrumentation.d.ts +0 -40
- package/dist/src/tracing/agent-tool-instrumentation.js +0 -1
- package/dist/src/tracing/agent-tool-span-context.d.ts +0 -16
- package/dist/src/tracing/agent-tool-span-context.js +0 -1
- package/dist/src/tracing/agent-trace-context-codec.d.ts +0 -15
- package/dist/src/tracing/agent-trace-context-codec.js +0 -1
- package/dist/src/tracing/agent-trace-context-store.js +0 -1
- package/dist/src/tracing/agent-trace-context.js +0 -1
- package/dist/src/tracing/agent-trace-span-processor.js +0 -1
- package/dist/src/tracing/agent-trace-state.d.ts +0 -91
- package/dist/src/tracing/batch-span-processor.js +0 -1
- package/dist/src/tracing/bounded-error.d.ts +0 -1
- package/dist/src/tracing/bounded-error.js +0 -1
- package/dist/src/tracing/content-attributes.js +0 -1
- package/dist/src/tracing/content-span-processor.js +0 -1
- package/dist/src/tracing/error-content-context.d.ts +0 -3
- package/dist/src/tracing/error-content-context.js +0 -1
- package/dist/src/tracing/install-instrumentation-runtime.js +0 -1
- package/dist/src/tracing/invoke-tool-span.js +0 -1
- package/dist/src/tracing/local-instrumentation-runtime.js +0 -1
- package/dist/src/tracing/local-trace-reader.js +0 -1
- package/dist/src/tracing/local-trace-summary.js +0 -1
- package/dist/src/tracing/local-traces.js +0 -1
- package/dist/src/tracing/otel-declaration.js +0 -1
- package/dist/src/tracing/otel-registration.js +0 -1
- package/dist/src/tracing/sampled-trace.d.ts +0 -4
- package/dist/src/tracing/sampled-trace.js +0 -1
- package/dist/src/tracing/suppress-tracing.d.ts +0 -2
- package/dist/src/tracing/suppress-tracing.js +0 -1
- package/dist/src/tracing/telemetry-budget.d.ts +0 -3
- package/dist/src/tracing/telemetry-budget.js +0 -1
- /package/dist/src/{tracing/agent-span-error.d.ts → compiled/@eve/tracing/adapters/otel-error.d.ts} +0 -0
- /package/dist/src/tracing/{agent-invocation-coordinator.d.ts → eve/agent-invocation-coordinator.d.ts} +0 -0
- /package/dist/src/tracing/{agent-trace-context.d.ts → eve/agent-trace-context.d.ts} +0 -0
- /package/dist/src/tracing/{agent-trace-state.js → eve/agent-trace-state.js} +0 -0
- /package/dist/src/tracing/{channel-audience-context.d.ts → eve/channel-audience-context.d.ts} +0 -0
- /package/dist/src/tracing/{channel-audience-context.js → eve/channel-audience-context.js} +0 -0
- /package/dist/src/tracing/{conversation-context.d.ts → eve/conversation-context.d.ts} +0 -0
- /package/dist/src/tracing/{conversation-context.js → eve/conversation-context.js} +0 -0
- /package/dist/src/tracing/{invoke-tool-span.d.ts → eve/invoke-tool-span.d.ts} +0 -0
- /package/dist/src/tracing/{span-export-policy.d.ts → eve/span-export-policy.d.ts} +0 -0
- /package/dist/src/tracing/{span-export-policy.js → eve/span-export-policy.js} +0 -0
- /package/dist/src/tracing/{vercel-runtime-span-exporter.js → eve/vercel-runtime-span-exporter.js} +0 -0
- /package/dist/src/tracing/{agent-trace-span-processor.d.ts → local/agent-trace-span-processor.d.ts} +0 -0
- /package/dist/src/tracing/{local-trace-discovery-index.d.ts → local/trace-discovery-index.d.ts} +0 -0
- /package/dist/src/tracing/{local-trace-discovery-index.js → local/trace-discovery-index.js} +0 -0
- /package/dist/src/tracing/{local-trace-operations.js → local/trace-operations.js} +0 -0
- /package/dist/src/tracing/{local-trace-query.js → local/trace-query.js} +0 -0
- /package/dist/src/tracing/{local-trace-reader.d.ts → local/trace-reader.d.ts} +0 -0
- /package/dist/src/tracing/{local-trace-retention.d.ts → local/trace-retention.d.ts} +0 -0
- /package/dist/src/tracing/{local-trace-span-processor.d.ts → local/trace-span-processor.d.ts} +0 -0
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export declare const AGENT_TRACE_SCHEMA_VERSION = 4;
|
|
2
|
-
export declare const AGENT_SPAN_NAMES: {
|
|
3
|
-
readonly approval: "agent.approval";
|
|
4
|
-
readonly channelRequest: "agent.channel.request";
|
|
5
|
-
readonly step: "agent.step";
|
|
6
|
-
};
|
|
7
|
-
export declare const AGENT_USAGE_ATTRIBUTES: {
|
|
8
|
-
readonly costUsd: "agent.usage.cost_usd";
|
|
9
|
-
readonly inputTokens: "agent.usage.input_tokens";
|
|
10
|
-
readonly outputTokens: "agent.usage.output_tokens";
|
|
11
|
-
readonly cacheReadTokens: "agent.usage.cache_read_tokens";
|
|
12
|
-
readonly cacheWriteTokens: "agent.usage.cache_write_tokens";
|
|
13
|
-
};
|
|
14
|
-
export declare function agentInvocationSpanName(agentName: string | undefined): string;
|
|
15
|
-
export declare function modelSpanName(modelId: string): string;
|
|
16
|
-
export interface AgentSamplingOperation {
|
|
17
|
-
readonly name: string;
|
|
18
|
-
readonly attributes?: Readonly<Record<string, string | number | boolean | undefined>>;
|
|
19
|
-
}
|
|
20
|
-
interface AgentSpanRecord {
|
|
21
|
-
readonly name: string;
|
|
22
|
-
readonly attributes: Readonly<Record<string, unknown>>;
|
|
23
|
-
}
|
|
24
|
-
/** Marks the `execute_tool` span of a tool call made outside any conversation. */
|
|
25
|
-
export declare const DIRECT_TOOL_CALL_ATTRIBUTE = "eve.tool.invocation";
|
|
26
|
-
export declare const DIRECT_TOOL_CALL_VALUE = "direct";
|
|
27
|
-
/**
|
|
28
|
-
* A direct tool call has no turn, so its own span is what starts and ends
|
|
29
|
-
* its claim on the trace, the way an activation span does for a turn.
|
|
30
|
-
*/
|
|
31
|
-
export declare function isDirectToolCallSpan(span: Pick<AgentSpanRecord, "attributes">): boolean;
|
|
32
|
-
export declare function isAgentActivationSpan(span: AgentSpanRecord): boolean;
|
|
33
|
-
export declare function agentTurnIdentity(span: AgentSpanRecord): string | undefined;
|
|
34
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const AGENT_TRACE_SCHEMA_VERSION=4,AGENT_SPAN_NAMES={approval:`agent.approval`,channelRequest:`agent.channel.request`,step:`agent.step`},AGENT_USAGE_ATTRIBUTES={costUsd:`agent.usage.cost_usd`,inputTokens:`agent.usage.input_tokens`,outputTokens:`agent.usage.output_tokens`,cacheReadTokens:`agent.usage.cache_read_tokens`,cacheWriteTokens:`agent.usage.cache_write_tokens`};function agentInvocationSpanName(e){return e===void 0?`invoke_agent`:`invoke_agent ${e}`}function modelSpanName(e){return`chat ${e}`}const DIRECT_TOOL_CALL_ATTRIBUTE=`eve.tool.invocation`,DIRECT_TOOL_CALL_VALUE=`direct`;function isDirectToolCallSpan(e){return e.attributes[DIRECT_TOOL_CALL_ATTRIBUTE]===DIRECT_TOOL_CALL_VALUE}function isAgentActivationSpan(e){return e.name===`agent.turn`||e.attributes[`gen_ai.operation.name`]===`invoke_agent`&&e.attributes[`agent.invocation.role`]!==`caller`&&typeof e.attributes[`agent.turn.id`]==`string`}function agentTurnIdentity(e){let t=e.attributes[`agent.run.id`],n=e.attributes[`agent.turn.id`];return typeof n==`string`?`${typeof t==`string`?t:``}\0${n}`:void 0}export{AGENT_SPAN_NAMES,AGENT_TRACE_SCHEMA_VERSION,AGENT_USAGE_ATTRIBUTES,DIRECT_TOOL_CALL_ATTRIBUTE,DIRECT_TOOL_CALL_VALUE,agentInvocationSpanName,agentTurnIdentity,isAgentActivationSpan,isDirectToolCallSpan,modelSpanName};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SpanStatusCode}from"#compiled/@opentelemetry/api/index.js";import{truncateTelemetryText}from"#tracing/telemetry-budget.js";import{boundedTraceError}from"#tracing/bounded-error.js";function recordAgentSpanError(e,t,n){if(e.setAttribute(`error.type`,truncateTelemetryText(n??(t instanceof Error?t.name||`Error`:`_OTHER`),128)),t instanceof Error){let n=boundedTraceError(t);e.recordException(n),e.setStatus({code:SpanStatusCode.ERROR,message:n.message})}else e.setStatus({code:SpanStatusCode.ERROR})}export{recordAgentSpanError};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createHash}from"node:crypto";var AgentSpanIdGenerator=class{#e;#t;allocateSpanId(){return randomHexId(16)}deriveSpanId(e){return deriveAgentSpanId(e)}deriveTraceId(e){let t=createHash(`sha256`).update(e).digest(`hex`).slice(0,32);return/^0+$/u.test(t)?`00000000000000000000000000000001`:t}generateSpanId(){let e=this.#e;return e===void 0?randomHexId(16):(this.#e=void 0,e)}generateTraceId(){let e=this.#t;return e===void 0?randomHexId(32):(this.#t=void 0,e)}withSpanId(e,t){this.#e=e;try{return t()}finally{this.#e=void 0}}withTraceId(e,t){this.#t=e;try{return t()}finally{this.#t=void 0}}};function deriveAgentSpanId(e){let t=createHash(`sha256`).update(e).digest(`hex`).slice(0,16);return/^0+$/u.test(t)?`0000000000000001`:t}function randomHexId(e){let t;do{t=``;for(let n=0;n<e;n+=1)t+=`0123456789abcdef`[Math.trunc(Math.random()*16)]}while(!/[1-9a-f]/u.test(t));return t}export{AgentSpanIdGenerator};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function agentSpanNamingAttributes(name: string, operation?: string): Record<string, string>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function agentSpanNamingAttributes(e,t=e){return{"operation.name":t,"resource.name":e}}export{agentSpanNamingAttributes};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { type Context, type SpanContext, type Tracer } from "#compiled/@opentelemetry/api/index.js";
|
|
2
|
-
import type { InstrumentationAttemptScope, InstrumentationExecutionOperation, InstrumentationToolCallStartedEvent, InstrumentationToolCallTerminalEvent } from "#instrumentation/lifecycle.js";
|
|
3
|
-
import type { AgentSpanIdGenerator } from "#tracing/agent-span-id-generator.js";
|
|
4
|
-
import type { AgentTraceStateStore } from "#tracing/agent-trace-state.js";
|
|
5
|
-
export interface AgentToolContext {
|
|
6
|
-
readonly context: Context;
|
|
7
|
-
readonly spanContext: SpanContext;
|
|
8
|
-
}
|
|
9
|
-
interface AgentToolInstrumentation {
|
|
10
|
-
deleteForSession(sessionId: string): Promise<void>;
|
|
11
|
-
failForAttempt(scope: InstrumentationAttemptScope, error: unknown): Promise<void>;
|
|
12
|
-
dispatchContextFor(sessionId: string, turnId: string, callId: string): Promise<AgentToolContext | undefined>;
|
|
13
|
-
contextFor(attemptId: string, idempotencyKey: string): Context | undefined;
|
|
14
|
-
drain(attemptId: string, failure?: {
|
|
15
|
-
readonly error: unknown;
|
|
16
|
-
}): void;
|
|
17
|
-
readonly events: {
|
|
18
|
-
readonly "tool.call.completed": (event: InstrumentationToolCallTerminalEvent) => Promise<void>;
|
|
19
|
-
readonly "tool.call.failed": (event: InstrumentationToolCallTerminalEvent) => Promise<void>;
|
|
20
|
-
readonly "tool.call.started": (event: InstrumentationToolCallStartedEvent) => Promise<void>;
|
|
21
|
-
};
|
|
22
|
-
runInContext<T>(operation: Extract<InstrumentationExecutionOperation, {
|
|
23
|
-
type: "tool.call";
|
|
24
|
-
}>, execute: (parent: Context | undefined) => PromiseLike<T>, recordOutputs: boolean): Promise<T>;
|
|
25
|
-
}
|
|
26
|
-
/** Enriches durable tool calls, exporting SDK-only calls under their step. */
|
|
27
|
-
export declare function createAgentToolInstrumentation(input: {
|
|
28
|
-
readonly frameworkVersion: string;
|
|
29
|
-
readonly resolveTraceContext: (event: InstrumentationToolCallStartedEvent) => SpanContext | undefined | PromiseLike<SpanContext | undefined>;
|
|
30
|
-
readonly idGenerator: AgentSpanIdGenerator;
|
|
31
|
-
readonly recordInputs: boolean;
|
|
32
|
-
readonly recordOutputs: boolean;
|
|
33
|
-
readonly resolveFallback: (event: InstrumentationToolCallStartedEvent) => {
|
|
34
|
-
readonly context: Context;
|
|
35
|
-
readonly spanContext: SpanContext;
|
|
36
|
-
} | undefined;
|
|
37
|
-
readonly tracer: Tracer;
|
|
38
|
-
readonly stateStore: AgentTraceStateStore;
|
|
39
|
-
}): AgentToolInstrumentation;
|
|
40
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{normalizeChannelAudience}from"#shared/channel-audience.js";import{isSampledTrace}from"#tracing/sampled-trace.js";import{ROOT_CONTEXT,SpanKind,trace}from"#compiled/@opentelemetry/api/index.js";import{actionIdempotencyKey,attemptIdempotencyKey}from"#instrumentation/lifecycle.js";import{agentSpanNamingAttributes}from"#tracing/agent-span-naming.js";import{contentAttribute,textContentAttribute}from"#tracing/agent-otel-content.js";import{recordAgentSpanError}from"#tracing/agent-span-error.js";import{withAgentToolSpanContext}from"#tracing/agent-tool-span-context.js";import{agentTraceIdentityAttributes,traceSessionIdOf}from"#tracing/agent-otel-attributes.js";import{withChannelAudience}from"#tracing/channel-audience-context.js";import{setAgentUsage}from"#tracing/agent-otel-usage.js";function createAgentToolInstrumentation(e){let t=new Map,n=new Map,r=new Map;async function dispatchContextFor(t,n,r){let i=await e.stateStore.getAction(actionIdempotencyKey(t,n,r))??await e.stateStore.findAction(t,r);if(i===void 0)return;let a={isRemote:!1,spanId:i.spanId,traceFlags:i.parent.traceFlags,traceId:i.parent.traceId};return{context:withChannelAudience(contextFromSpanContext(a),i.channelAudience),spanContext:a}}async function onDispatchStarted(n){let i=await e.resolveTraceContext(n);if(i===void 0||!isSampledTrace(i))return;let a=await e.stateStore.getAction(n.idempotencyKey)??{attemptIndex:n.scope.attemptIndex,callId:n.callId,channelAudience:normalizeChannelAudience(n.scope.channelAudience),inputAttribute:e.recordInputs?contentAttribute(n.input):void 0,kind:n.kind??`tool-call`,name:n.toolName,toolAttributes:{"agent.tool.is_framework":n.frameworkTool===!0},parent:{spanId:e.idGenerator.deriveSpanId(attemptIdempotencyKey(n.scope)),traceFlags:i.traceFlags,traceId:i.traceId},rootSessionId:n.scope.rootSessionId??n.scope.sessionId,traceSessionId:traceSessionIdOf(n.scope),sessionId:n.scope.sessionId,spanId:e.idGenerator.deriveSpanId(`action:${n.idempotencyKey}`),startTimeMs:Math.min(n.startedAtMs??Date.now(),t.get(n.idempotencyKey)?.startTimeMs??1/0),stepIndex:n.scope.stepIndex,turnId:n.scope.turnId};await e.stateStore.setAction(n.idempotencyKey,a),n.isWorkflowTool===!0&&await e.stateStore.setActionAnchor(n.idempotencyKey,a);let o=r.get(n.scope.attemptId)??new Set;o.add(n.idempotencyKey),r.set(n.scope.attemptId,o);let s=t.get(n.idempotencyKey);s!==void 0&&s.finished!==!0&&(await correlate(s),finishIfReady(s))}async function onDispatchTerminal(t){let n=await e.stateStore.getAction(t.idempotencyKey);if(n!==void 0)try{let r=startDispatchSpan(n),i=t.outcome??(t.type===`tool.call.failed`?`failed`:`completed`);if(r.setAttribute(`agent.action.outcome`,n.toolFailed===!0&&i===`completed`?`failed`:i),t.usage!==void 0&&setAgentUsage(r,t.usage),t.type===`tool.call.failed`)recordToolError(r,t.error,t.errorCode);else if(t.output.type===`error`)recordToolError(r,t.output.error);else if(n.toolFailed===!0)recordToolError(r,n.toolErrorAttribute,typeof n.toolAttributes?.[`error.type`]==`string`?n.toolAttributes[`error.type`]:void 0);else if(e.recordOutputs){let e=contentAttribute(t.output.output);e!==void 0&&r.setAttribute(`gen_ai.tool.call.result`,e)}r.end(t.acceptedAtMs??n.toolEndTimeMs)}finally{await e.stateStore.deleteAction(t.idempotencyKey);for(let[e,n]of r)n.delete(t.idempotencyKey),n.size===0&&r.delete(e)}}function startDispatchSpan(t){let n=t.kind===`subagent-call`||t.kind===`remote-agent-call`,r=e.idGenerator.withSpanId(t.spanId,()=>e.tracer.startSpan(`execute_tool ${t.name}`,{attributes:{"agent.action.kind":t.kind,"agent.action.name":t.name,"gen_ai.operation.name":`execute_tool`,"gen_ai.tool.call.id":t.callId,"gen_ai.tool.name":t.name,"gen_ai.tool.type":`function`,"agent.framework.name":`eve`,"agent.framework.version":e.frameworkVersion,"agent.step.attempt":t.attemptIndex,"agent.step.index":t.stepIndex,"agent.turn.id":t.turnId,...agentSpanNamingAttributes(`execute_tool ${t.name}`,`execute_tool`),...agentTraceIdentityAttributes({rootSessionId:t.rootSessionId,traceSessionId:t.traceSessionId,sessionId:t.sessionId}),...n?{"gen_ai.agent.name":t.name,"agent.invocation.role":`caller`}:void 0,...t.toolAttributes},kind:t.kind===`remote-agent-call`?SpanKind.CLIENT:SpanKind.INTERNAL,startTime:t.startTimeMs},withChannelAudience(contextFromSpanContext({...t.parent,isRemote:!1}),t.channelAudience)));return t.inputAttribute!==void 0&&r.setAttribute(`gen_ai.tool.call.arguments`,t.inputAttribute),r}let onStarted=async t=>{if(n.get(t.scope.attemptId)?.has(t.idempotencyKey))return;let r=actionIdempotencyKey(t.scope.sessionId,t.scope.turnId,t.callId),i=e.resolveFallback(t),a=i===void 0?void 0:reserve(t,r,i),o=await dispatchContextFor(t.scope.sessionId,t.scope.turnId,t.callId);if(a===void 0){if(o===void 0)return;a=reserve(t,r,o)}o!==void 0&&await correlate(a)},onTerminal=async e=>{let t=n.get(e.scope.attemptId)?.get(e.idempotencyKey);t!==void 0&&(t.terminal=e,t.span===void 0&&await dispatchContextFor(t.event.scope.sessionId,t.event.scope.turnId,t.event.callId)!==void 0&&await correlate(t),finishIfReady(t))};return{dispatchContextFor,async deleteForSession(t){await e.stateStore.deleteActions(t),await e.stateStore.deleteActionAnchors(t)},async failForAttempt(t,n){let i=r.get(t.attemptId);r.delete(t.attemptId);for(let t of i??[]){let r=await e.stateStore.getAction(t);if(r===void 0)continue;let i=startDispatchSpan(r);recordAgentSpanError(i,n),i.end(),await e.stateStore.deleteAction(t)}},contextFor:(e,t)=>n.get(e)?.get(t)?.context,drain(e,t){let r=n.get(e);if(r!==void 0){for(let e of r.values())e.finished!==!0&&(e.span===void 0&&e.correlated!==!0&&startSpan(e,e.fallbackParent),finish(e,t));n.delete(e)}},events:{"tool.call.completed":onDispatchTerminal,"tool.call.failed":onDispatchTerminal,"tool.call.started":onDispatchStarted},async runInContext(e,t,r){if(e.callId===void 0||e.toolName===void 0)return t(n.get(e.scope.attemptId)?.get(e.idempotencyKey)?.context);await onStarted({...e,callId:e.callId,toolName:e.toolName,input:e.input,type:`tool.call.started`});let i=n.get(e.scope.attemptId)?.get(e.idempotencyKey),a=e.startedAtMs??Date.now();try{let n=await t(i?.context);return await onTerminal({type:e.failed?`tool.call.failed`:`tool.call.completed`,idempotencyKey:e.idempotencyKey,scope:e.scope,completedAtMs:e.completedAtMs??Date.now(),durationMs:(e.completedAtMs??Date.now())-a,output:{type:`result`,output:r?n:void 0}}),n}catch(t){throw await onTerminal({type:`tool.call.failed`,idempotencyKey:e.idempotencyKey,scope:e.scope,completedAtMs:Date.now(),error:r?t:void 0}),t}}};function getAttemptStates(e){let t=n.get(e);return t===void 0&&(t=new Map,n.set(e,t)),t}function reserve(n,r,i){let a=e.idGenerator.deriveSpanId(`action:${r}`),o={actionKey:r,attemptId:n.scope.attemptId,additionalAttributes:{},context:withChannelAudience(contextFromSpanContext({isRemote:!1,spanId:a,traceFlags:i.spanContext.traceFlags,traceId:i.spanContext.traceId}),n.scope.channelAudience),event:n,fallbackParent:i.context,idempotencyKey:n.idempotencyKey,spanId:a,startTimeMs:n.startedAtMs??Date.now()};return o.context=withAgentToolSpanContext(o.context,{recordInputs:e.recordInputs,recordOutputs:e.recordOutputs,setAttributes(e){if(Object.assign(o.additionalAttributes,e),o.span!==void 0)for(let[t,n]of Object.entries(e))n!==void 0&&o.span.setAttribute(t,n)},recordError(e,t){o.pendingError={error:e,errorType:t},o.span!==void 0&&recordAgentSpanError(o.span,e,t)}}),getAttemptStates(n.scope.attemptId).set(n.idempotencyKey,o),t.set(r,o),o}function startSpan(t,n){if(t.span===void 0&&t.finished!==!0&&(t.span=e.idGenerator.withSpanId(t.spanId,()=>e.tracer.startSpan(`execute_tool ${t.event.toolName}`,{attributes:{...toolAttributes(t.event),...t.additionalAttributes},kind:SpanKind.INTERNAL,startTime:t.startTimeMs},n)),t.pendingError!==void 0&&recordAgentSpanError(t.span,t.pendingError.error,t.pendingError.errorType),e.recordInputs)){let e=contentAttribute(t.event.input);e!==void 0&&t.span.setAttribute(`gen_ai.tool.call.arguments`,e)}}function finishIfReady(e){e.span===void 0&&e.correlated!==!0||e.terminal===void 0||finish(e)}async function correlate(t){let n=await e.stateStore.getAction(t.actionKey)??await e.stateStore.findAction(t.event.scope.sessionId,t.event.callId);if(n===void 0)return;t.correlated=!0,t.context=trace.setSpan(t.context,trace.wrapSpanContext({isRemote:!1,spanId:n.spanId,traceFlags:n.parent.traceFlags,traceId:n.parent.traceId}));let r=t.terminal,i=t.pendingError!==void 0||r?.type===`tool.call.failed`||r?.output.type===`error`,a=t.pendingError?.error??(r?.type===`tool.call.failed`?r.error:r?.output.type===`error`?r.output.error:void 0),o={...n.toolAttributes,...t.event.scope.functionId===void 0||n.kind===`subagent-call`||n.kind===`remote-agent-call`?void 0:{"gen_ai.agent.name":t.event.scope.functionId},"agent.tool.is_framework":t.event.frameworkTool===!0,...t.additionalAttributes,...t.pendingError?.errorType===void 0?void 0:{"error.type":t.pendingError.errorType},...r?.type===`tool.call.completed`&&r.durationMs!==void 0?{"gen_ai.execute_tool.duration":r.durationMs/1e3}:void 0};await e.stateStore.setAction(actionIdempotencyKey(n.sessionId,n.turnId,n.callId),{...n,startTimeMs:Math.min(n.startTimeMs,t.startTimeMs),toolAttributes:o,toolEndTimeMs:r?.completedAtMs??n.toolEndTimeMs,toolFailed:i||n.toolFailed,toolErrorAttribute:e.recordOutputs&&a!==void 0?contentAttribute(a instanceof Error?a.message:a):n.toolErrorAttribute})}function finish(t,n){let r=t.span;if(t.finished===!0)return;if(t.correlated===!0){t.finished=!0,forget(t);return}if(r===void 0)return;t.finished=!0;let i=t.terminal;if(i?.type===`tool.call.completed`&&i.durationMs!==void 0&&r.setAttribute(`gen_ai.execute_tool.duration`,i.durationMs/1e3),n!==void 0)recordAgentSpanError(r,n.error);else if(i?.type===`tool.call.failed`)recordAgentSpanError(r,i.error);else if(i?.output.type===`error`)recordAgentSpanError(r,i.output.error);else if(i!==void 0&&e.recordOutputs){let e=contentAttribute(i.output.output);e!==void 0&&r.setAttribute(`gen_ai.tool.call.result`,e)}r.end(i?.completedAtMs),forget(t)}function forget(e){t.delete(e.actionKey);let r=n.get(e.attemptId);r?.delete(e.idempotencyKey),r?.size===0&&n.delete(e.attemptId)}}function toolAttributes(e){return{"agent.tool.is_framework":e.frameworkTool===!0,...e.scope.functionId===void 0?{}:{"gen_ai.agent.name":e.scope.functionId},"gen_ai.operation.name":`execute_tool`,"gen_ai.tool.call.id":e.callId,"gen_ai.tool.name":e.toolName,"gen_ai.tool.type":`function`,...agentSpanNamingAttributes(`execute_tool ${e.toolName}`,`execute_tool`),...agentTraceIdentityAttributes({rootSessionId:e.scope.rootSessionId??e.scope.sessionId,traceSessionId:traceSessionIdOf(e.scope),sessionId:e.scope.sessionId})}}function contextFromSpanContext(e){return trace.setSpan(ROOT_CONTEXT,trace.wrapSpanContext(e))}function recordToolError(e,t,n){if(t instanceof Error||t===void 0){recordAgentSpanError(e,t,n);return}let r=typeof t==`string`?textContentAttribute(t):contentAttribute(t),i=typeof t==`object`&&t&&!Array.isArray(t)?Reflect.get(t,`message`):void 0,a=typeof i==`string`?textContentAttribute(r===void 0?i:`${i}\n${r}`):r,o=a===void 0?void 0:Error(a);o!==void 0&&n!==void 0&&(o.name=n),recordAgentSpanError(e,o,n)}export{createAgentToolInstrumentation};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { type Attributes, type Context } from "#compiled/@opentelemetry/api/index.js";
|
|
2
|
-
interface AgentToolContentPolicy {
|
|
3
|
-
readonly recordInputs: boolean;
|
|
4
|
-
readonly recordOutputs: boolean;
|
|
5
|
-
}
|
|
6
|
-
interface AgentToolSpanContext extends AgentToolContentPolicy {
|
|
7
|
-
readonly recordError?: (error: unknown, errorType?: string) => void;
|
|
8
|
-
readonly setAttributes?: (attributes: Attributes) => void;
|
|
9
|
-
}
|
|
10
|
-
export declare function withAgentToolSpanContext(context: Context, value: AgentToolSpanContext): Context;
|
|
11
|
-
export declare function withAgentToolContentPolicy(context: Context, policy: AgentToolContentPolicy): Context;
|
|
12
|
-
export declare function agentToolSpanContext(context?: Context): AgentToolSpanContext | undefined;
|
|
13
|
-
export declare function agentToolContentPolicy(context?: Context): AgentToolContentPolicy;
|
|
14
|
-
export declare function annotateAgentToolSpan(attributes: Attributes, context?: Context): boolean;
|
|
15
|
-
export declare function recordAgentToolSpanError(error: unknown, errorType?: string, context?: Context): boolean;
|
|
16
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{context,createContextKey}from"#compiled/@opentelemetry/api/index.js";const AGENT_TOOL_SPAN_CONTEXT_KEY=createContextKey(`eve.agent.tool-span-context`),NO_CONTENT_POLICY={recordInputs:!1,recordOutputs:!1};function withAgentToolSpanContext(e,t){return e.setValue(AGENT_TOOL_SPAN_CONTEXT_KEY,t)}function withAgentToolContentPolicy(e,t){let n=agentToolSpanContext(e);return e.setValue(AGENT_TOOL_SPAN_CONTEXT_KEY,{...n,...t})}function agentToolSpanContext(e=context.active()){return e.getValue(AGENT_TOOL_SPAN_CONTEXT_KEY)}function agentToolContentPolicy(e=context.active()){let t=agentToolSpanContext(e);return t===void 0?NO_CONTENT_POLICY:{recordInputs:t.recordInputs,recordOutputs:t.recordOutputs}}function annotateAgentToolSpan(e,t=context.active()){let n=agentToolSpanContext(t)?.setAttributes;return n!==void 0&&(n(e),!0)}function recordAgentToolSpanError(e,t,n=context.active()){let r=agentToolSpanContext(n);return r?.recordError!==void 0&&(r.recordError(r.recordOutputs?e:void 0,t),!0)}export{agentToolContentPolicy,agentToolSpanContext,annotateAgentToolSpan,recordAgentToolSpanError,withAgentToolContentPolicy,withAgentToolSpanContext};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { AgentActionTraceState, AgentSessionTraceState, AgentTurnTraceState } from "#tracing/agent-trace-state.js";
|
|
2
|
-
export declare const AGENT_TRACE_CONTEXT_KEY = "eve.harness.agentTrace";
|
|
3
|
-
export declare function decodeTraceSessionId(state: {
|
|
4
|
-
readonly traceSessionId?: unknown;
|
|
5
|
-
readonly rootSessionId?: unknown;
|
|
6
|
-
}): string;
|
|
7
|
-
export interface AgentTraceContextState {
|
|
8
|
-
readonly actionAnchors: Readonly<Record<string, AgentActionTraceState>>;
|
|
9
|
-
readonly actions: Readonly<Record<string, AgentActionTraceState>>;
|
|
10
|
-
readonly sessions: Readonly<Record<string, AgentSessionTraceState>>;
|
|
11
|
-
readonly turns: Readonly<Record<string, AgentTurnTraceState>>;
|
|
12
|
-
}
|
|
13
|
-
export declare function emptyAgentTraceContextState(): AgentTraceContextState;
|
|
14
|
-
export declare function serializeAgentTraceContextState(state: AgentTraceContextState): unknown;
|
|
15
|
-
export declare function deserializeAgentTraceContextState(data: unknown): AgentTraceContextState;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{normalizeChannelAudience}from"#shared/channel-audience.js";import{isInstrumentationPrincipalType}from"#instrumentation/lifecycle.js";import{boundedPrincipalId}from"#tracing/telemetry-budget.js";import{readInstrumentationDecision}from"#shared/instrumentation-decision.js";import{CONTENT_ATTRIBUTE_LIMIT}from"#tracing/agent-otel-content.js";import{boundedTraceError}from"#tracing/bounded-error.js";const AGENT_TRACE_CONTEXT_KEY=`eve.harness.agentTrace`;function decodeTraceSessionId(e){return typeof e.traceSessionId==`string`?e.traceSessionId:typeof e.rootSessionId==`string`?e.rootSessionId:``}function emptyAgentTraceContextState(){return{actionAnchors:{},actions:{},sessions:{},turns:{}}}function serializeAgentTraceContextState(e){return{actionAnchors:e.actionAnchors,actions:e.actions,sessions:Object.fromEntries(Object.entries(e.sessions).map(([e,t])=>[e,{...t,context:serializeSpanContext(t.context)}])),turns:Object.fromEntries(Object.entries(e.turns).map(([e,t])=>[e,{...t,caller:t.caller===void 0?void 0:serializeSpanContext(t.caller),channelDelivery:t.channelDelivery===void 0?void 0:{...t.channelDelivery,requestTraceContext:t.channelDelivery.requestTraceContext===void 0?void 0:serializeSpanContext(t.channelDelivery.requestTraceContext)},context:serializeSpanContext(t.context),terminal:t.terminal===void 0?void 0:t.terminal.type===`turn.failed`?{error:serializeError(t.terminal.error),type:t.terminal.type}:{type:t.terminal.type}}]))}}function deserializeAgentTraceContextState(e){return isRecord(e)?{actionAnchors:deserializeRecord(e.actionAnchors,deserializeAction),actions:deserializeRecord(e.actions,deserializeAction),sessions:deserializeRecord(e.sessions,deserializeSession),turns:deserializeRecord(e.turns,deserializeTurn)}:emptyAgentTraceContextState()}function deserializeSession(e){if(isRecord(e)&&isSpanContext(e.context))return{agentName:typeof e.agentName==`string`?e.agentName:void 0,channelAudience:normalizeChannelAudience(e.channelAudience),channelKind:typeof e.channelKind==`string`?e.channelKind:void 0,channelType:typeof e.channelType==`string`?e.channelType:void 0,context:e.context,decision:readInstrumentationDecision(e.decision),parentLineage:deserializeParentLineage(e.parentLineage),rootSessionId:typeof e.rootSessionId==`string`?e.rootSessionId:``,traceSessionId:decodeTraceSessionId(e),scheduleId:typeof e.scheduleId==`string`?e.scheduleId:void 0,title:typeof e.title==`string`?e.title:void 0}}function deserializeTurn(e){if(isRecord(e)&&isSpanContext(e.context)&&typeof e.startTimeMs==`number`)return{caller:isSpanContext(e.caller)?e.caller:void 0,channelDelivery:deserializeTurnChannelDelivery(e.channelDelivery),context:e.context,currentPrincipal:deserializePrincipalSummary(e.currentPrincipal),initiatorPrincipal:deserializePrincipalSummary(e.initiatorPrincipal),inputMessagesAttribute:deserializeContentAttribute(e.inputMessagesAttribute),modelUsage:deserializeModelUsage(e.modelUsage),outputMessagesAttribute:deserializeContentAttribute(e.outputMessagesAttribute),parentLineage:deserializeParentLineage(e.parentLineage),rootSessionId:typeof e.rootSessionId==`string`?e.rootSessionId:``,traceSessionId:decodeTraceSessionId(e),sequence:typeof e.sequence==`number`?e.sequence:0,startTimeMs:e.startTimeMs,subagentName:typeof e.subagentName==`string`?e.subagentName:void 0,terminal:deserializeTurnTerminal(e.terminal)}}function deserializeTurnChannelDelivery(e){if(isRecord(e)&&typeof e.channelKind==`string`&&typeof e.channelName==`string`&&typeof e.deliveryId==`string`)return{channelKind:e.channelKind,channelName:e.channelName,deliveryId:e.deliveryId,inputAttribute:typeof e.inputAttribute==`string`?e.inputAttribute:void 0,requestId:typeof e.requestId==`string`?e.requestId:void 0,requestTraceContext:isSpanContext(e.requestTraceContext)?e.requestTraceContext:void 0}}function deserializePrincipalSummary(e){if(!isRecord(e)||!isInstrumentationPrincipalType(e.type))return;let t=e.type===`none`?void 0:boundedPrincipalId(e.id);return t===void 0?{type:e.type}:{id:t,type:e.type}}function deserializeAction(e){if(isRecord(e)&&typeof e.attemptIndex==`number`&&typeof e.callId==`string`&&isActionKind(e.kind)&&typeof e.name==`string`&&isSpanContext(e.parent)&&typeof e.rootSessionId==`string`&&typeof e.sessionId==`string`&&typeof e.spanId==`string`&&typeof e.startTimeMs==`number`&&typeof e.stepIndex==`number`&&typeof e.turnId==`string`)return{attemptIndex:e.attemptIndex,callId:e.callId,channelAudience:normalizeChannelAudience(e.channelAudience),inputAttribute:typeof e.inputAttribute==`string`?e.inputAttribute:void 0,kind:e.kind,name:e.name,parent:e.parent,rootSessionId:e.rootSessionId,traceSessionId:decodeTraceSessionId(e),sessionId:e.sessionId,spanId:e.spanId,startTimeMs:e.startTimeMs,stepIndex:e.stepIndex,turnId:e.turnId,toolEndTimeMs:typeof e.toolEndTimeMs==`number`?e.toolEndTimeMs:void 0,toolFailed:e.toolFailed===!0,toolErrorAttribute:typeof e.toolErrorAttribute==`string`?e.toolErrorAttribute:void 0,toolAttributes:isRecord(e.toolAttributes)?Object.fromEntries(Object.entries(e.toolAttributes).filter(e=>{let t=e[1];return typeof t==`string`||typeof t==`number`||typeof t==`boolean`||Array.isArray(t)&&t.every(e=>[`string`,`number`,`boolean`].includes(typeof e))})):void 0}}function deserializeContentAttribute(e){return typeof e==`string`&&e.length<=CONTENT_ATTRIBUTE_LIMIT?e:void 0}function deserializeModelUsage(e){if(!isRecord(e))return;let t=typeof e.inputTokens==`number`?e.inputTokens:void 0,n=typeof e.outputTokens==`number`?e.outputTokens:void 0;return t===void 0&&n===void 0?void 0:{inputTokens:t,outputTokens:n}}function deserializeParentLineage(e){if(isRecord(e)&&typeof e.callId==`string`&&typeof e.sessionId==`string`&&typeof e.turnId==`string`)return{callId:e.callId,sessionId:e.sessionId,subagentName:typeof e.subagentName==`string`?e.subagentName:void 0,turnId:e.turnId}}function deserializeTurnTerminal(e){if(isRecord(e)&&isTurnTerminalType(e.type))return e.type===`turn.failed`?{error:deserializeError(e.error),type:e.type}:{type:e.type}}function deserializeRecord(e,t){if(!isRecord(e))return{};let n={};for(let[r,i]of Object.entries(e)){let e=t(i);e!==void 0&&(n[r]=e)}return n}function serializeSpanContext(e){return{isRemote:e.isRemote,spanId:e.spanId,traceFlags:e.traceFlags,traceId:e.traceId}}function serializeError(e){if(!(e instanceof Error))return;let t=boundedTraceError(e);return{message:t.message,name:t.name,stack:t.stack}}function deserializeError(e){if(!isRecord(e)||typeof e.message!=`string`)return;let t=Error(e.message);return typeof e.name==`string`&&(t.name=e.name),typeof e.stack==`string`&&(t.stack=e.stack),t}function isActionKind(e){return e===`load-skill`||e===`remote-agent-call`||e===`subagent-call`||e===`tool-call`}function isTurnTerminalType(e){return e===`turn.cancelled`||e===`turn.completed`||e===`turn.failed`}function isSpanContext(e){return isRecord(e)&&typeof e.spanId==`string`&&typeof e.traceFlags==`number`&&typeof e.traceId==`string`}function isRecord(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}export{AGENT_TRACE_CONTEXT_KEY,decodeTraceSessionId,deserializeAgentTraceContextState,emptyAgentTraceContextState,serializeAgentTraceContextState};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createLogger}from"#internal/logging.js";import{decisionToTraceContentCeiling,resolveForwardedTraceSeed}from"#shared/forwarded-trace-policy.js";import{contextStorage,loadContext}from"#context/container.js";import{SessionTraceSeedKey}from"#context/keys.js";import{ContextKey}from"#context/key.js";import{getBlockingWorkflowToolRuns}from"#harness/workflow-tool-runs.js";import{actionIdempotencyKey}from"#instrumentation/lifecycle.js";import{AGENT_TRACE_CONTEXT_KEY,deserializeAgentTraceContextState,emptyAgentTraceContextState,serializeAgentTraceContextState}from"#tracing/agent-trace-context-codec.js";const AgentTraceContextKey=new ContextKey(AGENT_TRACE_CONTEXT_KEY,{codec:{deserialize:deserializeAgentTraceContextState,serialize:serializeAgentTraceContextState}});function pruneAgentTraceState(e,t,n){try{pruneTraceOwnership(e,t,n)}catch(e){createLogger(`tracing.retention`).warn(`could not reconcile trace ownership; preserving trace state`,{error:e})}}function pruneTraceOwnership(e,t,n){let r=e.get(AgentTraceContextKey);if(r===void 0)return;let i=new Set(getBlockingWorkflowToolRuns(n).map(e=>e.callId)),a=Object.fromEntries(Object.entries(r.actionAnchors).filter(([e,n])=>n.sessionId!==t||r.actions[e]!==void 0||i.has(n.callId)));e.set(AgentTraceContextKey,{...r,actionAnchors:a})}function readSessionTraceDecision(e,t){return e.get(AgentTraceContextKey)?.sessions[t]?.decision}function preserveSerializedAgentTraceState(e,t){let n=t[AgentTraceContextKey.name];return n===void 0?e:{...e,[AgentTraceContextKey.name]:n}}function readTurnTraceContext(e,t,n){let r=e[AgentTraceContextKey.name];if(r===void 0)return;let i=deserializeAgentTraceContextState(r),a=i.turns[turnKey(t,n)];return a===void 0?void 0:withTraceDecision(e,a.context,i.sessions[t]?.decision)}function readActionTraceContext(e,t,n,r){let i=e[AgentTraceContextKey.name];if(i===void 0)return;let a=deserializeAgentTraceContextState(i),o=actionIdempotencyKey(t,n,r),s=a.actions[o]??a.actionAnchors[o];if(s!==void 0)return withTraceDecision(e,{isRemote:!1,spanId:s.spanId,traceFlags:s.parent.traceFlags,traceId:s.parent.traceId},a.sessions[s.sessionId]?.decision)}function withTraceDecision(e,t,n){let r=e[SessionTraceSeedKey.name],i=resolveForwardedTraceSeed({decision:n??r?.decision,forwardedTracePolicy:r?.forwardedTracePolicy,traceFlags:t.traceFlags}),a=i.decision,o=i.forwardedTracePolicy,s=decisionToTraceContentCeiling(a),c={...t,traceFlags:i.traceFlags};if(o===void 0)return a===void 0?c:{...c,decision:a};let l=s===void 0?o:{...o,ceiling:s};return a===void 0?{...c,forwardedTracePolicy:l}:{...c,decision:a,forwardedTracePolicy:l}}var ContextAgentTraceStateStore=class{deleteAction(e){updateState(t=>{let n={...t.actions};return delete n[e],{...t,actions:n}})}deleteActionAnchors(e){updateState(t=>({...t,actionAnchors:Object.fromEntries(Object.entries(t.actionAnchors).filter(([,t])=>t.sessionId!==e))}))}deleteActions(e,t){updateState(n=>{let r={...n.actions};for(let[n,i]of Object.entries(r))i.sessionId===e&&(t===void 0||i.turnId===t)&&delete r[n];return{...n,actions:r}})}deleteSession(e){updateState(t=>{let n={...t.sessions};return delete n[e],{...t,sessions:n}})}deleteTurn(e,t){updateState(n=>{let r={...n.turns};return delete r[turnKey(e,t)],{...n,turns:r}})}findAction(e,t){return Object.values(contextStorage.getStore()?.get(AgentTraceContextKey)?.actions??{}).find(n=>n.sessionId===e&&n.callId===t)}findActionAnchor(e,t,n){return Object.values(contextStorage.getStore()?.get(AgentTraceContextKey)?.actionAnchors??{}).find(r=>r.sessionId===e&&r.turnId===t&&r.callId===n)}getAction(e){return contextStorage.getStore()?.get(AgentTraceContextKey)?.actions[e]}getSession(e){return contextStorage.getStore()?.get(AgentTraceContextKey)?.sessions[e]}getTurn(e,t){return contextStorage.getStore()?.get(AgentTraceContextKey)?.turns[turnKey(e,t)]}setAction(e,t){updateState(n=>({...n,actions:{...n.actions,[e]:t}}))}setActionAnchor(e,t){updateState(n=>({...n,actionAnchors:{...n.actionAnchors,[e]:t}}))}setSession(e,t){updateState(n=>({...n,sessions:{...n.sessions,[e]:t}}))}setTurn(e,t,n){updateState(r=>({...r,turns:{...r.turns,[turnKey(e,t)]:n}}))}updateTurn(e,t,n){updateState(r=>{let i=turnKey(e,t),a=r.turns[i];return a===void 0?r:{...r,turns:{...r.turns,[i]:n(a)}}})}};function updateState(e){loadContext().set(AgentTraceContextKey,t=>e(t??emptyAgentTraceContextState()))}function turnKey(e,t){return`${e}\0${t}`}export{ContextAgentTraceStateStore,preserveSerializedAgentTraceState,pruneAgentTraceState,readActionTraceContext,readSessionTraceDecision,readTurnTraceContext};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createContextKey}from"#compiled/@opentelemetry/api/index.js";const AGENT_TRACE_KEY=createContextKey(`eve.agent.trace`);function isAgentTraceContext(e){if(typeof e!=`object`||!e)return!1;let t=Reflect.get(e,`getValue`);return typeof t==`function`&&Reflect.apply(t,e,[AGENT_TRACE_KEY])===!0}function markAgentTraceContext(e){return e.setValue(AGENT_TRACE_KEY,!0)}export{isAgentTraceContext,markAgentTraceContext};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isAgentActivationSpan,isDirectToolCallSpan}from"#tracing/agent-span-contract.js";var AgentTraceSpanProcessor=class{#e;#t=new Set;#n=new Set;#r=new Set;#i=new Map;#a=new Map;constructor(e){this.#e=e}async forceFlush(){await Promise.all(this.#e.map(e=>e.forceFlush()))}onStart(e,t){if(!isSpanLike(e))return;isDirectToolCallSpan(e)&&this.#o(e);let n=e.attributes[`gen_ai.conversation.id`],r=e.attributes[`agent.run.id`];if(typeof n==`string`){let t=e.spanContext().traceId;this.#t.has(t)||this.#r.has(t)?this.#a.get(t)?.ownerRunId===void 0&&typeof r==`string`&&this.#a.set(t,{conversationId:n,ownerRunId:r}):(this.#t.add(t),this.#a.set(t,{conversationId:n,ownerRunId:typeof r==`string`?r:void 0}))}if(this.#c(e))for(let n of this.#e)n.onStart(e,t)}onEnd(e){if(!isSpanLike(e)||!this.#c(e))return;for(let t of this.#e)t.onEnd(e);let t=e.spanContext().traceId,n=this.#a.get(t);isAgentActivationSpan({name:e.name??``,attributes:e.attributes})&&n?.ownerRunId===e.attributes[`agent.run.id`]&&n?.conversationId===e.attributes[`gen_ai.conversation.id`]&&this.#n.add(t),isDirectToolCallSpan(e)&&this.#s(e)}activeTraceIds(){return this.#t}releaseCompletedTraces(){if(this.#n.size===0)return!1;for(let e of this.#n)this.#t.delete(e),this.#a.delete(e),this.#r.add(e);for(this.#n.clear();this.#r.size>2048;){let e=this.#r.values().next().value;this.#r.delete(e)}return!0}releaseConversation(e){let t=!1;for(let[n,r]of this.#a)r.conversationId===e&&(t=!0,this.#t.delete(n),this.#n.delete(n),this.#a.delete(n),this.#i.delete(n));return t}async shutdown(){await Promise.all(this.#e.map(e=>e.shutdown()))}#o(e){let{spanId:t,traceId:n}=e.spanContext();if(t===void 0)return;let r=this.#i.get(n);if(r!==void 0){r.add(t),this.#n.delete(n);return}if(this.#t.has(n)&&!this.#n.has(n))return;let i=e.attributes[`gen_ai.conversation.id`],a=e.attributes[`agent.run.id`];typeof i==`string`&&(this.#n.delete(n),this.#r.delete(n),this.#t.add(n),this.#a.set(n,{conversationId:i,ownerRunId:typeof a==`string`?a:void 0}),this.#i.set(n,new Set([t])))}#s(e){let{spanId:t,traceId:n}=e.spanContext(),r=this.#i.get(n);t!==void 0&&r!==void 0&&r.delete(t)&&(r.size>0||(this.#i.delete(n),this.#n.add(n)))}#c(e){return e.instrumentationScope?.name!==`workflow`&&(this.#t.has(e.spanContext().traceId)||this.#r.has(e.spanContext().traceId))}};function isSpanLike(e){return typeof e==`object`&&!!e&&`attributes`in e&&`spanContext`in e&&typeof e.spanContext==`function`}export{AgentTraceSpanProcessor};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import type { Attributes, SpanContext } from "#compiled/@opentelemetry/api/index.js";
|
|
2
|
-
import type { InstrumentationToolCallKind, InstrumentationParentLineage, InstrumentationPrincipalSummary, InstrumentationTraceContext, InstrumentationTurnFailedEvent, InstrumentationTurnSettledEvent } from "#instrumentation/lifecycle.js";
|
|
3
|
-
import type { ChannelAudience } from "#shared/channel-audience.js";
|
|
4
|
-
import type { InstrumentationDecision } from "#shared/instrumentation-decision.js";
|
|
5
|
-
export interface AgentSessionTraceState {
|
|
6
|
-
readonly traceSessionId: string;
|
|
7
|
-
readonly channelAudience?: ChannelAudience;
|
|
8
|
-
readonly agentName?: string;
|
|
9
|
-
readonly channelKind?: string;
|
|
10
|
-
readonly channelType?: string;
|
|
11
|
-
readonly context: SpanContext;
|
|
12
|
-
readonly decision?: InstrumentationDecision;
|
|
13
|
-
readonly parentLineage?: InstrumentationParentLineage;
|
|
14
|
-
readonly rootSessionId: string;
|
|
15
|
-
readonly scheduleId?: string;
|
|
16
|
-
readonly title?: string;
|
|
17
|
-
}
|
|
18
|
-
export interface AgentTurnTraceState {
|
|
19
|
-
readonly traceSessionId: string;
|
|
20
|
-
readonly caller?: SpanContext;
|
|
21
|
-
readonly channelDelivery?: AgentTurnChannelDeliveryTraceState;
|
|
22
|
-
readonly context: SpanContext;
|
|
23
|
-
readonly currentPrincipal?: InstrumentationPrincipalSummary;
|
|
24
|
-
readonly initiatorPrincipal?: InstrumentationPrincipalSummary;
|
|
25
|
-
readonly parentLineage?: InstrumentationParentLineage;
|
|
26
|
-
/** First model input projected onto the turn-level invoke_agent span. */
|
|
27
|
-
readonly inputMessagesAttribute?: string;
|
|
28
|
-
readonly modelUsage?: {
|
|
29
|
-
readonly inputTokens?: number;
|
|
30
|
-
readonly outputTokens?: number;
|
|
31
|
-
};
|
|
32
|
-
/** Latest model output projected onto the turn-level invoke_agent span. */
|
|
33
|
-
readonly outputMessagesAttribute?: string;
|
|
34
|
-
readonly rootSessionId: string;
|
|
35
|
-
readonly sequence: number;
|
|
36
|
-
readonly startTimeMs: number;
|
|
37
|
-
readonly subagentName?: string;
|
|
38
|
-
readonly terminal?: {
|
|
39
|
-
readonly error: unknown;
|
|
40
|
-
readonly type: InstrumentationTurnFailedEvent["type"];
|
|
41
|
-
} | {
|
|
42
|
-
readonly type: InstrumentationTurnSettledEvent["type"];
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
export interface AgentTurnChannelDeliveryTraceState {
|
|
46
|
-
readonly channelKind: string;
|
|
47
|
-
readonly channelName: string;
|
|
48
|
-
readonly deliveryId: string;
|
|
49
|
-
readonly inputAttribute?: string;
|
|
50
|
-
readonly requestId?: string;
|
|
51
|
-
readonly requestTraceContext?: SpanContext;
|
|
52
|
-
}
|
|
53
|
-
export interface AgentActionTraceState {
|
|
54
|
-
readonly traceSessionId: string;
|
|
55
|
-
readonly attemptIndex: number;
|
|
56
|
-
readonly callId: string;
|
|
57
|
-
readonly channelAudience?: ChannelAudience;
|
|
58
|
-
readonly inputAttribute?: string;
|
|
59
|
-
readonly kind: InstrumentationToolCallKind;
|
|
60
|
-
readonly name: string;
|
|
61
|
-
readonly parent: InstrumentationTraceContext;
|
|
62
|
-
readonly rootSessionId: string;
|
|
63
|
-
readonly sessionId: string;
|
|
64
|
-
readonly spanId: string;
|
|
65
|
-
readonly startTimeMs: number;
|
|
66
|
-
readonly stepIndex: number;
|
|
67
|
-
readonly turnId: string;
|
|
68
|
-
readonly toolAttributes?: Attributes;
|
|
69
|
-
readonly toolEndTimeMs?: number;
|
|
70
|
-
readonly toolFailed?: boolean;
|
|
71
|
-
readonly toolErrorAttribute?: string;
|
|
72
|
-
}
|
|
73
|
-
/** Provider-owned serializable storage for durable agent trace state. */
|
|
74
|
-
export interface AgentTraceStateStore {
|
|
75
|
-
deleteAction(idempotencyKey: string): void | PromiseLike<void>;
|
|
76
|
-
deleteActionAnchors(sessionId: string): void | PromiseLike<void>;
|
|
77
|
-
deleteActions(sessionId: string, turnId?: string): void | PromiseLike<void>;
|
|
78
|
-
deleteSession(sessionId: string): void | PromiseLike<void>;
|
|
79
|
-
deleteTurn(sessionId: string, turnId: string): void | PromiseLike<void>;
|
|
80
|
-
findAction(sessionId: string, callId: string): AgentActionTraceState | undefined | PromiseLike<AgentActionTraceState | undefined>;
|
|
81
|
-
findActionAnchor(sessionId: string, turnId: string, callId: string): AgentActionTraceState | undefined | PromiseLike<AgentActionTraceState | undefined>;
|
|
82
|
-
getAction(idempotencyKey: string): AgentActionTraceState | undefined | PromiseLike<AgentActionTraceState | undefined>;
|
|
83
|
-
getSession(sessionId: string): AgentSessionTraceState | undefined | PromiseLike<AgentSessionTraceState | undefined>;
|
|
84
|
-
getTurn(sessionId: string, turnId: string): AgentTurnTraceState | undefined | PromiseLike<AgentTurnTraceState | undefined>;
|
|
85
|
-
setAction(idempotencyKey: string, state: AgentActionTraceState): void | PromiseLike<void>;
|
|
86
|
-
setActionAnchor(idempotencyKey: string, state: AgentActionTraceState): void | PromiseLike<void>;
|
|
87
|
-
setSession(sessionId: string, state: AgentSessionTraceState): void | PromiseLike<void>;
|
|
88
|
-
setTurn(sessionId: string, turnId: string, state: AgentTurnTraceState): void | PromiseLike<void>;
|
|
89
|
-
/** Atomically updates an existing turn and does nothing after that turn is deleted. */
|
|
90
|
-
updateTurn(sessionId: string, turnId: string, update: (state: AgentTurnTraceState) => AgentTurnTraceState): void | PromiseLike<void>;
|
|
91
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createLogger,formatError}from"#internal/logging.js";import{TraceFlags,context,createContextKey}from"#compiled/@opentelemetry/api/index.js";const log=createLogger(`harness.batch-span-processor`),SUPPRESS_TRACING_KEY=createContextKey(`OpenTelemetry SDK Context Key SUPPRESS_TRACING`),DEFAULTS={exportTimeoutMillis:3e4,maxExportBatchSize:512,maxQueueSize:2048,scheduledDelayMillis:5e3};function batchSpanProcessor(e,t={}){let n=t.exportTimeoutMillis??DEFAULTS.exportTimeoutMillis,r=t.maxExportBatchSize??DEFAULTS.maxExportBatchSize,i=t.maxQueueSize??DEFAULTS.maxQueueSize,a=t.scheduledDelayMillis??DEFAULTS.scheduledDelayMillis,o=[],s,c=Promise.resolve(),l=!1;function cancelTimer(){s!==void 0&&(clearTimeout(s),s=void 0)}function scheduleDrain(){s===void 0&&(s=setTimeout(()=>{s=void 0,drain()},a),s.unref?.())}function drain(){return waitForExporter(pendingDrain(),`span export`).then(()=>void 0)}async function exportBatch(t){try{await new Promise((n,r)=>{try{context.with(context.active().setValue(SUPPRESS_TRACING_KEY,!0),()=>{e.export(t,e=>{if(e.code===0){n();return}r(e.error??Error(`Span export failed.`))})})}catch(e){r(e instanceof Error?e:Error(String(e)))}})}catch(e){log.warn(`span export failed`,{error:formatError(e)})}}return{async forceFlush(){!l&&await waitForExporter(pendingDrain(),`span export`)&&e.forceFlush!==void 0&&await waitForExporter(settleExporter(`exporter flush`,e.forceFlush),`exporter flush`)},onEnd(e){if(!l&&isSampled(e)&&!(o.length>=i)){if(o.push(e),o.length>=r){drain();return}scheduleDrain()}},onStart(){},async shutdown(){l=!0;let t=pendingDrain();if(!await waitForExporter(t,`span export`)){t.then(()=>settleExporter(`exporter shutdown`,e.shutdown));return}await waitForExporter(settleExporter(`exporter shutdown`,e.shutdown),`exporter shutdown`)}};function pendingDrain(){return cancelTimer(),c=c.then(async()=>{for(;o.length>0;)await exportBatch(o.splice(0,r))}),c}async function waitForExporter(e,t){let r,i=new Promise(e=>{r=setTimeout(()=>{log.warn(`${t} timed out; preserving exporter serialization`,{timeoutMillis:n}),e(!1)},n),r.unref?.()}),a=e.then(()=>!0);try{return await Promise.race([a,i])}finally{clearTimeout(r)}}async function settleExporter(t,n){try{await n.call(e)}catch(e){log.warn(`${t} failed`,{error:formatError(e)})}}}function isSampled(e){if(typeof e!=`object`||!e||!(`spanContext`in e))return!1;let t=e.spanContext;if(typeof t!=`function`)return!1;let n=Reflect.apply(t,e,[]);return typeof n.traceFlags==`number`&&(n.traceFlags&TraceFlags.SAMPLED)===TraceFlags.SAMPLED}export{batchSpanProcessor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function boundedTraceError(value: Error): Error;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{truncateTelemetryText}from"#tracing/telemetry-budget.js";function boundedTraceError(e){let t=Error(truncateTelemetryText(e.message,4096));return t.name=truncateTelemetryText(e.name,128),t.stack=e.stack===void 0?void 0:truncateTelemetryText(e.stack,8192),t}export{boundedTraceError};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const INPUT_CONTENT_ATTRIBUTES=new Set([`agent.channel.delivery.input`,`agent.session.title`,`agent.approval.request`,`ai.documents`,`ai.prompt`,`ai.prompt.toolChoice`,`ai.prompt.tools`,`ai.value`,`ai.values`,`gen_ai.input.messages`,`gen_ai.memory.records`,`gen_ai.system_instructions`,`gen_ai.tool.call.arguments`,`gen_ai.tool.definitions`]),OUTPUT_CONTENT_ATTRIBUTES=new Set([`agent.approval.response`,`ai.embedding`,`ai.embeddings`,`ai.ranking`,`ai.response.files`,`ai.response.object`,`ai.response.reasoning`,`ai.response.text`,`ai.response.toolCalls`,`ai.response.tool_calls`,`ai.response.tool_results`,`ai.toolCall.args`,`ai.toolCall.result`,`gen_ai.output.messages`,`gen_ai.tool.call.result`]),INPUT_POLICY_ATTRIBUTE=`agent.trace.content.input`,OUTPUT_POLICY_ATTRIBUTE=`agent.trace.content.output`;function isDeclined(e,t){return!t.recordInputs&&INPUT_CONTENT_ATTRIBUTES.has(e)?!0:!t.recordOutputs&&OUTPUT_CONTENT_ATTRIBUTES.has(e)}function narrowsContentPolicy(e,t){return!t.recordInputs&&e[INPUT_POLICY_ATTRIBUTE]===!0||!t.recordOutputs&&e[OUTPUT_POLICY_ATTRIBUTE]===!0}function exportedAttributeValue(e,t,n){return e===INPUT_POLICY_ATTRIBUTE&&t===!0&&!n.recordInputs||e===OUTPUT_POLICY_ATTRIBUTE&&t===!0&&!n.recordOutputs?!1:t}function withoutDeclinedContent(e,t){let n=Object.keys(e);if(!n.some(e=>isDeclined(e,t))&&!narrowsContentPolicy(e,t))return;let r={};for(let i of n)isDeclined(i,t)||(r[i]=exportedAttributeValue(i,e[i],t));return r}export{withoutDeclinedContent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{normalizeChannelAudience}from"#shared/channel-audience.js";import{hasConversationRelease}from"#tracing/local-traces.js";import{channelAudienceFromContext}from"#tracing/channel-audience-context.js";import{withoutDeclinedContent}from"#tracing/content-attributes.js";import{normalizeSpanExportPolicies}from"#tracing/span-export-policy.js";function contentFilteringProcessor(e,t){let n=normalizeSpanExportPolicies(t);if(n.length===0)return e;let r=e;for(let e of n.toReversed())r=policyFilteringProcessor(r,e);return r}function policyFilteringProcessor(e,t){let n=new WeakMap,r=new WeakSet,i={forceFlush:()=>e.forceFlush(),onEnd:i=>{if(typeof i!=`object`||!i)return;let a=facadeFor(i,t,n);if(r.has(i)||!a.exported){r.delete(i),n.delete(i);return}a.refresh();try{e.onEnd(a.value)}finally{n.delete(i)}},onStart:(i,a)=>{if(typeof i!=`object`||!i)return;let o=facadeFor(i,t,n,channelAudienceFromContext(a));if(!o.exported){r.add(i);return}e.onStart(o.value,a)},shutdown:()=>e.shutdown()};return hasConversationRelease(e)?{...i,releaseConversation:t=>e.releaseConversation(t)}:i}function facadeFor(e,t,n,r){let i=n.get(e);if(i!==void 0)return i;let a=spanExportContext(e,r),o=spanExportDecision(a,t),s={recordInputs:!o.redactInputs,recordOutputs:!o.redactOutputs},c={},l=[],u={},d=Object.create(Reflect.getPrototypeOf(e)),f=new Map,refresh=()=>{refreshAttributes(c,e,s,a,t),refreshEvents(l,e,s),refreshStatus(u,e,s)},p,readOriginal=t=>{let n=Reflect.get(e,t,e);if(typeof n!=`function`||t===`constructor`)return n;let r=f.get(t);if(r!==void 0)return r;let created=(...t)=>{let r=Reflect.apply(n,e,t);return refresh(),r===e?p:r};return f.set(t,created),created};Object.defineProperty(d,"attributes",{configurable:!0,enumerable:!0,value:c}),Object.defineProperty(d,"events",{configurable:!0,enumerable:!0,value:l}),Object.defineProperty(d,"status",{configurable:!0,enumerable:!0,value:u});for(let t of Reflect.ownKeys(e)){if(t===`attributes`||t===`events`||t===`status`)continue;let n=Reflect.getOwnPropertyDescriptor(e,t);Object.defineProperty(d,t,{configurable:!0,enumerable:n?.enumerable??!1,get:()=>readOriginal(t)})}p=new Proxy(d,{get:(e,t,n)=>Object.hasOwn(e,t)?Reflect.get(e,t,n):readOriginal(t)});let m={context:a,exported:o.exported,refresh,value:p};return m.refresh(),n.set(e,m),m}function refreshAttributes(e,t,n,r,i){for(let t of Object.keys(e))delete e[t];let a=t.attributes;if(typeof a!=`object`||!a)return;let o=withoutDeclinedContent(a,n)??a;for(let[t,n]of Object.entries(o)){let a=attributeDecision(i,{key:t,span:r,value:n});typeof a==`object`&&a&&(`emit`in a&&`replace`in a||(`replace`in a&&a.replace===!0?a.value!==void 0&&(e[t]=a.value):`emit`in a&&a.emit===!0&&(e[t]=n)))}}function spanExportContext(e,t=`unknown`){let n=e.attributes,r=typeof n==`object`&&n?n:{},i=[r[`agent.channel.audience`],r[`ai.settings.context.eve.channel.audience`]].filter(e=>e!==void 0).map(normalizeChannelAudience),a=i.length>0&&i.every(e=>e===i[0])?i[0]:i.length>0?`unknown`:t,o=e.spanContext?.(),s=typeof o==`object`&&o?o:{},c=e.name;return{attributes:r,audience:a,name:typeof c==`string`?c:``,spanId:typeof s.spanId==`string`?s.spanId:``,traceId:typeof s.traceId==`string`?s.traceId:``}}function spanExportDecision(e,t){let n;try{n=t.span?.(e)??{emit:!0}}catch{return{exported:!1,redactInputs:!1,redactOutputs:!1}}if(typeof n!=`object`||!n)return{exported:!1,redactInputs:!1,redactOutputs:!1};if(`emit`in n)return`redact`in n?{exported:!1,redactInputs:!1,redactOutputs:!1}:{exported:typeof n.emit==`boolean`&&n.emit,redactInputs:!1,redactOutputs:!1};if(n.redact!==!0)return{exported:!1,redactInputs:!1,redactOutputs:!1};let r=n.inputs===!0,i=n.outputs===!0;return!r&&!i?{exported:!1,redactInputs:!1,redactOutputs:!1}:{exported:!0,redactInputs:r,redactOutputs:i}}function attributeDecision(e,t){if(e?.attribute===void 0)return{emit:!0};try{return e.attribute(t)}catch{return{emit:!1}}}function refreshEvents(e,t,n){e.length=0;let r=t.events;if(Array.isArray(r)){if(n.recordOutputs){e.push(...r);return}for(let t of r){if(typeof t!=`object`||!t)continue;let n=t;n.name!==`exception`&&e.push({...n,attributes:void 0})}}}function refreshStatus(e,t,n){for(let t of Object.keys(e))delete e[t];let r=t.status;if(typeof r!=`object`||!r)return;let i=r;i.code!==void 0&&(e.code=i.code),n.recordOutputs&&i.message!==void 0&&(e.message=i.message)}export{contentFilteringProcessor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{context,createContextKey}from"#compiled/@opentelemetry/api/index.js";const ERROR_CONTENT_KEY=createContextKey(`eve.trace.error-content`);function withErrorContent(e,t){return e.setValue(ERROR_CONTENT_KEY,t)}function capturesErrorContent(){return context.active().getValue(ERROR_CONTENT_KEY)!==!1}export{capturesErrorContent,withErrorContent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createLogger,formatError}from"#internal/logging.js";import{contextStorage}from"#context/container.js";import{ConversationIdKey}from"#context/keys.js";import{resolveInstrumentationEnvironment}from"#internal/application/dev-environment.js";import{readConversationId}from"#shared/conversation-identity.js";import{ContextAgentTraceStateStore}from"#tracing/agent-trace-context-store.js";import{trace}from"#compiled/@opentelemetry/api/index.js";import{registerInstrumentationRuntime}from"#instrumentation/runtime.js";import{createInstrumentationHooks}from"#instrumentation/lifecycle.js";import{AgentSpanIdGenerator}from"#tracing/agent-span-id-generator.js";import{hasConversationRelease}from"#tracing/local-traces.js";import{createAgentOtelInstrumentation}from"#tracing/agent-otel-provider.js";import{registerOtelPipeline}from"#tracing/otel-registration.js";const log=createLogger(`tracing.install-instrumentation-runtime`);function installInstrumentationRuntime(e){let t=[],n=[],r,i,a,runInContext=(e,t)=>t();if(e.collected.declared){r=registerOtelPipeline({pipeline:e.collected.pipeline,serviceName:e.serviceName});let o=createAgentOtelInstrumentation({environment:resolveInstrumentationEnvironment(),frameworkVersion:e.frameworkVersion,idGenerator:r.idGenerator,recordInputs:e.collected.settings.recordInputs,recordOutputs:e.collected.settings.recordOutputs,samplesTrace:r.samplesTrace,stateStore:new ContextAgentTraceStateStore,tracer:trace.getTracer(`eve.agent`,e.frameworkVersion),tracePolicy:e.collected.settings.tracePolicy});t.push({...o.hook,stateNamespace:`internal:otel`}),i=o.prepareSessionTrace,a=o.prepareTurnTrace,runInContext=o.runInContext;let s=e.collected.pipeline.spanProcessors.filter(isSpanProcessor).filter(hasConversationRelease);s.length>0&&n.push(sessionReleaseProvider(s))}let o=[...t,...e.providers,...n],s;return registerInstrumentationRuntime({forceFlush:async()=>{await settleAll(o.map(e=>()=>e.flush?.())),await settleAll(r===void 0?[]:[r.forceFlush])},hooks:createInstrumentationHooks({parallel:e.providers,serialAfter:n,serialBefore:t}),idGenerator:r?.idGenerator??new AgentSpanIdGenerator,memoryOperations:r!==void 0||e.providers.some(hasMemoryOperationHandler),otelSettings:e.collected.declared?e.collected.settings:void 0,ownsAgentSpans:r!==void 0,prepareSessionTrace:i,prepareTurnTrace:a,runtimeContextResolvers:e.runtimeContextResolvers,runInContext,samplesTrace:r?.samplesTrace,shutdown:()=>(s??=(async()=>{await settleAll(o.map(e=>()=>e.shutdown?.())),await settleAll(r===void 0?[]:[r.shutdown])})(),s)})}function hasMemoryOperationHandler(e){return e.events?.[`memory.operation.started`]!==void 0||e.events?.[`memory.operation.completed`]!==void 0||e.events?.[`memory.operation.failed`]!==void 0}function isSpanProcessor(e){return e!==`auto`}function sessionReleaseProvider(e){let release=async t=>{let n=readConversationId(contextStorage.getStore()?.get(ConversationIdKey))??t.sessionId;n===t.sessionId&&await Promise.all(e.map(e=>e.releaseConversation(n)))};return{events:{"session.completed":release,"session.failed":release},name:`eve.conversation-release`,stateNamespace:`internal:conversation-release`}}async function settleAll(e){let t=await Promise.allSettled(e.map(async e=>e()));for(let e of t)e.status===`rejected`&&log.warn(`instrumentation drain failed`,{error:formatError(e.reason)})}export{installInstrumentationRuntime};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createLogger,formatError}from"#internal/logging.js";import{applyLiveDeliveryAudienceCeiling}from"#shared/forwarded-trace-policy.js";import{DIRECT_TOOL_CALL_ATTRIBUTE,DIRECT_TOOL_CALL_VALUE}from"#tracing/agent-span-contract.js";import{resolveInstrumentationEnvironment}from"#internal/application/dev-environment.js";import{SpanKind,context,trace}from"#compiled/@opentelemetry/api/index.js";import{buildConversationContext}from"#channel/conversation-context.js";import{markAgentTraceContext}from"#tracing/agent-trace-context.js";import{toolCallIdempotencyKey}from"#instrumentation/lifecycle.js";import{resolveTracePolicy}from"#shared/trace-policy.js";import{withErrorContent}from"#tracing/error-content-context.js";import{getInstrumentationRuntime}from"#instrumentation/runtime-global.js";import{agentSpanNamingAttributes}from"#tracing/agent-span-naming.js";import{contentAttribute}from"#tracing/agent-otel-content.js";import{recordAgentSpanError}from"#tracing/agent-span-error.js";import{withAgentToolSpanContext}from"#tracing/agent-tool-span-context.js";import{agentTraceIdentityAttributes}from"#tracing/agent-otel-attributes.js";import{withChannelAudience}from"#tracing/channel-audience-context.js";import{suppressTracing}from"#tracing/suppress-tracing.js";const log=createLogger(`invoke-tool`);async function withInvokeToolSpan(e,t){let n=withErrorContent(context.active(),!1);return await context.with(n,()=>traced(e,n,t))}async function traced(e,t,n){let r=getInstrumentationRuntime();if(r===void 0)return await n(silentObserver);let i=buildConversationContext({adapter:e.origin?.adapter??{kind:`channel`},auth:e.auth,channelName:e.origin?.channelName},resolveInstrumentationEnvironment()),a=toolCallEvents(r.hooks.forTrace?.({agentName:e.agentName,...i})??r.hooks,{attemptId:e.callId,attemptIndex:0,channelAudience:i.audience,functionId:e.agentName,rootSessionId:e.sessionId,sessionId:e.sessionId,stepIndex:0,traceSessionId:e.sessionId,turnId:e.callId},e),o=r.otelSettings;if(o===void 0)return await n(a.observer(void 0));let s=resolveTracePolicy(o.tracePolicy,{agentName:e.agentName,...i},e=>log.warn(`tracePolicy threw; dropping the tool call's trace`,{error:formatError(e)}));if(s.action===`drop`)return await context.with(suppressTracing(t),()=>n(a.observer(void 0)));let c=applyLiveDeliveryAudienceCeiling({action:`record`,recordInputs:o.recordInputs&&s.recordInputs,recordOutputs:o.recordOutputs&&s.recordOutputs},i.audience,void 0,i.environment),l=c.action===`record`&&c.recordInputs,u=c.action===`record`&&c.recordOutputs,d=`execute_tool ${e.toolName}`,f=withChannelAudience(t,i.audience),p={"agent.tool.is_framework":!1,"gen_ai.agent.name":e.agentName,"gen_ai.operation.name":`execute_tool`,"gen_ai.tool.call.id":e.callId,"gen_ai.tool.name":e.toolName,"gen_ai.tool.type":`function`,[DIRECT_TOOL_CALL_ATTRIBUTE]:DIRECT_TOOL_CALL_VALUE,...agentSpanNamingAttributes(d,`execute_tool`),...agentTraceIdentityAttributes({rootSessionId:e.sessionId,sessionId:e.sessionId,traceSessionId:e.sessionId})};e.origin!==void 0&&(p[`eve.channel.kind`]=i.channel.kind,p[`eve.channel.name`]=e.origin.channelName);let m=trace.getTracer(`eve.agent`).startSpan(d,{attributes:p,kind:SpanKind.INTERNAL},f),h=markAgentTraceContext(withAgentToolSpanContext(withErrorContent(trace.setSpan(f,m),u),{recordInputs:l,recordOutputs:u,recordError:(e,t)=>recordAgentSpanError(m,u?e:void 0,t),setAttributes:e=>setDefined(m,e)})),g,_=a.observer({failedWith:e=>{g={error:e}},recordInputs:l,span:m});try{let e=await context.with(h,()=>n(_));if(m.setAttribute(`eve.tool.outcome`,e.status),e.status===`completed`&&u){let t=contentAttribute(e.output);t!==void 0&&m.setAttribute(`gen_ai.tool.call.result`,t)}return e.status===`invalid-input`?recordAgentSpanError(m,void 0,e.status):e.status===`failed`&&recordAgentSpanError(m,u?g?.error:void 0,g===void 0?e.status:void 0),e}catch(e){throw recordAgentSpanError(m,u?e:void 0),e}finally{m.end(),await r.forceFlush().catch(e=>{log.warn(`flushing a tool call's trace failed`,{error:formatError(e)})})}}const silentObserver={executed:async()=>{},executing:async()=>{},failedWith:()=>{}};function toolCallEvents(e,t,n){let r=e.capturesInputs??e.capturesContent,i=e.capturesOutputs??e.capturesContent,a=toolCallIdempotencyKey(t,n.callId,0);return{observer(o){return{async executing(i){if(o?.recordInputs){let e=contentAttribute(i);e!==void 0&&o.span.setAttribute(`gen_ai.tool.call.arguments`,e)}await e.publish(Object.freeze({callId:n.callId,idempotencyKey:a,input:r?i:void 0,scope:t,toolName:n.toolName,type:`tool.call.started`}))},async executed(n){o?.span.setAttribute(`gen_ai.execute_tool.duration`,n.durationMs/1e3);let r=n.type===`result`?i?{output:n.output,type:`result`}:{type:`result`}:i?{error:n.error,type:`error`}:{type:`error`};await e.publish(Object.freeze({durationMs:n.durationMs,idempotencyKey:a,output:Object.freeze(r),scope:t,type:`tool.call.completed`,outcome:n.type===`result`?`completed`:`failed`}))},failedWith(e){o?.failedWith(e)}}}}}function setDefined(e,t){for(let[n,r]of Object.entries(t))r!==void 0&&e.setAttribute(n,r)}export{withInvokeToolSpan};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{getInstrumentationRuntime}from"#instrumentation/runtime.js";import{installInstrumentationRuntime}from"#tracing/install-instrumentation-runtime.js";import{collectOtelPipeline,managedOtelIntegration,otel}from"#tracing/otel-declaration.js";import{createLocalTracesProcessor,resolveLocalTracesExportPolicy}from"#tracing/local-traces.js";const localTracePolicy=()=>!0;function installLocalInstrumentationRuntime(e){let t=getInstrumentationRuntime();if(t!==void 0)return t;let n=createLocalTracesProcessor({appRoot:e.appRoot});return installInstrumentationRuntime({collected:collectOtelPipeline([otel({tracePolicy:localTracePolicy}),managedOtelIntegration({exportPolicy:resolveLocalTracesExportPolicy(),spanProcessors:[n]})]),frameworkVersion:e.frameworkVersion,providers:[],serviceName:e.serviceName})}export{installLocalInstrumentationRuntime,localTracePolicy};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{readFile,readdir,stat}from"node:fs/promises";import{join}from"node:path";import{isAgentActivationSpan}from"#tracing/agent-span-contract.js";import{resolveLocalTraceSchemaDirectory,resolveLocalTraceSegmentsDirectory}from"#tracing/local-trace-span-processor.js";const TRACE_ID_PATTERN=/^[0-9a-f]{32}$/u,SPAN_FILE_PATTERN=/^[0-9a-f]{16}\.otlp\.json$/u;async function listLocalTraceIds(e){let t;try{t=await readdir(resolveLocalTraceSchemaDirectory(e),{withFileTypes:!0})}catch(e){if(isMissing(e))return[];throw e}return t.filter(e=>e.isDirectory()&&TRACE_ID_PATTERN.test(e.name)).map(e=>e.name)}async function readLocalTraceActivityMs(e,t){try{return(await stat(resolveLocalTraceSegmentsDirectory(e,t))).mtimeMs}catch(e){if(isMissing(e))return;throw e}}async function listLocalTraceSegments(e,t){let n;try{n=await readdir(resolveLocalTraceSegmentsDirectory(e,t),{withFileTypes:!0})}catch(e){if(isMissing(e))return;throw e}return n.filter(e=>e.isFile()&&SPAN_FILE_PATTERN.test(e.name)).map(e=>e.name).sort((e,t)=>e.localeCompare(t))}async function readLocalTraceSegment(e,t,n){let r=join(resolveLocalTraceSegmentsDirectory(e,t),n),i;try{if((await stat(r)).size>8388608)return[];i=await readFile(r,`utf8`)}catch{return[]}return parseLocalTraceSegment(i,t)}async function listLocalTraces(e){let t=[];for(let n of await listLocalTraceIds(e)){let r=await readLocalTrace(e,n).catch(()=>void 0);r!==void 0&&t.push(r)}return t.sort((e,t)=>e.startTimeNs===t.startTimeNs?e.traceId.localeCompare(t.traceId):e.startTimeNs>t.startTimeNs?-1:1)}async function readLocalTrace(e,t){let n=await listLocalTraceSegments(e,t);if(n===void 0)return;let r=new Map;for(let i of n)for(let n of await readLocalTraceSegment(e,t,i))r.has(n.spanId)||r.set(n.spanId,n);if(r.size!==0)return assembleLocalTrace(t,[...r.values()])}function compareLocalTraceSpans(e,t){return e.startTimeNs===t.startTimeNs?e.endTimeNs===t.endTimeNs?e.name.localeCompare(t.name)||e.spanId.localeCompare(t.spanId):e.endTimeNs<t.endTimeNs?-1:1:e.startTimeNs<t.startTimeNs?-1:1}function assembleLocalTrace(e,t){let n=[...t].sort(compareLocalTraceSpans),r=n.map(e=>e.attributes),i=distinctAttributes(r,`gen_ai.conversation.id`);return{agentName:firstAttribute(r,`agent.name`),endTimeNs:n.reduce((e,t)=>t.endTimeNs>e?t.endTimeNs:e,0n),conversationId:i[0],conversationIds:i,spans:n,startTimeNs:n.reduce((e,t)=>t.startTimeNs<e?t.startTimeNs:e,n[0].startTimeNs),traceId:e}}function describeLocalTraceSpan(e){let t=[],n=stringSpanAttribute(e,`agent.turn.id`),r=valueSpanAttribute(e,`agent.step.index`),i=valueSpanAttribute(e,`agent.step.attempt`),a=stringSpanAttribute(e,`agent.action.kind`),o=stringSpanAttribute(e,`agent.action.name`),s=stringSpanAttribute(e,`agent.model.id`)??stringSpanAttribute(e,`gen_ai.request.model`);return isAgentTurnSpan(e)&&n!==void 0&&t.push(n),e.name===`agent.step`&&r!==void 0&&t.push(`step ${String(r)}${i===void 0?``:`, attempt ${String(i)}`}`),e.name===`agent.action`&&o!==void 0&&t.push(`${a??`action`}: ${o}`),s!==void 0&&e.name.includes(`do`)&&t.push(`model ${s}`),t}function isAgentTurnSpan(e){return isAgentActivationSpan(e)}function parseLocalTraceSegment(e,t){try{let n=JSON.parse(e);if(!isRecord(n)||!Array.isArray(n.resourceSpans))return[];let r=[];for(let e of n.resourceSpans)if(isRecord(e)&&Array.isArray(e.scopeSpans))for(let n of e.scopeSpans){if(!isRecord(n)||!Array.isArray(n.spans))continue;let e=isRecord(n.scope)&&typeof n.scope.name==`string`?n.scope.name:void 0;for(let i of n.spans){let n=parseLocalTraceSpan(i,t,e);n!==void 0&&r.push(n)}}return r}catch{return[]}}function parseLocalTraceSpan(e,t,n){if(!isRecord(e)||e.traceId!==t||typeof e.spanId!=`string`||!/^[0-9a-f]{16}$/u.test(e.spanId)||typeof e.name!=`string`)return;let r=parseNanos(e.startTimeUnixNano),i=parseNanos(e.endTimeUnixNano);if(!(r===void 0||i===void 0||i<r))return{attributes:parseAttributes(e.attributes),endTimeNs:i,events:parseEvents(e.events),kind:typeof e.kind==`number`?e.kind:void 0,name:e.name,parentSpanId:typeof e.parentSpanId==`string`&&/^[0-9a-f]{16}$/u.test(e.parentSpanId)?e.parentSpanId:void 0,scope:n,spanId:e.spanId,startTimeNs:r,statusCode:parseStatusCode(e.status),statusMessage:parseStatusMessage(e.status),traceId:t}}function parseEvents(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){if(!isRecord(n)||typeof n.name!=`string`)continue;let e=parseNanos(n.timeUnixNano);e!==void 0&&t.push({attributes:parseAttributes(n.attributes),name:n.name,timeNs:e})}return t.sort((e,t)=>e.timeNs===t.timeNs?e.name.localeCompare(t.name):e.timeNs<t.timeNs?-1:1)}function parseAttributes(e){if(!Array.isArray(e))return{};let t={};for(let n of e){if(!isRecord(n)||typeof n.key!=`string`||!isRecord(n.value))continue;let e=parseAnyValue(n.value);e!==void 0&&(t[n.key]=e)}return t}function parseAnyValue(e){for(let t of[`stringValue`,`boolValue`,`intValue`,`doubleValue`])if(t in e)return e[t];if(isRecord(e.arrayValue)&&Array.isArray(e.arrayValue.values))return e.arrayValue.values.filter(isRecord).map(e=>parseAnyValue(e))}function parseNanos(e){if(typeof e==`string`||typeof e==`number`)try{let t=BigInt(e);return t>=0n&&t<=18446744073709551615n?t:void 0}catch{return}}function parseStatusCode(e){return isRecord(e)?typeof e.code==`number`?e.code:e.code===`STATUS_CODE_ERROR`?2:0:0}function parseStatusMessage(e){if(isRecord(e)&&typeof e.message==`string`)return e.message.length===0?void 0:e.message}function firstAttribute(e,t){for(let n of e){let e=n[t];if(typeof e==`string`&&e.length>0)return e}}function distinctAttributes(e,t){let n=new Set;for(let r of e){let e=r[t];typeof e==`string`&&e.length>0&&n.add(e)}return[...n]}function stringSpanAttribute(e,t){let n=e.attributes[t];return typeof n==`string`?n:void 0}function valueSpanAttribute(e,t){let n=e.attributes[t];return typeof n==`string`||typeof n==`number`?n:void 0}function isMissing(e){return e.code===`ENOENT`}function isRecord(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}export{assembleLocalTrace,compareLocalTraceSpans,describeLocalTraceSpan,isAgentTurnSpan,listLocalTraceIds,listLocalTraceSegments,listLocalTraces,parseLocalTraceSegment,readLocalTraceActivityMs,readLocalTraceSegment};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{AGENT_USAGE_ATTRIBUTES}from"#tracing/agent-span-contract.js";import{localTraceOperations,traceModelName,traceSessionId,traceStringAttribute,traceToolName,uniqueLocalTraceSpans}from"#tracing/local-trace-operations.js";function summarizeLocalTrace(e,t){let n=uniqueLocalTraceSpans(t),r=new Set,i=new Set,a=new Set,o=new Set,s=n[0]?.startTimeNs??0n,c=s,l=0,u=0,d,f=0,p=0,m=0;for(let e of n){if(e.startTimeNs<s&&(s=e.startTimeNs),e.endTimeNs>c&&(c=e.endTimeNs),add(r,traceModelName(e)),add(i,traceStringAttribute(e,`agent.name`)),add(a,traceStringAttribute(e,`gen_ai.conversation.id`)),add(o,traceSessionId(e)),e.statusCode===2&&(f+=1),e.name!==`agent.step`)continue;p+=numberAttribute(e,`agent.usage.input_tokens`)??0,m+=numberAttribute(e,`agent.usage.output_tokens`)??0,l+=numberAttribute(e,AGENT_USAGE_ATTRIBUTES.cacheReadTokens)??numberAttribute(e,`gen_ai.usage.cache_read.input_tokens`)??0,u+=numberAttribute(e,AGENT_USAGE_ATTRIBUTES.cacheWriteTokens)??numberAttribute(e,`gen_ai.usage.cache_creation.input_tokens`)??0;let t=localTraceSpanCostUsd(e);t!==void 0&&(d=(d??0)+t)}let h=new Set,g=0,_=0;for(let e of localTraceOperations(n))e.category===`model`&&(g+=1),e.category===`tool`&&(_+=1,add(h,traceToolName(e.span)));return{traceId:e,startedAt:new Date(Number(s/1000000n)).toISOString(),durationMs:Number(c-s)/1e6,spanCount:n.length,agentNames:[...i].sort(),conversationIds:[...a].sort(),sessionIds:[...o].sort(),models:[...r].sort(),toolNames:[...h].sort(),modelCalls:g,toolCalls:_,errorSpanCount:f,cacheReadTokens:l,cacheWriteTokens:u,costUsd:d,inputTokens:p,outputTokens:m}}function localTraceSpanCostUsd(e){return numberAttribute(e,`gen_ai.usage.gateway_cost`)??numberAttribute(e,`gen_ai.usage.cost`)}function numberAttribute(e,t){let n=e.attributes[t];if(typeof n==`number`)return Number.isFinite(n)&&n>=0?n:void 0;if(typeof n==`string`&&n.trim()!==``){let e=Number(n);return Number.isFinite(e)&&e>=0?e:void 0}}function add(e,t){t!==void 0&&e.add(t)}export{localTraceSpanCostUsd,summarizeLocalTrace};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{normalizeSpanExportPolicies}from"#tracing/span-export-policy.js";import{LocalTraceSpanProcessor}from"#tracing/local-trace-span-processor.js";import{AgentTraceSpanProcessor}from"#tracing/agent-trace-span-processor.js";import{requestLocalTraceStorePrune,resolveLocalTraceRetentionSettings}from"#tracing/local-trace-retention.js";function hasConversationRelease(e){return typeof e.releaseConversation==`function`}function createLocalTracesProcessor(e={}){let t=e.appRoot??process.env.EVE_DEV_WORKER_APP_ROOT;if(t===void 0)return inertLocalTracesProcessor();let n=resolveLocalTraceRetentionSettings(),r=new AgentTraceSpanProcessor(n.enabled?[new LocalTraceSpanProcessor(t)]:[]),requestPrune=()=>{n.enabled&&requestLocalTraceStorePrune({activeTraceIds:r.activeTraceIds(),appRoot:t,maxAgeMs:n.maxAgeMs,maxTotalBytes:n.maxTotalBytes,retainCount:n.retainCount})};requestPrune();let forceFlush=async()=>{await r.forceFlush(),r.releaseCompletedTraces()&&requestPrune()};return{forceFlush,onEnd:e=>r.onEnd(e),onStart:(e,t)=>r.onStart(e,t),async releaseConversation(e){return await forceFlush(),r.releaseConversation(e)?(requestPrune(),!0):!1},shutdown:()=>r.shutdown()}}function resolveLocalTracesExportPolicy(e){return process.env.EVE_TRACES_CONTENT===`off`?[{span:()=>({redact:!0,inputs:!0,outputs:!0})},...normalizeSpanExportPolicies(e)]:e}function inertLocalTracesProcessor(){return{forceFlush:async()=>void 0,onEnd:()=>void 0,onStart:()=>void 0,releaseConversation:async()=>!1,shutdown:async()=>void 0}}export{createLocalTracesProcessor,hasConversationRelease,resolveLocalTracesExportPolicy};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{PROVIDER}from"#public/instrumentation/provider.js";import{batchSpanProcessor}from"#tracing/batch-span-processor.js";import{contentFilteringProcessor}from"#tracing/content-span-processor.js";import{vercelRuntimeSpanProcessor}from"#tracing/vercel-runtime-span-exporter.js";const OTEL_DECLARATION=Symbol.for(`eve.instrumentation.otel`),OTEL_INTEGRATION=Symbol.for(`eve.instrumentation.otel-integration`);function otel(e={}){return{[OTEL_DECLARATION]:!0,[PROVIDER]:!0,options:e}}function otelIntegration(e={}){return createOtelIntegration(e)}function managedOtelIntegration(e={}){return createOtelIntegration(e)}function createOtelIntegration(e){assertNoRemovedContentOptions(e);let t=e.spanProcessors??[],n=e.traceExporter===void 0?t:[...t,batchSpanProcessor(e.traceExporter)];return{[OTEL_INTEGRATION]:!0,[PROVIDER]:!0,metricReaders:e.metricReaders??[],runtimeContext:e.runtimeContext,spanProcessors:n.map(t=>contentFilteringProcessor(t,e.exportPolicy))}}function agentRunsIntegration(e={}){return assertNoRemovedContentOptions(e),{[OTEL_INTEGRATION]:!0,[PROVIDER]:!0,metricReaders:[],spanProcessors:[contentFilteringProcessor(vercelRuntimeSpanProcessor(),e.exportPolicy)]}}function assertNoRemovedContentOptions(e){if(Object.hasOwn(e,`recordInputs`)||Object.hasOwn(e,`recordOutputs`))throw Error("OpenTelemetry destination options no longer support `recordInputs` or `recordOutputs`. Use an `exportPolicy` span decision with `{ redact: true, inputs: true }`, `{ redact: true, outputs: true }`, or both.")}function isOtelDeclaration(e){return typeof e==`object`&&!!e&&e[OTEL_DECLARATION]===!0}function isOtelIntegration(e){return typeof e==`object`&&!!e&&e[OTEL_INTEGRATION]===!0}function collectOtelPipeline(e){let t=[],n=[],r=[],i,a=!1,o=!1;for(let s of e){if(isOtelIntegration(s)){a=!0,o=!0,t.push(...s.spanProcessors),n.push(...s.metricReaders),s.runtimeContext!==void 0&&r.push(s.runtimeContext);continue}if(isOtelDeclaration(s)){if(i!==void 0)throw Error("Instrumentation declares `otel()` more than once. One process has one OpenTelemetry tracer provider, so it has one resource, one sampler, and one propagator set — declare them in a single `otel()`.");a=!0,i=s}}let s=i?.options??{},c={functionId:s.functionId,recordInputs:o,recordOutputs:o,traceChannelRequests:s.traceChannelRequests===!0};return s.tracePolicy!==void 0&&Object.assign(c,{tracePolicy:s.tracePolicy}),{declared:a,pipeline:{instrumentations:s.instrumentations,metricReaders:n.length>0?n:void 0,propagators:s.propagators,resource:s.resource,sampler:s.sampler,spanProcessors:t},runtimeContextResolvers:r,settings:c}}export{agentRunsIntegration,collectOtelPipeline,isOtelDeclaration,isOtelIntegration,managedOtelIntegration,otel,otelIntegration};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire}from"node:module";import{agentInvocationSpanName}from"#tracing/agent-span-contract.js";import{conversationIdFromContext}from"#tracing/conversation-context.js";import{SpanKind,context,metrics,propagation,trace}from"#compiled/@opentelemetry/api/index.js";import{AgentSpanIdGenerator}from"#tracing/agent-span-id-generator.js";import{registerOTel}from"#compiled/@vercel/otel/index.js";const REGISTRATION_SPAN_NAME=`eve.otel.registration`,REPLAY_DEDUPLICATION_LIMIT=1e5,REPLAY_DEDUPLICATION_KEY=Symbol.for(`eve.otel.replay-deduplication`),require=createRequire(import.meta.url),replayDeduplicationGlobal=globalThis;var RegistrationMarkerPropagator=class{#e=!1;extract(e){return e}fields(){return[]}inject(){this.#e=!0}isInstalled(){return this.#e=!1,propagation.inject(context.active(),{},{set:()=>{}}),this.#e}},PrivateSpanFilteringProcessor=class{endedSpans;forwardedSpans=new Set;pendingByParent=new Map;pendingSpanCount=0;processors;startedSpans=new Set;constructor(e,t){this.processors=e,this.endedSpans=t}async forceFlush(){this.drainPendingSpans(),await Promise.all(this.processors.map(e=>e.forceFlush()))}onEnd(e){if(isRegistrationSpan(e))return;let t=spanIdentity(e);if(t!==void 0){if(this.endedSpans.has(t))return;if(this.endedSpans.size>=REPLAY_DEDUPLICATION_LIMIT){let e=this.endedSpans.values().next().value;e!==void 0&&this.endedSpans.delete(e)}this.endedSpans.add(t)}let n=parentIdentity(e);if(n!==void 0&&this.startedSpans.has(n)&&!this.forwardedSpans.has(n)){let t=this.pendingByParent.get(n)??[];t.push(e),this.pendingByParent.set(n,t),this.pendingSpanCount+=1,this.pendingSpanCount>1e4&&this.releaseOldestPendingParent();return}this.forward(e,t)}onStart(e,t){if(isRegistrationSpan(e))return;let n=conversationIdFromContext(t);n!==void 0&&e.attributes?.[`gen_ai.conversation.id`]===void 0&&e.setAttribute(`gen_ai.conversation.id`,n);let r=spanIdentity(e);r!==void 0&&addBounded(this.startedSpans,r);for(let n of this.processors)n.onStart(e,t)}async shutdown(){this.drainPendingSpans(),await Promise.all(this.processors.map(e=>e.shutdown()))}drainPendingSpans(){for(;this.pendingByParent.size>0;)this.releaseOldestPendingParent()}releaseOldestPendingParent(){let e=this.pendingByParent.keys().next().value;e!==void 0&&this.releaseChildren(e)}releaseChildren(e){let t=this.pendingByParent.get(e);if(t!==void 0){this.pendingByParent.delete(e),this.pendingSpanCount-=t.length;for(let e of t)this.forward(e,spanIdentity(e))}}forward(e,t){for(let t of this.processors)t.onEnd(e);t!==void 0&&(addBounded(this.forwardedSpans,t),this.releaseChildren(t))}};function registerOtelPipeline(e){let{pipeline:t}=e,n=captureOptionalPeerTracerProxy(),r=new AgentSpanIdGenerator,i=new RegistrationMarkerPropagator,a=privateSpanProcessors(t.spanProcessors),o={attributes:t.resource,autoDetectResources:!1,idGenerator:r,instrumentations:t.instrumentations??[],metricReaders:t.metricReaders,propagators:[...t.propagators??[`auto`],i],serviceName:e.serviceName,spanProcessors:a};registerOTel(t.sampler===void 0?o:{...o,traceSampler:t.sampler});let s=globalTracerUses(r),c=i.isInstalled();if((!s||!c)&&rollbackRegistration({ownsPropagator:c,ownsTracer:s}),!s)throw Error("eve could not register OpenTelemetry because another runtime already owns the global tracer provider. Remove the other `registerOTel` call, or move its exporters into eve's `otelIntegration({ spanProcessors: [...] })`.");if(!c)throw Error("eve could not register OpenTelemetry because another runtime already owns the global propagator. Remove the other global propagator registration and declare propagators through eve's `otel()` instead.");let l=runtimeTracerProvider();if(typeof l.forceFlush!=`function`||typeof l.shutdown!=`function`)throw rollbackRegistration({ownsPropagator:c,ownsTracer:s}),Error(`The registered OpenTelemetry tracer provider has no lifecycle methods.`);n?.setDelegate(l);let u=runtimeMeterProvider();return{forceFlush:async()=>{await Promise.all([l.forceFlush(),u.forceFlush?.()])},idGenerator:r,samplesTrace:(e,t)=>samplerAdmitsTrace(r,e,t),shutdown:async()=>{disableInstrumentations(t.instrumentations),await Promise.all([l.shutdown(),u.shutdown?.()])}}}function privateSpanProcessors(e){let t=e.filter(isSpanProcessor);if(t.length===0)return[...e];let n=new PrivateSpanFilteringProcessor(t,replayDeduplicationRegistry()),r=[],i=!1;for(let t of e){if(!isSpanProcessor(t)){r.push(t);continue}i||(i=!0,r.push(n))}return r}function replayDeduplicationRegistry(){let e=replayDeduplicationGlobal[REPLAY_DEDUPLICATION_KEY];if(e!==void 0)return e;let t=new Set;return replayDeduplicationGlobal[REPLAY_DEDUPLICATION_KEY]=t,t}function samplerAdmitsTrace(e,t,n={name:agentInvocationSpanName(void 0)}){return(e.withTraceId(t,()=>trace.getTracer(`eve.registration`).startSpan(n.name,{attributes:n.attributes,kind:SpanKind.INTERNAL,root:!0})).spanContext().traceFlags&1)==1}function captureOptionalPeerTracerProxy(){try{let e=require("@opentelemetry/api"),t=e.trace.getTracerProvider();return t instanceof e.ProxyTracerProvider?t:void 0}catch{return}}function rollbackRegistration(e){if(e.ownsPropagator&&propagation.disable(),!e.ownsTracer)return;let t=runtimeTracerProvider();if(typeof t.shutdown==`function`)try{t.shutdown().catch(()=>{})}catch{}trace.disable()}function runtimeTracerProvider(){let e=trace.getTracerProvider();return e.getDelegate?.()??e}function runtimeMeterProvider(){let e=metrics.getMeterProvider();return{forceFlush:typeof e?.forceFlush==`function`?()=>e.forceFlush():void 0,shutdown:typeof e?.shutdown==`function`?()=>e.shutdown():void 0}}function disableInstrumentations(e){for(let t of e??[]){let e=t?.disable;if(typeof e==`function`)try{e.call(t)}catch{}}}function globalTracerUses(e){let t=e.allocateSpanId();return e.withSpanId(t,()=>trace.getTracer(`eve.registration`).startSpan(REGISTRATION_SPAN_NAME)).spanContext().spanId===t}function isRegistrationSpan(e){return typeof e==`object`&&!!e&&(`name`in e&&e.name===REGISTRATION_SPAN_NAME||`instrumentationScope`in e&&e.instrumentationScope?.name===`eve.registration`)}function spanIdentity(e){if(typeof e!=`object`||!e||!(`spanContext`in e)||typeof e.spanContext!=`function`)return;let t=e.spanContext();return typeof t.traceId==`string`&&typeof t.spanId==`string`?`${t.traceId}:${t.spanId}`:void 0}function parentIdentity(e){if(typeof e!=`object`||!e||!(`parentSpanContext`in e))return;let t=e.parentSpanContext;return typeof t?.traceId==`string`&&typeof t.spanId==`string`?`${t.traceId}:${t.spanId}`:void 0}function addBounded(e,t){if(e.size>=REPLAY_DEDUPLICATION_LIMIT){let t=e.values().next().value;t!==void 0&&e.delete(t)}e.add(t)}function isSpanProcessor(e){return e!==`auto`}export{registerOtelPipeline};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{resolveTracePolicy,resolveTracePolicyDecision}from"#shared/trace-policy.js";function isSampledTrace(e){return(e.traceFlags&1)==1}export{isSampledTrace,resolveTracePolicy,resolveTracePolicyDecision};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createContextKey}from"#compiled/@opentelemetry/api/index.js";const SUPPRESS_TRACING_KEY=createContextKey(`OpenTelemetry SDK Context Key SUPPRESS_TRACING`);function suppressTracing(e){return e.setValue(SUPPRESS_TRACING_KEY,!0)}export{suppressTracing};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const TELEMETRY_PRINCIPAL_ID_BYTES=1024;function boundedPrincipalId(e){return typeof e==`string`&&e.length>0&&e.length<=TELEMETRY_PRINCIPAL_ID_BYTES&&telemetryByteLength(e)<=TELEMETRY_PRINCIPAL_ID_BYTES?e:void 0}const encoder=new TextEncoder,decoder=new TextDecoder;function telemetryByteLength(e){return encoder.encode(e).length}function truncateTelemetryText(e,t){let n=e.slice(0,t+1),r=encoder.encode(n);if(n.length===e.length&&r.length<=t)return e;let i=`... [truncated]`.slice(0,t),a=Math.max(0,t-i.length);for(;a>0&&(r[a]&192)==128;)--a;return decoder.decode(r.subarray(0,a))+i}export{boundedPrincipalId,telemetryByteLength,truncateTelemetryText};
|
/package/dist/src/{tracing/agent-span-error.d.ts → compiled/@eve/tracing/adapters/otel-error.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/src/tracing/{channel-audience-context.d.ts → eve/channel-audience-context.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/src/tracing/{vercel-runtime-span-exporter.js → eve/vercel-runtime-span-exporter.js}
RENAMED
|
File without changes
|
/package/dist/src/tracing/{agent-trace-span-processor.d.ts → local/agent-trace-span-processor.d.ts}
RENAMED
|
File without changes
|
/package/dist/src/tracing/{local-trace-discovery-index.d.ts → local/trace-discovery-index.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/src/tracing/{local-trace-span-processor.d.ts → local/trace-span-processor.d.ts}
RENAMED
|
File without changes
|