eve 0.52.1 → 0.52.3

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 (240) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/src/channel/types.d.ts +1 -0
  3. package/dist/src/chunks/{use-eve-agent-CxkGSusZ.js → use-eve-agent-BR8EpIOX.js} +46 -19
  4. package/dist/src/chunks/{use-eve-agent-Crmh_YB-.js → use-eve-agent-XnfjQt1Z.js} +46 -19
  5. package/dist/src/cli/commands/deploy.js +1 -1
  6. package/dist/src/cli/commands/extension-init.d.ts +2 -1
  7. package/dist/src/cli/commands/extension-init.js +1 -1
  8. package/dist/src/cli/commands/init.d.ts +2 -13
  9. package/dist/src/cli/commands/init.js +1 -1
  10. package/dist/src/cli/dev/run-interactive-ui.d.ts +3 -0
  11. package/dist/src/cli/dev/run-interactive-ui.js +1 -1
  12. package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
  13. package/dist/src/cli/dev/tui/runner.d.ts +6 -0
  14. package/dist/src/cli/dev/tui/runner.js +1 -1
  15. package/dist/src/cli/dev/tui/setup-commands.d.ts +5 -3
  16. package/dist/src/cli/dev/tui/setup-commands.js +2 -2
  17. package/dist/src/cli/dev/tui/status-line.js +1 -1
  18. package/dist/src/cli/dev/tui/subagent-pump.js +1 -1
  19. package/dist/src/cli/dev/tui/tui.d.ts +4 -0
  20. package/dist/src/cli/dev/tui/tui.js +1 -1
  21. package/dist/src/cli/run.d.ts +1 -1
  22. package/dist/src/cli/run.js +2 -2
  23. package/dist/src/cli/telemetry/index.d.ts +15 -0
  24. package/dist/src/cli/telemetry/index.js +2 -2
  25. package/dist/src/client/eve-agent-store.js +1 -1
  26. package/dist/src/client/ndjson.js +1 -1
  27. package/dist/src/client/session.js +1 -1
  28. package/dist/src/compiled/.vendor-stamp.json +1 -1
  29. package/dist/src/compiler/compile-from-memory.d.ts +1 -0
  30. package/dist/src/compiler/compile-from-memory.js +1 -1
  31. package/dist/src/compiler/default-tool-policy.d.ts +6 -0
  32. package/dist/src/compiler/default-tool-policy.js +1 -0
  33. package/dist/src/compiler/extension-compatibility.d.ts +18 -18
  34. package/dist/src/compiler/extension-compatibility.js +1 -1
  35. package/dist/src/compiler/manifest.js +1 -1
  36. package/dist/src/compiler/normalize-agent-config.js +1 -1
  37. package/dist/src/compiler/normalize-manifest.js +1 -1
  38. package/dist/src/context/build-dynamic-tools.d.ts +2 -1
  39. package/dist/src/context/build-dynamic-tools.js +1 -1
  40. package/dist/src/context/dynamic-tool-lifecycle.d.ts +3 -3
  41. package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
  42. package/dist/src/context/dynamic-tool-metadata.d.ts +1 -1
  43. package/dist/src/context/hook-lifecycle.js +1 -1
  44. package/dist/src/context/keys.d.ts +2 -0
  45. package/dist/src/context/keys.js +1 -1
  46. package/dist/src/evals/cli/eval.js +1 -1
  47. package/dist/src/eve-channel/index.js +1 -1
  48. package/dist/src/execution/activity-events.d.ts +1 -0
  49. package/dist/src/execution/activity-events.js +1 -1
  50. package/dist/src/execution/node-step.js +1 -1
  51. package/dist/src/execution/sandbox/prewarm.js +1 -1
  52. package/dist/src/execution/session-activity-projection.js +1 -1
  53. package/dist/src/execution/session-activity.js +1 -1
  54. package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
  55. package/dist/src/execution/tasks/parent/dispatch.js +1 -1
  56. package/dist/src/execution/tasks/parent/task-cancel.d.ts +2 -2
  57. package/dist/src/execution/tasks/parent/task-cancel.js +1 -1
  58. package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
  59. package/dist/src/execution/tools/sleep-workflow.js +1 -1
  60. package/dist/src/execution/workflow-runtime.js +1 -1
  61. package/dist/src/execution/workflow-steps.js +1 -1
  62. package/dist/src/execution/workflow-webhook-route.js +1 -1
  63. package/dist/src/framework/sources/registry.js +1 -1
  64. package/dist/src/harness/action-presentation.d.ts +13 -0
  65. package/dist/src/harness/action-presentation.js +1 -0
  66. package/dist/src/harness/approval-delivery-coordinator.js +1 -1
  67. package/dist/src/harness/compaction-prompt.d.ts +1 -0
  68. package/dist/src/harness/compaction-prompt.js +1 -1
  69. package/dist/src/harness/compaction.js +1 -1
  70. package/dist/src/harness/coordination.js +1 -1
  71. package/dist/src/harness/emission.d.ts +1 -6
  72. package/dist/src/harness/emission.js +1 -1
  73. package/dist/src/harness/execute-tool.d.ts +2 -1
  74. package/dist/src/harness/finish-reason.d.ts +3 -0
  75. package/dist/src/harness/finish-reason.js +1 -0
  76. package/dist/src/harness/provider-tool-schemas.d.ts +1 -0
  77. package/dist/src/harness/provider-tool-schemas.js +1 -1
  78. package/dist/src/harness/step-hooks.js +1 -1
  79. package/dist/src/harness/stream-actions.d.ts +2 -2
  80. package/dist/src/harness/stream-actions.js +1 -1
  81. package/dist/src/harness/tool-call-input-errors.d.ts +4 -3
  82. package/dist/src/harness/tool-call-input-errors.js +1 -1
  83. package/dist/src/harness/tool-loop.js +2 -2
  84. package/dist/src/harness/tool-presentation.d.ts +5 -0
  85. package/dist/src/harness/tool-presentation.js +1 -0
  86. package/dist/src/harness/turn-client-context.d.ts +1 -0
  87. package/dist/src/harness/workflow-lifecycle.d.ts +2 -3
  88. package/dist/src/harness/workflow-lifecycle.js +1 -1
  89. package/dist/src/internal/application/compiled-artifacts.d.ts +3 -0
  90. package/dist/src/internal/application/compiled-artifacts.js +1 -1
  91. package/dist/src/internal/application/package.js +1 -1
  92. package/dist/src/internal/authored-definition/core.js +1 -1
  93. package/dist/src/internal/authored-definition/schema-backed.js +1 -1
  94. package/dist/src/internal/authored-module-conditions.d.ts +2 -0
  95. package/dist/src/internal/authored-module-conditions.js +1 -0
  96. package/dist/src/internal/authored-module-loader.d.ts +3 -0
  97. package/dist/src/internal/authored-module-loader.js +3 -3
  98. package/dist/src/internal/authored-module-map-loader.d.ts +3 -1
  99. package/dist/src/internal/authored-module-map-loader.js +1 -1
  100. package/dist/src/internal/authored-runtime-modules.d.ts +2 -0
  101. package/dist/src/internal/authored-runtime-modules.js +1 -1
  102. package/dist/src/internal/bundler/nitro-rolldown.d.ts +1 -0
  103. package/dist/src/internal/bundler/nitro-rolldown.js +1 -1
  104. package/dist/src/internal/nitro/development-generation.d.ts +2 -0
  105. package/dist/src/internal/nitro/development-generation.js +1 -1
  106. package/dist/src/internal/nitro/host/configure-nitro-routes.js +1 -1
  107. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  108. package/dist/src/internal/nitro/host/prepare-application-host.js +1 -1
  109. package/dist/src/internal/nitro/routes/channel-request-instrumentation.js +1 -1
  110. package/dist/src/internal/node-esm-compat-banner.d.ts +19 -6
  111. package/dist/src/internal/node-esm-compat-banner.js +2 -2
  112. package/dist/src/internal/workflow-bundle/builder-support.d.ts +5 -0
  113. package/dist/src/internal/workflow-bundle/builder.js +2 -2
  114. package/dist/src/internal/workflow-bundle/dynamic-tool-transform.d.ts +1 -1
  115. package/dist/src/internal/workflow-bundle/dynamic-tool-transform.js +1 -1
  116. package/dist/src/internal/workflow-bundle/workflow-core-shim.js +1 -1
  117. package/dist/src/protocol/activity.d.ts +6 -0
  118. package/dist/src/protocol/activity.js +1 -1
  119. package/dist/src/protocol/message.d.ts +13 -1
  120. package/dist/src/protocol/message.js +1 -1
  121. package/dist/src/public/channels/slack/activity-plan.js +1 -1
  122. package/dist/src/public/channels/slack/activity.js +2 -2
  123. package/dist/src/public/channels/slack/connections.d.ts +2 -2
  124. package/dist/src/public/channels/slack/connections.js +1 -1
  125. package/dist/src/public/memory/file/backends/default.js +1 -1
  126. package/dist/src/public/models/openai/chatgpt/credential-store.d.ts +6 -0
  127. package/dist/src/public/models/openai/chatgpt/credential-store.js +1 -0
  128. package/dist/src/public/models/openai/chatgpt/model.d.ts +1 -1
  129. package/dist/src/public/models/openai/chatgpt/oauth.d.ts +20 -0
  130. package/dist/src/public/models/openai/chatgpt/oauth.js +1 -0
  131. package/dist/src/public/models/openai/chatgpt/token-broker.d.ts +4 -3
  132. package/dist/src/public/models/openai/chatgpt/token-broker.js +1 -1
  133. package/dist/src/public/models/openai/chatgpt/transport.d.ts +1 -2
  134. package/dist/src/public/models/openai/index.d.ts +3 -4
  135. package/dist/src/public/tools/agent.d.ts +1 -0
  136. package/dist/src/public/tools/agent.js +1 -0
  137. package/dist/src/public/tools/ask-question.d.ts +1 -0
  138. package/dist/src/public/tools/ask-question.js +1 -0
  139. package/dist/src/public/tools/connection-search.d.ts +1 -0
  140. package/dist/src/public/tools/connection-search.js +1 -0
  141. package/dist/src/public/tools/index.d.ts +1 -1
  142. package/dist/src/public/tools/task-cancel.d.ts +1 -0
  143. package/dist/src/public/tools/task-cancel.js +1 -0
  144. package/dist/src/public/tools/task-update.d.ts +1 -0
  145. package/dist/src/public/tools/task-update.js +1 -0
  146. package/dist/src/runtime/connections/openapi-schema.js +1 -1
  147. package/dist/src/runtime/prompt/compose.js +1 -1
  148. package/dist/src/runtime/resolve-agent.js +1 -1
  149. package/dist/src/runtime/resolve-tool.js +1 -1
  150. package/dist/src/runtime/subagents/dynamic-agent-config.js +1 -1
  151. package/dist/src/runtime/types.d.ts +2 -0
  152. package/dist/src/self-modification/agent.js +1 -1
  153. package/dist/src/self-modification/extension/instructions.d.ts +1 -3
  154. package/dist/src/self-modification/extension/instructions.js +4 -2
  155. package/dist/src/self-modification/filesystem.js +1 -1
  156. package/dist/src/setup/flows/chatgpt-auth.d.ts +14 -2
  157. package/dist/src/setup/flows/chatgpt-auth.js +1 -1
  158. package/dist/src/setup/flows/model.d.ts +3 -2
  159. package/dist/src/setup/flows/model.js +1 -1
  160. package/dist/src/setup/flows/provider.js +1 -1
  161. package/dist/src/setup/flows/registry.d.ts +4 -0
  162. package/dist/src/setup/flows/registry.js +1 -1
  163. package/dist/src/setup/integrations/file-memory/vercel.d.ts +2 -2
  164. package/dist/src/setup/integrations/file-memory/vercel.js +1 -1
  165. package/dist/src/setup/scaffold/create/project.js +1 -1
  166. package/dist/src/shared/agent-definition.d.ts +7 -0
  167. package/dist/src/shared/boundary-hook-error.d.ts +4 -0
  168. package/dist/src/shared/boundary-hook-error.js +1 -0
  169. package/dist/src/{execution/activity-text.d.ts → shared/presentation-text.d.ts} +1 -1
  170. package/dist/src/shared/presentation-text.js +1 -0
  171. package/dist/src/svelte/index.js +1 -1
  172. package/dist/src/svelte/use-eve-agent.js +1 -1
  173. package/dist/src/tools/definition.d.ts +29 -0
  174. package/dist/src/tools/definition.js +1 -1
  175. package/dist/src/tools/durable-callbacks.d.ts +40 -9
  176. package/dist/src/tools/durable-callbacks.js +1 -1
  177. package/dist/src/tools/dynamic.d.ts +4 -1
  178. package/dist/src/tools/framework/agent-contract.js +1 -1
  179. package/dist/src/tools/provided/bash.js +1 -1
  180. package/dist/src/tools/provided/glob.js +1 -1
  181. package/dist/src/tools/provided/grep.js +1 -1
  182. package/dist/src/tools/provided/load-skill.js +1 -1
  183. package/dist/src/tools/provided/read-file.js +1 -1
  184. package/dist/src/tools/provided/web-fetch.js +1 -1
  185. package/dist/src/tools/provided/write-file.js +1 -1
  186. package/dist/src/tools/tool-label.d.ts +1 -0
  187. package/dist/src/tools/tool-label.js +1 -0
  188. package/dist/src/tracing/agent-action-instrumentation.js +1 -1
  189. package/dist/src/tracing/agent-approval-instrumentation.js +1 -1
  190. package/dist/src/tracing/agent-channel-delivery-instrumentation.js +1 -1
  191. package/dist/src/tracing/agent-otel-provider.js +2 -2
  192. package/dist/src/tracing/agent-otel-session-context.js +1 -1
  193. package/dist/src/tracing/agent-otel-usage.d.ts +10 -0
  194. package/dist/src/tracing/agent-otel-usage.js +1 -1
  195. package/dist/src/tracing/agent-span-naming.d.ts +1 -0
  196. package/dist/src/tracing/agent-span-naming.js +1 -0
  197. package/dist/src/tracing/agent-tool-instrumentation.js +1 -1
  198. package/dist/src/vue/index.js +1 -1
  199. package/dist/src/vue/use-eve-agent.js +1 -1
  200. package/docs/channels/slack.mdx +2 -0
  201. package/docs/concepts/built-in-tools.md +397 -68
  202. package/docs/concepts/default-harness.md +6 -0
  203. package/docs/concepts/sessions-runs-and-streaming.md +4 -0
  204. package/docs/connections/openapi.mdx +4 -0
  205. package/docs/connections/overview.mdx +1 -1
  206. package/docs/evals/running.mdx +2 -0
  207. package/docs/guides/client/continuations.mdx +11 -0
  208. package/docs/guides/client/streaming.mdx +7 -1
  209. package/docs/guides/dynamic-capabilities.md +5 -5
  210. package/docs/guides/frontend/overview.mdx +1 -1
  211. package/docs/guides/hooks.md +1 -1
  212. package/docs/guides/instrumentation.md +40 -1
  213. package/docs/guides/remote-agents.md +2 -0
  214. package/docs/instructions.mdx +1 -1
  215. package/docs/memory/custom-provider.md +4 -1
  216. package/docs/memory/file.md +25 -12
  217. package/docs/memory/overview.mdx +45 -13
  218. package/docs/reference/cli.md +6 -0
  219. package/docs/reference/telemetry.md +2 -2
  220. package/docs/reference/typescript-api.md +13 -9
  221. package/docs/sandbox.mdx +14 -2
  222. package/docs/subagents/index.mdx +8 -4
  223. package/docs/tools/overview.mdx +44 -2
  224. package/docs/tools/workflows.mdx +9 -1
  225. package/docs/tutorial/connect-a-warehouse.mdx +49 -26
  226. package/docs/tutorial/first-agent.mdx +20 -19
  227. package/docs/tutorial/guard-the-spend.mdx +4 -4
  228. package/docs/tutorial/how-it-runs.mdx +2 -3
  229. package/docs/tutorial/meta.json +2 -2
  230. package/docs/tutorial/query-sample-data.mdx +30 -19
  231. package/docs/tutorial/remember-definitions.mdx +5 -5
  232. package/docs/tutorial/run-analysis.mdx +155 -18
  233. package/docs/tutorial/ship-it.mdx +71 -81
  234. package/docs/tutorial/team-playbooks.mdx +10 -10
  235. package/package.json +32 -7
  236. package/dist/src/execution/activity-text.js +0 -1
  237. package/dist/src/internal/workflow-bundle/authored-workflow-modules.d.ts +0 -9
  238. package/dist/src/internal/workflow-bundle/authored-workflow-modules.js +0 -1
  239. package/dist/src/public/models/openai/chatgpt/codex-app-server.d.ts +0 -40
  240. package/dist/src/public/models/openai/chatgpt/codex-app-server.js +0 -1
