eve 0.70.0 → 0.70.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 +13 -0
- package/dist/src/cli/dev/tui/prompt-commands.d.ts +7 -7
- package/dist/src/cli/dev/tui/prompt-commands.js +1 -1
- package/dist/src/cli/dev/tui/runner.d.ts +2 -2
- package/dist/src/cli/dev/tui/runner.js +1 -1
- package/dist/src/cli/dev/tui/task-activity.d.ts +0 -17
- package/dist/src/cli/dev/tui/task-activity.js +1 -1
- package/dist/src/cli/dev/tui/task-records.d.ts +17 -0
- package/dist/src/cli/dev/tui/task-records.js +1 -0
- package/dist/src/cli/dev/tui/tool-presentation.js +1 -1
- package/dist/src/cli/dev/tui/transcript-parts.d.ts +10 -2
- package/dist/src/cli/dev/tui/transcript-parts.js +2 -2
- package/dist/src/cli/dev/tui/transcript.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +2 -2
- package/dist/src/compiled/{gray-matter → js-yaml}/LICENSE +2 -2
- package/dist/src/compiled/js-yaml/index.d.ts +12 -0
- package/dist/src/compiled/js-yaml/index.js +34 -0
- package/dist/src/context/serialize.d.ts +5 -1
- package/dist/src/context/serialize.js +1 -1
- package/dist/src/evals/loaders/yaml.js +1 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/legacy-remote-agent/protocol.d.ts +8 -0
- package/dist/src/execution/legacy-remote-agent/protocol.js +1 -1
- package/dist/src/execution/session/checkpoint-migrations.d.ts +23 -0
- package/dist/src/execution/session/checkpoint-migrations.js +1 -0
- package/dist/src/execution/session/entry.js +1 -1
- package/dist/src/execution/session/finalization.js +1 -1
- package/dist/src/execution/session/handoff-steps.d.ts +24 -5
- package/dist/src/execution/session/handoff-steps.js +1 -1
- package/dist/src/execution/session/handoff.d.ts +5 -3
- package/dist/src/execution/session/handoff.js +1 -1
- package/dist/src/execution/session/pending-turn-state.d.ts +2 -0
- package/dist/src/execution/session/pending-turn-state.js +1 -1
- package/dist/src/execution/session/program.js +1 -1
- package/dist/src/execution/session/turn-step-result.js +1 -1
- package/dist/src/execution/session/turn-step-types.d.ts +7 -0
- package/dist/src/execution/session/turn-step.js +1 -1
- package/dist/src/execution/session/turn.d.ts +14 -2
- package/dist/src/execution/session/turn.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/helpers/frontmatter.d.ts +24 -0
- package/dist/src/internal/helpers/frontmatter.js +1 -0
- package/dist/src/internal/helpers/markdown.js +1 -3
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/nitro-bundler-config.js +1 -1
- package/dist/src/internal/node-esm-compat-banner.js +1 -1
- package/dist/src/public/definitions/state.d.ts +2 -0
- package/dist/src/public/definitions/state.js +1 -1
- package/dist/src/runtime/connections/openapi-spec.d.ts +1 -4
- package/dist/src/runtime/connections/openapi-spec.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/setup/scaffold/create/web-template.d.ts +4 -4
- package/dist/src/setup/scaffold/create/web-template.js +33 -26
- package/dist/src/subagents/callback-route.js +1 -1
- package/dist/src/subagents/parent-notification.d.ts +7 -7
- package/dist/src/subagents/parent-notification.js +1 -1
- package/dist/src/tools/provided/ask-question-workflow.js +1 -1
- package/dist/src/tools/provided/sleep-workflow.js +1 -1
- package/docs/concepts/execution-model-and-durability.mdx +3 -1
- package/docs/extensions.md +4 -3
- package/docs/guides/dev-tui.md +2 -2
- package/package.json +2 -2
- package/dist/src/compiled/gray-matter/index.d.ts +0 -62
- package/dist/src/compiled/gray-matter/index.js +0 -48
- package/dist/src/internal/helpers/gray-matter.d.ts +0 -25
- package/dist/src/internal/helpers/gray-matter.js +0 -1
|
@@ -443,31 +443,36 @@ function AgentMessagePart({
|
|
|
443
443
|
}
|
|
444
444
|
|
|
445
445
|
return (
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
type="dynamic-tool"
|
|
454
|
-
/>
|
|
455
|
-
<ToolContent>
|
|
456
|
-
{part.toolName === "bash" ? (
|
|
457
|
-
<BashToolContent errorText={part.errorText} input={part.input} output={part.output} />
|
|
458
|
-
) : (
|
|
459
|
-
<ToolInput input={part.input} />
|
|
460
|
-
)}
|
|
461
|
-
<InputRequestActions
|
|
462
|
-
canRespond={canRespond}
|
|
463
|
-
part={part}
|
|
464
|
-
onInputResponses={onInputResponses}
|
|
446
|
+
<>
|
|
447
|
+
<Tool>
|
|
448
|
+
<ToolHeader
|
|
449
|
+
state={part.state}
|
|
450
|
+
title={part.toolName}
|
|
451
|
+
toolName={part.toolName}
|
|
452
|
+
type="dynamic-tool"
|
|
465
453
|
/>
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
454
|
+
<ToolContent>
|
|
455
|
+
{part.toolName === "bash" ? (
|
|
456
|
+
<BashToolContent
|
|
457
|
+
errorText={part.errorText}
|
|
458
|
+
input={part.input}
|
|
459
|
+
output={part.output}
|
|
460
|
+
/>
|
|
461
|
+
) : (
|
|
462
|
+
<>
|
|
463
|
+
<ToolInput input={part.input} />
|
|
464
|
+
<ToolOutput errorText={part.errorText} output={part.output} />
|
|
465
|
+
</>
|
|
466
|
+
)}
|
|
467
|
+
</ToolContent>
|
|
468
|
+
</Tool>
|
|
469
|
+
{/* Kept outside the collapsed card so a pending approval is always visible. */}
|
|
470
|
+
<InputRequestActions
|
|
471
|
+
canRespond={canRespond}
|
|
472
|
+
part={part}
|
|
473
|
+
onInputResponses={onInputResponses}
|
|
474
|
+
/>
|
|
475
|
+
</>
|
|
471
476
|
);
|
|
472
477
|
}
|
|
473
478
|
}
|
|
@@ -2023,6 +2028,8 @@ export const MessageContent = ({ children, className, ...props }: MessageContent
|
|
|
2023
2028
|
className={cn(
|
|
2024
2029
|
"is-user:dark flex w-fit min-w-0 max-w-full flex-col gap-2 overflow-hidden text-sm",
|
|
2025
2030
|
"group-[.is-user]:ml-auto group-[.is-user]:rounded-2xl group-[.is-user]:bg-primary group-[.is-user]:px-4 group-[.is-user]:py-2.5 group-[.is-user]:text-primary-foreground",
|
|
2031
|
+
// Streamdown links default to text-primary, which matches the user bubble background.
|
|
2032
|
+
"group-[.is-user]:[&_[data-streamdown=link]]:text-current",
|
|
2026
2033
|
"group-[.is-assistant]:w-full group-[.is-assistant]:text-foreground",
|
|
2027
2034
|
"group-data-[optimistic=true]:opacity-70",
|
|
2028
2035
|
className,
|
|
@@ -3278,7 +3285,7 @@ export const PromptInputTextarea = ({
|
|
|
3278
3285
|
|
|
3279
3286
|
return (
|
|
3280
3287
|
<InputGroupTextarea
|
|
3281
|
-
className={cn("field-sizing-content max-h-48 min-h-18 text-sm
|
|
3288
|
+
className={cn("field-sizing-content max-h-48 min-h-18 text-base md:text-sm", className)}
|
|
3282
3289
|
name="message"
|
|
3283
3290
|
onCompositionEnd={handleCompositionEnd}
|
|
3284
3291
|
onCompositionStart={handleCompositionStart}
|
|
@@ -3882,7 +3889,7 @@ export const QuestionInput = ({
|
|
|
3882
3889
|
return (
|
|
3883
3890
|
<Textarea
|
|
3884
3891
|
className={cn(
|
|
3885
|
-
"min-h-16 resize-none rounded-lg text-sm shadow-none focus-visible:border-foreground!",
|
|
3892
|
+
"min-h-16 resize-none rounded-lg text-base md:text-sm shadow-none focus-visible:border-foreground!",
|
|
3886
3893
|
className,
|
|
3887
3894
|
)}
|
|
3888
3895
|
disabled={question.disabled || disabled}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from"#compiled/zod/index.js";import{inputRequestSchema}from"#shared/input.js";import{jsonValueSchema}from"#shared/json-schemas.js";import{resumeHook}from"#internal/workflow/runtime.js";import{agentTurnOutcomeWithCostSchema}from"#shared/agent-turn-outcome.js";const sessionInputCallbackSchema=z.object({callId:z.string().min(1),childContinuationToken:z.string().min(1),childSessionId:z.string().min(1),childSessionInbox:z.object({sessionId:z.string().min(1)}).strict().optional(),inputSource:z.string().min(1).optional(),remote:z.object({name:z.string().min(1),url:z.string().url(),forwardPrincipal:z.boolean().optional(),sessionId:z.string().min(1),resolverId:z.string().min(1).optional()}).strict().optional(),kind:z.literal(`subagent-input-request`),subagentName:z.string().min(1),event:z.object({requests:z.array(inputRequestSchema).min(1),sequence:z.number(),stepIndex:z.number(),taskId:z.string().optional(),turnId:z.string()})}),sessionAuthorizationCallbackSchema=z.object({callId:z.string().min(1),childSessionId:z.string().min(1),kind:z.literal(`subagent-authorization-event`),subagentName:z.string().min(1),event:z.discriminatedUnion(`type`,[z.object({type:z.literal(`approval.candidate`),data:z.object({candidateId:z.string(),outcome:z.enum([`pending`,`rejected`,`failed`,`timed-out`,`stale`]),requestId:z.string(),responderPrincipalId:z.string(),reason:z.string().optional(),sequence:z.number(),stepIndex:z.number(),turnId:z.string()}).passthrough()}),z.object({type:z.literal(`approval.settled`),data:z.object({outcome:z.enum([`approved`,`cancelled`]),requestId:z.string(),responderPrincipalId:z.string(),sequence:z.number(),stepIndex:z.number(),turnId:z.string()}).passthrough()}),z.object({type:z.literal(`authorization.required`),data:z.object({description:z.string(),name:z.string(),sequence:z.number(),stepIndex:z.number(),turnId:z.string(),webhookUrl:z.string().optional(),attemptId:z.string().optional(),taskId:z.string().optional(),principalId:z.string().optional()}).passthrough()}),z.object({type:z.literal(`authorization.completed`),data:z.object({name:z.string(),outcome:z.enum([`authorized`,`declined`,`failed`,`timed-out`]),sequence:z.number(),stepIndex:z.number(),turnId:z.string(),attemptId:z.string().optional(),taskId:z.string().optional(),principalId:z.string().optional()}).passthrough()})])}),sessionResultCallbackSchema=z.discriminatedUnion(`kind`,[z.object({callId:z.string().min(1),kind:z.literal(`turn.completed`),outcome:agentTurnOutcomeWithCostSchema,output:jsonValueSchema.optional(),subagentName:z.string().min(1)}),z.object({callId:z.string().min(1),error:jsonValueSchema,kind:z.literal(`turn.failed`),outcome:agentTurnOutcomeWithCostSchema,subagentName:z.string().min(1)})]);async function handleSessionCallbackRequest(e,t){let n=t.params.token;if(typeof n!=`string`||n.length===0)return Response.json({error:`Missing callback token.`,ok:!1},{status:400});let r;try{r=await e.json()}catch{return Response.json({error:`Invalid JSON body.`,ok:!1},{status:400})}let i=callbackKind(r),a=i===`subagent-input-request`?sessionInputCallbackSchema.safeParse(r):i===`subagent-authorization-event`?sessionAuthorizationCallbackSchema.safeParse(r):void 0;if(a!==void 0&&!a.success)return Response.json({error:`Invalid session input callback.`,ok:!1},{status:400});let o=a===void 0?projectSessionCallbackResult(r):void 0;if(o instanceof Response)return o;try{await resumeHook(n,a?.success?a.data:{kind:`runtime-action-result`,results:[o]})}catch{return Response.json({error:`Session callback not pending.`,ok:!1},{status:404})}return Response.json({ok:!0},{status:202})}function callbackKind(e){if(typeof e==`object`&&e)return Reflect.get(e,`kind`)}function projectSessionCallbackResult(e){if(typeof e!=`object`||!e)return Response.json({error:`Expected a JSON object.`,ok:!1},{status:400});let t=callbackKind(e);if(t!==`turn.completed`&&t!==`turn.failed`)return Response.json({error:`Unsupported callback kind.`,ok:!1},{status:400});let n=sessionResultCallbackSchema.safeParse(e);if(!n.success)return Response.json({error:`Invalid session result callback.`,ok:!1},{status:400});let r=n.data;return r.kind===`turn.completed`?{callId:r.callId,kind:`subagent-result`,origin:`child`,outcome:r.outcome,output:r.output??``,subagentName:r.subagentName,usage:r.outcome.usageDelta}:{callId:r.callId,isError:!0,kind:`subagent-result`,origin:`child`,outcome:r.outcome,output:r.error,subagentName:r.subagentName}}export{handleSessionCallbackRequest};
|
|
1
|
+
import{z}from"#compiled/zod/index.js";import{inputRequestSchema}from"#shared/input.js";import{jsonValueSchema}from"#shared/json-schemas.js";import{renameLegacyTaskCallback}from"#execution/legacy-remote-agent/protocol.js";import{resumeHook}from"#internal/workflow/runtime.js";import{agentTurnOutcomeWithCostSchema}from"#shared/agent-turn-outcome.js";const sessionInputCallbackSchema=z.object({callId:z.string().min(1),childContinuationToken:z.string().min(1),childSessionId:z.string().min(1),childSessionInbox:z.object({sessionId:z.string().min(1)}).strict().optional(),inputSource:z.string().min(1).optional(),remote:z.object({name:z.string().min(1),url:z.string().url(),forwardPrincipal:z.boolean().optional(),sessionId:z.string().min(1),resolverId:z.string().min(1).optional()}).strict().optional(),kind:z.literal(`subagent-input-request`),subagentName:z.string().min(1),event:z.object({requests:z.array(inputRequestSchema).min(1),sequence:z.number(),stepIndex:z.number(),taskId:z.string().optional(),turnId:z.string()})}),sessionAuthorizationCallbackSchema=z.object({callId:z.string().min(1),childSessionId:z.string().min(1),kind:z.literal(`subagent-authorization-event`),subagentName:z.string().min(1),event:z.discriminatedUnion(`type`,[z.object({type:z.literal(`approval.candidate`),data:z.object({candidateId:z.string(),outcome:z.enum([`pending`,`rejected`,`failed`,`timed-out`,`stale`]),requestId:z.string(),responderPrincipalId:z.string(),reason:z.string().optional(),sequence:z.number(),stepIndex:z.number(),turnId:z.string()}).passthrough()}),z.object({type:z.literal(`approval.settled`),data:z.object({outcome:z.enum([`approved`,`cancelled`]),requestId:z.string(),responderPrincipalId:z.string(),sequence:z.number(),stepIndex:z.number(),turnId:z.string()}).passthrough()}),z.object({type:z.literal(`authorization.required`),data:z.object({description:z.string(),name:z.string(),sequence:z.number(),stepIndex:z.number(),turnId:z.string(),webhookUrl:z.string().optional(),attemptId:z.string().optional(),taskId:z.string().optional(),principalId:z.string().optional()}).passthrough()}),z.object({type:z.literal(`authorization.completed`),data:z.object({name:z.string(),outcome:z.enum([`authorized`,`declined`,`failed`,`timed-out`]),sequence:z.number(),stepIndex:z.number(),turnId:z.string(),attemptId:z.string().optional(),taskId:z.string().optional(),principalId:z.string().optional()}).passthrough()})])}),sessionResultCallbackSchema=z.discriminatedUnion(`kind`,[z.object({callId:z.string().min(1),kind:z.literal(`turn.completed`),outcome:agentTurnOutcomeWithCostSchema,output:jsonValueSchema.optional(),subagentName:z.string().min(1)}),z.object({callId:z.string().min(1),error:jsonValueSchema,kind:z.literal(`turn.failed`),outcome:agentTurnOutcomeWithCostSchema,subagentName:z.string().min(1)})]);async function handleSessionCallbackRequest(e,t){let n=t.params.token;if(typeof n!=`string`||n.length===0)return Response.json({error:`Missing callback token.`,ok:!1},{status:400});let r;try{r=renameLegacyTaskCallback(await e.json())}catch{return Response.json({error:`Invalid JSON body.`,ok:!1},{status:400})}let i=callbackKind(r),a=i===`subagent-input-request`?sessionInputCallbackSchema.safeParse(r):i===`subagent-authorization-event`?sessionAuthorizationCallbackSchema.safeParse(r):void 0;if(a!==void 0&&!a.success)return Response.json({error:`Invalid session input callback.`,ok:!1},{status:400});let o=a===void 0?projectSessionCallbackResult(r):void 0;if(o instanceof Response)return o;try{await resumeHook(n,a?.success?a.data:{kind:`runtime-action-result`,results:[o]})}catch{return Response.json({error:`Session callback not pending.`,ok:!1},{status:404})}return Response.json({ok:!0},{status:202})}function callbackKind(e){if(typeof e==`object`&&e)return Reflect.get(e,`kind`)}function projectSessionCallbackResult(e){if(typeof e!=`object`||!e)return Response.json({error:`Expected a JSON object.`,ok:!1},{status:400});let t=callbackKind(e);if(t!==`turn.completed`&&t!==`turn.failed`)return Response.json({error:`Unsupported callback kind.`,ok:!1},{status:400});let n=sessionResultCallbackSchema.safeParse(e);if(!n.success)return Response.json({error:`Invalid session result callback.`,ok:!1},{status:400});let r=n.data;return r.kind===`turn.completed`?{callId:r.callId,kind:`subagent-result`,origin:`child`,outcome:r.outcome,output:r.output??``,subagentName:r.subagentName,usage:r.outcome.usageDelta}:{callId:r.callId,isError:!0,kind:`subagent-result`,origin:`child`,outcome:r.outcome,output:r.error,subagentName:r.subagentName}}export{handleSessionCallbackRequest};
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import type { TurnCaller } from "#channel/types.js";
|
|
3
3
|
import type { AgentTurnOutcome } from "#shared/agent-turn-outcome.js";
|
|
4
4
|
import type { TokenUsage } from "#shared/token-usage.js";
|
|
5
|
-
import { type SessionStateTransition } from "#execution/session/state-delta.js";
|
|
6
5
|
/** Settled turn payload forwarded from the owner to the caller. */
|
|
7
6
|
export interface SettledTurnNotification {
|
|
8
7
|
readonly output: unknown;
|
|
@@ -27,7 +26,7 @@ export declare function notifyTurnCallerStep(input: {
|
|
|
27
26
|
}): Promise<void>;
|
|
28
27
|
/** Settles a workflow-owned caller after the child turn is cooperatively cancelled. */
|
|
29
28
|
export declare function notifyCancelledTaskCallerStep(input: {
|
|
30
|
-
readonly caller: TurnCaller
|
|
29
|
+
readonly caller: TurnCaller;
|
|
31
30
|
readonly sessionId: string;
|
|
32
31
|
readonly usage?: TokenUsage;
|
|
33
32
|
}): Promise<void>;
|
|
@@ -35,8 +34,9 @@ export declare function notifyCancelledTaskCallerStep(input: {
|
|
|
35
34
|
export declare function resolveInitialTurnCallerStep(input: {
|
|
36
35
|
readonly serializedContext: Record<string, unknown>;
|
|
37
36
|
}): Promise<TurnCaller | undefined>;
|
|
38
|
-
/**
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Points child event forwarding at the caller that owns the next accepted turn,
|
|
39
|
+
* so the turn's input requests and progress reach that caller and not the
|
|
40
|
+
* previous one.
|
|
41
|
+
*/
|
|
42
|
+
export declare function bindTurnCallerContext(caller: TurnCaller | undefined, serializedContext: Record<string, unknown>): Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createLogger}from"#internal/logging.js";import{SessionCallbackKey}from"#context/keys.js";import{toErrorMessage}from"#shared/errors.js";import{parseJsonValue}from"#shared/json.js";import{ChannelKey}from"#runtime/sessions/runtime-context-keys.js";import{parseSessionCallback}from"#channel/session-callback.js";import{deserializeContext}from"#context/serialize.js";import{
|
|
1
|
+
import{createLogger}from"#internal/logging.js";import{SessionCallbackKey}from"#context/keys.js";import{toErrorMessage}from"#shared/errors.js";import{parseJsonValue}from"#shared/json.js";import{ChannelKey}from"#runtime/sessions/runtime-context-keys.js";import{parseSessionCallback}from"#channel/session-callback.js";import{deserializeContext}from"#context/serialize.js";import{postSessionCallbackRequest}from"#execution/session-callback-request.js";import{HookNotFoundError}from"#compiled/@workflow/errors/index.js";import{resumeHook}from"#internal/workflow/runtime.js";import{SUBAGENT_ADAPTER_KIND,isSubagentAdapterState}from"#subagents/adapter-state.js";const log=createLogger(`execution.delegated-parent-notification`),SUBAGENT_EXECUTION_FAILED=`SUBAGENT_EXECUTION_FAILED`,ZERO_TOKEN_USAGE={cacheReadTokens:0,cacheWriteTokens:0,inputTokens:0,outputTokens:0};async function notifyTurnCallerStep(e){"use step";if(e.caller===void 0)return;let t=createSettledTurnResult({caller:e.caller,lifecycle:e.lifecycle,sessionId:e.sessionId,settled:e.settled});if(e.caller.replyTo.kind===`callback`){await postSettledTurnCallback({result:t,sessionId:e.sessionId,url:e.caller.replyTo.url});return}await resumeSettledTurnHook(e.caller.replyTo.token,t)}async function notifyCancelledTaskCallerStep(e){"use step";let t=e.usage??ZERO_TOKEN_USAGE,n={code:SUBAGENT_EXECUTION_FAILED,message:`The agent invocation was cancelled.`},r={callId:e.caller.callId,isError:!0,kind:`subagent-result`,origin:`child`,outcome:{kind:`parked`,result:{kind:`cancelled`},usageDelta:t},output:n,subagentName:e.caller.subagentName},i=e.usage===void 0?r:{...r,usage:e.usage};if(e.caller.replyTo.kind===`callback`){await postSettledTurnCallback({result:i,sessionId:e.sessionId,url:e.caller.replyTo.url});return}await resumeSettledTurnHook(e.caller.replyTo.token,i)}function createSettledTurnResult(e){let t=e.settled.usage??ZERO_TOKEN_USAGE;if(e.settled.isError===!0){let n={code:SUBAGENT_EXECUTION_FAILED,message:toErrorMessage(e.settled.output)};return{callId:e.caller.callId,isError:!0,kind:`subagent-result`,origin:`child`,outcome:{kind:e.lifecycle,result:{error:n,kind:`failed`},usageDelta:t},output:n,subagentName:e.caller.subagentName}}let n=parseJsonValue(e.settled.output),r={callId:e.caller.callId,kind:`subagent-result`,origin:`child`,outcome:{kind:e.lifecycle,result:{kind:`succeeded`,output:n},usageDelta:t},output:n,subagentName:e.caller.subagentName};return e.settled.usage===void 0?r:{...r,usage:e.settled.usage}}async function resolveInitialTurnCallerStep(e){"use step";let t=e.serializedContext[SessionCallbackKey.name];if(t!==void 0){let e=parseSessionCallback(t);if(!e.ok)throw Error(`Serialized session callback is invalid.`,{cause:e.cause});return{callId:e.callback.callId,replyTo:{kind:`callback`,token:e.callback.token,url:e.callback.url},subagentName:e.callback.subagentName}}let n=(await deserializeContext(e.serializedContext)).get(ChannelKey);if(n?.kind===SUBAGENT_ADAPTER_KIND&&isSubagentAdapterState(n.state))return{callId:n.state.callId,replyTo:{kind:`hook`,token:n.state.parentContinuationToken},subagentName:n.state.subagentName}}function bindTurnCallerContext(e,t){if(e===void 0)return t;if(e.replyTo.kind===`callback`){let n={callId:e.callId,subagentName:e.subagentName,token:e.replyTo.token,url:e.replyTo.url};return{...t,[SessionCallbackKey.name]:n}}let n=t[ChannelKey.name];if(typeof n!=`object`||!n||Reflect.get(n,`kind`)!==SUBAGENT_ADAPTER_KIND||!isSubagentAdapterState(Reflect.get(n,`state`)))throw Error(`Delegated local turn is missing its subagent adapter binding.`);let r={...Reflect.get(n,`state`),callId:e.callId,parentContinuationToken:e.replyTo.token,subagentName:e.subagentName};return{...t,[ChannelKey.name]:{...n,state:r}}}async function postSettledTurnCallback(e){let{sessionId:t}=e;if(e.result.isError===!0){await postCallbackPayload({payload:{callId:e.result.callId,error:e.result.output,kind:`turn.failed`,outcome:e.result.outcome,sessionId:t,subagentName:e.result.subagentName},url:e.url});return}await postCallbackPayload({payload:{callId:e.result.callId,kind:`turn.completed`,outcome:e.result.outcome,output:e.result.output,sessionId:t,subagentName:e.result.subagentName},url:e.url})}async function postCallbackPayload(e){let t=await postSessionCallbackRequest({body:e.payload,url:e.url});if(!t.ok)throw Error(`Turn callback failed with HTTP ${t.status}.`)}async function resumeSettledTurnHook(e,t){try{await resumeHook(e,{kind:`runtime-action-result`,results:[t]})}catch(n){if(!HookNotFoundError.is(n))throw n;log.warn(`turn caller hook no longer exists`,{callId:t.callId,callerToken:e})}}export{bindTurnCallerContext,notifyCancelledTaskCallerStep,notifyTurnCallerStep,resolveInitialTurnCallerStep};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
async function executeAskQuestionTool(e,t){"use workflow";return toAskQuestionOutput(await t.ask(toAskQuestionRequest(e)))}function toAskQuestionRequest(e){let t=e.options?.map(e=>({description:e.description,id:e.label,label:e.label}));return{allowFreeform:!0,display:t===void 0?`text`:`select`,prompt:e.question,...t!==void 0&&{options:t}}}function toAskQuestionOutput(e){switch(e.status){case`answered`:return{answer:e.optionId??e.text??``,status:`answered`};case`cancelled`:return{interrupted:!0};case`unavailable`:return{status:`unavailable`}}}executeAskQuestionTool.workflowId=`workflow//eve@0.70.
|
|
1
|
+
async function executeAskQuestionTool(e,t){"use workflow";return toAskQuestionOutput(await t.ask(toAskQuestionRequest(e)))}function toAskQuestionRequest(e){let t=e.options?.map(e=>({description:e.description,id:e.label,label:e.label}));return{allowFreeform:!0,display:t===void 0?`text`:`select`,prompt:e.question,...t!==void 0&&{options:t}}}function toAskQuestionOutput(e){switch(e.status){case`answered`:return{answer:e.optionId??e.text??``,status:`answered`};case`cancelled`:return{interrupted:!0};case`unavailable`:return{status:`unavailable`}}}executeAskQuestionTool.workflowId=`workflow//eve@0.70.1//executeAskQuestionTool`;export{executeAskQuestionTool,toAskQuestionOutput,toAskQuestionRequest};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{sleep}from"#compiled/@workflow/core/index.js";async function executeSleepTool(e,t){"use workflow";let n=new Promise(e=>t.abortSignal.addEventListener(`abort`,()=>e(`interrupted`),{once:!0})),r=sleep(Math.ceil(e.seconds*1e3)).then(()=>`elapsed`);return await Promise.race([r,n])===`elapsed`?{waitedSeconds:e.seconds}:{interrupted:!0}}executeSleepTool.workflowId=`workflow//eve@0.70.
|
|
1
|
+
import{sleep}from"#compiled/@workflow/core/index.js";async function executeSleepTool(e,t){"use workflow";let n=new Promise(e=>t.abortSignal.addEventListener(`abort`,()=>e(`interrupted`),{once:!0})),r=sleep(Math.ceil(e.seconds*1e3)).then(()=>`elapsed`);return await Promise.race([r,n])===`elapsed`?{waitedSeconds:e.seconds}:{interrupted:!0}}executeSleepTool.workflowId=`workflow//eve@0.70.1//executeSleepTool`;export{executeSleepTool};
|
|
@@ -25,7 +25,9 @@ The Workflow SDK is not inherently tied to Vercel. In local development and in a
|
|
|
25
25
|
|
|
26
26
|
When a Vercel production deployment changes, a new delivery to an idle session hands the session's settled state to the exact deployment that accepted the request. This applies whether the delivery arrives through the session ID or through any channel continuation address the session has claimed. The session keeps its original ID and event stream, while the next model turn 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. A successful handoff restarts the session's original configured [`sessionTimeoutMs`](../agent-config#runtime-limits) duration; disabled timeouts stay disabled. Failed or skipped handoffs keep the existing deadline.
|
|
27
27
|
|
|
28
|
-
Before taking ownership, the target deployment
|
|
28
|
+
Before taking ownership, the target deployment upgrades the checkpoint when an older eve release wrote it, then checks that no pending work remains. A deployment accepts checkpoints from eve 0.66.0 and later, so upgrading eve does not leave long-lived sessions, such as a Slack thread, on their old deployment. An older release cannot read a newer checkpoint: after a rollback, a session that already moved to the newer deployment stays there. Extension state saved before eve 0.69 moves to its mount when exactly one mount uses that extension package and the extension still defines that state. Otherwise eve cannot choose an owner, and the session stays on its current deployment. Idle subagent sessions that eve 0.66–0.68 kept for later reuse are stopped after the handoff. Authored session state remains opaque to this validation.
|
|
29
|
+
|
|
30
|
+
If the target deployment rejects the session, the previous owner keeps it and processes the triggering delivery. When the target deployment cannot read the checkpoint, its Vercel runtime logs show a `session handoff refused` warning with the checkpoint version and the reason. Owners on this release or later also write a `session handoff failed` warning to their own runtime logs, with the target deployment and the reason.
|
|
29
31
|
|
|
30
32
|
eve does not move live work between deployments. A session with a running turn, pending human input or authorization, queued messages, or active tasks and subagents stays on its current deployment. After that work settles, a later delivery can move the idle session; the earlier deployment signal is not remembered.
|
|
31
33
|
|
package/docs/extensions.md
CHANGED
|
@@ -210,10 +210,11 @@ Extension state belongs to the logical mount path (for example, `extensions/crm`
|
|
|
210
210
|
|
|
211
211
|
### Upgrade from package-scoped extension state
|
|
212
212
|
|
|
213
|
-
Deployments before
|
|
213
|
+
Deployments before eve 0.69 stored extension state under package-prefixed keys, such as `acme-crm.requests`. When a session from one of those deployments hands off to a newer deployment, eve moves each package-prefixed value to the mount that uses that package. eve never resets that state during restore.
|
|
214
214
|
|
|
215
|
-
-
|
|
216
|
-
-
|
|
215
|
+
- The value moves only when exactly one mount uses the package and the extension still defines that state name. Otherwise eve cannot tell which mount owns the value, so the handoff is rejected and the session stays on its current deployment. Keep that deployment available until the session finishes, or start a new session on the deployment you want to use.
|
|
216
|
+
- Older deployments cannot read sessions saved by a newer release, so a session that already moved does not hand back after a rollback.
|
|
217
|
+
- Local context snapshots follow the same rule: an older snapshot restores when every saved state key still has an owner.
|
|
217
218
|
|
|
218
219
|
### Use an extension in a workspace
|
|
219
220
|
|
package/docs/guides/dev-tui.md
CHANGED
|
@@ -22,8 +22,8 @@ Before your first message, the empty composer may suggest asking your local agen
|
|
|
22
22
|
| Command | Description |
|
|
23
23
|
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
24
24
|
| `/model` | Choose the model, speed, and reasoning. Pass a model ID to set it directly: `/model provider/model-id`. |
|
|
25
|
-
| `/
|
|
26
|
-
| `/clear` | Clear the session's model-message history
|
|
25
|
+
| `/new` | Start a fresh session and clear the screen. `/reset` is an alias. |
|
|
26
|
+
| `/clear` | Clear the session's model-message history and keep the session. |
|
|
27
27
|
| `/compact` | Compact the current session's context. |
|
|
28
28
|
| `/cancel` | Cancel the current turn without discarding settled context. |
|
|
29
29
|
| `/login` | Connect a ChatGPT subscription, Vercel account, or provider API key. |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eve",
|
|
3
|
-
"version": "0.70.
|
|
3
|
+
"version": "0.70.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
|
|
6
6
|
"keywords": [
|
|
@@ -561,8 +561,8 @@
|
|
|
561
561
|
"emulate": "0.6.0",
|
|
562
562
|
"env-runner": "0.1.16",
|
|
563
563
|
"eventsource-parser": "3.1.0",
|
|
564
|
-
"gray-matter": "4.0.3",
|
|
565
564
|
"jose": "6.2.3",
|
|
565
|
+
"js-yaml": "4.3.2",
|
|
566
566
|
"jsonc-parser": "3.3.1",
|
|
567
567
|
"just-bash": "3.1.0",
|
|
568
568
|
"just-secrets": "0.0.2",
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
// Hand-authored ESM declaration for the vendored slice of `gray-matter`.
|
|
2
|
-
// The upstream `gray-matter.d.ts` is `export =` (CJS-style) and cannot be
|
|
3
|
-
// re-exported as a default ESM binding without rewriting. Only the surface
|
|
4
|
-
// eve touches is typed here: invoking the default function, the static
|
|
5
|
-
// `test()` predicate, and the `data`/`content` properties on the result.
|
|
6
|
-
|
|
7
|
-
export type Input = string | Buffer;
|
|
8
|
-
|
|
9
|
-
export interface GrayMatterOption<I extends Input, O extends GrayMatterOption<I, O>> {
|
|
10
|
-
parser?: () => void;
|
|
11
|
-
eval?: boolean;
|
|
12
|
-
excerpt?: boolean | ((input: I, options: O) => string);
|
|
13
|
-
excerpt_separator?: string;
|
|
14
|
-
engines?: Record<
|
|
15
|
-
string,
|
|
16
|
-
((input: string) => object) | { parse(input: string): object; stringify?(data: object): string }
|
|
17
|
-
>;
|
|
18
|
-
language?: string;
|
|
19
|
-
delimiters?: string | [string, string];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface GrayMatterFile<I extends Input> {
|
|
23
|
-
data: Record<string, unknown>;
|
|
24
|
-
content: string;
|
|
25
|
-
excerpt?: string;
|
|
26
|
-
orig: Buffer | I;
|
|
27
|
-
language: string;
|
|
28
|
-
matter: string;
|
|
29
|
-
stringify(lang: string): string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface GrayMatterFunction {
|
|
33
|
-
<I extends Input, O extends GrayMatterOption<I, O>>(
|
|
34
|
-
input: I | { content: I },
|
|
35
|
-
options?: O,
|
|
36
|
-
): GrayMatterFile<I>;
|
|
37
|
-
|
|
38
|
-
test<O extends GrayMatterOption<string, O>>(
|
|
39
|
-
str: string,
|
|
40
|
-
options?: GrayMatterOption<string, O>,
|
|
41
|
-
): boolean;
|
|
42
|
-
|
|
43
|
-
read<O extends GrayMatterOption<string, O>>(
|
|
44
|
-
filepath: string,
|
|
45
|
-
options?: GrayMatterOption<string, O>,
|
|
46
|
-
): GrayMatterFile<string>;
|
|
47
|
-
|
|
48
|
-
stringify<O extends GrayMatterOption<string, O>>(
|
|
49
|
-
file: string | { content: string },
|
|
50
|
-
data: object,
|
|
51
|
-
options?: GrayMatterOption<string, O>,
|
|
52
|
-
): string;
|
|
53
|
-
|
|
54
|
-
language<O extends GrayMatterOption<string, O>>(
|
|
55
|
-
str: string,
|
|
56
|
-
options?: GrayMatterOption<string, O>,
|
|
57
|
-
): { name: string; raw: string };
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
declare const matter: GrayMatterFunction;
|
|
61
|
-
|
|
62
|
-
export default matter;
|