eve 0.44.3 → 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 (821) hide show
  1. package/CHANGELOG.md +45 -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/channel/adapter.d.ts +2 -2
  7. package/dist/src/{runtime/governance → channel}/auth/http-basic.d.ts +1 -1
  8. package/dist/src/{runtime/governance → channel}/auth/jwt-ecdsa.d.ts +1 -1
  9. package/dist/src/channel/auth/jwt-ecdsa.js +1 -0
  10. package/dist/src/{runtime/governance → channel}/auth/jwt-hmac.d.ts +1 -1
  11. package/dist/src/channel/auth/jwt-hmac.js +1 -0
  12. package/dist/src/{runtime/governance → channel}/auth/oidc.d.ts +1 -1
  13. package/dist/src/channel/auth/oidc.js +1 -0
  14. package/dist/src/{runtime/governance → channel}/auth/token-claims.d.ts +1 -1
  15. package/dist/src/{runtime/governance → channel}/auth/types.d.ts +1 -1
  16. package/dist/src/{runtime/governance → channel}/auth/vercel-oidc-project.d.ts +1 -1
  17. package/dist/src/channel/channel-operations.d.ts +1 -1
  18. package/dist/src/channel/channel-operations.js +1 -1
  19. package/dist/src/channel/instrumentation.d.ts +1 -0
  20. package/dist/src/channel/instrumentation.js +1 -1
  21. package/dist/src/channel/resolve-text.d.ts +1 -1
  22. package/dist/src/channel/routes.d.ts +1 -1
  23. package/dist/src/channel/session.d.ts +1 -1
  24. package/dist/src/channel/session.js +1 -1
  25. package/dist/src/channel/types.d.ts +2 -2
  26. package/dist/src/chunks/{use-eve-agent-DpUEwS23.js → use-eve-agent-C46Kan_I.js} +390 -107
  27. package/dist/src/chunks/{use-eve-agent-BsLJiIbc.js → use-eve-agent-OtHRoxIS.js} +390 -107
  28. package/dist/src/cli/banner.js +1 -1
  29. package/dist/src/cli/commands/agent-instructions.js +2 -2
  30. package/dist/src/cli/commands/channel-add-conflicts.js +1 -1
  31. package/dist/src/cli/commands/extension-build.js +1 -1
  32. package/dist/src/cli/commands/extension-init.js +1 -1
  33. package/dist/src/cli/commands/info.js +1 -1
  34. package/dist/src/cli/commands/init.js +1 -1
  35. package/dist/src/cli/commands/trace.js +1 -1
  36. package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
  37. package/dist/src/cli/dev/tui/prompt-commands.d.ts +1 -1
  38. package/dist/src/cli/dev/tui/prompt-commands.js +1 -1
  39. package/dist/src/cli/dev/tui/remote-auth.js +1 -1
  40. package/dist/src/cli/dev/tui/setup-commands.d.ts +2 -0
  41. package/dist/src/cli/dev/tui/setup-commands.js +1 -1
  42. package/dist/src/cli/dev/tui/setup-selection-input.d.ts +3 -1
  43. package/dist/src/cli/dev/tui/setup-selection-input.js +2 -2
  44. package/dist/src/cli/dev/tui/terminal-renderer.js +2 -2
  45. package/dist/src/cli/dev/tui/traces/trace-conversation.d.ts +1 -1
  46. package/dist/src/cli/dev/tui/traces/trace-conversation.js +1 -1
  47. package/dist/src/cli/dev/tui/traces/trace-viewer-state.js +1 -1
  48. package/dist/src/cli/invoke/result.d.ts +1 -1
  49. package/dist/src/cli/ui/live-row.js +1 -1
  50. package/dist/src/cli/ui/output.js +1 -1
  51. package/dist/src/client/agent-info-schema.d.ts +1757 -302
  52. package/dist/src/client/agent-info-schema.js +1 -1
  53. package/dist/src/client/client.js +1 -1
  54. package/dist/src/client/eve-agent-store.d.ts +6 -5
  55. package/dist/src/client/eve-agent-store.js +1 -1
  56. package/dist/src/client/health-response-error.d.ts +5 -0
  57. package/dist/src/client/health-response-error.js +1 -0
  58. package/dist/src/client/health-schema.d.ts +7 -0
  59. package/dist/src/client/health-schema.js +1 -0
  60. package/dist/src/client/index.d.ts +6 -3
  61. package/dist/src/client/index.js +1 -1
  62. package/dist/src/client/message-action-parts.d.ts +2 -2
  63. package/dist/src/client/message-reducer-types.d.ts +1 -1
  64. package/dist/src/client/reducer.d.ts +1 -1
  65. package/dist/src/client/session-utils.d.ts +1 -1
  66. package/dist/src/client/session.d.ts +1 -1
  67. package/dist/src/client/session.js +1 -1
  68. package/dist/src/client/types.d.ts +3 -7
  69. package/dist/src/compiler/artifacts.d.ts +37 -11
  70. package/dist/src/compiler/artifacts.js +1 -1
  71. package/dist/src/compiler/channel-route-plan.d.ts +10 -0
  72. package/dist/src/compiler/channel-route-plan.js +1 -0
  73. package/dist/src/compiler/compile-agent.d.ts +2 -2
  74. package/dist/src/compiler/compile-agent.js +2 -2
  75. package/dist/src/compiler/compile-from-memory.d.ts +13 -52
  76. package/dist/src/compiler/compile-from-memory.js +1 -1
  77. package/dist/src/compiler/diagnostics.d.ts +38 -0
  78. package/dist/src/compiler/diagnostics.js +1 -0
  79. package/dist/src/compiler/extension-compatibility.d.ts +14 -11
  80. package/dist/src/compiler/extension-compatibility.js +1 -1
  81. package/dist/src/compiler/load-binding-namespace.d.ts +9 -0
  82. package/dist/src/compiler/load-binding-namespace.js +1 -0
  83. package/dist/src/compiler/manifest.d.ts +172 -51
  84. package/dist/src/compiler/manifest.js +1 -1
  85. package/dist/src/compiler/module-map.d.ts +12 -30
  86. package/dist/src/compiler/module-map.js +3 -3
  87. package/dist/src/compiler/node-source-state.d.ts +24 -0
  88. package/dist/src/compiler/node-source-state.js +1 -0
  89. package/dist/src/compiler/normalize-agent-config.d.ts +5 -1
  90. package/dist/src/compiler/normalize-agent-config.js +1 -1
  91. package/dist/src/compiler/normalize-channel.d.ts +8 -2
  92. package/dist/src/compiler/normalize-channel.js +1 -1
  93. package/dist/src/compiler/normalize-connection.d.ts +1 -1
  94. package/dist/src/compiler/normalize-connection.js +1 -1
  95. package/dist/src/compiler/normalize-helpers.d.ts +13 -4
  96. package/dist/src/compiler/normalize-helpers.js +1 -1
  97. package/dist/src/compiler/normalize-hook.d.ts +4 -11
  98. package/dist/src/compiler/normalize-hook.js +1 -1
  99. package/dist/src/compiler/normalize-instructions.d.ts +3 -3
  100. package/dist/src/compiler/normalize-instructions.js +1 -1
  101. package/dist/src/compiler/normalize-manifest-helpers.d.ts +29 -0
  102. package/dist/src/compiler/normalize-manifest-helpers.js +1 -0
  103. package/dist/src/compiler/normalize-manifest.d.ts +8 -4
  104. package/dist/src/compiler/normalize-manifest.js +1 -1
  105. package/dist/src/compiler/normalize-sandbox.d.ts +1 -1
  106. package/dist/src/compiler/normalize-sandbox.js +1 -1
  107. package/dist/src/compiler/normalize-schedule.d.ts +2 -2
  108. package/dist/src/compiler/normalize-schedule.js +1 -1
  109. package/dist/src/compiler/normalize-skill.d.ts +2 -2
  110. package/dist/src/compiler/normalize-skill.js +1 -1
  111. package/dist/src/compiler/normalize-subagent.d.ts +21 -39
  112. package/dist/src/compiler/normalize-subagent.js +1 -1
  113. package/dist/src/compiler/normalize-tool.d.ts +2 -1
  114. package/dist/src/compiler/normalize-tool.js +1 -1
  115. package/dist/src/compiler/project-sources.d.ts +71 -0
  116. package/dist/src/compiler/project-sources.js +1 -0
  117. package/dist/src/compiler/remote-agent-node.d.ts +8 -0
  118. package/dist/src/compiler/remote-agent-node.js +1 -1
  119. package/dist/src/compiler/source-graph.d.ts +153 -0
  120. package/dist/src/compiler/source-graph.js +1 -0
  121. package/dist/src/compiler/validate-artifact.d.ts +17 -0
  122. package/dist/src/compiler/validate-artifact.js +1 -0
  123. package/dist/src/compiler/workspace-resources.js +1 -1
  124. package/dist/src/connections/errors.d.ts +125 -0
  125. package/dist/src/connections/errors.js +1 -0
  126. package/dist/src/context/build-base-tool-context.d.ts +2 -2
  127. package/dist/src/context/build-callback-context.d.ts +1 -1
  128. package/dist/src/context/build-dynamic-tools.js +1 -1
  129. package/dist/src/context/dynamic-instruction-lifecycle.js +1 -1
  130. package/dist/src/context/dynamic-resolve-context.d.ts +1 -1
  131. package/dist/src/context/dynamic-skill-lifecycle.js +1 -1
  132. package/dist/src/context/dynamic-subagent-lifecycle.d.ts +0 -2
  133. package/dist/src/context/dynamic-subagent-lifecycle.js +1 -1
  134. package/dist/src/context/dynamic-tool-lifecycle.d.ts +2 -2
  135. package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
  136. package/dist/src/context/key-names.d.ts +12 -0
  137. package/dist/src/context/key-names.js +1 -0
  138. package/dist/src/context/keys.d.ts +8 -1
  139. package/dist/src/context/keys.js +1 -1
  140. package/dist/src/context/providers/connection-key.d.ts +1 -1
  141. package/dist/src/context/providers/connection.d.ts +1 -1
  142. package/dist/src/context/session-context.d.ts +32 -0
  143. package/dist/src/discover/discover-agent.d.ts +0 -13
  144. package/dist/src/discover/discover-agent.js +1 -1
  145. package/dist/src/discover/discover-subagent.js +1 -1
  146. package/dist/src/discover/extensions.d.ts +0 -6
  147. package/dist/src/discover/extensions.js +1 -1
  148. package/dist/src/discover/manifest.d.ts +4 -1
  149. package/dist/src/discover/manifest.js +1 -1
  150. package/dist/src/dynamic/definition.d.ts +117 -0
  151. package/dist/src/dynamic/definition.js +1 -0
  152. package/dist/src/evals/autoevals-client.js +1 -1
  153. package/dist/src/evals/index.d.ts +1 -1
  154. package/dist/src/evals/match.d.ts +1 -1
  155. package/dist/src/evals/runner/reporters/console.js +1 -1
  156. package/dist/src/evals/session.d.ts +1 -1
  157. package/dist/src/evals/target.js +1 -1
  158. package/dist/src/evals/types.d.ts +1 -1
  159. package/dist/src/eve-channel/index.d.ts +12 -0
  160. package/dist/src/eve-channel/index.js +1 -0
  161. package/dist/src/eve-channel/request.d.ts +49 -0
  162. package/dist/src/eve-channel/request.js +3 -0
  163. package/dist/src/eve-channel/support.d.ts +34 -0
  164. package/dist/src/eve-channel/support.js +1 -0
  165. package/dist/src/eve-channel/types.d.ts +128 -0
  166. package/dist/src/eve-channel/types.js +1 -0
  167. package/dist/src/execution/agent-handle-dispatch.d.ts +1 -1
  168. package/dist/src/execution/agent-handle-dispatch.js +1 -1
  169. package/dist/src/execution/authorization-callback-match.d.ts +1 -1
  170. package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
  171. package/dist/src/execution/compaction.js +1 -1
  172. package/dist/src/execution/connection-auth-tool-result.d.ts +1 -1
  173. package/dist/src/{runtime → execution}/connections/callback-route.d.ts +2 -20
  174. package/dist/src/execution/connections/callback-route.js +1 -0
  175. package/dist/src/execution/create-session-step.js +1 -1
  176. package/dist/src/execution/delegated-parent-notification.d.ts +2 -2
  177. package/dist/src/execution/delegated-parent-notification.js +1 -1
  178. package/dist/src/execution/delegated-parent-result.d.ts +1 -1
  179. package/dist/src/execution/delegated-parent-result.js +1 -1
  180. package/dist/src/execution/delegation-tool.d.ts +1 -1
  181. package/dist/src/execution/delegation-tool.js +1 -1
  182. package/dist/src/execution/dispatch-action-failures.d.ts +1 -1
  183. package/dist/src/execution/dispatch-runtime-actions-shared.d.ts +1 -2
  184. package/dist/src/execution/dispatch-runtime-actions-shared.js +1 -1
  185. package/dist/src/execution/dispatch-runtime-actions-step.js +1 -1
  186. package/dist/src/execution/dispatch-workflow-runtime-actions-step.d.ts +1 -1
  187. package/dist/src/execution/durable-session-migrations/turn-workflow.d.ts +1 -1
  188. package/dist/src/execution/durable-session-store.js +1 -1
  189. package/dist/src/execution/effective-output-schema.d.ts +2 -1
  190. package/dist/src/execution/eve-workflow-attributes.d.ts +6 -0
  191. package/dist/src/execution/eve-workflow-attributes.js +1 -1
  192. package/dist/src/execution/forward-turn-cancellation-step.js +1 -1
  193. package/dist/src/execution/node-step.js +1 -1
  194. package/dist/src/execution/remote-agent-dispatch.d.ts +10 -8
  195. package/dist/src/execution/remote-agent-dispatch.js +1 -1
  196. package/dist/src/execution/runtime-context.js +1 -1
  197. package/dist/src/execution/sandbox/{bash-tool.d.ts → bash.d.ts} +2 -2
  198. package/dist/src/execution/sandbox/bindings/just-bash-runtime.d.ts +1 -0
  199. package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
  200. package/dist/src/execution/sandbox/bindings/just-bash.js +1 -1
  201. package/dist/src/execution/sandbox/bindings/vercel-credentials.js +1 -1
  202. package/dist/src/execution/sandbox/glob-tool.js +1 -1
  203. package/dist/src/execution/sandbox/grep-tool.js +1 -1
  204. package/dist/src/execution/sandbox/{read-file-tool.d.ts → read-file.d.ts} +2 -2
  205. package/dist/src/execution/sandbox/{read-file-tool.js → read-file.js} +1 -1
  206. package/dist/src/execution/sandbox/{write-file-tool.d.ts → write-file.d.ts} +2 -2
  207. package/dist/src/execution/sandbox/write-file.js +1 -0
  208. package/dist/src/execution/session-callback-route.d.ts +2 -0
  209. package/dist/src/execution/session-callback-route.js +1 -0
  210. package/dist/src/execution/session-callback-step.js +1 -1
  211. package/dist/src/execution/session-timeout-steps.js +1 -1
  212. package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
  213. package/dist/src/execution/subagent-adapter.js +1 -1
  214. package/dist/src/execution/subagent-hitl-proxy.d.ts +1 -1
  215. package/dist/src/execution/subagent-invocation.d.ts +0 -3
  216. package/dist/src/execution/subagent-invocation.js +1 -1
  217. package/dist/src/execution/subagent-start-local.d.ts +1 -2
  218. package/dist/src/execution/subagent-start-local.js +1 -1
  219. package/dist/src/execution/subagent-start-remote.d.ts +1 -2
  220. package/dist/src/execution/subagent-start-remote.js +1 -1
  221. package/dist/src/execution/subagent-tool.d.ts +4 -8
  222. package/dist/src/execution/subagent-tool.js +1 -1
  223. package/dist/src/execution/subagent-usage-span.d.ts +1 -1
  224. package/dist/src/execution/task-input-response-route.d.ts +2 -0
  225. package/dist/src/execution/task-input-response-route.js +1 -0
  226. package/dist/src/execution/tasks/child/instructions.js +1 -1
  227. package/dist/src/execution/tasks/child/update.d.ts +1 -1
  228. package/dist/src/execution/tasks/child/update.js +1 -1
  229. package/dist/src/execution/tasks/parent/continuation-dispatch.d.ts +1 -1
  230. package/dist/src/execution/tasks/parent/control-shared.d.ts +1 -1
  231. package/dist/src/execution/tasks/parent/delegate.d.ts +2 -2
  232. package/dist/src/execution/tasks/parent/delegate.js +1 -1
  233. package/dist/src/execution/tasks/parent/dispatch-task-step.js +1 -1
  234. package/dist/src/execution/tasks/parent/dispatch.d.ts +3 -1
  235. package/dist/src/execution/tasks/parent/dispatch.js +1 -1
  236. package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +1 -1
  237. package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
  238. package/dist/src/execution/terminate-child-sessions-step.d.ts +4 -5
  239. package/dist/src/execution/terminate-child-sessions-step.js +1 -1
  240. package/dist/src/execution/tool-auth.d.ts +5 -6
  241. package/dist/src/execution/tool-auth.js +1 -1
  242. package/dist/src/execution/tools/connection-search.d.ts +1 -0
  243. package/dist/src/execution/tools/connection-search.js +2 -0
  244. package/dist/src/{runtime/framework-tools → execution/tools}/file-state.d.ts +2 -2
  245. package/dist/src/execution/tools/load-skill.d.ts +6 -0
  246. package/dist/src/execution/tools/load-skill.js +1 -0
  247. package/dist/src/{runtime/framework-tools → execution/tools}/subagent/local.d.ts +7 -7
  248. package/dist/src/execution/tools/subagent/local.js +1 -0
  249. package/dist/src/{runtime/framework-tools → execution/tools}/subagent/remote.d.ts +5 -5
  250. package/dist/src/execution/tools/subagent/remote.js +1 -0
  251. package/dist/src/execution/tools/tasks.d.ts +18 -0
  252. package/dist/src/execution/tools/tasks.js +1 -0
  253. package/dist/src/{runtime/framework-tools → execution/tools}/todo.d.ts +0 -2
  254. package/dist/src/{runtime/framework-tools → execution/tools}/todo.js +1 -2
  255. package/dist/src/execution/turn-control-protocol.js +1 -1
  256. package/dist/src/execution/web-fetch/execute.js +1 -0
  257. package/dist/src/execution/web-fetch/request.js +1 -1
  258. package/dist/src/execution/wire/session-inbox-resume.js +1 -1
  259. package/dist/src/execution/wire/session-inbox-wire.v1.js +1 -1
  260. package/dist/src/execution/workflow-entry.js +1 -1
  261. package/dist/src/execution/workflow-runtime.js +1 -1
  262. package/dist/src/execution/workflow-steps.js +1 -1
  263. package/dist/src/execution/workflow-trace-context.js +1 -1
  264. package/dist/src/framework/host-inventory.d.ts +8 -0
  265. package/dist/src/framework/host-inventory.js +1 -0
  266. package/dist/src/framework/sources/modules/agent.d.ts +4 -0
  267. package/dist/src/framework/sources/modules/agent.js +1 -0
  268. package/dist/src/framework/sources/modules/eve-channel.d.ts +1 -0
  269. package/dist/src/framework/sources/modules/eve-channel.js +1 -0
  270. package/dist/src/framework/sources/modules/home-channel.d.ts +2 -0
  271. package/dist/src/framework/sources/modules/home-channel.js +1 -0
  272. package/dist/src/framework/sources/modules/sandbox.d.ts +2 -0
  273. package/dist/src/framework/sources/modules/sandbox.js +1 -0
  274. package/dist/src/framework/sources/registry.d.ts +5 -0
  275. package/dist/src/framework/sources/registry.js +1 -0
  276. package/dist/src/harness/action-result-helpers.d.ts +1 -1
  277. package/dist/src/harness/advertised-tools.js +1 -1
  278. package/dist/src/harness/attachment-staging.js +1 -1
  279. package/dist/src/harness/authorization.d.ts +3 -3
  280. package/dist/src/harness/background-tools.d.ts +2 -2
  281. package/dist/src/harness/channel-delivery-instrumentation.js +1 -1
  282. package/dist/src/harness/compaction.js +1 -1
  283. package/dist/src/harness/execute-tool.d.ts +3 -3
  284. package/dist/src/{runtime/framework-tools → harness}/final-output.d.ts +1 -1
  285. package/dist/src/harness/final-output.js +1 -0
  286. package/dist/src/harness/handles/query.d.ts +1 -1
  287. package/dist/src/harness/handles/store.d.ts +8 -0
  288. package/dist/src/harness/handles/store.js +1 -1
  289. package/dist/src/harness/hitl/approval-input-requests.d.ts +1 -1
  290. package/dist/src/harness/hitl/approval-prompt.d.ts +1 -1
  291. package/dist/src/harness/hitl/pending-input-resolution.d.ts +2 -2
  292. package/dist/src/harness/hitl/question-input-requests.d.ts +1 -1
  293. package/dist/src/harness/input-extraction.d.ts +1 -1
  294. package/dist/src/harness/input-extraction.js +1 -1
  295. package/dist/src/harness/input-request-class.d.ts +1 -1
  296. package/dist/src/harness/input-request-resolution.d.ts +1 -1
  297. package/dist/src/harness/input-requests.d.ts +2 -2
  298. package/dist/src/harness/instrumentation/lifecycle.d.ts +3 -0
  299. package/dist/src/harness/instrumentation/providers.js +1 -1
  300. package/dist/src/harness/instrumentation/runtime.d.ts +2 -1
  301. package/dist/src/harness/pending-input-batches.d.ts +1 -1
  302. package/dist/src/harness/prepare-trace-context.d.ts +3 -0
  303. package/dist/src/harness/prepare-trace-context.js +1 -1
  304. package/dist/src/harness/provider-safety.d.ts +7 -0
  305. package/dist/src/harness/provider-safety.js +1 -0
  306. package/dist/src/{runtime/framework-tools/web-search.d.ts → harness/provider-tool-schemas.d.ts} +1 -9
  307. package/dist/src/harness/provider-tool-schemas.js +1 -0
  308. package/dist/src/harness/provider-tools.js +1 -1
  309. package/dist/src/harness/proxy-input-requests.d.ts +1 -1
  310. package/dist/src/harness/request-input-tool.d.ts +4 -0
  311. package/dist/src/harness/request-input-tool.js +1 -0
  312. package/dist/src/harness/runtime-actions.d.ts +1 -1
  313. package/dist/src/harness/session-limit-continuation.d.ts +1 -1
  314. package/dist/src/harness/step-hooks.d.ts +2 -0
  315. package/dist/src/harness/step-hooks.js +1 -1
  316. package/dist/src/harness/stream-actions.d.ts +1 -1
  317. package/dist/src/harness/subagent-depth.d.ts +1 -1
  318. package/dist/src/harness/tool-call-action.d.ts +1 -1
  319. package/dist/src/harness/tool-call-input-errors.d.ts +1 -1
  320. package/dist/src/harness/tool-loop.js +2 -2
  321. package/dist/src/harness/tool-model-output.d.ts +1 -1
  322. package/dist/src/harness/tools.d.ts +1 -1
  323. package/dist/src/harness/tools.js +1 -1
  324. package/dist/src/harness/types.d.ts +3 -9
  325. package/dist/src/harness/workflow-runtime-action-state.d.ts +1 -1
  326. package/dist/src/harness/workflow-subagent-limit.d.ts +1 -1
  327. package/dist/src/instrumentation/provider.d.ts +117 -0
  328. package/dist/src/instrumentation/provider.js +1 -0
  329. package/dist/src/internal/application/compiled-artifacts.js +5 -4
  330. package/dist/src/internal/application/package.js +1 -1
  331. package/dist/src/internal/authored-definition/approval.d.ts +1 -1
  332. package/dist/src/internal/authored-definition/connection.js +1 -1
  333. package/dist/src/internal/authored-definition/core.js +1 -1
  334. package/dist/src/internal/authored-definition/schema-backed.d.ts +6 -3
  335. package/dist/src/internal/authored-definition/schema-backed.js +1 -1
  336. package/dist/src/internal/authored-definition/source-identity.d.ts +17 -0
  337. package/dist/src/internal/authored-definition/source-identity.js +1 -0
  338. package/dist/src/internal/authored-module-map-loader.d.ts +1 -5
  339. package/dist/src/internal/authored-module-map-loader.js +1 -1
  340. package/dist/src/internal/helpers/markdown.js +1 -1
  341. package/dist/src/internal/invocation/agent-invocation.d.ts +2 -2
  342. package/dist/src/internal/invocation/workflow-execution.d.ts +1 -1
  343. package/dist/src/internal/invocation/workflow-execution.js +1 -1
  344. package/dist/src/internal/materialized-authored-modules.js +1 -1
  345. package/dist/src/internal/nitro/dev-runtime-artifacts.js +1 -1
  346. package/dist/src/internal/nitro/host/application-route-registry.d.ts +2 -41
  347. package/dist/src/internal/nitro/host/application-route-registry.js +1 -1
  348. package/dist/src/internal/nitro/host/build-extension.js +1 -1
  349. package/dist/src/internal/nitro/host/build-vercel-agent-summary.js +1 -1
  350. package/dist/src/internal/nitro/host/configure-nitro-routes.js +3 -4
  351. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  352. package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
  353. package/dist/src/internal/nitro/host/extension-capability-requirements.d.ts +2 -0
  354. package/dist/src/internal/nitro/host/extension-capability-requirements.js +1 -1
  355. package/dist/src/internal/nitro/host/start-development-server.js +2 -2
  356. package/dist/src/internal/nitro/host/start-production-server.js +3 -3
  357. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.d.ts +9 -215
  358. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
  359. package/dist/src/internal/nitro/routes/agent-info/load-agent-info-data.d.ts +2 -13
  360. package/dist/src/internal/nitro/routes/agent-info/load-agent-info-data.js +1 -1
  361. package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
  362. package/dist/src/internal/nitro/routes/channel-route-context.d.ts +5 -0
  363. package/dist/src/internal/nitro/routes/channel-route-context.js +1 -1
  364. package/dist/src/internal/nitro/routes/index.d.ts +0 -9
  365. package/dist/src/internal/nitro/routes/index.js +1 -1
  366. package/dist/src/internal/nitro/routes/info.js +1 -1
  367. package/dist/src/internal/nitro/routes/runtime-stack.d.ts +5 -5
  368. package/dist/src/internal/nitro/routes/runtime-stack.js +1 -1
  369. package/dist/src/internal/programmatic-source-loader.d.ts +1 -0
  370. package/dist/src/internal/programmatic-source-loader.js +1 -0
  371. package/dist/src/internal/runtime-registry.d.ts +3 -4
  372. package/dist/src/protocol/message.d.ts +3 -3
  373. package/dist/src/protocol/routes.d.ts +2 -0
  374. package/dist/src/protocol/routes.js +1 -1
  375. package/dist/src/public/agents/auth.d.ts +10 -6
  376. package/dist/src/public/agents/auth.js +1 -1
  377. package/dist/src/public/channels/auth.d.ts +1 -1
  378. package/dist/src/public/channels/auth.js +1 -1
  379. package/dist/src/public/channels/chat-sdk/authorization.d.ts +3 -0
  380. package/dist/src/public/channels/chat-sdk/authorization.js +3 -0
  381. package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +2 -0
  382. package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +2 -2
  383. package/dist/src/public/channels/discord/discordChannel.js +1 -1
  384. package/dist/src/public/channels/discord/hitl.d.ts +1 -1
  385. package/dist/src/public/channels/discord/hitl.js +1 -1
  386. package/dist/src/public/channels/discord/inbound.d.ts +1 -0
  387. package/dist/src/public/channels/discord/inbound.js +1 -1
  388. package/dist/src/public/channels/eve.d.ts +1 -139
  389. package/dist/src/public/channels/eve.js +1 -3
  390. package/dist/src/public/channels/github/dispatch.d.ts +5 -0
  391. package/dist/src/public/channels/github/dispatch.js +1 -1
  392. package/dist/src/public/channels/github/githubChannel.js +1 -1
  393. package/dist/src/public/channels/github/inbound.d.ts +2 -0
  394. package/dist/src/public/channels/github/inbound.js +1 -1
  395. package/dist/src/public/channels/index.d.ts +1 -1
  396. package/dist/src/public/channels/index.js +1 -1
  397. package/dist/src/public/channels/linear/hitl.d.ts +1 -1
  398. package/dist/src/public/channels/linear/inbound.js +1 -1
  399. package/dist/src/public/channels/linq/index.d.ts +1 -1
  400. package/dist/src/public/channels/linq/index.js +1 -1
  401. package/dist/src/public/channels/linq/linqChannel.d.ts +3 -1
  402. package/dist/src/public/channels/linq/linqChannel.js +1 -1
  403. package/dist/src/public/channels/mcp.js +1 -1
  404. package/dist/src/public/channels/photon/index.d.ts +1 -1
  405. package/dist/src/public/channels/photon/index.js +1 -1
  406. package/dist/src/public/channels/photon/photonIMessageChannel.d.ts +3 -1
  407. package/dist/src/public/channels/photon/photonIMessageChannel.js +1 -1
  408. package/dist/src/public/channels/slack/action-status.d.ts +1 -1
  409. package/dist/src/public/channels/slack/api.d.ts +15 -5
  410. package/dist/src/public/channels/slack/api.js +1 -1
  411. package/dist/src/public/channels/slack/attachments.d.ts +2 -2
  412. package/dist/src/public/channels/slack/attachments.js +1 -1
  413. package/dist/src/public/channels/slack/hitl.d.ts +3 -1
  414. package/dist/src/public/channels/slack/hitl.js +1 -1
  415. package/dist/src/public/channels/slack/inbound-content.d.ts +4 -0
  416. package/dist/src/public/channels/slack/inbound-content.js +4 -0
  417. package/dist/src/public/channels/slack/inbound.d.ts +17 -1
  418. package/dist/src/public/channels/slack/inbound.js +1 -1
  419. package/dist/src/public/channels/slack/index.d.ts +1 -1
  420. package/dist/src/public/channels/slack/input-response.d.ts +1 -0
  421. package/dist/src/public/channels/slack/input-response.js +1 -1
  422. package/dist/src/public/channels/slack/interaction-cards.d.ts +10 -0
  423. package/dist/src/public/channels/slack/interaction-cards.js +1 -0
  424. package/dist/src/public/channels/slack/interactions.d.ts +1 -0
  425. package/dist/src/public/channels/slack/interactions.js +1 -1
  426. package/dist/src/public/channels/slack/model-context.d.ts +3 -1
  427. package/dist/src/public/channels/slack/model-context.js +2 -2
  428. package/dist/src/public/channels/slack/session-operations.d.ts +1 -1
  429. package/dist/src/public/channels/slack/slackChannel.d.ts +7 -2
  430. package/dist/src/public/channels/slack/slackChannel.js +1 -1
  431. package/dist/src/public/channels/teams/hitl.d.ts +1 -1
  432. package/dist/src/public/channels/teams/hitl.js +1 -1
  433. package/dist/src/public/channels/teams/inbound.d.ts +2 -0
  434. package/dist/src/public/channels/teams/inbound.js +1 -1
  435. package/dist/src/public/channels/teams/teamsChannel.js +1 -1
  436. package/dist/src/public/channels/teams/verify.js +1 -1
  437. package/dist/src/public/channels/telegram/api.d.ts +15 -0
  438. package/dist/src/public/channels/telegram/api.js +2 -2
  439. package/dist/src/public/channels/telegram/authorization-callback.d.ts +10 -0
  440. package/dist/src/public/channels/telegram/authorization-callback.js +1 -0
  441. package/dist/src/public/channels/telegram/authorization.d.ts +19 -0
  442. package/dist/src/public/channels/telegram/authorization.js +3 -0
  443. package/dist/src/public/channels/telegram/defaults.d.ts +1 -0
  444. package/dist/src/public/channels/telegram/defaults.js +3 -3
  445. package/dist/src/public/channels/telegram/hitl.d.ts +1 -1
  446. package/dist/src/public/channels/telegram/hitl.js +1 -1
  447. package/dist/src/public/channels/telegram/inbound.d.ts +1 -0
  448. package/dist/src/public/channels/telegram/inbound.js +1 -1
  449. package/dist/src/public/channels/telegram/index.d.ts +1 -1
  450. package/dist/src/public/channels/telegram/index.js +1 -1
  451. package/dist/src/public/channels/telegram/state.d.ts +6 -0
  452. package/dist/src/public/channels/telegram/state.js +1 -0
  453. package/dist/src/public/channels/telegram/telegramChannel.d.ts +11 -0
  454. package/dist/src/public/channels/telegram/telegramChannel.js +1 -1
  455. package/dist/src/public/connections/errors.d.ts +1 -125
  456. package/dist/src/public/connections/errors.js +1 -1
  457. package/dist/src/public/connections/index.d.ts +2 -2
  458. package/dist/src/public/connections/index.js +1 -1
  459. package/dist/src/public/definitions/agent.d.ts +1 -1
  460. package/dist/src/public/definitions/agent.js +1 -1
  461. package/dist/src/public/definitions/approval.d.ts +2 -84
  462. package/dist/src/public/definitions/approval.js +1 -1
  463. package/dist/src/public/definitions/callback-context.d.ts +1 -32
  464. package/dist/src/public/definitions/connections/mcp.d.ts +1 -1
  465. package/dist/src/public/definitions/connections/mcp.js +1 -1
  466. package/dist/src/public/definitions/connections/openapi.d.ts +1 -1
  467. package/dist/src/public/definitions/connections/openapi.js +1 -1
  468. package/dist/src/public/definitions/connections/protocol.d.ts +1 -1
  469. package/dist/src/public/definitions/instructions.d.ts +2 -2
  470. package/dist/src/public/definitions/instructions.js +1 -1
  471. package/dist/src/public/definitions/skill.js +1 -1
  472. package/dist/src/public/index.d.ts +1 -1
  473. package/dist/src/public/instructions/index.d.ts +1 -1
  474. package/dist/src/public/instrumentation/provider.d.ts +1 -117
  475. package/dist/src/public/instrumentation/provider.js +1 -1
  476. package/dist/src/public/models/openai/chatgpt/auth.js +1 -1
  477. package/dist/src/public/next/server.js +1 -1
  478. package/dist/src/public/nuxt/dev-server.js +1 -1
  479. package/dist/src/public/sandbox/backends/default.d.ts +1 -49
  480. package/dist/src/public/sandbox/backends/default.js +1 -1
  481. package/dist/src/public/sandbox/backends/docker.d.ts +1 -14
  482. package/dist/src/public/sandbox/backends/docker.js +1 -1
  483. package/dist/src/public/sandbox/backends/just-bash.d.ts +1 -17
  484. package/dist/src/public/sandbox/backends/just-bash.js +1 -1
  485. package/dist/src/public/sandbox/backends/microsandbox.d.ts +1 -17
  486. package/dist/src/public/sandbox/backends/microsandbox.js +1 -1
  487. package/dist/src/public/sandbox/backends/vercel.d.ts +1 -30
  488. package/dist/src/public/sandbox/backends/vercel.js +1 -1
  489. package/dist/src/public/sandbox/just-bash-sandbox.d.ts +12 -1
  490. package/dist/src/public/skills/index.d.ts +3 -3
  491. package/dist/src/public/skills/index.js +1 -1
  492. package/dist/src/public/sveltekit/dev-server.js +1 -1
  493. package/dist/src/public/tools/approval/index.d.ts +2 -2
  494. package/dist/src/public/tools/approval/index.js +1 -1
  495. package/dist/src/public/tools/bash.d.ts +3 -0
  496. package/dist/src/public/tools/bash.js +1 -0
  497. package/dist/src/public/tools/glob.d.ts +3 -0
  498. package/dist/src/public/tools/glob.js +1 -0
  499. package/dist/src/public/tools/grep.d.ts +3 -0
  500. package/dist/src/public/tools/grep.js +1 -0
  501. package/dist/src/public/tools/index.d.ts +6 -11
  502. package/dist/src/public/tools/index.js +1 -1
  503. package/dist/src/public/tools/load-skill.d.ts +3 -0
  504. package/dist/src/public/tools/load-skill.js +1 -0
  505. package/dist/src/public/tools/read-file.d.ts +3 -0
  506. package/dist/src/public/tools/read-file.js +1 -0
  507. package/dist/src/public/{tool-result-narrowing.d.ts → tools/result.d.ts} +2 -28
  508. package/dist/src/public/tools/result.js +1 -0
  509. package/dist/src/public/tools/sleep.d.ts +1 -0
  510. package/dist/src/public/tools/sleep.js +1 -0
  511. package/dist/src/public/tools/todo.d.ts +3 -0
  512. package/dist/src/public/tools/todo.js +1 -0
  513. package/dist/src/public/tools/web-fetch.d.ts +3 -0
  514. package/dist/src/public/tools/web-fetch.js +1 -0
  515. package/dist/src/public/tools/web-search.d.ts +3 -36
  516. package/dist/src/public/tools/web-search.js +1 -1
  517. package/dist/src/public/tools/workflow.d.ts +4 -0
  518. package/dist/src/public/tools/workflow.js +1 -0
  519. package/dist/src/public/tools/write-file.d.ts +3 -0
  520. package/dist/src/public/tools/write-file.js +1 -0
  521. package/dist/src/public/types/json.d.ts +1 -28
  522. package/dist/src/react/use-eve-agent.d.ts +1 -0
  523. package/dist/src/react/use-eve-agent.js +1 -1
  524. package/dist/src/runtime/actions/keys.d.ts +1 -1
  525. package/dist/src/runtime/actions/results.d.ts +1 -1
  526. package/dist/src/runtime/agent/bootstrap.js +1 -1
  527. package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
  528. package/dist/src/runtime/connections/authorization-tokens.d.ts +1 -1
  529. package/dist/src/runtime/connections/mcp-client.d.ts +1 -1
  530. package/dist/src/runtime/connections/mcp-client.js +1 -1
  531. package/dist/src/runtime/connections/openapi-client.d.ts +1 -1
  532. package/dist/src/runtime/connections/openapi-client.js +1 -1
  533. package/dist/src/runtime/connections/principal.d.ts +1 -1
  534. package/dist/src/runtime/connections/principal.js +1 -1
  535. package/dist/src/runtime/connections/registry-types.d.ts +11 -0
  536. package/dist/src/runtime/connections/registry.d.ts +3 -2
  537. package/dist/src/runtime/connections/resolve-authorization.d.ts +2 -2
  538. package/dist/src/runtime/connections/resolve-authorization.js +1 -1
  539. package/dist/src/runtime/connections/scoped-authorization.d.ts +2 -2
  540. package/dist/src/runtime/connections/scoped-authorization.js +1 -1
  541. package/dist/src/runtime/loaders/compile-metadata.js +1 -1
  542. package/dist/src/runtime/loaders/manifest.js +1 -1
  543. package/dist/src/runtime/prompt/compose.d.ts +0 -6
  544. package/dist/src/runtime/prompt/compose.js +1 -1
  545. package/dist/src/runtime/resolve-agent-graph.js +1 -1
  546. package/dist/src/runtime/resolve-agent.js +1 -1
  547. package/dist/src/runtime/resolve-connection.js +1 -1
  548. package/dist/src/runtime/resolve-dynamic-tool.js +1 -1
  549. package/dist/src/runtime/resolve-tool.d.ts +2 -1
  550. package/dist/src/runtime/resolve-tool.js +1 -1
  551. package/dist/src/runtime/sandbox/keys.js +1 -1
  552. package/dist/src/runtime/sandbox/registry.d.ts +4 -20
  553. package/dist/src/runtime/sandbox/registry.js +1 -1
  554. package/dist/src/runtime/sessions/compiled-agent-cache.js +1 -1
  555. package/dist/src/runtime/sessions/runtime-context-keys.js +1 -1
  556. package/dist/src/runtime/sessions/turn.d.ts +3 -1
  557. package/dist/src/runtime/skills/sandbox-access.d.ts +1 -1
  558. package/dist/src/runtime/subagents/dynamic-agent-config.js +1 -1
  559. package/dist/src/runtime/subagents/dynamic-remote-agent-config.js +1 -1
  560. package/dist/src/runtime/subagents/registry.d.ts +0 -27
  561. package/dist/src/runtime/subagents/registry.js +1 -1
  562. package/dist/src/runtime/tools/registry.js +1 -1
  563. package/dist/src/runtime/types.d.ts +11 -27
  564. package/dist/src/sandbox/backends/default.d.ts +49 -0
  565. package/dist/src/sandbox/backends/default.js +1 -0
  566. package/dist/src/sandbox/backends/docker.d.ts +14 -0
  567. package/dist/src/sandbox/backends/docker.js +1 -0
  568. package/dist/src/sandbox/backends/just-bash.d.ts +17 -0
  569. package/dist/src/sandbox/backends/just-bash.js +1 -0
  570. package/dist/src/sandbox/backends/microsandbox.d.ts +17 -0
  571. package/dist/src/sandbox/backends/microsandbox.js +1 -0
  572. package/dist/src/sandbox/backends/vercel.d.ts +30 -0
  573. package/dist/src/sandbox/backends/vercel.js +1 -0
  574. package/dist/src/services/dev-client/runtime-artifacts.d.ts +2 -0
  575. package/dist/src/services/dev-client/runtime-artifacts.js +1 -1
  576. package/dist/src/services/dev-client.d.ts +1 -1
  577. package/dist/src/setup/channel-add-conflicts.js +1 -1
  578. package/dist/src/setup/cli/select-component.js +1 -1
  579. package/dist/src/setup/flows/link.js +1 -1
  580. package/dist/src/setup/flows/model-source-change.js +1 -1
  581. package/dist/src/setup/flows/model.js +1 -1
  582. package/dist/src/setup/flows/registry.d.ts +7 -1
  583. package/dist/src/setup/flows/registry.js +1 -1
  584. package/dist/src/setup/integrations/runner.js +1 -1
  585. package/dist/src/setup/prompter.js +1 -1
  586. package/dist/src/setup/scaffold/create/add-to-project.js +1 -1
  587. package/dist/src/setup/scaffold/create/project.js +40 -3
  588. package/dist/src/setup/scaffold/create/web-template.d.ts +8 -8
  589. package/dist/src/setup/scaffold/create/web-template.js +336 -120
  590. package/dist/src/setup/scaffold/update/channels.js +1 -1
  591. package/dist/src/setup/scaffold/update/connections.js +1 -1
  592. package/dist/src/setup/vercel-project.js +0 -0
  593. package/dist/src/{runtime/actions/types.d.ts → shared/action-types.d.ts} +12 -12
  594. package/dist/src/{runtime/actions/types.js → shared/action-types.js} +1 -1
  595. package/dist/src/shared/agent-definition.d.ts +3 -10
  596. package/dist/src/shared/agent-definition.js +1 -1
  597. package/dist/src/shared/channel-definition.d.ts +5 -1
  598. package/dist/src/{runtime/connections/types.d.ts → shared/connection-types.d.ts} +3 -13
  599. package/dist/src/{runtime/input/types.d.ts → shared/input.d.ts} +1 -1
  600. package/dist/src/shared/input.js +1 -0
  601. package/dist/src/shared/instructions-definition.d.ts +2 -0
  602. package/dist/src/shared/instructions-definition.js +1 -1
  603. package/dist/src/shared/objects.d.ts +5 -0
  604. package/dist/src/shared/objects.js +1 -0
  605. package/dist/src/shared/sandbox-definition.d.ts +1 -1
  606. package/dist/src/shared/skill-definition.d.ts +2 -0
  607. package/dist/src/shared/skill-definition.js +1 -1
  608. package/dist/src/{execution/skills/types.d.ts → shared/skill-types.d.ts} +1 -1
  609. package/dist/src/shared/skill-types.js +1 -0
  610. package/dist/src/{runtime/connections → shared}/validate-authorization.d.ts +1 -1
  611. package/dist/src/shared/vercel-project.d.ts +1 -0
  612. package/dist/src/shared/vercel-project.js +1 -1
  613. package/dist/src/svelte/index.js +1 -1
  614. package/dist/src/svelte/use-eve-agent.d.ts +8 -4
  615. package/dist/src/svelte/use-eve-agent.js +1 -1
  616. package/dist/src/tasks/json.d.ts +4 -89
  617. package/dist/src/tasks/json.js +1 -1
  618. package/dist/src/tasks/session-index.d.ts +1 -1
  619. package/dist/src/tasks/task-id.d.ts +0 -1
  620. package/dist/src/tasks/task-id.js +1 -1
  621. package/dist/src/tasks/types.d.ts +1 -1
  622. package/dist/src/tasks/types.js +1 -1
  623. package/dist/src/{public/tools/approval/approval-helpers.d.ts → tools/approval/policies.d.ts} +1 -1
  624. package/dist/src/tools/approval/policies.js +1 -0
  625. package/dist/src/tools/auth.d.ts +35 -0
  626. package/dist/src/tools/auth.js +1 -0
  627. package/dist/src/{public/definitions/tool.d.ts → tools/definition.d.ts} +42 -138
  628. package/dist/src/tools/definition.js +1 -0
  629. package/dist/src/{shared/durable-dynamic-tool-callbacks.d.ts → tools/durable-callbacks.d.ts} +1 -1
  630. package/dist/src/tools/durable-callbacks.js +1 -0
  631. package/dist/src/tools/dynamic.d.ts +68 -0
  632. package/dist/src/tools/dynamic.js +1 -0
  633. package/dist/src/tools/framework/agent-contract.d.ts +8 -0
  634. package/dist/src/tools/framework/agent-contract.js +1 -0
  635. package/dist/src/tools/framework/agent.d.ts +17 -0
  636. package/dist/src/tools/framework/agent.js +1 -0
  637. package/dist/src/tools/framework/ask-question.d.ts +50 -0
  638. package/dist/src/tools/framework/ask-question.js +1 -0
  639. package/dist/src/tools/framework/connection-search.d.ts +3 -0
  640. package/dist/src/tools/framework/connection-search.js +1 -0
  641. package/dist/src/tools/framework/task-cancel.d.ts +29 -0
  642. package/dist/src/tools/framework/task-cancel.js +1 -0
  643. package/dist/src/tools/framework/task-contract.d.ts +167 -0
  644. package/dist/src/tools/framework/task-contract.js +1 -0
  645. package/dist/src/tools/framework/task-update.d.ts +9 -0
  646. package/dist/src/tools/framework/task-update.js +1 -0
  647. package/dist/src/{public/tools/output-builders.d.ts → tools/model-output.d.ts} +41 -1
  648. package/dist/src/tools/provided/bash.d.ts +29 -0
  649. package/dist/src/tools/provided/bash.js +1 -0
  650. package/dist/src/tools/provided/glob.d.ts +26 -0
  651. package/dist/src/tools/provided/glob.js +2 -0
  652. package/dist/src/{runtime/framework-tools → tools/provided}/grep.d.ts +10 -10
  653. package/dist/src/tools/provided/grep.js +2 -0
  654. package/dist/src/tools/provided/load-skill.d.ts +2 -0
  655. package/dist/src/tools/provided/load-skill.js +1 -0
  656. package/dist/src/tools/provided/read-file.d.ts +27 -0
  657. package/dist/src/tools/provided/read-file.js +2 -0
  658. package/dist/src/{public/tools/sleep/index.d.ts → tools/provided/sleep.d.ts} +3 -3
  659. package/dist/src/tools/provided/sleep.js +1 -0
  660. package/dist/src/tools/provided/todo.d.ts +8 -0
  661. package/dist/src/tools/provided/todo.js +2 -0
  662. package/dist/src/{runtime/framework-tools → tools/provided}/web-fetch.d.ts +5 -2
  663. package/dist/src/tools/provided/web-fetch.js +2 -0
  664. package/dist/src/tools/provided/web-search.d.ts +39 -0
  665. package/dist/src/tools/provided/web-search.js +1 -0
  666. package/dist/src/tools/provided/write-file.d.ts +23 -0
  667. package/dist/src/tools/provided/write-file.js +2 -0
  668. package/dist/src/tools/workflow.d.ts +37 -0
  669. package/dist/src/tools/workflow.js +1 -0
  670. package/dist/src/tracing/agent-action-instrumentation.js +1 -1
  671. package/dist/src/tracing/agent-approval-instrumentation.js +1 -1
  672. package/dist/src/tracing/agent-channel-delivery-instrumentation.js +1 -1
  673. package/dist/src/tracing/agent-otel-provider.js +2 -2
  674. package/dist/src/tracing/agent-otel-session-context.d.ts +1 -1
  675. package/dist/src/tracing/agent-otel-session-context.js +1 -1
  676. package/dist/src/tracing/agent-span-id-generator.d.ts +1 -0
  677. package/dist/src/tracing/agent-span-id-generator.js +1 -1
  678. package/dist/src/tracing/agent-trace-context-store.d.ts +1 -1
  679. package/dist/src/tracing/agent-trace-context-store.js +1 -1
  680. package/dist/src/tracing/agent-trace-span-processor.js +1 -1
  681. package/dist/src/tracing/agent-trace-state.d.ts +2 -6
  682. package/dist/src/tracing/agent-trace-state.js +1 -1
  683. package/dist/src/tracing/install-instrumentation-runtime.js +1 -1
  684. package/dist/src/tracing/local-trace-reader.d.ts +1 -3
  685. package/dist/src/tracing/local-trace-reader.js +1 -1
  686. package/dist/src/tracing/otel-declaration.d.ts +1 -2
  687. package/dist/src/tracing/otel-registration.js +1 -1
  688. package/dist/src/tracing/sampled-trace.d.ts +10 -2
  689. package/dist/src/tracing/sampled-trace.js +1 -1
  690. package/dist/src/vue/index.js +1 -1
  691. package/dist/src/vue/use-eve-agent.d.ts +8 -4
  692. package/dist/src/vue/use-eve-agent.js +1 -1
  693. package/docs/agent-config.md +16 -4
  694. package/docs/channels/chat-sdk.mdx +1 -1
  695. package/docs/channels/discord.mdx +5 -1
  696. package/docs/channels/eve.mdx +19 -3
  697. package/docs/channels/github.mdx +2 -0
  698. package/docs/channels/linear.mdx +1 -1
  699. package/docs/channels/linq.mdx +1 -1
  700. package/docs/channels/overview.mdx +1 -1
  701. package/docs/channels/photon.mdx +4 -4
  702. package/docs/channels/slack.mdx +20 -3
  703. package/docs/channels/teams.mdx +1 -1
  704. package/docs/channels/telegram.mdx +2 -0
  705. package/docs/concepts/built-in-tools.md +31 -21
  706. package/docs/concepts/sessions-runs-and-streaming.md +3 -1
  707. package/docs/connections/overview.mdx +1 -1
  708. package/docs/extensions.md +2 -2
  709. package/docs/getting-started.mdx +10 -9
  710. package/docs/guides/auth-and-route-protection.md +3 -3
  711. package/docs/guides/client/output-schema.mdx +2 -2
  712. package/docs/guides/client/overview.mdx +4 -2
  713. package/docs/guides/dev-tui.md +26 -15
  714. package/docs/guides/frontend/nuxt.mdx +4 -3
  715. package/docs/guides/frontend/overview.mdx +21 -18
  716. package/docs/guides/frontend/sveltekit.mdx +4 -3
  717. package/docs/guides/frontend/use-eve-agent-svelte.mdx +5 -4
  718. package/docs/guides/frontend/use-eve-agent-vue.mdx +5 -4
  719. package/docs/guides/instrumentation.md +1 -0
  720. package/docs/guides/remote-agents.md +37 -18
  721. package/docs/meta.json +1 -1
  722. package/docs/patterns/multi-tenant-approvals.md +1 -1
  723. package/docs/reference/cli.md +2 -4
  724. package/docs/reference/typescript-api.md +35 -31
  725. package/docs/sandbox.mdx +21 -1
  726. package/docs/subagents/index.mdx +11 -28
  727. package/docs/tools/human-in-the-loop.md +43 -2
  728. package/docs/tools/overview.mdx +1 -1
  729. package/package.json +59 -9
  730. package/dist/src/compiler/normalize-extension.d.ts +0 -80
  731. package/dist/src/compiler/normalize-extension.js +0 -1
  732. package/dist/src/execution/sandbox/write-file-tool.js +0 -1
  733. package/dist/src/execution/web-fetch/tool.js +0 -1
  734. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response-from-manifest.d.ts +0 -9
  735. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response-from-manifest.js +0 -1
  736. package/dist/src/internal/nitro/routes/health.d.ts +0 -14
  737. package/dist/src/internal/nitro/routes/health.js +0 -1
  738. package/dist/src/node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js +0 -1
  739. package/dist/src/public/definitions/tool.js +0 -1
  740. package/dist/src/public/tool-result-narrowing.js +0 -1
  741. package/dist/src/public/tools/approval/approval-helpers.js +0 -1
  742. package/dist/src/public/tools/defaults.d.ts +0 -46
  743. package/dist/src/public/tools/defaults.js +0 -1
  744. package/dist/src/public/tools/define-bash-tool.d.ts +0 -21
  745. package/dist/src/public/tools/define-bash-tool.js +0 -1
  746. package/dist/src/public/tools/define-glob-tool.d.ts +0 -22
  747. package/dist/src/public/tools/define-glob-tool.js +0 -1
  748. package/dist/src/public/tools/define-grep-tool.d.ts +0 -22
  749. package/dist/src/public/tools/define-grep-tool.js +0 -1
  750. package/dist/src/public/tools/define-read-file-tool.d.ts +0 -21
  751. package/dist/src/public/tools/define-read-file-tool.js +0 -1
  752. package/dist/src/public/tools/define-write-file-tool.d.ts +0 -22
  753. package/dist/src/public/tools/define-write-file-tool.js +0 -1
  754. package/dist/src/public/tools/internal.d.ts +0 -13
  755. package/dist/src/public/tools/internal.js +0 -1
  756. package/dist/src/public/tools/sleep/index.js +0 -1
  757. package/dist/src/runtime/connections/callback-route.js +0 -1
  758. package/dist/src/runtime/framework-channels/index.d.ts +0 -6
  759. package/dist/src/runtime/framework-channels/index.js +0 -1
  760. package/dist/src/runtime/framework-tools/agent.d.ts +0 -29
  761. package/dist/src/runtime/framework-tools/agent.js +0 -1
  762. package/dist/src/runtime/framework-tools/ask-question.d.ts +0 -35
  763. package/dist/src/runtime/framework-tools/ask-question.js +0 -1
  764. package/dist/src/runtime/framework-tools/bash.d.ts +0 -24
  765. package/dist/src/runtime/framework-tools/bash.js +0 -1
  766. package/dist/src/runtime/framework-tools/connection-search-dynamic.d.ts +0 -19
  767. package/dist/src/runtime/framework-tools/connection-search-dynamic.js +0 -2
  768. package/dist/src/runtime/framework-tools/final-output.js +0 -1
  769. package/dist/src/runtime/framework-tools/glob.d.ts +0 -26
  770. package/dist/src/runtime/framework-tools/glob.js +0 -2
  771. package/dist/src/runtime/framework-tools/grep.js +0 -2
  772. package/dist/src/runtime/framework-tools/index.d.ts +0 -39
  773. package/dist/src/runtime/framework-tools/index.js +0 -1
  774. package/dist/src/runtime/framework-tools/read-file.d.ts +0 -27
  775. package/dist/src/runtime/framework-tools/read-file.js +0 -2
  776. package/dist/src/runtime/framework-tools/skill.d.ts +0 -12
  777. package/dist/src/runtime/framework-tools/skill.js +0 -1
  778. package/dist/src/runtime/framework-tools/subagent/local.js +0 -1
  779. package/dist/src/runtime/framework-tools/subagent/remote.js +0 -1
  780. package/dist/src/runtime/framework-tools/tasks.d.ts +0 -91
  781. package/dist/src/runtime/framework-tools/tasks.js +0 -1
  782. package/dist/src/runtime/framework-tools/web-fetch.js +0 -2
  783. package/dist/src/runtime/framework-tools/web-search.js +0 -1
  784. package/dist/src/runtime/framework-tools/write-file.d.ts +0 -23
  785. package/dist/src/runtime/framework-tools/write-file.js +0 -2
  786. package/dist/src/runtime/governance/auth/jwt-ecdsa.js +0 -1
  787. package/dist/src/runtime/governance/auth/jwt-hmac.js +0 -1
  788. package/dist/src/runtime/governance/auth/oidc.js +0 -1
  789. package/dist/src/runtime/input/types.js +0 -1
  790. package/dist/src/runtime/session-callback-route.d.ts +0 -6
  791. package/dist/src/runtime/session-callback-route.js +0 -1
  792. package/dist/src/runtime/task-input-response-route.d.ts +0 -5
  793. package/dist/src/runtime/task-input-response-route.js +0 -1
  794. package/dist/src/shared/durable-dynamic-tool-callbacks.js +0 -1
  795. package/dist/src/shared/dynamic-tool-definition.d.ts +0 -154
  796. package/dist/src/shared/dynamic-tool-definition.js +0 -1
  797. package/dist/src/shared/eve-server-health.d.ts +0 -5
  798. package/dist/src/shared/eve-server-health.js +0 -1
  799. package/dist/src/shared/tool-definition.d.ts +0 -89
  800. /package/dist/src/{runtime/governance → channel}/auth/http-basic.js +0 -0
  801. /package/dist/src/{runtime/governance → channel}/auth/token-claims.js +0 -0
  802. /package/dist/src/{runtime/governance → channel}/auth/types.js +0 -0
  803. /package/dist/src/{runtime/governance → channel}/auth/vercel-oidc-project.js +0 -0
  804. /package/dist/src/{runtime/governance/network → channel}/ip-allow-list.d.ts +0 -0
  805. /package/dist/src/{runtime/governance/network → channel}/ip-allow-list.js +0 -0
  806. /package/dist/src/{execution/skills/types.js → context/session-context.js} +0 -0
  807. /package/dist/src/execution/sandbox/{bash-tool.js → bash.js} +0 -0
  808. /package/dist/src/{runtime/framework-tools → execution/tools}/file-state.js +0 -0
  809. /package/dist/src/{runtime/framework-tools → execution/tools}/sleep.d.ts +0 -0
  810. /package/dist/src/{runtime/framework-tools → execution/tools}/sleep.js +0 -0
  811. /package/dist/src/execution/web-fetch/{tool.d.ts → execute.d.ts} +0 -0
  812. /package/dist/src/{shared/tool-definition.js → runtime/connections/registry-types.js} +0 -0
  813. /package/dist/src/{runtime/connections/types.js → shared/connection-types.js} +0 -0
  814. /package/dist/src/{runtime/sessions/auth.d.ts → shared/session-auth.d.ts} +0 -0
  815. /package/dist/src/{runtime/sessions/auth.js → shared/session-auth.js} +0 -0
  816. /package/dist/src/{runtime/connections → shared}/validate-authorization.js +0 -0
  817. /package/dist/src/{public/tools/output-builders.js → tools/model-output.js} +0 -0
  818. /package/dist/src/{shared/tool-schema.d.ts → tools/schema.d.ts} +0 -0
  819. /package/dist/src/{shared/tool-schema.js → tools/schema.js} +0 -0
  820. /package/dist/src/{shared/tool-task.d.ts → tools/task.d.ts} +0 -0
  821. /package/dist/src/{shared/tool-task.js → tools/task.js} +0 -0
