eve 0.24.6 → 0.25.1

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 (151) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/src/chunks/{use-eve-agent-6BO9gFVq.js → use-eve-agent-CQIeqmKc.js} +69 -64
  3. package/dist/src/chunks/{use-eve-agent-B1MJNRE-.js → use-eve-agent-Cy73lgA6.js} +69 -64
  4. package/dist/src/cli/commands/agent-instructions.js +1 -1
  5. package/dist/src/cli/commands/channels.js +1 -1
  6. package/dist/src/cli/commands/extension-build.d.ts +1 -1
  7. package/dist/src/cli/commands/extension-build.js +1 -1
  8. package/dist/src/client/output-schema.d.ts +0 -7
  9. package/dist/src/client/output-schema.js +1 -1
  10. package/dist/src/client/session.js +1 -1
  11. package/dist/src/compiler/extension-compatibility.d.ts +56 -0
  12. package/dist/src/compiler/extension-compatibility.js +1 -0
  13. package/dist/src/compiler/normalize-agent-config.js +1 -1
  14. package/dist/src/compiler/normalize-subagent.js +1 -1
  15. package/dist/src/context/build-dynamic-tools.js +1 -1
  16. package/dist/src/context/dynamic-tool-lifecycle.d.ts +1 -1
  17. package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
  18. package/dist/src/discover/discover-agent.d.ts +29 -7
  19. package/dist/src/discover/discover-agent.js +1 -1
  20. package/dist/src/discover/extensions.d.ts +43 -8
  21. package/dist/src/discover/extensions.js +1 -1
  22. package/dist/src/discover/filesystem.d.ts +3 -1
  23. package/dist/src/discover/filesystem.js +1 -1
  24. package/dist/src/discover/named-source-directory.js +1 -1
  25. package/dist/src/discover/skills.js +1 -1
  26. package/dist/src/evals/autoevals-client.js +2 -2
  27. package/dist/src/execution/node-step.js +1 -1
  28. package/dist/src/execution/sandbox/bindings/docker.js +1 -1
  29. package/dist/src/execution/sandbox/bindings/microsandbox-runtime.d.ts +1 -1
  30. package/dist/src/execution/sandbox/bindings/microsandbox-runtime.js +1 -1
  31. package/dist/src/execution/sandbox/bindings/microsandbox-templates.js +1 -1
  32. package/dist/src/execution/sandbox/development-cleanup.d.ts +1 -1
  33. package/dist/src/execution/sandbox/development-cleanup.js +1 -1
  34. package/dist/src/execution/sandbox/development-run.d.ts +0 -3
  35. package/dist/src/execution/sandbox/development-run.js +1 -1
  36. package/dist/src/execution/sandbox/ensure.js +1 -1
  37. package/dist/src/execution/subagent-tool.js +1 -1
  38. package/dist/src/harness/emission.js +1 -1
  39. package/dist/src/harness/input-extraction.d.ts +10 -1
  40. package/dist/src/harness/input-extraction.js +1 -1
  41. package/dist/src/harness/input-requests.d.ts +12 -2
  42. package/dist/src/harness/input-requests.js +1 -1
  43. package/dist/src/harness/messages.d.ts +8 -1
  44. package/dist/src/harness/messages.js +1 -1
  45. package/dist/src/harness/stale-input-responses.d.ts +26 -0
  46. package/dist/src/harness/stale-input-responses.js +3 -0
  47. package/dist/src/harness/step-hooks.d.ts +1 -12
  48. package/dist/src/harness/step-hooks.js +1 -1
  49. package/dist/src/harness/tool-call-input-errors.d.ts +11 -0
  50. package/dist/src/harness/tool-call-input-errors.js +1 -1
  51. package/dist/src/harness/tool-loop.js +2 -2
  52. package/dist/src/harness/workflow-sandbox.d.ts +1 -1
  53. package/dist/src/harness/workflow-sandbox.js +1 -1
  54. package/dist/src/internal/application/optional-package-install.d.ts +5 -0
  55. package/dist/src/internal/application/optional-package-install.js +1 -1
  56. package/dist/src/internal/application/package.js +1 -1
  57. package/dist/src/internal/authored-definition/schema-backed.js +1 -1
  58. package/dist/src/internal/authored-module-loader.d.ts +17 -0
  59. package/dist/src/internal/authored-module-loader.js +2 -2
  60. package/dist/src/internal/authored-module-map-loader.js +1 -1
  61. package/dist/src/internal/authored-package-boundary.d.ts +8 -0
  62. package/dist/src/internal/authored-package-boundary.js +1 -1
  63. package/dist/src/internal/nitro/dev-runtime-source-snapshot.d.ts +4 -0
  64. package/dist/src/internal/nitro/dev-runtime-source-snapshot.js +1 -1
  65. package/dist/src/internal/nitro/host/build-extension.d.ts +6 -21
  66. package/dist/src/internal/nitro/host/build-extension.js +2 -4
  67. package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.js +1 -1
  68. package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -1
  69. package/dist/src/internal/nitro/host/dev-workspace-extensions.d.ts +18 -0
  70. package/dist/src/internal/nitro/host/dev-workspace-extensions.js +1 -0
  71. package/dist/src/internal/nitro/host/extension-build-config.d.ts +18 -0
  72. package/dist/src/internal/nitro/host/extension-build-config.js +1 -0
  73. package/dist/src/internal/nitro/host/extension-capability-requirements.d.ts +10 -0
  74. package/dist/src/internal/nitro/host/extension-capability-requirements.js +1 -0
  75. package/dist/src/internal/nitro/host/extension-declarations.d.ts +10 -0
  76. package/dist/src/internal/nitro/host/extension-declarations.js +2 -0
  77. package/dist/src/internal/nitro/host/extension-distribution.d.ts +32 -0
  78. package/dist/src/internal/nitro/host/extension-distribution.js +3 -0
  79. package/dist/src/internal/nitro/host/extension-state-usage.d.ts +7 -0
  80. package/dist/src/internal/nitro/host/extension-state-usage.js +1 -0
  81. package/dist/src/internal/nitro/host/prepare-application-host.d.ts +5 -1
  82. package/dist/src/internal/nitro/host/prepare-application-host.js +1 -1
  83. package/dist/src/internal/nitro/host/start-development-server.js +2 -2
  84. package/dist/src/internal/nitro/host/types.d.ts +2 -0
  85. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
  86. package/dist/src/public/definitions/hook.d.ts +63 -12
  87. package/dist/src/public/definitions/tool.d.ts +2 -2
  88. package/dist/src/public/hooks/index.d.ts +1 -1
  89. package/dist/src/public/tools/internal.js +1 -1
  90. package/dist/src/runtime/agent/mock-model-fixtures.js +2 -2
  91. package/dist/src/runtime/connections/openapi-client.js +1 -1
  92. package/dist/src/runtime/framework-tools/ask-question.d.ts +23 -9
  93. package/dist/src/runtime/framework-tools/ask-question.js +1 -1
  94. package/dist/src/runtime/framework-tools/bash.d.ts +10 -3
  95. package/dist/src/runtime/framework-tools/bash.js +1 -1
  96. package/dist/src/runtime/framework-tools/connection-search-dynamic.js +1 -1
  97. package/dist/src/runtime/framework-tools/final-output.d.ts +1 -1
  98. package/dist/src/runtime/framework-tools/final-output.js +1 -1
  99. package/dist/src/runtime/framework-tools/glob.d.ts +12 -3
  100. package/dist/src/runtime/framework-tools/glob.js +1 -1
  101. package/dist/src/runtime/framework-tools/grep.d.ts +16 -3
  102. package/dist/src/runtime/framework-tools/grep.js +1 -1
  103. package/dist/src/runtime/framework-tools/read-file.d.ts +13 -3
  104. package/dist/src/runtime/framework-tools/read-file.js +1 -1
  105. package/dist/src/runtime/framework-tools/skill.d.ts +5 -2
  106. package/dist/src/runtime/framework-tools/skill.js +1 -1
  107. package/dist/src/runtime/framework-tools/todo.d.ts +57 -10
  108. package/dist/src/runtime/framework-tools/todo.js +3 -3
  109. package/dist/src/runtime/framework-tools/web-fetch.d.ts +16 -3
  110. package/dist/src/runtime/framework-tools/web-fetch.js +1 -1
  111. package/dist/src/runtime/framework-tools/write-file.d.ts +9 -3
  112. package/dist/src/runtime/framework-tools/write-file.js +1 -1
  113. package/dist/src/runtime/loaders/compile-metadata.js +1 -1
  114. package/dist/src/runtime/loaders/manifest.js +1 -1
  115. package/dist/src/runtime/loaders/module-map.js +1 -1
  116. package/dist/src/runtime/resolve-tool.d.ts +4 -5
  117. package/dist/src/runtime/resolve-tool.js +1 -1
  118. package/dist/src/runtime/subagents/registry.d.ts +6 -3
  119. package/dist/src/runtime/subagents/registry.js +1 -1
  120. package/dist/src/runtime/tools/registry.js +1 -1
  121. package/dist/src/runtime/types.d.ts +7 -9
  122. package/dist/src/setup/boxes/deploy-project.d.ts +11 -1
  123. package/dist/src/setup/boxes/deploy-project.js +1 -1
  124. package/dist/src/setup/scaffold/create/add-to-project.js +1 -1
  125. package/dist/src/setup/scaffold/create/extension.js +2 -2
  126. package/dist/src/setup/scaffold/create/project.js +2 -2
  127. package/dist/src/setup/scaffold/update/channels.js +1 -1
  128. package/dist/src/setup/scaffold/update/connections.js +1 -1
  129. package/dist/src/setup/vercel-project-framework.d.ts +4 -2
  130. package/dist/src/shared/extension-package-contract.d.ts +11 -0
  131. package/dist/src/shared/extension-package-contract.js +1 -0
  132. package/dist/src/shared/json.d.ts +4 -0
  133. package/dist/src/shared/json.js +1 -1
  134. package/dist/src/shared/tool-schema.d.ts +52 -0
  135. package/dist/src/shared/tool-schema.js +1 -0
  136. package/dist/src/svelte/index.js +1 -1
  137. package/dist/src/svelte/use-eve-agent.js +1 -1
  138. package/dist/src/vue/index.js +1 -1
  139. package/dist/src/vue/use-eve-agent.js +1 -1
  140. package/docs/concepts/sessions-runs-and-streaming.md +6 -0
  141. package/docs/extensions.md +22 -6
  142. package/docs/reference/cli.md +2 -2
  143. package/package.json +1 -1
  144. package/dist/src/internal/json-schema.d.ts +0 -1
  145. package/dist/src/internal/json-schema.js +0 -1
  146. package/dist/src/setup/boxes/reconcile-host-framework-preset.d.ts +0 -26
  147. package/dist/src/setup/boxes/reconcile-host-framework-preset.js +0 -1
  148. package/dist/src/shared/hook-definition.d.ts +0 -36
  149. package/dist/src/shared/hook-definition.js +0 -1
  150. package/dist/src/shared/json-schema.d.ts +0 -9
  151. package/dist/src/shared/json-schema.js +0 -1
