@hearsay-tools/squawk 0.18.0-pr4082.7810 → 0.18.0-pr4084.7814
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/delegation/routes.d.ts +11 -11
- package/dist/delegation/transport.d.ts +4 -4
- package/dist/runs/ports.d.ts +38 -11
- package/dist/runs/run-archive.d.ts +1217 -0
- package/dist/runs/run-archive.js +332 -0
- package/dist/runs/run-archive.js.map +1 -0
- package/dist/runs/run-read-flags.d.ts +58 -0
- package/dist/runs/run-read-flags.js +87 -0
- package/dist/runs/run-read-flags.js.map +1 -0
- package/dist/runs/store.d.ts +7 -98
- package/dist/runs/store.js +37 -402
- package/dist/runs/store.js.map +1 -1
- package/dist/serve-boot.js +1 -1
- package/dist/serve-boot.js.map +1 -1
- package/dist/server/activity-routes.d.ts +23 -23
- package/dist/server/archive-on-merge.js +10 -10
- package/dist/server/archive-on-merge.js.map +1 -1
- package/dist/server/completion-actions.js +6 -6
- package/dist/server/completion-actions.js.map +1 -1
- package/dist/server/project-context.js +2 -2
- package/dist/server/project-context.js.map +1 -1
- package/dist/server/runners-routes.d.ts +10 -10
- package/dist/server/server.d.ts +12123 -12123
- package/dist/server/server.js +6 -6
- package/dist/server/server.js.map +1 -1
- package/dist/server/workspace-live-routes.d.ts +6 -6
- package/dist/workflows/run/continuation-acceptance.js +1 -1
- package/dist/workflows/run/continuation-acceptance.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,1217 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The archive topic of the run store (hearsay-tools/squawk#4041): the archive flag and its cascade
|
|
3
|
+
* over a family, archive on merge, the completion actions that archive a finished task, and the
|
|
4
|
+
* compression of archived transcripts. `RunStore` keeps one of these as `store.archive`; the
|
|
5
|
+
* family collection it asks is `runs/archive-family.ts`. It owns the compressor, which it builds
|
|
6
|
+
* after the transcript facts it adopts archives into.
|
|
7
|
+
*/
|
|
8
|
+
import type { ArchiveFinishedScope, ArchivePullRequestIdentity, MergedPullRequest, RunRecord } from '../contract/index.js';
|
|
9
|
+
import { type ArchiveFamilyState } from './archive-family.ts';
|
|
10
|
+
import { HistoryCompressor } from './history-compressor.ts';
|
|
11
|
+
import type { RunArchive, RunCompletionActions } from './ports.ts';
|
|
12
|
+
import type { RunExitId } from './run-exits.ts';
|
|
13
|
+
import { type ClaimOwner } from './run-claims.ts';
|
|
14
|
+
import type { RunDatabase, RunRow } from './run-database.ts';
|
|
15
|
+
import { type ListOrder } from './run-row.ts';
|
|
16
|
+
import type { RunTranscriptFacts } from './transcript-facts-topic.ts';
|
|
17
|
+
import type { WorkerExecution } from './worker-execution.ts';
|
|
18
|
+
export interface ArchiveOnMergeSnapshot {
|
|
19
|
+
rootId: string;
|
|
20
|
+
fingerprint: string;
|
|
21
|
+
pullRequests: ArchivePullRequestIdentity[];
|
|
22
|
+
token: string;
|
|
23
|
+
}
|
|
24
|
+
/** What the topic asks of the store; no import of `store.ts` values. */
|
|
25
|
+
export interface ArchiveState {
|
|
26
|
+
/** The open database; null for an unavailable or closed store. */
|
|
27
|
+
db(): RunDatabase | null;
|
|
28
|
+
readonly held: Map<string, RunRecord>;
|
|
29
|
+
readonly deleted: ReadonlySet<string>;
|
|
30
|
+
readonly quarantined: ReadonlySet<string>;
|
|
31
|
+
readonly pins: ReadonlyMap<string, unknown>;
|
|
32
|
+
readonly claimed: ReadonlyMap<string, number>;
|
|
33
|
+
readonly base: ReadonlyMap<string, {
|
|
34
|
+
revision: number;
|
|
35
|
+
}>;
|
|
36
|
+
/** Read at call time: `open` and `close` replace it. */
|
|
37
|
+
owner(): ClaimOwner | undefined;
|
|
38
|
+
readonly transcriptFacts: RunTranscriptFacts;
|
|
39
|
+
readonly decodeRunRow: ArchiveFamilyState['decodeRunRow'];
|
|
40
|
+
sortNewestFirst<T>(entries: Iterable<readonly [T, ListOrder]>): T[];
|
|
41
|
+
peek(id: string): RunRecord | undefined;
|
|
42
|
+
record(id: string): RunRecord | undefined;
|
|
43
|
+
listWorkersOf(parentId: string): RunRecord[];
|
|
44
|
+
familyOf(id: string): string;
|
|
45
|
+
claimFamilies(families: Iterable<string>, opts?: {
|
|
46
|
+
allowLive?: boolean;
|
|
47
|
+
wait?: boolean;
|
|
48
|
+
}): Set<string>;
|
|
49
|
+
writeRefusal(id: string): string | undefined;
|
|
50
|
+
assertWritable(staged: ReadonlyMap<string, RunRecord | null>): void;
|
|
51
|
+
decodeCold(row: RunRow): RunRecord | undefined;
|
|
52
|
+
listOrder(run: RunRecord): ListOrder;
|
|
53
|
+
commitIndex(input: ReadonlyMap<string, RunRecord | null>, source?: undefined, write?: {
|
|
54
|
+
exits?: ReadonlyMap<string, RunExitId | undefined>;
|
|
55
|
+
}): void;
|
|
56
|
+
touch(run: RunRecord, before: Readonly<RunRecord> | undefined, exit?: RunExitId): void;
|
|
57
|
+
readWorkerExecution(id: string): WorkerExecution | undefined;
|
|
58
|
+
}
|
|
59
|
+
export declare class RunArchiveTopic implements RunArchive, RunCompletionActions {
|
|
60
|
+
private readonly dataDir;
|
|
61
|
+
private readonly state;
|
|
62
|
+
/** Background one-at-a-time compressor for archived transcripts (#818). */
|
|
63
|
+
readonly compressor: HistoryCompressor;
|
|
64
|
+
constructor(dataDir: string, state: ArchiveState);
|
|
65
|
+
completionArchiveBlocker(root: RunRecord): string | undefined;
|
|
66
|
+
/** One archive write for manual actions, merge observations, completion, and sweeps.
|
|
67
|
+
* Archiving files history away; it never stops a process or removes a worktree. */
|
|
68
|
+
stageArchive(staged: Map<string, RunRecord | null>, root: RunRecord, archived: boolean, exits?: Map<string, RunExitId | undefined>): void;
|
|
69
|
+
/** A bounded persisted queue also covers projects without a live RunManager. */
|
|
70
|
+
listCompletionCandidates(afterSeq?: number, limit?: number): Array<{
|
|
71
|
+
id: string;
|
|
72
|
+
seq: number;
|
|
73
|
+
}>;
|
|
74
|
+
canCompleteAction(id: string, token: string): boolean;
|
|
75
|
+
claimCompletionAction(id: string, token: string): boolean;
|
|
76
|
+
completeAction(id: string, token: string, phase: 'blocked' | 'complete', message?: string): boolean;
|
|
77
|
+
listArchiveOnMergeCandidates(afterSeq?: number, limit?: number): Array<{
|
|
78
|
+
id: string;
|
|
79
|
+
seq: number;
|
|
80
|
+
}>;
|
|
81
|
+
/** Use unnormalized persisted evidence: cold reads must not turn interrupted work into safety. */
|
|
82
|
+
private archiveFamily;
|
|
83
|
+
/** Blockers are feedback, never archive authority or cleanup permission. */
|
|
84
|
+
setArchiveBlocker(id: string, blocker: RunRecord['archiveBlocker']): void;
|
|
85
|
+
archiveMergeBlocker(snapshot: ArchiveOnMergeSnapshot, missing: ArchivePullRequestIdentity, repoBase?: string): void;
|
|
86
|
+
hasArchiveOnMergeAssociations(id: string): boolean;
|
|
87
|
+
prepareArchiveOnMerge(id: string): Promise<void>;
|
|
88
|
+
archiveOnMergeSnapshot(id: string, repoBase?: string, isActive?: (id: string) => boolean): ArchiveOnMergeSnapshot | undefined;
|
|
89
|
+
private archiveSnapshot;
|
|
90
|
+
/** No await between final revalidation and the fenced, all-or-nothing cascade. */
|
|
91
|
+
archiveAfterMerge(snapshot: ArchiveOnMergeSnapshot, observations: readonly MergedPullRequest[], repoBase?: string, isActive?: (id: string) => boolean): boolean;
|
|
92
|
+
setArchived(id: string, archived: boolean): RunRecord | undefined;
|
|
93
|
+
/** Parent + owned workers; returns how many records flipped `archived`. */
|
|
94
|
+
private applyArchivedCascade;
|
|
95
|
+
applyArchived(run: RunRecord, archived: boolean, before?: Readonly<{
|
|
96
|
+
archiveWhenDone?: boolean | undefined;
|
|
97
|
+
autoMergePr?: boolean | undefined;
|
|
98
|
+
allowWorkers?: boolean | undefined;
|
|
99
|
+
allowMessaging?: boolean | undefined;
|
|
100
|
+
id: string;
|
|
101
|
+
title: string;
|
|
102
|
+
titleSummary?: string | undefined;
|
|
103
|
+
diffStat?: {
|
|
104
|
+
adds: number;
|
|
105
|
+
dels: number;
|
|
106
|
+
files: number;
|
|
107
|
+
repointed?: boolean | undefined;
|
|
108
|
+
} | undefined;
|
|
109
|
+
workflow: string;
|
|
110
|
+
task: string;
|
|
111
|
+
queuedMessages?: {
|
|
112
|
+
replayAfterOpen?: true | undefined;
|
|
113
|
+
id: string;
|
|
114
|
+
text: string;
|
|
115
|
+
images?: string[] | undefined;
|
|
116
|
+
createdAt: string;
|
|
117
|
+
}[] | undefined;
|
|
118
|
+
continuationMessage?: {
|
|
119
|
+
replayAfterOpen?: true | undefined;
|
|
120
|
+
id: string;
|
|
121
|
+
text: string;
|
|
122
|
+
images?: string[] | undefined;
|
|
123
|
+
createdAt: string;
|
|
124
|
+
origin?: "human" | "lifecycle" | undefined;
|
|
125
|
+
agentInputId?: string | undefined;
|
|
126
|
+
task?: string | undefined;
|
|
127
|
+
resumeContext?: {
|
|
128
|
+
failure?: {
|
|
129
|
+
stepId?: string | undefined;
|
|
130
|
+
error: string;
|
|
131
|
+
} | undefined;
|
|
132
|
+
restarted?: true | undefined;
|
|
133
|
+
cutOff?: {
|
|
134
|
+
tools?: string[] | undefined;
|
|
135
|
+
subagents?: string[] | undefined;
|
|
136
|
+
} | undefined;
|
|
137
|
+
} | undefined;
|
|
138
|
+
} | undefined;
|
|
139
|
+
invalidAsk?: boolean | undefined;
|
|
140
|
+
agentInputs?: {
|
|
141
|
+
conversation?: {
|
|
142
|
+
senderRunId: string;
|
|
143
|
+
recipientRunId: string;
|
|
144
|
+
kind: "follow-up" | "progress" | "reply" | "request";
|
|
145
|
+
requestId?: string | undefined;
|
|
146
|
+
relationship?: "family" | "peer" | undefined;
|
|
147
|
+
} | undefined;
|
|
148
|
+
id: string;
|
|
149
|
+
source: "agent" | "lifecycle";
|
|
150
|
+
parentRunId: string;
|
|
151
|
+
text: string;
|
|
152
|
+
createdAt: string;
|
|
153
|
+
deliveredAt?: string | undefined;
|
|
154
|
+
consumedAt?: string | undefined;
|
|
155
|
+
awaitingRead?: true | undefined;
|
|
156
|
+
inboxClaim?: {
|
|
157
|
+
receiptId: string;
|
|
158
|
+
generation: string;
|
|
159
|
+
expiresAt: string;
|
|
160
|
+
acknowledgedAt?: string | undefined;
|
|
161
|
+
memberIds?: string[] | undefined;
|
|
162
|
+
} | undefined;
|
|
163
|
+
purpose?: "completion-refusal" | "undelivered-question" | undefined;
|
|
164
|
+
requestHash?: string | undefined;
|
|
165
|
+
deadline?: string | undefined;
|
|
166
|
+
}[] | undefined;
|
|
167
|
+
waits?: ({
|
|
168
|
+
prUrl: string;
|
|
169
|
+
repository: string;
|
|
170
|
+
prNumber: number;
|
|
171
|
+
headSha: string;
|
|
172
|
+
id: string;
|
|
173
|
+
source: "agent" | "cezar";
|
|
174
|
+
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
175
|
+
registeredAt: string;
|
|
176
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
177
|
+
resolvedAt?: string | undefined;
|
|
178
|
+
deliveredAt?: string | undefined;
|
|
179
|
+
cancelledAt?: string | undefined;
|
|
180
|
+
turnId: string;
|
|
181
|
+
kind: "pr";
|
|
182
|
+
deadline: string;
|
|
183
|
+
generation: string;
|
|
184
|
+
timeoutSeconds: number;
|
|
185
|
+
until: "checks" | "merge" | "merge_or_blocked";
|
|
186
|
+
wakeOnConflict: boolean;
|
|
187
|
+
callerHead?: true | undefined;
|
|
188
|
+
result?: {
|
|
189
|
+
outcome: "blocked" | "cancelled" | "closed" | "conflicting" | "deadline" | "error" | "failed" | "head_changed" | "merged" | "no_checks" | "passed" | "skipped" | "startup_failure" | "stuck";
|
|
190
|
+
headSha: string;
|
|
191
|
+
observedHeadSha?: string | undefined;
|
|
192
|
+
mergeable?: "CONFLICTING" | "MERGEABLE" | "UNKNOWN" | undefined;
|
|
193
|
+
mergeStateStatus?: string | undefined;
|
|
194
|
+
mergedAt?: string | undefined;
|
|
195
|
+
mergeCommitSha?: string | undefined;
|
|
196
|
+
mergeBlock?: {
|
|
197
|
+
reason: "conflict" | "no_pending_merge";
|
|
198
|
+
isInMergeQueue: boolean;
|
|
199
|
+
autoMergeEnabled: boolean;
|
|
200
|
+
event?: {
|
|
201
|
+
kind: "auto_merge_disabled" | "queue_removal";
|
|
202
|
+
createdAt: string;
|
|
203
|
+
reason?: string | undefined;
|
|
204
|
+
reasonCode?: string | undefined;
|
|
205
|
+
} | undefined;
|
|
206
|
+
} | undefined;
|
|
207
|
+
observedAt: string;
|
|
208
|
+
checks: {
|
|
209
|
+
name: string;
|
|
210
|
+
state: string;
|
|
211
|
+
link: string;
|
|
212
|
+
}[];
|
|
213
|
+
totalChecks: number;
|
|
214
|
+
truncated: boolean;
|
|
215
|
+
diagnostic?: string | undefined;
|
|
216
|
+
} | undefined;
|
|
217
|
+
} | {
|
|
218
|
+
id: string;
|
|
219
|
+
source: "agent" | "cezar";
|
|
220
|
+
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
221
|
+
registeredAt: string;
|
|
222
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
223
|
+
resolvedAt?: string | undefined;
|
|
224
|
+
deliveredAt?: string | undefined;
|
|
225
|
+
cancelledAt?: string | undefined;
|
|
226
|
+
turnId: string;
|
|
227
|
+
kind: "timer";
|
|
228
|
+
deadline: string;
|
|
229
|
+
seconds: number;
|
|
230
|
+
note?: string | undefined;
|
|
231
|
+
} | {
|
|
232
|
+
id: string;
|
|
233
|
+
source: "agent" | "cezar";
|
|
234
|
+
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
235
|
+
registeredAt: string;
|
|
236
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
237
|
+
resolvedAt?: string | undefined;
|
|
238
|
+
deliveredAt?: string | undefined;
|
|
239
|
+
cancelledAt?: string | undefined;
|
|
240
|
+
turnId: string;
|
|
241
|
+
kind: "human";
|
|
242
|
+
questions?: {
|
|
243
|
+
id?: string | undefined;
|
|
244
|
+
header: string;
|
|
245
|
+
question: string;
|
|
246
|
+
options?: {
|
|
247
|
+
label: string;
|
|
248
|
+
description?: string | undefined;
|
|
249
|
+
}[] | undefined;
|
|
250
|
+
multiSelect?: boolean | undefined;
|
|
251
|
+
allowFreeText?: boolean | undefined;
|
|
252
|
+
}[] | undefined;
|
|
253
|
+
context?: string | undefined;
|
|
254
|
+
askSeq?: number | undefined;
|
|
255
|
+
} | {
|
|
256
|
+
id: string;
|
|
257
|
+
source: "agent" | "cezar";
|
|
258
|
+
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
259
|
+
registeredAt: string;
|
|
260
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
261
|
+
resolvedAt?: string | undefined;
|
|
262
|
+
deliveredAt?: string | undefined;
|
|
263
|
+
cancelledAt?: string | undefined;
|
|
264
|
+
turnId: string;
|
|
265
|
+
kind: "worker";
|
|
266
|
+
deadline?: string | undefined;
|
|
267
|
+
timeoutSeconds?: number | undefined;
|
|
268
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
269
|
+
workerIds?: string[] | undefined;
|
|
270
|
+
revisions?: {
|
|
271
|
+
workerId: string;
|
|
272
|
+
revision: number;
|
|
273
|
+
}[] | undefined;
|
|
274
|
+
outcomes?: {
|
|
275
|
+
workerId: string;
|
|
276
|
+
status: "cancelled" | "done" | "failed" | "review";
|
|
277
|
+
observedAt: string;
|
|
278
|
+
summary?: string | undefined;
|
|
279
|
+
revision?: number | undefined;
|
|
280
|
+
}[] | undefined;
|
|
281
|
+
requestIds?: string[] | undefined;
|
|
282
|
+
requestOutcomes?: {
|
|
283
|
+
requestId: string;
|
|
284
|
+
status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
|
|
285
|
+
observedAt: string;
|
|
286
|
+
replyId?: string | undefined;
|
|
287
|
+
}[] | undefined;
|
|
288
|
+
result?: {
|
|
289
|
+
reason: "outcome" | "timeout";
|
|
290
|
+
} | undefined;
|
|
291
|
+
wakeInputId?: string | undefined;
|
|
292
|
+
} | {
|
|
293
|
+
id: string;
|
|
294
|
+
source: "agent" | "cezar";
|
|
295
|
+
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
296
|
+
registeredAt: string;
|
|
297
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
298
|
+
resolvedAt?: string | undefined;
|
|
299
|
+
deliveredAt?: string | undefined;
|
|
300
|
+
cancelledAt?: string | undefined;
|
|
301
|
+
turnId: string;
|
|
302
|
+
kind: "process";
|
|
303
|
+
deadline: string;
|
|
304
|
+
timeoutSeconds: number;
|
|
305
|
+
pid: number;
|
|
306
|
+
startToken?: string | undefined;
|
|
307
|
+
exitFile?: string | undefined;
|
|
308
|
+
note?: string | undefined;
|
|
309
|
+
result?: {
|
|
310
|
+
outcome: "deadline" | "error" | "exit_file" | "exited";
|
|
311
|
+
observedAt: string;
|
|
312
|
+
exitCode?: number | undefined;
|
|
313
|
+
exitFileNote?: "not-an-exit-code" | undefined;
|
|
314
|
+
diagnostic?: string | undefined;
|
|
315
|
+
} | undefined;
|
|
316
|
+
} | {
|
|
317
|
+
id: string;
|
|
318
|
+
source: "agent" | "cezar";
|
|
319
|
+
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
320
|
+
registeredAt: string;
|
|
321
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
322
|
+
resolvedAt?: string | undefined;
|
|
323
|
+
deliveredAt?: string | undefined;
|
|
324
|
+
cancelledAt?: string | undefined;
|
|
325
|
+
turnId: string;
|
|
326
|
+
kind: "peer";
|
|
327
|
+
deadline: string;
|
|
328
|
+
timeoutSeconds: number;
|
|
329
|
+
peerIds: string[];
|
|
330
|
+
result?: {
|
|
331
|
+
reason: "message";
|
|
332
|
+
peerRunId: string;
|
|
333
|
+
messageId: string;
|
|
334
|
+
} | {
|
|
335
|
+
reason: "settled";
|
|
336
|
+
peerRunId: string;
|
|
337
|
+
} | {
|
|
338
|
+
reason: "timeout";
|
|
339
|
+
} | undefined;
|
|
340
|
+
} | {
|
|
341
|
+
id: string;
|
|
342
|
+
registeredAt: string;
|
|
343
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
344
|
+
resolvedAt?: string | undefined;
|
|
345
|
+
deliveredAt?: string | undefined;
|
|
346
|
+
cancelledAt?: string | undefined;
|
|
347
|
+
turnId: string;
|
|
348
|
+
kind: "subagent";
|
|
349
|
+
source: "cezar";
|
|
350
|
+
via: "native-subagents";
|
|
351
|
+
deadline: string;
|
|
352
|
+
children: {
|
|
353
|
+
id: string;
|
|
354
|
+
status: "cancelled" | "completed" | "failed" | "running";
|
|
355
|
+
}[];
|
|
356
|
+
result?: {
|
|
357
|
+
reason: "interrupted" | "settled" | "superseded" | "timeout";
|
|
358
|
+
} | undefined;
|
|
359
|
+
})[] | undefined;
|
|
360
|
+
waitRegistrations?: {
|
|
361
|
+
operationId: string;
|
|
362
|
+
requestHash: string;
|
|
363
|
+
wait: {
|
|
364
|
+
prUrl: string;
|
|
365
|
+
repository: string;
|
|
366
|
+
prNumber: number;
|
|
367
|
+
headSha: string;
|
|
368
|
+
id: string;
|
|
369
|
+
source: "agent" | "cezar";
|
|
370
|
+
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
371
|
+
registeredAt: string;
|
|
372
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
373
|
+
resolvedAt?: string | undefined;
|
|
374
|
+
deliveredAt?: string | undefined;
|
|
375
|
+
cancelledAt?: string | undefined;
|
|
376
|
+
turnId: string;
|
|
377
|
+
kind: "pr";
|
|
378
|
+
deadline: string;
|
|
379
|
+
generation: string;
|
|
380
|
+
timeoutSeconds: number;
|
|
381
|
+
until: "checks" | "merge" | "merge_or_blocked";
|
|
382
|
+
wakeOnConflict: boolean;
|
|
383
|
+
callerHead?: true | undefined;
|
|
384
|
+
result?: {
|
|
385
|
+
outcome: "blocked" | "cancelled" | "closed" | "conflicting" | "deadline" | "error" | "failed" | "head_changed" | "merged" | "no_checks" | "passed" | "skipped" | "startup_failure" | "stuck";
|
|
386
|
+
headSha: string;
|
|
387
|
+
observedHeadSha?: string | undefined;
|
|
388
|
+
mergeable?: "CONFLICTING" | "MERGEABLE" | "UNKNOWN" | undefined;
|
|
389
|
+
mergeStateStatus?: string | undefined;
|
|
390
|
+
mergedAt?: string | undefined;
|
|
391
|
+
mergeCommitSha?: string | undefined;
|
|
392
|
+
mergeBlock?: {
|
|
393
|
+
reason: "conflict" | "no_pending_merge";
|
|
394
|
+
isInMergeQueue: boolean;
|
|
395
|
+
autoMergeEnabled: boolean;
|
|
396
|
+
event?: {
|
|
397
|
+
kind: "auto_merge_disabled" | "queue_removal";
|
|
398
|
+
createdAt: string;
|
|
399
|
+
reason?: string | undefined;
|
|
400
|
+
reasonCode?: string | undefined;
|
|
401
|
+
} | undefined;
|
|
402
|
+
} | undefined;
|
|
403
|
+
observedAt: string;
|
|
404
|
+
checks: {
|
|
405
|
+
name: string;
|
|
406
|
+
state: string;
|
|
407
|
+
link: string;
|
|
408
|
+
}[];
|
|
409
|
+
totalChecks: number;
|
|
410
|
+
truncated: boolean;
|
|
411
|
+
diagnostic?: string | undefined;
|
|
412
|
+
} | undefined;
|
|
413
|
+
} | {
|
|
414
|
+
id: string;
|
|
415
|
+
source: "agent" | "cezar";
|
|
416
|
+
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
417
|
+
registeredAt: string;
|
|
418
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
419
|
+
resolvedAt?: string | undefined;
|
|
420
|
+
deliveredAt?: string | undefined;
|
|
421
|
+
cancelledAt?: string | undefined;
|
|
422
|
+
turnId: string;
|
|
423
|
+
kind: "timer";
|
|
424
|
+
deadline: string;
|
|
425
|
+
seconds: number;
|
|
426
|
+
note?: string | undefined;
|
|
427
|
+
} | {
|
|
428
|
+
id: string;
|
|
429
|
+
source: "agent" | "cezar";
|
|
430
|
+
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
431
|
+
registeredAt: string;
|
|
432
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
433
|
+
resolvedAt?: string | undefined;
|
|
434
|
+
deliveredAt?: string | undefined;
|
|
435
|
+
cancelledAt?: string | undefined;
|
|
436
|
+
turnId: string;
|
|
437
|
+
kind: "human";
|
|
438
|
+
questions?: {
|
|
439
|
+
id?: string | undefined;
|
|
440
|
+
header: string;
|
|
441
|
+
question: string;
|
|
442
|
+
options?: {
|
|
443
|
+
label: string;
|
|
444
|
+
description?: string | undefined;
|
|
445
|
+
}[] | undefined;
|
|
446
|
+
multiSelect?: boolean | undefined;
|
|
447
|
+
allowFreeText?: boolean | undefined;
|
|
448
|
+
}[] | undefined;
|
|
449
|
+
context?: string | undefined;
|
|
450
|
+
askSeq?: number | undefined;
|
|
451
|
+
} | {
|
|
452
|
+
id: string;
|
|
453
|
+
source: "agent" | "cezar";
|
|
454
|
+
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
455
|
+
registeredAt: string;
|
|
456
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
457
|
+
resolvedAt?: string | undefined;
|
|
458
|
+
deliveredAt?: string | undefined;
|
|
459
|
+
cancelledAt?: string | undefined;
|
|
460
|
+
turnId: string;
|
|
461
|
+
kind: "worker";
|
|
462
|
+
deadline?: string | undefined;
|
|
463
|
+
timeoutSeconds?: number | undefined;
|
|
464
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
465
|
+
workerIds?: string[] | undefined;
|
|
466
|
+
revisions?: {
|
|
467
|
+
workerId: string;
|
|
468
|
+
revision: number;
|
|
469
|
+
}[] | undefined;
|
|
470
|
+
outcomes?: {
|
|
471
|
+
workerId: string;
|
|
472
|
+
status: "cancelled" | "done" | "failed" | "review";
|
|
473
|
+
observedAt: string;
|
|
474
|
+
summary?: string | undefined;
|
|
475
|
+
revision?: number | undefined;
|
|
476
|
+
}[] | undefined;
|
|
477
|
+
requestIds?: string[] | undefined;
|
|
478
|
+
requestOutcomes?: {
|
|
479
|
+
requestId: string;
|
|
480
|
+
status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
|
|
481
|
+
observedAt: string;
|
|
482
|
+
replyId?: string | undefined;
|
|
483
|
+
}[] | undefined;
|
|
484
|
+
result?: {
|
|
485
|
+
reason: "outcome" | "timeout";
|
|
486
|
+
} | undefined;
|
|
487
|
+
wakeInputId?: string | undefined;
|
|
488
|
+
} | {
|
|
489
|
+
id: string;
|
|
490
|
+
source: "agent" | "cezar";
|
|
491
|
+
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
492
|
+
registeredAt: string;
|
|
493
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
494
|
+
resolvedAt?: string | undefined;
|
|
495
|
+
deliveredAt?: string | undefined;
|
|
496
|
+
cancelledAt?: string | undefined;
|
|
497
|
+
turnId: string;
|
|
498
|
+
kind: "process";
|
|
499
|
+
deadline: string;
|
|
500
|
+
timeoutSeconds: number;
|
|
501
|
+
pid: number;
|
|
502
|
+
startToken?: string | undefined;
|
|
503
|
+
exitFile?: string | undefined;
|
|
504
|
+
note?: string | undefined;
|
|
505
|
+
result?: {
|
|
506
|
+
outcome: "deadline" | "error" | "exit_file" | "exited";
|
|
507
|
+
observedAt: string;
|
|
508
|
+
exitCode?: number | undefined;
|
|
509
|
+
exitFileNote?: "not-an-exit-code" | undefined;
|
|
510
|
+
diagnostic?: string | undefined;
|
|
511
|
+
} | undefined;
|
|
512
|
+
} | {
|
|
513
|
+
id: string;
|
|
514
|
+
source: "agent" | "cezar";
|
|
515
|
+
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
516
|
+
registeredAt: string;
|
|
517
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
518
|
+
resolvedAt?: string | undefined;
|
|
519
|
+
deliveredAt?: string | undefined;
|
|
520
|
+
cancelledAt?: string | undefined;
|
|
521
|
+
turnId: string;
|
|
522
|
+
kind: "peer";
|
|
523
|
+
deadline: string;
|
|
524
|
+
timeoutSeconds: number;
|
|
525
|
+
peerIds: string[];
|
|
526
|
+
result?: {
|
|
527
|
+
reason: "message";
|
|
528
|
+
peerRunId: string;
|
|
529
|
+
messageId: string;
|
|
530
|
+
} | {
|
|
531
|
+
reason: "settled";
|
|
532
|
+
peerRunId: string;
|
|
533
|
+
} | {
|
|
534
|
+
reason: "timeout";
|
|
535
|
+
} | undefined;
|
|
536
|
+
} | {
|
|
537
|
+
id: string;
|
|
538
|
+
registeredAt: string;
|
|
539
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
540
|
+
resolvedAt?: string | undefined;
|
|
541
|
+
deliveredAt?: string | undefined;
|
|
542
|
+
cancelledAt?: string | undefined;
|
|
543
|
+
turnId: string;
|
|
544
|
+
kind: "subagent";
|
|
545
|
+
source: "cezar";
|
|
546
|
+
via: "native-subagents";
|
|
547
|
+
deadline: string;
|
|
548
|
+
children: {
|
|
549
|
+
id: string;
|
|
550
|
+
status: "cancelled" | "completed" | "failed" | "running";
|
|
551
|
+
}[];
|
|
552
|
+
result?: {
|
|
553
|
+
reason: "interrupted" | "settled" | "superseded" | "timeout";
|
|
554
|
+
} | undefined;
|
|
555
|
+
};
|
|
556
|
+
deduplicated: boolean;
|
|
557
|
+
}[] | undefined;
|
|
558
|
+
lastWaits?: ({
|
|
559
|
+
prUrl: string;
|
|
560
|
+
repository: string;
|
|
561
|
+
prNumber: number;
|
|
562
|
+
headSha: string;
|
|
563
|
+
id: string;
|
|
564
|
+
source: "agent" | "cezar";
|
|
565
|
+
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
566
|
+
registeredAt: string;
|
|
567
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
568
|
+
resolvedAt?: string | undefined;
|
|
569
|
+
deliveredAt?: string | undefined;
|
|
570
|
+
cancelledAt?: string | undefined;
|
|
571
|
+
turnId: string;
|
|
572
|
+
kind: "pr";
|
|
573
|
+
deadline: string;
|
|
574
|
+
generation: string;
|
|
575
|
+
timeoutSeconds: number;
|
|
576
|
+
until: "checks" | "merge" | "merge_or_blocked";
|
|
577
|
+
wakeOnConflict: boolean;
|
|
578
|
+
callerHead?: true | undefined;
|
|
579
|
+
result?: {
|
|
580
|
+
outcome: "blocked" | "cancelled" | "closed" | "conflicting" | "deadline" | "error" | "failed" | "head_changed" | "merged" | "no_checks" | "passed" | "skipped" | "startup_failure" | "stuck";
|
|
581
|
+
headSha: string;
|
|
582
|
+
observedHeadSha?: string | undefined;
|
|
583
|
+
mergeable?: "CONFLICTING" | "MERGEABLE" | "UNKNOWN" | undefined;
|
|
584
|
+
mergeStateStatus?: string | undefined;
|
|
585
|
+
mergedAt?: string | undefined;
|
|
586
|
+
mergeCommitSha?: string | undefined;
|
|
587
|
+
mergeBlock?: {
|
|
588
|
+
reason: "conflict" | "no_pending_merge";
|
|
589
|
+
isInMergeQueue: boolean;
|
|
590
|
+
autoMergeEnabled: boolean;
|
|
591
|
+
event?: {
|
|
592
|
+
kind: "auto_merge_disabled" | "queue_removal";
|
|
593
|
+
createdAt: string;
|
|
594
|
+
reason?: string | undefined;
|
|
595
|
+
reasonCode?: string | undefined;
|
|
596
|
+
} | undefined;
|
|
597
|
+
} | undefined;
|
|
598
|
+
observedAt: string;
|
|
599
|
+
checks: {
|
|
600
|
+
name: string;
|
|
601
|
+
state: string;
|
|
602
|
+
link: string;
|
|
603
|
+
}[];
|
|
604
|
+
totalChecks: number;
|
|
605
|
+
truncated: boolean;
|
|
606
|
+
diagnostic?: string | undefined;
|
|
607
|
+
} | undefined;
|
|
608
|
+
} | {
|
|
609
|
+
id: string;
|
|
610
|
+
source: "agent" | "cezar";
|
|
611
|
+
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
612
|
+
registeredAt: string;
|
|
613
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
614
|
+
resolvedAt?: string | undefined;
|
|
615
|
+
deliveredAt?: string | undefined;
|
|
616
|
+
cancelledAt?: string | undefined;
|
|
617
|
+
turnId: string;
|
|
618
|
+
kind: "timer";
|
|
619
|
+
deadline: string;
|
|
620
|
+
seconds: number;
|
|
621
|
+
note?: string | undefined;
|
|
622
|
+
} | {
|
|
623
|
+
id: string;
|
|
624
|
+
source: "agent" | "cezar";
|
|
625
|
+
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
626
|
+
registeredAt: string;
|
|
627
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
628
|
+
resolvedAt?: string | undefined;
|
|
629
|
+
deliveredAt?: string | undefined;
|
|
630
|
+
cancelledAt?: string | undefined;
|
|
631
|
+
turnId: string;
|
|
632
|
+
kind: "human";
|
|
633
|
+
questions?: {
|
|
634
|
+
id?: string | undefined;
|
|
635
|
+
header: string;
|
|
636
|
+
question: string;
|
|
637
|
+
options?: {
|
|
638
|
+
label: string;
|
|
639
|
+
description?: string | undefined;
|
|
640
|
+
}[] | undefined;
|
|
641
|
+
multiSelect?: boolean | undefined;
|
|
642
|
+
allowFreeText?: boolean | undefined;
|
|
643
|
+
}[] | undefined;
|
|
644
|
+
context?: string | undefined;
|
|
645
|
+
askSeq?: number | undefined;
|
|
646
|
+
} | {
|
|
647
|
+
id: string;
|
|
648
|
+
source: "agent" | "cezar";
|
|
649
|
+
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
650
|
+
registeredAt: string;
|
|
651
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
652
|
+
resolvedAt?: string | undefined;
|
|
653
|
+
deliveredAt?: string | undefined;
|
|
654
|
+
cancelledAt?: string | undefined;
|
|
655
|
+
turnId: string;
|
|
656
|
+
kind: "worker";
|
|
657
|
+
deadline?: string | undefined;
|
|
658
|
+
timeoutSeconds?: number | undefined;
|
|
659
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
660
|
+
workerIds?: string[] | undefined;
|
|
661
|
+
revisions?: {
|
|
662
|
+
workerId: string;
|
|
663
|
+
revision: number;
|
|
664
|
+
}[] | undefined;
|
|
665
|
+
outcomes?: {
|
|
666
|
+
workerId: string;
|
|
667
|
+
status: "cancelled" | "done" | "failed" | "review";
|
|
668
|
+
observedAt: string;
|
|
669
|
+
summary?: string | undefined;
|
|
670
|
+
revision?: number | undefined;
|
|
671
|
+
}[] | undefined;
|
|
672
|
+
requestIds?: string[] | undefined;
|
|
673
|
+
requestOutcomes?: {
|
|
674
|
+
requestId: string;
|
|
675
|
+
status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
|
|
676
|
+
observedAt: string;
|
|
677
|
+
replyId?: string | undefined;
|
|
678
|
+
}[] | undefined;
|
|
679
|
+
result?: {
|
|
680
|
+
reason: "outcome" | "timeout";
|
|
681
|
+
} | undefined;
|
|
682
|
+
wakeInputId?: string | undefined;
|
|
683
|
+
} | {
|
|
684
|
+
id: string;
|
|
685
|
+
source: "agent" | "cezar";
|
|
686
|
+
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
687
|
+
registeredAt: string;
|
|
688
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
689
|
+
resolvedAt?: string | undefined;
|
|
690
|
+
deliveredAt?: string | undefined;
|
|
691
|
+
cancelledAt?: string | undefined;
|
|
692
|
+
turnId: string;
|
|
693
|
+
kind: "process";
|
|
694
|
+
deadline: string;
|
|
695
|
+
timeoutSeconds: number;
|
|
696
|
+
pid: number;
|
|
697
|
+
startToken?: string | undefined;
|
|
698
|
+
exitFile?: string | undefined;
|
|
699
|
+
note?: string | undefined;
|
|
700
|
+
result?: {
|
|
701
|
+
outcome: "deadline" | "error" | "exit_file" | "exited";
|
|
702
|
+
observedAt: string;
|
|
703
|
+
exitCode?: number | undefined;
|
|
704
|
+
exitFileNote?: "not-an-exit-code" | undefined;
|
|
705
|
+
diagnostic?: string | undefined;
|
|
706
|
+
} | undefined;
|
|
707
|
+
} | {
|
|
708
|
+
id: string;
|
|
709
|
+
source: "agent" | "cezar";
|
|
710
|
+
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
711
|
+
registeredAt: string;
|
|
712
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
713
|
+
resolvedAt?: string | undefined;
|
|
714
|
+
deliveredAt?: string | undefined;
|
|
715
|
+
cancelledAt?: string | undefined;
|
|
716
|
+
turnId: string;
|
|
717
|
+
kind: "peer";
|
|
718
|
+
deadline: string;
|
|
719
|
+
timeoutSeconds: number;
|
|
720
|
+
peerIds: string[];
|
|
721
|
+
result?: {
|
|
722
|
+
reason: "message";
|
|
723
|
+
peerRunId: string;
|
|
724
|
+
messageId: string;
|
|
725
|
+
} | {
|
|
726
|
+
reason: "settled";
|
|
727
|
+
peerRunId: string;
|
|
728
|
+
} | {
|
|
729
|
+
reason: "timeout";
|
|
730
|
+
} | undefined;
|
|
731
|
+
} | {
|
|
732
|
+
id: string;
|
|
733
|
+
registeredAt: string;
|
|
734
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
735
|
+
resolvedAt?: string | undefined;
|
|
736
|
+
deliveredAt?: string | undefined;
|
|
737
|
+
cancelledAt?: string | undefined;
|
|
738
|
+
turnId: string;
|
|
739
|
+
kind: "subagent";
|
|
740
|
+
source: "cezar";
|
|
741
|
+
via: "native-subagents";
|
|
742
|
+
deadline: string;
|
|
743
|
+
children: {
|
|
744
|
+
id: string;
|
|
745
|
+
status: "cancelled" | "completed" | "failed" | "running";
|
|
746
|
+
}[];
|
|
747
|
+
result?: {
|
|
748
|
+
reason: "interrupted" | "settled" | "superseded" | "timeout";
|
|
749
|
+
} | undefined;
|
|
750
|
+
})[] | undefined;
|
|
751
|
+
previewServers?: {
|
|
752
|
+
port: number;
|
|
753
|
+
command: string;
|
|
754
|
+
cwd?: string | undefined;
|
|
755
|
+
label: string;
|
|
756
|
+
path?: string | undefined;
|
|
757
|
+
registeredAt: string;
|
|
758
|
+
answeredAtRegistration: boolean;
|
|
759
|
+
}[] | undefined;
|
|
760
|
+
taskImages?: string[] | undefined;
|
|
761
|
+
model?: string | undefined;
|
|
762
|
+
effort?: string | undefined;
|
|
763
|
+
modelIdentity?: string | undefined;
|
|
764
|
+
removedRunner?: string | undefined;
|
|
765
|
+
agentProfile?: string | undefined;
|
|
766
|
+
systemPrompt?: string | undefined;
|
|
767
|
+
generateFollowups?: boolean | undefined;
|
|
768
|
+
autonomous?: boolean | undefined;
|
|
769
|
+
completionAction?: {
|
|
770
|
+
id: string;
|
|
771
|
+
phase: "blocked" | "complete" | "pending";
|
|
772
|
+
message?: string | undefined;
|
|
773
|
+
} | undefined;
|
|
774
|
+
archiveBlocker?: {
|
|
775
|
+
message: string;
|
|
776
|
+
runId?: string | undefined;
|
|
777
|
+
pullRequestUrl?: string | undefined;
|
|
778
|
+
} | undefined;
|
|
779
|
+
status: "cancelled" | "done" | "failed" | "queued" | "review" | "running" | "waiting";
|
|
780
|
+
createdAt: string;
|
|
781
|
+
startedAt?: string | undefined;
|
|
782
|
+
finishedAt?: string | undefined;
|
|
783
|
+
tokensUsed: number;
|
|
784
|
+
inputTokens?: number | undefined;
|
|
785
|
+
outputTokens?: number | undefined;
|
|
786
|
+
costUsd?: number | undefined;
|
|
787
|
+
pullRequestUrl?: string | undefined;
|
|
788
|
+
referencedPullRequestUrl?: string | undefined;
|
|
789
|
+
prNumber?: number | undefined;
|
|
790
|
+
issueNumber?: number | undefined;
|
|
791
|
+
referencedIssueNumberSeeded?: boolean | undefined;
|
|
792
|
+
titleOrigin?: "auto" | "marker" | "user" | undefined;
|
|
793
|
+
markerRefs?: {
|
|
794
|
+
pr?: number | undefined;
|
|
795
|
+
issue?: number | undefined;
|
|
796
|
+
} | undefined;
|
|
797
|
+
referencedPrCandidates?: string[] | undefined;
|
|
798
|
+
referencedIssueUrl?: string | undefined;
|
|
799
|
+
referencedIssueCandidates?: string[] | undefined;
|
|
800
|
+
worktree?: false | undefined;
|
|
801
|
+
worktreePath?: string | undefined;
|
|
802
|
+
branch?: string | undefined;
|
|
803
|
+
baseBranch?: string | undefined;
|
|
804
|
+
worktreeReclaimedAt?: string | undefined;
|
|
805
|
+
groupId?: string | undefined;
|
|
806
|
+
variant?: string | undefined;
|
|
807
|
+
clientRequestId?: string | undefined;
|
|
808
|
+
clientRequestHash?: string | undefined;
|
|
809
|
+
peakRssBytes?: number | undefined;
|
|
810
|
+
peakProcCount?: number | undefined;
|
|
811
|
+
archivedAt?: string | undefined;
|
|
812
|
+
autoArchive?: {
|
|
813
|
+
reason: "pull-requests-merged";
|
|
814
|
+
archivedAt: string;
|
|
815
|
+
fingerprint: string;
|
|
816
|
+
pullRequests: {
|
|
817
|
+
owner: string;
|
|
818
|
+
repo: string;
|
|
819
|
+
number: number;
|
|
820
|
+
mergedAt: string;
|
|
821
|
+
}[];
|
|
822
|
+
} | undefined;
|
|
823
|
+
manualUnarchivedAt?: string | undefined;
|
|
824
|
+
pinned?: boolean | undefined;
|
|
825
|
+
pinnedAt?: string | undefined;
|
|
826
|
+
seenAt?: string | undefined;
|
|
827
|
+
currentStepId?: string | undefined;
|
|
828
|
+
error?: string | undefined;
|
|
829
|
+
delegation?: {
|
|
830
|
+
role: "root";
|
|
831
|
+
conversation?: {
|
|
832
|
+
messages: {
|
|
833
|
+
senderRunId: string;
|
|
834
|
+
recipientRunId: string;
|
|
835
|
+
kind: "follow-up" | "progress" | "reply" | "request";
|
|
836
|
+
requestId?: string | undefined;
|
|
837
|
+
relationship?: "family" | "peer" | undefined;
|
|
838
|
+
id: string;
|
|
839
|
+
text: string;
|
|
840
|
+
createdAt: string;
|
|
841
|
+
deadline?: string | undefined;
|
|
842
|
+
requestHash: string;
|
|
843
|
+
state: "accepted" | "continuation-required" | "destroyed" | "late";
|
|
844
|
+
resumed?: true | undefined;
|
|
845
|
+
instruction?: string | undefined;
|
|
846
|
+
question?: {
|
|
847
|
+
context?: string | undefined;
|
|
848
|
+
questions: {
|
|
849
|
+
id?: string | undefined;
|
|
850
|
+
header: string;
|
|
851
|
+
question: string;
|
|
852
|
+
options?: {
|
|
853
|
+
label: string;
|
|
854
|
+
description?: string | undefined;
|
|
855
|
+
}[] | undefined;
|
|
856
|
+
multiSelect?: boolean | undefined;
|
|
857
|
+
allowFreeText?: boolean | undefined;
|
|
858
|
+
}[];
|
|
859
|
+
} | undefined;
|
|
860
|
+
}[];
|
|
861
|
+
outcomes: {
|
|
862
|
+
requestId: string;
|
|
863
|
+
status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
|
|
864
|
+
observedAt: string;
|
|
865
|
+
replyId?: string | undefined;
|
|
866
|
+
}[];
|
|
867
|
+
} | undefined;
|
|
868
|
+
permissions: ("destroy" | "diff" | "inspect" | "spawn" | "steer" | "stop" | "wait")[];
|
|
869
|
+
spawnGrant?: {
|
|
870
|
+
kinds: ("owned-isolated" | "shared")[];
|
|
871
|
+
live: number;
|
|
872
|
+
children?: /*elided*/ any | undefined;
|
|
873
|
+
} | undefined;
|
|
874
|
+
receipts: {
|
|
875
|
+
requestId: string;
|
|
876
|
+
workerId: string;
|
|
877
|
+
requestHash: string;
|
|
878
|
+
supervisorRunId?: string | undefined;
|
|
879
|
+
deletion?: {
|
|
880
|
+
phase: "complete" | "pending";
|
|
881
|
+
revision: number;
|
|
882
|
+
resourceId: string;
|
|
883
|
+
generation: string;
|
|
884
|
+
} | undefined;
|
|
885
|
+
}[];
|
|
886
|
+
wait?: {
|
|
887
|
+
id: string;
|
|
888
|
+
workerIds: string[];
|
|
889
|
+
requestIds?: string[] | undefined;
|
|
890
|
+
requestOutcomes?: {
|
|
891
|
+
requestId: string;
|
|
892
|
+
status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
|
|
893
|
+
observedAt: string;
|
|
894
|
+
replyId?: string | undefined;
|
|
895
|
+
}[] | undefined;
|
|
896
|
+
deadline: string;
|
|
897
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
898
|
+
revisions?: {
|
|
899
|
+
workerId: string;
|
|
900
|
+
revision: number;
|
|
901
|
+
}[] | undefined;
|
|
902
|
+
reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
|
|
903
|
+
phase: "parked" | "registered" | "wake-pending";
|
|
904
|
+
outcomes: {
|
|
905
|
+
workerId: string;
|
|
906
|
+
status: "cancelled" | "done" | "failed" | "review";
|
|
907
|
+
observedAt: string;
|
|
908
|
+
summary?: string | undefined;
|
|
909
|
+
revision?: number | undefined;
|
|
910
|
+
}[];
|
|
911
|
+
wakeId?: string | undefined;
|
|
912
|
+
} | undefined;
|
|
913
|
+
lastWait?: {
|
|
914
|
+
id: string;
|
|
915
|
+
workerIds: string[];
|
|
916
|
+
requestIds?: string[] | undefined;
|
|
917
|
+
requestOutcomes?: {
|
|
918
|
+
requestId: string;
|
|
919
|
+
status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
|
|
920
|
+
observedAt: string;
|
|
921
|
+
replyId?: string | undefined;
|
|
922
|
+
}[] | undefined;
|
|
923
|
+
deadline: string;
|
|
924
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
925
|
+
revisions?: {
|
|
926
|
+
workerId: string;
|
|
927
|
+
revision: number;
|
|
928
|
+
}[] | undefined;
|
|
929
|
+
reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
|
|
930
|
+
phase: "parked" | "registered" | "wake-pending";
|
|
931
|
+
outcomes: {
|
|
932
|
+
workerId: string;
|
|
933
|
+
status: "cancelled" | "done" | "failed" | "review";
|
|
934
|
+
observedAt: string;
|
|
935
|
+
summary?: string | undefined;
|
|
936
|
+
revision?: number | undefined;
|
|
937
|
+
}[];
|
|
938
|
+
wakeId?: string | undefined;
|
|
939
|
+
} | undefined;
|
|
940
|
+
results?: {
|
|
941
|
+
workerId: string;
|
|
942
|
+
revision: number;
|
|
943
|
+
snapshotId: string;
|
|
944
|
+
observedAt: string;
|
|
945
|
+
lastExecutionOutcome: "cancelled" | "completed" | "failed" | "review-ready" | "running";
|
|
946
|
+
previous?: {
|
|
947
|
+
revision: number;
|
|
948
|
+
observedAt: string;
|
|
949
|
+
lastExecutionOutcome: "cancelled" | "completed" | "failed" | "review-ready" | "running";
|
|
950
|
+
} | undefined;
|
|
951
|
+
}[] | undefined;
|
|
952
|
+
finishRequestedAt?: string | undefined;
|
|
953
|
+
historyDeletion?: "pending" | undefined;
|
|
954
|
+
completion?: {
|
|
955
|
+
phase: "attention" | "waiting";
|
|
956
|
+
waitId?: string | undefined;
|
|
957
|
+
} | undefined;
|
|
958
|
+
} | {
|
|
959
|
+
role: "worker";
|
|
960
|
+
wait?: {
|
|
961
|
+
id: string;
|
|
962
|
+
workerIds: string[];
|
|
963
|
+
requestIds?: string[] | undefined;
|
|
964
|
+
requestOutcomes?: {
|
|
965
|
+
requestId: string;
|
|
966
|
+
status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
|
|
967
|
+
observedAt: string;
|
|
968
|
+
replyId?: string | undefined;
|
|
969
|
+
}[] | undefined;
|
|
970
|
+
deadline: string;
|
|
971
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
972
|
+
revisions?: {
|
|
973
|
+
workerId: string;
|
|
974
|
+
revision: number;
|
|
975
|
+
}[] | undefined;
|
|
976
|
+
reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
|
|
977
|
+
phase: "parked" | "registered" | "wake-pending";
|
|
978
|
+
outcomes: {
|
|
979
|
+
workerId: string;
|
|
980
|
+
status: "cancelled" | "done" | "failed" | "review";
|
|
981
|
+
observedAt: string;
|
|
982
|
+
summary?: string | undefined;
|
|
983
|
+
revision?: number | undefined;
|
|
984
|
+
}[];
|
|
985
|
+
wakeId?: string | undefined;
|
|
986
|
+
} | undefined;
|
|
987
|
+
lastWait?: {
|
|
988
|
+
id: string;
|
|
989
|
+
workerIds: string[];
|
|
990
|
+
requestIds?: string[] | undefined;
|
|
991
|
+
requestOutcomes?: {
|
|
992
|
+
requestId: string;
|
|
993
|
+
status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
|
|
994
|
+
observedAt: string;
|
|
995
|
+
replyId?: string | undefined;
|
|
996
|
+
}[] | undefined;
|
|
997
|
+
deadline: string;
|
|
998
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
999
|
+
revisions?: {
|
|
1000
|
+
workerId: string;
|
|
1001
|
+
revision: number;
|
|
1002
|
+
}[] | undefined;
|
|
1003
|
+
reason?: "cancelled" | "message" | "outcome" | "timeout" | undefined;
|
|
1004
|
+
phase: "parked" | "registered" | "wake-pending";
|
|
1005
|
+
outcomes: {
|
|
1006
|
+
workerId: string;
|
|
1007
|
+
status: "cancelled" | "done" | "failed" | "review";
|
|
1008
|
+
observedAt: string;
|
|
1009
|
+
summary?: string | undefined;
|
|
1010
|
+
revision?: number | undefined;
|
|
1011
|
+
}[];
|
|
1012
|
+
wakeId?: string | undefined;
|
|
1013
|
+
} | undefined;
|
|
1014
|
+
permissions: ("destroy" | "diff" | "inspect" | "spawn" | "steer" | "stop" | "wait")[];
|
|
1015
|
+
spawnGrant?: {
|
|
1016
|
+
kinds: ("owned-isolated" | "shared")[];
|
|
1017
|
+
live: number;
|
|
1018
|
+
children?: any | undefined;
|
|
1019
|
+
} | undefined;
|
|
1020
|
+
parentRunId: string;
|
|
1021
|
+
supervisorRunId?: string | undefined;
|
|
1022
|
+
workspace: {
|
|
1023
|
+
ownerRunId: string;
|
|
1024
|
+
resourceId: string;
|
|
1025
|
+
kind: "owned-isolated";
|
|
1026
|
+
path: string;
|
|
1027
|
+
branch: string;
|
|
1028
|
+
baselineSha: string;
|
|
1029
|
+
} | {
|
|
1030
|
+
ownerRunId: string;
|
|
1031
|
+
resourceId: string;
|
|
1032
|
+
kind: "shared";
|
|
1033
|
+
path: string;
|
|
1034
|
+
hostRunId: string;
|
|
1035
|
+
baselineSha: string;
|
|
1036
|
+
};
|
|
1037
|
+
destroy?: {
|
|
1038
|
+
requestedAt: string;
|
|
1039
|
+
phase: "cleaning" | "complete" | "incomplete" | "requested" | "terminating";
|
|
1040
|
+
remaining: ("branch" | "process" | "worktree")[];
|
|
1041
|
+
error?: string | undefined;
|
|
1042
|
+
discardWork?: true | undefined;
|
|
1043
|
+
} | undefined;
|
|
1044
|
+
context?: {
|
|
1045
|
+
text?: string | undefined;
|
|
1046
|
+
inputs: {
|
|
1047
|
+
source: {
|
|
1048
|
+
kind: "parent-file";
|
|
1049
|
+
path: string;
|
|
1050
|
+
} | {
|
|
1051
|
+
kind: "baseline-file";
|
|
1052
|
+
path: string;
|
|
1053
|
+
} | {
|
|
1054
|
+
kind: "parent-attachment";
|
|
1055
|
+
id: string;
|
|
1056
|
+
};
|
|
1057
|
+
path: string;
|
|
1058
|
+
sha256: string;
|
|
1059
|
+
bytes: number;
|
|
1060
|
+
}[];
|
|
1061
|
+
} | undefined;
|
|
1062
|
+
executionRevision?: number | undefined;
|
|
1063
|
+
executionStartSeq?: number | undefined;
|
|
1064
|
+
} | {
|
|
1065
|
+
role: "invalid";
|
|
1066
|
+
} | undefined;
|
|
1067
|
+
lastWaitsError?: string | undefined;
|
|
1068
|
+
automaticWakes?: number | undefined;
|
|
1069
|
+
waitDeliveryFailures?: number | undefined;
|
|
1070
|
+
runner?: string | undefined;
|
|
1071
|
+
notify?: boolean | undefined;
|
|
1072
|
+
webhook?: {
|
|
1073
|
+
lastDeliveredAt?: string | undefined;
|
|
1074
|
+
lastError?: string | undefined;
|
|
1075
|
+
lastErrorWebhookId?: string | undefined;
|
|
1076
|
+
} | undefined;
|
|
1077
|
+
destroyRetry?: {
|
|
1078
|
+
attempts: number;
|
|
1079
|
+
nextAt: string;
|
|
1080
|
+
needsAttention?: true | undefined;
|
|
1081
|
+
} | undefined;
|
|
1082
|
+
stopping?: boolean | undefined;
|
|
1083
|
+
autoResumeAt?: string | undefined;
|
|
1084
|
+
autoResumeAttempts?: number | undefined;
|
|
1085
|
+
autoResumeReason?: "provider-error" | "usage-limit" | undefined;
|
|
1086
|
+
parkReason?: "closing-wakes" | "hold" | "turn" | undefined;
|
|
1087
|
+
hasPendingPermission?: boolean | undefined;
|
|
1088
|
+
pullRequests?: {
|
|
1089
|
+
number: number;
|
|
1090
|
+
url?: string | undefined;
|
|
1091
|
+
source: "created" | "declared";
|
|
1092
|
+
}[] | undefined;
|
|
1093
|
+
worktreeSetup?: {
|
|
1094
|
+
status: "done" | "failed" | "running";
|
|
1095
|
+
startedAt: string;
|
|
1096
|
+
finishedAt?: string | undefined;
|
|
1097
|
+
durationMs?: number | undefined;
|
|
1098
|
+
error?: string | undefined;
|
|
1099
|
+
} | undefined;
|
|
1100
|
+
workflowCursor?: {
|
|
1101
|
+
stepId: string;
|
|
1102
|
+
mode: "resume" | "start";
|
|
1103
|
+
} | undefined;
|
|
1104
|
+
doneAccepted?: {
|
|
1105
|
+
session: string;
|
|
1106
|
+
at: string;
|
|
1107
|
+
seq: number;
|
|
1108
|
+
openWaits: string[];
|
|
1109
|
+
settledWaits: string[];
|
|
1110
|
+
lastInput?: string | undefined;
|
|
1111
|
+
summary?: string | undefined;
|
|
1112
|
+
freeTurn?: true | undefined;
|
|
1113
|
+
} | undefined;
|
|
1114
|
+
archived: boolean;
|
|
1115
|
+
workflowDef?: {
|
|
1116
|
+
name: string;
|
|
1117
|
+
description?: string | undefined;
|
|
1118
|
+
steps: {
|
|
1119
|
+
id: string;
|
|
1120
|
+
name?: string | undefined;
|
|
1121
|
+
prompt?: string | undefined;
|
|
1122
|
+
skill?: string | undefined;
|
|
1123
|
+
model?: string | undefined;
|
|
1124
|
+
effort?: string | undefined;
|
|
1125
|
+
timeoutMs?: number | undefined;
|
|
1126
|
+
runner?: string | undefined;
|
|
1127
|
+
agentProfile?: string | undefined;
|
|
1128
|
+
allowedTools?: string[] | undefined;
|
|
1129
|
+
bashAllowlist?: string[] | undefined;
|
|
1130
|
+
command?: string | undefined;
|
|
1131
|
+
onFail?: {
|
|
1132
|
+
retry: string;
|
|
1133
|
+
max: number;
|
|
1134
|
+
} | undefined;
|
|
1135
|
+
}[];
|
|
1136
|
+
source: "built-in" | "file";
|
|
1137
|
+
path?: string | undefined;
|
|
1138
|
+
} | undefined;
|
|
1139
|
+
steps: {
|
|
1140
|
+
id: string;
|
|
1141
|
+
name: string;
|
|
1142
|
+
kind: "agent" | "check";
|
|
1143
|
+
status: "cancelled" | "done" | "failed" | "pending" | "review" | "running" | "skipped" | "waiting";
|
|
1144
|
+
iterations: number;
|
|
1145
|
+
retriesUsed?: number | undefined;
|
|
1146
|
+
tokensUsed: number;
|
|
1147
|
+
inputTokens?: number | undefined;
|
|
1148
|
+
outputTokens?: number | undefined;
|
|
1149
|
+
usageInvocationsStarted?: number | undefined;
|
|
1150
|
+
usageInvocationsObserved?: number | undefined;
|
|
1151
|
+
usageTurnsStarted?: number | undefined;
|
|
1152
|
+
usageTurnsRecorded?: number | undefined;
|
|
1153
|
+
usageInvocationEpoch?: number | undefined;
|
|
1154
|
+
startedAt?: string | undefined;
|
|
1155
|
+
finishedAt?: string | undefined;
|
|
1156
|
+
error?: string | undefined;
|
|
1157
|
+
sessionId?: string | undefined;
|
|
1158
|
+
removedBackend?: string | undefined;
|
|
1159
|
+
profileId?: string | undefined;
|
|
1160
|
+
skillPath?: string | undefined;
|
|
1161
|
+
costUsd?: number | undefined;
|
|
1162
|
+
synthetic?: "continuation" | undefined;
|
|
1163
|
+
continuesStepId?: string | undefined;
|
|
1164
|
+
backend?: string | undefined;
|
|
1165
|
+
}[];
|
|
1166
|
+
automation?: {
|
|
1167
|
+
automationId: string;
|
|
1168
|
+
receiptId: string;
|
|
1169
|
+
event: string;
|
|
1170
|
+
automationRevision: number;
|
|
1171
|
+
githubUrl: string;
|
|
1172
|
+
} | undefined;
|
|
1173
|
+
automationTrigger?: {
|
|
1174
|
+
automationId: string;
|
|
1175
|
+
receiptId: string;
|
|
1176
|
+
trigger: "catch-up" | "manual" | "schedule";
|
|
1177
|
+
occurrenceAt: string;
|
|
1178
|
+
automationRevision: number;
|
|
1179
|
+
} | undefined;
|
|
1180
|
+
handoffRecords?: {
|
|
1181
|
+
autosave: {
|
|
1182
|
+
at: string;
|
|
1183
|
+
note: string;
|
|
1184
|
+
periodic?: {
|
|
1185
|
+
branch: string | null;
|
|
1186
|
+
count: number;
|
|
1187
|
+
first: string | null;
|
|
1188
|
+
latest: string | null;
|
|
1189
|
+
} | undefined;
|
|
1190
|
+
}[];
|
|
1191
|
+
} | undefined;
|
|
1192
|
+
}>, exit?: RunExitId): boolean;
|
|
1193
|
+
/** Transcript form follows `archived`: enqueue compression, or restore the plain file now. */
|
|
1194
|
+
syncTranscriptForm(id: string, archived: boolean): void;
|
|
1195
|
+
/**
|
|
1196
|
+
* Whether this store may compress `id`'s transcript: the run exists, is archived, is not in a
|
|
1197
|
+
* live status (queued/running/waiting), and this process holds the family's claim in `claimed`
|
|
1198
|
+
* (not merely `pendingClaims`). Two processes never both write a run (#779, #818 B1).
|
|
1199
|
+
*/
|
|
1200
|
+
private isHistoryCompressEligible;
|
|
1201
|
+
/** Take the family claim if free and require it to be in `this.state.claimed`, not only pending. */
|
|
1202
|
+
private holdsCompressClaim;
|
|
1203
|
+
/** Startup sweep: enqueue every archived non-live run that still has a plain transcript. */
|
|
1204
|
+
compressArchivedHistory(): void;
|
|
1205
|
+
/** Resolves when the transcript compressor is idle (tests, shutdown). */
|
|
1206
|
+
historyIdle(): Promise<void>;
|
|
1207
|
+
/** Bulk-archive finished runs (#780). `isSweepable` decides which; `archived` counts every
|
|
1208
|
+
* record that flipped (cascaded workers included), `ids` lists the top-level runs picked and
|
|
1209
|
+
* `pinnedIds` the subset that carried a pin before `clearPin` dropped it. */
|
|
1210
|
+
archiveFinished(scope?: ArchiveFinishedScope, automation?: boolean): {
|
|
1211
|
+
archived: number;
|
|
1212
|
+
ids: string[];
|
|
1213
|
+
pinnedIds: string[];
|
|
1214
|
+
};
|
|
1215
|
+
/** Form follows archived: a terminal archived run with a plain transcript is queued again. */
|
|
1216
|
+
maybeEnqueueHistoryCompress(run: RunRecord): void;
|
|
1217
|
+
}
|