@@ -7,92 +7,183 @@ eve provides a default tool set for every agent and additional tools you can add
7
7
 
8
8
  ## Default tools
9
9
 
10
- Default tools require no imports. The exact set depends on the agent and session. `agent` is available only in the root session; `load_skill` and `connection_search` appear only when the agent declares the corresponding resources; `ask_question` requires a session that can request user input; and `web_search` requires a supported model provider. The harness advertises only the tools available to the current session.
10
+ Default tools require no imports. The exact set depends on the agent and session, and the harness advertises only the tools available to the current session.
11
11
 
12
- The default shell and file tools (`bash`, `read_file`, and `write_file`) run in the app and proxy their work into the agent's [sandbox](../sandbox). The table shows where each tool's effect lands.
12
+ ### Disable optional default tools
13
13
 
14
- | Tool | Does | Where it runs |
15
- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
16
- | `bash` | Run a shell command. | Sandbox |
17
- | `read_file` | Read a text file with line-numbered output (enables read-before-write). | Sandbox FS |
18
- | `write_file` | Write a complete file; enforces read-before-write and stale-read detection. | Sandbox FS |
19
- | `web_fetch` | Fetch a URL. | App runtime |
20
- | `web_search` | Search the web (provider-managed; resolved from the model provider). | Provider |
21
- | `todo` | Maintain a durable per-session todo list. | App runtime |
22
- | `ask_question` | Ask the user a clarifying question or a choice mid-turn and park until they answer. No `execute`; the model calls it with `{ prompt, options?, allowFreeform? }`. See [Human-in-the-loop](/docs/human-in-the-loop). | App runtime |
23
- | `agent` | From the root session, delegate a subtask to a fresh copy of the root agent. | App runtime |
24
- | `load_skill` | Pull an on-demand [skill](../skills)'s instructions into the current turn. Present only when the agent declares skills. | App runtime |
25
- | `connection_search` | Discover tools across declared [connections](../connections); matched tools become directly callable. Present only when the agent declares connections. | App runtime |
14
+ Optional default tools are enabled unless you set `defaultTools: false` in `agent/agent.ts`:
26
15
 