@@ -71,15 +71,21 @@ Config is bound once when the consumer mounts the extension and stays constant f
71
71
 
72
72
  ## Publishing
73
73
 
74
- Point `eve.extension` at the source directory and run `eve extension build` (wired to `build`/`prepare`):
74
+ Declare separate authoring and distribution roots and run `eve extension build` (wired to `build`/`prepare`):
75
75
 
76
76
  ```jsonc title="package.json"
77
77
  {
78
78
  "name": "@acme/crm",
79
79
  "type": "module",
80
- "eve": { "extension": "./extension" },
81
- "files": ["extension", "dist"],
82
- "peerDependencies": { "eve": "^x" },
80
+ "eve": {
81
+ "extension": {
82
+ "source": "./extension",
83
+ "dist": "./dist/extension",
84
+ },
85
+ },
86
+ "files": ["dist"],
87
+ "peerDependencies": { "eve": "*" },
88
+ "devDependencies": { "eve": "^x", "typescript": "^x" },
83
89
  "dependencies": { "zod": "^3" },
84
90
  "scripts": { "build": "eve extension build", "prepare": "eve extension build" },
85
91
  }
@@ -100,11 +106,21 @@ Author the source with `moduleResolution: "bundler"` — eve compiles it, so rel
100
106
  }
101
107
  ```
