Skip to content

refactor(api)!: curate public exports and own authoring types - #4954

Draft
OwenKephart wants to merge 17 commits into
api-cleanup/command-deliveriesfrom
api-cleanup/public-surface
Draft

OwenKephart wants to merge 17 commits into
api-cleanup/command-deliveriesfrom
api-cleanup/public-surface

Conversation

@OwenKephart

@OwenKephart OwenKephart commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Public entries mix authoring APIs with framework plumbing, duplicate imports, and types controlled by the app's AI SDK peer. Curate those entries and give history and sandbox contracts eve-owned definitions. Keep useful named authoring types, factory return types, and disabled-marker guards instead of replacing them with inline-type workarounds. The checker-generated inventory falls from 2,003 to 1,504 exported names, a reduction of 499.

Stacked on #4937 → #4933 → #4932 → #4855, using the v27 base ab927ad6f. Related to #4930. This is the base assembled-stack checkpoint; the follow-up cleanup stack owns the final checkpoint. Intermediate PRs are not claimed green.

Production code: 133 fewer lines (+2,358/−2,491). Removes legacy setup/export wrappers and migrations while adding eve-owned history/sandbox contracts and explicit public exports; some churn is internal code relocation. Excludes tests/fixtures, generated copies, docs, and tooling.

Behavior and scope

  • Event/view types have their canonical home at eve/events; session context/history at eve/context; assertion and tool-stub types at eve/evals.
  • Platform entries retain factories, credentials, handles, payloads, and authoring types. Internal API wrappers, rendering/verification plumbing, and constants leave public entries, with the agreed Slack/Linear/Chat SDK exceptions.
  • HistoryMessage, sandbox sessions/results/processes, and all eight sandbox method-option types are eve-owned. Judge, mock-model, approval request/response, and disabled-marker vocabulary stays public.
  • Connection auth uses principalType and AuthorizationDefinition. Retired credentialOwner input fails with migration guidance instead of silently selecting app credentials.
  • Channels share ChannelCors, including a single origin string. Public handles read with stream(); private HTTP framing stays internal. Child following is followAgents.
  • Remove public setup wizard entries, move Agent Builder's five scaffold values to eve/internal/scaffold, and require explicit local/remote self-modification mounts. Retired scaffold setup fails without deleting authored files.
  • Evals use native call tables instead of toolCallsOf; shared-output references still resolve through callOutputSource. Remaining fixture migrations are completed.

The export inventory is committed before the shrinking diff and enforced by pnpm guard:invariants. It tracks names, not structural compatibility. Seven pre-existing spread-ternary violations in the relocated auth owner were removed; that baseline only shrinks.

Capability finalization

Consolidates only unpublished preview epochs into one final epoch per changed capability. Changed tool, dynamic-tool, channel, schedule, connection, and hook contracts require rebuilt extensions. State's additive history type uses a new epoch with a retained authoring fixture. Published reports and compatibility fixtures remain unchanged; the final guard passes without suppression.

Remote protocols 1–3 and the supported unnamed remote-delivery fallback are preserved. No new tool/hook command authority is introduced. Migration documentation and a breaking-change changeset are included.

Validation

  • 538 focused unit tests / 36 files passed in 6.25 seconds. 28 route cases rerun and passed after removing the leftover create-response status field.
  • 14 filtered integration cases / 4 files passed in 48.38 seconds: approval lifecycle/rechecks, real idle/stale cancellation receipts, invocation outcome projection, and retired-layout rejection.
  • All 59 workspace typecheck tasks passed; package declaration emission passed.
  • pnpm guard:invariants, docs validation (105 pages), targeted lint, formatting, and diff checks passed.
  • The export guard rejected a temporary unlisted export, then passed after restoration.
  • Owner regressions were demonstrated failing before repair: empty delivery replacement with hidden context, resolver identity, spread-wrapped keyed consent, retired credential ownership, legacy layout rejection, and the create receipt's obsolete status field.
  • No full integration/scenario tier or e2e run locally. Fixture-owned e2e validation runs in CI.

