eve 0.44.4 → 0.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (779) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +13 -12
  3. package/dist/src/acp/adapter.d.ts +1 -1
  4. package/dist/src/approval/definition.d.ts +84 -0
  5. package/dist/src/approval/definition.js +1 -0
  6. package/dist/src/{runtime/governance → channel}/auth/http-basic.d.ts +1 -1
  7. package/dist/src/{runtime/governance → channel}/auth/jwt-ecdsa.d.ts +1 -1
  8. package/dist/src/channel/auth/jwt-ecdsa.js +1 -0
  9. package/dist/src/{runtime/governance → channel}/auth/jwt-hmac.d.ts +1 -1
  10. package/dist/src/channel/auth/jwt-hmac.js +1 -0
  11. package/dist/src/{runtime/governance → channel}/auth/oidc.d.ts +1 -1
  12. package/dist/src/channel/auth/oidc.js +1 -0
  13. package/dist/src/{runtime/governance → channel}/auth/token-claims.d.ts +1 -1
  14. package/dist/src/{runtime/governance → channel}/auth/types.d.ts +1 -1
  15. package/dist/src/{runtime/governance → channel}/auth/vercel-oidc-project.d.ts +1 -1
  16. package/dist/src/channel/channel-operations.d.ts +1 -1
  17. package/dist/src/channel/channel-operations.js +1 -1
  18. package/dist/src/channel/instrumentation.d.ts +1 -0
  19. package/dist/src/channel/instrumentation.js +1 -1
  20. package/dist/src/channel/resolve-text.d.ts +1 -1
  21. package/dist/src/channel/routes.d.ts +1 -1
  22. package/dist/src/channel/session.d.ts +1 -1
  23. package/dist/src/channel/session.js +1 -1
  24. package/dist/src/channel/types.d.ts +2 -2
  25. package/dist/src/chunks/{use-eve-agent-BJwaMe5k.js → use-eve-agent-C46Kan_I.js} +385 -106
  26. package/dist/src/chunks/{use-eve-agent-BtsOXv3s.js → use-eve-agent-OtHRoxIS.js} +385 -106
  27. package/dist/src/cli/banner.js +1 -1
  28. package/dist/src/cli/commands/agent-instructions.js +2 -2
  29. package/dist/src/cli/commands/channel-add-conflicts.js +1 -1
  30. package/dist/src/cli/commands/extension-build.js +1 -1
  31. package/dist/src/cli/commands/extension-init.js +1 -1
  32. package/dist/src/cli/commands/info.js +1 -1
  33. package/dist/src/cli/commands/init.js +1 -1
  34. package/dist/src/cli/commands/trace.js +1 -1
  35. package/dist/src/cli/dev/tui/remote-auth.js +1 -1
  36. package/dist/src/cli/dev/tui/setup-selection-input.d.ts +3 -1
  37. package/dist/src/cli/dev/tui/setup-selection-input.js +2 -2
  38. package/dist/src/cli/dev/tui/terminal-renderer.js +2 -2
  39. package/dist/src/cli/dev/tui/traces/trace-conversation.d.ts +1 -1
  40. package/dist/src/cli/dev/tui/traces/trace-conversation.js +1 -1
  41. package/dist/src/cli/dev/tui/traces/trace-viewer-state.js +1 -1
  42. package/dist/src/cli/invoke/result.d.ts +1 -1
  43. package/dist/src/cli/ui/live-row.js +1 -1
  44. package/dist/src/cli/ui/output.js +1 -1
  45. package/dist/src/client/agent-info-schema.d.ts +1757 -302
  46. package/dist/src/client/agent-info-schema.js +1 -1
  47. package/dist/src/client/client.js +1 -1
  48. package/dist/src/client/eve-agent-store.d.ts +6 -5
  49. package/dist/src/client/eve-agent-store.js +1 -1
  50. package/dist/src/client/health-response-error.d.ts +5 -0
  51. package/dist/src/client/health-response-error.js +1 -0
  52. package/dist/src/client/health-schema.d.ts +7 -0
  53. package/dist/src/client/health-schema.js +1 -0
  54. package/dist/src/client/index.d.ts +6 -3
  55. package/dist/src/client/index.js +1 -1
  56. package/dist/src/client/message-action-parts.d.ts +2 -2
  57. package/dist/src/client/message-reducer-types.d.ts +1 -1
  58. package/dist/src/client/reducer.d.ts +1 -1
  59. package/dist/src/client/session-utils.d.ts +1 -1
  60. package/dist/src/client/session.d.ts +1 -1
  61. package/dist/src/client/session.js +1 -1
  62. package/dist/src/client/types.d.ts +3 -7
  63. package/dist/src/compiler/artifacts.d.ts +37 -11
  64. package/dist/src/compiler/artifacts.js +1 -1
  65. package/dist/src/compiler/channel-route-plan.d.ts +10 -0
  66. package/dist/src/compiler/channel-route-plan.js +1 -0
  67. package/dist/src/compiler/compile-agent.d.ts +2 -2
  68. package/dist/src/compiler/compile-agent.js +2 -2
  69. package/dist/src/compiler/compile-from-memory.d.ts +13 -52
  70. package/dist/src/compiler/compile-from-memory.js +1 -1
  71. package/dist/src/compiler/diagnostics.d.ts +38 -0
  72. package/dist/src/compiler/diagnostics.js +1 -0
  73. package/dist/src/compiler/extension-compatibility.d.ts +14 -11
  74. package/dist/src/compiler/extension-compatibility.js +1 -1
  75. package/dist/src/compiler/load-binding-namespace.d.ts +9 -0
  76. package/dist/src/compiler/load-binding-namespace.js +1 -0
  77. package/dist/src/compiler/manifest.d.ts +172 -51
  78. package/dist/src/compiler/manifest.js +1 -1
  79. package/dist/src/compiler/module-map.d.ts +12 -30
  80. package/dist/src/compiler/module-map.js +3 -3
  81. package/dist/src/compiler/node-source-state.d.ts +24 -0
  82. package/dist/src/compiler/node-source-state.js +1 -0
  83. package/dist/src/compiler/normalize-agent-config.d.ts +5 -1
  84. package/dist/src/compiler/normalize-agent-config.js +1 -1
  85. package/dist/src/compiler/normalize-channel.d.ts +8 -2
  86. package/dist/src/compiler/normalize-channel.js +1 -1
  87. package/dist/src/compiler/normalize-connection.d.ts +1 -1
  88. package/dist/src/compiler/normalize-connection.js +1 -1
  89. package/dist/src/compiler/normalize-helpers.d.ts +13 -4
  90. package/dist/src/compiler/normalize-helpers.js +1 -1
  91. package/dist/src/compiler/normalize-hook.d.ts +4 -11
  92. package/dist/src/compiler/normalize-hook.js +1 -1
  93. package/dist/src/compiler/normalize-instructions.d.ts +3 -3
  94. package/dist/src/compiler/normalize-instructions.js +1 -1
  95. package/dist/src/compiler/normalize-manifest-helpers.d.ts +29 -0
  96. package/dist/src/compiler/normalize-manifest-helpers.js +1 -0
  97. package/dist/src/compiler/normalize-manifest.d.ts +8 -4
  98. package/dist/src/compiler/normalize-manifest.js +1 -1
  99. package/dist/src/compiler/normalize-sandbox.d.ts +1 -1
  100. package/dist/src/compiler/normalize-sandbox.js +1 -1
  101. package/dist/src/compiler/normalize-schedule.d.ts +2 -2
  102. package/dist/src/compiler/normalize-schedule.js +1 -1
  103. package/dist/src/compiler/normalize-skill.d.ts +2 -2
  104. package/dist/src/compiler/normalize-skill.js +1 -1
  105. package/dist/src/compiler/normalize-subagent.d.ts +21 -39
  106. package/dist/src/compiler/normalize-subagent.js +1 -1
  107. package/dist/src/compiler/normalize-tool.d.ts +2 -1
  108. package/dist/src/compiler/normalize-tool.js +1 -1
  109. package/dist/src/compiler/project-sources.d.ts +71 -0
  110. package/dist/src/compiler/project-sources.js +1 -0
  111. package/dist/src/compiler/remote-agent-node.d.ts +8 -0
  112. package/dist/src/compiler/remote-agent-node.js +1 -1
  113. package/dist/src/compiler/source-graph.d.ts +153 -0
  114. package/dist/src/compiler/source-graph.js +1 -0
  115. package/dist/src/compiler/validate-artifact.d.ts +17 -0
  116. package/dist/src/compiler/validate-artifact.js +1 -0
  117. package/dist/src/compiler/workspace-resources.js +1 -1
  118. package/dist/src/connections/errors.d.ts +125 -0
  119. package/dist/src/connections/errors.js +1 -0
  120. package/dist/src/context/build-base-tool-context.d.ts +2 -2
  121. package/dist/src/context/build-callback-context.d.ts +1 -1
  122. package/dist/src/context/build-dynamic-tools.js +1 -1
  123. package/dist/src/context/dynamic-instruction-lifecycle.js +1 -1
  124. package/dist/src/context/dynamic-resolve-context.d.ts +1 -1
  125. package/dist/src/context/dynamic-skill-lifecycle.js +1 -1
  126. package/dist/src/context/dynamic-subagent-lifecycle.d.ts +0 -2
  127. package/dist/src/context/dynamic-subagent-lifecycle.js +1 -1
  128. package/dist/src/context/dynamic-tool-lifecycle.d.ts +2 -2
  129. package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
  130. package/dist/src/context/key-names.d.ts +12 -0
  131. package/dist/src/context/key-names.js +1 -0
  132. package/dist/src/context/keys.d.ts +8 -1
  133. package/dist/src/context/keys.js +1 -1
  134. package/dist/src/context/providers/connection-key.d.ts +1 -1
  135. package/dist/src/context/providers/connection.d.ts +1 -1
  136. package/dist/src/context/session-context.d.ts +32 -0
  137. package/dist/src/discover/discover-agent.d.ts +0 -13
  138. package/dist/src/discover/discover-agent.js +1 -1
  139. package/dist/src/discover/discover-subagent.js +1 -1
  140. package/dist/src/discover/extensions.d.ts +0 -6
  141. package/dist/src/discover/extensions.js +1 -1
  142. package/dist/src/discover/manifest.d.ts +4 -1
  143. package/dist/src/discover/manifest.js +1 -1
  144. package/dist/src/dynamic/definition.d.ts +117 -0
  145. package/dist/src/dynamic/definition.js +1 -0
  146. package/dist/src/evals/autoevals-client.js +1 -1
  147. package/dist/src/evals/index.d.ts +1 -1
  148. package/dist/src/evals/match.d.ts +1 -1
  149. package/dist/src/evals/runner/reporters/console.js +1 -1
  150. package/dist/src/evals/session.d.ts +1 -1
  151. package/dist/src/evals/target.js +1 -1
  152. package/dist/src/evals/types.d.ts +1 -1
  153. package/dist/src/eve-channel/index.d.ts +12 -0
  154. package/dist/src/eve-channel/index.js +1 -0
  155. package/dist/src/eve-channel/request.d.ts +49 -0
  156. package/dist/src/eve-channel/request.js +3 -0
  157. package/dist/src/eve-channel/support.d.ts +34 -0
  158. package/dist/src/eve-channel/support.js +1 -0
  159. package/dist/src/eve-channel/types.d.ts +128 -0
  160. package/dist/src/eve-channel/types.js +1 -0
  161. package/dist/src/execution/agent-handle-dispatch.d.ts +1 -1
  162. package/dist/src/execution/agent-handle-dispatch.js +1 -1
  163. package/dist/src/execution/authorization-callback-match.d.ts +1 -1
  164. package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
  165. package/dist/src/execution/compaction.js +1 -1
  166. package/dist/src/execution/connection-auth-tool-result.d.ts +1 -1
  167. package/dist/src/{runtime → execution}/connections/callback-route.d.ts +2 -20
  168. package/dist/src/execution/connections/callback-route.js +1 -0
  169. package/dist/src/execution/create-session-step.js +1 -1
  170. package/dist/src/execution/delegated-parent-notification.d.ts +2 -2
  171. package/dist/src/execution/delegated-parent-notification.js +1 -1
  172. package/dist/src/execution/delegated-parent-result.d.ts +1 -1
  173. package/dist/src/execution/delegated-parent-result.js +1 -1
  174. package/dist/src/execution/delegation-tool.d.ts +1 -1
  175. package/dist/src/execution/delegation-tool.js +1 -1
  176. package/dist/src/execution/dispatch-action-failures.d.ts +1 -1
  177. package/dist/src/execution/dispatch-runtime-actions-shared.d.ts +1 -2
  178. package/dist/src/execution/dispatch-runtime-actions-shared.js +1 -1
  179. package/dist/src/execution/dispatch-runtime-actions-step.js +1 -1
  180. package/dist/src/execution/dispatch-workflow-runtime-actions-step.d.ts +1 -1
  181. package/dist/src/execution/durable-session-migrations/turn-workflow.d.ts +1 -1
  182. package/dist/src/execution/durable-session-store.js +1 -1
  183. package/dist/src/execution/effective-output-schema.d.ts +2 -1
  184. package/dist/src/execution/eve-workflow-attributes.d.ts +6 -0
  185. package/dist/src/execution/eve-workflow-attributes.js +1 -1
  186. package/dist/src/execution/forward-turn-cancellation-step.js +1 -1
  187. package/dist/src/execution/node-step.js +1 -1
  188. package/dist/src/execution/remote-agent-dispatch.d.ts +10 -8
  189. package/dist/src/execution/remote-agent-dispatch.js +1 -1
  190. package/dist/src/execution/runtime-context.js +1 -1
  191. package/dist/src/execution/sandbox/{bash-tool.d.ts → bash.d.ts} +2 -2
  192. package/dist/src/execution/sandbox/bindings/vercel-credentials.js +1 -1
  193. package/dist/src/execution/sandbox/glob-tool.js +1 -1
  194. package/dist/src/execution/sandbox/grep-tool.js +1 -1
  195. package/dist/src/execution/sandbox/{read-file-tool.d.ts → read-file.d.ts} +2 -2
  196. package/dist/src/execution/sandbox/{read-file-tool.js → read-file.js} +1 -1
  197. package/dist/src/execution/sandbox/{write-file-tool.d.ts → write-file.d.ts} +2 -2
  198. package/dist/src/execution/sandbox/write-file.js +1 -0
  199. package/dist/src/execution/session-callback-route.d.ts +2 -0
  200. package/dist/src/execution/session-callback-route.js +1 -0
  201. package/dist/src/execution/session-callback-step.js +1 -1
  202. package/dist/src/execution/session-timeout-steps.js +1 -1
  203. package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
  204. package/dist/src/execution/subagent-adapter.js +1 -1
  205. package/dist/src/execution/subagent-hitl-proxy.d.ts +1 -1
  206. package/dist/src/execution/subagent-invocation.d.ts +0 -3
  207. package/dist/src/execution/subagent-invocation.js +1 -1
  208. package/dist/src/execution/subagent-start-local.d.ts +1 -2
  209. package/dist/src/execution/subagent-start-local.js +1 -1
  210. package/dist/src/execution/subagent-start-remote.d.ts +1 -2
  211. package/dist/src/execution/subagent-start-remote.js +1 -1
  212. package/dist/src/execution/subagent-tool.d.ts +4 -8
  213. package/dist/src/execution/subagent-tool.js +1 -1
  214. package/dist/src/execution/subagent-usage-span.d.ts +1 -1
  215. package/dist/src/execution/task-input-response-route.d.ts +2 -0
  216. package/dist/src/execution/task-input-response-route.js +1 -0
  217. package/dist/src/execution/tasks/child/instructions.js +1 -1
  218. package/dist/src/execution/tasks/child/update.d.ts +1 -1
  219. package/dist/src/execution/tasks/child/update.js +1 -1
  220. package/dist/src/execution/tasks/parent/continuation-dispatch.d.ts +1 -1
  221. package/dist/src/execution/tasks/parent/control-shared.d.ts +1 -1
  222. package/dist/src/execution/tasks/parent/delegate.d.ts +2 -2
  223. package/dist/src/execution/tasks/parent/delegate.js +1 -1
  224. package/dist/src/execution/tasks/parent/dispatch-task-step.js +1 -1
  225. package/dist/src/execution/tasks/parent/dispatch.d.ts +3 -1
  226. package/dist/src/execution/tasks/parent/dispatch.js +1 -1
  227. package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +1 -1
  228. package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
  229. package/dist/src/execution/terminate-child-sessions-step.d.ts +4 -5
  230. package/dist/src/execution/terminate-child-sessions-step.js +1 -1
  231. package/dist/src/execution/tool-auth.d.ts +5 -6
  232. package/dist/src/execution/tool-auth.js +1 -1
  233. package/dist/src/execution/tools/connection-search.d.ts +1 -0
  234. package/dist/src/execution/tools/connection-search.js +2 -0
  235. package/dist/src/{runtime/framework-tools → execution/tools}/file-state.d.ts +2 -2
  236. package/dist/src/execution/tools/load-skill.d.ts +6 -0
  237. package/dist/src/execution/tools/load-skill.js +1 -0
  238. package/dist/src/{runtime/framework-tools → execution/tools}/subagent/local.d.ts +7 -7
  239. package/dist/src/execution/tools/subagent/local.js +1 -0
  240. package/dist/src/{runtime/framework-tools → execution/tools}/subagent/remote.d.ts +5 -5
  241. package/dist/src/execution/tools/subagent/remote.js +1 -0
  242. package/dist/src/execution/tools/tasks.d.ts +18 -0
  243. package/dist/src/execution/tools/tasks.js +1 -0
  244. package/dist/src/{runtime/framework-tools → execution/tools}/todo.d.ts +0 -2
  245. package/dist/src/{runtime/framework-tools → execution/tools}/todo.js +1 -2
  246. package/dist/src/execution/turn-control-protocol.js +1 -1
  247. package/dist/src/execution/web-fetch/request.js +1 -1
  248. package/dist/src/execution/wire/session-inbox-resume.js +1 -1
  249. package/dist/src/execution/wire/session-inbox-wire.v1.js +1 -1
  250. package/dist/src/execution/workflow-entry.js +1 -1
  251. package/dist/src/execution/workflow-runtime.js +1 -1
  252. package/dist/src/execution/workflow-steps.js +1 -1
  253. package/dist/src/execution/workflow-trace-context.js +1 -1
  254. package/dist/src/framework/host-inventory.d.ts +8 -0
  255. package/dist/src/framework/host-inventory.js +1 -0
  256. package/dist/src/framework/sources/modules/agent.d.ts +4 -0
  257. package/dist/src/framework/sources/modules/agent.js +1 -0
  258. package/dist/src/framework/sources/modules/eve-channel.d.ts +1 -0
  259. package/dist/src/framework/sources/modules/eve-channel.js +1 -0
  260. package/dist/src/framework/sources/modules/home-channel.d.ts +2 -0
  261. package/dist/src/framework/sources/modules/home-channel.js +1 -0
  262. package/dist/src/framework/sources/modules/sandbox.d.ts +2 -0
  263. package/dist/src/framework/sources/modules/sandbox.js +1 -0
  264. package/dist/src/framework/sources/registry.d.ts +5 -0
  265. package/dist/src/framework/sources/registry.js +1 -0
  266. package/dist/src/harness/action-result-helpers.d.ts +1 -1
  267. package/dist/src/harness/advertised-tools.js +1 -1
  268. package/dist/src/harness/authorization.d.ts +3 -3
  269. package/dist/src/harness/background-tools.d.ts +2 -2
  270. package/dist/src/harness/channel-delivery-instrumentation.js +1 -1
  271. package/dist/src/harness/compaction.js +1 -1
  272. package/dist/src/harness/execute-tool.d.ts +3 -3
  273. package/dist/src/{runtime/framework-tools → harness}/final-output.d.ts +1 -1
  274. package/dist/src/harness/final-output.js +1 -0
  275. package/dist/src/harness/handles/query.d.ts +1 -1
  276. package/dist/src/harness/handles/store.d.ts +8 -0
  277. package/dist/src/harness/handles/store.js +1 -1
  278. package/dist/src/harness/hitl/approval-input-requests.d.ts +1 -1
  279. package/dist/src/harness/hitl/approval-prompt.d.ts +1 -1
  280. package/dist/src/harness/hitl/pending-input-resolution.d.ts +2 -2
  281. package/dist/src/harness/hitl/question-input-requests.d.ts +1 -1
  282. package/dist/src/harness/input-extraction.d.ts +1 -1
  283. package/dist/src/harness/input-extraction.js +1 -1
  284. package/dist/src/harness/input-request-class.d.ts +1 -1
  285. package/dist/src/harness/input-request-resolution.d.ts +1 -1
  286. package/dist/src/harness/input-requests.d.ts +2 -2
  287. package/dist/src/harness/instrumentation/lifecycle.d.ts +3 -0
  288. package/dist/src/harness/instrumentation/providers.js +1 -1
  289. package/dist/src/harness/instrumentation/runtime.d.ts +2 -1
  290. package/dist/src/harness/pending-input-batches.d.ts +1 -1
  291. package/dist/src/harness/prepare-trace-context.d.ts +3 -0
  292. package/dist/src/harness/prepare-trace-context.js +1 -1
  293. package/dist/src/harness/provider-safety.d.ts +7 -0
  294. package/dist/src/harness/provider-safety.js +1 -0
  295. package/dist/src/{runtime/framework-tools/web-search.d.ts → harness/provider-tool-schemas.d.ts} +1 -9
  296. package/dist/src/harness/provider-tool-schemas.js +1 -0
  297. package/dist/src/harness/provider-tools.js +1 -1
  298. package/dist/src/harness/proxy-input-requests.d.ts +1 -1
  299. package/dist/src/harness/request-input-tool.d.ts +4 -0
  300. package/dist/src/harness/request-input-tool.js +1 -0
  301. package/dist/src/harness/runtime-actions.d.ts +1 -1
  302. package/dist/src/harness/session-limit-continuation.d.ts +1 -1
  303. package/dist/src/harness/step-hooks.d.ts +2 -0
  304. package/dist/src/harness/step-hooks.js +1 -1
  305. package/dist/src/harness/stream-actions.d.ts +1 -1
  306. package/dist/src/harness/subagent-depth.d.ts +1 -1
  307. package/dist/src/harness/tool-call-action.d.ts +1 -1
  308. package/dist/src/harness/tool-call-input-errors.d.ts +1 -1
  309. package/dist/src/harness/tool-loop.js +2 -2
  310. package/dist/src/harness/tool-model-output.d.ts +1 -1
  311. package/dist/src/harness/tools.d.ts +1 -1
  312. package/dist/src/harness/tools.js +1 -1
  313. package/dist/src/harness/types.d.ts +3 -9
  314. package/dist/src/harness/workflow-runtime-action-state.d.ts +1 -1
  315. package/dist/src/harness/workflow-subagent-limit.d.ts +1 -1
  316. package/dist/src/instrumentation/provider.d.ts +117 -0
  317. package/dist/src/instrumentation/provider.js +1 -0
  318. package/dist/src/internal/application/compiled-artifacts.js +5 -4
  319. package/dist/src/internal/application/package.js +1 -1
  320. package/dist/src/internal/authored-definition/approval.d.ts +1 -1
  321. package/dist/src/internal/authored-definition/connection.js +1 -1
  322. package/dist/src/internal/authored-definition/core.js +1 -1
  323. package/dist/src/internal/authored-definition/schema-backed.d.ts +6 -3
  324. package/dist/src/internal/authored-definition/schema-backed.js +1 -1
  325. package/dist/src/internal/authored-definition/source-identity.d.ts +17 -0
  326. package/dist/src/internal/authored-definition/source-identity.js +1 -0
  327. package/dist/src/internal/authored-module-map-loader.d.ts +1 -5
  328. package/dist/src/internal/authored-module-map-loader.js +1 -1
  329. package/dist/src/internal/helpers/markdown.js +1 -1
  330. package/dist/src/internal/invocation/agent-invocation.d.ts +2 -2
  331. package/dist/src/internal/invocation/workflow-execution.d.ts +1 -1
  332. package/dist/src/internal/invocation/workflow-execution.js +1 -1
  333. package/dist/src/internal/materialized-authored-modules.js +1 -1
  334. package/dist/src/internal/nitro/dev-runtime-artifacts.js +1 -1
  335. package/dist/src/internal/nitro/host/application-route-registry.d.ts +2 -41
  336. package/dist/src/internal/nitro/host/application-route-registry.js +1 -1
  337. package/dist/src/internal/nitro/host/build-extension.js +1 -1
  338. package/dist/src/internal/nitro/host/build-vercel-agent-summary.js +1 -1
  339. package/dist/src/internal/nitro/host/configure-nitro-routes.js +3 -4
  340. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  341. package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
  342. package/dist/src/internal/nitro/host/extension-capability-requirements.d.ts +2 -0
  343. package/dist/src/internal/nitro/host/extension-capability-requirements.js +1 -1
  344. package/dist/src/internal/nitro/host/start-development-server.js +2 -2
  345. package/dist/src/internal/nitro/host/start-production-server.js +3 -3
  346. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.d.ts +9 -215
  347. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
  348. package/dist/src/internal/nitro/routes/agent-info/load-agent-info-data.d.ts +2 -13
  349. package/dist/src/internal/nitro/routes/agent-info/load-agent-info-data.js +1 -1
  350. package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
  351. package/dist/src/internal/nitro/routes/channel-route-context.d.ts +5 -0
  352. package/dist/src/internal/nitro/routes/channel-route-context.js +1 -1
  353. package/dist/src/internal/nitro/routes/index.d.ts +0 -9
  354. package/dist/src/internal/nitro/routes/index.js +1 -1
  355. package/dist/src/internal/nitro/routes/info.js +1 -1
  356. package/dist/src/internal/nitro/routes/runtime-stack.d.ts +5 -5
  357. package/dist/src/internal/nitro/routes/runtime-stack.js +1 -1
  358. package/dist/src/internal/programmatic-source-loader.d.ts +1 -0
  359. package/dist/src/internal/programmatic-source-loader.js +1 -0
  360. package/dist/src/internal/runtime-registry.d.ts +3 -4
  361. package/dist/src/protocol/message.d.ts +3 -3
  362. package/dist/src/protocol/routes.d.ts +2 -0
  363. package/dist/src/protocol/routes.js +1 -1
  364. package/dist/src/public/agents/auth.d.ts +10 -6
  365. package/dist/src/public/agents/auth.js +1 -1
  366. package/dist/src/public/channels/auth.d.ts +1 -1
  367. package/dist/src/public/channels/auth.js +1 -1
  368. package/dist/src/public/channels/discord/discordChannel.js +1 -1
  369. package/dist/src/public/channels/discord/hitl.d.ts +1 -1
  370. package/dist/src/public/channels/discord/hitl.js +1 -1
  371. package/dist/src/public/channels/discord/inbound.d.ts +1 -0
  372. package/dist/src/public/channels/discord/inbound.js +1 -1
  373. package/dist/src/public/channels/eve.d.ts +1 -139
  374. package/dist/src/public/channels/eve.js +1 -3
  375. package/dist/src/public/channels/github/dispatch.d.ts +5 -0
  376. package/dist/src/public/channels/github/dispatch.js +1 -1
  377. package/dist/src/public/channels/github/githubChannel.js +1 -1
  378. package/dist/src/public/channels/github/inbound.d.ts +2 -0
  379. package/dist/src/public/channels/github/inbound.js +1 -1
  380. package/dist/src/public/channels/index.d.ts +1 -1
  381. package/dist/src/public/channels/index.js +1 -1
  382. package/dist/src/public/channels/linear/hitl.d.ts +1 -1
  383. package/dist/src/public/channels/linear/inbound.js +1 -1
  384. package/dist/src/public/channels/mcp.js +1 -1
  385. package/dist/src/public/channels/slack/action-status.d.ts +1 -1
  386. package/dist/src/public/channels/slack/hitl.d.ts +1 -1
  387. package/dist/src/public/channels/slack/hitl.js +1 -1
  388. package/dist/src/public/channels/slack/inbound.d.ts +9 -0
  389. package/dist/src/public/channels/slack/inbound.js +1 -1
  390. package/dist/src/public/channels/slack/interactions.js +1 -1
  391. package/dist/src/public/channels/slack/model-context.d.ts +3 -1
  392. package/dist/src/public/channels/slack/model-context.js +2 -2
  393. package/dist/src/public/channels/slack/session-operations.d.ts +1 -1
  394. package/dist/src/public/channels/slack/slackChannel.d.ts +1 -1
  395. package/dist/src/public/channels/slack/slackChannel.js +1 -1
  396. package/dist/src/public/channels/teams/hitl.d.ts +1 -1
  397. package/dist/src/public/channels/teams/hitl.js +1 -1
  398. package/dist/src/public/channels/teams/inbound.d.ts +2 -0
  399. package/dist/src/public/channels/teams/inbound.js +1 -1
  400. package/dist/src/public/channels/teams/teamsChannel.js +1 -1
  401. package/dist/src/public/channels/teams/verify.js +1 -1
  402. package/dist/src/public/channels/telegram/api.d.ts +15 -0
  403. package/dist/src/public/channels/telegram/api.js +2 -2
  404. package/dist/src/public/channels/telegram/authorization-callback.d.ts +10 -0
  405. package/dist/src/public/channels/telegram/authorization-callback.js +1 -0
  406. package/dist/src/public/channels/telegram/authorization.d.ts +19 -0
  407. package/dist/src/public/channels/telegram/authorization.js +3 -0
  408. package/dist/src/public/channels/telegram/defaults.d.ts +1 -0
  409. package/dist/src/public/channels/telegram/defaults.js +3 -3
  410. package/dist/src/public/channels/telegram/hitl.d.ts +1 -1
  411. package/dist/src/public/channels/telegram/hitl.js +1 -1
  412. package/dist/src/public/channels/telegram/inbound.d.ts +1 -0
  413. package/dist/src/public/channels/telegram/inbound.js +1 -1
  414. package/dist/src/public/channels/telegram/index.d.ts +1 -1
  415. package/dist/src/public/channels/telegram/index.js +1 -1
  416. package/dist/src/public/channels/telegram/state.d.ts +6 -0
  417. package/dist/src/public/channels/telegram/state.js +1 -0
  418. package/dist/src/public/channels/telegram/telegramChannel.d.ts +11 -0
  419. package/dist/src/public/channels/telegram/telegramChannel.js +1 -1
  420. package/dist/src/public/connections/errors.d.ts +1 -125
  421. package/dist/src/public/connections/errors.js +1 -1
  422. package/dist/src/public/connections/index.d.ts +2 -2
  423. package/dist/src/public/connections/index.js +1 -1
  424. package/dist/src/public/definitions/agent.d.ts +1 -1
  425. package/dist/src/public/definitions/agent.js +1 -1
  426. package/dist/src/public/definitions/approval.d.ts +2 -84
  427. package/dist/src/public/definitions/approval.js +1 -1
  428. package/dist/src/public/definitions/callback-context.d.ts +1 -32
  429. package/dist/src/public/definitions/connections/mcp.d.ts +1 -1
  430. package/dist/src/public/definitions/connections/mcp.js +1 -1
  431. package/dist/src/public/definitions/connections/openapi.d.ts +1 -1
  432. package/dist/src/public/definitions/connections/openapi.js +1 -1
  433. package/dist/src/public/definitions/connections/protocol.d.ts +1 -1
  434. package/dist/src/public/definitions/instructions.d.ts +2 -2
  435. package/dist/src/public/definitions/instructions.js +1 -1
  436. package/dist/src/public/definitions/skill.js +1 -1
  437. package/dist/src/public/index.d.ts +1 -1
  438. package/dist/src/public/instructions/index.d.ts +1 -1
  439. package/dist/src/public/instrumentation/provider.d.ts +1 -117
  440. package/dist/src/public/instrumentation/provider.js +1 -1
  441. package/dist/src/public/models/openai/chatgpt/auth.js +1 -1
  442. package/dist/src/public/next/server.js +1 -1
  443. package/dist/src/public/nuxt/dev-server.js +1 -1
  444. package/dist/src/public/sandbox/backends/default.d.ts +1 -49
  445. package/dist/src/public/sandbox/backends/default.js +1 -1
  446. package/dist/src/public/sandbox/backends/docker.d.ts +1 -14
  447. package/dist/src/public/sandbox/backends/docker.js +1 -1
  448. package/dist/src/public/sandbox/backends/just-bash.d.ts +1 -17
  449. package/dist/src/public/sandbox/backends/just-bash.js +1 -1
  450. package/dist/src/public/sandbox/backends/microsandbox.d.ts +1 -17
  451. package/dist/src/public/sandbox/backends/microsandbox.js +1 -1
  452. package/dist/src/public/sandbox/backends/vercel.d.ts +1 -30
  453. package/dist/src/public/sandbox/backends/vercel.js +1 -1
  454. package/dist/src/public/skills/index.d.ts +3 -3
  455. package/dist/src/public/skills/index.js +1 -1
  456. package/dist/src/public/sveltekit/dev-server.js +1 -1
  457. package/dist/src/public/tools/approval/index.d.ts +2 -2
  458. package/dist/src/public/tools/approval/index.js +1 -1
  459. package/dist/src/public/tools/bash.d.ts +3 -0
  460. package/dist/src/public/tools/bash.js +1 -0
  461. package/dist/src/public/tools/glob.d.ts +3 -0
  462. package/dist/src/public/tools/glob.js +1 -0
  463. package/dist/src/public/tools/grep.d.ts +3 -0
  464. package/dist/src/public/tools/grep.js +1 -0
  465. package/dist/src/public/tools/index.d.ts +6 -11
  466. package/dist/src/public/tools/index.js +1 -1
  467. package/dist/src/public/tools/load-skill.d.ts +3 -0
  468. package/dist/src/public/tools/load-skill.js +1 -0
  469. package/dist/src/public/tools/read-file.d.ts +3 -0
  470. package/dist/src/public/tools/read-file.js +1 -0
  471. package/dist/src/public/{tool-result-narrowing.d.ts → tools/result.d.ts} +2 -28
  472. package/dist/src/public/tools/result.js +1 -0
  473. package/dist/src/public/tools/sleep.d.ts +1 -0
  474. package/dist/src/public/tools/sleep.js +1 -0
  475. package/dist/src/public/tools/todo.d.ts +3 -0
  476. package/dist/src/public/tools/todo.js +1 -0
  477. package/dist/src/public/tools/web-fetch.d.ts +3 -0
  478. package/dist/src/public/tools/web-fetch.js +1 -0
  479. package/dist/src/public/tools/web-search.d.ts +3 -36
  480. package/dist/src/public/tools/web-search.js +1 -1
  481. package/dist/src/public/tools/workflow.d.ts +4 -0
  482. package/dist/src/public/tools/workflow.js +1 -0
  483. package/dist/src/public/tools/write-file.d.ts +3 -0
  484. package/dist/src/public/tools/write-file.js +1 -0
  485. package/dist/src/public/types/json.d.ts +1 -28
  486. package/dist/src/react/use-eve-agent.d.ts +1 -0
  487. package/dist/src/react/use-eve-agent.js +1 -1
  488. package/dist/src/runtime/actions/keys.d.ts +1 -1
  489. package/dist/src/runtime/actions/results.d.ts +1 -1
  490. package/dist/src/runtime/agent/bootstrap.js +1 -1
  491. package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
  492. package/dist/src/runtime/connections/authorization-tokens.d.ts +1 -1
  493. package/dist/src/runtime/connections/mcp-client.d.ts +1 -1
  494. package/dist/src/runtime/connections/mcp-client.js +1 -1
  495. package/dist/src/runtime/connections/openapi-client.d.ts +1 -1
  496. package/dist/src/runtime/connections/openapi-client.js +1 -1
  497. package/dist/src/runtime/connections/principal.d.ts +1 -1
  498. package/dist/src/runtime/connections/principal.js +1 -1
  499. package/dist/src/runtime/connections/registry-types.d.ts +11 -0
  500. package/dist/src/runtime/connections/registry.d.ts +3 -2
  501. package/dist/src/runtime/connections/resolve-authorization.d.ts +2 -2
  502. package/dist/src/runtime/connections/resolve-authorization.js +1 -1
  503. package/dist/src/runtime/connections/scoped-authorization.d.ts +2 -2
  504. package/dist/src/runtime/connections/scoped-authorization.js +1 -1
  505. package/dist/src/runtime/loaders/compile-metadata.js +1 -1
  506. package/dist/src/runtime/loaders/manifest.js +1 -1
  507. package/dist/src/runtime/prompt/compose.d.ts +0 -6
  508. package/dist/src/runtime/prompt/compose.js +1 -1
  509. package/dist/src/runtime/resolve-agent-graph.js +1 -1
  510. package/dist/src/runtime/resolve-agent.js +1 -1
  511. package/dist/src/runtime/resolve-connection.js +1 -1
  512. package/dist/src/runtime/resolve-dynamic-tool.js +1 -1
  513. package/dist/src/runtime/resolve-tool.d.ts +2 -1
  514. package/dist/src/runtime/resolve-tool.js +1 -1
  515. package/dist/src/runtime/sandbox/keys.js +1 -1
  516. package/dist/src/runtime/sandbox/registry.d.ts +4 -20
  517. package/dist/src/runtime/sandbox/registry.js +1 -1
  518. package/dist/src/runtime/sessions/compiled-agent-cache.js +1 -1
  519. package/dist/src/runtime/sessions/runtime-context-keys.js +1 -1
  520. package/dist/src/runtime/sessions/turn.d.ts +3 -1
  521. package/dist/src/runtime/skills/sandbox-access.d.ts +1 -1
  522. package/dist/src/runtime/subagents/dynamic-agent-config.js +1 -1
  523. package/dist/src/runtime/subagents/dynamic-remote-agent-config.js +1 -1
  524. package/dist/src/runtime/subagents/registry.d.ts +0 -27
  525. package/dist/src/runtime/subagents/registry.js +1 -1
  526. package/dist/src/runtime/tools/registry.js +1 -1
  527. package/dist/src/runtime/types.d.ts +11 -27
  528. package/dist/src/sandbox/backends/default.d.ts +49 -0
  529. package/dist/src/sandbox/backends/default.js +1 -0
  530. package/dist/src/sandbox/backends/docker.d.ts +14 -0
  531. package/dist/src/sandbox/backends/docker.js +1 -0
  532. package/dist/src/sandbox/backends/just-bash.d.ts +17 -0
  533. package/dist/src/sandbox/backends/just-bash.js +1 -0
  534. package/dist/src/sandbox/backends/microsandbox.d.ts +17 -0
  535. package/dist/src/sandbox/backends/microsandbox.js +1 -0
  536. package/dist/src/sandbox/backends/vercel.d.ts +30 -0
  537. package/dist/src/sandbox/backends/vercel.js +1 -0
  538. package/dist/src/services/dev-client/runtime-artifacts.d.ts +2 -0
  539. package/dist/src/services/dev-client/runtime-artifacts.js +1 -1
  540. package/dist/src/services/dev-client.d.ts +1 -1
  541. package/dist/src/setup/channel-add-conflicts.js +1 -1
  542. package/dist/src/setup/cli/select-component.js +1 -1
  543. package/dist/src/setup/flows/link.js +1 -1
  544. package/dist/src/setup/flows/model-source-change.js +1 -1
  545. package/dist/src/setup/flows/model.js +1 -1
  546. package/dist/src/setup/flows/registry.js +1 -1
  547. package/dist/src/setup/integrations/runner.js +1 -1
  548. package/dist/src/setup/prompter.js +1 -1
  549. package/dist/src/setup/scaffold/create/add-to-project.js +1 -1
  550. package/dist/src/setup/scaffold/create/project.js +2 -2
  551. package/dist/src/setup/scaffold/create/web-template.d.ts +8 -8
  552. package/dist/src/setup/scaffold/create/web-template.js +336 -120
  553. package/dist/src/setup/scaffold/update/channels.js +1 -1
  554. package/dist/src/setup/scaffold/update/connections.js +1 -1
  555. package/dist/src/setup/vercel-project.js +0 -0
  556. package/dist/src/{runtime/actions/types.d.ts → shared/action-types.d.ts} +12 -12
  557. package/dist/src/{runtime/actions/types.js → shared/action-types.js} +1 -1
  558. package/dist/src/shared/agent-definition.d.ts +3 -10
  559. package/dist/src/shared/agent-definition.js +1 -1
  560. package/dist/src/{runtime/connections/types.d.ts → shared/connection-types.d.ts} +3 -13
  561. package/dist/src/{runtime/input/types.d.ts → shared/input.d.ts} +1 -1
  562. package/dist/src/shared/input.js +1 -0
  563. package/dist/src/shared/instructions-definition.d.ts +2 -0
  564. package/dist/src/shared/instructions-definition.js +1 -1
  565. package/dist/src/shared/objects.d.ts +5 -0
  566. package/dist/src/shared/objects.js +1 -0
  567. package/dist/src/shared/sandbox-definition.d.ts +1 -1
  568. package/dist/src/shared/skill-definition.d.ts +2 -0
  569. package/dist/src/shared/skill-definition.js +1 -1
  570. package/dist/src/{execution/skills/types.d.ts → shared/skill-types.d.ts} +1 -1
  571. package/dist/src/shared/skill-types.js +1 -0
  572. package/dist/src/{runtime/connections → shared}/validate-authorization.d.ts +1 -1
  573. package/dist/src/shared/vercel-project.d.ts +1 -0
  574. package/dist/src/shared/vercel-project.js +1 -1
  575. package/dist/src/svelte/index.js +1 -1
  576. package/dist/src/svelte/use-eve-agent.d.ts +8 -4
  577. package/dist/src/svelte/use-eve-agent.js +1 -1
  578. package/dist/src/tasks/json.d.ts +4 -89
  579. package/dist/src/tasks/json.js +1 -1
  580. package/dist/src/tasks/session-index.d.ts +1 -1
  581. package/dist/src/tasks/task-id.d.ts +0 -1
  582. package/dist/src/tasks/task-id.js +1 -1
  583. package/dist/src/tasks/types.d.ts +1 -1
  584. package/dist/src/tasks/types.js +1 -1
  585. package/dist/src/{public/tools/approval/approval-helpers.d.ts → tools/approval/policies.d.ts} +1 -1
  586. package/dist/src/tools/approval/policies.js +1 -0
  587. package/dist/src/tools/auth.d.ts +35 -0
  588. package/dist/src/tools/auth.js +1 -0
  589. package/dist/src/{public/definitions/tool.d.ts → tools/definition.d.ts} +42 -138
  590. package/dist/src/tools/definition.js +1 -0
  591. package/dist/src/{shared/durable-dynamic-tool-callbacks.d.ts → tools/durable-callbacks.d.ts} +1 -1
  592. package/dist/src/tools/durable-callbacks.js +1 -0
  593. package/dist/src/tools/dynamic.d.ts +68 -0
  594. package/dist/src/tools/dynamic.js +1 -0
  595. package/dist/src/tools/framework/agent-contract.d.ts +8 -0
  596. package/dist/src/tools/framework/agent-contract.js +1 -0
  597. package/dist/src/tools/framework/agent.d.ts +17 -0
  598. package/dist/src/tools/framework/agent.js +1 -0
  599. package/dist/src/tools/framework/ask-question.d.ts +50 -0
  600. package/dist/src/tools/framework/ask-question.js +1 -0
  601. package/dist/src/tools/framework/connection-search.d.ts +3 -0
  602. package/dist/src/tools/framework/connection-search.js +1 -0
  603. package/dist/src/tools/framework/task-cancel.d.ts +29 -0
  604. package/dist/src/tools/framework/task-cancel.js +1 -0
  605. package/dist/src/tools/framework/task-contract.d.ts +167 -0
  606. package/dist/src/tools/framework/task-contract.js +1 -0
  607. package/dist/src/tools/framework/task-update.d.ts +9 -0
  608. package/dist/src/tools/framework/task-update.js +1 -0
  609. package/dist/src/{public/tools/output-builders.d.ts → tools/model-output.d.ts} +41 -1
  610. package/dist/src/tools/provided/bash.d.ts +29 -0
  611. package/dist/src/tools/provided/bash.js +1 -0
  612. package/dist/src/tools/provided/glob.d.ts +26 -0
  613. package/dist/src/tools/provided/glob.js +2 -0
  614. package/dist/src/{runtime/framework-tools → tools/provided}/grep.d.ts +10 -10
  615. package/dist/src/tools/provided/grep.js +2 -0
  616. package/dist/src/tools/provided/load-skill.d.ts +2 -0
  617. package/dist/src/tools/provided/load-skill.js +1 -0
  618. package/dist/src/tools/provided/read-file.d.ts +27 -0
  619. package/dist/src/tools/provided/read-file.js +2 -0
  620. package/dist/src/{public/tools/sleep/index.d.ts → tools/provided/sleep.d.ts} +3 -3
  621. package/dist/src/tools/provided/sleep.js +1 -0
  622. package/dist/src/tools/provided/todo.d.ts +8 -0
  623. package/dist/src/tools/provided/todo.js +2 -0
  624. package/dist/src/{runtime/framework-tools → tools/provided}/web-fetch.d.ts +5 -2
  625. package/dist/src/tools/provided/web-fetch.js +2 -0
  626. package/dist/src/tools/provided/web-search.d.ts +39 -0
  627. package/dist/src/tools/provided/web-search.js +1 -0
  628. package/dist/src/tools/provided/write-file.d.ts +23 -0
  629. package/dist/src/tools/provided/write-file.js +2 -0
  630. package/dist/src/tools/workflow.d.ts +37 -0
  631. package/dist/src/tools/workflow.js +1 -0
  632. package/dist/src/tracing/agent-action-instrumentation.js +1 -1
  633. package/dist/src/tracing/agent-approval-instrumentation.js +1 -1
  634. package/dist/src/tracing/agent-channel-delivery-instrumentation.js +1 -1
  635. package/dist/src/tracing/agent-otel-provider.js +2 -2
  636. package/dist/src/tracing/agent-otel-session-context.d.ts +1 -1
  637. package/dist/src/tracing/agent-otel-session-context.js +1 -1
  638. package/dist/src/tracing/agent-span-id-generator.d.ts +1 -0
  639. package/dist/src/tracing/agent-span-id-generator.js +1 -1
  640. package/dist/src/tracing/agent-trace-context-store.d.ts +1 -1
  641. package/dist/src/tracing/agent-trace-context-store.js +1 -1
  642. package/dist/src/tracing/agent-trace-span-processor.js +1 -1
  643. package/dist/src/tracing/agent-trace-state.d.ts +2 -6
  644. package/dist/src/tracing/agent-trace-state.js +1 -1
  645. package/dist/src/tracing/install-instrumentation-runtime.js +1 -1
  646. package/dist/src/tracing/local-trace-reader.d.ts +1 -3
  647. package/dist/src/tracing/local-trace-reader.js +1 -1
  648. package/dist/src/tracing/otel-declaration.d.ts +1 -2
  649. package/dist/src/tracing/otel-registration.js +1 -1
  650. package/dist/src/tracing/sampled-trace.d.ts +10 -2
  651. package/dist/src/tracing/sampled-trace.js +1 -1
  652. package/dist/src/vue/index.js +1 -1
  653. package/dist/src/vue/use-eve-agent.d.ts +8 -4
  654. package/dist/src/vue/use-eve-agent.js +1 -1
  655. package/docs/agent-config.md +16 -4
  656. package/docs/channels/chat-sdk.mdx +1 -1
  657. package/docs/channels/discord.mdx +5 -1
  658. package/docs/channels/eve.mdx +19 -3
  659. package/docs/channels/github.mdx +2 -0
  660. package/docs/channels/linear.mdx +1 -1
  661. package/docs/channels/overview.mdx +1 -1
  662. package/docs/channels/slack.mdx +2 -0
  663. package/docs/channels/teams.mdx +1 -1
  664. package/docs/channels/telegram.mdx +2 -0
  665. package/docs/concepts/built-in-tools.md +30 -21
  666. package/docs/concepts/sessions-runs-and-streaming.md +3 -1
  667. package/docs/connections/overview.mdx +1 -1
  668. package/docs/extensions.md +2 -2
  669. package/docs/getting-started.mdx +9 -9
  670. package/docs/guides/auth-and-route-protection.md +3 -3
  671. package/docs/guides/client/output-schema.mdx +2 -2
  672. package/docs/guides/client/overview.mdx +4 -2
  673. package/docs/guides/frontend/nuxt.mdx +4 -3
  674. package/docs/guides/frontend/overview.mdx +21 -18
  675. package/docs/guides/frontend/sveltekit.mdx +4 -3
  676. package/docs/guides/frontend/use-eve-agent-svelte.mdx +5 -4
  677. package/docs/guides/frontend/use-eve-agent-vue.mdx +5 -4
  678. package/docs/guides/instrumentation.md +1 -0
  679. package/docs/guides/remote-agents.md +37 -18
  680. package/docs/patterns/multi-tenant-approvals.md +1 -1
  681. package/docs/reference/cli.md +2 -4
  682. package/docs/reference/typescript-api.md +35 -31
  683. package/docs/sandbox.mdx +1 -1
  684. package/docs/subagents/index.mdx +11 -28
  685. package/docs/tools/human-in-the-loop.md +43 -2
  686. package/docs/tools/overview.mdx +1 -1
  687. package/package.json +58 -8
  688. package/dist/src/compiler/normalize-extension.d.ts +0 -80
  689. package/dist/src/compiler/normalize-extension.js +0 -1
  690. package/dist/src/execution/sandbox/write-file-tool.js +0 -1
  691. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response-from-manifest.d.ts +0 -9
  692. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response-from-manifest.js +0 -1
  693. package/dist/src/internal/nitro/routes/health.d.ts +0 -14
  694. package/dist/src/internal/nitro/routes/health.js +0 -1
  695. package/dist/src/node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js +0 -1
  696. package/dist/src/public/definitions/tool.js +0 -1
  697. package/dist/src/public/tool-result-narrowing.js +0 -1
  698. package/dist/src/public/tools/approval/approval-helpers.js +0 -1
  699. package/dist/src/public/tools/defaults.d.ts +0 -46
  700. package/dist/src/public/tools/defaults.js +0 -1
  701. package/dist/src/public/tools/define-bash-tool.d.ts +0 -21
  702. package/dist/src/public/tools/define-bash-tool.js +0 -1
  703. package/dist/src/public/tools/define-glob-tool.d.ts +0 -22
  704. package/dist/src/public/tools/define-glob-tool.js +0 -1
  705. package/dist/src/public/tools/define-grep-tool.d.ts +0 -22
  706. package/dist/src/public/tools/define-grep-tool.js +0 -1
  707. package/dist/src/public/tools/define-read-file-tool.d.ts +0 -21
  708. package/dist/src/public/tools/define-read-file-tool.js +0 -1
  709. package/dist/src/public/tools/define-write-file-tool.d.ts +0 -22
  710. package/dist/src/public/tools/define-write-file-tool.js +0 -1
  711. package/dist/src/public/tools/internal.d.ts +0 -13
  712. package/dist/src/public/tools/internal.js +0 -1
  713. package/dist/src/public/tools/sleep/index.js +0 -1
  714. package/dist/src/runtime/connections/callback-route.js +0 -1
  715. package/dist/src/runtime/framework-channels/index.d.ts +0 -6
  716. package/dist/src/runtime/framework-channels/index.js +0 -1
  717. package/dist/src/runtime/framework-tools/agent.d.ts +0 -29
  718. package/dist/src/runtime/framework-tools/agent.js +0 -1
  719. package/dist/src/runtime/framework-tools/ask-question.d.ts +0 -35
  720. package/dist/src/runtime/framework-tools/ask-question.js +0 -1
  721. package/dist/src/runtime/framework-tools/bash.d.ts +0 -24
  722. package/dist/src/runtime/framework-tools/bash.js +0 -1
  723. package/dist/src/runtime/framework-tools/connection-search-dynamic.d.ts +0 -19
  724. package/dist/src/runtime/framework-tools/connection-search-dynamic.js +0 -2
  725. package/dist/src/runtime/framework-tools/final-output.js +0 -1
  726. package/dist/src/runtime/framework-tools/glob.d.ts +0 -26
  727. package/dist/src/runtime/framework-tools/glob.js +0 -2
  728. package/dist/src/runtime/framework-tools/grep.js +0 -2
  729. package/dist/src/runtime/framework-tools/index.d.ts +0 -39
  730. package/dist/src/runtime/framework-tools/index.js +0 -1
  731. package/dist/src/runtime/framework-tools/read-file.d.ts +0 -27
  732. package/dist/src/runtime/framework-tools/read-file.js +0 -2
  733. package/dist/src/runtime/framework-tools/skill.d.ts +0 -12
  734. package/dist/src/runtime/framework-tools/skill.js +0 -1
  735. package/dist/src/runtime/framework-tools/subagent/local.js +0 -1
  736. package/dist/src/runtime/framework-tools/subagent/remote.js +0 -1
  737. package/dist/src/runtime/framework-tools/tasks.d.ts +0 -91
  738. package/dist/src/runtime/framework-tools/tasks.js +0 -1
  739. package/dist/src/runtime/framework-tools/web-fetch.js +0 -2
  740. package/dist/src/runtime/framework-tools/web-search.js +0 -1
  741. package/dist/src/runtime/framework-tools/write-file.d.ts +0 -23
  742. package/dist/src/runtime/framework-tools/write-file.js +0 -2
  743. package/dist/src/runtime/governance/auth/jwt-ecdsa.js +0 -1
  744. package/dist/src/runtime/governance/auth/jwt-hmac.js +0 -1
  745. package/dist/src/runtime/governance/auth/oidc.js +0 -1
  746. package/dist/src/runtime/input/types.js +0 -1
  747. package/dist/src/runtime/session-callback-route.d.ts +0 -6
  748. package/dist/src/runtime/session-callback-route.js +0 -1
  749. package/dist/src/runtime/task-input-response-route.d.ts +0 -5
  750. package/dist/src/runtime/task-input-response-route.js +0 -1
  751. package/dist/src/shared/durable-dynamic-tool-callbacks.js +0 -1
  752. package/dist/src/shared/dynamic-tool-definition.d.ts +0 -154
  753. package/dist/src/shared/dynamic-tool-definition.js +0 -1
  754. package/dist/src/shared/eve-server-health.d.ts +0 -5
  755. package/dist/src/shared/eve-server-health.js +0 -1
  756. package/dist/src/shared/tool-definition.d.ts +0 -89
  757. /package/dist/src/{runtime/governance → channel}/auth/http-basic.js +0 -0
  758. /package/dist/src/{runtime/governance → channel}/auth/token-claims.js +0 -0
  759. /package/dist/src/{runtime/governance → channel}/auth/types.js +0 -0
  760. /package/dist/src/{runtime/governance → channel}/auth/vercel-oidc-project.js +0 -0
  761. /package/dist/src/{runtime/governance/network → channel}/ip-allow-list.d.ts +0 -0
  762. /package/dist/src/{runtime/governance/network → channel}/ip-allow-list.js +0 -0
  763. /package/dist/src/{execution/skills/types.js → context/session-context.js} +0 -0
  764. /package/dist/src/execution/sandbox/{bash-tool.js → bash.js} +0 -0
  765. /package/dist/src/{runtime/framework-tools → execution/tools}/file-state.js +0 -0
  766. /package/dist/src/{runtime/framework-tools → execution/tools}/sleep.d.ts +0 -0
  767. /package/dist/src/{runtime/framework-tools → execution/tools}/sleep.js +0 -0
  768. /package/dist/src/execution/web-fetch/{tool.d.ts → execute.d.ts} +0 -0
  769. /package/dist/src/execution/web-fetch/{tool.js → execute.js} +0 -0
  770. /package/dist/src/{shared/tool-definition.js → runtime/connections/registry-types.js} +0 -0
  771. /package/dist/src/{runtime/connections/types.js → shared/connection-types.js} +0 -0
  772. /package/dist/src/{runtime/sessions/auth.d.ts → shared/session-auth.d.ts} +0 -0
  773. /package/dist/src/{runtime/sessions/auth.js → shared/session-auth.js} +0 -0
  774. /package/dist/src/{runtime/connections → shared}/validate-authorization.js +0 -0
  775. /package/dist/src/{public/tools/output-builders.js → tools/model-output.js} +0 -0
  776. /package/dist/src/{shared/tool-schema.d.ts → tools/schema.d.ts} +0 -0
  777. /package/dist/src/{shared/tool-schema.js → tools/schema.js} +0 -0
  778. /package/dist/src/{shared/tool-task.d.ts → tools/task.d.ts} +0 -0
  779. /package/dist/src/{shared/tool-task.js → tools/task.js} +0 -0
