eve 0.34.0 → 0.36.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 (280) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +3 -3
  3. package/dist/src/chunks/{use-eve-agent-BNdcle_M.js → use-eve-agent-COmP-H8R.js} +6 -3
  4. package/dist/src/chunks/{use-eve-agent-FJkEMXYk.js → use-eve-agent-CnppTEFk.js} +6 -3
  5. package/dist/src/cli/commands/info.js +1 -1
  6. package/dist/src/cli/commands/trace-detail.d.ts +3 -2
  7. package/dist/src/cli/commands/trace-detail.js +1 -1
  8. package/dist/src/cli/dev/tui/traces/trace-conversation.d.ts +4 -6
  9. package/dist/src/cli/dev/tui/traces/trace-conversation.js +1 -2
  10. package/dist/src/client/agent-info-schema.d.ts +12 -4
  11. package/dist/src/client/agent-info-schema.js +1 -1
  12. package/dist/src/client/index.d.ts +1 -1
  13. package/dist/src/compiled/.vendor-stamp.json +3 -3
  14. package/dist/src/compiled/@chat-adapter/slack/index.js +1 -1
  15. package/dist/src/compiled/@workflow/core/index.js +1 -1
  16. package/dist/src/compiled/@workflow/core/runtime.js +3 -3
  17. package/dist/src/compiled/@workflow/core/workflow.js +1 -1
  18. package/dist/src/compiled/@workflow/world/env-config.d.ts +1 -0
  19. package/dist/src/compiled/@workflow/world/events.d.ts +92 -35
  20. package/dist/src/compiled/@workflow/world/index.d.ts +3 -2
  21. package/dist/src/compiled/@workflow/world/interfaces.d.ts +25 -23
  22. package/dist/src/compiled/@workflow/world/queue.d.ts +4 -0
  23. package/dist/src/compiled/@workflow/world/runs.d.ts +4 -0
  24. package/dist/src/compiled/@workflow/world/slot-identity.d.ts +53 -0
  25. package/dist/src/compiled/@workflow/world/spec-version.d.ts +36 -1
  26. package/dist/src/compiled/@workflow/world/steps.d.ts +4 -0
  27. package/dist/src/compiled/@workflow/world/ulid.d.ts +6 -0
  28. package/dist/src/compiled/@workflow/world-local/index.js +4 -4
  29. package/dist/src/compiled/@workflow/world-vercel/index.js +13 -17
  30. package/dist/src/compiled/_chunks/workflow/{attribute-changes-6OqdYdi4.js → attribute-changes-BoH7JsWp.js} +3 -3
  31. package/dist/src/compiled/_chunks/workflow/dist-DlFv0aHY.js +40 -0
  32. package/dist/src/compiled/_chunks/workflow/env-config-DxamfI7T.js +1 -0
  33. package/dist/src/compiled/_chunks/workflow/frames-CTpeJYEQ.js +3 -0
  34. package/dist/src/compiled/_chunks/workflow/{functions-CXb61C6h.js → functions-CeeNvKsq.js} +1 -1
  35. package/dist/src/compiled/_chunks/workflow/resume-hook-BPQHjeY5.js +1 -0
  36. package/dist/src/compiled/_chunks/workflow/run-DQ5dOyjm.js +1 -0
  37. package/dist/src/compiled/_chunks/workflow/run-id-BdE0MZz9.js +1 -0
  38. package/dist/src/compiled/_chunks/workflow/sleep-CzdoBiqy.js +1 -0
  39. package/dist/src/compiled/_chunks/workflow/spec-version-DBUVfF_R.js +1 -0
  40. package/dist/src/compiled/_chunks/workflow/undici-CUIybhQ2.js +95 -0
  41. package/dist/src/compiled/_chunks/workflow/wait-until-DK2lnH6U.js +15 -0
  42. package/dist/src/compiled/_chunks/workflow/{wrapper-CDq65xJV.js → wrapper-CMGju7QA.js} +1 -1
  43. package/dist/src/compiled/_chunks/workflow/ws-transport-Csi6Cydc.js +1 -0
  44. package/dist/src/compiler/extension-compatibility.d.ts +10 -10
  45. package/dist/src/compiler/extension-compatibility.js +1 -1
  46. package/dist/src/compiler/manifest.d.ts +8 -8
  47. package/dist/src/compiler/manifest.js +1 -1
  48. package/dist/src/compiler/normalize-extension.d.ts +3 -3
  49. package/dist/src/compiler/normalize-extension.js +1 -1
  50. package/dist/src/compiler/normalize-instructions.d.ts +1 -1
  51. package/dist/src/compiler/normalize-instructions.js +1 -1
  52. package/dist/src/compiler/normalize-manifest.js +1 -3
  53. package/dist/src/context/dynamic-instruction-lifecycle.d.ts +5 -1
  54. package/dist/src/context/dynamic-instruction-lifecycle.js +1 -1
  55. package/dist/src/context/keys.d.ts +6 -2
  56. package/dist/src/context/keys.js +1 -1
  57. package/dist/src/discover/manifest.d.ts +1 -1
  58. package/dist/src/discover/manifest.js +1 -1
  59. package/dist/src/evals/context.js +1 -1
  60. package/dist/src/evals/index.d.ts +2 -2
  61. package/dist/src/evals/reporters/index.d.ts +1 -1
  62. package/dist/src/evals/runner/artifacts.js +1 -1
  63. package/dist/src/evals/runner/execute-eval.d.ts +5 -0
  64. package/dist/src/evals/runner/execute-eval.js +1 -1
  65. package/dist/src/evals/runner/execute-task.d.ts +3 -0
  66. package/dist/src/evals/runner/execute-task.js +1 -1
  67. package/dist/src/evals/runner/reporters/braintrust.js +1 -1
  68. package/dist/src/evals/runner/reporters/types.d.ts +28 -2
  69. package/dist/src/evals/runner/run-evals.js +1 -1
  70. package/dist/src/evals/session.d.ts +12 -2
  71. package/dist/src/evals/session.js +1 -1
  72. package/dist/src/evals/target.js +1 -1
  73. package/dist/src/evals/types.d.ts +12 -1
  74. package/dist/src/execution/node-step.js +1 -1
  75. package/dist/src/execution/session.js +1 -1
  76. package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
  77. package/dist/src/execution/workflow-steps.js +1 -1
  78. package/dist/src/execution/workflow-trace-context.d.ts +11 -0
  79. package/dist/src/execution/workflow-trace-context.js +1 -0
  80. package/dist/src/harness/ai-sdk-hook-bridge.d.ts +1 -1
  81. package/dist/src/harness/ai-sdk-hook-bridge.js +1 -1
  82. package/dist/src/harness/approval-delivery-coordinator.js +1 -1
  83. package/dist/src/harness/channel-delivery-instrumentation.d.ts +1 -1
  84. package/dist/src/harness/channel-delivery-instrumentation.js +1 -1
  85. package/dist/src/harness/emission.d.ts +2 -2
  86. package/dist/src/harness/emission.js +1 -1
  87. package/dist/src/harness/instrumentation/config.js +1 -0
  88. package/dist/src/harness/{instrumentation-content.d.ts → instrumentation/content.d.ts} +1 -1
  89. package/dist/src/harness/{instrumentation-dispatch.d.ts → instrumentation/dispatch.d.ts} +1 -1
  90. package/dist/src/harness/{instrumentation-dispatch.js → instrumentation/dispatch.js} +1 -1
  91. package/dist/src/harness/{instrumentation-lifecycle.d.ts → instrumentation/lifecycle.d.ts} +3 -6
  92. package/dist/src/harness/{instrumentation-lifecycle.js → instrumentation/lifecycle.js} +1 -1
  93. package/dist/src/harness/{instrumentation-native-events.d.ts → instrumentation/native-events.d.ts} +1 -1
  94. package/dist/src/harness/{instrumentation-native-events.js → instrumentation/native-events.js} +1 -1
  95. package/dist/src/harness/{instrumentation-providers.d.ts → instrumentation/providers.d.ts} +1 -1
  96. package/dist/src/harness/{instrumentation-providers.js → instrumentation/providers.js} +1 -1
  97. package/dist/src/harness/{instrumentation-runtime.d.ts → instrumentation/runtime.d.ts} +4 -2
  98. package/dist/src/harness/{instrumentation-state.d.ts → instrumentation/state.d.ts} +1 -1
  99. package/dist/src/harness/parent-lineage.d.ts +1 -1
  100. package/dist/src/harness/prepare-trace-context.d.ts +16 -0
  101. package/dist/src/harness/prepare-trace-context.js +1 -0
  102. package/dist/src/harness/tool-loop.js +2 -2
  103. package/dist/src/harness/types.d.ts +1 -1
  104. package/dist/src/internal/application/compiled-artifacts.js +2 -2
  105. package/dist/src/internal/application/package.js +1 -1
  106. package/dist/src/internal/authored-definition/core.d.ts +3 -3
  107. package/dist/src/internal/authored-definition/core.js +1 -1
  108. package/dist/src/internal/authored-package-boundary.js +1 -1
  109. package/dist/src/internal/helpers/markdown.js +1 -1
  110. package/dist/src/internal/instrumentation.d.ts +1 -1
  111. package/dist/src/internal/nitro/host/build-vercel-agent-summary.js +1 -1
  112. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response-from-manifest.js +1 -1
  113. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.d.ts +4 -3
  114. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
  115. package/dist/src/internal/nitro/routes/channel-request-instrumentation.js +1 -1
  116. package/dist/src/internal/vercel/project-link.d.ts +1 -1
  117. package/dist/src/internal/vercel/project-link.js +1 -1
  118. package/dist/src/internal/vercel-agent-summary.d.ts +10 -9
  119. package/dist/src/internal/vercel-agent-summary.js +1 -1
  120. package/dist/src/internal/workflow/development-world-client.js +1 -1
  121. package/dist/src/protocol/message.d.ts +15 -1
  122. package/dist/src/protocol/message.js +1 -1
  123. package/dist/src/public/channels/github/auth.d.ts +30 -0
  124. package/dist/src/public/channels/github/auth.js +2 -2
  125. package/dist/src/public/channels/github/defaults.d.ts +4 -4
  126. package/dist/src/public/channels/github/defaults.js +1 -1
  127. package/dist/src/public/channels/github/dispatch.d.ts +3 -2
  128. package/dist/src/public/channels/github/dispatch.js +1 -1
  129. package/dist/src/public/channels/github/githubChannel.d.ts +7 -2
  130. package/dist/src/public/channels/github/githubChannel.js +1 -1
  131. package/dist/src/public/channels/github/index.d.ts +1 -1
  132. package/dist/src/public/definitions/instructions.d.ts +14 -4
  133. package/dist/src/public/definitions/instructions.js +1 -1
  134. package/dist/src/public/definitions/tool.d.ts +5 -8
  135. package/dist/src/public/instructions/index.d.ts +1 -2
  136. package/dist/src/public/instructions/index.js +1 -1
  137. package/dist/src/public/instrumentation/index.d.ts +4 -3
  138. package/dist/src/public/instrumentation/otel.d.ts +5 -4
  139. package/dist/src/public/instrumentation/provider.d.ts +2 -2
  140. package/dist/src/public/nuxt/module.js +1 -1
  141. package/dist/src/public/sveltekit/index.d.ts +6 -20
  142. package/dist/src/public/sveltekit/index.js +1 -1
  143. package/dist/src/public/sveltekit/routing.d.ts +0 -24
  144. package/dist/src/public/sveltekit/routing.js +1 -1
  145. package/dist/src/runtime/agent/bootstrap.d.ts +2 -0
  146. package/dist/src/runtime/agent/bootstrap.js +1 -1
  147. package/dist/src/runtime/prompt/compose.d.ts +1 -1
  148. package/dist/src/runtime/prompt/compose.js +3 -1
  149. package/dist/src/runtime/resolve-agent.js +1 -1
  150. package/dist/src/runtime/types.d.ts +4 -3
  151. package/dist/src/setup/boxes/select-model.d.ts +6 -6
  152. package/dist/src/setup/boxes/select-model.js +1 -1
  153. package/dist/src/setup/project-resolution.d.ts +3 -3
  154. package/dist/src/setup/scaffold/create/project.js +1 -1
  155. package/dist/src/setup/slack-connect-lifecycle.d.ts +0 -9
  156. package/dist/src/setup/slack-connect-lifecycle.js +1 -1
  157. package/dist/src/setup/slackbot.d.ts +2 -1
  158. package/dist/src/setup/slackbot.js +1 -1
  159. package/dist/src/shared/default-agent-model.d.ts +1 -1
  160. package/dist/src/shared/default-agent-model.js +1 -1
  161. package/dist/src/shared/dynamic-tool-definition.d.ts +3 -4
  162. package/dist/src/shared/instructions-definition.d.ts +15 -11
  163. package/dist/src/{public/nuxt → shared}/vercel-services.d.ts +18 -19
  164. package/dist/src/shared/vercel-services.js +1 -0
  165. package/dist/src/svelte/index.js +1 -1
  166. package/dist/src/svelte/use-eve-agent.js +1 -1
  167. package/dist/src/tracing/agent-action-instrumentation.d.ts +1 -1
  168. package/dist/src/tracing/agent-action-instrumentation.js +1 -1
  169. package/dist/src/tracing/agent-approval-instrumentation.d.ts +1 -1
  170. package/dist/src/tracing/agent-channel-delivery-instrumentation.d.ts +1 -1
  171. package/dist/src/tracing/agent-channel-delivery-instrumentation.js +1 -1
  172. package/dist/src/tracing/agent-otel-provider.d.ts +4 -2
  173. package/dist/src/tracing/agent-otel-provider.js +2 -2
  174. package/dist/src/tracing/agent-otel-session-context.d.ts +17 -0
  175. package/dist/src/tracing/agent-otel-session-context.js +1 -0
  176. package/dist/src/tracing/agent-otel-usage.d.ts +1 -1
  177. package/dist/src/tracing/agent-tool-instrumentation.d.ts +1 -1
  178. package/dist/src/tracing/agent-tool-instrumentation.js +1 -1
  179. package/dist/src/tracing/agent-trace-state.d.ts +1 -1
  180. package/dist/src/tracing/install-instrumentation-runtime.d.ts +2 -2
  181. package/dist/src/tracing/install-instrumentation-runtime.js +1 -1
  182. package/dist/src/tracing/local-instrumentation-runtime.d.ts +1 -1
  183. package/dist/src/tracing/local-instrumentation-runtime.js +1 -1
  184. package/dist/src/tracing/local-traces.d.ts +3 -3
  185. package/dist/src/tracing/local-traces.js +1 -1
  186. package/dist/src/tracing/otel-declaration.d.ts +2 -2
  187. package/dist/src/tracing/otel-declaration.js +1 -1
  188. package/dist/src/vue/index.js +1 -1
  189. package/dist/src/vue/use-eve-agent.js +1 -1
  190. package/docs/README.md +18 -20
  191. package/docs/agent-config.md +9 -6
  192. package/docs/channels/custom.mdx +1 -1
  193. package/docs/channels/eve.mdx +10 -56
  194. package/docs/channels/github.mdx +1 -1
  195. package/docs/channels/meta.json +1 -0
  196. package/docs/concepts/context-control.md +32 -56
  197. package/docs/concepts/default-harness.md +2 -2
  198. package/docs/concepts/execution-model-and-durability.mdx +4 -4
  199. package/docs/concepts/meta.json +3 -1
  200. package/docs/concepts/sessions-runs-and-streaming.md +23 -11
  201. package/docs/{guides → concepts}/state.md +3 -3
  202. package/docs/connections/mcp.mdx +6 -89
  203. package/docs/connections/meta.json +1 -0
  204. package/docs/connections/openapi.mdx +5 -69
  205. package/docs/connections/overview.mdx +29 -3
  206. package/docs/evals/meta.json +1 -0
  207. package/docs/evals/reporters.mdx +14 -4
  208. package/docs/extensions.md +1 -1
  209. package/docs/getting-started.mdx +175 -13
  210. package/docs/guides/auth-and-route-protection.md +3 -18
  211. package/docs/guides/client/messages.mdx +3 -1
  212. package/docs/guides/client/meta.json +2 -1
  213. package/docs/guides/client/output-schema.mdx +2 -2
  214. package/docs/guides/client/overview.mdx +1 -1
  215. package/docs/guides/deployment/meta.json +1 -0
  216. package/docs/guides/deployment/overview.md +1 -1
  217. package/docs/guides/deployment/self-hosting.md +3 -3
  218. package/docs/guides/deployment/vercel.mdx +1 -1
  219. package/docs/guides/dev-tui.md +3 -13
  220. package/docs/guides/dynamic-capabilities.md +64 -4
  221. package/docs/guides/frontend/meta.json +2 -1
  222. package/docs/guides/frontend/nextjs.mdx +1 -10
  223. package/docs/guides/frontend/nuxt.mdx +1 -10
  224. package/docs/guides/frontend/overview.mdx +12 -3
  225. package/docs/guides/frontend/sveltekit.mdx +23 -11
  226. package/docs/guides/frontend/use-eve-agent-svelte.mdx +39 -126
  227. package/docs/guides/frontend/use-eve-agent-vue.mdx +40 -139
  228. package/docs/guides/instrumentation.md +15 -15
  229. package/docs/guides/meta.json +1 -5
  230. package/docs/guides/remote-agents.md +9 -9
  231. package/docs/guides/session-context.md +34 -103
  232. package/docs/install-integrations.mdx +1 -1
  233. package/docs/instructions.mdx +45 -12
  234. package/docs/meta.json +24 -13
  235. package/docs/patterns/dynamic-scheduling.md +1 -1
  236. package/docs/patterns/meta.json +1 -0
  237. package/docs/patterns/multi-tenant-approvals.md +1 -1
  238. package/docs/patterns/multi-tenant-auth.md +1 -1
  239. package/docs/patterns/multi-tenant-memory.md +4 -3
  240. package/docs/{guides → protocols}/acp.md +1 -1
  241. package/docs/protocols/meta.json +5 -0
  242. package/docs/reference/cli.md +39 -39
  243. package/docs/reference/meta.json +1 -1
  244. package/docs/reference/typescript-api.md +4 -2
  245. package/docs/sandbox.mdx +8 -0
  246. package/docs/{subagents.mdx → subagents/index.mdx} +2 -2
  247. package/docs/subagents/meta.json +5 -0
  248. package/docs/{guides/dynamic-workflows.md → subagents/workflow-tool.md} +6 -6
  249. package/docs/tools/human-in-the-loop.md +1 -1
  250. package/docs/tools/meta.json +1 -0
  251. package/docs/tools/overview.mdx +1 -1
  252. package/docs/tutorial/connect-a-warehouse.mdx +1 -1
  253. package/docs/tutorial/meta.json +1 -0
  254. package/docs/tutorial/remember-definitions.mdx +2 -2
  255. package/docs/tutorial/ship-it.mdx +2 -2
  256. package/package.json +4 -4
  257. package/dist/src/compiled/_chunks/workflow/dist-C8PhDW9B.js +0 -1
  258. package/dist/src/compiled/_chunks/workflow/functions-xMPAeWFr.js +0 -1
  259. package/dist/src/compiled/_chunks/workflow/node-Smb57EnG.js +0 -40
  260. package/dist/src/compiled/_chunks/workflow/resume-hook-BrduAuFX.js +0 -1
  261. package/dist/src/compiled/_chunks/workflow/run-CX7_sJnW.js +0 -1
  262. package/dist/src/compiled/_chunks/workflow/sleep-tsb2HjWK.js +0 -1
  263. package/dist/src/compiled/_chunks/workflow/undici-BNc_0O4m.js +0 -95
  264. package/dist/src/compiled/_chunks/workflow/wait-until-BYKVqrwc.js +0 -15
  265. package/dist/src/harness/instrumentation-config.js +0 -1
  266. package/dist/src/public/nuxt/vercel-services.js +0 -1
  267. package/dist/src/public/sveltekit/vercel-json.d.ts +0 -17
  268. package/dist/src/public/sveltekit/vercel-json.js +0 -1
  269. package/docs/installation.mdx +0 -66
  270. package/docs/project-structure.mdx +0 -53
  271. package/docs/reference/project-layout.md +0 -123
  272. /package/dist/src/harness/{instrumentation-config.d.ts → instrumentation/config.d.ts} +0 -0
  273. /package/dist/src/harness/{instrumentation-content.js → instrumentation/content.js} +0 -0
  274. /package/dist/src/harness/{instrumentation-runtime-context.d.ts → instrumentation/runtime-context.d.ts} +0 -0
  275. /package/dist/src/harness/{instrumentation-runtime-context.js → instrumentation/runtime-context.js} +0 -0
  276. /package/dist/src/harness/{instrumentation-runtime.js → instrumentation/runtime.js} +0 -0
  277. /package/dist/src/harness/{instrumentation-setup-context.d.ts → instrumentation/setup-context.d.ts} +0 -0
  278. /package/dist/src/harness/{instrumentation-setup-context.js → instrumentation/setup-context.js} +0 -0
  279. /package/dist/src/harness/{instrumentation-state.js → instrumentation/state.js} +0 -0
  280. /package/docs/{guides → protocols}/ucp.mdx +0 -0
