eve 0.63.0 → 0.64.1

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 (485) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist/src/ai/evaluate.js +1 -1
  3. package/dist/src/channel/channel-address.d.ts +4 -1
  4. package/dist/src/channel/channel-address.js +1 -1
  5. package/dist/src/channel/channel-operations.d.ts +4 -1
  6. package/dist/src/channel/cross-channel-receive.d.ts +4 -1
  7. package/dist/src/channel/cross-channel-receive.js +1 -1
  8. package/dist/src/channel/session.d.ts +3 -1
  9. package/dist/src/channel/session.js +1 -1
  10. package/dist/src/channel/types.d.ts +7 -0
  11. package/dist/src/chunks/{use-eve-agent-C5-yqRuq.js → use-eve-agent-BdKlQF32.js} +8 -8
  12. package/dist/src/chunks/{use-eve-agent-CVWk5KKy.js → use-eve-agent-IIuxkn6y.js} +8 -8
  13. package/dist/src/cli/commands/build.js +1 -1
  14. package/dist/src/cli/commands/init-agent-workspace.d.ts +2 -0
  15. package/dist/src/cli/commands/init.js +1 -1
  16. package/dist/src/cli/commands/registry-pnpm-build-policy-flow.d.ts +1 -1
  17. package/dist/src/cli/commands/registry-pnpm-build-policy-flow.js +1 -1
  18. package/dist/src/cli/dev/tui/line-editor.d.ts +11 -1
  19. package/dist/src/cli/dev/tui/line-editor.js +3 -3
  20. package/dist/src/cli/dev/tui/model-picker.d.ts +2 -0
  21. package/dist/src/cli/dev/tui/model-picker.js +1 -1
  22. package/dist/src/cli/dev/tui/runner.d.ts +0 -1
  23. package/dist/src/cli/dev/tui/runner.js +2 -2
  24. package/dist/src/cli/dev/tui/setup-panel.js +1 -1
  25. package/dist/src/cli/dev/tui/setup-selection-input.js +1 -1
  26. package/dist/src/cli/dev/tui/stream-format.d.ts +6 -0
  27. package/dist/src/cli/dev/tui/stream-format.js +2 -2
  28. package/dist/src/cli/dev/tui/terminal-renderer.d.ts +0 -1
  29. package/dist/src/cli/dev/tui/terminal-renderer.js +12 -12
  30. package/dist/src/cli/run.js +1 -1
  31. package/dist/src/client/agent-info-schema.d.ts +8 -14
  32. package/dist/src/client/agent-info-schema.js +1 -1
  33. package/dist/src/client/eve-agent-store.js +1 -1
  34. package/dist/src/client/session.js +1 -1
  35. package/dist/src/client/types.d.ts +4 -2
  36. package/dist/src/compiled/.vendor-stamp.json +11 -11
  37. package/dist/src/compiled/@chat-adapter/slack/_chat-adapter-shared.d.ts +1 -0
  38. package/dist/src/compiled/@chat-adapter/slack/api.d.ts +3 -2
  39. package/dist/src/compiled/@chat-adapter/slack/api.js +1 -1
  40. package/dist/src/compiled/@chat-adapter/slack/blocks.js +1 -1
  41. package/dist/src/compiled/@chat-adapter/slack/format.js +1 -1
  42. package/dist/src/compiled/@chat-adapter/slack/index.d.ts +410 -63
  43. package/dist/src/compiled/@chat-adapter/slack/index.js +47 -25
  44. package/dist/src/compiled/@chat-adapter/twilio/api.d.ts +5 -1
  45. package/dist/src/compiled/@chat-adapter/twilio/api.js +1 -1
  46. package/dist/src/compiled/@chat-adapter/twilio/index.d.ts +37 -3
  47. package/dist/src/compiled/@chat-adapter/twilio/index.js +5 -1
  48. package/dist/src/compiled/@chat-adapter/twilio/webhook.d.ts +2 -2
  49. package/dist/src/compiled/@chat-adapter/twilio/webhook.js +1 -1
  50. package/dist/src/compiled/@linqapp/chat-sdk-adapter/index.js +6 -6
  51. package/dist/src/compiled/@photon-ai/chat-adapter-imessage/index.js +50 -50
  52. package/dist/src/compiled/@vercel/sandbox/index.js +4 -4
  53. package/dist/src/compiled/@workflow/core/attribute-changes.d.ts +2 -1
  54. package/dist/src/compiled/@workflow/core/events-consumer.d.ts +6 -3
  55. package/dist/src/compiled/@workflow/core/index.js +2 -2
  56. package/dist/src/compiled/@workflow/core/private.d.ts +37 -5
  57. package/dist/src/compiled/@workflow/core/private.js +1 -1
  58. package/dist/src/compiled/@workflow/core/runtime/deployment-guard.d.ts +2 -1
  59. package/dist/src/compiled/@workflow/core/runtime/helpers.js +1 -1
  60. package/dist/src/compiled/@workflow/core/runtime/invocations.d.ts +35 -0
  61. package/dist/src/compiled/@workflow/core/runtime/lifecycle-hooks.d.ts +90 -0
  62. package/dist/src/compiled/@workflow/core/runtime/quickjs-runtime.d.ts +2 -1
  63. package/dist/src/compiled/@workflow/core/runtime/resume-hook.d.ts +8 -6
  64. package/dist/src/compiled/@workflow/core/runtime/step-single-flight.d.ts +1 -1
  65. package/dist/src/compiled/@workflow/core/runtime.js +4 -4
  66. package/dist/src/compiled/@workflow/core/serialization.d.ts +5 -1
  67. package/dist/src/compiled/@workflow/core/serialization.js +1 -1
  68. package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
  69. package/dist/src/compiled/@workflow/core/workflow/set-attributes.d.ts +4 -0
  70. package/dist/src/compiled/@workflow/core/workflow.js +1 -1
  71. package/dist/src/compiled/@workflow/world/analytics.d.ts +1 -1
  72. package/dist/src/compiled/@workflow/world/attributes-validation.d.ts +5 -0
  73. package/dist/src/compiled/@workflow/world/events.d.ts +2 -2
  74. package/dist/src/compiled/@workflow/world/index.d.ts +2 -1
  75. package/dist/src/compiled/@workflow/world/interfaces.d.ts +12 -1
  76. package/dist/src/compiled/@workflow/world/invocation.d.ts +19 -0
  77. package/dist/src/compiled/@workflow/world/queue.d.ts +24 -3
  78. package/dist/src/compiled/@workflow/world-local/index.js +3 -3
  79. package/dist/src/compiled/@workflow/world-vercel/index.js +16 -16
  80. package/dist/src/compiled/_chunks/node/chunk-6QHBXN7B-gl4n6nmi.js +12 -0
  81. package/dist/src/compiled/_chunks/node/chunk-7WDLOIRP-B_IWkVtZ.js +1 -0
  82. package/dist/src/compiled/_chunks/node/chunk-KBOOTKHF-DJqFk2r1.js +1 -0
  83. package/dist/src/compiled/_chunks/node/chunk-TREVQR3E-CLsTAn-O.js +1 -0
  84. package/dist/src/compiled/_chunks/node/dist-DYDVZ-FS.js +98 -0
  85. package/dist/src/compiled/_chunks/node/dist-iEFkK9qw.js +6 -0
  86. package/dist/src/compiled/_chunks/workflow/attribute-changes-DFx4eluc.js +6 -0
  87. package/dist/src/compiled/_chunks/workflow/{dist-D38gP7YF.js → dist-DjECvUyK.js} +1 -1
  88. package/dist/src/compiled/_chunks/workflow/{frames-QcJfYHmh.js → frames-D_Q-7A1N.js} +2 -2
  89. package/dist/src/compiled/_chunks/workflow/{helpers-6kObVbfS.js → helpers-Bw52uyzw.js} +1 -1
  90. package/dist/src/compiled/_chunks/workflow/{logger-NN5YHpYy.js → logger-DFNCa8Nl.js} +1 -1
  91. package/dist/src/compiled/_chunks/workflow/resume-hook-BhA_nDEV.js +1 -0
  92. package/dist/src/compiled/_chunks/workflow/{run-DJevv8zz.js → run-BT6SQv5f.js} +1 -1
  93. package/dist/src/compiled/_chunks/workflow/{serialization-C5KgPESk.js → serialization-Cl0SYU0I.js} +3 -3
  94. package/dist/src/compiled/_chunks/workflow/sleep-DB4AH9-A.js +1 -0
  95. package/dist/src/compiled/_chunks/workflow/{wait-until-BMY_tOr-.js → wait-until-Dzhr6tzf.js} +1 -1
  96. package/dist/src/compiled/_chunks/workflow/{ws-transport-DSDcKH08.js → ws-transport-BpTMh40s.js} +1 -1
  97. package/dist/src/compiled/chat/index.d.ts +1 -725
  98. package/dist/src/compiled/chat/index.js +1 -1
  99. package/dist/src/compiler/artifacts.d.ts +1 -0
  100. package/dist/src/compiler/artifacts.js +1 -1
  101. package/dist/src/compiler/extension-compatibility.d.ts +23 -15
  102. package/dist/src/compiler/extension-compatibility.js +1 -1
  103. package/dist/src/compiler/manifest.d.ts +14 -18
  104. package/dist/src/compiler/manifest.js +1 -1
  105. package/dist/src/compiler/normalize-helpers.js +1 -1
  106. package/dist/src/compiler/normalize-sandbox.d.ts +2 -7
  107. package/dist/src/compiler/normalize-sandbox.js +1 -1
  108. package/dist/src/compiler/workspace-resources.js +1 -1
  109. package/dist/src/context/build-callback-context.d.ts +2 -0
  110. package/dist/src/context/build-callback-context.js +1 -1
  111. package/dist/src/context/container.d.ts +1 -1
  112. package/dist/src/context/container.js +1 -1
  113. package/dist/src/context/key-names.d.ts +1 -0
  114. package/dist/src/context/key-names.js +1 -1
  115. package/dist/src/context/keys.d.ts +7 -2
  116. package/dist/src/context/keys.js +1 -1
  117. package/dist/src/context/providers/sandbox.js +1 -1
  118. package/dist/src/context/providers/session.d.ts +19 -2
  119. package/dist/src/context/session-context.d.ts +1 -1
  120. package/dist/src/discover/sandbox.js +1 -1
  121. package/dist/src/evals/cli/eval.js +1 -1
  122. package/dist/src/evals/context.d.ts +1 -0
  123. package/dist/src/evals/context.js +1 -1
  124. package/dist/src/evals/define-eval-config.d.ts +7 -7
  125. package/dist/src/evals/define-eval-config.js +1 -1
  126. package/dist/src/evals/define-eval.d.ts +5 -2
  127. package/dist/src/evals/index.d.ts +1 -1
  128. package/dist/src/evals/runner/execute-eval.d.ts +2 -0
  129. package/dist/src/evals/runner/execute-eval.js +1 -1
  130. package/dist/src/evals/runner/execute-task.d.ts +2 -0
  131. package/dist/src/evals/runner/execute-task.js +1 -1
  132. package/dist/src/evals/runner/run-evals.d.ts +2 -0
  133. package/dist/src/evals/runner/run-evals.js +1 -1
  134. package/dist/src/evals/target.js +1 -1
  135. package/dist/src/evals/types.d.ts +22 -6
  136. package/dist/src/eve-channel/create-request.d.ts +2 -1
  137. package/dist/src/eve-channel/delivery-policy-request.d.ts +4 -0
  138. package/dist/src/eve-channel/delivery-policy-request.js +1 -0
  139. package/dist/src/eve-channel/index.js +1 -1
  140. package/dist/src/eve-channel/request.d.ts +2 -1
  141. package/dist/src/eve-channel/request.js +1 -1
  142. package/dist/src/execution/coordination-dispatch-shared.d.ts +2 -1
  143. package/dist/src/execution/coordination-dispatch-shared.js +1 -1
  144. package/dist/src/execution/dynamic-workflow/tool.js +1 -1
  145. package/dist/src/execution/runtime-context.js +1 -1
  146. package/dist/src/execution/sandbox/active-handles.d.ts +7 -8
  147. package/dist/src/execution/sandbox/active-handles.js +1 -1
  148. package/dist/src/execution/sandbox/bash.js +1 -1
  149. package/dist/src/execution/sandbox/bindings/docker-cli.d.ts +1 -1
  150. package/dist/src/execution/sandbox/bindings/docker-cli.js +1 -1
  151. package/dist/src/execution/sandbox/bindings/docker-container.d.ts +2 -2
  152. package/dist/src/execution/sandbox/bindings/docker-container.js +1 -1
  153. package/dist/src/execution/sandbox/bindings/docker-network.d.ts +1 -1
  154. package/dist/src/execution/sandbox/bindings/docker-network.js +1 -1
  155. package/dist/src/execution/sandbox/bindings/docker-options.d.ts +4 -5
  156. package/dist/src/execution/sandbox/bindings/docker-options.js +1 -1
  157. package/dist/src/execution/sandbox/bindings/docker-session.d.ts +0 -1
  158. package/dist/src/execution/sandbox/bindings/docker-session.js +2 -2
  159. package/dist/src/execution/sandbox/bindings/docker.d.ts +16 -18
  160. package/dist/src/execution/sandbox/bindings/docker.js +1 -1
  161. package/dist/src/execution/sandbox/bindings/immutable-resources.d.ts +21 -0
  162. package/dist/src/execution/sandbox/bindings/immutable-resources.js +2 -0
  163. package/dist/src/execution/sandbox/bindings/just-bash-runtime.d.ts +9 -5
  164. package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
  165. package/dist/src/execution/sandbox/bindings/just-bash.d.ts +13 -26
  166. package/dist/src/execution/sandbox/bindings/just-bash.js +1 -1
  167. package/dist/src/execution/sandbox/bindings/{local-backend-utils.d.ts → local-provider-utils.d.ts} +7 -5
  168. package/dist/src/execution/sandbox/bindings/local-provider-utils.js +1 -0
  169. package/dist/src/execution/sandbox/bindings/local.d.ts +3 -3
  170. package/dist/src/execution/sandbox/bindings/local.js +1 -1
  171. package/dist/src/execution/sandbox/bindings/microsandbox-create.js +1 -1
  172. package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.d.ts +30 -8
  173. package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.js +1 -1
  174. package/dist/src/execution/sandbox/bindings/microsandbox-metadata.d.ts +9 -1
  175. package/dist/src/execution/sandbox/bindings/microsandbox-metadata.js +1 -1
  176. package/dist/src/execution/sandbox/bindings/microsandbox-network.js +1 -1
  177. package/dist/src/execution/sandbox/bindings/microsandbox-options.d.ts +10 -4
  178. package/dist/src/execution/sandbox/bindings/microsandbox-options.js +1 -1
  179. package/dist/src/execution/sandbox/bindings/microsandbox-platform.js +1 -1
  180. package/dist/src/execution/sandbox/bindings/microsandbox-runtime.d.ts +7 -5
  181. package/dist/src/execution/sandbox/bindings/microsandbox-runtime.js +1 -1
  182. package/dist/src/execution/sandbox/bindings/microsandbox-templates.js +1 -1
  183. package/dist/src/execution/sandbox/bindings/microsandbox.d.ts +11 -21
  184. package/dist/src/execution/sandbox/bindings/microsandbox.js +1 -1
  185. package/dist/src/execution/sandbox/bindings/vercel-base-runtime.js +2 -2
  186. package/dist/src/execution/sandbox/bindings/vercel-credentials.js +1 -1
  187. package/dist/src/execution/sandbox/bindings/vercel-errors.js +1 -1
  188. package/dist/src/execution/sandbox/bindings/vercel-lifecycle.d.ts +2 -2
  189. package/dist/src/execution/sandbox/bindings/vercel-lifecycle.js +1 -1
  190. package/dist/src/execution/sandbox/bindings/vercel-lookup.js +1 -1
  191. package/dist/src/execution/sandbox/bindings/vercel-options.d.ts +1 -2
  192. package/dist/src/execution/sandbox/bindings/vercel-options.js +1 -1
  193. package/dist/src/execution/sandbox/bindings/vercel.d.ts +20 -12
  194. package/dist/src/execution/sandbox/bindings/vercel.js +2 -2
  195. package/dist/src/execution/sandbox/development-cleanup.js +1 -1
  196. package/dist/src/execution/sandbox/development-lazy-prewarm.d.ts +7 -0
  197. package/dist/src/execution/sandbox/development-lazy-prewarm.js +1 -0
  198. package/dist/src/execution/sandbox/development-run.d.ts +2 -3
  199. package/dist/src/execution/sandbox/dockerfile.d.ts +25 -0
  200. package/dist/src/execution/sandbox/dockerfile.js +1 -0
  201. package/dist/src/execution/sandbox/ensure.d.ts +0 -17
  202. package/dist/src/execution/sandbox/ensure.js +1 -1
  203. package/dist/src/execution/sandbox/logging-session.js +1 -1
  204. package/dist/src/execution/sandbox/prewarm.d.ts +23 -27
  205. package/dist/src/execution/sandbox/prewarm.js +1 -2
  206. package/dist/src/execution/sandbox/provider-files.d.ts +2 -0
  207. package/dist/src/execution/sandbox/provider-files.js +1 -0
  208. package/dist/src/execution/sandbox/provider-host-development.d.ts +2 -0
  209. package/dist/src/execution/sandbox/provider-host-development.js +1 -0
  210. package/dist/src/execution/sandbox/provider-host.d.ts +2 -0
  211. package/dist/src/execution/sandbox/provider-host.js +1 -0
  212. package/dist/src/execution/sandbox/provider-identity.d.ts +1 -0
  213. package/dist/src/execution/sandbox/provider-identity.js +1 -0
  214. package/dist/src/execution/sandbox/ripgrep-probe.d.ts +0 -7
  215. package/dist/src/execution/sandbox/ripgrep-probe.js +1 -1
  216. package/dist/src/execution/sandbox/session.d.ts +8 -8
  217. package/dist/src/execution/sandbox/session.js +1 -1
  218. package/dist/src/execution/session/handoff-steps.js +1 -1
  219. package/dist/src/execution/session/handoff.d.ts +1 -1
  220. package/dist/src/execution/session/handoff.js +1 -1
  221. package/dist/src/execution/session/input-queue.d.ts +2 -1
  222. package/dist/src/execution/session/input-queue.js +1 -1
  223. package/dist/src/execution/session/next-input.js +1 -1
  224. package/dist/src/execution/session/program.js +1 -1
  225. package/dist/src/execution/session/turn-step.js +1 -1
  226. package/dist/src/execution/session-inbox/protocol.js +1 -1
  227. package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
  228. package/dist/src/execution/tools/agent-router-workflow.js +1 -1
  229. package/dist/src/execution/tools/sleep-workflow.js +1 -1
  230. package/dist/src/execution/tools/subagent/emit-event-step.js +1 -1
  231. package/dist/src/execution/tools/subagent/invoke-preparation.js +1 -1
  232. package/dist/src/execution/tools/subagent/start.d.ts +1 -0
  233. package/dist/src/framework/sources/modules/sandbox.d.ts +2 -1
  234. package/dist/src/framework/sources/modules/sandbox.js +1 -1
  235. package/dist/src/harness/approval-delivery-coordinator.js +1 -1
  236. package/dist/src/harness/hitl/approval-input-requests.d.ts +1 -1
  237. package/dist/src/harness/hitl/approval-input-requests.js +1 -1
  238. package/dist/src/harness/input-requests.d.ts +6 -0
  239. package/dist/src/harness/input-requests.js +1 -1
  240. package/dist/src/harness/messages.d.ts +2 -1
  241. package/dist/src/harness/messages.js +1 -1
  242. package/dist/src/harness/pending-input-batches.d.ts +1 -0
  243. package/dist/src/harness/pending-input-batches.js +1 -1
  244. package/dist/src/harness/tool-loop.js +2 -2
  245. package/dist/src/instrumentation/ai-sdk-warnings.d.ts +6 -0
  246. package/dist/src/instrumentation/ai-sdk-warnings.js +1 -0
  247. package/dist/src/instrumentation/runtime.d.ts +1 -0
  248. package/dist/src/instrumentation/runtime.js +1 -1
  249. package/dist/src/internal/application/compiled-artifacts.d.ts +2 -0
  250. package/dist/src/internal/application/compiled-artifacts.js +2 -2
  251. package/dist/src/internal/application/optional-package-install.d.ts +3 -0
  252. package/dist/src/internal/application/optional-package-install.js +2 -2
  253. package/dist/src/internal/application/output-publication-lock.d.ts +6 -0
  254. package/dist/src/internal/application/output-publication-lock.js +1 -1
  255. package/dist/src/internal/application/output-publication.js +1 -1
  256. package/dist/src/internal/application/package.js +1 -1
  257. package/dist/src/internal/authored-module-loader.d.ts +1 -0
  258. package/dist/src/internal/authored-module-loader.js +1 -1
  259. package/dist/src/internal/authored-runtime-modules.d.ts +1 -0
  260. package/dist/src/internal/nitro/development-generation.js +1 -1
  261. package/dist/src/internal/nitro/host/artifacts-config.d.ts +6 -1
  262. package/dist/src/internal/nitro/host/artifacts-config.js +1 -1
  263. package/dist/src/internal/nitro/host/build-application.js +1 -1
  264. package/dist/src/internal/nitro/host/compiled-sandbox-provider-prune-plugin.d.ts +16 -0
  265. package/dist/src/internal/nitro/host/compiled-sandbox-provider-prune-plugin.js +5 -0
  266. package/dist/src/internal/nitro/host/configure-nitro-routes.js +2 -2
  267. package/dist/src/internal/nitro/host/create-application-nitro.d.ts +3 -3
  268. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  269. package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.js +1 -1
  270. package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
  271. package/dist/src/internal/nitro/host/development-runtime-prune-plugin.d.ts +9 -0
  272. package/dist/src/internal/nitro/host/development-runtime-prune-plugin.js +2 -0
  273. package/dist/src/internal/nitro/host/prepare-application-host.d.ts +1 -0
  274. package/dist/src/internal/nitro/host/prepare-application-host.js +1 -1
  275. package/dist/src/internal/nitro/host/sandbox-shutdown-plugin.js +1 -1
  276. package/dist/src/internal/nitro/host/start-development-server.js +2 -2
  277. package/dist/src/internal/nitro/host/start-production-server.js +2 -2
  278. package/dist/src/internal/nitro/host/types.d.ts +1 -1
  279. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
  280. package/dist/src/internal/nitro/routes/runtime-artifacts.d.ts +1 -0
  281. package/dist/src/internal/nitro/routes/runtime-artifacts.js +1 -1
  282. package/dist/src/internal/runtime-registry.d.ts +2 -2
  283. package/dist/src/internal/vercel/build-agent-workspace.d.ts +3 -1
  284. package/dist/src/internal/vercel/build-agent-workspace.js +1 -1
  285. package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +4 -5
  286. package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +2 -2
  287. package/dist/src/public/channels/github/checkout.js +1 -1
  288. package/dist/src/public/channels/index.d.ts +1 -1
  289. package/dist/src/public/channels/slack/slackChannel.d.ts +3 -1
  290. package/dist/src/public/channels/slack/slackChannel.js +1 -1
  291. package/dist/src/public/definitions/channel.d.ts +1 -1
  292. package/dist/src/public/definitions/sandbox.d.ts +5 -43
  293. package/dist/src/public/definitions/sandbox.js +1 -1
  294. package/dist/src/public/local-dev.d.ts +4 -5
  295. package/dist/src/public/next/vercel-output-config.js +1 -1
  296. package/dist/src/public/sandbox/docker-sandbox.d.ts +16 -40
  297. package/dist/src/public/sandbox/docker.d.ts +2 -2
  298. package/dist/src/public/sandbox/docker.js +1 -1
  299. package/dist/src/public/sandbox/index.d.ts +4 -9
  300. package/dist/src/public/sandbox/index.js +1 -1
  301. package/dist/src/public/sandbox/just-bash-sandbox.d.ts +11 -6
  302. package/dist/src/public/sandbox/just-bash.d.ts +2 -2
  303. package/dist/src/public/sandbox/just-bash.js +1 -1
  304. package/dist/src/public/sandbox/microsandbox-sandbox.d.ts +11 -17
  305. package/dist/src/public/sandbox/microsandbox.d.ts +2 -2
  306. package/dist/src/public/sandbox/microsandbox.js +1 -1
  307. package/dist/src/public/sandbox/provider.d.ts +1 -0
  308. package/dist/src/public/sandbox/provider.js +1 -0
  309. package/dist/src/public/sandbox/vercel-sandbox.d.ts +10 -41
  310. package/dist/src/public/sandbox/vercel.d.ts +2 -2
  311. package/dist/src/public/sandbox/vercel.js +1 -1
  312. package/dist/src/runtime/cache-key.js +1 -1
  313. package/dist/src/runtime/compiled-artifacts-source.d.ts +6 -1
  314. package/dist/src/runtime/compiled-artifacts-source.js +1 -1
  315. package/dist/src/runtime/loaders/artifact-paths.d.ts +1 -0
  316. package/dist/src/runtime/loaders/artifact-paths.js +1 -1
  317. package/dist/src/runtime/loaders/bundled-artifacts.d.ts +3 -0
  318. package/dist/src/runtime/loaders/bundled-artifacts.js +1 -1
  319. package/dist/src/runtime/loaders/compile-metadata.js +1 -1
  320. package/dist/src/runtime/loaders/manifest.js +1 -1
  321. package/dist/src/runtime/loaders/module-map.js +1 -1
  322. package/dist/src/runtime/local-dev-capability.d.ts +14 -12
  323. package/dist/src/runtime/local-dev-capability.js +1 -1
  324. package/dist/src/runtime/resolve-agent-graph.js +1 -1
  325. package/dist/src/runtime/resolve-sandbox.d.ts +1 -10
  326. package/dist/src/runtime/resolve-sandbox.js +1 -1
  327. package/dist/src/runtime/sandbox/prepared-artifacts.d.ts +13 -0
  328. package/dist/src/runtime/sandbox/prepared-artifacts.js +1 -0
  329. package/dist/src/runtime/sandbox/registry.d.ts +2 -9
  330. package/dist/src/runtime/sandbox/registry.js +1 -1
  331. package/dist/src/runtime/sessions/runtime-session.js +1 -1
  332. package/dist/src/runtime/types.d.ts +13 -26
  333. package/dist/src/runtime/workspace/types.d.ts +1 -1
  334. package/dist/src/sandbox/providers/default.d.ts +27 -0
  335. package/dist/src/sandbox/providers/default.js +1 -0
  336. package/dist/src/sandbox/providers/docker.d.ts +11 -0
  337. package/dist/src/sandbox/providers/docker.js +1 -0
  338. package/dist/src/sandbox/providers/just-bash.d.ts +4 -0
  339. package/dist/src/sandbox/providers/just-bash.js +1 -0
  340. package/dist/src/sandbox/providers/microsandbox.d.ts +12 -0
  341. package/dist/src/sandbox/providers/microsandbox.js +1 -0
  342. package/dist/src/sandbox/providers/vercel.d.ts +12 -0
  343. package/dist/src/sandbox/providers/vercel.js +1 -0
  344. package/dist/src/sandbox/providers.d.ts +5 -0
  345. package/dist/src/sandbox/providers.js +1 -0
  346. package/dist/src/sandbox/state.d.ts +6 -25
  347. package/dist/src/self-modification/extension/subagents/agent/agent.d.ts +1 -1
  348. package/dist/src/self-modification/extension/subagents/agent/agent.js +1 -1
  349. package/dist/src/self-modification/extension/subagents/agent/sandbox.d.ts +2 -25
  350. package/dist/src/self-modification/extension/subagents/agent/sandbox.js +1 -1
  351. package/dist/src/self-modification/extension/subagents/agent/tools/publish.js +1 -1
  352. package/dist/src/self-modification/extension/subagents/agent/tools/registry_add.js +1 -1
  353. package/dist/src/self-modification/filesystem.d.ts +3 -1
  354. package/dist/src/self-modification/filesystem.js +1 -1
  355. package/dist/src/self-modification/git-workspace.d.ts +1 -1
  356. package/dist/src/self-modification/git.d.ts +1 -1
  357. package/dist/src/self-modification/sandbox.d.ts +14 -9
  358. package/dist/src/self-modification/sandbox.js +1 -1
  359. package/dist/src/setup/boxes/select-model.js +1 -1
  360. package/dist/src/setup/cli/select-state.d.ts +4 -2
  361. package/dist/src/setup/cli/select-state.js +1 -1
  362. package/dist/src/setup/flows/model-login.js +1 -1
  363. package/dist/src/{cli/commands/registry-pnpm-build-policy.d.ts → setup/primitives/pm/pnpm-build-policy.d.ts} +4 -0
  364. package/dist/src/setup/primitives/pm/pnpm-build-policy.js +8 -0
  365. package/dist/src/setup/primitives/pm/pnpm.js +3 -2
  366. package/dist/src/setup/scaffold/create/project.js +1 -1
  367. package/dist/src/shared/default-agent-model.d.ts +1 -1
  368. package/dist/src/shared/default-agent-model.js +1 -1
  369. package/dist/src/shared/sandbox-environment.d.ts +45 -0
  370. package/dist/src/shared/sandbox-environment.js +1 -0
  371. package/dist/src/shared/sandbox-network-policy.d.ts +8 -3
  372. package/dist/src/shared/sandbox-network-policy.js +1 -1
  373. package/dist/src/shared/sandbox-prepared-artifacts.d.ts +16 -0
  374. package/dist/src/shared/sandbox-prepared-artifacts.js +1 -0
  375. package/dist/src/shared/sandbox-provider.d.ts +112 -0
  376. package/dist/src/shared/sandbox-provider.js +1 -0
  377. package/dist/src/shared/sandbox-session.d.ts +18 -41
  378. package/dist/src/shared/sandbox-template-error.d.ts +9 -0
  379. package/dist/src/shared/sandbox-template-error.js +1 -0
  380. package/dist/src/subagents/tool.d.ts +1 -1
  381. package/dist/src/subagents/tool.js +1 -1
  382. package/dist/src/svelte/index.js +1 -1
  383. package/dist/src/svelte/use-eve-agent.js +1 -1
  384. package/dist/src/tasks/delivery-context.d.ts +6 -4
  385. package/dist/src/tasks/delivery-context.js +1 -1
  386. package/dist/src/tasks/delivery-policy.d.ts +2 -0
  387. package/dist/src/tasks/delivery-policy.js +1 -1
  388. package/dist/src/tools/framework/agent-contract.js +1 -1
  389. package/dist/src/vue/index.js +1 -1
  390. package/dist/src/vue/use-eve-agent.js +1 -1
  391. package/docs/README.md +40 -45
  392. package/docs/agent-config.md +2 -2
  393. package/docs/channels/eve.mdx +1 -1
  394. package/docs/channels/overview.mdx +48 -0
  395. package/docs/channels/slack.mdx +1 -1
  396. package/docs/concepts/execution-model-and-durability.mdx +1 -1
  397. package/docs/concepts/sessions-runs-and-streaming.md +3 -3
  398. package/docs/dynamic-configuration/meta.json +5 -0
  399. package/docs/evals/overview.mdx +43 -0
  400. package/docs/getting-started.mdx +1 -1
  401. package/docs/guides/client/overview.mdx +1 -1
  402. package/docs/guides/deployment/overview.md +1 -1
  403. package/docs/guides/deployment/self-hosting.md +5 -5
  404. package/docs/guides/deployment/vercel.mdx +10 -18
  405. package/docs/guides/dev-tui.md +1 -1
  406. package/docs/guides/hooks.md +4 -0
  407. package/docs/guides/instrumentation/instrumentation.mdx +1 -1
  408. package/docs/guides/instrumentation/migration.md +1 -6
  409. package/docs/guides/instrumentation/otel.mdx +15 -47
  410. package/docs/memory/meta.json +1 -1
  411. package/docs/memory/overview.mdx +4 -0
  412. package/docs/meta.json +13 -16
  413. package/docs/patterns/meta.json +2 -2
  414. package/docs/protocols/acp.md +1 -1
  415. package/docs/protocols/ucp.mdx +1 -1
  416. package/docs/reference/cli.md +10 -9
  417. package/docs/reference/meta.json +4 -1
  418. package/docs/reference/typescript-api.md +2 -25
  419. package/docs/sandbox/default.mdx +17 -0
  420. package/docs/sandbox/docker.mdx +29 -0
  421. package/docs/sandbox/index.mdx +218 -0
  422. package/docs/sandbox/just-bash.mdx +24 -0
  423. package/docs/sandbox/meta.json +5 -0
  424. package/docs/sandbox/microsandbox.mdx +31 -0
  425. package/docs/sandbox/vercel.mdx +106 -0
  426. package/docs/schedules.mdx +35 -1
  427. package/docs/subagents/index.mdx +31 -13
  428. package/docs/subagents/meta.json +1 -1
  429. package/docs/tools/overview.mdx +14 -6
  430. package/docs/tutorial/run-analysis.mdx +6 -5
  431. package/package.json +20 -11
  432. package/dist/src/cli/commands/registry-pnpm-build-policy.js +0 -6
  433. package/dist/src/compiled/_chunks/node/chunk-5OX2R7AJ-CxVV-owP.js +0 -1
  434. package/dist/src/compiled/_chunks/node/chunk-AYN7QRWH-B__hKQV7.js +0 -1
  435. package/dist/src/compiled/_chunks/node/chunk-QZV7YRVM-Dzw4WEBv.js +0 -1
  436. package/dist/src/compiled/_chunks/node/dist-CweJdVFE.js +0 -6
  437. package/dist/src/compiled/_chunks/node/dist-Da54NuK8.js +0 -96
  438. package/dist/src/compiled/_chunks/workflow/attribute-changes-A6HfMNG3.js +0 -6
  439. package/dist/src/compiled/_chunks/workflow/resume-hook-CAqlhwic.js +0 -1
  440. package/dist/src/compiled/_chunks/workflow/sleep-CbUwdv6O.js +0 -1
  441. package/dist/src/compiled/chat/_mdast.d.ts +0 -24
  442. package/dist/src/compiled/chat/_workflow-serde.d.ts +0 -3
  443. package/dist/src/compiled/chat/jsx-runtime-_JEEAotp.d.ts +0 -907
  444. package/dist/src/execution/sandbox/bindings/local-backend-utils.js +0 -1
  445. package/dist/src/execution/sandbox/development-prewarm.d.ts +0 -15
  446. package/dist/src/execution/sandbox/development-prewarm.js +0 -1
  447. package/dist/src/execution/sandbox/lazy-backend.d.ts +0 -15
  448. package/dist/src/execution/sandbox/lazy-backend.js +0 -1
  449. package/dist/src/execution/sandbox/template-prewarm-lock.d.ts +0 -8
  450. package/dist/src/execution/sandbox/template-prewarm-lock.js +0 -1
  451. package/dist/src/internal/authored-definition/sandbox.d.ts +0 -17
  452. package/dist/src/internal/authored-definition/sandbox.js +0 -1
  453. package/dist/src/internal/nitro/host/compiled-sandbox-backend-prune-plugin.d.ts +0 -16
  454. package/dist/src/internal/nitro/host/compiled-sandbox-backend-prune-plugin.js +0 -2
  455. package/dist/src/public/definitions/sandbox-backend.d.ts +0 -17
  456. package/dist/src/public/definitions/sandbox-backend.js +0 -1
  457. package/dist/src/public/sandbox/backends/default.d.ts +0 -1
  458. package/dist/src/public/sandbox/backends/default.js +0 -1
  459. package/dist/src/public/sandbox/backends/docker.d.ts +0 -1
  460. package/dist/src/public/sandbox/backends/docker.js +0 -1
  461. package/dist/src/public/sandbox/backends/just-bash.d.ts +0 -1
  462. package/dist/src/public/sandbox/backends/just-bash.js +0 -1
  463. package/dist/src/public/sandbox/backends/microsandbox.d.ts +0 -1
  464. package/dist/src/public/sandbox/backends/microsandbox.js +0 -1
  465. package/dist/src/public/sandbox/backends/vercel.d.ts +0 -1
  466. package/dist/src/public/sandbox/backends/vercel.js +0 -1
  467. package/dist/src/runtime/sandbox/keys.d.ts +0 -42
  468. package/dist/src/runtime/sandbox/keys.js +0 -1
  469. package/dist/src/runtime/sandbox/template-plan.d.ts +0 -24
  470. package/dist/src/runtime/sandbox/template-plan.js +0 -1
  471. package/dist/src/sandbox/backends/default.d.ts +0 -42
  472. package/dist/src/sandbox/backends/default.js +0 -1
  473. package/dist/src/sandbox/backends/docker.d.ts +0 -14
  474. package/dist/src/sandbox/backends/docker.js +0 -1
  475. package/dist/src/sandbox/backends/just-bash.d.ts +0 -17
  476. package/dist/src/sandbox/backends/just-bash.js +0 -1
  477. package/dist/src/sandbox/backends/microsandbox.d.ts +0 -17
  478. package/dist/src/sandbox/backends/microsandbox.js +0 -1
  479. package/dist/src/sandbox/backends/vercel.d.ts +0 -30
  480. package/dist/src/sandbox/backends/vercel.js +0 -1
  481. package/dist/src/shared/sandbox-backend.d.ts +0 -176
  482. package/dist/src/shared/sandbox-backend.js +0 -1
  483. package/dist/src/shared/sandbox-definition.d.ts +0 -112
  484. package/dist/src/shared/sandbox-definition.js +0 -1
  485. package/docs/sandbox.mdx +0 -342