27
- The model-facing file tools accept absolute paths and paths beginning with `$HOME/`. eve resolves `$HOME` against the sandbox before invoking non-shell file operations, so packaged skill references such as `$HOME/.agents/skills/<skill>/references/...` work consistently across `read_file`, `write_file`, and the opt-in `glob` and `grep` tools.
16
+ ```ts title="agent/agent.ts"
17
+ import { defineAgent } from "eve";
28
18
 
29
- Notes:
19
+ export default defineAgent({
20
+ defaultTools: false,
21
+ model: "openai/gpt-5.4",
22
+ });
23
+ ```
30
24
 
31
- - **`agent`** is available only in the root session and always runs in the background. Its call returns a task receipt immediately, and task notifications deliver updates or the final result. The child uses the root's instructions, tools, connections, and sandbox, but starts with fresh conversation history and fresh [state](./state). The child receives neither `agent` nor `Workflow`; declared subagents do not receive the built-in `agent` either. See [Subagents](../subagents).
32
- - **`load_skill`** only pulls instructions into context. It adds no new execution surface, because behavior still comes from the tools the agent already has.
33
- - **`connection_search`** surfaces a connection's tools by their qualified name (e.g. `linear__list_issues`), which the model can then call directly. The model sees it only when the agent has connections.
34
- - **`web_search`** has no local executor; the provider runs it. AI Gateway models use Exa by default. To use Parallel instead, export `webSearch({ provider: "parallel" })` from `agent/tools/web_search.ts`. Direct provider models continue to use their native search implementation. To supply your own implementation, override it with `defineTool()`.
35
- - **`web_fetch`** follows up to ten redirects, rechecking every destination for SSRF safety. Non-success HTTP responses return a plain-text failure result with the response body when available instead of failing the tool call.
25
+ This turns off the optional defaults described below. Add back only the tools the agent needs with the command in each tool's section. Existing files under `agent/tools/` remain available, including same-name replacements such as `agent/tools/bash.ts`.
36
26
 