@@ -1,92 +1,68 @@
1
1
  ---
2
2
  title: "Context Control"
3
- description: "Control what an eve agent's model sees and when, across instructions, skills, the workspace, and subagents."
3
+ description: "Choose what an eve agent's model sees and when, across instructions, skills, tools, the workspace, and subagents."
4
4
  ---
5
5
 
6
- eve gives you a few levers for controlling what the model sees and when. `instructions.md` (or `instructions.ts`) is always on, `skills/` are available but loaded on demand, and the workspace and sandbox are visible through tools rather than pasted into the prompt.
6
+ Control context by putting information in the narrowest surface that needs it. Keep permanent rules in instructions, load optional procedures as skills, let the model inspect runtime files through sandbox tools, and delegate specialist work to a subagent.
7
7
 
8
- ## Base identity with `instructions.md`
9
-
10
- Use `instructions.md` for the core contract of the agent.
11
-
12
- ```md
13
- You are a careful support assistant. Be concise, verify facts before replying, and explain when you
14
- used a tool.
15
- ```
16
-
17
- Keep this file focused on stable behavior that should apply on every turn.
8
+ ## Recommended context layout
18
9
 
19
- ## Compose instructions in TypeScript with `instructions.ts`
10
+ | Need | Use | What the model sees |
11
+ | ---------------------------------------------------- | ------------------------------------------------------ | -------------------------------------------------------------------------------- |
12
+ | Permanent identity, rules, or constraints | System-role [instructions](../instructions) | System context on every model call |
13
+ | Durable application or retrieved context | User-role [instructions](../instructions) | A message added to conversation history at its lifecycle boundary |
14
+ | A procedure needed only for some tasks | A [skill](../skills) | Its description until the model loads the full skill |
15
+ | A typed action or external operation | A [tool](../tools) or [connection](../connections) | The callable schema and the result of each call |
16
+ | Files or command execution | The [sandbox workspace](../sandbox) | A workspace hint, then files and command output the model requests through tools |
17
+ | A specialist with a separate prompt and capabilities | A [subagent](../subagents) | Only the subagent's final result in the parent context |
18
+ | Instructions or capabilities that vary by caller | A [dynamic capability](../guides/dynamic-capabilities) | The values resolved for the active session |
20
19
 
