eve 0.52.5 → 0.53.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.
- package/CHANGELOG.md +14 -0
- package/dist/src/cli/dev/tui/message-queue.js +1 -1
- package/dist/src/cli/dev/tui/terminal-renderer.js +12 -12
- package/dist/src/compiled/.vendor-stamp.json +16 -16
- package/dist/src/compiled/@ai-sdk/anthropic/index.d.ts +23 -2
- package/dist/src/compiled/@ai-sdk/anthropic/index.js +2 -4
- package/dist/src/compiled/@ai-sdk/google/index.d.ts +145 -33
- package/dist/src/compiled/@ai-sdk/google/index.js +10 -7
- package/dist/src/compiled/@ai-sdk/mcp/index.d.ts +176 -7
- package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/openai/index.d.ts +71 -40
- package/dist/src/compiled/@ai-sdk/openai/index.js +8 -8
- package/dist/src/compiled/@ai-sdk/otel/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/provider/index.d.ts +225 -3
- package/dist/src/compiled/@ai-sdk/provider-utils/index.d.ts +220 -151
- package/dist/src/compiled/@workflow/core/create-hook.d.ts +3 -0
- package/dist/src/compiled/@workflow/core/index.js +2 -2
- package/dist/src/compiled/@workflow/core/private.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/resume-hook.d.ts +59 -7
- package/dist/src/compiled/@workflow/core/runtime/run.d.ts +42 -0
- package/dist/src/compiled/@workflow/core/runtime/start.d.ts +31 -1
- package/dist/src/compiled/@workflow/core/runtime.d.ts +2 -2
- package/dist/src/compiled/@workflow/core/runtime.js +2 -2
- package/dist/src/compiled/@workflow/core/serialization.d.ts +22 -0
- package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/errors/index.d.ts +37 -3
- package/dist/src/compiled/@workflow/errors/index.js +1 -1
- package/dist/src/compiled/@workflow/world/attributes-validation.d.ts +68 -0
- package/dist/src/compiled/@workflow/world/index.d.ts +1 -1
- package/dist/src/compiled/@workflow/world/interfaces.d.ts +21 -0
- package/dist/src/compiled/@workflow/world-local/index.js +5 -5
- package/dist/src/compiled/@workflow/world-vercel/index.js +3 -3
- package/dist/src/compiled/_chunks/workflow/attribute-changes-C6H-fRVP.js +20 -0
- package/dist/src/compiled/_chunks/workflow/dist-DDeH-1ER.js +40 -0
- package/dist/src/compiled/_chunks/workflow/dist-DhncQSl7.js +74 -0
- package/dist/src/compiled/_chunks/workflow/{dist-BIO9Inoc.js → dist-xTushGCp.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/frames-DsEqSDes.js +3 -0
- package/dist/src/compiled/_chunks/workflow/{private-aXEeo0fU.js → private-CFJkQA7R.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/resume-hook-BRDLAb67.js +1 -0
- package/dist/src/compiled/_chunks/workflow/run-BM2OFphk.js +1 -0
- package/dist/src/compiled/_chunks/workflow/sleep-6cG0F99-.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{ws-transport-M7uk8HV8.js → ws-transport-DuK82LLz.js} +1 -1
- package/dist/src/compiler/extension-compatibility.d.ts +5 -4
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/compiler/normalize-manifest-helpers.js +1 -1
- package/dist/src/execution/cancelled-model-call-batch.d.ts +15 -0
- package/dist/src/execution/cancelled-model-call-batch.js +1 -0
- package/dist/src/execution/coordination-dispatch-shared.js +1 -1
- package/dist/src/execution/model-call-batching.d.ts +11 -0
- package/dist/src/execution/model-call-batching.js +1 -0
- package/dist/src/execution/tools/sleep-workflow.js +1 -1
- package/dist/src/execution/tools/subagent/invoke-agent.d.ts +5 -5
- package/dist/src/execution/tools/subagent/invoke-agent.js +1 -1
- package/dist/src/execution/tools/subagent/start.js +1 -1
- package/dist/src/execution/tools/workflow/body.js +1 -1
- package/dist/src/execution/turn-workflow.js +1 -1
- package/dist/src/execution/wire/session-inbox-resume.js +1 -1
- package/dist/src/execution/workflow-steps.d.ts +1 -1
- package/dist/src/execution/workflow-steps.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/core.js +1 -1
- package/dist/src/internal/authored-package-boundary.js +1 -1
- package/dist/src/internal/workflow-bundle/authored-workflow-directives.js +1 -1
- package/dist/src/runtime/resolve-agent.js +1 -1
- package/dist/src/self-modification/agent.d.ts +2 -2
- package/dist/src/self-modification/agent.js +1 -1
- package/dist/src/self-modification/config.d.ts +15 -0
- package/dist/src/self-modification/config.js +1 -1
- package/dist/src/self-modification/extension/extension.d.ts +3 -0
- package/dist/src/self-modification/extension/extension.js +1 -1
- package/dist/src/self-modification/setup.d.ts +3 -0
- package/dist/src/self-modification/setup.js +25 -4
- package/dist/src/setup/integrations/self-modification/setup.js +1 -1
- package/dist/src/setup/scaffold/create/add-to-project.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +2 -2
- package/dist/src/setup/scaffold/update/web-options.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +11 -2
- package/dist/src/tools/workflow-definition.d.ts +38 -4
- package/docs/agent-config.md +44 -8
- package/docs/concepts/execution-model-and-durability.mdx +20 -2
- package/docs/guides/dev-tui.md +11 -11
- package/docs/subagents/index.mdx +1 -1
- package/docs/tools/workflows.mdx +15 -10
- package/package.json +17 -17
- package/dist/src/compiled/_chunks/workflow/attribute-changes-DpruylJZ.js +0 -20
- package/dist/src/compiled/_chunks/workflow/dist-ChzQSWQA.js +0 -65
- package/dist/src/compiled/_chunks/workflow/dist-veFIAdWV.js +0 -40
- package/dist/src/compiled/_chunks/workflow/frames-DKxlMf3X.js +0 -3
- package/dist/src/compiled/_chunks/workflow/resume-hook-DWDi_wCN.js +0 -1
- package/dist/src/compiled/_chunks/workflow/run-vsAdI41O.js +0 -1
- package/dist/src/compiled/_chunks/workflow/sleep-BKxoNDRv.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{pinnedNodeEngineMajor}from"../../node-engine.js";import{parseChatGptModelSelection}from"../../../shared/chatgpt-model.js";import{SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS}from"../update/module-files.js";import{pathExists,writeTextFile}from"../files.js";import{blockingCreateInPlaceEntries}from"../create-in-place.js";import{resolveVersionToken}from"../version-tokens.js";import{applyPackageManagerWorkspaceConfiguration,isPackageManagerWorkspaceMember,patchWorkspaceRootPackageJson}from"../workspace-root.js";import{WEB_APP_TEMPLATE_FILES}from"./web-template.js";import{mkdir,readdir,stat}from"node:fs/promises";import{basename,join,resolve}from"node:path";const CURRENT_DIRECTORY_PROJECT_NAME=`.`,DEFAULT_AI_PACKAGE_VERSION=`^7.0.
|
|
1
|
+
import{pinnedNodeEngineMajor}from"../../node-engine.js";import{parseChatGptModelSelection}from"../../../shared/chatgpt-model.js";import{SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS}from"../update/module-files.js";import{pathExists,writeTextFile}from"../files.js";import{blockingCreateInPlaceEntries}from"../create-in-place.js";import{resolveVersionToken}from"../version-tokens.js";import{applyPackageManagerWorkspaceConfiguration,isPackageManagerWorkspaceMember,patchWorkspaceRootPackageJson}from"../workspace-root.js";import{WEB_APP_TEMPLATE_FILES}from"./web-template.js";import{mkdir,readdir,stat}from"node:fs/promises";import{basename,join,resolve}from"node:path";const CURRENT_DIRECTORY_PROJECT_NAME=`.`,DEFAULT_AI_PACKAGE_VERSION=`^7.0.93`,DEFAULT_CONNECT_PACKAGE_VERSION=`1.0.0`,DEFAULT_ZOD_PACKAGE_VERSION=`4.5.4`,DEFAULT_EVE_PACKAGE_CONTRACT={version:`0.53.0`,nodeEngine:`>=24`};function resolveEvePackageContract(e=DEFAULT_EVE_PACKAGE_CONTRACT){return{version:resolveVersionToken(`evePackage.version`,e.version),nodeEngine:resolveVersionToken(`evePackage.nodeEngine`,e.nodeEngine)}}function modelProviderSlug(e){let t=(e.split(`/`)[0]??``).replaceAll(/[^A-Za-z0-9._-]/gu,``);return t.length>0?t:`anthropic`}function byokProviderEnvVar(e){let t=modelProviderSlug(e).toUpperCase().replaceAll(/[^A-Z0-9]/gu,`_`);return`${/^[0-9]/.test(t)?`_`:``}${t}_API_KEY`}function agentTemplateFiles(e,t){return{"agent/agent.ts":renderAgentTemplate(e,t),"agent/channels/eve.ts":WEB_APP_TEMPLATE_FILES[`agent/channels/eve.ts`],"agent/instructions.md":AGENT_INSTRUCTIONS_TEMPLATE}}function renderAgentTemplate(e,t){let n=parseChatGptModelSelection(e);return n===void 0?BASE_AGENT_TEMPLATE.replaceAll(`__EVE_INIT_MODEL__`,e).replaceAll(`__EVE_INIT_REASONING__`,reasoningTemplateLine(t)):`import { defineAgent } from "eve";\nimport { chatgpt } from "eve/models/openai";\n\nexport default defineAgent({\n model: chatgpt(${JSON.stringify(n)}),\n${reasoningTemplateLine(t)}});\n`}function reasoningTemplateLine(e){return e===void 0||e===`provider-default`?``:` reasoning: "${e}",\n`}function renderTemplate(e,t){return e===BASE_AGENT_TEMPLATE&&parseChatGptModelSelection(t.model)!==void 0?renderAgentTemplate(t.model,t.reasoning):e.replaceAll(`__EVE_INIT_APP_NAME__`,t.appName).replaceAll(`__EVE_INIT_MODEL__`,t.model).replaceAll(`__EVE_INIT_REASONING__`,reasoningTemplateLine(t.reasoning)).replaceAll(`__EVE_INIT_BYOK_PROVIDER__`,modelProviderSlug(t.model)).replaceAll(`__EVE_INIT_BYOK_ENV_VAR__`,byokProviderEnvVar(t.model)).replaceAll(`__EVE_INIT_PACKAGE_VERSION__`,formatEveDependencySpecifier(t.eveVersion)).replaceAll(`__EVE_INIT_AI_SDK_VERSION__`,t.aiPackageVersion).replaceAll(`__EVE_INIT_CONNECT_VERSION__`,t.connectPackageVersion).replaceAll(`__EVE_INIT_ZOD_VERSION__`,t.zodPackageVersion).replaceAll(`__EVE_INIT_TYPESCRIPT_VERSION__`,t.typescriptPackageVersion).replaceAll(`__EVE_INIT_TYPES_NODE_VERSION__`,t.nodeTypesVersion).replaceAll(`__EVE_INIT_NODE_ENGINE__`,t.nodeEngine)}function formatEveDependencySpecifier(e){return/^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z-.]+)?$/.test(e)?`^${e}`:e}const BASE_AGENT_TEMPLATE=`import { defineAgent } from "eve";
|
|
2
2
|
|
|
3
3
|
export default defineAgent({
|
|
4
4
|
model: "__EVE_INIT_MODEL__",
|
|
@@ -117,4 +117,4 @@ __EVE_INIT_REASONING__ modelOptions: {
|
|
|
117
117
|
},
|
|
118
118
|
},
|
|
119
119
|
});
|
|
120
|
-
`:BASE_AGENT_TEMPLATE,...SHARED_TEMPLATE_FILES,"package.json":packageJsonTemplate(e.includeRootOnlyPackageJsonFields)}}async function assertCanCreateInPlace(e,t){if(!await pathExists(e))return;let n=await readdir(e),r=blockingCreateInPlaceEntries(n);if(r.length>0&&!t){let e=r.slice(0,5).join(`, `),t=r.length>5?`, and ${r.length-5} more`:``;throw Error(`Cannot create project in current directory because it is not empty. Found: ${e}${t}. Use an empty directory.`)}}async function scaffoldBaseProject(e){let t=resolve(e.targetDirectory??process.cwd(),e.projectName),n=e.projectName===`.`,r=e.overwriteExisting??!1,i=e.byokProvider??!1,a=e.packageManager??`pnpm`,o=resolveEvePackageContract(e.evePackage),s=pinnedNodeEngineMajor(o.nodeEngine),c=resolve(e.workspaceProbeDirectory??t),l=isPackageManagerWorkspaceMember(a,c);if(n)await assertCanCreateInPlace(t,r);else if(await pathExists(t))throw Error(`Cannot create project because "${t}" already exists.`);let u={appName:basename(t),model:e.model,reasoning:e.reasoning,eveVersion:o.version,aiPackageVersion:resolveVersionToken(`aiPackageVersion`,e.aiPackageVersion??`^7.0.
|
|
120
|
+
`:BASE_AGENT_TEMPLATE,...SHARED_TEMPLATE_FILES,"package.json":packageJsonTemplate(e.includeRootOnlyPackageJsonFields)}}async function assertCanCreateInPlace(e,t){if(!await pathExists(e))return;let n=await readdir(e),r=blockingCreateInPlaceEntries(n);if(r.length>0&&!t){let e=r.slice(0,5).join(`, `),t=r.length>5?`, and ${r.length-5} more`:``;throw Error(`Cannot create project in current directory because it is not empty. Found: ${e}${t}. Use an empty directory.`)}}async function scaffoldBaseProject(e){let t=resolve(e.targetDirectory??process.cwd(),e.projectName),n=e.projectName===`.`,r=e.overwriteExisting??!1,i=e.byokProvider??!1,a=e.packageManager??`pnpm`,o=resolveEvePackageContract(e.evePackage),s=pinnedNodeEngineMajor(o.nodeEngine),c=resolve(e.workspaceProbeDirectory??t),l=isPackageManagerWorkspaceMember(a,c);if(n)await assertCanCreateInPlace(t,r);else if(await pathExists(t))throw Error(`Cannot create project because "${t}" already exists.`);let u={appName:basename(t),model:e.model,reasoning:e.reasoning,eveVersion:o.version,aiPackageVersion:resolveVersionToken(`aiPackageVersion`,e.aiPackageVersion??`^7.0.93`),connectPackageVersion:resolveVersionToken(`connectPackageVersion`,e.connectPackageVersion??`1.0.0`),zodPackageVersion:resolveVersionToken(`zodPackageVersion`,e.zodPackageVersion??`4.5.4`),typescriptPackageVersion:resolveVersionToken(`typescriptPackageVersion`,e.typescriptPackageVersion??`7.0.2`),nodeTypesVersion:s,nodeEngine:s};await mkdir(t,{recursive:!0});for(let[a,o]of Object.entries(templateFiles({byokProvider:i,includeRootOnlyPackageJsonFields:!l}))){let i=`${t}/${a}`,s=await pathExists(i);await writeTextFile(i,renderTemplate(o,u),{force:n&&r}),s&&await e.onOverwriteFile?.(i)}return await applyPackageManagerWorkspaceConfiguration({packageManager:a,projectRoot:t,workspaceProbeRoot:c,onWorkspaceRootMutation:e.onWorkspaceRootMutation}),await patchWorkspaceRootPackageJson(a,c,{nodeEngineRequirement:o.nodeEngine,onWorkspaceRootMutation:e.onWorkspaceRootMutation}),t}async function isEveProject(e){for(let t of SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS)try{return await stat(join(e,`agent`,`agent${t}`)),!0}catch{}return!1}export{CURRENT_DIRECTORY_PROJECT_NAME,DEFAULT_AI_PACKAGE_VERSION,DEFAULT_CONNECT_PACKAGE_VERSION,DEFAULT_EVE_PACKAGE_CONTRACT,DEFAULT_ZOD_PACKAGE_VERSION,ROOT_ONLY_PACKAGE_JSON_TEMPLATE_SUFFIX,agentTemplateFiles,byokProviderEnvVar,formatEveDependencySpecifier,isEveProject,modelProviderSlug,resolveEvePackageContract,scaffoldBaseProject};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DEFAULT_EVE_PACKAGE_CONTRACT}from"../create/project.js";function resolveWebPackageVersions(e,t){return{evePackage:e?.evePackage??DEFAULT_EVE_PACKAGE_CONTRACT,aiPackageVersion:e?.aiPackageVersion??`^7.0.
|
|
1
|
+
import{DEFAULT_EVE_PACKAGE_CONTRACT}from"../create/project.js";function resolveWebPackageVersions(e,t){return{evePackage:e?.evePackage??DEFAULT_EVE_PACKAGE_CONTRACT,aiPackageVersion:e?.aiPackageVersion??`^7.0.93`,betterAuthPackageVersion:e?.betterAuthPackageVersion??`1.6.26`,nextPackageVersion:e?.nextPackageVersion??(t===`sign-in-with-vercel`?`16.3.0`:`16.3.4`),reactPackageVersion:e?.reactPackageVersion??`19.2.6`,reactDomPackageVersion:e?.reactDomPackageVersion??`19.2.6`,streamdownPackageVersion:e?.streamdownPackageVersion??`2.5.0`,zodPackageVersion:e?.zodPackageVersion??`4.5.4`,typesReactPackageVersion:e?.typesReactPackageVersion??`19.2.15`,typesReactDomPackageVersion:e?.typesReactDomPackageVersion??`19.2.3`}}export{resolveWebPackageVersions};
|
|
@@ -194,8 +194,7 @@ export interface AgentExperimentalDefinition {
|
|
|
194
194
|
*/
|
|
195
195
|
readonly tasks?: boolean;
|
|
196
196
|
/**
|
|
197
|
-
* Durable Workflow runtime configuration.
|
|
198
|
-
* the Workflow world backing sessions and runs.
|
|
197
|
+
* Durable Workflow runtime configuration.
|
|
199
198
|
*/
|
|
200
199
|
readonly workflow?: AgentWorkflowDefinition;
|
|
201
200
|
}
|
|
@@ -229,6 +228,16 @@ export type AgentWorkflowWorldDefinition = string;
|
|
|
229
228
|
* Advanced durable-runtime configuration for eve's Workflow SDK integration.
|
|
230
229
|
*/
|
|
231
230
|
export interface AgentWorkflowDefinition {
|
|
231
|
+
/**
|
|
232
|
+
* Maximum number of turn-model calls eve may run inside one durable Workflow step.
|
|
233
|
+
*
|
|
234
|
+
* Values greater than one reduce Workflow checkpoint overhead but widen the
|
|
235
|
+
* replay unit: if the Workflow step is interrupted, earlier model calls and
|
|
236
|
+
* inline tool executions in the same step may run again.
|
|
237
|
+
*
|
|
238
|
+
* @default 1
|
|
239
|
+
*/
|
|
240
|
+
readonly modelCallsPerStep?: number;
|
|
232
241
|
/**
|
|
233
242
|
* Workflow world module used for durable workflow storage, queueing, hooks,
|
|
234
243
|
* and streaming.
|
|
@@ -6,18 +6,52 @@ import type { TaskExec } from "#tools/task.js";
|
|
|
6
6
|
import type { ToolModelOutput } from "#tools/model-output.js";
|
|
7
7
|
export interface AgentInput {
|
|
8
8
|
readonly agentId?: string;
|
|
9
|
-
readonly key: string;
|
|
10
9
|
readonly message: string;
|
|
11
10
|
readonly outputSchema?: JsonObject;
|
|
12
|
-
|
|
11
|
+
}
|
|
12
|
+
type JsonSchemaProperties = Readonly<Record<string, JsonObject>>;
|
|
13
|
+
type JsonSchemaRequiredKeys<TProperties extends JsonSchemaProperties, TRequired> = TRequired extends readonly string[] ? Extract<TRequired[number], keyof TProperties> : never;
|
|
14
|
+
type Simplify<TValue> = {
|
|
15
|
+
[TKey in keyof TValue]: TValue[TKey];
|
|
16
|
+
};
|
|
17
|
+
type JsonSchemaObjectOutput<TProperties extends JsonSchemaProperties, TRequired> = Simplify<{
|
|
18
|
+
-readonly [TKey in JsonSchemaRequiredKeys<TProperties, TRequired>]-?: JsonSchemaOutput<TProperties[TKey]>;
|
|
19
|
+
} & {
|
|
20
|
+
-readonly [TKey in Exclude<keyof TProperties, JsonSchemaRequiredKeys<TProperties, TRequired>>]?: JsonSchemaOutput<TProperties[TKey]>;
|
|
21
|
+
}>;
|
|
22
|
+
type JsonSchemaOutput<TSchema> = TSchema extends {
|
|
23
|
+
readonly const: infer TValue;
|
|
24
|
+
} ? Extract<TValue, JsonValue> : TSchema extends {
|
|
25
|
+
readonly enum: readonly (infer TValue)[];
|
|
26
|
+
} ? Extract<TValue, JsonValue> : TSchema extends {
|
|
27
|
+
readonly type: "object";
|
|
28
|
+
readonly properties: infer TProperties extends JsonSchemaProperties;
|
|
29
|
+
readonly required?: infer TRequired;
|
|
30
|
+
} ? JsonSchemaObjectOutput<TProperties, TRequired> : TSchema extends {
|
|
31
|
+
readonly type: "array";
|
|
32
|
+
readonly items: infer TItems extends JsonObject;
|
|
33
|
+
} ? JsonSchemaOutput<TItems>[] : TSchema extends {
|
|
34
|
+
readonly type: "string";
|
|
35
|
+
} ? string : TSchema extends {
|
|
36
|
+
readonly type: "integer" | "number";
|
|
37
|
+
} ? number : TSchema extends {
|
|
38
|
+
readonly type: "boolean";
|
|
39
|
+
} ? boolean : TSchema extends {
|
|
40
|
+
readonly type: "null";
|
|
41
|
+
} ? null : JsonValue;
|
|
42
|
+
interface WorkflowAgent {
|
|
43
|
+
<const TOutputSchema extends JsonObject>(target: string, input: AgentInput & {
|
|
44
|
+
readonly outputSchema: TOutputSchema;
|
|
45
|
+
}): Promise<JsonSchemaOutput<TOutputSchema>>;
|
|
46
|
+
(target: string, input: AgentInput): Promise<JsonValue>;
|
|
13
47
|
}
|
|
14
48
|
/**
|
|
15
49
|
* Context supplied to a workflow tool. Pass it directly to a step helper for
|
|
16
50
|
* getToken/requireAuth; those capabilities throw in the workflow body itself.
|
|
17
51
|
*/
|
|
18
52
|
export type WorkflowToolContext = Pick<ToolContext, "abortSignal" | "callId" | "session" | "toolName" | "getToken" | "requireAuth"> & {
|
|
19
|
-
/** Invoke a visible subagent
|
|
20
|
-
agent
|
|
53
|
+
/** Invoke a visible subagent by its model-visible name. */
|
|
54
|
+
agent: WorkflowAgent;
|
|
21
55
|
/** Ask the human on the session's channel; awaiting the answer suspends the run. */
|
|
22
56
|
ask(request: ToolInputRequest): PromiseLike<ToolInputResponse>;
|
|
23
57
|
};
|
package/docs/agent-config.md
CHANGED
|
@@ -247,18 +247,54 @@ putting the connection string or credentials in the env vars it reads. If the
|
|
|
247
247
|
installed package must stay external in hosted output, list it in
|
|
248
248
|
`build.externalDependencies`.
|
|
249
249
|
|
|
250
|
+
## Workflow checkpoint batching
|
|
251
|
+
|
|
252
|
+
By default, eve commits a durable Workflow step after every model call and its
|
|
253
|
+
inline tool calls. You can experimentally let one Workflow step run several
|
|
254
|
+
sequential model calls:
|
|
255
|
+
|
|
256
|
+
```ts title="agent/agent.ts"
|
|
257
|
+
import { defineAgent } from "eve";
|
|
258
|
+
|
|
259
|
+
export default defineAgent({
|
|
260
|
+
model: "anthropic/claude-opus-4.8",
|
|
261
|
+
experimental: {
|
|
262
|
+
workflow: {
|
|
263
|
+
modelCallsPerStep: 4,
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
});
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
`experimental.workflow.modelCallsPerStep` is a positive-integer ceiling. It defaults to
|
|
270
|
+
`1` and applies independently to each root agent or declared subagent. A higher
|
|
271
|
+
value can reduce Workflow checkpoint overhead in sequential tool loops, but it
|
|
272
|
+
widens the replay unit: if the Workflow step is interrupted, its earlier model
|
|
273
|
+
calls and inline tool executions can run again. That can repeat provider costs,
|
|
274
|
+
events, and side effects. Use stable idempotency keys for non-idempotent tools.
|
|
275
|
+
|
|
276
|
+
eve ends a batch before it waits for input, authorization, or blocking
|
|
277
|
+
coordination, and before it acknowledges a background task. A batch can also
|
|
278
|
+
end below the configured ceiling when the turn completes. Steering cancels the
|
|
279
|
+
active model-and-tool cycle, commits earlier completed cycles in the batch, and
|
|
280
|
+
starts the replacement turn from that state. It does not roll the session back
|
|
281
|
+
to the beginning of the batch. This option is experimental and may change or
|
|
282
|
+
disappear in any release. See [Execution model and
|
|
283
|
+
durability](./concepts/execution-model-and-durability#resuming-after-a-crash)
|
|
284
|
+
for the retry behavior.
|
|
285
|
+
|
|
250
286
|
## Other defineAgent fields
|
|
251
287
|
|
|
252
288
|
`defineAgent` takes a few more fields, all optional. For the exported types, see the [TypeScript API Reference](./reference/typescript-api).
|
|
253
289
|
|
|
254
|
-
| Field | Type | Default | Description
|
|
255
|
-
| -------------- | --------------------------------------- | ---------------- |
|
|
256
|
-
| `reasoning` | `AgentReasoningDefinition` | provider default | Provider-agnostic reasoning effort forwarded to the agent's turn model calls.
|
|
257
|
-
| `modelOptions` | `AgentModelOptionsDefinition` | none | Provider option overrides forwarded to the model call.
|
|
258
|
-
| `limits` | `AgentLimitsDefinition` | field-specific | Framework-owned runtime limits. Sessions complete after 30 days by default; usage-limit defaults and inheritance are described above. Set a limit to `false` to disable it.
|
|
259
|
-
| `experimental` | `
|
|
260
|
-
| `outputSchema` | Standard Schema or a JSON Schema object | none | Structured return type for function-like invocations such as a subagent turn, schedule, or remote job. Ordinary interactive turns ignore it unless the client supplies a per-message schema.
|
|
261
|
-
| `build` | `{ externalDependencies?: string[] }` | none | Hosted-build packaging controls. `externalDependencies` keeps listed packages external while eve compiles authored modules such as tools and channels, and traces those packages into the hosted output.
|
|
290
|
+
| Field | Type | Default | Description |
|
|
291
|
+
| -------------- | --------------------------------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
292
|
+
| `reasoning` | `AgentReasoningDefinition` | provider default | Provider-agnostic reasoning effort forwarded to the agent's turn model calls. |
|
|
293
|
+
| `modelOptions` | `AgentModelOptionsDefinition` | none | Provider option overrides forwarded to the model call. |
|
|
294
|
+
| `limits` | `AgentLimitsDefinition` | field-specific | Framework-owned runtime limits. Sessions complete after 30 days by default; usage-limit defaults and inheritance are described above. Set a limit to `false` to disable it. |
|
|
295
|
+
| `experimental` | `AgentExperimentalDefinition` | unset | Unstable opt-ins. `workflow.world` selects the Workflow world package on the root agent; `workflow.modelCallsPerStep` batches sequential model calls into a wider replay unit. |
|
|
296
|
+
| `outputSchema` | Standard Schema or a JSON Schema object | none | Structured return type for function-like invocations such as a subagent turn, schedule, or remote job. Ordinary interactive turns ignore it unless the client supplies a per-message schema. |
|
|
297
|
+
| `build` | `{ externalDependencies?: string[] }` | none | Hosted-build packaging controls. `externalDependencies` keeps listed packages external while eve compiles authored modules such as tools and channels, and traces those packages into the hosted output. |
|
|
262
298
|
|
|
263
299
|
`externalDependencies` is a packaging control only. It keeps selected packages as runtime dependencies in the hosted output; it does not authorize, configure, or review any third-party service those packages may call.
|
|
264
300
|
|
|
@@ -11,10 +11,16 @@ Work nests in three levels:
|
|
|
11
11
|
|
|
12
12
|
- **session**: the whole durable conversation or task. It's long-lived and can span many requests over days or weeks without losing context.
|
|
13
13
|
- **turn**: one user message and all the work it triggers (model calls, tool calls, reasoning) until the agent produces its response.
|
|
14
|
-
- **step**: a durable checkpoint inside a turn
|
|
14
|
+
- **step**: a durable checkpoint inside a turn. By default, it contains one model call and the inline tool calls that follow it.
|
|
15
15
|
|
|
16
16
|
Every turn runs as a durable workflow, built on the open-source [Workflow SDK](https://workflow-sdk.dev/) (Vercel Workflow when you deploy on Vercel). eve checkpoints progress and serializes durable state at each step boundary. Your code runs inside a managed step, so tools, the sandbox, and subagents feel synchronous even though the session underneath them is durable.
|
|
17
17
|
|
|
18
|
+
The experimental
|
|
19
|
+
[`workflow.modelCallsPerStep`](../agent-config#workflow-checkpoint-batching)
|
|
20
|
+
agent setting can group several sequential model-and-tool cycles into one
|
|
21
|
+
Workflow step. This reduces checkpoint overhead but makes the entire group one
|
|
22
|
+
replay unit.
|
|
23
|
+
|
|
18
24
|
The Workflow SDK is not inherently tied to Vercel. In local development and in a self-deployed `eve start` process, eve uses the SDK's local world by default; that world persists workflow runs on disk under `.eve/.workflow-data` and dispatches through the same Nitro-hosted workflow routes. On Vercel, the same workflow code runs against Vercel Workflow instead, which adds platform features such as latest production deployment routing and dashboard run metadata.
|
|
19
25
|
|
|
20
26
|
When a Vercel production deployment changes, the next model turn in an existing session uses that deployment's current system-role instructions, model, and tools. Static user-role instructions stay pinned in the durable conversation history and are not seeded again. Identity-based channels such as Telegram private chats and Twilio phone-number conversations therefore adopt agent behavior updates without duplicating or rewriting their existing context.
|
|
@@ -58,7 +64,19 @@ Provider keys, tool secrets, and MCP, OpenAPI, and connection credentials stay i
|
|
|
58
64
|
|
|
59
65
|
Crash the process, hit a timeout, or redeploy mid-turn, and the run picks up from the last completed step rather than replaying the whole turn. Completed steps never re-run; eve replays the recorded result. A step interrupted mid-execution re-runs, so make non-idempotent side effects like charges or emails idempotent, or gate them with approval. Whatever that step already wrote to the session stream stays there, and the re-run emits its events again under new ids, so a stream consumer sees both attempts — see [the event envelope](./sessions-runs-and-streaming#the-event-envelope).
|
|
60
66
|
|
|
61
|
-
|
|
67
|
+
With `experimental.workflow.modelCallsPerStep` greater than `1`, an
|
|
68
|
+
interrupted Workflow step can also repeat earlier model calls and inline tool
|
|
69
|
+
executions from the same batch. Approval, input, blocking coordination, and
|
|
70
|
+
background-task boundaries still force a checkpoint before eve waits or
|
|
71
|
+
acknowledges the work.
|
|
72
|
+
|
|
73
|
+
Steering does not replay or discard the whole batch. eve aborts the active
|
|
74
|
+
model-and-tool cycle, commits earlier completed cycles in the batch, and starts
|
|
75
|
+
the replacement turn from that state in the next Workflow step.
|
|
76
|
+
|
|
77
|
+
Durability itself needs no configuration. eve owns the workflow lifecycle, and
|
|
78
|
+
sessions are durable by default; checkpoint batching is an explicit
|
|
79
|
+
experimental opt-in.
|
|
62
80
|
|
|
63
81
|
For ordinary tools, eve manages the workflow around your executor. Use [`defineWorkflowTool`](../tools/workflows) when your own tool body needs durable waits, such as a timer, webhook, or human answer. Two surfaces give your own code session data: tools read the current session's metadata (id, turn, auth, parent lineage) via `ctx.session`, and [`defineState`](./state) reads or writes session-scoped durable state. See [State](./state) for the read/write model.
|
|
64
82
|
|
package/docs/guides/dev-tui.md
CHANGED
|
@@ -59,17 +59,17 @@ The UI installs planner selections in order and offers deployment once after the
|
|
|
59
59
|
|
|
60
60
|
Type a message and press `Enter` to send it. When the agent asks a question or requests tool approval, respond in the prompt shown by the UI. Connection authorization can open a browser; keep local `eve dev` running until the browser returns to it.
|
|
61
61
|
|
|
62
|
-
While a turn is running, `Enter` queues a follow-up message. Press `Esc` or `Ctrl+C` to cancel the turn; when messages are queued, this uses the oldest queued message as the next turn instead. At an idle prompt, press `Ctrl+C` twice to exit.
|
|
63
|
-
|
|
64
|
-
| Key | Action
|
|
65
|
-
| ------------- |
|
|
66
|
-
| `Enter` | Send the current message or answer.
|
|
67
|
-
| `Shift+Enter` | Insert a newline. Requires a terminal that reports modified keys.
|
|
68
|
-
| `Esc` | Cancel a running turn, or steer with the oldest queued message.
|
|
69
|
-
| `Ctrl+C` | Cancel or steer during a turn;
|
|
70
|
-
| `↑` / `↓` | Move through input lines or sent-message history.
|
|
71
|
-
| `Ctrl+L` | Cycle log display modes.
|
|
72
|
-
| `Ctrl+R` | Redraw the screen.
|
|
62
|
+
While a turn is running, `Enter` queues a follow-up message. Press `Esc` or `Ctrl+C` to cancel the turn; when messages are queued, this uses the oldest queued message as the next turn instead. If a direct cancellation requested with `/cancel` or `Ctrl+C` does not settle, press `Ctrl+C` to stop waiting. The UI then returns to the prompt and asks you to press `Ctrl+C` again to exit. At an idle prompt, press `Ctrl+C` twice to exit.
|
|
63
|
+
|
|
64
|
+
| Key | Action |
|
|
65
|
+
| ------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
|
66
|
+
| `Enter` | Send the current message or answer. |
|
|
67
|
+
| `Shift+Enter` | Insert a newline. Requires a terminal that reports modified keys. |
|
|
68
|
+
| `Esc` | Cancel a running turn, or steer with the oldest queued message. |
|
|
69
|
+
| `Ctrl+C` | Cancel or steer during a turn; stop a pending cancellation, then exit on the next press; press twice to exit when idle. |
|
|
70
|
+
| `↑` / `↓` | Move through input lines or sent-message history. |
|
|
71
|
+
| `Ctrl+L` | Cycle log display modes. |
|
|
72
|
+
| `Ctrl+R` | Redraw the screen. |
|
|
73
73
|
|
|
74
74
|
## Logs and traces
|
|
75
75
|
|
package/docs/subagents/index.mdx
CHANGED
|
@@ -183,7 +183,7 @@ Each delegated subagent spins up its own child session and stream. The parent st
|
|
|
183
183
|
|
|
184
184
|
A background task that was already admitted survives cancellation of the turn that started it; background work that has not yet been admitted is rejected with the cancelled step. Use `task_cancel` to stop an admitted task. Cancellation delivers the task's final notification to an active parent even if the task must be stopped forcibly. Parent-session finalization cancels remaining live tasks.
|
|
185
185
|
|
|
186
|
-
Subagent model calls automatically retry classified transient provider failures, including overload errors delivered after a stream starts. eve makes at most three fresh model-call attempts, repeating only the current uncommitted call so completed earlier steps, tool results, and sandbox work remain available to the child. Other recoverable task errors fall back to Workflow's durable step retry from the last committed session snapshot. Exhausting the transient model-call attempts or the dedicated empty-response reissue returns one failed task result instead of stacking both retry budgets; terminal errors fail immediately.
|
|
186
|
+
Subagent model calls automatically retry classified transient provider failures, including overload errors delivered after a stream starts. eve makes at most three fresh model-call attempts, repeating only the current uncommitted call by default so completed earlier Workflow steps, tool results, and sandbox work remain available to the child. A declared subagent that opts into [Workflow checkpoint batching](./agent-config#workflow-checkpoint-batching) can instead repeat the uncommitted calls and inline tool executions in its current batch. Other recoverable task errors fall back to Workflow's durable step retry from the last committed session snapshot. Exhausting the transient model-call attempts or the dedicated empty-response reissue returns one failed task result instead of stacking both retry budgets; terminal errors fail immediately.
|
|
187
187
|
|
|
188
188
|
## Agent messaging
|
|
189
189
|
|
package/docs/tools/workflows.mdx
CHANGED
|
@@ -102,9 +102,9 @@ the build with the missing import in the error.
|
|
|
102
102
|
### Migrate an existing workflow tool
|
|
103
103
|
|
|
104
104
|
Replace `defineTool` with `defineWorkflowTool`, keep the executor's `"use workflow"` directive,
|
|
105
|
-
and replace `agent(ctx, input)` and `ask(ctx, request)` with `ctx.agent(input)` and
|
|
106
|
-
The `eve/workflow` entry point has been removed. Import `WorkflowToolContext`,
|
|
107
|
-
`ToolInputRequest`, and `ToolInputResponse` from `eve/tools` when you need explicit types.
|
|
105
|
+
and replace `agent(ctx, input)` and `ask(ctx, request)` with `ctx.agent(target, input)` and
|
|
106
|
+
`ctx.ask(request)`. The `eve/workflow` entry point has been removed. Import `WorkflowToolContext`,
|
|
107
|
+
`AgentInput`, `ToolInputRequest`, and `ToolInputResponse` from `eve/tools` when you need explicit types.
|
|
108
108
|
|
|
109
109
|
## Wait or run in the background
|
|
110
110
|
|
|
@@ -250,17 +250,22 @@ and can only show the model's input. Both compose: `approval` before the run, `c
|
|
|
250
250
|
Workflow tools can call a visible subagent and wait for its result:
|
|
251
251
|
|
|
252
252
|
```ts
|
|
253
|
-
const result = await ctx.agent({
|
|
254
|
-
key: "security-review",
|
|
255
|
-
target: "reviewer",
|
|
253
|
+
const result = await ctx.agent("reviewer", {
|
|
256
254
|
message: "Review the deployment plan for security risks.",
|
|
255
|
+
outputSchema: {
|
|
256
|
+
type: "object",
|
|
257
|
+
properties: {
|
|
258
|
+
findings: { type: "array", items: { type: "string" } },
|
|
259
|
+
},
|
|
260
|
+
required: ["findings"],
|
|
261
|
+
},
|
|
257
262
|
});
|
|
258
263
|
```
|
|
259
264
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
`
|
|
265
|
+
The first argument is the model-visible subagent name. eve assigns each call a replay-stable
|
|
266
|
+
invocation identity, including repeated and parallel calls to the same subagent. Pass `agentId` to
|
|
267
|
+
continue an existing child. An inline `outputSchema` requires structured output and determines the
|
|
268
|
+
return type, so `result` in the example is typed as `{ findings: string[] }`.
|
|
264
269
|
|
|
265
270
|
## Report progress: `yield`
|
|
266
271
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eve",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.53.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
|
|
6
6
|
"keywords": [
|
|
@@ -442,14 +442,14 @@
|
|
|
442
442
|
},
|
|
443
443
|
"devDependencies": {
|
|
444
444
|
"@agentclientprotocol/sdk": "1.3.0",
|
|
445
|
-
"@ai-sdk/anthropic": "^4.0.
|
|
446
|
-
"@ai-sdk/code-mode": "1.0.
|
|
447
|
-
"@ai-sdk/google": "^4.0.
|
|
448
|
-
"@ai-sdk/mcp": "^2.0.
|
|
449
|
-
"@ai-sdk/openai": "^4.0.
|
|
450
|
-
"@ai-sdk/otel": "^1.0.
|
|
451
|
-
"@ai-sdk/provider": "^4.0.
|
|
452
|
-
"@ai-sdk/provider-utils": "^5.0.
|
|
445
|
+
"@ai-sdk/anthropic": "^4.0.49",
|
|
446
|
+
"@ai-sdk/code-mode": "^1.0.50",
|
|
447
|
+
"@ai-sdk/google": "^4.0.64",
|
|
448
|
+
"@ai-sdk/mcp": "^2.0.45",
|
|
449
|
+
"@ai-sdk/openai": "^4.0.60",
|
|
450
|
+
"@ai-sdk/otel": "^1.0.93",
|
|
451
|
+
"@ai-sdk/provider": "^4.0.10",
|
|
452
|
+
"@ai-sdk/provider-utils": "^5.0.36",
|
|
453
453
|
"@chat-adapter/slack": "4.34.0",
|
|
454
454
|
"@chat-adapter/state-memory": "4.34.0",
|
|
455
455
|
"@chat-adapter/twilio": "4.34.0",
|
|
@@ -476,15 +476,15 @@
|
|
|
476
476
|
"@vercel/sandbox": "3.2.1",
|
|
477
477
|
"@vercel/sandbox-drives": "npm:@vercel/sandbox@3.1.0-beta.1",
|
|
478
478
|
"@vercel/sdk": "1.28.8",
|
|
479
|
-
"@workflow/builders": "5.0.0-beta.
|
|
480
|
-
"@workflow/core": "5.0.0-beta.
|
|
481
|
-
"@workflow/errors": "5.0.0-beta.
|
|
479
|
+
"@workflow/builders": "5.0.0-beta.50",
|
|
480
|
+
"@workflow/core": "5.0.0-beta.50",
|
|
481
|
+
"@workflow/errors": "5.0.0-beta.21",
|
|
482
482
|
"@workflow/serde": "5.0.0-beta.2",
|
|
483
483
|
"@workflow/utils": "5.0.0-beta.10",
|
|
484
|
-
"@workflow/world": "5.0.0-beta.
|
|
485
|
-
"@workflow/world-local": "5.0.0-beta.
|
|
486
|
-
"@workflow/world-vercel": "5.0.0-beta.
|
|
487
|
-
"ai": "^7.0.
|
|
484
|
+
"@workflow/world": "5.0.0-beta.34",
|
|
485
|
+
"@workflow/world-local": "5.0.0-beta.43",
|
|
486
|
+
"@workflow/world-vercel": "5.0.0-beta.45",
|
|
487
|
+
"ai": "^7.0.93",
|
|
488
488
|
"autoevals": "0.0.132",
|
|
489
489
|
"chat": "4.34.0",
|
|
490
490
|
"chokidar": "5.0.0",
|
|
@@ -517,7 +517,7 @@
|
|
|
517
517
|
},
|
|
518
518
|
"peerDependencies": {
|
|
519
519
|
"@opentelemetry/api": "^1.0.0",
|
|
520
|
-
"ai": "^7.0.
|
|
520
|
+
"ai": "^7.0.93",
|
|
521
521
|
"braintrust": "^3.0.0",
|
|
522
522
|
"dd-trace": "^6.13.0",
|
|
523
523
|
"just-bash": "^3.1.0",
|