37
- Review these default tools before production use. Disable, wrap, restrict, or require approval for any tool that can access the filesystem, network, shell, or sensitive data.
27
+ `connection_search` stays available when the agent has connections because it provides access to their tools.
38
28
 
39
- ## Add framework-provided tools
29
+ ### `bash`
40
30
 
41
- Some framework-provided tools stay out of the default set. Add the corresponding file when your agent needs one:
31
+ `bash` runs shell commands in the agent's [sandbox](../sandbox).
42
32
 
43
- | Tool | Definition to export | Purpose |
44
- | ------- | -------------------------------- | ------------------------------------------ |
45
- | `glob` | `glob` from `eve/tools/glob` | Find sandbox files by glob pattern. |
46
- | `grep` | `grep` from `eve/tools/grep` | Search sandbox file contents by regex. |
47
- | `sleep` | `sleep()` from `eve/tools/sleep` | Pause and durably resume the current turn. |
33
+ ```sh
34
+ eve add tool/bash
35
+ ```
48
36
 
49
- For example, add file discovery and content search with two files:
37
+ ```ts title="agent/tools/bash.ts"
38
+ export { default } from "eve/tools/bash";
39
+ ```
50
40
 
51
- ```ts title="agent/tools/glob.ts"
52
- export { glob as default } from "eve/tools/glob";
41
+ Override its description, approval policy, or executor by wrapping the exported definition:
42
+
43
+ ```ts title="agent/tools/bash.ts"
44
+ import { defineTool } from "eve/tools";
45
+ import { bash } from "eve/tools/bash";
46
+
47
+ export default defineTool({
48
+ ...bash,
49
+ description: "Run approved project maintenance commands.",
50
+ async execute(input, ctx) {
51
+ console.info("Running sandbox command", input.command);
52
+ return bash.execute(input, ctx);
53
+ },
54
+ });
53
55
  ```
54
56
 
55
- ```ts title="agent/tools/grep.ts"
56
- export { grep as default } from "eve/tools/grep";
57
+ Disable only `bash`:
58
+
59
+ ```ts title="agent/tools/bash.ts"
60
+ import { disableTool } from "eve/tools";
61
+
62
+ export default disableTool();
57
63
  ```
58
64
 
59
- The filename supplies the model-facing tool name. The tools run against the agent's sandbox and use the same schemas, results, and error behavior as eve's framework implementations. Wrap either definition with `defineTool({ ...glob, description: "..." })` or `defineTool({ ...grep, description: "..." })` when you need to change its description or approval policy.
65
+ ### `read_file`
66
+
67
+ `read_file` reads text files from the sandbox with line-numbered output. It accepts absolute paths and paths beginning with `$HOME/`.
60
68
 
61
- The section below covers `sleep` in more detail.
69
+ ```sh
70
+ eve add tool/read_file
71
+ ```
72
+
73
+ ```ts title="agent/tools/read_file.ts"
74
+ export { default } from "eve/tools/read_file";
75
+ ```
62
76
 
63
- ## Override a default
77
+ Override it:
64
78
 
