eve 0.64.0 → 0.65.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 (211) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/src/channel/resolve-text.d.ts +11 -7
  3. package/dist/src/channel/resolve-text.js +1 -1
  4. package/dist/src/channel/types.d.ts +4 -5
  5. package/dist/src/chunks/{use-eve-agent-BdKlQF32.js → use-eve-agent-BIouJCii.js} +2 -10
  6. package/dist/src/chunks/{use-eve-agent-IIuxkn6y.js → use-eve-agent-BRvEh9sO.js} +2 -10
  7. package/dist/src/cli/commands/registry-pnpm-build-policy-flow.d.ts +1 -1
  8. package/dist/src/cli/commands/registry-pnpm-build-policy-flow.js +1 -1
  9. package/dist/src/cli/dev/command-options.d.ts +1 -0
  10. package/dist/src/cli/dev/command.js +2 -2
  11. package/dist/src/cli/dev/local-server-process.js +1 -1
  12. package/dist/src/cli/dev/tui/blocks.d.ts +1 -1
  13. package/dist/src/cli/dev/tui/blocks.js +1 -1
  14. package/dist/src/cli/dev/tui/question-panel.d.ts +3 -2
  15. package/dist/src/cli/dev/tui/rail.d.ts +1 -1
  16. package/dist/src/cli/dev/tui/runner.d.ts +0 -1
  17. package/dist/src/cli/dev/tui/runner.js +2 -2
  18. package/dist/src/cli/dev/tui/terminal-renderer.d.ts +0 -1
  19. package/dist/src/cli/dev/tui/terminal-renderer.js +11 -12
  20. package/dist/src/cli/dev/tui/theme.d.ts +1 -1
  21. package/dist/src/cli/dev/tui/tool-presentation.d.ts +4 -4
  22. package/dist/src/cli/dev/tui/tool-presentation.js +1 -1
  23. package/dist/src/client/agent-info-schema.d.ts +0 -2
  24. package/dist/src/client/agent-info-schema.js +1 -1
  25. package/dist/src/compiled/.vendor-stamp.json +1 -2
  26. package/dist/src/compiler/artifacts.d.ts +2 -0
  27. package/dist/src/compiler/artifacts.js +1 -1
  28. package/dist/src/compiler/bundled-extension.d.ts +17 -0
  29. package/dist/src/compiler/bundled-extension.js +1 -0
  30. package/dist/src/compiler/compile-agent.d.ts +4 -0
  31. package/dist/src/compiler/compile-agent.js +1 -1
  32. package/dist/src/compiler/compile-from-memory.js +1 -1
  33. package/dist/src/compiler/development-extensions.d.ts +23 -0
  34. package/dist/src/compiler/development-extensions.js +1 -0
  35. package/dist/src/compiler/extension-compatibility.d.ts +2 -2
  36. package/dist/src/compiler/extension-compatibility.js +1 -1
  37. package/dist/src/compiler/load-binding-namespace.js +1 -1
  38. package/dist/src/compiler/manifest.js +1 -1
  39. package/dist/src/compiler/normalize-manifest-helpers.js +1 -1
  40. package/dist/src/compiler/normalize-manifest-types.d.ts +23 -0
  41. package/dist/src/compiler/normalize-manifest-types.js +1 -0
  42. package/dist/src/compiler/normalize-manifest.d.ts +2 -7
  43. package/dist/src/compiler/normalize-manifest.js +1 -1
  44. package/dist/src/compiler/source-graph-paths.d.ts +2 -0
  45. package/dist/src/compiler/source-graph-paths.js +1 -0
  46. package/dist/src/compiler/source-graph.d.ts +4 -1
  47. package/dist/src/compiler/source-graph.js +1 -1
  48. package/dist/src/context/dynamic-skill-lifecycle.js +1 -1
  49. package/dist/src/discover/bundled-extension.d.ts +11 -0
  50. package/dist/src/discover/bundled-extension.js +1 -0
  51. package/dist/src/discover/discover-agent.js +1 -1
  52. package/dist/src/discover/manifest.d.ts +5 -0
  53. package/dist/src/evals/assertions/collector.js +1 -1
  54. package/dist/src/evals/cli/eval.js +2 -2
  55. package/dist/src/evals/runner/artifacts.js +1 -1
  56. package/dist/src/evals/types.d.ts +2 -0
  57. package/dist/src/execution/coordination-dispatch-step.js +1 -1
  58. package/dist/src/execution/dynamic-workflow/tool.js +1 -1
  59. package/dist/src/execution/node-step.d.ts +2 -4
  60. package/dist/src/execution/node-step.js +1 -1
  61. package/dist/src/execution/proxied-deliver-step.js +1 -1
  62. package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
  63. package/dist/src/execution/sandbox/bindings/microsandbox-runtime.js +1 -1
  64. package/dist/src/execution/sandbox/development-lazy-prewarm.d.ts +7 -0
  65. package/dist/src/execution/sandbox/development-lazy-prewarm.js +1 -0
  66. package/dist/src/execution/sandbox/ensure.js +1 -1
  67. package/dist/src/execution/sandbox/glob-tool.js +1 -1
  68. package/dist/src/execution/sandbox/grep-tool.js +1 -1
  69. package/dist/src/execution/sandbox/prewarm.js +1 -1
  70. package/dist/src/execution/sandbox/read-file.js +1 -1
  71. package/dist/src/execution/session/turn-step.js +1 -1
  72. package/dist/src/execution/session-workflow-tool-run.js +1 -1
  73. package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
  74. package/dist/src/execution/tools/agent-router-workflow.js +1 -1
  75. package/dist/src/execution/tools/ask-question-workflow.d.ts +11 -0
  76. package/dist/src/execution/tools/ask-question-workflow.js +1 -0
  77. package/dist/src/execution/tools/ask-question.d.ts +20 -0
  78. package/dist/src/execution/tools/ask-question.js +2 -0
  79. package/dist/src/execution/tools/file-state.d.ts +1 -7
  80. package/dist/src/execution/tools/file-state.js +1 -1
  81. package/dist/src/execution/tools/sleep-workflow.js +1 -1
  82. package/dist/src/execution/tools/workflow/answer.d.ts +2 -0
  83. package/dist/src/execution/tools/workflow/answer.js +1 -1
  84. package/dist/src/execution/tools/workflow/ask.d.ts +3 -2
  85. package/dist/src/execution/tools/workflow/ask.js +1 -1
  86. package/dist/src/execution/tools/workflow/body.d.ts +5 -0
  87. package/dist/src/execution/tools/workflow/body.js +1 -1
  88. package/dist/src/execution/tools/workflow/cancel.d.ts +0 -4
  89. package/dist/src/execution/tools/workflow/cancel.js +1 -1
  90. package/dist/src/execution/tools/workflow/start.d.ts +1 -0
  91. package/dist/src/execution/tools/workflow/start.js +1 -1
  92. package/dist/src/framework/sources/registry.js +1 -1
  93. package/dist/src/harness/compaction-prompt.d.ts +0 -6
  94. package/dist/src/harness/compaction-prompt.js +2 -2
  95. package/dist/src/harness/compaction.js +1 -1
  96. package/dist/src/harness/hitl/approval-input-requests.d.ts +0 -2
  97. package/dist/src/harness/hitl/approval-input-requests.js +1 -1
  98. package/dist/src/harness/input-extraction.d.ts +4 -15
  99. package/dist/src/harness/input-extraction.js +1 -1
  100. package/dist/src/harness/input-request-class.d.ts +0 -20
  101. package/dist/src/harness/input-request-class.js +1 -1
  102. package/dist/src/harness/input-requests.d.ts +1 -1
  103. package/dist/src/harness/input-requests.js +1 -1
  104. package/dist/src/harness/pending-input-batches.d.ts +1 -1
  105. package/dist/src/harness/proxy-input-requests.d.ts +9 -1
  106. package/dist/src/harness/proxy-input-requests.js +1 -1
  107. package/dist/src/harness/stale-input-responses.d.ts +1 -2
  108. package/dist/src/harness/stale-input-responses.js +1 -1
  109. package/dist/src/harness/tool-loop.js +2 -2
  110. package/dist/src/harness/tools.d.ts +0 -9
  111. package/dist/src/harness/tools.js +1 -1
  112. package/dist/src/harness/types.d.ts +2 -9
  113. package/dist/src/internal/application/compiled-artifacts.js +1 -1
  114. package/dist/src/internal/application/optional-package-install.d.ts +3 -0
  115. package/dist/src/internal/application/optional-package-install.js +2 -2
  116. package/dist/src/internal/application/output-publication-lock.d.ts +6 -0
  117. package/dist/src/internal/application/output-publication-lock.js +1 -1
  118. package/dist/src/internal/application/output-publication.js +1 -1
  119. package/dist/src/internal/application/package.js +1 -1
  120. package/dist/src/internal/authored-definition/schema-backed.js +1 -1
  121. package/dist/src/internal/authored-module-loader.d.ts +1 -0
  122. package/dist/src/internal/authored-module-loader.js +1 -1
  123. package/dist/src/internal/authored-runtime-modules.d.ts +1 -0
  124. package/dist/src/internal/development-programmatic-source-loader.d.ts +6 -0
  125. package/dist/src/internal/development-programmatic-source-loader.js +1 -0
  126. package/dist/src/internal/nitro/dev-runtime-artifacts.js +1 -1
  127. package/dist/src/internal/nitro/development-generation.js +1 -1
  128. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  129. package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.d.ts +2 -0
  130. package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.js +1 -1
  131. package/dist/src/internal/nitro/host/dev-workspace-extensions.js +1 -1
  132. package/dist/src/internal/nitro/host/development-runtime-prune-plugin.d.ts +9 -0
  133. package/dist/src/internal/nitro/host/development-runtime-prune-plugin.js +2 -0
  134. package/dist/src/internal/nitro/host/prepare-application-host.d.ts +2 -0
  135. package/dist/src/internal/nitro/host/prepare-application-host.js +1 -1
  136. package/dist/src/internal/nitro/host/start-development-server.js +2 -2
  137. package/dist/src/internal/nitro/host/types.d.ts +3 -0
  138. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
  139. package/dist/src/internal/workflow-bundle/workflow-builders.d.ts +0 -2
  140. package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
  141. package/dist/src/public/next/vercel-output-config.js +1 -1
  142. package/dist/src/public/tools/ask-question.d.ts +1 -1
  143. package/dist/src/public/tools/ask-question.js +1 -1
  144. package/dist/src/runtime/agent/mock-model-fixtures.js +2 -2
  145. package/dist/src/runtime/cache-key.js +1 -1
  146. package/dist/src/runtime/sandbox/prepared-artifacts.js +1 -1
  147. package/dist/src/self-modification/extension/subagents/agent/instructions.js +6 -2
  148. package/dist/src/{cli/commands/registry-pnpm-build-policy.d.ts → setup/primitives/pm/pnpm-build-policy.d.ts} +4 -0
  149. package/dist/src/setup/primitives/pm/pnpm-build-policy.js +8 -0
  150. package/dist/src/setup/scaffold/create/project.js +1 -1
  151. package/dist/src/shared/input.d.ts +1 -6
  152. package/dist/src/shared/sandbox-provider.d.ts +2 -0
  153. package/dist/src/subagents/hitl-proxy.d.ts +11 -1
  154. package/dist/src/subagents/hitl-proxy.js +1 -1
  155. package/dist/src/svelte/index.js +1 -1
  156. package/dist/src/svelte/use-eve-agent.js +1 -1
  157. package/dist/src/tools/behavior.d.ts +2 -5
  158. package/dist/src/tools/definition.d.ts +23 -5
  159. package/dist/src/tools/provided/ask-question.d.ts +18 -0
  160. package/dist/src/tools/provided/ask-question.js +1 -0
  161. package/dist/src/tools/provided/sleep.d.ts +2 -2
  162. package/dist/src/vue/index.js +1 -1
  163. package/dist/src/vue/use-eve-agent.js +1 -1
  164. package/docs/agent-config.md +11 -11
  165. package/docs/channels/slack.mdx +1 -1
  166. package/docs/concepts/built-in-tools.md +16 -66
  167. package/docs/concepts/default-harness.md +1 -3
  168. package/docs/concepts/execution-model-and-durability.mdx +1 -1
  169. package/docs/concepts/sessions-runs-and-streaming.md +2 -2
  170. package/docs/evals/assertions.mdx +2 -2
  171. package/docs/evals/judge.mdx +3 -3
  172. package/docs/getting-started.mdx +1 -1
  173. package/docs/guides/deployment/vercel.mdx +0 -6
  174. package/docs/guides/dev-tui.md +1 -1
  175. package/docs/guides/evaluate.md +12 -9
  176. package/docs/guides/frontend/overview.mdx +1 -1
  177. package/docs/guides/instrumentation/instrumentation.mdx +1 -1
  178. package/docs/guides/instrumentation/migration.md +1 -6
  179. package/docs/guides/instrumentation/otel.mdx +15 -47
  180. package/docs/reference/cli.md +10 -7
  181. package/docs/reference/typescript-api.md +42 -41
  182. package/docs/sandbox/index.mdx +3 -1
  183. package/docs/sandbox/just-bash.mdx +6 -0
  184. package/docs/skills.mdx +2 -0
  185. package/docs/subagents/index.mdx +7 -5
  186. package/docs/tools/human-in-the-loop.md +22 -11
  187. package/docs/tools/workflows.mdx +44 -19
  188. package/docs/tutorial/guard-the-spend.mdx +1 -1
  189. package/package.json +1 -9
  190. package/dist/src/cli/commands/registry-pnpm-build-policy.js +0 -6
  191. package/dist/src/cli/dev/tui/todo-panel.d.ts +0 -44
  192. package/dist/src/cli/dev/tui/todo-panel.js +0 -1
  193. package/dist/src/compiled/@workflow/builders/LICENSE.md +0 -201
  194. package/dist/src/compiled/@workflow/builders/index.d.ts +0 -62
  195. package/dist/src/compiled/@workflow/builders/index.js +0 -1
  196. package/dist/src/execution/compaction.d.ts +0 -14
  197. package/dist/src/execution/compaction.js +0 -1
  198. package/dist/src/execution/sandbox/development-prewarm.d.ts +0 -20
  199. package/dist/src/execution/sandbox/development-prewarm.js +0 -1
  200. package/dist/src/execution/tools/todo.d.ts +0 -91
  201. package/dist/src/execution/tools/todo.js +0 -2
  202. package/dist/src/harness/hitl/question-input-requests.d.ts +0 -15
  203. package/dist/src/harness/hitl/question-input-requests.js +0 -1
  204. package/dist/src/harness/request-input-tool.d.ts +0 -4
  205. package/dist/src/harness/request-input-tool.js +0 -1
  206. package/dist/src/public/tools/todo.d.ts +0 -3
  207. package/dist/src/public/tools/todo.js +0 -1
  208. package/dist/src/tools/framework/ask-question.d.ts +0 -38
  209. package/dist/src/tools/framework/ask-question.js +0 -1
  210. package/dist/src/tools/provided/todo.d.ts +0 -8
  211. package/dist/src/tools/provided/todo.js +0 -2