@@ -1 +1 @@
1
- import{$ as e,A as t,At as n,B as r,C as i,Ct as a,D as o,Dt as s,E as c,Et as l,F as u,Ft as d,G as f,H as p,I as m,J as h,K as g,L as _,M as v,Mt as y,N as b,Nt as x,O as S,Ot as C,P as w,Pt as T,Q as E,R as D,S as O,St as k,T as A,Tt as j,U as M,V as N,W as P,X as F,Y as I,Z as L,_ as R,_t as z,a as B,at as V,b as H,bt as U,c as W,ct as G,d as K,dt as q,et as J,f as Y,ft as X,g as Z,gt as Q,h as $,ht as ee,i as te,it as ne,j as re,jt as ie,k as ae,kt as oe,l as se,lt as ce,m as le,mt as ue,n as de,nt as fe,o as pe,ot as me,p as he,pt as ge,q as _e,r as ve,rt as ye,s as be,st as xe,t as Se,tt as Ce,u as we,ut as Te,v as Ee,vt as De,w as Oe,wt as ke,x as Ae,xt as je,y as Me,yt as Ne,z as Pe}from"../_chunks/node/dist-Da54NuK8.js";export{Se as Actions,Ce as BaseFormatConverter,de as Button,ve as Card,te as CardLink,B as CardText,pe as ChannelImpl,be as Chart,W as Chat,se as ChatError,we as ConsoleLogger,K as DEFAULT_EMOJI_MAP,Y as Divider,he as EmojiResolver,le as ExternalSelect,$ as Field,Z as Fields,R as Image,Ee as LinkButton,Me as LockError,H as Message,Ae as MessageHistoryCache,O as Modal,i as NotImplementedError,Oe as Plan,A as RadioSelect,c as RateLimitError,o as Section,S as Select,ae as SelectOption,t as StreamingMarkdownRenderer,re as StreamingPlan,v as THREAD_STATE_TTL_MS,b as Table,w as TextInput,u as ThreadHistoryCache,m as ThreadImpl,fe as blockquote,_ as cardChildToFallbackText,ye as chartElementToFallbackText,ne as codeBlock,D as convertEmojiPlaceholders,Pe as createEmoji,r as defaultEmojiResolver,N as deriveChannelId,p as emoji,V as emphasis,M as fromFullStream,P as fromReactElement,f as fromReactModalElement,g as getEmoji,me as getNodeChildren,xe as getNodeValue,G as inlineCode,ce as isBlockquoteNode,_e as isCardElement,Te as isCodeNode,q as isDeleteNode,X as isEmphasisNode,ge as isInlineCodeNode,h as isJSX,ue as isLinkNode,ee as isListItemNode,Q as isListNode,I as isModalElement,z as isParagraphNode,F as isPostableObject,De as isStrongNode,Ne as isTableCellNode,U as isTableNode,je as isTableRowNode,k as isTextNode,a as link,ke as markdownToPlainText,j as paragraph,l as parseMarkdown,L as reviver,s as root,C as strikethrough,oe as stringifyMarkdown,n as strong,ie as tableElementToAscii,y as tableToAscii,x as text,J as toAiMessages,E as toCardElement,e as toModalElement,T as toPlainText,d as walkAst};
1
+ import{$ as e,A as t,At as n,B as r,C as i,Ct as a,D as o,Dt as s,E as c,Et as l,F as u,Ft as d,G as f,H as p,I as m,It as h,J as g,K as _,L as v,Lt as y,M as b,Mt as x,N as S,Nt as C,O as w,Ot as T,P as E,Pt as D,Q as O,R as k,Rt as A,S as j,St as M,T as N,Tt as P,U as F,V as I,W as L,X as R,Y as z,Z as B,_ as V,_t as H,a as U,at as W,b as G,bt as K,c as q,ct as J,d as Y,dt as X,et as Z,f as Q,ft as $,g as ee,gt as te,h as ne,ht as re,i as ie,it as ae,j as oe,jt as se,k as ce,kt as le,l as ue,lt as de,m as fe,mt as pe,n as me,nt as he,o as ge,ot as _e,p as ve,pt as ye,q as be,r as xe,rt as Se,s as Ce,st as we,t as Te,tt as Ee,u as De,ut as Oe,v as ke,vt as Ae,w as je,wt as Me,x as Ne,xt as Pe,y as Fe,yt as Ie,z as Le,zt as Re}from"../_chunks/node/dist-DYDVZ-FS.js";export{Te as Actions,W as BaseFormatConverter,me as Button,xe as Card,ie as CardLink,U as CardText,f as ChannelImpl,ge as Chart,Ce as Chat,_ as ChatError,be as ConsoleLogger,q as DEFAULT_EMOJI_MAP,ue as DateInput,De as Divider,Y as EmojiResolver,Q as ExternalSelect,ve as Field,fe as Fields,ne as HistoryApiImpl,ee as Image,V as LinkButton,g as LockError,z as Message,ke as MessageHistoryCache,Fe as Modal,R as NotImplementedError,G as NumberInput,Ne as Plan,j as RadioSelect,B as RateLimitError,i as Section,je as Select,N as SelectOption,O as StreamingMarkdownRenderer,c as StreamingPlan,e as THREAD_STATE_TTL_MS,o as Table,w as TextInput,ce as ThreadHistoryCache,Z as ThreadImpl,_e as blockquote,t as cardChildToFallbackText,we as chartElementToFallbackText,J as codeBlock,oe as convertEmojiPlaceholders,b as createEmoji,S as defaultEmojiResolver,Ee as deriveChannelId,E as emoji,de as emphasis,he as fromFullStream,u as fromReactElement,m as fromReactModalElement,v as getEmoji,Oe as getNodeChildren,X as getNodeValue,$ as inlineCode,ye as isBlockquoteNode,k as isCardElement,pe as isCodeNode,re as isDeleteNode,te as isEmphasisNode,H as isInlineCodeNode,Le as isJSX,Ae as isLinkNode,Ie as isListItemNode,K as isListNode,r as isModalElement,Pe as isParagraphNode,Se as isPostableObject,M as isStrongNode,a as isTableCellNode,Me as isTableNode,P as isTableRowNode,l as isTextNode,s as link,T as markdownToPlainText,le as paragraph,n as parseMarkdown,ae as reviver,se as root,x as strikethrough,C as stringifyMarkdown,D as strong,d as tableElementToAscii,h as tableToAscii,y as text,L as toAiMessages,I as toCardElement,p as toModalElement,A as toPlainText,F as toPromptEntries,Re as walkAst};
@@ -31,6 +31,7 @@ export interface CompilerArtifactPaths {
31
31
  discoveryManifestPath: string;
32
32
  discoveryDirectoryPath: string;
33
33
  moduleMapPath: string;
34
+ sandboxPreparedArtifactsPath: string;
34
35
  }
