eve 0.66.3 → 0.67.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/src/channel/channel-address.d.ts +0 -2
  3. package/dist/src/channel/channel-address.js +1 -1
  4. package/dist/src/channel/channel-operations.d.ts +0 -5
  5. package/dist/src/channel/channel-operations.js +1 -1
  6. package/dist/src/channel/compiled-channel.d.ts +8 -0
  7. package/dist/src/channel/compiled-channel.js +2 -2
  8. package/dist/src/channel/conversation-context.js +1 -1
  9. package/dist/src/channel/routes.d.ts +1 -2
  10. package/dist/src/channel/schedule.d.ts +2 -2
  11. package/dist/src/channel/schedule.js +1 -1
  12. package/dist/src/channel/types.d.ts +8 -13
  13. package/dist/src/chunks/{use-eve-agent-PbSMyJ6e.js → use-eve-agent-DzdyI97Z.js} +0 -5
  14. package/dist/src/chunks/{use-eve-agent-Di1u2zKu.js → use-eve-agent-OCHP4s0z.js} +0 -5
  15. package/dist/src/cli/acp/command.js +3 -3
  16. package/dist/src/cli/commands/logs.d.ts +3 -3
  17. package/dist/src/cli/commands/logs.js +1 -1
  18. package/dist/src/cli/commands/register-integration-commands.js +1 -1
  19. package/dist/src/cli/commands/trace.js +1 -1
  20. package/dist/src/cli/dev/command.d.ts +9 -5
  21. package/dist/src/cli/dev/command.js +1 -3
  22. package/dist/src/cli/dev/run-interactive-ui.d.ts +0 -1
  23. package/dist/src/cli/dev/run-interactive-ui.js +1 -1
  24. package/dist/src/cli/dev/tui/blocks.js +1 -1
  25. package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
  26. package/dist/src/cli/dev/tui/question-panel.d.ts +4 -4
  27. package/dist/src/cli/dev/tui/question-panel.js +1 -1
  28. package/dist/src/cli/dev/tui/runner.js +2 -2
  29. package/dist/src/cli/dev/tui/terminal-renderer.js +8 -9
  30. package/dist/src/cli/dev/tui/theme.d.ts +1 -1
  31. package/dist/src/cli/dev/url-target.js +1 -1
  32. package/dist/src/cli/invoke/command.d.ts +2 -5
  33. package/dist/src/cli/invoke/command.js +1 -1
  34. package/dist/src/cli/invoke/invoke.d.ts +2 -2
  35. package/dist/src/cli/invoke/invoke.js +1 -1
  36. package/dist/src/cli/invoke/result.d.ts +14 -194
  37. package/dist/src/cli/invoke/result.js +1 -1
  38. package/dist/src/cli/run.d.ts +0 -4
  39. package/dist/src/cli/run.js +2 -2
  40. package/dist/src/cli/telemetry/index.js +1 -1
  41. package/dist/src/client/message-reducer.js +1 -1
  42. package/dist/src/compiled/.vendor-stamp.json +1 -1
  43. package/dist/src/compiler/compile-from-memory.d.ts +0 -1
  44. package/dist/src/compiler/compile-from-memory.js +1 -1
  45. package/dist/src/compiler/extension-compatibility.d.ts +25 -18
  46. package/dist/src/compiler/extension-compatibility.js +1 -1
  47. package/dist/src/compiler/manifest.d.ts +48 -14
  48. package/dist/src/compiler/manifest.js +1 -1
  49. package/dist/src/compiler/normalize-agent-config.js +1 -1
  50. package/dist/src/compiler/normalize-channel.js +1 -1
  51. package/dist/src/compiler/normalize-connection.js +1 -1
  52. package/dist/src/compiler/normalize-manifest-helpers.js +1 -1
  53. package/dist/src/compiler/normalize-subagent.d.ts +0 -2
  54. package/dist/src/compiler/normalize-subagent.js +1 -1
  55. package/dist/src/compiler/remote-agent-node.d.ts +0 -2
  56. package/dist/src/compiler/remote-agent-node.js +1 -1
  57. package/dist/src/compiler/workspace-resources.js +1 -1
  58. package/dist/src/context/dynamic-subagent-lifecycle.js +1 -1
  59. package/dist/src/context/keys.d.ts +0 -3
  60. package/dist/src/context/keys.js +1 -1
  61. package/dist/src/context/memory-lifecycle.d.ts +1 -0
  62. package/dist/src/context/memory-lifecycle.js +1 -1
  63. package/dist/src/discover/project.js +1 -1
  64. package/dist/src/eve-channel/create-request.d.ts +0 -3
  65. package/dist/src/eve-channel/create-request.js +1 -1
  66. package/dist/src/eve-channel/index.js +1 -1
  67. package/dist/src/eve-channel/request.js +1 -1
  68. package/dist/src/eve-channel/types.d.ts +1 -1
  69. package/dist/src/execution/delegated-session-context.d.ts +2 -0
  70. package/dist/src/execution/delegated-session-context.js +1 -0
  71. package/dist/src/execution/dynamic-connections.d.ts +4 -1
  72. package/dist/src/execution/dynamic-connections.js +1 -1
  73. package/dist/src/execution/dynamic-workflow/tool.js +1 -1
  74. package/dist/src/execution/effective-agent-config.js +1 -1
  75. package/dist/src/execution/legacy-session/input.d.ts +0 -2
  76. package/dist/src/execution/legacy-session/input.js +1 -1
  77. package/dist/src/execution/legacy-session/prepare-step.d.ts +0 -1
  78. package/dist/src/execution/legacy-session/turn-workflow.js +1 -1
  79. package/dist/src/execution/node-step.d.ts +4 -2
  80. package/dist/src/execution/node-step.js +1 -1
  81. package/dist/src/execution/proxied-deliver-step.js +1 -1
  82. package/dist/src/execution/publish-channel-event.d.ts +23 -0
  83. package/dist/src/execution/publish-channel-event.js +1 -0
  84. package/dist/src/execution/runtime-context.js +1 -1
  85. package/dist/src/execution/session/entry.js +1 -1
  86. package/dist/src/execution/session/event-sink.d.ts +1 -1
  87. package/dist/src/execution/session/event-sink.js +1 -1
  88. package/dist/src/execution/session/finalization.d.ts +1 -4
  89. package/dist/src/execution/session/finalization.js +1 -1
  90. package/dist/src/execution/session/handoff.d.ts +1 -3
  91. package/dist/src/execution/session/handoff.js +1 -1
  92. package/dist/src/execution/session/input-queue.d.ts +0 -1
  93. package/dist/src/execution/session/input-queue.js +1 -1
  94. package/dist/src/execution/session/next-input.d.ts +0 -1
  95. package/dist/src/execution/session/next-input.js +1 -1
  96. package/dist/src/execution/session/program.d.ts +0 -3
  97. package/dist/src/execution/session/program.js +1 -1
  98. package/dist/src/execution/session/turn-step-result.d.ts +1 -2
  99. package/dist/src/execution/session/turn-step-result.js +1 -1
  100. package/dist/src/execution/session/turn-step.js +1 -1
  101. package/dist/src/execution/session/turn.d.ts +2 -2
  102. package/dist/src/execution/session/turn.js +1 -1
  103. package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
  104. package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +1 -1
  105. package/dist/src/execution/tools/agent-router-workflow.js +1 -1
  106. package/dist/src/execution/tools/agent-router.d.ts +0 -2
  107. package/dist/src/execution/tools/agent-router.js +1 -1
  108. package/dist/src/execution/tools/ask-question-workflow.js +1 -1
  109. package/dist/src/execution/tools/connection-search.d.ts +1 -0
  110. package/dist/src/execution/tools/connection-search.js +1 -1
  111. package/dist/src/execution/tools/sleep-workflow.js +1 -1
  112. package/dist/src/execution/tools/subagent/invoke-preparation.js +1 -1
  113. package/dist/src/extensions/code/extension/lib/connect-authentication.js +1 -1
  114. package/dist/src/extensions/code/extension/lib/github-shell.js +1 -1
  115. package/dist/src/extensions/code/extension/lib/prwatch-github.js +1 -1
  116. package/dist/src/framework/sources/registry.js +1 -1
  117. package/dist/src/harness/approval-delivery-coordinator.d.ts +3 -13
  118. package/dist/src/harness/approval-delivery-coordinator.js +1 -1
  119. package/dist/src/harness/emission.d.ts +2 -3
  120. package/dist/src/harness/emission.js +1 -1
  121. package/dist/src/harness/input-request-resolution.d.ts +2 -0
  122. package/dist/src/harness/input-request-resolution.js +1 -1
  123. package/dist/src/harness/input-requests.d.ts +3 -3
  124. package/dist/src/harness/input-requests.js +1 -1
  125. package/dist/src/harness/pending-input-batches.d.ts +3 -3
  126. package/dist/src/harness/pending-input-batches.js +1 -1
  127. package/dist/src/harness/proxy-input-requests.d.ts +2 -0
  128. package/dist/src/harness/proxy-input-requests.js +1 -1
  129. package/dist/src/harness/session-limit-enforcement.d.ts +2 -3
  130. package/dist/src/harness/session-limit-enforcement.js +1 -1
  131. package/dist/src/harness/tool-loop.js +2 -2
  132. package/dist/src/harness/tools.js +1 -1
  133. package/dist/src/harness/types.d.ts +11 -13
  134. package/dist/src/instrumentation/session-context.js +1 -1
  135. package/dist/src/instrumentation/session-init.js +1 -1
  136. package/dist/src/internal/application/package.js +1 -1
  137. package/dist/src/internal/authored-definition/core.js +1 -1
  138. package/dist/src/internal/authored-module-loader.js +1 -2
  139. package/dist/src/internal/authored-package-boundary.d.ts +0 -1
  140. package/dist/src/internal/authored-package-boundary.js +1 -1
  141. package/dist/src/internal/authored-relative-extension-resolver.js +1 -1
  142. package/dist/src/internal/external-resources-snapshot.d.ts +46 -0
  143. package/dist/src/internal/external-resources-snapshot.js +1 -0
  144. package/dist/src/internal/external-resources.d.ts +20 -0
  145. package/dist/src/internal/external-resources.js +1 -0
  146. package/dist/src/internal/invocation/workflow-execution.d.ts +0 -2
  147. package/dist/src/internal/invocation/workflow-execution.js +1 -1
  148. package/dist/src/internal/nitro/host/build-application.js +1 -1
  149. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  150. package/dist/src/internal/nitro/host/instrumentation-entry.d.ts +3 -0
  151. package/dist/src/internal/nitro/host/instrumentation-entry.js +2 -0
  152. package/dist/src/internal/nitro/host/start-development-server.d.ts +0 -8
  153. package/dist/src/internal/nitro/host/start-development-server.js +2 -2
  154. package/dist/src/internal/nitro/host.d.ts +1 -1
  155. package/dist/src/internal/nitro/host.js +1 -1
  156. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
  157. package/dist/src/internal/nitro/routes/index.js +72 -3
  158. package/dist/src/node_modules/.pnpm/{@vercel_cli-config@0.2.7 → @vercel_cli-config@0.3.0}/node_modules/@vercel/cli-config/dist/index.js +1 -1
  159. package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff → @vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494}/node_modules/@vercel/connect/dist/authorization.js +1 -1
  160. package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/connector.js +1 -0
  161. package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff → @vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494}/node_modules/@vercel/connect/dist/installation.js +1 -1
  162. package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff → @vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494}/node_modules/@vercel/connect/dist/token.js +1 -1
  163. package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/token-util.js +1 -1
  164. package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/token.js +1 -1
  165. package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/version.js +1 -1
  166. package/dist/src/protocol/message.d.ts +4 -0
  167. package/dist/src/protocol/message.js +1 -1
  168. package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +0 -1
  169. package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +1 -1
  170. package/dist/src/public/channels/mcp.js +1 -1
  171. package/dist/src/public/channels/slack/app-manifest.d.ts +9 -0
  172. package/dist/src/public/channels/slack/app-manifest.js +1 -0
  173. package/dist/src/public/channels/slack/inbound-content.js +6 -3
  174. package/dist/src/public/channels/slack/slackChannel.d.ts +4 -1
  175. package/dist/src/public/channels/slack/slackChannel.js +1 -1
  176. package/dist/src/public/definitions/remote-agent.d.ts +0 -9
  177. package/dist/src/public/definitions/workspace-agent.d.ts +0 -3
  178. package/dist/src/public/definitions/workspace-agent.js +1 -1
  179. package/dist/src/runtime/agent/bootstrap.d.ts +0 -1
  180. package/dist/src/runtime/agent/bootstrap.js +1 -1
  181. package/dist/src/runtime/connections/mcp-client.js +1 -1
  182. package/dist/src/runtime/connections/mcp-tracing.d.ts +27 -0
  183. package/dist/src/runtime/connections/mcp-tracing.js +1 -0
  184. package/dist/src/runtime/resolve-agent-graph.js +1 -1
  185. package/dist/src/runtime/resolve-agent.js +1 -1
  186. package/dist/src/runtime/subagents/dynamic-agent-config.d.ts +0 -2
  187. package/dist/src/runtime/subagents/dynamic-agent-config.js +1 -1
  188. package/dist/src/runtime/subagents/dynamic-remote-agent-config.d.ts +0 -2
  189. package/dist/src/runtime/subagents/dynamic-remote-agent-config.js +1 -1
  190. package/dist/src/runtime/types.d.ts +1 -2
  191. package/dist/src/services/dev-client/vercel-auth-error.d.ts +1 -1
  192. package/dist/src/setup/scaffold/create/project.js +1 -1
  193. package/dist/src/setup/verified-remote-agent.d.ts +1 -0
  194. package/dist/src/setup/verified-remote-agent.js +1 -1
  195. package/dist/src/shared/action-types.d.ts +2 -2
  196. package/dist/src/shared/agent-definition.d.ts +0 -9
  197. package/dist/src/shared/agent-turn-outcome.d.ts +1 -1
  198. package/dist/src/shared/channel-definition.d.ts +2 -2
  199. package/dist/src/shared/conversation-context.d.ts +0 -4
  200. package/dist/src/shared/conversation-context.js +1 -1
  201. package/dist/src/shared/validate-authorization.js +1 -1
  202. package/dist/src/shared/vercel-connect-metadata.d.ts +12 -0
  203. package/dist/src/shared/vercel-connect-metadata.js +1 -0
  204. package/dist/src/subagents/agent-handle-errors.d.ts +0 -4
  205. package/dist/src/subagents/agent-handle-errors.js +1 -1
  206. package/dist/src/subagents/callback-route.js +1 -1
  207. package/dist/src/subagents/callback-step.d.ts +0 -22
  208. package/dist/src/subagents/callback-step.js +1 -1
  209. package/dist/src/subagents/event-proxy-step.js +1 -1
  210. package/dist/src/subagents/hitl-proxy.d.ts +3 -5
  211. package/dist/src/subagents/hitl-proxy.js +1 -1
  212. package/dist/src/subagents/invocation.d.ts +5 -6
  213. package/dist/src/subagents/parent-notification.d.ts +1 -18
  214. package/dist/src/subagents/parent-notification.js +1 -1
  215. package/dist/src/subagents/remote-dispatch.js +1 -1
  216. package/dist/src/subagents/tool.d.ts +0 -3
  217. package/dist/src/subagents/tool.js +1 -1
  218. package/dist/src/svelte/index.js +1 -1
  219. package/dist/src/svelte/use-eve-agent.js +1 -1
  220. package/dist/src/tools/framework/agent-contract.d.ts +0 -2
  221. package/dist/src/tools/framework/agent-contract.js +1 -1
  222. package/dist/src/tracing/agent-action-instrumentation.js +1 -1
  223. package/dist/src/tracing/agent-approval-instrumentation.js +1 -1
  224. package/dist/src/tracing/agent-memory-instrumentation.js +1 -1
  225. package/dist/src/tracing/agent-otel-provider.js +2 -2
  226. package/dist/src/tracing/agent-otel-session-context.js +1 -1
  227. package/dist/src/tracing/agent-tool-instrumentation.js +1 -1
  228. package/dist/src/tracing/agent-tool-span-context.d.ts +15 -0
  229. package/dist/src/tracing/agent-tool-span-context.js +1 -0
  230. package/dist/src/tracing/otel-declaration.d.ts +4 -9
  231. package/dist/src/vue/index.js +1 -1
  232. package/dist/src/vue/use-eve-agent.js +1 -1
  233. package/docs/agent-config.md +12 -13
  234. package/docs/channels/chat-sdk.mdx +1 -1
  235. package/docs/channels/custom.mdx +1 -1
  236. package/docs/channels/eve.mdx +4 -4
  237. package/docs/channels/mcp.mdx +10 -10
  238. package/docs/channels/slack.mdx +1 -1
  239. package/docs/concepts/sessions-runs-and-streaming.md +5 -6
  240. package/docs/connections/overview.mdx +22 -0
  241. package/docs/guides/deployment/overview.md +1 -1
  242. package/docs/guides/deployment/self-hosting.md +1 -1
  243. package/docs/guides/deployment/vercel.mdx +2 -2
  244. package/docs/guides/dev-tui.md +6 -6
  245. package/docs/guides/dynamic-capabilities.md +2 -2
  246. package/docs/guides/frontend/overview.mdx +5 -3
  247. package/docs/guides/hooks.md +4 -2
  248. package/docs/guides/instrumentation/agent-runs.mdx +7 -7
  249. package/docs/guides/instrumentation/instrumentation.mdx +22 -5
  250. package/docs/guides/instrumentation/otel.mdx +30 -0
  251. package/docs/guides/remote-agents.md +3 -4
  252. package/docs/guides/self-modification.md +1 -1
  253. package/docs/memory/custom-provider.md +1 -1
  254. package/docs/protocols/acp.md +1 -1
  255. package/docs/reference/cli.md +91 -97
  256. package/docs/schedules.mdx +4 -5
  257. package/docs/subagents/index.mdx +5 -7
  258. package/docs/tools/human-in-the-loop.md +4 -0
  259. package/docs/tools/overview.mdx +2 -0
  260. package/docs/tools/workflows.mdx +1 -1
  261. package/docs/tutorial/remember-definitions.mdx +1 -1
  262. package/docs/tutorial/ship-it.mdx +1 -1
  263. package/package.json +3 -2
  264. package/dist/src/cli/commands/channels.d.ts +0 -9
  265. package/dist/src/cli/commands/channels.js +0 -1
  266. package/dist/src/execution/effective-output-schema.d.ts +0 -22
  267. package/dist/src/execution/effective-output-schema.js +0 -1
  268. package/dist/src/node_modules/.pnpm/@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff/node_modules/@vercel/connect/dist/connector.js +0 -1
  269. package/dist/src/shared/run-mode.d.ts +0 -7
  270. package/dist/src/shared/run-mode.js +0 -1
  271. package/dist/src/subagents/parent-result.d.ts +0 -14
  272. package/dist/src/subagents/parent-result.js +0 -1
  273. /package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff → @vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494}/node_modules/@vercel/connect/dist/index.js +0 -0
  274. /package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff → @vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494}/node_modules/@vercel/connect/dist/internal/base-url.js +0 -0
  275. /package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff → @vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494}/node_modules/@vercel/connect/dist/internal/default-scopes.js +0 -0
  276. /package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff → @vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494}/node_modules/@vercel/connect/dist/internal/env.js +0 -0
  277. /package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff → @vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494}/node_modules/@vercel/connect/dist/internal/url-validation.js +0 -0
  278. /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/auth-errors.js +0 -0
  279. /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/exchange-vercel-oidc-token.js +0 -0
  280. /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/get-context.js +0 -0
  281. /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-sync.js +0 -0
  282. /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-with-refresh.js +0 -0
  283. /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/index.js +0 -0
  284. /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/oauth.js +0 -0
  285. /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/token-error.js +0 -0
  286. /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/token-io.js +0 -0
  287. /package/dist/src/node_modules/.pnpm/{@vercel_oidc@3.8.8 → @vercel_oidc@3.8.9}/node_modules/@vercel/oidc/dist/verify-vercel-oidc-token.js +0 -0