102
108
 
103
- `eve extension build` compiles the package's entry points to plain JavaScript with type declarations the mount factory (`dist/index.mjs`) and the tool re-exports overrides use (`dist/tools`) and fills the `exports` map so you never hand-list it. Compiling is what lets an installed extension load directly; local and workspace packages also work without publishing.
109
+ `eve extension build` transforms every JavaScript or TypeScript module into an agent-shaped `dist/extension` tree, copies skill packages and their assets, emits type declarations, and writes `dist/extension/_manifest.json`. The generated package entrypoints (`dist/index.mjs` and `dist/tools/index.mjs`) re-export those same dist modules, and the build fills the `exports` map so you never hand-list it. The published package therefore needs `dist/`, not the author's original TypeScript. Consumers read only `eve.extension.dist`, so a published package may omit `eve.extension.source`; keep `source` declared wherever `eve extension build` runs.
110
+
111
+ The build uses the package `tsconfig.json` when it emits declarations. Its `include` must cover every JavaScript or TypeScript module in the extension source (and JavaScript modules require `allowJs`); the build fails before publishing if any distributed module would be missing its declaration.
112
+
113
+ The manifest contains only its format, the diagnostic eve build version, and the versions of extension capabilities this package actually uses. It does not contain compiled tools, schemas, names, or executable definitions; the consuming eve still discovers and normalizes the agent-shaped dist tree.
114
+
115
+ ### Workspace development
116
+
117
+ During local development, `eve dev` automatically rebuilds mounted workspace extensions when their source changes.
104
118
 
105
119
  ### Dependencies
106
120
 
107
- `eve` is a **peer** dependency: one eve lives in the consuming app and the extension's `eve/*` imports resolve to it. Declare the eve versions your extension supports as the peer range (`"eve": "^1"`) eve enforces it when the extension is mounted, failing the build with a clear error if the app's eve is out of range, rather than surfacing a confusing compile break. Everything else the extension imports (SDKs, `zod`, …) goes in `dependencies`; each extension resolves its own versions. The consumer recompiles the extension's contributions from source, so `files` must ship both `extension/` (that source) and `dist/` (the compiled entry points).
121
+ `eve` is a required wildcard **peer** dependency: one eve lives in the consuming app and the extension's `eve/*` imports resolve to it. The extension's concrete eve version belongs in `devDependencies` for authoring types and build tooling. npm peer semver does not decide extension compatibility; eve validates the generated per-capability requirements. Do not mark the eve peer optional and do not add eve to regular `dependencies`.
122
+
123
+ Everything else the extension imports at execution time (SDKs, `zod`, …) goes in `dependencies`; each extension resolves its own versions. Build-only and test-only packages go in `devDependencies`.
108
124
 
109
125
  Those deps resolve from `node_modules` under `eve dev`/`eve eval` and are bundled into the deployable by the consuming agent's `eve build`. A dependency that can't be bundled (a native addon) must be listed in the **consuming agent's** `build.externalDependencies` — an extension can't declare build config, so note it in your README.
110
126
 