65
- Author a tool at the same slug and it takes over the built-in of that name. The file `agent/tools/write_file.ts` replaces the built-in `write_file` by existing:
79
+ ```ts title="agent/tools/read_file.ts"
80
+ import { defineTool } from "eve/tools";
81
+ import { readFile } from "eve/tools/read_file";
82
+
83
+ export default defineTool({
84
+ ...readFile,
85
+ description: "Read project files from the sandbox.",
86
+ });
87
+ ```
88
+
89
+ Disable it:
90
+
91
+ ```ts title="agent/tools/read_file.ts"
92
+ import { disableTool } from "eve/tools";
93
+
94
+ export default disableTool();
95
+ ```
96
+
97
+ ### `write_file`
98
+
99
+ `write_file` writes complete files in the sandbox. It enforces read-before-write and stale-read detection, and accepts absolute paths and paths beginning with `$HOME/`.
100
+
101
+ ```sh
102
+ eve add tool/write_file
103
+ ```
104
+
105
+ ```ts title="agent/tools/write_file.ts"
106
+ export { default } from "eve/tools/write_file";
107
+ ```
108
+
109
+ Override it:
66
110
 
67
111
  ```ts title="agent/tools/write_file.ts"
68
112
  import { defineTool } from "eve/tools";
69
113
  import { writeFile } from "eve/tools/write_file";
70
114
 
71
115
  export default defineTool({
72
- ...writeFile, // keep the default description, schema, and executor
116
+ ...writeFile,
117
+ description: "Write approved project files in the sandbox.",
73
118
  async execute(input, ctx) {
74
- console.log("[write_file]", input.path);
119
+ if (!input.filePath.startsWith("/workspace/")) {
120
+ throw new Error("write_file is limited to /workspace");
121
+ }
75
122
  return writeFile.execute(input, ctx);
76
123
  },
77
124
  });
78
125
  ```
79
126
 
80
- Import each reusable definition from its own subpath:
127
+ Disable it:
128
+
129
+ ```ts title="agent/tools/write_file.ts"
130
+ import { disableTool } from "eve/tools";
131
+
132
+ export default disableTool();
133
+ ```
134
+
135
+ ### `web_fetch`
136
+
137
+ `web_fetch` fetches URLs from the app runtime. It follows up to ten redirects and checks every destination for SSRF safety. Non-success responses return plain text with the response body when available.
138
+
139
+ ```sh
140
+ eve add tool/web_fetch
141
+ ```
142
+
143
+ ```ts title="agent/tools/web_fetch.ts"
144
+ export { default } from "eve/tools/web_fetch";
145
+ ```
146
+
147
+ Override it:
148
+
149
+ ```ts title="agent/tools/web_fetch.ts"
150
+ import { defineTool } from "eve/tools";
151
+ import { webFetch } from "eve/tools/web_fetch";
152
+
153
+ export default defineTool({
154
+ ...webFetch,
155
+ description: "Fetch approved public documentation URLs.",
156
+ async execute(input, ctx) {
157
+ const hostname = new URL(input.url).hostname;
158
+ if (hostname !== "docs.example.com") {
159
+ throw new Error("web_fetch is limited to docs.example.com");
160
+ }
161
+ return webFetch.execute(input, ctx);
162
+ },
163
+ });
164
+ ```
165
+
166
+ Disable it:
167
+
168
+ ```ts title="agent/tools/web_fetch.ts"
169
+ import { disableTool } from "eve/tools";
170
+
171
+ export default disableTool();
172
+ ```
173
+
174
+ ### `web_search`
81
175
 
82
- | Definition | Import | Registered by default |
83
- | ----------- | ---------------------- | --------------------- |
84
- | `bash` | `eve/tools/bash` | Yes |
85
- | `readFile` | `eve/tools/read_file` | Yes |
86
- | `writeFile` | `eve/tools/write_file` | Yes |
87
- | `todo` | `eve/tools/todo` | Yes |
88
- | `webFetch` | `eve/tools/web_fetch` | Yes |
89
- | `loadSkill` | `eve/tools/load_skill` | Yes |
90
- | `glob` | `eve/tools/glob` | No |
91
- | `grep` | `eve/tools/grep` | No |
176
+ `web_search` uses provider-managed web search and appears only for supported model providers. AI Gateway models use Exa by default; direct provider models use their native search implementation.
92
177
 
93
- Importing a definition does not add it to an agent; export it from the corresponding `agent/tools/*.ts` file. Skip the spread and your replacement owns its own context. A fresh `defineTool` for `todo` does not inherit the default's durable state key.
178
+ ```sh
179
+ eve add tool/web_search
180
+ ```
94
181
 
95
- Provider-managed web search has a dedicated configuration helper instead of an executable default:
182
+ ```ts title="agent/tools/web_search.ts"
183
+ export { default } from "eve/tools/web_search";
184
+ ```
185
+
186
+ Override the provider-managed configuration for AI Gateway:
96
187
 
97
188
  ```ts title="agent/tools/web_search.ts"
98
189
  import { webSearch } from "eve/tools/web_search";
@@ -100,41 +191,279 @@ import { webSearch } from "eve/tools/web_search";
100
191
  export default webSearch({ provider: "parallel" });
101
192
  ```
102
193
 
103
- Set `provider` to `"exa"` or `"parallel"`. Without this file, AI Gateway models use Exa.
194
+ Replace provider-managed search with an authored implementation:
195
+
196
+ ```ts title="agent/tools/web_search.ts"
197
+ import { defineTool } from "eve/tools";
104
198
 
105
- ## Disable a default
199
+ export default defineTool({
200
+ description: "Search the internal documentation index.",
201
+ inputSchema: { type: "object" },
202
+ async execute(input) {
203
+ return { results: [], query: input };
204
+ },
205
+ });
206
+ ```
106
207
 
107
- Export a `disableTool()` sentinel from a file named after the tool's slug. The filename is what picks the default to remove:
208
+ Disable it:
108
209
 
