eve 0.47.6 → 0.48.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 (400) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/dist/src/channel/adapter.js +1 -1
  3. package/dist/src/channel/delivery-metadata.d.ts +1 -0
  4. package/dist/src/channel/delivery-metadata.js +1 -1
  5. package/dist/src/channel/session.js +1 -1
  6. package/dist/src/channel/types.d.ts +10 -8
  7. package/dist/src/chunks/{use-eve-agent-DkUB0Ok4.js → use-eve-agent-BZnOzAVd.js} +25 -6
  8. package/dist/src/chunks/{use-eve-agent-DjYwFJF7.js → use-eve-agent-Bgp6INfi.js} +25 -6
  9. package/dist/src/cli/commands/init.js +1 -1
  10. package/dist/src/cli/commands/integration-connect.d.ts +2 -1
  11. package/dist/src/cli/commands/integration-connect.js +1 -1
  12. package/dist/src/cli/commands/register-integration-commands.d.ts +3 -1
  13. package/dist/src/cli/commands/register-integration-commands.js +1 -1
  14. package/dist/src/cli/commands/registry-declared-setups.js +1 -1
  15. package/dist/src/cli/commands/registry-install-transaction.d.ts +23 -0
  16. package/dist/src/cli/commands/registry-install-transaction.js +1 -0
  17. package/dist/src/cli/commands/registry-package.js +1 -1
  18. package/dist/src/cli/commands/registry.js +1 -1
  19. package/dist/src/cli/commands/setup-headless.d.ts +6 -0
  20. package/dist/src/cli/commands/setup-headless.js +1 -1
  21. package/dist/src/cli/dev/command-options.d.ts +2 -0
  22. package/dist/src/cli/dev/run-interactive-ui.js +1 -1
  23. package/dist/src/cli/dev/tui/blocks.js +1 -1
  24. package/dist/src/cli/dev/tui/line-editor.d.ts +4 -0
  25. package/dist/src/cli/dev/tui/line-editor.js +3 -3
  26. package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
  27. package/dist/src/cli/dev/tui/registry-result-message.d.ts +17 -0
  28. package/dist/src/cli/dev/tui/registry-result-message.js +3 -0
  29. package/dist/src/cli/dev/tui/runner.d.ts +13 -4
  30. package/dist/src/cli/dev/tui/runner.js +1 -1
  31. package/dist/src/cli/dev/tui/setup-commands.d.ts +9 -3
  32. package/dist/src/cli/dev/tui/setup-commands.js +2 -3
  33. package/dist/src/cli/dev/tui/setup-flow.d.ts +15 -5
  34. package/dist/src/cli/dev/tui/setup-panel.d.ts +6 -1
  35. package/dist/src/cli/dev/tui/setup-panel.js +4 -4
  36. package/dist/src/cli/dev/tui/setup-selection-input.d.ts +1 -0
  37. package/dist/src/cli/dev/tui/setup-selection-input.js +1 -1
  38. package/dist/src/cli/dev/tui/stream-format.d.ts +8 -0
  39. package/dist/src/cli/dev/tui/stream-format.js +2 -2
  40. package/dist/src/cli/dev/tui/subagent-pump.d.ts +3 -0
  41. package/dist/src/cli/dev/tui/subagent-pump.js +1 -1
  42. package/dist/src/cli/dev/tui/terminal-renderer.js +12 -12
  43. package/dist/src/cli/dev/tui/tui-prompter.js +1 -1
  44. package/dist/src/cli/dev/tui/tui.d.ts +3 -4
  45. package/dist/src/cli/dev/tui/tui.js +1 -1
  46. package/dist/src/cli/run.js +2 -2
  47. package/dist/src/client/agent-info-schema.d.ts +1 -1
  48. package/dist/src/client/agent-info-schema.js +1 -1
  49. package/dist/src/client/open-stream.d.ts +1 -0
  50. package/dist/src/client/open-stream.js +1 -1
  51. package/dist/src/client/session.js +1 -1
  52. package/dist/src/compiled/.vendor-stamp.json +2 -1
  53. package/dist/src/compiled/@opentelemetry/api/index.d.ts +6 -0
  54. package/dist/src/compiled/@workflow/builders/LICENSE.md +201 -0
  55. package/dist/src/compiled/@workflow/builders/index.d.ts +62 -0
  56. package/dist/src/compiled/@workflow/builders/index.js +1 -0
  57. package/dist/src/compiler/extension-compatibility.d.ts +2 -2
  58. package/dist/src/compiler/extension-compatibility.js +1 -1
  59. package/dist/src/compiler/manifest.d.ts +7 -17
  60. package/dist/src/compiler/manifest.js +1 -1
  61. package/dist/src/compiler/normalize-manifest.js +1 -1
  62. package/dist/src/compiler/normalize-tool.d.ts +0 -1
  63. package/dist/src/compiler/normalize-tool.js +1 -1
  64. package/dist/src/context/build-dynamic-tools.d.ts +2 -2
  65. package/dist/src/context/build-dynamic-tools.js +1 -1
  66. package/dist/src/context/container.d.ts +7 -0
  67. package/dist/src/context/container.js +1 -1
  68. package/dist/src/context/dynamic-tool-lifecycle.d.ts +16 -9
  69. package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
  70. package/dist/src/context/dynamic-tool-metadata.d.ts +44 -0
  71. package/dist/src/context/dynamic-tool-metadata.js +1 -0
  72. package/dist/src/context/keys.d.ts +14 -22
  73. package/dist/src/context/keys.js +1 -1
  74. package/dist/src/eve-channel/index.js +1 -1
  75. package/dist/src/eve-channel/request.d.ts +0 -1
  76. package/dist/src/eve-channel/request.js +2 -2
  77. package/dist/src/eve-channel/types.d.ts +7 -7
  78. package/dist/src/execution/accepted-delivery-deployment.d.ts +7 -0
  79. package/dist/src/execution/accepted-delivery-deployment.js +1 -0
  80. package/dist/src/execution/cancel-descendant-turns-step.d.ts +4 -1
  81. package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
  82. package/dist/src/execution/create-session-step.js +1 -1
  83. package/dist/src/execution/delegation-tool.d.ts +1 -2
  84. package/dist/src/execution/delegation-tool.js +1 -1
  85. package/dist/src/execution/dispatch-runtime-actions-shared.d.ts +14 -4
  86. package/dist/src/execution/dispatch-runtime-actions-shared.js +1 -1
  87. package/dist/src/execution/dispatch-runtime-actions-step.js +1 -1
  88. package/dist/src/execution/dispatch-turn-step.js +1 -1
  89. package/dist/src/execution/dispatch-workflow-runtime-actions-step.js +1 -1
  90. package/dist/src/execution/durable-session-migrations/turn-workflow-v1-to-v2.d.ts +2 -0
  91. package/dist/src/execution/durable-session-migrations/turn-workflow-v1-to-v2.js +1 -0
  92. package/dist/src/execution/durable-session-migrations/turn-workflow.d.ts +25 -3
  93. package/dist/src/execution/durable-session-migrations/turn-workflow.js +1 -1
  94. package/dist/src/execution/eve-workflow-attributes.js +1 -1
  95. package/dist/src/execution/finalize-terminal-session.d.ts +17 -0
  96. package/dist/src/execution/finalize-terminal-session.js +1 -0
  97. package/dist/src/execution/inline-turn.d.ts +29 -0
  98. package/dist/src/execution/inline-turn.js +1 -0
  99. package/dist/src/execution/next-driver-action.d.ts +4 -0
  100. package/dist/src/execution/node-step.js +1 -1
  101. package/dist/src/execution/parked-delivery-wait.js +1 -1
  102. package/dist/src/execution/pending-turn-state.d.ts +1 -0
  103. package/dist/src/execution/pending-turn-state.js +1 -1
  104. package/dist/src/execution/prepared-agent-action.d.ts +7 -0
  105. package/dist/src/execution/prepared-agent-action.js +1 -0
  106. package/dist/src/execution/proxied-deliver-step.js +1 -1
  107. package/dist/src/execution/remote-agent-dispatch.d.ts +2 -0
  108. package/dist/src/execution/remote-agent-dispatch.js +1 -1
  109. package/dist/src/execution/session-command-token.d.ts +2 -0
  110. package/dist/src/execution/session-command-token.js +1 -1
  111. package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
  112. package/dist/src/execution/stable-workflow-names.d.ts +12 -0
  113. package/dist/src/execution/stable-workflow-names.js +1 -0
  114. package/dist/src/execution/subagent-event-proxy-step.d.ts +3 -0
  115. package/dist/src/execution/subagent-event-proxy-step.js +1 -1
  116. package/dist/src/execution/subagent-hitl-proxy.d.ts +2 -1
  117. package/dist/src/execution/subagent-hitl-proxy.js +1 -1
  118. package/dist/src/execution/subagent-start-local.d.ts +3 -0
  119. package/dist/src/execution/subagent-start-local.js +1 -1
  120. package/dist/src/execution/subagent-start-remote.d.ts +2 -0
  121. package/dist/src/execution/subagent-start-remote.js +1 -1
  122. package/dist/src/execution/subagent-tool.d.ts +1 -0
  123. package/dist/src/execution/subagent-tool.js +1 -1
  124. package/dist/src/execution/tasks/child/steps.d.ts +2 -0
  125. package/dist/src/execution/tasks/child/steps.js +1 -1
  126. package/dist/src/execution/tasks/child/update.d.ts +3 -2
  127. package/dist/src/execution/tasks/child/workflow.js +1 -1
  128. package/dist/src/execution/tasks/parent/control-shared.d.ts +5 -4
  129. package/dist/src/execution/tasks/parent/dispatch-task-step.js +1 -1
  130. package/dist/src/execution/tasks/parent/dispatch.d.ts +4 -3
  131. package/dist/src/execution/tasks/parent/dispatch.js +1 -1
  132. package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +1 -1
  133. package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
  134. package/dist/src/execution/terminal-session-completion-step.js +1 -1
  135. package/dist/src/execution/terminal-session-event.d.ts +13 -0
  136. package/dist/src/execution/terminal-session-event.js +1 -0
  137. package/dist/src/execution/terminal-session-failure-step.d.ts +1 -0
  138. package/dist/src/execution/terminal-session-failure-step.js +1 -1
  139. package/dist/src/execution/tool-run/answer.d.ts +3 -0
  140. package/dist/src/execution/tool-run/answer.js +1 -0
  141. package/dist/src/execution/tool-run/background.d.ts +14 -0
  142. package/dist/src/execution/tool-run/background.js +1 -0
  143. package/dist/src/execution/tool-run/cancel.d.ts +7 -0
  144. package/dist/src/execution/tool-run/cancel.js +1 -0
  145. package/dist/src/execution/tool-run/dispatch.d.ts +24 -0
  146. package/dist/src/execution/tool-run/dispatch.js +1 -0
  147. package/dist/src/execution/tool-run/emit-run-report-step.d.ts +7 -0
  148. package/dist/src/execution/tool-run/emit-run-report-step.js +1 -0
  149. package/dist/src/execution/tool-run/messages.d.ts +70 -0
  150. package/dist/src/execution/tool-run/messages.js +1 -0
  151. package/dist/src/execution/tool-run/owner-channels.d.ts +29 -0
  152. package/dist/src/execution/tool-run/owner-channels.js +1 -0
  153. package/dist/src/execution/tool-run/owner-inbox.d.ts +11 -0
  154. package/dist/src/execution/tool-run/owner-inbox.js +1 -0
  155. package/dist/src/execution/tool-run/owner.d.ts +13 -0
  156. package/dist/src/execution/tool-run/owner.js +1 -0
  157. package/dist/src/execution/tool-run/resume-hook-step.d.ts +4 -0
  158. package/dist/src/execution/tool-run/resume-hook-step.js +1 -0
  159. package/dist/src/execution/tool-run/run-control.d.ts +18 -0
  160. package/dist/src/execution/tool-run/run-control.js +1 -0
  161. package/dist/src/execution/tool-run/start.d.ts +11 -0
  162. package/dist/src/execution/tool-run/start.js +1 -0
  163. package/dist/src/execution/tool-run/types.d.ts +21 -0
  164. package/dist/src/execution/tool-run/types.js +1 -0
  165. package/dist/src/execution/tool-run/workflow.d.ts +9 -0
  166. package/dist/src/execution/tool-run/workflow.js +1 -0
  167. package/dist/src/execution/tools/subagent/local.d.ts +3 -4
  168. package/dist/src/execution/tools/subagent/local.js +1 -1
  169. package/dist/src/execution/tools/subagent/remote.d.ts +4 -1
  170. package/dist/src/execution/tools/subagent/remote.js +1 -1
  171. package/dist/src/execution/turn-cancellation-control.d.ts +2 -0
  172. package/dist/src/execution/turn-cancellation-control.js +1 -1
  173. package/dist/src/execution/turn-control-receiver.js +1 -1
  174. package/dist/src/execution/turn-dispatch.d.ts +4 -2
  175. package/dist/src/execution/turn-dispatch.js +1 -1
  176. package/dist/src/execution/turn-execution-cursor.js +1 -1
  177. package/dist/src/execution/turn-workflow.js +1 -1
  178. package/dist/src/execution/wire/session-inbox-contract.d.ts +2 -2
  179. package/dist/src/execution/wire/session-inbox-contract.js +1 -1
  180. package/dist/src/execution/wire/session-inbox-encoder.d.ts +6 -2
  181. package/dist/src/execution/wire/session-inbox-encoder.js +1 -1
  182. package/dist/src/execution/wire/session-inbox-resume.js +1 -1
  183. package/dist/src/execution/wire/session-inbox-wire.js +1 -1
  184. package/dist/src/execution/wire/session-inbox-wire.v1.js +1 -1
  185. package/dist/src/execution/wire/session-inbox-wire.v2-migration.d.ts +0 -2
  186. package/dist/src/execution/wire/session-inbox-wire.v2-migration.js +1 -1
  187. package/dist/src/execution/wire/session-inbox-wire.v2.migration.d.ts +3 -0
  188. package/dist/src/execution/wire/session-inbox-wire.v2.migration.js +1 -0
  189. package/dist/src/execution/wire/session-inbox-wire.v3.d.ts +480 -0
  190. package/dist/src/execution/wire/session-inbox-wire.v3.js +1 -0
  191. package/dist/src/execution/wire/session-inbox-wire.v3.migration.d.ts +3 -0
  192. package/dist/src/execution/wire/session-inbox-wire.v3.migration.js +1 -0
  193. package/dist/src/execution/workflow-entry-finalization.d.ts +22 -0
  194. package/dist/src/execution/workflow-entry-finalization.js +1 -0
  195. package/dist/src/execution/workflow-entry.d.ts +1 -1
  196. package/dist/src/execution/workflow-entry.js +1 -1
  197. package/dist/src/execution/workflow-registry.d.ts +5 -0
  198. package/dist/src/execution/workflow-registry.js +1 -0
  199. package/dist/src/execution/workflow-runtime.d.ts +9 -11
  200. package/dist/src/execution/workflow-runtime.js +1 -1
  201. package/dist/src/execution/workflow-steps.js +1 -1
  202. package/dist/src/execution/workflow-webhook-route.d.ts +4 -0
  203. package/dist/src/execution/workflow-webhook-route.js +1 -0
  204. package/dist/src/framework/sources/registry.js +1 -1
  205. package/dist/src/harness/advertised-tools.d.ts +3 -0
  206. package/dist/src/harness/advertised-tools.js +1 -1
  207. package/dist/src/harness/approval-delivery-coordinator.d.ts +6 -0
  208. package/dist/src/harness/approval-delivery-coordinator.js +1 -1
  209. package/dist/src/harness/attachment-staging.js +1 -1
  210. package/dist/src/harness/background-tools.d.ts +2 -0
  211. package/dist/src/harness/emission.js +1 -1
  212. package/dist/src/harness/execute-tool.d.ts +2 -28
  213. package/dist/src/harness/hitl/pending-input-resolution.js +1 -1
  214. package/dist/src/harness/input-extraction.d.ts +3 -0
  215. package/dist/src/harness/input-extraction.js +1 -1
  216. package/dist/src/harness/input-requests.js +1 -1
  217. package/dist/src/harness/messages.js +1 -1
  218. package/dist/src/harness/proxy-input-requests.d.ts +10 -0
  219. package/dist/src/harness/proxy-input-requests.js +1 -1
  220. package/dist/src/harness/runtime-actions.d.ts +11 -3
  221. package/dist/src/harness/runtime-actions.js +1 -1
  222. package/dist/src/harness/session-limit-enforcement.js +1 -1
  223. package/dist/src/harness/stale-input-responses.d.ts +2 -1
  224. package/dist/src/harness/stale-input-responses.js +1 -1
  225. package/dist/src/harness/subagent-depth.d.ts +3 -4
  226. package/dist/src/harness/subagent-depth.js +1 -1
  227. package/dist/src/harness/tool-loop.js +2 -2
  228. package/dist/src/harness/tool-runs.d.ts +21 -0
  229. package/dist/src/harness/tool-runs.js +1 -0
  230. package/dist/src/harness/tools.d.ts +0 -2
  231. package/dist/src/harness/tools.js +1 -1
  232. package/dist/src/harness/types.d.ts +6 -7
  233. package/dist/src/harness/workflow-runtime-action-state.d.ts +3 -3
  234. package/dist/src/harness/workflow-runtime-action-state.js +1 -1
  235. package/dist/src/harness/workflow-sandbox.js +1 -1
  236. package/dist/src/harness/workflow-subagent-limit.d.ts +4 -4
  237. package/dist/src/instrumentation/ai-sdk-telemetry.d.ts +1 -0
  238. package/dist/src/instrumentation/ai-sdk-telemetry.js +1 -1
  239. package/dist/src/instrumentation/content-policy.d.ts +3 -1
  240. package/dist/src/instrumentation/content-policy.js +1 -1
  241. package/dist/src/instrumentation/runtime.d.ts +5 -2
  242. package/dist/src/instrumentation/runtime.js +1 -1
  243. package/dist/src/internal/application/build-output-environment.d.ts +2 -0
  244. package/dist/src/internal/application/build-output-environment.js +1 -0
  245. package/dist/src/internal/application/package.js +1 -1
  246. package/dist/src/internal/application/paths.d.ts +1 -2
  247. package/dist/src/internal/application/paths.js +1 -1
  248. package/dist/src/internal/attachments/errors.d.ts +3 -0
  249. package/dist/src/internal/authored-definition/schema-backed.d.ts +6 -2
  250. package/dist/src/internal/authored-definition/schema-backed.js +1 -1
  251. package/dist/src/internal/authored-module-loader.d.ts +7 -1
  252. package/dist/src/internal/authored-module-loader.js +3 -3
  253. package/dist/src/internal/authored-package-boundary.js +1 -1
  254. package/dist/src/internal/authored-runtime-modules.d.ts +2 -0
  255. package/dist/src/internal/authored-runtime-modules.js +1 -1
  256. package/dist/src/internal/client-context.d.ts +2 -0
  257. package/dist/src/internal/client-context.js +1 -0
  258. package/dist/src/internal/nitro/dev-client-address.d.ts +2 -0
  259. package/dist/src/internal/nitro/dev-client-address.js +1 -1
  260. package/dist/src/internal/nitro/development-generation.d.ts +2 -0
  261. package/dist/src/internal/nitro/development-generation.js +1 -1
  262. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  263. package/dist/src/internal/nitro/host/dev-authored-source-watcher.d.ts +2 -2
  264. package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -1
  265. package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
  266. package/dist/src/internal/nitro/host/start-development-server.js +2 -2
  267. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
  268. package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
  269. package/dist/src/internal/workflow-bundle/authored-workflow-directives.d.ts +17 -0
  270. package/dist/src/internal/workflow-bundle/authored-workflow-directives.js +1 -0
  271. package/dist/src/internal/workflow-bundle/authored-workflow-modules.d.ts +19 -0
  272. package/dist/src/internal/workflow-bundle/authored-workflow-modules.js +1 -0
  273. package/dist/src/internal/workflow-bundle/builder-support.d.ts +17 -2
  274. package/dist/src/internal/workflow-bundle/builder-support.js +4 -3
  275. package/dist/src/internal/workflow-bundle/builder.d.ts +2 -2
  276. package/dist/src/internal/workflow-bundle/builder.js +2 -2
  277. package/dist/src/internal/workflow-bundle/dynamic-capability-transform-plugin.d.ts +2 -0
  278. package/dist/src/internal/workflow-bundle/dynamic-capability-transform-plugin.js +1 -1
  279. package/dist/src/internal/workflow-bundle/dynamic-tool-ast-references.d.ts +3 -0
  280. package/dist/src/internal/workflow-bundle/dynamic-tool-transform.d.ts +1 -1
  281. package/dist/src/internal/workflow-bundle/dynamic-tool-transform.js +1 -1
  282. package/dist/src/internal/workflow-bundle/workflow-builders.d.ts +6 -2
  283. package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
  284. package/dist/src/internal/workflow-bundle/workflow-core-shim.d.ts +3 -0
  285. package/dist/src/internal/workflow-bundle/workflow-core-shim.js +1 -1
  286. package/dist/src/internal/workflow-bundle/workflow-directive-ast.d.ts +7 -0
  287. package/dist/src/internal/workflow-bundle/workflow-directive-ast.js +1 -0
  288. package/dist/src/internal/workflow-bundle/workflow-transformer.d.ts +15 -1
  289. package/dist/src/internal/workflow-bundle/workflow-transformer.js +4 -4
  290. package/dist/src/packages/eve-catalog/src/index.js +1 -1
  291. package/dist/src/protocol/baggage.d.ts +6 -0
  292. package/dist/src/protocol/baggage.js +1 -0
  293. package/dist/src/protocol/routes.d.ts +2 -2
  294. package/dist/src/public/channels/slack/attachments.js +1 -1
  295. package/dist/src/public/channels/teams/attachments.d.ts +2 -2
  296. package/dist/src/public/channels/teams/attachments.js +1 -1
  297. package/dist/src/public/channels/teams/teamsChannel.js +1 -1
  298. package/dist/src/public/channels/telegram/attachments.js +1 -1
  299. package/dist/src/public/definitions/remote-agent.d.ts +6 -3
  300. package/dist/src/public/local-dev.d.ts +9 -0
  301. package/dist/src/public/local-dev.js +1 -0
  302. package/dist/src/public/next/vercel-output-config.js +1 -1
  303. package/dist/src/public/workflow/index.d.ts +3 -0
  304. package/dist/src/public/workflow/index.js +1 -0
  305. package/dist/src/public/workflow-modules.d.js +1 -0
  306. package/dist/src/public/workflow-modules.d.ts +11 -0
  307. package/dist/src/runtime/actions/keys.d.ts +3 -0
  308. package/dist/src/runtime/actions/keys.js +1 -1
  309. package/dist/src/runtime/agent/bootstrap.js +1 -1
  310. package/dist/src/runtime/loaders/bundled-artifacts.js +1 -1
  311. package/dist/src/runtime/local-dev-capability.d.ts +55 -0
  312. package/dist/src/runtime/local-dev-capability.js +1 -0
  313. package/dist/src/runtime/resolve-agent-graph.js +1 -1
  314. package/dist/src/runtime/resolve-agent.js +1 -1
  315. package/dist/src/runtime/resolve-tool.js +1 -1
  316. package/dist/src/runtime/sessions/runtime-session.d.ts +1 -0
  317. package/dist/src/runtime/sessions/runtime-session.js +1 -1
  318. package/dist/src/runtime/sessions/turn.d.ts +3 -0
  319. package/dist/src/runtime/subagents/registry.js +1 -1
  320. package/dist/src/runtime/tools/registry.d.ts +1 -0
  321. package/dist/src/runtime/tools/registry.js +1 -1
  322. package/dist/src/runtime/types.d.ts +2 -2
  323. package/dist/src/services/dev-client/client-options.d.ts +1 -0
  324. package/dist/src/services/dev-client/client-options.js +1 -1
  325. package/dist/src/services/dev-client/runtime-artifacts.d.ts +2 -0
  326. package/dist/src/services/dev-client/runtime-artifacts.js +1 -1
  327. package/dist/src/setup/connection-connector.d.ts +4 -2
  328. package/dist/src/setup/connection-connector.js +2 -2
  329. package/dist/src/setup/flows/login.js +1 -1
  330. package/dist/src/setup/flows/model.js +1 -1
  331. package/dist/src/setup/flows/provider.d.ts +5 -0
  332. package/dist/src/setup/flows/provider.js +4 -4
  333. package/dist/src/setup/flows/registry-session.d.ts +24 -7
  334. package/dist/src/setup/flows/registry-session.js +1 -1
  335. package/dist/src/setup/flows/registry.d.ts +35 -29
  336. package/dist/src/setup/flows/registry.js +2 -1
  337. package/dist/src/setup/integrations/web/setup.d.ts +0 -2
  338. package/dist/src/setup/integrations/web/setup.js +1 -1
  339. package/dist/src/setup/prompter.d.ts +24 -4
  340. package/dist/src/setup/prompter.js +1 -1
  341. package/dist/src/setup/scaffold/create/project.js +2 -2
  342. package/dist/src/setup/vercel-project.js +0 -0
  343. package/dist/src/shared/dispatch-action.d.ts +30 -0
  344. package/dist/src/shared/dispatch-action.js +1 -0
  345. package/dist/src/shared/forwarded-trace-policy.d.ts +28 -0
  346. package/dist/src/shared/forwarded-trace-policy.js +1 -0
  347. package/dist/src/shared/instrumentation-decision.d.ts +3 -0
  348. package/dist/src/shared/instrumentation-decision.js +1 -1
  349. package/dist/src/shared/workflow-sandbox.d.ts +1 -1
  350. package/dist/src/svelte/index.js +1 -1
  351. package/dist/src/svelte/use-eve-agent.js +1 -1
  352. package/dist/src/tasks/json.js +1 -1
  353. package/dist/src/tools/behavior.d.ts +61 -0
  354. package/dist/src/tools/behavior.js +1 -0
  355. package/dist/src/tools/definition.d.ts +39 -3
  356. package/dist/src/tools/durable-callbacks.d.ts +1 -0
  357. package/dist/src/tools/framework/agent.d.ts +2 -11
  358. package/dist/src/tools/framework/agent.js +1 -1
  359. package/dist/src/tools/framework/ask-question.d.ts +2 -14
  360. package/dist/src/tools/framework/ask-question.js +1 -1
  361. package/dist/src/tools/framework/task-cancel.d.ts +2 -7
  362. package/dist/src/tools/framework/task-cancel.js +1 -1
  363. package/dist/src/tools/framework/task-contract.d.ts +0 -2
  364. package/dist/src/tools/framework/task-contract.js +1 -1
  365. package/dist/src/tools/framework/task-update.d.ts +2 -7
  366. package/dist/src/tools/framework/task-update.js +1 -1
  367. package/dist/src/tools/native-definition.d.ts +6 -0
  368. package/dist/src/tools/native-definition.js +1 -0
  369. package/dist/src/tools/provided/load-skill.js +1 -1
  370. package/dist/src/tracing/agent-approval-instrumentation.js +1 -1
  371. package/dist/src/tracing/agent-channel-delivery-instrumentation.js +1 -1
  372. package/dist/src/tracing/agent-otel-provider.js +2 -2
  373. package/dist/src/tracing/agent-otel-session-context.js +1 -1
  374. package/dist/src/tracing/agent-tool-instrumentation.js +1 -1
  375. package/dist/src/tracing/agent-trace-context-store.d.ts +1 -1
  376. package/dist/src/tracing/agent-trace-context-store.js +1 -1
  377. package/dist/src/tracing/install-instrumentation-runtime.js +1 -1
  378. package/dist/src/tracing/otel-declaration.d.ts +5 -3
  379. package/dist/src/tracing/otel-registration.d.ts +3 -1
  380. package/dist/src/tracing/otel-registration.js +1 -1
  381. package/dist/src/vue/index.js +1 -1
  382. package/dist/src/vue/use-eve-agent.js +1 -1
  383. package/docs/channels/custom.mdx +2 -0
  384. package/docs/channels/eve.mdx +5 -1
  385. package/docs/channels/teams.mdx +6 -1
  386. package/docs/concepts/sessions-runs-and-streaming.md +4 -2
  387. package/docs/guides/auth-and-route-protection.md +5 -1
  388. package/docs/guides/client/messages.mdx +6 -0
  389. package/docs/guides/dev-tui.md +30 -18
  390. package/docs/guides/remote-agents.md +25 -0
  391. package/docs/reference/cli.md +2 -2
  392. package/docs/reference/typescript-api.md +24 -0
  393. package/docs/tools/meta.json +1 -1
  394. package/docs/tools/overview.mdx +7 -0
  395. package/docs/tools/workflows.mdx +288 -0
  396. package/package.json +17 -1
  397. package/dist/src/execution/tools/tasks.d.ts +0 -18
  398. package/dist/src/execution/tools/tasks.js +0 -1
  399. package/dist/src/internal/authored-directive-prologue.d.ts +0 -4
  400. package/dist/src/internal/authored-directive-prologue.js +0 -1
