The Open Framework for Building Agents
Publish @vercel/agent-runs with singular createAgentRun API (#4910)
Chad Hietalac1b079ca1e40
diff --git a/.changeset/fresh-agent-run.md b/.changeset/fresh-agent-run.mdnew file mode 100644index 000000000..51256d835--- /dev/null+++ b/.changeset/fresh-agent-run.md@@ -0,0 +1,6 @@+---+"@vercel/agent-runs": patch+"eve": patch+---++Publish framework-neutral tracing as `@vercel/agent-runs` with singular `createAgentRun` and `AgentRun` APIs; eve still bundles it without a new runtime dependency. Also fix a development-server build failure in npm-installed apps when generating source maps.diff --git a/.gitignore b/.gitignoreindex 0e23eb9ae..1815c3aa8 100644--- a/.gitignore+++ b/.gitignore@@ -36,6 +36,8 @@ test-results/packages/eve/docs/packages/eve/LICENSEpackages/eve/NOTICE+packages/tracing/LICENSE+packages/tracing/NOTICE# Logs*.logdiff --git a/packages/eve/package.json b/packages/eve/package.jsonindex 6799a3698..d7c99ec35 100644--- a/packages/eve/package.json+++ b/packages/eve/package.json@@ -595,7 +595,6 @@"@chat-adapter/twilio": "4.42.0","@clack/core": "1.3.1","@eve/catalog": "workspace:*",- "@eve/tracing": "workspace:*","@linqapp/chat-sdk-adapter": "^0.5.1","@modelcontextprotocol/server": "2.0.0","@nuxt/kit": "^4.0.0",@@ -612,6 +611,7 @@"@types/json-schema": "7.0.15","@types/react": "catalog:","@types/react-test-renderer": "19.1.0",+ "@vercel/agent-runs": "workspace:*","@vercel/blob": "2.8.0","@vercel/connect": "catalog:","@vercel/detect-agent": "1.2.3",diff --git a/packages/eve/scripts/vendor-compiled/@eve/tracing.mjs b/packages/eve/scripts/vendor-compiled/@vercel/agent-runs.mjssimilarity index 89%rename from packages/eve/scripts/vendor-compiled/@eve/tracing.mjsrename to packages/eve/scripts/vendor-compiled/@vercel/agent-runs.mjsindex b21215088..9ff3600e1 100644--- a/packages/eve/scripts/vendor-compiled/@eve/tracing.mjs+++ b/packages/eve/scripts/vendor-compiled/@vercel/agent-runs.mjs@@ -8,7 +8,7 @@ import { collectFilesRecursively, createDeclarationCopier } from "../_shared.mjsconst execFileAsync = promisify(execFile);const require = createRequire(import.meta.url);const tscPath = join(dirname(require.resolve("typescript/package.json")), "bin", "tsc");-const packageRoot = dirname(require.resolve("@eve/tracing/package.json"));+const packageRoot = dirname(require.resolve("@vercel/agent-runs/package.json"));const sources = (await collectFilesRecursively(join(packageRoot, "src"), [".ts"])).filter((file) => !file.endsWith(".test.ts")).map((file) => relative(packageRoot, file).replaceAll("\\", "/"))@@ -28,13 +28,13 @@ const copyDeclarations = createDeclarationCopier({});/**- * Bundle the private workspace tracing library so the published eve package+ * Bundle the agent run library so the published eve package* stays self-contained. It shares the `workflow` chunk group with the vendored* `@opentelemetry/api`, so eve and the library use one OpenTelemetry copy.*/export default {- packageName: "@eve/tracing",- compiledPath: "@eve/tracing",+ packageName: "@vercel/agent-runs",+ compiledPath: "@vercel/agent-runs",chunkGroup: "workflow",entries: ["index", "delegation", "otel", "ai-sdk"].map((name) => ({entry: `src/${name}.ts`,diff --git a/packages/eve/scripts/vendor-compiled/_shared.mjs b/packages/eve/scripts/vendor-compiled/_shared.mjsindex 172b9eee5..2715127f5 100644--- a/packages/eve/scripts/vendor-compiled/_shared.mjs+++ b/packages/eve/scripts/vendor-compiled/_shared.mjs@@ -570,7 +570,7 @@ async function findPackageJson(packageName, packageRoot, packageJsonName = packareturn {packageJson,packageJsonPath,- packageRoot: dirname(packageJsonPath),+ packageRoot: realpathSync(dirname(packageJsonPath)),};}}diff --git a/packages/eve/scripts/vendor-compiled/index.mjs b/packages/eve/scripts/vendor-compiled/index.mjsindex f2bc10dbd..a7e759ce3 100644--- a/packages/eve/scripts/vendor-compiled/index.mjs+++ b/packages/eve/scripts/vendor-compiled/index.mjs@@ -18,7 +18,6 @@ import chatAdapterSlack from "./@chat-adapter/slack.mjs";import chatAdapterStateMemory from "./@chat-adapter/state-memory.mjs";import chatAdapterTwilio from "./@chat-adapter/twilio.mjs";import eveCatalog from "./@eve/catalog.mjs";-import eveTracing from "./@eve/tracing.mjs";import photonChatAdapterIMessage from "./@photon-ai/chat-adapter-imessage.mjs";import linqChatSdkAdapter from "./@linqapp/chat-sdk-adapter.mjs";@@ -26,6 +25,7 @@ import modelContextProtocolServer from "./@modelcontextprotocol/server.mjs";import opentelemetryApi from "./@opentelemetry/api.mjs";import opentelemetryOtlpTransformer from "./@opentelemetry/otlp-transformer.mjs";import standardSchemaSpec from "./@standard-schema/spec.mjs";+import vercelAgentRuns from "./@vercel/agent-runs.mjs";import vercelBlob from "./@vercel/blob.mjs";import vercelConnect from "./@vercel/connect.mjs";import vercelDetectAgent from "./@vercel/detect-agent.mjs";@@ -76,7 +76,6 @@ export const MODULES = [eventsourceParserStream,envRunner,eveCatalog,- eveTracing,google,jose,jsYaml,@@ -99,6 +98,7 @@ export const MODULES = [shadcnRegistry,standardSchemaSpec,turndown,+ vercelAgentRuns,vercelBlob,vercelConnect,vercelDetectAgent,diff --git a/packages/eve/src/execution/node-step.test.ts b/packages/eve/src/execution/node-step.test.tsindex eea51697e..067c48538 100644--- a/packages/eve/src/execution/node-step.test.ts+++ b/packages/eve/src/execution/node-step.test.ts@@ -1,4 +1,4 @@-import { AgentSpanIdGenerator } from "#compiled/@eve/tracing/index.js";+import { AgentSpanIdGenerator } from "#compiled/@vercel/agent-runs/index.js";import { ToolLoopAgent } from "ai";import { afterEach, describe, expect, it, vi } from "vitest";import type { Runtime } from "#channel/types.js";diff --git a/packages/eve/src/execution/session/turn-step.test.ts b/packages/eve/src/execution/session/turn-step.test.tsindex 5114c7f80..22c749106 100644--- a/packages/eve/src/execution/session/turn-step.test.ts+++ b/packages/eve/src/execution/session/turn-step.test.ts@@ -1,4 +1,4 @@-import { AgentSpanIdGenerator } from "#compiled/@eve/tracing/index.js";+import { AgentSpanIdGenerator } from "#compiled/@vercel/agent-runs/index.js";import { createTestSessionState } from "#internal/testing/session-state.js";import { jsonSchema, type ModelMessage } from "ai";import { MockLanguageModelV4 } from "ai/test";diff --git a/packages/eve/src/execution/workflow-runtime.test.ts b/packages/eve/src/execution/workflow-runtime.test.tsindex 58e8f0192..f6556e092 100644--- a/packages/eve/src/execution/workflow-runtime.test.ts+++ b/packages/eve/src/execution/workflow-runtime.test.ts@@ -27,7 +27,7 @@ import {sessionHandoffMarkerToken,} from "#execution/session-inbox/address.js";import { registerInstrumentationRuntime } from "#instrumentation/runtime.js";-import { AgentSpanIdGenerator } from "#compiled/@eve/tracing/index.js";+import { AgentSpanIdGenerator } from "#compiled/@vercel/agent-runs/index.js";import type { RuntimeCompiledArtifactsSource } from "#runtime/compiled-artifacts-source.js";import { getCompiledRuntimeAgentBundle } from "#runtime/sessions/compiled-agent-cache.js";import { markAgentTraceContext } from "#tracing/eve/agent-trace-context.js";diff --git a/packages/eve/src/harness/tool-loop.test.ts b/packages/eve/src/harness/tool-loop.test.tsindex 7f0f035c4..07797de30 100644--- a/packages/eve/src/harness/tool-loop.test.ts+++ b/packages/eve/src/harness/tool-loop.test.ts@@ -1,4 +1,4 @@-import { AgentSpanIdGenerator } from "#compiled/@eve/tracing/index.js";+import { AgentSpanIdGenerator } from "#compiled/@vercel/agent-runs/index.js";import { context as otelContext, trace } from "#compiled/@opentelemetry/api/index.js";import {type FilePart,diff --git a/packages/eve/src/instrumentation/ai-sdk-hook-bridge.ts b/packages/eve/src/instrumentation/ai-sdk-hook-bridge.tsindex 9c93920f0..c186debb8 100644--- a/packages/eve/src/instrumentation/ai-sdk-hook-bridge.ts+++ b/packages/eve/src/instrumentation/ai-sdk-hook-bridge.ts@@ -16,7 +16,7 @@ import {toolCallIdempotencyKey,} from "#instrumentation/lifecycle.js";import { structuralProviderMetadata } from "#instrumentation/content.js";-import { modelContent, modelUsage } from "#compiled/@eve/tracing/ai-sdk.js";+import { modelContent, modelUsage } from "#compiled/@vercel/agent-runs/ai-sdk.js";type TelemetryEvent<TKey extends keyof Telemetry> = Parameters<NonNullable<Telemetry[TKey]>>[0];diff --git a/packages/eve/src/instrumentation/channel-delivery.test.ts b/packages/eve/src/instrumentation/channel-delivery.test.tsindex 77514f8d2..9893ba41c 100644--- a/packages/eve/src/instrumentation/channel-delivery.test.ts+++ b/packages/eve/src/instrumentation/channel-delivery.test.ts@@ -1,4 +1,4 @@-import { AgentSpanIdGenerator } from "#compiled/@eve/tracing/index.js";+import { AgentSpanIdGenerator } from "#compiled/@vercel/agent-runs/index.js";import { describe, expect, it, vi } from "vitest";import { ContextContainer, contextStorage } from "#context/container.js";diff --git a/packages/eve/src/instrumentation/principal-summary.ts b/packages/eve/src/instrumentation/principal-summary.tsindex e04dd2cc6..46b3b3b5e 100644--- a/packages/eve/src/instrumentation/principal-summary.ts+++ b/packages/eve/src/instrumentation/principal-summary.ts@@ -11,7 +11,7 @@ import {} from "#shared/instrumentation-content.js";import type { InstrumentationDecision } from "#shared/instrumentation-decision.js";import { resolveTracePolicyDecision } from "#shared/trace-policy.js";-import { boundedPrincipalId } from "#compiled/@eve/tracing/otel.js";+import { boundedPrincipalId } from "#compiled/@vercel/agent-runs/otel.js";export function summarizeInstrumentationPrincipal(principal: SessionAuthContext | null | undefined,diff --git a/packages/eve/src/instrumentation/runtime.test.ts b/packages/eve/src/instrumentation/runtime.test.tsindex 510bde974..e80292af4 100644--- a/packages/eve/src/instrumentation/runtime.test.ts+++ b/packages/eve/src/instrumentation/runtime.test.ts@@ -26,7 +26,7 @@ import {type InstrumentationRuntime,type InstrumentationStepScope,} from "#instrumentation/runtime.js";-import { AgentSpanIdGenerator } from "#compiled/@eve/tracing/index.js";+import { AgentSpanIdGenerator } from "#compiled/@vercel/agent-runs/index.js";import { ContextAgentTraceStateStore } from "#tracing/eve/agent-trace-context-store.js";import type { TraceCapturePolicy } from "#tracing/eve/otel-declaration.js";import { readForwardedAudienceBaggage, writeForwardedAudienceBaggage } from "#protocol/baggage.js";diff --git a/packages/eve/src/instrumentation/runtime.ts b/packages/eve/src/instrumentation/runtime.tsindex 4a32adf0e..bfe16dc45 100644--- a/packages/eve/src/instrumentation/runtime.ts+++ b/packages/eve/src/instrumentation/runtime.ts@@ -43,7 +43,7 @@ import {} from "#instrumentation/prepare-trace-context.js";import type { RuntimeTraceContext } from "#protocol/message.js";import type { OtelHarnessSettings, RuntimeContextResolver } from "#tracing/eve/otel-declaration.js";-import { AgentSpanIdGenerator } from "#compiled/@eve/tracing/index.js";+import { AgentSpanIdGenerator } from "#compiled/@vercel/agent-runs/index.js";import { contextStorage, type ContextContainer } from "#context/container.js";import {createMemoryInstrumentation,@@ -51,7 +51,7 @@ import {} from "#instrumentation/memory.js";import { ConversationIdKey, ParentSessionKey } from "#context/keys.js";import type { ConversationContext } from "#shared/conversation-context.js";-import { withCapture } from "#compiled/@eve/tracing/otel.js";+import { withCapture } from "#compiled/@vercel/agent-runs/otel.js";import type { SamplingOperation as AgentSamplingOperation } from "#tracing/eve/otel-registration.js";import {isSampledTrace,diff --git a/packages/eve/src/instrumentation/session-init.test.ts b/packages/eve/src/instrumentation/session-init.test.tsindex 1c378350c..9fa07676a 100644--- a/packages/eve/src/instrumentation/session-init.test.ts+++ b/packages/eve/src/instrumentation/session-init.test.ts@@ -10,7 +10,7 @@ import {import { initializeSessionInstrumentation } from "#instrumentation/session-init.js";import { registerInstrumentationRuntime } from "#instrumentation/runtime-global.js";import type { InstrumentationRuntime } from "#instrumentation/runtime.js";-import { AgentSpanIdGenerator } from "#compiled/@eve/tracing/index.js";+import { AgentSpanIdGenerator } from "#compiled/@vercel/agent-runs/index.js";import type { TraceCapturePolicy } from "#tracing/eve/otel-declaration.js";afterEach(() => {diff --git a/packages/eve/src/instrumentation/session-init.ts b/packages/eve/src/instrumentation/session-init.tsindex ac04ad8cf..db0c0c3d7 100644--- a/packages/eve/src/instrumentation/session-init.ts+++ b/packages/eve/src/instrumentation/session-init.ts@@ -31,7 +31,7 @@ import {resolveTracePolicy,resolveTracePolicyDecision,} from "#shared/trace-policy.js";-import { AgentSpanIdGenerator } from "#compiled/@eve/tracing/index.js";+import { AgentSpanIdGenerator } from "#compiled/@vercel/agent-runs/index.js";import { getInstrumentationRuntime } from "#instrumentation/runtime-global.js";import type { InstrumentationRuntime } from "#instrumentation/runtime.js";diff --git a/packages/eve/src/internal/logging.test.ts b/packages/eve/src/internal/logging.test.tsindex e0d373f2f..399b03520 100644--- a/packages/eve/src/internal/logging.test.ts+++ b/packages/eve/src/internal/logging.test.ts@@ -6,7 +6,7 @@ import {trace,type Span,} from "#compiled/@opentelemetry/api/index.js";-import { withErrorContent } from "#compiled/@eve/tracing/otel.js";+import { withErrorContent } from "#compiled/@vercel/agent-runs/otel.js";import {createErrorId,diff --git a/packages/eve/src/internal/logging.ts b/packages/eve/src/internal/logging.tsindex 1ef855487..332d8234b 100644--- a/packages/eve/src/internal/logging.ts+++ b/packages/eve/src/internal/logging.ts@@ -10,8 +10,8 @@ import { inspect } from "node:util";import { isNonEmptyString, isObject } from "#shared/guards.js";import type { JsonObject, JsonValue } from "#shared/json.js";-import { currentCapture } from "#compiled/@eve/tracing/index.js";-import { truncateTelemetryText } from "#compiled/@eve/tracing/otel.js";+import { currentCapture } from "#compiled/@vercel/agent-runs/index.js";+import { truncateTelemetryText } from "#compiled/@vercel/agent-runs/otel.js";const MAX_INSPECT_STRING_LENGTH = 8 * 1024;const MAX_DETAIL_BYTES = 16 * 1024;diff --git a/packages/eve/src/internal/nitro/host/create-application-nitro.ts b/packages/eve/src/internal/nitro/host/create-application-nitro.tsindex eb0fe6169..c07c2609c 100644--- a/packages/eve/src/internal/nitro/host/create-application-nitro.ts+++ b/packages/eve/src/internal/nitro/host/create-application-nitro.ts@@ -632,6 +632,8 @@ function createApplicationNitroBundlerConfiguration(extensionScopePlugin,].filter((plugin) => plugin !== null);const nitroRolldownConfig = {+ // Keep dependency filtering out of Rolldown's JS callback bridge.+ output: { sourcemapIgnoreList: /node_modules/ },tsconfig: resolveAuthoredTsConfigPath(preparedHost.appRoot),};// Nitro inherits rollupConfig in its Rolldown builder, concatenating plugin arrays.diff --git a/packages/eve/src/internal/nitro/routes/channel-dispatch.test.ts b/packages/eve/src/internal/nitro/routes/channel-dispatch.test.tsindex b8d783465..dfdc2d221 100644--- a/packages/eve/src/internal/nitro/routes/channel-dispatch.test.ts+++ b/packages/eve/src/internal/nitro/routes/channel-dispatch.test.ts@@ -1,4 +1,4 @@-import { AgentSpanIdGenerator } from "#compiled/@eve/tracing/index.js";+import { AgentSpanIdGenerator } from "#compiled/@vercel/agent-runs/index.js";import type { H3Event } from "nitro";import {context as apiContext,diff --git a/packages/eve/src/internal/nitro/routes/channel-request-instrumentation.ts b/packages/eve/src/internal/nitro/routes/channel-request-instrumentation.tsindex 091d7263e..599ed1b90 100644--- a/packages/eve/src/internal/nitro/routes/channel-request-instrumentation.ts+++ b/packages/eve/src/internal/nitro/routes/channel-request-instrumentation.ts@@ -10,7 +10,7 @@ import {type SpanContext,} from "#compiled/@opentelemetry/api/index.js";import { getInstrumentationRuntime } from "#instrumentation/runtime.js";-import { withErrorContent } from "#compiled/@eve/tracing/otel.js";+import { withErrorContent } from "#compiled/@vercel/agent-runs/otel.js";import { markAgentTraceContext } from "#tracing/eve/agent-trace-context.js";export interface ChannelRequestTrace {diff --git a/packages/eve/src/runtime/connections/mcp-tracing.test.ts b/packages/eve/src/runtime/connections/mcp-tracing.test.tsindex 034e56143..729b2fb7f 100644--- a/packages/eve/src/runtime/connections/mcp-tracing.test.ts+++ b/packages/eve/src/runtime/connections/mcp-tracing.test.ts@@ -23,7 +23,7 @@ import {withMcpToolCallSpan,withMcpToolsListSpan,} from "#runtime/connections/mcp-tracing.js";-import { otelTelemetry } from "#compiled/@eve/tracing/index.js";+import { otelTelemetry } from "#compiled/@vercel/agent-runs/index.js";describe("MCP trace propagation", () => {let exporter: InMemorySpanExporter;diff --git a/packages/eve/src/tracing/eve/agent-approval-instrumentation.ts b/packages/eve/src/tracing/eve/agent-approval-instrumentation.tsindex b641ed8bc..4f528723d 100644--- a/packages/eve/src/tracing/eve/agent-approval-instrumentation.ts+++ b/packages/eve/src/tracing/eve/agent-approval-instrumentation.ts@@ -6,11 +6,11 @@ import type {} from "#instrumentation/lifecycle.js";import { resumeTool } from "#tracing/eve/agent-tool-instrumentation.js";import type { AgentActionTraceState } from "#tracing/eve/agent-trace-state.js";-import type { AgentTracing } from "#compiled/@eve/tracing/index.js";+import type { AgentRun } from "#compiled/@vercel/agent-runs/index.js";/** Approval spans live under their tool call; hook state keeps only the locator. */export function createAgentApprovalInstrumentation(input: {- readonly tracing: AgentTracing;+ readonly tracing: AgentRun;readonly actionStateFor: (sessionId: string,turnId: string,diff --git a/packages/eve/src/tracing/eve/agent-channel-delivery-instrumentation.ts b/packages/eve/src/tracing/eve/agent-channel-delivery-instrumentation.tsindex 66e09242a..7c9c28d9b 100644--- a/packages/eve/src/tracing/eve/agent-channel-delivery-instrumentation.ts+++ b/packages/eve/src/tracing/eve/agent-channel-delivery-instrumentation.ts@@ -9,7 +9,7 @@ import type {import { contextStorage } from "#context/container.js";import { ActiveChannelDeliveriesKey } from "#context/keys.js";import type { JsonValue } from "#shared/json.js";-import { contentAttribute } from "#compiled/@eve/tracing/otel.js";+import { contentAttribute } from "#compiled/@vercel/agent-runs/otel.js";import type { AgentTraceStateStore } from "#tracing/eve/agent-trace-state.js";import { isSampledTrace } from "#shared/trace-policy.js";diff --git a/packages/eve/src/tracing/eve/agent-memory-instrumentation.ts b/packages/eve/src/tracing/eve/agent-memory-instrumentation.tsindex d51f69b5e..bb4951098 100644--- a/packages/eve/src/tracing/eve/agent-memory-instrumentation.ts+++ b/packages/eve/src/tracing/eve/agent-memory-instrumentation.ts@@ -14,11 +14,11 @@ import type { ConversationEnvironment } from "#shared/conversation-context.js";import type { AgentTraceStateStore } from "#tracing/eve/agent-trace-state.js";import { withChannelAudience } from "#tracing/eve/channel-audience-context.js";import { eveTurnIdentity } from "#tracing/eve/operation-input.js";-import { type AgentTracing } from "#compiled/@eve/tracing/index.js";-import { activeTraceOperation } from "#compiled/@eve/tracing/otel.js";+import { type AgentRun } from "#compiled/@vercel/agent-runs/index.js";+import { activeTraceOperation } from "#compiled/@vercel/agent-runs/otel.js";export function createAgentMemoryInstrumentation(input: {- tracing: AgentTracing;+ tracing: AgentRun;environment: ConversationEnvironment;recordOutputs?: boolean;stateStore: AgentTraceStateStore;diff --git a/packages/eve/src/tracing/eve/agent-otel-provider.test.ts b/packages/eve/src/tracing/eve/agent-otel-provider.test.tsindex 8dcb824a8..cae190b4a 100644--- a/packages/eve/src/tracing/eve/agent-otel-provider.test.ts+++ b/packages/eve/src/tracing/eve/agent-otel-provider.test.ts@@ -32,8 +32,8 @@ import {createAgentOtelInstrumentation,type AgentOtelInstrumentationInput,} from "#tracing/eve/agent-otel-provider.js";-import { AgentSpanIdGenerator } from "#compiled/@eve/tracing/index.js";-import { otelTelemetry } from "#compiled/@eve/tracing/index.js";+import { AgentSpanIdGenerator } from "#compiled/@vercel/agent-runs/index.js";+import { otelTelemetry } from "#compiled/@vercel/agent-runs/index.js";import { eveOutputMapping } from "#tracing/eve/profile.js";import { ContextAgentTraceStateStore } from "#tracing/eve/agent-trace-context-store.js";import type { AgentTraceStateStore } from "#tracing/eve/agent-trace-state.js";@@ -52,10 +52,10 @@ import {} from "#instrumentation/lifecycle.js";import type { ChannelAudience } from "#shared/channel-audience.js";import { channelAudienceFromContext } from "#tracing/eve/channel-audience-context.js";-import { activeTraceOperation } from "#compiled/@eve/tracing/otel.js";+import { activeTraceOperation } from "#compiled/@vercel/agent-runs/otel.js";import { contentFilteringProcessor } from "#tracing/eve/content-span-processor.js";import { parseLocalTraceSegment } from "#tracing/local/trace-reader.js";-import { CONTENT_ATTRIBUTE_LIMIT } from "#compiled/@eve/tracing/otel.js";+import { CONTENT_ATTRIBUTE_LIMIT } from "#compiled/@vercel/agent-runs/otel.js";import type { TraceCapturePolicy } from "#tracing/eve/otel-declaration.js";import type { TraceCaptureContext } from "#shared/trace-policy.js";import { resolveTracePolicyDecision } from "#shared/trace-policy.js";diff --git a/packages/eve/src/tracing/eve/agent-otel-provider.ts b/packages/eve/src/tracing/eve/agent-otel-provider.tsindex 7c42b8cdc..5ff8770c9 100644--- a/packages/eve/src/tracing/eve/agent-otel-provider.ts+++ b/packages/eve/src/tracing/eve/agent-otel-provider.ts@@ -35,7 +35,7 @@ import type {AgentTelemetry,AttemptOperation,ModelOperation,-} from "#compiled/@eve/tracing/index.js";+} from "#compiled/@vercel/agent-runs/index.js";import { isUserMessageKind } from "#harness/messages.js";import { isObject } from "#shared/guards.js";diff --git a/packages/eve/src/tracing/eve/agent-telemetry-contract.integration.test.ts b/packages/eve/src/tracing/eve/agent-telemetry-contract.integration.test.tsindex 5b615157e..cee75743b 100644--- a/packages/eve/src/tracing/eve/agent-telemetry-contract.integration.test.ts+++ b/packages/eve/src/tracing/eve/agent-telemetry-contract.integration.test.ts@@ -32,8 +32,8 @@ import {} from "#instrumentation/lifecycle.js";import { bindInstrumentationRuntime } from "#instrumentation/runtime.js";import { createAgentOtelInstrumentation } from "#tracing/eve/agent-otel-provider.js";-import { AgentSpanIdGenerator } from "#compiled/@eve/tracing/index.js";-import { otelTelemetry } from "#compiled/@eve/tracing/index.js";+import { AgentSpanIdGenerator } from "#compiled/@vercel/agent-runs/index.js";+import { otelTelemetry } from "#compiled/@vercel/agent-runs/index.js";import { eveOutputMapping } from "#tracing/eve/profile.js";import { ContextAgentTraceStateStore } from "#tracing/eve/agent-trace-context-store.js";import { AGENT_TRACE_CONTEXT_KEY } from "#tracing/eve/agent-trace-context-store.js";diff --git a/packages/eve/src/tracing/eve/agent-tool-instrumentation.ts b/packages/eve/src/tracing/eve/agent-tool-instrumentation.tsindex 103304ae5..c1dc86328 100644--- a/packages/eve/src/tracing/eve/agent-tool-instrumentation.ts+++ b/packages/eve/src/tracing/eve/agent-tool-instrumentation.ts@@ -20,12 +20,12 @@ import type {import { withChannelAudience } from "#tracing/eve/channel-audience-context.js";import { eveTurnIdentity } from "#tracing/eve/operation-input.js";import type {- AgentTracing,+ AgentRun,AttemptOperation,CaptureDecision,ToolInput,ToolOperation,-} from "#compiled/@eve/tracing/index.js";+} from "#compiled/@vercel/agent-runs/index.js";export interface AgentToolContext {readonly context: Context;@@ -52,7 +52,7 @@ const OPEN_EXECUTIONS = 10000;/** Finds an open tool call in its turn's trace tree, in this or a later process. */export async function resumeTool(- tracing: AgentTracing,+ tracing: AgentRun,state: AgentActionTraceState,): Promise<ToolOperation | undefined> {const turn = await tracing.resume({@@ -69,7 +69,7 @@ export async function resumeTool(* without a dispatch closes under its step when the step ends.*/export function createAgentToolInstrumentation(input: {- readonly tracing: AgentTracing;+ readonly tracing: AgentRun;readonly attemptFor: (scope: InstrumentationAttemptScope,) => Promise<AttemptOperation | undefined>;diff --git a/packages/eve/src/tracing/eve/agent-trace-context.ts b/packages/eve/src/tracing/eve/agent-trace-context.tsindex 1a7742871..552df7ef0 100644--- a/packages/eve/src/tracing/eve/agent-trace-context.ts+++ b/packages/eve/src/tracing/eve/agent-trace-context.ts@@ -1,5 +1,5 @@import { createContextKey, type Context } from "#compiled/@opentelemetry/api/index.js";-import { activeTraceOperation } from "#compiled/@eve/tracing/otel.js";+import { activeTraceOperation } from "#compiled/@vercel/agent-runs/otel.js";// OTel context keys use Symbol.for(description), so this marker survives duplicate// module evaluations while remaining local to the process and async context.diff --git a/packages/eve/src/tracing/eve/agent-trace-state.ts b/packages/eve/src/tracing/eve/agent-trace-state.tsindex 95aaa4ded..c36050d3d 100644--- a/packages/eve/src/tracing/eve/agent-trace-state.ts+++ b/packages/eve/src/tracing/eve/agent-trace-state.ts@@ -6,7 +6,7 @@ import type {} from "#instrumentation/lifecycle.js";import type { ChannelAudience } from "#shared/channel-audience.js";import type { InstrumentationDecision } from "#shared/instrumentation-decision.js";-import type { TraceSnapshot } from "#compiled/@eve/tracing/index.js";+import type { TraceSnapshot } from "#compiled/@vercel/agent-runs/index.js";export interface AgentSessionTraceState {readonly traceSessionId: string;diff --git a/packages/eve/src/tracing/eve/connection-events.ts b/packages/eve/src/tracing/eve/connection-events.tsindex 315d78a3a..1bdb095cb 100644--- a/packages/eve/src/tracing/eve/connection-events.ts+++ b/packages/eve/src/tracing/eve/connection-events.ts@@ -5,12 +5,12 @@ import {trace,type SpanContext,} from "#compiled/@opentelemetry/api/index.js";-import { otelTelemetry } from "#compiled/@eve/tracing/index.js";+import { otelTelemetry } from "#compiled/@vercel/agent-runs/index.js";import {activeTraceOperation,truncateTelemetryText,withErrorContent,-} from "#compiled/@eve/tracing/otel.js";+} from "#compiled/@vercel/agent-runs/otel.js";import { contextStorage, type AlsContext } from "#context/container.js";import { SessionIdKey } from "#context/keys.js";import { getInstrumentationRuntime } from "#instrumentation/runtime-global.js";diff --git a/packages/eve/src/tracing/eve/content-span-processor.ts b/packages/eve/src/tracing/eve/content-span-processor.tsindex 43c9aca00..4a6f5b744 100644--- a/packages/eve/src/tracing/eve/content-span-processor.ts+++ b/packages/eve/src/tracing/eve/content-span-processor.ts@@ -3,7 +3,7 @@ import type { SpanProcessor } from "#compiled/@vercel/otel/index.js";import {withoutDeclinedContent,type ResolvedContentOptions,-} from "#compiled/@eve/tracing/otel.js";+} from "#compiled/@vercel/agent-runs/otel.js";import { hasConversationRelease, type LocalTracesProcessor } from "#tracing/local/traces.js";import { normalizeChannelAudience } from "#shared/channel-audience.js";import type { ChannelAudience } from "#shared/channel-audience.js";diff --git a/packages/eve/src/tracing/eve/delegation.ts b/packages/eve/src/tracing/eve/delegation.tsindex 98980c117..cc83cef82 100644--- a/packages/eve/src/tracing/eve/delegation.ts+++ b/packages/eve/src/tracing/eve/delegation.ts@@ -1,4 +1,4 @@-import { createAgentDelegationTransport } from "#compiled/@eve/tracing/delegation.js";+import { createAgentDelegationTransport } from "#compiled/@vercel/agent-runs/delegation.js";import type { AgentSessionContext } from "#execution/agent-sessions/context.js";import type { SessionParent, SessionTraceContext } from "#channel/types.js";import { resolveConversationId } from "#shared/conversation-identity.js";diff --git a/packages/eve/src/tracing/eve/gateway.ts b/packages/eve/src/tracing/eve/gateway.tsindex f37f1767a..950a937eb 100644--- a/packages/eve/src/tracing/eve/gateway.ts+++ b/packages/eve/src/tracing/eve/gateway.ts@@ -1,4 +1,4 @@-import type { Attributes } from "#compiled/@eve/tracing/index.js";+import type { Attributes } from "#compiled/@vercel/agent-runs/index.js";import {context as otelContext,createContextKey,diff --git a/packages/eve/src/tracing/eve/install-instrumentation-runtime.ts b/packages/eve/src/tracing/eve/install-instrumentation-runtime.tsindex 753b4f683..ef12bbc33 100644--- a/packages/eve/src/tracing/eve/install-instrumentation-runtime.ts+++ b/packages/eve/src/tracing/eve/install-instrumentation-runtime.ts@@ -12,12 +12,12 @@ import {} from "#instrumentation/runtime.js";import { createLogger, formatError } from "#internal/logging.js";import { resolveInstrumentationEnvironment } from "#internal/application/dev-environment.js";-import { AgentSpanIdGenerator } from "#compiled/@eve/tracing/index.js";+import { AgentSpanIdGenerator } from "#compiled/@vercel/agent-runs/index.js";import { ContextAgentTraceStateStore } from "#tracing/eve/agent-trace-context-store.js";import { createAgentOtelInstrumentation } from "#tracing/eve/agent-otel-provider.js";import { hasConversationRelease, type LocalTracesProcessor } from "#tracing/local/traces.js";import type { CollectedOtel, RuntimeContextResolver } from "#tracing/eve/otel-declaration.js";-import { otelTelemetry } from "#compiled/@eve/tracing/index.js";+import { otelTelemetry } from "#compiled/@vercel/agent-runs/index.js";import type { RegisteredOtelPipeline } from "#tracing/eve/otel-registration.js";import { registerOtel } from "#tracing/eve/otel-registration.js";import { eveOutputMapping } from "#tracing/eve/profile.js";diff --git a/packages/eve/src/tracing/eve/invoke-tool-span.ts b/packages/eve/src/tracing/eve/invoke-tool-span.tsindex 01694d9d6..6f7b8b834 100644--- a/packages/eve/src/tracing/eve/invoke-tool-span.ts+++ b/packages/eve/src/tracing/eve/invoke-tool-span.ts@@ -14,8 +14,16 @@ import { resolveInstrumentationEnvironment } from "#internal/application/dev-envimport { createLogger, formatError } from "#internal/logging.js";import { applyLiveDeliveryAudienceCeiling } from "#shared/forwarded-trace-policy.js";import { resolveTracePolicy } from "#shared/trace-policy.js";-import { otelTelemetry, type Attributes, type SpanWriter } from "#compiled/@eve/tracing/index.js";-import { contentAttribute, mcpLifecycle, withErrorContent } from "#compiled/@eve/tracing/otel.js";+import {+ otelTelemetry,+ type Attributes,+ type SpanWriter,+} from "#compiled/@vercel/agent-runs/index.js";+import {+ contentAttribute,+ mcpLifecycle,+ withErrorContent,+} from "#compiled/@vercel/agent-runs/otel.js";import { DIRECT_TOOL_CALL_ATTRIBUTE, DIRECT_TOOL_CALL_VALUE } from "#tracing/local/inspection.js";import { markAgentTraceContext } from "#tracing/eve/agent-trace-context.js";import { withChannelAudience } from "#tracing/eve/channel-audience-context.js";diff --git a/packages/eve/src/tracing/eve/logging.integration.test.ts b/packages/eve/src/tracing/eve/logging.integration.test.tsindex 6cdccfd7d..b4f8f00af 100644--- a/packages/eve/src/tracing/eve/logging.integration.test.ts+++ b/packages/eve/src/tracing/eve/logging.integration.test.ts@@ -6,7 +6,7 @@ import {} from "@opentelemetry/sdk-trace-base";import { AsyncLocalStorageContextManager } from "@opentelemetry/context-async-hooks";import { expect, it, vi } from "vitest";-import { withCapture } from "#compiled/@eve/tracing/otel.js";+import { withCapture } from "#compiled/@vercel/agent-runs/otel.js";import { createLogger, logError } from "#internal/logging.js";it("keeps logger-to-span error details behind the active output policy", async () => {diff --git a/packages/eve/src/tracing/eve/mcp.ts b/packages/eve/src/tracing/eve/mcp.tsindex d0912faf5..ec479ce3c 100644--- a/packages/eve/src/tracing/eve/mcp.ts+++ b/packages/eve/src/tracing/eve/mcp.ts@@ -10,7 +10,7 @@ import {otelTelemetry,type CaptureDecision,type ContentSerializer,-} from "#compiled/@eve/tracing/index.js";+} from "#compiled/@vercel/agent-runs/index.js";import {activeTraceOperation,contentAttribute,@@ -18,7 +18,7 @@ import {truncateTelemetryText,type McpLifecycle,type McpUpdate,-} from "#compiled/@eve/tracing/otel.js";+} from "#compiled/@vercel/agent-runs/otel.js";import { eveOutputMapping } from "./profile.js";function isObject(value: unknown): value is Record<string, unknown> {return typeof value === "object" && value !== null && !Array.isArray(value);diff --git a/packages/eve/src/tracing/eve/metadata.ts b/packages/eve/src/tracing/eve/metadata.tsindex 964cf8dcc..ba40f87d5 100644--- a/packages/eve/src/tracing/eve/metadata.ts+++ b/packages/eve/src/tracing/eve/metadata.ts@@ -3,7 +3,7 @@ import type {AgentTurnTraceState,} from "#tracing/eve/agent-trace-state.js";import { normalizeInstrumentationChannelKind } from "#internal/instrumentation.js";-import type { TurnInput } from "#compiled/@eve/tracing/index.js";+import type { TurnInput } from "#compiled/@vercel/agent-runs/index.js";import { checkpointContent } from "#tracing/eve/operation-input.js";export function eveActivationMetadata(input: {diff --git a/packages/eve/src/tracing/eve/operation-input.ts b/packages/eve/src/tracing/eve/operation-input.tsindex 04cf3772d..400142c62 100644--- a/packages/eve/src/tracing/eve/operation-input.ts+++ b/packages/eve/src/tracing/eve/operation-input.ts@@ -3,11 +3,11 @@ import type { SpanContext } from "#compiled/@opentelemetry/api/index.js";import { resolveConversationId } from "#shared/conversation-identity.js";import type { AgentTraceStateStore } from "#tracing/eve/agent-trace-state.js";import {- createAgentTracing,+ createAgentRun,type AgentTelemetry,- type AgentTracing,+ type AgentRun,type TraceCheckpointer,-} from "#compiled/@eve/tracing/index.js";+} from "#compiled/@vercel/agent-runs/index.js";export function traceSessionIdOf(scope: {readonly traceSessionId?: string;@@ -53,11 +53,11 @@ export function eveCapture(reference: SpanContext | undefined) {export function createEveTracing(input: {readonly telemetry: AgentTelemetry;readonly stateStore: AgentTraceStateStore;-}): AgentTracing {+}): AgentRun {const checkpointer: TraceCheckpointer = {get: (key) => input.stateStore.get("checkpoint", key),set: (key, value) => input.stateStore.set("checkpoint", key, value),delete: (key) => input.stateStore.delete("checkpoint", key),};- return createAgentTracing({ telemetry: input.telemetry, checkpointer });+ return createAgentRun({ telemetry: input.telemetry, checkpointer });}diff --git a/packages/eve/src/tracing/eve/otel-registration.ts b/packages/eve/src/tracing/eve/otel-registration.tsindex 071054cd0..2f983e0f8 100644--- a/packages/eve/src/tracing/eve/otel-registration.ts+++ b/packages/eve/src/tracing/eve/otel-registration.ts@@ -12,10 +12,10 @@ import {import { registerOTel } from "#compiled/@vercel/otel/index.js";import type { Configuration, SpanProcessor, SpanProcessorOrName } from "./otel-configuration.js";-import { AgentSpanIdGenerator } from "#compiled/@eve/tracing/index.js";+import { AgentSpanIdGenerator } from "#compiled/@vercel/agent-runs/index.js";import type { OtelConfiguration } from "./otel-configuration.js";-import { type Attributes } from "#compiled/@eve/tracing/index.js";-import { invocationName } from "#compiled/@eve/tracing/otel.js";+import { type Attributes } from "#compiled/@vercel/agent-runs/index.js";+import { invocationName } from "#compiled/@vercel/agent-runs/otel.js";export type SamplingOperation = { readonly name: string; readonly attributes?: Attributes };import { conversationIdFromContext } from "#tracing/eve/conversation-context.js";diff --git a/packages/eve/src/tracing/eve/profile.ts b/packages/eve/src/tracing/eve/profile.tsindex d97a47fc6..67cb44f67 100644--- a/packages/eve/src/tracing/eve/profile.ts+++ b/packages/eve/src/tracing/eve/profile.ts@@ -1,4 +1,8 @@-import type { Attributes, MappingContext, OutputMapping } from "#compiled/@eve/tracing/index.js";+import type {+ Attributes,+ MappingContext,+ OutputMapping,+} from "#compiled/@vercel/agent-runs/index.js";import { currentTraceSessionId } from "#tracing/eve/agent-trace-context-store.js";export function eveOutputMapping(options?: {diff --git a/packages/eve/src/tracing/eve/session.ts b/packages/eve/src/tracing/eve/session.tsindex 3f040d0c2..583d56ea1 100644--- a/packages/eve/src/tracing/eve/session.ts+++ b/packages/eve/src/tracing/eve/session.ts@@ -33,14 +33,14 @@ import { withChannelAudience } from "#tracing/eve/channel-audience-context.js";import { withOperationConversation } from "#tracing/eve/conversation-context.js";import type {AgentSpanIdGenerator,- AgentTracing,+ AgentRun,ExecutionContext,TraceLink,TurnOperation,-} from "#compiled/@eve/tracing/index.js";+} from "#compiled/@vercel/agent-runs/index.js";interface EveSessionTracingInput {- readonly tracing: AgentTracing;+ readonly tracing: AgentRun;readonly idGenerator: AgentSpanIdGenerator;readonly environment: ConversationEnvironment;readonly frameworkVersion: string;diff --git a/packages/eve/src/tracing/eve/telemetry-budget.test.ts b/packages/eve/src/tracing/eve/telemetry-budget.test.tsindex a9d498990..dd7097f17 100644--- a/packages/eve/src/tracing/eve/telemetry-budget.test.ts+++ b/packages/eve/src/tracing/eve/telemetry-budget.test.ts@@ -3,7 +3,7 @@ import {boundedPrincipalId,telemetryByteLength,truncateTelemetryText,-} from "#compiled/@eve/tracing/otel.js";+} from "#compiled/@vercel/agent-runs/otel.js";describe("boundedPrincipalId", () => {it.each(["x".repeat(1024), String.fromCodePoint(0x1f600).repeat(256)])(diff --git a/packages/eve/src/tracing/local/trace-summary.ts b/packages/eve/src/tracing/local/trace-summary.tsindex a6ff7fba4..ad0741f6b 100644--- a/packages/eve/src/tracing/local/trace-summary.ts+++ b/packages/eve/src/tracing/local/trace-summary.ts@@ -1,5 +1,5 @@import type { LocalTraceSpan } from "#tracing/local/trace-reader.js";-import { USAGE_FIELDS as AGENT_USAGE_ATTRIBUTES } from "#compiled/@eve/tracing/otel.js";+import { USAGE_FIELDS as AGENT_USAGE_ATTRIBUTES } from "#compiled/@vercel/agent-runs/otel.js";import {localTraceOperations,traceModelName,diff --git a/packages/eve/test/scenarios/compiled-vendor-assets.scenario.test.ts b/packages/eve/test/scenarios/compiled-vendor-assets.scenario.test.tsindex f1d5b7769..6c12b0716 100644--- a/packages/eve/test/scenarios/compiled-vendor-assets.scenario.test.ts+++ b/packages/eve/test/scenarios/compiled-vendor-assets.scenario.test.ts@@ -1,12 +1,13 @@import { execFile } from "node:child_process";import { createHash } from "node:crypto";-import { readdir, readFile } from "node:fs/promises";+import { mkdir, readdir, readFile, symlink, writeFile } from "node:fs/promises";import { createRequire } from "node:module";import { dirname, join } from "node:path";import { fileURLToPath, pathToFileURL } from "node:url";import { promisify } from "node:util";import { describe, expect, it } from "vitest";+import { useTemporaryDirectories } from "../../src/internal/testing/use-temporary-app-roots.js";const EVE_PACKAGE_ROOT = fileURLToPath(new URL("../../", import.meta.url));const EVE_CATALOG_ROOT = join(EVE_PACKAGE_ROOT, "..", "eve-catalog");@@ -19,6 +20,7 @@ const EVE_CATALOG_FINGERPRINT_FILES = [] as const;const COMPILED_VENDOR_ROOT = join(EVE_PACKAGE_ROOT, ".generated", "compiled");const execFileAsync = promisify(execFile);+const createTemporaryDirectory = useTemporaryDirectories();const require = createRequire(import.meta.url);const VERCEL_BLOB_DIST_ROOT = dirname(require.resolve("@vercel/blob"));const VERCEL_SANDBOX_DIST_ROOT = join(@@ -46,6 +48,53 @@ function rewriteDeclarationImports(}describe("compiled vendor assets", () => {+ it("vendors a symlinked workspace package before its compiled export exists", async () => {+ const root = await createTemporaryDirectory("eve-vendor-workspace-");+ const packageRoot = join(root, "packages", "consumer");+ const libraryRoot = join(root, "packages", "library");+ const compiledRoot = join(packageRoot, "compiled");+ await mkdir(join(packageRoot, "node_modules", "@example"), { recursive: true });+ await mkdir(join(libraryRoot, "src"), { recursive: true });+ await writeFile(join(root, "package.json"), JSON.stringify({ type: "module" }));+ await writeFile(join(root, "tsconfig.json"), "{}");+ await writeFile(+ join(libraryRoot, "package.json"),+ JSON.stringify({+ name: "@example/library",+ version: "0.0.0",+ type: "module",+ exports: { ".": "./dist/index.js" },+ }),+ );+ await writeFile(join(libraryRoot, "src", "index.ts"), "export const answer = 42;");+ await symlink(+ libraryRoot,+ join(packageRoot, "node_modules", "@example", "library"),+ "junction",+ );++ const { runVendor } = await import(+ pathToFileURL(join(EVE_PACKAGE_ROOT, "scripts", "vendor-compiled", "_shared.mjs")).href+ );+ await runVendor({+ packageRoot,+ compiledRoot,+ scriptFiles: [],+ modules: [+ {+ packageName: "@example/library",+ compiledPath: "library",+ entry: "src/index.ts",+ bundling: "standalone",+ fingerprintFiles: ["../../tsconfig.json", "src/index.ts"],+ },+ ],+ });++ const { answer } = await import(pathToFileURL(join(compiledRoot, "library", "index.js")).href);+ expect(answer).toBe(42);+ });+it("leaves Zod's process-global configuration to the app", async () => {// Every Zod copy in a process shares `globalThis.__zod_globalConfig`, so a// vendored side effect there would rewrite the app's own schemas too.diff --git a/packages/tracing/README.md b/packages/tracing/README.mdindex e1017c19b..ed6637b62 100644--- a/packages/tracing/README.md+++ b/packages/tracing/README.md@@ -1,20 +1,18 @@-# Agent tracing+# Agent run tracing-`@eve/tracing` records agent execution with OpenTelemetry. It owns-span topology, capture, completion, and durable checkpoints. The package is-private and not published to npm. Its only runtime package dependency is-`@opentelemetry/api`.+`@vercel/agent-runs` records agent execution with OpenTelemetry. It owns+span topology, capture, completion, and durable checkpoints. Its only required+peer dependency is `@opentelemetry/api`.-eve vendors it: `pnpm --filter eve build:compiled` bundles the four-entrypoints into `#compiled/@eve/tracing/` in the same chunk group as eve's-vendored `@opentelemetry/api`, so both share one copy. eve imports only those-entrypoints, never this workspace package. After changing the library, rerun-`build:compiled` before running eve's tests.+## Setup-Run the library's own tests with `pnpm --filter @eve/tracing test:unit` and-`test:integration`.+Requires Node.js 24 or newer.-## Setup+Install the package and its OpenTelemetry peer dependency:++```sh+pnpm add @vercel/agent-runs @opentelemetry/api+```Pass a telemetry object that writes spans and tracks the active trace context.`otelTelemetry()` adapts an OpenTelemetry tracer provider; it does not register@@ -24,11 +22,13 @@ also installs the async context manager the library needs, or passes its ownprovider.```ts-import { createAgentTracing, otelTelemetry } from "@eve/tracing";+import { createAgentRun, otelTelemetry } from "@vercel/agent-runs";-const tracing = createAgentTracing({ telemetry: otelTelemetry({ provider }) });+const run = createAgentRun({ telemetry: otelTelemetry({ provider }) });```+`createAgentRun` accepts `AgentRunOptions` and returns an `AgentRun`.+On Vercel, `otelTelemetry()` adds `vercel.session_id` from `agent.run.id` soAgent Runs can find a run's spans. A `mapping` you pass replaces that default.@@ -43,7 +43,7 @@ methods, which default to the provider's. Other backends implementWrapped methods preserve the callback's value or error and complete their span.```ts-await tracing.turn({ agentName: "support", identity, sequence: 0 }, (turn) =>+await run.turn({ agentName: "support", identity, sequence: 0 }, (turn) =>turn.attempt({ stepIndex: 0, attempt: 0 }, (attempt) =>attempt.tool({ callId: "lookup", name: "lookup" }, lookup),),@@ -69,7 +69,7 @@ Use `describe(value)` to map a callback result to an outcome or captured output.Omit the callback when execution starts and ends in different hooks.```ts-const turn = await tracing.turn({ identity, sequence: 0 });+const turn = await run.turn({ identity, sequence: 0 });const attempt = await turn.attempt({ stepIndex: 0, attempt: 0 });const tool = await attempt.tool({ callId: "lookup", name: "lookup" });try {@@ -130,15 +130,13 @@ unchanged and never consumes it. Parent completion waits for that promise.calls, and tool executions, and runs model calls and tools inside their spans.```ts-import { aiSdkTelemetry } from "@eve/tracing/ai-sdk";+import { aiSdkTelemetry } from "@vercel/agent-runs/ai-sdk";await generateText({model,prompt,telemetry: {- integrations: [- aiSdkTelemetry(tracing, { turn: { agentName: "support", identity, sequence: 0 } }),- ],+ integrations: [aiSdkTelemetry(run, { turn: { agentName: "support", identity, sequence: 0 } })],},});```@@ -156,7 +154,7 @@ Remote calls need an explicit sender transport and authenticated receiver trustcheck.```ts-import { createAgentDelegationTransport } from "@eve/tracing/delegation";+import { createAgentDelegationTransport } from "@vercel/agent-runs/delegation";const transport = createAgentDelegationTransport();const fetchAgent = transport.transport(approvedAgentFetch);await attempt.callRemoteAgent({ callId: "remote", agentName: "research" }, () =>@@ -164,7 +162,7 @@ await attempt.callRemoteAgent({ callId: "remote", agentName: "research" }, () =>);transport.receive(request.headers, verifyAuthenticatedCaller, () =>- tracing.turn({ identity, sequence: 0 }, runAgent),+ run.turn({ identity, sequence: 0 }, runAgent),);```@@ -184,7 +182,7 @@ example across workflow steps. Durable spans need stable IDs, so install an```tsconst idGenerator = new AgentSpanIdGenerator();const provider = new BasicTracerProvider({ idGenerator, spanProcessors });-const tracing = createAgentTracing({+const run = createAgentRun({telemetry: otelTelemetry({ provider, idGenerator }),checkpointer: { get, set, delete: remove },});@@ -194,7 +192,7 @@ Resume by calling the same operations with the same identifiers. The librarycontinues the saved turn instead of starting a new one:```ts-const turn = await tracing.turn({ identity, sequence: 0 });+const turn = await run.turn({ identity, sequence: 0 });const attempt = await turn.attempt({ stepIndex: 0, attempt: 0 });const tool = await attempt.tool({ callId: "lookup", name: "lookup" });const approval = await tool.approval({ requestId: "approval" });@@ -203,14 +201,14 @@ await approval.complete({ outcome: "approved" });Turns are keyed by `runId` and `turnId`; attempts by step indexand attempt; tool calls by `callId`; approvals by `requestId`. Model calls and-memory finish within one process and are not resumed. `tracing.resume({ identity })`+memory finish within one process and are not resumed. `run.resume({ identity })`returns a saved turn without starting one, for example to finish a tool callafter its turn has completed. `turn.findTool(callId)`, `turn.findAttempt()`, and`tool.findApproval()` return open operations, or `undefined` once they havefinished:```ts-const tool = (await tracing.resume({ identity }))?.findTool("lookup");+const tool = (await run.resume({ identity }))?.findTool("lookup");await tool?.complete({ outcome: "completed" });```@@ -229,7 +227,7 @@ complete, so their spans carry the IDs their children already reference.## OpenTelemetry plumbing-`@eve/tracing/otel` exports helpers for hosts that run their own spans+`@vercel/agent-runs/otel` exports helpers for hosts that run their own spansbeside agent tracing: the active operation, capture context, content bounds,and MCP enrichment. Agent tracing itself needs only the package root.@@ -241,3 +239,14 @@ operation at 64 KiB, and unfinished children at 10,000. `onError(error, context)tracing error channel. Trace output retains schema version 4.Local tests cover output and recovery. They do not prove live Agent Runs ingestion.++## Development++eve vendors this package: `pnpm --filter eve build:compiled` bundles the four+entrypoints into `#compiled/@vercel/agent-runs/` in the same chunk group as eve's+vendored `@opentelemetry/api`, so both share one copy. eve imports only those+entrypoints, never this workspace package. After changing the library, rerun+`build:compiled` before running eve's tests.++Run the library's own tests with `pnpm --filter @vercel/agent-runs test:unit` and+`pnpm --filter @vercel/agent-runs test:integration`.diff --git a/packages/tracing/package.json b/packages/tracing/package.jsonindex 403cadee9..13f35fa17 100644--- a/packages/tracing/package.json+++ b/packages/tracing/package.json@@ -1,37 +1,53 @@{- "name": "@eve/tracing",+ "name": "@vercel/agent-runs","version": "0.0.0",- "private": true,- "description": "Framework-neutral tracing for durable AI agents. Vendored into eve; not published.",+ "private": false,+ "description": "Framework-neutral agent run tracing with OpenTelemetry and durable checkpoints.","license": "Apache-2.0",+ "repository": {+ "type": "git",+ "url": "git+https://github.com/vercel/eve.git",+ "directory": "packages/tracing"+ },+ "files": [+ "dist",+ "src",+ "!src/**/*.test.ts",+ "NOTICE"+ ],"type": "module","sideEffects": false,"exports": {".": {"eve-source": "./src/index.ts",- "types": "./src/index.ts",- "default": "./src/index.ts"+ "types": "./dist/src/index.d.ts",+ "default": "./dist/src/index.js"},"./delegation": {"eve-source": "./src/delegation.ts",- "types": "./src/delegation.ts",- "default": "./src/delegation.ts"+ "types": "./dist/src/delegation.d.ts",+ "default": "./dist/src/delegation.js"},"./otel": {"eve-source": "./src/otel.ts",- "types": "./src/otel.ts",- "default": "./src/otel.ts"+ "types": "./dist/src/otel.d.ts",+ "default": "./dist/src/otel.js"},"./ai-sdk": {"eve-source": "./src/ai-sdk.ts",- "types": "./src/ai-sdk.ts",- "default": "./src/ai-sdk.ts"+ "types": "./dist/src/ai-sdk.d.ts",+ "default": "./dist/src/ai-sdk.js"},"./package.json": "./package.json"},+ "publishConfig": {+ "access": "public"+ },"scripts": {"clean": "rm -rf dist",+ "build": "tsc -p tsconfig.build.json","build:types": "tsc -p tsconfig.build.json --emitDeclarationOnly",+ "prepack": "pnpm run build && node ../../scripts/copy-package-license.mjs .","test:unit": "vitest run --config vitest.unit.config.ts","test:integration": "vitest run --config vitest.integration.config.ts","typecheck": "tsc -p tsconfig.json --noEmit"diff --git a/packages/tracing/src/adapters/ai-sdk-telemetry.ts b/packages/tracing/src/adapters/ai-sdk-telemetry.tsindex 9c2f5cdc7..43ac1644e 100644--- a/packages/tracing/src/adapters/ai-sdk-telemetry.ts+++ b/packages/tracing/src/adapters/ai-sdk-telemetry.ts@@ -1,5 +1,5 @@import type { Telemetry } from "ai";-import type { AgentTracing, TurnInput } from "../agent-tracing.js";+import type { AgentRun, TurnInput } from "../agent-run.js";import type {AttemptOperation,ModelOperation,@@ -30,7 +30,7 @@ const ABANDONED = { outcome: "abandoned" } as const;* Pass it to `telemetry.integrations` of `generateText`, `streamText`, or an* agent such as `HarnessAgent`.*/-export function aiSdkTelemetry(tracing: AgentTracing, options: AiSdkTelemetryOptions): Telemetry {+export function aiSdkTelemetry(run: AgentRun, options: AiSdkTelemetryOptions): Telemetry {const generations = new Map<string, Generation>();function generation(callId: string): Generation {@@ -75,7 +75,7 @@ export function aiSdkTelemetry(tracing: AgentTracing, options: AiSdkTelemetryOptasync onStepStart(event: Event<"onStepStart">) {const state = generation(event.callId);await closeStep(state);- state.turn ??= tracing.turn({+ state.turn ??= run.turn({startTimeMs: state.startTimeMs,...(typeof options.turn === "function"? options.turn({ callId: event.callId })diff --git a/packages/tracing/src/adapters/ai-sdk.integration.test.ts b/packages/tracing/src/adapters/ai-sdk.integration.test.tsindex 2423a584c..974dcc074 100644--- a/packages/tracing/src/adapters/ai-sdk.integration.test.ts+++ b/packages/tracing/src/adapters/ai-sdk.integration.test.ts@@ -12,8 +12,8 @@ import { generateText, isStepCount, tool } from "ai";import { MockLanguageModelV3 } from "ai/test";import { z } from "zod";import { describe, expect, it, vi } from "vitest";-import { createAgentTracing, otelTelemetry } from "@eve/tracing";-import { aiSdkTelemetry } from "@eve/tracing/ai-sdk";+import { createAgentRun, otelTelemetry } from "@vercel/agent-runs";+import { aiSdkTelemetry } from "@vercel/agent-runs/ai-sdk";const usage = {inputTokens: { total: 3, noCache: 3, cacheRead: 0, cacheWrite: 0 },@@ -115,7 +115,7 @@ describe("AI SDK HarnessAgent consumer", () => {spanProcessors: [new SimpleSpanProcessor(exporter)],});context.setGlobalContextManager(new AsyncLocalStorageContextManager().enable());- const tracing = createAgentTracing({ telemetry: otelTelemetry({ provider }) });+ const tracing = createAgentRun({ telemetry: otelTelemetry({ provider }) });const agent = new HarnessAgent({harness: scriptedHarness(method === "stream"),telemetry: {@@ -199,7 +199,7 @@ describe("AI SDK generateText consumer", () => {spanProcessors: [new SimpleSpanProcessor(exporter)],});context.setGlobalContextManager(new AsyncLocalStorageContextManager().enable());- const tracing = createAgentTracing({ telemetry: otelTelemetry({ provider }) });+ const tracing = createAgentRun({ telemetry: otelTelemetry({ provider }) });const activeInModel: (string | undefined)[] = [];let activeInTool: string | undefined;const responses = [diff --git a/packages/tracing/src/adapters/harness-agent.integration.test.ts b/packages/tracing/src/adapters/harness-agent.integration.test.tsindex 21c19b021..68a525589 100644--- a/packages/tracing/src/adapters/harness-agent.integration.test.ts+++ b/packages/tracing/src/adapters/harness-agent.integration.test.ts@@ -6,7 +6,7 @@ import {} from "@opentelemetry/sdk-trace-base";import { AsyncLocalStorageContextManager } from "@opentelemetry/context-async-hooks";import { context } from "@opentelemetry/api";-import { createAgentTracing, otelTelemetry } from "@eve/tracing";+import { createAgentRun, otelTelemetry } from "@vercel/agent-runs";describe("outside-eve agent", () => {it("runs wrapped operations and handle-based tools using only the facade", async () => {@@ -16,7 +16,7 @@ describe("outside-eve agent", () => {});const manager = new AsyncLocalStorageContextManager().enable();context.setGlobalContextManager(manager);- const tracing = createAgentTracing({+ const tracing = createAgentRun({telemetry: otelTelemetry({ provider }),});try {@@ -77,7 +77,7 @@ describe("outside-eve agent", () => {const provider = new BasicTracerProvider({spanProcessors: [new SimpleSpanProcessor(exporter)],});- const tracing = createAgentTracing({+ const tracing = createAgentRun({telemetry: otelTelemetry({ provider }),});const error = new TypeError("private failure");@@ -138,7 +138,7 @@ describe("outside-eve agent", () => {sampler: { shouldSample: () => ({ decision: 0 }), toString: () => "drop" },spanProcessors: [new SimpleSpanProcessor(exporter)],});- const tracing = createAgentTracing({+ const tracing = createAgentRun({telemetry: otelTelemetry({ provider }),});try {diff --git a/packages/tracing/src/agent-tracing.ts b/packages/tracing/src/agent-run.tssimilarity index 98%rename from packages/tracing/src/agent-tracing.tsrename to packages/tracing/src/agent-run.tsindex 0e20c48e0..5ab1808e2 100644--- a/packages/tracing/src/agent-tracing.ts+++ b/packages/tracing/src/agent-run.ts@@ -21,7 +21,7 @@ import type {TraceReference,} from "./core/types.js";-export interface AgentTracingOptions {+export interface AgentRunOptions {/** Span output and context propagation. Defaults to the global OpenTelemetry provider. */readonly telemetry?: AgentTelemetry;/**@@ -87,7 +87,7 @@ interface MemoryInput<T> {};}-export interface AgentTracing {+export interface AgentRun {turn: import("./operations.js").WrappedOperation<TurnInput, TurnOperation>;/** Returns a saved durable turn, without starting one. */resume(input: ResumeInput): Promise<TurnOperation | undefined>;@@ -110,7 +110,7 @@ interface LiveTurn {writes: number;}-export function createAgentTracing(input: AgentTracingOptions): AgentTracing {+export function createAgentRun(input: AgentRunOptions): AgentRun {const telemetry = input.telemetry ?? otelTelemetry();const checkpointer = input.checkpointer;if (checkpointer !== undefined && telemetry.ids === undefined)diff --git a/packages/tracing/src/delegation.integration.test.ts b/packages/tracing/src/delegation.integration.test.tsindex 4d3c3d607..9ab43c4b4 100644--- a/packages/tracing/src/delegation.integration.test.ts+++ b/packages/tracing/src/delegation.integration.test.ts@@ -5,8 +5,8 @@ import {SimpleSpanProcessor,} from "@opentelemetry/sdk-trace-base";import { context, propagation, trace } from "@opentelemetry/api";-import { createAgentTracing, otelTelemetry } from "@eve/tracing";-import { createAgentDelegationTransport } from "@eve/tracing/delegation";+import { createAgentRun, otelTelemetry } from "@vercel/agent-runs";+import { createAgentDelegationTransport } from "@vercel/agent-runs/delegation";import { AsyncLocalStorageContextManager } from "@opentelemetry/context-async-hooks";describe("agent delegation", () => {@@ -15,10 +15,10 @@ describe("agent delegation", () => {const otel = { spanProcessors: [new SimpleSpanProcessor(exporter)] };const provider = new BasicTracerProvider(otel);context.setGlobalContextManager(new AsyncLocalStorageContextManager().enable());- const parent = createAgentTracing({+ const parent = createAgentRun({telemetry: otelTelemetry({ provider }),});- const child = createAgentTracing({+ const child = createAgentRun({telemetry: otelTelemetry({ provider }),});try {@@ -91,10 +91,10 @@ describe("agent delegation", () => {const otel = { spanProcessors: [new SimpleSpanProcessor(exporter)] };const provider = new BasicTracerProvider(otel);context.setGlobalContextManager(new AsyncLocalStorageContextManager().enable());- const caller = createAgentTracing({+ const caller = createAgentRun({telemetry: otelTelemetry({ provider }),});- const callee = createAgentTracing({+ const callee = createAgentRun({telemetry: otelTelemetry({ provider }),});const transport = createAgentDelegationTransport();diff --git a/packages/tracing/src/durable.integration.test.ts b/packages/tracing/src/durable.integration.test.tsindex fd23cae27..d1753e333 100644--- a/packages/tracing/src/durable.integration.test.ts+++ b/packages/tracing/src/durable.integration.test.ts@@ -1,6 +1,6 @@import { afterEach, beforeEach, describe, expect, it } from "vitest";import { context } from "@opentelemetry/api";-import { createAgentDelegationTransport } from "@eve/tracing/delegation";+import { createAgentDelegationTransport } from "@vercel/agent-runs/delegation";import { AsyncLocalStorageContextManager } from "@opentelemetry/context-async-hooks";import {BasicTracerProvider,@@ -9,10 +9,10 @@ import {} from "@opentelemetry/sdk-trace-base";import {AgentSpanIdGenerator,- createAgentTracing,+ createAgentRun,otelTelemetry,type TraceCheckpointer,-} from "@eve/tracing";+} from "@vercel/agent-runs";const identity = { conversationId: "conversation", runId: "run", turnId: "turn" };@@ -35,7 +35,7 @@ function worker(checkpointer: TraceCheckpointer, exporter: InMemorySpanExporter)idGenerator,spanProcessors: [new SimpleSpanProcessor(exporter)],});- return createAgentTracing({+ return createAgentRun({telemetry: otelTelemetry({ provider, idGenerator }),checkpointer,});@@ -174,7 +174,7 @@ describe("durable agent tracing", () => {const { checkpointer } = memoryCheckpointer();const exporter = new InMemorySpanExporter();const idGenerator = new AgentSpanIdGenerator();- const tracing = createAgentTracing({+ const tracing = createAgentRun({telemetry: otelTelemetry({provider: new BasicTracerProvider({idGenerator,@@ -202,7 +202,7 @@ describe("durable agent tracing", () => {const exporter = new InMemorySpanExporter();const errors: string[] = [];const idGenerator = new AgentSpanIdGenerator();- const tracing = createAgentTracing({+ const tracing = createAgentRun({telemetry: otelTelemetry({provider: new BasicTracerProvider({idGenerator,@@ -225,7 +225,7 @@ describe("durable agent tracing", () => {it("requires stable span IDs", () => {expect(() =>- createAgentTracing({+ createAgentRun({telemetry: otelTelemetry({ provider: new BasicTracerProvider() }),checkpointer: memoryCheckpointer().checkpointer,}),diff --git a/packages/tracing/src/index.ts b/packages/tracing/src/index.tsindex 13447bfb3..c1d001d87 100644--- a/packages/tracing/src/index.ts+++ b/packages/tracing/src/index.ts@@ -1,11 +1,11 @@export {- createAgentTracing,- type AgentTracing,- type AgentTracingOptions,+ createAgentRun,+ type AgentRun,+ type AgentRunOptions,type AgentMemoryTracing,type TurnInput,type ResumeInput,-} from "./agent-tracing.js";+} from "./agent-run.js";export { otelTelemetry, type OtelTelemetryOptions } from "./adapters/otel.js";export { AgentSpanIdGenerator } from "./adapters/otel-ids.js";export type {diff --git a/packages/tracing/src/model-execution.integration.test.ts b/packages/tracing/src/model-execution.integration.test.tsindex 174cb4325..9ef197ef8 100644--- a/packages/tracing/src/model-execution.integration.test.ts+++ b/packages/tracing/src/model-execution.integration.test.ts@@ -4,7 +4,7 @@ import {InMemorySpanExporter,SimpleSpanProcessor,} from "@opentelemetry/sdk-trace-base";-import { createAgentTracing, otelTelemetry } from "./index.js";+import { createAgentRun, otelTelemetry } from "@vercel/agent-runs";describe("wrapped model streams", () => {it.each(["completed", "failed", "cancelled"])(@@ -14,7 +14,7 @@ describe("wrapped model streams", () => {const provider = new BasicTracerProvider({spanProcessors: [new SimpleSpanProcessor(exporter)],});- const tracing = createAgentTracing({+ const tracing = createAgentRun({telemetry: otelTelemetry({ provider }),});try {diff --git a/packages/tracing/tsconfig.json b/packages/tracing/tsconfig.jsonindex 87c988523..8c2cdef33 100644--- a/packages/tracing/tsconfig.json+++ b/packages/tracing/tsconfig.json@@ -2,6 +2,7 @@"$schema": "https://json.schemastore.org/tsconfig","extends": "../../tsconfig.json","compilerOptions": {+ "customConditions": ["eve-source"],"lib": ["ES2024"],"types": ["node"],"rootDir": ".",diff --git a/packages/tracing/vitest.integration.config.ts b/packages/tracing/vitest.integration.config.tsindex c9333f208..8b1c38ac0 100644--- a/packages/tracing/vitest.integration.config.ts+++ b/packages/tracing/vitest.integration.config.ts@@ -1,6 +1,19 @@+import { fileURLToPath } from "node:url";import { defineConfig } from "vitest/config";export default defineConfig({+ resolve: {+ alias: [+ {+ find: /^@vercel\/agent-runs$/,+ replacement: fileURLToPath(new URL("./src/index.ts", import.meta.url)),+ },+ {+ find: /^@vercel\/agent-runs\/(delegation|otel|ai-sdk)$/,+ replacement: fileURLToPath(new URL("./src/$1.ts", import.meta.url)),+ },+ ],+ },test: {environment: "node",include: ["src/**/*.integration.test.ts"],diff --git a/packages/tracing/vitest.unit.config.ts b/packages/tracing/vitest.unit.config.tsindex 95ba6cbd2..8e3df2653 100644--- a/packages/tracing/vitest.unit.config.ts+++ b/packages/tracing/vitest.unit.config.ts@@ -1,6 +1,7 @@import { defineConfig } from "vitest/config";export default defineConfig({+ resolve: { conditions: ["eve-source"] },test: {environment: "node",include: ["src/**/*.test.ts"],diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex dcef6e2f3..3284f272e 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -1829,9 +1829,6 @@ importers:'@eve/catalog':specifier: workspace:*version: link:../eve-catalog- '@eve/tracing':- specifier: workspace:*- version: link:../tracing'@linqapp/chat-sdk-adapter':specifier: ^0.5.1version: 0.5.1([email protected]([email protected]([email protected]))([email protected])([email protected]))@@ -1880,6 +1877,9 @@ importers:'@types/react-test-renderer':specifier: 19.1.0version: 19.1.0+ '@vercel/agent-runs':+ specifier: workspace:*+ version: link:../tracing'@vercel/blob':specifier: 2.8.0version: 2.8.0diff --git a/research/agent-tracing-library.md b/research/agent-tracing-library.mdindex 4d1369453..2566699ce 100644--- a/research/agent-tracing-library.md+++ b/research/agent-tracing-library.md@@ -1,7 +1,7 @@---issue: TBDstatus: in-progress-last_updated: "2026-10-13"+last_updated: "2026-10-15"---# Agent tracing library@@ -10,8 +10,8 @@ last_updated: "2026-10-13"Agents outside eve need the same trace topology, capture rules, and durablerecovery that eve has, without adopting eve's runtime. This plan extracts a-framework-neutral library, `@eve/tracing`, with one constructor:-`createAgentTracing`. The host passes an `AgentTelemetry` object that writes+framework-neutral library, `@vercel/agent-runs`, with one constructor:+`createAgentRun`. The host passes an `AgentTelemetry` object that writesspans and, for durable turns, a `TraceCheckpointer`. The library owns spantopology, capture, completion, checkpoint keys, and hydration. A durable turnresumes when the host calls the same operations again, in any process.@@ -24,21 +24,22 @@ eve migration (#4164).## Entrypoints-| Entrypoint | Contents |-| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |-| `@eve/tracing` | `createAgentTracing`, `otelTelemetry`, `AgentSpanIdGenerator`, operation and telemetry types, `currentCapture` |-| `@eve/tracing/delegation` | Local handoff context and the remote delegation transport |-| `@eve/tracing/ai-sdk` | `aiSdkTelemetry` and the AI SDK payload helpers `modelUsage` and `modelContent` |-| `@eve/tracing/otel` | Plumbing for hosts that run their own spans beside agent tracing: active-operation lookup, capture context, content bounds, and MCP enrichment |+| Entrypoint | Contents |+| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |+| `@vercel/agent-runs` | `createAgentRun`, `otelTelemetry`, `AgentSpanIdGenerator`, operation and telemetry types, `currentCapture` |+| `@vercel/agent-runs/delegation` | Local handoff context and the remote delegation transport |+| `@vercel/agent-runs/ai-sdk` | `aiSdkTelemetry` and the AI SDK payload helpers `modelUsage` and `modelContent` |+| `@vercel/agent-runs/otel` | Plumbing for hosts that run their own spans beside agent tracing: active-operation lookup, capture context, content bounds, and MCP enrichment |The root depends only on `@opentelemetry/api`. Only `./ai-sdk` uses `ai`, as anoptional peer dependency. Hosts cannot import private modules; the invariantguard (rule 52) enforces this.-The library is a private workspace package, `packages/tracing`, named-`@eve/tracing` for now. It is not published. eve vendors it the way it vendors-`@eve/catalog`: `build:compiled` bundles the four entrypoints into-`#compiled/@eve/tracing/`, in the same chunk group as eve's vendored+The library lives in `packages/tracing` and is published as+`@vercel/agent-runs`. Its constructor and types use the singular `AgentRun` name.+eve vendors it the way it vendors `@eve/catalog`: `build:compiled` bundles the+four entrypoints into+`#compiled/@vercel/agent-runs/`, in the same chunk group as eve's vendored`@opentelemetry/api`, so the published eve package carries one OpenTelemetrycopy and no new runtime dependency. eve imports only those vendoredentrypoints.@@ -46,7 +47,7 @@ entrypoints.## Construction```ts-const tracing = createAgentTracing({+const run = createAgentRun({telemetry: otelTelemetry({ provider, idGenerator, samplesTrace, mapping }),checkpointer, // optional: makes turns durableserializer, // optional: defaults to the AI SDK content serializer@@ -87,7 +88,7 @@ either way. An optional `describe(value)` maps the value to a completion, suchas an outcome or captured output:```ts-await tracing.turn({ agentName: "support", identity, sequence: 0 }, (turn) =>+await run.turn({ agentName: "support", identity, sequence: 0 }, (turn) =>turn.attempt({ stepIndex: 0, attempt: 0 }, (attempt) =>attempt.tool({ callId: "lookup", name: "lookup" }, lookup),),@@ -99,7 +100,7 @@ start and end arrive in different hooks, or different processes, hold thehandle and complete it themselves:```ts-const turn = await tracing.turn({ agentName: "support", identity, sequence: 0 });+const turn = await run.turn({ agentName: "support", identity, sequence: 0 });const attempt = await turn.attempt({ stepIndex: 0, attempt: 0 });const tool = await attempt.tool({ callId: "lookup", name: "lookup" });try {@@ -197,7 +198,7 @@ interface TraceCheckpointer {the entry when the turn and all of its open work have completed. Each node iscapped at 64 KiB, and finished children leave the tree.- **Resume.** Calling `turn()` with the same identity continues the saved turn.- `tracing.resume({ identity })` returns a saved turn without starting one.+ `run.resume({ identity })` returns a saved turn without starting one.`turn.findAttempt()`, `turn.findTool(callId)`, and `tool.findApproval()`return open operations, or `undefined`.- **Deferred spans.** Durable turns, tool calls, and approvals reserve their IDs@@ -224,7 +225,7 @@ original call.## AI SDK integration-`aiSdkTelemetry(tracing, { turn })` returns an AI SDK `Telemetry` integration+`aiSdkTelemetry(run, { turn })` returns an AI SDK `Telemetry` integrationfor `generateText`, `streamText`, and agents such as `HarnessAgent`. It keepsopen operations keyed by the SDK `callId` and `toolCallId`, so hosts do notstore handles between hooks. It runs model calls and tools inside their spans@@ -251,7 +252,7 @@ an `agent.dispatch` link to the call.## eve as consumer-eve uses one `AgentTracing` instance over `otelTelemetry`. Its checkpointer+eve uses one `AgentRun` instance over `otelTelemetry`. Its checkpointerstores trees in the existing workflow-context trace state, so checkpoints commitwith each workflow step. eve keeps these concerns:diff --git a/scripts/assert-changeset-publish-packages.mjs b/scripts/assert-changeset-publish-packages.mjsindex 1fc514644..7b88cda2a 100644--- a/scripts/assert-changeset-publish-packages.mjs+++ b/scripts/assert-changeset-publish-packages.mjs@@ -1,7 +1,7 @@import { access, readdir, readFile } from "node:fs/promises";import { join } from "node:path";-const allowedPublicPackages = new Set(["eve"]);+const allowedPublicPackages = new Set(["eve", "@vercel/agent-runs"]);const workspaceRoots = ["apps", "packages"];async function readJson(path) {diff --git a/scripts/guard-invariants.mjs b/scripts/guard-invariants.mjsindex d23b76f1b..ae9c0c484 100644--- a/scripts/guard-invariants.mjs+++ b/scripts/guard-invariants.mjs@@ -139,7 +139,7 @@* rule 52 — The tracing library in `packages/tracing/src/` imports only* itself and external packages. eve reaches it only through the* vendored root, delegation, otel, and ai-sdk entrypoints under- * `#compiled/@eve/tracing/`, never the workspace package itself.+ * `#compiled/@vercel/agent-runs/`, never the workspace package itself.** Baselines for rules with pre-existing violations live in* `guard-invariants-baseline.json`. Counts and allowlists in that file@@ -322,8 +322,10 @@ async function scanRepo(state) {if (posix.startsWith("packages/eve/")) {lines.forEach((line, index) => {const privateImport =- /['"]#compiled\/@eve\/tracing\/(?!(?:index|delegation|otel|ai-sdk)\.js['"])/.test(line) ||- /(?:from\s+|import\s*\()['"]@eve\/tracing(?:\/[^'"]*)?['"]/.test(line) ||+ /['"]#compiled\/@vercel\/agent-runs\/(?!(?:index|delegation|otel|ai-sdk)\.js['"])/.test(+ line,+ ) ||+ /(?:from\s+|import\s*\()['"]@vercel\/agent-runs(?:\/[^'"]*)?['"]/.test(line) ||[...line.matchAll(/(?:from\s+|import\s*\()(["'])([^"']+)\1/g)].some((match) =>match[2].startsWith(".") &&@@ -337,7 +339,7 @@ async function scanRepo(state) {file: posix,line: index + 1,message:- "Import the tracing library from #compiled/@eve/tracing/{index,delegation,otel,ai-sdk}.js, not the workspace package or its private modules.",+ "Import the tracing library from #compiled/@vercel/agent-runs/{index,delegation,otel,ai-sdk}.js, not the workspace package or its private modules.",});});}