21
- To build the instructions prompt from typed helpers, lib code, or environment-derived values, author it as a module instead of markdown.
20
+ ## Base identity with `instructions.md`
22
21
 
23
- ```ts title="agent/instructions.ts"
24
- import { defineInstructions } from "eve/instructions";
25
- import { buildInstructionsPrompt } from "./lib/prompts";
22
+ Use system-role instructions for stable behavior that should apply throughout a session, such as the agent's role, tone, and standing constraints. Markdown is the default. Keep instructions short enough to justify including them on every model call.
26
23
 
27
- export default defineInstructions({
28
- markdown: buildInstructionsPrompt(),
29
- });
30
- ```
24
+ ### Compose instructions in TypeScript with `instructions.ts`
31
25
 
32
- Module-backed instructions run once at build time. eve captures the resulting markdown into the compiled manifest, so the runtime serves the same prompt every session without re-running the module.
26
+ Use `instructions.ts` when you need typed helpers, build-time composition, or a user-role message. User-role instructions become ordinary durable history rather than system context. See [Instructions](../instructions) for both formats, directory composition, and runtime resolution.
33
27
 
34
28
  ## Load procedures on demand with `skills/`
35
29
 
36
- Skills stay out of the always-on prompt by default, which keeps rich procedures available without bloating every turn. eve advertises the available skills and adds a framework-owned `load_skill` tool. When the request clearly matches a skill description, or the user names a skill explicitly, the model activates that skill, and eve appends the skill's markdown to the active instructions for later turn work.
30
+ Use skills for optional procedures that would otherwise make the always-on prompt unnecessarily large. eve advertises each skill's description and loads the full instructions only when the model calls `load_skill`.
37
31
 