@@ -1 +1 @@
1
- import{normalizeChannelAudience}from"#shared/channel-audience.js";import{isSampledTrace,resolveTracePolicy,resolveTracePolicyDecision}from"#tracing/sampled-trace.js";import{sessionIdempotencyKey}from"#instrumentation/lifecycle.js";function createAgentOtelSessionContext(n){let openSessionTrace=e=>{if(e.traceSeed!==void 0){if(!isSampledTrace(e.traceSeed))return{isRemote:!1,spanId:e.traceSeed.spanId,traceFlags:0,traceId:e.traceSeed.traceId};let startSpan=()=>n.tracer.startSpan(`agent.session`,{attributes:{"agent.framework.name":`eve`,"agent.framework.version":n.frameworkVersion,"agent.channel.audience":e.channelAudience,"agent.name":e.agentName,"agent.session.id":e.sessionId,"agent.trace.schema.version":3},root:!0}),r=n.idGenerator.withSpanId(e.traceSeed.spanId,()=>n.idGenerator.withTraceId(e.traceSeed.traceId,startSpan));return r.addEvent(`session.started`),r.end(),r.spanContext()}if(e.traceDecision.action===`drop`)return{isRemote:!1,spanId:n.idGenerator.deriveSpanId(`session:${e.sessionId}`),traceFlags:0,traceId:n.idGenerator.generateTraceId()};let r=n.tracer.startSpan(`agent.session`,{attributes:{"agent.framework.name":`eve`,"agent.framework.version":n.frameworkVersion,"agent.channel.audience":e.channelAudience,"agent.name":e.agentName,"agent.session.id":e.sessionId,"agent.trace.schema.version":3},root:!0});return r.addEvent(`session.started`),r.end(),r.spanContext()},ensureSessionContext=async t=>{let r=await n.stateStore.getSession(t.sessionId);if(r===void 0){let i=normalizeChannelAudience(t.channelAudience),a=resolveSessionTraceDecision(t,i,n.tracePolicy);r={agentName:t.agentName,channelAudience:i,channelKind:t.channelKind,decision:a,context:t.parentTraceContext===void 0?openSessionTrace({agentName:t.agentName,channelAudience:i,channelType:t.channelType,rootSessionId:t.rootSessionId,sessionId:t.sessionId,traceDecision:a,traceSeed:t.traceSeed}):adoptedSpanContext(t.parentTraceContext),rootSessionId:t.rootSessionId},await n.stateStore.setSession(t.sessionId,r)}return r};return{ensureSessionContext,prepareSessionTrace:async e=>{let t=await ensureSessionContext(e);return portableSpanContext(t.context,t.decision)},prepareTurnTrace:async e=>{let t=await n.stateStore.getTurn(e.sessionId,e.turnId);if(t!==void 0)return{decision:(await n.stateStore.getSession(e.sessionId))?.decision,spanId:t.parentSpanId,traceFlags:t.context.traceFlags,traceId:t.context.traceId};let r=await ensureSessionContext({agentName:e.agentName,channelAudience:`unknown`,channelKind:void 0,idempotencyKey:sessionIdempotencyKey(e.sessionId),parentTraceContext:e.parentTraceContext,rootSessionId:e.rootSessionId,sessionId:e.sessionId,type:`session.started`}),a={isRemote:!1,spanId:n.idGenerator.deriveSpanId(`turn:${e.idempotencyKey}`),traceFlags:r.context.traceFlags,traceId:r.context.traceId};return await n.stateStore.setTurn(e.sessionId,e.turnId,{context:a,parentIsRemote:r.context.isRemote,parentSpanId:r.context.spanId,rootSessionId:e.rootSessionId,sequence:e.sequence,startTimeMs:Date.now(),subagentName:e.parentLineage?.subagentName}),portableSpanContext(r.context,r.decision)}}}function portableSpanContext(e,t){return{decision:t,spanId:e.spanId,traceFlags:e.traceFlags,traceId:e.traceId}}function adoptedSpanContext(e){return{isRemote:`isRemote`in e&&e.isRemote===!0,spanId:e.spanId,traceFlags:e.traceFlags,traceId:e.traceId}}function resolveSessionTraceDecision(e,i,a){return e.traceSeed?.decision===void 0?e.traceSeed===void 0?e.parentTraceContext===void 0?e.agentName===void 0?a===void 0?resolveTracePolicyDecision(!0,i):{action:`drop`}:resolveTracePolicy(a,{agentName:e.agentName,audience:i,channelType:e.channelType}):resolveTracePolicyDecision(isSampledTrace(e.parentTraceContext),i):resolveTracePolicyDecision(isSampledTrace(e.traceSeed),i):e.traceSeed.decision}export{createAgentOtelSessionContext};
1
+ import{normalizeChannelAudience}from"#shared/channel-audience.js";import{isSampledTrace,resolveTracePolicy,resolveTracePolicyDecision}from"#tracing/sampled-trace.js";import{sessionIdempotencyKey}from"#instrumentation/lifecycle.js";import{readInstrumentationDecision}from"#shared/instrumentation-decision.js";function createAgentOtelSessionContext(n){let openSessionTrace=e=>{if(e.traceSeed!==void 0){if(e.traceDecision.action===`drop`||!isSampledTrace(e.traceSeed))return{isRemote:!1,spanId:e.traceSeed.spanId,traceFlags:0,traceId:e.traceSeed.traceId};let startSpan=()=>n.tracer.startSpan(`agent.session`,{attributes:{"agent.framework.name":`eve`,"agent.framework.version":n.frameworkVersion,"agent.channel.audience":e.channelAudience,"agent.name":e.agentName,"agent.session.id":e.sessionId,"agent.trace.schema.version":3},root:!0}),r=n.idGenerator.withSpanId(e.traceSeed.spanId,()=>n.idGenerator.withTraceId(e.traceSeed.traceId,startSpan));return r.addEvent(`session.started`),r.end(),r.spanContext()}if(e.traceDecision.action===`drop`)return{isRemote:!1,spanId:n.idGenerator.deriveSpanId(`session:${e.sessionId}`),traceFlags:0,traceId:n.idGenerator.generateTraceId()};let r=n.tracer.startSpan(`agent.session`,{attributes:{"agent.framework.name":`eve`,"agent.framework.version":n.frameworkVersion,"agent.channel.audience":e.channelAudience,"agent.name":e.agentName,"agent.session.id":e.sessionId,"agent.trace.schema.version":3},root:!0});return r.addEvent(`session.started`),r.end(),r.spanContext()},ensureSessionContext=async t=>{let r=await n.stateStore.getSession(t.sessionId);if(r===void 0){let i=normalizeChannelAudience(t.channelAudience),a=resolveSessionTraceDecision(t,i,n.tracePolicy);r={agentName:t.agentName,channelAudience:i,channelKind:t.channelKind,decision:a,context:t.parentTraceContext===void 0?openSessionTrace({agentName:t.agentName,channelAudience:i,channelType:t.channelType,rootSessionId:t.rootSessionId,sessionId:t.sessionId,traceDecision:a,traceSeed:t.traceSeed}):adoptedSpanContext(t.parentTraceContext),rootSessionId:t.rootSessionId},await n.stateStore.setSession(t.sessionId,r)}return r};return{ensureSessionContext,prepareSessionTrace:async e=>{let t=await ensureSessionContext(e);return portableSpanContext(t.context,t.decision)},prepareTurnTrace:async e=>{let t=await n.stateStore.getTurn(e.sessionId,e.turnId);if(t!==void 0)return{decision:(await n.stateStore.getSession(e.sessionId))?.decision,spanId:t.parentSpanId,traceFlags:t.context.traceFlags,traceId:t.context.traceId};let r=await ensureSessionContext({agentName:e.agentName,channelAudience:`unknown`,channelKind:void 0,idempotencyKey:sessionIdempotencyKey(e.sessionId),parentTraceContext:e.parentTraceContext,rootSessionId:e.rootSessionId,sessionId:e.sessionId,type:`session.started`}),a={isRemote:!1,spanId:n.idGenerator.deriveSpanId(`turn:${e.idempotencyKey}`),traceFlags:r.context.traceFlags,traceId:r.context.traceId};return await n.stateStore.setTurn(e.sessionId,e.turnId,{context:a,parentIsRemote:r.context.isRemote,parentSpanId:r.context.spanId,rootSessionId:e.rootSessionId,sequence:e.sequence,startTimeMs:Date.now(),subagentName:e.parentLineage?.subagentName}),portableSpanContext(r.context,r.decision)}}}function portableSpanContext(e,t){return{decision:t,spanId:e.spanId,traceFlags:e.traceFlags,traceId:e.traceId}}function adoptedSpanContext(e){return{isRemote:`isRemote`in e&&e.isRemote===!0,spanId:e.spanId,traceFlags:e.traceFlags,traceId:e.traceId}}function resolveSessionTraceDecision(e,i,o){return e.traceSeed?.decision===void 0?e.traceSeed===void 0?e.parentTraceContext===void 0?e.agentName===void 0?o===void 0?resolveTracePolicyDecision(!0,i):{action:`drop`}:resolveTracePolicy(o,{agentName:e.agentName,audience:i,channelType:e.channelType}):resolveTracePolicyDecision(isSampledTrace(e.parentTraceContext),i):resolveTracePolicyDecision(isSampledTrace(e.traceSeed),i):readInstrumentationDecision(e.traceSeed.decision)??{action:`drop`}}export{createAgentOtelSessionContext};
@@ -1 +1 @@
1
- import{ROOT_CONTEXT,SpanKind,SpanStatusCode,trace}from"#compiled/@opentelemetry/api/index.js";import{actionIdempotencyKey}from"#instrumentation/lifecycle.js";import{contentAttribute}from"#tracing/agent-otel-content.js";function createAgentToolInstrumentation(e){let n=new Map,r=new Map,onStarted=async t=>{let n=actionIdempotencyKey(t.scope.sessionId,t.scope.turnId,t.callId),r=e.resolveFallback(t),a=r===void 0?void 0:reserve(t,n,r),o=await e.actionContextFor(t.scope.sessionId,t.scope.turnId,t.callId);if(a===void 0){if(o===void 0)return;a=reserve(t,n,o)}o!==void 0&&startSpan(a,o.context)},onTerminal=async t=>{let n=r.get(t.scope.attemptId)?.get(t.idempotencyKey);if(n!==void 0){if(n.terminal=t,n.span===void 0){let t=await e.actionContextFor(n.event.scope.sessionId,n.event.scope.turnId,n.event.callId);t!==void 0&&startSpan(n,t.context)}finishIfReady(n)}};return{async actionStarted(t){let r=n.get(t.idempotencyKey);if(r===void 0||r.span!==void 0||r.finished===!0)return;let i=await e.actionContextFor(t.scope.sessionId,t.scope.turnId,t.callId);i!==void 0&&(startSpan(r,i.context),finishIfReady(r))},contextFor:(e,t)=>r.get(e)?.get(t)?.context,drain(e,t){let n=r.get(e);if(n!==void 0){for(let e of n.values())e.finished!==!0&&(e.span===void 0&&startSpan(e,e.fallbackParent),finish(e,t));r.delete(e)}},events:{"tool.call.completed":onTerminal,"tool.call.failed":onTerminal,"tool.call.started":onStarted}};function getAttemptStates(e){let t=r.get(e);return t===void 0&&(t=new Map,r.set(e,t)),t}function reserve(t,r,i){let a=e.idGenerator.deriveSpanId(`tool:${t.idempotencyKey}`),o={actionKey:r,attemptId:t.scope.attemptId,context:contextFromSpanContext({isRemote:!1,spanId:a,traceFlags:i.spanContext.traceFlags,traceId:i.spanContext.traceId}),event:t,fallbackParent:i.context,idempotencyKey:t.idempotencyKey,spanId:a,startTimeMs:Date.now()};return getAttemptStates(t.scope.attemptId).set(t.idempotencyKey,o),n.set(r,o),o}function startSpan(n,r){if(!(n.span!==void 0||n.finished===!0)&&(n.span=e.idGenerator.withSpanId(n.spanId,()=>e.tracer.startSpan(`execute_tool ${n.event.toolName}`,{attributes:toolAttributes(n.event),kind:SpanKind.INTERNAL,startTime:n.startTimeMs},r)),e.recordInputs)){let e=contentAttribute(n.event.input,!1);e!==void 0&&n.span.setAttribute(`gen_ai.tool.call.arguments`,e)}}function finishIfReady(e){e.span===void 0||e.terminal===void 0||finish(e)}function finish(t,i){let o=t.span;if(o===void 0||t.finished===!0)return;t.finished=!0;let s=t.terminal;if(i!==void 0)recordError(o,i.error);else if(s?.type===`tool.call.failed`)recordError(o,s.error);else if(s?.output.type===`error`)recordError(o,s.output.error);else if(s!==void 0&&e.recordOutputs){let e=contentAttribute(s.output.output,!1);e!==void 0&&o.setAttribute(`gen_ai.tool.call.result`,e)}o.end(),n.delete(t.actionKey);let c=r.get(t.attemptId);c?.delete(t.idempotencyKey),c?.size===0&&r.delete(t.attemptId)}}function toolAttributes(e){return{"gen_ai.operation.name":`execute_tool`,"gen_ai.tool.call.id":e.callId,"gen_ai.tool.name":e.toolName,"gen_ai.tool.type":`function`}}function contextFromSpanContext(t){return trace.setSpan(ROOT_CONTEXT,trace.wrapSpanContext(t))}function recordError(e,t){e.setAttribute(`error.type`,t instanceof Error?t.name||`Error`:`_OTHER`),t instanceof Error?(e.recordException(t),e.setStatus({code:SpanStatusCode.ERROR,message:t.message})):e.setStatus({code:SpanStatusCode.ERROR})}export{createAgentToolInstrumentation};
1
+ import{ROOT_CONTEXT,SpanKind,SpanStatusCode,trace}from"#compiled/@opentelemetry/api/index.js";import{actionIdempotencyKey}from"#instrumentation/lifecycle.js";import{contentAttribute}from"#tracing/agent-otel-content.js";import{withChannelAudience}from"#tracing/channel-audience-context.js";function createAgentToolInstrumentation(e){let n=new Map,r=new Map,onStarted=async t=>{let n=actionIdempotencyKey(t.scope.sessionId,t.scope.turnId,t.callId),r=e.resolveFallback(t),a=r===void 0?void 0:reserve(t,n,r),o=await e.actionContextFor(t.scope.sessionId,t.scope.turnId,t.callId);if(a===void 0){if(o===void 0)return;a=reserve(t,n,o)}o!==void 0&&startSpan(a,o.context)},onTerminal=async t=>{let n=r.get(t.scope.attemptId)?.get(t.idempotencyKey);if(n!==void 0){if(n.terminal=t,n.span===void 0){let t=await e.actionContextFor(n.event.scope.sessionId,n.event.scope.turnId,n.event.callId);t!==void 0&&startSpan(n,t.context)}finishIfReady(n)}};return{async actionStarted(t){let r=n.get(t.idempotencyKey);if(r===void 0||r.span!==void 0||r.finished===!0)return;let i=await e.actionContextFor(t.scope.sessionId,t.scope.turnId,t.callId);i!==void 0&&(startSpan(r,i.context),finishIfReady(r))},contextFor:(e,t)=>r.get(e)?.get(t)?.context,drain(e,t){let n=r.get(e);if(n!==void 0){for(let e of n.values())e.finished!==!0&&(e.span===void 0&&startSpan(e,e.fallbackParent),finish(e,t));r.delete(e)}},events:{"tool.call.completed":onTerminal,"tool.call.failed":onTerminal,"tool.call.started":onStarted}};function getAttemptStates(e){let t=r.get(e);return t===void 0&&(t=new Map,r.set(e,t)),t}function reserve(t,r,i){let a=e.idGenerator.deriveSpanId(`tool:${t.idempotencyKey}`),s={actionKey:r,attemptId:t.scope.attemptId,context:withChannelAudience(contextFromSpanContext({isRemote:!1,spanId:a,traceFlags:i.spanContext.traceFlags,traceId:i.spanContext.traceId}),t.scope.channelAudience),event:t,fallbackParent:i.context,idempotencyKey:t.idempotencyKey,spanId:a,startTimeMs:Date.now()};return getAttemptStates(t.scope.attemptId).set(t.idempotencyKey,s),n.set(r,s),s}function startSpan(n,r){if(!(n.span!==void 0||n.finished===!0)&&(n.span=e.idGenerator.withSpanId(n.spanId,()=>e.tracer.startSpan(`execute_tool ${n.event.toolName}`,{attributes:toolAttributes(n.event),kind:SpanKind.INTERNAL,startTime:n.startTimeMs},r)),e.recordInputs)){let e=contentAttribute(n.event.input,!1);e!==void 0&&n.span.setAttribute(`gen_ai.tool.call.arguments`,e)}}function finishIfReady(e){e.span===void 0||e.terminal===void 0||finish(e)}function finish(t,i){let o=t.span;if(o===void 0||t.finished===!0)return;t.finished=!0;let s=t.terminal;if(i!==void 0)recordError(o,i.error);else if(s?.type===`tool.call.failed`)recordError(o,s.error);else if(s?.output.type===`error`)recordError(o,s.output.error);else if(s!==void 0&&e.recordOutputs){let e=contentAttribute(s.output.output,!1);e!==void 0&&o.setAttribute(`gen_ai.tool.call.result`,e)}o.end(),n.delete(t.actionKey);let c=r.get(t.attemptId);c?.delete(t.idempotencyKey),c?.size===0&&r.delete(t.attemptId)}}function toolAttributes(e){return{"gen_ai.operation.name":`execute_tool`,"gen_ai.tool.call.id":e.callId,"gen_ai.tool.name":e.toolName,"gen_ai.tool.type":`function`}}function contextFromSpanContext(t){return trace.setSpan(ROOT_CONTEXT,trace.wrapSpanContext(t))}function recordError(e,t){e.setAttribute(`error.type`,t instanceof Error?t.name||`Error`:`_OTHER`),t instanceof Error?(e.recordException(t),e.setStatus({code:SpanStatusCode.ERROR,message:t.message})):e.setStatus({code:SpanStatusCode.ERROR})}export{createAgentToolInstrumentation};
@@ -1,7 +1,7 @@
1
1
  import type { SessionTraceContext } from "#channel/types.js";
