eve 0.45.2 → 0.46.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 +22 -0
- package/dist/src/channel/types.d.ts +2 -0
- package/dist/src/chunks/{use-eve-agent-DI2j5XK8.js → use-eve-agent-CacMaX4P.js} +91 -43
- package/dist/src/chunks/{use-eve-agent-BH7Z6SDu.js → use-eve-agent-kmlFdOBB.js} +91 -43
- package/dist/src/cli/commands/info.d.ts +2 -0
- package/dist/src/cli/commands/info.js +2 -2
- package/dist/src/cli/dev/tui/agent-header.d.ts +5 -14
- package/dist/src/cli/dev/tui/agent-header.js +1 -1
- package/dist/src/cli/dev/tui/prompt-commands.d.ts +2 -0
- package/dist/src/cli/dev/tui/prompt-commands.js +1 -1
- package/dist/src/cli/dev/tui/runner.d.ts +7 -5
- package/dist/src/cli/dev/tui/runner.js +1 -1
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +3 -3
- package/dist/src/cli/run.js +3 -3
- package/dist/src/client/message-reducer-primitives.d.ts +8 -0
- package/dist/src/client/message-reducer-primitives.js +1 -0
- package/dist/src/client/message-reducer-types.d.ts +2 -0
- package/dist/src/client/message-reducer.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +1 -1
- package/dist/src/compiled/@linqapp/chat-sdk-adapter/index.d.ts +2 -1
- package/dist/src/compiled/@linqapp/chat-sdk-adapter/index.js +3 -3
- package/dist/src/compiler/channel-route-plan.d.ts +2 -2
- package/dist/src/compiler/extension-compatibility.d.ts +18 -18
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/instrumentation-layout-config.d.ts +3 -0
- package/dist/src/compiler/instrumentation-layout-config.js +1 -0
- package/dist/src/compiler/load-binding-namespace.d.ts +5 -3
- package/dist/src/compiler/load-binding-namespace.js +1 -1
- package/dist/src/compiler/manifest.d.ts +2 -2
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/module-lifecycle.d.ts +14 -0
- package/dist/src/compiler/module-lifecycle.js +1 -0
- package/dist/src/compiler/module-map.d.ts +2 -2
- package/dist/src/compiler/module-map.js +2 -2
- package/dist/src/compiler/node-source-state.d.ts +6 -3
- package/dist/src/compiler/node-source-state.js +1 -1
- package/dist/src/compiler/normalize-agent-config.d.ts +2 -2
- package/dist/src/compiler/normalize-helpers.d.ts +4 -4
- package/dist/src/compiler/normalize-manifest-helpers.js +1 -1
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/remote-agent-node.js +1 -1
- package/dist/src/compiler/source-graph.d.ts +12 -2
- package/dist/src/compiler/source-graph.js +1 -1
- package/dist/src/compiler/validate-artifact.js +1 -1
- package/dist/src/context/keys.d.ts +2 -0
- package/dist/src/execution/tools/connection-search.js +1 -1
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/framework/sources/registry.js +1 -1
- package/dist/src/harness/channel-delivery-instrumentation.js +1 -1
- package/dist/src/harness/emission.d.ts +1 -8
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/instrumentation/content-policy.d.ts +3 -2
- package/dist/src/harness/instrumentation/content-policy.js +1 -1
- package/dist/src/harness/instrumentation/content.d.ts +11 -0
- package/dist/src/harness/instrumentation/content.js +1 -1
- package/dist/src/harness/ordered-stream-emitter.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/internal/application/compiled-artifacts.d.ts +7 -7
- package/dist/src/internal/application/compiled-artifacts.js +2 -3
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-asset-import-plugin.d.ts +6 -2
- package/dist/src/internal/authored-asset-import-plugin.js +1 -1
- package/dist/src/internal/authored-module-loader.js +3 -3
- package/dist/src/internal/authored-module-map-loader.js +1 -1
- package/dist/src/internal/authored-runtime-modules.d.ts +15 -0
- package/dist/src/internal/authored-runtime-modules.js +1 -0
- package/dist/src/internal/materialized-authored-modules.d.ts +2 -18
- package/dist/src/internal/materialized-authored-modules.js +1 -1
- package/dist/src/internal/nitro/development-generation.js +1 -1
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
- package/dist/src/packages/eve-catalog/src/index.js +1 -1
- package/dist/src/protocol/message.d.ts +29 -2
- package/dist/src/protocol/message.js +2 -2
- package/dist/src/public/channels/slack/inbound-content.js +2 -2
- package/dist/src/public/definitions/connections/tool-call.d.ts +2 -0
- package/dist/src/public/definitions/hook.d.ts +1 -0
- package/dist/src/public/instrumentation/otel.d.ts +1 -1
- package/dist/src/runtime/connections/mcp-client.d.ts +1 -1
- package/dist/src/runtime/connections/mcp-client.js +1 -1
- package/dist/src/runtime/connections/openapi-client.d.ts +1 -1
- package/dist/src/runtime/connections/openapi-client.js +1 -1
- package/dist/src/runtime/connections/provided-arguments.d.ts +1 -0
- package/dist/src/runtime/connections/provided-arguments.js +1 -1
- package/dist/src/setup/integrations/registry.js +1 -1
- package/dist/src/setup/integrations/shopify/setup.d.ts +20 -0
- package/dist/src/setup/integrations/shopify/setup.js +1 -0
- package/dist/src/setup/integrations/shopify/templates.d.ts +1 -0
- package/dist/src/setup/integrations/shopify/templates.js +88 -0
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/shared/connection-types.d.ts +3 -1
- package/dist/src/shared/instrumentation-content.d.ts +6 -0
- package/dist/src/shared/instrumentation-content.js +1 -0
- package/dist/src/shared/instrumentation-decision.d.ts +8 -0
- package/dist/src/shared/instrumentation-decision.js +1 -0
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tracing/agent-trace-context-store.d.ts +3 -3
- package/dist/src/tracing/agent-trace-context-store.js +1 -1
- package/dist/src/tracing/otel-declaration.d.ts +14 -3
- package/dist/src/tracing/sampled-trace.d.ts +8 -1
- package/dist/src/tracing/sampled-trace.js +1 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/agent-config.md +2 -0
- package/docs/channels/slack.mdx +2 -0
- package/docs/concepts/sessions-runs-and-streaming.md +5 -2
- package/docs/connections/mcp.mdx +1 -1
- package/docs/connections/openapi.mdx +1 -1
- package/docs/guides/client/streaming.mdx +18 -15
- package/docs/guides/dev-tui.md +2 -1
- package/docs/guides/dynamic-capabilities.md +2 -0
- package/docs/instructions.mdx +3 -1
- package/docs/reference/typescript-api.md +25 -0
- package/docs/schedules.mdx +2 -0
- package/docs/skills.mdx +2 -0
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SessionTraceContext } from "#channel/types.js";
|
|
2
2
|
import type { AgentActionTraceState, AgentSessionTraceState, AgentTraceStateStore, AgentTurnTraceState } from "#tracing/agent-trace-state.js";
|
|
3
3
|
/** Keeps only framework trace state from an interrupted step's context changes. */
|
|
4
4
|
export declare function preserveSerializedAgentTraceState(original: Record<string, unknown>, interrupted: Record<string, unknown>): Record<string, unknown>;
|
|
@@ -7,9 +7,9 @@ export declare function preserveSerializedAgentTraceState(original: Record<strin
|
|
|
7
7
|
* which {@link ContextAgentTraceStateStore} cannot do — its reads are scoped
|
|
8
8
|
* to the ambient session.
|
|
9
9
|
*/
|
|
10
|
-
export declare function readSessionTraceContext(serializedContext: Readonly<Record<string, unknown>>, sessionId: string):
|
|
10
|
+
export declare function readSessionTraceContext(serializedContext: Readonly<Record<string, unknown>>, sessionId: string): SessionTraceContext | undefined;
|
|
11
11
|
/** Reads the durable action span that should parent a dispatched child agent. */
|
|
12
|
-
export declare function readActionTraceContext(serializedContext: Readonly<Record<string, unknown>>, sessionId: string, turnId: string, callId: string):
|
|
12
|
+
export declare function readActionTraceContext(serializedContext: Readonly<Record<string, unknown>>, sessionId: string, turnId: string, callId: string): SessionTraceContext | undefined;
|
|
13
13
|
/** Durable trace state backed by eve's serialized Workflow context. */
|
|
14
14
|
export declare class ContextAgentTraceStateStore implements AgentTraceStateStore {
|
|
15
15
|
deleteAction(idempotencyKey: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{normalizeChannelAudience}from"#shared/channel-audience.js";import{contextStorage,loadContext}from"#context/container.js";import{ContextKey}from"#context/key.js";const AgentTraceContextKey=new ContextKey(`eve.harness.agentTrace`,{codec:{deserialize:deserializeState,serialize:serializeState}});function preserveSerializedAgentTraceState(e,t){let n=t[AgentTraceContextKey.name];return n===void 0?e:{...e,[AgentTraceContextKey.name]:n}}function readSessionTraceContext(e,t){let n=e[AgentTraceContextKey.name];if(n
|
|
1
|
+
import{normalizeChannelAudience}from"#shared/channel-audience.js";import{SessionTraceSeedKey}from"#context/keys.js";import{contextStorage,loadContext}from"#context/container.js";import{ContextKey}from"#context/key.js";const AgentTraceContextKey=new ContextKey(`eve.harness.agentTrace`,{codec:{deserialize:deserializeState,serialize:serializeState}});function preserveSerializedAgentTraceState(e,t){let n=t[AgentTraceContextKey.name];return n===void 0?e:{...e,[AgentTraceContextKey.name]:n}}function readSessionTraceContext(e,t){let n=e[AgentTraceContextKey.name];if(n===void 0)return;let r=deserializeState(n).sessions[t]?.context;return r===void 0?void 0:withTraceDecision(e,r)}function readActionTraceContext(e,t,n,r){let i=e[AgentTraceContextKey.name];if(i===void 0)return;let a=Object.values(deserializeState(i).actions).find(e=>e.sessionId===t&&e.turnId===n&&e.callId===r);if(a!==void 0)return withTraceDecision(e,{isRemote:!1,spanId:a.spanId,traceFlags:a.parent.traceFlags,traceId:a.parent.traceId})}function withTraceDecision(e,n){let r=e[SessionTraceSeedKey.name];return r?.decision===void 0?n:{...n,decision:r.decision}}var ContextAgentTraceStateStore=class{deleteAction(e){updateState(t=>{let n={...t.actions};return delete n[e],{...t,actions:n}})}deleteActions(e,t){updateState(n=>{let r={...n.actions};for(let[n,i]of Object.entries(r))i.sessionId===e&&(t===void 0||i.turnId===t)&&delete r[n];return{...n,actions:r}})}deleteSession(e){updateState(t=>{let n={...t.sessions};return delete n[e],{...t,sessions:n}})}deleteTurn(e,t){updateState(n=>{let r={...n.turns};return delete r[turnKey(e,t)],{...n,turns:r}})}findAction(e,t){return Object.values(contextStorage.getStore()?.get(AgentTraceContextKey)?.actions??{}).find(n=>n.sessionId===e&&n.callId===t)}getAction(e){return contextStorage.getStore()?.get(AgentTraceContextKey)?.actions[e]}getSession(e){return contextStorage.getStore()?.get(AgentTraceContextKey)?.sessions[e]}getTurn(e,t){return contextStorage.getStore()?.get(AgentTraceContextKey)?.turns[turnKey(e,t)]}setAction(e,t){updateState(n=>({...n,actions:{...n.actions,[e]:t}}))}setSession(e,t){updateState(n=>({...n,sessions:{...n.sessions,[e]:t}}))}setTurn(e,t,n){updateState(r=>({...r,turns:{...r.turns,[turnKey(e,t)]:n}}))}};function updateState(e){loadContext().set(AgentTraceContextKey,t=>e(t??{actions:{},sessions:{},turns:{}}))}function turnKey(e,t){return`${e}\0${t}`}function serializeState(e){return{actions:e.actions,sessions:Object.fromEntries(Object.entries(e.sessions).map(([e,t])=>[e,{...t,context:serializeSpanContext(t.context)}])),turns:Object.fromEntries(Object.entries(e.turns).map(([e,t])=>[e,{...t,context:serializeSpanContext(t.context),terminal:t.terminal===void 0?void 0:t.terminal.type===`turn.failed`?{error:serializeError(t.terminal.error),type:t.terminal.type}:{type:t.terminal.type}}]))}}function deserializeState(t){return isRecord(t)?{actions:deserializeRecord(t.actions,deserializeAction),sessions:deserializeRecord(t.sessions,t=>{if(!(!isRecord(t)||!isSpanContext(t.context)))return{agentName:typeof t.agentName==`string`?t.agentName:void 0,channelAudience:normalizeChannelAudience(t.channelAudience),channelKind:typeof t.channelKind==`string`?t.channelKind:void 0,context:t.context,rootSessionId:typeof t.rootSessionId==`string`?t.rootSessionId:``}}),turns:deserializeRecord(t.turns,e=>{if(!(!isRecord(e)||!isSpanContext(e.context))&&!(typeof e.parentSpanId!=`string`||typeof e.startTimeMs!=`number`))return{context:e.context,parentIsRemote:typeof e.parentIsRemote==`boolean`?e.parentIsRemote:void 0,parentSpanId:e.parentSpanId,rootSessionId:typeof e.rootSessionId==`string`?e.rootSessionId:``,sequence:typeof e.sequence==`number`?e.sequence:0,startTimeMs:e.startTimeMs,subagentName:typeof e.subagentName==`string`?e.subagentName:void 0,terminal:deserializeTerminal(e.terminal)}})}:{actions:{},sessions:{},turns:{}}}function deserializeAction(t){if(!(!isRecord(t)||typeof t.attemptIndex!=`number`||typeof t.callId!=`string`||!isActionKind(t.kind)||typeof t.name!=`string`||!isSpanContext(t.parent)||typeof t.rootSessionId!=`string`||typeof t.sessionId!=`string`||typeof t.spanId!=`string`||typeof t.startTimeMs!=`number`||typeof t.stepIndex!=`number`||typeof t.turnId!=`string`))return{attemptIndex:t.attemptIndex,callId:t.callId,channelAudience:normalizeChannelAudience(t.channelAudience),inputAttribute:typeof t.inputAttribute==`string`?t.inputAttribute:void 0,kind:t.kind,name:t.name,parent:t.parent,rootSessionId:t.rootSessionId,sessionId:t.sessionId,spanId:t.spanId,startTimeMs:t.startTimeMs,stepIndex:t.stepIndex,turnId:t.turnId}}function isActionKind(e){return e===`load-skill`||e===`remote-agent-call`||e===`subagent-call`||e===`tool-call`}function deserializeRecord(e,t){if(!isRecord(e))return{};let n={};for(let[r,i]of Object.entries(e)){let e=t(i);e!==void 0&&(n[r]=e)}return n}function deserializeTerminal(e){if(!isRecord(e)||typeof e.type!=`string`)return;let t=e.type;if(isTurnTerminalType(t))return t===`turn.failed`?{error:deserializeError(e.error),type:t}:{type:t}}function serializeSpanContext(e){return{isRemote:e.isRemote,spanId:e.spanId,traceFlags:e.traceFlags,traceId:e.traceId}}function isSpanContext(e){return isRecord(e)&&typeof e.spanId==`string`&&typeof e.traceFlags==`number`&&typeof e.traceId==`string`}function serializeError(e){return e instanceof Error?{message:e.message,name:e.name,stack:e.stack}:void 0}function deserializeError(e){if(!isRecord(e)||typeof e.message!=`string`)return;let t=Error(e.message);return typeof e.name==`string`&&(t.name=e.name),typeof e.stack==`string`&&(t.stack=e.stack),t}function isTurnTerminalType(e){return e===`turn.cancelled`||e===`turn.completed`||e===`turn.failed`}function isRecord(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}export{ContextAgentTraceStateStore,preserveSerializedAgentTraceState,readActionTraceContext,readSessionTraceContext};
|
|
@@ -33,8 +33,12 @@ export interface OtelOptions {
|
|
|
33
33
|
*/
|
|
34
34
|
readonly traceChannelRequests?: boolean;
|
|
35
35
|
/**
|
|
36
|
-
* Process-wide
|
|
37
|
-
*
|
|
36
|
+
* Process-wide trace and content decision. Boolean returns preserve the
|
|
37
|
+
* existing audience-aware behavior; explicit decisions can disable emission
|
|
38
|
+
* or select input and output capture independently. Defaults to emitting
|
|
39
|
+
* every audience, with content only for public conversations. The result is a capture ceiling:
|
|
40
|
+
* per-delivery audience and destination settings can only narrow it. A thrown
|
|
41
|
+
* error rejects trace production without silencing lifecycle providers.
|
|
38
42
|
*/
|
|
39
43
|
readonly tracePolicy?: TraceCapturePolicy;
|
|
40
44
|
/**
|
|
@@ -79,7 +83,14 @@ export interface TraceCaptureContext {
|
|
|
79
83
|
readonly audience: ChannelAudience;
|
|
80
84
|
readonly channelType?: string;
|
|
81
85
|
}
|
|
82
|
-
export type
|
|
86
|
+
export type TracePolicyDecision = {
|
|
87
|
+
readonly emit: false;
|
|
88
|
+
} | {
|
|
89
|
+
readonly emit: true;
|
|
90
|
+
readonly recordInputs: boolean;
|
|
91
|
+
readonly recordOutputs: boolean;
|
|
92
|
+
};
|
|
93
|
+
export type TraceCapturePolicy = (trace: TraceCaptureContext) => TracePolicyDecision | boolean;
|
|
83
94
|
/** Where one `otelIntegration()` sends spans. */
|
|
84
95
|
export interface OtelIntegrationOptions extends ContentOptions {
|
|
85
96
|
/** Merged into the pipeline in declaration order. */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ChannelAudience } from "#shared/channel-audience.js";
|
|
2
|
-
import type
|
|
2
|
+
import { type InstrumentationDecision } from "#shared/instrumentation-decision.js";
|
|
3
|
+
import type { TraceCapturePolicy, TracePolicyDecision } from "#tracing/otel-declaration.js";
|
|
3
4
|
export declare function isSampledTrace(context: {
|
|
4
5
|
readonly traceFlags: number;
|
|
5
6
|
}): boolean;
|
|
@@ -8,3 +9,9 @@ export declare function evaluateTracePolicy(policy: TraceCapturePolicy | undefin
|
|
|
8
9
|
readonly audience: ChannelAudience;
|
|
9
10
|
readonly channelType?: string;
|
|
10
11
|
}): boolean;
|
|
12
|
+
export declare function resolveTracePolicy(policy: TraceCapturePolicy | undefined, trace: {
|
|
13
|
+
readonly agentName?: string;
|
|
14
|
+
readonly audience: ChannelAudience;
|
|
15
|
+
readonly channelType?: string;
|
|
16
|
+
}): InstrumentationDecision;
|
|
17
|
+
export declare function resolveTracePolicyDecision(decision: TracePolicyDecision | boolean, audience: ChannelAudience): InstrumentationDecision;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function isSampledTrace(e){return(e.traceFlags&1)==1}function evaluateTracePolicy(e,t){try{
|
|
1
|
+
import{shouldCaptureInstrumentationContent}from"#shared/instrumentation-content.js";import{DROP_INSTRUMENTATION}from"#shared/instrumentation-decision.js";function isSampledTrace(e){return(e.traceFlags&1)==1}function evaluateTracePolicy(e,t){return resolveTracePolicy(e,t).action===`record`}function resolveTracePolicy(e,n){try{let t=e?.({agentName:n.agentName,audience:n.audience,channelType:n.channelType});return resolveTracePolicyDecision(t??{emit:!0,recordInputs:n.audience===`public`,recordOutputs:n.audience===`public`},n.audience)}catch{return DROP_INSTRUMENTATION}}function resolveTracePolicyDecision(n,r){if(n===!1)return DROP_INSTRUMENTATION;if(n===!0){let t=shouldCaptureInstrumentationContent(r);return{action:`record`,recordInputs:t,recordOutputs:t}}return n.emit?{action:`record`,recordInputs:n.recordInputs,recordOutputs:n.recordOutputs}:DROP_INSTRUMENTATION}export{evaluateTracePolicy,isSampledTrace,resolveTracePolicy,resolveTracePolicyDecision};
|
package/dist/src/vue/index.js
CHANGED
package/docs/agent-config.md
CHANGED
|
@@ -26,6 +26,8 @@ vision-capable model or [route image inputs to Gemini
|
|
|
26
26
|
Flash](./guides/dynamic-capabilities#route-image-inputs-to-a-vision-model).
|
|
27
27
|
When `agent.ts` is present, `model` is required.
|
|
28
28
|
|
|
29
|
+
A config that selects a static Gateway model is compile-only. A config that contains a dynamic model or a direct-provider `LanguageModel` remains a runtime entry because eve must resolve that authored value while the agent runs. See [Authored module lifecycle](./reference/typescript-api#authored-module-lifecycle).
|
|
30
|
+
|
|
29
31
|
`model` accepts a gateway model id string, which routes through the [Vercel AI Gateway](https://vercel.com/docs/ai-gateway). To call a provider directly and configure the model in code, pass a provider-authored `LanguageModel`.
|
|
30
32
|
|
|
31
33
|
Provider-specific AI SDK packages are regular project dependencies. A fresh `eve init` app includes the core `ai` package, but it does not install every provider package. Install the provider package you import, then set that provider's API key:
|
package/docs/channels/slack.mdx
CHANGED
|
@@ -158,6 +158,8 @@ Only the first available handler runs. A message hook returning `null` drops the
|
|
|
158
158
|
|
|
159
159
|
The model-visible `<slack_message>` includes `sender_id`, `bot_user_id` when available, and the `is_mentioned` value from `ctx.isBotMentioned()`. Its `<content>` keeps `<@USER_ID>` intact while converting other mrkdwn to Markdown; routing is unchanged.
|
|
160
160
|
|
|
161
|
+
When a Slack message shares another Slack message, eve extracts the forwarded message body from Slack's message-unfurl attachment and includes it in `<content>`. The original top-level comment, when present, remains alongside the forwarded content.
|
|
162
|
+
|
|
161
163
|
#### Restrict who can invoke the agent
|
|
162
164
|
|
|
163
165
|
A valid Slack signature proves that Slack sent the event. It does not decide which channel or person your agent should trust. Fail closed in the inbound handler before returning auth, especially when the app is installed in a shared Slack Connect channel:
|
|
@@ -49,6 +49,7 @@ The stream is newline-delimited JSON (NDJSON), one event per line:
|
|
|
49
49
|
| `turn.started` | A new turn began; carries the active `trace` when the runtime is traced. |
|
|
50
50
|
| `message.received` | An inbound user message was accepted; carries flattened text plus structured text/file parts. |
|
|
51
51
|
| `step.started` | A model step began. |
|
|
52
|
+
| `action.input.appended` | A raw tool-input text delta, its character offset, and tool-call identity. |
|
|
52
53
|
| `actions.requested` | The model requested one or more actions, including tool calls; calls stream before execution. |
|
|
53
54
|
| `action.partial` | A locally executed tool generator yielded a preliminary output snapshot. |
|
|
54
55
|
| `action.result` | A tool call returned. |
|
|
@@ -76,7 +77,9 @@ The stream is newline-delimited JSON (NDJSON), one event per line:
|
|
|
76
77
|
|
|
77
78
|
The optional `data.trace` on session and turn starts contains eve-owned W3C trace coordinates: `traceId`, `spanId`, and `traceFlags`. Use it to correlate stream consumers such as eval reporters with an observability backend. An uninstrumented target omits it.
|
|
78
79
|
|
|
79
|
-
`reasoning.appended` and `
|
|
80
|
+
`reasoning.appended`, `message.appended`, and `action.input.appended` stream incremental output as it arrives. When the durable stream writer is busy, eve may coalesce adjacent deltas for the same text block or tool call; the text remains in source order, and a different event type, tool `callId`, or stream coordinate forms an ordering barrier. Text and reasoning appends carry both the new delta and the cumulative text for the current block. The finalized blocks show up on `message.completed` and `reasoning.completed`, which is the compatibility path for clients that don't render incremental streaming.
|
|
81
|
+
|
|
82
|
+
When a streamed tool input becomes a validated call, its `action.input.appended` events precede the matching `actions.requested` event. Each append carries `callId`, `toolName`, `inputTextDelta`, and `inputTextOffset`; the offset is the zero-based UTF-16 code-unit position where the delta begins. Storing only the delta and offset avoids repeating the cumulative input in every durable event. The default client reducer starts or restarts accumulation at offset `0`, ignores a nonzero offset that is not contiguous, and projects the potentially incomplete JSON as a `dynamic-tool` part with `state: "input-streaming"` and cumulative text in `inputText`. `actions.requested` replaces that part with `state: "input-available"` and the validated `input`. Excluded internal actions never publish their input stream.
|
|
80
83
|
|
|
81
84
|
`action.partial` carries one complete preliminary output snapshot from an authored async-generator tool. A later partial for the same `callId` replaces it, and `action.result` is the final snapshot. When the durable writer is busy, eve may keep only the newest adjacent partial for a call. Treat partials as last-write-wins: a durable step can retry and replay overlapping event runs. Provider-executed tool progress and MCP progress notifications are not projected as `action.partial` events.
|
|
82
85
|
|
|
@@ -111,7 +114,7 @@ Alongside `type` and `data`, every event carries a `meta` envelope:
|
|
|
111
114
|
|
|
112
115
|
`meta.id` is stable. eve mints it once, when the event is written to the durable stream, and stores it with the event. Reconnecting from a cursor, rewinding to `startIndex=0`, or replaying a finished session all return the same id for the same event.
|
|
113
116
|
|
|
114
|
-
`meta.at` has always been there; `meta.id` arrived in stream version 20. Events written by an earlier version are stored with the envelope but no id inside it, so rewinding into the part of a session that ran before you upgraded yields events whose `meta.id` is absent, even though the type says it is always a string. eve passes those events through rather than dropping them, and they cannot be deduplicated. The exposure ends when the sessions that predate your upgrade do.
|
|
117
|
+
`meta.at` has always been there; `meta.id` arrived in stream version 20, and `action.input.appended` arrived in version 24. Events written by an earlier version are stored with the envelope but no id inside it, so rewinding into the part of a session that ran before you upgraded yields events whose `meta.id` is absent, even though the type says it is always a string. eve passes those events through rather than dropping them, and they cannot be deduplicated. The exposure ends when the sessions that predate your upgrade do.
|
|
115
118
|
|
|
116
119
|
That makes it the key for ingesting a stream into a database without duplicating rows when you re-read it:
|
|
117
120
|
|
package/docs/connections/mcp.mdx
CHANGED
|
@@ -58,7 +58,7 @@ export default defineMcpClientConnection({
|
|
|
58
58
|
});
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
Values may be JSON values, promises, or callbacks. Callbacks receive the active session context
|
|
61
|
+
Values may be JSON values, promises, or callbacks. Callbacks receive the active session context, the bare remote `toolName`, and a replay-stable `callId` that is unique to the tool call. Use `callId` when the remote server needs an idempotency key.
|
|
62
62
|
|
|
63
63
|
eve treats configured keys as application-owned: it removes them from every remote tool's model-facing input schema and adds their resolved values immediately before execution. They apply to every tool call on the connection and replace any conflicting model value. Approval policies continue to receive only the model-authored input.
|
|
64
64
|
|
|
@@ -86,7 +86,7 @@ export default defineOpenAPIConnection({
|
|
|
86
86
|
});
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
Values may be JSON values, promises, or callbacks. Callbacks receive the active session context
|
|
89
|
+
Values may be JSON values, promises, or callbacks. Callbacks receive the active session context, the bare operation `toolName`, and a replay-stable `callId` that is unique to the tool call. Use `callId` when the API needs an idempotency key.
|
|
90
90
|
|
|
91
91
|
eve removes configured keys from every operation's model-facing input schema and adds their resolved values immediately before constructing the HTTP request. Values apply to every operation on the connection and replace any conflicting model value. The keys correspond to the generated top-level operation inputs: path, query, header, and cookie parameter names, plus `body` for a request body.
|
|
92
92
|
|
|
@@ -75,7 +75,7 @@ for await (const event of response) {
|
|
|
75
75
|
}
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
`message.appended` and `
|
|
78
|
+
`message.appended`, `reasoning.appended`, and `action.input.appended` are incremental delta events. eve may combine adjacent deltas for the same text block or tool call while a durable stream write is in flight, but preserves their text and event ordering. A different event type, tool `callId`, or stream coordinate is a barrier. The completed text forms, `message.completed` and `reasoning.completed`, are the compatibility path for clients that don't render deltas. A streamed tool input is complete when the matching validated call arrives in `actions.requested`.
|
|
79
79
|
|
|
80
80
|
## Handle event types
|
|
81
81
|
|
|
@@ -98,23 +98,26 @@ function handleEvent(event: MessageStreamEvent) {
|
|
|
98
98
|
|
|
99
99
|
The most common UI events are:
|
|
100
100
|
|
|
101
|
-
| Event
|
|
102
|
-
|
|
|
103
|
-
| `message.received`
|
|
104
|
-
| `reasoning.appended`
|
|
105
|
-
| `message.appended`
|
|
106
|
-
| `
|
|
107
|
-
| `
|
|
108
|
-
| `action.
|
|
109
|
-
| `
|
|
110
|
-
| `input.
|
|
111
|
-
| `
|
|
112
|
-
| `
|
|
113
|
-
| `session.
|
|
114
|
-
| `session.
|
|
101
|
+
| Event | Use |
|
|
102
|
+
| ----------------------- | ------------------------------------------------------------------------------ |
|
|
103
|
+
| `message.received` | Confirm the user message landed; `data.parts` includes text and file metadata. |
|
|
104
|
+
| `reasoning.appended` | Render reasoning deltas when the model provides them. |
|
|
105
|
+
| `message.appended` | Render assistant text deltas. |
|
|
106
|
+
| `action.input.appended` | Accumulate raw tool-input deltas before validation completes. |
|
|
107
|
+
| `actions.requested` | Show tool calls as the model requests them, before execution. |
|
|
108
|
+
| `action.partial` | Update a generator tool's provisional output snapshot. |
|
|
109
|
+
| `action.result` | Show tool call results. |
|
|
110
|
+
| `input.requested` | Pause the UI for approval or a question answer. |
|
|
111
|
+
| `input.resolved` | Record the server-accepted outcome and response for each human-input request. |
|
|
112
|
+
| `result.completed` | Read structured output from an [output schema](./output-schema). |
|
|
113
|
+
| `session.waiting` | Enable the composer; the same fixed session handle accepts the next message. |
|
|
114
|
+
| `session.completed` | Mark the conversation terminal. |
|
|
115
|
+
| `session.failed` | Mark the conversation failed. |
|
|
115
116
|
|
|
116
117
|
For the complete event table, see [Sessions, runs & streaming](../../concepts/sessions-runs-and-streaming).
|
|
117
118
|
|
|
119
|
+
Each `action.input.appended` event stores `inputTextDelta` and its zero-based UTF-16 code-unit `inputTextOffset`, so consumers can reject a gap instead of concatenating corrupt input. The default message reducer starts or restarts at offset `0` and ignores a nonzero offset that is not contiguous. It accumulates accepted deltas into a `dynamic-tool` part with `state: "input-streaming"`; its `inputText` field contains cumulative raw text that may be incomplete JSON. The matching `actions.requested` event upgrades the same `toolCallId` to `state: "input-available"` and puts the validated value in `input`.
|
|
120
|
+
|
|
118
121
|
When a submitted message includes attachments, `message.received.data.message` stays the
|
|
119
122
|
flattened compatibility summary, while `message.received.data.parts` carries renderable text and
|
|
120
123
|
file metadata. File parts never include raw bytes or internal sandbox paths; `url` appears only for
|
package/docs/guides/dev-tui.md
CHANGED
|
@@ -20,6 +20,7 @@ The transcript remains in your terminal scrollback after you exit. Run `/help` i
|
|
|
20
20
|
| `/deploy` | Deploy the agent to Vercel production. Links the directory first if needed. |
|
|
21
21
|
| `/vc:install` | Install the Vercel CLI. |
|
|
22
22
|
| `/vc:login` | Log in to Vercel or restore access to a remote deployment. |
|
|
23
|
+
| `/info` | Show the resolved application, compiled artifacts, discovery diagnostics, and messaging routes. |
|
|
23
24
|
| `/loglevel` | Choose which server and agent logs appear in the transcript. |
|
|
24
25
|
| `/traces` | Open the local trace viewer. Pass a trace ID prefix to open a specific trace. |
|
|
25
26
|
| `/reset` | Start a fresh session. |
|
|
@@ -29,7 +30,7 @@ The transcript remains in your terminal scrollback after you exit. Run `/help` i
|
|
|
29
30
|
| `/exit` | Quit the UI. |
|
|
30
31
|
| `/help` | List available commands. |
|
|
31
32
|
|
|
32
|
-
`/model`, `/add`, `/deploy`, and `/traces` are available when `eve dev` runs locally. They are unavailable when the UI connects to a server with `--url`.
|
|
33
|
+
`/model`, `/add`, `/deploy`, `/info`, and `/traces` are available when `eve dev` runs locally. They are unavailable when the UI connects to a server with `--url`.
|
|
33
34
|
|
|
34
35
|
## Add an integration
|
|
35
36
|
|
|
@@ -5,6 +5,8 @@ description: "Resolve models, subagents, tools, skills, and instructions at runt
|
|
|
5
5
|
|
|
6
6
|
`defineDynamic` resolves the model, subagents, tools, skills, and instructions at runtime from a session event instead of declaring them up front. Reach for it when the right capability isn't known until the session starts, because it hinges on who the caller is, what tenant they belong to, feature flags, or external data. The [subagents](../subagents), [tools](../tools), [skills](../skills), and [instructions](../instructions) guides each point here for their dynamic form.
|
|
7
7
|
|
|
8
|
+
eve evaluates a dynamic definition module once during compilation to classify and validate it, then retains that module as a runtime entry so its event handlers can run. Its top-level code therefore runs in both phases; keep caller-specific work inside the handlers. See [Authored module lifecycle](../reference/typescript-api#authored-module-lifecycle).
|
|
9
|
+
|
|
8
10
|
## Dynamic models
|
|
9
11
|
|
|
10
12
|
The `model` field in `agent.ts` accepts `defineDynamic({ events })`. Resolvers
|
package/docs/instructions.mdx
CHANGED
|
@@ -42,7 +42,9 @@ export default defineInstructions({
|
|
|
42
42
|
|
|
43
43
|
`role` is either `"system"` or `"user"` and defaults to `"system"`. The legacy `{ markdown: string }` form still creates system-role instructions, but is deprecated; do not combine `markdown` with `content` or `role`. Blank content contributes no context.
|
|
44
44
|
|
|
45
|
-
A module-backed definition runs once at build time. eve stores its resolved content and role in the compiled manifest, so the
|
|
45
|
+
A module-backed definition runs once at build time. eve stores its resolved content and role in the compiled manifest, so the definition is not a runtime entry.
|
|
46
|
+
|
|
47
|
+
This includes its normal ESM and [asset imports](./reference/typescript-api#asset-imports), such as a top-level prompt imported with `?raw`. See [Authored module lifecycle](./reference/typescript-api#authored-module-lifecycle) for the full compile/runtime contract.
|
|
46
48
|
|
|
47
49
|
## System and user roles
|
|
48
50
|
|
|
@@ -59,6 +59,31 @@ Tool-wide authoring helpers such as `defineTool`, `defineDynamic`, and `disableT
|
|
|
59
59
|
|
|
60
60
|
`defineInstructions` accepts `{ content: string, role?: "system" | "user" }`; omitted `role` means `"system"`. Its `eve/instructions` version of `defineDynamic` accepts only `session.started` and `turn.started` handlers returning `defineInstructions(...)` or `null`. The legacy `{ markdown: string }` definition remains available as a deprecated system-role form.
|
|
61
61
|
|
|
62
|
+
## Authored module lifecycle
|
|
63
|
+
|
|
64
|
+
eve evaluates TypeScript definition modules during compilation so it can validate and normalize the agent. Within one agent node, each module namespace loads at most once during that compile. The resolved definition then determines whether the module is also an entry in the runtime bundle:
|
|
65
|
+
|
|
66
|
+
| Lifecycle | Authored definitions |
|
|
67
|
+
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
68
|
+
| Compile only | Static instructions and skills, prompt-form TypeScript schedules, static Gateway or default agent config, provider-managed web search, `Workflow` configuration, fully shadowed channels, and a child sandbox that selects its parent's sandbox |
|
|
69
|
+
| Compile and runtime | Dynamic instructions, skills, tools, models, and subagents; executable tools; effective channels; connections; hooks; memory; handler schedules; direct-provider models; independent sandboxes; and remote subagents |
|
|
70
|
+
| Runtime only | Instrumentation modules and extension mount initialization |
|
|
71
|
+
|
|
72
|
+
A compile-only module is not imported when the deployed runtime starts. For example, eve stores the resolved content from a static `instructions.ts` in the compiled manifest. A compile-and-runtime module is evaluated during compilation and imported again when a runtime process loads the module map. Keep module-top-level work deterministic, and put request- or session-specific work in the definition's runtime callbacks.
|
|
73
|
+
|
|
74
|
+
The runtime bundler follows the normal ESM graph from every runtime entry. A helper remains runtime code when a tool or other runtime entry imports it, even if static instructions also import that helper. Lifecycle selection applies to definition entries, not as tree-shaking permission for their ordinary dependencies.
|
|
75
|
+
|
|
76
|
+
### Asset imports
|
|
77
|
+
|
|
78
|
+
Authored modules may import relative non-code assets from anywhere inside their project package, including outside `agent/`:
|
|
79
|
+
|
|
80
|
+
```ts title="agent/tools/read_template.ts"
|
|
81
|
+
import icon from "../../assets/icon.png";
|
|
82
|
+
import template from "../../prompts/template.txt?raw";
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
`?raw` embeds the file as UTF-8 text. Other non-code asset imports produce a data URL with an inferred media type. Compilation, local development, and production builds use the same resolution behavior. Imports that escape the project package are rejected; package those files with the application instead.
|
|
86
|
+
|
|
62
87
|
## Runtime context (`ctx`)
|
|
63
88
|
|
|
64
89
|
`ctx` is passed to your tool `execute`, hook handlers, channel event handlers, and connection auth/header resolvers. It is live only while authored code is running, so reaching for it at module top level throws. See [Session context](../guides/session-context) for the full model.
|
package/docs/schedules.mdx
CHANGED
|
@@ -27,6 +27,8 @@ interface ScheduleHandlerArgs {
|
|
|
27
27
|
|
|
28
28
|
`defineSchedule` is a type-level pass-through. The compiler is what enforces the one-of rule.
|
|
29
29
|
|
|
30
|
+
A TypeScript schedule with `markdown` is compile-only because eve stores the prompt in the manifest. A schedule with `run` remains a runtime entry so the handler can execute. See [Authored module lifecycle](./reference/typescript-api#authored-module-lifecycle).
|
|
31
|
+
|
|
30
32
|
`cron` is a standard 5-field string (`minute hour day-of-month month day-of-week`) with minute granularity. On Vercel, each schedule becomes a Vercel Cron Job, and Vercel evaluates the expression in UTC, so `"0 9 * * 1-5"` fires at 09:00 UTC on weekdays. `eve dev` never fires schedules on their cron cadence. A built app served with `eve start` does run production scheduled tasks. To trigger one while iterating in dev, use the dispatch route below.
|
|
31
33
|
|
|
32
34
|
## Markdown form (fire-and-forget)
|
package/docs/skills.mdx
CHANGED
|
@@ -59,6 +59,8 @@ export default defineSkill({
|
|
|
59
59
|
|
|
60
60
|
eve generates `SKILL.md` from `markdown`, and each `files` entry becomes a package-relative sibling. Start with plain markdown and move to `defineSkill` only when you hit its limits.
|
|
61
61
|
|
|
62
|
+
A static `defineSkill` module is evaluated during compilation and its resolved definition is stored in the manifest; a dynamic skill module is also retained as a runtime entry. See [Authored module lifecycle](./reference/typescript-api#authored-module-lifecycle).
|
|
63
|
+
|
|
62
64
|
## Find and install community skills
|
|
63
65
|
|
|
64
66
|
`eve registry search` includes [skills.sh](https://skills.sh) as the built-in `@skills` source. Search by task, review the source, then install the returned skill into your project:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eve",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
|
|
6
6
|
"keywords": [
|
|
@@ -390,7 +390,7 @@
|
|
|
390
390
|
"@chat-adapter/state-memory": "4.34.0",
|
|
391
391
|
"@chat-adapter/twilio": "4.34.0",
|
|
392
392
|
"@clack/core": "1.3.1",
|
|
393
|
-
"@linqapp/chat-sdk-adapter": "^0.
|
|
393
|
+
"@linqapp/chat-sdk-adapter": "^0.5.1",
|
|
394
394
|
"@modelcontextprotocol/server": "2.0.0",
|
|
395
395
|
"@nuxt/kit": "^4.0.0",
|
|
396
396
|
"@opentelemetry/context-async-hooks": "2.6.1",
|