eve 0.71.2 → 0.72.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 (470) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/README.md +22 -6
  3. package/dist/src/acp/adapter.js +1 -1
  4. package/dist/src/ai/decide.d.ts +7 -0
  5. package/dist/src/ai/decide.js +1 -0
  6. package/dist/src/channel/conversation-context.d.ts +4 -1
  7. package/dist/src/channel/invoke-tool.d.ts +41 -0
  8. package/dist/src/channel/invoke-tool.js +1 -0
  9. package/dist/src/channel/routes.d.ts +3 -0
  10. package/dist/src/chunks/{use-eve-agent-CFCaYnrI.js → use-eve-agent-C1GYGCtb.js} +698 -388
  11. package/dist/src/chunks/{use-eve-agent-DcDhXNv1.js → use-eve-agent-hZJ7CB8t.js} +698 -388
  12. package/dist/src/cli/commands/integration-setup.js +1 -1
  13. package/dist/src/cli/commands/registry.js +1 -1
  14. package/dist/src/cli/commands/trace-detail.d.ts +1 -1
  15. package/dist/src/cli/commands/trace-detail.js +1 -1
  16. package/dist/src/cli/dev/tui/runner.js +1 -1
  17. package/dist/src/cli/dev/tui/setup-flow.d.ts +1 -0
  18. package/dist/src/cli/dev/tui/setup-panel.d.ts +1 -0
  19. package/dist/src/cli/dev/tui/setup-panel.js +2 -1
  20. package/dist/src/cli/dev/tui/traces/trace-conversation.d.ts +2 -2
  21. package/dist/src/cli/dev/tui/traces/trace-conversation.js +2 -2
  22. package/dist/src/cli/dev/tui/transcript-parts.d.ts +2 -1
  23. package/dist/src/cli/dev/tui/transcript-parts.js +1 -1
  24. package/dist/src/cli/dev/tui/transcript.js +1 -1
  25. package/dist/src/cli/dev/tui/tui-prompter.js +1 -1
  26. package/dist/src/client/conversation-projection.d.ts +4 -0
  27. package/dist/src/client/conversation-projection.js +1 -0
  28. package/dist/src/client/conversation-reducer.js +1 -1
  29. package/dist/src/client/conversation-state.d.ts +5 -26
  30. package/dist/src/client/conversation-state.js +1 -1
  31. package/dist/src/client/index.d.ts +1 -0
  32. package/dist/src/client/index.js +1 -1
  33. package/dist/src/client/message-action-parts.d.ts +1 -11
  34. package/dist/src/client/message-action-parts.js +1 -1
  35. package/dist/src/client/message-reducer.d.ts +3 -1
  36. package/dist/src/client/message-reducer.js +1 -1
  37. package/dist/src/client/session-utils.js +1 -1
  38. package/dist/src/client/session.js +1 -1
  39. package/dist/src/client/tool-call-state.d.ts +23 -0
  40. package/dist/src/client/tool-call-state.js +1 -0
  41. package/dist/src/client/tool-part-state.d.ts +7 -0
  42. package/dist/src/client/tool-part-state.js +1 -0
  43. package/dist/src/compiled/.vendor-stamp.json +10 -10
  44. package/dist/src/compiled/@ai-sdk/anthropic/index.d.ts +1453 -1358
  45. package/dist/src/compiled/@ai-sdk/anthropic/index.js +1 -2
  46. package/dist/src/compiled/@ai-sdk/code-mode/index.d.ts +172 -163
  47. package/dist/src/compiled/@ai-sdk/code-mode/index.js +15 -20
  48. package/dist/src/compiled/@ai-sdk/google/index.d.ts +772 -733
  49. package/dist/src/compiled/@ai-sdk/google/index.js +6 -8
  50. package/dist/src/compiled/@ai-sdk/mcp/index.d.ts +887 -790
  51. package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -1
  52. package/dist/src/compiled/@ai-sdk/openai/index.d.ts +1722 -1691
  53. package/dist/src/compiled/@ai-sdk/openai/index.js +3 -14
  54. package/dist/src/compiled/@ai-sdk/otel/index.d.ts +216 -159
  55. package/dist/src/compiled/@ai-sdk/otel/index.js +3 -3
  56. package/dist/src/compiled/@ai-sdk/provider/index.d.ts +7542 -7271
  57. package/dist/src/compiled/@ai-sdk/provider/index.js +1 -3
  58. package/dist/src/compiled/@ai-sdk/provider-utils/index.d.ts +1799 -1600
  59. package/dist/src/compiled/@eve/catalog/index.js +1 -1
  60. package/dist/src/compiled/_chunks/workflow/dist-DXLdlucM.js +15 -0
  61. package/dist/src/compiled/_chunks/workflow/experimental-decision-BrfWf6-n.js +3 -0
  62. package/dist/src/compiler/extension-compatibility.d.ts +36 -20
  63. package/dist/src/compiler/extension-compatibility.js +1 -1
  64. package/dist/src/compiler/manifest.js +1 -1
  65. package/dist/src/context/build-dynamic-tools.js +1 -1
  66. package/dist/src/context/caller-scope.d.ts +7 -0
  67. package/dist/src/context/caller-scope.js +1 -0
  68. package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
  69. package/dist/src/context/dynamic-tool-metadata.d.ts +1 -0
  70. package/dist/src/context/providers/session.js +1 -1
  71. package/dist/src/evals/define-eval.d.ts +1 -1
  72. package/dist/src/evals/judge.d.ts +1 -1
  73. package/dist/src/evals/judge.js +2 -2
  74. package/dist/src/evals/types.d.ts +8 -8
  75. package/dist/src/execution/cancel-descendant-turns-step.d.ts +1 -0
  76. package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
  77. package/dist/src/execution/cancelled-model-call-batch.js +1 -1
  78. package/dist/src/execution/coordination-dispatch-shared.d.ts +2 -1
  79. package/dist/src/execution/coordination-dispatch-shared.js +1 -1
  80. package/dist/src/execution/coordination-dispatch-step.js +1 -1
  81. package/dist/src/execution/durable-session-read.d.ts +5 -0
  82. package/dist/src/execution/durable-session-read.js +1 -0
  83. package/dist/src/execution/durable-session-store.d.ts +4 -10
  84. package/dist/src/execution/durable-session-store.js +1 -1
  85. package/dist/src/execution/dynamic-connections.d.ts +3 -3
  86. package/dist/src/execution/dynamic-connections.js +1 -1
  87. package/dist/src/execution/dynamic-workflow/tool.js +1 -1
  88. package/dist/src/execution/invoke-tool.d.ts +35 -0
  89. package/dist/src/execution/invoke-tool.js +1 -0
  90. package/dist/src/execution/legacy-session/interrupt-step.js +1 -1
  91. package/dist/src/execution/legacy-session/snapshot.d.ts +3 -0
  92. package/dist/src/execution/legacy-session/snapshot.js +1 -1
  93. package/dist/src/execution/model-call-batching.js +1 -1
  94. package/dist/src/execution/node-step.d.ts +2 -0
  95. package/dist/src/execution/node-step.js +1 -1
  96. package/dist/src/execution/proxied-deliver-step.js +1 -1
  97. package/dist/src/execution/publish-session-events.d.ts +8 -0
  98. package/dist/src/execution/publish-session-events.js +1 -1
  99. package/dist/src/execution/sandbox/active-handles.d.ts +6 -0
  100. package/dist/src/execution/sandbox/active-handles.js +1 -1
  101. package/dist/src/execution/sandbox/ensure.js +1 -1
  102. package/dist/src/execution/session/active-turn.js +1 -1
  103. package/dist/src/execution/session/answer-caller.d.ts +15 -0
  104. package/dist/src/execution/session/answer-caller.js +1 -0
  105. package/dist/src/execution/session/checkpoint-migrations.js +1 -1
  106. package/dist/src/execution/session/finalization.js +1 -1
  107. package/dist/src/execution/session/handoff-steps.d.ts +3 -1
  108. package/dist/src/execution/session/handoff-steps.js +1 -1
  109. package/dist/src/execution/session/handoff.d.ts +1 -1
  110. package/dist/src/execution/session/handoff.js +1 -1
  111. package/dist/src/execution/session/pending-turn-state.d.ts +8 -3
  112. package/dist/src/execution/session/pending-turn-state.js +1 -1
  113. package/dist/src/execution/session/task-tool-tracing-step.d.ts +5 -0
  114. package/dist/src/execution/session/task-tool-tracing-step.js +1 -0
  115. package/dist/src/execution/session/turn-step-result.js +1 -1
  116. package/dist/src/execution/session/turn-step.js +1 -1
  117. package/dist/src/execution/session/turn-waiting-step.js +1 -1
  118. package/dist/src/execution/session/turn.d.ts +1 -0
  119. package/dist/src/execution/session/turn.js +1 -1
  120. package/dist/src/execution/settle-cancelled-turn-step.d.ts +4 -6
  121. package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
  122. package/dist/src/execution/tasks/start.d.ts +3 -3
  123. package/dist/src/execution/tasks/start.js +1 -1
  124. package/dist/src/execution/tasks/steps.d.ts +1 -1
  125. package/dist/src/execution/tasks/steps.js +1 -1
  126. package/dist/src/execution/terminal-session-completion-step.d.ts +7 -0
  127. package/dist/src/execution/terminal-session-completion-step.js +1 -1
  128. package/dist/src/execution/terminal-session-failure-step.js +1 -1
  129. package/dist/src/execution/tools/agent-router-workflow.js +1 -1
  130. package/dist/src/execution/tools/connection-tools.js +1 -1
  131. package/dist/src/execution/tools/workflow/authorization-completion.js +1 -1
  132. package/dist/src/execution/tools/workflow/harness-definition.js +1 -1
  133. package/dist/src/execution/tools/workflow/step-execution.js +1 -1
  134. package/dist/src/execution/tools/workflow/step.js +1 -1
  135. package/dist/src/execution/tools/workflow/withdraw-step.d.ts +7 -9
  136. package/dist/src/execution/tools/workflow/withdraw-step.js +1 -1
  137. package/dist/src/execution/workflow-runtime.js +1 -1
  138. package/dist/src/execution/workflow-trace-context.d.ts +2 -2
  139. package/dist/src/harness/authorization.d.ts +4 -2
  140. package/dist/src/harness/authorization.js +1 -1
  141. package/dist/src/harness/{compaction.js → compaction/engine.js} +1 -1
  142. package/dist/src/harness/compaction/step.d.ts +46 -0
  143. package/dist/src/harness/compaction/step.js +1 -0
  144. package/dist/src/harness/coordination.d.ts +32 -64
  145. package/dist/src/harness/coordination.js +1 -1
  146. package/dist/src/harness/current-messages.d.ts +1 -3
  147. package/dist/src/harness/current-messages.js +1 -1
  148. package/dist/src/harness/emission.d.ts +4 -52
  149. package/dist/src/harness/emission.js +1 -1
  150. package/dist/src/harness/execute-tool.d.ts +1 -0
  151. package/dist/src/harness/final-output.d.ts +5 -0
  152. package/dist/src/harness/final-output.js +1 -1
  153. package/dist/src/harness/hitl/approvals.d.ts +115 -0
  154. package/dist/src/harness/hitl/approvals.js +1 -0
  155. package/dist/src/harness/hitl/approved-call-callers.d.ts +14 -0
  156. package/dist/src/harness/hitl/approved-call-callers.js +1 -0
  157. package/dist/src/harness/hitl/approved-calls.d.ts +37 -0
  158. package/dist/src/harness/hitl/approved-calls.js +1 -0
  159. package/dist/src/harness/{session-limit-continuation.d.ts → hitl/budget-request.d.ts} +3 -1
  160. package/dist/src/harness/hitl/budget-request.js +1 -0
  161. package/dist/src/harness/hitl/budget.d.ts +21 -0
  162. package/dist/src/harness/hitl/budget.js +1 -0
  163. package/dist/src/harness/{approval-candidates.d.ts → hitl/candidates.d.ts} +13 -18
  164. package/dist/src/harness/hitl/candidates.js +1 -0
  165. package/dist/src/harness/hitl/coordinator.js +1 -0
  166. package/dist/src/harness/hitl/delivery.d.ts +37 -0
  167. package/dist/src/harness/hitl/delivery.js +1 -0
  168. package/dist/src/harness/hitl/index.d.ts +49 -0
  169. package/dist/src/harness/hitl/index.js +1 -0
  170. package/dist/src/harness/hitl/intake.d.ts +67 -0
  171. package/dist/src/harness/hitl/intake.js +1 -0
  172. package/dist/src/harness/{stale-input-responses.d.ts → hitl/stale-responses.d.ts} +5 -3
  173. package/dist/src/harness/hitl/stale-responses.js +3 -0
  174. package/dist/src/harness/inline-tool-authorization.d.ts +4 -0
  175. package/dist/src/harness/inline-tool-authorization.js +1 -1
  176. package/dist/src/harness/input-extraction.d.ts +1 -10
  177. package/dist/src/harness/input-extraction.js +1 -1
  178. package/dist/src/harness/input-request-resolution.d.ts +1 -5
  179. package/dist/src/harness/input-request-resolution.js +1 -1
  180. package/dist/src/harness/messages.js +1 -1
  181. package/dist/src/harness/model-call/call.d.ts +78 -0
  182. package/dist/src/harness/model-call/call.js +1 -0
  183. package/dist/src/harness/{model-call-error.d.ts → model-call/errors.d.ts} +1 -1
  184. package/dist/src/harness/model-call/failure.d.ts +52 -0
  185. package/dist/src/harness/model-call/failure.js +1 -0
  186. package/dist/src/harness/model-call/model.d.ts +18 -0
  187. package/dist/src/harness/model-call/model.js +1 -0
  188. package/dist/src/harness/model-call/recovery.d.ts +52 -0
  189. package/dist/src/harness/model-call/recovery.js +1 -0
  190. package/dist/src/harness/model-call/request.d.ts +30 -0
  191. package/dist/src/harness/model-call/request.js +3 -0
  192. package/dist/src/harness/model-call/response.d.ts +39 -0
  193. package/dist/src/harness/model-call/response.js +1 -0
  194. package/dist/src/harness/model-call/retry.d.ts +11 -0
  195. package/dist/src/harness/model-call/retry.js +1 -0
  196. package/dist/src/harness/model-call/run.d.ts +38 -0
  197. package/dist/src/harness/model-call/run.js +1 -0
  198. package/dist/src/harness/model-call/tools.d.ts +48 -0
  199. package/dist/src/harness/model-call/tools.js +1 -0
  200. package/dist/src/harness/model-call/usage.d.ts +23 -0
  201. package/dist/src/harness/model-call/usage.js +1 -0
  202. package/dist/src/harness/nested-actions.d.ts +2 -2
  203. package/dist/src/harness/provider-tools.d.ts +7 -3
  204. package/dist/src/harness/provider-tools.js +1 -1
  205. package/dist/src/harness/proxy-input-requests.d.ts +4 -12
  206. package/dist/src/harness/proxy-input-requests.js +1 -1
  207. package/dist/src/harness/session-machine/commit.d.ts +28 -0
  208. package/dist/src/harness/session-machine/commit.js +1 -0
  209. package/dist/src/harness/session-machine/current.d.ts +29 -0
  210. package/dist/src/harness/session-machine/current.js +1 -0
  211. package/dist/src/harness/session-machine/events.d.ts +6 -0
  212. package/dist/src/harness/session-machine/events.js +1 -0
  213. package/dist/src/harness/session-machine/resolver-events.d.ts +12 -0
  214. package/dist/src/harness/session-machine/resolver-events.js +1 -0
  215. package/dist/src/harness/session-machine/state.d.ts +47 -0
  216. package/dist/src/harness/session-machine/state.js +1 -0
  217. package/dist/src/harness/session-machine/transitions.d.ts +188 -0
  218. package/dist/src/harness/session-machine/transitions.js +1 -0
  219. package/dist/src/harness/session-machine/view.d.ts +58 -0
  220. package/dist/src/harness/session-machine/view.js +1 -0
  221. package/dist/src/harness/step/after-model.d.ts +7 -0
  222. package/dist/src/harness/step/after-model.js +1 -0
  223. package/dist/src/harness/step/context.d.ts +59 -0
  224. package/dist/src/harness/step/context.js +1 -0
  225. package/dist/src/harness/step/intake.d.ts +34 -0
  226. package/dist/src/harness/step/intake.js +1 -0
  227. package/dist/src/harness/step/prompt.d.ts +37 -0
  228. package/dist/src/harness/step/prompt.js +1 -0
  229. package/dist/src/harness/step-hooks.d.ts +8 -13
  230. package/dist/src/harness/step-hooks.js +1 -1
  231. package/dist/src/harness/tool-call-io.d.ts +25 -0
  232. package/dist/src/harness/tool-call-io.js +1 -0
  233. package/dist/src/harness/tool-loop.d.ts +7 -22
  234. package/dist/src/harness/tool-loop.js +1 -3
  235. package/dist/src/harness/tool-model-output.d.ts +1 -2
  236. package/dist/src/harness/tools.d.ts +14 -0
  237. package/dist/src/harness/tools.js +1 -1
  238. package/dist/src/harness/turn-tag-state.d.ts +1 -1
  239. package/dist/src/harness/types.d.ts +6 -0
  240. package/dist/src/instrumentation/ai-sdk-hook-bridge.d.ts +1 -1
  241. package/dist/src/instrumentation/ai-sdk-hook-bridge.js +1 -1
  242. package/dist/src/instrumentation/content.js +1 -1
  243. package/dist/src/instrumentation/dispatch.js +1 -1
  244. package/dist/src/instrumentation/lifecycle.d.ts +28 -52
  245. package/dist/src/instrumentation/native-events.d.ts +2 -1
  246. package/dist/src/instrumentation/native-events.js +1 -1
  247. package/dist/src/instrumentation/provider.d.ts +1 -1
  248. package/dist/src/instrumentation/runtime-context.d.ts +2 -3
  249. package/dist/src/instrumentation/runtime-context.js +1 -1
  250. package/dist/src/instrumentation/runtime.d.ts +11 -1
  251. package/dist/src/instrumentation/runtime.js +1 -1
  252. package/dist/src/instrumentation/state.d.ts +6 -1
  253. package/dist/src/instrumentation/state.js +1 -1
  254. package/dist/src/internal/application/package.js +1 -1
  255. package/dist/src/internal/attachments/limited-read.d.ts +16 -0
  256. package/dist/src/internal/attachments/limited-read.js +1 -0
  257. package/dist/src/internal/authored-definition/schema-backed.d.ts +2 -1
  258. package/dist/src/internal/authored-definition/schema-backed.js +1 -1
  259. package/dist/src/internal/gateway.d.ts +2 -0
  260. package/dist/src/internal/gateway.js +1 -1
  261. package/dist/src/internal/mcp/published-tools.d.ts +13 -0
  262. package/dist/src/internal/mcp/published-tools.js +1 -0
  263. package/dist/src/internal/mcp/request-trace-context.d.ts +12 -0
  264. package/dist/src/internal/mcp/request-trace-context.js +1 -0
  265. package/dist/src/internal/mcp/streamable-http-server.d.ts +7 -3
  266. package/dist/src/internal/mcp/streamable-http-server.js +1 -1
  267. package/dist/src/internal/model-auth/transport.d.ts +3 -3
  268. package/dist/src/internal/model-auth/transport.js +1 -1
  269. package/dist/src/internal/nitro/host/instrumentation-entry.js +2 -2
  270. package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
  271. package/dist/src/internal/nitro/routes/channel-request-instrumentation.js +1 -1
  272. package/dist/src/internal/nitro/routes/route-invoke-tool.d.ts +24 -0
  273. package/dist/src/internal/nitro/routes/route-invoke-tool.js +1 -0
  274. package/dist/src/models/auto.d.ts +5 -5
  275. package/dist/src/models/auto.js +2 -2
  276. package/dist/src/protocol/message.d.ts +7 -0
  277. package/dist/src/protocol/message.js +1 -1
  278. package/dist/src/protocol/session-projection.d.ts +159 -0
  279. package/dist/src/protocol/session-projection.js +1 -0
  280. package/dist/src/public/ai/index.d.ts +1 -1
  281. package/dist/src/public/ai/index.js +1 -1
  282. package/dist/src/public/channels/chat-sdk/attachment-refs.d.ts +15 -0
  283. package/dist/src/public/channels/chat-sdk/attachment-refs.js +1 -0
  284. package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +2 -2
  285. package/dist/src/public/channels/chat-sdk/messageToUserContent.d.ts +11 -5
  286. package/dist/src/public/channels/chat-sdk/messageToUserContent.js +1 -1
  287. package/dist/src/public/channels/discord/attachments.d.ts +15 -0
  288. package/dist/src/public/channels/discord/attachments.js +1 -0
  289. package/dist/src/public/channels/discord/discordChannel.js +1 -1
  290. package/dist/src/public/channels/discord/inbound.d.ts +13 -0
  291. package/dist/src/public/channels/discord/inbound.js +1 -1
  292. package/dist/src/public/channels/index.d.ts +1 -1
  293. package/dist/src/public/channels/linear/inbound-uploads.d.ts +21 -0
  294. package/dist/src/public/channels/linear/inbound-uploads.js +1 -0
  295. package/dist/src/public/channels/linear/linearChannel.js +1 -1
  296. package/dist/src/public/channels/linq/inboundContent.d.ts +7 -1
  297. package/dist/src/public/channels/linq/inboundContent.js +1 -1
  298. package/dist/src/public/channels/linq/linqChannel.js +1 -1
  299. package/dist/src/public/channels/mcp.d.ts +17 -2
  300. package/dist/src/public/channels/mcp.js +1 -1
  301. package/dist/src/public/channels/photon/attachments.d.ts +21 -0
  302. package/dist/src/public/channels/photon/attachments.js +1 -0
  303. package/dist/src/public/channels/photon/photonIMessageChannel.js +1 -1
  304. package/dist/src/public/channels/slack/attachments.d.ts +3 -1
  305. package/dist/src/public/channels/slack/attachments.js +1 -1
  306. package/dist/src/public/channels/slack/slackChannel.js +1 -1
  307. package/dist/src/public/channels/teams/attachments.d.ts +4 -4
  308. package/dist/src/public/channels/teams/attachments.js +1 -1
  309. package/dist/src/public/channels/telegram/attachments.js +1 -1
  310. package/dist/src/public/channels/twilio/api.d.ts +7 -0
  311. package/dist/src/public/channels/twilio/api.js +1 -1
  312. package/dist/src/public/channels/twilio/inbound.d.ts +7 -0
  313. package/dist/src/public/channels/twilio/inbound.js +2 -2
  314. package/dist/src/public/channels/twilio/twilioChannel.js +1 -1
  315. package/dist/src/public/definitions/channel.d.ts +1 -0
  316. package/dist/src/public/definitions/connections/mcp.d.ts +1 -1
  317. package/dist/src/public/definitions/connections/openapi.d.ts +1 -1
  318. package/dist/src/public/models/openai/chatgpt/model.js +1 -1
  319. package/dist/src/react/index.d.ts +1 -0
  320. package/dist/src/react/index.js +1 -1
  321. package/dist/src/runtime/agent/mock-model-adapter.js +2 -2
  322. package/dist/src/runtime/connections/mcp-client.js +1 -1
  323. package/dist/src/runtime/connections/scoped-authorization.js +1 -1
  324. package/dist/src/runtime/resolve-tool.js +1 -1
  325. package/dist/src/setup/boxes/resolve-provisioning.d.ts +2 -0
  326. package/dist/src/setup/boxes/resolve-provisioning.js +1 -1
  327. package/dist/src/setup/cli/prompt-ui.d.ts +3 -0
  328. package/dist/src/setup/cli/prompt-ui.js +3 -1
  329. package/dist/src/setup/cli/select-component.d.ts +1 -0
  330. package/dist/src/setup/cli/select-component.js +1 -1
  331. package/dist/src/setup/flows/ensure-vercel-project.d.ts +2 -0
  332. package/dist/src/setup/flows/ensure-vercel-project.js +1 -1
  333. package/dist/src/setup/integrations/discord/api.js +1 -1
  334. package/dist/src/setup/integrations/web/auth-options.d.ts +4 -0
  335. package/dist/src/setup/integrations/web/auth-options.js +1 -0
  336. package/dist/src/setup/integrations/web/auth-scaffold.d.ts +7 -0
  337. package/dist/src/setup/integrations/web/auth-scaffold.js +1 -0
  338. package/dist/src/setup/integrations/web/provision-auth.d.ts +3 -0
  339. package/dist/src/setup/integrations/web/provision-auth.js +1 -0
  340. package/dist/src/setup/integrations/web/setup.d.ts +11 -6
  341. package/dist/src/setup/integrations/web/setup.js +3 -3
  342. package/dist/src/setup/prompter.d.ts +2 -0
  343. package/dist/src/setup/prompter.js +1 -1
  344. package/dist/src/setup/scaffold/create/add-to-project.js +1 -1
  345. package/dist/src/setup/scaffold/create/project.js +2 -2
  346. package/dist/src/setup/scaffold/create/web-template.d.ts +3 -3
  347. package/dist/src/setup/scaffold/create/web-template.js +26 -8
  348. package/dist/src/setup/scaffold/update/web-options.js +1 -1
  349. package/dist/src/setup/vercel-project-api.d.ts +9 -0
  350. package/dist/src/setup/vercel-project-api.js +1 -1
  351. package/dist/src/setup/vercel-project.d.ts +4 -2
  352. package/dist/src/setup/vercel-project.js +0 -0
  353. package/dist/src/shared/web-search.d.ts +1 -1
  354. package/dist/src/subagents/adapter.js +1 -1
  355. package/dist/src/subagents/event-proxy-step.js +1 -1
  356. package/dist/src/subagents/hitl-proxy.d.ts +4 -28
  357. package/dist/src/subagents/hitl-proxy.js +1 -1
  358. package/dist/src/svelte/index.d.ts +2 -0
  359. package/dist/src/svelte/index.js +39 -2
  360. package/dist/src/svelte/use-eve-agent.js +1 -1
  361. package/dist/src/tools/approval/policies.d.ts +5 -5
  362. package/dist/src/tools/approval/policies.js +1 -1
  363. package/dist/src/tools/framework/agent.js +1 -1
  364. package/dist/src/tools/provided/agent-router.js +1 -1
  365. package/dist/src/tools/provided/ask-question-workflow.js +1 -1
  366. package/dist/src/tools/provided/ask-question.js +2 -2
  367. package/dist/src/tools/provided/bash.js +1 -1
  368. package/dist/src/tools/provided/framework-tool.d.ts +3 -0
  369. package/dist/src/tools/provided/framework-tool.js +1 -0
  370. package/dist/src/tools/provided/glob.js +2 -2
  371. package/dist/src/tools/provided/grep.js +2 -2
  372. package/dist/src/tools/provided/load-skill.js +1 -1
  373. package/dist/src/tools/provided/no-reply.js +1 -1
  374. package/dist/src/tools/provided/read-file.js +2 -2
  375. package/dist/src/tools/provided/sleep-workflow.js +1 -1
  376. package/dist/src/tools/provided/sleep.js +1 -1
  377. package/dist/src/tools/provided/task-cancel.js +1 -1
  378. package/dist/src/tools/provided/task-wait.js +1 -1
  379. package/dist/src/tools/provided/web-fetch.js +2 -2
  380. package/dist/src/tools/provided/web-search.js +1 -1
  381. package/dist/src/tools/provided/workflow.js +1 -1
  382. package/dist/src/tools/provided/write-file.js +2 -2
  383. package/dist/src/tracing/agent-approval-instrumentation.d.ts +2 -2
  384. package/dist/src/tracing/agent-approval-instrumentation.js +1 -1
  385. package/dist/src/tracing/agent-otel-provider.js +2 -2
  386. package/dist/src/tracing/agent-otel-usage.d.ts +1 -1
  387. package/dist/src/tracing/agent-otel-usage.js +1 -1
  388. package/dist/src/tracing/agent-span-contract.d.ts +8 -1
  389. package/dist/src/tracing/agent-span-contract.js +1 -1
  390. package/dist/src/tracing/agent-tool-instrumentation.d.ts +16 -5
  391. package/dist/src/tracing/agent-tool-instrumentation.js +1 -1
  392. package/dist/src/tracing/agent-trace-context-codec.js +1 -1
  393. package/dist/src/tracing/agent-trace-span-processor.js +1 -1
  394. package/dist/src/tracing/agent-trace-state.d.ts +8 -3
  395. package/dist/src/tracing/install-instrumentation-runtime.js +1 -1
  396. package/dist/src/tracing/invoke-tool-span.d.ts +61 -0
  397. package/dist/src/tracing/invoke-tool-span.js +1 -0
  398. package/dist/src/tracing/local-trace-analysis.js +1 -1
  399. package/dist/src/vue/index.d.ts +2 -0
  400. package/dist/src/vue/index.js +39 -2
  401. package/dist/src/vue/use-eve-agent.js +1 -1
  402. package/docs/agent-config.md +2 -2
  403. package/docs/channels/chat-sdk.mdx +3 -1
  404. package/docs/channels/custom.mdx +3 -0
  405. package/docs/channels/discord.mdx +5 -4
  406. package/docs/channels/eve.mdx +65 -0
  407. package/docs/channels/linear.mdx +1 -1
  408. package/docs/channels/linq.mdx +2 -0
  409. package/docs/channels/mcp.mdx +39 -1
  410. package/docs/channels/photon.mdx +5 -0
  411. package/docs/channels/teams.mdx +4 -7
  412. package/docs/channels/twilio.mdx +1 -1
  413. package/docs/concepts/built-in-tools.md +12 -0
  414. package/docs/concepts/sessions-runs-and-streaming.md +3 -3
  415. package/docs/connections/overview.mdx +1 -1
  416. package/docs/dynamic-configuration/meta.json +1 -1
  417. package/docs/evals/judge.mdx +16 -16
  418. package/docs/evals/overview.mdx +1 -1
  419. package/docs/guides/{evaluate.md → decide.md} +35 -35
  420. package/docs/guides/dynamic-capabilities.md +1 -1
  421. package/docs/guides/frontend/overview.mdx +3 -1
  422. package/docs/guides/hooks.md +1 -1
  423. package/docs/guides/instrumentation/instrumentation.mdx +23 -22
  424. package/docs/guides/instrumentation/otel.mdx +13 -2
  425. package/docs/reference/cli.md +4 -2
  426. package/docs/reference/typescript-api.md +4 -2
  427. package/docs/tools/human-in-the-loop.md +8 -4
  428. package/docs/tools/workflows.mdx +4 -4
  429. package/package.json +13 -11
  430. package/dist/src/ai/evaluate.d.ts +0 -7
  431. package/dist/src/ai/evaluate.js +0 -1
  432. package/dist/src/client/message-task-parts.d.ts +0 -8
  433. package/dist/src/client/message-task-parts.js +0 -1
  434. package/dist/src/compiled/_chunks/workflow/dist-C3ZE62yI.js +0 -25
  435. package/dist/src/compiled/_chunks/workflow/experimental-evaluation-Dm32egEG.js +0 -5
  436. package/dist/src/harness/active-turn-id.d.ts +0 -11
  437. package/dist/src/harness/active-turn-id.js +0 -1
  438. package/dist/src/harness/approval-candidates.js +0 -1
  439. package/dist/src/harness/approval-delivery-coordinator.js +0 -1
  440. package/dist/src/harness/cancelled-turn-emission.d.ts +0 -12
  441. package/dist/src/harness/cancelled-turn-emission.js +0 -1
  442. package/dist/src/harness/emission-state.d.ts +0 -26
  443. package/dist/src/harness/emission-state.js +0 -1
  444. package/dist/src/harness/held-requests.d.ts +0 -18
  445. package/dist/src/harness/held-requests.js +0 -1
  446. package/dist/src/harness/hitl/approval-input-requests.d.ts +0 -27
  447. package/dist/src/harness/hitl/approval-input-requests.js +0 -1
  448. package/dist/src/harness/hitl/pending-input-resolution.d.ts +0 -54
  449. package/dist/src/harness/hitl/pending-input-resolution.js +0 -1
  450. package/dist/src/harness/hitl/session-limit-input-requests.d.ts +0 -12
  451. package/dist/src/harness/hitl/session-limit-input-requests.js +0 -1
  452. package/dist/src/harness/input-requests.d.ts +0 -31
  453. package/dist/src/harness/input-requests.js +0 -1
  454. package/dist/src/harness/pending-input-batches.d.ts +0 -81
  455. package/dist/src/harness/pending-input-batches.js +0 -1
  456. package/dist/src/harness/session-limit-continuation.js +0 -1
  457. package/dist/src/harness/session-limit-enforcement.d.ts +0 -45
  458. package/dist/src/harness/session-limit-enforcement.js +0 -1
  459. package/dist/src/harness/stale-input-responses.js +0 -3
  460. package/dist/src/harness/workflow-dispatch.d.ts +0 -30
  461. package/dist/src/harness/workflow-dispatch.js +0 -1
  462. package/dist/src/public/channels/linear/inbound-images.d.ts +0 -19
  463. package/dist/src/public/channels/linear/inbound-images.js +0 -1
  464. package/dist/src/tracing/agent-action-instrumentation.d.ts +0 -25
  465. package/dist/src/tracing/agent-action-instrumentation.js +0 -1
  466. /package/dist/src/harness/{compaction.d.ts → compaction/engine.d.ts} +0 -0
  467. /package/dist/src/harness/{compaction-prompt.d.ts → compaction/prompt.d.ts} +0 -0
  468. /package/dist/src/harness/{compaction-prompt.js → compaction/prompt.js} +0 -0
  469. /package/dist/src/harness/{approval-delivery-coordinator.d.ts → hitl/coordinator.d.ts} +0 -0
  470. /package/dist/src/harness/{model-call-error.js → model-call/errors.js} +0 -0