2
2
  import type { ContextAccessor } from "#context/key.js";
3
3
  import type { AgentActionTraceState, AgentSessionTraceState, AgentTraceStateStore, AgentTurnTraceState } from "#tracing/agent-trace-state.js";
4
- import type { InstrumentationDecision } from "#shared/instrumentation-decision.js";
4
+ import { type InstrumentationDecision } from "#shared/instrumentation-decision.js";
5
5
  /** Reads the decision already bound to a session in the current worker context. */
6
6
  export declare function readCurrentSessionTraceDecision(sessionId: string): InstrumentationDecision | undefined;
7
7
  export declare function readSessionTraceDecision(context: ContextAccessor, sessionId: string): InstrumentationDecision | undefined;
@@ -1 +1 @@
1
- import{normalizeChannelAudience}from"#shared/channel-audience.js";import{contextStorage,loadContext}from"#context/container.js";import{SessionTraceSeedKey}from"#context/keys.js";import{ContextKey}from"#context/key.js";const AgentTraceContextKey=new ContextKey(`eve.harness.agentTrace`,{codec:{deserialize:deserializeState,serialize:serializeState}});function readCurrentSessionTraceDecision(e){let n=contextStorage.getStore();return n===void 0?void 0:readSessionTraceDecision(n,e)}function readSessionTraceDecision(e,t){return e.get(AgentTraceContextKey)?.sessions[t]?.decision}function preserveSerializedAgentTraceState(e,t){let n=t[AgentTraceContextKey.name];return n===void 0?e:{...e,[AgentTraceContextKey.name]:n}}function readSessionTraceContext(e,t){let n=e[AgentTraceContextKey.name];if(n===void 0)return;let r=deserializeState(n).sessions[t];return r===void 0?void 0:withTraceDecision(e,r.context,r.decision)}function readActionTraceContext(e,t,n,r){let i=e[AgentTraceContextKey.name];if(i===void 0)return;let o=deserializeState(i),s=Object.values(o.actions).find(e=>e.sessionId===t&&e.turnId===n&&e.callId===r);if(s!==void 0)return withTraceDecision(e,{isRemote:!1,spanId:s.spanId,traceFlags:s.parent.traceFlags,traceId:s.parent.traceId},o.sessions[s.sessionId]?.decision)}function withTraceDecision(e,t,n){let i=e[SessionTraceSeedKey.name],a=n??i?.decision;return a===void 0?t:{...t,decision:a}}var ContextAgentTraceStateStore=class{deleteAction(e){updateState(t=>{let n={...t.actions};return delete n[e],{...t,actions:n}})}deleteActions(e,t){updateState(n=>{let r={...n.actions};for(let[n,i]of Object.entries(r))i.sessionId===e&&(t===void 0||i.turnId===t)&&delete r[n];return{...n,actions:r}})}deleteSession(e){updateState(t=>{let n={...t.sessions};return delete n[e],{...t,sessions:n}})}deleteTurn(e,t){updateState(n=>{let r={...n.turns};return delete r[turnKey(e,t)],{...n,turns:r}})}findAction(e,n){return Object.values(contextStorage.getStore()?.get(AgentTraceContextKey)?.actions??{}).find(t=>t.sessionId===e&&t.callId===n)}getAction(e){return contextStorage.getStore()?.get(AgentTraceContextKey)?.actions[e]}getSession(e){return contextStorage.getStore()?.get(AgentTraceContextKey)?.sessions[e]}getTurn(e,n){return contextStorage.getStore()?.get(AgentTraceContextKey)?.turns[turnKey(e,n)]}setAction(e,t){updateState(n=>({...n,actions:{...n.actions,[e]:t}}))}setSession(e,t){updateState(n=>({...n,sessions:{...n.sessions,[e]:t}}))}setTurn(e,t,n){updateState(r=>({...r,turns:{...r.turns,[turnKey(e,t)]:n}}))}updateTurn(e,t,n){updateState(r=>{let i=turnKey(e,t),a=r.turns[i];return a===void 0?r:{...r,turns:{...r.turns,[i]:n(a)}}})}};function updateState(e){loadContext().set(AgentTraceContextKey,t=>e(t??{actions:{},sessions:{},turns:{}}))}function turnKey(e,t){return`${e}\0${t}`}function serializeState(e){return{actions:e.actions,sessions:Object.fromEntries(Object.entries(e.sessions).map(([e,t])=>[e,{...t,context:serializeSpanContext(t.context)}])),turns:Object.fromEntries(Object.entries(e.turns).map(([e,t])=>[e,{...t,context:serializeSpanContext(t.context),terminal:t.terminal===void 0?void 0:t.terminal.type===`turn.failed`?{error:serializeError(t.terminal.error),type:t.terminal.type}:{type:t.terminal.type}}]))}}function deserializeState(t){return isRecord(t)?{actions:deserializeRecord(t.actions,deserializeAction),sessions:deserializeRecord(t.sessions,t=>{if(!(!isRecord(t)||!isSpanContext(t.context)))return{agentName:typeof t.agentName==`string`?t.agentName:void 0,channelAudience:normalizeChannelAudience(t.channelAudience),channelKind:typeof t.channelKind==`string`?t.channelKind:void 0,context:t.context,decision:deserializeInstrumentationDecision(t.decision),rootSessionId:typeof t.rootSessionId==`string`?t.rootSessionId:``}}),turns:deserializeRecord(t.turns,e=>{if(!(!isRecord(e)||!isSpanContext(e.context))&&!(typeof e.parentSpanId!=`string`||typeof e.startTimeMs!=`number`))return{context:e.context,modelUsage:deserializeModelUsage(e.modelUsage),parentIsRemote:typeof e.parentIsRemote==`boolean`?e.parentIsRemote:void 0,parentSpanId:e.parentSpanId,rootSessionId:typeof e.rootSessionId==`string`?e.rootSessionId:``,sequence:typeof e.sequence==`number`?e.sequence:0,startTimeMs:e.startTimeMs,subagentName:typeof e.subagentName==`string`?e.subagentName:void 0,terminal:deserializeTerminal(e.terminal)}})}:{actions:{},sessions:{},turns:{}}}function deserializeModelUsage(e){if(!isRecord(e))return;let t=typeof e.inputTokens==`number`?e.inputTokens:void 0,n=typeof e.outputTokens==`number`?e.outputTokens:void 0;return t===void 0&&n===void 0?void 0:{inputTokens:t,outputTokens:n}}function deserializeAction(t){if(!(!isRecord(t)||typeof t.attemptIndex!=`number`||typeof t.callId!=`string`||!isActionKind(t.kind)||typeof t.name!=`string`||!isSpanContext(t.parent)||typeof t.rootSessionId!=`string`||typeof t.sessionId!=`string`||typeof t.spanId!=`string`||typeof t.startTimeMs!=`number`||typeof t.stepIndex!=`number`||typeof t.turnId!=`string`))return{attemptIndex:t.attemptIndex,callId:t.callId,channelAudience:normalizeChannelAudience(t.channelAudience),inputAttribute:typeof t.inputAttribute==`string`?t.inputAttribute:void 0,kind:t.kind,name:t.name,parent:t.parent,rootSessionId:t.rootSessionId,sessionId:t.sessionId,spanId:t.spanId,startTimeMs:t.startTimeMs,stepIndex:t.stepIndex,turnId:t.turnId}}function isActionKind(e){return e===`load-skill`||e===`remote-agent-call`||e===`subagent-call`||e===`tool-call`}function deserializeRecord(e,t){if(!isRecord(e))return{};let n={};for(let[r,i]of Object.entries(e)){let e=t(i);e!==void 0&&(n[r]=e)}return n}function deserializeTerminal(e){if(!isRecord(e)||typeof e.type!=`string`)return;let t=e.type;if(isTurnTerminalType(t))return t===`turn.failed`?{error:deserializeError(e.error),type:t}:{type:t}}function serializeSpanContext(e){return{isRemote:e.isRemote,spanId:e.spanId,traceFlags:e.traceFlags,traceId:e.traceId}}function isSpanContext(e){return isRecord(e)&&typeof e.spanId==`string`&&typeof e.traceFlags==`number`&&typeof e.traceId==`string`}function serializeError(e){return e instanceof Error?{message:e.message,name:e.name,stack:e.stack}:void 0}function deserializeError(e){if(!isRecord(e)||typeof e.message!=`string`)return;let t=Error(e.message);return typeof e.name==`string`&&(t.name=e.name),typeof e.stack==`string`&&(t.stack=e.stack),t}function isTurnTerminalType(e){return e===`turn.cancelled`||e===`turn.completed`||e===`turn.failed`}function deserializeInstrumentationDecision(e){if(isRecord(e))return e.action===`drop`?{action:`drop`}:e.action===`record`&&typeof e.recordInputs==`boolean`&&typeof e.recordOutputs==`boolean`?{action:`record`,recordInputs:e.recordInputs,recordOutputs:e.recordOutputs}:void 0}function isRecord(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}export{ContextAgentTraceStateStore,preserveSerializedAgentTraceState,readActionTraceContext,readCurrentSessionTraceDecision,readSessionTraceContext,readSessionTraceDecision};
1
+ import{normalizeChannelAudience}from"#shared/channel-audience.js";import{contextStorage,loadContext}from"#context/container.js";import{SessionTraceSeedKey}from"#context/keys.js";import{ContextKey}from"#context/key.js";import{decisionToTraceContentCeiling,resolveForwardedTraceSeed}from"#shared/forwarded-trace-policy.js";import{readInstrumentationDecision}from"#shared/instrumentation-decision.js";const AgentTraceContextKey=new ContextKey(`eve.harness.agentTrace`,{codec:{deserialize:deserializeState,serialize:serializeState}});function readCurrentSessionTraceDecision(e){let n=contextStorage.getStore();return n===void 0?void 0:readSessionTraceDecision(n,e)}function readSessionTraceDecision(e,t){return e.get(AgentTraceContextKey)?.sessions[t]?.decision}function preserveSerializedAgentTraceState(e,t){let n=t[AgentTraceContextKey.name];return n===void 0?e:{...e,[AgentTraceContextKey.name]:n}}function readSessionTraceContext(e,t){let n=e[AgentTraceContextKey.name];if(n===void 0)return;let r=deserializeState(n).sessions[t];return r===void 0?void 0:withTraceDecision(e,r.context,r.decision)}function readActionTraceContext(e,t,n,r){let i=e[AgentTraceContextKey.name];if(i===void 0)return;let a=deserializeState(i),o=Object.values(a.actions).find(e=>e.sessionId===t&&e.turnId===n&&e.callId===r);if(o!==void 0)return withTraceDecision(e,{isRemote:!1,spanId:o.spanId,traceFlags:o.parent.traceFlags,traceId:o.parent.traceId},a.sessions[o.sessionId]?.decision)}function withTraceDecision(e,t,n){let i=e[SessionTraceSeedKey.name],s=resolveForwardedTraceSeed({decision:n??i?.decision,forwardedTracePolicy:i?.forwardedTracePolicy,traceFlags:t.traceFlags}),c=s.decision,l=s.forwardedTracePolicy,u=decisionToTraceContentCeiling(c),d={...t,traceFlags:s.traceFlags};if(l===void 0)return c===void 0?d:{...d,decision:c};let f=u===void 0?l:{...l,ceiling:u};return c===void 0?{...d,forwardedTracePolicy:f}:{...d,decision:c,forwardedTracePolicy:f}}var ContextAgentTraceStateStore=class{deleteAction(e){updateState(t=>{let n={...t.actions};return delete n[e],{...t,actions:n}})}deleteActions(e,t){updateState(n=>{let r={...n.actions};for(let[n,i]of Object.entries(r))i.sessionId===e&&(t===void 0||i.turnId===t)&&delete r[n];return{...n,actions:r}})}deleteSession(e){updateState(t=>{let n={...t.sessions};return delete n[e],{...t,sessions:n}})}deleteTurn(e,t){updateState(n=>{let r={...n.turns};return delete r[turnKey(e,t)],{...n,turns:r}})}findAction(e,n){return Object.values(contextStorage.getStore()?.get(AgentTraceContextKey)?.actions??{}).find(t=>t.sessionId===e&&t.callId===n)}getAction(e){return contextStorage.getStore()?.get(AgentTraceContextKey)?.actions[e]}getSession(e){return contextStorage.getStore()?.get(AgentTraceContextKey)?.sessions[e]}getTurn(e,n){return contextStorage.getStore()?.get(AgentTraceContextKey)?.turns[turnKey(e,n)]}setAction(e,t){updateState(n=>({...n,actions:{...n.actions,[e]:t}}))}setSession(e,t){updateState(n=>({...n,sessions:{...n.sessions,[e]:t}}))}setTurn(e,t,n){updateState(r=>({...r,turns:{...r.turns,[turnKey(e,t)]:n}}))}updateTurn(e,t,n){updateState(r=>{let i=turnKey(e,t),a=r.turns[i];return a===void 0?r:{...r,turns:{...r.turns,[i]:n(a)}}})}};function updateState(e){loadContext().set(AgentTraceContextKey,t=>e(t??{actions:{},sessions:{},turns:{}}))}function turnKey(e,t){return`${e}\0${t}`}function serializeState(e){return{actions:e.actions,sessions:Object.fromEntries(Object.entries(e.sessions).map(([e,t])=>[e,{...t,context:serializeSpanContext(t.context)}])),turns:Object.fromEntries(Object.entries(e.turns).map(([e,t])=>[e,{...t,context:serializeSpanContext(t.context),terminal:t.terminal===void 0?void 0:t.terminal.type===`turn.failed`?{error:serializeError(t.terminal.error),type:t.terminal.type}:{type:t.terminal.type}}]))}}function deserializeState(t){return isRecord(t)?{actions:deserializeRecord(t.actions,deserializeAction),sessions:deserializeRecord(t.sessions,t=>{if(!(!isRecord(t)||!isSpanContext(t.context)))return{agentName:typeof t.agentName==`string`?t.agentName:void 0,channelAudience:normalizeChannelAudience(t.channelAudience),channelKind:typeof t.channelKind==`string`?t.channelKind:void 0,context:t.context,decision:readInstrumentationDecision(t.decision),rootSessionId:typeof t.rootSessionId==`string`?t.rootSessionId:``}}),turns:deserializeRecord(t.turns,e=>{if(!(!isRecord(e)||!isSpanContext(e.context))&&!(typeof e.parentSpanId!=`string`||typeof e.startTimeMs!=`number`))return{context:e.context,modelUsage:deserializeModelUsage(e.modelUsage),parentIsRemote:typeof e.parentIsRemote==`boolean`?e.parentIsRemote:void 0,parentSpanId:e.parentSpanId,rootSessionId:typeof e.rootSessionId==`string`?e.rootSessionId:``,sequence:typeof e.sequence==`number`?e.sequence:0,startTimeMs:e.startTimeMs,subagentName:typeof e.subagentName==`string`?e.subagentName:void 0,terminal:deserializeTerminal(e.terminal)}})}:{actions:{},sessions:{},turns:{}}}function deserializeModelUsage(e){if(!isRecord(e))return;let t=typeof e.inputTokens==`number`?e.inputTokens:void 0,n=typeof e.outputTokens==`number`?e.outputTokens:void 0;return t===void 0&&n===void 0?void 0:{inputTokens:t,outputTokens:n}}function deserializeAction(t){if(!(!isRecord(t)||typeof t.attemptIndex!=`number`||typeof t.callId!=`string`||!isActionKind(t.kind)||typeof t.name!=`string`||!isSpanContext(t.parent)||typeof t.rootSessionId!=`string`||typeof t.sessionId!=`string`||typeof t.spanId!=`string`||typeof t.startTimeMs!=`number`||typeof t.stepIndex!=`number`||typeof t.turnId!=`string`))return{attemptIndex:t.attemptIndex,callId:t.callId,channelAudience:normalizeChannelAudience(t.channelAudience),inputAttribute:typeof t.inputAttribute==`string`?t.inputAttribute:void 0,kind:t.kind,name:t.name,parent:t.parent,rootSessionId:t.rootSessionId,sessionId:t.sessionId,spanId:t.spanId,startTimeMs:t.startTimeMs,stepIndex:t.stepIndex,turnId:t.turnId}}function isActionKind(e){return e===`load-skill`||e===`remote-agent-call`||e===`subagent-call`||e===`tool-call`}function deserializeRecord(e,t){if(!isRecord(e))return{};let n={};for(let[r,i]of Object.entries(e)){let e=t(i);e!==void 0&&(n[r]=e)}return n}function deserializeTerminal(e){if(!isRecord(e)||typeof e.type!=`string`)return;let t=e.type;if(isTurnTerminalType(t))return t===`turn.failed`?{error:deserializeError(e.error),type:t}:{type:t}}function serializeSpanContext(e){return{isRemote:e.isRemote,spanId:e.spanId,traceFlags:e.traceFlags,traceId:e.traceId}}function isSpanContext(e){return isRecord(e)&&typeof e.spanId==`string`&&typeof e.traceFlags==`number`&&typeof e.traceId==`string`}function serializeError(e){return e instanceof Error?{message:e.message,name:e.name,stack:e.stack}:void 0}function deserializeError(e){if(!isRecord(e)||typeof e.message!=`string`)return;let t=Error(e.message);return typeof e.name==`string`&&(t.name=e.name),typeof e.stack==`string`&&(t.stack=e.stack),t}function isTurnTerminalType(e){return e===`turn.cancelled`||e===`turn.completed`||e===`turn.failed`}function isRecord(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}export{ContextAgentTraceStateStore,preserveSerializedAgentTraceState,readActionTraceContext,readCurrentSessionTraceDecision,readSessionTraceContext,readSessionTraceDecision};
@@ -1 +1 @@
1
- import{createLogger,formatError}from"#internal/logging.js";import{ContextAgentTraceStateStore}from"#tracing/agent-trace-context-store.js";import{registerInstrumentationRuntime}from"#instrumentation/runtime.js";import{trace}from"#compiled/@opentelemetry/api/index.js";import{createInstrumentationHooks}from"#instrumentation/lifecycle.js";import{hasSessionRelease}from"#tracing/local-traces.js";import{AgentSpanIdGenerator}from"#tracing/agent-span-id-generator.js";import{createAgentOtelInstrumentation}from"#tracing/agent-otel-provider.js";import{registerOtelPipeline}from"#tracing/otel-registration.js";const log=createLogger(`tracing.install-instrumentation-runtime`);function installInstrumentationRuntime(e){let t=[],a=[],o,s,c,runInContext=(e,t)=>t();if(e.collected.declared){o=registerOtelPipeline({pipeline:e.collected.pipeline,serviceName:e.serviceName});let r=createAgentOtelInstrumentation({frameworkVersion:e.frameworkVersion,idGenerator:o.idGenerator,recordInputs:e.collected.settings.recordInputs,recordOutputs:e.collected.settings.recordOutputs,stateStore:new ContextAgentTraceStateStore,tracer:trace.getTracer(`eve.agent`,e.frameworkVersion),tracePolicy:e.collected.settings.tracePolicy});t.push({...r.hook,stateNamespace:`internal:otel`}),s=r.prepareSessionTrace,c=r.prepareTurnTrace,runInContext=r.runInContext;let i=e.collected.pipeline.spanProcessors.filter(isSpanProcessor).filter(hasSessionRelease);i.length>0&&a.push(sessionReleaseProvider(i))}let l=[...t,...e.providers,...a],u;return registerInstrumentationRuntime({forceFlush:()=>settleAll([...o===void 0?[]:[o.forceFlush],...l.map(e=>()=>e.flush?.())]),hooks:createInstrumentationHooks({parallel:e.providers,serialAfter:a,serialBefore:t}),idGenerator:o?.idGenerator??new AgentSpanIdGenerator,instrumentationProviders:e.instrumentationProviders,otelSettings:e.collected.declared?e.collected.settings:void 0,prepareSessionTrace:s,prepareTurnTrace:c,runtimeContextResolvers:e.runtimeContextResolvers,runInContext,shutdown:()=>(u??=settleAll([...o===void 0?[]:[o.shutdown],...l.map(e=>()=>e.shutdown?.())]),u)})}function isSpanProcessor(e){return e!==`auto`}function sessionReleaseProvider(e){let release=async t=>{await Promise.all(e.map(e=>e.releaseSession(t.sessionId)))};return{events:{"session.completed":release,"session.failed":release},name:`eve.session-release`,stateNamespace:`internal:session-release`}}async function settleAll(e){let n=await Promise.allSettled(e.map(async e=>e()));for(let e of n)e.status===`rejected`&&log.warn(`instrumentation drain failed`,{error:formatError(e.reason)})}export{installInstrumentationRuntime};
1
+ import{createLogger,formatError}from"#internal/logging.js";import{ContextAgentTraceStateStore}from"#tracing/agent-trace-context-store.js";import{registerInstrumentationRuntime}from"#instrumentation/runtime.js";import{trace}from"#compiled/@opentelemetry/api/index.js";import{createInstrumentationHooks}from"#instrumentation/lifecycle.js";import{hasSessionRelease}from"#tracing/local-traces.js";import{AgentSpanIdGenerator}from"#tracing/agent-span-id-generator.js";import{createAgentOtelInstrumentation}from"#tracing/agent-otel-provider.js";import{registerOtelPipeline}from"#tracing/otel-registration.js";const log=createLogger(`tracing.install-instrumentation-runtime`);function installInstrumentationRuntime(e){let t=[],a=[],o,s,c,runInContext=(e,t)=>t();if(e.collected.declared){o=registerOtelPipeline({pipeline:e.collected.pipeline,serviceName:e.serviceName});let r=createAgentOtelInstrumentation({frameworkVersion:e.frameworkVersion,idGenerator:o.idGenerator,recordInputs:e.collected.settings.recordInputs,recordOutputs:e.collected.settings.recordOutputs,stateStore:new ContextAgentTraceStateStore,tracer:trace.getTracer(`eve.agent`,e.frameworkVersion),tracePolicy:e.collected.settings.tracePolicy});t.push({...r.hook,stateNamespace:`internal:otel`}),s=r.prepareSessionTrace,c=r.prepareTurnTrace,runInContext=r.runInContext;let i=e.collected.pipeline.spanProcessors.filter(isSpanProcessor).filter(hasSessionRelease);i.length>0&&a.push(sessionReleaseProvider(i))}let l=[...t,...e.providers,...a],u;return registerInstrumentationRuntime({forceFlush:()=>settleAll([...o===void 0?[]:[o.forceFlush],...l.map(e=>()=>e.flush?.())]),hooks:createInstrumentationHooks({parallel:e.providers,serialAfter:a,serialBefore:t}),idGenerator:o?.idGenerator??new AgentSpanIdGenerator,instrumentationProviders:e.instrumentationProviders,otelSettings:e.collected.declared?e.collected.settings:void 0,ownsAgentSpans:o!==void 0,prepareSessionTrace:s,prepareTurnTrace:c,runtimeContextResolvers:e.runtimeContextResolvers,runInContext,samplesTrace:o?.samplesTrace,shutdown:()=>(u??=settleAll([...o===void 0?[]:[o.shutdown],...l.map(e=>()=>e.shutdown?.())]),u)})}function isSpanProcessor(e){return e!==`auto`}function sessionReleaseProvider(e){let release=async t=>{await Promise.all(e.map(e=>e.releaseSession(t.sessionId)))};return{events:{"session.completed":release,"session.failed":release},name:`eve.session-release`,stateNamespace:`internal:session-release`}}async function settleAll(e){let n=await Promise.allSettled(e.map(async e=>e()));for(let e of n)e.status===`rejected`&&log.warn(`instrumentation drain failed`,{error:formatError(e.reason)})}export{installInstrumentationRuntime};
@@ -38,9 +38,11 @@ export interface OtelOptions {
38
38
  * existing audience-aware behavior; explicit decisions can disable emission
39
39
  * or select input and output capture independently. Defaults to emitting
40
40
  * every audience, with content only for public conversations. The result is
41
- * an OpenTelemetry capture ceiling: per-delivery audience and destination
42
- * settings can only narrow it. It never changes what authored instrumentation
43
- * providers receive. A thrown error rejects trace production without
41
+ * an OpenTelemetry capture ceiling: local delivery audience and destination
42
+ * settings can only narrow it. For a trusted remote trace, eve evaluates this
43
+ * policy against the immutable origin audience and intersects it with the
44
+ * parent's effective ceiling, so every hop can only narrow capture. It never
45
+ * changes what authored instrumentation providers receive. A thrown error rejects trace production without
44
46
  * silencing lifecycle providers. The policy may be invoked more than once
45
47
  * while a new session is being prepared, so it must be deterministic for
46
48
  * consistent results.
@@ -13,9 +13,11 @@ export declare function registerOtelPipeline(input: {
13
13
  readonly pipeline: OtelPipeline;
14
14
  readonly serviceName: string;
15
15
  }): RegisteredOtelPipeline;
16
- /** Lifecycle retained from the tracer provider that owns every destination. */
16
+ /** Lifecycle retained from the providers that own every destination. */
17
17
  export interface RegisteredOtelPipeline {
18
18
  readonly forceFlush: () => Promise<void>;
19
19
  readonly idGenerator: AgentSpanIdGenerator;
20
+ /** Whether the installed sampler would record a trace with this id. */
21
+ readonly samplesTrace: (traceId: string) => boolean;
20
22
  readonly shutdown: () => Promise<void>;
21
23
  }
@@ -1 +1 @@
1
- import{createRequire}from"node:module";import{context,propagation,trace}from"#compiled/@opentelemetry/api/index.js";import{AgentSpanIdGenerator}from"#tracing/agent-span-id-generator.js";import{registerOTel}from"#compiled/@vercel/otel/index.js";const REGISTRATION_SPAN_NAME=`eve.otel.registration`,REPLAY_DEDUPLICATION_LIMIT=1e5,require=createRequire(import.meta.url);var RegistrationMarkerPropagator=class{#e=!1;extract(e){return e}fields(){return[]}inject(){this.#e=!0}isInstalled(){return this.#e=!1,propagation.inject(context.active(),{},{set:()=>{}}),this.#e}},PrivateSpanFilteringProcessor=class{endedSpans=new Set;forwardedSpans=new Set;pendingByParent=new Map;processors;startedSpans=new Set;constructor(e){this.processors=e}async forceFlush(){await Promise.all(this.processors.map(e=>e.forceFlush()))}onEnd(e){if(isRegistrationSpan(e))return;let t=spanIdentity(e);if(t!==void 0){if(this.endedSpans.has(t))return;if(this.endedSpans.size>=REPLAY_DEDUPLICATION_LIMIT){let e=this.endedSpans.values().next().value;e!==void 0&&this.endedSpans.delete(e)}this.endedSpans.add(t)}let n=parentIdentity(e);if(n!==void 0&&this.startedSpans.has(n)&&!this.forwardedSpans.has(n)){let t=this.pendingByParent.get(n)??[];t.push(e),this.pendingByParent.set(n,t);return}this.forward(e,t)}onStart(e,t){if(isRegistrationSpan(e))return;let n=spanIdentity(e);n!==void 0&&addBounded(this.startedSpans,n);for(let n of this.processors)n.onStart(e,t)}async shutdown(){await Promise.all(this.processors.map(e=>e.shutdown()))}forward(e,t){for(let t of this.processors)t.onEnd(e);if(t===void 0)return;addBounded(this.forwardedSpans,t);let n=this.pendingByParent.get(t);if(n!==void 0){this.pendingByParent.delete(t);for(let e of n)this.forward(e,spanIdentity(e))}}};function registerOtelPipeline(e){let{pipeline:t}=e,n=captureOptionalPeerTracerProxy(),r=new AgentSpanIdGenerator,i=new RegistrationMarkerPropagator,a={attributes:t.resource,autoDetectResources:!1,idGenerator:r,instrumentations:t.instrumentations??[],metricReaders:t.metricReaders,propagators:[...t.propagators??[`auto`],i],serviceName:e.serviceName,spanProcessors:t.spanProcessors.map(e=>isSpanProcessor(e)?new PrivateSpanFilteringProcessor([e]):e)};registerOTel(t.sampler===void 0?a:{...a,traceSampler:t.sampler});let o=globalTracerUses(r),s=i.isInstalled();if((!o||!s)&&rollbackRegistration({ownsPropagator:s,ownsTracer:o}),!o)throw Error("eve could not register OpenTelemetry because another runtime already owns the global tracer provider. Remove the other `registerOTel` call, or move its exporters into eve's `otelIntegration({ spanProcessors: [...] })`.");if(!s)throw Error("eve could not register OpenTelemetry because another runtime already owns the global propagator. Remove the other global propagator registration and declare propagators through eve's `otel()` instead.");let c=runtimeTracerProvider();if(typeof c.forceFlush!=`function`||typeof c.shutdown!=`function`)throw rollbackRegistration({ownsPropagator:s,ownsTracer:o}),Error(`The registered OpenTelemetry tracer provider has no lifecycle methods.`);return n?.setDelegate(c),{forceFlush:()=>c.forceFlush(),idGenerator:r,shutdown:()=>c.shutdown()}}function captureOptionalPeerTracerProxy(){try{let e=require("@opentelemetry/api"),t=e.trace.getTracerProvider();return t instanceof e.ProxyTracerProvider?t:void 0}catch{return}}function rollbackRegistration(e){if(e.ownsPropagator&&propagation.disable(),!e.ownsTracer)return;let t=runtimeTracerProvider();if(typeof t.shutdown==`function`)try{t.shutdown().catch(()=>{})}catch{}trace.disable()}function runtimeTracerProvider(){let e=trace.getTracerProvider();return e.getDelegate?.()??e}function globalTracerUses(e){let t=e.allocateSpanId();return e.withSpanId(t,()=>trace.getTracer(`eve.registration`).startSpan(REGISTRATION_SPAN_NAME)).spanContext().spanId===t}function isRegistrationSpan(e){return typeof e==`object`&&!!e&&`name`in e&&e.name===REGISTRATION_SPAN_NAME}function spanIdentity(e){if(typeof e!=`object`||!e||!(`spanContext`in e)||typeof e.spanContext!=`function`)return;let t=e.spanContext();return typeof t.traceId==`string`&&typeof t.spanId==`string`?`${t.traceId}:${t.spanId}`:void 0}function parentIdentity(e){if(typeof e!=`object`||!e||!(`parentSpanContext`in e))return;let t=e.parentSpanContext;return typeof t?.traceId==`string`&&typeof t.spanId==`string`?`${t.traceId}:${t.spanId}`:void 0}function addBounded(e,t){if(e.size>=REPLAY_DEDUPLICATION_LIMIT){let t=e.values().next().value;t!==void 0&&e.delete(t)}e.add(t)}function isSpanProcessor(e){return e!==`auto`}export{registerOtelPipeline};
1
+ import{createRequire}from"node:module";import{context,metrics,propagation,trace}from"#compiled/@opentelemetry/api/index.js";import{AgentSpanIdGenerator}from"#tracing/agent-span-id-generator.js";import{registerOTel}from"#compiled/@vercel/otel/index.js";const REGISTRATION_SPAN_NAME=`eve.otel.registration`,REPLAY_DEDUPLICATION_LIMIT=1e5,require=createRequire(import.meta.url);var RegistrationMarkerPropagator=class{#e=!1;extract(e){return e}fields(){return[]}inject(){this.#e=!0}isInstalled(){return this.#e=!1,propagation.inject(context.active(),{},{set:()=>{}}),this.#e}},PrivateSpanFilteringProcessor=class{endedSpans=new Set;forwardedSpans=new Set;pendingByParent=new Map;pendingSpanCount=0;processors;startedSpans=new Set;constructor(e){this.processors=e}async forceFlush(){this.drainPendingSpans(),await Promise.all(this.processors.map(e=>e.forceFlush()))}onEnd(e){if(isRegistrationSpan(e))return;let t=spanIdentity(e);if(t!==void 0){if(this.endedSpans.has(t))return;if(this.endedSpans.size>=REPLAY_DEDUPLICATION_LIMIT){let e=this.endedSpans.values().next().value;e!==void 0&&this.endedSpans.delete(e)}this.endedSpans.add(t)}let n=parentIdentity(e);if(n!==void 0&&this.startedSpans.has(n)&&!this.forwardedSpans.has(n)){let t=this.pendingByParent.get(n)??[];t.push(e),this.pendingByParent.set(n,t),this.pendingSpanCount+=1,this.pendingSpanCount>1e4&&this.releaseOldestPendingParent();return}this.forward(e,t)}onStart(e,t){if(isRegistrationSpan(e))return;let n=spanIdentity(e);n!==void 0&&addBounded(this.startedSpans,n);for(let n of this.processors)n.onStart(e,t)}async shutdown(){this.drainPendingSpans(),await Promise.all(this.processors.map(e=>e.shutdown()))}drainPendingSpans(){for(;this.pendingByParent.size>0;)this.releaseOldestPendingParent()}releaseOldestPendingParent(){let e=this.pendingByParent.keys().next().value;e!==void 0&&this.releaseChildren(e)}releaseChildren(e){let t=this.pendingByParent.get(e);if(t!==void 0){this.pendingByParent.delete(e),this.pendingSpanCount-=t.length;for(let e of t)this.forward(e,spanIdentity(e))}}forward(e,t){for(let t of this.processors)t.onEnd(e);t!==void 0&&(addBounded(this.forwardedSpans,t),this.releaseChildren(t))}};function registerOtelPipeline(e){let{pipeline:t}=e,n=captureOptionalPeerTracerProxy(),r=new AgentSpanIdGenerator,i=new RegistrationMarkerPropagator,a={attributes:t.resource,autoDetectResources:!1,idGenerator:r,instrumentations:t.instrumentations??[],metricReaders:t.metricReaders,propagators:[...t.propagators??[`auto`],i],serviceName:e.serviceName,spanProcessors:t.spanProcessors.map(e=>isSpanProcessor(e)?new PrivateSpanFilteringProcessor([e]):e)};registerOTel(t.sampler===void 0?a:{...a,traceSampler:t.sampler});let o=globalTracerUses(r),s=i.isInstalled();if((!o||!s)&&rollbackRegistration({ownsPropagator:s,ownsTracer:o}),!o)throw Error("eve could not register OpenTelemetry because another runtime already owns the global tracer provider. Remove the other `registerOTel` call, or move its exporters into eve's `otelIntegration({ spanProcessors: [...] })`.");if(!s)throw Error("eve could not register OpenTelemetry because another runtime already owns the global propagator. Remove the other global propagator registration and declare propagators through eve's `otel()` instead.");let c=runtimeTracerProvider();if(typeof c.forceFlush!=`function`||typeof c.shutdown!=`function`)throw rollbackRegistration({ownsPropagator:s,ownsTracer:o}),Error(`The registered OpenTelemetry tracer provider has no lifecycle methods.`);n?.setDelegate(c);let l=runtimeMeterProvider();return{forceFlush:async()=>{await Promise.all([c.forceFlush(),l.forceFlush?.()])},idGenerator:r,samplesTrace:e=>samplerAdmitsTrace(r,e),shutdown:async()=>{disableInstrumentations(t.instrumentations),await Promise.all([c.shutdown(),l.shutdown?.()])}}}function samplerAdmitsTrace(e,t){return(e.withTraceId(t,()=>trace.getTracer(`eve.registration`).startSpan(REGISTRATION_SPAN_NAME,{root:!0})).spanContext().traceFlags&1)==1}function captureOptionalPeerTracerProxy(){try{let e=require("@opentelemetry/api"),t=e.trace.getTracerProvider();return t instanceof e.ProxyTracerProvider?t:void 0}catch{return}}function rollbackRegistration(e){if(e.ownsPropagator&&propagation.disable(),!e.ownsTracer)return;let t=runtimeTracerProvider();if(typeof t.shutdown==`function`)try{t.shutdown().catch(()=>{})}catch{}trace.disable()}function runtimeTracerProvider(){let e=trace.getTracerProvider();return e.getDelegate?.()??e}function runtimeMeterProvider(){let e=metrics.getMeterProvider();return{forceFlush:typeof e?.forceFlush==`function`?()=>e.forceFlush():void 0,shutdown:typeof e?.shutdown==`function`?()=>e.shutdown():void 0}}function disableInstrumentations(e){for(let t of e??[]){let e=t?.disable;if(typeof e==`function`)try{e.call(t)}catch{}}}function globalTracerUses(e){let t=e.allocateSpanId();return e.withSpanId(t,()=>trace.getTracer(`eve.registration`).startSpan(REGISTRATION_SPAN_NAME)).spanContext().spanId===t}function isRegistrationSpan(e){return typeof e==`object`&&!!e&&`name`in e&&e.name===REGISTRATION_SPAN_NAME}function spanIdentity(e){if(typeof e!=`object`||!e||!(`spanContext`in e)||typeof e.spanContext!=`function`)return;let t=e.spanContext();return typeof t.traceId==`string`&&typeof t.spanId==`string`?`${t.traceId}:${t.spanId}`:void 0}function parentIdentity(e){if(typeof e!=`object`||!e||!(`parentSpanContext`in e))return;let t=e.parentSpanContext;return typeof t?.traceId==`string`&&typeof t.spanId==`string`?`${t.traceId}:${t.spanId}`:void 0}function addBounded(e,t){if(e.size>=REPLAY_DEDUPLICATION_LIMIT){let t=e.values().next().value;t!==void 0&&e.delete(t)}e.add(t)}function isSpanProcessor(e){return e!==`auto`}export{registerOtelPipeline};
@@ -1,3 +1,3 @@
1
- import { n as defaultMessageReducer, t as useEveAgent } from "../chunks/use-eve-agent-DjYwFJF7.js";
1
+ import { n as defaultMessageReducer, t as useEveAgent } from "../chunks/use-eve-agent-Bgp6INfi.js";
2
2
 
3
3
  export { defaultMessageReducer, useEveAgent };
@@ -1,3 +1,3 @@
1
- import { t as useEveAgent } from "../chunks/use-eve-agent-DjYwFJF7.js";
1
+ import { t as useEveAgent } from "../chunks/use-eve-agent-Bgp6INfi.js";
2
2
 
3
3
  export { useEveAgent };
@@ -405,6 +405,8 @@ defineChannel({
405
405
  });
406
406
  ```
407
407
 
408
+ If `fetchFile` throws, eve replaces that attachment with a model-visible error note and continues the turn. Built-in channels include safe details such as the upstream HTTP status. Custom channel errors use a generic note, while eve keeps the original error in operator logs.
409
+
408
410
  The `URL` object survives the queue boundary as a string and is reconstituted inside the workflow step. The staging pipeline calls `fetchFile` with the URL serialized as a string (the URL's `href`), which is why the example matches on `url.startsWith(...)`. Return bytes to stage the file to the sandbox, or `null` to let the URL pass through to the model provider.
409
411
 
410
412
  The framework handles staging bytes to the sandbox, enforcing upload policy, hydrating files for the model call, and reconstituting `URL` objects after queue serialization. See [Inbound attachments](../sandbox#inbound-attachments) for the shared storage, size, and provider-input behavior.
@@ -47,6 +47,10 @@ curl -X POST https://<deployment>/eve/v1/session \
47
47
  # {"ok":true,"sessionId":"wrun_A","status":"accepted"}
48
48
  ```
49
49
 
50
+ The `202` response means Workflow accepted the durable run. The command inbox may still be
51
+ starting, so an immediate follow-up or control request can report that the session is not active.
52
+ The event-stream client retries the brief window before the new run becomes readable.
53
+
50
54
  Authenticated callers that may retry a create request can pass their own `operationId` for
51
55
  create-once semantics. The same operation under the same authenticated principal returns the
52
56
  active session it already created instead of dispatching the input again. The first accepted
@@ -72,7 +76,7 @@ curl -X POST https://<deployment>/eve/v1/session/wrun_A \
72
76
 
73
77
  Follow-up messages use `turnPolicy: "steer"` by default. If a turn is active, eve buffers the message before cooperatively cancelling that turn, then starts the follow-up as a replacement turn with a new turn ID. Set `turnPolicy: "queue"` on `eveChannel(...)` when follow-ups should wait for active turns to finish. `inputResponses` never steer.
74
78
 
75
- Sending a message to an unknown or terminal session ID returns `409` with
79
+ Sending a message to an unknown, terminal, or not-yet-active session ID returns `409` with
76
80
  `{"code":"session_not_active","error":"The session is no longer active.","ok":false}`.
77
81
  TypeScript clients expose the stable code as `ClientError.code`. The route never
78
82
  creates or follows a replacement session.
@@ -70,10 +70,15 @@ Inbound files are off by default. Opt in to allow personal-scope downloads and p
70
70
 
71
71
  ```ts
72
72
  export default teamsChannel({
73
- files: { enabled: true, allowedHosts: ["contoso.sharepoint.com"] },
73
+ files: {
74
+ enabled: true,
75
+ allowedHosts: ["smba.trafficmanager.net", "contoso.sharepoint.com"],
76
+ },
74
77
  });
75
78
  ```
76
79
 
80
+ eve authenticates downloads from Microsoft Bot Connector hosts with your bot credentials. Downloads from other allowlisted hosts remain unauthenticated.
81
+
77
82
  ## What to read next
78
83
 
79
84
  - [Channels overview](./overview): the channel contract and every built-in channel
@@ -32,8 +32,10 @@ curl -X POST http://127.0.0.1:2000/eve/v1/session \
32
32
  -d '{"message":"Summarize the latest forecast."}'
33
33
  ```
34
34
 
35
- eve responds right away with the durable `sessionId` in the JSON body and
36
- `x-eve-session-id` header.
35
+ eve responds with `202` and the durable `sessionId` in the JSON body and
36
+ `x-eve-session-id` header as soon as Workflow accepts the run. The command inbox can still be
37
+ starting at that point. An immediate follow-up can return `409 session_not_active`; wait for
38
+ `session.waiting` before sending the next message.
37
39
 
38
40
  ## Stream a session
39
41
 
@@ -239,7 +239,11 @@ export default eveChannel({
239
239
 
240
240
  The predicate authorizes the _forwarder_ (the verified route-auth principal — who is asserting), not the forwarded principal (what is asserted). Match it precisely: a permissive predicate like `() => true` lets any caller that passes route auth assert any principal, including preview deployments of your own project when `vercelOidc()` is in the walk. `trustedForwarders` exists only on your authored channel — the framework default channel never accepts a forwarded principal, so a receiving deployment must author `agent/channels/eve.ts`.
241
241
 
242
- When the predicate accepts a create request, `ctx.session.auth.current` and `.initiator` carry the forwarded user exactly as if they had called your deployment directly. On continuation, only `auth.current` is replaced; `auth.initiator` remains the session creator. User-scoped connections, local subagents, and further `forwardPrincipal` hops therefore see the active turn's caller. The forwarder is recorded on accepted contexts as the `eve:forwarded-by` attribute (always overwritten by the receiver, so a forwarder cannot falsify it). Rejections fail loud: a forwarded body without `trustedForwarders` configured or with a forwarder the predicate refuses is a `403`, and a malformed payload is a `400`. Only principal metadata is ever accepted — tokens and credentials never cross the hop.
242
+ When the predicate accepts a create request, `ctx.session.auth.current` and `.initiator` carry the forwarded user exactly as if they had called your deployment directly. On continuation, only `auth.current` is replaced; `auth.initiator` remains the session creator. User-scoped connections, local subagents, and further `forwardPrincipal` hops therefore see the active turn's caller.
243
+
244
+ The forwarder is recorded on accepted contexts as the `eve:forwarded-by` attribute (always overwritten by the receiver, so a forwarder cannot falsify it). Rejections fail loud: a forwarded body without `trustedForwarders` configured or with a forwarder the predicate refuses is a `403`, and a malformed payload is a `400`. Only principal metadata is ever accepted — tokens and credentials never cross the hop.
245
+
246
+ For requests marked as remote delegations by a callback body and valid sampled `traceparent`, the same accepted `trustedForwarders` result may admit an origin audience and directional content ceiling from one W3C Baggage member. The assertion is not an authorization grant: the receiver's trace policy independently decides against the immutable origin audience, and the two decisions are intersected. Every later hop forwards only that narrowed result. Malformed, partial, unsampled, or mixed-version assertions become metadata-only. The callback and headers are caller-supplied—the verified transport principal and `trustedForwarders` are the trust boundary. See [Preserving trace content](./remote-agents#preserving-trace-content).
243
247
 
244
248
  > ⚠️ Both deployments must support continuation forwarding before you resume persistent remote sessions. A create-only receiver rejects a forwarded continuation with HTTP 400; the sender does not fall back to service authority. See [Forwarding the caller identity](./remote-agents#forwarding-the-caller-identity) for the upgrade behavior.
245
249
 
@@ -36,6 +36,12 @@ console.log(result.status, result.message);
36
36
 
37
37
  When the stream includes `session.failed`, the turn returns `status: "failed"` rather than throwing. Transport and route errors throw `ClientError`.
38
38
 
39
+ `session.send()` retries `409 session_not_active` three times when a durable run has been accepted
40
+ but its command inbox is still starting. The retries wait 250 ms, 500 ms, and 1 second. Other
41
+ errors, `session.respond()`, control methods, and raw HTTP requests do not use this retry. An unknown
42
+ session still throws `ClientError` immediately, while a terminal session throws after the final
43
+ attempt. The client never creates a replacement session.
44
+
39
45
  ## Send a full turn payload
40
46
 
41
47
  Pass the full payload to `create()` for the first turn or `send()` for a follow-up:
@@ -13,35 +13,47 @@ The transcript remains in your terminal scrollback after you exit. Run `/help` i
13
13
 
14
14
  ## Commands
15
15
 
16
- | Command | Description |
17
- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
18
- | `/model` | Configure the model and its provider. Pass a model ID to set it directly: `/model provider/model-id`. |
19
- | `/add` | Browse and install channels, MCP connections, extensions, and observability integrations. Pass an item address to open it directly: `/add channel/slack`. |
20
- | `/deploy` | Deploy the agent to Vercel production. Links the directory first if needed. |
21
- | `/vc:install` | Install the Vercel CLI. |
22
- | `/vc:login` | Log in to Vercel or restore access to a remote deployment. |
23
- | `/info` | Show the resolved application, compiled artifacts, discovery diagnostics, and messaging routes. |
24
- | `/loglevel` | Choose which server and agent logs appear in the transcript. |
25
- | `/traces` | Open the local trace viewer. Pass a trace ID prefix to open a specific trace. |
26
- | `/reset` | Start a fresh session. |
27
- | `/cancel` | Cancel the current turn without discarding settled context. |
28
- | `/clear` | Clear the session's model-message history. `/new` is an alias. |
29
- | `/compact` | Compact the current session's context. |
30
- | `/exit` | Quit the UI. |
31
- | `/help` | List available commands. |
16
+ | Command | Description |
17
+ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
18
+ | `/model` | Configure the model and its provider. Pass a model ID to set it directly: `/model provider/model-id`. |
19
+ | `/add` | Select and install channels, MCP connections, extensions, and observability integrations. Pass an item address to confirm and install it directly: `/add channel/slack`. |
20
+ | `/deploy` | Deploy the agent to Vercel production. Links the directory first if needed. |
21
+ | `/vc:install` | Install the Vercel CLI. |
22
+ | `/vc:login` | Log in to Vercel or restore access to a remote deployment. |
23
+ | `/info` | Show the resolved application, compiled artifacts, discovery diagnostics, and messaging routes. |
24
+ | `/loglevel` | Choose which server and agent logs appear in the transcript. |
25
+ | `/traces` | Open the local trace viewer. Pass a trace ID prefix to open a specific trace. |
26
+ | `/reset` | Start a fresh session. |
27
+ | `/cancel` | Cancel the current turn without discarding settled context. |
28
+ | `/clear` | Clear the session's model-message history. `/new` is an alias. |
29
+ | `/compact` | Compact the current session's context. |
30
+ | `/exit` | Quit the UI. |
31
+ | `/help` | List available commands. |
32
32
 
33
33
  `/model`, `/add`, `/deploy`, `/info`, and `/traces` are available when `eve dev` runs locally. They are unavailable when the UI connects to a server with `--url`.
34
34
 
35
+ ## Set up a new agent
36
+
37
+ After `eve init`, the terminal UI guides you through **Model**, **Channels**, **Integrations**, and **Review** before the first chat prompt. The progress rail keeps the four steps visible throughout onboarding. Model setup can install or upgrade the Vercel CLI, open Vercel login, and resume project linking without leaving the flow.
38
+
39
+ Model and Vercel changes take effect when you complete Model, then onboarding continues to Channels. Channel and integration selections remain drafts until you finish Review. You can move back and forth between Channels, Integrations, and Review; use `/model` after onboarding to change the committed model configuration.
40
+
35
41
  ## Add an integration
36
42
 
37
- Bare `/add` opens the categorized registry browser. Pass an item address — `<category>/<name>`, where category is `channel`, `connection`, `extension`, or `instrumentation` — to skip the category and search screens and open that item directly:
43
+ Bare `/add` opens the standalone planner on **Channels**. It does not include model configuration. The progress rail shows selection counts as you move between **Channels**, **Integrations**, and **Review**.
44
+
45
+ Press `Space` or `Enter` to toggle the highlighted item. Press `Right Arrow` to preserve the current selections and continue, `Left Arrow` to preserve them and go back, or `Esc` to cancel. Installation requires `Enter` on **Install and set up** from Review. During installation, `Esc` cancels only the active item and continues with the remaining selections. The final summary reports installed, cancelled, and failed items separately.
46
+
47
+ Pass an item address to `/add` to confirm and install that exact address without opening the planner:
38
48
 
39
49
  ```text
40
50
  /add channel/slack
41
51
  /add extension/agent-browser
52
+ /add linear
53
+ /add @acme/analytics
42
54
  ```
43
55
 
44
- Either way the UI shows the item's details and asks to confirm before installing, then runs the same installation and setup prompts. Choosing **Back** on a directly addressed item returns to the registry browser.
56
+ The UI installs planner selections in order and offers deployment once after the batch when an installed item requires it.
45
57
 
46
58
  ## Work with the agent
47
59
 
@@ -143,6 +143,31 @@ Forwarding is explicit on both sides. The receiver names which forwarders it tru
143
143
 
144
144
  A receiver on an eve version that predates all principal forwarding may instead drop the unknown field and run the session as your app's service identity; per-user connections there fail with `principal_required`. On remote requests where the dispatching turn has no auth, the field is omitted and the call proceeds on transport trust alone.
145
145
 
146
+ ## Preserving trace content
147
+
148
+ With `forwardPrincipal: true`, a sampled trace carries its original audience and the maximum content the next hop may record. For example, `eve.audience=private;ceiling=i0o1` allows outputs but not inputs. eve sends this as [W3C Baggage](https://www.w3.org/TR/baggage/).
149
+
150
+ The receiver uses it only after `trustedForwarders` accepts the authenticated calling deployment:
151
+
152
+ ```ts title="agent/channels/eve.ts"
153
+ import { eveChannel } from "eve/channels/eve";
154
+ import { vercelOidc, vercelSubject } from "eve/channels/auth";
155
+
156
+ export default eveChannel({
157
+ auth: [vercelOidc()],
158
+ trustedForwarders: (forwarder) =>
159
+ forwarder.subject === vercelSubject({ teamSlug: "acme", projectName: "router" }),
160
+ });
161
+ ```
162
+
163
+ The request must also include a callback and a valid sampled `traceparent`. Those fields identify a remote call, but they do not establish trust. `trustedForwarders` is the authorization boundary.
164
+
165
+ The receiver combines the incoming ceiling with its own trace policy. Each hop may narrow the result, but it cannot restore inputs or outputs removed earlier. The original audience stays the same across remote and local subagent hops. Public origins may include content by default; private and unknown origins stay metadata-only unless both deployments explicitly allow them.
166
+
167
+ The live delivery audience still matters. An unknown callback delivery, or one matching the origin, uses the session decision. A different explicit audience applies its own hard ceiling, so a private delivery stays redacted even when the trace began in public.
168
+
169
+ Missing, malformed, duplicate, unsampled, untrusted, and mixed-version assertions fall back to metadata-only tracing. Dropped traces use only the unsampled trace flag. The decision is fixed when the remote session starts and reused by continuations. Agent Runs shows Workflow content only when both inputs and outputs are allowed.
170
+
146
171
  ## How remote dispatch and callbacks work
147
172
 
148
173
  A local subagent runs inline. A remote one runs in its own deployment, so dispatch is asynchronous:
@@ -210,7 +210,7 @@ Pass a bare URL and the UI connects to that server instead of booting a local on
210
210
  | `-H, --header <header>` | string | none | Request header for a URL target, in `Name: value` form; repeat for multiple headers |
211
211
  | `--no-ui` | flag | UI on | Start the server without an interactive UI |
212
212
  | `--name <name>` | string | app folder name | Title shown in the terminal UI |
213
- | `--input <text>` | string | none | Pre-fill the prompt input; bare local `/model` starts onboarding |
213
+ | `--input <text>` | string | none | Pre-fill the prompt input |
214
214
  | `--tools <mode>` | enum | `auto-collapsed` | Tool-call rendering: `full` \| `collapsed` \| `auto-collapsed` \| `hidden` |
215
215
  | `--reasoning <mode>` | enum | `full` | Reasoning rendering: `full` \| `collapsed` \| `auto-collapsed` \| `hidden` |
216
216
  | `--subagents <mode>` | enum | `auto-collapsed` | Subagent-section rendering: `full` \| `collapsed` \| `auto-collapsed` \| `hidden` |
@@ -221,7 +221,7 @@ Pass a bare URL and the UI connects to that server instead of booting a local on
221
221
 
222
222
  `eve acp` reserves stdin and stdout for newline-delimited JSON-RPC and sends diagnostics to stderr. Without a URL, it supervises an isolated local development server. With a URL, it bridges ACP to that server's existing eve HTTP API and accepts the same URL credentials and request headers as `eve dev <url>`. Pass `--scope <team>` when the active Vercel scope does not own the deployment; `EVE_VERCEL_SCOPE` provides the same value for managed harnesses. See [Agent Client Protocol (ACP)](../protocols/acp) for client configuration and capability limits.
223
223
 
224
- A fresh `eve init` passes `--input /model`. That bare local input starts onboarding: the TUI installs the Vercel CLI if needed, asks you to log in if needed, opens `/model`, then offers categorized registry next steps before the first prompt. Other input stays editable in the prompt.
224
+ A fresh `eve init` starts onboarding before the first prompt: the TUI installs the Vercel CLI if needed, asks you to log in if needed, guides you through model configuration, then lets you choose channels and integrations. Other `--input` text stays editable in the prompt.
225
225
 
226
226
  For a URL target protected by HTTP Basic auth, put the credentials in the URL. eve sends them as a Basic `Authorization` header and strips them from the server URL before connecting:
227
227
 
@@ -132,6 +132,7 @@ import template from "../../prompts/template.txt?raw";
132
132
  | `eve/context` | `defineState`, session and state types |
133
133
  | `eve/sandbox` | `defineSandbox`, backends |
134
134
  | `eve/instrumentation` | `defineInstrumentation`, `isChannel` |
135
+ | `eve/local-dev` | `getLocalDevCapability`, `LocalDevCapability` |
135
136
  | `eve/models/openai` | `chatgpt`, deprecated `experimental_chatgpt` |
136
137
  | `eve/evals` | `defineEval`, `defineEvalConfig`, `mockModel`, eval types |
137
138
  | `eve/evals/expect` | `includes`, `equals`, `matches`, `similarity` |
@@ -143,6 +144,29 @@ import template from "../../prompts/template.txt?raw";
143
144
 
144
145
  Exported types ship from the same entrypoint as the helper they describe (for example `ToolDefinition` and `ToolContext` from `eve/tools`). The `exports` field in `packages/eve/package.json` lists every public entrypoint.
145
146
 
147
+ ## Local development capability
148
+
149
+ Use `getLocalDevCapability()` when an authored tool needs to modify the local application's source tree during an interactive development turn:
150
+
151
+ ```ts
152
+ import { getLocalDevCapability } from "eve/local-dev";
153
+
154
+ const localDev = getLocalDevCapability();
155
+ if (localDev === undefined) {
156
+ throw new Error("This tool is available only from a local eve dev client.");
157
+ }
158
+
159
+ await localDev.withSuspendedSource(async () => {
160
+ // Write under localDev.appRoot here.
161
+ });
162
+ ```
163
+
164
+ The function returns `LocalDevCapability | undefined`. It returns a capability only while authored code handles a request from a client on the same machine as the `eve dev` server. Deployed runtimes and clients attached over the network receive `undefined`, even when the target is another development server. A local TUI that attaches to an existing headless server receives the capability because availability follows each request rather than the process that started the server.
165
+
166
+ `appRoot` is the authored application directory containing `package.json` and `agent/`, not the temporary runtime snapshot. `interactiveClient` is `true` when the requesting local client is the dev TUI; check it before starting a flow that requires terminal interaction.
167
+
168
+ Run source mutations inside `withSuspendedSource()`. It acquires a unique watcher lease, waits for your asynchronous callback to settle, and then releases the lease. Concurrent or nested calls cannot resume each other early, and releasing the final lease rebuilds the runtime artifacts. The callback's return value is returned, and its error is rethrown after release. If suspension cannot be acquired, the callback does not run. If the host cannot confirm release after a retry, the method throws an actionable error; restart `eve dev` before making more source changes.
169
+
146
170
  ## ChatGPT subscription models
147
171
 
148
172
  `chatgpt()` from `eve/models/openai` serves an OpenAI model through the local Codex login and bills the ChatGPT subscription. With no argument, it selects `gpt-5.6-sol`:
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "title": "Tools",
3
3
  "defaultOpen": false,
4
- "pages": ["overview", "human-in-the-loop"]
4
+ "pages": ["overview", "human-in-the-loop", "workflows"]
5
5
  }
@@ -78,6 +78,13 @@ Later task-triggered parent turns receive fresh state for the same cohort. The m
78
78
  to keep related intermediate results silent while any task remains pending. Once every related
79
79
  task is terminal, the state includes their outputs so the model can combine the useful results.
80
80
 
81
+ ### Durable tools
82
+
83
+ A tool whose `execute` starts with `"use workflow"` runs as a durable Workflow run instead of
84
+ inside the model step. It can wait for a person, a webhook, or a timer for as long as it takes, with
85
+ nothing running in between, and its return value still settles the tool call. See
86
+ [Durable tools](/docs/tools/workflows).
87
+
81
88
  ### The `ctx` parameter
82
89
 
83
90
  `execute` gets a `ctx` carrying the runtime accessors: