eve 0.22.1 → 0.22.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 (184) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/src/chunks/{use-eve-agent-CM24ZUEI.js → use-eve-agent-Cojyfr4X.js} +25 -13
  3. package/dist/src/chunks/{use-eve-agent-CxcKypLZ.js → use-eve-agent-D-S1TPCW.js} +25 -13
  4. package/dist/src/cli/commands/init-repl.d.ts +6 -5
  5. package/dist/src/cli/dev/url.js +1 -1
  6. package/dist/src/client/client-error.d.ts +5 -1
  7. package/dist/src/client/client-error.js +1 -1
  8. package/dist/src/client/client.js +1 -1
  9. package/dist/src/client/open-stream.js +1 -1
  10. package/dist/src/client/session.js +1 -1
  11. package/dist/src/client/types.d.ts +2 -1
  12. package/dist/src/client/url.js +1 -1
  13. package/dist/src/compiled/.vendor-stamp.json +6 -4
  14. package/dist/src/compiled/@workflow/core/create-hook.d.ts +2 -2
  15. package/dist/src/compiled/@workflow/core/events-consumer.d.ts +1 -1
  16. package/dist/src/compiled/@workflow/core/index.js +2 -2
  17. package/dist/src/compiled/@workflow/core/private.js +1 -1
  18. package/dist/src/compiled/@workflow/core/runtime/constants.d.ts +14 -0
  19. package/dist/src/compiled/@workflow/core/runtime/get-world-lazy.d.ts +3 -12
  20. package/dist/src/compiled/@workflow/core/runtime/wait-continuation.d.ts +2 -2
  21. package/dist/src/compiled/@workflow/core/runtime/world-compatibility.d.ts +5 -0
  22. package/dist/src/compiled/@workflow/core/runtime/world-init.d.ts +16 -41
  23. package/dist/src/compiled/@workflow/core/runtime/world-target.d.ts +11 -0
  24. package/dist/src/compiled/@workflow/core/runtime/world.d.ts +21 -9
  25. package/dist/src/compiled/@workflow/core/runtime.d.ts +2 -1
  26. package/dist/src/compiled/@workflow/core/runtime.js +3 -141
  27. package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
  28. package/dist/src/compiled/@workflow/core/workflow/world-init-stub.d.ts +2 -2
  29. package/dist/src/compiled/@workflow/core/workflow.js +1 -1
  30. package/dist/src/compiled/@workflow/errors/index.js +1 -1
  31. package/dist/src/compiled/@workflow/world/analytics.d.ts +182 -0
  32. package/dist/src/compiled/@workflow/world/env-config.d.ts +39 -0
  33. package/dist/src/compiled/@workflow/world/events.d.ts +25 -0
  34. package/dist/src/compiled/@workflow/world/index.d.ts +6 -3
  35. package/dist/src/compiled/@workflow/world/interfaces.d.ts +14 -7
  36. package/dist/src/compiled/@workflow/world/runs.d.ts +9 -1
  37. package/dist/src/compiled/@workflow/world/shared.d.ts +15 -0
  38. package/dist/src/compiled/@workflow/world/steps.d.ts +8 -0
  39. package/dist/src/compiled/@workflow/world-local/LICENSE.md +201 -0
  40. package/dist/src/compiled/@workflow/world-local/index.js +4 -0
  41. package/dist/src/compiled/@workflow/world-vercel/LICENSE.md +201 -0
  42. package/dist/src/compiled/@workflow/world-vercel/index.js +42 -0
  43. package/dist/src/compiled/_chunks/workflow/attribute-changes-BnKD8Y3m.js +20 -0
  44. package/dist/src/compiled/_chunks/workflow/{dist-FLIfyJ4Y.js → dist-CttsoN4D.js} +1 -1
  45. package/dist/src/compiled/_chunks/workflow/dist-DJU_7R9s.js +40 -0
  46. package/dist/src/compiled/_chunks/workflow/dist-DpDDcpTl.js +3 -0
  47. package/dist/src/compiled/_chunks/workflow/resume-hook-DjPY9VGg.js +1 -0
  48. package/dist/src/compiled/_chunks/workflow/run-BSANnUPR.js +1 -0
  49. package/dist/src/compiled/_chunks/workflow/sleep-phozDCW8.js +1 -0
  50. package/dist/src/compiled/_chunks/workflow/token-CaY0nA5J.js +1 -0
  51. package/dist/src/compiled/_chunks/workflow/token-D4VIwGlD.js +1 -0
  52. package/dist/src/compiled/_chunks/workflow/undici-fb54XL8i.js +95 -0
  53. package/dist/src/compiler/manifest.d.ts +40 -2
  54. package/dist/src/compiler/manifest.js +1 -1
  55. package/dist/src/compiler/module-map.js +2 -2
  56. package/dist/src/compiler/normalize-extension.d.ts +68 -0
  57. package/dist/src/compiler/normalize-extension.js +1 -0
  58. package/dist/src/compiler/normalize-manifest.js +2 -2
  59. package/dist/src/compiler/workspace-resources.js +1 -1
  60. package/dist/src/context/dynamic-skill-lifecycle.js +1 -1
  61. package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
  62. package/dist/src/discover/discover-agent.d.ts +14 -1
  63. package/dist/src/discover/discover-agent.js +1 -1
  64. package/dist/src/discover/extension-specifier.d.ts +15 -0
  65. package/dist/src/discover/extension-specifier.js +1 -0
  66. package/dist/src/discover/extensions.d.ts +109 -0
  67. package/dist/src/discover/extensions.js +1 -0
  68. package/dist/src/discover/filesystem.d.ts +1 -1
  69. package/dist/src/discover/filesystem.js +1 -1
  70. package/dist/src/discover/grammar.d.ts +27 -0
  71. package/dist/src/discover/grammar.js +1 -1
  72. package/dist/src/discover/manifest.d.ts +46 -0
  73. package/dist/src/discover/manifest.js +1 -1
  74. package/dist/src/evals/assertions/run.d.ts +3 -2
  75. package/dist/src/evals/assertions/run.js +2 -2
  76. package/dist/src/evals/index.d.ts +1 -1
  77. package/dist/src/evals/loaders/yaml.js +1 -1
  78. package/dist/src/evals/match.d.ts +11 -6
  79. package/dist/src/execution/sandbox/bindings/microsandbox-network.js +1 -1
  80. package/dist/src/harness/emission.js +1 -1
  81. package/dist/src/harness/model-call-error.d.ts +5 -0
  82. package/dist/src/harness/model-call-error.js +1 -1
  83. package/dist/src/harness/prompt-cache.d.ts +18 -9
  84. package/dist/src/harness/prompt-cache.js +1 -1
  85. package/dist/src/harness/tool-loop.js +1 -1
  86. package/dist/src/internal/application/compiled-artifacts.d.ts +4 -0
  87. package/dist/src/internal/application/compiled-artifacts.js +5 -4
  88. package/dist/src/internal/application/package.d.ts +9 -5
  89. package/dist/src/internal/application/package.js +1 -1
  90. package/dist/src/internal/authored-module-loader.d.ts +14 -0
  91. package/dist/src/internal/authored-module-loader.js +2 -2
  92. package/dist/src/internal/authored-module-map-loader.js +1 -1
  93. package/dist/src/internal/bundler/extension-scope-plugin.d.ts +37 -0
  94. package/dist/src/internal/bundler/extension-scope-plugin.js +3 -0
  95. package/dist/src/internal/helpers/gray-matter.d.ts +25 -0
  96. package/dist/src/internal/helpers/gray-matter.js +1 -0
  97. package/dist/src/internal/helpers/markdown.js +1 -1
  98. package/dist/src/internal/nitro/dev-runtime-source-snapshot-copy.js +1 -1
  99. package/dist/src/internal/nitro/host/build-application.js +1 -1
  100. package/dist/src/internal/nitro/host/build-extension.d.ts +24 -0
  101. package/dist/src/internal/nitro/host/build-extension.js +4 -0
  102. package/dist/src/internal/nitro/host/configure-nitro-routes.js +2 -2
  103. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  104. package/dist/src/internal/nitro/routes/health.d.ts +3 -3
  105. package/dist/src/internal/workflow/runtime.js +1 -1
  106. package/dist/src/internal/workflow/validate-world.d.ts +16 -0
  107. package/dist/src/internal/workflow/validate-world.js +1 -0
  108. package/dist/src/internal/workflow/world-compatibility.d.ts +1 -12
  109. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.6/node_modules/@workflow/utils/dist/index.js +1 -0
  110. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.6/node_modules/@workflow/utils/dist/parse-name.js +1 -0
  111. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.6/node_modules/@workflow/utils/dist/pluralize.js +1 -0
  112. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.6/node_modules/@workflow/utils/dist/promise.js +1 -0
  113. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.6/node_modules/@workflow/utils/dist/time.js +1 -0
  114. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.6/node_modules/@workflow/utils/dist/workflow-routes.js +1 -0
  115. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.6/node_modules/@workflow/utils/dist/world-target.js +1 -0
  116. package/dist/src/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js +1 -0
  117. package/dist/src/public/channels/discord/discordChannel.js +1 -1
  118. package/dist/src/public/channels/slack/action-status.d.ts +19 -0
  119. package/dist/src/public/channels/slack/action-status.js +1 -0
  120. package/dist/src/public/channels/slack/api.js +1 -1
  121. package/dist/src/public/channels/slack/defaults.js +2 -2
  122. package/dist/src/public/channels/slack/index.d.ts +1 -0
  123. package/dist/src/public/channels/slack/index.js +1 -1
  124. package/dist/src/public/channels/slack/mrkdwn.d.ts +0 -2
  125. package/dist/src/public/channels/slack/mrkdwn.js +1 -1
  126. package/dist/src/public/channels/slack/slackChannel.d.ts +1 -1
  127. package/dist/src/public/definitions/extension.d.ts +68 -0
  128. package/dist/src/public/definitions/extension.js +1 -0
  129. package/dist/src/public/extension/index.d.ts +10 -0
  130. package/dist/src/public/extension/index.js +1 -0
  131. package/dist/src/public/next/index.d.ts +9 -9
  132. package/dist/src/public/next/index.js +1 -1
  133. package/dist/src/public/next/vercel-output-config.js +1 -1
  134. package/dist/src/runtime/connections/openapi-client.js +1 -1
  135. package/dist/src/runtime/connections/openapi-spec.js +1 -1
  136. package/dist/src/runtime/resolve-dynamic-skill.js +1 -1
  137. package/dist/src/runtime/resolve-dynamic-tool.js +1 -1
  138. package/dist/src/runtime/types.d.ts +10 -0
  139. package/dist/src/services/dev-client/vercel-auth-error.d.ts +2 -2
  140. package/dist/src/services/dev-client/vercel-auth-error.js +3 -3
  141. package/dist/src/setup/scaffold/create/project.js +4 -4
  142. package/dist/src/svelte/index.js +1 -1
  143. package/dist/src/svelte/use-eve-agent.js +1 -1
  144. package/dist/src/vue/index.js +1 -1
  145. package/dist/src/vue/use-eve-agent.js +1 -1
  146. package/docs/agent-config.md +1 -1
  147. package/docs/channels/custom.mdx +2 -2
  148. package/docs/channels/github.mdx +35 -2
  149. package/docs/channels/linear.mdx +36 -6
  150. package/docs/channels/slack.mdx +5 -3
  151. package/docs/concepts/context-control.md +1 -1
  152. package/docs/concepts/execution-model-and-durability.md +1 -1
  153. package/docs/connections/openapi.mdx +3 -1
  154. package/docs/evals/assertions.mdx +4 -2
  155. package/docs/extensions.md +155 -0
  156. package/docs/guides/client/overview.mdx +1 -1
  157. package/docs/guides/deployment.md +1 -1
  158. package/docs/guides/dev-tui.md +4 -0
  159. package/docs/guides/dynamic-capabilities.md +3 -3
  160. package/docs/guides/frontend/nextjs.mdx +7 -7
  161. package/docs/guides/instrumentation.md +1 -1
  162. package/docs/guides/state.md +3 -3
  163. package/docs/instructions.mdx +1 -1
  164. package/docs/meta.json +1 -0
  165. package/docs/patterns/dynamic-scheduling.md +11 -11
  166. package/docs/patterns/multi-tenant-approvals.md +6 -6
  167. package/docs/patterns/multi-tenant-auth.md +13 -13
  168. package/docs/patterns/multi-tenant-memory.md +9 -9
  169. package/docs/schedules.mdx +1 -1
  170. package/docs/subagents.mdx +2 -0
  171. package/docs/tutorial/guard-the-spend.mdx +2 -2
  172. package/docs/tutorial/query-sample-data.mdx +1 -1
  173. package/docs/tutorial/remember-definitions.mdx +2 -2
  174. package/docs/tutorial/ship-it.mdx +1 -1
  175. package/package.json +12 -5
  176. package/dist/src/compiled/_chunks/workflow/attribute-changes-zAifvEhb.js +0 -59
  177. package/dist/src/compiled/_chunks/workflow/dist-Dxrjttr2.js +0 -3
  178. package/dist/src/compiled/_chunks/workflow/resume-hook-C15uJ2ik.js +0 -1
  179. package/dist/src/compiled/_chunks/workflow/run-BJUPZ0Ni.js +0 -1
  180. package/dist/src/compiled/_chunks/workflow/sleep-C8B-TYir.js +0 -1
  181. package/dist/src/compiled/_chunks/workflow/token-Bm-WLAUB.js +0 -1
  182. package/dist/src/compiled/_chunks/workflow/token-J7YP0s9a.js +0 -1
  183. package/dist/src/internal/workflow/configure-world.d.ts +0 -18
  184. package/dist/src/internal/workflow/configure-world.js +0 -1