@@ -44,7 +44,7 @@ export default defineWorkflowTool({
44
44
  ],
45
45
  });
46
46
 
47
- if (answer.optionId !== "approve") {
47
+ if (answer.status !== "answered" || answer.optionId !== "approve") {
48
48
  return { deployed: false, reason: "rejected" };
49
49
  }
50
50
  return { deployed: true, url: await applyDeploy(plan) };
@@ -277,12 +277,30 @@ const answer = await ctx.ask({
277
277
  display?: "confirmation" | "select" | "text",
278
278
  options?: { id: string; label: string; description?: string; style?: "primary" | "danger" | "default" }[],
279
279
  allowFreeform?: boolean,
280
- }); // { optionId?: string; text?: string }
280
+ dismissible?: boolean,
281
+ });
282
+ // | { status: "answered"; optionId?: string; text?: string }
283
+ // | { status: "dismissed" }
284
+ // | { status: "unavailable" }
281
285
  ```
282
286
 
283
287
  `ctx.ask` publishes an `input.requested` event on the session — rendered the way channels render
284
- `ask_question` and tool approvals — and returns an awaitable answer. Awaiting it suspends the run until a response arrives.
285
- It composes with the SDK's own constructs; race it against a deadline:
288
+ tool approvals — and returns an awaitable answer. Awaiting it suspends the run until a response arrives.
289
+ The `ask_question` tool is a workflow tool built on `ctx.ask`.
290
+
291
+ The answer's `status` tells the body what happened:
292
+
293
+ - `answered`: the person picked an option (`optionId`) or typed a reply (`text`).
294
+ - `dismissed`: the request set `dismissible: true` and the person sent a message that did not answer
295
+ it. The message reaches the agent as a normal turn. Only blocking tools can be dismissed this way.
296
+ - `unavailable`: the session cannot request input, such as a scheduled run. `ctx.ask` returns this
297
+ immediately instead of waiting for an answer no one can give.
298
+
299
+ A plain follow-up message answers the request when it is the only pending question and the message
300
+ matches an option or the request allows free text. This applies to blocking tools only: answer a
301
+ question from a background tool or a subagent with a structured response.
302
+
303
+ `ctx.ask` composes with the SDK's own constructs; race it against a deadline:
286
304
 
287
305
  ```ts
