@hearsay-tools/squawk 0.18.0-pr3680.6704 → 0.18.0-pr3682.6705
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/dist/ci-wait/tools.d.ts +4 -4
- package/dist/contract/index.js +26 -67
- package/dist/contract/tool-display.d.ts +2 -8
- package/dist/delegation/routes.d.ts +9 -9
- package/dist/delegation/transport.d.ts +11 -11
- package/dist/server/server.d.ts +40 -40
- package/dist/workflows/run/auto-resume.d.ts +7 -6
- package/dist/workflows/run/auto-resume.js +16 -25
- package/dist/workflows/run/auto-resume.js.map +1 -1
- package/dist/workflows/run/compose.d.ts +3 -0
- package/dist/workflows/run/compose.js +9 -8
- package/dist/workflows/run/compose.js.map +1 -1
- package/dist/workflows/run/continuation-session.js +2 -0
- package/dist/workflows/run/continuation-session.js.map +1 -1
- package/dist/workflows/run/family-reconciler.d.ts +4 -5
- package/dist/workflows/run/family-reconciler.js +9 -19
- package/dist/workflows/run/family-reconciler.js.map +1 -1
- package/dist/workflows/run/inbox-claims.d.ts +3 -4
- package/dist/workflows/run/inbox-claims.js +7 -17
- package/dist/workflows/run/inbox-claims.js.map +1 -1
- package/dist/workflows/run/input-delivery.d.ts +3 -1
- package/dist/workflows/run/input-delivery.js +14 -15
- package/dist/workflows/run/input-delivery.js.map +1 -1
- package/dist/workflows/run/input-timers.js +3 -2
- package/dist/workflows/run/input-timers.js.map +1 -1
- package/dist/workflows/run/liveness-timers.d.ts +93 -0
- package/dist/workflows/run/liveness-timers.js +105 -0
- package/dist/workflows/run/liveness-timers.js.map +1 -0
- package/dist/workflows/run/run-memory.d.ts +10 -2
- package/dist/workflows/run/run-memory.js +20 -5
- package/dist/workflows/run/run-memory.js.map +1 -1
- package/dist/workflows/run/squawk-tools.js +2 -0
- package/dist/workflows/run/squawk-tools.js.map +1 -1
- package/dist/workflows/run/subagent-waits.d.ts +3 -5
- package/dist/workflows/run/subagent-waits.js +13 -32
- package/dist/workflows/run/subagent-waits.js.map +1 -1
- package/dist/workflows/run/turn-nudges.d.ts +3 -1
- package/dist/workflows/run/turn-nudges.js +9 -6
- package/dist/workflows/run/turn-nudges.js.map +1 -1
- package/dist/workflows/run/turn-settler.d.ts +3 -1
- package/dist/workflows/run/turn-settler.js +7 -4
- package/dist/workflows/run/turn-settler.js.map +1 -1
- package/dist/workflows/run/wake-retries.d.ts +5 -7
- package/dist/workflows/run/wake-retries.js +17 -42
- package/dist/workflows/run/wake-retries.js.map +1 -1
- package/dist/workflows/run/worker-executions.js +2 -0
- package/dist/workflows/run/worker-executions.js.map +1 -1
- package/dist/workflows/run.js +8 -1
- package/dist/workflows/run.js.map +1 -1
- package/package.json +4 -4
- package/web/dist/assets/{activity-motion-Bo3DSClA.js → activity-motion-DhLXb8Pt.js} +1 -1
- package/web/dist/assets/{activity-route-CfGqqmUD.js → activity-route-CpwAMYLn.js} +1 -1
- package/web/dist/assets/{commit-diff-panel-Bk_yx3s_.js → commit-diff-panel-B1KZl0GP.js} +1 -1
- package/web/dist/assets/{diff-CH-CzEME.js → diff-Ci-qd1lU.js} +2 -2
- package/web/dist/assets/{diff-view-CemuOcKY.js → diff-view-CWZElKoD.js} +1 -1
- package/web/dist/assets/{file-preview-BGP_kwVG.js → file-preview-CoWRr13R.js} +1 -1
- package/web/dist/assets/{git-toolbar-DiQHX3zX.js → git-toolbar-BYIni94R.js} +1 -1
- package/web/dist/assets/{github-ewv9XcX7.js → github-CAPNq5vY.js} +1 -1
- package/web/dist/assets/{global-activity-route-DtXw16bt.js → global-activity-route-DLEwsMA7.js} +1 -1
- package/web/dist/assets/{index-CKBFwvDn.js → index-CpwAOct4.js} +3 -3
- package/web/dist/assets/preview-pane-connected-CGw_9VuF.js +3 -0
- package/web/dist/assets/{repo-git-VH2mT5OQ.js → repo-git-CzVLCWig.js} +1 -1
- package/web/dist/assets/{report-reader-BfHmLFWl.js → report-reader-iTBkUgg-.js} +1 -1
- package/web/dist/assets/{reports-DqqsHg3P.js → reports-BJF1Cl3C.js} +1 -1
- package/web/dist/assets/{run-header-BOjD88eW.js → run-header-BxB6gyt1.js} +1 -1
- package/web/dist/assets/{skills-44uNUDHd.js → skills-DvgHKWgK.js} +1 -1
- package/web/dist/assets/{task-changes-BdEXlYl_.js → task-changes-CStxhLFG.js} +1 -1
- package/web/dist/assets/{task-commits-DG_jFtVv.js → task-commits-DhpOAdOf.js} +1 -1
- package/web/dist/assets/{task-files-CTAyc6ID.js → task-files-COmKUUfN.js} +1 -1
- package/web/dist/assets/{task-github-item-BcSX-Bfj.js → task-github-item-BNLeAz58.js} +1 -1
- package/web/dist/assets/task-thread-DjSFvEQe.js +9 -0
- package/web/dist/assets/thread-state-B5tTsVNm.js +4 -0
- package/web/dist/assets/{use-hand-to-agent-state-XGwOA_4x.js → use-hand-to-agent-state-Ce6QW2j_.js} +1 -1
- package/web/dist/assets/{workflows-Dx4DQuU3.js → workflows-CN8uKYnY.js} +1 -1
- package/web/dist/index.html +1 -1
- package/web/dist/assets/preview-pane-connected-Cp-wPcqn.js +0 -3
- package/web/dist/assets/task-thread-Bn-ifUzJ.js +0 -9
- package/web/dist/assets/thread-state-B9S5H8Td.js +0 -4
package/dist/ci-wait/tools.d.ts
CHANGED
|
@@ -248,6 +248,10 @@ export declare function invokeScheduleTaskTool(input: unknown): Promise<{
|
|
|
248
248
|
}[];
|
|
249
249
|
isError: boolean;
|
|
250
250
|
details: {
|
|
251
|
+
ok: false;
|
|
252
|
+
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
253
|
+
message: string;
|
|
254
|
+
} | {
|
|
251
255
|
ok: true;
|
|
252
256
|
task: {
|
|
253
257
|
id: string;
|
|
@@ -259,10 +263,6 @@ export declare function invokeScheduleTaskTool(input: unknown): Promise<{
|
|
|
259
263
|
url?: string | undefined;
|
|
260
264
|
};
|
|
261
265
|
note: string;
|
|
262
|
-
} | {
|
|
263
|
-
ok: false;
|
|
264
|
-
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
265
|
-
message: string;
|
|
266
266
|
};
|
|
267
267
|
}>;
|
|
268
268
|
export declare function invokeScheduledTasksTool(input: unknown): Promise<{
|
package/dist/contract/index.js
CHANGED
|
@@ -5050,25 +5050,21 @@ function oneLine(text) {
|
|
|
5050
5050
|
const collapsed = text.replace(/\s+/g, " ").trim();
|
|
5051
5051
|
return collapsed.length > MAX_LABEL ? `${collapsed.slice(0, MAX_LABEL - 1)}\u2026` : collapsed;
|
|
5052
5052
|
}
|
|
5053
|
-
|
|
5054
|
-
function rawField(input, ...keys) {
|
|
5053
|
+
function field(input, ...keys) {
|
|
5055
5054
|
if (!isRecord(input)) return void 0;
|
|
5056
5055
|
for (const key of keys) {
|
|
5057
5056
|
const value = input[key];
|
|
5058
|
-
if (typeof value === "string" && value.trim() !== "") return value;
|
|
5057
|
+
if (typeof value === "string" && value.trim() !== "") return oneLine(value);
|
|
5059
5058
|
}
|
|
5060
5059
|
return void 0;
|
|
5061
5060
|
}
|
|
5062
|
-
function
|
|
5063
|
-
return label(rawField(input, ...keys));
|
|
5064
|
-
}
|
|
5065
|
-
function rawCommand(input) {
|
|
5061
|
+
function commandText(input) {
|
|
5066
5062
|
if (!isRecord(input)) return void 0;
|
|
5067
5063
|
const command = input.command;
|
|
5068
|
-
if (typeof command === "string" && command.trim() !== "") return command;
|
|
5064
|
+
if (typeof command === "string" && command.trim() !== "") return oneLine(command);
|
|
5069
5065
|
if (Array.isArray(command)) {
|
|
5070
5066
|
const argv = command.filter((part) => typeof part === "string");
|
|
5071
|
-
if (argv.length > 0) return argv.join(" ");
|
|
5067
|
+
if (argv.length > 0) return oneLine(argv.join(" "));
|
|
5072
5068
|
}
|
|
5073
5069
|
return void 0;
|
|
5074
5070
|
}
|
|
@@ -5085,8 +5081,8 @@ function changePaths(input) {
|
|
|
5085
5081
|
function heuristicLabel(input) {
|
|
5086
5082
|
return field(input, "description", "query", "url", "filePath", "file_path", "path", "pattern", "name");
|
|
5087
5083
|
}
|
|
5088
|
-
function titled(verb,
|
|
5089
|
-
return
|
|
5084
|
+
function titled(verb, label) {
|
|
5085
|
+
return label ? `${verb} ${label}` : verb;
|
|
5090
5086
|
}
|
|
5091
5087
|
var TOOL_KINDS = /* @__PURE__ */ new Map([
|
|
5092
5088
|
["bash", "execute"],
|
|
@@ -5105,8 +5101,6 @@ var TOOL_KINDS = /* @__PURE__ */ new Map([
|
|
|
5105
5101
|
["task", "task"],
|
|
5106
5102
|
["agent", "task"],
|
|
5107
5103
|
["skill", "task"],
|
|
5108
|
-
["spawnagent", "task"],
|
|
5109
|
-
["subtask", "task"],
|
|
5110
5104
|
["todowrite", "plan"],
|
|
5111
5105
|
["todolist", "plan"],
|
|
5112
5106
|
["plan", "plan"],
|
|
@@ -5116,48 +5110,33 @@ var TOOL_KINDS = /* @__PURE__ */ new Map([
|
|
|
5116
5110
|
["contextcompaction", "other"],
|
|
5117
5111
|
["mcptoolcall", "other"]
|
|
5118
5112
|
]);
|
|
5119
|
-
function
|
|
5113
|
+
function editDisplay(key, input) {
|
|
5120
5114
|
switch (key) {
|
|
5115
|
+
case "write":
|
|
5116
|
+
return { toolKind: "edit", title: titled("Write", field(input, "file_path", "filePath", "path")) };
|
|
5121
5117
|
case "notebookedit":
|
|
5122
|
-
return
|
|
5118
|
+
return {
|
|
5119
|
+
toolKind: "edit",
|
|
5120
|
+
title: titled("Edit", field(input, "notebook_path", "notebookPath", "file_path", "filePath", "path"))
|
|
5121
|
+
};
|
|
5123
5122
|
case "filechange": {
|
|
5124
5123
|
const paths = changePaths(input);
|
|
5125
|
-
|
|
5124
|
+
const label = paths.length === 1 ? paths[0] : paths.length > 1 ? `${paths.length} files` : void 0;
|
|
5125
|
+
return { toolKind: "edit", title: titled("Edit", label) };
|
|
5126
5126
|
}
|
|
5127
5127
|
default:
|
|
5128
|
-
return
|
|
5128
|
+
return { toolKind: "edit", title: titled("Edit", field(input, "file_path", "filePath", "path")) };
|
|
5129
5129
|
}
|
|
5130
5130
|
}
|
|
5131
|
-
function editDisplay(key, input) {
|
|
5132
|
-
const verb = key === "write" ? "Write" : "Edit";
|
|
5133
|
-
if (key !== "filechange") return { toolKind: "edit", title: titled(verb, label(editTarget(key, input))) };
|
|
5134
|
-
const paths = changePaths(input);
|
|
5135
|
-
return { toolKind: "edit", title: titled(verb, paths.length > 1 ? `${paths.length} files` : paths[0]) };
|
|
5136
|
-
}
|
|
5137
|
-
function readTarget(key, input) {
|
|
5138
|
-
return key === "imageview" ? rawField(input, "path") : rawField(input, "file_path", "filePath", "path");
|
|
5139
|
-
}
|
|
5140
5131
|
function readDisplay(key, input) {
|
|
5141
|
-
return { toolKind: "read", title: titled(
|
|
5142
|
-
}
|
|
5143
|
-
function searchTarget(input) {
|
|
5144
|
-
return rawField(input, "pattern", "query");
|
|
5145
|
-
}
|
|
5146
|
-
function fetchTarget(key, input) {
|
|
5147
|
-
return key === "webfetch" ? rawField(input, "url") : rawField(input, "query");
|
|
5132
|
+
return key === "imageview" ? { toolKind: "read", title: titled("View image", field(input, "path")) } : { toolKind: "read", title: titled("Read", field(input, "file_path", "filePath", "path")) };
|
|
5148
5133
|
}
|
|
5149
5134
|
function fetchDisplay(key, input) {
|
|
5150
|
-
return { toolKind: "fetch", title: titled(
|
|
5151
|
-
}
|
|
5152
|
-
var skillName = (input) => rawField(input, "skill", "name", "command");
|
|
5153
|
-
var subagentType = (input) => rawField(input, "subagent_type", "subagentType");
|
|
5154
|
-
function taskTarget(key, input) {
|
|
5155
|
-
if (key === "skill") return skillName(input);
|
|
5156
|
-
return rawField(input, "prompt", "task", "description") ?? subagentType(input);
|
|
5135
|
+
return key === "webfetch" ? { toolKind: "fetch", title: titled("Fetch", field(input, "url")) } : { toolKind: "fetch", title: titled("Web search", field(input, "query")) };
|
|
5157
5136
|
}
|
|
5158
5137
|
function taskDisplay(key, input) {
|
|
5159
5138
|
if (key === "skill") {
|
|
5160
|
-
const skill =
|
|
5139
|
+
const skill = field(input, "skill", "name", "command");
|
|
5161
5140
|
return {
|
|
5162
5141
|
toolKind: "task",
|
|
5163
5142
|
title: skill ? `Skill: ${skill}` : "Skill",
|
|
@@ -5165,13 +5144,13 @@ function taskDisplay(key, input) {
|
|
|
5165
5144
|
};
|
|
5166
5145
|
}
|
|
5167
5146
|
const verb = key === "agent" ? "Agent" : "Task";
|
|
5168
|
-
const subagent =
|
|
5169
|
-
const
|
|
5147
|
+
const subagent = field(input, "subagent_type", "subagentType");
|
|
5148
|
+
const label = field(input, "description", "prompt") ?? subagent;
|
|
5170
5149
|
return {
|
|
5171
5150
|
toolKind: "task",
|
|
5172
|
-
title:
|
|
5151
|
+
title: label ? `${verb}: ${label}` : verb,
|
|
5173
5152
|
// Don't repeat the subagent type when it is already the title.
|
|
5174
|
-
subtitle:
|
|
5153
|
+
subtitle: label === subagent ? void 0 : subagent
|
|
5175
5154
|
};
|
|
5176
5155
|
}
|
|
5177
5156
|
function otherDisplay(name, key, input) {
|
|
@@ -5200,7 +5179,7 @@ function toolDisplay(name, input) {
|
|
|
5200
5179
|
case "execute":
|
|
5201
5180
|
return {
|
|
5202
5181
|
toolKind: "execute",
|
|
5203
|
-
title: titled("Ran",
|
|
5182
|
+
title: titled("Ran", commandText(input)),
|
|
5204
5183
|
subtitle: field(input, "description")
|
|
5205
5184
|
};
|
|
5206
5185
|
case "edit":
|
|
@@ -5210,7 +5189,7 @@ function toolDisplay(name, input) {
|
|
|
5210
5189
|
case "search":
|
|
5211
5190
|
return {
|
|
5212
5191
|
toolKind: "search",
|
|
5213
|
-
title: titled("Search",
|
|
5192
|
+
title: titled("Search", field(input, "pattern", "query")),
|
|
5214
5193
|
subtitle: field(input, "path")
|
|
5215
5194
|
};
|
|
5216
5195
|
case "fetch":
|
|
@@ -5223,25 +5202,6 @@ function toolDisplay(name, input) {
|
|
|
5223
5202
|
return otherDisplay(name, key, input);
|
|
5224
5203
|
}
|
|
5225
5204
|
}
|
|
5226
|
-
function toolDetailText(name, input) {
|
|
5227
|
-
const key = typeof name === "string" ? name.toLowerCase() : "";
|
|
5228
|
-
switch (TOOL_KINDS.get(key)) {
|
|
5229
|
-
case "execute":
|
|
5230
|
-
return rawCommand(input);
|
|
5231
|
-
case "edit":
|
|
5232
|
-
return editTarget(key, input);
|
|
5233
|
-
case "read":
|
|
5234
|
-
return readTarget(key, input);
|
|
5235
|
-
case "search":
|
|
5236
|
-
return searchTarget(input);
|
|
5237
|
-
case "fetch":
|
|
5238
|
-
return fetchTarget(key, input);
|
|
5239
|
-
case "task":
|
|
5240
|
-
return taskTarget(key, input);
|
|
5241
|
-
default:
|
|
5242
|
-
return void 0;
|
|
5243
|
-
}
|
|
5244
|
-
}
|
|
5245
5205
|
|
|
5246
5206
|
// ../contract/src/version.ts
|
|
5247
5207
|
function isNewerVersion(candidate, current) {
|
|
@@ -6419,7 +6379,6 @@ export {
|
|
|
6419
6379
|
timeZoneOffsetMs,
|
|
6420
6380
|
timerWaitEntrySchema,
|
|
6421
6381
|
toRunSummary,
|
|
6422
|
-
toolDetailText,
|
|
6423
6382
|
toolDisplay,
|
|
6424
6383
|
uiStateBody,
|
|
6425
6384
|
uiStateSchema,
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
* WebSearch, Task, Agent, Skill, TodoWrite, TaskCreate,
|
|
9
9
|
* TaskUpdate, TaskList, mcp__server__tool
|
|
10
10
|
* - codex: commandExecution, contextCompaction, fileChange, imageView,
|
|
11
|
-
* mcpToolCall, webSearch, plan
|
|
11
|
+
* mcpToolCall, webSearch, plan
|
|
12
12
|
* (codex's checklist arrives as the `turn/plan/updated`
|
|
13
13
|
* notification, not as a tool call — `todoList` is kept below only
|
|
14
14
|
* as tolerance for its non-app-server transports)
|
|
15
|
-
* - opencode: bash, edit, write, read, grep, glob, webfetch, task,
|
|
15
|
+
* - opencode: bash, edit, write, read, grep, glob, webfetch, task, todowrite
|
|
16
16
|
*/
|
|
17
17
|
export type ToolKind = 'read' | 'edit' | 'delete' | 'move' | 'search' | 'execute' | 'think' | 'fetch' | 'task' | 'plan' | 'other';
|
|
18
18
|
export interface ToolDisplay {
|
|
@@ -23,9 +23,3 @@ export interface ToolDisplay {
|
|
|
23
23
|
subtitle?: string | undefined;
|
|
24
24
|
}
|
|
25
25
|
export declare function toolDisplay(name: string, input?: unknown): ToolDisplay;
|
|
26
|
-
/**
|
|
27
|
-
* The whole text a tool title's detail shortens, read with the same keys as `toolDisplay`: the
|
|
28
|
-
* command, path, pattern, URL or query, verbatim. An agent's is its full prompt, while its title
|
|
29
|
-
* keeps the description. `undefined` when the title has no detail from one input field.
|
|
30
|
-
*/
|
|
31
|
-
export declare function toolDetailText(name: string, input?: unknown): string | undefined;
|
|
@@ -82,15 +82,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
82
82
|
"/discover": {
|
|
83
83
|
$post: {
|
|
84
84
|
output: {
|
|
85
|
-
scope: "host-default-account";
|
|
86
|
-
runners: {
|
|
87
|
-
status: "connected" | "disconnected" | "not-installed" | "unknown";
|
|
88
|
-
enabled?: boolean | undefined;
|
|
89
|
-
hint?: string | undefined;
|
|
90
|
-
authFailureId?: string | undefined;
|
|
91
|
-
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
92
|
-
}[];
|
|
93
|
-
} | {
|
|
94
85
|
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
95
86
|
models: {
|
|
96
87
|
id: string;
|
|
@@ -101,6 +92,15 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
101
92
|
source: "cache" | "live" | "unavailable";
|
|
102
93
|
stale: boolean;
|
|
103
94
|
reason?: string | undefined;
|
|
95
|
+
} | {
|
|
96
|
+
scope: "host-default-account";
|
|
97
|
+
runners: {
|
|
98
|
+
status: "connected" | "disconnected" | "not-installed" | "unknown";
|
|
99
|
+
enabled?: boolean | undefined;
|
|
100
|
+
hint?: string | undefined;
|
|
101
|
+
authFailureId?: string | undefined;
|
|
102
|
+
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
103
|
+
}[];
|
|
104
104
|
} | {
|
|
105
105
|
tasks: {
|
|
106
106
|
id: string;
|
|
@@ -57,17 +57,6 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
57
57
|
"/discover": {
|
|
58
58
|
$post: {
|
|
59
59
|
output: {
|
|
60
|
-
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
61
|
-
models: {
|
|
62
|
-
id: string;
|
|
63
|
-
label: string;
|
|
64
|
-
description: string;
|
|
65
|
-
effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
|
|
66
|
-
}[];
|
|
67
|
-
source: "cache" | "live" | "unavailable";
|
|
68
|
-
stale: boolean;
|
|
69
|
-
reason?: string | undefined;
|
|
70
|
-
} | {
|
|
71
60
|
tasks: {
|
|
72
61
|
id: string;
|
|
73
62
|
title: string;
|
|
@@ -88,6 +77,17 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
88
77
|
authFailureId?: string | undefined;
|
|
89
78
|
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
90
79
|
}[];
|
|
80
|
+
} | {
|
|
81
|
+
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
82
|
+
models: {
|
|
83
|
+
id: string;
|
|
84
|
+
label: string;
|
|
85
|
+
description: string;
|
|
86
|
+
effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
|
|
87
|
+
}[];
|
|
88
|
+
source: "cache" | "live" | "unavailable";
|
|
89
|
+
stale: boolean;
|
|
90
|
+
reason?: string | undefined;
|
|
91
91
|
};
|
|
92
92
|
outputFormat: "json";
|
|
93
93
|
status: 200;
|
package/dist/server/server.d.ts
CHANGED
|
@@ -2988,12 +2988,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
2988
2988
|
output: {
|
|
2989
2989
|
generation: string;
|
|
2990
2990
|
results: ({
|
|
2991
|
-
projectId: string;
|
|
2992
|
-
runId: string;
|
|
2993
|
-
type: "error" | "reset";
|
|
2994
|
-
status: 400 | 404 | 409 | 413 | 503;
|
|
2995
|
-
error: string;
|
|
2996
|
-
} | {
|
|
2997
2991
|
projectId: string;
|
|
2998
2992
|
runId: string;
|
|
2999
2993
|
type: "batch";
|
|
@@ -3007,6 +3001,12 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
3007
3001
|
cursor: string;
|
|
3008
3002
|
afterSeq: number;
|
|
3009
3003
|
hasMore: boolean;
|
|
3004
|
+
} | {
|
|
3005
|
+
projectId: string;
|
|
3006
|
+
runId: string;
|
|
3007
|
+
type: "error" | "reset";
|
|
3008
|
+
status: 400 | 404 | 409 | 413 | 503;
|
|
3009
|
+
error: string;
|
|
3010
3010
|
})[];
|
|
3011
3011
|
};
|
|
3012
3012
|
outputFormat: "json";
|
|
@@ -8573,11 +8573,22 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
8573
8573
|
"/runs/:id/worker-destroy": {
|
|
8574
8574
|
$post: {
|
|
8575
8575
|
output: {
|
|
8576
|
-
|
|
8577
|
-
|
|
8576
|
+
readonly code: "capacity_limit" | "denied_scope" | "incompatible_state" | "incomplete_cleanup" | "invalid_baseline" | "invalid_input" | "unauthenticated" | "unavailable_diff" | "unavailable_transport";
|
|
8577
|
+
readonly error: string;
|
|
8578
|
+
readonly modelChoices?: {
|
|
8579
|
+
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
8580
|
+
requestedModel: string;
|
|
8581
|
+
availableModels: {
|
|
8582
|
+
id: string;
|
|
8583
|
+
label: string;
|
|
8584
|
+
description: string;
|
|
8585
|
+
effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
|
|
8586
|
+
}[];
|
|
8587
|
+
otherRunners: ("claude" | "codex" | "cursor" | "omp" | "opencode" | "pi")[];
|
|
8588
|
+
} | undefined;
|
|
8578
8589
|
};
|
|
8579
8590
|
outputFormat: "json";
|
|
8580
|
-
status: 400;
|
|
8591
|
+
status: 400 | 401 | 403 | 409 | 503;
|
|
8581
8592
|
input: {
|
|
8582
8593
|
query: {
|
|
8583
8594
|
[x: string]: string | string[];
|
|
@@ -8591,22 +8602,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
8591
8602
|
};
|
|
8592
8603
|
} | {
|
|
8593
8604
|
output: {
|
|
8594
|
-
|
|
8595
|
-
|
|
8596
|
-
readonly modelChoices?: {
|
|
8597
|
-
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
8598
|
-
requestedModel: string;
|
|
8599
|
-
availableModels: {
|
|
8600
|
-
id: string;
|
|
8601
|
-
label: string;
|
|
8602
|
-
description: string;
|
|
8603
|
-
effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
|
|
8604
|
-
}[];
|
|
8605
|
-
otherRunners: ("claude" | "codex" | "cursor" | "omp" | "opencode" | "pi")[];
|
|
8606
|
-
} | undefined;
|
|
8605
|
+
error: string;
|
|
8606
|
+
code?: "invalid_input" | undefined;
|
|
8607
8607
|
};
|
|
8608
8608
|
outputFormat: "json";
|
|
8609
|
-
status: 400
|
|
8609
|
+
status: 400;
|
|
8610
8610
|
input: {
|
|
8611
8611
|
query: {
|
|
8612
8612
|
[x: string]: string | string[];
|
|
@@ -24342,11 +24342,22 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
24342
24342
|
"/runs/:id/worker-destroy": {
|
|
24343
24343
|
$post: {
|
|
24344
24344
|
output: {
|
|
24345
|
-
|
|
24346
|
-
|
|
24345
|
+
readonly code: "capacity_limit" | "denied_scope" | "incompatible_state" | "incomplete_cleanup" | "invalid_baseline" | "invalid_input" | "unauthenticated" | "unavailable_diff" | "unavailable_transport";
|
|
24346
|
+
readonly error: string;
|
|
24347
|
+
readonly modelChoices?: {
|
|
24348
|
+
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
24349
|
+
requestedModel: string;
|
|
24350
|
+
availableModels: {
|
|
24351
|
+
id: string;
|
|
24352
|
+
label: string;
|
|
24353
|
+
description: string;
|
|
24354
|
+
effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
|
|
24355
|
+
}[];
|
|
24356
|
+
otherRunners: ("claude" | "codex" | "cursor" | "omp" | "opencode" | "pi")[];
|
|
24357
|
+
} | undefined;
|
|
24347
24358
|
};
|
|
24348
24359
|
outputFormat: "json";
|
|
24349
|
-
status: 400;
|
|
24360
|
+
status: 400 | 401 | 403 | 409 | 503;
|
|
24350
24361
|
input: {
|
|
24351
24362
|
query: {
|
|
24352
24363
|
[x: string]: string | string[];
|
|
@@ -24360,22 +24371,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
24360
24371
|
};
|
|
24361
24372
|
} | {
|
|
24362
24373
|
output: {
|
|
24363
|
-
|
|
24364
|
-
|
|
24365
|
-
readonly modelChoices?: {
|
|
24366
|
-
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
24367
|
-
requestedModel: string;
|
|
24368
|
-
availableModels: {
|
|
24369
|
-
id: string;
|
|
24370
|
-
label: string;
|
|
24371
|
-
description: string;
|
|
24372
|
-
effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
|
|
24373
|
-
}[];
|
|
24374
|
-
otherRunners: ("claude" | "codex" | "cursor" | "omp" | "opencode" | "pi")[];
|
|
24375
|
-
} | undefined;
|
|
24374
|
+
error: string;
|
|
24375
|
+
code?: "invalid_input" | undefined;
|
|
24376
24376
|
};
|
|
24377
24377
|
outputFormat: "json";
|
|
24378
|
-
status: 400
|
|
24378
|
+
status: 400;
|
|
24379
24379
|
input: {
|
|
24380
24380
|
query: {
|
|
24381
24381
|
[x: string]: string | string[];
|
|
@@ -2,6 +2,7 @@ import type { RunRecord, RunStore } from '../../runs/store.ts';
|
|
|
2
2
|
import type { ContinueRunOptions } from '../continuation-admission.ts';
|
|
3
3
|
import type { RunExitId } from '../../runs/run-exits.ts';
|
|
4
4
|
import type { RunModuleContext } from './types.ts';
|
|
5
|
+
import { LivenessTimers } from './liveness-timers.ts';
|
|
5
6
|
interface AutoResumeHost {
|
|
6
7
|
move(runId: string, exit: RunExitId, patch: Omit<Parameters<RunStore['updateRun']>[1], 'status'>): RunRecord | undefined;
|
|
7
8
|
continueRun(runId: string, opts: ContinueRunOptions, deferForCapacity: boolean): {
|
|
@@ -48,13 +49,13 @@ export type HoldPlan = {
|
|
|
48
49
|
export declare class AutoResumeScheduler {
|
|
49
50
|
private readonly context;
|
|
50
51
|
private readonly host;
|
|
51
|
-
|
|
52
|
+
private readonly timers;
|
|
53
|
+
/** Armed resumes are `auto-resume` bounds, keyed by run id (spec
|
|
52
54
|
* 2026-08-03-auto-resume-after-usage-limit). The DEADLINE itself lives on the record
|
|
53
|
-
* (`autoResumeAt`) —
|
|
54
|
-
* from the record rather than losing the wait. Runs here are `
|
|
55
|
-
*
|
|
56
|
-
|
|
57
|
-
constructor(context: RunModuleContext, host: AutoResumeHost);
|
|
55
|
+
* (`autoResumeAt`) — the owner holds only the process-local timer, so a restart rebuilds it
|
|
56
|
+
* from the record rather than losing the wait. Runs here are not in `active`, which is why the
|
|
57
|
+
* bound has run scope, not execution scope like the monitoring one. */
|
|
58
|
+
constructor(context: RunModuleContext, host: AutoResumeHost, timers?: LivenessTimers);
|
|
58
59
|
dispose(): void;
|
|
59
60
|
/**
|
|
60
61
|
* The hold a failing run takes instead of `failed` (hearsay-tools/squawk#3337), or undefined when
|
|
@@ -3,6 +3,7 @@ import { parseUsageLimit } from '../../core/usage-limit.js';
|
|
|
3
3
|
import { classifyProviderError, PROVIDER_ERROR_LABELS } from '../../core/provider-error.js';
|
|
4
4
|
import { noJitter, PROVIDER_RETRY_BACKOFF, retryDelayMs } from '../../delegation/retry-backoff.js';
|
|
5
5
|
import { formatWakeInstant } from '../run-scheduling.js';
|
|
6
|
+
import { LivenessTimers } from './liveness-timers.js';
|
|
6
7
|
import { atContinue } from './launch-read-resolver.js';
|
|
7
8
|
import { productName } from '../../home/display.js';
|
|
8
9
|
/**
|
|
@@ -47,20 +48,19 @@ export function retryPrompt(run) {
|
|
|
47
48
|
export class AutoResumeScheduler {
|
|
48
49
|
context;
|
|
49
50
|
host;
|
|
50
|
-
|
|
51
|
+
timers;
|
|
52
|
+
/** Armed resumes are `auto-resume` bounds, keyed by run id (spec
|
|
51
53
|
* 2026-08-03-auto-resume-after-usage-limit). The DEADLINE itself lives on the record
|
|
52
|
-
* (`autoResumeAt`) —
|
|
53
|
-
* from the record rather than losing the wait. Runs here are `
|
|
54
|
-
*
|
|
55
|
-
|
|
56
|
-
constructor(context, host) {
|
|
54
|
+
* (`autoResumeAt`) — the owner holds only the process-local timer, so a restart rebuilds it
|
|
55
|
+
* from the record rather than losing the wait. Runs here are not in `active`, which is why the
|
|
56
|
+
* bound has run scope, not execution scope like the monitoring one. */
|
|
57
|
+
constructor(context, host, timers = new LivenessTimers()) {
|
|
57
58
|
this.context = context;
|
|
58
59
|
this.host = host;
|
|
60
|
+
this.timers = timers;
|
|
59
61
|
}
|
|
60
62
|
dispose() {
|
|
61
|
-
|
|
62
|
-
clearTimeout(timer);
|
|
63
|
-
this.autoResumeTimers.clear();
|
|
63
|
+
this.timers.clearKind('auto-resume');
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
66
|
* The hold a failing run takes instead of `failed` (hearsay-tools/squawk#3337), or undefined when
|
|
@@ -118,7 +118,7 @@ export class AutoResumeScheduler {
|
|
|
118
118
|
}
|
|
119
119
|
/** Arm the timer of a hold the settlement wrote. Runs before the slot is released (see the caller). */
|
|
120
120
|
armHeldResume(runId) {
|
|
121
|
-
if (this.
|
|
121
|
+
if (this.timers.has('auto-resume', runId))
|
|
122
122
|
return;
|
|
123
123
|
const run = this.context.store.getRun(runId);
|
|
124
124
|
if (!run || !isUsageLimitHold(run))
|
|
@@ -131,9 +131,7 @@ export class AutoResumeScheduler {
|
|
|
131
131
|
* run waits for it (hearsay-tools/cezarion#1236): `waiting`, its error kept for a withdrawal. */
|
|
132
132
|
armAutoResume(runId, deadline, reason) {
|
|
133
133
|
this.host.move(runId, 'hold', { autoResumeAt: new Date(deadline).toISOString(), ...(reason ? { autoResumeReason: reason } : {}) });
|
|
134
|
-
|
|
135
|
-
timer.unref?.();
|
|
136
|
-
this.autoResumeTimers.set(runId, timer);
|
|
134
|
+
this.timers.arm({ kind: 'auto-resume', runId, delayMs: Math.max(0, deadline - Date.now()) }, () => this.fireAutoResume(runId));
|
|
137
135
|
}
|
|
138
136
|
/**
|
|
139
137
|
* The window has reopened. Re-check the record synchronously — hours may have passed, and the
|
|
@@ -141,7 +139,6 @@ export class AutoResumeScheduler {
|
|
|
141
139
|
* ordinary queued-continuation path so it obeys both concurrency caps like any other work.
|
|
142
140
|
*/
|
|
143
141
|
fireAutoResume(runId) {
|
|
144
|
-
this.autoResumeTimers.delete(runId);
|
|
145
142
|
const run = this.context.store.getRun(runId);
|
|
146
143
|
if (!run || !isUsageLimitHold(run))
|
|
147
144
|
return;
|
|
@@ -196,7 +193,7 @@ export class AutoResumeScheduler {
|
|
|
196
193
|
// ones too, so this one loop is the whole cancellation. It reads any resume time, not
|
|
197
194
|
// `isUsageLimitHold`, so a stale one is retired too.
|
|
198
195
|
const pending = new Set([
|
|
199
|
-
...this.
|
|
196
|
+
...this.timers.runsOf('auto-resume'),
|
|
200
197
|
...this.context.store.listRuns().filter((run) => run.autoResumeAt !== undefined).map((run) => run.id),
|
|
201
198
|
]);
|
|
202
199
|
for (const runId of pending)
|
|
@@ -206,7 +203,7 @@ export class AutoResumeScheduler {
|
|
|
206
203
|
for (const run of this.context.store.listRuns()) {
|
|
207
204
|
if (!isUsageLimitHold(run))
|
|
208
205
|
continue;
|
|
209
|
-
if (this.
|
|
206
|
+
if (this.timers.has('auto-resume', run.id))
|
|
210
207
|
continue;
|
|
211
208
|
const deadline = Date.parse(run.autoResumeAt);
|
|
212
209
|
// A deadline that is unreadable, belongs to a run that has spent its cap, or belongs to a
|
|
@@ -241,7 +238,7 @@ export class AutoResumeScheduler {
|
|
|
241
238
|
if (!run)
|
|
242
239
|
return false;
|
|
243
240
|
// Any resume time, not `isUsageLimitHold`: a withdrawal also retires one a record kept by mistake.
|
|
244
|
-
const pending = run.autoResumeAt !== undefined || this.
|
|
241
|
+
const pending = run.autoResumeAt !== undefined || this.timers.has('auto-resume', runId);
|
|
245
242
|
this.withdrawAutoResume(runId, pending ? 'automatic resume cancelled for this task' : undefined);
|
|
246
243
|
if (pending) {
|
|
247
244
|
// This run may have been the last thing holding its account's queue — nothing else will
|
|
@@ -253,10 +250,7 @@ export class AutoResumeScheduler {
|
|
|
253
250
|
/** Retire a pending resume — timer, deadline and counter. The counter goes too because every
|
|
254
251
|
* caller is a fresh epoch: a human Continue, or a resume that re-stamps its own count. */
|
|
255
252
|
clearAutoResume(runId) {
|
|
256
|
-
|
|
257
|
-
if (timer)
|
|
258
|
-
clearTimeout(timer);
|
|
259
|
-
this.autoResumeTimers.delete(runId);
|
|
253
|
+
this.timers.clear('auto-resume', runId);
|
|
260
254
|
const run = this.context.store.getRun(runId);
|
|
261
255
|
if (!run)
|
|
262
256
|
return;
|
|
@@ -285,10 +279,7 @@ export class AutoResumeScheduler {
|
|
|
285
279
|
// note is written only once the withdrawal is on disk (hearsay-tools/cezarion#1236).
|
|
286
280
|
if (this.context.store.getRun(runId))
|
|
287
281
|
this.context.store.commitAutoResumeWithdrawal(runId);
|
|
288
|
-
|
|
289
|
-
if (timer)
|
|
290
|
-
clearTimeout(timer);
|
|
291
|
-
this.autoResumeTimers.delete(runId);
|
|
282
|
+
this.timers.clear('auto-resume', runId);
|
|
292
283
|
if (note && this.context.store.getRun(runId))
|
|
293
284
|
this.context.store.appendEvent(runId, { type: 'note', message: note });
|
|
294
285
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-resume.js","sourceRoot":"","s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AAE,KAAK,CAAC,CAAC;QACxC,IAAI,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;YAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IACvH,CAAC;CACF"}
|
|
@@ -18,6 +18,7 @@ import { FamilyReconciler } from './family-reconciler.ts';
|
|
|
18
18
|
import * as completionGateReads from './completion-gate.ts';
|
|
19
19
|
import { WaitRegistry } from './wait-registry.ts';
|
|
20
20
|
import { WakeRetries } from './wake-retries.ts';
|
|
21
|
+
import type { LivenessTimers } from './liveness-timers.ts';
|
|
21
22
|
import { HumanWaits } from './human-waits.ts';
|
|
22
23
|
import { SubagentWaits } from './subagent-waits.ts';
|
|
23
24
|
import { RunStart } from './run-start.ts';
|
|
@@ -60,6 +61,8 @@ import * as queuedRevival from './queued-revival.ts';
|
|
|
60
61
|
import { type RunRecord, type RunStore, type StepState } from '../../runs/store.ts';
|
|
61
62
|
import { type WorkflowDef } from '../types.ts';
|
|
62
63
|
export interface RunModules {
|
|
64
|
+
/** The one timer owner of every run's liveness bounds (hearsay-tools/squawk#3662). */
|
|
65
|
+
liveness: LivenessTimers;
|
|
63
66
|
/** Per-run memory that outlives an execution (ADR 0064). */
|
|
64
67
|
memory: RunMemory;
|
|
65
68
|
memoryGuard: MemoryGuard;
|