@@ -18,6 +18,71 @@ export default eveChannel({
18
18
  });
19
19
  ```
20
20
 
21
+ ## Web Chat with Sign in with Vercel
22
+
23
+ Run `eve add channel/web`, or select **Web Chat** from the terminal UI's channel
24
+ picker. Choose a hosting layout, then **Sign in with Vercel**. Setup uses a
25
+ linked Vercel project and creates a Vercel App that only members of that
26
+ project's team can sign in to.
27
+
28
+ For a new agent, initialize it first, then link a project and add Web Chat:
29
+
30
+ ```bash
31
+ eve init my-agent --non-interactive
32
+ cd my-agent
33
+ eve link
34
+ eve add channel/web
35
+ ```
36
+
37
+ `eve init --channel-web-nextjs` keeps its existing scaffolding behavior and does
38
+ not provision authentication. Sign-in setup runs through `eve add channel/web`
39
+ or the terminal UI's channel picker.
40
+
41
+ The generated Next.js app uses Better Auth sessions. The selected agent's HTTP
42
+ channel verifies the same session, while retaining Vercel OIDC and local
43
+ development access. In an agent workspace, setup configures only the selected
44
+ agent. Other agents keep their own authentication policies.
45
+
46
+ Setup registers `/api/auth/callback/vercel` as a project redirect URI, so Vercel
47
+ validates callbacks against the project's deployment domains. The app uses the
48
+ `authorization_code` grant, `client_secret_post` authentication, and the
49
+ `openid`, `email`, and `profile` scopes. Setup writes `VERCEL_APP_CLIENT_ID`,
50
+ `VERCEL_APP_CLIENT_SECRET`, and `BETTER_AUTH_SECRET` to production and preview;
51
+ secret values are marked sensitive and are never printed or written to source.
52
+ Run `eve deploy` after setup to publish the app. Local development continues
53
+ without browser sign-in.
54
+
55
+ For automation, supply the setup answers explicitly:
56
+
57
+ ```bash
58
+ eve add channel/web --non-interactive \
59
+ --answer 'web-hosting="vercel"' \
60
+ --answer 'web-authentication="vercel"'
61
+ ```
62
+
63
+ Use a linked project with permission to manage Vercel Apps and project
64
+ environment variables. A team owner can complete setup if your role cannot
65
+ create apps. The searchable team picker lists eligible teams first. Disabled
66
+ teams show `needs permission` or `couldn't verify`, with shared recovery guidance
67
+ below the list. If permissions cannot be verified, that team stays
68
+ disabled until you sign in or retry. Linked projects are checked before
69
+ interactive auth setup.
70
+ If setup reports a missing prerequisite, complete it and resume with
71
+ `eve add channel/web --skip-install`. Compatible existing apps
72
+ and credentials are reused; conflicting app settings or credentials stop setup
73
+ with an error. Authored channel or UI files are preserved unless you explicitly
74
+ pass `--overwrite`.
75
+
76
+ If the team has reached its Vercel App limit, remove an unused app in team
77
+ settings and retry. If a generated app name or slug is taken by an incompatible
78
+ app, rename the Vercel project in its settings and retry. Compatible apps from a
79
+ concurrent setup are reused. A client-secret limit requires removing an unused
80
+ secret from the app's settings; setup never removes an existing secret for you.
81
+
82
+ Choose **Configure authentication myself** (`web-authentication=custom`) to
83
+ keep the current channel policy. The default placeholder rejects production
84
+ browser requests until you configure your own authentication.
85
+
21
86
  ## Routes
22
87
 
23
88
  The default eve channel inspects the agent, creates sessions, accepts callbacks and task input, controls sessions, and streams events. Its public routes include:
@@ -95,7 +95,7 @@ Start a session without an inbound webhook with `receive(linear, { target })`. S
95
95
 
96
96
  ### Attachments
97
97
 
98
- Markdown images hosted at `https://uploads.linear.app` in Agent Session prompts are fetched with the resolved Linear access token and included as image file parts. eve sends the bearer token only to that exact HTTPS origin; images from other hosts remain markdown text. If a Linear upload fails or returns non-image content, eve preserves its markdown reference and continues the text turn. Other inbound file attachments are not supported on this channel today.
98
+ Files uploaded to Linear and referenced in an Agent Session prompt, whether as markdown images (`![name](url)`) or file links (`[name](url)`) hosted at `https://uploads.linear.app`, are fetched with the resolved Linear access token and included as file parts. eve sends the bearer token only to that exact HTTPS origin; images and links from other hosts remain markdown text. If a Linear upload fails, an image reference returns non-image content, or a file link returns an HTML page, the reference becomes its label in the text, the agent gets a short note that the file couldn't be retrieved, and the text turn continues.
99
99
 
100
100
  ### API handle
101
101
 
@@ -20,6 +20,8 @@ The default webhook route is `/eve/v1/linq`. The channel verifies forwarded webh
20
20
 
21
21
  Set `turnPolicy: "queue"` when every response should finish before Linq starts the next message.
22
22
 
23
+ Images and other files people send reach the agent as file parts. eve downloads each one from Linq's CDN and passes the bytes; a failed download, or a file over 25 MB, reaches the agent as a short note.
24
+
23
25
  Customize inbound dispatch with `onMessage`. Return `null` to ignore a message, or return `title` alongside `auth` to set the title when the dispatch starts a run:
24
26
 
25
27
  ```ts
@@ -3,7 +3,7 @@ title: "MCP Channel"
3
3
  description: "Publish an eve agent as an MCP server with auth support."
4
4
  ---
5
5
 
6
- The MCP channel lets clients such as Claude Code delegate durable work to an eve agent through four tools: `agent_start`, `agent_get`, `agent_update`, and `agent_cancel`.
6
+ The MCP channel lets clients such as Claude Code delegate durable work to an eve agent through four tools: `agent_start`, `agent_get`, `agent_update`, and `agent_cancel`. It can also publish the agent's own tools, so a client calls them directly; see [Publish the agent's tools](#publish-the-agents-tools).
7
7
 
8
8
  Use an [MCP connection](../connections/mcp) instead when your eve agent needs to call someone else's MCP server.
9
9
 
@@ -211,6 +211,44 @@ Requests are bounded: the whole MCP request body is limited to 1 MiB, `message`
211
211
  - `agent_update` answers one pending batch. Re-sending the same answers after eve has accepted them returns the current invocation state; sending different answers for an already-answered batch is a conflict.
212
212
  - `agent_cancel` is cooperative and can race with completion. Poll `agent_get` until the status is terminal (`cancelled`, `completed`, or `failed`), not specifically `cancelled`.
213
213
 
214
+ ## Publish the agent's tools
215
+
216
+ By default the channel serves only the `agent_*` tools. Set `tools: true` to also publish every tool the agent can run outside a conversation, and `agent: false` to stop serving the `agent_*` tools:
217
+
218
+ ```ts title="agent/channels/mcp.ts"
219
+ import { localDev } from "eve/channels/auth";
220
+ import { mcpChannel } from "eve/channels/mcp";
221
+
222
+ export default mcpChannel({
223
+ auth: localDev(),
224
+ tools: true,
225
+ });
226
+ ```
227
+
228
+ `tools/list` returns the `agent_*` tools first, then the agent's tools in name order with their input and output JSON schemas. Framework tools, workflow and provider tools, tools without `execute`, and tools added by dynamic resolvers or subagents are not published. While `agent` is on, an agent tool named `agent_start`, `agent_get`, `agent_update`, or `agent_cancel` is not published, and eve logs a warning. With `agent: false`, the channel sends no `agent_*` instructions. Turning off both `agent` and `tools` throws.
229
+
230
+ Each `tools/call` checks the arguments against the tool's input schema, then runs the tool as the route-authenticated caller, with no model, turn, or workflow run. Every caller the channel's `auth` admits can call these tools, outside the agent's instructions, so review what becomes callable before you turn this on. Each call gets its own session:
231
+
232
+ - Authored state starts from its initial value, and updates are not kept.
233
+ - A sandbox the tool opens is deleted when the call ends.
234
+ - Calls may run in parallel, and a call retried after a lost response runs again.
235
+
236
+ A tool that cannot finish over MCP returns an error result with `isError: true` and a `structuredContent.error.code`:
237
+
238
+ | Code | When |
239
+ | ------------------------ | ------------------------------------------------------------------------------------------------ |
240
+ | `invalid_input` | The tool rejected its input. |
241
+ | `denied` | The tool's approval policy denied the call. |
242
+ | `approval_required` | The approval policy asks a person. The tool did not run; call it from a conversation instead. |
243
+ | `authorization_required` | The tool needs a sign-in to a connection first. Sign in from a conversation, then call it again. |
244
+ | `internal` | The tool failed. The message carries an error id that matches the server logs. |
245
+
246
+ ### Trace context
247
+
248
+ MCP clients send W3C trace context in each request's `params._meta`, not in HTTP headers. When a request carries a valid `_meta.traceparent`, that span becomes the parent of everything the request runs, including a published tool's `execute_tool` span. It takes precedence over any parent your platform extracted from the HTTP request's headers. A missing, malformed, or all-zero `traceparent` leaves that parent in place. `_meta.tracestate` is kept only alongside a valid `_meta.traceparent` and only up to 512 characters; a longer value is dropped.
249
+
250
+ `_meta.baggage` is never read. A caller cannot choose the trace audience, session lineage, or content capture: those come from the channel and your `tracePolicy`, as they do for conversations. The `execute_tool` span records the call's arguments and result only when that content decision allows it, and never records exception text.
251
+
214
252
  ## Invocation ownership
215
253
 
216
254
  Every MCP operation reruns the configured auth policy. With authenticated policies, an invocation belongs to the principal that started it; knowing its ID is not sufficient. Bearer tokens are not stored with the invocation or forwarded to the agent's tools.
@@ -32,6 +32,11 @@ boundary. See [Overlapping messages](./overview#overlapping-messages).
32
32
 
33
33
  Set `turnPolicy: "queue"` when every response should finish before Photon starts the next message.
34
34
 
35
+ Images and other files people send reach the agent as file parts. Photon's
36
+ webhook lists each file without its bytes, so eve downloads it from Photon by
37
+ its attachment id with the project's credentials. A failed download, or a file
38
+ over 25 MB, reaches the agent as a short note.
39
+
35
40
  Customize inbound dispatch with `onMessage`. Return `null` to ignore a message, or return `title` alongside `auth` to set the title when the dispatch starts a run:
36
41
 
37
42
  ```ts
