@bastani/atomic 0.9.19-alpha.3 → 0.9.19-alpha.5
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 +35 -0
- package/dist/builtin/intercom/CHANGELOG.md +8 -0
- package/dist/builtin/intercom/index.bundle.mjs +117 -26
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +18 -0
- package/dist/builtin/subagents/README.md +15 -15
- package/dist/builtin/subagents/agents/debugger.md +2 -2
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/skills/subagent/SKILL.md +26 -26
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +140 -58
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +27 -0
- package/dist/builtin/workflows/README.md +14 -15
- package/dist/builtin/workflows/builtin/{chunk-mygmtz6e.js → chunk-1nbq96fh.js} +19 -19
- package/dist/builtin/workflows/builtin/{chunk-zggjyg5z.js → chunk-n8zysf1t.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-r9qq7xfj.js → chunk-vhmnzdj9.js} +37 -37
- package/dist/builtin/workflows/builtin/{chunk-62v3gg9f.js → chunk-yeee2jrc.js} +11 -11
- package/dist/builtin/workflows/builtin/goal.js +2 -2
- package/dist/builtin/workflows/builtin/index.js +4 -4
- package/dist/builtin/workflows/builtin/open-claude-design.js +1 -1
- package/dist/builtin/workflows/builtin/ralph.js +2 -2
- package/dist/builtin/workflows/package.json +5 -5
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +180 -239
- package/dist/builtin/workflows/src/index.js +19 -2
- package/dist/builtin/workflows/src/shared/authoring-contract-stage.d.ts +2 -1
- package/dist/builtin/workflows/src/shared/authoring-contract-ui.d.ts +1 -1
- package/dist/core/agent-session-auto-compaction.js +1 -1
- package/dist/core/agent-session-auto-compaction.js.map +1 -1
- package/dist/core/agent-session-compaction.js +1 -1
- package/dist/core/agent-session-compaction.js.map +1 -1
- package/dist/core/agent-session-custom-message-commit.d.ts.map +1 -1
- package/dist/core/agent-session-custom-message-commit.js +33 -2
- package/dist/core/agent-session-custom-message-commit.js.map +1 -1
- package/dist/core/agent-session-message-queue.d.ts +1 -1
- package/dist/core/agent-session-message-queue.d.ts.map +1 -1
- package/dist/core/agent-session-message-queue.js +20 -6
- package/dist/core/agent-session-message-queue.js.map +1 -1
- package/dist/core/agent-session-methods.d.ts +4 -1
- 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-persistent-custom-messages.d.ts +1 -1
- package/dist/core/agent-session-persistent-custom-messages.d.ts.map +1 -1
- package/dist/core/agent-session-persistent-custom-messages.js +13 -3
- package/dist/core/agent-session-persistent-custom-messages.js.map +1 -1
- package/dist/core/agent-session-post-tool-compaction.js +1 -1
- package/dist/core/agent-session-post-tool-compaction.js.map +1 -1
- package/dist/core/agent-session-prompt.d.ts.map +1 -1
- package/dist/core/agent-session-prompt.js +83 -0
- package/dist/core/agent-session-prompt.js.map +1 -1
- package/dist/core/agent-session-queue-pause.d.ts.map +1 -1
- package/dist/core/agent-session-queue-pause.js +11 -0
- package/dist/core/agent-session-queue-pause.js.map +1 -1
- package/dist/core/agent-session-tool-hooks.d.ts.map +1 -1
- package/dist/core/agent-session-tool-hooks.js +2 -0
- package/dist/core/agent-session-tool-hooks.js.map +1 -1
- package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
- package/dist/core/agent-session-tool-registry.js +12 -0
- package/dist/core/agent-session-tool-registry.js.map +1 -1
- package/dist/core/agent-session-transfer.d.ts.map +1 -1
- package/dist/core/agent-session-transfer.js +7 -0
- package/dist/core/agent-session-transfer.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 +2 -0
- package/dist/core/agent-session-types.js.map +1 -1
- package/dist/core/agent-session.d.ts +4 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +22 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/context-types.d.ts +6 -0
- package/dist/core/extensions/context-types.d.ts.map +1 -1
- package/dist/core/extensions/context-types.js.map +1 -1
- package/dist/core/extensions/loader-virtual-modules.js +3 -3
- package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
- package/dist/core/extensions/runner-context.d.ts +1 -1
- package/dist/core/extensions/runner-context.d.ts.map +1 -1
- package/dist/core/extensions/runner-context.js +9 -3
- package/dist/core/extensions/runner-context.js.map +1 -1
- package/dist/core/extensions/runner.js +1 -1
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/workflow-events.d.ts +1 -1
- package/dist/core/extensions/workflow-events.d.ts.map +1 -1
- package/dist/core/extensions/workflow-events.js.map +1 -1
- package/dist/core/sdk-exports.d.ts +1 -1
- package/dist/core/sdk-exports.d.ts.map +1 -1
- package/dist/core/sdk-exports.js +1 -1
- package/dist/core/sdk-exports.js.map +1 -1
- package/dist/core/settings-manager-basic-accessors.d.ts +5 -3
- package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
- package/dist/core/settings-manager-basic-accessors.js +23 -8
- package/dist/core/settings-manager-basic-accessors.js.map +1 -1
- package/dist/core/settings-manager.d.ts +1 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-types.d.ts +5 -0
- package/dist/core/settings-types.d.ts.map +1 -1
- package/dist/core/settings-types.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +4 -5
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/tasks/agent-adapter.d.ts +5 -2
- package/dist/core/tasks/agent-adapter.d.ts.map +1 -1
- package/dist/core/tasks/agent-adapter.js +10 -3
- package/dist/core/tasks/agent-adapter.js.map +1 -1
- package/dist/core/tasks/completion.d.ts.map +1 -1
- package/dist/core/tasks/completion.js +5 -1
- package/dist/core/tasks/completion.js.map +1 -1
- package/dist/core/tools/bash-pty-native.d.ts +16 -2
- package/dist/core/tools/bash-pty-native.d.ts.map +1 -1
- package/dist/core/tools/bash-pty-native.js +82 -0
- package/dist/core/tools/bash-pty-native.js.map +1 -1
- package/dist/core/tools/bash.d.ts +13 -2
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +48 -3
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/index.d.ts +4 -1
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +12 -0
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/kill.d.ts +17 -0
- package/dist/core/tools/kill.d.ts.map +1 -0
- package/dist/core/tools/kill.js +49 -0
- package/dist/core/tools/kill.js.map +1 -0
- package/dist/core/tools/powershell.d.ts +84 -28
- package/dist/core/tools/powershell.d.ts.map +1 -1
- package/dist/core/tools/powershell.js +10 -3
- package/dist/core/tools/powershell.js.map +1 -1
- package/dist/core/workflow-stage-admission.d.ts +14 -0
- package/dist/core/workflow-stage-admission.d.ts.map +1 -1
- package/dist/core/workflow-stage-admission.js +63 -3
- package/dist/core/workflow-stage-admission.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/components/task-row.d.ts.map +1 -1
- package/dist/modes/interactive/components/task-row.js +8 -1
- package/dist/modes/interactive/components/task-row.js.map +1 -1
- package/docs/background-tasks.md +24 -1
- package/docs/compaction.md +20 -0
- package/docs/computer-use.md +390 -0
- package/docs/docs.json +1 -0
- package/docs/extensions.md +11 -1
- package/docs/herdr.md +2 -0
- package/docs/index.md +1 -0
- package/docs/intercom.md +10 -2
- package/docs/providers.md +1 -1
- package/docs/quickstart.md +1 -1
- package/docs/sdk.md +11 -1
- package/docs/settings.md +20 -0
- package/docs/subagents.md +8 -6
- package/docs/tmux.md +2 -0
- package/docs/tools.md +7 -1
- package/docs/usage.md +1 -1
- package/docs/workflows/api-reference.md +4 -3
- package/docs/workflows/authoring.md +3 -3
- package/docs/workflows/builtins.md +9 -6
- package/docs/workflows/operations.md +36 -30
- package/docs/workflows/reliable-design.md +3 -3
- package/docs/workflows/verification.md +99 -40
- package/docs/workflows.md +4 -2
- package/npm-shrinkwrap.json +32 -32
- package/package.json +3 -3
|
@@ -66513,7 +66513,7 @@ class WorkflowObservationRuntime {
|
|
|
66513
66513
|
const run = this.runs().find((candidate) => candidate.id === runId);
|
|
66514
66514
|
if (!run)
|
|
66515
66515
|
return;
|
|
66516
|
-
if ((action === "quit" || action === "kill" || action === "
|
|
66516
|
+
if ((action === "quit" || action === "kill" || action === "pause") && this.liveRunIds.has(runId))
|
|
66517
66517
|
this.stoppingRunIds.add(runId);
|
|
66518
66518
|
if (action === "resume")
|
|
66519
66519
|
this.stoppingRunIds.delete(runId);
|
|
@@ -68991,8 +68991,8 @@ function renderIdentifierRows2(id, width, theme) {
|
|
|
68991
68991
|
function renderDetailHintRows(detail, width, theme) {
|
|
68992
68992
|
const resumable = detail.status === "paused" && detail.resumable !== false || detail.resumable === true && (detail.status === "crashed" || detail.status === "failed" || detail.status === "blocked");
|
|
68993
68993
|
const inspectOnly = detail.ownerActiveElsewhere === true || detail.status === "crashed" && !resumable || detail.endedAt !== undefined && !resumable;
|
|
68994
|
-
const prefix = inspectOnly ? " ▸ workflow status id=" : resumable ? " ▸ workflow resume id=" : " ▸ workflow
|
|
68995
|
-
const suffix = inspectOnly ? detail.ownerActiveElsewhere === true ? " inspect; owner active elsewhere " : " inspect retained state " : resumable ? " continue workflow " : "
|
|
68994
|
+
const prefix = inspectOnly ? " ▸ workflow status id=" : resumable ? " ▸ workflow resume id=" : " ▸ workflow pause id=";
|
|
68995
|
+
const suffix = inspectOnly ? detail.ownerActiveElsewhere === true ? " inspect; owner active elsewhere " : " inspect retained state " : resumable ? " continue workflow " : " pause workflow ";
|
|
68996
68996
|
const continuation = " ";
|
|
68997
68997
|
const rows = wrapIdentifierLines(detail.runId, width, prefix, continuation);
|
|
68998
68998
|
const last = rows[rows.length - 1];
|
|
@@ -72599,7 +72599,7 @@ class GraphCanvas {
|
|
|
72599
72599
|
|
|
72600
72600
|
// dist/builtin/workflows/src/tui/layout.ts
|
|
72601
72601
|
var NODE_W = 24;
|
|
72602
|
-
var NODE_H =
|
|
72602
|
+
var NODE_H = 6;
|
|
72603
72603
|
function computeLayout(stages, opts = {}) {
|
|
72604
72604
|
const colGap = opts.colGap ?? 4;
|
|
72605
72605
|
const rowGap = opts.rowGap ?? 3;
|
|
@@ -74115,6 +74115,23 @@ function metaText(stage) {
|
|
|
74115
74115
|
const dependencyText = deps === 0 ? "root" : deps === 1 ? "1 dep" : `${deps} deps`;
|
|
74116
74116
|
return dependencyText;
|
|
74117
74117
|
}
|
|
74118
|
+
function modelText(stage, innerWidth) {
|
|
74119
|
+
const model = stage.model;
|
|
74120
|
+
if (model === undefined || model === "")
|
|
74121
|
+
return "—";
|
|
74122
|
+
const slash = model.lastIndexOf("/");
|
|
74123
|
+
const short = slash >= 0 ? model.slice(slash + 1) : model;
|
|
74124
|
+
const level = stage.thinkingLevel;
|
|
74125
|
+
const showLevel = level !== undefined && level !== "" && level !== "off";
|
|
74126
|
+
const suffix = showLevel ? ` · ${level}` : "";
|
|
74127
|
+
const full = `${short}${suffix}`;
|
|
74128
|
+
if (visibleWidth(full) <= innerWidth)
|
|
74129
|
+
return full;
|
|
74130
|
+
const modelSuffix = short.endsWith("-fast") ? "-fast" : "";
|
|
74131
|
+
const name = modelSuffix ? short.slice(0, -modelSuffix.length) : short;
|
|
74132
|
+
const room = Math.max(1, innerWidth - visibleWidth(modelSuffix + suffix));
|
|
74133
|
+
return `${truncateToWidth2(name, room, "…")}${modelSuffix}${suffix}`;
|
|
74134
|
+
}
|
|
74118
74135
|
function workflowChildRunRows(stage, width) {
|
|
74119
74136
|
const child = stage.workflowChild ?? stage.workflowChildRun;
|
|
74120
74137
|
if (child === undefined)
|
|
@@ -74204,6 +74221,7 @@ function renderNodeCard(stage, opts) {
|
|
|
74204
74221
|
}) + `${bg}${bc}│${RESET}`;
|
|
74205
74222
|
const contentRows = Math.max(0, height - 2);
|
|
74206
74223
|
const metaLine = `${bg}${bc}│${RESET}${centreColored(metaText(stage), innerWidth, theme.dim, bg)}${bg}${bc}│${RESET}`;
|
|
74224
|
+
const modelLine = `${bg}${bc}│${RESET}${centreColored(modelText(stage, innerWidth), innerWidth, theme.textMuted, bg)}${bg}${bc}│${RESET}`;
|
|
74207
74225
|
const childRunLines = workflowChildRunRows(stage, innerWidth).map((row) => `${bg}${bc}│${RESET}${centreColored(row, innerWidth, theme.dim, bg)}${bg}${bc}│${RESET}`);
|
|
74208
74226
|
const queuedCount = queuedBadgeCount(opts.queuedMessageCount);
|
|
74209
74227
|
const childMeta = workflowChildMetaText(stage);
|
|
@@ -74214,8 +74232,9 @@ function renderNodeCard(stage, opts) {
|
|
|
74214
74232
|
const interior = stage.status === "awaiting_input" ? [
|
|
74215
74233
|
statusLine,
|
|
74216
74234
|
`${bg}${bc}│${RESET}` + centreColored("waiting for response", innerWidth, theme.info, bg) + `${bg}${bc}│${RESET}`,
|
|
74217
|
-
`${bg}${bc}│${RESET}` + centreColored("↵ enter to respond", innerWidth, theme.dim, bg) + `${bg}${bc}│${RESET}
|
|
74218
|
-
|
|
74235
|
+
`${bg}${bc}│${RESET}` + centreColored("↵ enter to respond", innerWidth, theme.dim, bg) + `${bg}${bc}│${RESET}`,
|
|
74236
|
+
modelLine
|
|
74237
|
+
] : childSummaryLine === undefined ? [durLine, statusLine, modelLine, metaLine] : [...childRunLines, childSummaryLine];
|
|
74219
74238
|
const preferredBadgeRow = stage.status === "awaiting_input" ? 1 : childSummaryLine === undefined ? interior.length - 1 : -1;
|
|
74220
74239
|
while (interior.length < contentRows) {
|
|
74221
74240
|
interior.push(`${bg}${bc}│${RESET}${bg}${" ".repeat(innerWidth)}${bg}${bc}│${RESET}`);
|
|
@@ -80060,6 +80079,7 @@ function encodeCheckpoint(checkpoint) {
|
|
|
80060
80079
|
...s.durationMs !== undefined ? { durationMs: s.durationMs } : {},
|
|
80061
80080
|
...s.result !== undefined ? { result: s.result } : {},
|
|
80062
80081
|
...s.model !== undefined ? { model: s.model } : {},
|
|
80082
|
+
...s.thinkingLevel !== undefined ? { thinkingLevel: s.thinkingLevel } : {},
|
|
80063
80083
|
...s.attemptedModels !== undefined ? { attemptedModels: [...s.attemptedModels] } : {},
|
|
80064
80084
|
...s.modelAttempts !== undefined ? { modelAttempts: s.modelAttempts } : {},
|
|
80065
80085
|
...s.structured !== undefined ? { structured: s.structured } : {},
|
|
@@ -80124,7 +80144,7 @@ function decodeEnvelope(workflowId, env) {
|
|
|
80124
80144
|
};
|
|
80125
80145
|
}
|
|
80126
80146
|
const topology = stageTopology(env.topology);
|
|
80127
|
-
if (env.kind !== "stage" || topology === undefined || env.replayKey !== undefined && typeof env.replayKey !== "string" || env.sessionId !== undefined && typeof env.sessionId !== "string" || env.sessionFile !== undefined && typeof env.sessionFile !== "string" || !isOptionalFiniteNumber(env.startedAt) || !isOptionalFiniteNumber(env.endedAt) || !isOptionalFiniteNumber(env.durationMs) || env.result !== undefined && typeof env.result !== "string" || env.model !== undefined && typeof env.model !== "string" || env.attemptedModels !== undefined && !isStringArray(env.attemptedModels) || env.modelAttempts !== undefined && !isModelAttempts(env.modelAttempts) || env.artifacts !== undefined && !isWorkflowArtifacts(env.artifacts) || env.warnings !== undefined && !isStringArray(env.warnings))
|
|
80147
|
+
if (env.kind !== "stage" || topology === undefined || env.replayKey !== undefined && typeof env.replayKey !== "string" || env.sessionId !== undefined && typeof env.sessionId !== "string" || env.sessionFile !== undefined && typeof env.sessionFile !== "string" || !isOptionalFiniteNumber(env.startedAt) || !isOptionalFiniteNumber(env.endedAt) || !isOptionalFiniteNumber(env.durationMs) || env.result !== undefined && typeof env.result !== "string" || env.model !== undefined && typeof env.model !== "string" || env.thinkingLevel !== undefined && typeof env.thinkingLevel !== "string" || env.attemptedModels !== undefined && !isStringArray(env.attemptedModels) || env.modelAttempts !== undefined && !isModelAttempts(env.modelAttempts) || env.artifacts !== undefined && !isWorkflowArtifacts(env.artifacts) || env.warnings !== undefined && !isStringArray(env.warnings))
|
|
80128
80148
|
return;
|
|
80129
80149
|
return {
|
|
80130
80150
|
kind: "stage",
|
|
@@ -80140,6 +80160,7 @@ function decodeEnvelope(workflowId, env) {
|
|
|
80140
80160
|
...typeof env.durationMs === "number" ? { durationMs: env.durationMs } : {},
|
|
80141
80161
|
...typeof env.result === "string" ? { result: env.result } : {},
|
|
80142
80162
|
...typeof env.model === "string" ? { model: env.model } : {},
|
|
80163
|
+
...typeof env.thinkingLevel === "string" ? { thinkingLevel: env.thinkingLevel } : {},
|
|
80143
80164
|
...isStringArray(env.attemptedModels) ? { attemptedModels: env.attemptedModels } : {},
|
|
80144
80165
|
...Array.isArray(env.modelAttempts) ? { modelAttempts: env.modelAttempts } : {},
|
|
80145
80166
|
...env.structured !== undefined ? { structured: env.structured } : {},
|
|
@@ -83886,8 +83907,7 @@ function createRealDbosHandle(dbos, mainWorkflow, checkpointWorkflow) {
|
|
|
83886
83907
|
const stepName = wid.slice(prefix.length);
|
|
83887
83908
|
if (stepName.length === 0)
|
|
83888
83909
|
continue;
|
|
83889
|
-
const
|
|
83890
|
-
const output = await handle.getResult();
|
|
83910
|
+
const output = s.output === undefined || typeof s.output === "string" ? await dbos.retrieveWorkflow(wid).getResult() : s.output;
|
|
83891
83911
|
records.push({ stepName, output, completedAt: s.createdAt });
|
|
83892
83912
|
}
|
|
83893
83913
|
return records;
|
|
@@ -85094,8 +85114,11 @@ async function rollbackStartedCluster(cluster, startupError) {
|
|
|
85094
85114
|
async function waitForClusterReadiness(logFile, rollbackCluster, isReachable = tcpReachable, attempts = READY_ATTEMPTS, wait = delay) {
|
|
85095
85115
|
try {
|
|
85096
85116
|
for (let attempt = 0;attempt < attempts; attempt += 1) {
|
|
85097
|
-
|
|
85117
|
+
await assertRetainedPostgresRunning(rollbackCluster, logFile);
|
|
85118
|
+
if (await isReachable(EMBEDDED_HOST, EMBEDDED_PORT)) {
|
|
85119
|
+
await assertRetainedPostgresRunning(rollbackCluster, logFile);
|
|
85098
85120
|
return;
|
|
85121
|
+
}
|
|
85099
85122
|
await wait(READY_DELAY_MS);
|
|
85100
85123
|
}
|
|
85101
85124
|
throw new Error(`Embedded Postgres started but never accepted connections on ${EMBEDDED_HOST}:${EMBEDDED_PORT}; see ${logFile}.`);
|
|
@@ -85103,6 +85126,19 @@ async function waitForClusterReadiness(logFile, rollbackCluster, isReachable = t
|
|
|
85103
85126
|
await rollbackStartedCluster(rollbackCluster, startupError);
|
|
85104
85127
|
}
|
|
85105
85128
|
}
|
|
85129
|
+
async function assertRetainedPostgresRunning(cluster, logFile) {
|
|
85130
|
+
if (cluster === undefined)
|
|
85131
|
+
return;
|
|
85132
|
+
const observed = await cluster.lease.wait(0).catch((error) => {
|
|
85133
|
+
if (error instanceof Error && error.message === "Timed out waiting for the retained Postgres process to exit") {
|
|
85134
|
+
return;
|
|
85135
|
+
}
|
|
85136
|
+
throw error;
|
|
85137
|
+
});
|
|
85138
|
+
if (observed?.exited) {
|
|
85139
|
+
throw new Error(`The embedded Postgres process exited early before accepting connections on ${EMBEDDED_HOST}:${EMBEDDED_PORT}; see ${logFile}.${logTail(logFile)}`);
|
|
85140
|
+
}
|
|
85141
|
+
}
|
|
85106
85142
|
function shutdownEmbeddedDbosPostgres() {
|
|
85107
85143
|
const cluster = activeCluster;
|
|
85108
85144
|
if (cluster === undefined)
|
|
@@ -86268,6 +86304,7 @@ function durableStageCheckpointMetadata(stage, run, sourceOrder) {
|
|
|
86268
86304
|
...stage.sessionFile !== undefined ? { sessionFile: stage.sessionFile } : {},
|
|
86269
86305
|
...stage.durationMs !== undefined ? { durationMs: stage.durationMs } : {},
|
|
86270
86306
|
...stage.model !== undefined ? { model: stage.model } : {},
|
|
86307
|
+
...stage.thinkingLevel !== undefined ? { thinkingLevel: stage.thinkingLevel } : {},
|
|
86271
86308
|
...stage.attemptedModels !== undefined ? { attemptedModels: [...stage.attemptedModels] } : {},
|
|
86272
86309
|
...stage.modelAttempts !== undefined ? { modelAttempts: [...stage.modelAttempts] } : {},
|
|
86273
86310
|
...stage.structured !== undefined ? { structured: stage.structured } : {},
|
|
@@ -87194,6 +87231,7 @@ function completeTaskResult(name, base, checkpoint) {
|
|
|
87194
87231
|
...base.sessionFile !== undefined || checkpoint.sessionFile !== undefined ? { sessionFile: base.sessionFile ?? checkpoint.sessionFile } : {},
|
|
87195
87232
|
...base.artifacts !== undefined || checkpoint.artifacts !== undefined ? { artifacts: [...base.artifacts ?? checkpoint.artifacts ?? []] } : {},
|
|
87196
87233
|
...base.model !== undefined || checkpoint.model !== undefined ? { model: base.model ?? checkpoint.model } : {},
|
|
87234
|
+
...base.thinkingLevel !== undefined || checkpoint.thinkingLevel !== undefined ? { thinkingLevel: base.thinkingLevel ?? checkpoint.thinkingLevel } : {},
|
|
87197
87235
|
...base.attemptedModels !== undefined || checkpoint.attemptedModels !== undefined ? { attemptedModels: [...base.attemptedModels ?? checkpoint.attemptedModels ?? []] } : {},
|
|
87198
87236
|
...base.modelAttempts !== undefined || checkpoint.modelAttempts !== undefined ? { modelAttempts: [...base.modelAttempts ?? checkpoint.modelAttempts ?? []] } : {},
|
|
87199
87237
|
...base.warnings !== undefined || checkpoint.warnings !== undefined ? { warnings: [...base.warnings ?? checkpoint.warnings ?? []] } : {}
|
|
@@ -87294,6 +87332,7 @@ function taskCheckpointMetadata(result) {
|
|
|
87294
87332
|
...result.sessionId !== undefined ? { sessionId: result.sessionId } : {},
|
|
87295
87333
|
...result.sessionFile !== undefined ? { sessionFile: result.sessionFile } : {},
|
|
87296
87334
|
...result.model !== undefined ? { model: result.model } : {},
|
|
87335
|
+
...result.thinkingLevel !== undefined ? { thinkingLevel: result.thinkingLevel } : {},
|
|
87297
87336
|
...result.attemptedModels !== undefined ? { attemptedModels: [...result.attemptedModels] } : {},
|
|
87298
87337
|
...result.modelAttempts !== undefined ? { modelAttempts: [...result.modelAttempts] } : {},
|
|
87299
87338
|
...result.structured !== undefined ? { structured: result.structured } : {},
|
|
@@ -87323,6 +87362,7 @@ function mergeCheckpointHydrationMetadata(replayValueCheckpoint, checkpoints) {
|
|
|
87323
87362
|
...replayValueCheckpoint.sessionId === undefined ? metadataValue(checkpoints, "sessionId") : {},
|
|
87324
87363
|
...replayValueCheckpoint.sessionFile === undefined ? metadataValue(checkpoints, "sessionFile") : {},
|
|
87325
87364
|
...replayValueCheckpoint.model === undefined ? metadataValue(checkpoints, "model") : {},
|
|
87365
|
+
...replayValueCheckpoint.thinkingLevel === undefined ? metadataValue(checkpoints, "thinkingLevel") : {},
|
|
87326
87366
|
...replayValueCheckpoint.attemptedModels === undefined ? metadataValue(checkpoints, "attemptedModels") : {},
|
|
87327
87367
|
...replayValueCheckpoint.modelAttempts === undefined ? metadataValue(checkpoints, "modelAttempts") : {},
|
|
87328
87368
|
...replayValueCheckpoint.structured === undefined ? metadataValue(checkpoints, "structured") : {},
|
|
@@ -87412,6 +87452,7 @@ function recordCachedStageIntoStore(store, runId, name, replayKey, output, compl
|
|
|
87412
87452
|
...checkpoint?.sessionId !== undefined ? { sessionId: checkpoint.sessionId } : {},
|
|
87413
87453
|
...checkpoint?.sessionFile !== undefined ? { sessionFile: checkpoint.sessionFile } : {},
|
|
87414
87454
|
...checkpoint?.model !== undefined ? { model: checkpoint.model } : {},
|
|
87455
|
+
...checkpoint?.thinkingLevel !== undefined ? { thinkingLevel: checkpoint.thinkingLevel } : {},
|
|
87415
87456
|
...checkpoint?.attemptedModels !== undefined ? { attemptedModels: checkpoint.attemptedModels } : {},
|
|
87416
87457
|
...checkpoint?.modelAttempts !== undefined ? { modelAttempts: checkpoint.modelAttempts } : {},
|
|
87417
87458
|
...checkpoint?.structured !== undefined ? { structured: checkpoint.structured } : {},
|
|
@@ -88227,19 +88268,15 @@ async function resumeRun(runId, opts) {
|
|
|
88227
88268
|
...acknowledgementMessage !== undefined ? { message: acknowledgementMessage } : {}
|
|
88228
88269
|
};
|
|
88229
88270
|
}
|
|
88230
|
-
function pauseRun(runId, opts) {
|
|
88231
|
-
return pauseRunWithAction(runId, opts, "pause");
|
|
88232
|
-
}
|
|
88233
88271
|
async function pauseRunWithAction(runId, opts, action = "pause") {
|
|
88234
88272
|
const activeStore = opts?.store ?? store;
|
|
88235
88273
|
const registry = opts?.stageControlRegistry ?? stageControlRegistry;
|
|
88236
88274
|
const run = activeStore.runs().find((candidate) => candidate.id === runId);
|
|
88237
|
-
const actorMetadata = opts?.actor === undefined ? undefined : { actor: opts.actor };
|
|
88238
88275
|
if (!run)
|
|
88239
88276
|
return { ok: false, runId, reason: "not_found" };
|
|
88240
88277
|
if (run.endedAt !== undefined)
|
|
88241
88278
|
return { ok: false, runId, reason: "already_ended" };
|
|
88242
|
-
workflowObservationRuntime(activeStore).control(runId, action
|
|
88279
|
+
workflowObservationRuntime(activeStore).control(runId, action);
|
|
88243
88280
|
if (opts?.stageId !== undefined) {
|
|
88244
88281
|
const handle = registry.get(runId, opts.stageId);
|
|
88245
88282
|
if (!handle)
|
|
@@ -88254,9 +88291,7 @@ async function pauseRunWithAction(runId, opts, action = "pause") {
|
|
|
88254
88291
|
const paused = stage === undefined ? [] : [structuredClone(stage)];
|
|
88255
88292
|
const stillActive = currentRun?.stages.some((candidate) => candidate.id !== opts.stageId && (candidate.status === "running" || candidate.status === "pending")) ?? false;
|
|
88256
88293
|
if (!stillActive)
|
|
88257
|
-
activeStore.recordRunPaused(runId
|
|
88258
|
-
else if (actorMetadata !== undefined)
|
|
88259
|
-
activeStore.recordStagePaused(runId, opts.stageId, undefined, actorMetadata);
|
|
88294
|
+
activeStore.recordRunPaused(runId);
|
|
88260
88295
|
return { ok: true, runId, paused };
|
|
88261
88296
|
}
|
|
88262
88297
|
const controlRunIds = expandedControlRunIds(activeStore, runId);
|
|
@@ -88267,7 +88302,7 @@ async function pauseRunWithAction(runId, opts, action = "pause") {
|
|
|
88267
88302
|
const activeRunIds = new Set([...controlRunIds, ...runtimeControls.map(({ controlRunId }) => controlRunId)]);
|
|
88268
88303
|
if (runtimeControls.some(({ controlRunId }) => controlRunId === runId) && [...activeRunIds].every((id) => toolControls.active(id).length === 0 && registry.run(id).stages().length === 0)) {
|
|
88269
88304
|
await Promise.all(runtimeControls.map(({ handle }) => handle.pause()));
|
|
88270
|
-
activeStore.recordRunPaused(runId
|
|
88305
|
+
activeStore.recordRunPaused(runId);
|
|
88271
88306
|
return {
|
|
88272
88307
|
ok: true,
|
|
88273
88308
|
runId,
|
|
@@ -88293,19 +88328,10 @@ async function pauseRunWithAction(runId, opts, action = "pause") {
|
|
|
88293
88328
|
continue;
|
|
88294
88329
|
activeStore.recordRunPaused(pausedRunId);
|
|
88295
88330
|
}
|
|
88296
|
-
activeStore.recordRunPaused(runId
|
|
88331
|
+
activeStore.recordRunPaused(runId);
|
|
88297
88332
|
return { ok: true, runId, paused };
|
|
88298
88333
|
}
|
|
88299
|
-
async function
|
|
88300
|
-
const activeStore = opts?.store ?? store;
|
|
88301
|
-
const inFlight = topLevelWorkflowRuns(activeStore.runs()).filter((run) => run.endedAt === undefined);
|
|
88302
|
-
return Promise.all(inFlight.map((run) => pauseRun(run.id, {
|
|
88303
|
-
store: activeStore,
|
|
88304
|
-
stageControlRegistry: opts?.stageControlRegistry,
|
|
88305
|
-
...opts?.actor === undefined ? {} : { actor: opts.actor }
|
|
88306
|
-
})));
|
|
88307
|
-
}
|
|
88308
|
-
async function interruptRun(runId, opts) {
|
|
88334
|
+
async function pauseRun(runId, opts) {
|
|
88309
88335
|
if (opts?.stageId === undefined) {
|
|
88310
88336
|
const activeStore = opts?.store ?? store;
|
|
88311
88337
|
const toolControls = opts?.toolControlRegistry ?? toolControlRegistry;
|
|
@@ -88315,19 +88341,18 @@ async function interruptRun(runId, opts) {
|
|
|
88315
88341
|
store: activeStore,
|
|
88316
88342
|
stageControlRegistry: opts?.stageControlRegistry,
|
|
88317
88343
|
toolControlRegistry: toolControls
|
|
88318
|
-
}, "
|
|
88344
|
+
}, "pause");
|
|
88319
88345
|
if (quit.ok)
|
|
88320
88346
|
return { ok: true, runId: quit.runId, paused: quit.paused };
|
|
88321
88347
|
return { ok: false, runId: quit.runId, reason: quit.reason };
|
|
88322
88348
|
}
|
|
88323
88349
|
}
|
|
88324
|
-
|
|
88325
|
-
return result.ok && result.message !== undefined ? { ...result, message: `Run ${runId} interrupted. ${result.message}` } : result;
|
|
88350
|
+
return pauseRunWithAction(runId, opts, "pause");
|
|
88326
88351
|
}
|
|
88327
|
-
async function
|
|
88352
|
+
async function pauseAllRuns(opts) {
|
|
88328
88353
|
const activeStore = opts?.store ?? store;
|
|
88329
88354
|
const inFlight = topLevelWorkflowRuns(activeStore.runs()).filter((run) => run.endedAt === undefined);
|
|
88330
|
-
return Promise.all(inFlight.map((run) =>
|
|
88355
|
+
return Promise.all(inFlight.map((run) => pauseRun(run.id, {
|
|
88331
88356
|
store: activeStore,
|
|
88332
88357
|
stageControlRegistry: opts?.stageControlRegistry,
|
|
88333
88358
|
toolControlRegistry: opts?.toolControlRegistry
|
|
@@ -89455,9 +89480,6 @@ function resolvedControlNodeTarget(node) {
|
|
|
89455
89480
|
const graphTarget = node.workflowGraphTarget;
|
|
89456
89481
|
return node.nodeKind === "tool" ? { ok: true, kind: "tool", runId: graphTarget.runId, nodeId: graphTarget.stageId, name: node.name } : { ok: true, kind: "stage", runId: graphTarget.runId, stageId: graphTarget.stageId };
|
|
89457
89482
|
}
|
|
89458
|
-
function toolNodePauseRejectionMessage(name, nodeId) {
|
|
89459
|
-
return `Tool nodes cannot be paused; ctx.tool ${name} (${nodeId}) has no turn boundary. Use interrupt or quit to abort it.`;
|
|
89460
|
-
}
|
|
89461
89483
|
function overlaySurfaceFromContext(ctx) {
|
|
89462
89484
|
return typeof ctx?.ui?.custom === "function" ? { ui: ctx.ui } : undefined;
|
|
89463
89485
|
}
|
|
@@ -92244,15 +92266,15 @@ var orchestratorModelConfig = {
|
|
|
92244
92266
|
fallbackModels: [
|
|
92245
92267
|
"github-copilot/gpt-6-astra:medium",
|
|
92246
92268
|
"openai/gpt-6-astra:medium",
|
|
92247
|
-
"anthropic/claude-fable-5-1:
|
|
92248
|
-
"github-copilot/claude-fable-5-1:
|
|
92269
|
+
"anthropic/claude-fable-5-1:medium",
|
|
92270
|
+
"github-copilot/claude-fable-5-1:medium",
|
|
92249
92271
|
"anthropic/claude-opus-5:high",
|
|
92250
92272
|
"github-copilot/claude-opus-5:high",
|
|
92251
|
-
"openai-codex/gpt-5.6-sol:
|
|
92252
|
-
"github-copilot/gpt-5.6-sol:
|
|
92253
|
-
"openai/gpt-5.6-sol:
|
|
92254
|
-
"anthropic/claude-fable-5:
|
|
92255
|
-
"github-copilot/claude-fable-5:
|
|
92273
|
+
"openai-codex/gpt-5.6-sol:high",
|
|
92274
|
+
"github-copilot/gpt-5.6-sol:high",
|
|
92275
|
+
"openai/gpt-5.6-sol:high",
|
|
92276
|
+
"anthropic/claude-fable-5:medium",
|
|
92277
|
+
"github-copilot/claude-fable-5:medium",
|
|
92256
92278
|
"kimi-coding/k3:max",
|
|
92257
92279
|
"moonshotai/kimi-k3:max",
|
|
92258
92280
|
"moonshotai-cn/kimi-k3:max",
|
|
@@ -92270,10 +92292,10 @@ var orchestratorModelConfig = {
|
|
|
92270
92292
|
"baseten/zai-org/GLM-5.3:high",
|
|
92271
92293
|
"baseten/zai-org/GLM-5.3-Flash:high",
|
|
92272
92294
|
"openrouter/openai/gpt-6-astra:medium",
|
|
92273
|
-
"openrouter/anthropic/claude-fable-5-1:
|
|
92295
|
+
"openrouter/anthropic/claude-fable-5-1:medium",
|
|
92274
92296
|
"openrouter/anthropic/claude-opus-5:high",
|
|
92275
|
-
"openrouter/openai/gpt-5.6-sol:
|
|
92276
|
-
"openrouter/anthropic/claude-fable-5:
|
|
92297
|
+
"openrouter/openai/gpt-5.6-sol:high",
|
|
92298
|
+
"openrouter/anthropic/claude-fable-5:medium",
|
|
92277
92299
|
"openrouter/moonshotai/kimi-k3:max",
|
|
92278
92300
|
"openrouter/sakana/fugu-ultra:high",
|
|
92279
92301
|
"openrouter/openai/gpt-5.5:xhigh",
|
|
@@ -92285,19 +92307,19 @@ var orchestratorModelConfig = {
|
|
|
92285
92307
|
excludedTools: ["ask_user_question"]
|
|
92286
92308
|
};
|
|
92287
92309
|
var reviewerModelConfig = {
|
|
92288
|
-
model: "openai-codex/gpt-6-astra:
|
|
92310
|
+
model: "openai-codex/gpt-6-astra:high",
|
|
92289
92311
|
fallbackModels: [
|
|
92290
|
-
"github-copilot/gpt-6-astra:
|
|
92291
|
-
"openai/gpt-6-astra:
|
|
92312
|
+
"github-copilot/gpt-6-astra:high",
|
|
92313
|
+
"openai/gpt-6-astra:high",
|
|
92292
92314
|
"anthropic/claude-fable-5-1:high",
|
|
92293
92315
|
"github-copilot/claude-fable-5-1:high",
|
|
92294
92316
|
"anthropic/claude-opus-5:high",
|
|
92295
92317
|
"github-copilot/claude-opus-5:high",
|
|
92296
92318
|
"anthropic/claude-fable-5:high",
|
|
92297
92319
|
"github-copilot/claude-fable-5:high",
|
|
92298
|
-
"openai-codex/gpt-5.6-sol:
|
|
92299
|
-
"github-copilot/gpt-5.6-sol:
|
|
92300
|
-
"openai/gpt-5.6-sol:
|
|
92320
|
+
"openai-codex/gpt-5.6-sol:high",
|
|
92321
|
+
"github-copilot/gpt-5.6-sol:high",
|
|
92322
|
+
"openai/gpt-5.6-sol:high",
|
|
92301
92323
|
"kimi-coding/k3:max",
|
|
92302
92324
|
"moonshotai/kimi-k3:max",
|
|
92303
92325
|
"moonshotai-cn/kimi-k3:max",
|
|
@@ -92314,11 +92336,11 @@ var reviewerModelConfig = {
|
|
|
92314
92336
|
"zai-coding-cn/glm-5.3-flash:high",
|
|
92315
92337
|
"baseten/zai-org/GLM-5.3:high",
|
|
92316
92338
|
"baseten/zai-org/GLM-5.3-Flash:high",
|
|
92317
|
-
"openrouter/openai/gpt-6-astra:
|
|
92339
|
+
"openrouter/openai/gpt-6-astra:high",
|
|
92318
92340
|
"openrouter/anthropic/claude-fable-5-1:high",
|
|
92319
92341
|
"openrouter/anthropic/claude-opus-5:high",
|
|
92320
92342
|
"openrouter/anthropic/claude-fable-5:high",
|
|
92321
|
-
"openrouter/openai/gpt-5.6-sol:
|
|
92343
|
+
"openrouter/openai/gpt-5.6-sol:high",
|
|
92322
92344
|
"openrouter/moonshotai/kimi-k3:max",
|
|
92323
92345
|
"openrouter/sakana/fugu-ultra:high",
|
|
92324
92346
|
"openrouter/openai/gpt-5.5:xhigh",
|
|
@@ -94407,24 +94429,24 @@ async function runOpenClaudeDesignWorkflow(ctx) {
|
|
|
94407
94429
|
}
|
|
94408
94430
|
};
|
|
94409
94431
|
const designModelConfig = {
|
|
94410
|
-
model: "
|
|
94432
|
+
model: "anthropic/claude-fable-5-1:medium",
|
|
94411
94433
|
fallbackModels: [
|
|
94434
|
+
"github-copilot/claude-fable-5-1:medium",
|
|
94435
|
+
"openai-codex/gpt-6-astra:medium",
|
|
94412
94436
|
"github-copilot/gpt-6-astra:medium",
|
|
94413
94437
|
"openai/gpt-6-astra:medium",
|
|
94414
|
-
"anthropic/claude-fable-5-1:high",
|
|
94415
|
-
"github-copilot/claude-fable-5-1:high",
|
|
94416
94438
|
"anthropic/claude-opus-5:high",
|
|
94417
94439
|
"github-copilot/claude-opus-5:high",
|
|
94418
|
-
"anthropic/claude-fable-5:
|
|
94419
|
-
"github-copilot/claude-fable-5:
|
|
94440
|
+
"anthropic/claude-fable-5:medium",
|
|
94441
|
+
"github-copilot/claude-fable-5:medium",
|
|
94420
94442
|
"kimi-coding/k3:max",
|
|
94421
94443
|
"moonshotai/kimi-k3:max",
|
|
94422
94444
|
"moonshotai-cn/kimi-k3:max",
|
|
94423
94445
|
"anthropic/claude-opus-4-8:high",
|
|
94424
94446
|
"github-copilot/claude-opus-4.8:high",
|
|
94425
|
-
"openai-codex/gpt-5.6-sol:
|
|
94426
|
-
"github-copilot/gpt-5.6-sol:
|
|
94427
|
-
"openai/gpt-5.6-sol:
|
|
94447
|
+
"openai-codex/gpt-5.6-sol:high",
|
|
94448
|
+
"github-copilot/gpt-5.6-sol:high",
|
|
94449
|
+
"openai/gpt-5.6-sol:high",
|
|
94428
94450
|
"xai/grok-4.6:xhigh",
|
|
94429
94451
|
"github-copilot/grok-4.6:xhigh",
|
|
94430
94452
|
"zai/glm-5.3:high",
|
|
@@ -94433,13 +94455,13 @@ async function runOpenClaudeDesignWorkflow(ctx) {
|
|
|
94433
94455
|
"zai-coding-cn/glm-5.3-flash:high",
|
|
94434
94456
|
"baseten/zai-org/GLM-5.3:high",
|
|
94435
94457
|
"baseten/zai-org/GLM-5.3-Flash:high",
|
|
94458
|
+
"openrouter/anthropic/claude-fable-5-1:medium",
|
|
94436
94459
|
"openrouter/openai/gpt-6-astra:medium",
|
|
94437
|
-
"openrouter/anthropic/claude-fable-5-1:high",
|
|
94438
94460
|
"openrouter/anthropic/claude-opus-5:high",
|
|
94439
|
-
"openrouter/anthropic/claude-fable-5:
|
|
94461
|
+
"openrouter/anthropic/claude-fable-5:medium",
|
|
94440
94462
|
"openrouter/anthropic/claude-opus-4-8:high",
|
|
94441
94463
|
"openrouter/moonshotai/kimi-k3:max",
|
|
94442
|
-
"openrouter/openai/gpt-5.6-sol:
|
|
94464
|
+
"openrouter/openai/gpt-5.6-sol:high",
|
|
94443
94465
|
"openrouter/sakana/fugu-ultra:high",
|
|
94444
94466
|
"openrouter/x-ai/grok-4.6:xhigh",
|
|
94445
94467
|
"openrouter/z-ai/glm-5.3:high",
|
|
@@ -95493,15 +95515,15 @@ var researchModelConfig = {
|
|
|
95493
95515
|
fallbackModels: [
|
|
95494
95516
|
"github-copilot/gpt-6-astra:medium",
|
|
95495
95517
|
"openai/gpt-6-astra:medium",
|
|
95496
|
-
"anthropic/claude-fable-5-1:
|
|
95497
|
-
"github-copilot/claude-fable-5-1:
|
|
95518
|
+
"anthropic/claude-fable-5-1:medium",
|
|
95519
|
+
"github-copilot/claude-fable-5-1:medium",
|
|
95498
95520
|
"anthropic/claude-opus-5:high",
|
|
95499
95521
|
"github-copilot/claude-opus-5:high",
|
|
95500
|
-
"anthropic/claude-fable-5:
|
|
95501
|
-
"github-copilot/claude-fable-5:
|
|
95502
|
-
"openai-codex/gpt-5.6-sol:
|
|
95503
|
-
"github-copilot/gpt-5.6-sol:
|
|
95504
|
-
"openai/gpt-5.6-sol:
|
|
95522
|
+
"anthropic/claude-fable-5:medium",
|
|
95523
|
+
"github-copilot/claude-fable-5:medium",
|
|
95524
|
+
"openai-codex/gpt-5.6-sol:high",
|
|
95525
|
+
"github-copilot/gpt-5.6-sol:high",
|
|
95526
|
+
"openai/gpt-5.6-sol:high",
|
|
95505
95527
|
"kimi-coding/k3:max",
|
|
95506
95528
|
"moonshotai/kimi-k3:max",
|
|
95507
95529
|
"moonshotai-cn/kimi-k3:max",
|
|
@@ -95519,10 +95541,10 @@ var researchModelConfig = {
|
|
|
95519
95541
|
"baseten/zai-org/GLM-5.3:high",
|
|
95520
95542
|
"baseten/zai-org/GLM-5.3-Flash:high",
|
|
95521
95543
|
"openrouter/openai/gpt-6-astra:medium",
|
|
95522
|
-
"openrouter/anthropic/claude-fable-5-1:
|
|
95544
|
+
"openrouter/anthropic/claude-fable-5-1:medium",
|
|
95523
95545
|
"openrouter/anthropic/claude-opus-5:high",
|
|
95524
|
-
"openrouter/anthropic/claude-fable-5:
|
|
95525
|
-
"openrouter/openai/gpt-5.6-sol:
|
|
95546
|
+
"openrouter/anthropic/claude-fable-5:medium",
|
|
95547
|
+
"openrouter/openai/gpt-5.6-sol:high",
|
|
95526
95548
|
"openrouter/moonshotai/kimi-k3:max",
|
|
95527
95549
|
"openrouter/sakana/fugu-ultra:high",
|
|
95528
95550
|
"openrouter/openai/gpt-5.5:xhigh",
|
|
@@ -95538,15 +95560,15 @@ var orchestratorModelConfig2 = {
|
|
|
95538
95560
|
fallbackModels: [
|
|
95539
95561
|
"github-copilot/gpt-6-astra:medium",
|
|
95540
95562
|
"openai/gpt-6-astra:medium",
|
|
95541
|
-
"anthropic/claude-fable-5-1:
|
|
95542
|
-
"github-copilot/claude-fable-5-1:
|
|
95563
|
+
"anthropic/claude-fable-5-1:medium",
|
|
95564
|
+
"github-copilot/claude-fable-5-1:medium",
|
|
95543
95565
|
"anthropic/claude-opus-5:high",
|
|
95544
95566
|
"github-copilot/claude-opus-5:high",
|
|
95545
|
-
"openai-codex/gpt-5.6-sol:
|
|
95546
|
-
"github-copilot/gpt-5.6-sol:
|
|
95547
|
-
"openai/gpt-5.6-sol:
|
|
95548
|
-
"anthropic/claude-fable-5:
|
|
95549
|
-
"github-copilot/claude-fable-5:
|
|
95567
|
+
"openai-codex/gpt-5.6-sol:high",
|
|
95568
|
+
"github-copilot/gpt-5.6-sol:high",
|
|
95569
|
+
"openai/gpt-5.6-sol:high",
|
|
95570
|
+
"anthropic/claude-fable-5:medium",
|
|
95571
|
+
"github-copilot/claude-fable-5:medium",
|
|
95550
95572
|
"kimi-coding/k3:max",
|
|
95551
95573
|
"moonshotai/kimi-k3:max",
|
|
95552
95574
|
"moonshotai-cn/kimi-k3:max",
|
|
@@ -95564,10 +95586,10 @@ var orchestratorModelConfig2 = {
|
|
|
95564
95586
|
"baseten/zai-org/GLM-5.3:high",
|
|
95565
95587
|
"baseten/zai-org/GLM-5.3-Flash:high",
|
|
95566
95588
|
"openrouter/openai/gpt-6-astra:medium",
|
|
95567
|
-
"openrouter/anthropic/claude-fable-5-1:
|
|
95589
|
+
"openrouter/anthropic/claude-fable-5-1:medium",
|
|
95568
95590
|
"openrouter/anthropic/claude-opus-5:high",
|
|
95569
|
-
"openrouter/openai/gpt-5.6-sol:
|
|
95570
|
-
"openrouter/anthropic/claude-fable-5:
|
|
95591
|
+
"openrouter/openai/gpt-5.6-sol:high",
|
|
95592
|
+
"openrouter/anthropic/claude-fable-5:medium",
|
|
95571
95593
|
"openrouter/moonshotai/kimi-k3:max",
|
|
95572
95594
|
"openrouter/sakana/fugu-ultra:high",
|
|
95573
95595
|
"openrouter/openai/gpt-5.5:xhigh",
|
|
@@ -95582,9 +95604,9 @@ var reviewerAModelConfig = {
|
|
|
95582
95604
|
model: "anthropic/claude-fable-5-1:high",
|
|
95583
95605
|
fallbackModels: [
|
|
95584
95606
|
"github-copilot/claude-fable-5-1:high",
|
|
95585
|
-
"openai-codex/gpt-6-astra:
|
|
95586
|
-
"github-copilot/gpt-6-astra:
|
|
95587
|
-
"openai/gpt-6-astra:
|
|
95607
|
+
"openai-codex/gpt-6-astra:high",
|
|
95608
|
+
"github-copilot/gpt-6-astra:high",
|
|
95609
|
+
"openai/gpt-6-astra:high",
|
|
95588
95610
|
"anthropic/claude-opus-5:high",
|
|
95589
95611
|
"github-copilot/claude-opus-5:high",
|
|
95590
95612
|
"anthropic/claude-fable-5:high",
|
|
@@ -95592,9 +95614,9 @@ var reviewerAModelConfig = {
|
|
|
95592
95614
|
"kimi-coding/k3:max",
|
|
95593
95615
|
"moonshotai/kimi-k3:max",
|
|
95594
95616
|
"moonshotai-cn/kimi-k3:max",
|
|
95595
|
-
"openai-codex/gpt-5.6-sol:
|
|
95596
|
-
"github-copilot/gpt-5.6-sol:
|
|
95597
|
-
"openai/gpt-5.6-sol:
|
|
95617
|
+
"openai-codex/gpt-5.6-sol:high",
|
|
95618
|
+
"github-copilot/gpt-5.6-sol:high",
|
|
95619
|
+
"openai/gpt-5.6-sol:high",
|
|
95598
95620
|
"openai-codex/gpt-5.5:xhigh",
|
|
95599
95621
|
"github-copilot/gpt-5.5:xhigh",
|
|
95600
95622
|
"openai/gpt-5.5:xhigh",
|
|
@@ -95609,11 +95631,11 @@ var reviewerAModelConfig = {
|
|
|
95609
95631
|
"baseten/zai-org/GLM-5.3:high",
|
|
95610
95632
|
"baseten/zai-org/GLM-5.3-Flash:high",
|
|
95611
95633
|
"openrouter/anthropic/claude-fable-5-1:high",
|
|
95612
|
-
"openrouter/openai/gpt-6-astra:
|
|
95634
|
+
"openrouter/openai/gpt-6-astra:high",
|
|
95613
95635
|
"openrouter/anthropic/claude-opus-5:high",
|
|
95614
95636
|
"openrouter/anthropic/claude-fable-5:high",
|
|
95615
95637
|
"openrouter/moonshotai/kimi-k3:max",
|
|
95616
|
-
"openrouter/openai/gpt-5.6-sol:
|
|
95638
|
+
"openrouter/openai/gpt-5.6-sol:high",
|
|
95617
95639
|
"openrouter/sakana/fugu-ultra:high",
|
|
95618
95640
|
"openrouter/openai/gpt-5.5:xhigh",
|
|
95619
95641
|
"openrouter/anthropic/claude-opus-4-8:high",
|
|
@@ -95625,19 +95647,19 @@ var reviewerAModelConfig = {
|
|
|
95625
95647
|
schema: reviewDecisionSchema2
|
|
95626
95648
|
};
|
|
95627
95649
|
var reviewerBModelConfig = {
|
|
95628
|
-
model: "openai-codex/gpt-6-astra:
|
|
95650
|
+
model: "openai-codex/gpt-6-astra:high",
|
|
95629
95651
|
fallbackModels: [
|
|
95630
|
-
"github-copilot/gpt-6-astra:
|
|
95631
|
-
"openai/gpt-6-astra:
|
|
95652
|
+
"github-copilot/gpt-6-astra:high",
|
|
95653
|
+
"openai/gpt-6-astra:high",
|
|
95632
95654
|
"anthropic/claude-fable-5-1:high",
|
|
95633
95655
|
"github-copilot/claude-fable-5-1:high",
|
|
95634
95656
|
"anthropic/claude-opus-5:high",
|
|
95635
95657
|
"github-copilot/claude-opus-5:high",
|
|
95636
95658
|
"anthropic/claude-fable-5:high",
|
|
95637
95659
|
"github-copilot/claude-fable-5:high",
|
|
95638
|
-
"openai-codex/gpt-5.6-sol:
|
|
95639
|
-
"github-copilot/gpt-5.6-sol:
|
|
95640
|
-
"openai/gpt-5.6-sol:
|
|
95660
|
+
"openai-codex/gpt-5.6-sol:high",
|
|
95661
|
+
"github-copilot/gpt-5.6-sol:high",
|
|
95662
|
+
"openai/gpt-5.6-sol:high",
|
|
95641
95663
|
"kimi-coding/k3:max",
|
|
95642
95664
|
"moonshotai/kimi-k3:max",
|
|
95643
95665
|
"moonshotai-cn/kimi-k3:max",
|
|
@@ -95654,11 +95676,11 @@ var reviewerBModelConfig = {
|
|
|
95654
95676
|
"zai-coding-cn/glm-5.3-flash:high",
|
|
95655
95677
|
"baseten/zai-org/GLM-5.3:high",
|
|
95656
95678
|
"baseten/zai-org/GLM-5.3-Flash:high",
|
|
95657
|
-
"openrouter/openai/gpt-6-astra:
|
|
95679
|
+
"openrouter/openai/gpt-6-astra:high",
|
|
95658
95680
|
"openrouter/anthropic/claude-fable-5-1:high",
|
|
95659
95681
|
"openrouter/anthropic/claude-opus-5:high",
|
|
95660
95682
|
"openrouter/anthropic/claude-fable-5:high",
|
|
95661
|
-
"openrouter/openai/gpt-5.6-sol:
|
|
95683
|
+
"openrouter/openai/gpt-5.6-sol:high",
|
|
95662
95684
|
"openrouter/moonshotai/kimi-k3:max",
|
|
95663
95685
|
"openrouter/sakana/fugu-ultra:high",
|
|
95664
95686
|
"openrouter/openai/gpt-5.5:xhigh",
|
|
@@ -101642,6 +101664,7 @@ function createTaskPrimitive(runtime) {
|
|
|
101642
101664
|
...sessionId !== undefined ? { sessionId } : {},
|
|
101643
101665
|
...stage.sessionFile !== undefined ? { sessionFile: stage.sessionFile } : {},
|
|
101644
101666
|
...stageMeta.model !== undefined ? { model: stageMeta.model } : {},
|
|
101667
|
+
...stageMeta.thinkingLevel !== undefined ? { thinkingLevel: stageMeta.thinkingLevel } : {},
|
|
101645
101668
|
...stageMeta.attemptedModels !== undefined ? { attemptedModels: stageMeta.attemptedModels } : {},
|
|
101646
101669
|
...stageMeta.modelAttempts !== undefined ? { modelAttempts: stageMeta.modelAttempts } : {},
|
|
101647
101670
|
...stageMeta.warnings !== undefined ? { warnings: stageMeta.warnings } : {}
|
|
@@ -102384,6 +102407,7 @@ function mergeStageDraft(existing, checkpoint, sequence) {
|
|
|
102384
102407
|
...valueOrExisting("endedAt", checkpoint, existing),
|
|
102385
102408
|
...valueOrExisting("durationMs", checkpoint, existing),
|
|
102386
102409
|
...valueOrExisting("model", checkpoint, existing),
|
|
102410
|
+
...valueOrExisting("thinkingLevel", checkpoint, existing),
|
|
102387
102411
|
...valueOrExisting("attemptedModels", checkpoint, existing),
|
|
102388
102412
|
...valueOrExisting("modelAttempts", checkpoint, existing),
|
|
102389
102413
|
...checkpoint.topology !== undefined ? { topology: checkpoint.topology } : existing?.topology !== undefined ? { topology: existing.topology } : {}
|
|
@@ -103273,6 +103297,7 @@ function stageSnapshotFromDraft(draft, id, parentIds) {
|
|
|
103273
103297
|
...draft.sessionId !== undefined ? { sessionId: draft.sessionId } : {},
|
|
103274
103298
|
...draft.sessionFile !== undefined ? { sessionFile: draft.sessionFile } : {},
|
|
103275
103299
|
...draft.model !== undefined ? { model: draft.model } : {},
|
|
103300
|
+
...draft.thinkingLevel !== undefined ? { thinkingLevel: draft.thinkingLevel } : {},
|
|
103276
103301
|
...draft.attemptedModels !== undefined ? { attemptedModels: draft.attemptedModels } : {},
|
|
103277
103302
|
...draft.modelAttempts !== undefined ? { modelAttempts: draft.modelAttempts } : {}
|
|
103278
103303
|
};
|
|
@@ -105053,7 +105078,7 @@ function createReplayStageContext(input) {
|
|
|
105053
105078
|
return replaySource.model;
|
|
105054
105079
|
},
|
|
105055
105080
|
get thinkingLevel() {
|
|
105056
|
-
return;
|
|
105081
|
+
return replaySource.thinkingLevel;
|
|
105057
105082
|
},
|
|
105058
105083
|
get messages() {
|
|
105059
105084
|
return [];
|
|
@@ -105079,6 +105104,7 @@ function createReplayStageContext(input) {
|
|
|
105079
105104
|
__pendingMessageCount: () => 0,
|
|
105080
105105
|
__modelFallbackMeta: () => ({
|
|
105081
105106
|
...replaySource.model !== undefined ? { model: replaySource.model } : {},
|
|
105107
|
+
...replaySource.thinkingLevel !== undefined ? { thinkingLevel: replaySource.thinkingLevel } : {},
|
|
105082
105108
|
...replaySource.attemptedModels !== undefined ? { attemptedModels: replaySource.attemptedModels } : {},
|
|
105083
105109
|
...replaySource.modelAttempts !== undefined ? { modelAttempts: replaySource.modelAttempts } : {}
|
|
105084
105110
|
}),
|
|
@@ -106964,8 +106990,10 @@ class StageSessionController {
|
|
|
106964
106990
|
currentModelFallbackMeta() {
|
|
106965
106991
|
const attemptedModels = this.modelAttempts.map((attempt) => attempt.model);
|
|
106966
106992
|
const model = this.selectedModel ?? workflowModelId(this.session?.model);
|
|
106993
|
+
const thinkingLevel = this.session?.thinkingLevel ?? this.pendingThinkingLevel;
|
|
106967
106994
|
return {
|
|
106968
106995
|
...model !== undefined ? { model } : {},
|
|
106996
|
+
...thinkingLevel !== undefined ? { thinkingLevel } : {},
|
|
106969
106997
|
...attemptedModels.length > 0 ? { attemptedModels } : {},
|
|
106970
106998
|
...this.modelAttempts.length > 0 ? { modelAttempts: [...this.modelAttempts] } : {},
|
|
106971
106999
|
...this.modelWarnings.length > 0 ? { warnings: [...this.modelWarnings] } : {}
|
|
@@ -108335,6 +108363,8 @@ function createWorkflowStageFactory(input) {
|
|
|
108335
108363
|
...replaySource.result !== undefined ? { result: replaySource.result } : {},
|
|
108336
108364
|
...replaySource.sessionId !== undefined ? { sessionId: replaySource.sessionId } : {},
|
|
108337
108365
|
...replaySource.sessionFile !== undefined ? { sessionFile: replaySource.sessionFile } : {},
|
|
108366
|
+
...replaySource.model !== undefined ? { model: replaySource.model } : {},
|
|
108367
|
+
...replaySource.thinkingLevel !== undefined ? { thinkingLevel: replaySource.thinkingLevel } : {},
|
|
108338
108368
|
replayedFromStageId: replaySource.id,
|
|
108339
108369
|
replayed: true
|
|
108340
108370
|
} : {},
|
|
@@ -108359,6 +108389,10 @@ function createWorkflowStageFactory(input) {
|
|
|
108359
108389
|
const applyModelFallbackMeta = (meta) => {
|
|
108360
108390
|
if (meta.model !== undefined)
|
|
108361
108391
|
stageSnapshot.model = meta.model;
|
|
108392
|
+
if (meta.thinkingLevel !== undefined)
|
|
108393
|
+
stageSnapshot.thinkingLevel = meta.thinkingLevel;
|
|
108394
|
+
else
|
|
108395
|
+
delete stageSnapshot.thinkingLevel;
|
|
108362
108396
|
if (meta.attemptedModels !== undefined)
|
|
108363
108397
|
stageSnapshot.attemptedModels = meta.attemptedModels;
|
|
108364
108398
|
if (meta.modelAttempts !== undefined)
|
|
@@ -111112,7 +111146,7 @@ function formatWorkflowHeartbeatNoticeText(details) {
|
|
|
111112
111146
|
const workflowName = escapeQuotedText3(details.workflowName);
|
|
111113
111147
|
const elapsed = formatWorkflowHeartbeatElapsed(details);
|
|
111114
111148
|
const cadence = formatWorkflowHeartbeatCadence(details.intervalMinutes);
|
|
111115
|
-
return `${WORKFLOW_HEARTBEAT_GLYPH} Workflow "${workflowName}" heartbeat (run ${details.runId}) — still running` + `${elapsed === undefined ? "" : ` after ${elapsed}`}, on a ${cadence} cadence. ` + "This is a periodic alignment check. Review whether the run is still on goal. " + "When steering or communication is useful, use Intercom. Before steering a stage, join its invocation group. " + "Use the Intercom `groups` action to discover it. Workflow invocation groups are named `workflow:<rootRunId>`. " + "Consider the expanded workflow topology and match each update's reach to its impact: send a local update to " + "its affected stage; when shared scope or acceptance criteria change, broadcast one authoritative Intercom update " + "to `workflow:<rootRunId>/**` (or a narrower path pattern such as `workflow:<rootRunId>/review-*`) rather than " + "enumerating stages, including each worker-to-reviewer loop. `**` reaches every live stage now and remains sticky " + "for every future stage, including nested children, until the root run terminates. Use `intercom list` inside the " + "invocation group to see live, pending, and possible future targets. Targets use " + "`workflow:<rootRunId>/<segment>[/<segment>...]`; `*` matches one segment and `**` any depth. Intercom delivers " + "immediately to live stages and queues updates for known stages that have not started, delivering them before their " + "first model turn, so workers and reviewers begin with one consistent contract. A valid target outside the known set " + "queues with a `notInKnownSet` warning and settles undeliverable at terminal only if never delivered. " + "Use `ask` once the target has a live session that can reply. " + "Use workflow pause, resume,
|
|
111149
|
+
return `${WORKFLOW_HEARTBEAT_GLYPH} Workflow "${workflowName}" heartbeat (run ${details.runId}) — still running` + `${elapsed === undefined ? "" : ` after ${elapsed}`}, on a ${cadence} cadence. ` + "This is a periodic alignment check. Review whether the run is still on goal. " + "When steering or communication is useful, use Intercom. Before steering a stage, join its invocation group. " + "Use the Intercom `groups` action to discover it. Workflow invocation groups are named `workflow:<rootRunId>`. " + "Consider the expanded workflow topology and match each update's reach to its impact: send a local update to " + "its affected stage; when shared scope or acceptance criteria change, broadcast one authoritative Intercom update " + "to `workflow:<rootRunId>/**` (or a narrower path pattern such as `workflow:<rootRunId>/review-*`) rather than " + "enumerating stages, including each worker-to-reviewer loop. `**` reaches every live stage now and remains sticky " + "for every future stage, including nested children, until the root run terminates. Use `intercom list` inside the " + "invocation group to see live, pending, and possible future targets. Targets use " + "`workflow:<rootRunId>/<segment>[/<segment>...]`; `*` matches one segment and `**` any depth. Intercom delivers " + "immediately to live stages and queues updates for known stages that have not started, delivering them before their " + "first model turn, so workers and reviewers begin with one consistent contract. A valid target outside the known set " + "queues with a `notInKnownSet` warning and settles undeliverable at terminal only if never delivered. " + "Use `ask` once the target has a live session that can reply. " + "Use workflow pause, resume, or quit for run control. " + "Continue the progressing run when no intervention is needed, or ask the user when a decision is needed. " + `Inspect: /workflow status ${details.runId}`;
|
|
111116
111150
|
}
|
|
111117
111151
|
function registerWorkflowHeartbeatRenderer(options) {
|
|
111118
111152
|
const register = options.registerMessageRenderer;
|
|
@@ -113927,9 +113961,8 @@ function adminCompletions() {
|
|
|
113927
113961
|
{ value: "attach ", label: "attach", description: "Open the in-place attach pane on a node" },
|
|
113928
113962
|
{ value: "list ", label: "list", description: "List registered workflows" },
|
|
113929
113963
|
{ value: "status ", label: "status", description: "List current-session active and retained terminal runs" },
|
|
113930
|
-
{ value: "
|
|
113964
|
+
{ value: "pause ", label: "pause", description: "Pause a run" },
|
|
113931
113965
|
{ value: "quit ", label: "quit", description: "Quit a run and keep it resumable" },
|
|
113932
|
-
{ value: "pause ", label: "pause", description: "Pause a run or stage" },
|
|
113933
113966
|
{ value: "resume ", label: "resume", description: "Re-open overlay for a run" },
|
|
113934
113967
|
{ value: "inputs ", label: "inputs", description: "Show a workflow's input schema" },
|
|
113935
113968
|
{ value: "reload ", label: "reload", description: "Reload workflow resources" }
|
|
@@ -113956,7 +113989,7 @@ function workflowArgumentCompletionsNeedWorkflowResources(partial) {
|
|
|
113956
113989
|
return true;
|
|
113957
113990
|
if (!subcommand || subcommand === "inputs")
|
|
113958
113991
|
return true;
|
|
113959
|
-
if (["status", "connect", "resume", "attach", "pause", "
|
|
113992
|
+
if (["status", "connect", "resume", "attach", "pause", "quit", "reload"].includes(subcommand)) {
|
|
113960
113993
|
return false;
|
|
113961
113994
|
}
|
|
113962
113995
|
return true;
|
|
@@ -113970,12 +114003,12 @@ function workflowArgumentCompletions(partial, runtime) {
|
|
|
113970
114003
|
}
|
|
113971
114004
|
if (subcommand === "inputs")
|
|
113972
114005
|
return completeToken(partial, workflows());
|
|
113973
|
-
if (["status", "connect", "resume", "attach"
|
|
114006
|
+
if (["status", "connect", "resume", "attach"].includes(subcommand)) {
|
|
113974
114007
|
return completeToken(partial, runIdItems());
|
|
113975
114008
|
}
|
|
113976
|
-
if (subcommand === "
|
|
114009
|
+
if (subcommand === "pause") {
|
|
113977
114010
|
return completeToken(partial, [
|
|
113978
|
-
{ value: "--all ", label: "--all", description: "
|
|
114011
|
+
{ value: "--all ", label: "--all", description: "Pause all in-flight runs" },
|
|
113979
114012
|
{ value: "--yes ", label: "--yes", description: "Skip confirmation" },
|
|
113980
114013
|
{ value: "-y ", label: "-y", description: "Skip confirmation" },
|
|
113981
114014
|
...runIdItems()
|
|
@@ -114791,8 +114824,8 @@ ${renderSessionList(store.runs(), { theme, includeAll: true })}`);
|
|
|
114791
114824
|
print(`Connected to ${resolved.runId}. h hide · ctrl+x leave graph · return to main chat · esc close.`);
|
|
114792
114825
|
return true;
|
|
114793
114826
|
}
|
|
114794
|
-
if (action === "
|
|
114795
|
-
const { tokens, yes } = action === "
|
|
114827
|
+
if (action === "pause" || action === "quit") {
|
|
114828
|
+
const { tokens, yes } = action === "pause" ? stripYesFlag(rest) : { tokens: rest, yes: false };
|
|
114796
114829
|
const unsupportedTarget = action === "quit" ? tokens.find((token) => token === "-y" || token === "--yes") : undefined;
|
|
114797
114830
|
let target = action === "quit" ? unsupportedTarget ?? tokens.find((token) => token !== "--all") : tokens.find((token) => !token.startsWith("--"));
|
|
114798
114831
|
const wantsAll = unsupportedTarget === undefined && tokens.includes("--all");
|
|
@@ -114809,15 +114842,15 @@ ${renderSessionList(store.runs(), { theme, includeAll: true })}`);
|
|
|
114809
114842
|
fail(`No in-flight runs to ${action}.`);
|
|
114810
114843
|
return true;
|
|
114811
114844
|
}
|
|
114812
|
-
if (action === "
|
|
114813
|
-
const title = `
|
|
114845
|
+
if (action === "pause" && !yes && confirmationPrompt) {
|
|
114846
|
+
const title = `Pause all ${inFlight.length} in-flight workflow runs?`;
|
|
114814
114847
|
const body = `Pauses: ${inFlight.map((run) => `${run.name} (${run.id})`).join(", ")}`;
|
|
114815
114848
|
if (!await confirmationPrompt(title, body)) {
|
|
114816
114849
|
print("Cancelled.");
|
|
114817
114850
|
return true;
|
|
114818
114851
|
}
|
|
114819
114852
|
}
|
|
114820
|
-
const results = action === "quit" ? await quitAllRuns({ actor: "user" }) : await
|
|
114853
|
+
const results = action === "quit" ? await quitAllRuns({ actor: "user" }) : await pauseAllRuns();
|
|
114821
114854
|
const successes = results.filter((result) => result.ok);
|
|
114822
114855
|
const changed = successes.length;
|
|
114823
114856
|
const failures = results.filter((result) => !result.ok);
|
|
@@ -114830,7 +114863,7 @@ ${renderSessionList(store.runs(), { theme, includeAll: true })}`);
|
|
|
114830
114863
|
fail(message);
|
|
114831
114864
|
} else if (changed > 0) {
|
|
114832
114865
|
print(successes.some((result) => result.message !== undefined) ? successes.map((result) => result.message ?? `Run ${result.runId} stopped.`).join(`
|
|
114833
|
-
`) : action === "quit" ? `Quit ${changed} run(s); resume with /workflow resume.` : `
|
|
114866
|
+
`) : action === "quit" ? `Quit ${changed} run(s); resume with /workflow resume.` : `Paused ${changed} run(s).`);
|
|
114834
114867
|
} else {
|
|
114835
114868
|
fail(`No in-flight runs to ${action}.`);
|
|
114836
114869
|
}
|
|
@@ -114867,24 +114900,24 @@ ${renderSessionList(store.runs(), { theme, includeAll: true })}`);
|
|
|
114867
114900
|
return true;
|
|
114868
114901
|
}
|
|
114869
114902
|
if (!yes && run && run.endedAt === undefined && confirmationPrompt) {
|
|
114870
|
-
const confirmed = await confirmationPrompt(`
|
|
114903
|
+
const confirmed = await confirmationPrompt(`Pause workflow run ${run.name} (${run.id})?`, "Pauses live work so it can be resumed later.");
|
|
114871
114904
|
if (!confirmed) {
|
|
114872
114905
|
print(`Cancelled. Run ${resolved.runId} is still active.`);
|
|
114873
114906
|
return true;
|
|
114874
114907
|
}
|
|
114875
114908
|
}
|
|
114876
114909
|
try {
|
|
114877
|
-
const result = await
|
|
114910
|
+
const result = await pauseRun(resolved.runId);
|
|
114878
114911
|
if (result.ok)
|
|
114879
|
-
print(result.message ?? `Run ${result.runId}
|
|
114912
|
+
print(result.message ?? `Run ${result.runId} paused and can be resumed.`);
|
|
114880
114913
|
else
|
|
114881
|
-
fail(result.reason === "not_found" ? `Run not found: ${target}` : result.reason === "already_ended" ? `Run already ended: ${target}` : result.reason === "stage_not_found" ? `Stage not found for run ${resolved.runId}.` : `No active stages to
|
|
114914
|
+
fail(result.reason === "not_found" ? `Run not found: ${target}` : result.reason === "already_ended" ? `Run already ended: ${target}` : result.reason === "stage_not_found" ? `Stage not found for run ${resolved.runId}.` : `No active stages to pause on run ${resolved.runId}.`);
|
|
114882
114915
|
} catch (error) {
|
|
114883
|
-
fail(`Failed to
|
|
114916
|
+
fail(`Failed to pause run ${resolved.runId}: ${error instanceof Error ? error.message : String(error)}`);
|
|
114884
114917
|
}
|
|
114885
114918
|
return true;
|
|
114886
114919
|
}
|
|
114887
|
-
if (action === "attach" || action === "
|
|
114920
|
+
if (action === "attach" || action === "resume") {
|
|
114888
114921
|
const target = rest[0];
|
|
114889
114922
|
const stageTarget = rest[1];
|
|
114890
114923
|
const message = action === "resume" ? rest.slice(2).join(" ").trim() || undefined : undefined;
|
|
@@ -114892,14 +114925,7 @@ ${renderSessionList(store.runs(), { theme, includeAll: true })}`);
|
|
|
114892
114925
|
if (!target) {
|
|
114893
114926
|
const ui = ctx.ui;
|
|
114894
114927
|
if (!canOpenPicker(ui)) {
|
|
114895
|
-
if (action === "
|
|
114896
|
-
const active = topLevelWorkflowRuns(store.runs()).filter((r) => r.endedAt === undefined);
|
|
114897
|
-
fail(active.length === 0 ? "No active runs to pause." : `Picker requires an interactive UI surface. Active runs:
|
|
114898
|
-
${active.map((r) => ` ${r.id} ${r.name}`).join(`
|
|
114899
|
-
`)}
|
|
114900
|
-
|
|
114901
|
-
Usage: /workflow pause <runId> [stageId]`);
|
|
114902
|
-
} else if (action === "attach") {
|
|
114928
|
+
if (action === "attach") {
|
|
114903
114929
|
fail(`${renderSessionList(store.runs(), { theme, includeAll: true })}
|
|
114904
114930
|
|
|
114905
114931
|
Picker requires an interactive UI surface. Pass a runId: /workflow attach <id> [stageId]`);
|
|
@@ -115063,21 +115089,6 @@ Picker requires an interactive UI surface. Pass a runId: /workflow attach <id> [
|
|
|
115063
115089
|
}
|
|
115064
115090
|
const stageId = resolvedStage.stageId;
|
|
115065
115091
|
const stageRunId = resolvedStage.runId ?? runId;
|
|
115066
|
-
if (action === "pause") {
|
|
115067
|
-
try {
|
|
115068
|
-
const result = await pauseRun(stageRunId, { stageId, actor: "user" });
|
|
115069
|
-
if (!result.ok) {
|
|
115070
|
-
fail(result.reason === "not_found" ? `Run not found: ${stageRunId}` : result.reason === "already_ended" ? `Run ${stageRunId} already ended.` : result.reason === "no_active_stages" ? `No pausable stages on run ${stageRunId}.` : `Stage not found: ${stageTarget ?? "(unknown)"}`);
|
|
115071
|
-
return true;
|
|
115072
|
-
}
|
|
115073
|
-
if (policy.allowInputPicker)
|
|
115074
|
-
deps.overlay.open(runId, overlaySurfaceFromContext(ctx), stageId, stageRunId);
|
|
115075
|
-
print(result.message ?? (result.paused.length === 0 ? `No stages were paused on run ${stageRunId}.` : `Paused ${result.paused.length} stage(s) on run ${stageRunId}: ${result.paused.map((stage) => stage.name).join(", ")}`));
|
|
115076
|
-
} catch (error) {
|
|
115077
|
-
fail(`Failed to pause run ${stageRunId}: ${error instanceof Error ? error.message : String(error)}`);
|
|
115078
|
-
}
|
|
115079
|
-
return true;
|
|
115080
|
-
}
|
|
115081
115092
|
const run = store.runs().find((r) => r.id === stageRunId);
|
|
115082
115093
|
const hadPausedRunState = run?.status === "paused";
|
|
115083
115094
|
const hadPausedStageState = run !== undefined && workflowHasPausedStages(store, stageRunId);
|
|
@@ -115151,7 +115162,7 @@ Picker requires an interactive UI surface. Pass a runId: /workflow attach <id> [
|
|
|
115151
115162
|
// dist/builtin/workflows/src/extension/workflow-command-registration.ts
|
|
115152
115163
|
function registerWorkflowSlashCommand(pi, workflowCommands, deps) {
|
|
115153
115164
|
registerWorkflowCommand(pi, "workflow", {
|
|
115154
|
-
description: "Run or inspect Atomic workflows. Usage: /workflow <name> [key=value…] | /workflow [list|status|connect|attach|
|
|
115165
|
+
description: "Run or inspect Atomic workflows. Usage: /workflow <name> [key=value…] | /workflow [list|status|connect|attach|quit|pause|resume|inputs|reload] [args]",
|
|
115155
115166
|
handler: (args, ctx) => workflowSlashHandler(args, ctx, pi, deps),
|
|
115156
115167
|
getArgumentCompletions: (partial) => {
|
|
115157
115168
|
const buildCompletions = () => workflowArgumentCompletions(partial, deps.runtimeProxy);
|
|
@@ -115200,7 +115211,7 @@ Available: ${formatAvailableWorkflowNames(deps.runtimeProxy.registry.names())}`)
|
|
|
115200
115211
|
};
|
|
115201
115212
|
const parts = tokenizeWorkflowArgs(args);
|
|
115202
115213
|
const subcommand = parts[0] ?? "";
|
|
115203
|
-
if (["connect", "attach", "
|
|
115214
|
+
if (["connect", "attach", "resume"].includes(subcommand)) {
|
|
115204
115215
|
await handleRunControlCommand(subcommand, parts.slice(1), ctx, reporter, deps.runControl);
|
|
115205
115216
|
return;
|
|
115206
115217
|
}
|
|
@@ -115260,7 +115271,7 @@ Available: ${formatAvailableWorkflowNames(deps.runtimeProxy.registry.names())}`)
|
|
|
115260
115271
|
}
|
|
115261
115272
|
return;
|
|
115262
115273
|
}
|
|
115263
|
-
if (subcommand === "
|
|
115274
|
+
if (subcommand === "pause") {
|
|
115264
115275
|
await handleRunControlCommand(subcommand, withImplicitYesFlag(parts.slice(1)), ctx, reporter, deps.runControl);
|
|
115265
115276
|
return;
|
|
115266
115277
|
}
|
|
@@ -115779,7 +115790,7 @@ function renderStatusToolContent(result) {
|
|
|
115779
115790
|
lines.push(` … ${omitted} more pending stage${omitted === 1 ? "" : "s"}; use status with runId`);
|
|
115780
115791
|
}
|
|
115781
115792
|
});
|
|
115782
|
-
lines.push("hint: status with runId returns full run detail; workflow answer answers pending prompts using runId/stageId/promptId; workflow resume controls paused runs; pause/
|
|
115793
|
+
lines.push("hint: status with runId returns full run detail; workflow answer answers pending prompts using runId/stageId/promptId; workflow resume controls paused runs; pause/quit also accept runId. Ordinary Intercom handles free-form workflow-stage communication at workflow:<rootRunId>/<segment>[/<segment>...]: live stage delivery is immediate; a known pending stage `send` queues before its first model turn; `ask` requires a live reply-capable stage.");
|
|
115783
115794
|
return lines.join(`
|
|
115784
115795
|
`);
|
|
115785
115796
|
}
|
|
@@ -115910,7 +115921,6 @@ function renderWorkflowToolContent(result, args) {
|
|
|
115910
115921
|
case "answer":
|
|
115911
115922
|
case "pause":
|
|
115912
115923
|
case "reload":
|
|
115913
|
-
case "interrupt":
|
|
115914
115924
|
case "quit":
|
|
115915
115925
|
case "resume":
|
|
115916
115926
|
return compactWorkflowToolMessage(result);
|
|
@@ -115996,64 +116006,6 @@ function resumeControlFailure(runId, error) {
|
|
|
115996
116006
|
message: `Failed to resume run ${runId}: ${detail}`
|
|
115997
116007
|
};
|
|
115998
116008
|
}
|
|
115999
|
-
async function workflowPauseAction(args) {
|
|
116000
|
-
const target = resolveToolRunTarget(args, "No in-flight runs to pause.");
|
|
116001
|
-
const action = "pause";
|
|
116002
|
-
if (target.kind === "all") {
|
|
116003
|
-
if (args.stageId !== undefined && args.stageId.length > 0) {
|
|
116004
|
-
return { action, runId: "--all", status: "noop", message: allStageConflictMessage("pause") };
|
|
116005
|
-
}
|
|
116006
|
-
try {
|
|
116007
|
-
const results = await pauseAllRuns({ actor: "agent" });
|
|
116008
|
-
const paused = results.filter((result) => result.ok).length;
|
|
116009
|
-
return {
|
|
116010
|
-
action,
|
|
116011
|
-
runId: "--all",
|
|
116012
|
-
status: paused > 0 ? "paused" : "noop",
|
|
116013
|
-
message: [
|
|
116014
|
-
paused > 0 ? `Paused ${paused} run(s).` : "No in-flight runs to pause.",
|
|
116015
|
-
...results.flatMap((result) => result.ok && result.message !== undefined ? [result.message] : [])
|
|
116016
|
-
].join(`
|
|
116017
|
-
`)
|
|
116018
|
-
};
|
|
116019
|
-
} catch (error) {
|
|
116020
|
-
return controlFailure(action, "--all", error);
|
|
116021
|
-
}
|
|
116022
|
-
}
|
|
116023
|
-
if (target.kind === "malformed" || target.kind === "not_found")
|
|
116024
|
-
return { action, runId: target.target, status: "noop", message: target.message };
|
|
116025
|
-
const controlNode = resolveControlNodeTarget(target.runId, args.stageId);
|
|
116026
|
-
if (!controlNode.ok)
|
|
116027
|
-
return { action, runId: target.runId, status: "noop", message: controlNode.message };
|
|
116028
|
-
if (controlNode.kind === "tool") {
|
|
116029
|
-
return {
|
|
116030
|
-
action,
|
|
116031
|
-
runId: target.runId,
|
|
116032
|
-
status: "noop",
|
|
116033
|
-
message: toolNodePauseRejectionMessage(controlNode.name, controlNode.nodeId)
|
|
116034
|
-
};
|
|
116035
|
-
}
|
|
116036
|
-
const stage = resolveToolStageTarget(target.runId, args.stageId);
|
|
116037
|
-
if (!stage.ok)
|
|
116038
|
-
return { action, runId: target.runId, status: "noop", message: stage.message };
|
|
116039
|
-
const stageRunId = stage.runId ?? target.runId;
|
|
116040
|
-
try {
|
|
116041
|
-
const result = await pauseRun(stageRunId, { stageId: stage.stageId, actor: "agent" });
|
|
116042
|
-
return result.ok ? {
|
|
116043
|
-
action,
|
|
116044
|
-
runId: result.runId,
|
|
116045
|
-
status: "paused",
|
|
116046
|
-
message: result.message ?? `Paused ${result.paused.length} stage(s) on run ${result.runId}.`
|
|
116047
|
-
} : {
|
|
116048
|
-
action,
|
|
116049
|
-
runId: stageRunId,
|
|
116050
|
-
status: "noop",
|
|
116051
|
-
message: stageFailureMessage(stageRunId, result.reason, "pause")
|
|
116052
|
-
};
|
|
116053
|
-
} catch (error) {
|
|
116054
|
-
return controlFailure(action, stageRunId, error);
|
|
116055
|
-
}
|
|
116056
|
-
}
|
|
116057
116009
|
async function workflowReloadAction(args, deps) {
|
|
116058
116010
|
try {
|
|
116059
116011
|
const report = normalizeWorkflowReloadReport(await deps.reloadWorkflowResources());
|
|
@@ -116167,22 +116119,22 @@ async function workflowQuitAction(args) {
|
|
|
116167
116119
|
return controlFailure(action, target.runId, error);
|
|
116168
116120
|
}
|
|
116169
116121
|
}
|
|
116170
|
-
async function
|
|
116171
|
-
const target = resolveToolRunTarget(args, "No in-flight runs to
|
|
116172
|
-
const action = "
|
|
116122
|
+
async function workflowPauseAction(args) {
|
|
116123
|
+
const target = resolveToolRunTarget(args, "No in-flight runs to pause.");
|
|
116124
|
+
const action = "pause";
|
|
116173
116125
|
if (target.kind === "all") {
|
|
116174
116126
|
if (args.stageId !== undefined && args.stageId.length > 0) {
|
|
116175
|
-
return { action, runId: "--all", status: "noop", message: allStageConflictMessage("
|
|
116127
|
+
return { action, runId: "--all", status: "noop", message: allStageConflictMessage("pause") };
|
|
116176
116128
|
}
|
|
116177
116129
|
try {
|
|
116178
|
-
const results = await
|
|
116179
|
-
const
|
|
116130
|
+
const results = await pauseAllRuns();
|
|
116131
|
+
const paused = results.filter((result) => result.ok).length;
|
|
116180
116132
|
return {
|
|
116181
116133
|
action,
|
|
116182
116134
|
runId: "--all",
|
|
116183
|
-
status:
|
|
116135
|
+
status: paused > 0 ? "paused" : "noop",
|
|
116184
116136
|
message: [
|
|
116185
|
-
|
|
116137
|
+
paused > 0 ? `Paused ${paused} run(s).` : "No in-flight runs to pause.",
|
|
116186
116138
|
...results.flatMap((result) => result.ok && result.message !== undefined ? [result.message] : [])
|
|
116187
116139
|
].join(`
|
|
116188
116140
|
`)
|
|
@@ -116203,20 +116155,20 @@ async function workflowInterruptAction(args) {
|
|
|
116203
116155
|
return { action, runId: target.runId, status: "noop", message: stage.message };
|
|
116204
116156
|
const stageRunId = stage.runId ?? target.runId;
|
|
116205
116157
|
try {
|
|
116206
|
-
const result = await
|
|
116158
|
+
const result = await pauseRun(stageRunId, { stageId: stage.stageId });
|
|
116207
116159
|
if (result.ok) {
|
|
116208
116160
|
return {
|
|
116209
116161
|
action,
|
|
116210
116162
|
runId: result.runId,
|
|
116211
116163
|
status: "paused",
|
|
116212
|
-
message: result.message ?? (stage.stageId ? `Stage ${stage.stageId}
|
|
116164
|
+
message: result.message ?? (stage.stageId ? `Stage ${stage.stageId} paused on run ${result.runId} and can be resumed.` : `Run ${result.runId} paused and can be resumed.`)
|
|
116213
116165
|
};
|
|
116214
116166
|
}
|
|
116215
116167
|
return {
|
|
116216
116168
|
action,
|
|
116217
116169
|
runId: stageRunId,
|
|
116218
116170
|
status: "noop",
|
|
116219
|
-
message: stageFailureMessage(stageRunId, result.reason, "
|
|
116171
|
+
message: stageFailureMessage(stageRunId, result.reason, "pause")
|
|
116220
116172
|
};
|
|
116221
116173
|
} catch (error) {
|
|
116222
116174
|
return controlFailure(action, stageRunId, error);
|
|
@@ -116848,8 +116800,6 @@ function makeExecuteWorkflowTool(runtime, reloadWorkflowResources, ensureWorkflo
|
|
|
116848
116800
|
return awaitRequest(workflowReloadAction(args, { reloadWorkflowResources }));
|
|
116849
116801
|
case "quit":
|
|
116850
116802
|
return awaitRequest(workflowQuitAction(args));
|
|
116851
|
-
case "interrupt":
|
|
116852
|
-
return awaitRequest(workflowInterruptAction(args));
|
|
116853
116803
|
case "resume":
|
|
116854
116804
|
return awaitRequest(workflowResumeAction(args, { getRuntime, policy, ensureWorkflowResourcesLoaded, signal, onRunAccepted }));
|
|
116855
116805
|
default: {
|
|
@@ -116911,9 +116861,6 @@ function renderCall(args, opts = {}) {
|
|
|
116911
116861
|
case "reload":
|
|
116912
116862
|
line = "workflow: reload runtime";
|
|
116913
116863
|
break;
|
|
116914
|
-
case "interrupt":
|
|
116915
|
-
line = name === undefined ? "workflow: interrupt run" : `workflow: interrupt run ${quoted(name)}`;
|
|
116916
|
-
break;
|
|
116917
116864
|
case "quit":
|
|
116918
116865
|
line = name === undefined ? "workflow: quit run" : `workflow: quit run ${quoted(name)}`;
|
|
116919
116866
|
break;
|
|
@@ -117115,10 +117062,6 @@ function renderResult(result, opts) {
|
|
|
117115
117062
|
const r = result;
|
|
117116
117063
|
return renderNotice("WORKFLOW RELOAD", r.message, opts, themed);
|
|
117117
117064
|
}
|
|
117118
|
-
case "interrupt": {
|
|
117119
|
-
const r = result;
|
|
117120
|
-
return renderNotice("WORKFLOW INTERRUPT", `${r.runId}: ${r.message}`, opts, themed);
|
|
117121
|
-
}
|
|
117122
117065
|
case "quit": {
|
|
117123
117066
|
const r = result;
|
|
117124
117067
|
return renderNotice("WORKFLOW QUIT", `${r.runId}: ${r.message}`, opts, themed);
|
|
@@ -117148,7 +117091,7 @@ function renderResult(result, opts) {
|
|
|
117148
117091
|
}
|
|
117149
117092
|
|
|
117150
117093
|
// dist/builtin/workflows/src/extension/workflow-prompts.ts
|
|
117151
|
-
var WORKFLOW_TOOL_DESCRIPTION = "Run named builtin, project, user, or package workflows; custom definitions may import reusable project/package workflows or builtin definitions from @bastani/atomic/workflows/builtin and nest them with ctx.workflow(...), including deeper composition within the configured maxDepth; " + "Requests to do the task 'quickly' or 'inline' mean no workflow creation or launch, including hidden/nested replacements. " + "when workflow execution fits but another shape would better achieve the task, author a custom TypeScript workflow({...}) inline with normal coding tools, reload it, and run it; after successfully creating and reloading a newly authored custom workflow, report the folder containing its generated code as 'Custom workflow created. You can inspect its code at: <workflow-folder-path>'; do this only for newly created custom workflows, never builtin or pre-existing workflows; " + "discover with list/get/inputs/models, list session runs with status (no runId; statusFilter narrows the list), inspect status/stages/stage details, " + "answer pending prompts only while the root workflow is nonterminal, pause/resume/
|
|
117094
|
+
var WORKFLOW_TOOL_DESCRIPTION = "Run named builtin, project, user, or package workflows; custom definitions may import reusable project/package workflows or builtin definitions from @bastani/atomic/workflows/builtin and nest them with ctx.workflow(...), including deeper composition within the configured maxDepth; " + "Requests to do the task 'quickly' or 'inline' mean no workflow creation or launch, including hidden/nested replacements. " + "when workflow execution fits but another shape would better achieve the task, author a custom TypeScript workflow({...}) inline with normal coding tools, reload it, and run it; after successfully creating and reloading a newly authored custom workflow, report the folder containing its generated code as 'Custom workflow created. You can inspect its code at: <workflow-folder-path>'; do this only for newly created custom workflows, never builtin or pre-existing workflows; " + "discover with list/get/inputs/models, list session runs with status (no runId; statusFilter narrows the list), inspect status/stages/stage details, " + "answer pending prompts only while the root workflow is nonterminal, pause/resume/quit runs, and reload workflow resources. " + "When steering or communication is useful, use Intercom. Before steering a stage, join its invocation group. Use the Intercom `groups` action to discover it. Workflow invocation groups are named `workflow:<rootRunId>`. Then address the stage as `workflow:<rootRunId>/<segment>[/<segment>...]`; each segment may be a stage name, run id, or glob (`*` matches one segment and `**` any depth). Use `intercom list` inside the invocation group to see live, pending, and possible future targets. Live delivery is immediate; a known stage that has not started is queued and receives the message before its first model turn. Name and pattern sends remain sticky for every future matching stage until the root run terminates. When shared scope or acceptance criteria change, broadcast one authoritative update to `workflow:<rootRunId>/**` (or a narrower path pattern) rather than enumerating stages. A syntactically valid target outside the known set queues with a `notInKnownSet` warning and settles undeliverable at terminal only if never delivered. Use `ask` only for a reply-capable live session. " + "Treat a blocked run as continuable by default unless the user requests inline/no-workflow execution: then safely hold/stop it, reconcile completed work and in-flight side effects, and continue inline without duplication. Otherwise resume resumable blocks, answer pending prompts, steer past the obstacle, or start a follow-up workflow past a terminal block; resolve material ambiguity from user intent and repository evidence without bypassing safety or authorization. " + "For action 'run' and 'resume', budget accepts per-field duration, token, cost, and warning overrides; fields resolve over the workflow declaration and config, and 0 disables a field. " + "Before launching, share an estimated duration without confidence labels. Proceed with inherited budget limits without asking the user to choose a budget before each launch. Pass budget only for a user-specified limit; otherwise omit it and inherit the declaration and config. An estimate is not a budget. " + "For primitive prompt answers, use booleans or the documented confirm labels, exact case-insensitive select labels or 1-based indexes, and text strings for input/editor; an invalid answer remains pending and returns guidance instead of choosing a default. " + "For large stage handoffs, write context to files/artifacts, pass paths via reads, and prompt downstream agents to 'Read the file at <path>...' instead of injecting large previous text. " + "Wrap critical parts of run inputs and steering messages in <keepContext>...</keepContext> so compaction preserves them verbatim in the stages that inherit them; tag role constraints, prohibitions, must-hold criteria, and identifiers, not background or bulk reference material. " + "For transcripts, prefer status/stages/stage to get sessionFile/transcriptPath, " + "quote the exact path without rewriting separators (Windows backslashes are valid), " + "then search it with rg/grep and read small ranges; transcript is path-only by default when sessionFile/transcriptPath exists, explicit tail/limit returns bounded previews, and missing transcript paths fall back to a small preview. " + "Use action 'models' to inspect models in the configured catalog; the result is a configured-auth snapshot showing what's present in the registry with configured authentication, not proof of credentials, entitlements, OAuth freshness, or live provider access. " + "When authoring a workflow that should dynamically select a model, first call workflow({ action: 'models' }) to inspect the configured catalog, then select from the returned provider/id entries considering the isCurrent marker and available thinking levels.";
|
|
117152
117095
|
var DEFAULT_PROMPT_GUIDANCE = [
|
|
117153
117096
|
`**Workflows**: Unless the user explicitly chooses inline execution for this task, treat workflows as the default execution path for non-trivial tasks and requests with structure and a verifiable objective. The following fit, architecture, launch and recovery defaults apply only when that choice has not opted out. Use the \`workflow\` tool for existing named workflows; when a different graph is needed, author a custom TypeScript \`workflow({...})\` with normal coding tools, reload workflow resources, and run it.
|
|
117154
117097
|
- Explicit requests such as "quickly", "inline", "do this directly", "don't use a workflow", or equivalent wording mean no workflow creation or launch for the specified task, even when complex. Treat "quickly" as an inline execution choice, not a request for a faster workflow. Do not substitute a hidden/nested workflow or pressure the user to reapprove their choice. Preserve appropriate testing, review and evidence inline, and all unrelated safety and authorization constraints. Quoted examples and questions about inline code are not execution-mode instructions; neither are descriptions of software that should run quickly. Do not extend a scoped preference to unrelated tasks.
|
|
@@ -117186,10 +117129,10 @@ var DEFAULT_PROMPT_GUIDANCE = [
|
|
|
117186
117129
|
- For unfamiliar named workflows, discover with \`action: "list"\`, inspect with \`action: "get"\` or \`action: "inputs"\`, and run with \`action: "run"\`, \`workflow\`, and validated \`inputs\`; do not invent workflow names or input keys.
|
|
117187
117130
|
- Before launching a workflow, give the user an estimated wall-clock completion range without confidence labels or scores. Base it on the critical path rather than summing parallel node durations; cite available timing sources and distinguish observed check runtimes from estimated model work, queue time, repair risk, and human wait time. If history is missing, state that briefly rather than inventing metrics. An estimate is not a \`budget\` override or a promise.
|
|
117188
117131
|
- Proceed with inherited budget limits without asking the user to choose a budget before each launch; preserve existing budget limits and approval gates. Do not pass a \`budget\` unless the user asked for a limit: omitting \`budget\` inherits the workflow declaration and config. When the user does state a limit, pass only the fields they named, leave every other field inherited, and use \`0\` to disable a field they asked you to remove. Never convert an estimate into a cap.
|
|
117189
|
-
- Heartbeat cadence is 15 minutes by default. Keep that interval unless the user explicitly asks for a different cadence. A heartbeat is a periodic alignment check: re-read the objective, judge whether the run is still on goal, and continue a progressing run when no intervention is needed. Use workflow pause, resume,
|
|
117132
|
+
- Heartbeat cadence is 15 minutes by default. Keep that interval unless the user explicitly asks for a different cadence. A heartbeat is a periodic alignment check: re-read the objective, judge whether the run is still on goal, and continue a progressing run when no intervention is needed. Use workflow pause, resume, or quit when run control is useful, and ask the user when a decision is needed.
|
|
117190
117133
|
- Wrap critical parts of the \`inputs\` you pass — objective, prompt, acceptance criteria — in \`<keepContext>\` / \`</keepContext>\`. Tagged text survives compaction verbatim regardless of the compression ratio, and stages inherit it because workflows inject your inputs into their prompts. A long stage is compacted repeatedly, and compaction ranks lines individually: a verbose restated objective outlives the one line that bounds it, so a stage can end up executing a coherent but unbounded version of what you asked for. Decide this per launch rather than tagging everything — tag role constraints, prohibitions, must-hold criteria, and identifiers such as a target branch, worktree path, or issue number; leave background, quoted issue text, and reference material untagged and pass bulk through files and \`reads\`. Protected lines count against the keep target rather than raising it, so an over-tagged input makes the evidence stages need compress harder.
|
|
117191
117134
|
- Tag steering the same way. An Intercom \`send\` amendment is authoritative and stages must carry it forward, but it arrives late in an already-long session and is exactly one short message competing with the whole transcript; \`<keepContext>\` around the requirement keeps it from being compacted away before the stage acts on it.
|
|
117192
|
-
- In interactive chat, named workflow launches run in the background. Run \`/workflow connect <run>\` to see agents working and chat with and steer each stage. Inspection and control calls (\`status\`, \`stages\`, \`stage\`, \`transcript\`, \`answer\`, \`pause\`, \`resume\`, \`
|
|
117135
|
+
- In interactive chat, named workflow launches run in the background. Run \`/workflow connect <run>\` to see agents working and chat with and steer each stage. Inspection and control calls (\`status\`, \`stages\`, \`stage\`, \`transcript\`, \`answer\`, \`pause\`, \`resume\`, \`quit\`) remain available while work runs.
|
|
117193
117136
|
- At lifecycle updates, revise the estimate only when new evidence materially changes the remaining path; at completion, report actual elapsed time against the estimate and note the main bottleneck for future scheduling. Do not add confidence labels or scores to duration estimates.
|
|
117194
117137
|
- \`workflow answer\` handles a pending human-input prompt. Before steering a stage, join its invocation group. Use the Intercom \`groups\` action to discover it. Workflow invocation groups are named \`workflow:<rootRunId>\`. Send free-form updates through Intercom to \`workflow:<rootRunId>/<segment>[/<segment>...]\`; each segment may be a stage name, run id, or glob (\`*\` matches one segment and \`**\` any depth). Use \`intercom list\` inside the invocation group to see live, pending, and possible future targets. Atomic delivers immediately to live stages and queues messages for known stages that have not started, delivering them before their first model turn; name and pattern sends remain sticky for every future matching stage until the root run terminates. When shared scope or acceptance criteria change, broadcast one authoritative update to \`workflow:<rootRunId>/**\` (or a narrower path pattern) rather than enumerating stages. A valid target outside the known set queues with a \`notInKnownSet\` warning and settles undeliverable at terminal only if never delivered. Use \`ask\` once the target has a live session that can reply. Use explicit \`/workflow attach <run> <stage>\` for user-driven post-mortem chat.
|
|
117195
117138
|
- A blocked run is continuable by default unless the user requests inline/no-workflow execution. Honor that preference by safely holding/stopping the affected run and reconciling completed work and in-flight effects before continuing inline without duplication. Otherwise resume, answer pending prompts, steer, or use a follow-up workflow; minimal remaining work can be completed inline. Resolve material ambiguity from the objective and repository evidence without bypassing authorization.
|
|
@@ -117197,7 +117140,7 @@ var DEFAULT_PROMPT_GUIDANCE = [
|
|
|
117197
117140
|
- When \`ask_user_question\` or an equivalent question tool is available, all agent-authored questions to the user must use that tool instead of plain text, including clarifications, choices, confirmations, and permission to proceed. Prefer \`ask_user_question\` when available; otherwise use the equivalent tool's supported schema. In these sessions, never end a status or final message with a prose-only question. This does not replace workflow-authored \`ctx.ui\` gates or \`workflow answer\` for relaying an actual user response to a pending prompt. Intercom questions are for agents, not a substitute for user approval.
|
|
117198
117141
|
- When human input is unavailable because no usable question tool exists or the session is headless, do not stall on a question. Choose the interpretation best supported by the stated objective and repository evidence: mine git history, commits, PRs, issues, and the user's own comments to infer how they would decide, record the assumption and rationale, and continue fully autonomously on best judgment. Tool unavailability alone is not a blocker. Preserve explicit approval gates, safety, authorization, and budget limits. A cancelled or unanswered available question is not permission to use this fallback.
|
|
117199
117142
|
- Natural-language instructions to create or use a worktree do not enable runner isolation. A named workflow must declare and implement any worktree and feature-branch inputs it supports; inspect its inputs and pass a distinct path and branch for each concurrent item. Reusable \`baseBranch\` binding creates a missing target as a detached checkout from that base or reuses an existing same-repository worktree as-is; neither case checks out a separate feature-branch input.
|
|
117200
|
-
- Once you have started the selected single run or every run in the selected bounded wave, end the current turn and wait for user input or lifecycle notices. Do not use sleep/status polling loops: key start, finish, and failure events arrive automatically. Use targeted \`status\`/\`stages\`/\`stage\` checks only when the user asks or the next step needs them, and use Intercom \`send\`/\`ask\` for stage communication or \`answer\`/\`pause\`/\`resume\`/\`
|
|
117143
|
+
- Once you have started the selected single run or every run in the selected bounded wave, end the current turn and wait for user input or lifecycle notices. Do not use sleep/status polling loops: key start, finish, and failure events arrive automatically. Use targeted \`status\`/\`stages\`/\`stage\` checks only when the user asks or the next step needs them, and use Intercom \`send\`/\`ask\` for stage communication or \`answer\`/\`pause\`/\`resume\`/\`quit\` for workflow prompts and control.
|
|
117201
117144
|
- For transcripts, avoid whole-file reads. Get \`sessionFile\`/\`transcriptPath\` from \`stages\` or \`stage\`, preserve the exact path and platform separators, search with \`rg\`/\`grep\`, and read small relevant ranges; use explicit \`tail\` or \`limit\` only for a bounded preview.`,
|
|
117202
117145
|
`**Workflow authoring and handoffs**:
|
|
117203
117146
|
- When a user asks to create or edit a workflow, clarify only unresolved requirements that materially affect its purpose, inputs, stages, handoffs, validation, success criteria, or starter pattern. Read the workflow docs/examples, implement the TypeScript definition with normal coding tools, reload it, and run representative test inputs before presenting it. Use the create-spec skill when it adds value; it is not mandatory when context is already sufficient.
|
|
@@ -117266,21 +117209,20 @@ var WorkflowParametersSchema = Type24.Object({
|
|
|
117266
117209
|
Type24.Literal("transcript"),
|
|
117267
117210
|
Type24.Literal("answer"),
|
|
117268
117211
|
Type24.Literal("pause"),
|
|
117269
|
-
Type24.Literal("interrupt"),
|
|
117270
117212
|
Type24.Literal("quit"),
|
|
117271
117213
|
Type24.Literal("resume"),
|
|
117272
117214
|
Type24.Literal("reload")
|
|
117273
117215
|
], {
|
|
117274
|
-
description: "Workflow action: run/list/get/inputs/models/status, inspect stage metadata, answer pending prompts, pause/resume/
|
|
117216
|
+
description: "Workflow action: run/list/get/inputs/models/status, inspect stage metadata, answer pending prompts, pause/resume/quit runs, inspect the configured model catalog, or reload workflow resources. 'status' without runId lists every workflow run in the current session with concise per-run summaries (status, timing, active stages, awaiting-input prompts); filter the listing with statusFilter. 'status' with runId returns one run's full detail. For transcript inspection, prefer status/stages/stage first to get sessionFile/transcriptPath, quote the exact path without rewriting separators (Windows backslashes are valid), then search it with rg/grep and read small ranges; transcript is path-only by default when sessionFile/transcriptPath exists, explicit tail/limit returns bounded previews, and missing transcript paths fall back to a small preview."
|
|
117275
117217
|
})),
|
|
117276
117218
|
runId: Type24.Optional(Type24.String({
|
|
117277
|
-
description: "Full 36-character run UUID for status/stages/stage/transcript/answer/pause/resume/
|
|
117219
|
+
description: "Full 36-character run UUID for status/stages/stage/transcript/answer/pause/resume/quit. Prefixes are not accepted; pass the id exactly as displayed. Omit runId with action 'status' to list all session runs and their statuses. Use '--all' or all:true for supported bulk run-control actions."
|
|
117278
117220
|
})),
|
|
117279
117221
|
all: Type24.Optional(Type24.Boolean({
|
|
117280
|
-
description: "Apply supported run-control actions (pause/
|
|
117222
|
+
description: "Apply supported run-control actions (pause/quit) to all in-flight runs instead of one run; cannot be combined with stageId."
|
|
117281
117223
|
})),
|
|
117282
117224
|
stageId: Type24.Optional(Type24.String({
|
|
117283
|
-
description: "Exact stage id or exact stage name for stage-scoped inspection, transcript, answer, pause, or resume. Prefixes and partial names are not accepted. A nested stage id is the full 'runId:stageId' composite. For
|
|
117225
|
+
description: "Exact stage id or exact stage name for stage-scoped inspection, transcript, answer, pause, or resume. Prefixes and partial names are not accepted. A nested stage id is the full 'runId:stageId' composite. For pause and quit it may also name an in-flight ctx.tool node by its exact tool:<argsHash> id or tool name, which aborts that single call."
|
|
117284
117226
|
})),
|
|
117285
117227
|
message: Type24.Optional(Type24.String({
|
|
117286
117228
|
description: "Prompt answer text for answer, or optional text forwarded when resuming paused work."
|
|
@@ -117334,7 +117276,6 @@ var MUTATING_WORKFLOW_ACTIONS = new Set([
|
|
|
117334
117276
|
"answer",
|
|
117335
117277
|
"pause",
|
|
117336
117278
|
"resume",
|
|
117337
|
-
"interrupt",
|
|
117338
117279
|
"quit"
|
|
117339
117280
|
]);
|
|
117340
117281
|
function workflowToolTimeoutResult(args, timeoutMs, runId) {
|