CI follow-through

The initial assembled e2e run exposed stale fixture option IDs/reset receipts and a real relayed-answer lifetime defect. The runtime repair now consumes structured answers into their asking turn, so the answer delivery stays open through resumed workflow work. It preserves typed-answer behavior and the existing awaited response semantics; temporary fixture workarounds were removed.

The owning real-workflow regression distinguishes button and typed answers at the delivery settlement boundary. 13 filtered approval/workflow cases pass after the repair (19.34 seconds). Frozen context spreads and separate module copies now share private keyed-approval evaluation; all 59 workspace typechecks and the invariant guard pass after these follow-ups. No new epoch snapshots were needed for these runtime-only repairs.

A second owner regression covers detached task-wait answers: direct interaction ownership omits the turn, so the active turn’s explicit waiting set now supplies attribution. The existing real parent/child test fails with early applied before the fix and passes with handled and the completed waiting turn afterward (22.55 seconds). An eval transport regression also verifies that another turn’s pause cannot end a queued delivery reader.

The initial-delivery admission owner also dropped authenticated creator identity. Its regression fails before restoring the validated serialized auth on the delivery; the owner’s nine tests and real child-approval case pass after repair. 78 focused follow-up unit tests pass on the latest head (5.74 seconds).

Authenticated workflow answers exposed another boundary defect: the control validator expected full auth fields instead of the minimal principal. The existing real-workflow rows stall before repair and both complete after repair; all four hook-cancellation cases pass (29.90 seconds). Remote creation and control readers now accept actual delivery receipts while preserving earlier peer acknowledgements and session-ID validation. 62 focused units / four files pass (4.26 seconds).

A relayed partial approval also remained unread after its asker admitted it. The strengthened waiting owner fails before repair and passes afterward, allowing the delivery to settle as awaiting input for the remaining approval. 33 waiting/projection units pass (0.34 seconds), along with two targeted real-session cases (22.69 seconds). All 59 workspace typecheck tasks pass again (67.05 seconds).

The remaining remote nested-approval failure exposed eval cursor loss. Evals now read all intervening session facts while ending on the exact delivery receipt, and retain earlier open interactions in their views. The transport-level lifecycle regression fails with missing questions before repair; 33 focused eval/client units pass afterward (1.56 seconds). All 59 workspace typechecks pass again (54.09 seconds), as does the invariant guard.

The cursor correction also preserves delivery-scoped event assertions: catch-up facts update the session view without appearing in the delivery's event slice. 33 focused eval/client units pass (1.46 seconds), all 59 workspace typechecks pass (70.02 seconds), and the invariant guard passes on 4e4d983c2.

E2E confirmation on 4e4d983c2: Local, Postgres, and Vercel workflows completed successfully. The live Anthropic deferred-tool cache test initially measured 92.85% reuse against its 98% threshold; its single targeted job rerun passed without code or threshold changes. GitHub still displays the Postgres changes job as pending despite its success conclusion, completion timestamp, and completed steps; the enclosing workflow succeeded.

Restack onto ab927ad6f at 5e34d2069: the v27 follow-up commits in #4564, #4567, #4574, and #4726 now sit below this stack, and its 17 commits are unchanged. Each restacked tree equals its earlier tree plus those follow-ups. Compared with 4e4d983c2, the package typechecks with 0 errors, and src/protocol, src/harness, and src/execution unit tests show the same 3 failures. The scoped integration suites (execution/session, session and tool execution, harness, subagents, runtime) also show the same 3 failures. The invariant guard and pnpm docs:check pass. The E2E confirmation above is for 4e4d983c2; the E2E workflows are rerunning on 5e34d2069.

Research audit follow-up