109
- ```ts title="agent/tools/bash.ts"
210
+ ```ts title="agent/tools/web_search.ts"
211
+ import { disableTool } from "eve/tools";
212
+
213
+ export default disableTool();
214
+ ```
215
+
216
+ ### `todo`
217
+
218
+ `todo` maintains a durable todo list for the session.
219
+
220
+ ```sh
221
+ eve add tool/todo
222
+ ```
223
+
224
+ ```ts title="agent/tools/todo.ts"
225
+ export { default } from "eve/tools/todo";
226
+ ```
227
+
228
+ Override it. Spreading the definition preserves its durable state key:
229
+
230
+ ```ts title="agent/tools/todo.ts"
231
+ import { defineTool } from "eve/tools";
232
+ import { todo } from "eve/tools/todo";
233
+
234
+ export default defineTool({
235
+ ...todo,
236
+ description: "Track the current implementation plan.",
237
+ });
238
+ ```
239
+
240
+ Disable it:
241
+
242
+ ```ts title="agent/tools/todo.ts"
243
+ import { disableTool } from "eve/tools";
244
+
245
+ export default disableTool();
246
+ ```
247
+
248
+ ### `ask_question`
249
+
250
+ `ask_question` asks the user for clarification or a choice, then parks the turn until they answer. It appears only when the session can request user input. See [Human-in-the-loop](/docs/human-in-the-loop).
251
+
252
+ ```sh
253
+ eve add tool/ask_question
254
+ ```
255
+
256
+ ```ts title="agent/tools/ask_question.ts"
257
+ export { default } from "eve/tools/ask_question";
258
+ ```
259
+
260
+ Replace its request-input behavior with an ordinary authored tool:
261
+
262
+ ```ts title="agent/tools/ask_question.ts"
263
+ import { defineTool } from "eve/tools";
264
+
265
+ export default defineTool({
266
+ description: "Record a clarification request.",
267
+ inputSchema: { type: "object" },
268
+ async execute(input) {
269
+ return { recorded: input };
270
+ },
271
+ });
272
+ ```
273
+
274
+ Disable it:
275
+
276
+ ```ts title="agent/tools/ask_question.ts"
277
+ import { disableTool } from "eve/tools";
278
+
279
+ export default disableTool();
280
+ ```
281
+
282
+ ### `agent`
283
+
284
+ `agent` delegates a subtask to a fresh copy of the root agent. It is root-only, always runs in the background, and returns a task receipt immediately. The child receives the root's instructions, tools, connections, and sandbox, but starts with fresh conversation history and [state](./state). See [Subagents](../subagents).
285
+
286
+ ```sh
287
+ eve add tool/agent
288
+ ```
289
+
290
+ ```ts title="agent/tools/agent.ts"
291
+ export { default } from "eve/tools/agent";
292
+ ```
293
+
294
+ The framework behavior cannot be overridden. Re-export the definition above to restore it, or disable it:
295
+
296
+ ```ts title="agent/tools/agent.ts"
297
+ import { disableTool } from "eve/tools";
298
+
299
+ export default disableTool();
300
+ ```
301
+
302
+ ### `task_cancel`
303
+
304
+ `task_cancel` lets the root session cancel background tasks.
305
+
306
+ ```sh
307
+ eve add tool/task_cancel
308
+ ```
309
+
310
+ ```ts title="agent/tools/task_cancel.ts"
311
+ export { default } from "eve/tools/task_cancel";
312
+ ```
313
+
314
+ The framework behavior cannot be overridden. Re-export the definition above to restore it, or disable it:
315
+
316
+ ```ts title="agent/tools/task_cancel.ts"
317
+ import { disableTool } from "eve/tools";
318
+
319
+ export default disableTool();
320
+ ```
321
+
322
+ ### `task_update`
323
+
324
+ `task_update` lets a background task report progress to its parent. It appears only in delegated task sessions.
325
+
326
+ ```sh
327
+ eve add tool/task_update
328
+ ```
329
+
330
+ ```ts title="agent/tools/task_update.ts"
331
+ export { default } from "eve/tools/task_update";
332
+ ```
333
+
334
+ The framework behavior cannot be overridden. Re-export the definition above to restore it, or disable it:
335
+
336
+ ```ts title="agent/tools/task_update.ts"
337
+ import { disableTool } from "eve/tools";
338
+
339
+ export default disableTool();
340
+ ```
341
+
342
+ ### `load_skill`
343
+
344
+ `load_skill` pulls an on-demand [skill](../skills)'s instructions into the current turn. It appears only when the agent declares skills and adds no execution surface by itself.
345
+
346
+ ```sh
347
+ eve add tool/load_skill
348
+ ```
349
+
350
+ ```ts title="agent/tools/load_skill.ts"
351
+ export { default } from "eve/tools/load_skill";
352
+ ```
353
+
354
+ Override it:
355
+
356
+ ```ts title="agent/tools/load_skill.ts"
357
+ import { defineTool } from "eve/tools";
358
+ import { loadSkill } from "eve/tools/load_skill";
359
+
360
+ export default defineTool({
361
+ ...loadSkill,
362
+ description: "Load instructions for an available skill.",
363
+ });
364
+ ```
365
+
366
+ Disable it:
367
+
368
+ ```ts title="agent/tools/load_skill.ts"
110
369
  import { disableTool } from "eve/tools";
111
370
 
112
371
  export default disableTool();