@@ -95,19 +95,16 @@ Proactive sessions need an existing conversation reference, because the Bot Fram
95
95
 
96
96
  ### Attachments
97
97
 
98
- Inbound files are off by default. Opt in to allow personal-scope downloads and public media URLs:
98
+ Inbound files reach the agent as file parts. eve downloads images pasted into a message from Microsoft Bot Connector hosts with your bot credentials, and files uploaded in a personal chat from their pre-authenticated SharePoint download URL (`*.sharepoint.com` or `*.sharepoint.us`). A failed download, or one over the upload limit (25 MB unless `files.uploadPolicy` sets `maxBytes`), reaches the agent as a short note. Personal-chat uploads need `supportsFiles: true` on the bot in your Teams app manifest.
99
+
100
+ Use `allowedHosts` to download from other hosts, unauthenticated, or `enabled: false` to drop attachments:
99
101
 
100
102
  ```ts
101
103
  export default teamsChannel({
102
- files: {
103
- enabled: true,
104
- allowedHosts: ["smba.trafficmanager.net", "contoso.sharepoint.com"],
105
- },
104
+ files: { allowedHosts: ["files.contoso.com"] },
106
105
  });
107
106
  ```
108
107
 
109
- eve authenticates downloads from Microsoft Bot Connector hosts with your bot credentials. Downloads from other allowlisted hosts remain unauthenticated.
110
-
111
108
  ## What to read next
112
109
 
113
110
  - [Channels overview](./overview): the channel contract and every built-in channel
@@ -70,7 +70,7 @@ Start a session without an inbound message through `to(twilio, target).send(mess
70
70
 
71
71
  ### Attachments
72
72
 
73
- Inbound media attachments are not supported on this channel today.
73
+ MMS media reaches the agent as file parts. eve downloads each media URL with the account SID and auth token, and only from the Twilio API origin (`https://api.twilio.com`, or `api.apiBaseUrl` when set). If a download fails, the agent gets a short note in place of the file and the text turn continues.
74
74
 
75
75
  ## Disclaimer
76
76
 
@@ -208,6 +208,18 @@ import { webSearch } from "eve/tools/web_search";
208
208
  export default webSearch({ provider: "parallel" });
209
209
  ```
210
210
 
211
+ Select Browserbase Search in the same slot:
212
+
213
+ ```ts title="agent/tools/web_search.ts"
214
+ import { webSearch } from "eve/tools/web_search";
215
+
216
+ export default webSearch({ provider: "browserbase" });
217
+ ```
218
+
219
+ Use a [Gateway model ID](../agent-config#set-the-model) to route searches through Browserbase. AI Gateway executes the search using `AI_GATEWAY_API_KEY` or Vercel project OIDC credentials; no `BROWSERBASE_API_KEY` is needed. See [Browserbase Search on AI Gateway](https://vercel.com/docs/ai-gateway/models-and-providers/web-search#using-browserbase-search).
220
+
221
+ The `provider` setting applies only to AI Gateway models. Unsupported direct providers omit `web_search`.
222
+
211
223
  Replace provider-managed search with an authored implementation:
212
224
 
213
225
  ```ts title="agent/tools/web_search.ts"
@@ -127,11 +127,11 @@ A question or sign-in from inside a running call does not end the turn. This cov
127
127
 
128
128
  ### Task events
129
129
 