@@ -1,80 +0,0 @@
1
- import { type AgentSourceManifest, type LocalSubagentSourceRef, type ResolvedExtensionMount } from "#discover/manifest.js";
2
- import type { CompiledChannelEntry, CompiledConnectionDefinition, CompiledDynamicInstructionsDefinition, CompiledDynamicSkillDefinition, CompiledDynamicToolDefinition, CompiledHookDefinition, CompiledInstructionsDefinition, CompiledScheduleDefinition, CompiledSkillDefinition, CompiledToolDefinition } from "#compiler/manifest.js";
3
- import type { ManifestCompileContext } from "#compiler/normalize-helpers.js";
4
- /**
5
- * Contributions one mounted extension composes into the consuming agent,
6
- * already namespaced by the mount and rebased onto the consumer's agent root.
7
- */
8
- export interface CompiledExtensionContributions {
9
- readonly channels: CompiledChannelEntry[];
10
- readonly tools: CompiledToolDefinition[];
11
- readonly dynamicTools: CompiledDynamicToolDefinition[];
12
- readonly hooks: CompiledHookDefinition[];
13
- readonly skills: CompiledSkillDefinition[];
14
- readonly dynamicSkills: CompiledDynamicSkillDefinition[];
15
- readonly dynamicInstructions: CompiledDynamicInstructionsDefinition[];
16
- readonly connections: CompiledConnectionDefinition[];
17
- readonly instructions: CompiledInstructionsDefinition[];
18
- readonly schedules: CompiledScheduleDefinition[];
19
- }
20
- /**
21
- * Compiles one mounted extension's source tree and namespaces its
22
- * contributions by the mount name. Module-backed contributions keep loading
23
- * from the extension package because their `logicalPath` is rebased to a
24
- * consumer-relative path — the module-map codegen resolves it against the
25
- * consumer's agent root, reaching into the extension package unchanged.
26
- *
27
- * When the mount was authored as a directory (`extensions/<ns>/`), any
28
- * consumer-authored override slots are composed under the same namespace and
29
- * win on name collision: an override tool `<ns>__search` shadows the
30
- * extension's own `<ns>__search`.
31
- */
32
- export declare function compileExtensionContributions(input: {
33
- readonly mount: ResolvedExtensionMount;
34
- readonly context: ManifestCompileContext;
35
- readonly consumerAgentRoot: string;
36
- readonly externalDependencies: readonly string[];
37
- }): Promise<CompiledExtensionContributions>;
38
- /** Composes one mount's root-visible subagents under its namespace. */
39
- export declare function composeExtensionSubagentSources(input: {
40
- readonly consumerAgentRoot: string;
41
- readonly mount: ResolvedExtensionMount;
42
- }): LocalSubagentSourceRef[];
43
- /** Returns authored and mounted-extension subagents visible from one agent node. */
44
- export declare function composeAgentSubagentSources(manifest: AgentSourceManifest): LocalSubagentSourceRef[];
45
- /** Earlier entries win, matching directory-override precedence for other slots. */
46
- export declare function mergeExtensionSubagentSources(primary: readonly LocalSubagentSourceRef[], secondary: readonly LocalSubagentSourceRef[]): LocalSubagentSourceRef[];
47
- export interface DisabledToolTarget {
48
- /** Namespaced target, e.g. `crm__search`. */
49
- readonly name: string;
50
- /** Override-relative authored path, e.g. `tools/search.ts`, for diagnostics. */
51
- readonly logicalPath: string;
52
- }
53
- /**
54
- * Removes the extension tools an override slot opted out of with `disableTool()`.
55
- * A `disableTool()` targets a slot by name, so it removes the extension's
56
- * same-named static tool or dynamic resolver — whichever kind occupies the slot.
57
- * A disable that matches neither throws rather than silently disabling nothing.
58
- *
59
- * Exported for unit testing.
60
- */
61
- export declare function applyOverrideDisables(input: {
62
- readonly merged: CompiledExtensionContributions;
63
- readonly disables: readonly DisabledToolTarget[];
64
- readonly extensionToolNames: ReadonlySet<string>;
65
- readonly extensionDynamicToolSlugs: ReadonlySet<string>;
66
- readonly namespace: string;
67
- }): CompiledExtensionContributions;
68
- /**
69
- * Merges two composed contribution sets with earlier-set-wins precedence per
70
- * composed name. Named contributions dedup by their composed identifier so
71
- * an override shadows the extension's same-named entry. Channel entries dedup
72
- * as a group so every route from the winning channel is preserved. Unnamed
73
- * contributions (hooks, dynamic skills, dynamic instructions, static
74
- * instructions) simply concatenate.
75
- *
76
- * Exported for unit testing: passing the consumer overrides as `primary` and
77
- * the extension's own contributions as `secondary` yields consumer-wins
78
- * shadowing on name collision.
79
- */
80
- export declare function mergeContributions(primary: CompiledExtensionContributions, secondary: CompiledExtensionContributions): CompiledExtensionContributions;
@@ -1 +0,0 @@
1
- import{join,relative}from"node:path";import{compileChannelDefinition}from"#compiler/normalize-channel.js";import{createPathDerivedSourceId}from"#discover/manifest.js";import{compileConnectionDefinition}from"#compiler/normalize-connection.js";import{compileHookEntry}from"#compiler/normalize-hook.js";import{compileInstructionsEntry}from"#compiler/normalize-instructions.js";import{compileScheduleDefinition}from"#compiler/normalize-schedule.js";import{compileSkillSource}from"#compiler/normalize-skill.js";import{compileToolEntry}from"#compiler/normalize-tool.js";async function compileExtensionContributions(e){let{mount:t,consumerAgentRoot:n}=e,r={externalDependencies:e.externalDependencies},i=await composeManifestContributions({manifest:t.manifest,namespace:t.namespace,consumerAgentRoot:n,options:r,sourceIdScope:`ext:${t.namespace}`,role:`extension`});if(t.overrides===void 0)return i.contributions;let a=await composeManifestContributions({manifest:t.overrides,namespace:t.namespace,consumerAgentRoot:n,options:r,sourceIdScope:`ext-override:${t.namespace}`,role:`override`});return applyOverrideDisables({merged:mergeContributions(a.contributions,i.contributions),disables:a.disabledToolTargets,extensionToolNames:new Set(i.contributions.tools.map(e=>e.name)),extensionDynamicToolSlugs:new Set(i.contributions.dynamicTools.map(e=>e.slug)),namespace:t.namespace})}function composeExtensionSubagentSources(e){let t=scopeExtensionSubagents({consumerAgentRoot:e.consumerAgentRoot,manifest:e.mount.manifest,namespace:e.mount.namespace,sourceIdScope:`ext:${e.mount.namespace}`,sourceRoot:e.mount.sourceRoot});return e.mount.overrides===void 0?t:mergeExtensionSubagentSources(scopeExtensionSubagents({consumerAgentRoot:e.consumerAgentRoot,manifest:e.mount.overrides,namespace:e.mount.namespace,sourceIdScope:`ext-override:${e.mount.namespace}`,sourceRoot:e.mount.overrides.agentRoot}),t)}function composeAgentSubagentSources(e){return[...e.subagents,...[...e.resolvedExtensions].sort((e,t)=>e.namespace.localeCompare(t.namespace)).flatMap(t=>composeExtensionSubagentSources({consumerAgentRoot:e.agentRoot,mount:t}))]}function mergeExtensionSubagentSources(e,t){return dedupeBy([...e,...t],e=>e.subagentId)}function scopeExtensionSubagents(e){return e.manifest.subagents.map(n=>({...scopeExtensionSubagentSource(n,e.sourceRoot,e.sourceIdScope),logicalPath:relative(e.consumerAgentRoot,n.entryPath).replaceAll(`\\`,`/`),subagentId:`${e.namespace}__${n.subagentId}`}))}function scopeExtensionSubagentSource(e,t,n){return{...e,manifest:scopeExtensionSubagentManifest(e.manifest,t,n),sourceId:scopeExtensionSourceId(t,e.entryPath,n)}}function scopeExtensionSubagentManifest(t,n,r){let scopeRef=i=>({...i,sourceId:scopeExtensionSourceId(n,join(t.agentRoot,i.logicalPath),r)});return{...t,channels:t.channels.map(scopeRef),connections:t.connections.map(scopeRef),...t.configModule===void 0?{}:{configModule:scopeRef(t.configModule)},extensions:t.extensions.map(scopeRef),hooks:t.hooks.map(scopeRef),instructions:t.instructions.map(scopeRef),lib:t.lib.map(scopeRef),sandbox:t.sandbox===null?null:scopeRef(t.sandbox),sandboxWorkspaces:t.sandboxWorkspaces.map(scopeRef),schedules:t.schedules.map(scopeRef),skills:t.skills.map(scopeRef),subagents:t.subagents.map(e=>scopeExtensionSubagentSource(e,n,r)),tools:t.tools.map(scopeRef)}}function scopeExtensionSourceId(e,n,i){return`${i}:${createPathDerivedSourceId(relative(e,n).replaceAll(`\\`,`/`))}`}function applyOverrideDisables(e){if(e.disables.length===0)return e.merged;let t=e.namespace.length+2,n=new Set;for(let r of e.disables){if(!e.extensionToolNames.has(r.name)&&!e.extensionDynamicToolSlugs.has(r.name)){let n=[...e.extensionToolNames,...e.extensionDynamicToolSlugs].map(e=>e.slice(t)).sort();throw Error(`The override "agent/extensions/${e.namespace}/${r.logicalPath}" calls disableTool(), but the "${e.namespace}" extension contributes no tool named "${r.name.slice(t)}". It contributes: ${n.length>0?n.join(`, `):`(no tools)`}.`)}n.add(r.name)}return{...e.merged,tools:e.merged.tools.filter(e=>!n.has(e.name)),dynamicTools:e.merged.dynamicTools.filter(e=>!n.has(e.slug))}}async function composeManifestContributions(r){let{manifest:o,namespace:s,consumerAgentRoot:c,options:l,sourceIdScope:u,role:d}=r,f=o.agentRoot,p=`${s}__`,scopeSourceId=e=>`${u}:${e}`,rebase=n=>relative(c,join(f,n)).replaceAll(`\\`,`/`),m=(await Promise.all(o.channels.map(e=>compileChannelDefinition(f,e,l)))).flat().map(e=>e.kind===`disabled`?{...e,name:`${p}${e.name}`,logicalPath:rebase(e.logicalPath)}:{...e,name:`${p}${e.name}`,sourceId:scopeSourceId(e.sourceId),logicalPath:rebase(e.logicalPath)}),h=[],g=[],_=[];for(let e of o.tools){let t=await compileToolEntry(f,e,l);if(t.kind===`tool`)h.push({...t.definition,name:`${p}${t.definition.name}`,sourceId:scopeSourceId(t.definition.sourceId),logicalPath:rebase(t.definition.logicalPath)});else if(t.kind===`dynamic-tool`)g.push({...t.definition,slug:`${p}${t.definition.slug}`,extensionNamespace:s,sourceId:scopeSourceId(t.definition.sourceId),logicalPath:rebase(t.definition.logicalPath)});else if(t.kind===`workflow-tool`)throw Error(`${describeExtensionSource(d,s,e.logicalPath)} enables the Workflow tool, but the Workflow tool is the consuming agent's to enable, not an extension's. Remove it.`);else if(t.kind===`web-search-tool`)throw Error(`${describeExtensionSource(d,s,e.logicalPath)} configures web search, but the web search provider is the consuming agent's to configure, not an extension's. Remove it.`);else if(d===`extension`)throw Error(`${describeExtensionSource(d,s,e.logicalPath)} calls disableTool(), but an extension cannot disable framework tools — that is the consuming agent's to own. Remove it.`);else _.push({name:`${p}${t.name}`,logicalPath:e.logicalPath})}let v=o.hooks.map(e=>{let t=compileHookEntry(e);return{...t,slug:`${p}${t.slug}`,sourceId:scopeSourceId(t.sourceId),logicalPath:rebase(t.logicalPath)}}),y=[],b=[];for(let e of o.skills){let t=await compileSkillSource(f,e,l);t.kind===`skill`?y.push({...t.definition,name:`${p}${t.definition.name}`,sourceId:scopeSourceId(t.definition.sourceId),logicalPath:rebase(t.definition.logicalPath)}):b.push({...t.definition,slug:`${p}${t.definition.slug}`,extensionNamespace:s,sourceId:scopeSourceId(t.definition.sourceId),logicalPath:rebase(t.definition.logicalPath)})}let x=(await Promise.all(o.connections.map(e=>compileConnectionDefinition(f,e,l)))).map(e=>({...e,connectionName:`${p}${e.connectionName}`,sourceId:scopeSourceId(e.sourceId),logicalPath:rebase(e.logicalPath)})),S=[],C=[];for(let e of o.instructions){let t=await compileInstructionsEntry(f,e,l);t.kind===`instructions`?C.push({...t.definition,sourceId:scopeSourceId(t.definition.sourceId),logicalPath:rebase(t.definition.logicalPath)}):S.push({...t.definition,slug:`${p}${t.definition.slug}`,sourceId:scopeSourceId(t.definition.sourceId),logicalPath:rebase(t.definition.logicalPath)})}return{contributions:{channels:m,tools:h,dynamicTools:g,hooks:v,skills:y,dynamicSkills:b,dynamicInstructions:S,connections:x,instructions:C,schedules:await Promise.all(o.schedules.map(async e=>{let t=await compileScheduleDefinition(f,e,l);return{...t,name:`${p}${t.name}`,sourceId:scopeSourceId(t.sourceId),logicalPath:rebase(t.logicalPath)}}))},disabledToolTargets:_}}function describeExtensionSource(e,t,n){return e===`override`?`The override "agent/extensions/${t}/${n}"`:`The "${t}" extension's "${n}"`}function mergeContributions(e,t){let n=new Set(e.channels.map(e=>e.name));return{channels:[...e.channels,...t.channels.filter(e=>!n.has(e.name))],tools:dedupeBy([...e.tools,...t.tools],e=>e.name),dynamicTools:dedupeBy([...e.dynamicTools,...t.dynamicTools],e=>e.slug),connections:dedupeBy([...e.connections,...t.connections],e=>e.connectionName),skills:dedupeBy([...e.skills,...t.skills],e=>e.name),schedules:dedupeBy([...e.schedules,...t.schedules],e=>e.name),hooks:[...e.hooks,...t.hooks],dynamicSkills:[...e.dynamicSkills,...t.dynamicSkills],dynamicInstructions:[...e.dynamicInstructions,...t.dynamicInstructions],instructions:[...e.instructions,...t.instructions]}}function dedupeBy(e,t){let n=new Set,r=[];for(let i of e){let e=t(i);n.has(e)||(n.add(e),r.push(i))}return r}export{applyOverrideDisables,compileExtensionContributions,composeAgentSubagentSources,composeExtensionSubagentSources,mergeContributions,mergeExtensionSubagentSources};
@@ -1 +0,0 @@
1
- import{loadContext}from"#context/container.js";import{ReadFileStateKey,buildReadFileTargetKey,createReadFileStamp,normalizeModelPath,setReadFileStamp}from"#runtime/framework-tools/file-state.js";import{resolveAbsoluteFilePath}from"#execution/sandbox/require-sandbox.js";async function executeWriteFileOnSandbox(e,t){let{filePath:n,content:r}=t,i=await resolveAbsoluteFilePath(e,n),a=loadContext(),o=normalizeModelPath(i),s=buildReadFileTargetKey(o),c=await e.readTextFile({path:i});if(c===null)return await e.writeTextFile({content:r,path:i}),setReadFileStamp(a,s,createReadFileStamp({content:r,filePath:o})),{existed:!1,path:o};let l=a.ensure(ReadFileStateKey,()=>({byTarget:{}})).byTarget[s];if(l===void 0)throw Error(`You must read file ${n} before overwriting it. Use the read_file tool first.`);let u=createReadFileStamp({content:c,filePath:o});if(u.contentHash!==l.contentHash||u.byteLength!==l.byteLength)throw Error(`File ${n} has been modified since it was last read. Please read the file again before modifying it.`);return await e.writeTextFile({content:r,path:i}),setReadFileStamp(a,s,createReadFileStamp({content:r,filePath:o})),{existed:!0,path:o}}export{executeWriteFileOnSandbox};
@@ -1 +0,0 @@
1
- import{truncateHead}from"#execution/sandbox/truncate-output.js";import{EVE_PACKAGE_NAME}from"#internal/package-name.js";import{convertHtmlToMarkdown,extractTextFromHtml}from"#execution/web-fetch/html.js";import{requestPublicUrl}from"#execution/web-fetch/request.js";const MAX_RESPONSE_SIZE=5*1024*1024;async function executeWebFetchTool(n,r){let{url:i,format:a=`markdown`,timeout:o}=n,s=Math.min(o===void 0?3e4:o*1e3,12e4),c=AbortSignal.timeout(s),l=r?.abortSignal===void 0?c:AbortSignal.any([r.abortSignal,c]),u=buildHeaders(a),d=await requestPublicUrl(i,{headers:u,maxResponseSize:MAX_RESPONSE_SIZE,signal:l}),f=d.status===403&&d.headers.get(`cf-mitigated`)===`challenge`?await requestPublicUrl(i,{headers:{...u,"User-Agent":EVE_PACKAGE_NAME},maxResponseSize:MAX_RESPONSE_SIZE,signal:l}):d;if(!f.ok)throw Error(`Request failed with status code: ${f.status}`);let p=await f.arrayBuffer(),m=f.headers.get(`content-type`)??``,h=m.includes(`text/html`),g=new TextDecoder().decode(p),_;_=a===`markdown`&&h?convertHtmlToMarkdown(g):a===`text`&&h?extractTextFromHtml(g):g;let{output:v,truncated:y}=truncateHead(_);return{content:v,contentType:m,truncated:y,url:i}}function buildHeaders(e){let t;return t=e===`markdown`?`text/markdown;q=1.0, text/x-markdown;q=0.9, text/plain;q=0.8, text/html;q=0.7, */*;q=0.1`:e===`text`?`text/plain;q=1.0, text/markdown;q=0.9, text/html;q=0.8, */*;q=0.1`:`text/html;q=1.0, application/xhtml+xml;q=0.9, text/plain;q=0.8, text/markdown;q=0.7, */*;q=0.1`,{Accept:t,"Accept-Language":`en-US,en;q=0.9`,"User-Agent":`Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36`}}export{executeWebFetchTool};
@@ -1,9 +0,0 @@
1
- import type { AgentInfoManifestData } from "#internal/nitro/routes/agent-info/load-agent-info-data.js";
2
- import type { AgentInfoResponse } from "#internal/nitro/routes/agent-info/build-agent-info-response.js";
3
- import { type GatewayCredentialPresence } from "#internal/resolve-model-endpoint-status.js";
4
- import type { ChatGptAuthState } from "#public/models/openai/chatgpt/token-broker.js";
5
- export declare function buildAgentInfoResponseFromManifest(data: AgentInfoManifestData, input: {
6
- readonly mode: AgentInfoResponse["mode"];
7
- readonly gatewayCredentials: GatewayCredentialPresence;
8
- readonly chatgptAuth?: ChatGptAuthState;
9
- }): AgentInfoResponse;
@@ -1 +0,0 @@
1
- import{resolveModelEndpointStatus}from"#internal/resolve-model-endpoint-status.js";import{LOAD_SKILL_TOOL_NAME}from"#runtime/skills/fragment-context.js";import{WORKFLOW_TOOL_NAME}from"#shared/workflow-sandbox.js";import{getAllFrameworkChannelNames,getFrameworkChannelDefinitions}from"#runtime/framework-channels/index.js";import{getAllFrameworkToolNames,getFrameworkDynamicToolResolvers}from"#runtime/framework-tools/index.js";import{buildFrameworkToolInfo,getRootDelegationToolNames,renderChannel,renderDynamicResolver,renderSchedule,renderSubagent,toSource}from"#internal/nitro/routes/agent-info/build-agent-info-response.js";function toChatGptEndpoint(e){if(e!==void 0)return{state:e.kind,...e.kind===`ready`&&e.accountLabel!==void 0&&{accountLabel:e.accountLabel}}}function buildAgentInfoResponseFromManifest(i,a){let o=i.manifest,s=o.channels.filter(e=>e.kind===`channel`),c=o.channels.filter(e=>e.kind===`disabled`).map(e=>e.name),l=new Set(o.tools.map(e=>e.name)),u=new Set(o.disabledFrameworkTools),d=getAllFrameworkToolNames(),f=getAllFrameworkChannelNames(),p=getFrameworkChannelDefinitions(),m=o.tools.map(e=>({...toSource(e),description:e.description,hasAuth:!1,hasCompactionHook:!1,hasExecute:!0,hasModelOutputProjection:!1,hasOutputSchema:e.outputSchema!==void 0&&e.outputSchema!==null,inputSchema:e.inputSchema,name:e.name,origin:`authored`,outputSchema:e.outputSchema??null,replacesFrameworkTool:d.has(e.name),requiresApproval:!1})),h=new Set(s.map(e=>e.name)),g=new Set(c),_=p.filter(e=>!h.has(e.name)&&!g.has(e.name)),v=buildFrameworkToolInfo({authoredToolNames:l,delegationToolNames:getRootDelegationToolNames(o),disabledFrameworkToolNames:u}),y=s.map(e=>({...toSource(e),adapterKind:e.adapterKind,method:e.method,name:e.name,origin:`authored`,urlPath:e.urlPath}));return{agent:{agentRoot:o.agentRoot,appRoot:o.appRoot,configSource:o.config.source?toSource(o.config.source):void 0,description:o.config.description,model:o.config.dynamicModel===void 0?{contextWindowTokens:o.config.model.contextWindowTokens,id:o.config.model.id,providerOptions:o.config.model.providerOptions,reasoning:o.config.reasoning,source:o.config.model.source?toSource(o.config.model.source):void 0,routing:o.config.model.routing,endpoint:resolveModelEndpointStatus(o.config.model.routing,a.gatewayCredentials,toChatGptEndpoint(a.chatgptAuth))}:{reasoning:o.config.reasoning,routing:{kind:`dynamic`}},name:o.config.name,outputSchema:o.config.outputSchema},capabilities:{devRoutes:a.mode===`development`},channels:{authored:y,available:[..._.map(e=>renderChannel(e,{origin:`framework`})),...y],disabledFramework:c,framework:p.filter(e=>f.has(e.name)).map(e=>{let t=h.has(e.name),n=g.has(e.name),r=n?`disabled`:t?`replaced`:`active`;return{...renderChannel(e,{origin:`framework`}),disabledByAuthor:n,replacedByAuthoredChannel:t,status:r}})},connections:o.connections.map(e=>({...toSource(e),connectionName:e.connectionName,description:e.description,hasApproval:!1,hasAuthorization:e.vercelConnect!==void 0,hasHeaders:!1,protocol:e.protocol,url:e.url})),diagnostics:{discoveryErrors:o.diagnosticsSummary.errors,discoveryWarnings:o.diagnosticsSummary.warnings},hooks:o.hooks.map(e=>({...toSource(e),eventNames:[],slug:e.slug})),instructions:{dynamic:o.dynamicInstructions.map(e=>renderDynamicResolver(e,{origin:`authored`})),static:o.instructions.map(e=>({...toSource(e),content:e.content,name:e.name,role:e.role}))},kind:`eve-agent-info`,mode:a.mode,sandbox:o.sandbox===null?null:{...toSource(o.sandbox),description:o.sandbox.description,hasBootstrap:!1,hasOnSession:!1,revalidationKey:o.sandbox.revalidationKey,sourceHash:o.sandbox.sourceHash},schedules:i.schedules.map(renderSchedule),skills:{static:o.skills.map(e=>({...toSource(e),description:e.description,license:e.license,markdown:e.markdown,metadata:e.metadata,name:e.name})),dynamic:o.dynamicSkills.map(e=>renderDynamicResolver(e,{origin:`authored`}))},subagents:{local:o.subagents.map(renderSubagent),total:o.subagents.length},tools:{available:[...v.available,...m],authored:m,disabledFramework:[...o.disabledFrameworkTools],dynamic:[...getFrameworkDynamicToolResolvers().map(e=>renderDynamicResolver(e,{origin:`framework`})),...o.dynamicTools.map(e=>renderDynamicResolver(e,{origin:`authored`}))],framework:v.framework,reserved:[WORKFLOW_TOOL_NAME,LOAD_SKILL_TOOL_NAME]},version:2,workflow:{enabled:o.workflowTool!==void 0,toolName:WORKFLOW_TOOL_NAME},workspace:{resourceRoot:o.workspaceResourceRoot,rootEntries:[...o.workspaceResourceRoot.rootEntries]}}}export{buildAgentInfoResponseFromManifest};
@@ -1,14 +0,0 @@
1
- import type { H3Event } from "nitro";
2
- export default _default;
3
- /**
4
- * Nitro route for eve's health endpoint.
5
- *
6
- * The health endpoint is intentionally always-public so platform load
7
- * balancers and uptime monitors can probe it without credentials.
8
- * Channels that need authenticated health probes should author their own
9
- * channel file with the verifier helpers from
10
- * `eve/channels/auth`.
11
- */
12
- declare function _default(_event: H3Event<{
13
- body: unknown;
14
- }>): Promise<Response>;
@@ -1 +0,0 @@
1
- import{workflowEntryReference}from"#execution/workflow-runtime.js";var health_default=async e=>Response.json({ok:!0,status:`ready`,workflowId:workflowEntryReference.workflowId});export{health_default as default};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../_virtual/_rolldown/runtime.js";var require_picocolors=__commonJSMin(((e,t)=>{let n=process||{},r=n.argv||[],i=n.env||{},a=!(i.NO_COLOR||r.includes(`--no-color`))&&(!!i.FORCE_COLOR||r.includes(`--color`)||n.platform===`win32`||(n.stdout||{}).isTTY&&i.TERM!==`dumb`||!!i.CI),formatter=(e,t,n=e)=>r=>{let i=``+r,a=i.indexOf(t,e.length);return~a?e+replaceClose(i,t,n,a)+t:e+i+t},replaceClose=(e,t,n,r)=>{let i=``,a=0;do i+=e.substring(a,r)+n,a=r+t.length,r=e.indexOf(t,a);while(~r);return i+e.substring(a)},createColors=(e=a)=>{let t=e?formatter:()=>String;return{isColorSupported:e,reset:t(`\x1B[0m`,`\x1B[0m`),bold:t(`\x1B[1m`,`\x1B[22m`,`\x1B[22m\x1B[1m`),dim:t(`\x1B[2m`,`\x1B[22m`,`\x1B[22m\x1B[2m`),italic:t(`\x1B[3m`,`\x1B[23m`),underline:t(`\x1B[4m`,`\x1B[24m`),inverse:t(`\x1B[7m`,`\x1B[27m`),hidden:t(`\x1B[8m`,`\x1B[28m`),strikethrough:t(`\x1B[9m`,`\x1B[29m`),black:t(`\x1B[30m`,`\x1B[39m`),red:t(`\x1B[31m`,`\x1B[39m`),green:t(`\x1B[32m`,`\x1B[39m`),yellow:t(`\x1B[33m`,`\x1B[39m`),blue:t(`\x1B[34m`,`\x1B[39m`),magenta:t(`\x1B[35m`,`\x1B[39m`),cyan:t(`\x1B[36m`,`\x1B[39m`),white:t(`\x1B[37m`,`\x1B[39m`),gray:t(`\x1B[90m`,`\x1B[39m`),bgBlack:t(`\x1B[40m`,`\x1B[49m`),bgRed:t(`\x1B[41m`,`\x1B[49m`),bgGreen:t(`\x1B[42m`,`\x1B[49m`),bgYellow:t(`\x1B[43m`,`\x1B[49m`),bgBlue:t(`\x1B[44m`,`\x1B[49m`),bgMagenta:t(`\x1B[45m`,`\x1B[49m`),bgCyan:t(`\x1B[46m`,`\x1B[49m`),bgWhite:t(`\x1B[47m`,`\x1B[49m`),blackBright:t(`\x1B[90m`,`\x1B[39m`),redBright:t(`\x1B[91m`,`\x1B[39m`),greenBright:t(`\x1B[92m`,`\x1B[39m`),yellowBright:t(`\x1B[93m`,`\x1B[39m`),blueBright:t(`\x1B[94m`,`\x1B[39m`),magentaBright:t(`\x1B[95m`,`\x1B[39m`),cyanBright:t(`\x1B[96m`,`\x1B[39m`),whiteBright:t(`\x1B[97m`,`\x1B[39m`),bgBlackBright:t(`\x1B[100m`,`\x1B[49m`),bgRedBright:t(`\x1B[101m`,`\x1B[49m`),bgGreenBright:t(`\x1B[102m`,`\x1B[49m`),bgYellowBright:t(`\x1B[103m`,`\x1B[49m`),bgBlueBright:t(`\x1B[104m`,`\x1B[49m`),bgMagentaBright:t(`\x1B[105m`,`\x1B[49m`),bgCyanBright:t(`\x1B[106m`,`\x1B[49m`),bgWhiteBright:t(`\x1B[107m`,`\x1B[49m`)}};t.exports=createColors(),t.exports.createColors=createColors}));export default require_picocolors();export{require_picocolors};
@@ -1 +0,0 @@
1
- import{DYNAMIC_SENTINEL_KIND,TOOL_BRAND}from"#shared/dynamic-tool-definition.js";import{collectDurableDynamicToolCallbacks,stampDurableDynamicToolCallbacks}from"#shared/durable-dynamic-tool-callbacks.js";import{stampDefinitionKey}from"#public/tool-result-narrowing.js";function defineTool(e){if(e.auth!==void 0)throw Error(`defineTool: The "auth" field is no longer supported. Pass auth providers inline to ctx.getToken(provider) or ctx.requireAuth(provider).`);return Object.assign(e,{[TOOL_BRAND]:!0}),stampDurableDynamicToolCallbacks(e,collectDurableDynamicToolCallbacks({approval:e.approval,execute:e.execute,toModelOutput:e.toModelOutput})),stampDefinitionKey(e,`tool:${e.description}`),e}function defineDynamic(t){let n={kind:DYNAMIC_SENTINEL_KIND,events:t.events};return stampDefinitionKey(n,`dynamic:${Object.keys(t.events).join(`,`)}`),n}const DISABLED_TOOL_SENTINEL_KIND=`eve:disabled-tool`;function disableTool(){return{kind:DISABLED_TOOL_SENTINEL_KIND}}function isDisabledToolSentinel(e){return typeof e==`object`&&!!e&&e.kind===DISABLED_TOOL_SENTINEL_KIND}const EXPERIMENTAL_WORKFLOW_TOOL_KIND=`eve:enable-workflow-tool`;function experimental_workflow(e={}){let t={kind:EXPERIMENTAL_WORKFLOW_TOOL_KIND};return e.maxSubagents!==void 0&&(t.maxSubagents=e.maxSubagents),t}function isExperimentalWorkflowToolDefinition(e){return typeof e==`object`&&!!e&&e.kind===EXPERIMENTAL_WORKFLOW_TOOL_KIND}export{defineDynamic,defineTool,disableTool,experimental_workflow,isDisabledToolSentinel,isExperimentalWorkflowToolDefinition};
@@ -1 +0,0 @@
1
- const DEFINITION_KEY=Symbol.for(`eve.definition-source-key`),REGISTRY_SYMBOL=Symbol.for(`eve.definition-source-registry`),registryContainer=globalThis;registryContainer[REGISTRY_SYMBOL]===void 0&&(registryContainer[REGISTRY_SYMBOL]=new Map);const definitionSourceRegistry=registryContainer[REGISTRY_SYMBOL];function stampDefinitionKey(t,n){Object.defineProperty(t,DEFINITION_KEY,{configurable:!0,value:n})}function readDefinitionKey(t){if(DEFINITION_KEY in t)return t[DEFINITION_KEY]}function registerDefinitionSource(e,t){let n=definitionSourceRegistry.get(e);if(n!==void 0&&!sameDefinitionSourceEntry(n,t)){n.kind!==`ambiguous`&&console.warn([`eve could not assign a unique toolResultFrom identity for ${JSON.stringify(e)}.`,`Conflicting definitions: ${formatDefinitionSourceForWarning(n)} and ${formatDefinitionSourceForWarning(t)}.`,`Multiple authored definitions share that fallback identity, so toolResultFrom will not match through it.`,`Use the original definition object loaded by eve so source-derived identity can be used instead.`].join(` `)),definitionSourceRegistry.set(e,{kind:`ambiguous`});return}definitionSourceRegistry.set(e,t)}function sameDefinitionSourceEntry(e,t){return e.kind===t.kind&&e.name===t.name}function formatDefinitionSourceForWarning(e){return e.logicalPath===void 0?`${e.kind} "${e.name}"`:`${e.kind} "${e.name}" from "${e.logicalPath}"`}const toolResultFrom=toolResultFromImpl;function toolResultFromImpl(e,t){if(e.kind!==`tool-result`||e.isError===!0)return;let n=readDefinitionKey(t);if(n===void 0)return;let r=definitionSourceRegistry.get(n);if(r===void 0||r.kind===`ambiguous`)return;if(r.kind===`tool`)return e.toolName===r.name?{callId:e.callId,output:e.output,toolName:e.toolName}:void 0;let i=r.name+`__`;if(e.toolName.startsWith(i))return{callId:e.callId,connectionToolName:e.toolName.slice(i.length),output:e.output,toolName:e.toolName}}export{registerDefinitionSource,stampDefinitionKey,toolResultFrom};
@@ -1 +0,0 @@
1
- import{stampDurableDynamicCallback}from"#shared/durable-dynamic-tool-callbacks.js";function alwaysApproval(e){return`user-approval`}function neverApproval(e){return`not-applicable`}function onceApproval(e,t){return t.approvedTools.has(t.toolName)?`not-applicable`:`user-approval`}function always(){return stampDurableDynamicCallback(()=>`user-approval`,{callback:alwaysApproval,closure:{}})}function never(){return stampDurableDynamicCallback(()=>`not-applicable`,{callback:neverApproval,closure:{}})}function once(){return stampDurableDynamicCallback(({approvedTools:e,toolName:t})=>e.has(t)?`not-applicable`:`user-approval`,{callback:onceApproval,closure:{}})}export{always,never,once};
@@ -1,46 +0,0 @@
1
- import type { ToolDefinition } from "#public/definitions/tool.js";
2
- export type { ToolDefinition };
3
- /**
4
- * Framework-provided shell execution tool. Spread or wrap to customize.
5
- */
6
- export declare const bash: ToolDefinition;
7
- /**
8
- * Framework-provided file search tool. Finds files by glob pattern. Spread
9
- * or wrap to customize.
10
- */
11
- export declare const glob: ToolDefinition;
12
- /**
13
- * Framework-provided content search tool. Searches file contents by regex
14
- * pattern. Spread or wrap to customize.
15
- */
16
- export declare const grep: ToolDefinition;
17
- /**
18
- * Framework-provided file reader tool (`read_file`). Spread or wrap to
19
- * customize. The framework resets the durable read-before-write stamps on
20
- * context compaction automatically, regardless of how the reader is defined.
21
- */
22
- export declare const readFile: ToolDefinition;
23
- /**
24
- * Framework-provided file writer tool. Spread or wrap to customize.
25
- * Enforces read-before-write for existing files and stale-read detection.
26
- */
27
- export declare const writeFile: ToolDefinition;
28
- /**
29
- * Framework-provided HTTP fetch tool. Spread or wrap to customize.
30
- */
31
- export declare const webFetch: ToolDefinition;
32
- /**
33
- * Framework-provided durable todo list tool. Spreading the default keeps its
34
- * closure-bound state behavior: the executor still reads and writes the
35
- * framework's internal todo state. Replace with a fully custom executor (and
36
- * your own `ContextKey`) if you need different state semantics.
37
- */
38
- export declare const todo: ToolDefinition;
39
- /**
40
- * Framework-provided skill loading tool (`load_skill`). Returns a named
41
- * authored skill's instructions directly; dynamic skills remain sandbox-backed.
42
- * It is only useful when the agent declares skills: with no skills available the
43
- * framework does not surface skill descriptions to the model, so the model has
44
- * nothing to load.
45
- */
46
- export declare const loadSkill: ToolDefinition;
@@ -1 +0,0 @@
1
- import{TODO_TOOL_DEFINITION}from"#runtime/framework-tools/todo.js";import{BASH_TOOL_DEFINITION}from"#runtime/framework-tools/bash.js";import{GLOB_TOOL_DEFINITION}from"#runtime/framework-tools/glob.js";import{GREP_TOOL_DEFINITION}from"#runtime/framework-tools/grep.js";import{READ_FILE_TOOL_DEFINITION}from"#runtime/framework-tools/read-file.js";import{SKILL_TOOL_DEFINITION}from"#runtime/framework-tools/skill.js";import{WEB_FETCH_TOOL_DEFINITION}from"#runtime/framework-tools/web-fetch.js";import{WRITE_FILE_TOOL_DEFINITION}from"#runtime/framework-tools/write-file.js";import{toPublicToolDefinition}from"#public/tools/internal.js";const bash=toPublicToolDefinition(BASH_TOOL_DEFINITION),glob=toPublicToolDefinition(GLOB_TOOL_DEFINITION),grep=toPublicToolDefinition(GREP_TOOL_DEFINITION),readFile=toPublicToolDefinition(READ_FILE_TOOL_DEFINITION),writeFile=toPublicToolDefinition(WRITE_FILE_TOOL_DEFINITION),webFetch=toPublicToolDefinition(WEB_FETCH_TOOL_DEFINITION),todo=toPublicToolDefinition(TODO_TOOL_DEFINITION),loadSkill=toPublicToolDefinition(SKILL_TOOL_DEFINITION);export{bash,glob,grep,loadSkill,readFile,todo,webFetch,writeFile};
@@ -1,21 +0,0 @@
1
- import type { ToolDefinition } from "#public/definitions/tool.js";
2
- /**
3
- * Input shape accepted by {@link defineBashTool}.
4
- */
5
- export interface DefineBashToolInput {
6
- /**
7
- * Optional model-facing description. Defaults to a generic
8
- * "Execute a shell command in the workspace sandbox." line.
9
- */
10
- readonly description?: string;
11
- }
12
- /**
13
- * Defines a model-visible shell-runner tool that executes commands
14
- * inside the agent's sandbox. Uses the same executor core as the
15
- * framework `bash` tool, so input schema, error messages, and result
16
- * shape are identical.
17
- *
18
- * The tool's runtime name comes from the authored file's slug (for
19
- * example `agent/tools/run_shell.ts` becomes a tool named `run_shell`).
20
- */
21
- export declare function defineBashTool(input?: DefineBashToolInput): ToolDefinition;
@@ -1 +0,0 @@
1
- import{BASH_INPUT_SCHEMA,BASH_OUTPUT_SCHEMA}from"#runtime/framework-tools/bash.js";import{executeBashOnSandbox}from"#execution/sandbox/bash-tool.js";function defineBashTool(n={}){return{description:n.description??`Execute a shell command in the workspace sandbox.`,async execute(e,t){return executeBashOnSandbox(await t.getSandbox(),e)},inputSchema:BASH_INPUT_SCHEMA,outputSchema:BASH_OUTPUT_SCHEMA}}export{defineBashTool};
@@ -1,22 +0,0 @@
1
- import type { ToolDefinition } from "#public/definitions/tool.js";
2
- /**
3
- * Input shape accepted by {@link defineGlobTool}.
4
- */
5
- export interface DefineGlobToolInput {
6
- /**
7
- * Optional model-facing description. Defaults to a generic
8
- * "Search for files by glob pattern in the workspace sandbox." line.
9
- */
10
- readonly description?: string;
11
- }
12
- /**
13
- * Defines a model-visible file-search tool that discovers files by
14
- * glob pattern inside the agent's sandbox. Uses the same executor core
15
- * as the framework `glob` tool, so input schema, error messages, and
16
- * result shape are identical.
17
- *
18
- * The tool's runtime name comes from the authored file's slug (for
19
- * example `agent/tools/find_files.ts` becomes a tool named
20
- * `find_files`).
21
- */
22
- export declare function defineGlobTool(input?: DefineGlobToolInput): ToolDefinition;
@@ -1 +0,0 @@
1
- import{GLOB_INPUT_SCHEMA,GLOB_OUTPUT_SCHEMA}from"#runtime/framework-tools/glob.js";import{executeGlobOnSandbox}from"#execution/sandbox/glob-tool.js";function defineGlobTool(n={}){return{description:n.description??`Search for files by glob pattern in the workspace sandbox.`,async execute(e,t){return executeGlobOnSandbox(await t.getSandbox(),e)},inputSchema:GLOB_INPUT_SCHEMA,outputSchema:GLOB_OUTPUT_SCHEMA}}export{defineGlobTool};
@@ -1,22 +0,0 @@
1
- import type { ToolDefinition } from "#public/definitions/tool.js";
2
- /**
3
- * Input shape accepted by {@link defineGrepTool}.
4
- */
5
- export interface DefineGrepToolInput {
6
- /**
7
- * Optional model-facing description. Defaults to a generic
8
- * "Search file contents by pattern in the workspace sandbox." line.
9
- */
10
- readonly description?: string;
11
- }
12
- /**
13
- * Defines a model-visible content-search tool that searches file
14
- * contents by pattern inside the agent's sandbox. Uses the same
15
- * executor core as the framework `grep` tool, so input schema, error
16
- * messages, and result shape are identical.
17
- *
18
- * The tool's runtime name comes from the authored file's slug (for
19
- * example `agent/tools/search_code.ts` becomes a tool named
20
- * `search_code`).
21
- */
22
- export declare function defineGrepTool(input?: DefineGrepToolInput): ToolDefinition;
@@ -1 +0,0 @@
1
- import{GREP_INPUT_SCHEMA,GREP_OUTPUT_SCHEMA}from"#runtime/framework-tools/grep.js";import{executeGrepOnSandbox}from"#execution/sandbox/grep-tool.js";function defineGrepTool(n={}){return{description:n.description??`Search file contents by pattern in the workspace sandbox.`,async execute(e,t){return executeGrepOnSandbox(await t.getSandbox(),e)},inputSchema:GREP_INPUT_SCHEMA,outputSchema:GREP_OUTPUT_SCHEMA}}export{defineGrepTool};
@@ -1,21 +0,0 @@
1
- import type { ToolDefinition } from "#public/definitions/tool.js";
2
- /**
3
- * Input shape accepted by {@link defineReadFileTool}.
4
- */
5
- export interface DefineReadFileToolInput {
6
- /**
7
- * Optional model-facing description. Defaults to a generic
8
- * "Read a file from the workspace sandbox." line.
9
- */
10
- readonly description?: string;
11
- }
12
- /**
13
- * Defines a model-visible file-reader tool that reads files from the
14
- * agent's sandbox. Uses the same executor core as the framework
15
- * `read_file` tool, so input schema, error messages, and result shape
16
- * are identical.
17
- *
18
- * The tool's runtime name comes from the authored file's slug (for
19
- * example `agent/tools/read_file.ts` becomes a tool named `read_file`).
20
- */
21
- export declare function defineReadFileTool(input?: DefineReadFileToolInput): ToolDefinition;
@@ -1 +0,0 @@
1
- import{READ_FILE_INPUT_SCHEMA,READ_FILE_OUTPUT_SCHEMA}from"#runtime/framework-tools/read-file.js";import{executeReadFileOnSandbox}from"#execution/sandbox/read-file-tool.js";function defineReadFileTool(n={}){return{description:n.description??`Read a file from the workspace sandbox.`,async execute(e,t){return executeReadFileOnSandbox(await t.getSandbox(),e)},inputSchema:READ_FILE_INPUT_SCHEMA,outputSchema:READ_FILE_OUTPUT_SCHEMA}}export{defineReadFileTool};
@@ -1,22 +0,0 @@
1
- import type { ToolDefinition } from "#public/definitions/tool.js";
2
- /**
3
- * Input shape accepted by {@link defineWriteFileTool}.
4
- */
5
- export interface DefineWriteFileToolInput {
6
- /**
7
- * Optional model-facing description. Defaults to a generic
8
- * "Write a file to the workspace sandbox." line.
9
- */
10
- readonly description?: string;
11
- }
12
- /**
13
- * Defines a model-visible file-writer tool that writes files to the
14
- * agent's sandbox. Uses the same executor core as the framework
15
- * `write_file` tool, so input schema, error messages, and result shape
16
- * are identical.
17
- *
18
- * The tool's runtime name comes from the authored file's slug (for
19
- * example `agent/tools/write_file.ts` becomes a tool named
20
- * `write_file`).
21
- */
22
- export declare function defineWriteFileTool(input?: DefineWriteFileToolInput): ToolDefinition;
@@ -1 +0,0 @@
1
- import{WRITE_FILE_INPUT_SCHEMA,WRITE_FILE_OUTPUT_SCHEMA}from"#runtime/framework-tools/write-file.js";import{executeWriteFileOnSandbox}from"#execution/sandbox/write-file-tool.js";function defineWriteFileTool(n={}){return{description:n.description??`Write a file to the workspace sandbox.`,async execute(e,t){return executeWriteFileOnSandbox(await t.getSandbox(),e)},inputSchema:WRITE_FILE_INPUT_SCHEMA,outputSchema:WRITE_FILE_OUTPUT_SCHEMA}}export{defineWriteFileTool};
@@ -1,13 +0,0 @@
1
- import type { ResolvedToolDefinition } from "#runtime/types.js";
2
- import type { ToolDefinition } from "#public/definitions/tool.js";
3
- /**
4
- * Converter that strips internal identity fields from a framework
5
- * {@link ResolvedToolDefinition} so it can be re-exported as a public
6
- * {@link ToolDefinition}.
7
- *
8
- * Framework tools have the internal `(input, options) => output` signature.
9
- * The public {@link ToolDefinition.execute} expects `(input, ctx)`.
10
- * This wrapper bridges the gap — the public `ctx` is mapped back onto the
11
- * internal execute options.
12
- */
13
- export declare function toPublicToolDefinition(definition: ResolvedToolDefinition): ToolDefinition;
@@ -1 +0,0 @@
1
- function toPublicToolDefinition(e){if(!e.execute)throw Error(`Tool "${e.name}" is client-side and cannot be re-exported publicly.`);let t=e.execute,n={description:e.description,execute:(e,n)=>t(e,{abortSignal:n.abortSignal,messages:[],toolCallId:n.callId}),inputSchema:e.inputSchema??{},outputSchema:e.outputSchema};return e.approval!==void 0&&(n.approval=e.approval),n}export{toPublicToolDefinition};
@@ -1 +0,0 @@
1
- import{defineTool}from"#public/definitions/tool.js";import{SLEEP_INPUT_SCHEMA,SLEEP_OUTPUT_SCHEMA,SLEEP_TOOL_DESCRIPTION,executeSleepTool}from"#runtime/framework-tools/sleep.js";function sleep(){return defineTool({description:SLEEP_TOOL_DESCRIPTION,execute:executeSleepTool,inputSchema:SLEEP_INPUT_SCHEMA,outputSchema:SLEEP_OUTPUT_SCHEMA})}export{sleep};
@@ -1 +0,0 @@
1
- import{EVE_CONNECTION_CALLBACK_ROUTE_PATTERN,EVE_LEGACY_CONNECTION_CALLBACK_ROUTE_PATTERN}from"#protocol/routes.js";import{resumeHook}from"#internal/workflow/runtime.js";import{buildAuthorizationCompletePage}from"#runtime/connections/authorization-complete-page.js";const HTTP_CONNECTION_CALLBACK_CHANNEL_NAME_PREFIX=`eve/v1/connections/callback`,HANDLED_METHODS=[`GET`,`POST`],ROUTE_KINDS=[`attempt`,`legacy`];function getConnectionCallbackChannelDefinitions(){return ROUTE_KINDS.flatMap(e=>HANDLED_METHODS.map(t=>buildCallbackChannelDefinition(t,e)))}function getConnectionCallbackChannelNames(){return new Set(getConnectionCallbackChannelDefinitions().map(e=>e.name))}function buildCallbackChannelDefinition(n,r){let i=channelNameForMethod(n,r);return{name:i,method:n,urlPath:r===`attempt`?EVE_CONNECTION_CALLBACK_ROUTE_PATTERN:EVE_LEGACY_CONNECTION_CALLBACK_ROUTE_PATTERN,fetch:r===`attempt`?handleConnectionCallbackRequest:handleLegacyConnectionCallbackRequest,logicalPath:`framework://channels/${i}`,sourceId:`eve:framework:connection-callback-${r}-${n.toLowerCase()}`,sourceKind:`module`}}function channelNameForMethod(e,t){let n=e.toLowerCase();return t===`attempt`?`${HTTP_CONNECTION_CALLBACK_CHANNEL_NAME_PREFIX}/${n}`:`${HTTP_CONNECTION_CALLBACK_CHANNEL_NAME_PREFIX}/legacy/${n}`}async function handleConnectionCallbackRequest(e,t){return handleCallbackRequest(e,t,!1)}async function handleLegacyConnectionCallbackRequest(e,t){return handleCallbackRequest(e,t,!0)}async function handleCallbackRequest(e,t,i){let a=t.params.name,o=t.params.attemptId,s=t.params.token;if(typeof a!=`string`||a.length===0)return Response.json({error:`Missing connection name.`,ok:!1},{status:400});if(typeof s!=`string`||s.length===0)return Response.json({error:`Missing callback token.`,ok:!1},{status:400});if(!i&&(typeof o!=`string`||o.length===0))return Response.json({error:`Missing authorization attempt ID.`,ok:!1},{status:400});let c=await projectAuthorizationCallback(e);try{await resumeHook(s,{kind:`deliver`,payloads:[{authorizationCallback:i?{callback:c,connectionName:a,legacy:!0}:{attemptId:o,callback:c,connectionName:a}}]})}catch{return Response.json({error:`Connection callback not pending.`,ok:!1},{status:404})}return buildAuthorizationCompletePage()}async function projectAuthorizationCallback(e){let t={};for(let[n,r]of new URL(e.url).searchParams)t[n]=r;let n;if(e.method!==`GET`&&e.method!==`HEAD`){try{n=await e.text()}catch{n=void 0}let r=e.headers.get(`content-type`)??``;if(n&&r.includes(`application/x-www-form-urlencoded`))for(let[e,r]of new URLSearchParams(n))t[e]=r}return n===void 0?{params:t,method:e.method}:{params:t,method:e.method,body:n}}export{HTTP_CONNECTION_CALLBACK_CHANNEL_NAME_PREFIX,getConnectionCallbackChannelDefinitions,getConnectionCallbackChannelNames,handleConnectionCallbackRequest};
@@ -1,6 +0,0 @@
1
- import type { ResolvedChannelDefinition } from "#runtime/types.js";
2
- /**
3
- * Framework default for the eve channel.
4
- */
5
- export declare function getFrameworkChannelDefinitions(): readonly ResolvedChannelDefinition[];
6
- export declare function getAllFrameworkChannelNames(): ReadonlySet<string>;
@@ -1 +0,0 @@
1
- import{localDev,placeholderAuth,vercelOidc}from"#public/channels/auth.js";import{isHttpRouteDefinition}from"#channel/routes.js";import{eveChannel}from"#public/channels/eve.js";import{getConnectionCallbackChannelDefinitions,getConnectionCallbackChannelNames}from"#runtime/connections/callback-route.js";import{getSessionCallbackChannelDefinitions,getSessionCallbackChannelNames}from"#runtime/session-callback-route.js";import{getTaskInputResponseChannelDefinitions,getTaskInputResponseChannelNames}from"#runtime/task-input-response-route.js";function getFrameworkChannelDefinitions(){let r=eveChannel({auth:[vercelOidc(),localDev(),placeholderAuth()]}),i=[];for(let e of r.routes)isHttpRouteDefinition(e)&&i.push({name:`eve`,method:e.method.toUpperCase(),urlPath:e.path,cors:r.cors,fetch:async(t,n)=>e.handler(t,n),handler:e.handler,adapter:r.adapter,turnPolicy:r.turnPolicy,logicalPath:`framework://channels/${e.path}`,sourceId:`eve:framework:${e.method.toLowerCase()}-${e.path}`,sourceKind:`module`});return i.push(...getConnectionCallbackChannelDefinitions(),...getSessionCallbackChannelDefinitions(),...getTaskInputResponseChannelDefinitions()),i}function getAllFrameworkChannelNames(){return new Set([`eve`,...getConnectionCallbackChannelNames(),...getSessionCallbackChannelNames(),...getTaskInputResponseChannelNames()])}export{getAllFrameworkChannelNames,getFrameworkChannelDefinitions};
@@ -1,29 +0,0 @@
1
- import type { ResolvedToolDefinition } from "#runtime/types.js";
2
- /**
3
- * Stable model-visible name for the root-only agent delegation tool.
4
- */
5
- export declare const AGENT_TOOL_NAME = "agent";
6
- /**
7
- * Model-facing instructions for the root-only agent delegation tool.
8
- */
9
- export declare const AGENT_TOOL_DESCRIPTION: string;
10
- /**
11
- * Whether one node receives the implicit built-in `agent` tool.
12
- *
13
- * Single source of truth for the injection predicate: node-step uses it to
14
- * decide whether to add the tool, and prompt bootstrap uses it to decide
15
- * whether agent-messaging instructions may reference the tool. The
16
- * `hasAuthoredAgentTool` leg matters because an authored tool named "agent"
17
- * shadows the framework tool — instructions must not advertise a tool the
18
- * model cannot call.
19
- */
20
- export declare function isImplicitAgentToolAvailable(input: {
21
- readonly disabledFrameworkTools: readonly string[];
22
- readonly hasAuthoredAgentTool: boolean;
23
- /** Undefined when the caller prepares a turn without a graph node (never root). */
24
- readonly nodeId: string | undefined;
25
- }): boolean;
26
- /**
27
- * Shared metadata for the root-only agent delegation tool.
28
- */
29
- export declare const AGENT_TOOL_DEFINITION: ResolvedToolDefinition;
@@ -1 +0,0 @@
1
- import{SUBAGENT_TOOL_INPUT_SCHEMA}from"#runtime/subagents/registry.js";import{ROOT_RUNTIME_AGENT_NODE_ID}from"#runtime/graph.js";const AGENT_TOOL_NAME=`agent`,AGENT_TOOL_DESCRIPTION=[`Delegate a focused subtask to a fresh copy of yourself.`,`Use it to isolate complex work or split a large task into independent pieces.`,"Issue multiple `agent` calls in one response to run a small fixed set in parallel.","Each child has fresh history and state but shares your tools and sandbox, so include essential context in `message` and give parallel writers non-overlapping scopes."].join(` `);function isImplicitAgentToolAvailable(e){return e.nodeId===ROOT_RUNTIME_AGENT_NODE_ID&&!e.disabledFrameworkTools.includes(`agent`)&&!e.hasAuthoredAgentTool}const AGENT_TOOL_DEFINITION={description:AGENT_TOOL_DESCRIPTION,inputSchema:SUBAGENT_TOOL_INPUT_SCHEMA,logicalPath:`eve:framework/agent`,name:AGENT_TOOL_NAME,sourceId:`eve:agent-tool`,sourceKind:`module`};export{AGENT_TOOL_DEFINITION,AGENT_TOOL_DESCRIPTION,AGENT_TOOL_NAME,isImplicitAgentToolAvailable};
@@ -1,35 +0,0 @@
1
- import { z } from "#compiled/zod/index.js";
2
- import type { ResolvedToolDefinition } from "#runtime/types.js";
3
- /**
4
- * Stable model-visible name for the framework question tool.
5
- */
6
- export declare const ASK_QUESTION_TOOL_NAME = "ask_question";
7
- export declare const ASK_QUESTION_INPUT_SCHEMA: z.ZodObject<{
8
- allowFreeform: z.ZodOptional<z.ZodBoolean>;
9
- options: z.ZodOptional<z.ZodArray<z.ZodObject<{
10
- description: z.ZodOptional<z.ZodString>;
11
- id: z.ZodString;
12
- label: z.ZodString;
13
- style: z.ZodOptional<z.ZodEnum<{
14
- danger: "danger";
15
- default: "default";
16
- primary: "primary";
17
- }>>;
18
- }, z.core.$strict>>>;
19
- prompt: z.ZodString;
20
- }, z.core.$strict>;
21
- export declare const ASK_QUESTION_OUTPUT_SCHEMA: z.ZodObject<{
22
- optionId: z.ZodOptional<z.ZodString>;
23
- status: z.ZodEnum<{
24
- answered: "answered";
25
- ignored: "ignored";
26
- }>;
27
- text: z.ZodOptional<z.ZodString>;
28
- }, z.core.$strict>;
29
- /**
30
- * Root-only framework tool that lets the agent request structured user input.
31
- *
32
- * This is a client-side tool (as indicated by it not having an `execute` method). It requires user input
33
- * and therefore cannot be autonomously executed by the runtime.
34
- */
35
- export declare const ASK_QUESTION_TOOL_DEFINITION: ResolvedToolDefinition;
@@ -1 +0,0 @@
1
- import{inputRequestSchema}from"#runtime/input/types.js";import{z}from"#compiled/zod/index.js";const ASK_QUESTION_TOOL_NAME=`ask_question`,ASK_QUESTION_INPUT_SCHEMA=inputRequestSchema.omit({action:!0,display:!0,kind:!0,requestId:!0}),ASK_QUESTION_OUTPUT_SCHEMA=z.object({optionId:z.string().optional(),status:z.enum([`answered`,`ignored`]),text:z.string().optional()}).strict(),ASK_QUESTION_TOOL_DEFINITION={description:`Ask the user a question and wait for their response before continuing. Use this when you need clarification or a choice from the user.`,inputSchema:ASK_QUESTION_INPUT_SCHEMA,logicalPath:`eve:framework/ask-question`,name:ASK_QUESTION_TOOL_NAME,outputSchema:ASK_QUESTION_OUTPUT_SCHEMA,sourceId:`eve:ask-question-tool`,sourceKind:`module`};export{ASK_QUESTION_INPUT_SCHEMA,ASK_QUESTION_OUTPUT_SCHEMA,ASK_QUESTION_TOOL_DEFINITION,ASK_QUESTION_TOOL_NAME};
@@ -1,24 +0,0 @@
1
- import { z } from "#compiled/zod/index.js";
2
- import type { ResolvedToolDefinition } from "#runtime/types.js";
3
- /**
4
- * Shared input schema used by the framework `bash` tool and any author tool
5
- * constructed via {@link defineBashTool}.
6
- *
7
- * Exported so the public `defineBashTool` factory and the framework
8
- * `BASH_TOOL_DEFINITION` use the exact same schema object — keeping model
9
- * input contracts in sync without duplication.
10
- */
11
- export declare const BASH_INPUT_SCHEMA: z.ZodObject<{
12
- command: z.ZodString;
13
- }, z.core.$strict>;
14
- /**
15
- * Shared output schema used by the framework `bash` tool and any author tool
16
- * constructed via {@link defineBashTool}.
17
- */
18
- export declare const BASH_OUTPUT_SCHEMA: z.ZodObject<{
19
- exitCode: z.ZodNumber;
20
- stderr: z.ZodString;
21
- stdout: z.ZodString;
22
- truncated: z.ZodBoolean;
23
- }, z.core.$strict>;
24
- export declare const BASH_TOOL_DEFINITION: ResolvedToolDefinition;
@@ -1 +0,0 @@
1
- import{z}from"#compiled/zod/index.js";import{requireSandboxSession}from"#execution/sandbox/require-sandbox.js";import{executeBashOnSandbox}from"#execution/sandbox/bash-tool.js";const BASH_INPUT_SCHEMA=z.strictObject({command:z.string().describe(`The shell command to execute.`)}),BASH_OUTPUT_SCHEMA=z.strictObject({exitCode:z.number(),stderr:z.string(),stdout:z.string(),truncated:z.boolean()});async function executeBash(e,t){return executeBashOnSandbox(await requireSandboxSession(t?.abortSignal),e)}const BASH_TOOL_DEFINITION={description:`Execute a shell command in the shared workspace environment.`,execute:executeBash,inputSchema:BASH_INPUT_SCHEMA,logicalPath:`eve:framework/bash`,name:`bash`,outputSchema:BASH_OUTPUT_SCHEMA,sourceId:`eve:bash-tool`,sourceKind:`module`};export{BASH_INPUT_SCHEMA,BASH_OUTPUT_SCHEMA,BASH_TOOL_DEFINITION};
@@ -1,19 +0,0 @@
1
- import type { ModelMessage } from "ai";
2
- interface ConnectionSearchResultItem {
3
- readonly connection: string;
4
- readonly description: string;
5
- readonly error?: string;
6
- readonly inputSchema?: Record<string, unknown>;
7
- readonly needsAuthorization?: boolean;
8
- readonly outputSchema?: Record<string, unknown>;
9
- readonly tool?: string;
10
- readonly qualifiedName?: string;
11
- }
12
- /**
13
- * Extracts connection search results from conversation history.
14
- * Scans tool-result messages for `connection_search` results and
15
- * returns deduplicated tool metadata (latest result wins per qualifiedName).
16
- */
17
- export declare function extractDiscoveredTools(messages: readonly ModelMessage[]): ConnectionSearchResultItem[];
18
- declare const connectionSearchDynamicDefinition: import("../../index.ts").DynamicSentinel<Record<string, object> | null>;
19
- export default connectionSearchDynamicDefinition;
@@ -1,2 +0,0 @@
1
- import{createLogger}from"#internal/logging.js";import{z}from"#compiled/zod/index.js";import{toError}from"#shared/errors.js";import{loadContext}from"#context/container.js";import{stampDurableDynamicToolCallbacks}from"#shared/durable-dynamic-tool-callbacks.js";import{ContextKey}from"#context/key.js";import{ConnectionRegistryKey}from"#context/providers/connection-key.js";import{consumeAuthorizationResult,createAuthorizationAttempt,requestAuthorization}from"#harness/authorization.js";import{ConnectionAuthorizationFailedError,isConnectionAuthorizationFailedError,isConnectionAuthorizationRequiredError}from"#public/connections/errors.js";import{supportsInteractiveAuthorization}from"#runtime/connections/types.js";import{resolveAuthorizationCallbackUrl,stampChallengeDisplayName}from"#runtime/connections/scoped-authorization.js";import{resolveApprovalPolicy}from"#public/definitions/approval.js";import{defineDynamic,defineTool}from"#public/definitions/tool.js";import{resolveConnectionAuthorization}from"#runtime/connections/resolve-authorization.js";import{writeCachedToken}from"#runtime/connections/authorization-tokens.js";import{principalKey,resolveConnectionPrincipal}from"#runtime/connections/principal.js";const logger=createLogger(`framework.connection-search-dynamic`),CONNECTION_SEARCH_INPUT_SCHEMA=z.strictObject({connection:z.string().describe(`Optional: limit search to a specific connection name.`).optional(),keywords:z.string().describe(`Search keywords and expanded aliases. Distill intent into keywords; avoid stop words like 'a', 'the', 'in'.`),limit:z.number().describe(`Max results to return. Default 10.`).optional()}),connectionSchema=z.looseObject({}),CONNECTION_SEARCH_RESULT_ITEM_SCHEMA=z.strictObject({connection:z.string(),description:z.string(),error:z.string().optional(),inputSchema:connectionSchema.optional(),needsAuthorization:z.boolean().optional(),outputSchema:connectionSchema.optional(),qualifiedName:z.string().optional(),tool:z.string().optional()}),CONNECTION_SEARCH_OUTPUT_SCHEMA=z.array(CONNECTION_SEARCH_RESULT_ITEM_SCHEMA),ConnectionSearchResultsKey=new ContextKey(`eve.connectionSearchResults`);function qualifiedConnectionToolName(e,t){return`${e}__${t}`}function tokenize(e){return e.toLowerCase().split(/[\s_\-./]+/).filter(e=>e.length>1)}function scoreMatch(e,t){let n=tokenize(t.name),r=tokenize(t.description),i=0;for(let t of e){for(let e of n)(e.includes(t)||t.includes(e))&&(i+=3);for(let e of r)(e.includes(t)||t.includes(e))&&(i+=1)}return i}async function resolveInteractiveAuth(e,t){let n=e.getConnections().find(e=>e.connectionName===t);if(n===void 0)return;let r=await resolveConnectionAuthorization(n);if(supportsInteractiveAuthorization(r))return r}async function completePendingAuthorizations(e,t){let n=loadContext(),i=new Set;for(let r of t){let t=consumeAuthorizationResult(r.connectionName);if(!t)continue;let a=await resolveInteractiveAuth(e,r.connectionName);if(!a)continue;let o=t.principal??resolveConnectionPrincipal(r.connectionName,a),c=await a.completeAuthorization({callbackUrl:t.hookUrl,connection:{url:r.url??``},principal:o,resume:t.resume,callback:t.callback});writeCachedToken(n,r.connectionName,principalKey(o),c),i.add(r.connectionName)}return i}async function executeConnectionSearch(e){let t=loadContext(),i=t.get(ConnectionRegistryKey);if(i===void 0)return[];let a=e.limit??10,s=tokenize(e.keywords),u=[],p=[],m=e.connection!==void 0&&e.connection!==``?i.getConnections().filter(t=>t.connectionName===e.connection):i.getConnections();if(e.connection&&m.length===0)throw Error(`Connection "${e.connection}" is not registered. Available connections: ${i.getConnectionNames().join(`, `)}.`);let h=await completePendingAuthorizations(i,m),g=[];for(let e of m){let t;try{t=await i.getClient(e.connectionName).getToolMetadata()}catch(t){if(isConnectionAuthorizationRequiredError(t)){if(h.has(e.connectionName)){logger.warn(`connection still unauthorized after authorization`,{connection:e.connectionName}),p.push({connection:e.connectionName,description:e.description,error:`Authorization for "${e.connectionName}" did not take effect; the token was rejected after sign-in.`});continue}let t=await resolveInteractiveAuth(i,e.connectionName);if(t){let r=createAuthorizationAttempt(e.connectionName);if(r){let i=resolveConnectionPrincipal(e.connectionName,t),a=resolveAuthorizationCallbackUrl({authorization:t,callbackUrl:r.hookUrl});try{let{challenge:n,resume:o}=await t.startAuthorization({callbackUrl:a,connection:{url:e.url??``},principal:i});g.push({attemptId:r.attemptId,name:e.connectionName,challenge:stampChallengeDisplayName(n,t),hookUrl:a,principal:i,resume:o})}catch(t){let r=toError(t);logger.warn(`startAuthorization failed`,{connection:e.connectionName,error:r}),p.push({connection:e.connectionName,description:e.description,error:`Failed to start authorization for "${e.connectionName}": ${r.message}`});continue}}}p.push({connection:e.connectionName,description:e.description,needsAuthorization:!0});continue}if(isConnectionAuthorizationFailedError(t)){logger.warn(`connection authorization failed`,{connection:e.connectionName,reason:t.reason,retryable:t.retryable,error:t}),p.push({connection:e.connectionName,description:e.description,error:`Authorization failed for ${e.connectionName}: ${t.message}`});continue}let r=toError(t);logger.warn(`failed to load connection tools`,{connection:e.connectionName,error:r}),p.push({connection:e.connectionName,description:e.description,error:`Failed to load tools for "${e.connectionName}": ${r.message}`});continue}for(let n of t){let t=scoreMatch(s,n);t>0&&u.push({item:{connection:e.connectionName,description:n.description,inputSchema:n.inputSchema,outputSchema:n.outputSchema,qualifiedName:qualifiedConnectionToolName(e.connectionName,n.name),tool:n.name},score:t})}}if(g.length>0)return requestAuthorization(g);let _=p.filter(e=>e.error!==void 0);if(m.length>0&&_.length===m.length)throw Error(_.map(e=>e.error).join(`
2
- `));u.sort((e,t)=>t.score-e.score);let v=u.slice(0,a).map(e=>e.item);if(v.length>0){let e=[...v,...p],n=t.get(ConnectionSearchResultsKey)??[],r=new Map(n.map(e=>[e.qualifiedName,e]));for(let e of v)e.qualifiedName&&r.set(e.qualifiedName,e);return t.set(ConnectionSearchResultsKey,[...r.values()]),e}return m.map(e=>p.find(t=>t.connection===e.connectionName)||{connection:e.connectionName,description:e.description})}function extractDiscoveredTools(e){let t=new Map;for(let n of e){if(n.role!==`tool`)continue;let e=n.content;for(let n of e){if(n.type!==`tool-result`||n.toolName!==`connection_search`)continue;let e=n.output;if(e==null)continue;let r=typeof e==`object`&&`type`in e&&`value`in e?e.value:e;if(Array.isArray(r))for(let e of r)e.tool&&e.qualifiedName&&t.set(e.qualifiedName,e)}}return[...t.values()]}function readDiscoveredToolClosure(e){let t=e.connectionName,n=e.toolName;if(typeof t!=`string`||typeof n!=`string`)throw Error(`Discovered connection tool callback metadata is invalid.`);return{connectionName:t,toolName:n}}async function executeDiscoveredConnectionTool(e,t,n){let{connectionName:i,toolName:a}=readDiscoveredToolClosure(e),d=loadContext().get(ConnectionRegistryKey);if(d===void 0)throw Error(`Connection registry is unavailable while replaying a discovered tool.`);let p=d.getConnections().find(e=>e.connectionName===i),m=await resolveInteractiveAuth(d,i),h=!1;if(m){let e=consumeAuthorizationResult(i);if(e){h=!0;let t=loadContext(),n=e.principal??resolveConnectionPrincipal(i,m),a=await m.completeAuthorization({callbackUrl:e.hookUrl,connection:{url:p?.url??``},principal:n,resume:e.resume,callback:e.callback});writeCachedToken(t,i,principalKey(n),a)}}try{return await d.getClient(i).executeTool(a,t,{abortSignal:n.abortSignal})}catch(e){if(!isConnectionAuthorizationRequiredError(e)||!m)throw e;if(h)throw new ConnectionAuthorizationFailedError(i,{retryable:!1,reason:`token_rejected_after_authorization`,message:`Connection "${i}" rejected the token immediately after authorization.`});let t=createAuthorizationAttempt(i);if(!t)throw e;let n=resolveConnectionPrincipal(i,m),r=resolveAuthorizationCallbackUrl({authorization:m,callbackUrl:t.hookUrl}),{challenge:a,resume:o}=await m.startAuthorization({callbackUrl:r,connection:{url:p?.url??``},principal:n});return requestAuthorization([{attemptId:t.attemptId,name:i,challenge:stampChallengeDisplayName(a,m),hookUrl:r,principal:n,resume:o}])}}async function requestDiscoveredConnectionToolApproval(e,t){let{connectionName:n}=readDiscoveredToolClosure(e),i=loadContext().get(ConnectionRegistryKey)?.getConnectionApproval(n);return i===void 0?`not-applicable`:await resolveApprovalPolicy(i)(t)}async function authorizeDiscoveredConnectionToolApproval(e,t){let{connectionName:n}=readDiscoveredToolClosure(e),i=loadContext().get(ConnectionRegistryKey)?.getConnectionApproval(n),a=i===void 0||typeof i==`function`?void 0:i.response;return a===void 0?{reason:`Approval response authorization is unavailable.`,status:`rejected`}:await a(t)}const connectionSearchDynamicDefinition=defineDynamic({events:{"step.started":async(e,t)=>{let n=loadContext().get(ConnectionRegistryKey);if(!n||n.getConnections().length===0)return null;let a=n.getConnections().map(e=>e.connectionName),s=extractDiscoveredTools(t.messages),c=loadContext().get(ConnectionSearchResultsKey)??[],l=new Map;for(let e of c)e.qualifiedName&&l.set(e.qualifiedName,e);for(let e of s)e.qualifiedName&&l.set(e.qualifiedName,e);let u=[...l.values()],d={},f=defineTool({description:`Search for tools across your connections. Discovered tools become directly callable by their qualified name (e.g. \`linear__list_issues\`) in your next response. Available connections: ${a.join(`, `)}.`,inputSchema:CONNECTION_SEARCH_INPUT_SCHEMA,async execute(e){return executeConnectionSearch(e)},outputSchema:CONNECTION_SEARCH_OUTPUT_SCHEMA});stampDurableDynamicToolCallbacks(f,{execute:{callback:(e,t)=>executeConnectionSearch(t),closure:{}}}),d.connection_search=f;for(let e of u){let t=e.connection,r=e.tool,a=n.getConnectionApproval(t),o={connectionName:t,toolName:r},s=defineTool({description:e.description,inputSchema:e.inputSchema??{type:`object`},approval:a,outputSchema:e.outputSchema,async execute(e,t){return await executeDiscoveredConnectionTool(o,e,t)}});stampDurableDynamicToolCallbacks(s,{execute:{callback:executeDiscoveredConnectionTool,closure:o},...a===void 0?{}:{approvalRequest:{callback:requestDiscoveredConnectionToolApproval,closure:o}},...a===void 0||typeof a==`function`||a.response===void 0?{}:{approvalResponse:{callback:authorizeDiscoveredConnectionToolApproval,closure:o}}}),d[qualifiedConnectionToolName(t,r)]=s}return d}}});export{connectionSearchDynamicDefinition as default,extractDiscoveredTools};
@@ -1 +0,0 @@
1
- import{toInputSchema}from"#shared/tool-schema.js";const FINAL_OUTPUT_TOOL_NAME=`final_output`;function buildFinalOutputTool(e){let t=toInputSchema(e);return{description:`Deliver your final answer in the required structure by calling this tool. Call it exactly once, when you are done; do not answer in prose.`,inputSchema:t,outputSchema:t}}export{FINAL_OUTPUT_TOOL_NAME,buildFinalOutputTool};
@@ -1,26 +0,0 @@
1
- import { z } from "#compiled/zod/index.js";
2
- import type { ResolvedToolDefinition } from "#runtime/types.js";
3
- /**
4
- * Shared input schema used by the framework `glob` tool and any author tool
5
- * constructed via {@link defineGlobTool}.
6
- *
7
- * Exported so the public `defineGlobTool` factory and the framework
8
- * `GLOB_TOOL_DEFINITION` use the exact same schema object — keeping model
9
- * input contracts in sync without duplication.
10
- */
11
- export declare const GLOB_INPUT_SCHEMA: z.ZodObject<{
12
- limit: z.ZodOptional<z.ZodNumber>;
13
- path: z.ZodOptional<z.ZodString>;
14
- pattern: z.ZodString;
15
- }, z.core.$strict>;
16
- /**
17
- * Shared output schema used by the framework `glob` tool and any author tool
18
- * constructed via {@link defineGlobTool}.
19
- */
20
- export declare const GLOB_OUTPUT_SCHEMA: z.ZodObject<{
21
- content: z.ZodString;
22
- count: z.ZodNumber;
23
- path: z.ZodString;
24
- truncated: z.ZodBoolean;
25
- }, z.core.$strict>;
26
- export declare const GLOB_TOOL_DEFINITION: ResolvedToolDefinition;
@@ -1,2 +0,0 @@
1
- import{z}from"#compiled/zod/index.js";import{requireSandboxSession}from"#execution/sandbox/require-sandbox.js";import{executeGlobOnSandbox}from"#execution/sandbox/glob-tool.js";const GLOB_INPUT_SCHEMA=z.strictObject({limit:z.number().int().min(1).max(1e3).describe(`Maximum number of results to return. Defaults to 100.`).optional(),path:z.string().describe(`The directory to search in. Defaults to /workspace. Must be an absolute path or begin with $HOME/. Omit to use the default.`).optional(),pattern:z.string().describe(`The glob pattern to match files against (e.g. "**/*.ts", "src/**/*.js").`)}),GLOB_OUTPUT_SCHEMA=z.strictObject({content:z.string(),count:z.number().int(),path:z.string(),truncated:z.boolean()});async function executeGlob(e,t){return executeGlobOnSandbox(await requireSandboxSession(t?.abortSignal),e)}const GLOB_TOOL_DEFINITION={description:[`Fast file pattern matching tool that works with any codebase size.`,``,`Usage:`,`- Supports glob patterns like "**/*.js" or "src/**/*.ts".`,`- Returns matching file paths.`,`- Call this tool in parallel when you know there are multiple patterns to search for.`].join(`
2
- `),execute:executeGlob,inputSchema:GLOB_INPUT_SCHEMA,logicalPath:`eve:framework/glob`,name:`glob`,outputSchema:GLOB_OUTPUT_SCHEMA,sourceId:`eve:glob-tool`,sourceKind:`module`};export{GLOB_INPUT_SCHEMA,GLOB_OUTPUT_SCHEMA,GLOB_TOOL_DEFINITION};