35
36
  /**
36
37
  * Machine-readable compiler diagnostics artifact written by the compiler.
@@ -1 +1 @@
1
- import{createHash}from"node:crypto";import{mkdir,writeFile}from"node:fs/promises";import{z}from"#compiled/zod/index.js";import{join,relative,resolve}from"node:path";import{resolveInstalledPackageInfo}from"#internal/application/package.js";import{normalizeLogicalPath}from"#discover/filesystem.js";import{discoverDiagnosticsSummarySchema}from"#discover/diagnostics.js";import{ROOT_COMPILED_AGENT_NODE_ID}from"#compiler/manifest.js";import{compilerDiagnosticSchema,projectDiscoverDiagnostic,summarizeCompilerDiagnostics}from"#compiler/diagnostics.js";import{createCompiledModuleMapSource}from"#compiler/module-map.js";import{compileAgentManifest}from"#compiler/normalize-manifest.js";import{materializeWorkspaceResources}from"#compiler/workspace-resources.js";const COMPILER_DIAGNOSTICS_ARTIFACT_KIND=`eve-compiler-diagnostics`,COMPILER_DIAGNOSTICS_ARTIFACT_VERSION=2,COMPILE_METADATA_KIND=`eve-compile-metadata`,COMPILE_METADATA_VERSION=6,compilerDiagnosticsArtifactSchema=z.object({diagnostics:z.array(compilerDiagnosticSchema),kind:z.literal(COMPILER_DIAGNOSTICS_ARTIFACT_KIND),summary:discoverDiagnosticsSummarySchema,version:z.literal(2)}).strict();function resolveCompilerArtifactPaths(e){return resolveCompilerArtifactPathsAt(e,join(resolve(e),`.eve`))}function resolveCompilerArtifactPathsAt(e,t){let n=resolve(e),r=resolve(t),i=join(r,`discovery`),a=join(r,`compile`);return{appRoot:n,compiledManifestPath:join(a,`compiled-agent-manifest.json`),compileDirectoryPath:a,compileMetadataPath:join(a,`compile-metadata.json`),diagnosticsPath:join(i,`diagnostics.json`),discoveryManifestPath:join(i,`agent-discovery-manifest.json`),discoveryDirectoryPath:i,moduleMapPath:join(a,`module-map.mjs`)}}function createCompilerDiagnosticsArtifact(e){return{diagnostics:[...e],kind:COMPILER_DIAGNOSTICS_ARTIFACT_KIND,summary:summarizeCompilerDiagnostics(e),version:2}}function createCompileMetadata(e){let t=resolveInstalledPackageInfo(),n=createContentHash(e.compiledManifestJson),r=createContentHash(e.discoveryManifestJson),i=createContentHash(e.diagnosticsArtifactJson),a=createContentHash(e.moduleMapSource);return{compile:{manifest:{path:toArtifactRelativePath(e.appRoot,e.paths.compiledManifestPath),sha256:n},moduleMap:{path:toArtifactRelativePath(e.appRoot,e.paths.moduleMapPath),sha256:a}},discovery:{diagnostics:{path:toArtifactRelativePath(e.appRoot,e.paths.diagnosticsPath),sha256:i},manifest:{path:toArtifactRelativePath(e.appRoot,e.paths.discoveryManifestPath),sha256:r},sourceGraphHash:createContentHash(`${n}:${r}:${i}:${a}`),summary:e.diagnosticsSummary},generator:{name:t.name,version:t.version},kind:COMPILE_METADATA_KIND,status:e.diagnosticsSummary.errors>0?`failed`:`ready`,version:6}}async function writeCompilerArtifacts(e){let t=resolveCompilerArtifactPathsAt(e.appRoot,e.artifactLocations.writeRoot),n=resolveCompilerArtifactPathsAt(e.appRoot,e.artifactLocations.publishedRoot),r=e.diagnostics.map(e=>projectDiscoverDiagnostic(e,ROOT_COMPILED_AGENT_NODE_ID)),i=await materializeWorkspaceResources({compileDirectoryPath:t.compileDirectoryPath,manifest:await compileAgentManifest(e.manifest,{diagnostics:r})}),a=createCompilerDiagnosticsArtifact(r),o=serializeArtifactJson(i),s=serializeArtifactJson(e.manifest),c=serializeArtifactJson(a),l=createCompiledModuleMapSource({manifest:i,moduleMapPath:n.moduleMapPath}),u=createCompileMetadata({appRoot:e.appRoot,compiledManifestJson:o,diagnosticsArtifactJson:c,diagnosticsSummary:a.summary,discoveryManifestJson:s,moduleMapSource:l,paths:n}),d=serializeArtifactJson(u);return await mkdir(t.discoveryDirectoryPath,{recursive:!0}),await mkdir(t.compileDirectoryPath,{recursive:!0}),await Promise.all([writeFile(t.compiledManifestPath,o),writeFile(t.diagnosticsPath,c),writeFile(t.discoveryManifestPath,s),writeFile(t.moduleMapPath,l),writeFile(t.compileMetadataPath,d)]),{compiledManifest:i,diagnosticsArtifact:a,metadata:u,moduleMapSource:l,paths:t}}function createContentHash(e){return createHash(`sha256`).update(e).digest(`hex`)}function serializeArtifactJson(e){return`${JSON.stringify(e,null,2)}\n`}function toArtifactRelativePath(e,t){return normalizeLogicalPath(relative(resolve(e),t))}export{COMPILER_DIAGNOSTICS_ARTIFACT_KIND,COMPILER_DIAGNOSTICS_ARTIFACT_VERSION,COMPILE_METADATA_KIND,COMPILE_METADATA_VERSION,compilerDiagnosticsArtifactSchema,createCompileMetadata,resolveCompilerArtifactPaths,writeCompilerArtifacts};
1
+ import{createHash}from"node:crypto";import{mkdir,writeFile}from"node:fs/promises";import{z}from"#compiled/zod/index.js";import{join,relative,resolve}from"node:path";import{resolveInstalledPackageInfo}from"#internal/application/package.js";import{normalizeLogicalPath}from"#discover/filesystem.js";import{discoverDiagnosticsSummarySchema}from"#discover/diagnostics.js";import{ROOT_COMPILED_AGENT_NODE_ID}from"#compiler/manifest.js";import{compilerDiagnosticSchema,projectDiscoverDiagnostic,summarizeCompilerDiagnostics}from"#compiler/diagnostics.js";import{createCompiledModuleMapSource}from"#compiler/module-map.js";import{compileAgentManifest}from"#compiler/normalize-manifest.js";import{materializeWorkspaceResources}from"#compiler/workspace-resources.js";import{createSandboxPreparedArtifactsManifest}from"#shared/sandbox-prepared-artifacts.js";const COMPILER_DIAGNOSTICS_ARTIFACT_KIND=`eve-compiler-diagnostics`,COMPILER_DIAGNOSTICS_ARTIFACT_VERSION=2,COMPILE_METADATA_KIND=`eve-compile-metadata`,COMPILE_METADATA_VERSION=6,compilerDiagnosticsArtifactSchema=z.object({diagnostics:z.array(compilerDiagnosticSchema),kind:z.literal(COMPILER_DIAGNOSTICS_ARTIFACT_KIND),summary:discoverDiagnosticsSummarySchema,version:z.literal(2)}).strict();function resolveCompilerArtifactPaths(e){return resolveCompilerArtifactPathsAt(e,join(resolve(e),`.eve`))}function resolveCompilerArtifactPathsAt(e,t){let n=resolve(e),r=resolve(t),i=join(r,`discovery`),a=join(r,`compile`);return{appRoot:n,compiledManifestPath:join(a,`compiled-agent-manifest.json`),compileDirectoryPath:a,compileMetadataPath:join(a,`compile-metadata.json`),diagnosticsPath:join(i,`diagnostics.json`),discoveryManifestPath:join(i,`agent-discovery-manifest.json`),discoveryDirectoryPath:i,moduleMapPath:join(a,`module-map.mjs`),sandboxPreparedArtifactsPath:join(a,`sandbox-prepared-artifacts.json`)}}function createCompilerDiagnosticsArtifact(e){return{diagnostics:[...e],kind:COMPILER_DIAGNOSTICS_ARTIFACT_KIND,summary:summarizeCompilerDiagnostics(e),version:2}}function createCompileMetadata(e){let t=resolveInstalledPackageInfo(),n=createContentHash(e.compiledManifestJson),r=createContentHash(e.discoveryManifestJson),i=createContentHash(e.diagnosticsArtifactJson),a=createContentHash(e.moduleMapSource);return{compile:{manifest:{path:toArtifactRelativePath(e.appRoot,e.paths.compiledManifestPath),sha256:n},moduleMap:{path:toArtifactRelativePath(e.appRoot,e.paths.moduleMapPath),sha256:a}},discovery:{diagnostics:{path:toArtifactRelativePath(e.appRoot,e.paths.diagnosticsPath),sha256:i},manifest:{path:toArtifactRelativePath(e.appRoot,e.paths.discoveryManifestPath),sha256:r},sourceGraphHash:createContentHash(`${n}:${r}:${i}:${a}`),summary:e.diagnosticsSummary},generator:{name:t.name,version:t.version},kind:COMPILE_METADATA_KIND,status:e.diagnosticsSummary.errors>0?`failed`:`ready`,version:6}}async function writeCompilerArtifacts(e){let t=resolveCompilerArtifactPathsAt(e.appRoot,e.artifactLocations.writeRoot),n=resolveCompilerArtifactPathsAt(e.appRoot,e.artifactLocations.publishedRoot),r=e.diagnostics.map(e=>projectDiscoverDiagnostic(e,ROOT_COMPILED_AGENT_NODE_ID)),i=await materializeWorkspaceResources({compileDirectoryPath:t.compileDirectoryPath,manifest:await compileAgentManifest(e.manifest,{diagnostics:r})}),a=createCompilerDiagnosticsArtifact(r),o=serializeArtifactJson(i),s=serializeArtifactJson(e.manifest),c=serializeArtifactJson(a),l=createCompiledModuleMapSource({manifest:i,moduleMapPath:n.moduleMapPath}),u=createCompileMetadata({appRoot:e.appRoot,compiledManifestJson:o,diagnosticsArtifactJson:c,diagnosticsSummary:a.summary,discoveryManifestJson:s,moduleMapSource:l,paths:n}),d=serializeArtifactJson(u),f=serializeArtifactJson(createSandboxPreparedArtifactsManifest([]));return await mkdir(t.discoveryDirectoryPath,{recursive:!0}),await mkdir(t.compileDirectoryPath,{recursive:!0}),await Promise.all([writeFile(t.compiledManifestPath,o),writeFile(t.diagnosticsPath,c),writeFile(t.discoveryManifestPath,s),writeFile(t.moduleMapPath,l),writeFile(t.compileMetadataPath,d),writeFile(t.sandboxPreparedArtifactsPath,f)]),{compiledManifest:i,diagnosticsArtifact:a,metadata:u,moduleMapSource:l,paths:t}}function createContentHash(e){return createHash(`sha256`).update(e).digest(`hex`)}function serializeArtifactJson(e){return`${JSON.stringify(e,null,2)}\n`}function toArtifactRelativePath(e,t){return normalizeLogicalPath(relative(resolve(e),t))}export{COMPILER_DIAGNOSTICS_ARTIFACT_KIND,COMPILER_DIAGNOSTICS_ARTIFACT_VERSION,COMPILE_METADATA_KIND,COMPILE_METADATA_VERSION,compilerDiagnosticsArtifactSchema,createCompileMetadata,resolveCompilerArtifactPaths,writeCompilerArtifacts};
@@ -11,8 +11,8 @@ declare const EXTENSION_CAPABILITY_CONTRACTS: {
11
11
  readonly dropped: {};
12
12
  };
13
13
  readonly tool: {
14
- readonly current: 53;
15
- readonly supported: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 29, 30, 31, 32, 34, 35, 53];
14
+ readonly current: 54;
15
+ readonly supported: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 29, 30, 31, 32, 34, 35, 54];
16
16
  readonly dropped: {
17
17
  readonly 14: "TaskExec.delegated was removed; migrate to workflow-backed background tools";
18
18
  readonly 15: "TaskExec replaces stageEffect with send";
@@ -47,11 +47,12 @@ declare const EXTENSION_CAPABILITY_CONTRACTS: {
47
47
  readonly 50: "Background defineTool and TaskExec were removed; use defineWorkflowTool for durable background work.";
48
48
  readonly 51: "Background defineTool and TaskExec were removed; use defineWorkflowTool for durable background work.";
49
49
  readonly 52: "Background defineTool and TaskExec were removed; use defineWorkflowTool for durable background work.";
50
+ readonly 53: "Sandbox sessions no longer expose core identity and mutable networking is provider-specific.";
50
51
  };
51
52
  };
52
53
  readonly dynamicTool: {
53
- readonly current: 51;
54
- readonly supported: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 31, 32, 33, 51];
54
+ readonly current: 52;
55
+ readonly supported: readonly [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];
55
56
  readonly dropped: {
56
57
  readonly 21: "Message and reasoning append events now expose deltas instead of cumulative snapshots.";
57
58
  readonly 23: "TaskExec.delegated was removed; migrate to workflow-backed background tools";
@@ -79,11 +80,12 @@ declare const EXTENSION_CAPABILITY_CONTRACTS: {
79
80
  readonly 48: "Background dynamic tools were removed; use a static defineWorkflowTool for durable background work.";
80
81
  readonly 49: "Background dynamic tools were removed; use a static defineWorkflowTool for durable background work.";
81
82
  readonly 50: "Background dynamic tools were removed; use a static defineWorkflowTool for durable background work.";
83
+ readonly 51: "Sandbox sessions no longer expose core identity and mutable networking is provider-specific.";
82
84
  };
83
85
  };
84
86
  readonly channel: {
85
- readonly current: 27;
86
- readonly supported: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 27];
87
+ readonly current: 29;
88
+ readonly supported: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 29];
87
89
  readonly dropped: {
88
90
  readonly 12: "Message and reasoning append events now expose deltas instead of cumulative snapshots.";
89
91
  readonly 19: "Continuation rekey was removed; channel extensions must use additive continuation.alias instead.";
@@ -94,11 +96,13 @@ declare const EXTENSION_CAPABILITY_CONTRACTS: {
94
96
  readonly 24: "Task views no longer expose executor bindings; background work is owned by workflow runs.";
95
97
  readonly 25: "Task views no longer expose executor bindings; background work is owned by workflow runs.";
96
98
  readonly 26: "Task views no longer expose executor bindings; background work is owned by workflow runs.";
99
+ readonly 27: "Sandbox sessions no longer expose core identity and mutable networking is provider-specific.";
100
+ readonly 28: "Sandbox sessions no longer expose core identity and mutable networking is provider-specific.";
97
101
  };
98
102
  };
99
103
  readonly schedule: {
100
- readonly current: 14;
101
- readonly supported: readonly [1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14];
104
+ readonly current: 15;
105
+ readonly supported: readonly [1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
102
106
  readonly dropped: {
103
107
  readonly 5: "Message and reasoning append events now expose deltas instead of cumulative snapshots.";
104
108
  };
@@ -115,16 +119,17 @@ declare const EXTENSION_CAPABILITY_CONTRACTS: {
115
119
  };
116
120
  };
117
121
  readonly connection: {
118
- readonly current: 23;
119
- readonly supported: readonly [1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23];
122
+ readonly current: 24;
123
+ readonly supported: readonly [1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24];
120
124
  readonly dropped: {
121
125
  readonly 9: "Dynamic connection resolvers no longer receive conversation or channel continuation data";
122
126
  readonly 10: "Message and reasoning append events now expose deltas instead of cumulative snapshots.";
127
+ readonly 23: "Sandbox sessions no longer expose core identity and mutable networking is provider-specific.";
123
128
  };
124
129
  };
125
130
  readonly hook: {
126
- readonly current: 24;
127
- readonly supported: readonly [10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24];
131
+ readonly current: 25;
132
+ readonly supported: readonly [10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25];
128
133
  readonly dropped: {
129
134
  readonly 1: "Model identity moved from session.started runtime metadata to step.started call attribution.";
130
135
  readonly 2: "Model identity moved from session.started runtime metadata to step.started call attribution.";
@@ -136,6 +141,7 @@ declare const EXTENSION_CAPABILITY_CONTRACTS: {
136
141
  readonly 8: "Model identity moved from session.started runtime metadata to step.started call attribution.";
137
142
  readonly 9: "Model identity moved from session.started runtime metadata to step.started call attribution.";
138
143
  readonly 16: "Message and reasoning append events now expose deltas instead of cumulative snapshots.";
144
+ readonly 24: "Sandbox sessions no longer expose core identity and mutable networking is provider-specific.";
139
145
  };
140
146
  };
141
147
  readonly skill: {
@@ -168,9 +174,11 @@ declare const EXTENSION_CAPABILITY_CONTRACTS: {
168
174
  readonly dropped: {};
169
175
  };
170
176
  readonly state: {
171
- readonly current: 6;
172
- readonly supported: readonly [1, 2, 3, 4, 5, 6];
173
- readonly dropped: {};
177
+ readonly current: 7;
178
+ readonly supported: readonly [1, 2, 3, 4, 5, 7];
179
+ readonly dropped: {
180
+ readonly 6: "Sandbox sessions no longer expose core identity and mutable networking is provider-specific.";
181
+ };
174
182
  };
175
183
  };
176
184
  /** One independently versioned extension-facing contract. */