130
- A call to a tool that runs as a task, such as an agent tool, `agentRouter()`, the `workflow` tool, or a workflow tool that defines [`task(input, ctx)`](/docs/tools/workflows#run-calls-as-tasks-task) or [`serve(receive, ctx)`](/docs/tools/workflows#resumable-tasks-serve), returns a receipt as its `action.result` and keeps working. `task.started` reports the task's `taskId` for the call's `callId` and `turnId`, both when a call starts a task and when a call reaches a resumable task by its `taskId`, before any event the task's run publishes for that call. `task.settled` comes once per call, with the same `turnId`, `name`, and `kind` as its `task.started`, `status` `"completed"`, `"failed"`, or `"cancelled"`, and the call's `output` when it completed or `error.message` when it failed. Events recorded by earlier eve versions omit `name` and `kind` on `task.settled`, so match them to their `task.started` by `callId` when those fields are missing. Results reach the model as a message in its history, not as a stream event, so read outcomes from `task.settled`. A session the task's run opens with `ctx.agent` is announced with `agent.started` carrying the `taskId`. An `input.requested`, `authorization.required`, or `authorization.completed` event from a task's run carries its `taskId`. Each of these events names the call the task is serving when it happens: a resumable task's later call brings its own `callId` and `turnId`, which may belong to a later turn than the call that started the task.
130
+ A call to a tool that runs as a task, such as an agent tool, `agentRouter()`, the `workflow` tool, or a workflow tool that defines [`task(input, ctx)`](/docs/tools/workflows#run-calls-as-tasks-task) or [`serve(receive, ctx)`](/docs/tools/workflows#resumable-tasks-serve), returns a receipt as its `action.result` and keeps working. `task.started` reports the task's `taskId` for the call's `callId` and `turnId`, both when a call starts a task and when a call reaches a resumable task by its `taskId`, before any event the task's run publishes for that call. `task.settled` comes once per call, with the same `turnId`, `name`, and `kind` as its `task.started`, `status` `"completed"`, `"failed"`, or `"cancelled"`, and the call's `output` when it completed or `error.message` when it failed. Events recorded by earlier eve versions omit `name` and `kind` on `task.settled`, so match them to their `task.started` by `callId` when those fields are missing. Results reach the model as a message in its history, not as a stream event, so read outcomes from `task.settled`. A session the task's run opens with `ctx.agent` is announced with `agent.started` carrying the `taskId`. An `input.requested`, `authorization.required`, or `authorization.completed` event from a task's run carries its `taskId`. Each of these events names the call the task is serving when it happens: a resumable task's later call brings its own `callId` and `turnId`, which may belong to a later turn than the call that started the task. An `input.requested` relayed from a subagent or a workflow tool run also carries `callId`, the call in this session that the request serves. The request keeps the coordinates it was raised with, and a relayed approval's `request.action.callId` still names the asking run's call, not one of this session's.
131
131
 
132
132
  A turn doesn't end while tasks are working. When the model ends its text early, eve holds the turn and the stream emits `turn.waiting` for it; the turn continues once a result arrives or its caller writes. In a root session, that text completes as an ordinary `message.completed`. In a child session or a schedule's session, it reports `finishReason: "tool-calls"`, so channels post only the final reply. When the model calls `task_wait` and no result is ready yet, the stream also emits `turn.waiting`. Either way, the next `step.started` for the same `turnId` means the turn resumed, and `session.waiting` comes only after the turn ends. See [Tasks](/docs/tools/tasks#turns-wait-for-their-tasks).
133
133
 
134
- `step.failed` and `turn.failed` carry `{ code, message, details? }` for the failed fragment or turn, and `session.failed` is the terminal session-level variant. `turn.cancelled` is not a failure: the cancelled turn ends without any failure event, `session.waiting` follows, and the session accepts the next message normally. Whatever the turn streamed before cancellation stays on the stream. Durable history keeps the accepted user input and previously settled work, and discards incomplete assistant output. Tool calls the cancellation stopped stay in history, each answered as cancelled, so the model sees that the work started and stopped instead of a request left unanswered. When a turn requested an output schema, the finalized payload lands on `result.completed` as `data.result` before the turn boundary. `authorization.required` carries the sign-in challenge (`data.authorization` may include `url`, `userCode`, `expiresAt`, `instructions`), and `authorization.completed` carries `data.outcome` (`"authorized" | "declined" | "failed" | "timed-out"`). Both carry `data.principalId` when a session principal started the sign-in. It holds the same value as `responderPrincipalId` on approval events, so a channel can deliver the challenge privately to that person even after someone else starts a later turn.
134
+ `step.failed` and `turn.failed` carry `{ code, message, details? }` for the failed fragment or turn, and `session.failed` is the terminal session-level variant. `turn.cancelled` is not a failure: the cancelled turn ends without any failure event, `session.waiting` follows, and the session accepts the next message normally. Whatever the turn streamed before cancellation stays on the stream. Durable history keeps the accepted user input and previously settled work, and discards incomplete assistant output. Tool calls the cancellation stopped stay in history, each answered as cancelled, so the model sees that the work started and stopped instead of a request left unanswered. Before `turn.cancelled`, the stream reports requests the cancel strands as `cancelled` in `input.resolved`. These include the turn's own questions, the session-limit prompt, and requests relayed from the work it stops. When a turn requested an output schema, the finalized payload lands on `result.completed` as `data.result` before the turn boundary. `authorization.required` carries the sign-in challenge (`data.authorization` may include `url`, `userCode`, `expiresAt`, `instructions`), and `authorization.completed` carries `data.outcome` (`"authorized" | "declined" | "failed" | "timed-out"`). Both carry `data.principalId` when a session principal started the sign-in. It holds the same value as `responderPrincipalId` on approval events, so a channel can deliver the challenge privately to that person even after someone else starts a later turn.
135
135
 
136
136
  A provider response ending with `content-filter` fails with `MODEL_CALL_FAILED`,
137
137
  `details.semanticErrorId: "model-response-content-filtered"`, and
@@ -261,7 +261,7 @@ curl -X POST http://127.0.0.1:2000/eve/v1/session/<sessionId>/reset \
261
261
 
262
262
  Compaction summarizes context without adding a user message. User-role instructions are ordinary history and may be represented by the summary; system-role instructions remain outside it. Attributed [memory](../memory) records are excluded from the summary, canonicalized, and recalled again after the checkpoint. If a turn is active, eve queues the request until that turn settles. A successful compaction emits `compaction.requested` and `compaction.completed`, followed by `session.waiting`; if summarization fails before a checkpoint, the session returns to waiting with its previous history.
263
263
 
264
- Clear removes model-message history in place, including static and dynamic user-role instructions and recalled memory records, while preserving the session identity, system-role instructions, tools, skills, application-defined durable state, limits, and sandbox. It clears framework memory locks and replay bookkeeping but does not delete data from a provider's external store. It does not rerun instruction definitions or resolvers. It emits `context.cleared` followed by `session.waiting`.
264
+ Clear removes model-message history in place, including static and dynamic user-role instructions and recalled memory records, while preserving the session identity, system-role instructions, tools, skills, application-defined durable state, limits, and sandbox. It clears framework memory locks and replay bookkeeping but does not delete data from a provider's external store. It does not rerun instruction definitions or resolvers. Approvals, the session-limit prompt, and sign-ins the cleared history asked for are withdrawn: each resolves as `cancelled` in `input.resolved` or `declined` in `authorization.completed`. Requests relayed from tasks that keep running stay answerable. It then emits `context.cleared` followed by `session.waiting`.
265
265
 
266
266
  Reset terminally retires the exact session ID. A reset ID never becomes a new session; create another session explicitly for a fresh conversation. Compact, clear, and reset return `"no_active_session"` when the target is already inactive.
267
267
 
@@ -194,7 +194,7 @@ export default defineMcpClientConnection({
194
194
  });
195
195
  ```
196
196
 
197
- `never()` lets every call through, `once()` asks for approval the first time in a session, `always()` asks every time, and `auto()` uses an evaluation model to allow routine calls and ask about dangerous or unclear effects. The pause and resume is the same human-in-the-loop flow covered in [Tools](/docs/tools).
197
+ `never()` lets every call through, `once()` asks for approval the first time in a session, `always()` asks every time, and `auto()` uses a decision model to allow routine calls and ask about dangerous or unclear effects. The pause and resume is the same human-in-the-loop flow covered in [Tools](/docs/tools).
198
198
 
199
199
  For connection tools that can create, modify, delete, transmit, purchase, message, or access sensitive data, use approval, allow-lists, or other safeguards appropriate to the action.
200
200
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "title": "Dynamic Capabilities",
3
3
  "defaultOpen": false,
4
- "pages": ["../guides/dynamic-capabilities", "../guides/evaluate"]
4
+ "pages": ["../guides/dynamic-capabilities", "../guides/decide"]
5
5
  }
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  title: "Judge"
3
- description: "Grade evals with evaluation models using criteria, typed questions, or batches, and set thresholds on each assertion."
3
+ description: "Grade evals with decision models using criteria, typed questions, or batches, and set thresholds on each assertion."
4
4
  ---
5
5
 
6
- Use `t.judge(...)` when a deterministic [assertion](./assertions) cannot capture what a good response looks like. It calls [`evaluate` from `eve/ai`](../guides/evaluate#evaluate-inside-a-tool) and defaults to `typesafe-ai/jev`, TypeSafe AI's [Jev evaluation model](https://vercel.com/i/what-is-jev). The judge is separate from the agent under test and is used only for scoring.
6
+ Use `t.judge(...)` when a deterministic [assertion](./assertions) cannot capture what a good response looks like. It calls [`decide` from `eve/ai`](../guides/decide#decide-inside-a-tool) and defaults to `typesafe-ai/jev`, TypeSafe AI's [Jev decision model](https://vercel.com/i/what-is-jev). The judge is separate from the agent under test and is used only for scoring.
7
7
 
8
8
  ```ts
9
9
  import { defineEval } from "eve/evals";
@@ -17,7 +17,7 @@ export default defineEval({
17
17
  });
18
18
  ```
19
19
 
20
- No judge configuration is required. Configure credentials for the evaluator as described under [Configuring the judge model](#configuring-the-judge-model).
20
+ No judge configuration is required. Configure credentials for the decider as described under [Configuring the judge model](#configuring-the-judge-model).
21
21
 
22
22
  ## The graders
23
23
 
@@ -41,11 +41,11 @@ t.judge({
41
41
  .atLeast(0.75);
42
42
  ```
43
43
 
44
- Choice questions require an `expected` option key. eve uses that expectation locally for scoring; it does not send it to the evaluator. Instructions and rubric descriptions accept strings, JSON objects, or JSON arrays. Descriptions can also be `null`.
44
+ Choice questions require an `expected` option key. eve uses that expectation locally for scoring; it does not send it to the decider. Instructions and rubric descriptions accept strings, JSON objects, or JSON arrays. Descriptions can also be `null`.
45
45
 
46
46
  ## Choose the value to grade
47
47
 
48
- By default, the evaluator receives `{ input, output }`: the latest prompt and assistant message from the session whose turn most recently settled. Approval responses and stream reads preserve that prompt. For multipart messages, including `session.sendFile()`, the prompt contains the text parts.
48
+ By default, the decider receives `{ input, output }`: the latest prompt and assistant message from the session whose turn most recently settled. Approval responses and stream reads preserve that prompt. For multipart messages, including `session.sendFile()`, the prompt contains the text parts.
49
49
 
50
50
  Pass `on` to replace the output. JSON values stay structured rather than being converted to strings:
51
51
 
@@ -66,9 +66,9 @@ t.judge("The assistant remembers the user's favorite word across turns.", {
66
66
 
67
67
  The transcript contains user and assistant messages in turn order, excluding reasoning, tool calls, and tool results. See [Multi-turn evals](./cases#multi-turn-evals).
68
68
 
69
- ## Evaluate several questions together
69
+ ## Decide several questions together
70
70
 
71
- A batch makes one evaluation request against one shared state. Pass `state` to replace the default `{ input, output }` completely. Batch calls use `state` instead of `on`.
71
+ A batch makes one decision request against one shared state. Pass `state` to replace the default `{ input, output }` completely. Batch calls use `state` instead of `on`.
72
72
 
73
73
  ```ts
74
74
  const judgments = t.judge({
@@ -120,9 +120,9 @@ Model settings resolve in this order:
120
120
  1. Per-call: `t.judge("…", { model, modelOptions })`.
121
121
  2. Per-eval: `defineEval({ judge: { model, modelOptions }, test })`.
122
122
  3. Project default: `defineEvalConfig({ judge: { model, modelOptions } })`.
123
- 4. The default model used by `evaluate`, currently `typesafe-ai/jev`.
123
+ 4. The default model used by `decide`, currently `typesafe-ai/jev`.
124
124
 
125
- A per-eval `judge` replaces the project's judge configuration. Per-call fields override the resolved configuration. `judge` and its `model` are optional; deterministic evals make no evaluation requests.
125
+ A per-eval `judge` replaces the project's judge configuration. Per-call fields override the resolved configuration. `judge` and its `model` are optional; deterministic evals make no decision requests.
126
126
 
127
127
  ```ts title="evals/evals.config.ts"
128
128
  import { defineEvalConfig } from "eve/evals";
@@ -132,30 +132,30 @@ export default defineEvalConfig({
132
132
  });
133
133
  ```
134
134
 
135
- String IDs resolve through the AI SDK default provider, or Vercel AI Gateway when none is configured. Gateway uses `AI_GATEWAY_API_KEY` or Vercel OIDC credentials; eve's existing local Gateway connection is also honored by `evaluate`. An explicit provider evaluation model uses that provider's credentials:
135
+ String IDs resolve through the AI SDK default provider, or Vercel AI Gateway when none is configured. Gateway uses `AI_GATEWAY_API_KEY` or Vercel OIDC credentials; eve's existing local Gateway connection is also honored by `decide`. An explicit provider decision model uses that provider's credentials:
136
136
 
137
137
  ```ts
138
138
  import { openai } from "@ai-sdk/openai";
139
139
 
140
140
  t.judge("The response addresses the request.", {
141
- model: openai.evaluationModel("gpt-6-luna"),
141
+ model: openai.decisionModel("gpt-6-luna"),
142
142
  modelOptions: { providerOptions: { openai: { reasoningEffort: "high" } } },
143
143
  });
144
144
  ```
145
145
 
146
- Use the provider's `evaluationModel` factory, not a language model instance. AI SDK supplies evaluation adapters for supported language models. Provider support and the evaluation contract are experimental; see [AI SDK evaluation](https://ai-sdk.dev/docs/ai-sdk-core/evaluation).
146
+ Use the provider's `decisionModel` factory, not a language model instance. AI SDK supplies decision adapters for supported language models. Provider support and the decision contract are experimental; see [AI SDK decision](https://ai-sdk.dev/docs/ai-sdk-core/decisions).
147
147
 
148
- String model IDs resolve through the default provider's evaluation API. Gateway accepts native evaluation models such as `typesafe-ai/jev`; passing a language model ID such as `openai/gpt-6-luna` does not automatically select the OpenAI adapter. Use an evaluation-model instance as shown above for language models.
148
+ String model IDs resolve through the default provider's decision API. Gateway accepts native decision models such as `typesafe-ai/jev`; passing a language model ID such as `openai/gpt-6-luna` does not automatically select the OpenAI adapter. Use a decision-model instance as shown above for language models.
149
149
 
150
- Missing credentials, invalid answers, unsupported question types, and provider errors become failed gates even for tracked-only judgments. They do not silently skip the eval or select another model. Validation, authentication, and retries use the shared `evaluate` implementation.
150
+ Missing credentials, invalid answers, unsupported question types, and provider errors become failed gates even for tracked-only judgments. They do not silently skip the eval or select another model. Validation, authentication, and retries use the shared `decide` implementation.
151
151
 
152
152
  ## Diagnostics and migration
153
153
 
154
- Reports use `judge.boolean`, `judge.score`, and `judge.choice`; batch assertion names also include their question key. Diagnostics include the captured state, question, and raw answer. Assertion metadata retains the normalized score, model identity, token usage, warnings, and available provider and response metadata. Usage for a batch is marked as shared across its assertions, not a separate charge for each question. Evaluation models do not promise a prose rationale.
154
+ Reports use `judge.boolean`, `judge.score`, and `judge.choice`; batch assertion names also include their question key. Diagnostics include the captured state, question, and raw answer. Assertion metadata retains the normalized score, model identity, token usage, warnings, and available provider and response metadata. Usage for a batch is marked as shared across its assertions, not a separate charge for each question. Decision models do not promise a prose rationale.
155
155
 
156
156
  The autoevals graders have been removed. Replace `t.judge.autoevals.closedQA(criteria, options)` with `t.judge(criteria, options)`. Scores now represent a probability rather than a binary yes/no answer, so review thresholds against your examples. For factuality, summaries, or SQL equivalence, write an explicit question and include the reference in shared state. No old grader buckets are preserved.
157
157
 
158
- Change configured language model instances to evaluation model instances. `modelOptions.providerOptions`, assertion labels, and threshold methods remain available. [Braintrust reporting](./reporters) continues to accept judge scores independently of the grader implementation.
158
+ Change configured language model instances to decision model instances. `modelOptions.providerOptions`, assertion labels, and threshold methods remain available. [Braintrust reporting](./reporters) continues to accept judge scores independently of the grader implementation.
159
159
 
160
160
  ## What to read next
161
161
 
@@ -56,7 +56,7 @@ export default defineEvalConfig({
56
56
  });
57
57
  ```
58
58
 
59
- Everything is optional. `judge` sets the default model for [LLM-as-judge](./judge) assertions (`t.judge(...)`); omit it to use the default evaluator, `typesafe-ai/jev`. Deterministic evals make no judge requests. `reporters`, `maxConcurrency`, and `timeoutMs` round out the defaults. Config `reporters` observe every eval in the run, so set one `Braintrust()` here instead of adding it to each eval. CLI flags (`--max-concurrency`, `--timeout`) and per-eval values take precedence over the config defaults.
59
+ Everything is optional. `judge` sets the default model for [LLM-as-judge](./judge) assertions (`t.judge(...)`); omit it to use the default decider, `typesafe-ai/jev`. Deterministic evals make no judge requests. `reporters`, `maxConcurrency`, and `timeoutMs` round out the defaults. Config `reporters` observe every eval in the run, so set one `Braintrust()` here instead of adding it to each eval. CLI flags (`--max-concurrency`, `--timeout`) and per-eval values take precedence over the config defaults.
60
60
 
61
61
  ### Run setup and teardown
62
62
 
@@ -1,21 +1,21 @@
1
1
  ---
2
2
  title: Automatic Model Selection
3
- description: "Choose agent models automatically or evaluate typed questions in your tools and application code."
3
+ description: "Choose agent models automatically or ask typed questions in your tools and application code."
4
4
  ---
5
5
 
6
6
  Use `auto` from `eve/models` to choose an agent model from an allowlist before
7
- inference begins. It uses the [AI SDK evaluation API](https://ai-sdk.dev/docs/ai-sdk-core/evaluation),
8
- so the evaluator can be a Vercel AI Gateway model ID or an evaluation model from
9
- an installed provider. Use `evaluate` from `eve/ai` to ask typed questions in
7
+ inference begins. It uses the [AI SDK decision API](https://ai-sdk.dev/docs/ai-sdk-core/decisions),
8
+ so the decider can be a Vercel AI Gateway model ID or a decision model from
9
+ an installed provider. Use `decide` from `eve/ai` to ask typed questions in
10
10
  your own tools or application code.
11
11
 
12
- The AI SDK evaluation model specification is experimental and can change in
12
+ The AI SDK decision model specification is experimental and can change in
13
13
  patch releases.
14
14
 
15
15
  ## Choose from Gateway models
16
16
 
17
- By default, `auto` evaluates with `typesafe-ai/jev`, TypeSafe AI's
18
- [Jev evaluation model](https://vercel.com/i/what-is-jev). Like other AI SDK
17
+ By default, `auto` decides with `typesafe-ai/jev`, TypeSafe AI's
18
+ [Jev decision model](https://vercel.com/i/what-is-jev). Like other AI SDK
19
19
  model strings, it uses Vercel AI Gateway unless the application has configured a
20
20
  different global default provider.
21
21
 
@@ -35,13 +35,13 @@ export default defineAgent({
35
35
 
36
36
  Configure Gateway authentication as you would for any other AI SDK model. eve
37
37
  does not add a TypeSafe credential or transport layer. During `eve dev`, a
38
- Gateway evaluator uses the same connection selected through `/login` as Gateway
38
+ Gateway decider uses the same connection selected through `/login` as Gateway
39
39
  language models. A configured AI SDK default provider still owns string model
40
40
  resolution during development. The TUI footer displays `dynamic model` when the
41
41
  agent uses `auto`, then adds the resolved model for the current turn, such as
42
42
  `dynamic model · openai/gpt-6-luna`.
43
43
 
44
- Set `fallback` to keep the turn running when the evaluator is unavailable or
44
+ Set `fallback` to keep the turn running when the decider is unavailable or
45
45
  returns an error. The fallback can be a Gateway model ID, an AI SDK language
46
46
  model instance, or an object with `model` and a `reasoning` override:
47
47
 
@@ -60,15 +60,15 @@ export default defineAgent({
60
60
  });
61
61
  ```
62
62
 
63
- The fallback applies only to evaluator failures. eve logs a warning with the
64
- evaluator error and fallback identity when it switches models. Invalid prompts,
63
+ The fallback applies only to decider failures. eve logs a warning with the
64
+ decider error and fallback identity when it switches models. Invalid prompts,
65
65
  including requests without user text or with a latest message over the routing
66
- limit, still fail before evaluator I/O. Cancelling the turn also aborts routing
66
+ limit, still fail before decider I/O. Cancelling the turn also aborts routing
67
67
  instead of selecting the fallback.
68
68
 
69
69
  ## Use a provider directly
70
70
 
71
- Install the provider package yourself and pass its evaluation model. The provider
71
+ Install the provider package yourself and pass its decision model. The provider
72
72
  owns its credentials and settings.
73
73
 
74
74
  ```sh
@@ -82,7 +82,7 @@ import { auto } from "eve/models";
82
82
 
83
83
  export default defineAgent({
84
84
  model: auto({
85
- model: typeSafeAi.evaluationModel("jev-latest"),
85
+ model: typeSafeAi.decisionModel("jev-latest"),
86
86
  options: {
87
87
  "openai/gpt-6-sol": "Difficult reasoning and engineering tasks",
88
88
  "openai/gpt-6-luna": "Routine tasks where fast completion matters",
@@ -91,12 +91,12 @@ export default defineAgent({
91
91
  });
92
92
  ```
93
93
 
94
- Any provider that implements the AI SDK `Experimental_EvaluationModel` contract
94
+ Any provider that implements the AI SDK `Experimental_DecisionModel` contract
95
95
  works here.
96
96
 
97
97
  ## Route to provider models and set reasoning
98
98
 
99
- An option's key is the value shown to the evaluator. A string value describes a
99
+ An option's key is the value shown to the decider. A string value describes a
100
100
  Gateway model whose ID is the key. Use the object form when the selected model is
101
101
  a provider instance, an alias, or needs a reasoning override.
102
102
 
@@ -120,7 +120,7 @@ export default defineAgent({
120
120
  });
121
121
  ```
122
122
 
123
- The evaluator sees option keys, descriptions, and recent text messages. It never
123
+ The decider sees option keys, descriptions, and recent text messages. It never
124
124
  receives provider credentials or serialized language model instances. When it
125
125
  selects `my_secret_model`, eve resolves the key back to the authored Anthropic
126
126
  model.
@@ -129,16 +129,16 @@ Supported reasoning values are `"provider-default"`, `"none"`, `"minimal"`,
129
129
  `"low"`, `"medium"`, `"high"`, and `"xhigh"`. An omitted value inherits the
130
130
  agent's reasoning setting.
131
131
 
132
- ## Evaluate inside a tool
132
+ ## Decide inside a tool
133
133
 
134
- Use `evaluate` to ask choice, score, or boolean questions about the state you pass to it.
134
+ Use `decide` to ask choice, score, or boolean questions about the state you pass to it.
135
135
  It defaults to `typesafe-ai/jev` and uses the same authentication as `auto`,
136
136
  including the Gateway connection selected through `/login` during `eve dev`.
137
- Pass `model` to use another evaluation model ID or a provider instance. A configured
137
+ Pass `model` to use another decision model ID or a provider instance. A configured
138
138
  AI SDK default provider takes precedence over the local Gateway connection.
139
139
 
140
140
  ```ts title="agent/tools/classify-request.ts"
141
- import { evaluate } from "eve/ai";
141
+ import { decide } from "eve/ai";
142
142
  import { defineTool } from "eve/tools";
143
143
  import { z } from "zod";
144
144
 
@@ -146,7 +146,7 @@ export default defineTool({
146
146
  description: "Choose the team that can help with a customer request.",
147
147
  inputSchema: z.object({ request: z.string().min(1).max(8000) }),
148
148
  async execute({ request }, ctx) {
149
- const result = await evaluate({
149
+ const result = await decide({
150
150
  state: { request },
151
151
  questions: {
152
152
  team: {
@@ -169,23 +169,23 @@ The choice above is typed as `"billing" | "support"`. Each question appears unde
169
169
  its authored key in `result.answers`. Results also include token usage, warnings,
170
170
  provider metadata, and response metadata. To use that choice to delegate while keeping specialist subagents out of the parent model's tools, see [Route to a hidden subagent with Jev](/docs/tools/workflows#route-to-a-hidden-subagent-with-jev).
171
171
 
172
- `evaluate` accepts AI SDK evaluation options, including `maxRetries`, `headers`,
172
+ `decide` accepts AI SDK decision options, including `maxRetries`, `headers`,
173
173
  and `providerOptions`. Pass an `abortSignal` to cancel the request. Input and
174
174
  answer validation, retries, and provider errors follow AI SDK semantics.
175
175
 
176
- You can also call `evaluate` outside a tool; it does not require an active eve
177
- session. Each call performs its own evaluation. `auto` uses this function
176
+ You can also call `decide` outside a tool; it does not require an active eve
177
+ session. Each call performs its own decision. `auto` uses this function
178
178
  and adds the per-turn routing behavior described below.
179
179
 
180
180
  ## Judge eval results
181
181
 
182
- Eval authors can use `t.judge(...)` to turn evaluation answers into scored assertions, including batches of questions sharing one state. It uses this same `evaluate` implementation and default model. See [Judge](../evals/judge) for criteria, rubrics, and thresholds.
182
+ Eval authors can use `t.judge(...)` to turn decision answers into scored assertions, including batches of questions sharing one state. It uses this same `decide` implementation and default model. See [Judge](../evals/judge) for criteria, rubrics, and thresholds.
183
183
 
184
- ## Evaluate tool approvals
184
+ ## Decide tool approvals
185
185
 
186
- Use `auto({ model? })` when an evaluation model should decide whether a
186
+ Use `auto({ model? })` when a decision model should decide whether a
187
187
  tool call can run automatically or needs human approval. It accepts the same
188
- AI SDK evaluation model strings and provider instances described above and
188
+ AI SDK decision model strings and provider instances described above and
189
189
  defaults to `typesafe-ai/jev`:
190
190
 
191
191
  ```ts title="agent/tools/deploy.ts"
@@ -201,7 +201,7 @@ export default defineTool({
201
201
  });
202
202
  ```
203
203
 
204
- The evaluation model reviews the tool name and input for dangerous effects. A
204
+ The decision model reviews the tool name and input for dangerous effects. A
205
205
  caution, failed review, or incomplete input requires human approval. See
206
206
  [Human-in-the-loop approvals](/docs/human-in-the-loop#approvals) for classifier
207
207
  options and data handling, and the
@@ -210,17 +210,17 @@ guide for an end-to-end walkthrough.
210
210
 
211
211
  ## Runtime behavior
212
212
 
213
- `auto` evaluates at the first `step.started` event, after the incoming prompt
213
+ `auto` decides at the first `step.started` event, after the incoming prompt
214
214
  is available and before the selected language model runs. It reuses that choice
215
215
  for later tool-loop steps in the same turn. A new turn makes a new choice, and
216
216
  child sessions route from their own prompts.
217
217
 
218
- The evaluator receives up to eight recent user and assistant text messages,
218
+ The decider receives up to eight recent user and assistant text messages,
219
219
  capped at 16,000 characters. Requests without user text and latest messages over
220
220
  the limit fail before provider I/O.
221
221
 
222
- Evaluation validation, retries, provider errors, and model resolution follow AI
223
- SDK semantics. Without `fallback`, an evaluator error fails the turn. With
222
+ Decision validation, retries, provider errors, and model resolution follow AI
223
+ SDK semantics. Without `fallback`, a decider error fails the turn. With
224
224
  `fallback`, eve uses and retains that model for the rest of the turn. Cancelling
225
- the active turn aborts evaluation and prevents a routed or fallback choice from
225
+ the active turn aborts decision and prevents a routed or fallback choice from
226
226
  being retained.
@@ -362,7 +362,7 @@ A dynamic connection, tool, or skill whose name matches an **authored** one **ov
362
362
 
363
363
  At `turn.started`, model, tool, skill, and subagent resolvers receive the visible conversation history and incoming message in `ctx.messages`, oldest first. Request context is included, and history projection still applies. Read these messages from the handler's second argument; the event itself contains turn metadata. Instruction resolvers use the separate snapshot described under [Dynamic instructions](#dynamic-instructions).
364
364
 
365
- A message that steers a held turn, or waits behind its session-limit prompt, joins that turn instead of starting one, as does a completed sign-in, so `turn.started` resolvers do not see it; `step.started` resolvers do. When memory recall runs, its results appear in the projected snapshot before incoming input.
365
+ A message that steers a held turn joins it without another `turn.started`, as does a completed sign-in, so `turn.started` resolvers do not see it; `step.started` resolvers do. A message sent while a session-limit prompt waits starts its own turn, so `turn.started` resolvers see it, and that turn waits for the prompt's answer before the model runs. When memory recall runs, its results appear in the projected snapshot before incoming input.
366
366
 
367
367
  ### Execution order
368
368
 
@@ -174,7 +174,9 @@ supplied `session` remains externally owned and is never replaced by prewarming
174
174
 
175
175
  Common text, reasoning, file, and dynamic-tool parts follow the [AI SDK `UIMessage`](https://ai-sdk.dev/docs/reference/ai-sdk-core/ui-message) rendering convention, but the types are not interchangeable. eve also exposes authorization and HITL metadata, and a file part's URL can be absent. Adapt those parts before passing messages to an API typed as `UIMessage[]`.
176
176
 
177
- When the root agent delegates, its stream emits `task.started` for the call, `agent.started` with the child's `sessionId`, and `task.settled` with the call's result, failure, or cancellation. The default reducer settles the subagent's tool part from `task.settled`, so the part shows the call's outcome rather than its start receipt. `data.tasks[taskId].calls[callId]` records each call's `status`, `output`, and `error`, and `data.agents[sessionId]` records each session a call opened, with its `taskId` and opening `callId`. These records come from the root stream alone.
177
+ A tool part's `state` comes from the shared lifecycle interpretation of the event stream. Its events supply input, output, and error text. A call waiting on an approval or a question reads `approval-requested` until the stream settles the request. An answer you submit doesn't change the part until then. `toolCallState(conversation, callId)` reads tool-call status, including task cancellation and calls interrupted without a result. The full event projection remains internal; `ConversationState` retains its messages, turns, inputs, tasks, and agent sessions.
178
+
179
+ When the root agent delegates, its stream emits `task.started` for the call, `agent.started` with the child's `sessionId`, and `task.settled` with the call's result, failure, or cancellation. The default reducer keeps the subagent's tool part running until `task.settled` arrives and then settles it with the call's outcome; the start receipt never settles it. `data.tasks[taskId].calls[callId]` records each call's `status`, `output`, and `error`, and `data.agents[sessionId]` records each session a call opened, with its `taskId` and opening `callId`. These records come from the root stream alone.
178
180
 
179
181
  Detailed child progress lives on the child session's stream, not in the root `data.messages`. Pass `followSubagents: true` to follow the session each subagent call reaches while the component is mounted; following is off by default. Narrow `data.agents[sessionId].observation.status` before reading its `conversation`: `"not-followed"` has no child detail, `"following"` has live detail, and `"idle"` has everything the calls so far produced and resumes when another call reaches the task. `"unavailable"` means the stream failed, not that the child failed. Calls that continue a task with its `taskId` reach the same session, so one session's `conversation.messages`, `inputs`, and `turns` span all of them. Sessions that a custom task opens with `ctx.agent` are recorded but not followed.
180
182
 
@@ -227,7 +227,7 @@ The remaining subscribers for the event still run. Then eve cancels the turn the
227
227
 
228
228
  Subagents may carry their own `agent/hooks/` directory. Subagent hooks fire only inside the subagent scope. Parent-agent hooks do not fire for subagent turns, and subagent hooks see only the subagent's own context.
229
229
 
230
- Interactive events such as `input.requested` and `authorization.required` are also published on the parent stream. Parent hooks observe these events after the parent channel handler and stream write, with the parent's session, agent, and channel context. The event retains the child's turn coordinates, so `event.data.turnId` can differ from `ctx.session.turn.id`. The parent follows a proxied `input.requested` or `authorization.required` with `turn.waiting` for its own open turn, which stays open until the running call finishes. A proxied `authorization.completed` is not followed by a parent turn event. These parent events also invoke parent hooks; they do not resolve pending input requests.
230
+ Interactive events such as `input.requested` and `authorization.required` are also published on the parent stream. Parent hooks observe these events after the parent channel handler and stream write, with the parent's session, agent, and channel context. The event retains the child's turn coordinates, so `event.data.turnId` can differ from `ctx.session.turn.id`. A proxied `input.requested` also carries `event.data.callId`, the parent call that waits on it. The parent follows a proxied `input.requested` or `authorization.required` with `turn.waiting` for its own open turn, which stays open until the running call finishes. A proxied `authorization.completed` is not followed by a parent turn event. These parent events also invoke parent hooks; they do not resolve pending input requests.
231
231
 
232
232
  ## Hook vs tool vs provider
233
233