288
306
  const pending = ctx.ask({ prompt: `Deploy ${service}?`, options: APPROVE_OR_CANCEL });
@@ -290,13 +308,16 @@ const answer = await Promise.race([pending, sleep("4h")]);
290
308
  if (answer === undefined) return { deployed: false, reason: "timed out" };
291
309
  ```
292
310
 
293
- - The request belongs to the run, not the turn. It stays answerable until it is answered or the run
294
- ends. In a background tool that means long after the turn that started it.
311
+ - The request belongs to the run, not the turn. It stays answerable until it is answered, dismissed,
312
+ or the run ends. In a background tool that means long after the turn that started it.
295
313
  - A request is answered once. Ask again for the next answer.
314
+ - Choose option `id`s that read well on their own, such as `approve` or the option's label. A
315
+ response carries only the `id`. If a person answers after the request has already resolved, for
316
+ example from an old Slack menu, the agent receives the `id` as a new message, not the label.
296
317
  - Ending the run, by returning, throwing, or cancellation, withdraws its pending requests.
297
318
  - Several requests may be outstanding at once.
298
- - A response never steers. A new human message while a request is pending follows the session's
299
- normal `turnPolicy`.
319
+ - A response never steers. A new human message that does not answer a pending request follows the
320
+ session's normal `turnPolicy`.
300
321
 
301
322
  Compare the [`approval`](/docs/human-in-the-loop) policy, which gates the call before `execute` runs
302
323
  and can only show the model's input. Both compose: `approval` before the run, `ctx.ask` inside it.
@@ -322,9 +343,9 @@ The first argument is an available agent target. On the root agent, `"agent"` st
322
343
  continue an existing child. An inline `outputSchema` requires structured output and determines the
323
344
  return type, so `result` in the example is typed as `{ findings: string[] }`.
324
345
 
325
- ### Route to a hidden subagent with JEV
346
+ ### Route to a hidden subagent with Jev
326
347
 
327
- Use an authored workflow tool when the parent model should decide to delegate, but JEV should choose the specialist. Set `tool: false` on each specialist so the parent model sees only the routing tool. The specialists remain available through `ctx.agents` and callable through `ctx.agent()`.
348
+ Use an authored workflow tool when the parent model should decide to delegate, but [Jev](https://vercel.com/i/what-is-jev) should choose the specialist. Set `tool: false` on each specialist so the parent model sees only the routing tool. The specialists remain available through `ctx.agents` and callable through `ctx.agent()`.
328
349
 
329
350
  If the router may select the root-copy `agent`, author a root `description` that explains which work should stay with a copy of the root. `ctx.agents.agent` always exists in a top-level root workflow, but its `description` is an empty string when omitted from `agent.ts`. `agentRouter()` considers only entries with a non-empty description, so it does not route to an undescribed root copy.
330
351
 
@@ -333,7 +354,7 @@ import { defineAgent } from "eve";
333
354
 
334
355
  export default defineAgent({
335
356
  description: "Coordinate cross-specialist tasks that need the root agent's complete toolset.",
336
- model: "anthropic/claude-opus-4.8",
357
+ model: "anthropic/claude-opus-5.5",
337
358
  });
338
359
  ```
