eve 0.71.3 → 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 (436) hide show
  1. package/CHANGELOG.md +30 -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/chunks/{use-eve-agent-CFCaYnrI.js → use-eve-agent-C1GYGCtb.js} +698 -388
  7. package/dist/src/chunks/{use-eve-agent-DcDhXNv1.js → use-eve-agent-hZJ7CB8t.js} +698 -388
  8. package/dist/src/cli/commands/integration-setup.js +1 -1
  9. package/dist/src/cli/commands/registry.js +1 -1
  10. package/dist/src/cli/commands/trace-detail.d.ts +1 -1
  11. package/dist/src/cli/commands/trace-detail.js +1 -1
  12. package/dist/src/cli/dev/tui/runner.js +1 -1
  13. package/dist/src/cli/dev/tui/setup-flow.d.ts +1 -0
  14. package/dist/src/cli/dev/tui/setup-panel.d.ts +1 -0
  15. package/dist/src/cli/dev/tui/setup-panel.js +2 -1
  16. package/dist/src/cli/dev/tui/traces/trace-conversation.d.ts +2 -2
  17. package/dist/src/cli/dev/tui/traces/trace-conversation.js +2 -2
  18. package/dist/src/cli/dev/tui/transcript-parts.d.ts +2 -1
  19. package/dist/src/cli/dev/tui/transcript-parts.js +1 -1
  20. package/dist/src/cli/dev/tui/transcript.js +1 -1
  21. package/dist/src/cli/dev/tui/tui-prompter.js +1 -1
  22. package/dist/src/client/conversation-projection.d.ts +4 -0
  23. package/dist/src/client/conversation-projection.js +1 -0
  24. package/dist/src/client/conversation-reducer.js +1 -1
  25. package/dist/src/client/conversation-state.d.ts +5 -26
  26. package/dist/src/client/conversation-state.js +1 -1
  27. package/dist/src/client/index.d.ts +1 -0
  28. package/dist/src/client/index.js +1 -1
  29. package/dist/src/client/message-action-parts.d.ts +1 -11
  30. package/dist/src/client/message-action-parts.js +1 -1
  31. package/dist/src/client/message-reducer.d.ts +3 -1
  32. package/dist/src/client/message-reducer.js +1 -1
  33. package/dist/src/client/session-utils.js +1 -1
  34. package/dist/src/client/session.js +1 -1
  35. package/dist/src/client/tool-call-state.d.ts +23 -0
  36. package/dist/src/client/tool-call-state.js +1 -0
  37. package/dist/src/client/tool-part-state.d.ts +7 -0
  38. package/dist/src/client/tool-part-state.js +1 -0
  39. package/dist/src/compiled/.vendor-stamp.json +10 -10
  40. package/dist/src/compiled/@ai-sdk/anthropic/index.d.ts +1453 -1358
  41. package/dist/src/compiled/@ai-sdk/anthropic/index.js +1 -2
  42. package/dist/src/compiled/@ai-sdk/code-mode/index.d.ts +172 -163
  43. package/dist/src/compiled/@ai-sdk/code-mode/index.js +15 -20
  44. package/dist/src/compiled/@ai-sdk/google/index.d.ts +772 -733
  45. package/dist/src/compiled/@ai-sdk/google/index.js +6 -8
  46. package/dist/src/compiled/@ai-sdk/mcp/index.d.ts +887 -790
  47. package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -1
  48. package/dist/src/compiled/@ai-sdk/openai/index.d.ts +1722 -1691
  49. package/dist/src/compiled/@ai-sdk/openai/index.js +3 -14
  50. package/dist/src/compiled/@ai-sdk/otel/index.d.ts +216 -159
  51. package/dist/src/compiled/@ai-sdk/otel/index.js +3 -3
  52. package/dist/src/compiled/@ai-sdk/provider/index.d.ts +7542 -7271
  53. package/dist/src/compiled/@ai-sdk/provider/index.js +1 -3
  54. package/dist/src/compiled/@ai-sdk/provider-utils/index.d.ts +1799 -1600
  55. package/dist/src/compiled/@eve/catalog/index.js +1 -1
  56. package/dist/src/compiled/_chunks/workflow/dist-DXLdlucM.js +15 -0
  57. package/dist/src/compiled/_chunks/workflow/experimental-decision-BrfWf6-n.js +3 -0
  58. package/dist/src/compiler/extension-compatibility.d.ts +36 -20
  59. package/dist/src/compiler/extension-compatibility.js +1 -1
  60. package/dist/src/compiler/manifest.js +1 -1
  61. package/dist/src/context/build-dynamic-tools.js +1 -1
  62. package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
  63. package/dist/src/context/dynamic-tool-metadata.d.ts +1 -0
  64. package/dist/src/context/providers/session.js +1 -1
  65. package/dist/src/evals/define-eval.d.ts +1 -1
  66. package/dist/src/evals/judge.d.ts +1 -1
  67. package/dist/src/evals/judge.js +2 -2
  68. package/dist/src/evals/types.d.ts +8 -8
  69. package/dist/src/execution/cancel-descendant-turns-step.d.ts +1 -0
  70. package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
  71. package/dist/src/execution/cancelled-model-call-batch.js +1 -1
  72. package/dist/src/execution/coordination-dispatch-shared.js +1 -1
  73. package/dist/src/execution/coordination-dispatch-step.js +1 -1
  74. package/dist/src/execution/durable-session-read.d.ts +5 -0
  75. package/dist/src/execution/durable-session-read.js +1 -0
  76. package/dist/src/execution/durable-session-store.d.ts +4 -10
  77. package/dist/src/execution/durable-session-store.js +1 -1
  78. package/dist/src/execution/dynamic-connections.d.ts +3 -3
  79. package/dist/src/execution/dynamic-connections.js +1 -1
  80. package/dist/src/execution/dynamic-workflow/tool.js +1 -1
  81. package/dist/src/execution/legacy-session/interrupt-step.js +1 -1
  82. package/dist/src/execution/legacy-session/snapshot.d.ts +3 -0
  83. package/dist/src/execution/legacy-session/snapshot.js +1 -1
  84. package/dist/src/execution/model-call-batching.js +1 -1
  85. package/dist/src/execution/node-step.d.ts +2 -0
  86. package/dist/src/execution/node-step.js +1 -1
  87. package/dist/src/execution/proxied-deliver-step.js +1 -1
  88. package/dist/src/execution/publish-session-events.d.ts +7 -2
  89. package/dist/src/execution/publish-session-events.js +1 -1
  90. package/dist/src/execution/session/active-turn.js +1 -1
  91. package/dist/src/execution/session/answer-caller.js +1 -1
  92. package/dist/src/execution/session/checkpoint-migrations.js +1 -1
  93. package/dist/src/execution/session/finalization.js +1 -1
  94. package/dist/src/execution/session/handoff-steps.d.ts +3 -1
  95. package/dist/src/execution/session/handoff-steps.js +1 -1
  96. package/dist/src/execution/session/handoff.d.ts +1 -1
  97. package/dist/src/execution/session/handoff.js +1 -1
  98. package/dist/src/execution/session/pending-turn-state.d.ts +8 -3
  99. package/dist/src/execution/session/pending-turn-state.js +1 -1
  100. package/dist/src/execution/session/task-tool-tracing-step.d.ts +5 -0
  101. package/dist/src/execution/session/task-tool-tracing-step.js +1 -0
  102. package/dist/src/execution/session/turn-step-result.js +1 -1
  103. package/dist/src/execution/session/turn-step.js +1 -1
  104. package/dist/src/execution/session/turn-waiting-step.js +1 -1
  105. package/dist/src/execution/session/turn.d.ts +1 -0
  106. package/dist/src/execution/session/turn.js +1 -1
  107. package/dist/src/execution/settle-cancelled-turn-step.d.ts +4 -6
  108. package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
  109. package/dist/src/execution/tasks/start.d.ts +3 -3
  110. package/dist/src/execution/tasks/start.js +1 -1
  111. package/dist/src/execution/tasks/steps.d.ts +1 -1
  112. package/dist/src/execution/tasks/steps.js +1 -1
  113. package/dist/src/execution/terminal-session-completion-step.d.ts +5 -1
  114. package/dist/src/execution/terminal-session-completion-step.js +1 -1
  115. package/dist/src/execution/terminal-session-failure-step.js +1 -1
  116. package/dist/src/execution/tools/agent-router-workflow.js +1 -1
  117. package/dist/src/execution/tools/connection-tools.js +1 -1
  118. package/dist/src/execution/tools/workflow/harness-definition.js +1 -1
  119. package/dist/src/execution/tools/workflow/step.js +1 -1
  120. package/dist/src/execution/tools/workflow/withdraw-step.d.ts +7 -9
  121. package/dist/src/execution/tools/workflow/withdraw-step.js +1 -1
  122. package/dist/src/execution/workflow-trace-context.d.ts +2 -2
  123. package/dist/src/harness/authorization.d.ts +4 -2
  124. package/dist/src/harness/authorization.js +1 -1
  125. package/dist/src/harness/{compaction.js → compaction/engine.js} +1 -1
  126. package/dist/src/harness/compaction/step.d.ts +46 -0
  127. package/dist/src/harness/compaction/step.js +1 -0
  128. package/dist/src/harness/coordination.d.ts +32 -68
  129. package/dist/src/harness/coordination.js +1 -1
  130. package/dist/src/harness/current-messages.d.ts +1 -3
  131. package/dist/src/harness/current-messages.js +1 -1
  132. package/dist/src/harness/emission.d.ts +4 -52
  133. package/dist/src/harness/emission.js +1 -1
  134. package/dist/src/harness/execute-tool.d.ts +1 -0
  135. package/dist/src/harness/final-output.d.ts +5 -0
  136. package/dist/src/harness/final-output.js +1 -1
  137. package/dist/src/harness/hitl/approvals.d.ts +115 -0
  138. package/dist/src/harness/hitl/approvals.js +1 -0
  139. package/dist/src/harness/hitl/approved-call-callers.d.ts +14 -0
  140. package/dist/src/harness/hitl/approved-call-callers.js +1 -0
  141. package/dist/src/harness/hitl/approved-calls.d.ts +37 -0
  142. package/dist/src/harness/hitl/approved-calls.js +1 -0
  143. package/dist/src/harness/hitl/budget.d.ts +21 -0
  144. package/dist/src/harness/hitl/budget.js +1 -0
  145. package/dist/src/harness/{approval-candidates.d.ts → hitl/candidates.d.ts} +9 -18
  146. package/dist/src/harness/hitl/candidates.js +1 -0
  147. package/dist/src/harness/hitl/coordinator.js +1 -0
  148. package/dist/src/harness/hitl/delivery.d.ts +37 -0
  149. package/dist/src/harness/hitl/delivery.js +1 -0
  150. package/dist/src/harness/hitl/index.d.ts +49 -0
  151. package/dist/src/harness/hitl/index.js +1 -0
  152. package/dist/src/harness/hitl/intake.d.ts +67 -0
  153. package/dist/src/harness/hitl/intake.js +1 -0
  154. package/dist/src/harness/{stale-input-responses.d.ts → hitl/stale-responses.d.ts} +5 -3
  155. package/dist/src/harness/hitl/stale-responses.js +3 -0
  156. package/dist/src/harness/inline-tool-authorization.d.ts +4 -0
  157. package/dist/src/harness/inline-tool-authorization.js +1 -1
  158. package/dist/src/harness/input-extraction.d.ts +1 -10
  159. package/dist/src/harness/input-extraction.js +1 -1
  160. package/dist/src/harness/input-request-resolution.d.ts +1 -5
  161. package/dist/src/harness/input-request-resolution.js +1 -1
  162. package/dist/src/harness/model-call/call.d.ts +78 -0
  163. package/dist/src/harness/model-call/call.js +1 -0
  164. package/dist/src/harness/{model-call-error.d.ts → model-call/errors.d.ts} +1 -1
  165. package/dist/src/harness/model-call/failure.d.ts +52 -0
  166. package/dist/src/harness/model-call/failure.js +1 -0
  167. package/dist/src/harness/model-call/model.d.ts +18 -0
  168. package/dist/src/harness/model-call/model.js +1 -0
  169. package/dist/src/harness/model-call/recovery.d.ts +52 -0
  170. package/dist/src/harness/model-call/recovery.js +1 -0
  171. package/dist/src/harness/model-call/request.d.ts +30 -0
  172. package/dist/src/harness/model-call/request.js +3 -0
  173. package/dist/src/harness/model-call/response.d.ts +39 -0
  174. package/dist/src/harness/model-call/response.js +1 -0
  175. package/dist/src/harness/model-call/retry.d.ts +11 -0
  176. package/dist/src/harness/model-call/retry.js +1 -0
  177. package/dist/src/harness/model-call/run.d.ts +38 -0
  178. package/dist/src/harness/model-call/run.js +1 -0
  179. package/dist/src/harness/model-call/tools.d.ts +48 -0
  180. package/dist/src/harness/model-call/tools.js +1 -0
  181. package/dist/src/harness/model-call/usage.d.ts +23 -0
  182. package/dist/src/harness/model-call/usage.js +1 -0
  183. package/dist/src/harness/nested-actions.d.ts +2 -2
  184. package/dist/src/harness/provider-tools.d.ts +2 -2
  185. package/dist/src/harness/provider-tools.js +1 -1
  186. package/dist/src/harness/proxy-input-requests.d.ts +4 -12
  187. package/dist/src/harness/proxy-input-requests.js +1 -1
  188. package/dist/src/harness/session-machine/commit.d.ts +28 -0
  189. package/dist/src/harness/session-machine/commit.js +1 -0
  190. package/dist/src/harness/session-machine/current.d.ts +29 -0
  191. package/dist/src/harness/session-machine/current.js +1 -0
  192. package/dist/src/harness/session-machine/events.d.ts +6 -0
  193. package/dist/src/harness/session-machine/events.js +1 -0
  194. package/dist/src/harness/session-machine/resolver-events.d.ts +12 -0
  195. package/dist/src/harness/session-machine/resolver-events.js +1 -0
  196. package/dist/src/harness/session-machine/state.d.ts +47 -0
  197. package/dist/src/harness/session-machine/state.js +1 -0
  198. package/dist/src/harness/session-machine/transitions.d.ts +188 -0
  199. package/dist/src/harness/session-machine/transitions.js +1 -0
  200. package/dist/src/harness/session-machine/view.d.ts +58 -0
  201. package/dist/src/harness/session-machine/view.js +1 -0
  202. package/dist/src/harness/step/after-model.d.ts +7 -0
  203. package/dist/src/harness/step/after-model.js +1 -0
  204. package/dist/src/harness/step/context.d.ts +59 -0
  205. package/dist/src/harness/step/context.js +1 -0
  206. package/dist/src/harness/step/intake.d.ts +34 -0
  207. package/dist/src/harness/step/intake.js +1 -0
  208. package/dist/src/harness/step/prompt.d.ts +37 -0
  209. package/dist/src/harness/step/prompt.js +1 -0
  210. package/dist/src/harness/step-hooks.d.ts +8 -13
  211. package/dist/src/harness/step-hooks.js +1 -1
  212. package/dist/src/harness/tool-loop.d.ts +7 -22
  213. package/dist/src/harness/tool-loop.js +1 -3
  214. package/dist/src/harness/tools.d.ts +13 -0
  215. package/dist/src/harness/tools.js +1 -1
  216. package/dist/src/harness/turn-tag-state.d.ts +1 -1
  217. package/dist/src/harness/types.d.ts +6 -0
  218. package/dist/src/instrumentation/ai-sdk-hook-bridge.d.ts +1 -1
  219. package/dist/src/instrumentation/ai-sdk-hook-bridge.js +1 -1
  220. package/dist/src/instrumentation/content.js +1 -1
  221. package/dist/src/instrumentation/dispatch.js +1 -1
  222. package/dist/src/instrumentation/lifecycle.d.ts +28 -56
  223. package/dist/src/instrumentation/native-events.d.ts +2 -1
  224. package/dist/src/instrumentation/native-events.js +1 -1
  225. package/dist/src/instrumentation/provider.d.ts +1 -1
  226. package/dist/src/instrumentation/runtime-context.d.ts +2 -3
  227. package/dist/src/instrumentation/runtime-context.js +1 -1
  228. package/dist/src/instrumentation/runtime.d.ts +11 -1
  229. package/dist/src/instrumentation/runtime.js +1 -1
  230. package/dist/src/instrumentation/state.d.ts +6 -1
  231. package/dist/src/instrumentation/state.js +1 -1
  232. package/dist/src/internal/application/package.js +1 -1
  233. package/dist/src/internal/attachments/limited-read.d.ts +16 -0
  234. package/dist/src/internal/attachments/limited-read.js +1 -0
  235. package/dist/src/internal/authored-definition/schema-backed.d.ts +2 -1
  236. package/dist/src/internal/authored-definition/schema-backed.js +1 -1
  237. package/dist/src/internal/mcp/published-tools.d.ts +13 -0
  238. package/dist/src/internal/mcp/published-tools.js +1 -0
  239. package/dist/src/internal/mcp/request-trace-context.d.ts +12 -0
  240. package/dist/src/internal/mcp/request-trace-context.js +1 -0
  241. package/dist/src/internal/mcp/streamable-http-server.d.ts +7 -3
  242. package/dist/src/internal/mcp/streamable-http-server.js +1 -1
  243. package/dist/src/internal/model-auth/transport.d.ts +3 -3
  244. package/dist/src/internal/model-auth/transport.js +1 -1
  245. package/dist/src/models/auto.d.ts +5 -5
  246. package/dist/src/models/auto.js +2 -2
  247. package/dist/src/protocol/message.d.ts +7 -0
  248. package/dist/src/protocol/message.js +1 -1
  249. package/dist/src/protocol/session-projection.d.ts +159 -0
  250. package/dist/src/protocol/session-projection.js +1 -0
  251. package/dist/src/public/ai/index.d.ts +1 -1
  252. package/dist/src/public/ai/index.js +1 -1
  253. package/dist/src/public/channels/chat-sdk/attachment-refs.d.ts +15 -0
  254. package/dist/src/public/channels/chat-sdk/attachment-refs.js +1 -0
  255. package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +2 -2
  256. package/dist/src/public/channels/chat-sdk/messageToUserContent.d.ts +11 -5
  257. package/dist/src/public/channels/chat-sdk/messageToUserContent.js +1 -1
  258. package/dist/src/public/channels/discord/attachments.d.ts +15 -0
  259. package/dist/src/public/channels/discord/attachments.js +1 -0
  260. package/dist/src/public/channels/discord/discordChannel.js +1 -1
  261. package/dist/src/public/channels/discord/inbound.d.ts +13 -0
  262. package/dist/src/public/channels/discord/inbound.js +1 -1
  263. package/dist/src/public/channels/linear/inbound-uploads.d.ts +21 -0
  264. package/dist/src/public/channels/linear/inbound-uploads.js +1 -0
  265. package/dist/src/public/channels/linear/linearChannel.js +1 -1
  266. package/dist/src/public/channels/linq/inboundContent.d.ts +7 -1
  267. package/dist/src/public/channels/linq/inboundContent.js +1 -1
  268. package/dist/src/public/channels/linq/linqChannel.js +1 -1
  269. package/dist/src/public/channels/mcp.d.ts +17 -2
  270. package/dist/src/public/channels/mcp.js +1 -1
  271. package/dist/src/public/channels/photon/attachments.d.ts +21 -0
  272. package/dist/src/public/channels/photon/attachments.js +1 -0
  273. package/dist/src/public/channels/photon/photonIMessageChannel.js +1 -1
  274. package/dist/src/public/channels/slack/attachments.d.ts +3 -1
  275. package/dist/src/public/channels/slack/attachments.js +1 -1
  276. package/dist/src/public/channels/slack/slackChannel.js +1 -1
  277. package/dist/src/public/channels/teams/attachments.d.ts +4 -4
  278. package/dist/src/public/channels/teams/attachments.js +1 -1
  279. package/dist/src/public/channels/telegram/attachments.js +1 -1
  280. package/dist/src/public/channels/twilio/api.d.ts +7 -0
  281. package/dist/src/public/channels/twilio/api.js +1 -1
  282. package/dist/src/public/channels/twilio/inbound.d.ts +7 -0
  283. package/dist/src/public/channels/twilio/inbound.js +2 -2
  284. package/dist/src/public/channels/twilio/twilioChannel.js +1 -1
  285. package/dist/src/public/definitions/connections/mcp.d.ts +1 -1
  286. package/dist/src/public/definitions/connections/openapi.d.ts +1 -1
  287. package/dist/src/react/index.d.ts +1 -0
  288. package/dist/src/react/index.js +1 -1
  289. package/dist/src/runtime/agent/mock-model-adapter.js +2 -2
  290. package/dist/src/runtime/resolve-tool.js +1 -1
  291. package/dist/src/setup/boxes/resolve-provisioning.d.ts +2 -0
  292. package/dist/src/setup/boxes/resolve-provisioning.js +1 -1
  293. package/dist/src/setup/cli/prompt-ui.d.ts +3 -0
  294. package/dist/src/setup/cli/prompt-ui.js +3 -1
  295. package/dist/src/setup/cli/select-component.d.ts +1 -0
  296. package/dist/src/setup/cli/select-component.js +1 -1
  297. package/dist/src/setup/flows/ensure-vercel-project.d.ts +2 -0
  298. package/dist/src/setup/flows/ensure-vercel-project.js +1 -1
  299. package/dist/src/setup/integrations/discord/api.js +1 -1
  300. package/dist/src/setup/integrations/web/auth-options.d.ts +4 -0
  301. package/dist/src/setup/integrations/web/auth-options.js +1 -0
  302. package/dist/src/setup/integrations/web/auth-scaffold.d.ts +7 -0
  303. package/dist/src/setup/integrations/web/auth-scaffold.js +1 -0
  304. package/dist/src/setup/integrations/web/provision-auth.d.ts +3 -0
  305. package/dist/src/setup/integrations/web/provision-auth.js +1 -0
  306. package/dist/src/setup/integrations/web/setup.d.ts +11 -6
  307. package/dist/src/setup/integrations/web/setup.js +3 -3
  308. package/dist/src/setup/prompter.d.ts +2 -0
  309. package/dist/src/setup/prompter.js +1 -1
  310. package/dist/src/setup/scaffold/create/add-to-project.js +1 -1
  311. package/dist/src/setup/scaffold/create/project.js +2 -2
  312. package/dist/src/setup/scaffold/create/web-template.d.ts +1 -1
  313. package/dist/src/setup/scaffold/create/web-template.js +1 -0
  314. package/dist/src/setup/scaffold/update/web-options.js +1 -1
  315. package/dist/src/setup/vercel-project-api.d.ts +9 -0
  316. package/dist/src/setup/vercel-project-api.js +1 -1
  317. package/dist/src/setup/vercel-project.d.ts +4 -2
  318. package/dist/src/setup/vercel-project.js +0 -0
  319. package/dist/src/shared/web-search.d.ts +1 -1
  320. package/dist/src/subagents/adapter.js +1 -1
  321. package/dist/src/subagents/event-proxy-step.js +1 -1
  322. package/dist/src/subagents/hitl-proxy.d.ts +4 -28
  323. package/dist/src/subagents/hitl-proxy.js +1 -1
  324. package/dist/src/svelte/index.d.ts +2 -0
  325. package/dist/src/svelte/index.js +39 -2
  326. package/dist/src/svelte/use-eve-agent.js +1 -1
  327. package/dist/src/tools/approval/policies.d.ts +5 -5
  328. package/dist/src/tools/approval/policies.js +1 -1
  329. package/dist/src/tools/framework/agent.js +1 -1
  330. package/dist/src/tools/provided/agent-router.js +1 -1
  331. package/dist/src/tools/provided/ask-question-workflow.js +1 -1
  332. package/dist/src/tools/provided/ask-question.js +2 -2
  333. package/dist/src/tools/provided/bash.js +1 -1
  334. package/dist/src/tools/provided/framework-tool.d.ts +3 -0
  335. package/dist/src/tools/provided/framework-tool.js +1 -0
  336. package/dist/src/tools/provided/glob.js +2 -2
  337. package/dist/src/tools/provided/grep.js +2 -2
  338. package/dist/src/tools/provided/load-skill.js +1 -1
  339. package/dist/src/tools/provided/no-reply.js +1 -1
  340. package/dist/src/tools/provided/read-file.js +2 -2
  341. package/dist/src/tools/provided/sleep-workflow.js +1 -1
  342. package/dist/src/tools/provided/sleep.js +1 -1
  343. package/dist/src/tools/provided/task-cancel.js +1 -1
  344. package/dist/src/tools/provided/task-wait.js +1 -1
  345. package/dist/src/tools/provided/web-fetch.js +2 -2
  346. package/dist/src/tools/provided/web-search.js +1 -1
  347. package/dist/src/tools/provided/workflow.js +1 -1
  348. package/dist/src/tools/provided/write-file.js +2 -2
  349. package/dist/src/tracing/agent-approval-instrumentation.d.ts +2 -2
  350. package/dist/src/tracing/agent-approval-instrumentation.js +1 -1
  351. package/dist/src/tracing/agent-otel-provider.js +2 -2
  352. package/dist/src/tracing/agent-otel-usage.d.ts +1 -1
  353. package/dist/src/tracing/agent-otel-usage.js +1 -1
  354. package/dist/src/tracing/agent-span-contract.d.ts +0 -1
  355. package/dist/src/tracing/agent-span-contract.js +1 -1
  356. package/dist/src/tracing/agent-tool-instrumentation.d.ts +16 -6
  357. package/dist/src/tracing/agent-tool-instrumentation.js +1 -1
  358. package/dist/src/tracing/agent-trace-context-codec.js +1 -1
  359. package/dist/src/tracing/agent-trace-state.d.ts +7 -3
  360. package/dist/src/tracing/invoke-tool-span.js +1 -1
  361. package/dist/src/tracing/local-trace-analysis.js +1 -1
  362. package/dist/src/vue/index.d.ts +2 -0
  363. package/dist/src/vue/index.js +39 -2
  364. package/dist/src/vue/use-eve-agent.js +1 -1
  365. package/docs/agent-config.md +2 -2
  366. package/docs/channels/chat-sdk.mdx +3 -1
  367. package/docs/channels/custom.mdx +2 -0
  368. package/docs/channels/discord.mdx +5 -4
  369. package/docs/channels/eve.mdx +65 -0
  370. package/docs/channels/linear.mdx +1 -1
  371. package/docs/channels/linq.mdx +2 -0
  372. package/docs/channels/mcp.mdx +39 -1
  373. package/docs/channels/photon.mdx +5 -0
  374. package/docs/channels/teams.mdx +4 -7
  375. package/docs/channels/twilio.mdx +1 -1
  376. package/docs/concepts/built-in-tools.md +12 -0
  377. package/docs/concepts/sessions-runs-and-streaming.md +3 -3
  378. package/docs/connections/overview.mdx +1 -1
  379. package/docs/dynamic-configuration/meta.json +1 -1
  380. package/docs/evals/judge.mdx +16 -16
  381. package/docs/evals/overview.mdx +1 -1
  382. package/docs/guides/{evaluate.md → decide.md} +35 -35
  383. package/docs/guides/dynamic-capabilities.md +1 -1
  384. package/docs/guides/frontend/overview.mdx +3 -1
  385. package/docs/guides/hooks.md +1 -1
  386. package/docs/guides/instrumentation/instrumentation.mdx +23 -22
  387. package/docs/guides/instrumentation/otel.mdx +13 -2
  388. package/docs/reference/cli.md +3 -3
  389. package/docs/reference/typescript-api.md +4 -2
  390. package/docs/tools/human-in-the-loop.md +6 -4
  391. package/docs/tools/workflows.mdx +4 -4
  392. package/package.json +11 -11
  393. package/dist/src/ai/evaluate.d.ts +0 -7
  394. package/dist/src/ai/evaluate.js +0 -1
  395. package/dist/src/client/message-task-parts.d.ts +0 -8
  396. package/dist/src/client/message-task-parts.js +0 -1
  397. package/dist/src/compiled/_chunks/workflow/dist-C3ZE62yI.js +0 -25
  398. package/dist/src/compiled/_chunks/workflow/experimental-evaluation-Dm32egEG.js +0 -5
  399. package/dist/src/harness/active-turn-id.d.ts +0 -11
  400. package/dist/src/harness/active-turn-id.js +0 -1
  401. package/dist/src/harness/approval-candidates.js +0 -1
  402. package/dist/src/harness/approval-delivery-coordinator.js +0 -1
  403. package/dist/src/harness/approved-call-callers.d.ts +0 -11
  404. package/dist/src/harness/approved-call-callers.js +0 -1
  405. package/dist/src/harness/cancelled-turn-emission.d.ts +0 -12
  406. package/dist/src/harness/cancelled-turn-emission.js +0 -1
  407. package/dist/src/harness/emission-state.d.ts +0 -36
  408. package/dist/src/harness/emission-state.js +0 -1
  409. package/dist/src/harness/held-requests.d.ts +0 -18
  410. package/dist/src/harness/held-requests.js +0 -1
  411. package/dist/src/harness/hitl/approval-input-requests.d.ts +0 -27
  412. package/dist/src/harness/hitl/approval-input-requests.js +0 -1
  413. package/dist/src/harness/hitl/pending-input-resolution.d.ts +0 -54
  414. package/dist/src/harness/hitl/pending-input-resolution.js +0 -1
  415. package/dist/src/harness/hitl/session-limit-input-requests.d.ts +0 -12
  416. package/dist/src/harness/hitl/session-limit-input-requests.js +0 -1
  417. package/dist/src/harness/input-requests.d.ts +0 -37
  418. package/dist/src/harness/input-requests.js +0 -1
  419. package/dist/src/harness/pending-input-batches.d.ts +0 -81
  420. package/dist/src/harness/pending-input-batches.js +0 -1
  421. package/dist/src/harness/session-limit-enforcement.d.ts +0 -45
  422. package/dist/src/harness/session-limit-enforcement.js +0 -1
  423. package/dist/src/harness/stale-input-responses.js +0 -3
  424. package/dist/src/harness/workflow-dispatch.d.ts +0 -30
  425. package/dist/src/harness/workflow-dispatch.js +0 -1
  426. package/dist/src/public/channels/linear/inbound-images.d.ts +0 -19
  427. package/dist/src/public/channels/linear/inbound-images.js +0 -1
  428. package/dist/src/tracing/agent-action-instrumentation.d.ts +0 -26
  429. package/dist/src/tracing/agent-action-instrumentation.js +0 -1
  430. /package/dist/src/harness/{compaction.d.ts → compaction/engine.d.ts} +0 -0
  431. /package/dist/src/harness/{compaction-prompt.d.ts → compaction/prompt.d.ts} +0 -0
  432. /package/dist/src/harness/{compaction-prompt.js → compaction/prompt.js} +0 -0
  433. /package/dist/src/harness/{session-limit-continuation.d.ts → hitl/budget-request.d.ts} +0 -0
  434. /package/dist/src/harness/{session-limit-continuation.js → hitl/budget-request.js} +0 -0
  435. /package/dist/src/harness/{approval-delivery-coordinator.d.ts → hitl/coordinator.d.ts} +0 -0
  436. /package/dist/src/harness/{model-call-error.js → model-call/errors.js} +0 -0