@@ -1 +1 @@
1
- import{readFile,writeFile}from"node:fs/promises";import{z}from"#compiled/zod/index.js";import{join}from"node:path";import{formatValidationError}from"#runtime/validation.js";const EXTENSION_COMPATIBILITY_MANIFEST_KIND=`eve-extension`,EXTENSION_COMPATIBILITY_MANIFEST_FORMAT_VERSION=2,EXTENSION_COMPATIBILITY_MANIFEST_FILENAME=`_manifest.json`,EXTENSION_CAPABILITY_CONTRACTS={extension:{current:1,supported:[1],dropped:{}},tool:{current:57,supported:[1,2,3,4,5,6,7,8,9,10,11,12,13,29,30,31,32,34,35,54,55,57],dropped:{14:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,15:`TaskExec replaces stageEffect with send`,16:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,17:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,18:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,19:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,20:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,21:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,22:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,23:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,24:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,25:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,26:`Background tools now use task yield descriptors`,27:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,28:`Background defineTool and TaskExec were removed; use defineWorkflowTool for durable background work.`,33:`ctx.agent now accepts the subagent name as its first argument, derives invocation identity internally, and infers structured output types`,36:`experimental_workflow and eve/tools/workflow were removed; migrate to the workflow factory from eve/tools/workflow`,37:`experimental_workflow and eve/tools/workflow were removed; migrate to the workflow factory from eve/tools/workflow`,38:`experimental_workflow and eve/tools/workflow were removed; migrate to the workflow factory from eve/tools/workflow`,39:`experimental_workflow and eve/tools/workflow were removed; migrate to the workflow factory from eve/tools/workflow`,40:`runWorkflowProgram was made internal; use the workflow factory from eve/tools/workflow`,41:`workflow no longer accepts agents and its options argument is optional; use workflow() or workflow({ maxSubagents })`,42:`Legacy session history migration was removed; user-role messages require current provenance kinds.`,43:`Legacy session history migration was removed; user-role messages require current provenance kinds.`,44:`Background defineTool and TaskExec were removed; use defineWorkflowTool for durable background work.`,45:`Background defineTool and TaskExec were removed; use defineWorkflowTool for durable background work.`,46:`Background defineTool and TaskExec were removed; use defineWorkflowTool for durable background work.`,47:`eve/experimental/evaluate was removed; import evaluate from eve/ai`,48:`eve/experimental/evaluate was removed; import evaluate from eve/ai`,49:`Background defineTool and TaskExec were removed; use defineWorkflowTool for durable background work.`,50:`Background defineTool and TaskExec were removed; use defineWorkflowTool for durable background work.`,51:`Background defineTool and TaskExec were removed; use defineWorkflowTool for durable background work.`,52:`Background defineTool and TaskExec were removed; use defineWorkflowTool for durable background work.`,53:`Sandbox sessions no longer expose core identity and mutable networking is provider-specific.`,56:`SandboxSession no longer exposes setNetworkPolicy; pass the configured environment to ctx.getSandbox(environment) to access network policy capabilities`}},dynamicTool:{current:54,supported:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,22,31,32,33,52,54],dropped:{21:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`,23:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,24:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,25:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,26:`Background tools now use task yield descriptors`,27:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,28:`Background dynamic tools were removed; use a static defineWorkflowTool for durable background work.`,29:`Background dynamic tools were removed; use a static defineWorkflowTool for durable background work.`,30:`Background dynamic tools were removed; use a static defineWorkflowTool for durable background work.`,34:`Legacy session history migration was removed; user-role messages require current provenance kinds.`,35:`workflowMaxSubagents was removed with experimental_workflow; configure generated-program limits with the workflow factory`,36:`workflowMaxSubagents was removed with experimental_workflow; configure generated-program limits with the workflow factory`,37:`workflowMaxSubagents was removed with experimental_workflow; configure generated-program limits with the workflow factory`,38:`workflowMaxSubagents was removed with experimental_workflow; configure generated-program limits with the workflow factory`,39:`Legacy session history migration was removed; user-role messages require current provenance kinds.`,40:`Legacy session history migration was removed; user-role messages require current provenance kinds.`,41:`Background dynamic tools were removed; use a static defineWorkflowTool for durable background work.`,42:`autoModel and eve/experimental/evaluate were removed; import auto from eve/models`,43:`autoModel and eve/experimental/evaluate were removed; import auto from eve/models`,44:`autoModel and eve/experimental/evaluate were removed; import auto from eve/models`,45:`autoModel and eve/experimental/evaluate were removed; import auto from eve/models`,46:`autoModel and eve/experimental/evaluate were removed; import auto from eve/models`,47:`autoModel and eve/experimental/evaluate were removed; import auto from eve/models`,48:`Background dynamic tools were removed; use a static defineWorkflowTool for durable background work.`,49:`Background dynamic tools were removed; use a static defineWorkflowTool for durable background work.`,50:`Background dynamic tools were removed; use a static defineWorkflowTool for durable background work.`,51:`Sandbox sessions no longer expose core identity and mutable networking is provider-specific.`,53:`SandboxSession no longer exposes setNetworkPolicy; pass the configured environment to ctx.getSandbox(environment) to access network policy capabilities`}},channel:{current:31,supported:[1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,29,31],dropped:{12:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`,19:`Continuation rekey was removed; channel extensions must use additive continuation.alias instead.`,20:`Continuation rekey was removed; channel extensions must use additive continuation.alias instead.`,21:`Continuation rekey was removed; channel extensions must use additive continuation.alias instead.`,22:`Continuation rekey was removed; channel extensions must use additive continuation.alias instead.`,23:`Task views no longer expose executor bindings; background work is owned by workflow runs.`,24:`Task views no longer expose executor bindings; background work is owned by workflow runs.`,25:`Task views no longer expose executor bindings; background work is owned by workflow runs.`,26:`Task views no longer expose executor bindings; background work is owned by workflow runs.`,27:`Sandbox sessions no longer expose core identity and mutable networking is provider-specific.`,28:`Sandbox sessions no longer expose core identity and mutable networking is provider-specific.`,30:`SandboxSession no longer exposes setNetworkPolicy; pass the configured environment to ctx.getSandbox(environment) to access network policy capabilities`}},schedule:{current:15,supported:[1,2,3,4,6,7,8,9,10,11,12,13,14,15],dropped:{5:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`}},subagent:{current:19,supported:[3,4,6,7,8,9,10,11,12,13,14,15,16,19],dropped:{1:`Persistent subagent sessions are now the default and the experimental opt-in was removed`,2:`Persistent subagent sessions are now the default and the experimental opt-in was removed`,5:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`,17:`Removed experimental.instrumentationProviders; instrumentation is now always enabled for root agents.`,18:`Removed experimental.instrumentationProviders; instrumentation is now always enabled for root agents.`}},connection:{current:26,supported:[1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18,19,20,21,22,24,26],dropped:{9:`Dynamic connection resolvers no longer receive conversation or channel continuation data`,10:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`,23:`Sandbox sessions no longer expose core identity and mutable networking is provider-specific.`,25:`SandboxSession no longer exposes setNetworkPolicy; pass the configured environment to ctx.getSandbox(environment) to access network policy capabilities`}},hook:{current:27,supported:[10,11,12,13,14,15,17,18,19,20,21,22,23,25,27],dropped:{1:`Model identity moved from session.started runtime metadata to step.started call attribution.`,2:`Model identity moved from session.started runtime metadata to step.started call attribution.`,3:`Model identity moved from session.started runtime metadata to step.started call attribution.`,4:`Model identity moved from session.started runtime metadata to step.started call attribution.`,5:`Model identity moved from session.started runtime metadata to step.started call attribution.`,6:`Model identity moved from session.started runtime metadata to step.started call attribution.`,7:`Model identity moved from session.started runtime metadata to step.started call attribution.`,8:`Model identity moved from session.started runtime metadata to step.started call attribution.`,9:`Model identity moved from session.started runtime metadata to step.started call attribution.`,16:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`,24:`Sandbox sessions no longer expose core identity and mutable networking is provider-specific.`,26:`SandboxSession no longer exposes setNetworkPolicy; pass the configured environment to ctx.getSandbox(environment) to access network policy capabilities`}},skill:{current:2,supported:[1,2],dropped:{}},dynamicSkill:{current:21,supported:[1,2,3,4,5,6,7,8,9,10,11,12,14,15,16,17,18,19,20,21],dropped:{13:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`}},instructions:{current:2,supported:[1,2],dropped:{}},dynamicInstructions:{current:22,supported:[1,2,3,4,5,6,7,8,9,10,11,12,13,15,16,17,18,19,20,21,22],dropped:{14:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`}},config:{current:1,supported:[1],dropped:{}},state:{current:9,supported:[1,2,3,4,5,7,9],dropped:{6:`Sandbox sessions no longer expose core identity and mutable networking is provider-specific.`,8:`SandboxSession no longer exposes setNetworkPolicy; pass the configured environment to ctx.getSandbox(environment) to access network policy capabilities`}}},EXTENSION_CAPABILITY_VERSIONS=Object.fromEntries(Object.entries(EXTENSION_CAPABILITY_CONTRACTS).map(([e,t])=>[e,t.current])),EXTENSION_CAPABILITY_SUPPORT=Object.keys(EXTENSION_CAPABILITY_CONTRACTS).reduce((e,t)=>(e[t]=EXTENSION_CAPABILITY_CONTRACTS[t].supported,e),{}),extensionCompatibilityManifestV1Schema=z.object({kind:z.literal(EXTENSION_COMPATIBILITY_MANIFEST_KIND),formatVersion:z.literal(1),builtWithEve:z.string().min(1),requires:z.record(z.string(),z.number().int().positive())}).strict(),extensionCompatibilityManifestV2Schema=extensionCompatibilityManifestV1Schema.extend({formatVersion:z.literal(2),build:z.object({externalDependencies:z.array(z.string().min(1)).readonly()}).strict().optional()}),extensionCompatibilityManifestSchema=z.union([extensionCompatibilityManifestV1Schema,extensionCompatibilityManifestV2Schema]);function serializeExtensionCompatibilityManifest(e){return`${JSON.stringify(e,null,2)}\n`}function parseExtensionCompatibilityManifest(e,t){let n;try{n=JSON.parse(e)}catch(e){throw Error(`Extension compatibility manifest "${t}" is not valid JSON: ${e instanceof Error?e.message:String(e)}`)}let r=extensionCompatibilityManifestSchema.safeParse(n);if(!r.success)throw Error(`Extension compatibility manifest "${t}" is invalid. ${formatValidationError(r.error)}`);return r.data}async function readExtensionCompatibilityManifest(e){return parseExtensionCompatibilityManifest(await readFile(e,`utf8`),e)}async function writeExtensionCompatibilityManifest(e,t){await writeFile(join(e,EXTENSION_COMPATIBILITY_MANIFEST_FILENAME),serializeExtensionCompatibilityManifest(t),`utf8`)}function findUnsupportedExtensionCapabilities(e,t=EXTENSION_CAPABILITY_SUPPORT){return Object.entries(e.requires).flatMap(([e,n])=>{let r=Object.hasOwn(t,e)?t[e]??[]:[];return r.includes(n)?[]:[{capability:e,requiredVersion:n,supportedVersions:r}]}).sort((e,t)=>e.capability.localeCompare(t.capability))}export{EXTENSION_CAPABILITY_SUPPORT,EXTENSION_CAPABILITY_VERSIONS,EXTENSION_COMPATIBILITY_MANIFEST_FILENAME,EXTENSION_COMPATIBILITY_MANIFEST_FORMAT_VERSION,EXTENSION_COMPATIBILITY_MANIFEST_KIND,findUnsupportedExtensionCapabilities,parseExtensionCompatibilityManifest,readExtensionCompatibilityManifest,serializeExtensionCompatibilityManifest,writeExtensionCompatibilityManifest};
1
+ import{readFile,writeFile}from"node:fs/promises";import{z}from"#compiled/zod/index.js";import{join}from"node:path";import{formatValidationError}from"#runtime/validation.js";const EXTENSION_COMPATIBILITY_MANIFEST_KIND=`eve-extension`,EXTENSION_COMPATIBILITY_MANIFEST_FORMAT_VERSION=2,EXTENSION_COMPATIBILITY_MANIFEST_FILENAME=`_manifest.json`,EXTENSION_CAPABILITY_CONTRACTS={extension:{current:1,supported:[1],dropped:{}},tool:{current:58,supported:[1,2,3,4,5,6,7,8,9,10,11,12,13,29,30,31,32,34,35,54,55,58],dropped:{14:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,15:`TaskExec replaces stageEffect with send`,16:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,17:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,18:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,19:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,20:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,21:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,22:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,23:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,24:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,25:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,26:`Background tools now use task yield descriptors`,27:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,28:`Background defineTool and TaskExec were removed; use defineWorkflowTool for durable background work.`,33:`ctx.agent now accepts the subagent name as its first argument, derives invocation identity internally, and infers structured output types`,36:`experimental_workflow and eve/tools/workflow were removed; migrate to the workflow factory from eve/tools/workflow`,37:`experimental_workflow and eve/tools/workflow were removed; migrate to the workflow factory from eve/tools/workflow`,38:`experimental_workflow and eve/tools/workflow were removed; migrate to the workflow factory from eve/tools/workflow`,39:`experimental_workflow and eve/tools/workflow were removed; migrate to the workflow factory from eve/tools/workflow`,40:`runWorkflowProgram was made internal; use the workflow factory from eve/tools/workflow`,41:`workflow no longer accepts agents and its options argument is optional; use workflow() or workflow({ maxSubagents })`,42:`Legacy session history migration was removed; user-role messages require current provenance kinds.`,43:`Legacy session history migration was removed; user-role messages require current provenance kinds.`,44:`Background defineTool and TaskExec were removed; use defineWorkflowTool for durable background work.`,45:`Background defineTool and TaskExec were removed; use defineWorkflowTool for durable background work.`,46:`Background defineTool and TaskExec were removed; use defineWorkflowTool for durable background work.`,47:`eve/experimental/evaluate was removed; import evaluate from eve/ai`,48:`eve/experimental/evaluate was removed; import evaluate from eve/ai`,49:`Background defineTool and TaskExec were removed; use defineWorkflowTool for durable background work.`,50:`Background defineTool and TaskExec were removed; use defineWorkflowTool for durable background work.`,51:`Background defineTool and TaskExec were removed; use defineWorkflowTool for durable background work.`,52:`Background defineTool and TaskExec were removed; use defineWorkflowTool for durable background work.`,53:`Sandbox sessions no longer expose core identity and mutable networking is provider-specific.`,56:`SandboxSession no longer exposes setNetworkPolicy; pass the configured environment to ctx.getSandbox(environment) to access network policy capabilities`,57:`agentRouter() no longer accepts a model-facing outputSchema; structured subagent output is requested only through ctx.agent().`}},dynamicTool:{current:56,supported:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,22,31,32,33,52,54,56],dropped:{21:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`,23:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,24:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,25:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,26:`Background tools now use task yield descriptors`,27:`TaskExec.delegated was removed; migrate to workflow-backed background tools`,28:`Background dynamic tools were removed; use a static defineWorkflowTool for durable background work.`,29:`Background dynamic tools were removed; use a static defineWorkflowTool for durable background work.`,30:`Background dynamic tools were removed; use a static defineWorkflowTool for durable background work.`,34:`Legacy session history migration was removed; user-role messages require current provenance kinds.`,35:`workflowMaxSubagents was removed with experimental_workflow; configure generated-program limits with the workflow factory`,36:`workflowMaxSubagents was removed with experimental_workflow; configure generated-program limits with the workflow factory`,37:`workflowMaxSubagents was removed with experimental_workflow; configure generated-program limits with the workflow factory`,38:`workflowMaxSubagents was removed with experimental_workflow; configure generated-program limits with the workflow factory`,39:`Legacy session history migration was removed; user-role messages require current provenance kinds.`,40:`Legacy session history migration was removed; user-role messages require current provenance kinds.`,41:`Background dynamic tools were removed; use a static defineWorkflowTool for durable background work.`,42:`autoModel and eve/experimental/evaluate were removed; import auto from eve/models`,43:`autoModel and eve/experimental/evaluate were removed; import auto from eve/models`,44:`autoModel and eve/experimental/evaluate were removed; import auto from eve/models`,45:`autoModel and eve/experimental/evaluate were removed; import auto from eve/models`,46:`autoModel and eve/experimental/evaluate were removed; import auto from eve/models`,47:`autoModel and eve/experimental/evaluate were removed; import auto from eve/models`,48:`Background dynamic tools were removed; use a static defineWorkflowTool for durable background work.`,49:`Background dynamic tools were removed; use a static defineWorkflowTool for durable background work.`,50:`Background dynamic tools were removed; use a static defineWorkflowTool for durable background work.`,51:`Sandbox sessions no longer expose core identity and mutable networking is provider-specific.`,53:`SandboxSession no longer exposes setNetworkPolicy; pass the configured environment to ctx.getSandbox(environment) to access network policy capabilities`,55:`Run mode was removed; sessions always park and ConversationContext no longer carries mode.`}},channel:{current:33,supported:[1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,29,31,33],dropped:{12:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`,19:`Continuation rekey was removed; channel extensions must use additive continuation.alias instead.`,20:`Continuation rekey was removed; channel extensions must use additive continuation.alias instead.`,21:`Continuation rekey was removed; channel extensions must use additive continuation.alias instead.`,22:`Continuation rekey was removed; channel extensions must use additive continuation.alias instead.`,23:`Task views no longer expose executor bindings; background work is owned by workflow runs.`,24:`Task views no longer expose executor bindings; background work is owned by workflow runs.`,25:`Task views no longer expose executor bindings; background work is owned by workflow runs.`,26:`Task views no longer expose executor bindings; background work is owned by workflow runs.`,27:`Sandbox sessions no longer expose core identity and mutable networking is provider-specific.`,28:`Sandbox sessions no longer expose core identity and mutable networking is provider-specific.`,30:`SandboxSession no longer exposes setNetworkPolicy; pass the configured environment to ctx.getSandbox(environment) to access network policy capabilities`,32:`Run mode and caller-supplied output schemas were removed from channel operations; sessions always park, and send options, audience inputs, and ConversationContext no longer carry mode, while from().send() and from().respond() no longer accept outputSchema.`}},schedule:{current:16,supported:[1,2,3,4,6,7,8,9,10,11,12,13,14,15,16],dropped:{5:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`}},subagent:{current:21,supported:[3,4,6,7,8,9,10,11,12,13,14,15,16,19,21],dropped:{1:`Persistent subagent sessions are now the default and the experimental opt-in was removed`,2:`Persistent subagent sessions are now the default and the experimental opt-in was removed`,5:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`,17:`Removed experimental.instrumentationProviders; instrumentation is now always enabled for root agents.`,18:`Removed experimental.instrumentationProviders; instrumentation is now always enabled for root agents.`,20:`Run mode was removed and agent definitions no longer declare outputSchema; sessions always park, ConversationContext no longer carries mode, and structured output is requested per turn.`}},connection:{current:28,supported:[1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18,19,20,21,22,24,26,28],dropped:{9:`Dynamic connection resolvers no longer receive conversation or channel continuation data`,10:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`,23:`Sandbox sessions no longer expose core identity and mutable networking is provider-specific.`,25:`SandboxSession no longer exposes setNetworkPolicy; pass the configured environment to ctx.getSandbox(environment) to access network policy capabilities`,27:`Run mode was removed; sessions always park and ConversationContext no longer carries mode.`}},hook:{current:28,supported:[10,11,12,13,14,15,17,18,19,20,21,22,23,25,27,28],dropped:{1:`Model identity moved from session.started runtime metadata to step.started call attribution.`,2:`Model identity moved from session.started runtime metadata to step.started call attribution.`,3:`Model identity moved from session.started runtime metadata to step.started call attribution.`,4:`Model identity moved from session.started runtime metadata to step.started call attribution.`,5:`Model identity moved from session.started runtime metadata to step.started call attribution.`,6:`Model identity moved from session.started runtime metadata to step.started call attribution.`,7:`Model identity moved from session.started runtime metadata to step.started call attribution.`,8:`Model identity moved from session.started runtime metadata to step.started call attribution.`,9:`Model identity moved from session.started runtime metadata to step.started call attribution.`,16:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`,24:`Sandbox sessions no longer expose core identity and mutable networking is provider-specific.`,26:`SandboxSession no longer exposes setNetworkPolicy; pass the configured environment to ctx.getSandbox(environment) to access network policy capabilities`}},skill:{current:2,supported:[1,2],dropped:{}},dynamicSkill:{current:23,supported:[1,2,3,4,5,6,7,8,9,10,11,12,14,15,16,17,18,19,20,21,23],dropped:{13:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`,22:`Run mode was removed; sessions always park and ConversationContext no longer carries mode.`}},instructions:{current:2,supported:[1,2],dropped:{}},dynamicInstructions:{current:24,supported:[1,2,3,4,5,6,7,8,9,10,11,12,13,15,16,17,18,19,20,21,22,24],dropped:{14:`Message and reasoning append events now expose deltas instead of cumulative snapshots.`,23:`Run mode was removed; sessions always park and ConversationContext no longer carries mode.`}},config:{current:1,supported:[1],dropped:{}},state:{current:9,supported:[1,2,3,4,5,7,9],dropped:{6:`Sandbox sessions no longer expose core identity and mutable networking is provider-specific.`,8:`SandboxSession no longer exposes setNetworkPolicy; pass the configured environment to ctx.getSandbox(environment) to access network policy capabilities`}}},EXTENSION_CAPABILITY_VERSIONS=Object.fromEntries(Object.entries(EXTENSION_CAPABILITY_CONTRACTS).map(([e,t])=>[e,t.current])),EXTENSION_CAPABILITY_SUPPORT=Object.keys(EXTENSION_CAPABILITY_CONTRACTS).reduce((e,t)=>(e[t]=EXTENSION_CAPABILITY_CONTRACTS[t].supported,e),{}),extensionCompatibilityManifestV1Schema=z.object({kind:z.literal(EXTENSION_COMPATIBILITY_MANIFEST_KIND),formatVersion:z.literal(1),builtWithEve:z.string().min(1),requires:z.record(z.string(),z.number().int().positive())}).strict(),extensionCompatibilityManifestV2Schema=extensionCompatibilityManifestV1Schema.extend({formatVersion:z.literal(2),build:z.object({externalDependencies:z.array(z.string().min(1)).readonly()}).strict().optional()}),extensionCompatibilityManifestSchema=z.union([extensionCompatibilityManifestV1Schema,extensionCompatibilityManifestV2Schema]);function serializeExtensionCompatibilityManifest(e){return`${JSON.stringify(e,null,2)}\n`}function parseExtensionCompatibilityManifest(e,t){let n;try{n=JSON.parse(e)}catch(e){throw Error(`Extension compatibility manifest "${t}" is not valid JSON: ${e instanceof Error?e.message:String(e)}`)}let r=extensionCompatibilityManifestSchema.safeParse(n);if(!r.success)throw Error(`Extension compatibility manifest "${t}" is invalid. ${formatValidationError(r.error)}`);return r.data}async function readExtensionCompatibilityManifest(e){return parseExtensionCompatibilityManifest(await readFile(e,`utf8`),e)}async function writeExtensionCompatibilityManifest(e,t){await writeFile(join(e,EXTENSION_COMPATIBILITY_MANIFEST_FILENAME),serializeExtensionCompatibilityManifest(t),`utf8`)}function findUnsupportedExtensionCapabilities(e,t=EXTENSION_CAPABILITY_SUPPORT){return Object.entries(e.requires).flatMap(([e,n])=>{let r=Object.hasOwn(t,e)?t[e]??[]:[];return r.includes(n)?[]:[{capability:e,requiredVersion:n,supportedVersions:r}]}).sort((e,t)=>e.capability.localeCompare(t.capability))}export{EXTENSION_CAPABILITY_SUPPORT,EXTENSION_CAPABILITY_VERSIONS,EXTENSION_COMPATIBILITY_MANIFEST_FILENAME,EXTENSION_COMPATIBILITY_MANIFEST_FORMAT_VERSION,EXTENSION_COMPATIBILITY_MANIFEST_KIND,findUnsupportedExtensionCapabilities,parseExtensionCompatibilityManifest,readExtensionCompatibilityManifest,serializeExtensionCompatibilityManifest,writeExtensionCompatibilityManifest};
@@ -4,10 +4,12 @@ import { type CompiledDynamicSubagentDefinition, type CompiledRemoteAgentNode }
4
4
  import type { ChannelRouteMethod } from "#public/definitions/channel.js";
5
5
  import type { NormalizedChannelCorsOptions } from "#channel/cors.js";
6
6
  import type { InternalInstructionsDefinition } from "#shared/instructions-definition.js";
7
+ import type { JsonObject } from "#shared/json.js";
7
8
  import type { Node } from "#shared/node.js";
8
9
  import type { MarkdownSourceRef, ModuleSourceRef, SkillPackageSourceRef } from "#shared/source-ref.js";
9
10
  import type { NamedSkillDefinition } from "#shared/skill-definition.js";
10
11
  import { type InternalAgentDefinition, type InternalAgentModelDefinition, type InternalAgentCompactionDefinition, type ModelRouting } from "#shared/agent-definition.js";
12
+ import type { VercelConnectMetadata } from "#shared/vercel-connect-metadata.js";
11
13
  import type { InternalToolDefinition } from "#tools/definition.js";
12
14
  import type { CompiledToolBehavior } from "#tools/behavior.js";
13
15
  import type { AgentSourceComposition, AgentSourceDescriptor, AgentSourceOwner, CompiledModuleBinding } from "#compiler/source-graph.js";
@@ -22,7 +24,7 @@ export declare const ROOT_COMPILED_AGENT_NODE_ID = "__root__";
22
24
  /**
23
25
  * Current compiled manifest schema version.
24
26
  */
25
- export declare const COMPILED_AGENT_MANIFEST_VERSION = 51;
27
+ export declare const COMPILED_AGENT_MANIFEST_VERSION = 52;
26
28
  /**
27
29
  * Compiled channel entry preserved in the compiled manifest.
28
30
  */
@@ -54,6 +56,8 @@ export interface CompiledChannelDefinition {
54
56
  * channel leaves CORS untouched.
55
57
  */
56
58
  readonly cors?: NormalizedChannelCorsOptions;
59
+ readonly manifest?: JsonObject;
60
+ readonly vercelConnect?: VercelConnectMetadata;
57
61
  }
58
62
  /**
59
63
  * Disabled compiled channel entry — marker that an authored file at this
@@ -316,6 +320,15 @@ declare const compiledConnectionDefinitionSchema: z.ZodObject<{
316
320
  url: z.ZodString;
317
321
  vercelConnect: z.ZodOptional<z.ZodObject<{
318
322
  connector: z.ZodString;
323
+ requirement: z.ZodOptional<z.ZodObject<{
324
+ method: z.ZodOptional<z.ZodString>;
325
+ reference: z.ZodString;
326
+ service: z.ZodString;
327
+ subjectTypes: z.ZodReadonly<z.ZodArray<z.ZodEnum<{
328
+ app: "app";
329
+ user: "user";
330
+ }>>>;
331
+ }, z.core.$strict>>;
319
332
  }, z.core.$strict>>;
320
333
  }, z.core.$strict>;
321
334
  declare const compiledAgentResourcesSchema: z.ZodObject<{
@@ -337,6 +350,15 @@ declare const compiledAgentResourcesSchema: z.ZodObject<{
337
350
  url: z.ZodString;
338
351
  vercelConnect: z.ZodOptional<z.ZodObject<{
339
352
  connector: z.ZodString;
353
+ requirement: z.ZodOptional<z.ZodObject<{
354
+ method: z.ZodOptional<z.ZodString>;
355
+ reference: z.ZodString;
356
+ service: z.ZodString;
357
+ subjectTypes: z.ZodReadonly<z.ZodArray<z.ZodEnum<{
358
+ app: "app";
359
+ user: "user";
360
+ }>>>;
361
+ }, z.core.$strict>>;
340
362
  }, z.core.$strict>>;
341
363
  }, z.core.$strict>>;
342
364
  dynamicConnections: z.ZodDefault<z.ZodArray<z.ZodType<CompiledDynamicConnectionDefinition, unknown, z.core.$ZodTypeInternals<CompiledDynamicConnectionDefinition, unknown>>>>;
@@ -396,7 +418,6 @@ declare const compiledAgentResourcesSchema: z.ZodObject<{
396
418
  name: string;
397
419
  owner: AgentSourceOwner;
398
420
  parentNodeId: string;
399
- outputSchema?: import("../shared/json.ts").JsonObject;
400
421
  path: string;
401
422
  rootPath: string;
402
423
  tool?: boolean;
@@ -412,7 +433,6 @@ declare const compiledAgentResourcesSchema: z.ZodObject<{
412
433
  name: string;
413
434
  owner: AgentSourceOwner;
414
435
  parentNodeId: string;
415
- outputSchema?: import("../shared/json.ts").JsonObject;
416
436
  path: string;
417
437
  rootPath: string;
418
438
  tool?: boolean;
@@ -428,10 +448,10 @@ declare const compiledAgentResourcesSchema: z.ZodObject<{
428
448
  exportName: z.ZodOptional<z.ZodString>;
429
449
  hasExecute: z.ZodBoolean;
430
450
  hasModelOutputProjection: z.ZodBoolean;
431
- inputSchema: z.ZodNullable<z.ZodType<import("../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../shared/json.ts").JsonObject, unknown>>>;
451
+ inputSchema: z.ZodNullable<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
432
452
  logicalPath: z.ZodString;
433
453
  name: z.ZodString;
434
- outputSchema: z.ZodOptional<z.ZodType<import("../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../shared/json.ts").JsonObject, unknown>>>;
454
+ outputSchema: z.ZodOptional<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
435
455
  requiresApproval: z.ZodBoolean;
436
456
  sourceId: z.ZodString;
437
457
  sourceKind: z.ZodLiteral<"module">;
@@ -464,6 +484,15 @@ declare const compiledAgentNodeManifestSchema: z.ZodObject<{
464
484
  url: z.ZodString;
465
485
  vercelConnect: z.ZodOptional<z.ZodObject<{
466
486
  connector: z.ZodString;
487
+ requirement: z.ZodOptional<z.ZodObject<{
488
+ method: z.ZodOptional<z.ZodString>;
489
+ reference: z.ZodString;
490
+ service: z.ZodString;
491
+ subjectTypes: z.ZodReadonly<z.ZodArray<z.ZodEnum<{
492
+ app: "app";
493
+ user: "user";
494
+ }>>>;
495
+ }, z.core.$strict>>;
467
496
  }, z.core.$strict>>;
468
497
  }, z.core.$strict>>;
469
498
  dynamicConnections: z.ZodDefault<z.ZodArray<z.ZodType<CompiledDynamicConnectionDefinition, unknown, z.core.$ZodTypeInternals<CompiledDynamicConnectionDefinition, unknown>>>>;
@@ -523,7 +552,6 @@ declare const compiledAgentNodeManifestSchema: z.ZodObject<{
523
552
  name: string;
524
553
  owner: AgentSourceOwner;
525
554
  parentNodeId: string;
526
- outputSchema?: import("../shared/json.ts").JsonObject;
527
555
  path: string;
528
556
  rootPath: string;
529
557
  tool?: boolean;
@@ -539,7 +567,6 @@ declare const compiledAgentNodeManifestSchema: z.ZodObject<{
539
567
  name: string;
540
568
  owner: AgentSourceOwner;
541
569
  parentNodeId: string;
542
- outputSchema?: import("../shared/json.ts").JsonObject;
543
570
  path: string;
544
571
  rootPath: string;
545
572
  tool?: boolean;
@@ -555,10 +582,10 @@ declare const compiledAgentNodeManifestSchema: z.ZodObject<{
555
582
  exportName: z.ZodOptional<z.ZodString>;
556
583
  hasExecute: z.ZodBoolean;
557
584
  hasModelOutputProjection: z.ZodBoolean;
558
- inputSchema: z.ZodNullable<z.ZodType<import("../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../shared/json.ts").JsonObject, unknown>>>;
585
+ inputSchema: z.ZodNullable<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
559
586
  logicalPath: z.ZodString;
560
587
  name: z.ZodString;
561
- outputSchema: z.ZodOptional<z.ZodType<import("../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../shared/json.ts").JsonObject, unknown>>>;
588
+ outputSchema: z.ZodOptional<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
562
589
  requiresApproval: z.ZodBoolean;
563
590
  sourceId: z.ZodString;
564
591
  sourceKind: z.ZodLiteral<"module">;
@@ -623,6 +650,15 @@ export declare const compiledAgentManifestSchema: z.ZodObject<{
623
650
  url: z.ZodString;
624
651
  vercelConnect: z.ZodOptional<z.ZodObject<{
625
652
  connector: z.ZodString;
653
+ requirement: z.ZodOptional<z.ZodObject<{
654
+ method: z.ZodOptional<z.ZodString>;
655
+ reference: z.ZodString;
656
+ service: z.ZodString;
657
+ subjectTypes: z.ZodReadonly<z.ZodArray<z.ZodEnum<{
658
+ app: "app";
659
+ user: "user";
660
+ }>>>;
661
+ }, z.core.$strict>>;
626
662
  }, z.core.$strict>>;
627
663
  }, z.core.$strict>>;
628
664
  dynamicConnections: z.ZodDefault<z.ZodArray<z.ZodType<CompiledDynamicConnectionDefinition, unknown, z.core.$ZodTypeInternals<CompiledDynamicConnectionDefinition, unknown>>>>;
@@ -648,7 +684,6 @@ export declare const compiledAgentManifestSchema: z.ZodObject<{
648
684
  name: string;
649
685
  owner: AgentSourceOwner;
650
686
  parentNodeId: string;
651
- outputSchema?: import("../shared/json.ts").JsonObject;
652
687
  path: string;
653
688
  rootPath: string;
654
689
  tool?: boolean;
@@ -664,7 +699,6 @@ export declare const compiledAgentManifestSchema: z.ZodObject<{
664
699
  name: string;
665
700
  owner: AgentSourceOwner;
666
701
  parentNodeId: string;
667
- outputSchema?: import("../shared/json.ts").JsonObject;
668
702
  path: string;
669
703
  rootPath: string;
670
704
  tool?: boolean;
@@ -715,10 +749,10 @@ export declare const compiledAgentManifestSchema: z.ZodObject<{
715
749
  exportName: z.ZodOptional<z.ZodString>;
716
750
  hasExecute: z.ZodBoolean;
717
751
  hasModelOutputProjection: z.ZodBoolean;
718
- inputSchema: z.ZodNullable<z.ZodType<import("../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../shared/json.ts").JsonObject, unknown>>>;
752
+ inputSchema: z.ZodNullable<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
719
753
  logicalPath: z.ZodString;
720
754
  name: z.ZodString;
721
- outputSchema: z.ZodOptional<z.ZodType<import("../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../shared/json.ts").JsonObject, unknown>>>;
755
+ outputSchema: z.ZodOptional<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
722
756
  requiresApproval: z.ZodBoolean;
723
757
  sourceId: z.ZodString;
724
758
  sourceKind: z.ZodLiteral<"module">;
@@ -726,7 +760,7 @@ export declare const compiledAgentManifestSchema: z.ZodObject<{
726
760
  maxSubagents: z.ZodNumber;
727
761
  }, z.core.$strict>>;
728
762
  }, z.core.$strict>>;
729
- version: z.ZodLiteral<51>;
763
+ version: z.ZodLiteral<52>;
730
764
  workspaceResourceRoot: z.ZodObject<{
731
765
  contentHash: z.ZodOptional<z.ZodString>;
732
766
  logicalPath: z.ZodString;
@@ -1 +1 @@
1
- import{z}from"#compiled/zod/index.js";import{discoverDiagnosticsSummarySchema}from"#discover/diagnostics.js";import{compiledRemoteAgentNodeSchema}from"#compiler/remote-agent-node.js";import{jsonObjectSchema}from"#shared/json-schemas.js";import{AGENT_WORKFLOW_RETENTION_VALUES}from"#shared/agent-definition.js";import{validateCompiledAgentManifest,validateCompiledAgentResources}from"#compiler/validate-artifact.js";const COMPILED_AGENT_MANIFEST_KIND=`eve-agent-compiled-manifest`,ROOT_COMPILED_AGENT_NODE_ID=`__root__`,COMPILED_AGENT_MANIFEST_VERSION=51,agentSourceOwnerSchema=z.discriminatedUnion(`kind`,[z.object({kind:z.literal(`application`)}).strict(),z.object({feature:z.string().min(1),kind:z.literal(`framework`)}).strict(),z.object({kind:z.literal(`extension`),namespace:z.string().min(1),packageName:z.string().min(1)}).strict()]),moduleSourceRefSchema=z.object({exportName:z.string().optional(),sourceKind:z.literal(`module`),logicalPath:z.string(),sourceId:z.string()}).strict(),filesystemModuleBackingSchema=z.object({externalDependencies:z.array(z.string()).readonly(),extensionScope:z.object({namespace:z.string(),sourceRoot:z.string()}).strict().optional(),kind:z.literal(`filesystem`),sourcePath:z.string()}).strict(),programmaticModuleBackingSchema=z.object({dependencies:z.record(z.string(),z.string()).readonly().optional(),kind:z.literal(`programmatic`),moduleId:z.string(),parameters:jsonObjectSchema.optional(),registryId:z.string(),revision:z.string(),semanticRevision:z.string().optional()}).strict(),resourceSourceBackingSchema=z.object({kind:z.literal(`resource`),sourcePath:z.string()}).strict(),agentModuleBackingSchema=z.discriminatedUnion(`kind`,[filesystemModuleBackingSchema,programmaticModuleBackingSchema]),compiledModuleBindingSchema=z.object({backing:agentModuleBackingSchema,logicalPath:z.string(),owner:agentSourceOwnerSchema,usage:z.object({compile:z.boolean(),runtimeEntry:z.boolean()}).strict()}).strict(),agentSourceDescriptorSchema=z.object({backing:z.discriminatedUnion(`kind`,[filesystemModuleBackingSchema,programmaticModuleBackingSchema,resourceSourceBackingSchema]),form:z.enum([`derived`,`direct`]),layer:z.enum([`framework-default`,`extension-package`,`extension-override`,`application`]),logicalPath:z.string(),owner:agentSourceOwnerSchema,sourceId:z.string()}).strict(),agentSourceCompositionSchema=z.object({entries:z.array(z.discriminatedUnion(`kind`,[z.object({kind:z.literal(`shadowed`),source:agentSourceDescriptorSchema,winnerSourceId:z.string()}).strict(),z.object({kind:z.literal(`disabled`),source:agentSourceDescriptorSchema}).strict()])).readonly()}).strict(),compiledDynamicModelDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),sourceKind:z.literal(`module`),logicalPath:z.string(),sourceId:z.string()}).strict(),channelMethodSchema=z.union([z.literal(`GET`),z.literal(`HEAD`),z.literal(`POST`),z.literal(`PUT`),z.literal(`PATCH`),z.literal(`DELETE`),z.literal(`OPTIONS`),z.literal(`WEBSOCKET`)]),compiledChannelCorsSchema=z.object({origin:z.union([z.literal(`*`),z.literal(`null`),z.array(z.string())]).optional(),methods:z.union([z.literal(`*`),z.array(z.string())]).optional(),allowHeaders:z.union([z.literal(`*`),z.array(z.string())]).optional(),exposeHeaders:z.union([z.literal(`*`),z.array(z.string())]).optional(),credentials:z.boolean().optional(),maxAge:z.union([z.string(),z.literal(!1)]).optional(),preflight:z.object({statusCode:z.number().int().min(100).max(599).optional()}).strict().optional()}).strict(),compiledChannelDefinitionSchema=z.object({kind:z.literal(`channel`),name:z.string(),logicalPath:z.string(),method:channelMethodSchema,urlPath:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`),exportName:z.string().optional(),adapterKind:z.string().optional(),cors:compiledChannelCorsSchema.optional()}).strict(),compiledChannelPreflightDefinitionSchema=z.object({cors:compiledChannelCorsSchema,method:z.literal(`OPTIONS`),sourceIds:z.array(z.string()).readonly(),urlPath:z.string()}).strict(),compiledShadowedChannelRouteSchema=z.object({method:channelMethodSchema,source:agentSourceDescriptorSchema,urlPath:z.string(),winnerSourceId:z.string()}).strict(),compiledChannelRoutePlanSchema=z.object({effective:z.array(compiledChannelDefinitionSchema).readonly(),preflight:z.array(compiledChannelPreflightDefinitionSchema).readonly(),shadowed:z.array(compiledShadowedChannelRouteSchema).readonly()}).strict(),modelRoutingSchema=z.union([z.object({kind:z.literal(`gateway`),target:z.string(),byok:z.string().optional()}).strict(),z.object({kind:z.literal(`external`),provider:z.string()}).strict()]),compiledRuntimeModelReferenceSchema=z.object({contextWindowTokens:z.number().int().positive().optional(),id:z.string(),maxOutputTokens:z.number().int().positive().optional(),source:moduleSourceRefSchema.optional(),providerOptions:z.record(z.string(),jsonObjectSchema).optional(),routing:modelRoutingSchema}).strict(),compiledAgentBuildDefinitionSchema=z.object({externalDependencies:z.array(z.string()).optional()}).strict(),compiledAgentWorkflowWorldDefinitionSchema=z.string(),compiledAgentWorkflowDefinitionSchema=z.object({modelCallsPerStep:z.number().int().positive().optional(),retention:z.literal(AGENT_WORKFLOW_RETENTION_VALUES).optional(),world:compiledAgentWorkflowWorldDefinitionSchema.optional()}).strict(),compiledAgentCompactionDefinitionSchema=z.object({model:compiledRuntimeModelReferenceSchema.optional(),thresholdPercent:z.number().finite().min(0).max(1).optional()}).strict(),sessionTokenLimitSchema=z.union([z.number().int().positive(),z.literal(!1)]),sessionTokenCostLimitSchema=z.union([z.number().finite().positive(),z.literal(!1)]),sessionTimeoutSchema=z.union([z.number().int().positive(),z.literal(!1)]),compiledAgentLimitsDefinitionSchema=z.object({maxInputTokensPerSession:sessionTokenLimitSchema.optional(),maxOutputTokensPerSession:sessionTokenLimitSchema.optional(),maxTokenCostUsdPerSession:sessionTokenCostLimitSchema.optional(),sessionTimeoutMs:sessionTimeoutSchema.optional()}).strict(),compiledAgentConfigBaseFields={build:compiledAgentBuildDefinitionSchema.optional(),compaction:compiledAgentCompactionDefinitionSchema.optional(),defaultTools:z.boolean().optional(),description:z.string().optional(),experimental:z.object({workflow:compiledAgentWorkflowDefinitionSchema.optional()}).strict().optional(),name:z.string(),outputSchema:jsonObjectSchema.optional(),reasoning:z.enum([`provider-default`,`none`,`minimal`,`low`,`medium`,`high`,`xhigh`]).optional(),source:moduleSourceRefSchema,tool:z.boolean().optional(),limits:compiledAgentLimitsDefinitionSchema.optional()},compiledAgentConfigSchema=z.union([z.object({...compiledAgentConfigBaseFields,model:compiledRuntimeModelReferenceSchema}).strict(),z.object({...compiledAgentConfigBaseFields,dynamicModel:compiledDynamicModelDefinitionSchema}).strict()]),compiledInstructionsBaseFields={content:z.string(),name:z.string(),logicalPath:z.string(),role:z.enum([`system`,`user`]),sourceId:z.string()},compiledInstructionsSchema=z.discriminatedUnion(`sourceKind`,[z.object({...compiledInstructionsBaseFields,owner:agentSourceOwnerSchema,sourceKind:z.literal(`markdown`)}).strict(),z.object({...compiledInstructionsBaseFields,sourceKind:z.literal(`module`)}).strict()]),compiledSkillBaseFields={name:z.string(),description:z.string(),license:z.string().optional(),markdown:z.string(),metadata:z.record(z.string(),z.string()).optional(),sourceId:z.string(),logicalPath:z.string()},compiledSkillSourceSchema=z.discriminatedUnion(`sourceKind`,[z.object({...compiledSkillBaseFields,owner:agentSourceOwnerSchema,sourceKind:z.literal(`markdown`)}).strict(),z.object({...compiledSkillBaseFields,sourceKind:z.literal(`module`),exportName:z.string().optional()}).strict(),z.object({...compiledSkillBaseFields,owner:agentSourceOwnerSchema,sourceKind:z.literal(`skill-package`),skillId:z.string(),skillFilePath:z.string(),rootPath:z.string(),assetsPath:z.string().optional(),referencesPath:z.string().optional(),scriptsPath:z.string().optional()}).strict()]),compiledScheduleBaseFields={cron:z.string(),hasRun:z.boolean(),name:z.string(),logicalPath:z.string(),markdown:z.string().optional(),sourceId:z.string()},compiledScheduleDefinitionSchema=z.discriminatedUnion(`sourceKind`,[z.object({...compiledScheduleBaseFields,owner:agentSourceOwnerSchema,sourceKind:z.literal(`markdown`)}).strict(),z.object({...compiledScheduleBaseFields,sourceKind:z.literal(`module`)}).strict()]),compiledSandboxDefinitionSchema=z.object({providerName:z.string().optional(),environmentExportName:z.string().optional(),inheritsParent:z.boolean().optional(),exportName:z.string().optional(),logicalPath:z.string(),revisionHash:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledSandboxWorkspaceSchema=z.object({logicalPath:z.string(),rootEntries:z.array(z.string()).readonly(),sourceId:z.string(),sourcePath:z.string()}).strict(),compiledWorkspaceResourceRootSchema=z.object({contentHash:z.string().optional(),logicalPath:z.string(),rootEntries:z.array(z.string()).readonly()}).strict(),compiledConnectionDefinitionSchema=z.object({connectionName:z.string(),description:z.string(),exportName:z.string().optional(),logicalPath:z.string(),protocol:z.enum([`mcp`,`openapi`]).default(`mcp`),sourceId:z.string(),sourceKind:z.literal(`module`),url:z.string(),vercelConnect:z.object({connector:z.string()}).strict().optional()}).strict(),compiledDynamicConnectionDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),extensionNamespace:z.string().optional(),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledToolBehaviorSchema=z.object({availability:z.array(z.enum([`delegated-task-child`,`root-session`])).readonly(),handling:z.discriminatedUnion(`kind`,[z.object({action:z.enum([`self-agent`,`task-cancel`]),kind:z.literal(`dispatch`)}).strict(),z.object({kind:z.literal(`provider-tool`),provider:z.enum([`exa`,`parallel`])}).strict(),z.object({kind:z.literal(`workflow-tool`),workflowId:z.string()}).strict()]).optional(),presentation:z.literal(`load-skill`).optional(),shape:z.object({lifetime:z.enum([`step`,`task`]),suspend:z.enum([`none`,`workflow`])}).strict().optional()}).strict(),compiledToolDefinitionSchema=z.object({availableInSubagents:z.boolean().optional(),behavior:compiledToolBehaviorSchema.optional(),description:z.string(),execution:z.literal(`background`).optional(),exportName:z.string().optional(),hasExecute:z.boolean(),hasModelOutputProjection:z.boolean(),inputSchema:jsonObjectSchema.nullable(),logicalPath:z.string(),name:z.string(),outputSchema:jsonObjectSchema.optional(),requiresApproval:z.boolean(),sourceId:z.string(),sourceKind:z.literal(`module`),workflowProgram:z.object({maxSubagents:z.number().int().positive()}).strict().optional()}).strict(),compiledDynamicToolDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),extensionNamespace:z.string().optional(),logicalPath:z.string(),rebindMissingCallbacks:z.boolean().optional(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledMemoryDefinitionSchema=z.object({description:z.string().optional(),exportName:z.string().optional(),logicalPath:z.string(),slot:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`),visibility:z.enum([`scope`,`session`])}).strict(),compiledDynamicSkillDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),extensionNamespace:z.string().optional(),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledDynamicInstructionsDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledHookDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledExtensionMountSchema=z.object({externalDependencies:z.array(z.string()).readonly(),namespace:z.string(),packageName:z.string(),packageNamespace:z.string(),sourceRoot:z.string(),mountSourceId:z.string(),mountLogicalPath:z.string()}).strict(),compiledAgentResourceFields={agentRoot:z.string(),appRoot:z.string(),bindings:z.record(z.string(),compiledModuleBindingSchema),channelRoutes:compiledChannelRoutePlanSchema,connections:z.array(compiledConnectionDefinitionSchema),dynamicConnections:z.array(compiledDynamicConnectionDefinitionSchema).default([]),diagnosticsSummary:discoverDiagnosticsSummarySchema,sourceComposition:agentSourceCompositionSchema,dynamicInstructions:z.array(compiledDynamicInstructionsDefinitionSchema).default([]),dynamicSkills:z.array(compiledDynamicSkillDefinitionSchema).default([]),dynamicTools:z.array(compiledDynamicToolDefinitionSchema).default([]),extensionMounts:z.array(compiledExtensionMountSchema).default([]),hooks:z.array(compiledHookDefinitionSchema),memories:z.array(compiledMemoryDefinitionSchema).default([]),sandbox:compiledSandboxDefinitionSchema,sandboxWorkspaces:z.array(compiledSandboxWorkspaceSchema),schedules:z.array(compiledScheduleDefinitionSchema),remoteAgents:z.array(compiledRemoteAgentNodeSchema),skills:z.array(compiledSkillSourceSchema).readonly(),instructions:z.array(compiledInstructionsSchema).readonly().default([]),tools:z.array(compiledToolDefinitionSchema),workspaceResourceRoot:compiledWorkspaceResourceRootSchema},compiledAgentResourcesSchema=z.object(compiledAgentResourceFields).strict(),compiledAgentNodeManifestSchema=z.object({...compiledAgentResourceFields,config:compiledAgentConfigSchema}).strict(),compiledSubagentNodeBaseFields={backing:resourceSourceBackingSchema,entryPath:z.string(),logicalPath:z.string(),name:z.string(),nodeId:z.string(),owner:agentSourceOwnerSchema,parentNodeId:z.string(),rootPath:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`),exportName:z.string().optional()},compiledDynamicSubagentDefinitionSchema=z.object({build:compiledAgentBuildDefinitionSchema.optional(),eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),logicalPath:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledSubagentNodeSchema=z.union([z.object({...compiledSubagentNodeBaseFields,agent:compiledAgentNodeManifestSchema,description:z.string()}).strict(),z.object({...compiledSubagentNodeBaseFields,agent:compiledAgentResourcesSchema,configResolver:compiledDynamicSubagentDefinitionSchema}).strict()]),compiledAgentManifestSchema=z.object({agentRoot:z.string(),appRoot:z.string(),bindings:z.record(z.string(),compiledModuleBindingSchema),extensionMounts:z.array(compiledExtensionMountSchema).default([]),channelRoutes:compiledChannelRoutePlanSchema,config:compiledAgentConfigSchema,connections:z.array(compiledConnectionDefinitionSchema),dynamicConnections:z.array(compiledDynamicConnectionDefinitionSchema).default([]),diagnosticsSummary:discoverDiagnosticsSummarySchema,sourceComposition:agentSourceCompositionSchema,dynamicInstructions:z.array(compiledDynamicInstructionsDefinitionSchema).default([]),dynamicSkills:z.array(compiledDynamicSkillDefinitionSchema).default([]),dynamicTools:z.array(compiledDynamicToolDefinitionSchema).default([]),hooks:z.array(compiledHookDefinitionSchema),memories:z.array(compiledMemoryDefinitionSchema).default([]),kind:z.literal(COMPILED_AGENT_MANIFEST_KIND),remoteAgents:z.array(compiledRemoteAgentNodeSchema),sandbox:compiledSandboxDefinitionSchema,sandboxWorkspaces:z.array(compiledSandboxWorkspaceSchema),schedules:z.array(compiledScheduleDefinitionSchema),skills:z.array(compiledSkillSourceSchema).readonly(),subagents:z.array(compiledSubagentNodeSchema),instructions:z.array(compiledInstructionsSchema).readonly().default([]),tools:z.array(compiledToolDefinitionSchema),version:z.literal(51),workspaceResourceRoot:compiledWorkspaceResourceRootSchema}).strict();function createCompiledAgentResources(e){return{agentRoot:e.agentRoot,appRoot:e.appRoot,bindings:{...e.bindings},channelRoutes:{effective:[...e.channelRoutes.effective],preflight:[...e.channelRoutes.preflight],shadowed:[...e.channelRoutes.shadowed]},connections:[...e.connections??[]],dynamicConnections:[...e.dynamicConnections??[]],diagnosticsSummary:e.diagnosticsSummary??{errors:0,warnings:0},sourceComposition:{entries:[...e.sourceComposition.entries]},dynamicInstructions:[...e.dynamicInstructions??[]],dynamicSkills:[...e.dynamicSkills??[]],dynamicTools:[...e.dynamicTools??[]],extensionMounts:[...e.extensionMounts??[]],hooks:[...e.hooks??[]],memories:[...e.memories??[]],instructions:[...e.instructions??[]],remoteAgents:[...e.remoteAgents??[]],sandbox:e.sandbox,sandboxWorkspaces:[...e.sandboxWorkspaces??[]],schedules:[...e.schedules??[]],skills:[...e.skills??[]],tools:[...e.tools??[]],workspaceResourceRoot:e.workspaceResourceRoot??{logicalPath:``,rootEntries:deriveResourceRootEntries({sandboxWorkspaces:e.sandboxWorkspaces,skills:e.skills})}}}function createCompiledAgentNodeManifest(e){let t={...createCompiledAgentResources(e),config:cloneCompiledAgentDefinition(e.config)};return validateCompiledAgentResources(t,{allowUnknownResourceWinners:!0}),t}function cloneCompiledAgentDefinition(e){let t={build:e.build===void 0?void 0:{externalDependencies:e.build.externalDependencies===void 0?void 0:[...e.build.externalDependencies]},compaction:{model:e.compaction?.model===void 0?void 0:cloneCompiledRuntimeModelReference(e.compaction.model),thresholdPercent:e.compaction?.thresholdPercent},defaultTools:e.defaultTools,description:e.description,experimental:e.experimental===void 0?void 0:{workflow:e.experimental.workflow===void 0?void 0:{modelCallsPerStep:e.experimental.workflow.modelCallsPerStep,retention:e.experimental.workflow.retention,world:e.experimental.workflow.world}},name:e.name,outputSchema:e.outputSchema,reasoning:e.reasoning,limits:e.limits===void 0?void 0:{maxInputTokensPerSession:e.limits.maxInputTokensPerSession,maxOutputTokensPerSession:e.limits.maxOutputTokensPerSession,maxTokenCostUsdPerSession:e.limits.maxTokenCostUsdPerSession,sessionTimeoutMs:e.limits.sessionTimeoutMs},source:{...e.source},tool:e.tool};return e.dynamicModel===void 0?{...t,model:cloneCompiledRuntimeModelReference(e.model)}:{...t,dynamicModel:{...e.dynamicModel}}}function deriveResourceRootEntries(e){let t=new Set;for(let n of e.sandboxWorkspaces??[])for(let e of n.rootEntries)t.add(e);return[...t].sort((e,t)=>e.localeCompare(t))}function createCompiledSubagentNodeId(e,t){return e===`__root__`?t:`${e}::${t}`}function createCompiledAgentManifest(e){let t={...createCompiledAgentNodeManifest(e),kind:COMPILED_AGENT_MANIFEST_KIND,extensionMounts:[...e.extensionMounts??[]],subagents:[...e.subagents??[]],version:51};return validateCompiledAgentManifest(t),t}function cloneCompiledRuntimeModelReference(e){let t={id:e.id,routing:cloneModelRouting(e.routing)};return e.contextWindowTokens!==void 0&&(t.contextWindowTokens=e.contextWindowTokens),e.maxOutputTokens!==void 0&&(t.maxOutputTokens=e.maxOutputTokens),e.providerOptions!==void 0&&(t.providerOptions={...e.providerOptions}),e.source!==void 0&&(t.source={...e.source}),t}function cloneModelRouting(e){return e.kind===`external`?{kind:`external`,provider:e.provider}:e.byok===void 0?{kind:`gateway`,target:e.target}:{kind:`gateway`,target:e.target,byok:e.byok}}export{COMPILED_AGENT_MANIFEST_KIND,COMPILED_AGENT_MANIFEST_VERSION,ROOT_COMPILED_AGENT_NODE_ID,compiledAgentManifestSchema,createCompiledAgentManifest,createCompiledAgentNodeManifest,createCompiledAgentResources,createCompiledSubagentNodeId,deriveResourceRootEntries};
1
+ import{z}from"#compiled/zod/index.js";import{discoverDiagnosticsSummarySchema}from"#discover/diagnostics.js";import{compiledRemoteAgentNodeSchema}from"#compiler/remote-agent-node.js";import{jsonObjectSchema}from"#shared/json-schemas.js";import{AGENT_WORKFLOW_RETENTION_VALUES}from"#shared/agent-definition.js";import{validateCompiledAgentManifest,validateCompiledAgentResources}from"#compiler/validate-artifact.js";const COMPILED_AGENT_MANIFEST_KIND=`eve-agent-compiled-manifest`,ROOT_COMPILED_AGENT_NODE_ID=`__root__`,COMPILED_AGENT_MANIFEST_VERSION=52,agentSourceOwnerSchema=z.discriminatedUnion(`kind`,[z.object({kind:z.literal(`application`)}).strict(),z.object({feature:z.string().min(1),kind:z.literal(`framework`)}).strict(),z.object({kind:z.literal(`extension`),namespace:z.string().min(1),packageName:z.string().min(1)}).strict()]),moduleSourceRefSchema=z.object({exportName:z.string().optional(),sourceKind:z.literal(`module`),logicalPath:z.string(),sourceId:z.string()}).strict(),filesystemModuleBackingSchema=z.object({externalDependencies:z.array(z.string()).readonly(),extensionScope:z.object({namespace:z.string(),sourceRoot:z.string()}).strict().optional(),kind:z.literal(`filesystem`),sourcePath:z.string()}).strict(),programmaticModuleBackingSchema=z.object({dependencies:z.record(z.string(),z.string()).readonly().optional(),kind:z.literal(`programmatic`),moduleId:z.string(),parameters:jsonObjectSchema.optional(),registryId:z.string(),revision:z.string(),semanticRevision:z.string().optional()}).strict(),resourceSourceBackingSchema=z.object({kind:z.literal(`resource`),sourcePath:z.string()}).strict(),agentModuleBackingSchema=z.discriminatedUnion(`kind`,[filesystemModuleBackingSchema,programmaticModuleBackingSchema]),compiledModuleBindingSchema=z.object({backing:agentModuleBackingSchema,logicalPath:z.string(),owner:agentSourceOwnerSchema,usage:z.object({compile:z.boolean(),runtimeEntry:z.boolean()}).strict()}).strict(),agentSourceDescriptorSchema=z.object({backing:z.discriminatedUnion(`kind`,[filesystemModuleBackingSchema,programmaticModuleBackingSchema,resourceSourceBackingSchema]),form:z.enum([`derived`,`direct`]),layer:z.enum([`framework-default`,`extension-package`,`extension-override`,`application`]),logicalPath:z.string(),owner:agentSourceOwnerSchema,sourceId:z.string()}).strict(),agentSourceCompositionSchema=z.object({entries:z.array(z.discriminatedUnion(`kind`,[z.object({kind:z.literal(`shadowed`),source:agentSourceDescriptorSchema,winnerSourceId:z.string()}).strict(),z.object({kind:z.literal(`disabled`),source:agentSourceDescriptorSchema}).strict()])).readonly()}).strict(),compiledDynamicModelDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),sourceKind:z.literal(`module`),logicalPath:z.string(),sourceId:z.string()}).strict(),channelMethodSchema=z.union([z.literal(`GET`),z.literal(`HEAD`),z.literal(`POST`),z.literal(`PUT`),z.literal(`PATCH`),z.literal(`DELETE`),z.literal(`OPTIONS`),z.literal(`WEBSOCKET`)]),compiledChannelCorsSchema=z.object({origin:z.union([z.literal(`*`),z.literal(`null`),z.array(z.string())]).optional(),methods:z.union([z.literal(`*`),z.array(z.string())]).optional(),allowHeaders:z.union([z.literal(`*`),z.array(z.string())]).optional(),exposeHeaders:z.union([z.literal(`*`),z.array(z.string())]).optional(),credentials:z.boolean().optional(),maxAge:z.union([z.string(),z.literal(!1)]).optional(),preflight:z.object({statusCode:z.number().int().min(100).max(599).optional()}).strict().optional()}).strict(),compiledVercelConnectMetadataSchema=z.object({connector:z.string(),requirement:z.object({method:z.string().optional(),reference:z.string(),service:z.string(),subjectTypes:z.array(z.enum([`app`,`user`])).readonly()}).strict().optional()}).strict(),compiledChannelDefinitionSchema=z.object({kind:z.literal(`channel`),name:z.string(),logicalPath:z.string(),method:channelMethodSchema,urlPath:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`),exportName:z.string().optional(),adapterKind:z.string().optional(),cors:compiledChannelCorsSchema.optional(),manifest:jsonObjectSchema.optional(),vercelConnect:compiledVercelConnectMetadataSchema.optional()}).strict(),compiledChannelPreflightDefinitionSchema=z.object({cors:compiledChannelCorsSchema,method:z.literal(`OPTIONS`),sourceIds:z.array(z.string()).readonly(),urlPath:z.string()}).strict(),compiledShadowedChannelRouteSchema=z.object({method:channelMethodSchema,source:agentSourceDescriptorSchema,urlPath:z.string(),winnerSourceId:z.string()}).strict(),compiledChannelRoutePlanSchema=z.object({effective:z.array(compiledChannelDefinitionSchema).readonly(),preflight:z.array(compiledChannelPreflightDefinitionSchema).readonly(),shadowed:z.array(compiledShadowedChannelRouteSchema).readonly()}).strict(),modelRoutingSchema=z.union([z.object({kind:z.literal(`gateway`),target:z.string(),byok:z.string().optional()}).strict(),z.object({kind:z.literal(`external`),provider:z.string()}).strict()]),compiledRuntimeModelReferenceSchema=z.object({contextWindowTokens:z.number().int().positive().optional(),id:z.string(),maxOutputTokens:z.number().int().positive().optional(),source:moduleSourceRefSchema.optional(),providerOptions:z.record(z.string(),jsonObjectSchema).optional(),routing:modelRoutingSchema}).strict(),compiledAgentBuildDefinitionSchema=z.object({externalDependencies:z.array(z.string()).optional()}).strict(),compiledAgentWorkflowWorldDefinitionSchema=z.string(),compiledAgentWorkflowDefinitionSchema=z.object({modelCallsPerStep:z.number().int().positive().optional(),retention:z.literal(AGENT_WORKFLOW_RETENTION_VALUES).optional(),world:compiledAgentWorkflowWorldDefinitionSchema.optional()}).strict(),compiledAgentCompactionDefinitionSchema=z.object({model:compiledRuntimeModelReferenceSchema.optional(),thresholdPercent:z.number().finite().min(0).max(1).optional()}).strict(),sessionTokenLimitSchema=z.union([z.number().int().positive(),z.literal(!1)]),sessionTokenCostLimitSchema=z.union([z.number().finite().positive(),z.literal(!1)]),sessionTimeoutSchema=z.union([z.number().int().positive(),z.literal(!1)]),compiledAgentLimitsDefinitionSchema=z.object({maxInputTokensPerSession:sessionTokenLimitSchema.optional(),maxOutputTokensPerSession:sessionTokenLimitSchema.optional(),maxTokenCostUsdPerSession:sessionTokenCostLimitSchema.optional(),sessionTimeoutMs:sessionTimeoutSchema.optional()}).strict(),compiledAgentConfigBaseFields={build:compiledAgentBuildDefinitionSchema.optional(),compaction:compiledAgentCompactionDefinitionSchema.optional(),defaultTools:z.boolean().optional(),description:z.string().optional(),experimental:z.object({workflow:compiledAgentWorkflowDefinitionSchema.optional()}).strict().optional(),name:z.string(),reasoning:z.enum([`provider-default`,`none`,`minimal`,`low`,`medium`,`high`,`xhigh`]).optional(),source:moduleSourceRefSchema,tool:z.boolean().optional(),limits:compiledAgentLimitsDefinitionSchema.optional()},compiledAgentConfigSchema=z.union([z.object({...compiledAgentConfigBaseFields,model:compiledRuntimeModelReferenceSchema}).strict(),z.object({...compiledAgentConfigBaseFields,dynamicModel:compiledDynamicModelDefinitionSchema}).strict()]),compiledInstructionsBaseFields={content:z.string(),name:z.string(),logicalPath:z.string(),role:z.enum([`system`,`user`]),sourceId:z.string()},compiledInstructionsSchema=z.discriminatedUnion(`sourceKind`,[z.object({...compiledInstructionsBaseFields,owner:agentSourceOwnerSchema,sourceKind:z.literal(`markdown`)}).strict(),z.object({...compiledInstructionsBaseFields,sourceKind:z.literal(`module`)}).strict()]),compiledSkillBaseFields={name:z.string(),description:z.string(),license:z.string().optional(),markdown:z.string(),metadata:z.record(z.string(),z.string()).optional(),sourceId:z.string(),logicalPath:z.string()},compiledSkillSourceSchema=z.discriminatedUnion(`sourceKind`,[z.object({...compiledSkillBaseFields,owner:agentSourceOwnerSchema,sourceKind:z.literal(`markdown`)}).strict(),z.object({...compiledSkillBaseFields,sourceKind:z.literal(`module`),exportName:z.string().optional()}).strict(),z.object({...compiledSkillBaseFields,owner:agentSourceOwnerSchema,sourceKind:z.literal(`skill-package`),skillId:z.string(),skillFilePath:z.string(),rootPath:z.string(),assetsPath:z.string().optional(),referencesPath:z.string().optional(),scriptsPath:z.string().optional()}).strict()]),compiledScheduleBaseFields={cron:z.string(),hasRun:z.boolean(),name:z.string(),logicalPath:z.string(),markdown:z.string().optional(),sourceId:z.string()},compiledScheduleDefinitionSchema=z.discriminatedUnion(`sourceKind`,[z.object({...compiledScheduleBaseFields,owner:agentSourceOwnerSchema,sourceKind:z.literal(`markdown`)}).strict(),z.object({...compiledScheduleBaseFields,sourceKind:z.literal(`module`)}).strict()]),compiledSandboxDefinitionSchema=z.object({providerName:z.string().optional(),environmentExportName:z.string().optional(),inheritsParent:z.boolean().optional(),exportName:z.string().optional(),logicalPath:z.string(),revisionHash:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledSandboxWorkspaceSchema=z.object({logicalPath:z.string(),rootEntries:z.array(z.string()).readonly(),sourceId:z.string(),sourcePath:z.string()}).strict(),compiledWorkspaceResourceRootSchema=z.object({contentHash:z.string().optional(),logicalPath:z.string(),rootEntries:z.array(z.string()).readonly()}).strict(),compiledConnectionDefinitionSchema=z.object({connectionName:z.string(),description:z.string(),exportName:z.string().optional(),logicalPath:z.string(),protocol:z.enum([`mcp`,`openapi`]).default(`mcp`),sourceId:z.string(),sourceKind:z.literal(`module`),url:z.string(),vercelConnect:compiledVercelConnectMetadataSchema.optional()}).strict(),compiledDynamicConnectionDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),extensionNamespace:z.string().optional(),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledToolBehaviorSchema=z.object({availability:z.array(z.enum([`delegated-task-child`,`root-session`])).readonly(),handling:z.discriminatedUnion(`kind`,[z.object({action:z.enum([`self-agent`,`task-cancel`]),kind:z.literal(`dispatch`)}).strict(),z.object({kind:z.literal(`provider-tool`),provider:z.enum([`exa`,`parallel`])}).strict(),z.object({kind:z.literal(`workflow-tool`),workflowId:z.string()}).strict()]).optional(),presentation:z.literal(`load-skill`).optional(),shape:z.object({lifetime:z.enum([`step`,`task`]),suspend:z.enum([`none`,`workflow`])}).strict().optional()}).strict(),compiledToolDefinitionSchema=z.object({availableInSubagents:z.boolean().optional(),behavior:compiledToolBehaviorSchema.optional(),description:z.string(),execution:z.literal(`background`).optional(),exportName:z.string().optional(),hasExecute:z.boolean(),hasModelOutputProjection:z.boolean(),inputSchema:jsonObjectSchema.nullable(),logicalPath:z.string(),name:z.string(),outputSchema:jsonObjectSchema.optional(),requiresApproval:z.boolean(),sourceId:z.string(),sourceKind:z.literal(`module`),workflowProgram:z.object({maxSubagents:z.number().int().positive()}).strict().optional()}).strict(),compiledDynamicToolDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),extensionNamespace:z.string().optional(),logicalPath:z.string(),rebindMissingCallbacks:z.boolean().optional(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledMemoryDefinitionSchema=z.object({description:z.string().optional(),exportName:z.string().optional(),logicalPath:z.string(),slot:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`),visibility:z.enum([`scope`,`session`])}).strict(),compiledDynamicSkillDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),extensionNamespace:z.string().optional(),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledDynamicInstructionsDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledHookDefinitionSchema=z.object({eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),logicalPath:z.string(),slug:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledExtensionMountSchema=z.object({externalDependencies:z.array(z.string()).readonly(),namespace:z.string(),packageName:z.string(),packageNamespace:z.string(),sourceRoot:z.string(),mountSourceId:z.string(),mountLogicalPath:z.string()}).strict(),compiledAgentResourceFields={agentRoot:z.string(),appRoot:z.string(),bindings:z.record(z.string(),compiledModuleBindingSchema),channelRoutes:compiledChannelRoutePlanSchema,connections:z.array(compiledConnectionDefinitionSchema),dynamicConnections:z.array(compiledDynamicConnectionDefinitionSchema).default([]),diagnosticsSummary:discoverDiagnosticsSummarySchema,sourceComposition:agentSourceCompositionSchema,dynamicInstructions:z.array(compiledDynamicInstructionsDefinitionSchema).default([]),dynamicSkills:z.array(compiledDynamicSkillDefinitionSchema).default([]),dynamicTools:z.array(compiledDynamicToolDefinitionSchema).default([]),extensionMounts:z.array(compiledExtensionMountSchema).default([]),hooks:z.array(compiledHookDefinitionSchema),memories:z.array(compiledMemoryDefinitionSchema).default([]),sandbox:compiledSandboxDefinitionSchema,sandboxWorkspaces:z.array(compiledSandboxWorkspaceSchema),schedules:z.array(compiledScheduleDefinitionSchema),remoteAgents:z.array(compiledRemoteAgentNodeSchema),skills:z.array(compiledSkillSourceSchema).readonly(),instructions:z.array(compiledInstructionsSchema).readonly().default([]),tools:z.array(compiledToolDefinitionSchema),workspaceResourceRoot:compiledWorkspaceResourceRootSchema},compiledAgentResourcesSchema=z.object(compiledAgentResourceFields).strict(),compiledAgentNodeManifestSchema=z.object({...compiledAgentResourceFields,config:compiledAgentConfigSchema}).strict(),compiledSubagentNodeBaseFields={backing:resourceSourceBackingSchema,entryPath:z.string(),logicalPath:z.string(),name:z.string(),nodeId:z.string(),owner:agentSourceOwnerSchema,parentNodeId:z.string(),rootPath:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`),exportName:z.string().optional()},compiledDynamicSubagentDefinitionSchema=z.object({build:compiledAgentBuildDefinitionSchema.optional(),eventNames:z.array(z.string()).readonly(),exportName:z.string().optional(),logicalPath:z.string(),sourceId:z.string(),sourceKind:z.literal(`module`)}).strict(),compiledSubagentNodeSchema=z.union([z.object({...compiledSubagentNodeBaseFields,agent:compiledAgentNodeManifestSchema,description:z.string()}).strict(),z.object({...compiledSubagentNodeBaseFields,agent:compiledAgentResourcesSchema,configResolver:compiledDynamicSubagentDefinitionSchema}).strict()]),compiledAgentManifestSchema=z.object({agentRoot:z.string(),appRoot:z.string(),bindings:z.record(z.string(),compiledModuleBindingSchema),extensionMounts:z.array(compiledExtensionMountSchema).default([]),channelRoutes:compiledChannelRoutePlanSchema,config:compiledAgentConfigSchema,connections:z.array(compiledConnectionDefinitionSchema),dynamicConnections:z.array(compiledDynamicConnectionDefinitionSchema).default([]),diagnosticsSummary:discoverDiagnosticsSummarySchema,sourceComposition:agentSourceCompositionSchema,dynamicInstructions:z.array(compiledDynamicInstructionsDefinitionSchema).default([]),dynamicSkills:z.array(compiledDynamicSkillDefinitionSchema).default([]),dynamicTools:z.array(compiledDynamicToolDefinitionSchema).default([]),hooks:z.array(compiledHookDefinitionSchema),memories:z.array(compiledMemoryDefinitionSchema).default([]),kind:z.literal(COMPILED_AGENT_MANIFEST_KIND),remoteAgents:z.array(compiledRemoteAgentNodeSchema),sandbox:compiledSandboxDefinitionSchema,sandboxWorkspaces:z.array(compiledSandboxWorkspaceSchema),schedules:z.array(compiledScheduleDefinitionSchema),skills:z.array(compiledSkillSourceSchema).readonly(),subagents:z.array(compiledSubagentNodeSchema),instructions:z.array(compiledInstructionsSchema).readonly().default([]),tools:z.array(compiledToolDefinitionSchema),version:z.literal(52),workspaceResourceRoot:compiledWorkspaceResourceRootSchema}).strict();function createCompiledAgentResources(e){return{agentRoot:e.agentRoot,appRoot:e.appRoot,bindings:{...e.bindings},channelRoutes:{effective:[...e.channelRoutes.effective],preflight:[...e.channelRoutes.preflight],shadowed:[...e.channelRoutes.shadowed]},connections:[...e.connections??[]],dynamicConnections:[...e.dynamicConnections??[]],diagnosticsSummary:e.diagnosticsSummary??{errors:0,warnings:0},sourceComposition:{entries:[...e.sourceComposition.entries]},dynamicInstructions:[...e.dynamicInstructions??[]],dynamicSkills:[...e.dynamicSkills??[]],dynamicTools:[...e.dynamicTools??[]],extensionMounts:[...e.extensionMounts??[]],hooks:[...e.hooks??[]],memories:[...e.memories??[]],instructions:[...e.instructions??[]],remoteAgents:[...e.remoteAgents??[]],sandbox:e.sandbox,sandboxWorkspaces:[...e.sandboxWorkspaces??[]],schedules:[...e.schedules??[]],skills:[...e.skills??[]],tools:[...e.tools??[]],workspaceResourceRoot:e.workspaceResourceRoot??{logicalPath:``,rootEntries:deriveResourceRootEntries({sandboxWorkspaces:e.sandboxWorkspaces,skills:e.skills})}}}function createCompiledAgentNodeManifest(e){let t={...createCompiledAgentResources(e),config:cloneCompiledAgentDefinition(e.config)};return validateCompiledAgentResources(t,{allowUnknownResourceWinners:!0}),t}function cloneCompiledAgentDefinition(e){let t={build:e.build===void 0?void 0:{externalDependencies:e.build.externalDependencies===void 0?void 0:[...e.build.externalDependencies]},compaction:{model:e.compaction?.model===void 0?void 0:cloneCompiledRuntimeModelReference(e.compaction.model),thresholdPercent:e.compaction?.thresholdPercent},defaultTools:e.defaultTools,description:e.description,experimental:e.experimental===void 0?void 0:{workflow:e.experimental.workflow===void 0?void 0:{modelCallsPerStep:e.experimental.workflow.modelCallsPerStep,retention:e.experimental.workflow.retention,world:e.experimental.workflow.world}},name:e.name,reasoning:e.reasoning,limits:e.limits===void 0?void 0:{maxInputTokensPerSession:e.limits.maxInputTokensPerSession,maxOutputTokensPerSession:e.limits.maxOutputTokensPerSession,maxTokenCostUsdPerSession:e.limits.maxTokenCostUsdPerSession,sessionTimeoutMs:e.limits.sessionTimeoutMs},source:{...e.source},tool:e.tool};return e.dynamicModel===void 0?{...t,model:cloneCompiledRuntimeModelReference(e.model)}:{...t,dynamicModel:{...e.dynamicModel}}}function deriveResourceRootEntries(e){let t=new Set;for(let n of e.sandboxWorkspaces??[])for(let e of n.rootEntries)t.add(e);return[...t].sort((e,t)=>e.localeCompare(t))}function createCompiledSubagentNodeId(e,t){return e===`__root__`?t:`${e}::${t}`}function createCompiledAgentManifest(e){let t={...createCompiledAgentNodeManifest(e),kind:COMPILED_AGENT_MANIFEST_KIND,extensionMounts:[...e.extensionMounts??[]],subagents:[...e.subagents??[]],version:52};return validateCompiledAgentManifest(t),t}function cloneCompiledRuntimeModelReference(e){let t={id:e.id,routing:cloneModelRouting(e.routing)};return e.contextWindowTokens!==void 0&&(t.contextWindowTokens=e.contextWindowTokens),e.maxOutputTokens!==void 0&&(t.maxOutputTokens=e.maxOutputTokens),e.providerOptions!==void 0&&(t.providerOptions={...e.providerOptions}),e.source!==void 0&&(t.source={...e.source}),t}function cloneModelRouting(e){return e.kind===`external`?{kind:`external`,provider:e.provider}:e.byok===void 0?{kind:`gateway`,target:e.target}:{kind:`gateway`,target:e.target,byok:e.byok}}export{COMPILED_AGENT_MANIFEST_KIND,COMPILED_AGENT_MANIFEST_VERSION,ROOT_COMPILED_AGENT_NODE_ID,compiledAgentManifestSchema,createCompiledAgentManifest,createCompiledAgentNodeManifest,createCompiledAgentResources,createCompiledSubagentNodeId,deriveResourceRootEntries};
@@ -1 +1 @@
1
- import{isAbsolute,relative,resolve}from"node:path";import{createCompiledBindingNamespaceLoader}from"#compiler/load-binding-namespace.js";import{normalizeLogicalPath}from"#discover/filesystem.js";import{toErrorMessage}from"#shared/errors.js";import{parseJsonObject}from"#shared/json.js";import{serializeOutputSchema}from"#tools/schema.js";import{isDynamicModelDefinition}from"#shared/agent-definition.js";import{normalizeAgentDefinition}from"#internal/authored-definition/core.js";import{formatLanguageModelGatewayId}from"#internal/runtime-model.js";import{classifyModelRouting}from"#internal/classify-model-routing.js";import{isChatGptModelRouting}from"#shared/chatgpt-model.js";import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";async function compileAgentConfig(e,t,n){let r=n.source,i=formatAgentConfigModulePath(e,r,n.binding),a=normalizeAgentDefinition(Object.hasOwn(n,`definition`)?n.definition:await loadModuleBackedDefinition({binding:n.binding,displayPath:i,kind:`agent config`,loadNamespace:createCompiledBindingNamespaceLoader({bindings:{[r.sourceId]:n.binding},registries:t.registries}),source:r}),`Expected the agent config export "${r.exportName??`default`}" from "${i}" to match the public eve shape.`),o=isDynamicModelDefinition(a.model)?a.model:void 0,s=o===void 0?await normalizeAuthoredModelReference({modelCatalog:t.modelCatalog,purpose:`the primary compaction trigger model`,contextWindowTokens:a.modelContextWindowTokens,providerOptions:a.modelOptions?.providerOptions,source:r,sourcePath:i,value:a.model}):void 0,c={},l={compaction:c,name:e.agentId,source:{...r}};a.defaultTools!==void 0&&(l.defaultTools=a.defaultTools),a.description!==void 0&&(l.description=a.description);let u;o!==void 0&&(u={eventNames:Object.keys(o.events),exportName:r.exportName,sourceKind:`module`,logicalPath:r.logicalPath,sourceId:r.sourceId});let d=normalizeExperimentalDefinition(a.experimental);if(d!==void 0&&(l.experimental=d),a.build!==void 0&&(l.build={externalDependencies:a.build.externalDependencies===void 0?void 0:[...a.build.externalDependencies]}),a.outputSchema!==void 0&&(l.outputSchema=serializeOutputSchema(a.outputSchema)),a.reasoning!==void 0&&(l.reasoning=a.reasoning),a.tool!==void 0&&(l.tool=a.tool),a.limits!==void 0&&(l.limits={maxInputTokensPerSession:a.limits.maxInputTokensPerSession,maxOutputTokensPerSession:a.limits.maxOutputTokensPerSession,maxTokenCostUsdPerSession:a.limits.maxTokenCostUsdPerSession,sessionTimeoutMs:a.limits.sessionTimeoutMs}),a.compaction?.model!==void 0&&(c.model=await normalizeAuthoredModelReference({modelCatalog:t.modelCatalog,purpose:`the compaction summary model`,contextWindowTokens:a.compaction.modelContextWindowTokens,providerOptions:a.modelOptions?.providerOptions,source:r,sourcePath:i,value:a.compaction.model})),a.compaction?.thresholdPercent!==void 0&&(c.thresholdPercent=a.compaction.thresholdPercent),u!==void 0)return{...l,dynamicModel:u};if(s===void 0)throw Error(`Expected a static agent model to compile to a concrete model reference.`);return{...l,model:s}}function normalizeExperimentalDefinition(e){if(e===void 0)return;let t={};return e.workflow!==void 0&&(t.workflow={modelCallsPerStep:e.workflow.modelCallsPerStep,retention:e.workflow.retention,world:e.workflow.world}),t}async function normalizeAuthoredModelReference(e){if(typeof e.value==`string`)return await withCompiledRuntimeModelLimits({id:formatLanguageModelGatewayId(e.value),providerOptions:parseProviderOptionsRecord(e.providerOptions),routing:classifyModelRouting(e.value,e.providerOptions)},e);let t=e.source;if(t===void 0)throw Error(`Expected ${e.purpose} to provide a valid AI SDK language model reference.`);let n=e.value,r=n.specificationVersion;if(r!==`v2`&&r!==`v3`&&r!==`v4`||typeof n.provider!=`string`||typeof n.modelId!=`string`||typeof n.doGenerate!=`function`||typeof n.doStream!=`function`)throw Error(`Expected the authored agent config export "${t.exportName??`default`}" from "${e.sourcePath??t.logicalPath}" to provide a valid AI SDK language model.`);let i={id:formatLanguageModelGatewayId(n),source:{exportName:t.exportName,sourceKind:`module`,logicalPath:t.logicalPath,sourceId:t.sourceId},providerOptions:parseProviderOptionsRecord(e.providerOptions),routing:classifyModelRouting(n,e.providerOptions)};if(e.contextWindowTokens===void 0){if(isChatGptModelRouting(i.routing))return{...i,contextWindowTokens:2e5};try{let t=await e.modelCatalog.getByProviderModelId(n.provider,n.modelId);if(t)return{...i,id:t.slug,contextWindowTokens:t.limits.contextWindowTokens,maxOutputTokens:t.limits.maxOutputTokens}}catch{}}return await withCompiledRuntimeModelLimits(i,e)}function formatAgentConfigModulePath(e,t,n){return n.backing.kind===`programmatic`?t.logicalPath:normalizeLogicalPath(relative(resolveTopLevelAgentRoot(e),n.backing.sourcePath))}function resolveTopLevelAgentRoot(e){let t=resolve(e.appRoot),n=resolve(t,`agent`);return isPathInsideOrEqual(n,resolve(e.agentRoot))?n:t}function isPathInsideOrEqual(e,t){let n=relative(e,t);return n===``||!n.startsWith(`..`)&&!isAbsolute(n)}async function withCompiledRuntimeModelLimits(e,t){if(t.contextWindowTokens!==void 0)return{...e,contextWindowTokens:t.contextWindowTokens};let n;try{n=await t.modelCatalog.getModelLimits(e.id)}catch(n){throw Error(`Failed to load AI Gateway model metadata for ${t.purpose} "${e.id}". ${toErrorMessage(n)}`)}if(n===null)throw Error(`Cannot compile agent compaction because ${t.purpose} "${e.id}" does not have known AI Gateway context window metadata.`);return{...e,contextWindowTokens:n.contextWindowTokens,maxOutputTokens:n.maxOutputTokens}}function parseProviderOptionsRecord(e){if(e===void 0)return;let t={};for(let[n,r]of Object.entries(e))t[n]=parseJsonObject(r);return t}export{compileAgentConfig};
1
+ import{isAbsolute,relative,resolve}from"node:path";import{createCompiledBindingNamespaceLoader}from"#compiler/load-binding-namespace.js";import{normalizeLogicalPath}from"#discover/filesystem.js";import{toErrorMessage}from"#shared/errors.js";import{parseJsonObject}from"#shared/json.js";import{isDynamicModelDefinition}from"#shared/agent-definition.js";import{normalizeAgentDefinition}from"#internal/authored-definition/core.js";import{formatLanguageModelGatewayId}from"#internal/runtime-model.js";import{classifyModelRouting}from"#internal/classify-model-routing.js";import{isChatGptModelRouting}from"#shared/chatgpt-model.js";import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";async function compileAgentConfig(e,t,n){let r=n.source,i=formatAgentConfigModulePath(e,r,n.binding),a=normalizeAgentDefinition(Object.hasOwn(n,`definition`)?n.definition:await loadModuleBackedDefinition({binding:n.binding,displayPath:i,kind:`agent config`,loadNamespace:createCompiledBindingNamespaceLoader({bindings:{[r.sourceId]:n.binding},registries:t.registries}),source:r}),`Expected the agent config export "${r.exportName??`default`}" from "${i}" to match the public eve shape.`),o=isDynamicModelDefinition(a.model)?a.model:void 0,s=o===void 0?await normalizeAuthoredModelReference({modelCatalog:t.modelCatalog,purpose:`the primary compaction trigger model`,contextWindowTokens:a.modelContextWindowTokens,providerOptions:a.modelOptions?.providerOptions,source:r,sourcePath:i,value:a.model}):void 0,c={},l={compaction:c,name:e.agentId,source:{...r}};a.defaultTools!==void 0&&(l.defaultTools=a.defaultTools),a.description!==void 0&&(l.description=a.description);let u;o!==void 0&&(u={eventNames:Object.keys(o.events),exportName:r.exportName,sourceKind:`module`,logicalPath:r.logicalPath,sourceId:r.sourceId});let d=normalizeExperimentalDefinition(a.experimental);if(d!==void 0&&(l.experimental=d),a.build!==void 0&&(l.build={externalDependencies:a.build.externalDependencies===void 0?void 0:[...a.build.externalDependencies]}),a.reasoning!==void 0&&(l.reasoning=a.reasoning),a.tool!==void 0&&(l.tool=a.tool),a.limits!==void 0&&(l.limits={maxInputTokensPerSession:a.limits.maxInputTokensPerSession,maxOutputTokensPerSession:a.limits.maxOutputTokensPerSession,maxTokenCostUsdPerSession:a.limits.maxTokenCostUsdPerSession,sessionTimeoutMs:a.limits.sessionTimeoutMs}),a.compaction?.model!==void 0&&(c.model=await normalizeAuthoredModelReference({modelCatalog:t.modelCatalog,purpose:`the compaction summary model`,contextWindowTokens:a.compaction.modelContextWindowTokens,providerOptions:a.modelOptions?.providerOptions,source:r,sourcePath:i,value:a.compaction.model})),a.compaction?.thresholdPercent!==void 0&&(c.thresholdPercent=a.compaction.thresholdPercent),u!==void 0)return{...l,dynamicModel:u};if(s===void 0)throw Error(`Expected a static agent model to compile to a concrete model reference.`);return{...l,model:s}}function normalizeExperimentalDefinition(e){if(e===void 0)return;let t={};return e.workflow!==void 0&&(t.workflow={modelCallsPerStep:e.workflow.modelCallsPerStep,retention:e.workflow.retention,world:e.workflow.world}),t}async function normalizeAuthoredModelReference(e){if(typeof e.value==`string`)return await withCompiledRuntimeModelLimits({id:formatLanguageModelGatewayId(e.value),providerOptions:parseProviderOptionsRecord(e.providerOptions),routing:classifyModelRouting(e.value,e.providerOptions)},e);let t=e.source;if(t===void 0)throw Error(`Expected ${e.purpose} to provide a valid AI SDK language model reference.`);let n=e.value,r=n.specificationVersion;if(r!==`v2`&&r!==`v3`&&r!==`v4`||typeof n.provider!=`string`||typeof n.modelId!=`string`||typeof n.doGenerate!=`function`||typeof n.doStream!=`function`)throw Error(`Expected the authored agent config export "${t.exportName??`default`}" from "${e.sourcePath??t.logicalPath}" to provide a valid AI SDK language model.`);let i={id:formatLanguageModelGatewayId(n),source:{exportName:t.exportName,sourceKind:`module`,logicalPath:t.logicalPath,sourceId:t.sourceId},providerOptions:parseProviderOptionsRecord(e.providerOptions),routing:classifyModelRouting(n,e.providerOptions)};if(e.contextWindowTokens===void 0){if(isChatGptModelRouting(i.routing))return{...i,contextWindowTokens:2e5};try{let t=await e.modelCatalog.getByProviderModelId(n.provider,n.modelId);if(t)return{...i,id:t.slug,contextWindowTokens:t.limits.contextWindowTokens,maxOutputTokens:t.limits.maxOutputTokens}}catch{}}return await withCompiledRuntimeModelLimits(i,e)}function formatAgentConfigModulePath(e,t,n){return n.backing.kind===`programmatic`?t.logicalPath:normalizeLogicalPath(relative(resolveTopLevelAgentRoot(e),n.backing.sourcePath))}function resolveTopLevelAgentRoot(e){let t=resolve(e.appRoot),n=resolve(t,`agent`);return isPathInsideOrEqual(n,resolve(e.agentRoot))?n:t}function isPathInsideOrEqual(e,t){let n=relative(e,t);return n===``||!n.startsWith(`..`)&&!isAbsolute(n)}async function withCompiledRuntimeModelLimits(e,t){if(t.contextWindowTokens!==void 0)return{...e,contextWindowTokens:t.contextWindowTokens};let n;try{n=await t.modelCatalog.getModelLimits(e.id)}catch(n){throw Error(`Failed to load AI Gateway model metadata for ${t.purpose} "${e.id}". ${toErrorMessage(n)}`)}if(n===null)throw Error(`Cannot compile agent compaction because ${t.purpose} "${e.id}" does not have known AI Gateway context window metadata.`);return{...e,contextWindowTokens:n.contextWindowTokens,maxOutputTokens:n.maxOutputTokens}}function parseProviderOptionsRecord(e){if(e===void 0)return;let t={};for(let[n,r]of Object.entries(e))t[n]=parseJsonObject(r);return t}export{compileAgentConfig};
@@ -1 +1 @@
1
- import{stripLogicalPathExtension}from"#discover/filesystem.js";import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";import{normalizeChannelDefinition}from"#internal/authored-definition/channel.js";import{isDisabledRouteSentinel}from"#public/definitions/channel.js";import{readWorkflowFunctionId}from"#internal/workflow/reference.js";import{workflowCallbackErrorMessage}from"#shared/workflow-tool-context.js";async function compileChannelDefinition(e,t,n){let r=await loadModuleBackedDefinition({binding:n.binding,kind:`channel`,loadNamespace:n.loadNamespace,source:t}),i=stripLogicalPathExtension(t.logicalPath).replace(/^channels\//,``);if(isDisabledRouteSentinel(r))return{kind:`disabled`,name:i};let a=normalizeChannelDefinition(r,`Expected the channel export "${t.exportName??`default`}" from "${t.logicalPath}" to match the public eve shape.`);for(let e of a.routes)if(readWorkflowFunctionId(e.handler)!==void 0)throw Error(`${t.logicalPath} (${e.method} ${e.path}): ${workflowCallbackErrorMessage(`channel`)}`);return{definitions:a.routes.map(e=>({kind:`channel`,name:i,logicalPath:t.logicalPath,method:e.method.toUpperCase(),urlPath:e.path,sourceId:t.sourceId,sourceKind:`module`,exportName:t.exportName,adapterKind:extractAdapterKind(a.adapter),cors:a.cors})),kind:`channel`}}function extractAdapterKind(e){if(typeof e!=`object`||!e)return;let t=e.kind;return typeof t==`string`&&t.length>0?t:void 0}export{compileChannelDefinition};
1
+ import{getChannelBuildMetadata}from"#channel/compiled-channel.js";import{stripLogicalPathExtension}from"#discover/filesystem.js";import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";import{normalizeChannelDefinition}from"#internal/authored-definition/channel.js";import{extractVercelConnectMetadata}from"#shared/vercel-connect-metadata.js";import{isDisabledRouteSentinel}from"#public/definitions/channel.js";import{readWorkflowFunctionId}from"#internal/workflow/reference.js";import{workflowCallbackErrorMessage}from"#shared/workflow-tool-context.js";async function compileChannelDefinition(e,t,n){let r=await loadModuleBackedDefinition({binding:n.binding,kind:`channel`,loadNamespace:n.loadNamespace,source:t}),i=stripLogicalPathExtension(t.logicalPath).replace(/^channels\//,``);if(isDisabledRouteSentinel(r))return{kind:`disabled`,name:i};let a=normalizeChannelDefinition(r,`Expected the channel export "${t.exportName??`default`}" from "${t.logicalPath}" to match the public eve shape.`),o=getChannelBuildMetadata(a,i);for(let e of a.routes)if(readWorkflowFunctionId(e.handler)!==void 0)throw Error(`${t.logicalPath} (${e.method} ${e.path}): ${workflowCallbackErrorMessage(`channel`)}`);return{definitions:a.routes.map(e=>({kind:`channel`,name:i,logicalPath:t.logicalPath,method:e.method.toUpperCase(),urlPath:e.path,sourceId:t.sourceId,sourceKind:`module`,exportName:t.exportName,adapterKind:extractAdapterKind(a.adapter),cors:a.cors,manifest:o?.manifest,vercelConnect:extractVercelConnectMetadata(o?.externalCredentials)})),kind:`channel`}}function extractAdapterKind(e){if(typeof e!=`object`||!e)return;let t=e.kind;return typeof t==`string`&&t.length>0?t:void 0}export{compileChannelDefinition};
@@ -1 +1 @@
1
- import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";import{normalizeMcpClientConnectionDefinition,normalizeOpenApiConnectionDefinition}from"#internal/authored-definition/connection.js";import{readConnectionProtocol}from"#public/definitions/connections/protocol.js";import{ALLOWED_DYNAMIC_CONNECTION_EVENTS,assertResolverOnlyDynamicSentinel,isDynamicSentinel}from"#dynamic/definition.js";async function compileConnectionDefinition(e,t,n){let r=await loadModuleBackedDefinition({binding:n.binding,kind:`connection`,loadNamespace:n.loadNamespace,source:t}),i=`Expected the connection export "${t.exportName??`default`}" from "${t.logicalPath}" to match the public eve shape.`;if(isDynamicSentinel(r)){assertResolverOnlyDynamicSentinel(r,i);let e=Object.keys(r.events),n=e.find(e=>!ALLOWED_DYNAMIC_CONNECTION_EVENTS.has(e));if(n!==void 0)throw Error(`${i} Dynamic connections support only "session.started" and "turn.started" handlers. Unsupported event: "${n}".`);return{kind:`dynamic-connection`,definition:{eventNames:e,exportName:t.exportName,logicalPath:t.logicalPath,slug:t.connectionName,sourceId:t.sourceId,sourceKind:`module`}}}let a=readConnectionProtocol(r),o={connectionName:t.connectionName,exportName:t.exportName,logicalPath:t.logicalPath,sourceId:t.sourceId,sourceKind:`module`},s,c;if(a===`openapi`){let e=normalizeOpenApiConnectionDefinition(r,i);s={...o,description:e.description,protocol:`openapi`,url:e.baseUrl??``},c=e.auth}else{let e=normalizeMcpClientConnectionDefinition(r,i);s={...o,description:e.description,protocol:`mcp`,url:e.url},c=e.auth}let l=extractVercelConnectMarker(c);return l!==void 0&&(s.vercelConnect=l),{definition:s,kind:`connection`}}function extractVercelConnectMarker(e){if(typeof e!=`object`||!e)return;let t=e.vercelConnect;if(typeof t!=`object`||!t)return;let n=t.connector;if(typeof n==`string`&&n.length!==0)return{connector:n}}export{compileConnectionDefinition};
1
+ import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";import{extractVercelConnectMetadata}from"#shared/vercel-connect-metadata.js";import{normalizeMcpClientConnectionDefinition,normalizeOpenApiConnectionDefinition}from"#internal/authored-definition/connection.js";import{readConnectionProtocol}from"#public/definitions/connections/protocol.js";import{ALLOWED_DYNAMIC_CONNECTION_EVENTS,assertResolverOnlyDynamicSentinel,isDynamicSentinel}from"#dynamic/definition.js";async function compileConnectionDefinition(e,t,n){let r=await loadModuleBackedDefinition({binding:n.binding,kind:`connection`,loadNamespace:n.loadNamespace,source:t}),i=`Expected the connection export "${t.exportName??`default`}" from "${t.logicalPath}" to match the public eve shape.`;if(isDynamicSentinel(r)){assertResolverOnlyDynamicSentinel(r,i);let e=Object.keys(r.events),n=e.find(e=>!ALLOWED_DYNAMIC_CONNECTION_EVENTS.has(e));if(n!==void 0)throw Error(`${i} Dynamic connections support only "session.started" and "turn.started" handlers. Unsupported event: "${n}".`);return{kind:`dynamic-connection`,definition:{eventNames:e,exportName:t.exportName,logicalPath:t.logicalPath,slug:t.connectionName,sourceId:t.sourceId,sourceKind:`module`}}}let a=readConnectionProtocol(r),o={connectionName:t.connectionName,exportName:t.exportName,logicalPath:t.logicalPath,sourceId:t.sourceId,sourceKind:`module`},s,c;if(a===`openapi`){let e=normalizeOpenApiConnectionDefinition(r,i);s={...o,description:e.description,protocol:`openapi`,url:e.baseUrl??``},c=e.auth}else{let e=normalizeMcpClientConnectionDefinition(r,i);s={...o,description:e.description,protocol:`mcp`,url:e.url},c=e.auth}let l=extractVercelConnectMetadata(typeof c!=`object`||!c?void 0:c.vercelConnect);return l!==void 0&&(s.vercelConnect=l),{definition:s,kind:`connection`}}export{compileConnectionDefinition};
@@ -1 +1 @@
1
- import{posix}from"node:path";import{ROOT_COMPILED_AGENT_NODE_ID}from"#compiler/manifest.js";import{mountRefNamespace,packageStateNamespace}from"#discover/extensions.js";import{canonicalSourceSlot}from"#compiler/source-graph.js";import"#compiler/normalize-subagent.js";function collectSelectedSourceIds(e){return new Set([...e.selected.values()].map(e=>e.sourceId))}function assertRootOnlyConfig(e,t,n){if(!t&&e.experimental?.workflow?.world!==void 0)throw Error(`Workflow world configuration is only supported on the root agent config. Remove "experimental.workflow.world" from "${n}".`)}function assertApplicationOverlayCanApplyToAllNodes(e){let t=e.find(e=>{let t=canonicalSourceSlot(e);return t===`agent`||t.startsWith(`channels/`)||t.startsWith(`schedules/`)||t.startsWith(`subagents/`)||t.startsWith(`extensions/`)});if(t!==void 0)throw Error(`Application programmatic source registered for all local nodes cannot declare "${t}".`)}function assertUniqueRegistryIds(e){let t=new Set;for(let n of e)for(let e of n.sources.keys()){if(t.has(e))throw Error(`Programmatic agent source id "${e}" is registered more than once.`);t.add(e)}}function assertRootOwnedSpecialTool(e,t){if(e.nodeId!==ROOT_COMPILED_AGENT_NODE_ID)throw Error(`${t} can only be enabled on the root agent.`);assertNonExtensionSpecialTool(e,t)}function assertNonExtensionSpecialTool(e,t){if(e.owner.kind===`extension`)throw Error(`${t} cannot be configured by an extension source.`)}function withExtensionNamespace(e,t){return t.kind===`extension`?{...e,extensionNamespace:t.namespace}:e}function assertUniqueBy(e,t,n){let r=new Set;for(let i of e){let e=t(i);if(r.has(e))throw Error(`Compiled ${n} "${e}" is declared more than once.`);r.add(e)}}function withDiagnosticsSummary(e,t){return e.map(e=>(e.configResolver,{...e,agent:{...e.agent,diagnosticsSummary:t}}))}function expectSubagentDescription(e,t){if(e.description===void 0||e.description.trim().length===0)throw Error(`Subagent "${t.logicalPath}" must define a non-empty description.`);return e.description}function createCompiledRemoteAgent(e){let t=e.source.logicalPath.endsWith(`.ts`)||e.source.logicalPath.endsWith(`.js`)?e.source.logicalPath:posix.join(e.source.logicalPath,`agent.ts`),n=e.source.sourceId,r={backing:e.binding.backing,logicalPath:t,owner:e.owner,usage:e.binding.usage},i={backing:{kind:`resource`,sourcePath:e.source.entryPath},binding:r,description:e.definition.description,entryPath:e.source.entryPath,logicalPath:t,name:e.source.subagentId,nodeId:e.nodeId,owner:e.owner,parentNodeId:e.parentNodeId,path:e.definition.path,rootPath:e.source.rootPath,sourceId:n,sourceKind:`module`};return e.sourceRef.exportName!==void 0&&Object.assign(i,{exportName:e.sourceRef.exportName}),e.definition.outputSchema!==void 0&&Object.assign(i,{outputSchema:e.definition.outputSchema}),e.definition.tool!==void 0&&Object.assign(i,{tool:e.definition.tool}),e.definition.url!==void 0&&Object.assign(i,{url:e.definition.url}),i}function compileExtensionMounts(e,t){let n=collectSelectedSourceIds(t);return e.resolvedExtensions.flatMap(t=>{let r=t.programmaticDeclaration??e.extensions.find(e=>mountRefNamespace(e.logicalPath)===t.namespace);return r===void 0||!n.has(r.sourceId)?[]:[{externalDependencies:[...t.externalDependencies],mountLogicalPath:r.logicalPath,mountSourceId:r.sourceId,namespace:t.namespace,packageName:t.packageName,packageNamespace:packageStateNamespace(t.packageName),sourceRoot:t.sourceRoot}]})}function mergeExternalDependencies(...e){return[...new Set(e.flatMap(e=>e??[]))]}export{assertApplicationOverlayCanApplyToAllNodes,assertNonExtensionSpecialTool,assertRootOnlyConfig,assertRootOwnedSpecialTool,assertUniqueBy,assertUniqueRegistryIds,collectSelectedSourceIds,compileExtensionMounts,createCompiledRemoteAgent,expectSubagentDescription,mergeExternalDependencies,withDiagnosticsSummary,withExtensionNamespace};
1
+ import{posix}from"node:path";import{ROOT_COMPILED_AGENT_NODE_ID}from"#compiler/manifest.js";import{mountRefNamespace,packageStateNamespace}from"#discover/extensions.js";import{canonicalSourceSlot}from"#compiler/source-graph.js";import"#compiler/normalize-subagent.js";function collectSelectedSourceIds(e){return new Set([...e.selected.values()].map(e=>e.sourceId))}function assertRootOnlyConfig(e,t,n){if(!t&&e.experimental?.workflow?.world!==void 0)throw Error(`Workflow world configuration is only supported on the root agent config. Remove "experimental.workflow.world" from "${n}".`)}function assertApplicationOverlayCanApplyToAllNodes(e){let t=e.find(e=>{let t=canonicalSourceSlot(e);return t===`agent`||t.startsWith(`channels/`)||t.startsWith(`schedules/`)||t.startsWith(`subagents/`)||t.startsWith(`extensions/`)});if(t!==void 0)throw Error(`Application programmatic source registered for all local nodes cannot declare "${t}".`)}function assertUniqueRegistryIds(e){let t=new Set;for(let n of e)for(let e of n.sources.keys()){if(t.has(e))throw Error(`Programmatic agent source id "${e}" is registered more than once.`);t.add(e)}}function assertRootOwnedSpecialTool(e,t){if(e.nodeId!==ROOT_COMPILED_AGENT_NODE_ID)throw Error(`${t} can only be enabled on the root agent.`);assertNonExtensionSpecialTool(e,t)}function assertNonExtensionSpecialTool(e,t){if(e.owner.kind===`extension`)throw Error(`${t} cannot be configured by an extension source.`)}function withExtensionNamespace(e,t){return t.kind===`extension`?{...e,extensionNamespace:t.namespace}:e}function assertUniqueBy(e,t,n){let r=new Set;for(let i of e){let e=t(i);if(r.has(e))throw Error(`Compiled ${n} "${e}" is declared more than once.`);r.add(e)}}function withDiagnosticsSummary(e,t){return e.map(e=>(e.configResolver,{...e,agent:{...e.agent,diagnosticsSummary:t}}))}function expectSubagentDescription(e,t){if(e.description===void 0||e.description.trim().length===0)throw Error(`Subagent "${t.logicalPath}" must define a non-empty description.`);return e.description}function createCompiledRemoteAgent(e){let t=e.source.logicalPath.endsWith(`.ts`)||e.source.logicalPath.endsWith(`.js`)?e.source.logicalPath:posix.join(e.source.logicalPath,`agent.ts`),n=e.source.sourceId,r={backing:e.binding.backing,logicalPath:t,owner:e.owner,usage:e.binding.usage},i={backing:{kind:`resource`,sourcePath:e.source.entryPath},binding:r,description:e.definition.description,entryPath:e.source.entryPath,logicalPath:t,name:e.source.subagentId,nodeId:e.nodeId,owner:e.owner,parentNodeId:e.parentNodeId,path:e.definition.path,rootPath:e.source.rootPath,sourceId:n,sourceKind:`module`};return e.sourceRef.exportName!==void 0&&Object.assign(i,{exportName:e.sourceRef.exportName}),e.definition.tool!==void 0&&Object.assign(i,{tool:e.definition.tool}),e.definition.url!==void 0&&Object.assign(i,{url:e.definition.url}),i}function compileExtensionMounts(e,t){let n=collectSelectedSourceIds(t);return e.resolvedExtensions.flatMap(t=>{let r=t.programmaticDeclaration??e.extensions.find(e=>mountRefNamespace(e.logicalPath)===t.namespace);return r===void 0||!n.has(r.sourceId)?[]:[{externalDependencies:[...t.externalDependencies],mountLogicalPath:r.logicalPath,mountSourceId:r.sourceId,namespace:t.namespace,packageName:t.packageName,packageNamespace:packageStateNamespace(t.packageName),sourceRoot:t.sourceRoot}]})}function mergeExternalDependencies(...e){return[...new Set(e.flatMap(e=>e??[]))]}export{assertApplicationOverlayCanApplyToAllNodes,assertNonExtensionSpecialTool,assertRootOnlyConfig,assertRootOwnedSpecialTool,assertUniqueBy,assertUniqueRegistryIds,collectSelectedSourceIds,compileExtensionMounts,createCompiledRemoteAgent,expectSubagentDescription,mergeExternalDependencies,withDiagnosticsSummary,withExtensionNamespace};
@@ -1,4 +1,3 @@
1
- import type { JsonObject } from "#shared/json.js";
2
1
  import { type DynamicToolEventName } from "#dynamic/definition.js";
3
2
  import type { LocalSubagentSourceRef } from "#discover/manifest.js";
4
3
  export type NormalizedSubagentConfig = {
@@ -13,7 +12,6 @@ export type NormalizedSubagentConfig = {
13
12
  } | {
14
13
  readonly description: string;
15
14
  readonly kind: "remote";
16
- readonly outputSchema?: JsonObject;
17
15
  readonly path: string;
18
16
  readonly tool?: boolean;
19
17
  readonly url?: string;
@@ -1 +1 @@
1
- import{EVE_SESSION_ROUTE_PATH}from"#protocol/routes.js";import{expectBoolean,expectFunction,expectObjectRecord,expectOnlyKnownKeys,expectString}from"#internal/authored-module.js";import{serializeOutputSchema}from"#tools/schema.js";import{isDynamicSentinel}from"#dynamic/definition.js";const ALLOWED_DYNAMIC_SUBAGENT_EVENTS=new Set([`session.started`,`turn.started`]);function normalizeSubagentConfig(e,t){if(isDynamicSentinel(e)){let n=expectObjectRecord(e,t);expectOnlyKnownKeys(n,[`build`,`events`,`kind`],t);let r=expectObjectRecord(n.events,t),i=[];for(let[e,n]of Object.entries(r)){if(!ALLOWED_DYNAMIC_SUBAGENT_EVENTS.has(e))throw Error(`${t} Dynamic subagents support only "session.started" and "turn.started" handlers.`);expectFunction(n,t),i.push(e)}let a=n.build===void 0?void 0:normalizeDynamicSubagentBuild(n.build,t);return a===void 0?{eventNames:i,kind:`dynamic`}:{build:a,eventNames:i,kind:`dynamic`}}if(typeof e==`object`&&e&&e.kind===`remote`){let n=expectObjectRecord(e,t);expectOnlyKnownKeys(n,[`auth`,`description`,`forwardPrincipal`,`headers`,`kind`,`outputSchema`,`path`,`tool`,`url`],t),n.forwardPrincipal!==void 0&&expectBoolean(n.forwardPrincipal,`${t} Expected "forwardPrincipal" to be a boolean.`);let r=serializeOutputSchema(n.outputSchema);return{description:expectString(n.description,t),kind:`remote`,outputSchema:r,path:n.path===void 0?EVE_SESSION_ROUTE_PATH:expectString(n.path,t),tool:n.tool===void 0?void 0:expectBoolean(n.tool,t),url:typeof n.url==`function`?void 0:expectString(n.url,t)}}return{definition:e,kind:`local`}}function assertRemoteAgentDefinitionHasNoLocalPackageEntries(e){let t=e.manifest,n=[t.connections.length>0?`connections/`:void 0,t.hooks.length>0?`hooks/`:void 0,t.instructions.length>0?`instructions`:void 0,t.lib.length>0?`lib/`:void 0,t.sandbox===null?void 0:`sandbox/`,t.sandboxWorkspaces.length>0?`sandbox/workspace/`:void 0,t.schedules.length>0?`schedules/`:void 0,t.skills.length>0?`skills/`:void 0,t.subagents.length>0?`subagents/`:void 0,t.tools.length>0?`tools/`:void 0].filter(e=>e!==void 0);if(n.length>0)throw Error(`Remote subagent definition "${e.logicalPath}" cannot include local package entries. Remove unsupported entries: ${n.join(`, `)}.`)}function normalizeDynamicSubagentBuild(e,t){let n=expectObjectRecord(e,t);if(expectOnlyKnownKeys(n,[`externalDependencies`],t),n.externalDependencies===void 0)return{};if(!Array.isArray(n.externalDependencies))throw Error(t);return{externalDependencies:n.externalDependencies.map(e=>expectString(e,t))}}export{assertRemoteAgentDefinitionHasNoLocalPackageEntries,normalizeSubagentConfig};
1
+ import{EVE_SESSION_ROUTE_PATH}from"#protocol/routes.js";import{expectBoolean,expectFunction,expectObjectRecord,expectOnlyKnownKeys,expectString}from"#internal/authored-module.js";import{isDynamicSentinel}from"#dynamic/definition.js";const ALLOWED_DYNAMIC_SUBAGENT_EVENTS=new Set([`session.started`,`turn.started`]);function normalizeSubagentConfig(e,t){if(isDynamicSentinel(e)){let n=expectObjectRecord(e,t);expectOnlyKnownKeys(n,[`build`,`events`,`kind`],t);let r=expectObjectRecord(n.events,t),i=[];for(let[e,n]of Object.entries(r)){if(!ALLOWED_DYNAMIC_SUBAGENT_EVENTS.has(e))throw Error(`${t} Dynamic subagents support only "session.started" and "turn.started" handlers.`);expectFunction(n,t),i.push(e)}let a=n.build===void 0?void 0:normalizeDynamicSubagentBuild(n.build,t);return a===void 0?{eventNames:i,kind:`dynamic`}:{build:a,eventNames:i,kind:`dynamic`}}if(typeof e==`object`&&e&&e.kind===`remote`){let n=expectObjectRecord(e,t);return expectOnlyKnownKeys(n,[`auth`,`description`,`forwardPrincipal`,`headers`,`kind`,`path`,`tool`,`url`],t),n.forwardPrincipal!==void 0&&expectBoolean(n.forwardPrincipal,`${t} Expected "forwardPrincipal" to be a boolean.`),{description:expectString(n.description,t),kind:`remote`,path:n.path===void 0?EVE_SESSION_ROUTE_PATH:expectString(n.path,t),tool:n.tool===void 0?void 0:expectBoolean(n.tool,t),url:typeof n.url==`function`?void 0:expectString(n.url,t)}}return{definition:e,kind:`local`}}function assertRemoteAgentDefinitionHasNoLocalPackageEntries(e){let t=e.manifest,n=[t.connections.length>0?`connections/`:void 0,t.hooks.length>0?`hooks/`:void 0,t.instructions.length>0?`instructions`:void 0,t.lib.length>0?`lib/`:void 0,t.sandbox===null?void 0:`sandbox/`,t.sandboxWorkspaces.length>0?`sandbox/workspace/`:void 0,t.schedules.length>0?`schedules/`:void 0,t.skills.length>0?`skills/`:void 0,t.subagents.length>0?`subagents/`:void 0,t.tools.length>0?`tools/`:void 0].filter(e=>e!==void 0);if(n.length>0)throw Error(`Remote subagent definition "${e.logicalPath}" cannot include local package entries. Remove unsupported entries: ${n.join(`, `)}.`)}function normalizeDynamicSubagentBuild(e,t){let n=expectObjectRecord(e,t);if(expectOnlyKnownKeys(n,[`externalDependencies`],t),n.externalDependencies===void 0)return{};if(!Array.isArray(n.externalDependencies))throw Error(t);return{externalDependencies:n.externalDependencies.map(e=>expectString(e,t))}}export{assertRemoteAgentDefinitionHasNoLocalPackageEntries,normalizeSubagentConfig};
@@ -1,5 +1,4 @@
1
1
  import { z } from "#compiled/zod/index.js";
2
- import type { JsonObject } from "#shared/json.js";
3
2
  import type { Node } from "#shared/node.js";
4
3
  import type { ModuleSourceRef } from "#shared/source-ref.js";
5
4
  import type { AgentSourceOwner, CompiledModuleBinding } from "#compiler/source-graph.js";
@@ -25,7 +24,6 @@ export type CompiledRemoteAgentNode = Readonly<ModuleSourceRef & Node & {
25
24
  name: string;
26
25
  owner: AgentSourceOwner;
27
26
  parentNodeId: string;
28
- outputSchema?: JsonObject;
29
27
  path: string;
30
28
  rootPath: string;
31
29
  tool?: boolean;
@@ -1 +1 @@
1
- import{z}from"#compiled/zod/index.js";import{jsonObjectSchema}from"#shared/json-schemas.js";const compiledRemoteAgentNodeSchema=z.object({backing:z.object({kind:z.literal(`resource`),sourcePath:z.string()}).strict(),binding:z.object({backing:z.discriminatedUnion(`kind`,[z.object({externalDependencies:z.array(z.string()).readonly(),extensionScope:z.object({namespace:z.string(),sourceRoot:z.string()}).strict().optional(),kind:z.literal(`filesystem`),sourcePath:z.string()}).strict(),z.object({kind:z.literal(`programmatic`),moduleId:z.string(),registryId:z.string(),revision:z.string(),semanticRevision:z.string().optional()}).strict()]),logicalPath:z.string(),owner:z.discriminatedUnion(`kind`,[z.object({kind:z.literal(`application`)}).strict(),z.object({feature:z.string(),kind:z.literal(`framework`)}).strict(),z.object({kind:z.literal(`extension`),namespace:z.string(),packageName:z.string()}).strict()]),usage:z.object({compile:z.boolean(),runtimeEntry:z.boolean()}).strict()}).strict(),description:z.string(),entryPath:z.string(),exportName:z.string().optional(),logicalPath:z.string(),name:z.string(),nodeId:z.string(),owner:z.discriminatedUnion(`kind`,[z.object({kind:z.literal(`application`)}).strict(),z.object({feature:z.string(),kind:z.literal(`framework`)}).strict(),z.object({kind:z.literal(`extension`),namespace:z.string(),packageName:z.string()}).strict()]),parentNodeId:z.string(),outputSchema:jsonObjectSchema.optional(),path:z.string(),rootPath:z.string(),tool:z.boolean().optional(),sourceId:z.string(),sourceKind:z.literal(`module`),url:z.string().optional()}).strict();export{compiledRemoteAgentNodeSchema};
1
+ import{z}from"#compiled/zod/index.js";const compiledRemoteAgentNodeSchema=z.object({backing:z.object({kind:z.literal(`resource`),sourcePath:z.string()}).strict(),binding:z.object({backing:z.discriminatedUnion(`kind`,[z.object({externalDependencies:z.array(z.string()).readonly(),extensionScope:z.object({namespace:z.string(),sourceRoot:z.string()}).strict().optional(),kind:z.literal(`filesystem`),sourcePath:z.string()}).strict(),z.object({kind:z.literal(`programmatic`),moduleId:z.string(),registryId:z.string(),revision:z.string(),semanticRevision:z.string().optional()}).strict()]),logicalPath:z.string(),owner:z.discriminatedUnion(`kind`,[z.object({kind:z.literal(`application`)}).strict(),z.object({feature:z.string(),kind:z.literal(`framework`)}).strict(),z.object({kind:z.literal(`extension`),namespace:z.string(),packageName:z.string()}).strict()]),usage:z.object({compile:z.boolean(),runtimeEntry:z.boolean()}).strict()}).strict(),description:z.string(),entryPath:z.string(),exportName:z.string().optional(),logicalPath:z.string(),name:z.string(),nodeId:z.string(),owner:z.discriminatedUnion(`kind`,[z.object({kind:z.literal(`application`)}).strict(),z.object({feature:z.string(),kind:z.literal(`framework`)}).strict(),z.object({kind:z.literal(`extension`),namespace:z.string(),packageName:z.string()}).strict()]),parentNodeId:z.string(),path:z.string(),rootPath:z.string(),tool:z.boolean().optional(),sourceId:z.string(),sourceKind:z.literal(`module`),url:z.string().optional()}).strict();export{compiledRemoteAgentNodeSchema};
@@ -1 +1 @@
1
- import{createHash}from"node:crypto";import{cp,mkdir,readFile,readdir,rm}from"node:fs/promises";import{join,posix}from"node:path";import{normalizeLogicalPath}from"#discover/filesystem.js";import{ROOT_COMPILED_AGENT_NODE_ID,deriveResourceRootEntries}from"#compiler/manifest.js";import{normalizeSkillPackage,writeSkillPackageDirectory}from"#shared/skill-package.js";const RESOURCES_DIRECTORY=`workspace-resources`,RESOURCE_SKILLS_DIRECTORY=`skills`;async function materializeWorkspaceResources(e){let t=join(e.compileDirectoryPath,RESOURCES_DIRECTORY);await rm(t,{force:!0,recursive:!0});let n=await materializeNode({nodeId:ROOT_COMPILED_AGENT_NODE_ID,resourcesRoot:t,manifest:e.manifest}),r=await Promise.all(e.manifest.subagents.map(async e=>e.configResolver===void 0?{...e,agent:await materializeNode({nodeId:e.nodeId,resourcesRoot:t,manifest:e.agent})}:{...e,agent:await materializeNode({nodeId:e.nodeId,resourcesRoot:t,manifest:e.agent}),configResolver:e.configResolver}));return{...n,kind:e.manifest.kind,extensionMounts:e.manifest.extensionMounts,subagents:r,version:e.manifest.version}}function createResourceRoot(e,t,n){return{contentHash:n,logicalPath:normalizeLogicalPath(join(RESOURCES_DIRECTORY,t)),rootEntries:deriveResourceRootEntries({sandboxWorkspaces:e.sandboxWorkspaces,skills:e.skills})}}async function materializeNode(e){let t=join(e.resourcesRoot,e.nodeId);await mkdir(t,{recursive:!0});let n=join(t,`workspace`);await Promise.all([mkdir(n,{recursive:!0}),mkdir(join(t,RESOURCE_SKILLS_DIRECTORY),{recursive:!0})]);for(let t of e.manifest.sandboxWorkspaces)await copyDirectoryContents({sourcePath:t.sourcePath,targetPath:n});for(let n of e.manifest.skills)await materializeSkill({nodeRoot:t,skill:n});let r=await hashWorkspaceResourceRoot(t);return{...e.manifest,skills:e.manifest.skills.map(stripSkillPackageFiles),workspaceResourceRoot:createResourceRoot(e.manifest,e.nodeId,r)}}async function materializeSkill(e){let t=join(e.nodeRoot,RESOURCE_SKILLS_DIRECTORY,e.skill.name);if(e.skill.sourceKind===`skill-package`){await cp(e.skill.rootPath,t,{recursive:!0});return}await writeSkillPackageDirectory({rootPath:e.nodeRoot,skill:normalizeSkillPackage(e.skill)})}function stripSkillPackageFiles(e){let{files:t,...n}=e;return n}async function copyDirectoryContents(e){let t=await readdir(e.sourcePath,{withFileTypes:!0});await mkdir(e.targetPath,{recursive:!0});for(let n of t)(n.isDirectory()||n.isFile())&&await cp(join(e.sourcePath,n.name),join(e.targetPath,n.name),{recursive:!0})}async function hashWorkspaceResourceRoot(e){let t=await listWorkspaceResourceFiles({logicalDirectoryPath:`.`,sourceDirectoryPath:e});if(t.sort((e,t)=>e.logicalPath.localeCompare(t.logicalPath)),t.length===0)return;let n=createHash(`sha256`);n.update(`eve-workspace-resource-root-v1\0`);for(let e of t){let t=await readFile(e.sourcePath);n.update(e.logicalPath),n.update(`\0`),n.update(String(t.byteLength)),n.update(`\0`),n.update(t),n.update(`\0`)}return n.digest(`hex`)}async function listWorkspaceResourceFiles(e){let t=[],n=await readdir(e.sourceDirectoryPath,{withFileTypes:!0});for(let r of n){if(!r.isDirectory()&&!r.isFile())continue;let n=join(e.sourceDirectoryPath,r.name),i=posix.join(e.logicalDirectoryPath,r.name);if(r.isDirectory()){t.push(...await listWorkspaceResourceFiles({logicalDirectoryPath:i,sourceDirectoryPath:n}));continue}t.push({logicalPath:i,sourcePath:n})}return t}export{materializeWorkspaceResources};
1
+ import{createHash}from"node:crypto";import{cp,mkdir,readFile,readdir,rm}from"node:fs/promises";import{join,posix}from"node:path";import{normalizeLogicalPath}from"#discover/filesystem.js";import{ROOT_COMPILED_AGENT_NODE_ID,deriveResourceRootEntries}from"#compiler/manifest.js";import{normalizeSkillPackage,writeSkillPackageDirectory}from"#shared/skill-package.js";const RESOURCES_DIRECTORY=`workspace-resources`,RESOURCE_SKILLS_DIRECTORY=`skills`;async function materializeWorkspaceResources(e){let t=join(e.compileDirectoryPath,RESOURCES_DIRECTORY);await rm(t,{force:!0,recursive:!0});let n=await materializeNode({nodeId:ROOT_COMPILED_AGENT_NODE_ID,resourcesRoot:t,manifest:e.manifest}),r=await Promise.all(e.manifest.subagents.map(async e=>e.configResolver===void 0?{...e,agent:await materializeNode({nodeId:e.nodeId,resourcesRoot:t,manifest:e.agent})}:{...e,agent:await materializeNode({nodeId:e.nodeId,resourcesRoot:t,manifest:e.agent}),configResolver:e.configResolver}));return{...n,kind:e.manifest.kind,extensionMounts:e.manifest.extensionMounts,subagents:r,version:e.manifest.version}}function resourceDirectoryName(e){return encodeURIComponent(e)}function createResourceRoot(e,t,n){return{contentHash:n,logicalPath:normalizeLogicalPath(join(RESOURCES_DIRECTORY,resourceDirectoryName(t))),rootEntries:deriveResourceRootEntries({sandboxWorkspaces:e.sandboxWorkspaces,skills:e.skills})}}async function materializeNode(e){let t=join(e.resourcesRoot,resourceDirectoryName(e.nodeId));await mkdir(t,{recursive:!0});let n=join(t,`workspace`);await Promise.all([mkdir(n,{recursive:!0}),mkdir(join(t,RESOURCE_SKILLS_DIRECTORY),{recursive:!0})]);for(let t of e.manifest.sandboxWorkspaces)await copyDirectoryContents({sourcePath:t.sourcePath,targetPath:n});for(let n of e.manifest.skills)await materializeSkill({nodeRoot:t,skill:n});let r=await hashWorkspaceResourceRoot(t);return{...e.manifest,skills:e.manifest.skills.map(stripSkillPackageFiles),workspaceResourceRoot:createResourceRoot(e.manifest,e.nodeId,r)}}async function materializeSkill(e){let t=join(e.nodeRoot,RESOURCE_SKILLS_DIRECTORY,e.skill.name);if(e.skill.sourceKind===`skill-package`){await cp(e.skill.rootPath,t,{recursive:!0});return}await writeSkillPackageDirectory({rootPath:e.nodeRoot,skill:normalizeSkillPackage(e.skill)})}function stripSkillPackageFiles(e){let{files:t,...n}=e;return n}async function copyDirectoryContents(e){let t=await readdir(e.sourcePath,{withFileTypes:!0});await mkdir(e.targetPath,{recursive:!0});for(let n of t)(n.isDirectory()||n.isFile())&&await cp(join(e.sourcePath,n.name),join(e.targetPath,n.name),{recursive:!0})}async function hashWorkspaceResourceRoot(e){let t=await listWorkspaceResourceFiles({logicalDirectoryPath:`.`,sourceDirectoryPath:e});if(t.sort((e,t)=>e.logicalPath.localeCompare(t.logicalPath)),t.length===0)return;let n=createHash(`sha256`);n.update(`eve-workspace-resource-root-v1\0`);for(let e of t){let t=await readFile(e.sourcePath);n.update(e.logicalPath),n.update(`\0`),n.update(String(t.byteLength)),n.update(`\0`),n.update(t),n.update(`\0`)}return n.digest(`hex`)}async function listWorkspaceResourceFiles(e){let t=[],n=await readdir(e.sourceDirectoryPath,{withFileTypes:!0});for(let r of n){if(!r.isDirectory()&&!r.isFile())continue;let n=join(e.sourceDirectoryPath,r.name),i=posix.join(e.logicalDirectoryPath,r.name);if(r.isDirectory()){t.push(...await listWorkspaceResourceFiles({logicalDirectoryPath:i,sourceDirectoryPath:n}));continue}t.push({logicalPath:i,sourcePath:n})}return t}export{materializeWorkspaceResources};
@@ -1 +1 @@
1
- import{createLogger}from"#internal/logging.js";import{SessionDynamicSubagentRuntimeRevisionKey,SessionDynamicSubagentSelectionsKey,TurnDynamicSubagentSelectionsKey}from"#context/keys.js";import{toErrorMessage}from"#shared/errors.js";import{buildResolveContext}from"#context/dynamic-resolve-context.js";import{createPreparedWorkflowToolHarnessDefinition}from"#execution/tools/workflow/background.js";import{createPreparedRuntimeSubagentTool}from"#runtime/subagents/registry.js";import{normalizeDynamicSubagentAgentConfig}from"#runtime/subagents/dynamic-agent-config.js";import{normalizeDynamicRemoteAgentConfig}from"#runtime/subagents/dynamic-remote-agent-config.js";const log=createLogger(`dynamic-subagents`),ALLOWED_DYNAMIC_SUBAGENT_EVENTS=new Set([`session.started`,`turn.started`]);async function resolveSelections(e){let t=await Promise.allSettled(e.resolvers.map(async t=>{let n=t.events[e.event.type];if(n===void 0)return[t.nodeId,null];let r=await n(e.event,buildResolveContext(e.ctx,e.messages));if(r==null)return[t.nodeId,null];if(isRemoteAgentDefinition(r)){let e=await normalizeDynamicRemoteAgentConfig({name:t.name,value:r}),n=t.tool===!1?{...e,tool:!1}:e,i=createPreparedRuntimeSubagentTool({description:n.description,kind:`remote`,logicalPath:t.logicalPath,name:t.name,nodeId:t.nodeId,outputSchema:n.outputSchema,path:n.path,sourceId:t.sourceId,sourceKind:t.sourceKind,tool:n.tool,url:n.url});return[t.nodeId,{kind:`remote`,prepared:i,remoteAgent:n}]}let i=await normalizeDynamicSubagentAgentConfig({name:t.name,state:e.ctx,value:r}),a=t.tool===!1?{...i,tool:!1}:i,o=createPreparedRuntimeSubagentTool({description:a.description,kind:`subagent`,logicalPath:t.logicalPath,name:t.name,nodeId:t.nodeId,sourceId:t.sourceId,sourceKind:t.sourceKind,tool:a.tool});return[t.nodeId,{agentConfig:a,kind:`subagent`,prepared:o}]})),n={};for(let r=0;r<t.length;r+=1){let i=t[r],a=e.resolvers[r];if(i.status===`rejected`){log.error(`Dynamic subagent resolver (${e.event.type}) threw — omitting subagent.`,{error:toErrorMessage(i.reason),subagentName:a.name}),n[a.nodeId]=null;continue}n[i.value[0]]=i.value[1]}return n}function isRemoteAgentDefinition(e){return typeof e==`object`&&!!e&&e.kind===`remote`}async function dispatchDynamicSubagentEvent(e){if(!ALLOWED_DYNAMIC_SUBAGENT_EVENTS.has(e.event.type))return;let t=e.resolvers.filter(t=>t.eventNames.includes(e.event.type)),n=await resolveSelections({...e,resolvers:t});e.event.type===`session.started`?e.ctx.set(SessionDynamicSubagentSelectionsKey,n):e.ctx.set(TurnDynamicSubagentSelectionsKey,n)}async function refreshDynamicSessionSubagentsForRuntimeRevision(e){if(e.ctx.get(SessionDynamicSubagentRuntimeRevisionKey)===e.runtimeRevision)return;let t=e.resolvers.filter(e=>e.eventNames.includes(`session.started`)),n=await resolveSelections({...e,resolvers:t});e.ctx.set(SessionDynamicSubagentSelectionsKey,n),e.ctx.set(SessionDynamicSubagentRuntimeRevisionKey,e.runtimeRevision)}function buildDynamicSubagentTools(e){let t=e.get(SessionDynamicSubagentSelectionsKey)??{},n=e.get(TurnDynamicSubagentSelectionsKey)??{},r={...t,...n},i=[],a=new Set;for(let e of Object.values(r))if(e!==null){if(a.has(e.prepared.name))throw Error(`Found multiple active dynamic subagents named "${e.prepared.name}". Subagent names must be unique at runtime.`);a.add(e.prepared.name),(e.kind===`subagent`?e.agentConfig.tool!==!1:e.remoteAgent.tool!==!1)&&i.push(createPreparedWorkflowToolHarnessDefinition(e.prepared))}return i}function getDynamicSubagentSelection(e,t){let n=e.get(TurnDynamicSubagentSelectionsKey)??{};return Object.hasOwn(n,t)?n[t]??void 0:(e.get(SessionDynamicSubagentSelectionsKey)??{})[t]??void 0}export{buildDynamicSubagentTools,dispatchDynamicSubagentEvent,getDynamicSubagentSelection,refreshDynamicSessionSubagentsForRuntimeRevision};
1
+ import{createLogger}from"#internal/logging.js";import{SessionDynamicSubagentRuntimeRevisionKey,SessionDynamicSubagentSelectionsKey,TurnDynamicSubagentSelectionsKey}from"#context/keys.js";import{toErrorMessage}from"#shared/errors.js";import{buildResolveContext}from"#context/dynamic-resolve-context.js";import{createPreparedWorkflowToolHarnessDefinition}from"#execution/tools/workflow/background.js";import{createPreparedRuntimeSubagentTool}from"#runtime/subagents/registry.js";import{normalizeDynamicSubagentAgentConfig}from"#runtime/subagents/dynamic-agent-config.js";import{normalizeDynamicRemoteAgentConfig}from"#runtime/subagents/dynamic-remote-agent-config.js";const log=createLogger(`dynamic-subagents`),ALLOWED_DYNAMIC_SUBAGENT_EVENTS=new Set([`session.started`,`turn.started`]);async function resolveSelections(e){let t=await Promise.allSettled(e.resolvers.map(async t=>{let n=t.events[e.event.type];if(n===void 0)return[t.nodeId,null];let r=await n(e.event,buildResolveContext(e.ctx,e.messages));if(r==null)return[t.nodeId,null];if(isRemoteAgentDefinition(r)){let e=await normalizeDynamicRemoteAgentConfig({name:t.name,value:r}),n=t.tool===!1?{...e,tool:!1}:e,i=createPreparedRuntimeSubagentTool({description:n.description,kind:`remote`,logicalPath:t.logicalPath,name:t.name,nodeId:t.nodeId,path:n.path,sourceId:t.sourceId,sourceKind:t.sourceKind,tool:n.tool,url:n.url});return[t.nodeId,{kind:`remote`,prepared:i,remoteAgent:n}]}let i=await normalizeDynamicSubagentAgentConfig({name:t.name,state:e.ctx,value:r}),a=t.tool===!1?{...i,tool:!1}:i,o=createPreparedRuntimeSubagentTool({description:a.description,kind:`subagent`,logicalPath:t.logicalPath,name:t.name,nodeId:t.nodeId,sourceId:t.sourceId,sourceKind:t.sourceKind,tool:a.tool});return[t.nodeId,{agentConfig:a,kind:`subagent`,prepared:o}]})),n={};for(let r=0;r<t.length;r+=1){let i=t[r],a=e.resolvers[r];if(i.status===`rejected`){log.error(`Dynamic subagent resolver (${e.event.type}) threw — omitting subagent.`,{error:toErrorMessage(i.reason),subagentName:a.name}),n[a.nodeId]=null;continue}n[i.value[0]]=i.value[1]}return n}function isRemoteAgentDefinition(e){return typeof e==`object`&&!!e&&e.kind===`remote`}async function dispatchDynamicSubagentEvent(e){if(!ALLOWED_DYNAMIC_SUBAGENT_EVENTS.has(e.event.type))return;let t=e.resolvers.filter(t=>t.eventNames.includes(e.event.type)),n=await resolveSelections({...e,resolvers:t});e.event.type===`session.started`?e.ctx.set(SessionDynamicSubagentSelectionsKey,n):e.ctx.set(TurnDynamicSubagentSelectionsKey,n)}async function refreshDynamicSessionSubagentsForRuntimeRevision(e){if(e.ctx.get(SessionDynamicSubagentRuntimeRevisionKey)===e.runtimeRevision)return;let t=e.resolvers.filter(e=>e.eventNames.includes(`session.started`)),n=await resolveSelections({...e,resolvers:t});e.ctx.set(SessionDynamicSubagentSelectionsKey,n),e.ctx.set(SessionDynamicSubagentRuntimeRevisionKey,e.runtimeRevision)}function buildDynamicSubagentTools(e){let t=e.get(SessionDynamicSubagentSelectionsKey)??{},n=e.get(TurnDynamicSubagentSelectionsKey)??{},r={...t,...n},i=[],a=new Set;for(let e of Object.values(r))if(e!==null){if(a.has(e.prepared.name))throw Error(`Found multiple active dynamic subagents named "${e.prepared.name}". Subagent names must be unique at runtime.`);a.add(e.prepared.name),(e.kind===`subagent`?e.agentConfig.tool!==!1:e.remoteAgent.tool!==!1)&&i.push(createPreparedWorkflowToolHarnessDefinition(e.prepared))}return i}function getDynamicSubagentSelection(e,t){let n=e.get(TurnDynamicSubagentSelectionsKey)??{};return Object.hasOwn(n,t)?n[t]??void 0:(e.get(SessionDynamicSubagentSelectionsKey)??{})[t]??void 0}export{buildDynamicSubagentTools,dispatchDynamicSubagentEvent,getDynamicSubagentSelection,refreshDynamicSessionSubagentsForRuntimeRevision};
@@ -14,7 +14,6 @@ import type { PersistedDynamicToolMetadata } from "#context/dynamic-tool-metadat
14
14
  import type { DynamicSubagentAgentConfig } from "#runtime/subagents/dynamic-agent-config.js";
15
15
  import type { DynamicRemoteAgentConfig } from "#runtime/subagents/dynamic-remote-agent-config.js";
16
16
  import type { SandboxAccess } from "#sandbox/state.js";
17
- import type { RunMode } from "#shared/run-mode.js";
18
17
  import type { HistoryViewProjector } from "#shared/history-view.js";
19
18
  import type { RuntimeModelReference } from "#runtime/agent/bootstrap.js";
20
19
  import type { PreparedRuntimeDelegationTool } from "#runtime/sessions/turn.js";
@@ -93,8 +92,6 @@ export interface ActiveChannelDelivery {
93
92
  }
94
93
  export declare const ActiveChannelDeliveriesKey: ContextKey<readonly ActiveChannelDelivery[]>;
95
94
  export declare const ChannelInstrumentationKey: ContextKey<ChannelInstrumentationProjection>;
96
- /** Trace ceiling and immutable origin accepted from a trusted forwarding deployment. */
97
- export declare const ModeKey: ContextKey<RunMode>;
98
95
  export declare const ParentSessionKey: ContextKey<SessionParent>;
99
96
  /** Separate from {@link ParentSessionKey} so it stays out of what extensions read. */
100
97
  export declare const ParentTraceContextKey: ContextKey<SessionTraceContext>;
@@ -1 +1 @@
1
- import{SESSION_INBOX_CONTEXT_KEY}from"#execution/session-inbox/address.js";import{ContextKey}from"#context/key.js";import{SESSION_CALLBACK_CONTEXT_KEY_NAME,TASK_DELIVERY_POLICY_CONTEXT_KEY_NAME}from"#context/key-names.js";const AuthKey=new ContextKey(`eve.auth`),InitiatorAuthKey=new ContextKey(`eve.initiatorAuth`),SessionIdKey=new ContextKey(`eve.sessionId`),ConversationIdKey=new ContextKey(`eve.conversationId`),SessionInboxKey=new ContextKey(SESSION_INBOX_CONTEXT_KEY),ContinuationTokenKey=new ContextKey(`eve.continuationToken`),ContinuationHookTokensKey=new ContextKey(`eve.continuationHookTokens`),ChannelRequestIdKey=new ContextKey(`eve.channelRequestId`),LocalDevRequestKey=new ContextKey(`eve.internal.localDevRequest`),ScheduleIdKey=new ContextKey(`eve.scheduleId`),SessionTitleKey=new ContextKey(`eve.sessionTitle`),ChannelDeliveryKey=new ContextKey(`eve.channelDelivery`),TurnDeliveryIdsKey=new ContextKey(`eve.turnDeliveryIds`),TaskDeliveryPolicyKey=new ContextKey(TASK_DELIVERY_POLICY_CONTEXT_KEY_NAME),TurnTaskDeliveryKey=new ContextKey(`eve.turnTaskDelivery`),HistoryStateKey=new ContextKey(`eve.historyState`),ActiveChannelDeliveriesKey=new ContextKey(`eve.activeChannelDeliveries`),ChannelInstrumentationKey=new ContextKey(`eve.channelInstrumentation`),ModeKey=new ContextKey(`eve.mode`),ParentSessionKey=new ContextKey(`eve.parentSession`),ParentTraceContextKey=new ContextKey(`eve.parentTraceContext`),SessionTraceSeedKey=new ContextKey(`eve.sessionTraceSeed`),OtelTraceEnabledKey=new ContextKey(`eve.otelTraceEnabled`),CapabilitiesKey=new ContextKey(`eve.capabilities`),ActivityObserverKey=new ContextKey(`eve.activityObserver`),ActivityRootTurnIdKey=new ContextKey(`eve.activityRootTurnId`),ActivityPendingBlockersKey=new ContextKey(`eve.activityPendingBlockers`),SessionCallbackKey=new ContextKey(SESSION_CALLBACK_CONTEXT_KEY_NAME),SessionKey=new ContextKey(`eve.session`),SandboxKey=new ContextKey(`eve.sandbox`),HandleEventKey=new ContextKey(`eve.internal.handleEvent`),StaticModelReferenceKey=new ContextKey(`eve.staticModelReference`),SessionDynamicModelReferenceKey=new ContextKey(`eve.sessionDynamicModelReference`),TurnDynamicModelReferenceKey=new ContextKey(`eve.turnDynamicModelReference`),RuntimeModelMetadataCacheKey=new ContextKey(`eve.runtimeModelMetadataCache`),LiveStepDynamicModelSelectionKey=new ContextKey(`eve.liveStepDynamicModelSelection`),SessionDynamicToolMetadataKey=new ContextKey(`eve.sessionDynamicToolMetadata`),SessionDynamicToolRuntimeRevisionKey=new ContextKey(`eve.sessionDynamicToolRuntimeRevision`),TurnDynamicToolMetadataKey=new ContextKey(`eve.turnDynamicToolMetadata`),TurnMemoryLocksKey=new ContextKey(`eve.memory.turnLocks`),PreparedMemoryPreambleKey=new ContextKey(`eve.memory.preparedPreamble`),PendingMemoryCommitKey=new ContextKey(`eve.memory.pendingCommit`),PreparedMemoryCompactionKey=new ContextKey(`eve.memory.preparedCompaction`),StepDynamicToolMetadataKey=new ContextKey(`eve.stepDynamicToolMetadata`),SessionDynamicSubagentSelectionsKey=new ContextKey(`eve.sessionDynamicSubagentSelections`),TurnDynamicSubagentSelectionsKey=new ContextKey(`eve.turnDynamicSubagentSelections`),SessionDynamicSubagentRuntimeRevisionKey=new ContextKey(`eve.sessionDynamicSubagentRuntimeRevision`),DynamicSubagentAgentConfigKey=new ContextKey(`eve.dynamicSubagentAgentConfig`),DynamicSkillManifestKey=new ContextKey(`eve.dynamicSkillManifest`),DynamicSkillSandboxKey=new ContextKey(`eve.dynamicSkillSandbox`),SessionDynamicInstructionsKey=new ContextKey(`eve.sessionDynamicInstructions`),TurnDynamicInstructionsKey=new ContextKey(`eve.turnDynamicInstructions`),DynamicInstructionResolveMessagesKey=new ContextKey(`eve.dynamicInstructionResolveMessages`),PendingDynamicInstructionUserMessagesKey=new ContextKey(`eve.pendingDynamicInstructionUserMessages`);export{ActiveChannelDeliveriesKey,ActivityObserverKey,ActivityPendingBlockersKey,ActivityRootTurnIdKey,AuthKey,CapabilitiesKey,ChannelDeliveryKey,ChannelInstrumentationKey,ChannelRequestIdKey,ContinuationHookTokensKey,ContinuationTokenKey,ConversationIdKey,DynamicInstructionResolveMessagesKey,DynamicSkillManifestKey,DynamicSkillSandboxKey,DynamicSubagentAgentConfigKey,HandleEventKey,HistoryStateKey,InitiatorAuthKey,LiveStepDynamicModelSelectionKey,LocalDevRequestKey,ModeKey,OtelTraceEnabledKey,ParentSessionKey,ParentTraceContextKey,PendingDynamicInstructionUserMessagesKey,PendingMemoryCommitKey,PreparedMemoryCompactionKey,PreparedMemoryPreambleKey,RuntimeModelMetadataCacheKey,SandboxKey,ScheduleIdKey,SessionCallbackKey,SessionDynamicInstructionsKey,SessionDynamicModelReferenceKey,SessionDynamicSubagentRuntimeRevisionKey,SessionDynamicSubagentSelectionsKey,SessionDynamicToolMetadataKey,SessionDynamicToolRuntimeRevisionKey,SessionIdKey,SessionInboxKey,SessionKey,SessionTitleKey,SessionTraceSeedKey,StaticModelReferenceKey,StepDynamicToolMetadataKey,TaskDeliveryPolicyKey,TurnDeliveryIdsKey,TurnDynamicInstructionsKey,TurnDynamicModelReferenceKey,TurnDynamicSubagentSelectionsKey,TurnDynamicToolMetadataKey,TurnMemoryLocksKey,TurnTaskDeliveryKey};
1
+ import{SESSION_INBOX_CONTEXT_KEY}from"#execution/session-inbox/address.js";import{ContextKey}from"#context/key.js";import{SESSION_CALLBACK_CONTEXT_KEY_NAME,TASK_DELIVERY_POLICY_CONTEXT_KEY_NAME}from"#context/key-names.js";const AuthKey=new ContextKey(`eve.auth`),InitiatorAuthKey=new ContextKey(`eve.initiatorAuth`),SessionIdKey=new ContextKey(`eve.sessionId`),ConversationIdKey=new ContextKey(`eve.conversationId`),SessionInboxKey=new ContextKey(SESSION_INBOX_CONTEXT_KEY),ContinuationTokenKey=new ContextKey(`eve.continuationToken`),ContinuationHookTokensKey=new ContextKey(`eve.continuationHookTokens`),ChannelRequestIdKey=new ContextKey(`eve.channelRequestId`),LocalDevRequestKey=new ContextKey(`eve.internal.localDevRequest`),ScheduleIdKey=new ContextKey(`eve.scheduleId`),SessionTitleKey=new ContextKey(`eve.sessionTitle`),ChannelDeliveryKey=new ContextKey(`eve.channelDelivery`),TurnDeliveryIdsKey=new ContextKey(`eve.turnDeliveryIds`),TaskDeliveryPolicyKey=new ContextKey(TASK_DELIVERY_POLICY_CONTEXT_KEY_NAME),TurnTaskDeliveryKey=new ContextKey(`eve.turnTaskDelivery`),HistoryStateKey=new ContextKey(`eve.historyState`),ActiveChannelDeliveriesKey=new ContextKey(`eve.activeChannelDeliveries`),ChannelInstrumentationKey=new ContextKey(`eve.channelInstrumentation`),ParentSessionKey=new ContextKey(`eve.parentSession`),ParentTraceContextKey=new ContextKey(`eve.parentTraceContext`),SessionTraceSeedKey=new ContextKey(`eve.sessionTraceSeed`),OtelTraceEnabledKey=new ContextKey(`eve.otelTraceEnabled`),CapabilitiesKey=new ContextKey(`eve.capabilities`),ActivityObserverKey=new ContextKey(`eve.activityObserver`),ActivityRootTurnIdKey=new ContextKey(`eve.activityRootTurnId`),ActivityPendingBlockersKey=new ContextKey(`eve.activityPendingBlockers`),SessionCallbackKey=new ContextKey(SESSION_CALLBACK_CONTEXT_KEY_NAME),SessionKey=new ContextKey(`eve.session`),SandboxKey=new ContextKey(`eve.sandbox`),HandleEventKey=new ContextKey(`eve.internal.handleEvent`),StaticModelReferenceKey=new ContextKey(`eve.staticModelReference`),SessionDynamicModelReferenceKey=new ContextKey(`eve.sessionDynamicModelReference`),TurnDynamicModelReferenceKey=new ContextKey(`eve.turnDynamicModelReference`),RuntimeModelMetadataCacheKey=new ContextKey(`eve.runtimeModelMetadataCache`),LiveStepDynamicModelSelectionKey=new ContextKey(`eve.liveStepDynamicModelSelection`),SessionDynamicToolMetadataKey=new ContextKey(`eve.sessionDynamicToolMetadata`),SessionDynamicToolRuntimeRevisionKey=new ContextKey(`eve.sessionDynamicToolRuntimeRevision`),TurnDynamicToolMetadataKey=new ContextKey(`eve.turnDynamicToolMetadata`),TurnMemoryLocksKey=new ContextKey(`eve.memory.turnLocks`),PreparedMemoryPreambleKey=new ContextKey(`eve.memory.preparedPreamble`),PendingMemoryCommitKey=new ContextKey(`eve.memory.pendingCommit`),PreparedMemoryCompactionKey=new ContextKey(`eve.memory.preparedCompaction`),StepDynamicToolMetadataKey=new ContextKey(`eve.stepDynamicToolMetadata`),SessionDynamicSubagentSelectionsKey=new ContextKey(`eve.sessionDynamicSubagentSelections`),TurnDynamicSubagentSelectionsKey=new ContextKey(`eve.turnDynamicSubagentSelections`),SessionDynamicSubagentRuntimeRevisionKey=new ContextKey(`eve.sessionDynamicSubagentRuntimeRevision`),DynamicSubagentAgentConfigKey=new ContextKey(`eve.dynamicSubagentAgentConfig`),DynamicSkillManifestKey=new ContextKey(`eve.dynamicSkillManifest`),DynamicSkillSandboxKey=new ContextKey(`eve.dynamicSkillSandbox`),SessionDynamicInstructionsKey=new ContextKey(`eve.sessionDynamicInstructions`),TurnDynamicInstructionsKey=new ContextKey(`eve.turnDynamicInstructions`),DynamicInstructionResolveMessagesKey=new ContextKey(`eve.dynamicInstructionResolveMessages`),PendingDynamicInstructionUserMessagesKey=new ContextKey(`eve.pendingDynamicInstructionUserMessages`);export{ActiveChannelDeliveriesKey,ActivityObserverKey,ActivityPendingBlockersKey,ActivityRootTurnIdKey,AuthKey,CapabilitiesKey,ChannelDeliveryKey,ChannelInstrumentationKey,ChannelRequestIdKey,ContinuationHookTokensKey,ContinuationTokenKey,ConversationIdKey,DynamicInstructionResolveMessagesKey,DynamicSkillManifestKey,DynamicSkillSandboxKey,DynamicSubagentAgentConfigKey,HandleEventKey,HistoryStateKey,InitiatorAuthKey,LiveStepDynamicModelSelectionKey,LocalDevRequestKey,OtelTraceEnabledKey,ParentSessionKey,ParentTraceContextKey,PendingDynamicInstructionUserMessagesKey,PendingMemoryCommitKey,PreparedMemoryCompactionKey,PreparedMemoryPreambleKey,RuntimeModelMetadataCacheKey,SandboxKey,ScheduleIdKey,SessionCallbackKey,SessionDynamicInstructionsKey,SessionDynamicModelReferenceKey,SessionDynamicSubagentRuntimeRevisionKey,SessionDynamicSubagentSelectionsKey,SessionDynamicToolMetadataKey,SessionDynamicToolRuntimeRevisionKey,SessionIdKey,SessionInboxKey,SessionKey,SessionTitleKey,SessionTraceSeedKey,StaticModelReferenceKey,StepDynamicToolMetadataKey,TaskDeliveryPolicyKey,TurnDeliveryIdsKey,TurnDynamicInstructionsKey,TurnDynamicModelReferenceKey,TurnDynamicSubagentSelectionsKey,TurnDynamicToolMetadataKey,TurnMemoryLocksKey,TurnTaskDeliveryKey};
@@ -50,5 +50,6 @@ export declare function memoryOperationId(input: {
50
50
  readonly sequence: number;
51
51
  readonly sessionId: string;
52
52
  readonly slot: string;
53
+ readonly stepIndex?: number;
53
54
  readonly turnId: string | null;
54
55
  }): string;