339
360
 
@@ -342,7 +363,7 @@ import { defineAgent } from "eve";
342
363
 
343
364
  export default defineAgent({
344
365
  description: "Investigation, analysis, and explanation",
345
- model: "anthropic/claude-opus-4.8",
366
+ model: "anthropic/claude-opus-5.5",
346
367
  tool: false,
347
368
  });
348
369
  ```
@@ -352,12 +373,12 @@ import { defineAgent } from "eve";
352
373
 
353
374
  export default defineAgent({
354
375
  description: "Execution and operational changes",
355
- model: "openai/gpt-5.6-sol",
376
+ model: "openai/gpt-6-sol",
356
377
  tool: false,
357
378
  });
358
379
  ```
359
380
 
360
- Define the model-visible router under `agent/tools/`. Build the JEV criteria from the subagents' effective descriptions, then pass its typed choice directly to `ctx.agent()`:
381
+ Define the model-visible router under `agent/tools/`. Build the Jev criteria from the subagents' effective descriptions, then pass its typed choice directly to `ctx.agent()`:
361
382
 
362
383
  ```ts title="agent/tools/agent-router.ts"
363
384
  import { evaluate } from "eve/ai";
@@ -406,7 +427,7 @@ export default defineWorkflowTool({
406
427
  });
407
428
  ```
408
429
 
409
- The evaluation runs in a step so workflow replay records its result instead of making the routing request again. The parent model receives `agent-router`, but not `researcher` or `operator`. JEV returns the typed `"researcher" | "operator"` choice, and the selected subagent's result becomes the `agent-router` tool result.
430
+ The evaluation runs in a step so workflow replay records its result instead of making the routing request again. The parent model receives `agent-router`, but not `researcher` or `operator`. Jev returns the typed `"researcher" | "operator"` choice, and the selected subagent's result becomes the `agent-router` tool result.
410
431
 
411
432
  `ctx.agents` is a replay-stable metadata snapshot taken when the workflow starts. In a top-level root workflow, `ctx.agents.agent` always represents the root-copy target and carries the root's authored `description` when provided. The snapshot also includes declared agents hidden from the parent model with `tool: false` or `disableTool()`, but exposes no model definitions, credentials, or callbacks. A delegated root copy omits `agent`, so `agentRouter()` cannot select another root copy recursively. Invocation still checks each target's availability through `ctx.agent()`.
412
433
 
@@ -420,11 +441,11 @@ import { agentRouter } from "eve/tools/agent-router";
420
441
  export default agentRouter();
421
442
  ```
422
443
 
423
- Its input is `{ message: string, outputSchema?: object }`. `agentRouter()` ignores entries without a non-empty description. With two or more described targets, it sends the message and effective descriptions to JEV, then invokes the selected name through `ctx.agent()`. It invokes a sole target without evaluation and forwards an optional `outputSchema` unchanged. In a top-level root session, the candidates include the root-copy `agent`; delegated root copies and declared subagent contexts include only their declared targets.
444
+ Its input is `{ message: string, outputSchema?: object }`. `agentRouter()` ignores entries without a non-empty description. With two or more described targets, it sends the message and effective descriptions to Jev, then invokes the selected name through `ctx.agent()`. It invokes a sole target without evaluation and forwards an optional `outputSchema` unchanged. In a top-level root session, the candidates include the root-copy `agent`; delegated root copies and declared subagent contexts include only their declared targets.
424
445
 
425
446
  When an authored tool accepts a JSON Schema supplied by the model, represent that input with a permissive object such as `z.looseObject({})`. Avoid `z.record(z.string(), z.json())`: its generated JSON Schema uses `propertyNames`, which OpenAI does not support. Validate the supplied value at the point where your tool consumes it.
426
447
 
427
- This pattern controls specialist selection, not whether the parent model delegates at all. Route before the parent model runs if every incoming request must go through JEV.
448
+ This pattern controls specialist selection, not whether the parent model delegates at all. Route before the parent model runs if every incoming request must go through Jev.
428
449
 
429
450
  ## Report progress: `yield`
430
451
 
@@ -515,7 +536,9 @@ async execute({ service }, ctx) {
515
536
  }
516
537
 
517
538
  if (answer === undefined) return { deployed: false, reason: "timed out" };
518
- if (answer.optionId !== "approve") return { deployed: false, reason: "rejected" };
539
+ if (answer.status !== "answered" || answer.optionId !== "approve") {
540
+ return { deployed: false, reason: "rejected" };
541
+ }
519
542
  return { deployed: true, url: await applyDeploy(plan) };
520
543
  }
521
544
  ```
@@ -574,7 +597,9 @@ export default defineWorkflowTool({
574
597
  ],
575
598
  });
576
599
 
577
- if (decision.optionId !== "approve") return { refunded: false };
600
+ if (decision.status !== "answered" || decision.optionId !== "approve") {
601
+ return { refunded: false };
602
+ }
578
603
  return { refunded: true, receipt: await issueRefund(orderId, amount) };
579
604
  },