@@ -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:53,supported:[1,2,3,4,5,6,7,8,9,10,11,12,13,29,30,31,32,34,35,53],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.`}},dynamicTool:{current:51,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,51],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.`}},channel:{current:27,supported:[1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,27],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.`}},schedule:{current:14,supported:[1,2,3,4,6,7,8,9,10,11,12,13,14],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:23,supported:[1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18,19,20,21,22,23],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.`}},hook:{current:24,supported:[10,11,12,13,14,15,17,18,19,20,21,22,23,24],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.`}},skill:{current:1,supported:[1],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:6,supported:[1,2,3,4,5,6],dropped:{}}},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:54,supported:[1,2,3,4,5,6,7,8,9,10,11,12,13,29,30,31,32,34,35,54],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.`}},dynamicTool:{current:52,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],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.`}},channel:{current:29,supported:[1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,29],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.`}},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:24,supported:[1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18,19,20,21,22,24],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.`}},hook:{current:25,supported:[10,11,12,13,14,15,17,18,19,20,21,22,23,25],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.`}},skill:{current:1,supported:[1],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:7,supported:[1,2,3,4,5,7],dropped:{6:`Sandbox sessions no longer expose core identity and mutable networking is provider-specific.`}}},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};
@@ -22,7 +22,7 @@ export declare const ROOT_COMPILED_AGENT_NODE_ID = "__root__";
22
22
  /**
23
23
  * Current compiled manifest schema version.
24
24
  */