@@ -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
 
@@ -23,7 +23,7 @@ agent/instrumentation/
23
23
  audit.ts lifecycle instrumentation
24
24
  ```
25
25
 
26
- This instrumentation records action timing and identity without receiving tool
26
+ This instrumentation records tool timing and identity without receiving tool
27
27
  arguments or results:
28
28
 
29
29
  ```ts title="agent/instrumentation/audit.ts"
@@ -31,15 +31,15 @@ import { defineInstrumentation } from "eve/instrumentation";
31
31
 
32
32
  export default defineInstrumentation({
33
33
  events: {
34
- "action.started": (event, ctx) => {
35
- ctx.state.set({ name: event.name, startedAt: Date.now() });
34
+ "tool.call.started": (event, ctx) => {
35
+ ctx.state.set({ name: event.toolName, startedAt: Date.now() });
36
36
  },
37
- "action.completed": (event, ctx) => {
37
+ "tool.call.completed": (event, ctx) => {
38
38
  const started = ctx.state.get() as { name: string; startedAt: number } | undefined;
39
39
  if (started === undefined) return;
40
40
 
41
41
  console.log({
42
- action: started.name,
42
+ tool: started.name,
43
43
  durationMs: Date.now() - started.startedAt,
44
44
  outcome: event.outcome,
45
45
  });
@@ -123,12 +123,12 @@ export default defineInstrumentation({
123
123
  recordOutputs: false,
124
124
  }),
125
125
  events: {
126
- "action.started": async (event) => {
126
+ "tool.call.started": async (event) => {
127
127
  await sendAuditRecord({
128
128
  id: event.idempotencyKey,
129
129
  input: redactApiKey(event.input),
130
130
  kind: event.kind,
131
- name: event.name,
131
+ name: event.toolName,
132
132
  });
133
133
  },
134
134
  },
@@ -155,21 +155,22 @@ Prefer `recordInputs: false` or `recordOutputs: false` when the destination does
155
155
  start and its terminal event share an `idempotencyKey`; use it as a stable
156
156
  operation key when upserting records across replays.
157
157
 
158
- | Lifecycle | Events | Meaning |
159
- | ---------------- | ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
160
- | Session | `session.started`, `session.waiting`, `session.completed`, `session.failed` | Track a session from creation through suspension or termination. `session.waiting` is resumable; `session.completed` and `session.failed` are terminal. |
161
- | Turn | `turn.started`, `turn.completed`, `turn.cancelled`, `turn.failed` | Track one turn. Cancellation is not a failure and commonly leaves the session waiting for another turn. |
162
- | Channel delivery | `channel.delivery.started`, `channel.delivery.completed`, `channel.delivery.cancelled`, `channel.delivery.failed` | Track an inbound channel delivery while eve processes its turn. These events are emitted when the channel provides delivery metadata. |
163
- | Step attempt | `step.attempt.started`, `step.attempt.completed`, `step.attempt.failed`, `step.attempt.metadata` | Track each model-step attempt; retries have separate attempts. `step.attempt.metadata` is emitted after a step only when the AI SDK supplies provider metadata. |
164
- | Model call | `model.call.started`, `model.call.completed`, `model.call.failed` | Track an individual call to the model provider. Completion includes usage and finish reason; content fields follow the trace policy. |
165
- | Action | `action.started`, `action.completed`, `action.failed` | Track eve's durable dispatch of a tool, skill load, local subagent, or remote agent. A failed event's `outcome` distinguishes failure, rejection, cancellation, and abandonment. |
166
- | Tool call | `tool.call.started`, `tool.call.completed`, `tool.call.failed` | Track the AI SDK's in-process tool execution boundary, including its input and result when allowed by the trace policy. |
167
- | User input | `input.requested`, `input.resolved` | Track a question, tool approval, or session-limit request and its resolution. The resolution includes an outcome such as `answered`, `approved`, `denied`, or `cancelled`. |
168
- | Memory operation | `memory.operation.started`, `memory.operation.completed`, `memory.operation.failed` | Track a memory-store search or write. Events include the operation name, phase, and memory slot; completion may include a record count and records. |
169
-
170
- An ordinary tool emits both `action.*` and `tool.call.*` events. Use `action.*` for eve's durable dispatch lifecycle, including tools, skills, subagents, and remote agents. Use `tool.call.*` only when you need the AI SDK's in-process tool execution boundary.
171
-
172
- For local and remote subagents, `action.completed` and `action.failed` include the child turn's `usage` directly. Token counts are always present when the child reports usage; `usage.costUsd` is present only when the model provider reports a price. Without the action-level usage, consumers would have to correlate child model events through trace lineage and sum their provider metadata, which is harder to do reliably across retries and parked turns.
158
+ | Lifecycle | Events | Meaning |
159
+ | ---------------- | ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
160
+ | Session | `session.started`, `session.waiting`, `session.completed`, `session.failed` | Track a session from creation through suspension or termination. `session.waiting` is resumable; `session.completed` and `session.failed` are terminal. |
161
+ | Turn | `turn.started`, `turn.completed`, `turn.cancelled`, `turn.failed` | Track one turn. Cancellation is not a failure and commonly leaves the session waiting for another turn. |
162
+ | Channel delivery | `channel.delivery.started`, `channel.delivery.completed`, `channel.delivery.cancelled`, `channel.delivery.failed` | Track an inbound channel delivery while eve processes its turn. These events are emitted when the channel provides delivery metadata. |
163
+ | Step attempt | `step.attempt.started`, `step.attempt.completed`, `step.attempt.failed`, `step.attempt.metadata` | Track each model-step attempt; retries have separate attempts. `step.attempt.metadata` is emitted after a step only when the AI SDK supplies provider metadata. |
164
+ | Model call | `model.call.started`, `model.call.completed`, `model.call.failed` | Track an individual call to the model provider. Completion includes usage and finish reason; content fields follow the trace policy. |
165
+ | Tool call | `tool.call.started`, `tool.call.completed`, `tool.call.failed` | Track a tool, skill load, local subagent, or remote-agent call through durable settlement. A failed event's `outcome` distinguishes failure, rejection, cancellation, and abandonment. |
166
+ | User input | `input.requested`, `input.resolved` | Track a question, tool approval, or session-limit request and its resolution. The resolution includes an outcome such as `answered`, `approved`, `denied`, or `cancelled`. |
167
+ | Memory operation | `memory.operation.started`, `memory.operation.completed`, `memory.operation.failed` | Track a memory-store search or write. Events include the operation name, phase, and memory slot; completion may include a record count and records. |
168
+
169
+ Each call emits one `tool.call.*` lifecycle to authored providers. SDK execution callbacks do not emit a second lifecycle. Tool calls can remain open across approvals, parked turns, and worker replacement.
170
+
171
+ For local and remote subagents, `tool.call.completed` and `tool.call.failed` include the child turn's `usage` directly. Token counts are always present when the child reports usage; `usage.costUsd` is present only when the model provider reports a price.
172
+
173
+ When upgrading, replace `action.started`, `action.completed`, and `action.failed` handlers with their `tool.call.*` equivalents. Read `event.toolName` instead of `event.name` on start events. The OpenTelemetry trace schema remains version 4.
173
174
 
174
175
  Handlers from different files run concurrently and are failure-isolated. Do
175
176
  not depend on execution order. Use `flush` to drain buffered records and
@@ -126,6 +126,10 @@ The resolver receives the channel, session, final model input, step, and turn.
126
126
  Keys beginning with `eve.` are reserved. Content excluded by
127
127
  `otel({ tracePolicy })` is not available to the resolver.
128
128
 
129
+ Authored values appear under `ai.settings.context.*`. Framework channel, session,
130
+ step, turn, and version identifiers use structural span attributes instead of
131
+ runtime-context copies. `ai.settings.context.eve.environment` remains available.
132
+
129
133
  ## Trace topology
130
134
 
131
135
  OpenTelemetry destinations receive the following trace topology for an ordinary
@@ -135,8 +139,7 @@ agent turn:
135
139
  invoke_agent <agent>
136
140
  └── agent.step
137
141
  ├── chat <model>
138
- └── agent.action
139
- └── execute_tool <tool>
142
+ └── execute_tool <tool>
140
143
  ```
141
144
 
142
145
  Each root agent turn starts a new trace. If eve receives a local caller's trace
@@ -146,6 +149,14 @@ context, the first subagent turn starts a new trace. Later turns in the child
146
149
  session start new traces. They do not use the original dispatch span as their
147
150
  parent.
148
151
 
152
+ Use `gen_ai.tool.call.id` to correlate tool and approval spans. Tool failures use
153
+ `error.type`. These attributes replace the duplicate `agent.action.call_id` and
154
+ `agent.action.error.code` fields without changing trace schema version 4.
155
+
156
+ Model and activation spans record token counts under `gen_ai.usage.*`, without
157
+ duplicate `agent.usage.*` token fields. Step and tool spans retain `agent.usage.*`.
158
+ Cost values remain unchanged.
159
+
149
160
  A remote child starts a separate trace with a root `invoke_agent` span. Its first
150
161
  turn links to the caller with `eve.link.type=agent.dispatch`. The receiving
151
162
  deployment applies its sampler. Queries for local dispatches must use
@@ -393,11 +393,11 @@ Span rows carry inline metrics when the span recorded them — `↑input`/`↓ou
393
393
 
394
394
  With local caller trace context, the first local subagent turn uses the caller's trace. Its span is a child of the dispatch span. A remote child starts a separate root trace and links its first turn to the dispatch with `eve.link.type=agent.dispatch`. Remote requests use W3C `tracestate` to identify that dispatch span if platform HTTP handling changes `traceparent`. Later child turns start new traces. All related sessions have the same `gen_ai.conversation.id`. `agent.subagent.name` identifies the subagent.
395
395
 
396
- Each workflow tool call has an `agent.action` span and an `execute_tool <tool>` span. The first turn of each local session it opens with `ctx.agent` is a child of the call's `agent.action` span. A remote session links to that action from its own trace. An individual `ctx.agent` call does not create a separate dispatch span. Only agent execution uses `invoke_agent`.
396
+ Each workflow tool call has one `execute_tool <tool>` span. The first turn of each local session it opens with `ctx.agent` is a child of that tool span. A remote session links to the tool span from its own trace. An individual `ctx.agent` call does not create a separate dispatch span. Only agent execution uses `invoke_agent`.
397
397
 
398
398
  Outbound MCP `tools/call` requests add MCP semantic attributes to the matching `execute_tool` span. When eve has no tool span to enrich, it creates a `CLIENT` `tools/call <tool>` span. Each `tools/list` discovery also has a `CLIENT` span. Configured OpenTelemetry propagation fields are injected into MCP `params._meta` for JSON-RPC bodies up to 1 MiB and propagation metadata up to 8 KiB; larger requests are sent unchanged. eve removes its audience and session-lineage baggage before forwarding, and keeps the input/output content-capture policy local.
399
399
 
400
- `connection_execute` records the connector call as a child of its outer `agent.action` span, with `agent.action.parent_call_id` identifying the outer call. Both spans retain `agent.action.kind=tool-call`; consumers can distinguish nested calls by the parent call ID. The nested span's `gen_ai.tool.call.arguments` holds the validated connector input, including schema defaults, when input capture is enabled. Its duration covers the reporting of the nested result, not the connector request; use the outer call's `execute_tool` span for execution timing.
400
+ `connection_execute` records the connector call as a child of its outer `execute_tool` span, with `agent.action.parent_call_id` identifying the outer call. Both spans retain `agent.action.kind=tool-call`; consumers can distinguish nested calls by the parent call ID. The nested span's `gen_ai.tool.call.arguments` holds the validated connector input, including schema defaults, when input capture is enabled. Its duration covers the reporting of the nested result, not the connector request; use the outer call's `execute_tool` span for execution timing.
401
401
 
402
402
  Each root agent turn starts a new trace. With local caller trace context, that trace includes the first turn of each local subagent it starts. Remote child turns and later local child turns start separate traces. If a worker is replaced, the new worker uses the prepared trace context for the same turn. Supply the conversation ID to show all related traces, oldest first.
403
403
 
@@ -426,7 +426,7 @@ eve link
426
426
  eve link --non-interactive --project <name-or-id> [--team <team-id-or-slug>]
427
427
  ```
428
428
 
429
- Links the current directory to a Vercel project. After selecting a team, you can create a project named for the agent or link an existing project. The existing-project picker shows recent projects; type a project name and choose **Search for '<name>'** to search the rest of that team's projects. Vercel links the resolved project, eve verifies its project ID, and then pulls the project's environment so an AI Gateway credential (`VERCEL_OIDC_TOKEN` or `AI_GATEWAY_API_KEY`) lands in `.env.local`. Running it again re-links: the pickers always run, and the new choice wins.
429
+ Links the current directory to a Vercel project. After selecting a team, you can create a project named for the agent or link an existing project. The existing-project picker shows recent projects; type a project name and choose **Search for `'<name>'`** to search the rest of that team's projects. Vercel links the resolved project, eve verifies its project ID, and then pulls the project's environment so an AI Gateway credential (`VERCEL_OIDC_TOKEN` or `AI_GATEWAY_API_KEY`) lands in `.env.local`. Running it again re-links: the pickers always run, and the new choice wins.
430
430
 
431
431
  For CI or an agent, pass `--non-interactive` and `--project`. `--project` accepts the same Vercel project name or ID as `vercel link`; `--team` accepts its team ID or slug. The command never opens a picker or browser in this mode. A running `eve dev` reloads env files automatically, so you don't need to restart after the pull.
432
432
 
@@ -61,6 +61,8 @@ Tool-wide authoring helpers and types such as `defineTool`, `defineWorkflowTool`
61
61
 
62
62
  `AgentReasoningDefinition` is exported from `eve` for the top-level `defineAgent({ reasoning })` setting. `AgentLimitsDefinition` is exported for `defineAgent({ limits })`. `AgentWorkflowDefinition`, `AgentWorkflowRetentionDefinition`, and `AgentWorkflowWorldDefinition` are exported from `eve` for the `defineAgent({ experimental: { workflow } })` config shape. `WebSearchToolInput` and `WebSearchProvider` are exported from `eve/tools/web_search`.
63
63
 
64
+ `webSearch({ provider })` selects `"exa"`, `"parallel"`, or `"browserbase"` for AI Gateway search using the Gateway model's credentials. Direct provider models keep their native search implementation when supported. See [Built-in tools](../concepts/built-in-tools#web_search) for setup and provider behavior.
65
+
64
66
  `defineInstructions` accepts `{ content: string, role?: "system" | "user" }`; omitted `role` means `"system"`. Its `eve/instructions` version of `defineDynamic` accepts only `session.started` and `turn.started` handlers returning `defineInstructions(...)` or `null`. The legacy `{ markdown: string }` definition remains available as a deprecated system-role form.
65
67
 
66
68
  The `eve/connections` version of `defineDynamic` accepts `session.started` and
@@ -141,10 +143,10 @@ Tool definitions accept `availableInSubagents: false` to restrict the tool to to
141
143
  | `eve/instrumentation` | `defineInstrumentation`, `disableInstrumentation`, `isChannel`, lifecycle provider types |
142
144
  | `eve/instrumentation/otel` | `otel`, `otelIntegration`, `localTraces`, `agentRuns`, OpenTelemetry policy types |
143
145
  | `eve/local-dev` | `getLocalDevCapability`, `LocalDevCapability` |
144
- | [`eve/models`](../guides/evaluate) | Automatic model selection with `auto` |
146
+ | [`eve/models`](../guides/decide) | Automatic model selection with `auto` |
145
147
  | `eve/models/openai` | `openai`, `chatgpt`, deprecated `experimental_chatgpt` |
146
148
  | `eve/models/anthropic` | `anthropic` |
147
- | [`eve/ai`](../guides/evaluate#evaluate-inside-a-tool) | Standalone `evaluate` |
149
+ | [`eve/ai`](../guides/decide#decide-inside-a-tool) | Standalone `decide` |
148
150
  | `eve/evals` | `defineEval`, `defineEvalConfig`, `mockModel`, eval types |
149
151
  | `eve/evals/expect` | `includes`, `equals`, `matches`, `similarity` |
150
152
  | `eve/evals/reporters` | `Braintrust`, `JUnit`, `EvalReporter` |
@@ -37,17 +37,17 @@ export default defineTool({
37
37
  | `never()` | Never require approval (the default when omitted). |
38
38
  | `once()` | Require approval only the first time the tool runs in a session; auto-allow after. |
39
39
  | `always()` | Require approval before every call. |
40
- | `auto()` | Ask an evaluation model whether to run the exact call or require user approval. |
40
+ | `auto()` | Ask a decision model whether to run the exact call or require user approval. |
41
41
 
42
42
  By default, omitted `approval` behaves like `never()`, so tool calls may execute without human approval. Require human approval or other safeguards for sensitive, irreversible, regulated, financial, healthcare, employment, housing, legal, safety-impacting, user-impacting, or external side-effecting actions.
43
43
 
44
- `auto()` uses an [AI SDK evaluation model](/docs/guides/evaluate) to classify each call as `clear` or `caution`. It defaults to `typesafe-ai/jev`, TypeSafe AI's [Jev evaluation model](https://vercel.com/i/what-is-jev). Like `evaluate`, a model string uses Vercel AI Gateway unless the application configures a global AI SDK default provider:
44
+ `auto()` uses an [AI SDK decision model](/docs/guides/decide) to classify each call as `clear` or `caution`. It defaults to `typesafe-ai/jev`, TypeSafe AI's [Jev decision model](https://vercel.com/i/what-is-jev). Like `decide`, a model string uses Vercel AI Gateway unless the application configures a global AI SDK default provider:
45
45
 
46
46
  ```ts
47
47
  approval: auto({ model: "typesafe-ai/jev" });
48
48
  ```
49
49
 
50
- The evaluation model reviews the tool name and input for dangerous effects. A caution, failed review, or incomplete input requires user approval. The tool input is sent to the evaluation model's provider.
50
+ The decision model reviews the tool name and input for dangerous effects. A caution, failed review, or incomplete input requires user approval. The tool input is sent to the decision model's provider.
51
51
 
52
52
  Override the classifier text for application-specific policy:
53
53
 
@@ -84,7 +84,9 @@ Gating a side effect on approval is also how you make non-idempotent work safe a
84
84
 
85
85
  ### Authorizing approval responses
86
86
 
87
- You may also define an approval response policy that decides whether the authenticated person who selects **Approve** or **Cancel** may settle that specific call:
87
+ By default, only the person whose turn requested a call can approve or cancel it.
88
+
89
+ Define an approval response policy to change who may settle a call, for example, to specify a set of designated approvers who must approve a certain tool. A tool with a `response` policy replaces the default entirely, so return `{ status: "allowed" }` to let any responder through:
88
90
 
89
91
  ```ts title="agent/tools/refund_charge.ts"
90
92
  import { defineTool } from "eve/tools";
@@ -588,7 +588,7 @@ export default defineAgent({
588
588
  Define the model-visible router under `agent/tools/`. Build the Jev criteria from the subagents' effective descriptions, then pass its typed choice directly to `ctx.agent()`:
589
589
 
590
590
  ```ts title="agent/tools/agent-router.ts"
591
- import { evaluate } from "eve/ai";
591
+ import { decide } from "eve/ai";
592
592
  import { defineWorkflowTool } from "eve/tools";
593
593
  import { z } from "zod";
594
594
 
@@ -599,7 +599,7 @@ async function chooseTarget(
599
599
  ) {
600
600
  "use step";
601
601
 
602
- const result = await evaluate({
602
+ const result = await decide({
603
603
  abortSignal,
604
604
  state: { task },
605
605
  questions: {
@@ -637,7 +637,7 @@ export default defineWorkflowTool({
637
637
  });
638
638
  ```
639
639
 
640
- The evaluation runs in a step so workflow replay records its result instead of making the routing request again. The parent model receives `agent-router`, but not `researcher` or `operator`. Jev returns the typed `"researcher" | "operator"` choice, and the selected subagent's reply becomes the `agent-router` tool result.
640
+ The decision runs in a step so workflow replay records its result instead of making the routing request again. The parent model receives `agent-router`, but not `researcher` or `operator`. Jev returns the typed `"researcher" | "operator"` choice, and the selected subagent's reply becomes the `agent-router` tool result.
641
641
 
642
642
  `ctx.agents` is a replay-stable metadata snapshot taken when the session admits the call. In a `serve` task, it follows the call being served. In a top-level root workflow, `ctx.agents.agent` always represents the root-copy target and carries the root's authored `description` when provided. The snapshot also includes declared agents hidden from the parent model with `tool: false` or `disableTool()`, but exposes no model definitions, credentials, or callbacks. A delegated root copy omits `agent`, so `agentRouter()` cannot select another root copy recursively. Invocation still checks each target's availability through `ctx.agent()`.
643
643
 
@@ -651,7 +651,7 @@ import { agentRouter } from "eve/tools/agent-router";
651
651
  export default agentRouter();
652
652
  ```
653
653
 
654
- Its input is `{ message: string }`. `agentRouter()` ignores entries without a non-empty description. With two or more described targets, it sends the message and effective descriptions to Jev, then sends the message to a new session with the selected agent through `ctx.agent()` and returns its reply. It invokes a sole target without evaluation. Each call
654
+ Its input is `{ message: string }`. `agentRouter()` ignores entries without a non-empty description. With two or more described targets, it sends the message and effective descriptions to Jev, then sends the message to a new session with the selected agent through `ctx.agent()` and returns its reply. It invokes a sole target without decision. Each call
655
655
  runs as a [task](#run-calls-as-tasks-task), so the reply reaches the model as the task's result. In a top-level root session, the candidates include the root-copy `agent`; delegated root copies and declared subagent contexts include only their declared targets.
656
656
 
657
657
  When an authored tool accepts a JSON Schema supplied by the model, represent that input with a permissive object such as `z.looseObject({})`. Avoid `z.record(z.string(), z.json())`: its generated JSON Schema uses `propertyNames`, which OpenAI does not support. Validate the supplied value at the point where your tool consumes it.