580
605
  });
@@ -55,7 +55,7 @@ The model proposes the query, `approval` returns `"user-approval"`, and the turn
55
55
 
56
56
  Each session has exactly one active continuation. Answer an approval against a stale handle and it's rejected, so there's no way to double-resume the same parked turn.
57
57
 
58
- The same machinery backs the built-in `ask_question` tool, where the model asks you mid-turn, and per-connection approval via `approval: once()`. See [Tools and human-in-the-loop](../tools).
58
+ The same machinery backs the opt-in `ask_question` tool, where the model asks you mid-turn, and per-connection approval via `approval: once()`. See [Tools and human-in-the-loop](../tools).
59
59
 
60
60
  → Next: [Ship it](./ship-it)
61
61
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eve",
3
- "version": "0.64.0",
3
+ "version": "0.65.0",
4
4
  "private": false,
5
5
  "description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
6
6
  "keywords": [
@@ -167,11 +167,6 @@
167
167
  "import": "./dist/src/public/tools/write-file.js",
168
168
  "default": "./dist/src/public/tools/write-file.js"
169
169
  },
170
- "./tools/todo": {
171
- "types": "./dist/src/public/tools/todo.d.ts",
172
- "import": "./dist/src/public/tools/todo.js",
173
- "default": "./dist/src/public/tools/todo.js"
174
- },
175
170
  "./tools/web_fetch": {
176
171
  "types": "./dist/src/public/tools/web-fetch.d.ts",
177
172
  "import": "./dist/src/public/tools/web-fetch.js",
@@ -501,11 +496,9 @@
501
496
  "@vercel/otel": "2.1.3",
502
497
  "@vercel/sandbox": "3.3.0",
503
498
  "@vercel/sdk": "1.28.8",
504
- "@workflow/builders": "5.0.0-beta.55",
505
499
  "@workflow/core": "5.0.0-beta.55",
506
500
  "@workflow/errors": "5.0.0-beta.22",
507
501
  "@workflow/serde": "5.0.0-beta.2",
508
- "@workflow/utils": "5.0.0-beta.10",
509
502
  "@workflow/world": "5.0.0-beta.37",
510
503
  "@workflow/world-local": "5.0.0-beta.46",
511
504
  "@workflow/world-vercel": "5.0.0-beta.50",
@@ -518,7 +511,6 @@
518
511
  "env-runner": "0.1.16",
519
512
  "eventsource-parser": "3.1.0",
520
513
  "gray-matter": "4.0.3",
521
- "historical-eve-0-30-8": "npm:eve@0.30.8",
522
514
  "jose": "6.2.3",
523
515
  "jsonc-parser": "3.3.1",
524
516
  "just-bash": "3.1.0",
@@ -1,6 +0,0 @@
1
- import{access,readFile,writeFile}from"node:fs/promises";import{join}from"node:path";import{PNPM_WORKSPACE_PATH,findClaimingAncestorPnpmWorkspaceRoot}from"#setup/primitives/pm/pnpm.js";function blockRange(e,t){let n=e.findIndex(e=>RegExp(`^${t}:`).test(e));if(n<0)return;if(!RegExp(`^${t}:\\s*(?:#.*)?$`).test(e[n]??``))throw Error(`Cannot safely update ${t} because it does not use block-style YAML in ${PNPM_WORKSPACE_PATH}.`);let r=n+1;for(;r<e.length&&!/^\S/u.test(e[r]??``);)r+=1;return{start:n,end:r}}function unquoteYamlScalar(e){let t=e.trim();if(t.startsWith(`"`)&&t.endsWith(`"`))try{let e=JSON.parse(t);if(typeof e==`string`)return e}catch{return t}return t.startsWith(`'`)&&t.endsWith(`'`)?t.slice(1,-1).replaceAll(`''`,`'`):t}function mappingEntry(e){let t=/^\s+("(?:[^"\\]|\\.)*"|'(?:[^']|'')*'|[^:#][^:]*?):\s*(true|false)\s*(?:#.*)?$/u.exec(e);if(t!==null)return{key:unquoteYamlScalar(t[1]),value:t[2]===`true`}}function sequenceEntry(e){let t=/^\s+-\s+(.*?)(?:\s+#.*)?$/u.exec(e);return t===null?void 0:unquoteYamlScalar(t[1])}function policyEntries(e,t,n){let r=blockRange(e,t),i=new Map;if(r===void 0)return i;for(let t of e.slice(r.start+1,r.end))if(n===`mapping`){let e=mappingEntry(t);e!==void 0&&i.set(e.key,e.value)}else{let e=sequenceEntry(t);e!==void 0&&i.set(e,!0)}return i}function removePolicyEntries(e,t,n,r){let i=blockRange(e,t);if(i===void 0)return;for(let t=i.end-1;t>i.start;--t){let i=n===`mapping`?mappingEntry(e[t]??``)?.key:sequenceEntry(e[t]??``);i!==void 0&&r.has(i)&&e.splice(t,1)}let a=blockRange(e,t);if(a!==void 0&&!e.slice(a.start+1,a.end).some(e=>(n===`mapping`?mappingEntry(e):sequenceEntry(e))!==void 0)){let t=e.slice(a.start+1,a.end).filter(e=>e.trimStart().startsWith(`#`));e.splice(a.start,a.end-a.start,...t)}}function appendPolicyEntries(e,t,n,r){let i=blockRange(e,t);if(i===void 0){for(;e.at(-1)===``;)e.pop();e.length>0&&e.push(``),e.push(`${t}:`),i={start:e.length-1,end:e.length}}let a=policyEntries(e,t,n),o=r.filter(e=>!a.has(e));if(o.length===0)return;let s=o.map(e=>n===`mapping`?` ${JSON.stringify(e)}: true`:` - ${JSON.stringify(e)}`);e.splice(i.end,0,...s)}function withPnpmBuildPolicy(e,t,n){let r=[...new Set(t)].sort(),i=new Set(r),a=e.replace(/\r\n/gu,`
2
- `).split(`
3
- `);for(removePolicyEntries(a,`allowBuilds`,`mapping`,i),removePolicyEntries(a,`ignoredOptionalDependencies`,`sequence`,i),n===`allow-builds`?appendPolicyEntries(a,`allowBuilds`,`mapping`,r):appendPolicyEntries(a,`ignoredOptionalDependencies`,`sequence`,r);a.at(-1)===``;)a.pop();return`${a.join(`
4
- `)}\n`}async function readWorkspacePolicy(e){try{return await readFile(e,`utf8`)}catch(e){if(e.code===`ENOENT`)return``;throw e}}async function owningPnpmWorkspaceRoot(e){try{return await access(join(e,PNPM_WORKSPACE_PATH)),e}catch(e){if(e.code!==`ENOENT`)throw e}return findClaimingAncestorPnpmWorkspaceRoot(e)??e}async function inspectPnpmBuildPolicy(e,t){let n=await owningPnpmWorkspaceRoot(e),r=join(n,PNPM_WORKSPACE_PATH),i=(await readWorkspacePolicy(r)).replace(/\r\n/gu,`
5
- `).split(`
6
- `),a=policyEntries(i,`allowBuilds`,`mapping`),o=policyEntries(i,`ignoredOptionalDependencies`,`sequence`);return{filePath:r,packages:t,satisfied:t.every(e=>a.get(e)===!0||o.has(e))}}async function applyPnpmBuildPolicy(e,t){let n=await readWorkspacePolicy(e.filePath);await writeFile(e.filePath,withPnpmBuildPolicy(n,e.packages,t),`utf8`)}export{applyPnpmBuildPolicy,inspectPnpmBuildPolicy,withPnpmBuildPolicy};
@@ -1,44 +0,0 @@
1
- /**
2
- * The pinned todo panel: pure parsing and rendering for the task list the
3
- * model maintains through the framework `todo` tool. The tool writes the
4
- * whole list on every call, so the panel is driven entirely from tool-call
5
- * inputs — no protocol addition and no durable client state. The renderer
6
- * owns lifecycle (when a call updates the panel, when the finished list
7
- * commits to the transcript); this module only reads inputs and paints rows.
8
- */
9
- import type { Theme } from "./theme.js";
10
- /** One panel row parsed from the `todo` tool's replacement-write input. */
11
- export interface TodoPanelItem {
12
- readonly content: string;
13
- readonly status: "pending" | "in_progress" | "completed" | "cancelled";
14
- }
15
- /**
16
- * Extracts the panel items from a tool call when — and only when — it is a
17
- * `todo` replacement write. Read-only calls (no `todos`) and malformed items
18
- * return `undefined` so they fall through to the ordinary tool block.
19
- */
20
- export declare function readTodoToolItems(toolName: string, input: unknown): TodoPanelItem[] | undefined;
21
- /** True when every item reached a terminal status (completed or cancelled). */
22
- export declare function allTodoItemsSettled(items: readonly TodoPanelItem[]): boolean;
23
- export interface TodoPanelRowsInput {
24
- readonly items: readonly TodoPanelItem[];
25
- readonly width: number;
26
- readonly theme: Theme;
27
- /** True while the turn is running: pulses the header and the active item. */
28
- readonly working: boolean;
29
- /** Current shared pulse frame (the glyph, or a space on the off beat). */
30
- readonly pulse: string;
31
- }
32
- /**
33
- * Paints the pinned panel, indented so its marks share the tool column.
34
- * Settled items ride a `│` rail under the header; the
35
- * first unsettled item closes the rail with `└` and everything after hangs
36
- * indented — the list reads as progress flowing through the corner.
37
- */
38
- export declare function renderTodoPanelRows(input: TodoPanelRowsInput): string[];
39
- /**
40
- * The transcript form of a finished list: every item checked on the rail,
41
- * closed by `└ Done`. Committed verbatim (pre-styled rows) once every item
42
- * settles.
43
- */
44
- export declare function renderFinishedTodoRows(items: readonly TodoPanelItem[], width: number, theme: Theme): string[];
@@ -1 +0,0 @@
1
- import"./rail.js";import{toolBaseName}from"./tool-presentation.js";import{clipVisible,stripTerminalControls}from"#cli/ui/terminal-text.js";const TODO_STATUSES=new Set([`pending`,`in_progress`,`completed`,`cancelled`]);function readTodoToolItems(e,t){if(toolBaseName(e)!==`todo`||typeof t!=`object`||!t||Array.isArray(t))return;let n=t.todos;if(!Array.isArray(n))return;let r=[];for(let e of n){if(typeof e!=`object`||!e||Array.isArray(e))return;let t=e,n=t.content,i=t.status;if(typeof n!=`string`||typeof i!=`string`||!TODO_STATUSES.has(i))return;r.push({content:firstLine(stripTerminalControls(n)),status:i})}return r}function allTodoItemsSettled(e){return e.every(e=>e.status===`completed`||e.status===`cancelled`)}function renderTodoPanelRows(e){let{items:t,width:n,theme:r}=e,i=r.colors,a=r.glyph,o=t.filter(e=>e.status===`completed`||e.status===`cancelled`).length,s=[e.working?` ${i.gray(a.square)} ${i.dim(`Todo`)}`:` ${i.gray(a.square)} ${i.dim(`${o}/${t.length} tasks`)}`],c=!1;for(let n of t){let t=n.status===`completed`||n.status===`cancelled`,o;c?o=` `:t?o=i.dim(a.rule):(o=i.dim(a.corner),c=!0),s.push(` ${o} ${todoItemBody(n,e,r)}`)}return s.map(e=>clipVisible(e,n))}function renderFinishedTodoRows(e,t,n){let r=n.colors,i=n.glyph,a=[` ${r.green(i.success)} ${r.dim(`Todo`)}`];for(let t of e)a.push(` ${r.dim(i.rule)} ${settledMark(t,n)} ${r.dim(t.content)}`);return a.push(` ${r.dim(i.corner)} ${r.green(`Done`)}`),a.map(e=>clipVisible(e,t))}function settledMark(e,t){return e.status===`cancelled`?t.colors.red(t.glyph.error):t.colors.green(t.glyph.success)}function todoItemBody(e,t,n){let r=n.colors,i=n.glyph;switch(e.status){case`completed`:return`${r.green(i.success)} ${r.dim(e.content)}`;case`cancelled`:return`${r.red(i.error)} ${r.dim(e.content)}`;case`in_progress`:{let n=t.working?t.pulse.trim().length>0?i.dotActive:` `:i.dotActive;return`${r.yellow(n)} ${e.content}`}case`pending`:return`${r.dim(i.reasoning)} ${r.dim(e.content)}`}}function firstLine(e){return e.split(/\r?\n/u,1)[0]??``}export{allTodoItemsSettled,readTodoToolItems,renderFinishedTodoRows,renderTodoPanelRows};
@@ -1,201 +0,0 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- <http://www.apache.org/licenses/>
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS
177
-
178
- APPENDIX: How to apply the Apache License to your work.
179
-
180
- To apply the Apache License to your work, attach the following
181
- boilerplate notice, with the fields enclosed by brackets "[]"
182
- replaced with your own identifying information. (Don't include
183
- the brackets!) The text should be enclosed in the appropriate
184
- comment syntax for the file format. We also recommend that a
185
- file or class name and description of purpose be included on the
186
- same "printed page" as the copyright notice for easier
187
- identification within third-party archives.
188
-
189
- Copyright 2025 Vercel Inc.
190
-
191
- Licensed under the Apache License, Version 2.0 (the "License");
192
- you may not use this file except in compliance with the License.
193
- You may obtain a copy of the License at
194
-
195
- http://www.apache.org/licenses/LICENSE-2.0
196
-
197
- Unless required by applicable law or agreed to in writing, software
198
- distributed under the License is distributed on an "AS IS" BASIS,
199
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
- See the License for the specific language governing permissions and
201
- limitations under the License.
@@ -1,62 +0,0 @@
1
- /**
2
- * Shared utilities for detecting files that need workflow transformation.
3
- * Used by builders, rollup plugin, Next.js loader, and vite plugin.
4
- */
5
- export declare const useWorkflowPattern: RegExp;
6
- export declare const useStepPattern: RegExp;
7
- export declare const workflowSerdeImportPattern: RegExp;
8
- export declare const workflowSerdeSymbolPattern: RegExp;
9
- export declare const workflowSerdeComputedPropertyPattern: RegExp;
10
- export declare const generatedWorkflowPathPattern: RegExp;
11
- /**
12
- * Detects workflow-related patterns in source code.
13
- */
14
- export interface WorkflowPatternMatch {
15
- /** File contains 'use workflow' directive */
16
- hasUseWorkflow: boolean;
17
- /** File contains 'use step' directive */
18
- hasUseStep: boolean;
19
- /** File contains @workflow/serde import */
20
- hasSerdeImport: boolean;
21
- /** File contains Symbol.for('workflow-serialize') or Symbol.for('workflow-deserialize') */
22
- hasSerdeSymbol: boolean;
23
- /** File contains any directive ('use workflow' or 'use step') */
24
- hasDirective: boolean;
25
- /** File contains any serde pattern (import or Symbol.for) */
26
- hasSerde: boolean;
27
- }
28
- /**
29
- * Detects workflow-related patterns in source code.
30
- * @param source - The source code to analyze
31
- * @returns Object with flags for each detected pattern
32
- */
33
- export declare function detectWorkflowPatterns(source: string): WorkflowPatternMatch;
34
- /**
35
- * Determines if a file path is a generated workflow route file.
36
- * @param filePath - The file path to check
37
- * @returns true if the file is a generated workflow route
38
- */
39
- export declare function isGeneratedWorkflowFile(filePath: string): boolean;
40
- /**
41
- * Determines if a file should be transformed based on its path and content patterns.
42
- *
43
- * Logic:
44
- * - Generated workflow route files are never transformed
45
- * - Files with directives ('use workflow' or 'use step') are always transformed
46
- * - Files with serde patterns are always transformed; the SWC plugin performs
47
- * AST-level extraction/filtering to determine whether they actually define
48
- * serde classes
49
- *
50
- * @param filePath - The file path to check
51
- * @param patterns - The detected patterns from detectWorkflowPatterns()
52
- * @returns true if the file should be transformed
53
- */
54
- export declare function shouldTransformFile(filePath: string, patterns: WorkflowPatternMatch): boolean;
55
- /**
56
- * Combined regex pattern for turbopack content matching.
57
- * Uses backreferences to ensure matching quote types.
58
- * Matches: 'use workflow', 'use step', @workflow/serde imports, Symbol.for serialization symbols,
59
- * and WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE computed property usage
60
- */
61
- export declare const turbopackContentPattern: RegExp;
62
- //# sourceMappingURL=transform-utils.d.ts.map
@@ -1 +0,0 @@
1
- const e=/^\s*(['"])use workflow\1;?\s*$/m,t=/^\s*(['"])use step\1;?\s*$/m,n=/from\s+(['"])@workflow\/serde\1/,r=/Symbol\.for\s*\(\s*(['"])workflow-(?:serialize|deserialize)\1\s*\)/,i=/\[\s*WORKFLOW_(?:SERIALIZE|DESERIALIZE)\s*\]/,a=/`(?:\\[\s\S]|[^`\\])*`/g,o=/\/\*[\s\S]*?\*\/|\/\/[^\r\n]*/g,s=/^\s*(['"])(use workflow|use step)\1;?\s*$/,c=/^\s*(['"])[^'"]+\1;?\s*$/,l=/[/\\]\.well-known[/\\]workflow[/\\]/;function u(e,t){let n;for(let r of e.split(/\r?\n/)){let e=r.trim();if(e===``)continue;let i=s.exec(e);if(i){if(i[2]===t&&(n===void 0||n.endsWith(`{`)||c.test(n)))return!0;n=e;continue}n=e}return!1}function d(e){let t=(e.includes(`use workflow`)||e.includes(`use step`))&&(e.includes("`")||e.includes(`/`))?e.replace(a,e=>e.replace(/[^\r\n]/g,` `)).replace(o,e=>e.replace(/[^\r\n]/g,` `)):e,s=e.includes(`use workflow`)&&u(t,`use workflow`),c=e.includes(`use step`)&&u(t,`use step`),l=e.includes(`@workflow/serde`)&&n.test(e),d=(e.includes(`workflow-serialize`)||e.includes(`workflow-deserialize`))&&r.test(e),f=(e.includes(`WORKFLOW_SERIALIZE`)||e.includes(`WORKFLOW_DESERIALIZE`))&&i.test(e);return{hasUseWorkflow:s,hasUseStep:c,hasSerdeImport:l,hasSerdeSymbol:d,hasDirective:s||c,hasSerde:l||d||f}}function f(e){return l.test(e)}function p(e,t){return f(e)?!1:t.hasDirective||t.hasSerde}const m=/(use workflow|use step|from\s+(['"])@workflow\/serde\2|Symbol\.for\s*\(\s*(['"])workflow-(?:serialize|deserialize)\3\s*\)|\[\s*WORKFLOW_(?:SERIALIZE|DESERIALIZE)\s*\])/;export{d as detectWorkflowPatterns,l as generatedWorkflowPathPattern,f as isGeneratedWorkflowFile,p as shouldTransformFile,m as turbopackContentPattern,t as useStepPattern,e as useWorkflowPattern,i as workflowSerdeComputedPropertyPattern,n as workflowSerdeImportPattern,r as workflowSerdeSymbolPattern};
@@ -1,14 +0,0 @@
1
- import type { HarnessModelMessage } from "#harness/messages.js";
2
- /**
3
- * Re-applies framework-owned state preservation after the harness compacts
4
- * message history, returning any messages to append to the compacted history.
5
- *
6
- * Runs the framework's built-in preservation steps:
7
- * - resets read-before-write tracking, so a write after compaction re-reads
8
- * the file whose read evidence was summarized away;
9
- * - re-injects the todo list (when present), so the model keeps its task list.
10
- *
11
- * Must be called inside the harness step's `AlsContext`; both steps read
12
- * durable context state.
13
- */
14
- export declare function preserveFrameworkStateOnCompaction(): readonly HarnessModelMessage[];
@@ -1 +0,0 @@
1
- import{clearReadFileState}from"#execution/tools/file-state.js";import{getTodoCompactionMessage}from"#execution/tools/todo.js";function preserveFrameworkStateOnCompaction(){clearReadFileState();let e=getTodoCompactionMessage();return e===void 0?[]:[e]}export{preserveFrameworkStateOnCompaction};
@@ -1,20 +0,0 @@
1
- import { type RuntimeCompiledArtifactsSource } from "#runtime/compiled-artifacts-source.js";
2
- export declare function prewarmDevelopmentSandboxes(input: {
3
- readonly appRoot: string;
4
- readonly compiledArtifactsSource: RuntimeCompiledArtifactsSource;
5
- readonly log?: (message: string) => void;
6
- }): Promise<void>;
7
- export declare function startDevelopmentSandboxPrewarmInBackground(input: {
8
- readonly appRoot: string;
9
- readonly compiledArtifactsSource: RuntimeCompiledArtifactsSource;
10
- readonly log?: (message: string) => void;
11
- }): void;
12
- export declare function subscribeDevelopmentSandboxPrewarmLogs(input: {
13
- readonly appRoot: string;
14
- readonly log: (message: string) => void;
15
- }): () => void;
16
- export declare function waitForDevelopmentSandboxPrewarm(input: {
17
- readonly appRoot: string;
18
- readonly compiledArtifactsSource: RuntimeCompiledArtifactsSource;
19
- readonly log?: (message: string) => void;
20
- }): Promise<void>;
@@ -1 +0,0 @@
1
- import{prewarmAppSandboxes}from"./prewarm.js";import{toErrorMessage}from"#shared/errors.js";import{getRuntimeCompiledArtifactsAppRoot,getRuntimeCompiledArtifactsSandboxAppRoot}from"#runtime/compiled-artifacts-source.js";const pendingDevelopmentPrewarms=new Map,retainedDevelopmentPrewarmLogs=new Map;async function prewarmDevelopmentSandboxes(e){startDevelopmentSandboxPrewarmInBackground(e),await waitForDevelopmentSandboxPrewarm(e)}function startDevelopmentSandboxPrewarmInBackground(e){let t=resolvePrewarmKeys(e),n=findPendingPrewarm(t);if(n!==void 0){registerPrewarmAliases(t,n);return}let r={logs:[],promise:Promise.resolve(),subscribers:new Set};for(let e of t)retainedDevelopmentPrewarmLogs.delete(e);let i=prewarmAppSandboxes({appRoot:e.appRoot,compiledArtifactsSource:e.compiledArtifactsSource,log:t=>recordPrewarmLog(r,t,e.log)});r.promise=i,registerPrewarmAliases(t,r),i.catch(t=>{recordPrewarmLog(r,`eve: failed to initialize sandbox templates in the background: ${toErrorMessage(t)}`,e.log)}).finally(()=>{for(let e of t)pendingDevelopmentPrewarms.get(e)===r&&pendingDevelopmentPrewarms.delete(e),r.subscribers.size===0&&r.logs.length>0&&retainedDevelopmentPrewarmLogs.set(e,[...r.logs])})}function subscribeDevelopmentSandboxPrewarmLogs(e){let t=findPendingPrewarm([e.appRoot]);if(t!==void 0){for(let n of t.logs)e.log(n);return t.subscribers.add(e.log),()=>t.subscribers.delete(e.log)}let n=retainedDevelopmentPrewarmLogs.get(e.appRoot);if(n===void 0)return()=>{};retainedDevelopmentPrewarmLogs.delete(e.appRoot);for(let t of n)e.log(t);return()=>{}}async function waitForDevelopmentSandboxPrewarm(e){let t=findPendingPrewarm(resolvePrewarmKeys(e));if(t===void 0)return;let unsubscribe;if(e.log!==void 0){for(let n of t.logs)e.log(n);let subscriber=t=>e.log?.(t);t.subscribers.add(subscriber),unsubscribe=()=>t.subscribers.delete(subscriber)}try{await withProgressHeartbeat(`waiting for background sandbox template prewarm`,e.log,()=>t.promise)}finally{unsubscribe?.()}}function resolvePrewarmKeys(e){let t=new Set([e.appRoot]),n=getRuntimeCompiledArtifactsAppRoot(e.compiledArtifactsSource);n!==void 0&&t.add(n);let r=getRuntimeCompiledArtifactsSandboxAppRoot(e.compiledArtifactsSource);return r!==void 0&&t.add(r),[...t]}function findPendingPrewarm(e){for(let t of e){let e=pendingDevelopmentPrewarms.get(t);if(e!==void 0)return e}}function registerPrewarmAliases(e,t){for(let n of e)pendingDevelopmentPrewarms.set(n,t)}function recordPrewarmLog(e,t,n){e.logs.push(t),e.logs.length>50&&e.logs.splice(0,e.logs.length-50),n?.(t);for(let n of e.subscribers)n(t)}async function withProgressHeartbeat(e,t,n){if(t===void 0)return await n();let r=Date.now(),i=setInterval(()=>{t(`${e} (${Math.round((Date.now()-r)/1e3)}s elapsed)`)},1e4);i.unref?.();try{return await n()}finally{clearInterval(i)}}export{prewarmDevelopmentSandboxes,startDevelopmentSandboxPrewarmInBackground,subscribeDevelopmentSandboxPrewarmLogs,waitForDevelopmentSandboxPrewarm};