113
372
  ```
114
373
 
115
- Use `agent/tools/agent.ts` to remove the root-only `agent` delegation tool. The root session then receives no tool for delegating to a fresh copy of itself, and the model never sees that tool.
374
+ ### `connection_search`
375
+
376
+ `connection_search` discovers tools across declared [connections](../connections) and makes matches directly callable by qualified name, such as `linear__list_issues`. eve adds it automatically when connections exist, even when `defaultTools` is `false`, so there is no add command.
116
377
 
117
- If the filename matches no known framework tool, resolution fails instead of silently doing nothing, so a typo surfaces at build time rather than removing the wrong tool.
378
+ An authored `agent/tools/connection_search.ts` replaces the framework behavior. Import the framework definition from `eve/tools/connection_search` when you need to reference it directly. Exporting `disableTool()` from this slot is an error because agents with connections require connection discovery.
118
379
 
119
- ## When to override, disable, or author a new tool
380
+ Review these tools before production use. Disable, wrap, restrict, or require approval for any tool that can access the filesystem, network, shell, or sensitive data.
120
381
 
121
- Three moves shape the harness. The right one depends on whether the model should keep the built-in capability.
382
+ You can also add the opt-in framework tools described below.
122
383
 
123
- - **Override** when you want the same capability with different behavior. Import its definition from the matching `eve/tools/<name>` subpath and wrap it (logging, an extra guard, or a different backend), and the model still sees a tool by that name. Spreading keeps the default's description, schema, and any framework state, such as the `todo` tool's durable state key. Drop the spread and your replacement owns its own context, losing that wiring.
124
- - **Disable** when the model should not have the capability at all. A `disableTool()` sentinel removes the built-in, and the model never sees it. Reach for this to lock down `bash` or `web_fetch` in an agent that should not run shell commands or fetch arbitrary URLs.
125
- - **Author a new tool** when you want a capability the harness does not ship. Give it a fresh slug under `agent/tools/` and it joins the built-ins instead of replacing one. See [Tools](../tools) for the authoring model.
384
+ ## Opt-in framework tools
126
385
 
127
- ## The opt-in `sleep` tool
386
+ These framework-provided tools are not added by default. Add only the ones the agent needs.
128
387
 
129
- The framework also ships a durable `sleep` tool, but does not add it to agents by default. Enable it with `agent/tools/sleep.ts`:
388
+ ### `glob`
389
+
390
+ `glob` finds sandbox files by glob pattern. Add it:
391
+
392
+ ```sh
393
+ eve add tool/glob
394
+ ```
395
+
396
+ ```ts title="agent/tools/glob.ts"
397
+ export { default } from "eve/tools/glob";
398
+ ```
399
+
400
+ Customize it by wrapping the framework definition:
401
+
402
+ ```ts title="agent/tools/glob.ts"
403
+ import { defineTool } from "eve/tools";
404
+ import { glob } from "eve/tools/glob";
405
+
406
+ export default defineTool({
407
+ ...glob,
408
+ description: "Find project files by glob pattern.",
409
+ });
410
+ ```
130
411
 
131
- ```ts
412
+ Remove the file to remove the tool. `disableTool()` is unnecessary because `glob` is not added by default.
413
+
414
+ ### `grep`
415
+
416
+ `grep` searches sandbox file contents with a regular expression. Add it:
417
+
418
+ ```sh
419
+ eve add tool/grep
420
+ ```
421
+
422
+ ```ts title="agent/tools/grep.ts"
423
+ export { default } from "eve/tools/grep";
424
+ ```
425
+
426
+ Customize it by wrapping the framework definition:
427
+
428
+ ```ts title="agent/tools/grep.ts"
429
+ import { defineTool } from "eve/tools";
430
+ import { grep } from "eve/tools/grep";
431
+
432
+ export default defineTool({
433
+ ...grep,
434
+ description: "Search project files with a regular expression.",
435
+ });
436
+ ```
437
+
438
+ Remove the file to remove the tool. `disableTool()` is unnecessary because `grep` is not added by default.
439
+
440
+ ### `sleep`
441
+
442
+ `sleep` pauses and durably resumes the current turn. The model calls it with `{ seconds }`; the wait does not hold an application runtime open. Concurrent calls run in parallel, and the turn resumes after the longest wait. Add it:
443
+
444
+ ```sh
445
+ eve add tool/sleep
446
+ ```
447
+
448
+ ```ts title="agent/tools/sleep.ts"
132
449
  import { sleep } from "eve/tools/sleep";
133
450
 
134
451
  export default sleep();
135
452
  ```
136
453
 
137
- The model calls it with `{ seconds }` when it is useful to wait before checking progress or status again. Each call runs as a durable tool workflow, so it does not hold an application runtime open, and the same turn continues automatically when the duration elapses. Concurrent `sleep` calls run in parallel, so the turn continues after the longest requested duration.
454
+ Customize it by wrapping the framework definition:
455
+
456
+ ```ts title="agent/tools/sleep.ts"
457
+ import { defineWorkflowTool } from "eve/tools";
458
+ import { sleep } from "eve/tools/sleep";
459
+
460
+ export default defineWorkflowTool({
461
+ ...sleep(),
462
+ description: "Pause before checking an external operation again.",
463
+ });
464
+ ```
465
+
466
+ Remove the file to remove the tool. `disableTool()` is unnecessary because `sleep` is not added by default.
138
467
 
139
468
  ## What to read next
140
469
 
@@ -18,6 +18,12 @@ export default defineAgent({
18
18
  });
19
19
  ```
20
20
 
21
+ Before summarizing, eve tries to shorten oversized tool results in older history.
22
+ It checks whether that reduction is sufficient using the last provider-reported
23
+ input token count plus an estimate of new messages. A smaller character estimate
24
+ alone cannot satisfy compaction triggered by a higher provider count. If trimming
25
+ cannot free enough space, eve summarizes the older history.
26
+
21
27
  Compaction also preserves the framework's own tool state automatically. It resets read-before-write tracking (so a write afterward re-reads the file whose read evidence was summarized away) and re-injects the active todo list, so the model keeps its task list across the summary. There is no per-tool hook to configure.
22
28
 
23
29
  First-class [memory](../memory) participates in a separate lifecycle. eve asks
@@ -119,6 +119,10 @@ Alongside `type` and `data`, every event carries a `meta` envelope:
119
119
 
120
120
  - **`meta.id`** uniquely identifies the event. It is an `evt_`-prefixed [ULID](https://github.com/ulid/spec): a millisecond timestamp followed by random bits, so ids are broadly time-ordered.
121
121
  - **`meta.at`** is the ISO-8601 time the event was emitted.
122
+ - **`meta.deliveryIds`**, when present, identifies the accepted messages that own
123
+ the turn. `POST /eve/v1/session/:sessionId` returns its `deliveryId`, allowing
124
+ clients to skip earlier turns when resuming from an old cursor. Coalesced
125
+ messages share the same turn events.
122
126
 
123
127
  `meta.id` is stable. eve mints it once, when the event is written to the durable stream, and stores it with the event. Reconnecting from a cursor, rewinding to `startIndex=0`, or replaying a finished session all return the same id for the same event.
124
128
 
@@ -150,6 +150,10 @@ export default defineOpenAPIConnection({
150
150
 
151
151
  The parameter `name` must exactly match the placeholder inside the path. If the spec omits an `in: "path"` parameter, the generated tool has no input for that segment and eve cannot fill it in from query parameters.
152
152
 
153
+ ## Schema annotations
154
+
155
+ eve removes `default` and `example` annotations when their values conflict with the declared schema type. For example, a boolean property with `default: "false"` loses that annotation, while `default: false` is retained. This prevents invalid examples from guiding model input; eve does not coerce annotation values.
156
+
153
157
  ## Approval gates
154
158
 
155
159
  Generated operations can mutate state like authored tools. Use the shared connection `approval` option for human approval, and combine it with `operations.allow` for the smallest practical surface. See [Per-connection approval](../connections#per-connection-approval) for the helpers and [Human-in-the-loop](../human-in-the-loop#approvals) for policy behavior.
@@ -200,7 +200,7 @@ export default defineMcpClientConnection({
200
200
  });
201
201
  ```