25
- export declare const COMPILED_AGENT_MANIFEST_VERSION = 50;
25
+ export declare const COMPILED_AGENT_MANIFEST_VERSION = 51;
26
26
  /**
27
27
  * Compiled channel entry preserved in the compiled manifest.
28
28
  */
@@ -282,13 +282,12 @@ declare const compiledScheduleDefinitionSchema: z.ZodDiscriminatedUnion<[z.ZodOb
282
282
  sourceKind: z.ZodLiteral<"module">;
283
283
  }, z.core.$strict>], "sourceKind">;
284
284
  declare const compiledSandboxDefinitionSchema: z.ZodObject<{
285
- backendName: z.ZodOptional<z.ZodString>;
286
- description: z.ZodOptional<z.ZodString>;
285
+ providerName: z.ZodOptional<z.ZodString>;
286
+ environmentExportName: z.ZodOptional<z.ZodString>;
287
287
  inheritsParent: z.ZodOptional<z.ZodBoolean>;
288
288
  exportName: z.ZodOptional<z.ZodString>;
289
289
  logicalPath: z.ZodString;
290
- revalidationKey: z.ZodOptional<z.ZodString>;
291
- sourceHash: z.ZodString;
290
+ revisionHash: z.ZodString;
292
291
  sourceId: z.ZodString;
293
292
  sourceKind: z.ZodLiteral<"module">;
294
293
  }, z.core.$strict>;