38
32
  ### Flat skill
39
33
 
40
- ```md title="agent/skills/get-weather.md"
41
- Use the weather tool before answering forecast or temperature questions.
42
- ```
34
+ Use a markdown file for a self-contained procedure.
43
35
 
44
36
  ### Packaged skill
45
37
 
46
- ```md title="agent/skills/research/SKILL.md"
47
- ---
48
- description: Research unfamiliar topics before answering with confidence.
49
- ---
50
-
51
- When the task is novel or ambiguous, gather evidence first, then answer with the key facts and the
52
- remaining uncertainty.
53
- ```
54
-
55
- Packaged skills are useful when you also want sibling files such as `references/`, `assets/`, or `scripts/` under the same skill directory. Those files are available under the runtime skill root, normally `$HOME/.agents/skills/<skill>/`. Relative references inside a `SKILL.md` resolve from that specific skill directory, so `references/checklist.md` means `$HOME/.agents/skills/<skill>/references/checklist.md` unless eve has fallen back to `/workspace/skills/<skill>/`.
56
-
57
- See [Skills](../skills) for the full authoring model and install notes.
38
+ Use a directory with `SKILL.md` when the procedure also needs references, assets, or scripts. See [Skills](../skills) for both formats, installation, runtime files, and dynamic skills.
58
39
 
59
40
  ## Put runtime files in the workspace, not the prompt
60
41
 
61
- eve does not inline the entire authored surface into the prompt. Instead, it gives the model a shallow workspace hint, a separate skill-root hint, and runtime tools to inspect deeper when needed. Skill package files are outside `/workspace` in the normal case, and the model inspects them with the shared `bash` tool, which keeps prompts smaller and makes file and command work explicit.
42
+ Do not paste a file tree or large working dataset into the prompt. Seed files into the sandbox workspace and let the model inspect them through `bash`, `read_file`, `glob`, and the other sandbox-backed tools. Skill package files use a separate runtime skill directory.
62
43
 
63
- See [Sandbox](../sandbox) for the workspace and sandbox model.
44
+ See [Sandbox](../sandbox) for workspace seeding, runtime access, backends, and lifecycle behavior.
64
45
 
65
46
  ## Delegate to a specialist with a subagent
66
47
 
67
- If a task deserves its own prompt and tool surface, use a local subagent instead of overloading the root agent. Subagents are a context-control lever too. They get their own `instructions.md`, tools, and sandbox, and they run inside their own delegated context instead of extending the root agent inline.
48
+ Use a subagent when work needs its own instructions, tools, skills, state, or sandbox. The child runs in a separate context instead of adding its working history to the parent. The parent receives the result of the delegation.
68
49
 
69
- See [Subagents](../subagents).
50
+ See [Subagents](../subagents) for the distinction between root-agent copies and declared specialists, including their isolation boundaries.
70
51
 
71
52
  ## Dynamic context with `defineDynamic`
72
53
 
73
- The levers above are static, authored once and the same on every session. When the right context depends on who is calling (their team, tenant, plan, or feature flags), resolve it at runtime instead. `defineDynamic` in `agent/instructions/` returns the per-session system prompt, and `defineDynamic` in `agent/skills/` returns the set of skills a caller can load. Both read `ctx.session.auth` or channel metadata, so a caller on the billing team gets the billing instructions and playbook while no one else sees them. See [Dynamic capabilities](../guides/dynamic-capabilities) for the resolver API and when each event fires.
54
+ Use `defineDynamic` when instructions, skills, tools, subagents, or the model depend on the active principal, tenant, channel, or feature state. Dynamic resolvers can read session auth and channel metadata before returning the capabilities available to that session.
74
55
 
75
- ## Recommended context layout
56
+ See [Dynamic capabilities](../guides/dynamic-capabilities) for the resolver API, supported slots, and execution order.
76
57
 
77
- Pick the lever by what the context is for:
58
+ ## Compaction and clear
78
59
 
79
- - `instructions.md` for the agent's permanent identity. Keep it short and stable.
80
- - `instructions.ts` when you need to compose the prompt from typed helpers at build time.
81
- - `skills/` for optional procedures that should load only when needed. Move long procedures here instead of into the always-on prompt.
82
- - `tools/` to expose typed integrations.
83
- - a subagent when the task needs a different specialist surface; use one only for real specialization boundaries.
84
- - the workspace or sandbox when the model should inspect files or run commands instead of relying on pasted instructions.
60
+ User-role instructions follow the normal history lifecycle. Compaction can summarize them, and clear removes them without rerunning their static definitions or dynamic resolvers. System-role instructions remain outside history and continue to apply after either operation.
85
61
 
86
62
  ## What to read next
87
63
 
88
- - [Tools](../tools): expose typed integrations the model can call.
89
- - [Skills](../skills): the full authoring model for on-demand procedures.
90
- - [Subagents](../subagents): delegate to a specialist with its own prompt and tools.
91
- - [Dynamic capabilities](../guides/dynamic-capabilities): resolve per-session instructions and skills with `defineDynamic`.
92
- - [Hooks](../guides/hooks): run code on session events to update the channel state that dynamic resolvers read.
64
+ - [Instructions](../instructions): author the always-on system prompt.
65
+ - [Skills](../skills): provide procedures that load on demand.
66
+ - [Sandbox](../sandbox): give the model files and command execution.
67
+ - [Subagents](../subagents): isolate specialist work.
68
+ - [Dynamic capabilities](../guides/dynamic-capabilities): vary context and capabilities by session.
@@ -57,7 +57,7 @@ The model-facing file tools accept absolute paths and paths beginning with `$HOM
57
57
 
58
58
  Notes:
59
59
 
60
- - **`agent`** is available only in the root session. Its child uses the root's instructions, tools, connections, and sandbox, but starts with fresh conversation history and fresh [state](../guides/state). The child receives neither `agent` nor `Workflow`; declared subagents do not receive the built-in `agent` either. See [Subagents](../subagents).
60
+ - **`agent`** is available only in the root session. Its 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).
61
61
  - **`load_skill`** only pulls instructions into context. It adds no new execution surface, because behavior still comes from the tools the agent already has.
62
62
  - **`connection_search`** surfaces a connection's tools by their qualified name (e.g. `linear__list_issues`), which the model can then call directly. It's registered only when the agent has connections.
63
63
  - **`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()`.
@@ -125,7 +125,7 @@ import { experimental_workflow } from "eve/tools";
125
125
  export default experimental_workflow({ maxSubagents: 100 });
126
126
  ```
127
127
 