@@ -1 +1 @@
1
- import{compiledAgentManifestSchema}from"#compiler/manifest.js";import{formatValidationError}from"#runtime/validation.js";import{readBundledCompiledArtifacts}from"#runtime/loaders/bundled-artifacts.js";import{resolveRuntimeCompilerArtifactPaths}from"#runtime/loaders/artifact-paths.js";const BUNDLED_MANIFEST_SOURCE=`bundled compiled manifest`;var LoadCompiledManifestError=class extends Error{manifestPath;constructor(e,t){super(e),this.name=`LoadCompiledManifestError`,t!==void 0&&(this.manifestPath=t)}};async function loadCompiledManifest(e){let t=e.compiledArtifactsSource.kind===`disk`?resolveRuntimeCompilerArtifactPaths(e.compiledArtifactsSource.appRoot).compiledManifestPath:void 0;if(t!==void 0){let{readFile:e}=await import(`node:fs/promises`),n;try{n=JSON.parse(await e(t,`utf8`))}catch(e){throw new LoadCompiledManifestError(formatLoadErrorMessage(e),t)}return parseCompiledManifest(n,t)}let a=readBundledCompiledArtifacts();if(a!==null)return parseCompiledManifest(a.manifest,BUNDLED_MANIFEST_SOURCE);throw new LoadCompiledManifestError(`Compiled manifest is unavailable without an app root or bundled compiled artifacts.`,BUNDLED_MANIFEST_SOURCE)}function parseCompiledManifest(n,r){let i=compiledAgentManifestSchema.safeParse(n);if(!i.success)throw new LoadCompiledManifestError(`Expected "${r}" to contain a valid compiled eve agent manifest. ${formatValidationError(i.error)}`,r);return i.data}function formatLoadErrorMessage(e){return e instanceof Error?e.message:`Unknown manifest load failure.`}export{LoadCompiledManifestError,loadCompiledManifest};
1
+ import{compiledAgentManifestSchema}from"#compiler/manifest.js";import{formatValidationError}from"#runtime/validation.js";import{validateCompiledAgentManifest}from"#compiler/validate-artifact.js";import{readBundledCompiledArtifacts}from"#runtime/loaders/bundled-artifacts.js";import{resolveRuntimeCompilerArtifactPaths}from"#runtime/loaders/artifact-paths.js";const BUNDLED_MANIFEST_SOURCE=`bundled compiled manifest`;var LoadCompiledManifestError=class extends Error{manifestPath;constructor(e,t){super(e),this.name=`LoadCompiledManifestError`,t!==void 0&&(this.manifestPath=t)}};async function loadCompiledManifest(e){let t=e.compiledArtifactsSource.kind===`disk`?resolveRuntimeCompilerArtifactPaths(e.compiledArtifactsSource.appRoot).compiledManifestPath:void 0;if(t!==void 0){let{readFile:e}=await import(`node:fs/promises`),n;try{n=JSON.parse(await e(t,`utf8`))}catch(e){throw new LoadCompiledManifestError(formatLoadErrorMessage(e),t)}return parseCompiledManifest(n,t)}let n=readBundledCompiledArtifacts();if(n!==null)return parseCompiledManifest(n.manifest,BUNDLED_MANIFEST_SOURCE);throw new LoadCompiledManifestError(`Compiled manifest is unavailable without an app root or bundled compiled artifacts.`,BUNDLED_MANIFEST_SOURCE)}function parseCompiledManifest(r,i){let a=compiledAgentManifestSchema.safeParse(r);if(!a.success)throw new LoadCompiledManifestError(`Expected "${i}" to contain a valid compiled eve agent manifest. ${formatValidationError(a.error)}`,i);try{validateCompiledAgentManifest(a.data)}catch(e){throw new LoadCompiledManifestError(`Expected "${i}" to contain a semantically valid compiled eve agent manifest. ${formatLoadErrorMessage(e)}`,i)}return a.data}function formatLoadErrorMessage(e){return e instanceof Error?e.message:`Unknown manifest load failure.`}export{LoadCompiledManifestError,loadCompiledManifest};
@@ -7,12 +7,6 @@ import type { WorkspaceRuntimeSpec } from "#runtime/workspace/types.js";
7
7
  interface ComposeRuntimeBasePromptInput {
8
8
  connections?: readonly ResolvedConnectionDefinition[];
9
9
  instructions?: readonly ResolvedInstructionsDefinition[];
10
- /**
11
- * Whether the agent opted into `experimental.subagentPersistentSessions`.
12
- * Gates the agent-messaging prompt block that documents `agentId`
13
- * continuation and the `<agents>` listing.
14
- */
15
- persistentSubagentSessions?: boolean;
16
10
  tasksEnabled?: boolean;
17
11
  skills?: readonly ResolvedSkillDefinition[];
18
12
  subagentsAvailable?: boolean;
@@ -1,4 +1,4 @@
1
1
  import{formatAvailableSkillsSection}from"#execution/skills/instructions.js";import{createWorkspacePromptSection}from"#runtime/workspace/spec.js";import{formatConnectionsSection}from"#runtime/prompt/connections.js";function composeRuntimeBasePrompt(e){return[...createInstructionsPromptBlocks(e.instructions),...createWorkspacePromptBlocks(e.workspaceSpec),...e.toolsAvailable?[`Tool execution
2
- A single tool or subagent call runs as one serial action. If you call multiple independent tools or subagents in one response, eve treats that batch as parallel work. Only batch work that is independent and does not rely on another call in the same response.`]:[],...e.subagentsAvailable&&e.persistentSubagentSessions?[e.tasksEnabled?"Agent messaging\nSubagent calls start durable background tasks and return immediately with a task receipt. After delegating, continue helping the user or end your turn. The task will notify you when it completes, fails, needs input, or sends an update; completion and failure notifications include the task's result. Agents you have already delegated to remain visible in the framework-authored `<agents>` conversation note. `availability=busy` means the listed task still owns that agent session: wait for its notification or use task_cancel with its taskId instead of starting a continuation. `availability=available` means no nonterminal task owns the session, so you may pass agentId to the original subagent tool to continue it. Calling a subagent without agentId always starts a new agent session.":"Agent messaging\nAgents you have already delegated to stay available after they answer. eve injects the current `<agents>` list into the conversation as a note labeled `[Agents]`; it is added automatically by the framework, not written by the user, and never requires a reply. The list is only a record of those existing agents — their `agentId`, name, and latest status. It does not limit which subagent tools you can call: your tool list is the source of truth, and any subagent tool can always be called without `agentId` to start a new agent, including when the `<agents>` list is empty or absent. Pass `agentId` to the same subagent tool only to continue one of those existing agents' sessions."]:[],...createConnectionsPromptBlocks(e.connections),...createSkillsPromptBlocks(e.skills)]}function createInstructionsPromptBlocks(e){let t=(e??[]).filter(e=>e.role===`system`&&e.content.trim().length>0);if(t.length===0)return[];let n=t.length===1?t[0]:void 0;return[`Instructions (${n!==void 0&&!n.sourceId.startsWith(`ext:`)&&!n.sourceId.startsWith(`ext-override:`)?n.name:`instructions`})\n${t.map(e=>e.content).join(`
2
+ A single tool or subagent call runs as one serial action. If you call multiple independent tools or subagents in one response, eve treats that batch as parallel work. Only batch work that is independent and does not rely on another call in the same response.`]:[],...e.subagentsAvailable?[e.tasksEnabled?"Agent messaging\nSubagent calls start durable background tasks and return immediately with a task receipt. After delegating, continue helping the user or end your turn. The task will notify you when it completes, fails, needs input, or sends an update; completion and failure notifications include the task's result. Agents you have already delegated to remain visible in the framework-authored `<agents>` conversation note. `availability=busy` means the listed task still owns that agent session: wait for its notification or use task_cancel with its taskId instead of starting a continuation. `availability=available` means no nonterminal task owns the session, so you may pass agentId to the original subagent tool to continue it. Calling a subagent without agentId always starts a new agent session.":"Agent messaging\nAgents you have already delegated to stay available after they answer. eve injects the current `<agents>` list into the conversation as a note labeled `[Agents]`; it is added automatically by the framework, not written by the user, and never requires a reply. The list is only a record of those existing agents — their `agentId`, name, and latest status. It does not limit which subagent tools you can call: your tool list is the source of truth, and any subagent tool can always be called without `agentId` to start a new agent, including when the `<agents>` list is empty or absent. Pass `agentId` to the same subagent tool only to continue one of those existing agents' sessions."]:[],...createConnectionsPromptBlocks(e.connections),...createSkillsPromptBlocks(e.skills)]}function createInstructionsPromptBlocks(e){let t=(e??[]).filter(e=>e.role===`system`&&e.content.trim().length>0);if(t.length===0)return[];let n=t.length===1?t[0]:void 0;return[`Instructions (${n!==void 0&&n.owner.kind!==`extension`?n.name:`instructions`})\n${t.map(e=>e.content).join(`
3
3
 
4
4
  `).trim()}`]}function createWorkspacePromptBlocks(e){if(e===void 0)return[];let n=createWorkspacePromptSection(e);return n===void 0?[]:[n]}function createConnectionsPromptBlocks(e){return!e||e.length===0?[]:[formatConnectionsSection(e)]}function createSkillsPromptBlocks(t){if(!t||t.length===0)return[];let n=formatAvailableSkillsSection(t);return n===null?[]:[n]}export{composeRuntimeBasePrompt};
@@ -1 +1 @@
1
- import{expectObjectRecord}from"#internal/authored-module.js";import{ROOT_COMPILED_AGENT_NODE_ID}from"#compiler/manifest.js";import{createRuntimeSubagentRegistry}from"#runtime/subagents/registry.js";import{LOAD_SKILL_TOOL_NAME}from"#runtime/skills/fragment-context.js";import{createRuntimeToolRegistry}from"#runtime/tools/registry.js";import{ROOT_RUNTIME_AGENT_NODE_ID}from"#runtime/graph.js";import{WORKFLOW_TOOL_NAME}from"#shared/workflow-sandbox.js";import{getAllFrameworkChannelNames,getFrameworkChannelDefinitions}from"#runtime/framework-channels/index.js";import{getAllFrameworkToolNames,getFrameworkDynamicToolResolvers,getFrameworkToolDefinitions}from"#runtime/framework-tools/index.js";import{resolveAgent}from"#runtime/resolve-agent.js";import{loadResolvedModuleExport}from"#runtime/resolve-helpers.js";import{createResolvedRuntimeTurnAgent}from"#runtime/agent/bootstrap.js";import{createWorkspacePromptSection}from"#runtime/workspace/spec.js";import{createRuntimeHookRegistry}from"#runtime/hooks/registry.js";import{resolveDynamicSubagentDefinition}from"#runtime/resolve-dynamic-subagent.js";import{createRuntimeSandboxRegistry}from"#runtime/sandbox/registry.js";var ResolveRuntimeAgentGraphError=class extends Error{logicalPath;nodeId;sourceId;constructor(e,t={}){super(e),this.name=`ResolveRuntimeAgentGraphError`,t.logicalPath!==void 0&&(this.logicalPath=t.logicalPath),t.nodeId!==void 0&&(this.nodeId=t.nodeId),t.sourceId!==void 0&&(this.sourceId=t.sourceId)}};async function resolveRuntimeAgentGraph(e){let n=new Map,r=createChildNodeIdsByParentNodeId(e.manifest),i=new Map(e.manifest.subagents.map(e=>[e.nodeId,e])),a=await resolveRuntimeAgentNode({childNodeIdsByParentNodeId:r,manifest:e.manifest,moduleMap:e.moduleMap,nodeId:ROOT_COMPILED_AGENT_NODE_ID,nodesByNodeId:n,subagentNodesById:i});return attachInheritedSandboxWorkspaceResources({manifest:e.manifest,nodesByNodeId:n}),{nodesByNodeId:n,root:a}}async function resolveRuntimeAgentNode(e){let t=toRuntimeNodeId(e.nodeId);if(e.nodesByNodeId.has(t))throw new ResolveRuntimeAgentGraphError(`Found multiple runtime agent nodes for node id "${t}".`,{nodeId:t,sourceId:e.sourceId});let a=await resolveAgent({manifest:e.manifest,moduleMap:e.moduleMap,nodeId:e.nodeId}),s=getFrameworkToolDefinitions({authoredSkills:a.skills}),c=new Set(s.map(e=>e.name)),l=getAllFrameworkToolNames(),u=new Set(a.tools.map(e=>e.name));for(let n of a.disabledFrameworkTools)if(!l.has(n))throw new ResolveRuntimeAgentGraphError(`agent/tools/${n}.ts exports disableTool() but "${n}" is not a framework tool. Rename the file to one of: ${[...l].sort().join(`, `)}.`,{nodeId:t,sourceId:e.sourceId});let d=new Set(a.disabledFrameworkTools),f=await createRuntimeToolRegistry({tools:[...s.filter(e=>!u.has(e.name)&&!d.has(e.name)),...a.tools]},{reservedToolNames:[WORKFLOW_TOOL_NAME,...c.has(LOAD_SKILL_TOOL_NAME)||u.has(LOAD_SKILL_TOOL_NAME)?[]:[LOAD_SKILL_TOOL_NAME]]}),p=new Set(a.channels.map(e=>e.name)),m=getAllFrameworkChannelNames();for(let n of a.disabledFrameworkChannels)if(!m.has(n))throw new ResolveRuntimeAgentGraphError(`agent/channels/${n}.ts exports disableRoute() but "${n}" is not a framework channel. Rename the file to one of: ${[...m].sort().join(`, `)}.`,{nodeId:t,sourceId:e.sourceId});let h=new Set(a.disabledFrameworkChannels),g=[...getFrameworkChannelDefinitions().filter(e=>!p.has(e.name)&&!h.has(e.name)),...a.channels],_=createRuntimeSandboxRegistry({authoredSandbox:a.sandbox,workspaceResourceRoot:a.workspaceResourceRoot}),v=createRuntimeSubagentRegistry({persistentSessions:a.config?.experimental?.tasks===!0||a.config?.experimental?.subagentPersistentSessions===!0,reservedToolNames:[LOAD_SKILL_TOOL_NAME,...f.preparedTools.map(e=>e.name)],subagents:await resolveRuntimeSubagents({childNodeIdsByParentNodeId:e.childNodeIdsByParentNodeId,manifest:e.manifest,moduleMap:e.moduleMap,nodesByNodeId:e.nodesByNodeId,parentNodeId:e.nodeId,subagentNodesById:e.subagentNodesById})}),y={...a,dynamicToolResolvers:[...a.dynamicToolResolvers,...getFrameworkDynamicToolResolvers()]},b={agent:y,channels:g,hookRegistry:createRuntimeHookRegistry(y.hooks),nodeId:t,sandboxRegistry:_,sourceId:e.sourceId,subagentRegistry:v,toolRegistry:f,turnAgent:createResolvedRuntimeTurnAgent({agent:y,id:e.agentId,nodeId:t,tools:[...f.preparedTools,...v.preparedTools]})};return e.nodesByNodeId.set(t,b),b}async function resolveRuntimeSubagents(e){let t=[],n=e.childNodeIdsByParentNodeId.get(e.parentNodeId)??[];for(let r of n){let n=e.subagentNodesById.get(r);if(n===void 0)throw new ResolveRuntimeAgentGraphError(`Missing compiled subagent node "${r}" while resolving runtime subagents.`,{nodeId:toRuntimeNodeId(e.parentNodeId),sourceId:r});t.push(await resolveRuntimeSubagent({childNodeIdsByParentNodeId:e.childNodeIdsByParentNodeId,moduleMap:e.moduleMap,nodesByNodeId:e.nodesByNodeId,sourceRef:n,subagentNodesById:e.subagentNodesById}))}for(let n of e.manifest.remoteAgents)t.push(await resolveRuntimeRemoteAgent({moduleMap:e.moduleMap,nodeScopeId:e.parentNodeId,sourceRef:n}));return t}async function resolveRuntimeSubagent(e){let t={...e.sourceRef.configResolver===void 0?{description:e.sourceRef.description}:{dynamic:await resolveDynamicSubagentDefinition({definition:e.sourceRef.configResolver,moduleMap:e.moduleMap,nodeId:e.sourceRef.nodeId})},kind:`subagent`,logicalPath:e.sourceRef.logicalPath,name:e.sourceRef.name,nodeId:toRuntimeNodeId(e.sourceRef.nodeId),sourceId:e.sourceRef.sourceId,sourceKind:`module`};return await resolveRuntimeAgentNode({agentId:e.sourceRef.name,childNodeIdsByParentNodeId:e.childNodeIdsByParentNodeId,manifest:e.sourceRef.agent,moduleMap:e.moduleMap,nodeId:e.sourceRef.nodeId,nodesByNodeId:e.nodesByNodeId,sourceId:e.sourceRef.sourceId,subagentNodesById:e.subagentNodesById}),t}async function resolveRuntimeRemoteAgent(t){let n=expectObjectRecord(await loadResolvedModuleExport({definition:t.sourceRef,kindLabel:`remote agent`,moduleMap:t.moduleMap,nodeId:t.nodeScopeId}),`Expected remote agent source "${t.sourceRef.logicalPath}" to export an object.`),r={description:t.sourceRef.description,kind:`remote`,logicalPath:t.sourceRef.logicalPath,name:t.sourceRef.name,nodeId:toRuntimeNodeId(t.sourceRef.nodeId),outputSchema:t.sourceRef.outputSchema,path:t.sourceRef.path,sourceId:t.sourceRef.sourceId,sourceKind:`module`,url:await resolveRemoteAgentUrl({bakedUrl:t.sourceRef.url,logicalPath:t.sourceRef.logicalPath,resolvedUrl:n.url})};typeof n.auth==`function`&&(r.auth=n.auth),n.forwardPrincipal===!0&&(r.forwardPrincipal=!0);let i=resolveRemoteAgentHeaders(n.headers);return i!==void 0&&(r.headers=i),r}async function resolveRemoteAgentUrl(e){if(typeof e.resolvedUrl==`function`){let t=await e.resolvedUrl();if(typeof t!=`string`||t.length===0)throw Error(`Remote agent "${e.logicalPath}" url function must return a non-empty string.`);return t}let t=e.bakedUrl??(typeof e.resolvedUrl==`string`?e.resolvedUrl:``);if(t.length===0)throw Error(`Remote agent "${e.logicalPath}" is missing a url.`);return t}function resolveRemoteAgentHeaders(e){if(e===void 0)return;if(typeof e==`function`)return e;if(typeof e!=`object`||!e||Array.isArray(e))return;let t={};for(let[n,r]of Object.entries(e))typeof r==`string`&&(t[n]=r);return t}function attachInheritedSandboxWorkspaceResources(e){let t=new Map(e.manifest.subagentEdges.map(e=>[e.childNodeId,e.parentNodeId]));for(let[n,r]of e.nodesByNodeId){if(r.sandboxRegistry.sandbox.definition.inheritsParent!==!0)continue;if(r.agent.dynamicSkillResolvers.length>0)throw new ResolveRuntimeAgentGraphError(`Sandbox "${r.sandboxRegistry.sandbox.definition.logicalPath}" selects parent.sandbox but agent node "${n}" defines dynamic skills. Remove the child dynamic skills or give the child its own sandbox.`,{nodeId:n});let i=t.get(n);if(i===void 0)throw new ResolveRuntimeAgentGraphError(`Sandbox "${r.sandboxRegistry.sandbox.definition.logicalPath}" selects parent.sandbox but agent node "${n}" has no parent.`,{nodeId:n});let a=resolveSandboxOwnerNode({nodeId:i,nodesByNodeId:e.nodesByNodeId,parentNodeIdByChildNodeId:t});r.sandboxRegistry.sandbox.inheritance={definition:a.sandboxRegistry.sandbox.definition,nodeId:a.nodeId,workspaceResourceRoot:a.sandboxRegistry.sandbox.workspaceResourceRoot};let o=createWorkspacePromptSection(a.agent.workspaceSpec);o!==void 0&&(r.turnAgent.instructions=[...r.turnAgent.instructions,o])}}function resolveSandboxOwnerNode(e){let t=e.nodesByNodeId.get(toRuntimeNodeId(e.nodeId));if(t===void 0)throw new ResolveRuntimeAgentGraphError(`Missing parent runtime node "${e.nodeId}".`,{nodeId:e.nodeId});if(t.sandboxRegistry.sandbox.definition.inheritsParent!==!0)return t;let n=e.parentNodeIdByChildNodeId.get(e.nodeId);if(n===void 0)throw new ResolveRuntimeAgentGraphError(`Inherited sandbox node "${e.nodeId}" has no parent.`,{nodeId:e.nodeId});return resolveSandboxOwnerNode({...e,nodeId:n})}function createChildNodeIdsByParentNodeId(e){let t=new Map;for(let n of e.subagentEdges){let e=t.get(n.parentNodeId);if(e===void 0){t.set(n.parentNodeId,[n.childNodeId]);continue}e.push(n.childNodeId)}return t}function toRuntimeNodeId(e){return e===ROOT_COMPILED_AGENT_NODE_ID?ROOT_RUNTIME_AGENT_NODE_ID:e}export{resolveRuntimeAgentGraph};
1
+ import{expectObjectRecord}from"#internal/authored-module.js";import{ROOT_COMPILED_AGENT_NODE_ID}from"#compiler/manifest.js";import{validateCompiledModuleMap}from"#compiler/validate-artifact.js";import{createRuntimeSubagentRegistry}from"#runtime/subagents/registry.js";import{LOAD_SKILL_TOOL_NAME}from"#runtime/skills/fragment-context.js";import{createRuntimeToolRegistry}from"#runtime/tools/registry.js";import{ROOT_RUNTIME_AGENT_NODE_ID}from"#runtime/graph.js";import{WORKFLOW_TOOL_NAME}from"#shared/workflow-sandbox.js";import{loadResolvedModuleExport}from"#runtime/resolve-helpers.js";import{createResolvedRuntimeTurnAgent}from"#runtime/agent/bootstrap.js";import{createWorkspacePromptSection}from"#runtime/workspace/spec.js";import{createRuntimeHookRegistry}from"#runtime/hooks/registry.js";import{resolveAgent}from"#runtime/resolve-agent.js";import{resolveDynamicSubagentDefinition}from"#runtime/resolve-dynamic-subagent.js";import{createRuntimeSandboxRegistry}from"#runtime/sandbox/registry.js";var ResolveRuntimeAgentGraphError=class extends Error{logicalPath;nodeId;sourceId;constructor(e,t={}){super(e),this.name=`ResolveRuntimeAgentGraphError`,t.logicalPath!==void 0&&(this.logicalPath=t.logicalPath),t.nodeId!==void 0&&(this.nodeId=t.nodeId),t.sourceId!==void 0&&(this.sourceId=t.sourceId)}};async function resolveRuntimeAgentGraph(e){validateCompiledModuleMap(e.manifest,e.moduleMap);let r=new Map,i=createChildNodeIdsByParentNodeId(e.manifest),a=new Map(e.manifest.subagents.map(e=>[e.nodeId,e])),o=await resolveRuntimeAgentNode({childNodeIdsByParentNodeId:i,manifest:e.manifest,moduleMap:e.moduleMap,nodeId:ROOT_COMPILED_AGENT_NODE_ID,nodesByNodeId:r,subagentNodesById:a});return attachInheritedSandboxWorkspaceResources({manifest:e.manifest,nodesByNodeId:r}),{nodesByNodeId:r,root:o}}async function resolveRuntimeAgentNode(e){let t=toRuntimeNodeId(e.nodeId);if(e.nodesByNodeId.has(t))throw new ResolveRuntimeAgentGraphError(`Found multiple runtime agent nodes for node id "${t}".`,{nodeId:t,sourceId:e.sourceId});let n=await resolveAgent({manifest:e.manifest,moduleMap:e.moduleMap,nodeId:e.nodeId}),o=await createRuntimeToolRegistry({tools:n.tools},{reservedToolNames:[WORKFLOW_TOOL_NAME]}),s=createRuntimeSandboxRegistry({sandbox:n.sandbox,workspaceResourceRoot:n.workspaceResourceRoot}),c=createRuntimeSubagentRegistry({reservedToolNames:[LOAD_SKILL_TOOL_NAME,...o.preparedTools.map(e=>e.name)],subagents:await resolveRuntimeSubagents({childNodeIdsByParentNodeId:e.childNodeIdsByParentNodeId,manifest:e.manifest,moduleMap:e.moduleMap,nodesByNodeId:e.nodesByNodeId,parentNodeId:e.nodeId,subagentNodesById:e.subagentNodesById})}),l={agent:n,channels:n.channels,hookRegistry:createRuntimeHookRegistry(n.hooks),nodeId:t,sandboxRegistry:s,sourceId:e.sourceId,subagentRegistry:c,toolRegistry:o,turnAgent:createResolvedRuntimeTurnAgent({agent:n,id:e.agentId,nodeId:t,tools:[...o.preparedTools,...c.preparedTools]})};return e.nodesByNodeId.set(t,l),l}async function resolveRuntimeSubagents(e){let t=[],n=e.childNodeIdsByParentNodeId.get(e.parentNodeId)??[];for(let r of n){let n=e.subagentNodesById.get(r);if(n===void 0)throw new ResolveRuntimeAgentGraphError(`Missing compiled subagent node "${r}" while resolving runtime subagents.`,{nodeId:toRuntimeNodeId(e.parentNodeId),sourceId:r});t.push(await resolveRuntimeSubagent({childNodeIdsByParentNodeId:e.childNodeIdsByParentNodeId,moduleMap:e.moduleMap,nodesByNodeId:e.nodesByNodeId,sourceRef:n,subagentNodesById:e.subagentNodesById}))}for(let n of e.manifest.remoteAgents)t.push(await resolveRuntimeRemoteAgent({moduleMap:e.moduleMap,nodeScopeId:e.parentNodeId,sourceRef:n}));return t}async function resolveRuntimeSubagent(e){let t={...e.sourceRef.configResolver===void 0?{description:e.sourceRef.description}:{dynamic:await resolveDynamicSubagentDefinition({definition:e.sourceRef.configResolver,moduleMap:e.moduleMap,nodeId:e.sourceRef.nodeId})},kind:`subagent`,logicalPath:e.sourceRef.logicalPath,name:e.sourceRef.name,nodeId:toRuntimeNodeId(e.sourceRef.nodeId),sourceId:e.sourceRef.sourceId,sourceKind:`module`};return await resolveRuntimeAgentNode({agentId:e.sourceRef.name,childNodeIdsByParentNodeId:e.childNodeIdsByParentNodeId,manifest:e.sourceRef.agent,moduleMap:e.moduleMap,nodeId:e.sourceRef.nodeId,nodesByNodeId:e.nodesByNodeId,sourceId:e.sourceRef.sourceId,subagentNodesById:e.subagentNodesById}),t}async function resolveRuntimeRemoteAgent(t){let n=expectObjectRecord(await loadResolvedModuleExport({definition:t.sourceRef,kindLabel:`remote agent`,moduleMap:t.moduleMap,nodeId:t.nodeScopeId}),`Expected remote agent source "${t.sourceRef.logicalPath}" to export an object.`),r={description:t.sourceRef.description,kind:`remote`,logicalPath:t.sourceRef.logicalPath,name:t.sourceRef.name,nodeId:toRuntimeNodeId(t.sourceRef.nodeId),outputSchema:t.sourceRef.outputSchema,path:t.sourceRef.path,sourceId:t.sourceRef.sourceId,sourceKind:`module`,url:await resolveRemoteAgentUrl({bakedUrl:t.sourceRef.url,logicalPath:t.sourceRef.logicalPath,resolvedUrl:n.url})};typeof n.auth==`function`&&(r.auth=n.auth),n.forwardPrincipal===!0&&(r.forwardPrincipal=!0);let i=resolveRemoteAgentHeaders(n.headers);return i!==void 0&&(r.headers=i),r}async function resolveRemoteAgentUrl(e){if(typeof e.resolvedUrl==`function`){let t=await e.resolvedUrl();if(typeof t!=`string`||t.length===0)throw Error(`Remote agent "${e.logicalPath}" url function must return a non-empty string.`);return t}let t=e.bakedUrl??(typeof e.resolvedUrl==`string`?e.resolvedUrl:``);if(t.length===0)throw Error(`Remote agent "${e.logicalPath}" is missing a url.`);return t}function resolveRemoteAgentHeaders(e){if(e===void 0)return;if(typeof e==`function`)return e;if(typeof e!=`object`||!e||Array.isArray(e))return;let t={};for(let[n,r]of Object.entries(e))typeof r==`string`&&(t[n]=r);return t}function attachInheritedSandboxWorkspaceResources(e){let t=new Map(e.manifest.subagents.map(e=>[e.nodeId,e.parentNodeId]));for(let[n,r]of e.nodesByNodeId){if(r.sandboxRegistry.sandbox.definition.inheritsParent!==!0)continue;if(r.agent.dynamicSkillResolvers.length>0)throw new ResolveRuntimeAgentGraphError(`Sandbox "${r.sandboxRegistry.sandbox.definition.logicalPath}" selects parent.sandbox but agent node "${n}" defines dynamic skills. Remove the child dynamic skills or give the child its own sandbox.`,{nodeId:n});let i=t.get(n);if(i===void 0)throw new ResolveRuntimeAgentGraphError(`Sandbox "${r.sandboxRegistry.sandbox.definition.logicalPath}" selects parent.sandbox but agent node "${n}" has no parent.`,{nodeId:n});let a=resolveSandboxOwnerNode({nodeId:i,nodesByNodeId:e.nodesByNodeId,parentNodeIdByChildNodeId:t});r.sandboxRegistry.sandbox.inheritance={definition:a.sandboxRegistry.sandbox.definition,nodeId:a.nodeId,workspaceResourceRoot:a.sandboxRegistry.sandbox.workspaceResourceRoot};let o=createWorkspacePromptSection(a.agent.workspaceSpec);o!==void 0&&(r.turnAgent.instructions=[...r.turnAgent.instructions,o])}}function resolveSandboxOwnerNode(e){let t=e.nodesByNodeId.get(toRuntimeNodeId(e.nodeId));if(t===void 0)throw new ResolveRuntimeAgentGraphError(`Missing parent runtime node "${e.nodeId}".`,{nodeId:e.nodeId});if(t.sandboxRegistry.sandbox.definition.inheritsParent!==!0)return t;let n=e.parentNodeIdByChildNodeId.get(e.nodeId);if(n===void 0)throw new ResolveRuntimeAgentGraphError(`Inherited sandbox node "${e.nodeId}" has no parent.`,{nodeId:e.nodeId});return resolveSandboxOwnerNode({...e,nodeId:n})}function createChildNodeIdsByParentNodeId(e){let t=new Map;for(let n of e.subagents){let e=t.get(n.parentNodeId);if(e===void 0){t.set(n.parentNodeId,[n.nodeId]);continue}e.push(n.nodeId)}return t}function toRuntimeNodeId(e){return e===ROOT_COMPILED_AGENT_NODE_ID?ROOT_RUNTIME_AGENT_NODE_ID:e}export{resolveRuntimeAgentGraph};
@@ -1 +1 @@
1
- import{ResolveAgentError,createResolvedModuleSourceRef}from"#runtime/resolve-helpers.js";import{resolveDynamicToolDefinition}from"#runtime/resolve-dynamic-tool.js";import{resolveChannelDefinition}from"#runtime/resolve-channel.js";import{resolveConnectionDefinition}from"#runtime/resolve-connection.js";import{resolveHookDefinition}from"#runtime/resolve-hook.js";import{resolveSandboxDefinition}from"#runtime/resolve-sandbox.js";import{resolveDynamicInstructionsDefinition}from"#runtime/resolve-dynamic-instructions.js";import{resolveDynamicSkillDefinition}from"#runtime/resolve-dynamic-skill.js";import{resolveToolDefinition}from"#runtime/resolve-tool.js";async function resolveAgent(e){let t=e.manifest.skills.map(e=>({...e,metadata:e.metadata===void 0?void 0:{...e.metadata}})),i=[],a=[];for(let t of e.manifest.channels){if(t.kind===`disabled`){a.push(t.name);continue}i.push(await resolveChannelDefinition(t,e.moduleMap,e.nodeId))}let o=await Promise.all(e.manifest.tools.map(t=>resolveToolDefinition(t,e.moduleMap,e.nodeId))),s=await Promise.all((e.manifest.dynamicInstructions??[]).map(t=>resolveDynamicInstructionsDefinition(t,e.moduleMap,e.nodeId))),c=await Promise.all((e.manifest.dynamicSkills??[]).map(t=>resolveDynamicSkillDefinition(t,e.moduleMap,e.nodeId))),l=await Promise.all(e.manifest.dynamicTools.map(t=>resolveDynamicToolDefinition(t,e.moduleMap,e.nodeId))),u=await Promise.all(e.manifest.hooks.map(t=>resolveHookDefinition(t,e.moduleMap,e.nodeId))),d=await Promise.all(e.manifest.connections.map(t=>resolveConnectionDefinition(t,e.moduleMap,e.nodeId))),f=e.manifest.sandbox===null?null:await resolveSandboxDefinition(e.manifest.sandbox,e.moduleMap,e.nodeId),p=e.manifest.instructions.map(createResolvedInstructionsDefinition),m=e.manifest.workspaceResourceRoot,h={channels:i,connections:d,disabledFrameworkChannels:a,disabledFrameworkTools:[...e.manifest.disabledFrameworkTools],workflowTool:e.manifest.workflowTool===void 0?void 0:{maxSubagents:e.manifest.workflowTool.maxSubagents},webSearchProvider:e.manifest.webSearchProvider,dynamicInstructionsResolvers:s,dynamicSkillResolvers:c,dynamicToolResolvers:l,hooks:u,instructions:p,metadata:{agentRoot:e.manifest.agentRoot,appRoot:e.manifest.appRoot,diagnosticsSummary:e.manifest.diagnosticsSummary},sandbox:f,workspaceResourceRoot:m,skills:t,tools:o,workspaceSpec:{rootEntries:[...m.rootEntries]}};return`config`in e.manifest?{...h,config:createResolvedAgentConfig(e.manifest)}:h}function createResolvedInstructionsDefinition(e){return{content:e.content,name:e.name,logicalPath:e.logicalPath,role:e.role,sourceId:e.sourceId,sourceKind:e.sourceKind}}function createResolvedAgentConfig(e){let n={name:e.config.name};if(e.config.compaction!==void 0){let t={};e.config.compaction.model!==void 0&&(t.model=e.config.compaction.model.source===void 0?{contextWindowTokens:e.config.compaction.model.contextWindowTokens,id:e.config.compaction.model.id,maxOutputTokens:e.config.compaction.model.maxOutputTokens,providerOptions:e.config.compaction.model.providerOptions}:{contextWindowTokens:e.config.compaction.model.contextWindowTokens,id:e.config.compaction.model.id,maxOutputTokens:e.config.compaction.model.maxOutputTokens,providerOptions:e.config.compaction.model.providerOptions,source:{exportName:e.config.compaction.model.source.exportName,sourceKind:`module`,logicalPath:e.config.compaction.model.source.logicalPath,sourceId:e.config.compaction.model.source.sourceId}}),e.config.compaction.thresholdPercent!==void 0&&(t.thresholdPercent=e.config.compaction.thresholdPercent),n.compaction=t}if(e.config.experimental!==void 0&&(n.experimental={instrumentationProviders:e.config.experimental.instrumentationProviders,subagentPersistentSessions:e.config.experimental.subagentPersistentSessions,tasks:e.config.experimental.tasks,workflow:e.config.experimental.workflow===void 0?void 0:{world:e.config.experimental.workflow.world}}),e.config.outputSchema!==void 0&&(n.outputSchema=e.config.outputSchema),e.config.reasoning!==void 0&&(n.reasoning=e.config.reasoning),e.config.source!==void 0&&(n.source=createResolvedModuleSourceRef(e.config.source)),e.config.limits!==void 0&&(n.limits={maxInputTokensPerSession:e.config.limits.maxInputTokensPerSession,maxOutputTokensPerSession:e.config.limits.maxOutputTokensPerSession,sessionTimeoutMs:e.config.limits.sessionTimeoutMs}),e.config.dynamicModel!==void 0)return{...n,dynamicModel:{...createResolvedModuleSourceRef(e.config.dynamicModel),eventNames:[...e.config.dynamicModel.eventNames]}};let r=e.config.model;return{...n,model:r.source===void 0?{id:r.id,contextWindowTokens:r.contextWindowTokens,maxOutputTokens:r.maxOutputTokens,providerOptions:r.providerOptions}:{contextWindowTokens:r.contextWindowTokens,id:r.id,maxOutputTokens:r.maxOutputTokens,providerOptions:r.providerOptions,source:{exportName:r.source.exportName,sourceKind:`module`,logicalPath:r.source.logicalPath,sourceId:r.source.sourceId}}}}export{ResolveAgentError,resolveAgent};
1
+ import{ResolveAgentError,createResolvedModuleSourceRef}from"#runtime/resolve-helpers.js";import{resolveChannelDefinition}from"#runtime/resolve-channel.js";import{resolveConnectionDefinition}from"#runtime/resolve-connection.js";import{resolveHookDefinition}from"#runtime/resolve-hook.js";import{resolveSandboxDefinition}from"#runtime/resolve-sandbox.js";import{resolveDynamicInstructionsDefinition}from"#runtime/resolve-dynamic-instructions.js";import{resolveDynamicSkillDefinition}from"#runtime/resolve-dynamic-skill.js";import{resolveDynamicToolDefinition}from"#runtime/resolve-dynamic-tool.js";import{resolveToolDefinition}from"#runtime/resolve-tool.js";async function resolveAgent(e){let t=e.manifest.skills.map(t=>({...t,owner:requireCompiledSourceOwner(e.manifest,t),metadata:t.metadata===void 0?void 0:{...t.metadata}})),i=await Promise.all(e.manifest.channelRoutes.effective.map(t=>resolveChannelDefinition(t,e.moduleMap,e.nodeId))),a=await Promise.all(e.manifest.tools.map(t=>resolveToolDefinition(t,e.moduleMap,e.nodeId,requireBindingOwner(e.manifest,t.sourceId)))),o=await Promise.all((e.manifest.dynamicInstructions??[]).map(t=>resolveDynamicInstructionsDefinition(t,e.moduleMap,e.nodeId))),s=await Promise.all((e.manifest.dynamicSkills??[]).map(t=>resolveDynamicSkillDefinition(t,e.moduleMap,e.nodeId))),c=await Promise.all(e.manifest.dynamicTools.map(t=>resolveDynamicToolDefinition(t,e.moduleMap,e.nodeId))),l=await Promise.all(e.manifest.hooks.map(t=>resolveHookDefinition(t,e.moduleMap,e.nodeId))),u=await Promise.all(e.manifest.connections.map(t=>resolveConnectionDefinition(t,e.moduleMap,e.nodeId))),d=await resolveSandboxDefinition(e.manifest.sandbox,e.moduleMap,e.nodeId),f=e.manifest.instructions.map(t=>createResolvedInstructionsDefinition(e.manifest,t)),p=e.manifest.workspaceResourceRoot,m={channels:i,connections:u,workflowTool:e.manifest.workflowTool===void 0?void 0:{maxSubagents:e.manifest.workflowTool.maxSubagents},webSearchProvider:e.manifest.webSearchProvider,dynamicInstructionsResolvers:o,dynamicSkillResolvers:s,dynamicToolResolvers:c,hooks:l,instructions:f,metadata:{agentRoot:e.manifest.agentRoot,appRoot:e.manifest.appRoot,diagnosticsSummary:e.manifest.diagnosticsSummary},sandbox:d,workspaceResourceRoot:p,skills:t,tools:a,workspaceSpec:{rootEntries:[...p.rootEntries]}};return`config`in e.manifest?{...m,config:createResolvedAgentConfig(e.manifest)}:m}function requireBindingOwner(e,t){let n=e.bindings[t];if(n===void 0)throw Error(`Compiled source "${t}" has no binding.`);return n.owner}function createResolvedInstructionsDefinition(e,t){return{content:t.content,name:t.name,owner:requireCompiledSourceOwner(e,t),logicalPath:t.logicalPath,role:t.role,sourceId:t.sourceId,sourceKind:t.sourceKind}}function requireCompiledSourceOwner(e,t){let n=e.bindings[t.sourceId]?.owner??t.owner;if(n===void 0)throw Error(`Compiled source "${t.sourceId}" has no owner.`);return n}function createResolvedAgentConfig(e){let n={name:e.config.name};if(e.config.compaction!==void 0){let t={};e.config.compaction.model!==void 0&&(t.model=e.config.compaction.model.source===void 0?{contextWindowTokens:e.config.compaction.model.contextWindowTokens,id:e.config.compaction.model.id,maxOutputTokens:e.config.compaction.model.maxOutputTokens,providerOptions:e.config.compaction.model.providerOptions}:{contextWindowTokens:e.config.compaction.model.contextWindowTokens,id:e.config.compaction.model.id,maxOutputTokens:e.config.compaction.model.maxOutputTokens,providerOptions:e.config.compaction.model.providerOptions,source:{exportName:e.config.compaction.model.source.exportName,sourceKind:`module`,logicalPath:e.config.compaction.model.source.logicalPath,sourceId:e.config.compaction.model.source.sourceId}}),e.config.compaction.thresholdPercent!==void 0&&(t.thresholdPercent=e.config.compaction.thresholdPercent),n.compaction=t}if(e.config.experimental!==void 0&&(n.experimental={instrumentationProviders:e.config.experimental.instrumentationProviders,tasks:e.config.experimental.tasks,workflow:e.config.experimental.workflow===void 0?void 0:{world:e.config.experimental.workflow.world}}),e.config.outputSchema!==void 0&&(n.outputSchema=e.config.outputSchema),e.config.reasoning!==void 0&&(n.reasoning=e.config.reasoning),e.config.source!==void 0&&(n.source=createResolvedModuleSourceRef(e.config.source)),e.config.limits!==void 0&&(n.limits={maxInputTokensPerSession:e.config.limits.maxInputTokensPerSession,maxOutputTokensPerSession:e.config.limits.maxOutputTokensPerSession,sessionTimeoutMs:e.config.limits.sessionTimeoutMs}),e.config.dynamicModel!==void 0)return{...n,dynamicModel:{...createResolvedModuleSourceRef(e.config.dynamicModel),eventNames:[...e.config.dynamicModel.eventNames]}};let r=e.config.model;return{...n,model:r.source===void 0?{id:r.id,contextWindowTokens:r.contextWindowTokens,maxOutputTokens:r.maxOutputTokens,providerOptions:r.providerOptions}:{contextWindowTokens:r.contextWindowTokens,id:r.id,maxOutputTokens:r.maxOutputTokens,providerOptions:r.providerOptions,source:{exportName:r.source.exportName,sourceKind:`module`,logicalPath:r.source.logicalPath,sourceId:r.source.sourceId}}}}export{ResolveAgentError,resolveAgent};
@@ -1 +1 @@
1
- import{expectObjectRecord}from"#internal/authored-module.js";import{toErrorMessage}from"#shared/errors.js";import{normalizeAuthorizationSpec}from"#runtime/connections/validate-authorization.js";import{ResolveAgentError,loadResolvedModuleExport}from"#runtime/resolve-helpers.js";import{registerDefinitionSource,stampDefinitionKey}from"#public/tool-result-narrowing.js";async function resolveConnectionDefinition(t,n,r){try{let i=expectObjectRecord(await loadResolvedModuleExport({definition:t,kindLabel:`connection`,moduleMap:n,nodeId:r}),`Expected the connection export "${t.exportName??`default`}" from "${t.logicalPath}" to return an object.`),a={kind:`connection`,logicalPath:t.logicalPath,name:t.connectionName},o=`connection-source:${t.sourceId}`;stampDefinitionKey(i,o),registerDefinitionSource(o,a),registerDefinitionSource(`connection:${t.url}`,a);let s=i.auth!==void 0,c=i.headers!==void 0,l=t.protocol===`openapi`?i.operations:i.tools,u={connectionName:t.connectionName,description:t.description,exportName:t.exportName,logicalPath:t.logicalPath,protocol:t.protocol,sourceId:t.sourceId,sourceKind:`module`,url:t.url};if(s)if(typeof i.auth==`function`)u.authorization=i.auth;else try{u.authorization=normalizeAuthorizationSpec(i.auth,`Connection "${t.connectionName}" at "${t.logicalPath}":`)}catch(e){throw new ResolveAgentError(toErrorMessage(e),{logicalPath:t.logicalPath,sourceId:t.sourceId})}return c&&(u.headers=i.headers),i.toolCall!==void 0&&(u.toolCall=i.toolCall),l!==void 0&&(u.tools=l),t.protocol===`openapi`&&i.spec!==void 0&&(u.spec=i.spec),typeof i.approval==`function`&&(u.approval=i.approval),u}catch(e){throw e instanceof ResolveAgentError?e:new ResolveAgentError(`Failed to resolve connection "${t.connectionName}" from "${t.logicalPath}": ${toErrorMessage(e)}`,{logicalPath:t.logicalPath,sourceId:t.sourceId})}}export{resolveConnectionDefinition};
1
+ import{expectObjectRecord}from"#internal/authored-module.js";import{toErrorMessage}from"#shared/errors.js";import{registerDefinitionSource,stampDefinitionKey}from"#internal/authored-definition/source-identity.js";import{normalizeAuthorizationSpec}from"#shared/validate-authorization.js";import{ResolveAgentError,loadResolvedModuleExport}from"#runtime/resolve-helpers.js";async function resolveConnectionDefinition(t,n,r){try{let i=expectObjectRecord(await loadResolvedModuleExport({definition:t,kindLabel:`connection`,moduleMap:n,nodeId:r}),`Expected the connection export "${t.exportName??`default`}" from "${t.logicalPath}" to return an object.`),a={kind:`connection`,logicalPath:t.logicalPath,name:t.connectionName},o=`connection-source:${t.sourceId}`;stampDefinitionKey(i,o),registerDefinitionSource(o,a),registerDefinitionSource(`connection:${t.url}`,a);let s=i.auth!==void 0,c=i.headers!==void 0,l=t.protocol===`openapi`?i.operations:i.tools,u={connectionName:t.connectionName,description:t.description,exportName:t.exportName,logicalPath:t.logicalPath,protocol:t.protocol,sourceId:t.sourceId,sourceKind:`module`,url:t.url};if(s)if(typeof i.auth==`function`)u.authorization=i.auth;else try{u.authorization=normalizeAuthorizationSpec(i.auth,`Connection "${t.connectionName}" at "${t.logicalPath}":`)}catch(e){throw new ResolveAgentError(toErrorMessage(e),{logicalPath:t.logicalPath,sourceId:t.sourceId})}return c&&(u.headers=i.headers),i.toolCall!==void 0&&(u.toolCall=i.toolCall),l!==void 0&&(u.tools=l),t.protocol===`openapi`&&i.spec!==void 0&&(u.spec=i.spec),typeof i.approval==`function`&&(u.approval=i.approval),u}catch(e){throw e instanceof ResolveAgentError?e:new ResolveAgentError(`Failed to resolve connection "${t.connectionName}" from "${t.logicalPath}": ${toErrorMessage(e)}`,{logicalPath:t.logicalPath,sourceId:t.sourceId})}}export{resolveConnectionDefinition};
@@ -1 +1 @@
1
- import{expectFunction,expectObjectRecord}from"#internal/authored-module.js";import{toErrorMessage}from"#shared/errors.js";import{isDynamicSentinel}from"#shared/dynamic-tool-definition.js";import{ResolveAgentError,loadResolvedModuleExport}from"#runtime/resolve-helpers.js";import{registerDefinitionSource,stampDefinitionKey}from"#public/tool-result-narrowing.js";async function resolveDynamicToolDefinition(e,t,r){try{return resolveLoadedDynamicToolDefinition(await loadResolvedModuleExport({definition:e,kindLabel:`dynamic-tool`,moduleMap:t,nodeId:r}),e,e.eventNames)}catch(t){throw t instanceof ResolveAgentError?t:new ResolveAgentError(`Failed to resolve dynamic tool from "${e.logicalPath}": ${toErrorMessage(t)}`,{logicalPath:e.logicalPath,sourceId:e.sourceId})}}function resolveLoadedDynamicToolDefinition(e,t,n){let r=expectDynamicToolValue(e,t);return createResolvedDynamicToolResolver(r,t,n??Object.keys(r.events))}function createResolvedDynamicToolResolver(t,n,r){let i={};for(let a of r)i[a]=expectFunction(t.events[a],describe(n,`to provide a handler for event "${a}"`));let a=`dynamic-tool-source:${n.sourceId}`;return stampDefinitionKey(t,a),registerDefinitionSource(a,{kind:`tool`,logicalPath:n.logicalPath,name:n.slug}),{eventNames:[...r],events:i,exportName:n.exportName,extensionNamespace:n.extensionNamespace,logicalPath:n.logicalPath,slug:n.slug,sourceId:n.sourceId,sourceKind:`module`}}function expectDynamicToolValue(e,n){let i=expectObjectRecord(e,describe(n,`to return an object`));if(!isDynamicSentinel(i))throw Error(describe(n,`to be created by defineDynamic()`));return expectObjectRecord(i.events,describe(n,`to provide an events object`)),i}function describe(e,t){return`Expected the dynamic tool export "${e.exportName??`default`}" from "${e.logicalPath}" ${t}.`}export{resolveDynamicToolDefinition,resolveLoadedDynamicToolDefinition};
1
+ import{expectFunction,expectObjectRecord}from"#internal/authored-module.js";import{toErrorMessage}from"#shared/errors.js";import{isDynamicSentinel}from"#dynamic/definition.js";import{registerDefinitionSource,stampDefinitionKey}from"#internal/authored-definition/source-identity.js";import{ResolveAgentError,loadResolvedModuleExport}from"#runtime/resolve-helpers.js";async function resolveDynamicToolDefinition(e,t,r){try{return resolveLoadedDynamicToolDefinition(await loadResolvedModuleExport({definition:e,kindLabel:`dynamic-tool`,moduleMap:t,nodeId:r}),e,e.eventNames)}catch(t){throw t instanceof ResolveAgentError?t:new ResolveAgentError(`Failed to resolve dynamic tool from "${e.logicalPath}": ${toErrorMessage(t)}`,{logicalPath:e.logicalPath,sourceId:e.sourceId})}}function resolveLoadedDynamicToolDefinition(e,t,n){let r=expectDynamicToolValue(e,t);return createResolvedDynamicToolResolver(r,t,n??Object.keys(r.events))}function createResolvedDynamicToolResolver(t,n,r){let a={};for(let i of r)a[i]=expectFunction(t.events[i],describe(n,`to provide a handler for event "${i}"`));let o=`dynamic-tool-source:${n.sourceId}`;return stampDefinitionKey(t,o),registerDefinitionSource(o,{kind:`tool`,logicalPath:n.logicalPath,name:n.slug}),{eventNames:[...r],events:a,exportName:n.exportName,extensionNamespace:n.extensionNamespace,logicalPath:n.logicalPath,slug:n.slug,sourceId:n.sourceId,sourceKind:`module`}}function expectDynamicToolValue(e,n){let i=expectObjectRecord(e,describe(n,`to return an object`));if(!isDynamicSentinel(i))throw Error(describe(n,`to be created by defineDynamic()`));return expectObjectRecord(i.events,describe(n,`to provide an events object`)),i}function describe(e,t){return`Expected the dynamic tool export "${e.exportName??`default`}" from "${e.logicalPath}" ${t}.`}export{resolveDynamicToolDefinition,resolveLoadedDynamicToolDefinition};
@@ -1,6 +1,7 @@
1
1
  import type { CompiledToolDefinition } from "#compiler/manifest.js";
2
2
  import type { CompiledModuleMap } from "#compiler/module-map.js";
3
3
  import type { ResolvedToolDefinition } from "#runtime/types.js";
4
+ import type { AgentSourceOwner } from "#compiler/source-graph.js";
4
5
  /**
5
6
  * Resolves one compiled authored tool into a runtime-owned definition
6
7
  * with live callbacks reattached from the authored module.
@@ -10,4 +11,4 @@ import type { ResolvedToolDefinition } from "#runtime/types.js";
10
11
  * otherwise rehydrated into live validators. Optional hooks are reattached
11
12
  * from the live module export.
12
13
  */
13
- export declare function resolveToolDefinition(definition: CompiledToolDefinition, moduleMap: CompiledModuleMap, nodeId: string | undefined): Promise<ResolvedToolDefinition>;
14
+ export declare function resolveToolDefinition(definition: CompiledToolDefinition, moduleMap: CompiledModuleMap, nodeId: string | undefined, owner: AgentSourceOwner): Promise<ResolvedToolDefinition>;
@@ -1 +1 @@
1
- import{expectFunction,expectObjectRecord}from"#internal/authored-module.js";import{toErrorMessage}from"#shared/errors.js";import{isToolSchema,toInputSchema,toOutputSchema}from"#shared/tool-schema.js";import{normalizeApproval}from"#internal/authored-definition/approval.js";import{ResolveAgentError,loadResolvedModuleExport}from"#runtime/resolve-helpers.js";import{registerDefinitionSource,stampDefinitionKey}from"#public/tool-result-narrowing.js";async function resolveToolDefinition(i,o,s){try{let n=expectObjectRecord(await loadResolvedModuleExport({definition:i,kindLabel:`tool`,moduleMap:o,nodeId:s}),describe(i,`to return an object`)),a={kind:`tool`,logicalPath:i.logicalPath,name:i.name},c=`tool-source:${i.sourceId}`;stampDefinitionKey(n,c),registerDefinitionSource(c,a),registerDefinitionSource(`tool:${n.description}`,a);let l=expectFunction(n.execute,describe(i,`to provide an execute function`)),u=isToolSchema(n.inputSchema)?n.inputSchema:toInputSchema(i.inputSchema),d=isToolSchema(n.outputSchema)?n.outputSchema:toOutputSchema(i.outputSchema);return{description:i.description,execute:l,execution:i.execution,exportName:i.exportName,inputSchema:u,logicalPath:i.logicalPath,name:i.name,outputSchema:d,sourceId:i.sourceId,sourceKind:`module`,...extractOptionalHooks(n,i)}}catch(e){throw e instanceof ResolveAgentError?e:new ResolveAgentError(`Failed to attach the tool execute function from "${i.logicalPath}": ${toErrorMessage(e)}`,{logicalPath:i.logicalPath,sourceId:i.sourceId})}}function extractOptionalHooks(t,n){let r={};return t.approval!==void 0&&(r.approval=normalizeApproval(t.approval,describe(n,`to provide a valid approval definition`))),t.toModelOutput!==void 0&&(r.toModelOutput=expectFunction(t.toModelOutput,describe(n,`to provide a toModelOutput function`))),r}function describe(e,t){return`Expected the tool export "${e.exportName??`default`}" from "${e.logicalPath}" ${t}.`}export{resolveToolDefinition};
1
+ import{expectFunction,expectObjectRecord}from"#internal/authored-module.js";import{toErrorMessage}from"#shared/errors.js";import{isToolSchema,toInputSchema,toOutputSchema}from"#tools/schema.js";import{registerDefinitionSource,stampDefinitionKey}from"#internal/authored-definition/source-identity.js";import{normalizeApproval}from"#internal/authored-definition/approval.js";import{ResolveAgentError,loadResolvedModuleExport}from"#runtime/resolve-helpers.js";async function resolveToolDefinition(i,o,s,c){if(!i.hasExecute)return{description:i.description,inputSchema:toInputSchema(i.inputSchema),logicalPath:i.logicalPath,name:i.name,outputSchema:toOutputSchema(i.outputSchema),owner:c,sourceId:i.sourceId,sourceKind:`module`};try{let n=expectObjectRecord(await loadResolvedModuleExport({definition:i,kindLabel:`tool`,moduleMap:o,nodeId:s}),describe(i,`to return an object`)),a={kind:`tool`,logicalPath:i.logicalPath,name:i.name,owner:c},l=`tool-source:${i.sourceId}`;stampDefinitionKey(n,l),registerDefinitionSource(l,a),registerDefinitionSource(`tool:${n.description}`,a);let u=expectFunction(n.execute,describe(i,`to provide an execute function`)),d=isToolSchema(n.inputSchema)?n.inputSchema:toInputSchema(i.inputSchema),f=isToolSchema(n.outputSchema)?n.outputSchema:toOutputSchema(i.outputSchema);return{description:i.description,execute:u,execution:i.execution,exportName:i.exportName,inputSchema:d,logicalPath:i.logicalPath,name:i.name,owner:c,outputSchema:f,sourceId:i.sourceId,sourceKind:`module`,...extractOptionalHooks(n,i)}}catch(e){throw e instanceof ResolveAgentError?e:new ResolveAgentError(`Failed to attach the tool execute function from "${i.logicalPath}": ${toErrorMessage(e)}`,{logicalPath:i.logicalPath,sourceId:i.sourceId})}}function extractOptionalHooks(t,n){let r={};return t.approval!==void 0&&(r.approval=normalizeApproval(t.approval,describe(n,`to provide a valid approval definition`))),t.toModelOutput!==void 0&&(r.toModelOutput=expectFunction(t.toModelOutput,describe(n,`to provide a toModelOutput function`))),r}function describe(e,t){return`Expected the tool export "${e.exportName??`default`}" from "${e.logicalPath}" ${t}.`}export{resolveToolDefinition};
@@ -1 +1 @@
1
- import{createHash}from"node:crypto";import{realpath}from"node:fs/promises";import{resolveInstalledPackageInfo}from"#internal/application/package.js";import{resolveVercelProjectIdFromEnvironment}from"#shared/vercel-project.js";import{getRuntimeCompiledArtifactsCacheKey,getRuntimeCompiledArtifactsSandboxAppRoot}from"#runtime/compiled-artifacts-source.js";import{loadCompileMetadata}from"#runtime/loaders/compile-metadata.js";async function createRuntimeSandboxKeys(e){let t=await deriveRuntimeSandboxKeyParts(e);return{sessionKey:buildRuntimeSandboxSessionKey(e,t),templateKey:buildRuntimeSandboxTemplateKey(e,t)}}async function createRuntimeSandboxTemplateKey(e){return buildRuntimeSandboxTemplateKey(e,await deriveRuntimeSandboxKeyParts(e))}async function deriveRuntimeSandboxKeyParts(e){let t=await loadCompileMetadataForKeys(e.compiledArtifactsSource);return{metadata:t,scope:await resolveRuntimeSandboxScope(e),versionHash:e.templatePlan.kind===`none`?null:resolveRuntimeSandboxVersionHash({compiledArtifactsSource:e.compiledArtifactsSource,metadata:t,nodeId:e.nodeId,sourceId:e.sourceId,templatePlan:e.templatePlan})}}function buildRuntimeSandboxTemplateKey(e,t){if(t.versionHash===null)return null;let n=createStableHash(`${resolvePackageVersionForTemplateKey(t.metadata)}:7:${t.versionHash}`).slice(0,20);return sanitizeRuntimeSandboxKey(`eve-sbx-tpl-${e.backendName}-${t.scope}-${n}`)}function buildRuntimeSandboxSessionKey(e,t){let n=createStableHash(`7:${t.versionHash??`none`}`).slice(0,12),r=sanitizeRuntimeSandboxKey(e.nodeId);return sanitizeRuntimeSandboxKey(`eve-sbx-ses-${e.backendName}-${t.scope}-${n}-${e.sessionId}-${r}`)}function resolvePackageVersionForTemplateKey(e){return e?.generator.version??resolveInstalledPackageInfo().version}async function loadCompileMetadataForKeys(e){try{return await loadCompileMetadata({compiledArtifactsSource:e})}catch{return null}}async function resolveRuntimeSandboxScope(e){if(e.backendName===`vercel`){let e=resolveVercelProjectIdFromEnvironment();if(e!==void 0)return createStableHash(`vercel-project:${e}`).slice(0,16)}let n=getRuntimeCompiledArtifactsSandboxAppRoot(e.compiledArtifactsSource);return n===void 0?createStableHash(getRuntimeCompiledArtifactsCacheKey(e.compiledArtifactsSource)).slice(0,16):createStableHash(await realpath(n)).slice(0,16)}function resolveRuntimeSandboxVersionHash(e){let t=e.templatePlan.contentHash??resolveSourceGraphHash(e.metadata,e.compiledArtifactsSource);return e.templatePlan.kind===`bootstrap`?createStableHash(`bootstrap:${e.templatePlan.revalidationKey??``}:${e.templatePlan.sourceHash}:${t}:${e.nodeId}:${e.sourceId}`):createStableHash(`workspace-content:${t}:${e.nodeId}:${e.sourceId}`)}function resolveSourceGraphHash(e,t){return e?.discovery.sourceGraphHash??getRuntimeCompiledArtifactsCacheKey(t)}function createStableHash(t){return createHash(`sha256`).update(t).digest(`hex`)}function sanitizeRuntimeSandboxKey(e){return e.replaceAll(/[^a-zA-Z0-9._-]+/g,`-`).slice(0,120)}export{createRuntimeSandboxKeys,createRuntimeSandboxTemplateKey};
1
+ import{createHash}from"node:crypto";import{realpath}from"node:fs/promises";import{resolveVercelProjectIdFromEnvironment}from"#shared/vercel-project.js";import{resolveInstalledPackageInfo}from"#internal/application/package.js";import{getRuntimeCompiledArtifactsCacheKey,getRuntimeCompiledArtifactsSandboxAppRoot}from"#runtime/compiled-artifacts-source.js";import{loadCompileMetadata}from"#runtime/loaders/compile-metadata.js";async function createRuntimeSandboxKeys(e){let t=await deriveRuntimeSandboxKeyParts(e);return{sessionKey:buildRuntimeSandboxSessionKey(e,t),templateKey:buildRuntimeSandboxTemplateKey(e,t)}}async function createRuntimeSandboxTemplateKey(e){return buildRuntimeSandboxTemplateKey(e,await deriveRuntimeSandboxKeyParts(e))}async function deriveRuntimeSandboxKeyParts(e){let t=await loadCompileMetadataForKeys(e.compiledArtifactsSource);return{metadata:t,scope:await resolveRuntimeSandboxScope(e),versionHash:e.templatePlan.kind===`none`?null:resolveRuntimeSandboxVersionHash({compiledArtifactsSource:e.compiledArtifactsSource,metadata:t,nodeId:e.nodeId,sourceId:e.sourceId,templatePlan:e.templatePlan})}}function buildRuntimeSandboxTemplateKey(e,t){if(t.versionHash===null)return null;let n=createStableHash(`${resolvePackageVersionForTemplateKey(t.metadata)}:7:${t.versionHash}`).slice(0,20);return sanitizeRuntimeSandboxKey(`eve-sbx-tpl-${e.backendName}-${t.scope}-${n}`)}function buildRuntimeSandboxSessionKey(e,t){let n=createStableHash(`7:${t.versionHash??`none`}`).slice(0,12),r=sanitizeRuntimeSandboxKey(e.nodeId);return sanitizeRuntimeSandboxKey(`eve-sbx-ses-${e.backendName}-${t.scope}-${n}-${e.sessionId}-${r}`)}function resolvePackageVersionForTemplateKey(e){return e?.generator.version??resolveInstalledPackageInfo().version}async function loadCompileMetadataForKeys(e){try{return await loadCompileMetadata({compiledArtifactsSource:e})}catch{return null}}async function resolveRuntimeSandboxScope(e){if(e.backendName===`vercel`){let e=resolveVercelProjectIdFromEnvironment();if(e!==void 0)return createStableHash(`vercel-project:${e}`).slice(0,16)}let r=getRuntimeCompiledArtifactsSandboxAppRoot(e.compiledArtifactsSource);return r===void 0?createStableHash(getRuntimeCompiledArtifactsCacheKey(e.compiledArtifactsSource)).slice(0,16):createStableHash(await realpath(r)).slice(0,16)}function resolveRuntimeSandboxVersionHash(e){let t=e.templatePlan.contentHash??resolveSourceGraphHash(e.metadata,e.compiledArtifactsSource);return e.templatePlan.kind===`bootstrap`?createStableHash(`bootstrap:${e.templatePlan.revalidationKey??``}:${e.templatePlan.sourceHash}:${t}:${e.nodeId}:${e.sourceId}`):createStableHash(`workspace-content:${t}:${e.nodeId}:${e.sourceId}`)}function resolveSourceGraphHash(e,t){return e?.discovery.sourceGraphHash??getRuntimeCompiledArtifactsCacheKey(t)}function createStableHash(t){return createHash(`sha256`).update(t).digest(`hex`)}function sanitizeRuntimeSandboxKey(e){return e.replaceAll(/[^a-zA-Z0-9._-]+/g,`-`).slice(0,120)}export{createRuntimeSandboxKeys,createRuntimeSandboxTemplateKey};
@@ -7,7 +7,6 @@ import type { ResolvedSandboxDefinition } from "#runtime/types.js";
7
7
  * to distinguish the shared framework sandbox from per-node authored
8
8
  * overrides.
9
9
  */
10
- export declare const DEFAULT_SANDBOX_SOURCE_ID = "eve:default-sandbox";
11
10
  /**
12
11
  * Resolved sandbox tracked by the runtime-owned registry.
13
12
  *
@@ -36,32 +35,17 @@ export interface RuntimeRegisteredSandbox {
36
35
  * startup path.
37
36
  *
38
37
  * Every agent owns exactly one sandbox, so the registry is just a
39
- * single record. When the author provides a `sandbox.<ext>` (or
40
- * `sandbox/sandbox.<ext>`) override, that authored definition replaces
41
- * the framework default. Production always populates it; tests that
38
+ * single record populated from the selected compiled sandbox source.
39
+ * Production always populates it; tests that
42
40
  * need a `null` sandbox cast through `as RuntimeSandboxRegistry`.
43
41
  */
44
42
  export interface RuntimeSandboxRegistry {
45
43
  readonly sandbox: RuntimeRegisteredSandbox;
46
44
  }
47
45
  /**
48
- * Builds the runtime-owned registry for one resolved authored agent's
49
- * sandbox, preferring the authored override and falling back to the
50
- * framework default.
46
+ * Builds the runtime-owned registry for one selected compiled sandbox.
51
47
  */
52
48
  export declare function createRuntimeSandboxRegistry(input: {
53
- readonly authoredSandbox: ResolvedSandboxDefinition | null;
49
+ readonly sandbox: ResolvedSandboxDefinition;
54
50
  readonly workspaceResourceRoot: CompiledWorkspaceResourceRoot;
55
51
  }): RuntimeSandboxRegistry;
56
- /**
57
- * Builds the framework default sandbox definition used when no agent
58
- * authored override is present.
59
- *
60
- * The `backend` is resolved through {@link defaultSandbox} on each
61
- * call so the framework default picks up the same environment-aware
62
- * fallback as authored sandboxes that omit `backend` (`vercel()`
63
- * on hosted Vercel, then Docker, microsandbox, or just-bash by availability). Implemented as
64
- * a factory rather than a constant so the environment is read at
65
- * graph-resolution time rather than at module-load time.
66
- */
67
- export declare function createFrameworkSandboxDefinition(): ResolvedSandboxDefinition;
@@ -1 +1 @@
1
- import{defaultSandbox}from"#public/sandbox/backends/default.js";const DEFAULT_SANDBOX_SOURCE_ID=`eve:default-sandbox`;function createRuntimeSandboxRegistry(e){let t=e.authoredSandbox??createFrameworkSandboxDefinition();if(t.inheritsParent===!0&&(e.workspaceResourceRoot.contentHash!==void 0||e.workspaceResourceRoot.rootEntries.length>0))throw Error(`Sandbox "${t.logicalPath}" selects parent.sandbox but has managed workspace resources. Remove the child workspace or give the child its own sandbox.`);return{sandbox:{definition:t,workspaceResourceRoot:e.workspaceResourceRoot}}}function createFrameworkSandboxDefinition(){return{backend:defaultSandbox(),logicalPath:`eve:framework/default-sandbox`,sourceId:DEFAULT_SANDBOX_SOURCE_ID,sourceKind:`module`}}export{DEFAULT_SANDBOX_SOURCE_ID,createFrameworkSandboxDefinition,createRuntimeSandboxRegistry};
1
+ function createRuntimeSandboxRegistry(e){let t=e.sandbox;if(t.inheritsParent===!0&&(e.workspaceResourceRoot.contentHash!==void 0||e.workspaceResourceRoot.rootEntries.length>0))throw Error(`Sandbox "${t.logicalPath}" selects parent.sandbox but has managed workspace resources. Remove the child workspace or give the child its own sandbox.`);return{sandbox:{definition:t,workspaceResourceRoot:e.workspaceResourceRoot}}}export{createRuntimeSandboxRegistry};
@@ -1 +1 @@
1
- import{resolvePackageSourceFilePath}from"#internal/application/package.js";import{pathToFileURL}from"node:url";import{getRuntimeCompiledArtifactsCacheKey}from"#runtime/compiled-artifacts-source.js";import{getResolvedRuntimeAgentNode}from"#runtime/graph.js";import{loadCompiledManifest}from"#runtime/loaders/manifest.js";import{resolveRuntimeAgentGraph}from"#runtime/resolve-agent-graph.js";import{resolveRuntimeCompiledArtifactsVersionedCacheKey}from"#runtime/cache-key.js";import{loadCompiledModuleMap}from"#runtime/loaders/module-map.js";import{getActiveRuntimeSession}from"#runtime/sessions/runtime-session.js";import{createRuntimeAdapterRegistry}from"#runtime/channels/registry.js";const isCacheDisabled=process.env.EVE_DISABLE_AGENT_CACHE===`1`;function isDevelopmentRuntimeSnapshotRoot(e){return e.replaceAll(`\\`,`/`).includes(`/.eve/dev-runtime/snapshots/`)}function normalizeCompiledArtifactsSource(t){return t.kind!==`disk`||t.moduleMapLoaderPath!==void 0||!isDevelopmentRuntimeSnapshotRoot(t.appRoot)?t:{...t,moduleMapLoaderPath:resolvePackageSourceFilePath(`src/internal/authored-module-map-loader.ts`)}}async function loadFullBundle(e){let t=normalizeCompiledArtifactsSource(e),[n,r]=await Promise.all([loadCompiledManifest({compiledArtifactsSource:t}),loadRuntimeCompiledModuleMap(t)]),o=await resolveRuntimeAgentGraph({manifest:n,moduleMap:r}),s=o.root;return{adapterRegistry:createRuntimeAdapterRegistry({channels:collectResolvedChannels(o)}),compiledArtifactsSource:t,graph:o,hookRegistry:s.hookRegistry,moduleMap:r,resolvedAgent:s.agent,subagentRegistry:s.subagentRegistry,toolRegistry:s.toolRegistry,turnAgent:s.turnAgent}}async function loadRuntimeCompiledModuleMap(e){return e.kind===`disk`&&e.moduleMapLoaderPath!==void 0?await loadAuthoredSourceCompiledModuleMap(e):await loadCompiledModuleMap({compiledArtifactsSource:e})}async function loadAuthoredSourceCompiledModuleMap(e){if(e.moduleMapLoaderPath===void 0)throw Error(`Authored-source module map loading requires "moduleMapLoaderPath" in the compiled artifacts source.`);return await(await import(pathToFileURL(e.moduleMapLoaderPath).href)).loadCompiledModuleMapFromAuthoredSource({compiledArtifactsSource:e})}async function getOrLoadFullBundle(e){let t=normalizeCompiledArtifactsSource(e);if(isCacheDisabled)return loadFullBundle(t);let r=getActiveRuntimeSession(),i=getRuntimeCompiledArtifactsCacheKey(t),a=await resolveRuntimeCompiledArtifactsVersionedCacheKey(t),s=r.bundleCacheKeyBySourceKey.get(i);s!==void 0&&s!==a&&r.bundleCache.delete(s),r.bundleCacheKeyBySourceKey.set(i,a);let c=r.bundleCache.get(a);if(c!==void 0)return c;let l=loadFullBundle(t).catch(e=>{throw r.bundleCache.delete(a),r.bundleCacheKeyBySourceKey.get(i)===a&&r.bundleCacheKeyBySourceKey.delete(i),e});return r.bundleCache.set(a,l),l}async function getCompiledRuntimeAgentBundle(e){let t=await getOrLoadFullBundle(e.compiledArtifactsSource);if(e.nodeId===void 0)return t;let n=getResolvedRuntimeAgentNode(t.graph,e.nodeId);return{adapterRegistry:t.adapterRegistry,compiledArtifactsSource:t.compiledArtifactsSource,graph:{nodesByNodeId:t.graph.nodesByNodeId,root:n},hookRegistry:n.hookRegistry,moduleMap:t.moduleMap,nodeId:e.nodeId,resolvedAgent:n.agent,subagentRegistry:n.subagentRegistry,toolRegistry:n.toolRegistry,turnAgent:n.turnAgent}}function clearCompiledRuntimeAgentBundleCache(){let e=getActiveRuntimeSession();e.bundleCache.clear(),e.bundleCacheKeyBySourceKey.clear()}function collectResolvedChannels(e){let t=new Map;for(let n of e.nodesByNodeId.values())for(let e of n.channels)t.set(`${e.sourceId}:${e.name}`,e);return[...t.values()]}export{clearCompiledRuntimeAgentBundleCache,getCompiledRuntimeAgentBundle};
1
+ import{resolvePackageSourceFilePath}from"#internal/application/package.js";import{pathToFileURL}from"node:url";import{getRuntimeCompiledArtifactsCacheKey}from"#runtime/compiled-artifacts-source.js";import{getResolvedRuntimeAgentNode}from"#runtime/graph.js";import{loadCompiledManifest}from"#runtime/loaders/manifest.js";import{resolveRuntimeAgentGraph}from"#runtime/resolve-agent-graph.js";import{resolveRuntimeCompiledArtifactsVersionedCacheKey}from"#runtime/cache-key.js";import{getActiveRuntimeSession}from"#runtime/sessions/runtime-session.js";import{createRuntimeAdapterRegistry}from"#runtime/channels/registry.js";import{loadCompiledModuleMap}from"#runtime/loaders/module-map.js";const isCacheDisabled=process.env.EVE_DISABLE_AGENT_CACHE===`1`;function isDevelopmentRuntimeSnapshotRoot(e){return e.replaceAll(`\\`,`/`).includes(`/.eve/dev-runtime/snapshots/`)}function normalizeCompiledArtifactsSource(t){return t.kind!==`disk`||t.moduleMapLoaderPath!==void 0||!isDevelopmentRuntimeSnapshotRoot(t.appRoot)?t:{...t,moduleMapLoaderPath:resolvePackageSourceFilePath(`src/internal/authored-module-map-loader.ts`)}}async function loadFullBundle(e){let t=normalizeCompiledArtifactsSource(e),[n,r]=await Promise.all([loadCompiledManifest({compiledArtifactsSource:t}),loadRuntimeCompiledModuleMap(t)]),o=await resolveRuntimeAgentGraph({manifest:n,moduleMap:r}),s=o.root;return{adapterRegistry:createRuntimeAdapterRegistry({channels:collectResolvedChannels(o)}),compiledArtifactsSource:t,graph:o,hookRegistry:s.hookRegistry,moduleMap:r,resolvedAgent:s.agent,subagentRegistry:s.subagentRegistry,toolRegistry:s.toolRegistry,turnAgent:s.turnAgent}}async function loadRuntimeCompiledModuleMap(e){return e.kind===`disk`&&e.moduleMapLoaderPath!==void 0?await loadAuthoredSourceCompiledModuleMap(e):await loadCompiledModuleMap({compiledArtifactsSource:e})}async function loadAuthoredSourceCompiledModuleMap(e){if(e.moduleMapLoaderPath===void 0)throw Error(`Authored-source module map loading requires "moduleMapLoaderPath" in the compiled artifacts source.`);return await(await import(pathToFileURL(e.moduleMapLoaderPath).href)).loadCompiledModuleMapFromAuthoredSource({compiledArtifactsSource:e})}async function getOrLoadFullBundle(e){let t=normalizeCompiledArtifactsSource(e);if(isCacheDisabled)return loadFullBundle(t);let r=getActiveRuntimeSession(),i=getRuntimeCompiledArtifactsCacheKey(t),a=await resolveRuntimeCompiledArtifactsVersionedCacheKey(t),c=r.bundleCacheKeyBySourceKey.get(i);c!==void 0&&c!==a&&r.bundleCache.delete(c),r.bundleCacheKeyBySourceKey.set(i,a);let l=r.bundleCache.get(a);if(l!==void 0)return l;let u=loadFullBundle(t).catch(e=>{throw r.bundleCache.delete(a),r.bundleCacheKeyBySourceKey.get(i)===a&&r.bundleCacheKeyBySourceKey.delete(i),e});return r.bundleCache.set(a,u),u}async function getCompiledRuntimeAgentBundle(e){let t=await getOrLoadFullBundle(e.compiledArtifactsSource);if(e.nodeId===void 0)return t;let n=getResolvedRuntimeAgentNode(t.graph,e.nodeId);return{adapterRegistry:t.adapterRegistry,compiledArtifactsSource:t.compiledArtifactsSource,graph:{nodesByNodeId:t.graph.nodesByNodeId,root:n},hookRegistry:n.hookRegistry,moduleMap:t.moduleMap,nodeId:e.nodeId,resolvedAgent:n.agent,subagentRegistry:n.subagentRegistry,toolRegistry:n.toolRegistry,turnAgent:n.turnAgent}}function clearCompiledRuntimeAgentBundleCache(){let e=getActiveRuntimeSession();e.bundleCache.clear(),e.bundleCacheKeyBySourceKey.clear()}function collectResolvedChannels(e){let t=new Map;for(let n of e.nodesByNodeId.values())for(let e of n.channels)t.set(`${e.sourceId}:${e.name}`,e);return[...t.values()]}export{clearCompiledRuntimeAgentBundleCache,getCompiledRuntimeAgentBundle};
@@ -1 +1 @@
1
- import{getAdapterKind}from"#channel/adapter.js";import{ContextKey}from"#context/key.js";import{buildChannelInstrumentationProjection}from"#channel/instrumentation.js";import{getCompiledRuntimeAgentBundle}from"#runtime/sessions/compiled-agent-cache.js";import{resolveDurableCompiledArtifactsSource,serializeDurableCompiledArtifactsSource}from"#runtime/durable-compiled-artifacts-source.js";import{deserializeRuntimeAdapter}from"#runtime/channels/registry.js";const ChannelKey=new ContextKey(`eve.channel`,{codec:{serialize(t){let r=buildChannelInstrumentationProjection({adapter:t});return{kind:getAdapterKind(t),state:t.state?{...t.state}:{},audience:r.metadata.audience}},deserialize(e,t){let n=t.get(BundleKey);if(n===void 0)throw Error(`Cannot deserialize "eve.channel" before "eve.bundle". The runtime bundle must be present in context.`);return deserializeRuntimeAdapter(n.adapterRegistry,e)}}}),BundleKey=new ContextKey(`eve.bundle`,{codec:{serialize:e=>({nodeId:e.nodeId,source:serializeDurableCompiledArtifactsSource(e.compiledArtifactsSource)}),deserialize:e=>{let{source:t,nodeId:n}=e;return getCompiledRuntimeAgentBundle({compiledArtifactsSource:resolveDurableCompiledArtifactsSource(t),nodeId:n})}}});export{BundleKey,ChannelKey};
1
+ import{getAdapterKind}from"#channel/adapter.js";import{ContextKey}from"#context/key.js";import{CHANNEL_CONTEXT_KEY_NAME}from"#context/key-names.js";import{buildChannelInstrumentationProjection}from"#channel/instrumentation.js";import{getCompiledRuntimeAgentBundle}from"#runtime/sessions/compiled-agent-cache.js";import{resolveDurableCompiledArtifactsSource,serializeDurableCompiledArtifactsSource}from"#runtime/durable-compiled-artifacts-source.js";import{deserializeRuntimeAdapter}from"#runtime/channels/registry.js";const ChannelKey=new ContextKey(CHANNEL_CONTEXT_KEY_NAME,{codec:{serialize(t){let n=buildChannelInstrumentationProjection({adapter:t});return{kind:getAdapterKind(t),state:t.state?{...t.state}:{},audience:n.metadata.audience}},deserialize(e,t){let n=t.get(BundleKey);if(n===void 0)throw Error(`Cannot deserialize "eve.channel" before "eve.bundle". The runtime bundle must be present in context.`);return deserializeRuntimeAdapter(n.adapterRegistry,e)}}}),BundleKey=new ContextKey(`eve.bundle`,{codec:{serialize:e=>({nodeId:e.nodeId,source:serializeDurableCompiledArtifactsSource(e.compiledArtifactsSource)}),deserialize:e=>{let{source:t,nodeId:n}=e;return getCompiledRuntimeAgentBundle({compiledArtifactsSource:resolveDurableCompiledArtifactsSource(t),nodeId:n})}}});export{BundleKey,ChannelKey};
@@ -1,12 +1,14 @@
1
1
  import type { Node } from "#shared/node.js";
2
2
  import type { SourceRef } from "#shared/source-ref.js";
3
- import type { InternalToolDefinition } from "#shared/tool-definition.js";
3
+ import type { InternalToolDefinition } from "#tools/definition.js";
4
+ import type { AgentSourceOwner } from "#compiler/source-graph.js";
4
5
  /**
5
6
  * Serializable authored tool descriptor prepared by the runtime for one
6
7
  * harness turn.
7
8
  */
8
9
  export type PreparedRuntimeAuthoredTool = Readonly<InternalToolDefinition & SourceRef & {
9
10
  kind: "authored-tool";
11
+ owner: AgentSourceOwner;
10
12
  }>;
11
13
  type PreparedRuntimeDelegationToolBase<TKind extends "remote" | "subagent"> = Readonly<InternalToolDefinition & SourceRef & Node & {
12
14
  kind: TKind;
@@ -1,5 +1,5 @@
1
1
  import type { SandboxAccess } from "#sandbox/state.js";
2
- import type { SkillHandle } from "#execution/skills/types.js";
2
+ import type { SkillHandle } from "#shared/skill-types.js";
3
3
  /**
4
4
  * Validates a skill id before it is used as one path segment under
5
5
  * the sandbox skill root.
@@ -1 +1 @@
1
- import{serializeOutputSchema}from"#shared/tool-schema.js";import{normalizeAgentDefinition}from"#internal/authored-definition/core.js";import{isDynamicModelDefinition}from"#shared/agent-definition.js";import{resolveRuntimeModelSelection}from"#runtime/agent/resolve-model.js";async function normalizeDynamicSubagentAgentConfig(t){let n=`Dynamic subagent "${t.name}" must return defineAgent(...), defineRemoteAgent(...), or null.`,r=normalizeAgentDefinition(t.value,n);if(!r.description)throw Error(`${n} The "description" field is required.`);if(r.build!==void 0)throw Error(`${n} The "build" field cannot be selected at runtime.`);if(r.experimental!==void 0)throw Error(`${n} The "experimental" field cannot be selected at runtime.`);if(isDynamicModelDefinition(r.model))throw Error(`${n} The returned "model" must be static.`);let i={description:r.description,model:await normalizeDurableModelSelection({catalog:t.catalog,selection:{model:r.model,modelContextWindowTokens:r.modelContextWindowTokens,modelOptions:r.modelOptions},state:t.state})};if(r.compaction!==void 0){let e={};r.compaction.model!==void 0&&(e.model=await normalizeDurableModelSelection({catalog:t.catalog,selection:{model:r.compaction.model,modelContextWindowTokens:r.compaction.modelContextWindowTokens,modelOptions:r.modelOptions},state:t.state})),r.compaction.thresholdPercent!==void 0&&(e.thresholdPercent=r.compaction.thresholdPercent),i.compaction=e}return r.limits!==void 0&&(i.limits=r.limits),r.outputSchema!==void 0&&(i.outputSchema=serializeOutputSchema(r.outputSchema)),r.reasoning!==void 0&&(i.reasoning=r.reasoning),i}async function normalizeDurableModelSelection(e){return(await resolveRuntimeModelSelection({catalog:e.catalog,durability:`durable`,selection:e.selection,state:e.state})).reference}export{normalizeDynamicSubagentAgentConfig};
1
+ import{serializeOutputSchema}from"#tools/schema.js";import{normalizeAgentDefinition}from"#internal/authored-definition/core.js";import{isDynamicModelDefinition}from"#shared/agent-definition.js";import{resolveRuntimeModelSelection}from"#runtime/agent/resolve-model.js";async function normalizeDynamicSubagentAgentConfig(t){let n=`Dynamic subagent "${t.name}" must return defineAgent(...), defineRemoteAgent(...), or null.`,r=normalizeAgentDefinition(t.value,n);if(!r.description)throw Error(`${n} The "description" field is required.`);if(r.build!==void 0)throw Error(`${n} The "build" field cannot be selected at runtime.`);if(r.experimental!==void 0)throw Error(`${n} The "experimental" field cannot be selected at runtime.`);if(isDynamicModelDefinition(r.model))throw Error(`${n} The returned "model" must be static.`);let i={description:r.description,model:await normalizeDurableModelSelection({catalog:t.catalog,selection:{model:r.model,modelContextWindowTokens:r.modelContextWindowTokens,modelOptions:r.modelOptions},state:t.state})};if(r.compaction!==void 0){let e={};r.compaction.model!==void 0&&(e.model=await normalizeDurableModelSelection({catalog:t.catalog,selection:{model:r.compaction.model,modelContextWindowTokens:r.compaction.modelContextWindowTokens,modelOptions:r.modelOptions},state:t.state})),r.compaction.thresholdPercent!==void 0&&(e.thresholdPercent=r.compaction.thresholdPercent),i.compaction=e}return r.limits!==void 0&&(i.limits=r.limits),r.outputSchema!==void 0&&(i.outputSchema=serializeOutputSchema(r.outputSchema)),r.reasoning!==void 0&&(i.reasoning=r.reasoning),i}async function normalizeDurableModelSelection(e){return(await resolveRuntimeModelSelection({catalog:e.catalog,durability:`durable`,selection:e.selection,state:e.state})).reference}export{normalizeDynamicSubagentAgentConfig};
@@ -1 +1 @@
1
- import{expectBoolean,expectFunction,expectObjectRecord,expectOnlyKnownKeys,expectString,getOptionalStringRecordProperty}from"#internal/authored-module.js";import{EVE_SESSION_ROUTE_PATH}from"#protocol/routes.js";import{serializeOutputSchema}from"#shared/tool-schema.js";async function normalizeDynamicRemoteAgentConfig(t){let i=`Dynamic subagent "${t.name}" must return defineAgent(...), defineRemoteAgent(...), or null.`,a=expectObjectRecord(t.value,i);if(expectOnlyKnownKeys(a,[`auth`,`description`,`forwardPrincipal`,`headers`,`kind`,`outputSchema`,`path`,`url`],i),a.kind!==`remote`)throw Error(i);let o=await resolveUrl(a.url,i),s=readCredentialsStepId(a);if(validateCredentials(a,i),(a.auth!==void 0||a.headers!==void 0)&&s===void 0)throw Error(`${i} Dynamic remote auth and headers must be compiled by eve so credentials stay out of durable workflow state.`);let c={description:expectString(a.description,i),path:a.path===void 0?EVE_SESSION_ROUTE_PATH:expectString(a.path,i),url:o};return s!==void 0&&(c.credentialsStepId=s),a.forwardPrincipal!==void 0&&(c.forwardPrincipal=expectBoolean(a.forwardPrincipal,i)),a.outputSchema!==void 0&&(c.outputSchema=serializeOutputSchema(a.outputSchema)),c}async function resolveUrl(e,n){let r=typeof e==`function`?await expectFunction(e,n)():expectString(e,n);if(r.length===0)throw Error(`${n} The "url" field must resolve to a non-empty string.`);return r}function validateCredentials(e,n){e.auth!==void 0&&expectFunction(e.auth,n),e.headers!==void 0&&typeof e.headers!=`function`&&getOptionalStringRecordProperty(e,`headers`,n)}function readCredentialsStepId(e){let t=e.__eveResolveRemoteAgentCredentials;if(typeof t!=`function`)return;let n=t.stepId;return typeof n==`string`?n:void 0}export{normalizeDynamicRemoteAgentConfig};
1
+ import{expectBoolean,expectFunction,expectObjectRecord,expectOnlyKnownKeys,expectString,getOptionalStringRecordProperty}from"#internal/authored-module.js";import{EVE_SESSION_ROUTE_PATH}from"#protocol/routes.js";import{serializeOutputSchema}from"#tools/schema.js";async function normalizeDynamicRemoteAgentConfig(t){let i=`Dynamic subagent "${t.name}" must return defineAgent(...), defineRemoteAgent(...), or null.`,a=expectObjectRecord(t.value,i);if(expectOnlyKnownKeys(a,[`auth`,`description`,`forwardPrincipal`,`headers`,`kind`,`outputSchema`,`path`,`url`],i),a.kind!==`remote`)throw Error(i);let o=await resolveUrl(a.url,i),s=readCredentialsStepId(a);if(validateCredentials(a,i),(a.auth!==void 0||a.headers!==void 0)&&s===void 0)throw Error(`${i} Dynamic remote auth and headers must be compiled by eve so credentials stay out of durable workflow state.`);let c={description:expectString(a.description,i),path:a.path===void 0?EVE_SESSION_ROUTE_PATH:expectString(a.path,i),url:o};return s!==void 0&&(c.credentialsStepId=s),a.forwardPrincipal!==void 0&&(c.forwardPrincipal=expectBoolean(a.forwardPrincipal,i)),a.outputSchema!==void 0&&(c.outputSchema=serializeOutputSchema(a.outputSchema)),c}async function resolveUrl(e,n){let r=typeof e==`function`?await expectFunction(e,n)():expectString(e,n);if(r.length===0)throw Error(`${n} The "url" field must resolve to a non-empty string.`);return r}function validateCredentials(e,n){e.auth!==void 0&&expectFunction(e.auth,n),e.headers!==void 0&&typeof e.headers!=`function`&&getOptionalStringRecordProperty(e,`headers`,n)}function readCredentialsStepId(e){let t=e.__eveResolveRemoteAgentCredentials;if(typeof t!=`function`)return;let n=t.stepId;return typeof n==`string`?n:void 0}export{normalizeDynamicRemoteAgentConfig};
@@ -1,4 +1,3 @@
1
- import { z } from "#compiled/zod/index.js";
2
1
  import type { PreparedRuntimeDelegationTool } from "#runtime/sessions/turn.js";
3
2
  import type { ResolvedDynamicSubagentDefinition, ResolvedRuntimeDelegationNode } from "#runtime/types.js";
4
3
  import type { JsonObject } from "#shared/json.js";
@@ -24,37 +23,11 @@ export interface RuntimeSubagentRegistry {
24
23
  readonly subagentsByName: ReadonlyMap<string, RuntimeRegisteredSubagent>;
25
24
  readonly subagentsByNodeId: ReadonlyMap<string, RuntimeRegisteredSubagent>;
26
25
  }
27
- /**
28
- * Stable input schema lowered onto every subagent tool. Subagents always
29
- * accept one free-form `message` string from the parent agent.
30
- */
31
- export declare const SUBAGENT_TOOL_INPUT_SCHEMA: z.ZodObject<{
32
- message: z.ZodString;
33
- outputSchema: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
34
- }, z.core.$strict>;
35
- /**
36
- * Extended subagent tool input schema for agents that opt into
37
- * `experimental.subagentPersistentSessions`: adds the `agentId` field the
38
- * model uses to continue a previous delegation.
39
- */
40
- export declare const PERSISTENT_SUBAGENT_TOOL_INPUT_SCHEMA: z.ZodObject<{
41
- message: z.ZodString;
42
- outputSchema: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
43
- agentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
44
- }, z.core.$strict>;
45
- /** Selects the serialized subagent tool input schema for one agent's opt-in state. */
46
- export declare function getSubagentToolInputJsonSchema(persistentSessions: boolean): JsonObject;
47
26
  /**
48
27
  * Builds the runtime-owned registry for the resolved subagents visible from one
49
28
  * runtime agent node.
50
29
  */
51
30
  export declare function createRuntimeSubagentRegistry(input: {
52
- /**
53
- * Whether the owning agent opted into
54
- * `experimental.subagentPersistentSessions`. Adds the model-visible
55
- * `agentId` continuation field to every lowered subagent tool schema.
56
- */
57
- readonly persistentSessions?: boolean;
58
31
  readonly reservedToolNames?: readonly string[];
59
32
  readonly subagents: readonly ResolvedRuntimeDelegationNode[];
60
33
  }): RuntimeSubagentRegistry;
@@ -1 +1 @@
1
- import{z}from"#compiled/zod/index.js";import{serializeInputSchema}from"#shared/tool-schema.js";import{RuntimeRegistry,RuntimeRegistryError}from"#internal/runtime-registry.js";const SUBAGENT_TOOL_INPUT_SCHEMA=z.strictObject({message:z.string().describe(`The message to send to the subagent. Provide all context the subagent needs to complete the task; the subagent does not see the parent's history.`),outputSchema:z.looseObject({}).describe(`Only provide a non-empty JSON Schema when the caller explicitly requests structured output; otherwise omit this field. The subagent must match a provided schema, and that structured output becomes the tool result.`).optional()}),PERSISTENT_SUBAGENT_TOOL_INPUT_SCHEMA=SUBAGENT_TOOL_INPUT_SCHEMA.extend({agentId:z.string().nullable().describe(`Only pass this to continue a previous delegation: the id of an agent from the <agents> list. To start a new agent — the common case — omit this field entirely (or pass null or an empty string).`).optional()}),SUBAGENT_TOOL_INPUT_JSON_SCHEMA=serializeInputSchema(SUBAGENT_TOOL_INPUT_SCHEMA),PERSISTENT_SUBAGENT_TOOL_INPUT_JSON_SCHEMA=serializeInputSchema(PERSISTENT_SUBAGENT_TOOL_INPUT_SCHEMA);function getSubagentToolInputJsonSchema(e){return e?PERSISTENT_SUBAGENT_TOOL_INPUT_JSON_SCHEMA:SUBAGENT_TOOL_INPUT_JSON_SCHEMA}function createRuntimeSubagentRegistry(e){let t=getSubagentToolInputJsonSchema(e.persistentSessions===!0),i=[],a=new Set,o=[],s=new RuntimeRegistry(`subagent`,e.reservedToolNames??[]),c=new Map;for(let n of e.subagents){let e={logicalPath:n.logicalPath,sourceId:n.sourceId};if(c.has(n.nodeId))throw new RuntimeRegistryError(`subagent`,`Found multiple runtime subagents mapped to node id "${n.nodeId}".`,{...e,entryName:n.name});let l,u=n.kind===`subagent`?n.dynamic:void 0;if(u===void 0){let r=createPreparedRuntimeSubagentTool(n,t);l={definition:n,prepared:r},s.register(n.name,l,{location:e,duplicateMessage:`Found multiple subagents named "${n.name}". Subagent names must be unique at runtime.`,reservedMessage:`Subagent "${n.name}" collides with another runtime-visible tool name.`}),i.push(r)}else a.add(n.nodeId),o.push({...u,kind:`subagent`,logicalPath:n.logicalPath,name:n.name,nodeId:n.nodeId,sourceId:n.sourceId,sourceKind:`module`}),l={definition:n};c.set(n.nodeId,l)}return{dynamicNodeIds:a,dynamicResolvers:o,preparedTools:i,subagentsByName:s.asMap(),subagentsByNodeId:c}}function createPreparedRuntimeSubagentTool(e,t=SUBAGENT_TOOL_INPUT_JSON_SCHEMA){if(e.description===void 0)throw Error(`Static subagent "${e.name}" is missing a description.`);return{description:e.description,inputSchema:t,kind:e.kind,logicalPath:e.logicalPath,name:e.name,nodeId:e.nodeId,outputSchema:e.kind===`remote`?e.outputSchema:void 0,sourceId:e.sourceId}}export{PERSISTENT_SUBAGENT_TOOL_INPUT_SCHEMA,SUBAGENT_TOOL_INPUT_SCHEMA,createPreparedRuntimeSubagentTool,createRuntimeSubagentRegistry,getSubagentToolInputJsonSchema};
1
+ import{serializeInputSchema}from"#tools/schema.js";import{SUBAGENT_TOOL_INPUT_SCHEMA}from"#tools/framework/agent-contract.js";import{RuntimeRegistry,RuntimeRegistryError}from"#internal/runtime-registry.js";const SUBAGENT_TOOL_INPUT_JSON_SCHEMA=serializeInputSchema(SUBAGENT_TOOL_INPUT_SCHEMA);function createRuntimeSubagentRegistry(e){let t=[],i=new Set,a=[],o=new RuntimeRegistry(`subagent`,e.reservedToolNames??[]),s=new Map;for(let n of e.subagents){let e={logicalPath:n.logicalPath,sourceId:n.sourceId};if(s.has(n.nodeId))throw new RuntimeRegistryError(`subagent`,`Found multiple runtime subagents mapped to node id "${n.nodeId}".`,{...e,entryName:n.name});let c,l=n.kind===`subagent`?n.dynamic:void 0;if(l===void 0){let r=createPreparedRuntimeSubagentTool(n);c={definition:n,prepared:r},o.register(n.name,c,{location:e,duplicateMessage:`Found multiple subagents named "${n.name}". Subagent names must be unique at runtime.`,reservedMessage:`Subagent "${n.name}" collides with another runtime-visible tool name.`}),t.push(r)}else i.add(n.nodeId),a.push({...l,kind:`subagent`,logicalPath:n.logicalPath,name:n.name,nodeId:n.nodeId,sourceId:n.sourceId,sourceKind:`module`}),c={definition:n};s.set(n.nodeId,c)}return{dynamicNodeIds:i,dynamicResolvers:a,preparedTools:t,subagentsByName:o.asMap(),subagentsByNodeId:s}}function createPreparedRuntimeSubagentTool(e,t=SUBAGENT_TOOL_INPUT_JSON_SCHEMA){if(e.description===void 0)throw Error(`Static subagent "${e.name}" is missing a description.`);return{description:e.description,inputSchema:t,kind:e.kind,logicalPath:e.logicalPath,name:e.name,nodeId:e.nodeId,outputSchema:e.kind===`remote`?e.outputSchema:void 0,sourceId:e.sourceId}}export{createPreparedRuntimeSubagentTool,createRuntimeSubagentRegistry};
@@ -1 +1 @@
1
- import{serializeInputSchema,serializeOutputSchema}from"#shared/tool-schema.js";import{RuntimeRegistry}from"#internal/runtime-registry.js";async function createRuntimeToolRegistry(e,t={}){let r=[],i=new RuntimeRegistry(`tool`,t.reservedToolNames??[]);for(let t of e.tools){let e=await createPreparedRuntimeTool(t);i.register(t.name,{definition:t,prepared:e},{location:{logicalPath:t.logicalPath,sourceId:t.sourceId},duplicateMessage:`Found multiple authored tools named "${t.name}". Tool names must be unique at runtime.`,reservedMessage:`Tool "${t.name}" collides with another runtime-visible tool name.`}),r.push(e)}return{preparedTools:r,toolsByName:i.asMap()}}function findRegisteredRuntimeTool(e,t){return e.toolsByName.get(t)??null}async function createPreparedRuntimeTool(n){return{description:n.description,inputSchema:serializeInputSchema(n.inputSchema),kind:`authored-tool`,logicalPath:n.logicalPath,name:n.name,outputSchema:serializeOutputSchema(n.outputSchema),sourceId:n.sourceId}}export{createRuntimeToolRegistry,findRegisteredRuntimeTool};
1
+ import{serializeInputSchema,serializeOutputSchema}from"#tools/schema.js";import{RuntimeRegistry}from"#internal/runtime-registry.js";async function createRuntimeToolRegistry(e,t={}){let r=[],i=new RuntimeRegistry(`tool`,t.reservedToolNames??[]);for(let t of e.tools){let e=await createPreparedRuntimeTool(t);i.register(t.name,{definition:t,prepared:e},{location:{logicalPath:t.logicalPath,sourceId:t.sourceId},duplicateMessage:`Found multiple authored tools named "${t.name}". Tool names must be unique at runtime.`,reservedMessage:`Tool "${t.name}" collides with another runtime-visible tool name.`}),r.push(e)}return{preparedTools:r,toolsByName:i.asMap()}}function findRegisteredRuntimeTool(e,t){return e.toolsByName.get(t)??null}async function createPreparedRuntimeTool(n){return{description:n.description,inputSchema:serializeInputSchema(n.inputSchema),kind:`authored-tool`,logicalPath:n.logicalPath,name:n.name,owner:n.owner,outputSchema:serializeOutputSchema(n.outputSchema),sourceId:n.sourceId}}export{createRuntimeToolRegistry,findRegisteredRuntimeTool};
@@ -8,10 +8,10 @@ import type { ChannelRouteMethod, RouteContext } from "#public/definitions/chann
8
8
  import type { RouteHandler, WebSocketRouteHandler } from "#channel/routes.js";
9
9
  import type { OutboundAuthFn } from "#public/agents/auth.js";
10
10
  import type { StreamEventHook } from "#public/definitions/hook.js";
11
- import type { Approval } from "#public/definitions/approval.js";
12
- import type { ToolModelOutput } from "#public/definitions/tool.js";
11
+ import type { Approval } from "#approval/definition.js";
12
+ import type { ToolModelOutput } from "#tools/definition.js";
13
13
  import type { ConnectionToolCallDefinition } from "#public/definitions/connections/tool-call.js";
14
- import type { AuthorizationDefinition, ConnectionAuthResolver, ConnectionProtocol, HeadersDefinition, ToolFilterDefinition } from "#runtime/connections/types.js";
14
+ import type { AuthorizationDefinition, ConnectionAuthResolver, ConnectionProtocol, HeadersDefinition, ToolFilterDefinition } from "#shared/connection-types.js";
15
15
  import type { OpenAPISpecSource } from "#public/definitions/connections/openapi.js";
16
16
  import type { CompiledWorkspaceResourceRoot } from "#compiler/manifest.js";
17
17
  import type { WorkspaceRuntimeSpec } from "#runtime/workspace/types.js";
@@ -22,11 +22,12 @@ import type { SourceRef, ModuleSourceRef, SkillPackageSourceRef, MarkdownSourceR
22
22
  import type { NamedSkillDefinition } from "#shared/skill-definition.js";
23
23
  import type { InternalAgentDefinition } from "#shared/agent-definition.js";
24
24
  import type { RuntimeDynamicModelReference } from "#runtime/agent/bootstrap.js";
25
- import type { InternalToolDefinitionWithExecuteFn } from "#shared/tool-definition.js";
25
+ import type { InternalToolDefinitionWithExecuteFn } from "#tools/definition.js";
26
26
  import type { WebSearchProvider } from "#shared/web-search.js";
27
27
  import type { SandboxBackend } from "#shared/sandbox-backend.js";
28
28
  import type { SandboxBootstrapContext, SandboxSessionContext } from "#shared/sandbox-definition.js";
29
- import type { ToolSchema } from "#shared/tool-schema.js";
29
+ import type { ToolSchema } from "#tools/schema.js";
30
+ import type { AgentSourceOwner } from "#compiler/source-graph.js";
30
31
  /**
31
32
  * Runtime-owned source ref describing one additive config module import.
32
33
  */
@@ -42,6 +43,7 @@ export type ResolvedModuleSourceRef = Readonly<ModuleSourceRef>;
42
43
  export type ResolvedInstructionsDefinition = Readonly<SourceRef & {
43
44
  content: string;
44
45
  name: string;
46
+ owner: AgentSourceOwner;
45
47
  role: "system" | "user";
46
48
  } & (Omit<MarkdownSourceRef<undefined>, "definition"> | ModuleSourceRef)>;
47
49
  /**
@@ -103,7 +105,7 @@ export interface ResolvedConnectionDefinition extends ResolvedModuleSourceRef {
103
105
  *
104
106
  * The resolved `backend` is non-optional: every sandbox in the runtime
105
107
  * graph carries a concrete SandboxBackend value, even when the
106
- * authored definition omits `backend`. The unauthored case is filled
108
+ * authored definition omits `backend`. The omitted field is filled
107
109
  * in by `defaultSandbox()` (which itself selects between
108
110
  * `vercel()`, `docker()`, `microsandbox()`, and `justbash()` based on the current
109
111
  * environment).
@@ -125,11 +127,11 @@ export type ResolvedSandboxDefinition = ResolvedModuleSourceRef & {
125
127
  readonly onSession?: (input: SandboxSessionContext) => Promise<void> | void;
126
128
  };
127
129
  /**
128
- * Runtime-owned tool definition resolved from a compiled module map or
129
- * declared by the framework catalog.
130
+ * Runtime-owned tool definition resolved from the selected compiled source graph.
130
131
  * A tool without `execute` is surfaced to the client and never executed by eve.
131
132
  */
132
133
  export type ResolvedToolDefinition = Readonly<Omit<Optional<InternalToolDefinitionWithExecuteFn<unknown, unknown>, "execute">, "inputSchema" | "outputSchema">> & ResolvedModuleSourceRef & {
134
+ readonly owner: AgentSourceOwner;
133
135
  /**
134
136
  * Validated runtime input schema. Compiled and durable JSON Schemas are
135
137
  * rehydrated before entering this runtime-owned definition.
@@ -337,20 +339,6 @@ export interface ResolvedAgent {
337
339
  readonly channels: readonly ResolvedChannelDefinition[];
338
340
  readonly config?: ResolvedAgentDefinition;
339
341
  readonly connections: readonly ResolvedConnectionDefinition[];
340
- /**
341
- * Logical names of framework-provided channels the author opted out of by
342
- * exporting `disableRoute()` from a file in `agent/channels/`. Each
343
- * entry is the slash-joined slug path of one such file. The graph
344
- * resolver uses this list to filter the framework default channel set.
345
- */
346
- readonly disabledFrameworkChannels: readonly string[];
347
- /**
348
- * Names of framework-provided tools the author opted out of by exporting
349
- * `disableTool()` from a file in `agent/tools/`. Each entry is the
350
- * filename slug of one such file. The graph resolver uses this list to
351
- * filter the framework default tool set.
352
- */
353
- readonly disabledFrameworkTools: readonly string[];
354
342
  /**
355
343
  * Configuration for the experimental framework `Workflow` orchestration
356
344
  * tool. Present when an authored tool module exports
@@ -371,11 +359,7 @@ export interface ResolvedAgent {
371
359
  * declare one.
372
360
  */
373
361
  readonly instructions: readonly ResolvedInstructionsDefinition[];
374
- /**
375
- * Authored sandbox override for this agent, when one exists. `null`
376
- * means the agent uses the framework default sandbox unchanged.
377
- */
378
- readonly sandbox: ResolvedSandboxDefinition | null;
362
+ readonly sandbox: ResolvedSandboxDefinition;
379
363
  /**
380
364
  * Byte-free descriptor for the compiled workspace resource tree owned
381
365
  * by this agent's graph node. The prewarm orchestrator resolves the
@@ -0,0 +1,49 @@
1
+ import type { SandboxBackend } from "#public/definitions/sandbox-backend.js";
2
+ import type { DockerSandboxCreateOptions } from "#public/sandbox/docker-sandbox.js";
3
+ import type { JustBashSandboxCreateOptions } from "#public/sandbox/just-bash-sandbox.js";
4
+ import type { MicrosandboxSandboxCreateOptions } from "#public/sandbox/microsandbox-sandbox.js";
5
+ import type { VercelSandboxCreateOptions } from "#public/sandbox/vercel-sandbox.js";
6
+ /**
7
+ * Input to {@link defaultSandbox}: a separate options bag per inner
8
+ * backend. The framework picks one backend at runtime based on
9
+ * availability and passes it the matching bag; the others are ignored.
10
+ */
11
+ export interface DefaultSandboxOptions {
12
+ readonly docker?: DockerSandboxCreateOptions;
13
+ readonly justBash?: JustBashSandboxCreateOptions;
14
+ readonly microsandbox?: MicrosandboxSandboxCreateOptions;
15
+ readonly vercel?: VercelSandboxCreateOptions;
16
+ }
17
+ /**
18
+ * Availability probes behind {@link defaultSandbox}'s selection chain.
19
+ * Injectable so selection logic is testable without touching the host.
20
+ */
21
+ export interface DefaultSandboxProbes {
22
+ readonly isDeployedOnVercel: () => boolean;
23
+ readonly isDockerAvailable: () => boolean;
24
+ readonly isMicrosandboxSupported: () => boolean;
25
+ }
26
+ /**
27
+ * Constructs an availability-aware sandbox backend. On first use it
28
+ * picks the best backend the host supports, in priority order:
29
+ *
30
+ * 1. **Vercel Sandbox** when deploying on Vercel (`process.env.VERCEL`
31
+ * is set) — local container/VM runtimes cannot run there.
32
+ * 2. **Docker** when a Linux-container Docker daemon is reachable.
33
+ * 3. **microsandbox** when the host supports it (macOS on Apple
34
+ * Silicon, or glibc Linux with KVM); `eve dev` auto-installs the
35
+ * package into the project.
36
+ * 4. **just-bash** as the dependency-free fallback; `eve dev`
37
+ * auto-installs the package into the project.
38
+ *
39
+ * The selection is cached for the process lifetime. To pin a backend
40
+ * unconditionally, configure its factory directly (`docker()`,
41
+ * `microsandbox()`, `justbash()`,
42
+ * `vercel()`).
43
+ */
44
+ export declare function defaultSandbox(opts?: DefaultSandboxOptions): SandboxBackend;
45
+ /**
46
+ * The selection chain behind {@link defaultSandbox}. Internal —
47
+ * exported for tests, which inject probes.
48
+ */
49
+ export declare function selectDefaultSandbox(opts: DefaultSandboxOptions | undefined, probes: DefaultSandboxProbes): SandboxBackend;
@@ -0,0 +1 @@
1
+ import{isLinuxDockerDaemonAvailableSync,isMicrosandboxPlatformSupported}from"#execution/sandbox/bindings/local.js";import{lazyBackend}from"#execution/sandbox/lazy-backend.js";import{docker}from"#sandbox/backends/docker.js";import{justbash}from"#sandbox/backends/just-bash.js";import{microsandbox}from"#sandbox/backends/microsandbox.js";import{vercel}from"#sandbox/backends/vercel.js";const PRODUCTION_PROBES={isDeployedOnVercel:()=>!!process.env.VERCEL,isDockerAvailable:()=>isLinuxDockerDaemonAvailableSync(),isMicrosandboxSupported:()=>isMicrosandboxPlatformSupported()};function defaultSandbox(e){return lazyBackend(()=>selectDefaultSandbox(e,PRODUCTION_PROBES))}function selectDefaultSandbox(e,t){return t.isDeployedOnVercel()?vercel(e?.vercel):t.isDockerAvailable()?docker(e?.docker):t.isMicrosandboxSupported()?microsandbox(e?.microsandbox):justbash(e?.justBash)}export{defaultSandbox,selectDefaultSandbox};
@@ -0,0 +1,14 @@
1
+ import type { SandboxBackend } from "#public/definitions/sandbox-backend.js";
2
+ import type { DockerSandboxCreateOptions } from "#public/sandbox/docker-sandbox.js";
3
+ /**
4
+ * Constructs the Docker sandbox backend: the workspace runs inside a
5
+ * real Linux container driven through the Docker CLI, using the
6
+ * official Ubuntu 26.04 image by default.
7
+ *
8
+ * Requires a running Docker-compatible daemon reachable through a
9
+ * `docker` CLI (Docker Desktop, OrbStack, Colima, Podman via its
10
+ * docker-compatible CLI, …; override the binary with `EVE_DOCKER_PATH`).
11
+ * Configuring this backend pins it unconditionally — when you want
12
+ * fallback behavior, use `defaultBackend()` instead.
13
+ */
14
+ export declare function docker(opts?: DockerSandboxCreateOptions): SandboxBackend;
@@ -0,0 +1 @@
1
+ import{createDockerSandboxBackend}from"#execution/sandbox/bindings/local.js";function docker(e){return createDockerSandboxBackend({createOptions:e})}export{docker};
@@ -0,0 +1,17 @@
1
+ import type { SandboxBackend } from "#public/definitions/sandbox-backend.js";
2
+ import type { JustBashSandboxCreateOptions } from "#public/sandbox/just-bash-sandbox.js";
3
+ /**
4
+ * Constructs the just-bash sandbox backend: a pure-JS bash interpreter
5
+ * over a virtual filesystem stored under `.eve/sandbox-cache/`. It
6
+ * needs no daemon or VM, but commands run in a simulated shell — no
7
+ * real binaries (`git`, `node`, package managers) and no network
8
+ * isolation.
9
+ *
10
+ * The `just-bash` package is not bundled with eve. When it is missing,
11
+ * `eve dev` installs it into the application automatically (disable
12
+ * with `autoInstall: false`); production processes fail with an
13
+ * actionable install error instead. Configuring this backend pins it
14
+ * unconditionally — when you want fallback behavior, use
15
+ * `defaultBackend()` instead.
16
+ */
17
+ export declare function justbash(opts?: JustBashSandboxCreateOptions): SandboxBackend;
@@ -0,0 +1 @@
1
+ import{createJustBashSandboxBackend}from"#execution/sandbox/bindings/local.js";function justbash(e){return createJustBashSandboxBackend({createOptions:e})}export{justbash};
@@ -0,0 +1,17 @@
1
+ import type { SandboxBackend } from "#public/definitions/sandbox-backend.js";
2
+ import type { MicrosandboxBootstrapUseOptions, MicrosandboxSandboxCreateOptions, MicrosandboxSessionUseOptions } from "#public/sandbox/microsandbox-sandbox.js";
3
+ /**
4
+ * Constructs the microsandbox sandbox backend: lightweight local VMs
5
+ * via [microsandbox](https://www.npmjs.com/package/microsandbox) with
6
+ * snapshot-backed templates and a firewall capable of domain-level
7
+ * network policies and credential brokering.
8
+ *
9
+ * Supported hosts: macOS on Apple Silicon, or Linux (glibc) with KVM
10
+ * enabled. The `microsandbox` package is not bundled with eve. When it
11
+ * (or its VM runtime) is missing, `eve dev` installs both
12
+ * automatically (disable with `setup: { autoInstall: false }`);
13
+ * production processes fail with actionable errors instead.
14
+ * Configuring this backend pins it unconditionally — when you want
15
+ * fallback behavior, use `defaultBackend()` instead.
16
+ */
17
+ export declare function microsandbox(opts?: MicrosandboxSandboxCreateOptions): SandboxBackend<MicrosandboxBootstrapUseOptions, MicrosandboxSessionUseOptions>;