@@ -34,12 +34,12 @@ export default withEve(nextConfig, {
34
34
 
35
35
  All fields are optional.
36
36
 
37
- | Option | Type | Default | Purpose |
38
- | -------------------- | -------- | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
39
- | `eveRoot` | `string` | Next.js app root | Path to the eve app root, relative to `process.cwd()` unless absolute. Set it when the agent lives outside the Next.js project. |
40
- | `eveBuildCommand` | `string` | `"eve build"` | Build command for the generated eve Vercel service. Use it when the eve service needs project-specific prework, without changing the Next.js build. |
41
- | `servicePrefix` | `string` | `"/_eve_internal/eve"` | Private Vercel route namespace for the eve service. Must match the eve service's mount in your Vercel Build Output config when you set it manually. |
42
- | `devServerTimeoutMs` | `number` | `180000` | Maximum time to wait for the eve development server to become available. |
37
+ | Option | Type | Default | Purpose |
38
+ | -------------------- | -------- | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
39
+ | `eveRoot` | `string` | Next.js app root | Path to the eve app root, relative to `process.cwd()` unless absolute. Set it when the agent lives outside the Next.js project. |
40
+ | `eveBuildCommand` | `string` | `"eve build"` | Build command for the generated eve Vercel service. Use it when the eve service needs project-specific prework, without changing the Next.js build. |
41
+ | `servicePrefix` | `string` | `"/_eve_internal/eve"` | Private route namespace for legacy manual Vercel service configs and non-Vercel production proxying. Generated Vercel configs use service routes instead. |
42
+ | `devServerTimeoutMs` | `number` | `180000` | Maximum time to wait for the eve development server to become available. |
43
43
 
44
44
  For slow cold starts, increase the development timeout:
45
45
 
@@ -75,7 +75,7 @@ For a public demo, use `none()` (also from `eve/channels/auth`) to skip authenti
75
75
  ## Dev vs deploy topology
76
76
 
77
77
  - **Local dev.** `npm run dev` boots the eve dev server next to `next dev` and rewrites the eve routes over to it. The browser only ever talks to the Next.js origin.
78
- - **Vercel.** The web app and the eve runtime deploy as a single project. The web app stays public; the eve runtime sits behind it on the same site origin. When the agent needs its own build step, set `eveBuildCommand`:
78
+ - **Vercel.** The web app and the eve runtime deploy as a single project. `withEve()` writes Build Output `services` for eve and `routes` that send `/eve/v1/**` to that service before filesystem routing; the Next.js app itself remains the default app. When the agent needs its own build step, set `eveBuildCommand`:
79
79
 
80
80
  ```ts
81
81
  export default withEve(nextConfig, {
@@ -66,7 +66,7 @@ Use it when the values depend on the current session, turn, step, channel, or mo
66
66
 
67
67
  ```ts
68
68
  import { defineInstrumentation, isChannel } from "eve/instrumentation";
69
- import supportChannel from "./channels/support.js";
69
+ import supportChannel from "./channels/support";
70
70
 
71
71
  export default defineInstrumentation({
72
72
  events: {
@@ -27,8 +27,8 @@ export const budget = defineState("my-agent.budget", () => ({ count: 0, cap: 25
27
27
  ```ts title="agent/tools/spend.ts"
28
28
  import { defineTool } from "eve/tools";
29
29
  import { z } from "zod";
30
- import { budget } from "../lib/budget.js";
31
- import { runQuery } from "../lib/warehouse.js";
30
+ import { budget } from "../lib/budget";
31
+ import { runQuery } from "../lib/warehouse";
32
32
 
33
33
  export default defineTool({
34
34
  description: "Run a query, counting it against the session budget.",
@@ -50,7 +50,7 @@ State is durable by default and does not reset between turns. If you want a clea
50
50
 
51
51
  ```ts title="agent/hooks/reset-budget.ts"
52
52
  import { defineHook } from "eve/hooks";
53
- import { budget } from "../lib/budget.js";
53
+ import { budget } from "../lib/budget";
54
54
 
55
55
  export default defineHook({
56
56
  events: {
@@ -21,7 +21,7 @@ A static prompt belongs in markdown (`agent/instructions.md`). Switch to a TypeS
21
21
 
22
22
  ```ts title="agent/instructions.ts"
23
23
  import { defineInstructions } from "eve/instructions";
24
- import { buildInstructionsPrompt } from "./lib/prompts.js";
24
+ import { buildInstructionsPrompt } from "./lib/prompts";
25
25
 
26
26
  export default defineInstructions({
27
27
  markdown: buildInstructionsPrompt(),
package/docs/meta.json CHANGED
@@ -12,6 +12,7 @@
12
12
  "sandbox",
13
13
  "subagents",
14
14
  "schedules",
15
+ "extensions",
15
16
  "evals",
16
17
  "---",
17
18
  "guides",
@@ -30,8 +30,8 @@ This is the only authored schedule. It looks up due application-managed rows and
30
30
 
31
31
  ```ts title="agent/schedules/dynamic.ts"
32
32
  import { defineSchedule } from "eve/schedules";
33
- import slack from "../channels/slack.js";
34
- import { scheduleStore } from "../lib/schedule-store.js";
33
+ import slack from "../channels/slack";
34
+ import { scheduleStore } from "../lib/schedule-store";
35
35
 
36
36
  export default defineSchedule({
37
37
  cron: "* * * * *",
@@ -119,8 +119,8 @@ Create a one-time schedule with `everyMinutes: null`, or a recurring one with an
119
119
  ```ts title="agent/tools/create_schedule.ts"
120
120
  import { defineTool } from "eve/tools";
121
121
  import { z } from "zod";
122
- import { scheduleStore } from "../lib/schedule-store.js";
123
- import { requireScheduleOwner } from "../lib/tenant.js";
122
+ import { scheduleStore } from "../lib/schedule-store";
123
+ import { requireScheduleOwner } from "../lib/tenant";
124
124
 
125
125
  export default defineTool({
126
126
  description: "Create a one-time or repeating scheduled agent run for this tenant.",
@@ -142,8 +142,8 @@ export default defineTool({
142
142
  ```ts title="agent/tools/list_schedules.ts"
143
143
  import { defineTool } from "eve/tools";
144
144
  import { z } from "zod";
145
- import { scheduleStore } from "../lib/schedule-store.js";
146
- import { requireScheduleOwner } from "../lib/tenant.js";
145
+ import { scheduleStore } from "../lib/schedule-store";
146
+ import { requireScheduleOwner } from "../lib/tenant";
147
147
 
148
148
  export default defineTool({
149
149
  description: "List this tenant's dynamic schedules and their latest status.",
@@ -157,8 +157,8 @@ export default defineTool({
157
157
  ```ts title="agent/tools/update_schedule.ts"
158
158
  import { defineTool } from "eve/tools";
159
159
  import { z } from "zod";
160
- import { scheduleStore } from "../lib/schedule-store.js";
161
- import { requireScheduleOwner } from "../lib/tenant.js";
160
+ import { scheduleStore } from "../lib/schedule-store";
161
+ import { requireScheduleOwner } from "../lib/tenant";
162
162
 
163
163
  export default defineTool({
164
164
  description: "Change, pause, or resume one of this tenant's schedules.",
@@ -183,8 +183,8 @@ export default defineTool({
183
183
  import { defineTool } from "eve/tools";
184
184
  import { always } from "eve/tools/approval";
185
185
  import { z } from "zod";
186
- import { scheduleStore } from "../lib/schedule-store.js";
187
- import { requireScheduleOwner } from "../lib/tenant.js";
186
+ import { scheduleStore } from "../lib/schedule-store";
187
+ import { requireScheduleOwner } from "../lib/tenant";
188
188
 
189
189
  export default defineTool({
190
190
  description: "Permanently delete one of this tenant's schedules.",
@@ -232,7 +232,7 @@ export interface ScheduleStore {
232
232
  release(job: ClaimedSchedule, failure: { error: unknown; retryAt: Date }): Promise<void>;
233
233
  }
234
234
 
235
- export { scheduleStore } from "../../lib/schedule-store.js";
235
+ export { scheduleStore } from "../../lib/schedule-store";
236
236
  ```
237
237
 
238
238
  Implement that adapter with whichever durable store already belongs to your application. It must preserve a few semantics:
@@ -22,7 +22,7 @@ The current caller and initiating caller are both available on the session. This
22
22
 
23
23
  ```ts title="agent/lib/tenant-approval.ts"
24
24
  import type { ApprovalContext, ApprovalStatus } from "eve/tools";
25
- import { approvalPolicies } from "./approval-policies.js";
25
+ import { approvalPolicies } from "./approval-policies";
26
26
 
27
27
  type Surface = "connection" | "tool";
28
28
 
@@ -77,8 +77,8 @@ Approval runs before `execute`. The executor must still derive and enforce tenan
77
77
  ```ts title="agent/tools/transfer_funds.ts"
78
78
  import { defineTool } from "eve/tools";
79
79
  import { z } from "zod";
80
- import { transferFunds } from "../../lib/payments.js";
81
- import { decideTenantApproval } from "../lib/tenant-approval.js";
80
+ import { transferFunds } from "../../lib/payments";
81
+ import { decideTenantApproval } from "../lib/tenant-approval";
82
82
 
83
83
  export default defineTool({
84
84
  description: "Transfer funds from the current tenant's account.",
@@ -111,7 +111,7 @@ The same callback gates every generated operation. The qualified operation name
111
111
 
112
112
  ```ts title="agent/connections/billing.ts"
113
113
  import { defineOpenAPIConnection } from "eve/connections";
114
- import { decideTenantApproval } from "../lib/tenant-approval.js";
114
+ import { decideTenantApproval } from "../lib/tenant-approval";
115
115
 
116
116
  export default defineOpenAPIConnection({
117
117
  spec: "https://billing.example.com/openapi.json",
@@ -135,7 +135,7 @@ The allow-list limits what the model can discover. Approval independently decide
135
135
 
136
136
  ```ts title="agent/connections/support.ts"
137
137
  import { defineMcpClientConnection } from "eve/connections";
138
- import { decideTenantApproval } from "../lib/tenant-approval.js";
138
+ import { decideTenantApproval } from "../lib/tenant-approval";
139
139
 
140
140
  export default defineMcpClientConnection({
141
141
  url: "https://support.example.com/mcp",
@@ -176,7 +176,7 @@ export interface ApprovalPolicyProvider {
176
176
  decide(request: ApprovalPolicyRequest): Promise<ApprovalPolicyDecision>;
177
177
  }
178
178
 
179
- export { approvalPolicies } from "../../lib/approval-policies.js";
179
+ export { approvalPolicies } from "../../lib/approval-policies";
180
180
  ```
181
181
 
182
182
  Your provider decides the policy model. A common implementation checks active tenant membership, finds an exact resource rule before a connection-wide fallback, evaluates role and input thresholds, and defaults to deny. Keep those choices in application code rather than encoding a database design into the agent.
@@ -44,7 +44,7 @@ the caller before eve starts a run, then stamp the tenant onto the session:
44
44
  ```ts title="agent/channels/eve.ts"
45
45
  import { eveChannel } from "eve/channels/eve";
46
46
  import { localDev, type AuthFn } from "eve/channels/auth";
47
- import { verifyAgentCaller } from "../../lib/app-auth.js";
47
+ import { verifyAgentCaller } from "../../lib/app-auth";
48
48
 
49
49
  function tenantAppAuth(): AuthFn<Request> {
50
50
  return async (request) => {
@@ -92,7 +92,7 @@ cache by that user, and pass the projected principal into `getToken`:
92
92
 
93
93
  ```ts title="agent/lib/tenant-connection-auth.ts"
94
94
  import type { ConnectionPrincipal, NonInteractiveAuthorizationDefinition } from "eve/connections";
95
- import { tenantCredentials, type TenantService } from "./tenant-credentials.js";
95
+ import { tenantCredentials, type TenantService } from "./tenant-credentials";
96
96
 
97
97
  function requireTenantPrincipal(principal: ConnectionPrincipal): {
98
98
  tenantId: string;
@@ -136,8 +136,8 @@ Derive the tenant inside `execute`, fetch its credential from your application p
136
136
  ```ts title="agent/tools/list_invoices.ts"
137
137
  import { defineTool } from "eve/tools";
138
138
  import { z } from "zod";
139
- import { tenantCredentials } from "../lib/tenant-credentials.js";
140
- import { requireTenantCaller } from "../lib/tenant.js";
139
+ import { tenantCredentials } from "../lib/tenant-credentials";
140
+ import { requireTenantCaller } from "../lib/tenant";
141
141
 
142
142
  export default defineTool({
143
143
  description: "List recent invoices from the current tenant's billing account.",
@@ -167,9 +167,9 @@ receive the token at call time without exposing it to the model:
167
167
 
168
168
  ```ts title="agent/connections/billing.ts"
169
169
  import { defineOpenAPIConnection } from "eve/connections";
170
- import { tenantCredentials } from "../lib/tenant-credentials.js";
171
- import { tenantBearerAuth } from "../lib/tenant-connection-auth.js";
172
- import { requireTenantCaller } from "../lib/tenant.js";
170
+ import { tenantCredentials } from "../lib/tenant-credentials";
171
+ import { tenantBearerAuth } from "../lib/tenant-connection-auth";
172
+ import { requireTenantCaller } from "../lib/tenant";
173
173
 
174
174
  export default defineOpenAPIConnection({
175
175
  spec: "https://billing.example.com/openapi.json",
@@ -193,9 +193,9 @@ MCP connections accept the same callbacks:
193
193
 
194
194
  ```ts title="agent/connections/support.ts"
195
195
  import { defineMcpClientConnection } from "eve/connections";
196
- import { tenantCredentials } from "../lib/tenant-credentials.js";
197
- import { tenantBearerAuth } from "../lib/tenant-connection-auth.js";
198
- import { requireTenantCaller } from "../lib/tenant.js";
196
+ import { tenantCredentials } from "../lib/tenant-credentials";
197
+ import { tenantBearerAuth } from "../lib/tenant-connection-auth";
198
+ import { requireTenantCaller } from "../lib/tenant";
199
199
 
200
200
  export default defineMcpClientConnection({
201
201
  url: "https://support.example.com/mcp",
@@ -220,8 +220,8 @@ tenant API key from `headers` instead:
220
220
 
221
221
  ```ts title="agent/connections/support.ts"
222
222
  import { defineMcpClientConnection } from "eve/connections";
223
- import { tenantCredentials } from "../lib/tenant-credentials.js";
224
- import { requireTenantCaller } from "../lib/tenant.js";
223
+ import { tenantCredentials } from "../lib/tenant-credentials";
224
+ import { requireTenantCaller } from "../lib/tenant";
225
225
 
226
226
  export default defineMcpClientConnection({
227
227
  url: "https://support.example.com/mcp",
@@ -274,7 +274,7 @@ export interface TenantCredentialProvider {
274
274
  ): Promise<TenantApiKeyCredential>;
275
275
  }
276
276
 
277
- export { tenantCredentials } from "../../lib/tenant-credentials.js";
277
+ export { tenantCredentials } from "../../lib/tenant-credentials";
278
278
  ```
279
279
 
280
280
  Implement the provider with the secret system your application already trusts:
@@ -53,8 +53,8 @@ Resolve on `turn.started` so later turns in the same session see memories writte
53
53
 
54
54
  ```ts title="agent/instructions/memory.ts"
55
55
  import { defineDynamic, defineInstructions } from "eve/instructions";
56
- import { memoryStore } from "../lib/memory-store.js";
57
- import { requireTenantCaller } from "../lib/tenant.js";
56
+ import { memoryStore } from "../lib/memory-store";
57
+ import { requireTenantCaller } from "../lib/tenant";
58
58
 
59
59
  export default defineDynamic({
60
60
  events: {
@@ -88,8 +88,8 @@ The model chooses the memory key and value. The executor chooses the tenant and
88
88
  ```ts title="agent/tools/remember.ts"
89
89
  import { defineTool } from "eve/tools";
90
90
  import { z } from "zod";
91
- import { memoryStore } from "../lib/memory-store.js";
92
- import { requireTenantCaller } from "../lib/tenant.js";
91
+ import { memoryStore } from "../lib/memory-store";
92
+ import { requireTenantCaller } from "../lib/tenant";
93
93
 
94
94
  export default defineTool({
95
95
  description: "Remember one stable fact or preference for the current user.",
@@ -110,8 +110,8 @@ export default defineTool({
110
110
  ```ts title="agent/tools/list_memories.ts"
111
111
  import { defineTool } from "eve/tools";
112
112
  import { z } from "zod";
113
- import { memoryStore } from "../lib/memory-store.js";
114
- import { requireTenantCaller } from "../lib/tenant.js";
113
+ import { memoryStore } from "../lib/memory-store";
114
+ import { requireTenantCaller } from "../lib/tenant";
115
115
 
116
116
  export default defineTool({
117
117
  description: "List long-term memories saved for the current user.",
@@ -126,8 +126,8 @@ export default defineTool({
126
126
  import { defineTool } from "eve/tools";
127
127
  import { always } from "eve/tools/approval";
128
128
  import { z } from "zod";
129
- import { memoryStore } from "../lib/memory-store.js";
130
- import { requireTenantCaller } from "../lib/tenant.js";
129
+ import { memoryStore } from "../lib/memory-store";
130
+ import { requireTenantCaller } from "../lib/tenant";
131
131
 
132
132
  export default defineTool({
133
133
  description: "Delete one long-term memory belonging to the current user.",
@@ -165,7 +165,7 @@ export interface MemoryStore {
165
165
  }
166
166
 
167
167
  // Implement this with your application's PostgreSQL, KV, or vector-store client.
168
- export { memoryStore } from "../../lib/memory-store.js";
168
+ export { memoryStore } from "../../lib/memory-store";
169
169
  ```
170
170
 
171
171
  Whatever backend you choose, preserve these invariants:
@@ -61,7 +61,7 @@ Use a handler when the schedule needs to deliver to a channel, branch on conditi
61
61
  ```ts title="agent/schedules/critical-alerts.ts"
62
62
  import { defineSchedule } from "eve/schedules";
63
63
 
64
- import slack from "../channels/slack.js";
64
+ import slack from "../channels/slack";
65
65
 
66
66
  export default defineSchedule({
67
67
  cron: "* * * * *",
@@ -111,6 +111,8 @@ Do not rely on subagent delegation by itself as an approval boundary. Put sensit
111
111
 
112
112
  Each delegated subagent spins up its own child session and stream. The parent stream carries the control-plane events `subagent.called` and `subagent.completed`, plus interactive `input.requested`, `authorization.required`, and `authorization.completed` events proxied from descendants so the root channel can prompt the user. To follow the child's other progress, read `subagent.called.data.childSessionId` and subscribe at `GET /eve/v1/session/:childSessionId/stream`.
113
113
 
114
+ Subagent model calls automatically retry classified transient provider failures, including overload errors delivered after a stream starts. eve makes at most three fresh model-call attempts, repeating only the current uncommitted call so completed earlier steps, tool results, and sandbox work remain available to the child. Other recoverable task errors fall back to Workflow's durable step retry from the last committed session snapshot. Exhausting the transient model-call attempts or the dedicated empty-response reissue returns one failed task result instead of stacking both retry budgets; terminal errors fail immediately.
115
+
114
116
  ## When to split
115
117
 
116
118
  Split out a subagent when the task needs a different prompt or specialist role, a narrower tool surface, or its own runtime context. Don't reach for one when a [skill](./skills) would do. If the agent can keep its identity and needs only an optional procedure, a skill is the lighter choice.
@@ -23,8 +23,8 @@ export function estimateScanGb(sql: string): number {
23
23
  ```ts title="agent/tools/run_sql.ts"
24
24
  import { defineTool } from "eve/tools";
25
25
  import { z } from "zod";
26
- import { runReadOnlySql } from "../lib/sample-db.js";
27
- import { estimateScanGb } from "../lib/cost.js";
26
+ import { runReadOnlySql } from "../lib/sample-db";
27
+ import { estimateScanGb } from "../lib/cost";
28
28
 
29
29
  const THRESHOLD_GB = 50;
30
30
 
@@ -47,7 +47,7 @@ export async function runReadOnlySql(sql: string) {
47
47
  ```ts title="agent/tools/run_sql.ts"
48
48
  import { defineTool } from "eve/tools";
49
49
  import { z } from "zod";
50
- import { runReadOnlySql } from "../lib/sample-db.js";
50
+ import { runReadOnlySql } from "../lib/sample-db";
51
51
 
52
52
  export default defineTool({
53
53
  description:
@@ -26,7 +26,7 @@ export const glossary = defineState<Glossary>("analytics.glossary", () => ({
26
26
  ```ts title="agent/tools/define_metric.ts"
27
27
  import { defineTool } from "eve/tools";
28
28
  import { z } from "zod";
29
- import { glossary } from "../lib/glossary.js";
29
+ import { glossary } from "../lib/glossary";
30
30
 
31
31
  export default defineTool({
32
32
  description: "Record the team's definition of a metric so it persists across turns.",
@@ -41,7 +41,7 @@ export default defineTool({
41
41
  ```ts title="agent/tools/recall_metrics.ts"
42
42
  import { defineTool } from "eve/tools";
43
43
  import { z } from "zod";
44
- import { glossary } from "../lib/glossary.js";
44
+ import { glossary } from "../lib/glossary";
45
45
 
46
46
  export default defineTool({
47
47
  description: "Read the team's recorded metric definitions.",
@@ -98,7 +98,7 @@ Now point the channel at it. Replace the contents of `agent/channels/eve.ts`, wh
98
98
  ```ts title="agent/channels/eve.ts"
99
99
  import { eveChannel } from "eve/channels/eve";
100
100
  import { localDev, vercelOidc, type AuthFn } from "eve/channels/auth";
101
- import { authenticate } from "../lib/auth.js";
101
+ import { authenticate } from "../lib/auth";
102
102
 
103
103
  const appAuth: AuthFn<Request> = async (request) => {
104
104
  const user = await authenticate(request); // your cookie/session/provider
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eve",
3
- "version": "0.22.1",
3
+ "version": "0.22.3",
4
4
  "private": false,
5
5
  "description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
6
6
  "keywords": [
@@ -186,6 +186,11 @@
186
186
  "import": "./dist/src/public/context/index.js",
187
187
  "default": "./dist/src/public/context/index.js"
188
188
  },
189
+ "./extension": {
190
+ "types": "./dist/src/public/extension/index.d.ts",
191
+ "import": "./dist/src/public/extension/index.js",
192
+ "default": "./dist/src/public/extension/index.js"
193
+ },
189
194
  "./instrumentation": {
190
195
  "types": "./dist/src/public/instrumentation/index.d.ts",
191
196
  "import": "./dist/src/public/instrumentation/index.js",
@@ -293,11 +298,13 @@
293
298
  "@vercel/oidc": "3.5.0",
294
299
  "@vercel/sandbox": "2.3.0",
295
300
  "@vercel/sdk": "1.28.1",
296
- "@workflow/core": "5.0.0-beta.26",
297
- "@workflow/errors": "5.0.0-beta.8",
301
+ "@workflow/core": "5.0.0-beta.28",
302
+ "@workflow/errors": "5.0.0-beta.10",
298
303
  "@workflow/serde": "5.0.0-beta.2",
299
- "@workflow/world": "5.0.0-beta.14",
300
- "@workflow/world-local": "5.0.0-beta.22",
304
+ "@workflow/utils": "5.0.0-beta.6",
305
+ "@workflow/world": "5.0.0-beta.16",
306
+ "@workflow/world-local": "5.0.0-beta.24",
307
+ "@workflow/world-vercel": "5.0.0-beta.24",
301
308
  "ai": "^7.0.0",
302
309
  "autoevals": "0.0.132",
303
310
  "chat": "4.31.0",