@@ -353,13 +352,12 @@ declare const compiledAgentResourcesSchema: z.ZodObject<{
353
352
  hooks: z.ZodArray<z.ZodType<CompiledHookDefinition, unknown, z.core.$ZodTypeInternals<CompiledHookDefinition, unknown>>>;
354
353
  memories: z.ZodDefault<z.ZodArray<z.ZodType<CompiledMemoryDefinition, unknown, z.core.$ZodTypeInternals<CompiledMemoryDefinition, unknown>>>>;
355
354
  sandbox: z.ZodObject<{
356
- backendName: z.ZodOptional<z.ZodString>;
357
- description: z.ZodOptional<z.ZodString>;
355
+ providerName: z.ZodOptional<z.ZodString>;
356
+ environmentExportName: z.ZodOptional<z.ZodString>;
358
357
  inheritsParent: z.ZodOptional<z.ZodBoolean>;
359
358
  exportName: z.ZodOptional<z.ZodString>;
360
359
  logicalPath: z.ZodString;
361
- revalidationKey: z.ZodOptional<z.ZodString>;
362
- sourceHash: z.ZodString;
360
+ revisionHash: z.ZodString;
363
361
  sourceId: z.ZodString;
364
362
  sourceKind: z.ZodLiteral<"module">;
365
363
  }, z.core.$strict>;
@@ -481,13 +479,12 @@ declare const compiledAgentNodeManifestSchema: z.ZodObject<{
481
479
  hooks: z.ZodArray<z.ZodType<CompiledHookDefinition, unknown, z.core.$ZodTypeInternals<CompiledHookDefinition, unknown>>>;
482
480
  memories: z.ZodDefault<z.ZodArray<z.ZodType<CompiledMemoryDefinition, unknown, z.core.$ZodTypeInternals<CompiledMemoryDefinition, unknown>>>>;
483
481
  sandbox: z.ZodObject<{
484
- backendName: z.ZodOptional<z.ZodString>;
485
- description: z.ZodOptional<z.ZodString>;
482
+ providerName: z.ZodOptional<z.ZodString>;
483
+ environmentExportName: z.ZodOptional<z.ZodString>;
486
484
  inheritsParent: z.ZodOptional<z.ZodBoolean>;
487
485
  exportName: z.ZodOptional<z.ZodString>;
488
486
  logicalPath: z.ZodString;
489
- revalidationKey: z.ZodOptional<z.ZodString>;
490
- sourceHash: z.ZodString;
487
+ revisionHash: z.ZodString;
491
488
  sourceId: z.ZodString;
492
489
  sourceKind: z.ZodLiteral<"module">;
493
490
  }, z.core.$strict>;
@@ -674,13 +671,12 @@ export declare const compiledAgentManifestSchema: z.ZodObject<{
674
671
  url?: string;
675
672
  }>, unknown>>>;
676
673
  sandbox: z.ZodObject<{
677
- backendName: z.ZodOptional<z.ZodString>;
678
- description: z.ZodOptional<z.ZodString>;
674
+ providerName: z.ZodOptional<z.ZodString>;
675
+ environmentExportName: z.ZodOptional<z.ZodString>;
679
676
  inheritsParent: z.ZodOptional<z.ZodBoolean>;
680
677
  exportName: z.ZodOptional<z.ZodString>;
681
678
  logicalPath: z.ZodString;
682
- revalidationKey: z.ZodOptional<z.ZodString>;
683
- sourceHash: z.ZodString;
679
+ revisionHash: z.ZodString;
684
680
  sourceId: z.ZodString;
685
681
  sourceKind: z.ZodLiteral<"module">;
686
682
  }, z.core.$strict>;
@@ -730,7 +726,7 @@ export declare const compiledAgentManifestSchema: z.ZodObject<{
730
726
  maxSubagents: z.ZodNumber;
731
727
  }, z.core.$strict>>;
732
728
  }, z.core.$strict>>;
733
- version: z.ZodLiteral<50>;
729
+ version: z.ZodLiteral<51>;
734
730
  workspaceResourceRoot: z.ZodObject<{
735
731
  contentHash: z.ZodOptional<z.ZodString>;
736
732
  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=50,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({backendName:z.string().optional(),description:z.string().optional(),inheritsParent:z.boolean().optional(),exportName:z.string().optional(),logicalPath:z.string(),revalidationKey:z.string().optional(),sourceHash: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`,`requires-request-input`,`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(`request-input`),request:z.literal(`question`)}).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(50),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:50};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=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`,`requires-request-input`,`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(`request-input`),request:z.literal(`question`)}).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 +1 @@
1
- import{getAuthoredModuleExport,materializeAuthoredModuleExport}from"#internal/authored-module.js";import{toErrorMessage}from"#shared/errors.js";import"#compiler/source-graph.js";const SANDBOX_PARENT_DEFINITION_MARKER=Symbol.for(`eve.sandbox-parent-definition`);function requireModuleBackedDefinitionLoadOptions(e,t){if(e.binding===void 0||e.loadNamespace===void 0)throw Error(`Module-backed source "${t}" requires a compiled binding.`);return{binding:e.binding,loadNamespace:e.loadNamespace}}async function loadModuleBackedDefinition(e){if(e.binding.logicalPath!==e.source.logicalPath)throw Error(`Compiled binding "${e.source.sourceId}" targets "${e.binding.logicalPath}", not "${e.source.logicalPath}".`);let t=await e.loadNamespace(e.source.sourceId),n=getAuthoredModuleExport(t,e.source);if(e.kind===`sandbox`&&typeof n==`function`&&Reflect.get(n,SANDBOX_PARENT_DEFINITION_MARKER)===!0)return n;try{return await materializeAuthoredModuleExport(n)}catch(t){throw e.kind===`sandbox`&&typeof n==`function`?Error(`Failed to execute the sandbox export "${e.source.exportName??`default`}" from "${e.displayPath??e.source.logicalPath}" as a zero-argument definition factory. Parent-sharing callbacks must be passed to defineSandbox(...): ${toErrorMessage(t)}`):Error(`Failed to execute the ${e.kind} export "${e.source.exportName??`default`}" from "${e.displayPath??e.source.logicalPath}": ${toErrorMessage(t)}`)}}export{loadModuleBackedDefinition,requireModuleBackedDefinitionLoadOptions};
1
+ import{getAuthoredModuleExport,materializeAuthoredModuleExport}from"#internal/authored-module.js";import{toErrorMessage}from"#shared/errors.js";import"#compiler/source-graph.js";const SANDBOX_SELECTOR_MARKER=Symbol.for(`eve.sandbox-selector`);function requireModuleBackedDefinitionLoadOptions(e,t){if(e.binding===void 0||e.loadNamespace===void 0)throw Error(`Module-backed source "${t}" requires a compiled binding.`);return{binding:e.binding,loadNamespace:e.loadNamespace}}async function loadModuleBackedDefinition(e){if(e.binding.logicalPath!==e.source.logicalPath)throw Error(`Compiled binding "${e.source.sourceId}" targets "${e.binding.logicalPath}", not "${e.source.logicalPath}".`);let t=await e.loadNamespace(e.source.sourceId),n=getAuthoredModuleExport(t,e.source);if(e.kind===`sandbox`&&typeof n==`function`&&Reflect.get(n,SANDBOX_SELECTOR_MARKER)===!0)return n;try{return await materializeAuthoredModuleExport(n)}catch(t){throw e.kind===`sandbox`&&typeof n==`function`?Error(`Failed to execute the sandbox export "${e.source.exportName??`default`}" from "${e.displayPath??e.source.logicalPath}" as a zero-argument definition factory. Runtime selectors must be passed to defineSandbox(...): ${toErrorMessage(t)}`):Error(`Failed to execute the ${e.kind} export "${e.source.exportName??`default`}" from "${e.displayPath??e.source.logicalPath}": ${toErrorMessage(t)}`)}}export{loadModuleBackedDefinition,requireModuleBackedDefinitionLoadOptions};
@@ -1,9 +1,4 @@
1
- import type { SandboxSourceRef } from "#discover/manifest.js";
2
1
  import type { CompiledSandboxDefinition } from "#compiler/manifest.js";
3
- import { type ModuleBackedDefinitionLoadOptions } from "#compiler/normalize-helpers.js";
4
- /**
5
- * Compiles one authored sandbox module into the normalized sandbox
6
- * definition stored on the compiled agent manifest.
7
- */
2
+ import type { ModuleBackedDefinitionLoadOptions } from "#compiler/normalize-helpers.js";
3
+ import type { SandboxSourceRef } from "#discover/manifest.js";
8
4
  export declare function compileSandboxDefinition(_agentRoot: string, source: SandboxSourceRef, options: ModuleBackedDefinitionLoadOptions): Promise<CompiledSandboxDefinition>;
9
- export declare function resolveParentSandboxSelector(value: unknown, message: string): Promise<boolean>;
@@ -1 +1 @@
1
- import{createHash}from"node:crypto";import{readFile}from"node:fs/promises";import{toErrorMessage}from"#shared/errors.js";import{loadModuleBackedDefinition}from"#compiler/normalize-helpers.js";import{normalizeSandboxDefinition}from"#internal/authored-definition/sandbox.js";async function compileSandboxDefinition(e,t,n){let r=`Expected the sandbox export "${t.exportName??`default`}" from "${t.logicalPath}" to match the public eve shape.`,i=await loadModuleBackedDefinition({binding:n.binding,kind:`sandbox`,loadNamespace:n.loadNamespace,source:t}),a=await resolveParentSandboxSelector(i,r),o=normalizeSandboxDefinition(a?{}:i,r),s=o.revalidationKey===void 0?void 0:await resolveSandboxRevalidationKey({message:r,revalidationKey:o.revalidationKey,source:t});return{backendName:resolveCompiledBackendName(o.backend),description:o.description,inheritsParent:a||void 0,exportName:t.exportName,logicalPath:t.logicalPath,revalidationKey:s,sourceHash:await resolveSandboxSourceHash(n.binding),sourceId:t.sourceId,sourceKind:`module`}}const PARENT_SANDBOX_VALUE=Object.freeze({__eveSandboxParentValue:Symbol(`parent`)});async function resolveParentSandboxSelector(e,t){if(typeof e!=`function`)return!1;let n;try{n=await e({parent:{sandbox:PARENT_SANDBOX_VALUE}})}catch(e){throw Error(`${t} The callback passed to defineSandbox(...) threw while selecting parent.sandbox: ${toErrorMessage(e)}`)}if(n!==PARENT_SANDBOX_VALUE)throw Error(`${t} The callback passed to defineSandbox(...) must return parent.sandbox. Export a sandbox definition object for an independent sandbox.`);return!0}function resolveCompiledBackendName(e){if(e!==void 0)try{return e.name}catch{return}}async function resolveSandboxRevalidationKey(e){let t;try{t=await e.revalidationKey()}catch(t){throw Error(`${e.message} Failed to execute the "revalidationKey" function from "${e.source.logicalPath}": ${toErrorMessage(t)}`)}if(typeof t!=`string`)throw Error(`${e.message} The "revalidationKey" function must return a string.`);if(t.trim().length===0)throw Error(`${e.message} The "revalidationKey" function must return a non-empty string.`);return t}async function resolveSandboxSourceHash(e){if(e.backing.kind===`programmatic`)return createHash(`sha256`).update(e.backing.semanticRevision??e.backing.revision).digest(`hex`);let t=await readFile(e.backing.sourcePath);return createHash(`sha256`).update(t).digest(`hex`)}export{compileSandboxDefinition,resolveParentSandboxSelector};
1
+ import{createHash}from"node:crypto";import{readFile}from"node:fs/promises";import{getAuthoredModuleExport}from"#internal/authored-module.js";import{getBoundSandboxEnvironment,isSandboxEnvironment}from"#shared/sandbox-environment.js";const PARENT=Symbol.for(`eve.sandbox-parent-definition`),SELECTOR=Symbol.for(`eve.sandbox-selector`);async function compileSandboxDefinition(e,t,n){let r=await n.loadNamespace(t.sourceId),i=getAuthoredModuleExport(r,t);if(typeof i!=`function`||Reflect.get(i,SELECTOR)!==!0)throw Error(`Expected sandbox "${t.logicalPath}" to default-export defineSandbox().`);let a=Reflect.get(i,PARENT)===!0,o=isSandboxEnvironment(r.environment)?r.environment:getBoundSandboxEnvironment(i);if(!a&&o===void 0)throw Error(`Sandbox "${t.logicalPath}" must export an environment.`);let s=n.binding.backing.kind===`programmatic`?n.binding.backing.semanticRevision??n.binding.backing.revision:await readFile(n.binding.backing.sourcePath),c=createHash(`sha256`).update(`sandbox-source\0`).update(s);return{providerName:o?.provider,environmentExportName:isSandboxEnvironment(r.environment)?`environment`:void 0,exportName:t.exportName,inheritsParent:a||void 0,logicalPath:t.logicalPath,revisionHash:c.digest(`hex`),sourceId:t.sourceId,sourceKind:`module`}}export{compileSandboxDefinition};
@@ -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`;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`);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,`skills`,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 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,4 +1,5 @@
1
1
  import type { SessionContext } from "#context/session-context.js";
2
+ import type { RuntimeSandboxSession, SandboxSession } from "#shared/sandbox-session.js";
2
3
  /**
3
4
  * Builds a {@link SessionContext} from the active ALS scope.
4
5
  *
@@ -6,3 +7,4 @@ import type { SessionContext } from "#context/session-context.js";
6
7
  * Throws when called outside an ALS scope.
7
8
  */
8
9
  export declare function buildCallbackContext(): SessionContext;
10
+ export declare function withRuntimeSandboxLifecycle<Session extends SandboxSession>(sandbox: Session, deleteSandbox: RuntimeSandboxSession["delete"], stop: () => Promise<void>): Session & Pick<RuntimeSandboxSession, "delete" | "stop">;
@@ -1 +1 @@
1
- import{loadContext}from"#context/container.js";import{SandboxKey,SessionKey}from"#context/keys.js";import{createSandboxSkillHandle}from"#runtime/skills/sandbox-access.js";function buildCallbackContext(){let e=loadContext(),t=e.require(SessionKey);return{session:{id:t.sessionId,auth:t.auth,turn:t.turn,parent:t.parent},getSandbox(){let t=e.get(SandboxKey);if(t===void 0)throw Error(`eve sandbox runtime access is unavailable in the current async context. Call ctx.getSandbox() only from authored runtime functions such as tools, hooks, and channel events.`);return t.get().then(e=>{if(e===null)throw Error(`The sandbox is not available in the current authored runtime context.`);return withRuntimeSandboxLifecycle(e,async e=>{if(t.delete===void 0)throw Error(`The active sandbox runtime does not support deletion.`);await t.delete(e)},async()=>await t.stop())})},getSkill(t){let n=e.get(SandboxKey);if(n===void 0)throw Error(`eve sandbox runtime access is unavailable in the current async context. Call ctx.getSkill() only from authored runtime functions such as tools, hooks, and channel events.`);return createSandboxSkillHandle(n,t)}}}function withRuntimeSandboxLifecycle(e,t,n){return{delete:t,id:e.id,readBinaryFile:t=>e.readBinaryFile(t),readFile:t=>e.readFile(t),readTextFile:t=>e.readTextFile(t),removePath:t=>e.removePath(t),resolvePath:t=>e.resolvePath(t),run:t=>e.run(t),setNetworkPolicy:t=>e.setNetworkPolicy(t),spawn:t=>e.spawn(t),stop:n,writeBinaryFile:t=>e.writeBinaryFile(t),writeFile:t=>e.writeFile(t),writeTextFile:t=>e.writeTextFile(t)}}export{buildCallbackContext};
1
+ import{loadContext}from"#context/container.js";import{SandboxKey,SessionKey}from"#context/keys.js";import{createSandboxSkillHandle}from"#runtime/skills/sandbox-access.js";function buildCallbackContext(){let e=loadContext(),t=e.require(SessionKey);return{session:{id:t.sessionId,auth:t.auth,turn:t.turn,parent:t.parent},getSandbox(){let t=e.get(SandboxKey);if(t===void 0)throw Error(`eve sandbox runtime access is unavailable in the current async context. Call ctx.getSandbox() only from authored runtime functions such as tools, hooks, and channel events.`);return t.get().then(e=>{if(e===null)throw Error(`The sandbox is not available in the current authored runtime context.`);return withRuntimeSandboxLifecycle(e,async e=>{if(t.delete===void 0)throw Error(`The active sandbox runtime does not support deletion.`);await t.delete(e)},async()=>await t.stop())})},getSkill(t){let n=e.get(SandboxKey);if(n===void 0)throw Error(`eve sandbox runtime access is unavailable in the current async context. Call ctx.getSkill() only from authored runtime functions such as tools, hooks, and channel events.`);return createSandboxSkillHandle(n,t)}}}function withRuntimeSandboxLifecycle(e,t,n){return new Proxy(Object.create(null),{get(r,i){if(i===`delete`)return t;if(i===`stop`)return n;let a=Reflect.get(e,i,e);return typeof a==`function`?a.bind(e):a},getOwnPropertyDescriptor(t,n){if(n===`delete`||n===`stop`)return{configurable:!0,enumerable:!0,writable:!1};let r=Reflect.getOwnPropertyDescriptor(e,n);return r===void 0?void 0:{...r,configurable:!0}},has(t,n){return n===`delete`||n===`stop`||Reflect.has(e,n)},ownKeys(){return[...new Set([...Reflect.ownKeys(e),`delete`,`stop`])]}})}export{buildCallbackContext,withRuntimeSandboxLifecycle};
@@ -12,7 +12,7 @@ import { type LocalDevRequestProvenance } from "#context/keys.js";
12
12
  * the serialization layer.
13
13
  */
14
14
  export interface AlsContext extends ContextAccessor {
15
- /** Verified local development provenance, inherited across durable execution contexts. */
15
+ /** Verified originating-client metadata, inherited only for the dev-TUI hint. */
16
16
  readonly localDevRequest?: LocalDevRequestProvenance;
17
17
  /** Removes a durable or step-local value from the context. */
18
18
  delete<T>(key: ContextKey<T>): boolean;
@@ -1 +1 @@
1
- import{LocalDevRequestKey}from"#context/keys.js";import{AsyncLocalStorage}from"node:async_hooks";import{resolveKey}from"#context/key.js";const EVE_CONTEXT_STORAGE_KEY=Symbol.for(`eve.context-storage`);var ContextContainer=class{_durableValues=new Map;_virtualValues=new Map;constructor(e){let t=e?.localDevRequest??contextStorage.getStore()?.localDevRequest;t!==void 0&&this._durableValues.set(LocalDevRequestKey.name,t)}get localDevRequest(){return this.get(LocalDevRequestKey)}get(e){return this._virtualValues.has(e.name)?this._virtualValues.get(e.name):this._durableValues.get(e.name)}require(e){if(!this.has(e))throw Error(`Context key "${e.name}" is not set.`);return this.get(e)}has(e){return this._virtualValues.has(e.name)||this._durableValues.has(e.name)}set(e,t){let n=typeof t==`function`?t(this.get(e)):t;return this._durableValues.set(e.name,n),n}ensure(e,t){return this.has(e)?this.require(e):this.set(e,t())}delete(e){let t=this._durableValues.delete(e.name),n=this._virtualValues.delete(e.name);return t||n}clearVirtualContext(){this._virtualValues.clear()}setVirtualContext(e,t){this._virtualValues.set(e.name,t)}*entries(){for(let[e,t]of this._durableValues){let n=resolveKey(e);n!==void 0&&(yield[n,t])}}};const globalContextStorage=globalThis;globalContextStorage[EVE_CONTEXT_STORAGE_KEY]===void 0&&(globalContextStorage[EVE_CONTEXT_STORAGE_KEY]=new AsyncLocalStorage);const contextStorage=globalContextStorage[EVE_CONTEXT_STORAGE_KEY];function loadContext(){let e=contextStorage.getStore();if(e===void 0)throw Error(`No active eve context. Call this function only from authored runtime code such as tools, steps, and model callbacks.`);return e}export{ContextContainer,contextStorage,loadContext};
1
+ import{LocalDevRequestKey}from"#context/keys.js";import{AsyncLocalStorage}from"node:async_hooks";import{resolveKey}from"#context/key.js";const EVE_CONTEXT_STORAGE_KEY=Symbol.for(`eve.context-storage`);var ContextContainer=class{_durableValues=new Map;_virtualValues=new Map;constructor(e){let t=e!==void 0&&Object.hasOwn(e,`localDevRequest`)?e.localDevRequest:contextStorage.getStore()?.localDevRequest;t!==void 0&&this._durableValues.set(LocalDevRequestKey.name,t)}get localDevRequest(){return this.get(LocalDevRequestKey)}get(e){return this._virtualValues.has(e.name)?this._virtualValues.get(e.name):this._durableValues.get(e.name)}require(e){if(!this.has(e))throw Error(`Context key "${e.name}" is not set.`);return this.get(e)}has(e){return this._virtualValues.has(e.name)||this._durableValues.has(e.name)}set(e,t){let n=typeof t==`function`?t(this.get(e)):t;return this._durableValues.set(e.name,n),n}ensure(e,t){return this.has(e)?this.require(e):this.set(e,t())}delete(e){let t=this._durableValues.delete(e.name),n=this._virtualValues.delete(e.name);return t||n}clearVirtualContext(){this._virtualValues.clear()}setVirtualContext(e,t){this._virtualValues.set(e.name,t)}*entries(){for(let[e,t]of this._durableValues){let n=resolveKey(e);n!==void 0&&(yield[n,t])}}};const globalContextStorage=globalThis;globalContextStorage[EVE_CONTEXT_STORAGE_KEY]===void 0&&(globalContextStorage[EVE_CONTEXT_STORAGE_KEY]=new AsyncLocalStorage);const contextStorage=globalContextStorage[EVE_CONTEXT_STORAGE_KEY];function loadContext(){let e=contextStorage.getStore();if(e===void 0)throw Error(`No active eve context. Call this function only from authored runtime code such as tools, steps, and model callbacks.`);return e}export{ContextContainer,contextStorage,loadContext};
@@ -10,3 +10,4 @@
10
10
  */
11
11
  export declare const CHANNEL_CONTEXT_KEY_NAME = "eve.channel";
12
12
  export declare const SESSION_CALLBACK_CONTEXT_KEY_NAME = "eve.sessionCallback";
13
+ export declare const TASK_DELIVERY_POLICY_CONTEXT_KEY_NAME = "eve.runtime.taskDeliveryPolicy";
@@ -1 +1 @@
1
- const CHANNEL_CONTEXT_KEY_NAME=`eve.channel`,SESSION_CALLBACK_CONTEXT_KEY_NAME=`eve.sessionCallback`;export{CHANNEL_CONTEXT_KEY_NAME,SESSION_CALLBACK_CONTEXT_KEY_NAME};
1
+ const CHANNEL_CONTEXT_KEY_NAME=`eve.channel`,SESSION_CALLBACK_CONTEXT_KEY_NAME=`eve.sessionCallback`,TASK_DELIVERY_POLICY_CONTEXT_KEY_NAME=`eve.runtime.taskDeliveryPolicy`;export{CHANNEL_CONTEXT_KEY_NAME,SESSION_CALLBACK_CONTEXT_KEY_NAME,TASK_DELIVERY_POLICY_CONTEXT_KEY_NAME};
@@ -4,7 +4,7 @@
4
4
  * `#runtime/sessions/runtime-context-keys.ts`.
5
5
  */
6
6
  import type { LanguageModel, ModelMessage, SystemModelMessage } from "ai";
7
- import type { ActivityObserverConfig, ChannelDeliveryMetadata, ChannelInstrumentationProjection, SessionAuthContext, SessionCallback, SessionCapabilities, SessionParent, SessionTraceContext, SessionTurn } from "#channel/types.js";
7
+ import type { ActivityObserverConfig, ChannelDeliveryMetadata, ChannelInstrumentationProjection, SessionAuthContext, SessionCallback, SessionCapabilities, SessionParent, SessionTraceContext, SessionTurn, TaskDeliveryPolicy } from "#channel/types.js";
8
8
  import { ContextKey } from "#context/key.js";
9
9
  import { type SessionInboxAddress } from "#execution/session-inbox/address.js";
10
10
  import type { InstrumentationChannelDeliveryRef } from "#instrumentation/lifecycle.js";
@@ -53,7 +53,10 @@ export declare const ContinuationTokenKey: ContextKey<string>;
53
53
  /** Every channel continuation address requested for this session, in claim order. */
54
54
  export declare const ContinuationHookTokensKey: ContextKey<readonly string[]>;
55
55
  export declare const ChannelRequestIdKey: ContextKey<string>;
56
- /** Parent-verified local client provenance, valid only for the current dev host secret. */
56
+ /**
57
+ * Dev-host-verified originating-client metadata, valid only for the current
58
+ * host secret. It carries the inherited dev-TUI hint, not editing authority.
59
+ */
57
60
  export interface LocalDevRequestProvenance {
58
61
  readonly address: string;
59
62
  readonly interactiveClient: boolean;
@@ -67,6 +70,8 @@ export declare const SessionTitleKey: ContextKey<string>;
67
70
  export declare const ChannelDeliveryKey: ContextKey<ChannelDeliveryMetadata>;
68
71
  /** Accepted messages whose response owns the current turn's durable stream events. */
69
72
  export declare const TurnDeliveryIdsKey: ContextKey<readonly string[]>;
73
+ /** Resolved task delivery policy, also read by the workflow inbox. */
74
+ export declare const TaskDeliveryPolicyKey: ContextKey<TaskDeliveryPolicy>;
70
75
  /** Task-reporting phase for the active root turn. */
71
76
  export declare const TurnTaskDeliveryKey: ContextKey<"initiating" | "none" | "pending" | "settled">;
72
77
  /** Last framework announcements recorded in the retained session history. */
@@ -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}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`),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`),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,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,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`),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`),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,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 +1 @@
1
- import{getAdapterKind}from"#channel/adapter.js";import{contextStorage}from"#context/container.js";import{SandboxKey,SessionIdKey}from"#context/keys.js";import{BundleKey,ChannelKey}from"#runtime/sessions/runtime-context-keys.js";import{getActiveRuntimeNode}from"#context/node.js";import{ensureSandboxAccess}from"#execution/sandbox/ensure.js";const sandboxProvider={key:SandboxKey,async create(e,t){let n=e.get(BundleKey);if(n===void 0)return;let r=getActiveRuntimeNode(e),i=r.sandboxRegistry,a=e.require(SessionIdKey),o=e.get(ChannelKey),s=o?.state,c=s?.parentSandboxState,l=i.sandbox?.definition.inheritsParent===!0,u=s?.sandboxSessionId,d=l||u!==void 0,f=d?u??a:a;return{value:await ensureSandboxAccess({compiledArtifactsSource:n.compiledArtifactsSource,nodeId:r.nodeId,ownsSandbox:!d,registry:i,runOnSession:async t=>await contextStorage.run(e,t),sessionId:f,state:t.sandboxState??(d?c:void 0)??null,tags:{agent:resolveTagAgentName({bundle:n,node:r}),channel:resolveTagChannelKind(o),sessionId:a}})}},async commit(e,t){let n=await e.captureState();return{...t,sandboxState:n}}};function resolveTagAgentName(e){let t=e.node,n=e.bundle;return t.agent?.config?.name??n.resolvedAgent?.config?.name??t.nodeId??`unknown`}function resolveTagChannelKind(e){return e===void 0?`unknown`:getAdapterKind(e)}export{sandboxProvider};
1
+ import{SandboxKey,SessionIdKey}from"#context/keys.js";import{BundleKey,ChannelKey}from"#runtime/sessions/runtime-context-keys.js";import{getActiveRuntimeNode}from"#context/node.js";import{ensureSandboxAccess}from"#execution/sandbox/ensure.js";const sandboxProvider={key:SandboxKey,async create(e,t){let n=e.get(BundleKey);if(n===void 0)return;let r=getActiveRuntimeNode(e),i=r.sandboxRegistry,a=e.require(SessionIdKey),o=e.get(ChannelKey)?.state,s=o?.parentSandboxState,c=i.sandbox?.definition.kind===`parent`,l=o?.sandboxSessionId,u=c||l!==void 0,d=u?l??a:a;return{value:await ensureSandboxAccess({compiledArtifactsSource:n.compiledArtifactsSource,nodeId:r.nodeId,ownsSandbox:!u,registry:i,sessionId:d,state:t.sandboxState??(u?s:void 0)??null})}},async commit(e,t){let n=await e.captureState();return{...t,sandboxState:n}}};export{sandboxProvider};