Restacked onto the updated #4937 session contracts. Corrected stale credentialOwner and ConnectionAuthProvider documentation, removed orphan verifier-option exports, and fixed the scenario import of isChannel. The assembled eve package typecheck and invariant guard pass after refreshing export names and unpublished capability hashes. All docs checks passed for the fixups. The complete prior workspace/e2e results above apply to their recorded commits, not this latest head. Further ownership and naming work stacks above this PR, beginning with #5000; the final cleanup checkpoint moves to the top of that follow-up stack.

Review follow-through

Preserved status: "accepted" only on delegated create responses for supported remote readers; browser receipts remain status-free. Three protocol rows fail before repair and pass afterward. All 71 focused route, remote-reader, and discovery tests pass, along with the package typecheck, docs checks, and invariant guard. Stream examples now encode bounded event-NDJSON and validate the first read before sending headers. The self-modification fake package and migration guide now match the explicit entry.

Checklist

  • I added tests and documentation where relevant
  • I added a changeset if this touches the published eve package
  • DCO sign-off passes for every commit (git commit --signoff)

@vercel

vercel Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
eve-docs Ready Ready Preview, v0 Oct 18, 2026 1:46am UTC
eve-pkg Ready Ready Preview, v0 Oct 18, 2026 1:46am UTC

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Bundle + Package Summary: apps/fixtures/weather-agent

Key takeaways

  • No notable deltas vs api-cleanup/command-deliveries (be09043).

Delta vs api-cleanup/command-deliveries (be09043)

Area Metric Baseline Current Delta
Package Packed tarball 7.67 MB 7.67 MB +463 B ⚠️
Package Unpacked publish size 26.96 MB 26.94 MB -24.7 kB ✅
Package Installed footprint 75.10 MB 75.08 MB -24.7 kB ✅
Package Published files 4262 4264 +2
Package Installed files 8273 8275 +2
Package Installed package instances 34 34 0
Package Distinct installed package names 32 32 0
Package Installed dependency edges 51 51 0
Package Installed optional peer edges 9 9 0
Runtime Unique function payloads 2 2 0
Runtime Total function bytes 21.04 MB 21.03 MB -13.2 kB ✅
Runtime Public routes 17 17 0
Changed function payloads vs api-cleanup/command-deliveries (be09043) (2)
Function Status Baseline Current Delta Route changes
functions/__server.func changed 10.52 MB 10.52 MB -6.6 kB ✅ none
functions/.well-known/workflow/v1/flow.func changed 10.52 MB 10.52 MB -6.6 kB ✅ none

eve init install

Metric Baseline Current Delta
Installed footprint 113.48 MB 113.46 MB -24.7 kB ✅
Installed packages 97 97 0
dependencies 4 4 0
devDependencies 2 2 0
Dependency package bytes 45.24 MB 45.21 MB -24.7 kB ✅
devDependency package bytes 5.11 MB 5.11 MB 0 B ➖
Build Metadata
  • Preset: vercel
  • Nitro: nitro@3.0.260903-beta
  • Output directory: apps/fixtures/weather-agent/.vercel/output
  • Build metadata timestamp: 2026-10-18T01:47:06.468Z
  • Route aliases: 17 public, 1 internal (18 total aliases)
  • Vercel routes in config: 20
  • Severity legend: 🔴 dominant/large, 🟠 notable, 🟡 watch, ⚪ small
Package Drill-Down

Package Details

  • Package: eve@0.79.2
  • Package directory: packages/eve
  • Tarball: 7.67 MB (eve-0.79.2.tgz)
  • Unpacked payload: 26.94 MB across 4264 published files
  • Installed footprint: 75.08 MB across 8275 installed files
  • Installed root package: 26.94 MB
  • Installed dependencies: 48.14 MB
  • Installed package instances: 34
  • Distinct installed package names: 32
  • Installed dependency edges: 51
  • Installed optional peer edges: 9
  • Runtime dependencies: 2
  • Peer dependencies: 7 (6 optional)