128
- With it on, the model can orchestrate the agent's own subagents from model-authored JavaScript, all as one durable step. The tool is root-only — delegated subagent sessions never see it — and one program may dispatch at most the configured `maxSubagents` calls (default 100). See [Dynamic workflows](../guides/dynamic-workflows).
128
+ With it on, the model can orchestrate the agent's own subagents from model-authored JavaScript, all as one durable step. The tool is root-only — delegated subagent sessions never see it — and one program may dispatch at most the configured `maxSubagents` calls (default 100). See [Workflow Tool](../subagents/workflow-tool).
129
129
 
130
130
  ## The opt-in `sleep` tool
131
131
 
@@ -17,7 +17,7 @@ Every turn runs as a durable workflow, built on the open-source [Workflow SDK](h
17
17
 
18
18
  The Workflow SDK is not inherently tied to Vercel. In local development and in a self-deployed `eve start` process, eve uses the SDK's local world by default; that world persists workflow runs on disk under `.eve/.workflow-data` and dispatches through the same Nitro-hosted workflow routes. On Vercel, the same workflow code runs against Vercel Workflow instead, which adds platform features such as latest production deployment routing and dashboard run metadata.
19
19
 
20
- When a Vercel production deployment changes, the next model turn in an existing session uses that deployment's current instructions, model, and tools. The durable session keeps its conversation history and authored state, so identity-based channels such as Telegram private chats and Twilio phone-number conversations adopt agent updates without requiring a new session.
20
+ When a Vercel production deployment changes, the next model turn in an existing session uses that deployment's current system-role instructions, model, and tools. Static user-role instructions stay pinned in the durable conversation history and are not seeded again. Identity-based channels such as Telegram private chats and Twilio phone-number conversations therefore adopt agent behavior updates without duplicating or rewriting their existing context.
21
21
 
22
22
  Nitro hosts the HTTP routes and workflow entrypoints. It does not supply the workflow state store or the sandbox runtime. Those are separate adapters: Workflow uses the active world implementation, and Sandbox uses the backend from `agent/sandbox` or `defaultBackend()`.
23
23
 
@@ -60,7 +60,7 @@ Crash the process, hit a timeout, or redeploy mid-turn, and the run picks up fro
60
60
 
61
61
  There's nothing to configure. eve owns the workflow lifecycle, and sessions are durable by default.
62
62
 
63
- You don't write workflow code directly. Workflow primitives (`start()`, `resumeHook()`, etc.) are an implementation detail of eve's runtime layer; channels, tools, and hooks never touch them. Two surfaces give your own code session data: tools read the current session's metadata (id, turn, auth, parent lineage) via `ctx.session`, and [`defineState`](../guides/state) reads or writes session-scoped durable state. See [State](../guides/state) for the read/write model.
63
+ You don't write workflow code directly. Workflow primitives (`start()`, `resumeHook()`, etc.) are an implementation detail of eve's runtime layer; channels, tools, and hooks never touch them. Two surfaces give your own code session data: tools read the current session's metadata (id, turn, auth, parent lineage) via `ctx.session`, and [`defineState`](./state) reads or writes session-scoped durable state. See [State](./state) for the read/write model.
64
64
 
65
65
  ## Parked work
66
66
 
@@ -91,10 +91,10 @@ A turn can hand work off to a [subagent](../subagents). Each subagent gets its o
91
91
 
92
92
  ## How eve orders session history
93
93
 
94
- Conversation history within a session is append-only. Turns land in order, and the tool calls inside a turn (plus their results) keep their order too. Read a session back and you see events in the order they happened.
94
+ Conversation history within a session is append-only. Static user-role instructions lead fresh-session history. Dynamic user-role instructions land at their session or turn boundary before the current delivery. Turns follow in order, and the tool calls inside a turn (plus their results) keep their order too. Read a session back and you see messages in the order they happened.
95
95
 
96
96
  ## What to read next
97
97
 
98
98
  - [Sessions and streaming](./sessions-runs-and-streaming): the handles you hold and the event stream you watch.
99
99
  - [Security model](./security-model): the trust boundaries the runtime enforces.
100
- - [State](../guides/state): durable per-session memory that persists across step boundaries.
100
+ - [State](./state): durable per-session memory that persists across step boundaries.
@@ -1,8 +1,10 @@
1
1
  {
2
- "title": "Concepts",
2
+ "title": "Core Concepts",
3
+ "defaultOpen": false,
3
4
  "pages": [
4
5
  "execution-model-and-durability",
5
6
  "sessions-runs-and-streaming",
7
+ "state",
6
8
  "default-harness",
7
9
  "context-control",
8
10
  "security-model"
@@ -14,7 +14,7 @@ or creates a replacement implicitly.
14
14
  Authored channels also have channel-local continuation tokens. A token addresses
15
15
  whichever session currently owns a platform conversation, such as a Slack thread.
16
16
  That identity stays behind the channel boundary and is never accepted or returned
17
- by the eve HTTP session API. See [Custom channels](../channels/custom#address-and-session-handles).
17
+ by the eve HTTP session API. See [Custom channels](../channels/custom#channel-operations-and-session-handles).
18
18
 
19
19
  Sessions last 30 days by default; configure `limits.sessionTimeoutMs` in
20
20
  `agent.ts`, or set it to `false` to disable the deadline. At expiration, eve
@@ -45,8 +45,8 @@ The stream is newline-delimited JSON (NDJSON), one event per line:
45
45
 
46
46
  | Event | Meaning |
47
47
  | ------------------------- | ---------------------------------------------------------------------------------------------------------------- |
48
- | `session.started` | A durable session was created. |
49
- | `turn.started` | A new turn began. |
48
+ | `session.started` | A durable session was created; carries `trace` when the runtime is traced. |
49
+ | `turn.started` | A new turn began; carries the active `trace` when the runtime is traced. |
50
50
  | `message.received` | An inbound user message was accepted; carries flattened text plus structured text/file parts. |
51
51
  | `step.started` | A model step began. |
52
52
  | `actions.requested` | The model requested one or more actions, including tool calls; calls stream before execution. |
@@ -73,6 +73,8 @@ The stream is newline-delimited JSON (NDJSON), one event per line:
73
73
  | `session.failed` | The session failed. |
74
74
  | `session.completed` | The session reached a terminal end. |
75
75
 
76
+ The optional `data.trace` on session and turn starts contains eve-owned W3C trace coordinates: `traceId`, `spanId`, and `traceFlags`. Use it to correlate stream consumers such as eval reporters with an observability backend. An uninstrumented target omits it.
77
+
76
78
  `reasoning.appended` and `message.appended` stream incremental output as it arrives. When the durable stream writer is busy, eve may coalesce adjacent deltas of the same type; the text remains in source order, and any other event forms an ordering barrier. Each append carries both the new delta and the cumulative text for the current block. The finalized block shows up on `message.completed` and `reasoning.completed`, which is the compatibility path for clients that don't render incremental streaming.
77
79
 
78
80
  `action.partial` carries one complete preliminary output snapshot from an authored async-generator tool. A later partial for the same `callId` replaces it, and `action.result` is the final snapshot. When the durable writer is busy, eve may keep only the newest adjacent partial for a call. Treat partials as last-write-wins: a durable step can retry and replay overlapping event runs. Provider-executed tool progress and MCP progress notifications are not projected as `action.partial` events.
@@ -148,9 +150,17 @@ curl -X POST http://127.0.0.1:2000/eve/v1/session/<sessionId> \
148
150
  -d '{"message":"Now send the short version."}'
149
151
  ```
150
152
 
151
- The follow-up reuses the same durable session: same history, same state. Message sends default to cancellation-backed `"steer"`; if a turn is active, eve buffers the follow-up, cancels that turn, and starts the message under a new turn ID. Channels and TypeScript `Session.send(...)` calls can select `turnPolicy: "queue"` when active work should finish first. Structured `inputResponses` never steer.
153
+ The follow-up reuses the same durable session: same history, same state. A follow-up accepts exactly one of `message` or `inputResponses`. Use structured responses to answer one or more pending human-input requests by ID:
152
154
 
153
- If one pending batch is waiting on a human-in-the-loop approval, a matching text reply such as `approve` or `cancel` answers it. Unrelated text starts an ordinary turn immediately without denying the tool call; the approval stays pending and answerable. A later structured `inputResponses` answer keyed by its `requestId` still resumes the original tool call, even after intervening turns.
155
+ ```bash
156
+ curl -X POST http://127.0.0.1:2000/eve/v1/session/<sessionId> \
157
+ -H 'content-type: application/json' \
158
+ -d '{"inputResponses":[{"requestId":"req_A","optionId":"approve"}]}'
159
+ ```
160
+
161
+ Message sends default to cancellation-backed `"steer"`; if a turn is active, eve buffers the follow-up, cancels that turn, and starts the message under a new turn ID. Channels and TypeScript `Session.send(...)` calls can select `turnPolicy: "queue"` when active work should finish first. Structured `inputResponses` never steer.
162
+
163
+ If the session is waiting on a human-in-the-loop approval, respond with the channel’s Approve or Cancel controls. Text messages do not decide an approval; unrelated text starts an ordinary turn while the approval stays pending and answerable. A later structured `inputResponses` answer keyed by its `requestId` still resumes the original tool call, even after intervening turns.
154
164
 
155
165
  With one question-only batch, an exact option match or permitted freeform response answers `ask_question`. Any other follow-up marks the question unanswered and starts the new turn. With several approval or question batches pending, eve does not guess which batch plain text addresses: the message starts an ordinary turn and the batches stay open. Use structured responses to target requests unambiguously.
156
166
 
@@ -190,9 +200,11 @@ curl -X POST http://127.0.0.1:2000/eve/v1/session/<sessionId>/reset \
190
200
  -d '{"reason":"Start over"}'
191
201
  ```
192
202
 
193
- Compaction summarizes context, clear removes model-message history in place,
194
- and reset terminally retires the session. A reset ID never becomes a new session;
195
- create another session explicitly for a fresh conversation.
203
+ Compaction summarizes context without adding a user message. User-role instructions are ordinary history and may be represented by the summary; system-role instructions remain outside it. If a turn is active, eve queues the request until that turn settles. A successful compaction emits `compaction.requested` and `compaction.completed`, followed by `session.waiting`; if summarization fails, the session returns to waiting with its previous history.
204
+
205
+ Clear removes model-message history in place, including static and dynamic user-role instructions, while preserving the session identity, system-role instructions, tools, skills, durable state, limits, and sandbox. It does not rerun instruction definitions or resolvers. It emits `context.cleared` followed by `session.waiting`.
206
+
207
+ Reset terminally retires the exact session ID. A reset ID never becomes a new session; create another session explicitly for a fresh conversation. Compact, clear, and reset return `"no_active_session"` when the target is already inactive.
196
208
 
197
209
  ## Reconnect and rewind
198
210
 
@@ -227,11 +239,11 @@ The lookup is opt-in; requests without the parameter get no header. The TypeScri
227
239
 
228
240
  For scripts, server-to-server calls, tests, evals, and custom UIs, `eve/client` wraps these routes in a typed client so you don't hand-roll the POST and NDJSON stream loop.
229
241
 
230
- Start with the [TypeScript SDK](../guides/client/overview) guide. It covers basic usage, sending messages, session state, streaming, and per-turn `outputSchema` results.
242
+ Start with the [Client SDK](../guides/client/overview) guide. It covers basic usage, sending messages, session state, streaming, and per-turn `outputSchema` results.
231
243
 
232
244
  ## Inspect the agent over HTTP
233
245
 
234
- `GET /eve/v1/info` returns a JSON inspection snapshot for the running agent: model, instructions, authored and framework tools, skills, channels, schedules, subagents, sandbox, connections, hooks, workflow, and workspace metadata. It uses the resolved `eveChannel()` route auth when `agent/channels/eve.ts` authors one; otherwise it falls back to the framework default of Vercel OIDC plus local development access.
246
+ `GET /eve/v1/info` returns a JSON inspection snapshot for the running agent: model, static instructions, authored and framework tools, skills, channels, schedules, subagents, sandbox, connections, hooks, workflow, and workspace metadata. Static instructions are an ordered array whose entries expose `content` and `role`; dynamic resolver output is runtime context and is not included. The route uses the resolved `eveChannel()` auth when `agent/channels/eve.ts` authors one; otherwise it falls back to the framework default of Vercel OIDC plus local development access.
235
247
 
236
248
  ```bash
237
249
  curl http://127.0.0.1:2000/eve/v1/info
@@ -254,5 +266,5 @@ The order is structural, not incidental. By the time a resolver or hook reads ch
254
266
 
255
267
  - [Execution model & durability](./execution-model-and-durability): what makes a session durable and how parked work resumes.
256
268
  - [Channels](../channels/overview): how platform addresses map to durable sessions.
257
- - [TypeScript SDK](../guides/client/overview): call these routes from scripts and server-side code.
269
+ - [Client SDK](../guides/client/overview): call these routes from scripts and server-side code.
258
270
  - [Frontend](../guides/frontend/overview): `useEveAgent` instead of raw routes.
@@ -46,7 +46,7 @@ export default defineTool({
46
46
 
47
47
  ## Reset state between turns
48
48
 
49
- State is durable by default and does not reset between turns. If you want a clean slate every turn, overwrite it from a lifecycle [hook](./hooks) on `turn.started`:
49
+ State is durable by default and does not reset between turns. If you want a clean slate every turn, overwrite it from a lifecycle [hook](../guides/hooks) on `turn.started`:
50
50
 
51
51
  ```ts title="agent/hooks/reset-budget.ts"
52
52
  import { defineHook } from "eve/hooks";
@@ -73,7 +73,7 @@ Every [subagent](../subagents) starts with its own fresh state, whether it's a b
73
73
 
74
74
  ## What to read next
75
75
 
76
- - Read state inside dynamic resolvers → [Dynamic capabilities](./dynamic-capabilities)
76
+ - Read state inside dynamic resolvers → [Dynamic capabilities](../guides/dynamic-capabilities)
77
77
  - How step durability works → [Execution model & durability](../concepts/execution-model-and-durability)
78
- - The `ctx` accessors available alongside state → [TypeScript API](../reference/typescript-api)
78
+ - The `ctx` accessors available alongside state → [TypeScript API Reference](../reference/typescript-api)
79
79
  - Tenant-scoped long-term memory in your own store → [Multi-tenant memory](../patterns/multi-tenant-memory)
@@ -26,68 +26,13 @@ The `url` must speak Streamable HTTP or SSE. Write the `description` for the mod
26
26
 
27
27
  ## Use Vercel Connect for OAuth
28
28
 
29
- For OAuth-backed MCP servers, prefer [Vercel Connect](https://vercel.com/docs/connect). Connect owns the browser consent flow, encrypted token storage, refresh, and project access. The `connect()` helper from `@vercel/connect/eve` plugs that lifecycle into eve's connection auth, so credentials never land in model context or conversation history.
29
+ For OAuth-backed MCP servers, use the shared [Vercel Connect flow](../connections#interactive-oauth-via-vercel-connect), then pass the returned connector UID to `connect()`. Keep the MCP runtime URL and Connect service identifier distinct. For example, Linear uses `https://mcp.linear.app/mcp` as the MCP endpoint and `mcp.linear.app` when creating the connector.
30
30
 
31
- From the Vercel project or agent app that will run the connection:
32
-
33
- ```bash
34
- npm install @vercel/connect
35
- vercel link
36
- vercel connect create mcp.linear.app --name linear
37
- vercel connect attach <connector-uid> --yes
38
- vercel env pull
39
- ```
40
-
41
- Use the connector UID returned by the CLI in `connect("<connector-uid>")`. For Linear, the MCP runtime endpoint is `https://mcp.linear.app/mcp`, while the managed Connect service identifier is `mcp.linear.app`; those are related but not interchangeable.
42
-
43
- By default, `connect("...")` is user-scoped. The first tool call for a new user emits an `authorization.required` event with a URL to visit, parks the turn, and resumes after the callback completes. The active eve session must already have a user principal from route auth or from a platform channel. If there is no authenticated user, the connection fails with `reason: "principal_required"`.
44
-
45
- If the MCP server should act as the agent itself instead of the signed-in user, make the connector app-scoped:
46
-
47
- ```ts title="agent/connections/linear.ts"
48
- import { connect } from "@vercel/connect/eve";
49
- import { defineMcpClientConnection } from "eve/connections";
50
-
51
- export default defineMcpClientConnection({
52
- url: "https://mcp.linear.app/mcp",
53
- description: "Linear workspace: issues, projects, cycles, and comments.",
54
- auth: connect({ connector: "mcp.linear.app/linear", principalType: "app" }),
55
- });
56
- ```
57
-
58
- App-scoped Connect auth is non-interactive. eve asks Connect for one shared app token; if the connector is missing or cannot issue an app token, the tool call fails terminally so an operator can fix setup.
31
+ `connect("...")` is user-scoped by default and requires an authenticated user on the active eve session. Use `connect({ connector, principalType: "app" })` when the server should act as the agent instead. The connections overview covers connector setup, session requirements, app and user scope, callback behavior, and troubleshooting.
59
32
 
60
33
  ## Static tokens and headers
61
34
 
62
- Use `auth.getToken` when you already have a bearer token, API key, service account token, or out-of-band OAuth flow. eve sends the returned token as `Authorization: Bearer <token>`.
63
-
64
- ```ts title="agent/connections/linear.ts"
65
- import { defineMcpClientConnection } from "eve/connections";
66
-
67
- export default defineMcpClientConnection({
68
- url: "https://mcp.linear.app/mcp",
69
- description: "Linear workspace: issues, projects, cycles, and comments.",
70
- auth: {
71
- getToken: async () => ({ token: process.env.LINEAR_API_TOKEN! }),
72
- },
73
- });
74
- ```
75
-
76
- Use `headers` for non-Bearer auth schemes or extra server configuration:
77
-
78
- ```ts title="agent/connections/private-docs.ts"
79
- import { defineMcpClientConnection } from "eve/connections";
80
-
81
- export default defineMcpClientConnection({
82
- url: "https://docs.example.com/mcp",
83
- description: "Internal docs: search pages, owners, and recent changes.",
84
- headers: {
85
- "X-Api-Key": process.env.DOCS_API_KEY!,
86
- },
87
- });
88
- ```
89
-
90
- `auth` and `headers` can also be functions that receive the active session context. Use that when credentials, tenants, or routing depend on the caller.
35
+ MCP connections accept the shared connection `auth` and `headers` options. Use `auth.getToken` for a bearer token, `headers` for another scheme, and resolver functions when credentials or routing depend on the caller. See [Static-token auth](../connections#static-token-auth), [Headers](../connections#headers), and [Per-caller auth and headers](../connections#per-caller-auth-and-headers) for the canonical examples and token-lifecycle behavior.
91
36
 
92
37
  ## Application-provided tool arguments
93
38
 
@@ -119,18 +64,7 @@ eve treats configured keys as application-owned: it removes them from every remo
119
64
 
120
65
  ## No auth
121
66
 
122
- Omit `auth` and `headers` only for intentionally public or local-only servers:
123
-
124
- ```ts title="agent/connections/local.ts"
125
- import { defineMcpClientConnection } from "eve/connections";
126
-
127
- export default defineMcpClientConnection({
128
- url: "http://localhost:3001/mcp",
129
- description: "Local dev MCP server.",
130
- });
131
- ```
132
-
133
- Do not use a no-auth connection for sensitive third-party services unless another layer protects the endpoint.
67
+ Omit `auth` and `headers` only for an intentionally public or loopback MCP server. See [No auth](../connections#no-auth) for the shared connection behavior and security boundary.
134
68
 
135
69
  ## Tool filters
136
70
 
@@ -152,24 +86,7 @@ Prefer `allow` for the smallest safe surface, especially when the server exposes
152
86
 
153
87
  ## Approval gates
154
88
 
155
- For MCP tools that can create, modify, delete, message, transmit, purchase, or access sensitive data, add a human approval gate:
156
-
157
- ```ts title="agent/connections/linear.ts"
158
- import { connect } from "@vercel/connect/eve";
159
- import { defineMcpClientConnection } from "eve/connections";
160
- import { once } from "eve/tools/approval";
161
-
162
- export default defineMcpClientConnection({
163
- url: "https://mcp.linear.app/mcp",
164
- description: "Linear workspace.",
165
- auth: connect("mcp.linear.app/linear"),
166
- approval: once(),
167
- });
168
- ```
169
-
170
- `once()` asks the first time in a session, `always()` asks on every tool call, and `never()` allows calls without approval. Authorization and approval work together: eve records approval before an OAuth park, then resumes without asking again for the same approved call.
171
-
172
- The `once()`, `always()`, and `never()` helpers from `eve/tools/approval` gate every tool the connection serves the same way. See [Connections](/docs/connections#per-connection-approval) for those, and [Human-in-the-loop](/docs/human-in-the-loop) for the full pause-and-resume contract.
89
+ Use the shared `approval` option to gate every tool served by an MCP connection. The [connections overview](../connections#per-connection-approval) defines the `never()`, `once()`, and `always()` helpers; [Human-in-the-loop](../human-in-the-loop#approvals) defines the pause-and-resume contract.
173
90
 
174
91
  ### Gate specific tools by name or input
175
92
 
@@ -233,5 +150,5 @@ When a remote tool returns more data than the model needs, narrow the result at
233
150
 
234
151
  - [Connections](../connections): shared auth, headers, approval, and per-caller patterns.
235
152
  - [OpenAPI connections](./openapi): generate tools from OpenAPI operations.
236
- - [Auth & route protection](../guides/auth-and-route-protection): route auth and the full interactive OAuth lifecycle.
153
+ - [Authentication](../guides/auth-and-route-protection): establish the caller identity required by user-scoped auth.
237
154
  - [Security model](../concepts/security-model): how connection credentials stay out of the model's reach.
@@ -1,4 +1,5 @@
1
1
  {
2
2
  "title": "Connections",
3
+ "defaultOpen": false,
3
4
  "pages": ["overview", "mcp", "openapi"]
4
5
  }
@@ -48,19 +48,7 @@ export default defineOpenAPIConnection({
48
48
 
49
49
  ## Use Vercel Connect for OAuth
50
50
 
51
- For OAuth-backed APIs, prefer [Vercel Connect](https://vercel.com/docs/connect). Connect owns browser consent, encrypted token storage, refresh, and project access. The `connect()` helper from `@vercel/connect/eve` plugs that lifecycle into eve's connection auth, so tokens never reach model context or conversation history.
52
-
53
- Create or attach a connector for the API provider from the Vercel project or agent app that will run the connection:
54
-
55
- ```bash
56
- npm install @vercel/connect
57
- vercel link
58
- vercel connect create github --name github
59
- vercel connect attach <connector-uid> --yes
60
- vercel env pull
61
- ```
62
-
63
- Then use the connector UID returned by the CLI:
51
+ For an OAuth-backed API, follow the shared [Vercel Connect setup](../connections#interactive-oauth-via-vercel-connect), then attach the returned connector UID to the OpenAPI connection:
64
52
 
65
53
  ```ts title="agent/connections/github.ts"
66
54
  import { connect } from "@vercel/connect/eve";
@@ -74,48 +62,11 @@ export default defineOpenAPIConnection({
74
62
  });
75
63
  ```
76
64
 
77
- By default, `connect("...")` is user-scoped. The active eve session must have a user principal from route auth or from a platform channel before the first operation call. If the API should act as the agent itself, make the connector app-scoped:
78
-
79
- ```ts
80
- auth: connect({ connector: "github/github", principalType: "app" });
81
- ```
82
-
83
- Use `tokenParams` on `connect(...)` when the provider requires explicit OAuth scopes, audiences, resource indicators, or authorization details.
65
+ `connect("...")` is user-scoped by default and requires an authenticated user on the active session. Use `connect({ connector, principalType: "app" })` when the API should act as the agent instead. Configure provider-specific scopes, audiences, or authorization details through `tokenParams` on `connect(...)`.
84
66
 
85
67
  ## Static tokens and headers
86
68
 
87
- Use `auth.getToken` when you already have a bearer token, API key, service account token, or out-of-band OAuth flow. eve sends the returned token as `Authorization: Bearer <token>`.
88
-
89
- ```ts title="agent/connections/crm.ts"
90
- import { defineOpenAPIConnection } from "eve/connections";
91
-
92
- export default defineOpenAPIConnection({
93
- spec: "https://api.example.com/openapi.json",
94
- baseUrl: "https://api.example.com",
95
- description: "CRM accounts, contacts, and opportunities.",
96
- auth: {
97
- getToken: async () => ({ token: process.env.CRM_TOKEN! }),
98
- },
99
- });
100
- ```
101
-
102
- Use `headers` for non-Bearer auth schemes, version headers, or tenant routing:
103
-
104
- ```ts title="agent/connections/notion.ts"
105
- import { defineOpenAPIConnection } from "eve/connections";
106
-
107
- export default defineOpenAPIConnection({
108
- spec: "https://developers.notion.com/openapi.json",
109
- baseUrl: "https://api.notion.com",
110
- description: "Notion pages, databases, comments, and users.",
111
- headers: {
112
- Authorization: `Bearer ${process.env.NOTION_API_KEY!}`,
113
- "Notion-Version": "2022-06-28",
114
- },
115
- });
116
- ```
117
-
118
- `auth` and `headers` can also be functions that receive the active session context. Use that when credentials, tenants, or routing depend on the caller.
69
+ OpenAPI connections accept the shared connection `auth` and `headers` options. Use `auth.getToken` for a bearer token, `headers` for another scheme or API version, and resolver functions when credentials or routing depend on the caller. See [Static-token auth](../connections#static-token-auth), [Headers](../connections#headers), and [Per-caller auth and headers](../connections#per-caller-auth-and-headers) for the canonical examples and token-lifecycle behavior.
119
70
 
120
71
  ## Application-provided operation arguments
121
72
 
@@ -201,26 +152,11 @@ The parameter `name` must exactly match the placeholder inside the path. If the
201
152
 
202
153
  ## Approval gates
203
154
 
204
- Generated operation tools can mutate state just like authored tools. Add an approval gate when operations can create, modify, delete, message, transmit, purchase, or access sensitive data:
205
-
206
- ```ts title="agent/connections/crm.ts"
207
- import { defineOpenAPIConnection } from "eve/connections";
208
- import { once } from "eve/tools/approval";
209
-
210
- export default defineOpenAPIConnection({
211
- spec: "https://api.example.com/openapi.json",
212
- baseUrl: "https://api.example.com",
213
- description: "CRM accounts, contacts, and opportunities.",
214
- auth: { getToken: async () => ({ token: process.env.CRM_TOKEN! }) },
215
- approval: once(),
216
- });
217
- ```
218
-
219
- Combine `approval` with `operations.allow` for the smallest practical surface.
155
+ 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.
220
156
 
221
157
  ## What to read next
222
158
 
223
159
  - [Connections](../connections): shared auth, headers, approval, and per-caller patterns.
224
160
  - [MCP connections](./mcp): connect to remote MCP servers.
225
- - [Auth & route protection](../guides/auth-and-route-protection): route auth and the full interactive OAuth lifecycle.
161
+ - [Authentication](../guides/auth-and-route-protection): establish the caller identity required by user-scoped auth.
226
162
  - [Security model](../concepts/security-model): how connection credentials stay out of the model's reach.
@@ -22,7 +22,21 @@ Read [OpenAPI connections](/docs/connections/openapi) for `defineOpenAPIConnecti
22
22
 
23
23
  ## Static-token auth
24
24
 
25
- `getToken` returns a `TokenResult` (`{ token, expiresAt? }`), and eve sends it as `Authorization: Bearer <token>` on every request. Because it runs on each connection attempt, you can mint a fresh token from wherever you keep secrets, including an env var, a secrets manager, an internal vault, or your own OAuth exchange. If the token has a known TTL, set `expiresAt` (milliseconds since epoch) and eve refreshes ahead of time rather than waiting for a `401`.
25
+ `getToken` returns a `TokenResult` (`{ token, expiresAt? }`), and eve sends it as `Authorization: Bearer <token>` on every request. Because it runs on each connection attempt, you can mint a fresh token from wherever you keep secrets, including an env var, a secrets manager, an internal vault, or your own OAuth exchange:
26
+
27
+ ```ts title="agent/connections/linear.ts"
28
+ import { defineMcpClientConnection } from "eve/connections";
29
+
30
+ export default defineMcpClientConnection({
31
+ url: "https://mcp.linear.app/mcp",
32
+ description: "Linear workspace.",
33
+ auth: {
34
+ getToken: async () => ({ token: process.env.LINEAR_API_TOKEN! }),
35
+ },
36
+ });
37
+ ```
38
+
39
+ If the token has a known TTL, set `expiresAt` (milliseconds since epoch) and eve refreshes ahead of time rather than waiting for a `401`.
26
40
 
27
41
  When `getToken` is the only auth, `principalType` defaults to `"app"`: one shared credential keyed across all sessions. Switch to `principalType: "user"` when each end-user carries their own token.
28
42
 
@@ -123,7 +137,19 @@ For connection tools that can create, modify, delete, transmit, purchase, messag
123
137
 
124
138
  ## Interactive OAuth via Vercel Connect
125
139
 
126
- When the server uses OAuth and you want each end-user to sign in through their own browser, turn on interactive authorization with [Vercel Connect](https://vercel.com/docs/connect). The `connect()` helper from `@vercel/connect/eve` handles consent, encrypted token storage, and refresh, then hooks all of that into eve's authorization flow:
140
+ When the server uses OAuth and you want each end-user to sign in through their own browser, turn on interactive authorization with [Vercel Connect](https://vercel.com/docs/connect). The `connect()` helper from `@vercel/connect/eve` handles consent, encrypted token storage, and refresh, then hooks all of that into eve's authorization flow.
141
+
142
+ Create and attach the connector from the Vercel project or agent app that will use it:
143
+
144
+ ```bash
145
+ npm install @vercel/connect
146
+ vercel link
147
+ vercel connect create <service> --name <name>
148
+ vercel connect attach <connector-uid> --yes
149
+ vercel env pull
150
+ ```
151
+
152
+ Use the connector UID returned by the CLI in `connect("<connector-uid>")`. The service identifier accepted by `vercel connect create` depends on the provider; it is not necessarily the same as an MCP runtime URL or OpenAPI base URL.
127
153
 
128
154
  ```ts title="agent/connections/linear.ts"
129
155
  import { connect } from "@vercel/connect/eve";
@@ -155,7 +181,7 @@ export default defineMcpClientConnection({
155
181
  });
156
182
  ```
157
183
 
158
- App-scoped Connect auth is non-interactive. eve asks Vercel Connect for an app token and does not emit a browser consent challenge; if the connector is not installed or cannot issue an app token, the tool call fails terminally so an operator can fix the connector setup. The full setup (Connect client provisioning, project linking, the runtime consent flow) lives in [Auth & route protection](/docs/guides/auth-and-route-protection).
184
+ App-scoped Connect auth is non-interactive. eve asks Vercel Connect for an app token and does not emit a browser consent challenge; if the connector is not installed or cannot issue an app token, the tool call fails terminally so an operator can fix the connector setup. See [Authentication](/docs/guides/auth-and-route-protection) when a user-scoped connection needs your HTTP channel to establish the caller's identity.
159
185
 
160
186
  ### Troubleshooting Vercel Connect auth
161
187
 
@@ -1,4 +1,5 @@
1
1
  {
2
2
  "title": "Evals",
3
+ "defaultOpen": false,
3
4
  "pages": ["overview", "cases", "assertions", "judge", "targets", "reporters", "running"]
4
5
  }