202
202
 
203
- `"linear/myagent"` is the UID you chose when registering the Connect client. `connect("linear/myagent")` is shorthand for a user-scoped interactive OAuth connection: eve resolves a token for the active user before each tool call, emits `authorization.required` when that user has not authorized yet, and resumes the parked turn after the callback completes.
203
+ Use the connector UID returned by `vercel connect create`; the display name passed to `--name` is not the UID. `connect("linear/myagent")` is shorthand for a user-scoped interactive OAuth connection: eve resolves a token for the active user before each tool call, emits `authorization.required` when that user has not authorized yet, and resumes the parked turn after the callback completes.
204
204
 
205
205
  When a local subagent needs interactive authorization, eve surfaces the authorization lifecycle on the root session's channel, including through nested subagent chains. The challenge still points to the child session's callback, so completing it resumes the child directly while the parent continues waiting for its result.
206
206
 
@@ -35,6 +35,8 @@ Tag filters compose: `--tag` keeps evals carrying at least one listed tag, then
35
35
 
36
36
  An eval that calls `t.skip(reason)` is reported as skipped, does not count as passed or failed, and never changes the exit code.
37
37
 
38
+ `eve eval --json` flushes the complete report before exiting, including when stdout is piped to another process or redirected to a file.
39
+
38
40
  ## Artifacts
39
41
 
40
42
  Each run drops artifacts under `.eve/evals/<timestamp>/`: a run `summary.json`, a `results.jsonl` index, and per-eval assertion results, verdicts, captured event streams, and `t.log` lines under `evals/`. The console output stays tight on purpose; when an eval fails, the artifact has the full story.
@@ -52,6 +52,17 @@ console.log((await response.result()).message);
52
52
  `attach()` performs no request. Every later operation targets exactly
53
53
  `saved.sessionId`; it never follows or creates a replacement.
54
54
 
55
+ `send()` correlates its response with the message accepted by the server. If the
56
+ saved cursor is behind, it skips earlier turns and advances past them before
57
+ collecting the new result, including when another turn is active or queued. You
58
+ do not need to drain the stream before sending. Upgrade the server alongside the
59
+ client: a server that omits the accepted delivery identity causes `send()` to
60
+ throw instead of returning an ambiguous result.
61
+
62
+ If a configured reconnect limit ends the stream before the accepted turn reaches
63
+ a boundary, collecting its response throws. A partial stream is not a completed
64
+ result.
65
+
55
66
  ## Waiting, completed, and reset sessions
56
67
 
57
68
  A session that emits `session.waiting` accepts another message through the same
@@ -24,7 +24,7 @@ The cancellation result is discriminated by `status`: only `accepted` includes
24
24
 
25
25
  Cancellation does not replace stream consumption. Continue reading the response to observe its terminal `turn.cancelled` and `session.waiting` boundary and to advance the client session cursor normally. Use `session.cancel({ turnId })` instead when you have only a fixed session handle and an observed turn ID.
26
26
 
27
- Between turns, `session.compact()` queues context compaction without sending model input. An accepted request reports the session id; consume the durable stream through the following `session.waiting` boundary before sending the next turn. `compaction.completed` confirms that summarization succeeded; without it, eve preserves the previous history. A never-started session returns `no_active_session` as a successful no-op.
27
+ Between turns, `session.compact()` queues context compaction without sending model input. An accepted request reports the session id; consume the durable stream through the following `session.waiting` boundary before sending the next turn. `compaction.completed` confirms that summarization succeeded; without it, eve preserves the previous history, including when the model returns an empty summary. A never-started session returns `no_active_session` as a successful no-op.
28
28
 
29
29
  ```ts
30
30
  const compaction = await session.compact();
@@ -57,6 +57,10 @@ This consumes the stream until the current turn boundary:
57
57
  - `session.completed`
58
58
  - `session.failed`
59
59
 
60
+ `result()` closes that HTTP stream, including when fetch instrumentation clones
61
+ the response for tracing. The durable session remains available for follow-up
62
+ turns after `session.waiting`.
63
+
60
64
  ## Stream events live
61
65
 
62
66
  Use `for await...of` when you want to render progress:
@@ -149,6 +153,8 @@ The stream can emit an interim `session.waiting` while the authorization callbac
149
153
 
150
154
  HTTP connections can end before a run does. The client reconnects from the number of events already consumed, so long turns continue without replaying events. By default, a turn response keeps reconnecting until it reaches a turn boundary or is aborted, including while the turn is paused for authorization. A manually opened `session.stream()` eventually stops after repeated empty streams when it can no longer make progress.
151
155
 
156
+ Browser failures while reading a response body, including `TypeError: Load failed` and `TypeError: network error`, use the same reconnect policy. Invalid stream events still fail the read.
157
+
152
158
  If your consumer persists events, key on `event.meta.id`. It is stable across reconnects and rewinds, so an overlapping replay is safe to ingest twice. See [the event envelope](../../concepts/sessions-runs-and-streaming#the-event-envelope).
153
159
 
154
160
  Set `streamReconnectPolicy: { reconnect: false }` when a relay or proxy owns the cursor and reconnection policy. This makes a single stream GET attempt and returns when that connection ends; it does not stop the server-side turn: