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.
- package/CHANGELOG.md +21 -0
- package/dist/src/chunks/{use-eve-agent-6BO9gFVq.js → use-eve-agent-CQIeqmKc.js} +69 -64
- package/dist/src/chunks/{use-eve-agent-B1MJNRE-.js → use-eve-agent-Cy73lgA6.js} +69 -64
- package/dist/src/cli/commands/agent-instructions.js +1 -1
- package/dist/src/cli/commands/channels.js +1 -1
- package/dist/src/cli/commands/extension-build.d.ts +1 -1
- package/dist/src/cli/commands/extension-build.js +1 -1
- package/dist/src/client/output-schema.d.ts +0 -7
- package/dist/src/client/output-schema.js +1 -1
- package/dist/src/client/session.js +1 -1
- package/dist/src/compiler/extension-compatibility.d.ts +56 -0
- package/dist/src/compiler/extension-compatibility.js +1 -0
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/compiler/normalize-subagent.js +1 -1
- package/dist/src/context/build-dynamic-tools.js +1 -1
- package/dist/src/context/dynamic-tool-lifecycle.d.ts +1 -1
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
- package/dist/src/discover/discover-agent.d.ts +29 -7
- package/dist/src/discover/discover-agent.js +1 -1
- package/dist/src/discover/extensions.d.ts +43 -8
- package/dist/src/discover/extensions.js +1 -1
- package/dist/src/discover/filesystem.d.ts +3 -1
- package/dist/src/discover/filesystem.js +1 -1
- package/dist/src/discover/named-source-directory.js +1 -1
- package/dist/src/discover/skills.js +1 -1
- package/dist/src/evals/autoevals-client.js +2 -2
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-runtime.d.ts +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-runtime.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-templates.js +1 -1
- package/dist/src/execution/sandbox/development-cleanup.d.ts +1 -1
- package/dist/src/execution/sandbox/development-cleanup.js +1 -1
- package/dist/src/execution/sandbox/development-run.d.ts +0 -3
- package/dist/src/execution/sandbox/development-run.js +1 -1
- package/dist/src/execution/sandbox/ensure.js +1 -1
- package/dist/src/execution/subagent-tool.js +1 -1
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/input-extraction.d.ts +10 -1
- package/dist/src/harness/input-extraction.js +1 -1
- package/dist/src/harness/input-requests.d.ts +12 -2
- package/dist/src/harness/input-requests.js +1 -1
- package/dist/src/harness/messages.d.ts +8 -1
- package/dist/src/harness/messages.js +1 -1
- package/dist/src/harness/stale-input-responses.d.ts +26 -0
- package/dist/src/harness/stale-input-responses.js +3 -0
- package/dist/src/harness/step-hooks.d.ts +1 -12
- package/dist/src/harness/step-hooks.js +1 -1
- package/dist/src/harness/tool-call-input-errors.d.ts +11 -0
- package/dist/src/harness/tool-call-input-errors.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/workflow-sandbox.d.ts +1 -1
- package/dist/src/harness/workflow-sandbox.js +1 -1
- package/dist/src/internal/application/optional-package-install.d.ts +5 -0
- package/dist/src/internal/application/optional-package-install.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/schema-backed.js +1 -1
- package/dist/src/internal/authored-module-loader.d.ts +17 -0
- package/dist/src/internal/authored-module-loader.js +2 -2
- package/dist/src/internal/authored-module-map-loader.js +1 -1
- package/dist/src/internal/authored-package-boundary.d.ts +8 -0
- package/dist/src/internal/authored-package-boundary.js +1 -1
- package/dist/src/internal/nitro/dev-runtime-source-snapshot.d.ts +4 -0
- package/dist/src/internal/nitro/dev-runtime-source-snapshot.js +1 -1
- package/dist/src/internal/nitro/host/build-extension.d.ts +6 -21
- package/dist/src/internal/nitro/host/build-extension.js +2 -4
- package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.js +1 -1
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -1
- package/dist/src/internal/nitro/host/dev-workspace-extensions.d.ts +18 -0
- package/dist/src/internal/nitro/host/dev-workspace-extensions.js +1 -0
- package/dist/src/internal/nitro/host/extension-build-config.d.ts +18 -0
- package/dist/src/internal/nitro/host/extension-build-config.js +1 -0
- package/dist/src/internal/nitro/host/extension-capability-requirements.d.ts +10 -0
- package/dist/src/internal/nitro/host/extension-capability-requirements.js +1 -0
- package/dist/src/internal/nitro/host/extension-declarations.d.ts +10 -0
- package/dist/src/internal/nitro/host/extension-declarations.js +2 -0
- package/dist/src/internal/nitro/host/extension-distribution.d.ts +32 -0
- package/dist/src/internal/nitro/host/extension-distribution.js +3 -0
- package/dist/src/internal/nitro/host/extension-state-usage.d.ts +7 -0
- package/dist/src/internal/nitro/host/extension-state-usage.js +1 -0
- package/dist/src/internal/nitro/host/prepare-application-host.d.ts +5 -1
- package/dist/src/internal/nitro/host/prepare-application-host.js +1 -1
- package/dist/src/internal/nitro/host/start-development-server.js +2 -2
- package/dist/src/internal/nitro/host/types.d.ts +2 -0
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
- package/dist/src/public/definitions/hook.d.ts +63 -12
- package/dist/src/public/definitions/tool.d.ts +2 -2
- package/dist/src/public/hooks/index.d.ts +1 -1
- package/dist/src/public/tools/internal.js +1 -1
- package/dist/src/runtime/agent/mock-model-fixtures.js +2 -2
- package/dist/src/runtime/connections/openapi-client.js +1 -1
- package/dist/src/runtime/framework-tools/ask-question.d.ts +23 -9
- package/dist/src/runtime/framework-tools/ask-question.js +1 -1
- package/dist/src/runtime/framework-tools/bash.d.ts +10 -3
- package/dist/src/runtime/framework-tools/bash.js +1 -1
- package/dist/src/runtime/framework-tools/connection-search-dynamic.js +1 -1
- package/dist/src/runtime/framework-tools/final-output.d.ts +1 -1
- package/dist/src/runtime/framework-tools/final-output.js +1 -1
- package/dist/src/runtime/framework-tools/glob.d.ts +12 -3
- package/dist/src/runtime/framework-tools/glob.js +1 -1
- package/dist/src/runtime/framework-tools/grep.d.ts +16 -3
- package/dist/src/runtime/framework-tools/grep.js +1 -1
- package/dist/src/runtime/framework-tools/read-file.d.ts +13 -3
- package/dist/src/runtime/framework-tools/read-file.js +1 -1
- package/dist/src/runtime/framework-tools/skill.d.ts +5 -2
- package/dist/src/runtime/framework-tools/skill.js +1 -1
- package/dist/src/runtime/framework-tools/todo.d.ts +57 -10
- package/dist/src/runtime/framework-tools/todo.js +3 -3
- package/dist/src/runtime/framework-tools/web-fetch.d.ts +16 -3
- package/dist/src/runtime/framework-tools/web-fetch.js +1 -1
- package/dist/src/runtime/framework-tools/write-file.d.ts +9 -3
- package/dist/src/runtime/framework-tools/write-file.js +1 -1
- package/dist/src/runtime/loaders/compile-metadata.js +1 -1
- package/dist/src/runtime/loaders/manifest.js +1 -1
- package/dist/src/runtime/loaders/module-map.js +1 -1
- package/dist/src/runtime/resolve-tool.d.ts +4 -5
- package/dist/src/runtime/resolve-tool.js +1 -1
- package/dist/src/runtime/subagents/registry.d.ts +6 -3
- package/dist/src/runtime/subagents/registry.js +1 -1
- package/dist/src/runtime/tools/registry.js +1 -1
- package/dist/src/runtime/types.d.ts +7 -9
- package/dist/src/setup/boxes/deploy-project.d.ts +11 -1
- package/dist/src/setup/boxes/deploy-project.js +1 -1
- package/dist/src/setup/scaffold/create/add-to-project.js +1 -1
- package/dist/src/setup/scaffold/create/extension.js +2 -2
- package/dist/src/setup/scaffold/create/project.js +2 -2
- package/dist/src/setup/scaffold/update/channels.js +1 -1
- package/dist/src/setup/scaffold/update/connections.js +1 -1
- package/dist/src/setup/vercel-project-framework.d.ts +4 -2
- package/dist/src/shared/extension-package-contract.d.ts +11 -0
- package/dist/src/shared/extension-package-contract.js +1 -0
- package/dist/src/shared/json.d.ts +4 -0
- package/dist/src/shared/json.js +1 -1
- package/dist/src/shared/tool-schema.d.ts +52 -0
- package/dist/src/shared/tool-schema.js +1 -0
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/concepts/sessions-runs-and-streaming.md +6 -0
- package/docs/extensions.md +22 -6
- package/docs/reference/cli.md +2 -2
- package/package.json +1 -1
- package/dist/src/internal/json-schema.d.ts +0 -1
- package/dist/src/internal/json-schema.js +0 -1
- package/dist/src/setup/boxes/reconcile-host-framework-preset.d.ts +0 -26
- package/dist/src/setup/boxes/reconcile-host-framework-preset.js +0 -1
- package/dist/src/shared/hook-definition.d.ts +0 -36
- package/dist/src/shared/hook-definition.js +0 -1
- package/dist/src/shared/json-schema.d.ts +0 -9
- package/dist/src/shared/json-schema.js +0 -1
package/docs/extensions.md
CHANGED
|
@@ -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
|
-
|
|
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": {
|
|
81
|
-
|
|
82
|
-
|
|
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`
|
|
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.
|
|
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
|
|
package/docs/reference/cli.md
CHANGED
|
@@ -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
|
|
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
|
|
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 +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};
|