Installed footprint is measured from an isolated temporary npm install of the packed tarball.
Graph metrics read only package.json files in package directories directly beneath a node_modules boundary, including nested boundaries. Each directory is one package instance; distinct names come from those manifests. Dependency edges count each unique name in dependencies or optionalDependencies per instance; optional peer edges count peerDependencies marked optional.

Heavy installed dependencies

  • eve: 26.94 MB (35.9%)
  • @rolldown/binding-linux-x64-gnu: 19.81 MB (26.4%)
  • ai: 8.24 MB (11.0%)
  • zod: 6.15 MB (8.2%)
  • undici: 3.58 MB (4.8%)
Publish payload breakdown
Published file size
🟠 dist/src/compiled/shadcn-registry/index.js       [#####...................] 3.85 MB 14.3%
🟠 dist/src/compiled/@photon-ai/chat-adapter-ime... [###.....................] 2.29 MB 8.5%
🟠 dist/src/compiled/@ai-sdk/code-mode/index.js     [#.......................] 1.03 MB 3.8%
🟡 dist/src/compiled/@vercel/blob/index.js          [#.......................] 604.9 kB 2.2%
🟡 dist/src/compiled/_chunks/workflow/undici-D-I... [#.......................] 521.9 kB 1.9%
🔴 Other published files                            [########################] 18.65 MB 69.2%
Installed footprint breakdown
Installed package size
🔴 eve                             [########################] 26.94 MB 35.9%
🔴 @rolldown/binding-linux-x64-gnu [##################......] 19.81 MB 26.4%
🔴 ai                              [#######.................] 8.24 MB 11.0%
🔴 zod                             [#####...................] 6.15 MB 8.2%
🟠 undici                          [###.....................] 3.58 MB 4.8%
🟠 nitro                           [##......................] 1.89 MB 2.5%
🔴 Other installed packages        [########................] 8.46 MB 11.3%
Runtime dependencies (2)
Package Range Notes
nitro 3.0.260903-beta
undici 8.10.2
Peer dependencies (7)
Package Range Notes
@opentelemetry/api ^1.0.0 optional peer
ai catalog:
braintrust ^3.0.0 optional peer
chat ^4.42.0 optional peer
dd-trace ^6.13.0 optional peer
just-bash ^3.1.0 optional peer
microsandbox ^0.5.0 optional peer
eve init install drill-down

eve init install details

  • Command: eve init my-agent
  • Package manager: npm
  • Installed footprint: 113.46 MB across 10192 installed files
  • Installed packages: 97 total (91 transitive-only)
  • dependencies: 4 direct packages totaling 45.21 MB
  • devDependencies: 2 direct packages totaling 5.11 MB
  • Other transitive package files: 63.14 MB

Installed footprint is measured from an isolated temporary eve init my-agent using the current packed eve tarball.

Heavy installed dependencies

  • @typescript/typescript-linux-x64: 27.95 MB (24.6%)
  • eve: 26.94 MB (23.7%)
  • @rolldown/binding-linux-x64-gnu: 19.81 MB (17.5%)
  • zod: 9.76 MB (8.6%)
  • ai: 8.24 MB (7.3%)
Installed footprint breakdown
Installed package size
🔴 @typescript/typescript-linux-x64 [########################] 27.95 MB 24.6%
🔴 eve                              [#######################.] 26.94 MB 23.7%
🔴 @rolldown/binding-linux-x64-gnu  [#################.......] 19.81 MB 17.5%
🔴 zod                              [########................] 9.76 MB 8.6%
🔴 ai                               [#######.................] 8.24 MB 7.3%
🟠 undici                           [###.....................] 3.58 MB 3.2%
🔴 Other installed packages         [###############.........] 17.19 MB 15.1%
dependencies (4)
Package Range Installed size Share
@vercel/connect 2.5.2 276.3 kB 0.2%
ai ^7.0.137 8.24 MB 7.3%
eve file:eve-0.79.2.tgz 26.94 MB 23.7%
zod 4.5.4 9.76 MB 8.6%
devDependencies (2)
Package Range Installed size Share
@types/node 24.x 2.61 MB 2.3%
typescript 7.0.2 2.50 MB 2.2%
Function Drill-Down

Payload Size Graph

Unique function payload size and share of total
🔴 functions/.well-known/workflow/v1/flow.func     [########################] 10.52 MB 50.0%
🔴 functions/__server.func                         [########################] 10.52 MB 50.0%

Top Function Payloads

🟠 functions/.well-known/workflow/v1/flow.func • 1 public route • 10.52 MB
Metric Value
Public routes /.well-known/workflow/v1/flow
Runtime nodejs24.x
Handler index.mjs
Payload 10.52 MB
Function files 10.52 MB across 126 files
Traced dependencies 0 B
Signal 🟠 Bundled file _chunks/vercel.web.mjs is 2.48 MB (23.6%)

🟠 🔎 Dependency Analysis

📦 Bundled files:

Bundled file size
🟠 _chunks/vercel.web.mjs                         [############............] 2.48 MB 23.6%
🟠 _libs/undici.mjs                               [#####...................] 1.01 MB 9.6%
🟡 _chunks/sandbox3.mjs                           [####....................] 815.4 kB 7.8%
🟡 _chunks/compiled-artifacts-instrumentation.mjs [####....................] 732.7 kB 7.0%
🟡 _chunks/token-util-Bla5Z0G9.mjs                [####....................] 704.7 kB 6.7%
🔴 Other bundled files                            [########################] 4.78 MB 45.4%

🧾 Vercel Config

{
  "handler": "index.mjs",
  "launcherType": "Nodejs",
  "shouldAddHelpers": false,
  "supportsResponseStreaming": true,
  "runtime": "nodejs24.x",
  "maxDuration": "max",
  "experimentalTriggers": [
    {
      "type": "queue/v2beta",
      "topic": "__eve776561746865722d6167656e74_wkf_workflow_*",
      "consumer": "default",
      "retryAfterSeconds": 5,
      "initialDelaySeconds": 0
    }
  ],
  "environment": {
    "WORKFLOW_PRECONDITION_GUARD": "1"
  }
}

🟠 functions/__server.func • 16 public routes, 1 internal alias • 10.52 MB
Metric Value
Public routes /
/.well-known/workflow/v1/webhook/[token]
/eve/v1/callback/[token]
/eve/v1/connections/[name]/callback/[attemptId]/[token]
/eve/v1/connections/[name]/callback/[token]
/eve/v1/health
/eve/v1/info
/eve/v1/session
/eve/v1/session/[parentSessionId]/subagents/[callId]/[childSessionId]/stream
/eve/v1/session/[sessionId]
/eve/v1/session/[sessionId]/cancel
/eve/v1/session/[sessionId]/clear
/eve/v1/session/[sessionId]/compact
/eve/v1/session/[sessionId]/reset
/eve/v1/session/[sessionId]/stream
/eve/v1/session/[sessionId]/stubs
Internal aliases /__server
Runtime nodejs24.x
Handler index.mjs
Payload 10.52 MB
Function files 10.52 MB across 126 files
Traced dependencies 0 B
Signal 🟠 Bundled file _chunks/vercel.web.mjs is 2.48 MB (23.6%)

🟠 🔎 Dependency Analysis

📦 Bundled files:

Bundled file size
🟠 _chunks/vercel.web.mjs                         [############............] 2.48 MB 23.6%
🟠 _libs/undici.mjs                               [#####...................] 1.01 MB 9.6%
🟡 _chunks/sandbox3.mjs                           [####....................] 815.4 kB 7.8%
🟡 _chunks/compiled-artifacts-instrumentation.mjs [####....................] 732.7 kB 7.0%
🟡 _chunks/token-util-Bla5Z0G9.mjs                [####....................] 704.7 kB 6.7%
🔴 Other bundled files                            [########################] 4.78 MB 45.4%

🧾 Vercel Config

{
  "handler": "index.mjs",
  "launcherType": "Nodejs",
  "shouldAddHelpers": false,
  "supportsResponseStreaming": true,
  "runtime": "nodejs24.x"
}

Build Timing: e2e/fixtures/agent-tools-sandbox

This is an informational timing measurement inside eve build, from preflight through publication. Output-size measurement and profile writing are excluded.

Build mode: deployable Vercel build with sandbox template prewarm included.

  • Build pipeline: 2.88 s -> 2.92 s (+45.2 ms) vs api-cleanup/command-deliveries (be09043).
  • Timing is informational: shared GitHub runners are too variable for a hard timing budget.
Detailed phase timings vs `api-cleanup/command-deliveries (be09043)`
Phase Baseline Current Delta
extension.check 0.3 ms 0.3 ms 0.0 ms
project.resolve 0.2 ms 0.2 ms 0.0 ms
workspace.create 0.4 ms 0.4 ms 0.0 ms
host.prepare 569.0 ms 575.7 ms +6.7 ms
vercel.service-prefix.resolve 1.3 ms 1.3 ms 0.0 ms
nitro.create 503.0 ms 509.9 ms +6.9 ms
sandbox.prewarm 310.5 ms 274.1 ms -36.4 ms
nitro.cache.prepare 0.2 ms 0.2 ms 0.0 ms
nitro.prepare 0.5 ms 0.6 ms +0.1 ms
nitro.public-assets 0.6 ms 0.6 ms 0.0 ms
nitro.prerender 0.4 ms 0.4 ms 0.0 ms
nitro.bundle 1.35 s 1.41 s +56.7 ms
nitro.cache.write 0.3 ms 0.2 ms -0.1 ms
vercel.workflow-function.materialize 79.4 ms 69.4 ms -10.0 ms
agent-summary.emit 0.5 ms 0.5 ms 0.0 ms
connect-manifest.emit 0.3 ms 0.3 ms 0.0 ms
nitro.close 0.1 ms 0.1 ms 0.0 ms
output.publish 2.7 ms 2.7 ms 0.0 ms
workspace.remove 1.9 ms 2.0 ms +0.1 ms

status: "accepted";
deliveryId?: string;
} = { ok: true, sessionId, status: "accepted" };
} = { ok: true, sessionId };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

High: remote delegation now rejects every create receipt. This drops status: "accepted", and the same body is served to delegated creates (line ~396). The calling side still requires it: CreateSessionResponseSchema in packages/eve/src/execution/agent-sessions/remote.ts:51-56 has status: z.literal("accepted"), and startRemoteAgentSession turns a failed parse into a FatalError ("create-session response was invalid ... Do not retry automatically"). So the remote child gets created, but the parent fails the call and loses the child's coordinates. Older deployed callers on protocols 1-3 hit the same thing, and the protocol version didn't change, which conflicts with "Remote protocols 1–3 ... are preserved."

Suggested fix: keep status: "accepted" on the wire, at least for protocol-versioned/delegated creates. Or loosen the caller schema and keep emitting status until no supported caller requires it. A remote-create route test that parses the body with CreateSessionResponseSchema would catch this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored the legacy accepted acknowledgement specifically for delegated creates. Three supported-protocol rows fail before repair and pass afterward; browser/client receipts remain status-free. All 71 focused route, reader, and discovery cases pass.


if (hasCredentialOwner && hasPrincipalType) {
return `The "${fieldName}" field must not provide both "credentialOwner" and "principalType".`;
if ("credentialOwner" in auth) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Medium: the published connection docs still teach the input this now rejects. credentialOwner now fails validation, but users still copy it from these docs:

  • docs/connections/overview.mdx:96,104,114-120,162,181,267: the main guide says credentialOwner is the field for getToken-only auth and calls principalType deprecated
  • docs/connections/mcp.mdx:140, docs/connections/openapi.mdx:21,109
  • docs/guides/dynamic-capabilities.md:182
  • docs/patterns/multi-tenant-auth.md:94,110-112, which also imports ConnectionAuthProvider, now removed from eve/connections
  • the JSDoc on auth in packages/eve/src/public/definitions/connections/mcp.ts:67 and openapi.ts:70 ("Defaults to credentialOwner: \"app\"")

Copying any of these now fails eve build. The upgrade guide is the only page that has moved to principalType. Please update these to principalType / AuthorizationDefinition in this PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the connection guides, dynamic/multi-tenant examples, and definition JSDoc to principalType and AuthorizationDefinition. The retired-field warning remains explicit.

Comment thread packages/eve/src/channel/session.ts Outdated
* the current tail without inspecting or changing the session.
*/
stream(options?: GetEventStreamOptions): AsyncIterable<SessionStreamEvent>;
getEventStream(options?: GetEventStreamOptions): Promise<ReadableStream<SessionStreamEvent>>;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Medium: the docs still use the handle method this removes. docs/channels/custom.mdx:48 streams a route with attachSession(params.sessionId).getEventStream(), and :164-169 documents getEventStream({ startIndex }) / getEventStream({ follow: false }) on Session. After this change the public handle only has stream(), which returns an AsyncIterable rather than a ReadableStream, so the route example breaks both at the type level and at runtime. Please move those examples to stream(). The route example also needs explicit NDJSON encoding now that it can't hand a ReadableStream to Response.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Migrated to stream(), explicit UTF-8 event-NDJSON encoding, pull-based backpressure, cancellation, and an awaited first read before response headers. The example is marked as a custom transport, not the built-in client wire endpoint.

Comment thread packages/eve/package.json
"import": "./dist/src/public/local-dev.js",
"default": "./dist/src/public/local-dev.js"
},
"./self-modification": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Medium: the self-modification guide still says this export works. docs/guides/self-modification.md:42 says: "Mounts that import eve/self-modification still work; that specifier is an alias for eve/self-modification/local." This PR removes both the ./self-modification package export and its builtInExtensions key, so that import no longer resolves. Please swap that sentence for migration guidance: the bare entry is gone, mount /local or /remote.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The guide now states that the bare entry is removed and directs consumers to the explicit local or remote mount.

files: {
[`${agentRoot}/extensions/selfmod.ts`]:
'export { default } from "eve/self-modification";\n',
'export { default } from "eve/self-modification/local";\n',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test now imports eve/self-modification/local, but the fake package below still registers only builtInExtensions["./self-modification"] (line 31) and expects specifier: "eve/self-modification" (line 51). Discovery looks up the built-in by the imported subpath: parseBuiltInExtensionPackageRoots(pkg.eve?.builtInExtensions, packageSpecifierSubpath(specifier)) in extensions.ts:313-316, then an exact key lookup in extension-package-contract.ts:38. The lookup misses, so result.diagnostics won't be empty. The fixture key should be ./self-modification/local and the expected specifier eve/self-modification/local, matching the real package.json. (I couldn't run it here because the worktree has no node_modules; the trace comes from reading the code.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected the fixture key and expected explicit specifier. Discovery tests pass. The later naming PR separately moves both to the extensions/ prefix.

@vercel vercel Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Suggestions:

  1. Remote agent delegation rejects every create receipt because CreateSessionResponseSchema still requires a status: "accepted" field that the eve-channel create response no longer emits.
  1. Unit test uses a stale builtInExtensions key and expected specifier that no longer match the import subpath, causing the test to fail in CI
  1. Published docs/channels/custom.mdx documents Session.getEventStream(), a method removed from the public Session interface in this PR.
  1. The self-modification guide (line 42) wrongly claims the bare eve/self-modification import still works as an alias for eve/self-modification/local, but that specifier was removed from package exports and built-in extensions, so such mounts no longer resolve.

Fix on Vercel

@OwenKephart
OwenKephart force-pushed the api-cleanup/public-surface branch from 4e4d983 to 5e34d20 Compare October 16, 2026 20:10
OwenKephart added a commit that referenced this pull request Oct 17, 2026
… gaps

Extend the pre-1.0 cleanup plan with findings from an audit of the assembled #4954 surface:
types that resolve to packages an app may not have, the AI SDK's experimental decision API in
stable signatures, remaining same-name collisions, extension and wire-framing internals,
deprecated aliases, one channel and principal vocabulary, naming conventions, importable
authoring types, and the checks that keep the surface from drifting. Refresh the counts with
measurements at #4954.

Signed-off-by: owenkephart <owen.kephart@vercel.com>
vercel Bot and others added 16 commits October 17, 2026 22:27
Signed-off-by: OwenKephart <owen.kephart@vercel.com>

Co-Authored-By: owenkephart <owen.kephart@vercel.com>
Signed-off-by: OwenKephart <owen.kephart@vercel.com>

Co-Authored-By: owenkephart <owen.kephart@vercel.com>
Signed-off-by: OwenKephart <owen.kephart@vercel.com>

Co-Authored-By: owenkephart <owen.kephart@vercel.com>
Signed-off-by: OwenKephart <owen.kephart@vercel.com>

Co-Authored-By: owenkephart <owen.kephart@vercel.com>
Incorporates the runtime repair and regression from 79259e5.

Co-authored-by: OwenKephart <owen.kephart@vercel.com>

Signed-off-by: OwenKephart <owen.kephart@vercel.com>
…daries

Signed-off-by: OwenKephart <owen.kephart@vercel.com>

Co-Authored-By: owenkephart <owen.kephart@vercel.com>
Signed-off-by: OwenKephart <owen.kephart@vercel.com>

Co-Authored-By: owenkephart <owen.kephart@vercel.com>
Signed-off-by: OwenKephart <owen.kephart@vercel.com>

Co-Authored-By: owenkephart <owen.kephart@vercel.com>
Signed-off-by: OwenKephart <owen.kephart@vercel.com>

Co-Authored-By: owenkephart <owen.kephart@vercel.com>
Signed-off-by: OwenKephart <owen.kephart@vercel.com>

Co-Authored-By: owenkephart <owen.kephart@vercel.com>
Signed-off-by: OwenKephart <owen.kephart@vercel.com>

Co-Authored-By: owenkephart <owen.kephart@vercel.com>
Signed-off-by: OwenKephart <owen.kephart@vercel.com>

Co-Authored-By: owenkephart <owen.kephart@vercel.com>
Signed-off-by: OwenKephart <owen.kephart@vercel.com>

Co-Authored-By: owenkephart <owen.kephart@vercel.com>
Signed-off-by: OwenKephart <owen.kephart@vercel.com>

Co-Authored-By: owenkephart <owen.kephart@vercel.com>
Signed-off-by: owenkephart <owen.kephart@vercel.com>

Co-Authored-By: owenkephart <owen.kephart@vercel.com>
Signed-off-by: owenkephart <owen.kephart@vercel.com>

Co-Authored-By: owenkephart <owen.kephart@vercel.com>
Signed-off-by: owenkephart <owen.kephart@vercel.com>

Co-Authored-By: owenkephart <owen.kephart@vercel.com>

This branch was successfully deployed

2 active deployments
Preview – eve-pkg — 7484f515 Deployed Oct 18, 2026 by vercel[bot]
Preview – eve-docs — 7484f515 Deployed Oct 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant