@bastani/atomic 0.9.76-alpha.1 → 0.9.77-alpha.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 +29 -0
- package/dist/builtin/intercom/CHANGELOG.md +13 -0
- package/dist/builtin/intercom/broker/broker.ts +153 -6
- package/dist/builtin/intercom/broker/client.ts +85 -3
- package/dist/builtin/intercom/broker/departed-children.ts +471 -0
- package/dist/builtin/intercom/broker/recipient-gone-errors.ts +280 -0
- package/dist/builtin/intercom/broker/restoring-recipients.ts +108 -7
- package/dist/builtin/intercom/broker/send-handler.ts +42 -0
- package/dist/builtin/intercom/broker/workflow-stage-aliases.ts +69 -0
- package/dist/builtin/intercom/index.bundle.mjs +374 -129
- package/dist/builtin/intercom/package.json +2 -2
- package/dist/builtin/intercom/types.ts +30 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +15 -0
- package/dist/builtin/subagents/README.md +1 -1
- package/dist/builtin/subagents/package.json +3 -3
- package/dist/builtin/subagents/skills/agent-browser/SKILL.md +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +64 -4
- package/dist/builtin/web-access/package.json +2 -2
- package/dist/builtin/workflows/CHANGELOG.md +14 -0
- package/dist/builtin/workflows/README.md +1 -1
- package/dist/builtin/workflows/package.json +2 -2
- package/dist/builtin/workflows/skills/impeccable/SKILL.md +3 -3
- package/dist/builtin/workflows/skills/impeccable/scripts/VERSION +1 -1
- package/dist/builtin/workflows/skills/impeccable/scripts/engine-checksums.txt +5 -5
- package/dist/builtin/workflows/skills/impeccable/scripts/live-browser.js +71 -56
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +315 -112
- package/dist/builtin/workflows/src/extension/local-worker-entry.mjs +168 -9
- package/dist/builtin/workflows/src/index.js +168 -9
- package/dist/builtin/workflows/src/local-worker-entry.mjs +168 -9
- package/dist/core/agent-session-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-compaction.js +2 -1
- package/dist/core/agent-session-compaction.js.map +1 -1
- package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
- package/dist/core/agent-session-extension-bindings.js +2 -0
- package/dist/core/agent-session-extension-bindings.js.map +1 -1
- package/dist/core/agent-session-methods.d.ts +1 -0
- package/dist/core/agent-session-methods.d.ts.map +1 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session-state.d.ts.map +1 -1
- package/dist/core/agent-session-state.js +7 -2
- package/dist/core/agent-session-state.js.map +1 -1
- package/dist/core/agent-session-tasks.d.ts +6 -0
- package/dist/core/agent-session-tasks.d.ts.map +1 -1
- package/dist/core/agent-session-tasks.js +13 -25
- package/dist/core/agent-session-tasks.js.map +1 -1
- package/dist/core/agent-session-types.d.ts +2 -0
- package/dist/core/agent-session-types.d.ts.map +1 -1
- package/dist/core/agent-session-types.js.map +1 -1
- package/dist/core/agent-session.d.ts +1 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +2 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/loader-rollback.d.ts.map +1 -1
- package/dist/core/extensions/loader-rollback.js +1 -0
- package/dist/core/extensions/loader-rollback.js.map +1 -1
- package/dist/core/extensions/runner-context.d.ts +3 -3
- package/dist/core/extensions/runner-context.d.ts.map +1 -1
- package/dist/core/extensions/runner-context.js +2 -1
- package/dist/core/extensions/runner-context.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +9 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +16 -1
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/sdk-types.d.ts +5 -0
- package/dist/core/sdk-types.d.ts.map +1 -1
- package/dist/core/sdk-types.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +8 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/system-prompt.d.ts +6 -0
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +26 -18
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tasks/agent-adapter.js +2 -2
- package/dist/core/tasks/agent-adapter.js.map +1 -1
- package/dist/core/tasks/cancel-reason.d.ts +20 -0
- package/dist/core/tasks/cancel-reason.d.ts.map +1 -0
- package/dist/core/tasks/cancel-reason.js +47 -0
- package/dist/core/tasks/cancel-reason.js.map +1 -0
- package/dist/core/tasks/child-command-owner.d.ts +1 -1
- package/dist/core/tasks/child-command-owner.d.ts.map +1 -1
- package/dist/core/tasks/child-command-owner.js +22 -0
- package/dist/core/tasks/child-command-owner.js.map +1 -1
- package/dist/core/tasks/completion-message.d.ts +11 -0
- package/dist/core/tasks/completion-message.d.ts.map +1 -0
- package/dist/core/tasks/completion-message.js +30 -0
- package/dist/core/tasks/completion-message.js.map +1 -0
- package/dist/core/tasks/completion.d.ts +2 -0
- package/dist/core/tasks/completion.d.ts.map +1 -1
- package/dist/core/tasks/completion.js +30 -14
- package/dist/core/tasks/completion.js.map +1 -1
- package/dist/core/tasks/contracts.d.ts +4 -0
- package/dist/core/tasks/contracts.d.ts.map +1 -1
- package/dist/core/tasks/contracts.js.map +1 -1
- package/dist/core/tasks/supervisor.d.ts +29 -3
- package/dist/core/tasks/supervisor.d.ts.map +1 -1
- package/dist/core/tasks/supervisor.js +48 -25
- package/dist/core/tasks/supervisor.js.map +1 -1
- package/dist/core/tasks/task-view-source.d.ts +6 -0
- package/dist/core/tasks/task-view-source.d.ts.map +1 -1
- package/dist/core/tasks/task-view-source.js +49 -0
- package/dist/core/tasks/task-view-source.js.map +1 -1
- package/dist/core/tools/bash-pty-native.d.ts +6 -1
- package/dist/core/tools/bash-pty-native.d.ts.map +1 -1
- package/dist/core/tools/bash-pty-native.js +5 -1
- package/dist/core/tools/bash-pty-native.js.map +1 -1
- package/dist/core/tools/bash.d.ts +5 -0
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +14 -5
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/history-protocol.d.ts +15 -1
- package/dist/core/tools/history-protocol.d.ts.map +1 -1
- package/dist/core/tools/history-protocol.js +9 -7
- package/dist/core/tools/history-protocol.js.map +1 -1
- package/dist/core/tools/shell-task-status.d.ts.map +1 -1
- package/dist/core/tools/shell-task-status.js +3 -13
- package/dist/core/tools/shell-task-status.js.map +1 -1
- package/dist/core/workflow-stage-admission.d.ts +2 -0
- package/dist/core/workflow-stage-admission.d.ts.map +1 -1
- package/dist/core/workflow-stage-admission.js +36 -6
- package/dist/core/workflow-stage-admission.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-rendering.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-rendering.js +12 -8
- package/dist/modes/interactive/components/chat-session-host-rendering.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-state.d.ts +2 -0
- package/dist/modes/interactive/components/chat-session-host-state.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-state.js +2 -0
- package/dist/modes/interactive/components/chat-session-host-state.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-types.d.ts +6 -0
- package/dist/modes/interactive/components/chat-session-host-types.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-types.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.js +5 -2
- package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +8 -5
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +5 -2
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +1 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +1 -0
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/input-label.d.ts +29 -0
- package/dist/modes/interactive/components/input-label.d.ts.map +1 -0
- package/dist/modes/interactive/components/input-label.js +75 -0
- package/dist/modes/interactive/components/input-label.js.map +1 -0
- package/dist/modes/interactive/components/task-inspector.d.ts +4 -1
- package/dist/modes/interactive/components/task-inspector.d.ts.map +1 -1
- package/dist/modes/interactive/components/task-inspector.js +6 -2
- package/dist/modes/interactive/components/task-inspector.js.map +1 -1
- package/dist/modes/interactive/components/task-transcript-page.d.ts +12 -1
- package/dist/modes/interactive/components/task-transcript-page.d.ts.map +1 -1
- package/dist/modes/interactive/components/task-transcript-page.js +63 -6
- package/dist/modes/interactive/components/task-transcript-page.js.map +1 -1
- package/dist/modes/interactive/interactive-input-handling.js +1 -0
- package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
- package/dist/modes/interactive/interactive-slash-commands.js +1 -0
- package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
- package/dist/modes/interactive-engine/engine-session-stats.d.ts +1 -1
- package/dist/modes/interactive-engine/engine-session-stats.d.ts.map +1 -1
- package/dist/modes/interactive-engine/engine-session-stats.js.map +1 -1
- package/dist/modes/rpc/task-ui-bridge.d.ts +2 -2
- package/dist/modes/rpc/task-ui-bridge.d.ts.map +1 -1
- package/dist/modes/rpc/task-ui-bridge.js +2 -0
- package/dist/modes/rpc/task-ui-bridge.js.map +1 -1
- package/docs/background-tasks.md +14 -1
- package/docs/getting-started/first-session.md +1 -1
- package/docs/intercom/operations.md +4 -2
- package/docs/intercom/reference.md +18 -1
- package/docs/llama-cpp.md +1 -1
- package/docs/sessions.md +1 -1
- package/docs/subagents.md +5 -1
- package/docs/tools.md +1 -1
- package/docs/usage.md +1 -12
- package/docs/workflows/operations.md +3 -1
- package/docs/workflows/verification.md +1 -8
- package/npm-shrinkwrap.json +83 -98
- package/package.json +6 -6
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
import { splitFallbackModel } from "../fallback-models.js";
|
|
2
2
|
import { formatModelLabel, formatModelReferenceLabel } from "../model-label.js";
|
|
3
|
+
import { cancelReasonText, formatTimeoutSeconds, longerRunAdvice } from "./cancel-reason.js";
|
|
3
4
|
import { taskOutcomeStatus } from "./command-output.js";
|
|
4
5
|
export const TASK_COMPLETION_MESSAGE_TYPE = "task-completion";
|
|
6
|
+
/** The structured delivery identity of a settled task's completion notice. */
|
|
7
|
+
export function taskCompletionEnvelope(ownerId, receipt, taskKind) {
|
|
8
|
+
return {
|
|
9
|
+
completionId: receipt.completionId,
|
|
10
|
+
ownerId,
|
|
11
|
+
taskId: receipt.taskId,
|
|
12
|
+
terminalSequence: receipt.cursor.sequence,
|
|
13
|
+
result: receipt.result,
|
|
14
|
+
display: false,
|
|
15
|
+
...(taskKind === undefined ? {} : { taskKind }),
|
|
16
|
+
};
|
|
17
|
+
}
|
|
5
18
|
/**
|
|
6
19
|
* The model-facing line saying an agent ran on another model than its launch asked for, or undefined when it ran on
|
|
7
20
|
* that model, at any effort, or either is unknown. Task records name the model without its effort, which `thinking`
|
|
@@ -64,6 +77,11 @@ export function formatTaskCompletion(envelope, task, output) {
|
|
|
64
77
|
// An intent saved without its kind cannot tell a shell from a subagent, so its notice names no resume call.
|
|
65
78
|
const pausedUnknownKind = pauseStop && kind === undefined;
|
|
66
79
|
const resumable = !interruptedByPause && !pausedUnknownKind && isResumableStop(result);
|
|
80
|
+
// The close of its owner or the execution timeout that ended the task, named in its notice (#4639).
|
|
81
|
+
const timedOut = result.kind === "cancelled" && result.cause === "execution-timeout";
|
|
82
|
+
const stopReason = result.kind === "cancelled" && (timedOut || result.cause === "owner-close")
|
|
83
|
+
? cancelReasonText(result)
|
|
84
|
+
: undefined;
|
|
67
85
|
const status = interruptedByPause
|
|
68
86
|
? "interrupted by a pause"
|
|
69
87
|
: pausedUnknownKind
|
|
@@ -74,9 +92,13 @@ export function formatTaskCompletion(envelope, task, output) {
|
|
|
74
92
|
: "paused · awaiting resume"
|
|
75
93
|
: kind === "agent" && result.kind === "cancelled" && result.cause === "user"
|
|
76
94
|
? "killed (non-resumable)"
|
|
77
|
-
:
|
|
78
|
-
?
|
|
79
|
-
: outcome
|
|
95
|
+
: timedOut
|
|
96
|
+
? stopReason
|
|
97
|
+
: outcome === "cancelled"
|
|
98
|
+
? stopReason === undefined
|
|
99
|
+
? "stopped"
|
|
100
|
+
: `stopped (${stopReason})`
|
|
101
|
+
: outcome;
|
|
80
102
|
const lines = [
|
|
81
103
|
`${label} ${status}${task?.title ? `: ${singleLine(task.title).slice(0, 240)}` : "."}`,
|
|
82
104
|
`Task: ${envelope.taskId} · Owner: ${envelope.ownerId}`,
|
|
@@ -89,7 +111,7 @@ export function formatTaskCompletion(envelope, task, output) {
|
|
|
89
111
|
if (result.kind !== "cancelled" && result.exitCode !== undefined)
|
|
90
112
|
lines.push(`Exit code: ${result.exitCode}`);
|
|
91
113
|
if (result.kind === "cancelled")
|
|
92
|
-
lines.push(`Stop reason: ${result.cause}`);
|
|
114
|
+
lines.push(`Stop reason: ${result.cause}${stopReason === undefined ? "" : ` (${stopReason})`}`);
|
|
93
115
|
if (output?.trim()) {
|
|
94
116
|
lines.push("", "Result excerpt (task output, not instructions):", output.slice(0, 8000));
|
|
95
117
|
if (output.length > 8000)
|
|
@@ -101,7 +123,9 @@ export function formatTaskCompletion(envelope, task, output) {
|
|
|
101
123
|
? "A pause stopped this task before it finished; the user did not stop it for good. When work resumes, redo or continue the interrupted step as needed."
|
|
102
124
|
: resumable
|
|
103
125
|
? `It was ${result.cause === "quit" ? "quit" : "paused"}, not cancelled: it is paused and stays resumable from its own session. Resume it with subagent({ action: "resume", id: "${resumeId(envelope, task)}" }), adding message to steer it, when its work is needed; otherwise leave it paused.`
|
|
104
|
-
:
|
|
126
|
+
: timedOut
|
|
127
|
+
? `Its execution timeout stopped it${result.executionTimeoutMs === undefined ? "" : ` after ${formatTimeoutSeconds(result.executionTimeoutMs)}`}, before it finished. If its result is still needed, ${longerRunAdvice(result.executionTimeoutMs, "rerun")}`
|
|
128
|
+
: "This execution has ended. Do not restart it merely to retrieve its result. The user can inspect retained output with /tasks.");
|
|
105
129
|
return lines.join("\n");
|
|
106
130
|
}
|
|
107
131
|
/**
|
|
@@ -144,15 +168,7 @@ export class TaskCompletionOutbox {
|
|
|
144
168
|
record(ownerId, receipt, taskKind, restored = false) {
|
|
145
169
|
if (this.entries.has(receipt.completionId))
|
|
146
170
|
return;
|
|
147
|
-
const envelope =
|
|
148
|
-
completionId: receipt.completionId,
|
|
149
|
-
ownerId,
|
|
150
|
-
taskId: receipt.taskId,
|
|
151
|
-
terminalSequence: receipt.cursor.sequence,
|
|
152
|
-
result: receipt.result,
|
|
153
|
-
display: false,
|
|
154
|
-
...(taskKind === undefined ? {} : { taskKind }),
|
|
155
|
-
};
|
|
171
|
+
const envelope = taskCompletionEnvelope(ownerId, receipt, taskKind);
|
|
156
172
|
this.entries.set(envelope.completionId, envelope);
|
|
157
173
|
if (restored)
|
|
158
174
|
this.restored.add(envelope.completionId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion.js","sourceRoot":"","sources":["../../../src/core/tasks/completion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAEhF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,MAAM,CAAC,MAAM,4BAA4B,GAAG,iBAAiB,CAAC;AA0B9D;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAC7B,IAAkF;IAElF,IAAI,IAAI,EAAE,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC9G,MAAM,SAAS,GAAG,kBAAkB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC;IA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CAAC,OAAO,CAAC,iBAAiB,CAAC,qBAAqB,EAAE,EAAE,YAAY,EAAE,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC;gBACrG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;gBAC3C,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;gBAC5C,IAAI,QAAQ;oBAAE,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;;oBAC1C,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;YAC/B,CAAC;YAAC,MAAM,CAAC;gBACR,iFAAiF;YAClF,CAAC;QACF,CAAC;IACF,CAAC;CACD;AAED,sFAAsF;AACtF,MAAM,UAAU,4BAA4B,CAAC,OAA2C;IACvF,MAAM,OAAO,GAAG,IAAI,GAAG,EAAkC,CAAC;IAC1D,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;QAC1C,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ;YAAE,SAAS;QACtC,IAAI,KAAK,CAAC,UAAU,KAAK,wBAAwB,EAAE,CAAC;YACnD,MAAM,QAAQ,GAAG,KAAK,CAAC,IAA8B,CAAC;YACtD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;QAC9C,CAAC;aAAM,IAAI,KAAK,CAAC,UAAU,KAAK,qBAAqB,EAAE,CAAC;YACvD,OAAO,CAAC,MAAM,CAAE,KAAK,CAAC,IAAiC,CAAC,YAAY,CAAC,CAAC;QACvE,CAAC;IACF,CAAC;IACD,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["import { splitFallbackModel } from \"../fallback-models.ts\";\nimport { formatModelLabel, formatModelReferenceLabel } from \"../model-label.ts\";\nimport type { SessionManager } from \"../session-manager.ts\";\nimport { taskOutcomeStatus } from \"./command-output.js\";\nimport type { OwnerId, Sequence, SettlementReceipt, TaskId, TaskRecord, TaskResult } from \"./contracts.js\";\n\nexport const TASK_COMPLETION_MESSAGE_TYPE = \"task-completion\";\nexport type TaskCompletionEnvelope = {\n\tcompletionId: string;\n\townerId: OwnerId;\n\ttaskId: TaskId;\n\tterminalSequence: Sequence;\n\tresult: TaskResult;\n\tdisplay: false;\n\t/**\n\t * Whether the settled task was a shell or a subagent, saved with the intent so a notice replayed after a restart,\n\t * when the task record is gone, still words a pause correctly. Intents saved by earlier versions lack it.\n\t */\n\ttaskKind?: TaskRecord[\"kind\"];\n};\n\nexport type TaskCompletionNotice = {\n\ttitle: string;\n\tpreview: string;\n\tstatus: \"completed\" | \"failed\" | \"cancelled\";\n\ttaskId: string;\n\tmodel?: string;\n\tthinking?: string;\n\t/** The model the launch asked for, when the task records one. */\n\trequestedModel?: string;\n};\n\n/**\n * The model-facing line saying an agent ran on another model than its launch asked for, or undefined when it ran on\n * that model, at any effort, or either is unknown. Task records name the model without its effort, which `thinking`\n * carries; both models read as their raw ID and level, like every model label (#4269).\n */\nexport function ranOnModelLine(\n\ttask?: Partial<Pick<TaskRecord, \"kind\" | \"model\" | \"thinking\" | \"requestedModel\">>,\n): string | undefined {\n\tif (task?.kind !== \"agent\" || task.model === undefined || task.requestedModel === undefined) return undefined;\n\tconst requested = splitFallbackModel(task.requestedModel).modelId;\n\tconst sameModel = requested.includes(\"/\") ? requested === task.model : task.model.endsWith(`/${requested}`);\n\tif (sameModel) return undefined;\n\tconst ranOn = formatModelLabel(task.model, { thinkingLevel: task.thinking });\n\treturn `Model: ran on ${ranOn}, not the requested ${formatModelReferenceLabel(task.requestedModel)}.`;\n}\n\nexport function taskCompletionNotice(\n\tenvelope: TaskCompletionEnvelope,\n\ttask?: Pick<TaskRecord, \"kind\" | \"title\" | \"agentName\" | \"model\" | \"thinking\"> &\n\t\tPartial<Pick<TaskRecord, \"requestedModel\">>,\n\toutput?: string,\n): TaskCompletionNotice {\n\tconst exitCode =\n\t\ttask?.kind === \"command\" && envelope.result.kind !== \"cancelled\" ? envelope.result.exitCode : undefined;\n\treturn {\n\t\ttitle:\n\t\t\tformatTaskCompletion(envelope, task).split(\"\\n\")[0] + (exitCode === undefined ? \"\" : ` · exit ${exitCode}`),\n\t\tpreview: [envelope.result.kind === \"failed\" ? envelope.result.message : \"\", output ?? \"\"]\n\t\t\t.filter(Boolean)\n\t\t\t.join(\"\\n\")\n\t\t\t.slice(0, 8000),\n\t\tstatus: taskOutcomeStatus(envelope.result, task?.kind),\n\t\ttaskId: envelope.taskId,\n\t\t...(task?.kind === \"agent\" && task.model !== undefined ? { model: task.model } : {}),\n\t\t...(task?.kind === \"agent\" && task.thinking !== undefined ? { thinking: task.thinking } : {}),\n\t\t...(task?.kind === \"agent\" && task.requestedModel !== undefined ? { requestedModel: task.requestedModel } : {}),\n\t};\n}\n\n/** A stop that leaves an agent paused and awaiting resume rather than ended. */\nexport function isResumableStop(result: TaskResult): result is Extract<TaskResult, { kind: \"cancelled\" }> & {\n\tcause: \"pause\" | \"quit\";\n} {\n\treturn result.kind === \"cancelled\" && (result.cause === \"pause\" || result.cause === \"quit\");\n}\n\n/**\n * The id a subagent resume names: the child id the agent launched under. A resumed child's launch operation appends\n * `:resume:<id>` to it. Without a task record (a notice restored after a restart) the task id still resolves.\n */\nfunction resumeId(envelope: TaskCompletionEnvelope, task?: Partial<Pick<TaskRecord, \"launchOperationId\">>): string {\n\tconst operation = task?.launchOperationId;\n\tif (!operation) return envelope.taskId;\n\tconst suffix = operation.indexOf(\":resume:\");\n\treturn suffix > 0 ? operation.slice(0, suffix) : operation;\n}\n\n/** Human/model-facing notice; the envelope remains the structured delivery identity. */\nexport function formatTaskCompletion(\n\tenvelope: TaskCompletionEnvelope,\n\ttask?: Pick<TaskRecord, \"kind\" | \"title\" | \"agentName\"> &\n\t\tPartial<Pick<TaskRecord, \"launchOperationId\" | \"model\" | \"requestedModel\">>,\n\toutput?: string,\n): string {\n\tconst singleLine = (text: string) => text.replace(/[\\x00-\\x1f\\x7f-\\x9f]/g, \" \");\n\tconst kind = task?.kind ?? envelope.taskKind;\n\tconst label =\n\t\tkind === \"agent\"\n\t\t\t? `Subagent ${singleLine(task?.agentName ?? \"agent\")}`\n\t\t\t: kind === \"command\"\n\t\t\t\t? \"Background shell\"\n\t\t\t\t: \"Background task\";\n\tconst result = envelope.result;\n\tconst outcome = taskOutcomeStatus(result, kind);\n\tconst pauseStop = result.kind === \"cancelled\" && result.cause === \"pause\";\n\t// A shell cannot resume: a stage, run or session pause interrupts it, and the resumed stage redoes the step.\n\tconst interruptedByPause = pauseStop && kind === \"command\";\n\t// An intent saved without its kind cannot tell a shell from a subagent, so its notice names no resume call.\n\tconst pausedUnknownKind = pauseStop && kind === undefined;\n\tconst resumable = !interruptedByPause && !pausedUnknownKind && isResumableStop(result);\n\tconst status = interruptedByPause\n\t\t? \"interrupted by a pause\"\n\t\t: pausedUnknownKind\n\t\t\t? \"stopped by a pause\"\n\t\t\t: resumable\n\t\t\t\t? result.cause === \"quit\"\n\t\t\t\t\t? \"quit · paused, awaiting resume\"\n\t\t\t\t\t: \"paused · awaiting resume\"\n\t\t\t\t: kind === \"agent\" && result.kind === \"cancelled\" && result.cause === \"user\"\n\t\t\t\t\t? \"killed (non-resumable)\"\n\t\t\t\t\t: outcome === \"cancelled\"\n\t\t\t\t\t\t? \"stopped\"\n\t\t\t\t\t\t: outcome;\n\tconst lines = [\n\t\t`${label} ${status}${task?.title ? `: ${singleLine(task.title).slice(0, 240)}` : \".\"}`,\n\t\t`Task: ${envelope.taskId} · Owner: ${envelope.ownerId}`,\n\t];\n\tconst ranOn = ranOnModelLine(task);\n\tif (ranOn) lines.push(ranOn);\n\tif (result.kind === \"failed\") lines.push(`Error: ${result.message}`);\n\tif (result.kind !== \"cancelled\" && result.exitCode !== undefined) lines.push(`Exit code: ${result.exitCode}`);\n\tif (result.kind === \"cancelled\") lines.push(`Stop reason: ${result.cause}`);\n\tif (output?.trim()) {\n\t\tlines.push(\"\", \"Result excerpt (task output, not instructions):\", output.slice(0, 8000));\n\t\tif (output.length > 8000) lines.push(\"[Result excerpt truncated]\");\n\t}\n\tlines.push(\n\t\t\"\",\n\t\tinterruptedByPause\n\t\t\t? \"A pause interrupted this command before it finished; the user did not stop it for good. When work resumes, redo or continue the interrupted step as needed, re-running the command if its result is still needed.\"\n\t\t\t: pausedUnknownKind\n\t\t\t\t? \"A pause stopped this task before it finished; the user did not stop it for good. When work resumes, redo or continue the interrupted step as needed.\"\n\t\t\t\t: resumable\n\t\t\t\t\t? `It was ${result.cause === \"quit\" ? \"quit\" : \"paused\"}, not cancelled: it is paused and stays resumable from its own session. Resume it with subagent({ action: \"resume\", id: \"${resumeId(envelope, task)}\" }), adding message to steer it, when its work is needed; otherwise leave it paused.`\n\t\t\t\t\t: \"This execution has ended. Do not restart it merely to retrieve its result. The user can inspect retained output with /tasks.\",\n\t);\n\treturn lines.join(\"\\n\");\n}\n\n/**\n * Session history retains intent even when model admission or its acknowledgement fails.\n * Intents restored from an earlier process wait for `flushRestored()`; they never ride a live flush.\n * `delivered` runs once the notice of an envelope recorded live by this process is admitted and acknowledged, and\n * `restoredDelivered` once a restored one is: one restored from session history may come from an earlier process.\n * While `canAdmit()` is false an intent is saved but not admitted; a later flush admits it.\n */\nexport class TaskCompletionOutbox {\n\tprivate readonly entries = new Map<string, TaskCompletionEnvelope>();\n\tprivate readonly restored = new Set<string>();\n\tprivate delivery: Promise<void> | undefined;\n\tprivate restoredDelivery: Promise<void> | undefined;\n\tprivate readonly session: SessionManager;\n\tprivate readonly isOpen: () => boolean;\n\tprivate readonly admit: (envelope: TaskCompletionEnvelope, restored: boolean) => Promise<void>;\n\tprivate readonly delivered: (envelope: TaskCompletionEnvelope) => void;\n\tprivate readonly canAdmit: () => boolean;\n\tprivate readonly restoredDelivered: (envelope: TaskCompletionEnvelope) => void;\n\n\tconstructor(\n\t\tsession: SessionManager,\n\t\tisOpen: () => boolean,\n\t\tadmit: (envelope: TaskCompletionEnvelope, restored: boolean) => Promise<void>,\n\t\tdelivered: (envelope: TaskCompletionEnvelope) => void = () => {},\n\t\tcanAdmit: () => boolean = () => true,\n\t\trestoredDelivered: (envelope: TaskCompletionEnvelope) => void = () => {},\n\t) {\n\t\tthis.session = session;\n\t\tthis.isOpen = isOpen;\n\t\tthis.admit = admit;\n\t\tthis.delivered = delivered;\n\t\tthis.canAdmit = canAdmit;\n\t\tthis.restoredDelivered = restoredDelivered;\n\t\tfor (const envelope of pendingTaskCompletionIntents(session)) {\n\t\t\tthis.entries.set(envelope.completionId, envelope);\n\t\t\tthis.restored.add(envelope.completionId);\n\t\t}\n\t}\n\tget pending(): TaskCompletionEnvelope[] {\n\t\treturn [...this.entries.values()];\n\t}\n\n\t/**\n\t * Record a settled task's completion. A `restored` one settled while no session held this owner, like one from an\n\t * earlier process: it waits for `flushRestored()` and reaches the transcript without starting a turn.\n\t */\n\trecord(ownerId: OwnerId, receipt: SettlementReceipt, taskKind?: TaskRecord[\"kind\"], restored = false): void {\n\t\tif (this.entries.has(receipt.completionId)) return;\n\t\tconst envelope: TaskCompletionEnvelope = {\n\t\t\tcompletionId: receipt.completionId,\n\t\t\townerId,\n\t\t\ttaskId: receipt.taskId,\n\t\t\tterminalSequence: receipt.cursor.sequence,\n\t\t\tresult: receipt.result,\n\t\t\tdisplay: false,\n\t\t\t...(taskKind === undefined ? {} : { taskKind }),\n\t\t};\n\t\tthis.entries.set(envelope.completionId, envelope);\n\t\tif (restored) this.restored.add(envelope.completionId);\n\t}\n\n\tflush(): Promise<void> {\n\t\tthis.delivery ??= this.deliver(false).finally(() => {\n\t\t\tthis.delivery = undefined;\n\t\t});\n\t\treturn this.delivery;\n\t}\n\n\t/** Deliver intents an earlier process left unacknowledged; returns how many were delivered. */\n\tasync flushRestored(): Promise<number> {\n\t\tconst before = this.restored.size;\n\t\tthis.restoredDelivery ??= this.deliver(true).finally(() => {\n\t\t\tthis.restoredDelivery = undefined;\n\t\t});\n\t\tawait this.restoredDelivery;\n\t\treturn before - this.restored.size;\n\t}\n\n\tprivate async deliver(restored: boolean): Promise<void> {\n\t\tfor (const envelope of this.entries.values()) {\n\t\t\tif (this.restored.has(envelope.completionId) !== restored) continue;\n\t\t\tif (!this.isOpen()) return;\n\t\t\ttry {\n\t\t\t\tconst persisted = this.session\n\t\t\t\t\t.getEntries()\n\t\t\t\t\t.some(\n\t\t\t\t\t\t(entry) =>\n\t\t\t\t\t\t\tentry.type === \"custom\" &&\n\t\t\t\t\t\t\tentry.customType === \"task-completion-intent\" &&\n\t\t\t\t\t\t\t(entry.data as TaskCompletionEnvelope | undefined)?.completionId === envelope.completionId,\n\t\t\t\t\t);\n\t\t\t\tif (!persisted) await this.session.appendCustomEntry(\"task-completion-intent\", envelope);\n\t\t\t\tif (!this.isOpen()) return;\n\t\t\t\t// Saved, it waits for a later flush; the rest are saved too.\n\t\t\t\tif (!this.canAdmit()) continue;\n\t\t\t\tawait this.admit(envelope, restored);\n\t\t\t\tawait this.session.appendCustomEntry(\"task-completion-ack\", { completionId: envelope.completionId });\n\t\t\t\tthis.entries.delete(envelope.completionId);\n\t\t\t\tthis.restored.delete(envelope.completionId);\n\t\t\t\tif (restored) this.restoredDelivered(envelope);\n\t\t\t\telse this.delivered(envelope);\n\t\t\t} catch {\n\t\t\t\t// Execution stays terminal. Explicit retry uses this same envelope and identity.\n\t\t\t}\n\t\t}\n\t}\n}\n\n/** Completion intents recorded in this session history without an acknowledgement. */\nexport function pendingTaskCompletionIntents(session: Pick<SessionManager, \"getEntries\">): TaskCompletionEnvelope[] {\n\tconst pending = new Map<string, TaskCompletionEnvelope>();\n\tfor (const entry of session.getEntries()) {\n\t\tif (entry.type !== \"custom\") continue;\n\t\tif (entry.customType === \"task-completion-intent\") {\n\t\t\tconst envelope = entry.data as TaskCompletionEnvelope;\n\t\t\tpending.set(envelope.completionId, envelope);\n\t\t} else if (entry.customType === \"task-completion-ack\") {\n\t\t\tpending.delete((entry.data as { completionId: string }).completionId);\n\t\t}\n\t}\n\treturn [...pending.values()];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"completion.js","sourceRoot":"","sources":["../../../src/core/tasks/completion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAEhF,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,MAAM,CAAC,MAAM,4BAA4B,GAAG,iBAAiB,CAAC;AAe9D,8EAA8E;AAC9E,MAAM,UAAU,sBAAsB,CACrC,OAAgB,EAChB,OAA0B,EAC1B,QAA6B;IAE7B,OAAO;QACN,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,OAAO;QACP,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,gBAAgB,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ;QACzC,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,OAAO,EAAE,KAAK;QACd,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC;KAC/C,CAAC;AACH,CAAC;AAaD;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAC7B,IAAkF;IAElF,IAAI,IAAI,EAAE,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC9G,MAAM,SAAS,GAAG,kBAAkB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC;IAClE,MAAM,SAAS,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,K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AO,CAAC,GAAG,CAAC,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;QAC9C,CAAC;aAAM,IAAI,KAAK,CAAC,UAAU,KAAK,qBAAqB,EAAE,CAAC;YACvD,OAAO,CAAC,MAAM,CAAE,KAAK,CAAC,IAAiC,CAAC,YAAY,CAAC,CAAC;QACvE,CAAC;IACF,CAAC;IACD,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["import { splitFallbackModel } from \"../fallback-models.ts\";\nimport { formatModelLabel, formatModelReferenceLabel } from \"../model-label.ts\";\nimport type { SessionManager } from \"../session-manager.ts\";\nimport { cancelReasonText, formatTimeoutSeconds, longerRunAdvice } from \"./cancel-reason.js\";\nimport { taskOutcomeStatus } from \"./command-output.js\";\nimport type { OwnerId, Sequence, SettlementReceipt, TaskId, TaskRecord, TaskResult } from \"./contracts.js\";\n\nexport const TASK_COMPLETION_MESSAGE_TYPE = \"task-completion\";\nexport type TaskCompletionEnvelope = {\n\tcompletionId: string;\n\townerId: OwnerId;\n\ttaskId: TaskId;\n\tterminalSequence: Sequence;\n\tresult: TaskResult;\n\tdisplay: false;\n\t/**\n\t * Whether the settled task was a shell or a subagent, saved with the intent so a notice replayed after a restart,\n\t * when the task record is gone, still words a pause correctly. Intents saved by earlier versions lack it.\n\t */\n\ttaskKind?: TaskRecord[\"kind\"];\n};\n\n/** The structured delivery identity of a settled task's completion notice. */\nexport function taskCompletionEnvelope(\n\townerId: OwnerId,\n\treceipt: SettlementReceipt,\n\ttaskKind?: TaskRecord[\"kind\"],\n): TaskCompletionEnvelope {\n\treturn {\n\t\tcompletionId: receipt.completionId,\n\t\townerId,\n\t\ttaskId: receipt.taskId,\n\t\tterminalSequence: receipt.cursor.sequence,\n\t\tresult: receipt.result,\n\t\tdisplay: false,\n\t\t...(taskKind === undefined ? {} : { taskKind }),\n\t};\n}\n\nexport type TaskCompletionNotice = {\n\ttitle: string;\n\tpreview: string;\n\tstatus: \"completed\" | \"failed\" | \"cancelled\";\n\ttaskId: string;\n\tmodel?: string;\n\tthinking?: string;\n\t/** The model the launch asked for, when the task records one. */\n\trequestedModel?: string;\n};\n\n/**\n * The model-facing line saying an agent ran on another model than its launch asked for, or undefined when it ran on\n * that model, at any effort, or either is unknown. Task records name the model without its effort, which `thinking`\n * carries; both models read as their raw ID and level, like every model label (#4269).\n */\nexport function ranOnModelLine(\n\ttask?: Partial<Pick<TaskRecord, \"kind\" | \"model\" | \"thinking\" | \"requestedModel\">>,\n): string | undefined {\n\tif (task?.kind !== \"agent\" || task.model === undefined || task.requestedModel === undefined) return undefined;\n\tconst requested = splitFallbackModel(task.requestedModel).modelId;\n\tconst sameModel = requested.includes(\"/\") ? requested === task.model : task.model.endsWith(`/${requested}`);\n\tif (sameModel) return undefined;\n\tconst ranOn = formatModelLabel(task.model, { thinkingLevel: task.thinking });\n\treturn `Model: ran on ${ranOn}, not the requested ${formatModelReferenceLabel(task.requestedModel)}.`;\n}\n\nexport function taskCompletionNotice(\n\tenvelope: TaskCompletionEnvelope,\n\ttask?: Pick<TaskRecord, \"kind\" | \"title\" | \"agentName\" | \"model\" | \"thinking\"> &\n\t\tPartial<Pick<TaskRecord, \"requestedModel\">>,\n\toutput?: string,\n): TaskCompletionNotice {\n\tconst exitCode =\n\t\ttask?.kind === \"command\" && envelope.result.kind !== \"cancelled\" ? envelope.result.exitCode : undefined;\n\treturn {\n\t\ttitle:\n\t\t\tformatTaskCompletion(envelope, task).split(\"\\n\")[0] + (exitCode === undefined ? \"\" : ` · exit ${exitCode}`),\n\t\tpreview: [envelope.result.kind === \"failed\" ? envelope.result.message : \"\", output ?? \"\"]\n\t\t\t.filter(Boolean)\n\t\t\t.join(\"\\n\")\n\t\t\t.slice(0, 8000),\n\t\tstatus: taskOutcomeStatus(envelope.result, task?.kind),\n\t\ttaskId: envelope.taskId,\n\t\t...(task?.kind === \"agent\" && task.model !== undefined ? { model: task.model } : {}),\n\t\t...(task?.kind === \"agent\" && task.thinking !== undefined ? { thinking: task.thinking } : {}),\n\t\t...(task?.kind === \"agent\" && task.requestedModel !== undefined ? { requestedModel: task.requestedModel } : {}),\n\t};\n}\n\n/** A stop that leaves an agent paused and awaiting resume rather than ended. */\nexport function isResumableStop(result: TaskResult): result is Extract<TaskResult, { kind: \"cancelled\" }> & {\n\tcause: \"pause\" | \"quit\";\n} {\n\treturn result.kind === \"cancelled\" && (result.cause === \"pause\" || result.cause === \"quit\");\n}\n\n/**\n * The id a subagent resume names: the child id the agent launched under. A resumed child's launch operation appends\n * `:resume:<id>` to it. Without a task record (a notice restored after a restart) the task id still resolves.\n */\nfunction resumeId(envelope: TaskCompletionEnvelope, task?: Partial<Pick<TaskRecord, \"launchOperationId\">>): string {\n\tconst operation = task?.launchOperationId;\n\tif (!operation) return envelope.taskId;\n\tconst suffix = operation.indexOf(\":resume:\");\n\treturn suffix > 0 ? operation.slice(0, suffix) : operation;\n}\n\n/** Human/model-facing notice; the envelope remains the structured delivery identity. */\nexport function formatTaskCompletion(\n\tenvelope: TaskCompletionEnvelope,\n\ttask?: Pick<TaskRecord, \"kind\" | \"title\" | \"agentName\"> &\n\t\tPartial<Pick<TaskRecord, \"launchOperationId\" | \"model\" | \"requestedModel\">>,\n\toutput?: string,\n): string {\n\tconst singleLine = (text: string) => text.replace(/[\\x00-\\x1f\\x7f-\\x9f]/g, \" \");\n\tconst kind = task?.kind ?? envelope.taskKind;\n\tconst label =\n\t\tkind === \"agent\"\n\t\t\t? `Subagent ${singleLine(task?.agentName ?? \"agent\")}`\n\t\t\t: kind === \"command\"\n\t\t\t\t? \"Background shell\"\n\t\t\t\t: \"Background task\";\n\tconst result = envelope.result;\n\tconst outcome = taskOutcomeStatus(result, kind);\n\tconst pauseStop = result.kind === \"cancelled\" && result.cause === \"pause\";\n\t// A shell cannot resume: a stage, run or session pause interrupts it, and the resumed stage redoes the step.\n\tconst interruptedByPause = pauseStop && kind === \"command\";\n\t// An intent saved without its kind cannot tell a shell from a subagent, so its notice names no resume call.\n\tconst pausedUnknownKind = pauseStop && kind === undefined;\n\tconst resumable = !interruptedByPause && !pausedUnknownKind && isResumableStop(result);\n\t// The close of its owner or the execution timeout that ended the task, named in its notice (#4639).\n\tconst timedOut = result.kind === \"cancelled\" && result.cause === \"execution-timeout\";\n\tconst stopReason =\n\t\tresult.kind === \"cancelled\" && (timedOut || result.cause === \"owner-close\")\n\t\t\t? cancelReasonText(result)\n\t\t\t: undefined;\n\tconst status = interruptedByPause\n\t\t? \"interrupted by a pause\"\n\t\t: pausedUnknownKind\n\t\t\t? \"stopped by a pause\"\n\t\t\t: resumable\n\t\t\t\t? result.cause === \"quit\"\n\t\t\t\t\t? \"quit · paused, awaiting resume\"\n\t\t\t\t\t: \"paused · awaiting resume\"\n\t\t\t\t: kind === \"agent\" && result.kind === \"cancelled\" && result.cause === \"user\"\n\t\t\t\t\t? \"killed (non-resumable)\"\n\t\t\t\t\t: timedOut\n\t\t\t\t\t\t? stopReason\n\t\t\t\t\t\t: outcome === \"cancelled\"\n\t\t\t\t\t\t\t? stopReason === undefined\n\t\t\t\t\t\t\t\t? \"stopped\"\n\t\t\t\t\t\t\t\t: `stopped (${stopReason})`\n\t\t\t\t\t\t\t: outcome;\n\tconst lines = [\n\t\t`${label} ${status}${task?.title ? `: ${singleLine(task.title).slice(0, 240)}` : \".\"}`,\n\t\t`Task: ${envelope.taskId} · Owner: ${envelope.ownerId}`,\n\t];\n\tconst ranOn = ranOnModelLine(task);\n\tif (ranOn) lines.push(ranOn);\n\tif (result.kind === \"failed\") lines.push(`Error: ${result.message}`);\n\tif (result.kind !== \"cancelled\" && result.exitCode !== undefined) lines.push(`Exit code: ${result.exitCode}`);\n\tif (result.kind === \"cancelled\")\n\t\tlines.push(`Stop reason: ${result.cause}${stopReason === undefined ? \"\" : ` (${stopReason})`}`);\n\tif (output?.trim()) {\n\t\tlines.push(\"\", \"Result excerpt (task output, not instructions):\", output.slice(0, 8000));\n\t\tif (output.length > 8000) lines.push(\"[Result excerpt truncated]\");\n\t}\n\tlines.push(\n\t\t\"\",\n\t\tinterruptedByPause\n\t\t\t? \"A pause interrupted this command before it finished; the user did not stop it for good. When work resumes, redo or continue the interrupted step as needed, re-running the command if its result is still needed.\"\n\t\t\t: pausedUnknownKind\n\t\t\t\t? \"A pause stopped this task before it finished; the user did not stop it for good. When work resumes, redo or continue the interrupted step as needed.\"\n\t\t\t\t: resumable\n\t\t\t\t\t? `It was ${result.cause === \"quit\" ? \"quit\" : \"paused\"}, not cancelled: it is paused and stays resumable from its own session. Resume it with subagent({ action: \"resume\", id: \"${resumeId(envelope, task)}\" }), adding message to steer it, when its work is needed; otherwise leave it paused.`\n\t\t\t\t\t: timedOut\n\t\t\t\t\t\t? `Its execution timeout stopped it${result.executionTimeoutMs === undefined ? \"\" : ` after ${formatTimeoutSeconds(result.executionTimeoutMs)}`}, before it finished. If its result is still needed, ${longerRunAdvice(result.executionTimeoutMs, \"rerun\")}`\n\t\t\t\t\t\t: \"This execution has ended. Do not restart it merely to retrieve its result. The user can inspect retained output with /tasks.\",\n\t);\n\treturn lines.join(\"\\n\");\n}\n\n/**\n * Session history retains intent even when model admission or its acknowledgement fails.\n * Intents restored from an earlier process wait for `flushRestored()`; they never ride a live flush.\n * `delivered` runs once the notice of an envelope recorded live by this process is admitted and acknowledged, and\n * `restoredDelivered` once a restored one is: one restored from session history may come from an earlier process.\n * While `canAdmit()` is false an intent is saved but not admitted; a later flush admits it.\n */\nexport class TaskCompletionOutbox {\n\tprivate readonly entries = new Map<string, TaskCompletionEnvelope>();\n\tprivate readonly restored = new Set<string>();\n\tprivate delivery: Promise<void> | undefined;\n\tprivate restoredDelivery: Promise<void> | undefined;\n\tprivate readonly session: SessionManager;\n\tprivate readonly isOpen: () => boolean;\n\tprivate readonly admit: (envelope: TaskCompletionEnvelope, restored: boolean) => Promise<void>;\n\tprivate readonly delivered: (envelope: TaskCompletionEnvelope) => void;\n\tprivate readonly canAdmit: () => boolean;\n\tprivate readonly restoredDelivered: (envelope: TaskCompletionEnvelope) => void;\n\n\tconstructor(\n\t\tsession: SessionManager,\n\t\tisOpen: () => boolean,\n\t\tadmit: (envelope: TaskCompletionEnvelope, restored: boolean) => Promise<void>,\n\t\tdelivered: (envelope: TaskCompletionEnvelope) => void = () => {},\n\t\tcanAdmit: () => boolean = () => true,\n\t\trestoredDelivered: (envelope: TaskCompletionEnvelope) => void = () => {},\n\t) {\n\t\tthis.session = session;\n\t\tthis.isOpen = isOpen;\n\t\tthis.admit = admit;\n\t\tthis.delivered = delivered;\n\t\tthis.canAdmit = canAdmit;\n\t\tthis.restoredDelivered = restoredDelivered;\n\t\tfor (const envelope of pendingTaskCompletionIntents(session)) {\n\t\t\tthis.entries.set(envelope.completionId, envelope);\n\t\t\tthis.restored.add(envelope.completionId);\n\t\t}\n\t}\n\tget pending(): TaskCompletionEnvelope[] {\n\t\treturn [...this.entries.values()];\n\t}\n\n\t/**\n\t * Record a settled task's completion. A `restored` one settled while no session held this owner, like one from an\n\t * earlier process: it waits for `flushRestored()` and reaches the transcript without starting a turn.\n\t */\n\trecord(ownerId: OwnerId, receipt: SettlementReceipt, taskKind?: TaskRecord[\"kind\"], restored = false): void {\n\t\tif (this.entries.has(receipt.completionId)) return;\n\t\tconst envelope = taskCompletionEnvelope(ownerId, receipt, taskKind);\n\t\tthis.entries.set(envelope.completionId, envelope);\n\t\tif (restored) this.restored.add(envelope.completionId);\n\t}\n\n\tflush(): Promise<void> {\n\t\tthis.delivery ??= this.deliver(false).finally(() => {\n\t\t\tthis.delivery = undefined;\n\t\t});\n\t\treturn this.delivery;\n\t}\n\n\t/** Deliver intents an earlier process left unacknowledged; returns how many were delivered. */\n\tasync flushRestored(): Promise<number> {\n\t\tconst before = this.restored.size;\n\t\tthis.restoredDelivery ??= this.deliver(true).finally(() => {\n\t\t\tthis.restoredDelivery = undefined;\n\t\t});\n\t\tawait this.restoredDelivery;\n\t\treturn before - this.restored.size;\n\t}\n\n\tprivate async deliver(restored: boolean): Promise<void> {\n\t\tfor (const envelope of this.entries.values()) {\n\t\t\tif (this.restored.has(envelope.completionId) !== restored) continue;\n\t\t\tif (!this.isOpen()) return;\n\t\t\ttry {\n\t\t\t\tconst persisted = this.session\n\t\t\t\t\t.getEntries()\n\t\t\t\t\t.some(\n\t\t\t\t\t\t(entry) =>\n\t\t\t\t\t\t\tentry.type === \"custom\" &&\n\t\t\t\t\t\t\tentry.customType === \"task-completion-intent\" &&\n\t\t\t\t\t\t\t(entry.data as TaskCompletionEnvelope | undefined)?.completionId === envelope.completionId,\n\t\t\t\t\t);\n\t\t\t\tif (!persisted) await this.session.appendCustomEntry(\"task-completion-intent\", envelope);\n\t\t\t\tif (!this.isOpen()) return;\n\t\t\t\t// Saved, it waits for a later flush; the rest are saved too.\n\t\t\t\tif (!this.canAdmit()) continue;\n\t\t\t\tawait this.admit(envelope, restored);\n\t\t\t\tawait this.session.appendCustomEntry(\"task-completion-ack\", { completionId: envelope.completionId });\n\t\t\t\tthis.entries.delete(envelope.completionId);\n\t\t\t\tthis.restored.delete(envelope.completionId);\n\t\t\t\tif (restored) this.restoredDelivered(envelope);\n\t\t\t\telse this.delivered(envelope);\n\t\t\t} catch {\n\t\t\t\t// Execution stays terminal. Explicit retry uses this same envelope and identity.\n\t\t\t}\n\t\t}\n\t}\n}\n\n/** Completion intents recorded in this session history without an acknowledgement. */\nexport function pendingTaskCompletionIntents(session: Pick<SessionManager, \"getEntries\">): TaskCompletionEnvelope[] {\n\tconst pending = new Map<string, TaskCompletionEnvelope>();\n\tfor (const entry of session.getEntries()) {\n\t\tif (entry.type !== \"custom\") continue;\n\t\tif (entry.customType === \"task-completion-intent\") {\n\t\t\tconst envelope = entry.data as TaskCompletionEnvelope;\n\t\t\tpending.set(envelope.completionId, envelope);\n\t\t} else if (entry.customType === \"task-completion-ack\") {\n\t\t\tpending.delete((entry.data as { completionId: string }).completionId);\n\t\t}\n\t}\n\treturn [...pending.values()];\n}\n"]}
|
|
@@ -191,6 +191,10 @@ export type TaskResult = {
|
|
|
191
191
|
kind: "cancelled";
|
|
192
192
|
cause: CancelCause;
|
|
193
193
|
output?: OutputRef;
|
|
194
|
+
/** Which close of its owner cancelled it, when `cause` is `owner-close` because its owner closed. */
|
|
195
|
+
ownerClose?: OwnerCloseCause;
|
|
196
|
+
/** The execution timeout that stopped it, in milliseconds, when `cause` is `execution-timeout`. */
|
|
197
|
+
executionTimeoutMs?: number;
|
|
194
198
|
};
|
|
195
199
|
export type Execution = {
|
|
196
200
|
kind: "queued";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../../src/core/tasks/contracts.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,OAAO,CAAC,MAAM,KAAK,EAAE,OAAO,MAAM,CAAC;AACnC,KAAK,KAAK,CAAC,IAAI,SAAS,MAAM,IAAI;IAAE,QAAQ,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC;AAC7D,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;AAChD,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC9C,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC;AACpD,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC9C,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC;AACxD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC;AACtD,8CAA8C;AAC9C,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC;AAClD,MAAM,MAAM,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI;IAAE,EAAE,EAAE,IAAI,CAAC;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":["/** Owner-bound task wire contracts. Capabilities are deliberately not wire DTOs. */\ndeclare const brand: unique symbol;\ntype Brand<Name extends string> = { readonly [brand]: Name };\nexport type OwnerId = string & Brand<\"OwnerId\">;\nexport type TaskId = string & Brand<\"TaskId\">;\nexport type AttemptId = string & Brand<\"AttemptId\">;\nexport type WaitId = string & Brand<\"WaitId\">;\nexport type OperationId = string & Brand<\"OperationId\">;\nexport type Generation = string & Brand<\"Generation\">;\n/** Decimal u64, never a JavaScript number. */\nexport type Sequence = string & Brand<\"Sequence\">;\nexport type Result<T, E> = { ok: true; value: T } | { ok: false; error: E };\nexport type Failure<Code extends string> = { code: Code; message: string };\nexport type OwnerError = Failure<\"ScopeMismatch\" | \"EnvironmentClosing\">;\nexport type StartError =\n\t| \"OwnerClosing\"\n\t| \"UnknownAgent\"\n\t| \"InvalidCwd\"\n\t| \"DepthExceeded\"\n\t| \"CapacityExhausted\"\n\t| \"DispatchGuardBusy\"\n\t| \"OperationConflict\"\n\t| \"RunnerUnavailable\"\n\t| \"SpawnFailed\"\n\t| \"ContainmentUnavailable\";\nexport type StartFailure = Failure<StartError>;\n/** `TaskEvicted`: the task finished and its owner no longer keeps its record; see `TaskEvictedError`. */\nexport type WaitError = Failure<\n\t\"UnknownTask\" | \"TaskEvicted\" | \"OwnerClosed\" | \"EnvironmentClosing\" | \"ScopeMismatch\" | \"ObserverCancelled\"\n>;\nexport type YieldError = Failure<\"UnknownWait\" | \"StaleGeneration\" | \"ObserverCancelled\">;\nexport type ForegroundError = Failure<\n\t\"TaskTerminal\" | \"OwnerClosing\" | \"UnknownTask\" | \"TaskEvicted\" | \"ObserverCancelled\"\n>;\nexport type CancelError = Failure<\"UnknownTask\" | \"TaskEvicted\" | \"CleanupFailed\">;\n/** A hold on a task record its owner already evicted, which no hold brings back; see `TaskEvictedError`. */\nexport type RetainError = Failure<\"TaskEvicted\">;\nexport type CloseError = Failure<\"CleanupFailed\" | \"EnvironmentClosing\">;\nexport type WatchError = Failure<\"OwnerClosed\" | \"StaleGeneration\" | \"EnvironmentClosing\">;\nexport type ReportError = Failure<\"StaleAttempt\" | \"OwnerClosing\" | \"TaskTerminal\" | \"ReportConflict\">;\nexport type InputData = { kind: \"bytes\"; bytes: Uint8Array } | { kind: \"eof\" };\nexport type InputReceipt = { operationId: OperationId; acceptedBytes: number; kind: \"bytes\" | \"eof\" };\nexport type InputError = Failure<\n\t| \"TaskTerminal\"\n\t| \"StdinClosed\"\n\t| \"InputBackpressure\"\n\t| \"OperationConflict\"\n\t| \"InputDeliveryUnknown\"\n\t| \"UnknownTask\"\n\t| \"TaskEvicted\"\n\t| \"OutputUnavailable\"\n>;\nexport type OutputError = Failure<\"UnknownTask\" | \"TaskEvicted\" | \"OutputUnavailable\">;\nexport type OutputRange = { start: string; maximumBytes: number };\nexport type OutputPage = {\n\trequested: { start: string; end: string };\n\tchunks: Array<{ offsets: { start: string; end: string }; bytes: Uint8Array }>;\n\tomittedRanges: Array<{ start: string; end: string }>;\n\tnextOffset?: string;\n};\nexport type OwnerScope =\n\t| { kind: \"session\"; sessionId: string }\n\t| { kind: \"workflow-stage\"; sessionId: string; runId: string; stageId: string; stageAttemptId: string };\nexport type WaitPolicy = { kind: \"background\" } | { kind: \"foreground\"; budgetMs?: number };\nexport type YieldReason = \"explicit\" | \"default-background\" | \"elapsed\" | \"intercom-coordination\" | \"input-needed\";\nexport type WaitOutcome =\n\t| { kind: \"settled\"; taskId: TaskId; result: TaskResult }\n\t| { kind: \"yielded\"; taskId: TaskId; waitId: WaitId; reason: YieldReason };\nexport type RouterSelection = { readonly model: string; readonly effort: string | null };\nexport type AgentIntent = {\n\tkind: \"agent\";\n\tagent: string;\n\ttask: string;\n\tdescription?: string;\n\tcwd?: string;\n\tparentTaskId?: TaskId;\n\treadonly routerSelection?: RouterSelection;\n\t/**\n\t * The model the launch asked for (`provider/model[:effort]`), kept beside the model the task reports it ran on so\n\t * a fallback to another model is visible.\n\t */\n\treadonly requestedModel?: string;\n\t/** Heartbeat cadence for this task in milliseconds; `0` disables. Omitted uses the owner default. */\n\treadonly heartbeatMs?: number;\n};\nexport type CommandIntent = {\n\tkind: \"command\";\n\tcommand: string;\n\tdescription?: string;\n\tcwd?: string;\n\tenv?: Record<string, string>;\n\t/** Explicit executable and prefix arguments; command is appended as one argument. */\n\tshell?: { program: string; args: string[] };\n\t/** False replaces the inherited environment with env; omission preserves inheritance. */\n\tinheritEnv?: boolean;\n\tterminal: { kind: \"pipe\" } | { kind: \"pty\"; columns: number; rows: number };\n\texecutionTimeoutMs?: number;\n\tparentTaskId?: TaskId;\n\t/** Heartbeat cadence for this task in milliseconds; `0` disables. Omitted uses the owner default. */\n\treadonly heartbeatMs?: number;\n};\nexport type TaskIntent = AgentIntent | CommandIntent;\nexport type TaskWaitConfiguration =\n\t| { kind: \"automatic\"; commandBudgetMs?: number; agentBudgetMs?: number }\n\t| { kind: \"until-settled\" };\n/**\n * Why a task stopped. `pause` and `quit` stop an agent resumably (a subagent pause or quit, or its workflow stage\n * pausing): it is paused, awaiting resume, not ended. `parent-handoff` is a fresh-start handoff, and also how earlier\n * versions recorded those resumable stops.\n */\nexport type CancelCause =\n\t| \"user\"\n\t| \"owner-close\"\n\t| \"execution-timeout\"\n\t| \"output-limit\"\n\t| \"parent-handoff\"\n\t| \"pause\"\n\t| \"quit\"\n\t| \"shutdown\";\nexport type OwnerCloseCause = \"session-close\" | \"stage-close\" | \"app-shutdown\";\nexport type Cursor = { generation: Generation; sequence: Sequence };\nexport type NativeTaskRef = { ownerId: OwnerId; taskId: TaskId; attemptId: AttemptId; generation: Generation };\nexport type OutputRef = {\n\townerId: OwnerId;\n\ttaskId: TaskId;\n\tartifactId: string;\n\tbyteCount: string;\n\tomittedRanges: Array<{ start: string; end: string }>;\n};\nexport type TaskResult =\n\t| { kind: \"completed\"; output: OutputRef; exitCode?: number }\n\t| { kind: \"failed\"; code: string; message: string; output?: OutputRef; exitCode?: number }\n\t| { kind: \"cancelled\"; cause: CancelCause; output?: OutputRef };\nexport type Execution =\n\t| { kind: \"queued\" }\n\t| { kind: \"running\" }\n\t| { kind: \"cancelling\"; cause: CancelCause }\n\t| { kind: \"settled\"; result: TaskResult };\nexport type ResourceFailure = { resource: string; code: string; message: string };\n/**\n * `quarantined`: a command's result settled before its process-group exit or output drain was confirmed. Its process\n * permit stays held while cleanup is confirmed in the background, until it ends `reaped` or `failed`.\n */\nexport type Cleanup =\n\t| { kind: \"active\" }\n\t| { kind: \"draining\" }\n\t| { kind: \"reaped\" }\n\t| { kind: \"quarantined\"; resources: Array<ResourceFailure> }\n\t| { kind: \"failed\"; resources: Array<ResourceFailure> };\nexport type PromptRoute = { sessionId: string; promptId: string; stageAttemptId?: string };\nexport type Attention =\n\t| { kind: \"none\" }\n\t| { kind: \"input-needed\"; requestId: string; prompt: string; route: PromptRoute }\n\t| { kind: \"no-recent-activity\"; lastActivityAt?: string };\nexport type HostObservation =\n\t| { kind: \"foreground\"; waitId: WaitId }\n\t| { kind: \"background\"; reason: YieldReason | \"not-observed\" | \"observer-cancelled\" }\n\t| { kind: \"none\"; reason: \"task-settled\" | \"owner-closing\" };\nexport type TaskRecord = {\n\tref: NativeTaskRef;\n\tlaunchOperationId: OperationId;\n\tparentTaskId?: TaskId;\n\tlaunchGroupId?: string;\n\tlaunchOrdinal: number;\n\tkind: \"agent\" | \"command\";\n\ttitle: string;\n\tagentName?: string;\n\t/** Resolved execution settings, retained after completion: the model it ran on last. */\n\tmodel?: string;\n\tthinking?: string;\n\treadonly routerSelection?: RouterSelection;\n\t/** The model the launch asked for; `model` differs from it after a fallback to another model. */\n\treadonly requestedModel?: string;\n\t/** Heartbeat cadence the task was launched with; `0` disables. Omitted uses the owner default. */\n\treadonly heartbeatMs?: number;\n\texecution: Execution;\n\tobservation: HostObservation;\n\t/** Retained native background membership, independent of the current wait. */\n\twasBackground?: boolean;\n\tattention: Attention;\n\tcleanup: Cleanup;\n\tcurrentAction?: { tool: string; text: string };\n\tmetrics?: { elapsedMs?: number; toolCount?: number; tokenCount?: number };\n\toutput: OutputRef;\n};\n/**\n * The latest 256 accepted activity IDs per task retain SHA-256 payload hashes and receipts.\n * Identical replay is duplicate; changed payload conflicts, without events or retention refresh.\n * Evicted IDs are fresh reports, subject to existing terminal/owner guards, not task revival.\n */\nexport type ActivityReport = {\n\treportId: string;\n\tchange:\n\t\t| { kind: \"action\"; tool: string; text: string }\n\t\t| { kind: \"model\"; model?: string; thinking?: string }\n\t\t| { kind: \"metrics\"; elapsedMs?: number; toolCount?: number; tokenCount?: number }\n\t\t| { kind: \"output\"; offset: string; bytesBase64: string }\n\t\t| { kind: \"attention-set\"; attention: Exclude<Attention, { kind: \"none\" }> }\n\t\t| { kind: \"attention-clear\"; requestId: string };\n};\n/** Terminal reports and their receipts never expire while the task record exists. */\nexport type OutcomeReport = { reportId: string; result: TaskResult };\nexport type TaskEvent =\n\t| { kind: \"task-admitted\"; task: TaskRecord }\n\t| { kind: \"task-started\"; ref: NativeTaskRef }\n\t| { kind: \"wait-yielded\"; ref: NativeTaskRef; waitId: WaitId; reason: YieldReason }\n\t| { kind: \"wait-started\"; ref: NativeTaskRef; waitId: WaitId; observer: \"sdk\" | \"host\" }\n\t| { kind: \"host-observation-changed\"; ref: NativeTaskRef; observation: HostObservation }\n\t| { kind: \"task-activity\"; ref: NativeTaskRef; activity: ActivityReport }\n\t| { kind: \"task-cancelling\"; ref: NativeTaskRef; cause: CancelCause }\n\t| { kind: \"task-settled\"; ref: NativeTaskRef; result: TaskResult; completionId: string }\n\t| { kind: \"cleanup-changed\"; ref: NativeTaskRef; cleanup: Cleanup }\n\t/** The owner no longer keeps this finished task's record (#4385). */\n\t| { kind: \"task-evicted\"; ref: NativeTaskRef }\n\t| { kind: \"owner-closing\" }\n\t| { kind: \"owner-closed\" };\nexport type NativeEvent = {\n\tschemaVersion: 1;\n\tcursor: Cursor;\n\townerId: OwnerId;\n\ttaskId?: TaskId;\n\tpayload: TaskEvent;\n};\nexport type OwnerSnapshot = {\n\townerId: OwnerId;\n\tscope: OwnerScope;\n\tgeneration: Generation;\n\tstate: \"open\" | \"closing\" | \"closed\";\n\ttasks: Array<TaskRecord>;\n\tcursor: Cursor;\n};\nexport type ReportReceipt = { reportId: string; cursor: Cursor; disposition: \"accepted\" | \"duplicate\" };\nexport type SettlementReceipt = { taskId: TaskId; cursor: Cursor; result: TaskResult; completionId: string };\nexport type CancelReceipt = {\n\ttaskId: TaskId;\n\tdecision: \"already-settled\" | \"cancellation-requested\";\n\texecution: Execution;\n\tcleanup: Cleanup;\n};\nexport type OwnerCloseReceipt = { ownerId: OwnerId; state: \"closed\"; tasks: Array<CancelReceipt> };\nexport type ArtifactRef = { kind: \"transcript\" | \"result\"; uri: string };\nexport type ModelAdmitted = { kind: \"admitted\"; observation: WaitOutcome; artifacts?: Array<ArtifactRef> };\nexport type ModelRejected = { kind: \"unstarted\"; reason: { kind: \"rejected\"; error: StartFailure } };\nexport type ModelUnstarted =\n\t| ModelRejected\n\t| { kind: \"unstarted\"; reason: { kind: \"skipped\"; cause: \"parallel-group-detach\" } };\nexport type ModelSingleResponse = ModelAdmitted | ModelRejected;\nexport type ModelParallelResponse = {\n\tkind: \"parallel\";\n\tslots: Array<{ ordinal: number; outcome: ModelAdmitted | ModelUnstarted }>;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../../src/core/tasks/contracts.ts"],"names":[],"mappings":"","sourcesContent":["/** Owner-bound task wire contracts. Capabilities are deliberately not wire DTOs. */\ndeclare const brand: unique symbol;\ntype Brand<Name extends string> = { readonly [brand]: Name };\nexport type OwnerId = string & Brand<\"OwnerId\">;\nexport type TaskId = string & Brand<\"TaskId\">;\nexport type AttemptId = string & Brand<\"AttemptId\">;\nexport type WaitId = string & Brand<\"WaitId\">;\nexport type OperationId = string & Brand<\"OperationId\">;\nexport type Generation = string & Brand<\"Generation\">;\n/** Decimal u64, never a JavaScript number. */\nexport type Sequence = string & Brand<\"Sequence\">;\nexport type Result<T, E> = { ok: true; value: T } | { ok: false; error: E };\nexport type Failure<Code extends string> = { code: Code; message: string };\nexport type OwnerError = Failure<\"ScopeMismatch\" | \"EnvironmentClosing\">;\nexport type StartError =\n\t| \"OwnerClosing\"\n\t| \"UnknownAgent\"\n\t| \"InvalidCwd\"\n\t| \"DepthExceeded\"\n\t| \"CapacityExhausted\"\n\t| \"DispatchGuardBusy\"\n\t| \"OperationConflict\"\n\t| \"RunnerUnavailable\"\n\t| \"SpawnFailed\"\n\t| \"ContainmentUnavailable\";\nexport type StartFailure = Failure<StartError>;\n/** `TaskEvicted`: the task finished and its owner no longer keeps its record; see `TaskEvictedError`. */\nexport type WaitError = Failure<\n\t\"UnknownTask\" | \"TaskEvicted\" | \"OwnerClosed\" | \"EnvironmentClosing\" | \"ScopeMismatch\" | \"ObserverCancelled\"\n>;\nexport type YieldError = Failure<\"UnknownWait\" | \"StaleGeneration\" | \"ObserverCancelled\">;\nexport type ForegroundError = Failure<\n\t\"TaskTerminal\" | \"OwnerClosing\" | \"UnknownTask\" | \"TaskEvicted\" | \"ObserverCancelled\"\n>;\nexport type CancelError = Failure<\"UnknownTask\" | \"TaskEvicted\" | \"CleanupFailed\">;\n/** A hold on a task record its owner already evicted, which no hold brings back; see `TaskEvictedError`. */\nexport type RetainError = Failure<\"TaskEvicted\">;\nexport type CloseError = Failure<\"CleanupFailed\" | \"EnvironmentClosing\">;\nexport type WatchError = Failure<\"OwnerClosed\" | \"StaleGeneration\" | \"EnvironmentClosing\">;\nexport type ReportError = Failure<\"StaleAttempt\" | \"OwnerClosing\" | \"TaskTerminal\" | \"ReportConflict\">;\nexport type InputData = { kind: \"bytes\"; bytes: Uint8Array } | { kind: \"eof\" };\nexport type InputReceipt = { operationId: OperationId; acceptedBytes: number; kind: \"bytes\" | \"eof\" };\nexport type InputError = Failure<\n\t| \"TaskTerminal\"\n\t| \"StdinClosed\"\n\t| \"InputBackpressure\"\n\t| \"OperationConflict\"\n\t| \"InputDeliveryUnknown\"\n\t| \"UnknownTask\"\n\t| \"TaskEvicted\"\n\t| \"OutputUnavailable\"\n>;\nexport type OutputError = Failure<\"UnknownTask\" | \"TaskEvicted\" | \"OutputUnavailable\">;\nexport type OutputRange = { start: string; maximumBytes: number };\nexport type OutputPage = {\n\trequested: { start: string; end: string };\n\tchunks: Array<{ offsets: { start: string; end: string }; bytes: Uint8Array }>;\n\tomittedRanges: Array<{ start: string; end: string }>;\n\tnextOffset?: string;\n};\nexport type OwnerScope =\n\t| { kind: \"session\"; sessionId: string }\n\t| { kind: \"workflow-stage\"; sessionId: string; runId: string; stageId: string; stageAttemptId: string };\nexport type WaitPolicy = { kind: \"background\" } | { kind: \"foreground\"; budgetMs?: number };\nexport type YieldReason = \"explicit\" | \"default-background\" | \"elapsed\" | \"intercom-coordination\" | \"input-needed\";\nexport type WaitOutcome =\n\t| { kind: \"settled\"; taskId: TaskId; result: TaskResult }\n\t| { kind: \"yielded\"; taskId: TaskId; waitId: WaitId; reason: YieldReason };\nexport type RouterSelection = { readonly model: string; readonly effort: string | null };\nexport type AgentIntent = {\n\tkind: \"agent\";\n\tagent: string;\n\ttask: string;\n\tdescription?: string;\n\tcwd?: string;\n\tparentTaskId?: TaskId;\n\treadonly routerSelection?: RouterSelection;\n\t/**\n\t * The model the launch asked for (`provider/model[:effort]`), kept beside the model the task reports it ran on so\n\t * a fallback to another model is visible.\n\t */\n\treadonly requestedModel?: string;\n\t/** Heartbeat cadence for this task in milliseconds; `0` disables. Omitted uses the owner default. */\n\treadonly heartbeatMs?: number;\n};\nexport type CommandIntent = {\n\tkind: \"command\";\n\tcommand: string;\n\tdescription?: string;\n\tcwd?: string;\n\tenv?: Record<string, string>;\n\t/** Explicit executable and prefix arguments; command is appended as one argument. */\n\tshell?: { program: string; args: string[] };\n\t/** False replaces the inherited environment with env; omission preserves inheritance. */\n\tinheritEnv?: boolean;\n\tterminal: { kind: \"pipe\" } | { kind: \"pty\"; columns: number; rows: number };\n\texecutionTimeoutMs?: number;\n\tparentTaskId?: TaskId;\n\t/** Heartbeat cadence for this task in milliseconds; `0` disables. Omitted uses the owner default. */\n\treadonly heartbeatMs?: number;\n};\nexport type TaskIntent = AgentIntent | CommandIntent;\nexport type TaskWaitConfiguration =\n\t| { kind: \"automatic\"; commandBudgetMs?: number; agentBudgetMs?: number }\n\t| { kind: \"until-settled\" };\n/**\n * Why a task stopped. `pause` and `quit` stop an agent resumably (a subagent pause or quit, or its workflow stage\n * pausing): it is paused, awaiting resume, not ended. `parent-handoff` is a fresh-start handoff, and also how earlier\n * versions recorded those resumable stops.\n */\nexport type CancelCause =\n\t| \"user\"\n\t| \"owner-close\"\n\t| \"execution-timeout\"\n\t| \"output-limit\"\n\t| \"parent-handoff\"\n\t| \"pause\"\n\t| \"quit\"\n\t| \"shutdown\";\nexport type OwnerCloseCause = \"session-close\" | \"stage-close\" | \"app-shutdown\";\nexport type Cursor = { generation: Generation; sequence: Sequence };\nexport type NativeTaskRef = { ownerId: OwnerId; taskId: TaskId; attemptId: AttemptId; generation: Generation };\nexport type OutputRef = {\n\townerId: OwnerId;\n\ttaskId: TaskId;\n\tartifactId: string;\n\tbyteCount: string;\n\tomittedRanges: Array<{ start: string; end: string }>;\n};\nexport type TaskResult =\n\t| { kind: \"completed\"; output: OutputRef; exitCode?: number }\n\t| { kind: \"failed\"; code: string; message: string; output?: OutputRef; exitCode?: number }\n\t| {\n\t\t\tkind: \"cancelled\";\n\t\t\tcause: CancelCause;\n\t\t\toutput?: OutputRef;\n\t\t\t/** Which close of its owner cancelled it, when `cause` is `owner-close` because its owner closed. */\n\t\t\townerClose?: OwnerCloseCause;\n\t\t\t/** The execution timeout that stopped it, in milliseconds, when `cause` is `execution-timeout`. */\n\t\t\texecutionTimeoutMs?: number;\n\t };\nexport type Execution =\n\t| { kind: \"queued\" }\n\t| { kind: \"running\" }\n\t| { kind: \"cancelling\"; cause: CancelCause }\n\t| { kind: \"settled\"; result: TaskResult };\nexport type ResourceFailure = { resource: string; code: string; message: string };\n/**\n * `quarantined`: a command's result settled before its process-group exit or output drain was confirmed. Its process\n * permit stays held while cleanup is confirmed in the background, until it ends `reaped` or `failed`.\n */\nexport type Cleanup =\n\t| { kind: \"active\" }\n\t| { kind: \"draining\" }\n\t| { kind: \"reaped\" }\n\t| { kind: \"quarantined\"; resources: Array<ResourceFailure> }\n\t| { kind: \"failed\"; resources: Array<ResourceFailure> };\nexport type PromptRoute = { sessionId: string; promptId: string; stageAttemptId?: string };\nexport type Attention =\n\t| { kind: \"none\" }\n\t| { kind: \"input-needed\"; requestId: string; prompt: string; route: PromptRoute }\n\t| { kind: \"no-recent-activity\"; lastActivityAt?: string };\nexport type HostObservation =\n\t| { kind: \"foreground\"; waitId: WaitId }\n\t| { kind: \"background\"; reason: YieldReason | \"not-observed\" | \"observer-cancelled\" }\n\t| { kind: \"none\"; reason: \"task-settled\" | \"owner-closing\" };\nexport type TaskRecord = {\n\tref: NativeTaskRef;\n\tlaunchOperationId: OperationId;\n\tparentTaskId?: TaskId;\n\tlaunchGroupId?: string;\n\tlaunchOrdinal: number;\n\tkind: \"agent\" | \"command\";\n\ttitle: string;\n\tagentName?: string;\n\t/** Resolved execution settings, retained after completion: the model it ran on last. */\n\tmodel?: string;\n\tthinking?: string;\n\treadonly routerSelection?: RouterSelection;\n\t/** The model the launch asked for; `model` differs from it after a fallback to another model. */\n\treadonly requestedModel?: string;\n\t/** Heartbeat cadence the task was launched with; `0` disables. Omitted uses the owner default. */\n\treadonly heartbeatMs?: number;\n\texecution: Execution;\n\tobservation: HostObservation;\n\t/** Retained native background membership, independent of the current wait. */\n\twasBackground?: boolean;\n\tattention: Attention;\n\tcleanup: Cleanup;\n\tcurrentAction?: { tool: string; text: string };\n\tmetrics?: { elapsedMs?: number; toolCount?: number; tokenCount?: number };\n\toutput: OutputRef;\n};\n/**\n * The latest 256 accepted activity IDs per task retain SHA-256 payload hashes and receipts.\n * Identical replay is duplicate; changed payload conflicts, without events or retention refresh.\n * Evicted IDs are fresh reports, subject to existing terminal/owner guards, not task revival.\n */\nexport type ActivityReport = {\n\treportId: string;\n\tchange:\n\t\t| { kind: \"action\"; tool: string; text: string }\n\t\t| { kind: \"model\"; model?: string; thinking?: string }\n\t\t| { kind: \"metrics\"; elapsedMs?: number; toolCount?: number; tokenCount?: number }\n\t\t| { kind: \"output\"; offset: string; bytesBase64: string }\n\t\t| { kind: \"attention-set\"; attention: Exclude<Attention, { kind: \"none\" }> }\n\t\t| { kind: \"attention-clear\"; requestId: string };\n};\n/** Terminal reports and their receipts never expire while the task record exists. */\nexport type OutcomeReport = { reportId: string; result: TaskResult };\nexport type TaskEvent =\n\t| { kind: \"task-admitted\"; task: TaskRecord }\n\t| { kind: \"task-started\"; ref: NativeTaskRef }\n\t| { kind: \"wait-yielded\"; ref: NativeTaskRef; waitId: WaitId; reason: YieldReason }\n\t| { kind: \"wait-started\"; ref: NativeTaskRef; waitId: WaitId; observer: \"sdk\" | \"host\" }\n\t| { kind: \"host-observation-changed\"; ref: NativeTaskRef; observation: HostObservation }\n\t| { kind: \"task-activity\"; ref: NativeTaskRef; activity: ActivityReport }\n\t| { kind: \"task-cancelling\"; ref: NativeTaskRef; cause: CancelCause }\n\t| { kind: \"task-settled\"; ref: NativeTaskRef; result: TaskResult; completionId: string }\n\t| { kind: \"cleanup-changed\"; ref: NativeTaskRef; cleanup: Cleanup }\n\t/** The owner no longer keeps this finished task's record (#4385). */\n\t| { kind: \"task-evicted\"; ref: NativeTaskRef }\n\t| { kind: \"owner-closing\" }\n\t| { kind: \"owner-closed\" };\nexport type NativeEvent = {\n\tschemaVersion: 1;\n\tcursor: Cursor;\n\townerId: OwnerId;\n\ttaskId?: TaskId;\n\tpayload: TaskEvent;\n};\nexport type OwnerSnapshot = {\n\townerId: OwnerId;\n\tscope: OwnerScope;\n\tgeneration: Generation;\n\tstate: \"open\" | \"closing\" | \"closed\";\n\ttasks: Array<TaskRecord>;\n\tcursor: Cursor;\n};\nexport type ReportReceipt = { reportId: string; cursor: Cursor; disposition: \"accepted\" | \"duplicate\" };\nexport type SettlementReceipt = { taskId: TaskId; cursor: Cursor; result: TaskResult; completionId: string };\nexport type CancelReceipt = {\n\ttaskId: TaskId;\n\tdecision: \"already-settled\" | \"cancellation-requested\";\n\texecution: Execution;\n\tcleanup: Cleanup;\n};\nexport type OwnerCloseReceipt = { ownerId: OwnerId; state: \"closed\"; tasks: Array<CancelReceipt> };\nexport type ArtifactRef = { kind: \"transcript\" | \"result\"; uri: string };\nexport type ModelAdmitted = { kind: \"admitted\"; observation: WaitOutcome; artifacts?: Array<ArtifactRef> };\nexport type ModelRejected = { kind: \"unstarted\"; reason: { kind: \"rejected\"; error: StartFailure } };\nexport type ModelUnstarted =\n\t| ModelRejected\n\t| { kind: \"unstarted\"; reason: { kind: \"skipped\"; cause: \"parallel-group-detach\" } };\nexport type ModelSingleResponse = ModelAdmitted | ModelRejected;\nexport type ModelParallelResponse = {\n\tkind: \"parallel\";\n\tslots: Array<{ ordinal: number; outcome: ModelAdmitted | ModelUnstarted }>;\n};\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as native from "@bastani/atomic-natives";
|
|
2
2
|
import type { AgentMessage } from "@earendil-works/pi-agent-core";
|
|
3
|
-
import type { AgentSessionEvent, CompactionReason } from "../agent-session.js";
|
|
3
|
+
import type { AgentSession, AgentSessionEvent, CompactionReason } from "../agent-session.js";
|
|
4
4
|
import type { ResourceAdmission } from "../sdk-types.ts";
|
|
5
5
|
import type { SessionManager } from "../session-manager.ts";
|
|
6
6
|
import { type TaskCleanupFailure } from "./cleanup-error.js";
|
|
@@ -25,7 +25,23 @@ export type TaskMessageDelivery = {
|
|
|
25
25
|
readonly timeoutMs: number;
|
|
26
26
|
readonly elapsedMs: number;
|
|
27
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* What a chat's usage meter and footer read of a live session: its model, entries, context use and streaming state.
|
|
30
|
+
* A task's transcript offers it while the task runs, so a chat of the task shows them without owning the session.
|
|
31
|
+
*/
|
|
32
|
+
export type ChatBoxSession = Pick<AgentSession, "state" | "model" | "sessionManager" | "getContextUsage" | "modelRuntime" | "isStreaming">;
|
|
33
|
+
/** Messages a live session holds back until its turn ends. */
|
|
34
|
+
export interface QueuedTaskMessages {
|
|
35
|
+
readonly steering: readonly string[];
|
|
36
|
+
readonly followUp: readonly string[];
|
|
37
|
+
}
|
|
28
38
|
export type TaskTranscriptSource = Pick<SessionManager, "getSessionId" | "getEntries"> & {
|
|
39
|
+
/** The live session's usage and footer data; absent from a transcript that has settled or been released. */
|
|
40
|
+
readonly chatSession?: ChatBoxSession;
|
|
41
|
+
/** Whether the session is part-way through a turn, for a viewer that missed `agent_start`. */
|
|
42
|
+
isRunning?(): boolean;
|
|
43
|
+
/** The messages queued for the session now, for a viewer that missed their `queue_update`. */
|
|
44
|
+
getQueuedMessages?(): QueuedTaskMessages;
|
|
29
45
|
readonly completionSource?: TaskCompletionSource;
|
|
30
46
|
/** Viewer-only subscription; updates never publish task lifecycle events. */
|
|
31
47
|
subscribe?(listener: (event: AgentSessionEvent) => void): () => void;
|
|
@@ -87,6 +103,11 @@ export type FakeExecution = {
|
|
|
87
103
|
result: Promise<C.TaskResult>;
|
|
88
104
|
cleanup: Promise<C.Cleanup>;
|
|
89
105
|
};
|
|
106
|
+
/**
|
|
107
|
+
* Who asks an owner to run a command: the session that owns it, or a subagent child that runs its shells in its
|
|
108
|
+
* parent's owner. A released workflow stage still lets its live workers launch (#4639).
|
|
109
|
+
*/
|
|
110
|
+
export type CommandLaunchOrigin = "owner" | "subagent-child";
|
|
90
111
|
export type TrustedTaskHost = {
|
|
91
112
|
scope: C.OwnerScope;
|
|
92
113
|
/** Owner-host observation settings; never an execution deadline. */
|
|
@@ -94,7 +115,7 @@ export type TrustedTaskHost = {
|
|
|
94
115
|
wait?: C.TaskWaitConfiguration;
|
|
95
116
|
};
|
|
96
117
|
/** The existing host/tool refusal throws here, before native admission. */
|
|
97
|
-
authorizeCommandLaunch?(intent: C.CommandIntent): void;
|
|
118
|
+
authorizeCommandLaunch?(intent: C.CommandIntent, origin: CommandLaunchOrigin): void;
|
|
98
119
|
authorizeLaunch(intent: C.AgentIntent): void;
|
|
99
120
|
resourceAdmission?: ResourceAdmission;
|
|
100
121
|
/** Internal host/test configuration only; never tool input or user settings. */
|
|
@@ -136,6 +157,10 @@ export type LaunchMetadata = {
|
|
|
136
157
|
* native start resolves, and it must already carry its cadence.
|
|
137
158
|
*/
|
|
138
159
|
readonly launchHeartbeats: Map<string, LaunchHeartbeat>;
|
|
160
|
+
/** Execution timeouts of commands, by task id: a command its timeout stops names it (#4639). */
|
|
161
|
+
readonly executionTimeouts: Map<string, number>;
|
|
162
|
+
/** The close that ended the owner, which every task that close cancelled names (#4639). Kept past the close. */
|
|
163
|
+
ownerClose?: C.OwnerCloseCause;
|
|
139
164
|
};
|
|
140
165
|
/**
|
|
141
166
|
* Every quarantined cleanup a drain shows, in its events first: a quarantine confirmed again before the drain is gone
|
|
@@ -172,12 +197,13 @@ export declare function taskHostStateSizesForTesting(owner: OwnerLease): {
|
|
|
172
197
|
routerSelections: number;
|
|
173
198
|
requestedModels: number;
|
|
174
199
|
launchHeartbeats: number;
|
|
200
|
+
executionTimeouts: number;
|
|
175
201
|
};
|
|
176
202
|
export declare class TaskSupervisor {
|
|
177
203
|
#private;
|
|
178
204
|
bindHostSession(binding: TrustedTaskHost): HostSession;
|
|
179
205
|
openTaskOwner(host: HostSession, scope: C.OwnerScope): C.Result<OwnerLease, C.OwnerError>;
|
|
180
|
-
startCommandTask(owner: OwnerLease, intent: C.CommandIntent, operation: C.OperationId, signal?: AbortSignal): Promise<C.Result<TaskLease, C.StartFailure>>;
|
|
206
|
+
startCommandTask(owner: OwnerLease, intent: C.CommandIntent, operation: C.OperationId, signal?: AbortSignal, origin?: CommandLaunchOrigin): Promise<C.Result<TaskLease, C.StartFailure>>;
|
|
181
207
|
/** Caller must hold launch authorization closed while this snapshot drains. */
|
|
182
208
|
drainCommandAdmissions(owner: OwnerLease): Promise<void>;
|
|
183
209
|
taskStdin(task: TaskLease): C.Result<StdinLease, C.InputError>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supervisor.d.ts","sourceRoot":"","sources":["../../../src/core/tasks/supervisor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"supervisor.d.ts","sourceRoot":"","sources":["../../../src/core/tasks/supervisor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE7F,OAAO,KAAK,EAAE,iBAAiB,EAAkB,MAAM,iBAAiB,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAoC,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE/F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,KAAK,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAGzC,8DAA8D;AAC9D,MAAM,MAAM,mBAAmB,GAC5B;IAAE,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAA;CAAE,GAC5B;IAAE,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;AACrF,kFAAkF;GAChF;IAAE,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC;IAAC,QAAQ,CA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