@@ -47,7 +47,7 @@ After scaffolding, a human terminal usually continues into `eve dev` (or a codin
47
47
 
48
48
  ## `eve extension`
49
49
 
50
- Commands for reusable [extension](/docs/extensions) packages. An extension is identified by `package.json#eve.extension` (for example `"eve": { "extension": "./extension" }`).
50
+ Commands for reusable [extension](/docs/extensions) packages. An extension declares distinct authoring and distribution roots in `package.json#eve.extension` (for example `"eve": { "extension": { "source": "./extension", "dist": "./dist/extension" } }`).
51
51
 
52
52
  ### `eve extension init`
53
53
 
@@ -73,7 +73,7 @@ See [Extensions](/docs/extensions) for authoring and mount details.
73
73
  eve extension build
74
74
  ```
75
75
 
76
- Builds the current package as an extension: compiles the mount factory and tool re-exports into `dist/`, and fills the package `exports` map. Requires `package.json#eve.extension`.
76
+ Builds the complete agent-shaped extension tree into its configured dist root, emits declarations and compatibility metadata, and fills the package `exports` map. The original TypeScript source is not required in the published package.
77
77
 
78
78
  ## `eve info`
79
79
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eve",
3
- "version": "0.24.6",
3
+ "version": "0.25.1",
4
4
  "private": false,
5
5
  "description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
6
6
  "keywords": [
@@ -1 +0,0 @@
1
- export { normalizeJsonSchemaDefinition } from "#shared/json-schema.js";
@@ -1 +0,0 @@
1
- import{normalizeJsonSchemaDefinition}from"#shared/json-schema.js";export{normalizeJsonSchemaDefinition};
@@ -1,26 +0,0 @@
1
- import type { Prompter } from "../prompter.js";
2
- import { type SetupState } from "../state.js";
3
- import type { SetupBox } from "../step.js";
4
- import { syncHostFrameworkPreset } from "../vercel-project-framework.js";
5
- /** Injected for tests; defaults to the real framework-preset reconciliation. */
6
- export interface ReconcileHostFrameworkPresetDeps {
7
- syncHostFrameworkPreset: typeof syncHostFrameworkPreset;
8
- }
9
- export interface ReconcileHostFrameworkPresetOptions {
10
- /** Streams reconciliation progress and the applied-change note. */
11
- prompter: Prompter;
12
- deps?: ReconcileHostFrameworkPresetDeps;
13
- }
14
- /**
15
- * Aligns an already-linked Vercel project's Framework Preset with a newly-added
16
- * web (Next.js) channel before the deploy box runs. A project created as a
17
- * standalone agent keeps the `eve` preset, which would build the agent instead
18
- * of the host app; the command already deploys on the user's behalf, so this
19
- * corrects the preset directly (no confirmation) and notes the change.
20
- *
21
- * Runs only for an already-linked project — an unlinked directory links later
22
- * inside the deploy box, where a fresh `vercel link` detects the framework. All
23
- * effects live in {@link syncHostFrameworkPreset}, a no-op when the preset
24
- * already matches.
25
- */
26
- export declare function reconcileHostFrameworkPreset(options: ReconcileHostFrameworkPresetOptions): SetupBox<SetupState, null, null>;
@@ -1 +0,0 @@
1
- import{isProjectResolved}from"../project-resolution.js";import{requireProjectPath}from"../state.js";import{syncHostFrameworkPreset}from"../vercel-project-framework.js";import{createPromptCommandOutput}from"#setup/cli/index.js";function reconcileHostFrameworkPreset(r){let i=r.deps??{syncHostFrameworkPreset};return{id:`reconcile-host-framework-preset`,shouldRun(t){return t.deploymentPending&&t.channelSelection.includes(`web`)&&isProjectResolved(t.project)},async gather(){return null},async perform({state:e,signal:n}){let a=requireProjectPath(e),o=createPromptCommandOutput(r.prompter.log);return await i.syncHostFrameworkPreset(r.prompter,a,o,{signal:n}),null},apply(e){return e}}}export{reconcileHostFrameworkPreset};
@@ -1,36 +0,0 @@
1
- type BaseEvent = {
2
- type: string;
3
- };
4
- /**
5
- * Side-effect-only handler for one accepted runtime stream event.
6
- *
7
- * `TEvent` is one variant of the runtime stream-event union.
8
- * {@link GenericStreamEventHooks} infers `TEvent` from the event key.
9
- */
10
- export type GenericStreamEventHook<TEvent extends BaseEvent, TContext> = (event: TEvent, ctx: TContext) => void | Promise<void>;
11
- /**
12
- * Map of stream-event subscribers an authored hook file may declare.
13
- *
14
- * `*` matches every accepted runtime stream event and runs after the
15
- * typed handler for that event (if any).
16
- */
17
- export type GenericStreamEventHooks<TEvent extends BaseEvent, TContext> = {
18
- readonly "*"?: GenericStreamEventHook<TEvent, TContext>;
19
- } & {
20
- readonly [K in TEvent["type"]]?: GenericStreamEventHook<Extract<TEvent, {
21
- type: K;
22
- }>, TContext>;
23
- };
24
- /**
25
- * Public hook definition authored in `agent/hooks/*.ts`.
26
- *
27
- * Hook files declare stream-event subscribers (under `events:`) that
28
- * fire after eve has accepted and durably recorded each event.
29
- * Handlers are observe-only: they cannot inject model context. To
30
- * contribute runtime model messages, use `defineDynamic` +
31
- * `defineInstructions` in `agent/instructions/`.
32
- */
33
- export interface GenericHookDefinition<TEvent extends BaseEvent, TContext> {
34
- readonly events?: GenericStreamEventHooks<TEvent, TContext>;
35
- }
36
- export {};
@@ -1 +0,0 @@
1
- export{};
@@ -1,9 +0,0 @@
1
- import type { StandardJSONSchemaV1 } from "#compiled/@standard-schema/spec/index.js";
2
- import { type JsonObject } from "#shared/json.js";
3
- type JsonSchemaDirection = "input" | "output";
4
- /**
5
- * Normalizes one Standard Schema or JSON Schema definition into plain JSON
6
- * Schema data that can cross eve runtime and client boundaries.
7
- */
8
- export declare function normalizeJsonSchemaDefinition(value: StandardJSONSchemaV1 | Record<string, unknown> | unknown, direction?: JsonSchemaDirection): JsonObject;
9
- export {};
@@ -1 +0,0 @@
1
- import{parseJsonObject}from"#shared/json.js";function normalizeJsonSchemaDefinition(t,n=`input`){return isStandardSchema(t)?parseJsonObject(t[`~standard`].jsonSchema[n]({target:`draft-07`})):parseJsonObject(t)}function isStandardSchema(e){return typeof e==`object`&&!!e&&`~standard`in e}export{normalizeJsonSchemaDefinition};