@hearsay-tools/squawk 0.18.0-dev.8054 → 0.18.0-dev.8063
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/automations/agent-tools.d.ts +2 -0
- package/dist/automations/agent-tools.js +24 -0
- package/dist/automations/agent-tools.js.map +1 -0
- package/dist/automations/tool-catalog.d.ts +119 -0
- package/dist/automations/tool-catalog.js +48 -0
- package/dist/automations/tool-catalog.js.map +1 -0
- package/dist/automations/tool-client.d.ts +9 -0
- package/dist/automations/tool-client.js +19 -0
- package/dist/automations/tool-client.js.map +1 -0
- package/dist/automations/tool-env.d.ts +1 -0
- package/dist/automations/tool-env.js +3 -0
- package/dist/automations/tool-env.js.map +1 -0
- package/dist/automations/tool-errors.d.ts +9 -0
- package/dist/automations/tool-errors.js +34 -0
- package/dist/automations/tool-errors.js.map +1 -0
- package/dist/automations/tool-session.d.ts +5 -0
- package/dist/automations/tool-session.js +19 -0
- package/dist/automations/tool-session.js.map +1 -0
- package/dist/automations/tools.d.ts +325 -0
- package/dist/automations/tools.js +30 -0
- package/dist/automations/tools.js.map +1 -0
- package/dist/built-in-tool-definitions.d.ts +0 -2
- package/dist/built-in-tool-definitions.js +3 -35
- package/dist/built-in-tool-definitions.js.map +1 -1
- package/dist/built-in-tools.js +4 -2
- package/dist/built-in-tools.js.map +1 -1
- package/dist/built-in-wait-kinds.d.ts +2 -1
- package/dist/built-in-wait-kinds.js +9 -5
- package/dist/built-in-wait-kinds.js.map +1 -1
- package/dist/ci-wait/client.d.ts +0 -17
- package/dist/ci-wait/client.js +0 -31
- package/dist/ci-wait/client.js.map +1 -1
- package/dist/ci-wait/controller.js +1 -2
- package/dist/ci-wait/controller.js.map +1 -1
- package/dist/ci-wait/errors.d.ts +1 -14
- package/dist/ci-wait/errors.js +0 -68
- package/dist/ci-wait/errors.js.map +1 -1
- package/dist/ci-wait/pr-wait-kind.d.ts +65 -0
- package/dist/ci-wait/pr-wait-kind.js +120 -0
- package/dist/ci-wait/pr-wait-kind.js.map +1 -0
- package/dist/ci-wait/tool-catalog.d.ts +0 -263
- package/dist/ci-wait/tool-catalog.js +0 -58
- package/dist/ci-wait/tool-catalog.js.map +1 -1
- package/dist/ci-wait/tool-definition.d.ts +21 -0
- package/dist/ci-wait/tool-definition.js +9 -0
- package/dist/ci-wait/tool-definition.js.map +1 -0
- package/dist/ci-wait/tool-registry.d.ts +2 -0
- package/dist/ci-wait/tool-registry.js.map +1 -1
- package/dist/ci-wait/tools.d.ts +2 -381
- package/dist/ci-wait/tools.js +3 -46
- package/dist/ci-wait/tools.js.map +1 -1
- package/dist/delegation/wait-kinds.d.ts +8 -0
- package/dist/delegation/wait-kinds.js +317 -0
- package/dist/delegation/wait-kinds.js.map +1 -0
- package/dist/preview/agent-address.js +1 -1
- package/dist/preview/agent-address.js.map +1 -1
- package/dist/preview/agent-tools.d.ts +2 -0
- package/dist/preview/agent-tools.js +18 -0
- package/dist/preview/agent-tools.js.map +1 -0
- package/dist/preview/registration.js +1 -1
- package/dist/preview/registration.js.map +1 -1
- package/dist/preview/run-tools.d.ts +1 -0
- package/dist/preview/run-tools.js +2 -1
- package/dist/preview/run-tools.js.map +1 -1
- package/dist/preview/tool-catalog.d.ts +146 -0
- package/dist/preview/tool-catalog.js +14 -0
- package/dist/preview/tool-catalog.js.map +1 -0
- package/dist/preview/tool-client.d.ts +8 -0
- package/dist/preview/tool-client.js +16 -0
- package/dist/preview/tool-client.js.map +1 -0
- package/dist/preview/tool-env.d.ts +2 -0
- package/dist/preview/tool-env.js +4 -0
- package/dist/preview/tool-env.js.map +1 -0
- package/dist/preview/tool-errors.d.ts +7 -0
- package/dist/preview/tool-errors.js +36 -0
- package/dist/preview/tool-errors.js.map +1 -0
- package/dist/preview/tool-session.d.ts +6 -0
- package/dist/preview/tool-session.js +9 -0
- package/dist/preview/tool-session.js.map +1 -0
- package/dist/preview/tools.d.ts +57 -0
- package/dist/preview/tools.js +18 -0
- package/dist/preview/tools.js.map +1 -0
- package/dist/serve-command.d.ts +1 -1
- package/dist/serve-command.js +1 -1
- package/dist/server/preview-cdp-socket.js +1 -1
- package/dist/server/preview-socket.js +1 -1
- package/dist/workflows/run/compose.js +2 -2
- package/dist/workflows/run/compose.js.map +1 -1
- package/dist/workflows/run/squawk-tools.d.ts +6 -9
- package/dist/workflows/run/squawk-tools.js +8 -18
- package/dist/workflows/run/squawk-tools.js.map +1 -1
- package/dist/workflows/run/wait-engine.d.ts +23 -37
- package/dist/workflows/run/wait-engine.js +100 -212
- package/dist/workflows/run/wait-engine.js.map +1 -1
- package/dist/workflows/run/wait-kind-registry.d.ts +78 -2
- package/dist/workflows/run/wait-kind-registry.js.map +1 -1
- package/dist/workflows/run/wait-kinds.d.ts +390 -1011
- package/dist/workflows/run/wait-kinds.js +71 -188
- package/dist/workflows/run/wait-kinds.js.map +1 -1
- package/dist/workflows/run/wait-registration.d.ts +7 -0
- package/dist/workflows/run/wait-registration.js +2 -0
- package/dist/workflows/run/wait-registration.js.map +1 -1
- package/dist/workflows/run/wait-registry.d.ts +26 -36
- package/dist/workflows/run/wait-registry.js +71 -160
- package/dist/workflows/run/wait-registry.js.map +1 -1
- package/dist/workflows/waits.d.ts +2 -2
- package/dist/workflows/waits.js +2 -2
- package/dist/workflows/waits.js.map +1 -1
- package/package.json +4 -4
- package/dist/ci-wait/tool-env.d.ts +0 -4
- package/dist/ci-wait/tool-env.js +0 -11
- package/dist/ci-wait/tool-env.js.map +0 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { type WaitRegistryPort } from './wait-kind-registry.ts';
|
|
1
2
|
import type { WaitResult, resolvedWaits } from '../waits.ts';
|
|
2
|
-
import type {
|
|
3
|
-
import type { TimerWaitEntry, PrWaitEntry, ProcessWaitEntry, PeerWaitEntry, WorkerWaitEntry, HumanWaitEntry, BuiltInSquawkWaitRequestInput as SquawkWaitRequestInput, WaitVia, SubagentWaitEntry, SubagentChild } from '../../contract/index.js';
|
|
3
|
+
import type { TimerWaitEntry, PrWaitEntry, ProcessWaitEntry, PeerWaitEntry, WorkerWaitEntry, DeadlinedWorkerWaitEntry, HumanWaitEntry, BuiltInSquawkWaitRequestInput as SquawkWaitRequestInput, WaitVia, SubagentWaitEntry, SubagentChild } from '../../contract/index.js';
|
|
4
4
|
import type { Wait, WaitPhase, BuiltInSquawkWaitRequest as SquawkWaitRequest } from '../../contract/index.js';
|
|
5
|
+
import type { WorkerWaitRequest } from '../../contract/index.js';
|
|
5
6
|
import type { FiredBy } from '../run-states.ts';
|
|
7
|
+
import type { RegistrationIdentity } from './wait-registration.ts';
|
|
6
8
|
import { isSquawkHumanWait } from '../../runs/wait-helpers.ts';
|
|
7
9
|
/** Each wait kind: its deadline, whether it keeps a slot while it is the top wait, who resolves it. */
|
|
8
10
|
export type WaitKindSpec = {
|
|
@@ -17,50 +19,41 @@ export type WaitKindSpec = {
|
|
|
17
19
|
};
|
|
18
20
|
/** What a monitoring timer (Claude's `ScheduleWakeup`, or a saved monitoring-line timer) says when it fires. */
|
|
19
21
|
export declare const MONITORING_WAKE_NUDGE = "Re-check the downstream work you were monitoring. Continue toward the task goal. When the goal is complete and verified, call cezar_done. If the watched work is still pending, call cezar_wait again. If you need the user, call cezar_ask.";
|
|
20
|
-
declare const
|
|
21
|
-
checks: {
|
|
22
|
-
summary: string;
|
|
23
|
-
footer: string;
|
|
24
|
-
resultText: (wait: PrWaitEntry) => string;
|
|
25
|
-
};
|
|
26
|
-
merge: {
|
|
27
|
-
summary: string;
|
|
28
|
-
footer: string;
|
|
29
|
-
resultText: (wait: PrWaitEntry) => string;
|
|
30
|
-
};
|
|
31
|
-
merge_or_blocked: {
|
|
32
|
-
summary: string;
|
|
33
|
-
footer: string;
|
|
34
|
-
resultText: (wait: PrWaitEntry) => string;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
22
|
+
export declare const ENDS_WAITS: readonly ['cezar_cancel_wait', 'a done is accepted', 'Stop', 'Finish', 'delete'];
|
|
37
23
|
type RegistrationRequest = {
|
|
38
24
|
timer: Extract<SquawkWaitRequest, {
|
|
39
25
|
kind: 'timer';
|
|
40
26
|
}>;
|
|
41
|
-
pr: Extract<SquawkWaitRequest, {
|
|
42
|
-
kind: 'pr';
|
|
43
|
-
}>;
|
|
44
27
|
process: Extract<SquawkWaitRequest, {
|
|
45
28
|
kind: 'process';
|
|
46
29
|
}>;
|
|
47
|
-
peer: Extract<SquawkWaitRequest, {
|
|
48
|
-
kind: 'peer';
|
|
49
|
-
}>;
|
|
50
|
-
'worker-list': Extract<SquawkWaitRequest, {
|
|
51
|
-
kind: 'worker' | 'request';
|
|
52
|
-
}>;
|
|
53
30
|
};
|
|
31
|
+
/** `handler`: the registered row's own `registerRequest` serves the request. */
|
|
54
32
|
type RegistrationPath = {
|
|
55
|
-
pr: '
|
|
33
|
+
pr: 'handler';
|
|
56
34
|
timer: 'timer';
|
|
57
35
|
process: 'process';
|
|
58
|
-
peer: '
|
|
59
|
-
worker: '
|
|
36
|
+
peer: 'handler';
|
|
37
|
+
worker: 'handler';
|
|
60
38
|
human: 'none';
|
|
61
39
|
subagent: 'none';
|
|
62
40
|
plugin: 'none';
|
|
63
41
|
};
|
|
42
|
+
/** The targets a worker or request wait records at registration. */
|
|
43
|
+
export type WorkerTarget = Pick<WorkerWaitEntry, 'workerIds' | 'requestIds' | 'outcomes' | 'requestOutcomes' | 'revisions'>;
|
|
44
|
+
/** A worker or request wait the CLI or `cezar_wait` names. */
|
|
45
|
+
export type WorkerListRequest = {
|
|
46
|
+
workerIds?: string[];
|
|
47
|
+
requestIds?: string[] | undefined;
|
|
48
|
+
mode?: WorkerWaitRequest['mode'];
|
|
49
|
+
timeoutSeconds: number;
|
|
50
|
+
};
|
|
51
|
+
type WorkerListVia = 'cezar_wait' | 'cez-worker-wait';
|
|
52
|
+
type PeerListVia = 'cezar_wait' | 'cez-message-wait';
|
|
53
|
+
type PeerRequest = {
|
|
54
|
+
peerIds: string[];
|
|
55
|
+
timeoutSeconds: number;
|
|
56
|
+
};
|
|
64
57
|
export type BuiltInWaitKindRow<K extends Wait['kind']> = WaitKindSpec & {
|
|
65
58
|
is: (wait: Wait) => wait is Extract<Wait, {
|
|
66
59
|
kind: K;
|
|
@@ -89,18 +82,17 @@ export type BuiltInWaitKindRow<K extends Wait['kind']> = WaitKindSpec & {
|
|
|
89
82
|
}[];
|
|
90
83
|
resolve: (latest: Wait, result: WaitResult | undefined, observed: WorkerWaitEntry | undefined, resolvedAt: string) => Wait;
|
|
91
84
|
inputId: (wait: Wait) => string;
|
|
92
|
-
watch: 'ci' | 'process' | 'none' | 'worker' | 'peer' | 'subagent' | 'timer';
|
|
93
85
|
answerKind: (wait: Wait) => Exclude<Wait['kind'], 'human' | 'subagent'> | 'request' | undefined;
|
|
94
86
|
hasDeadline: (wait: Wait) => boolean;
|
|
95
87
|
registration: RegistrationPath[K];
|
|
96
88
|
requestKinds: readonly SquawkWaitRequest['kind'][];
|
|
97
89
|
delegation: boolean;
|
|
98
90
|
entry: {
|
|
99
|
-
pr:
|
|
91
|
+
pr: (...args: never[]) => PrWaitEntry;
|
|
100
92
|
timer: typeof timerWaitEntry;
|
|
101
93
|
process: typeof processWaitEntry;
|
|
102
|
-
peer:
|
|
103
|
-
worker:
|
|
94
|
+
peer: (request: PeerRequest, via: PeerListVia, turnId: () => string) => PeerWaitEntry;
|
|
95
|
+
worker: (request: Pick<WorkerListRequest, 'mode' | 'timeoutSeconds'>, via: WorkerListVia, now: number, turnId: string, target: WorkerTarget) => DeadlinedWorkerWaitEntry;
|
|
104
96
|
human: typeof askWaitEntry;
|
|
105
97
|
subagent: typeof subagentWaitEntry;
|
|
106
98
|
plugin: undefined;
|
|
@@ -126,9 +118,7 @@ export type BuiltInWaitKindRow<K extends Wait['kind']> = WaitKindSpec & {
|
|
|
126
118
|
holdsConversationInput: boolean;
|
|
127
119
|
runnerResumeCancels: readonly WaitPhase[];
|
|
128
120
|
} & {
|
|
129
|
-
pr: {
|
|
130
|
-
untilText: typeof PR_UNTIL_TEXT;
|
|
131
|
-
};
|
|
121
|
+
pr: {};
|
|
132
122
|
process: {};
|
|
133
123
|
plugin: {};
|
|
134
124
|
subagent: {
|
|
@@ -137,7 +127,7 @@ export type BuiltInWaitKindRow<K extends Wait['kind']> = WaitKindSpec & {
|
|
|
137
127
|
};
|
|
138
128
|
};
|
|
139
129
|
worker: {
|
|
140
|
-
completionEntry:
|
|
130
|
+
completionEntry: (turnId: string, target: WorkerTarget) => WorkerWaitEntry;
|
|
141
131
|
duplicateWorker: typeof identicalWorkerWait;
|
|
142
132
|
workerListTarget: (request: Extract<SquawkWaitRequest, {
|
|
143
133
|
kind: 'worker' | 'request';
|
|
@@ -147,6 +137,10 @@ export type BuiltInWaitKindRow<K extends Wait['kind']> = WaitKindSpec & {
|
|
|
147
137
|
mode?: 'one' | 'any' | 'all';
|
|
148
138
|
timeoutSeconds: number;
|
|
149
139
|
};
|
|
140
|
+
/** `cez worker wait`, `cez message wait --request` and `cezar_wait`'s worker and request kinds. */
|
|
141
|
+
registerList: (port: WaitRegistryPort, runId: string, request: WorkerListRequest, via: WorkerListVia, registration?: RegistrationIdentity) => DeadlinedWorkerWaitEntry;
|
|
142
|
+
/** Squawk's own wait on the workers or requests that block a done. */
|
|
143
|
+
registerCompletion: (port: WaitRegistryPort, runId: string, workerIds: string[], requestIds?: string[]) => WorkerWaitEntry | undefined;
|
|
150
144
|
};
|
|
151
145
|
human: {
|
|
152
146
|
aliasEntry: typeof humanAliasEntry;
|
|
@@ -161,208 +155,70 @@ export type BuiltInWaitKindRow<K extends Wait['kind']> = WaitKindSpec & {
|
|
|
161
155
|
};
|
|
162
156
|
peer: {
|
|
163
157
|
duplicatePeer: typeof identicalPeerWait;
|
|
158
|
+
/** `cez message wait --peer` and `cezar_wait`'s peer kind. */
|
|
159
|
+
registerPeer: (port: WaitRegistryPort, runId: string, request: PeerRequest, via: PeerListVia, registration?: RegistrationIdentity) => PeerWaitEntry;
|
|
160
|
+
/** `cez message cancel-wait` on a peer wait. */
|
|
161
|
+
cancelPeer: (port: WaitRegistryPort, runId: string, waitId: string) => PeerWaitEntry;
|
|
164
162
|
};
|
|
165
163
|
}[K];
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
source: "agent" | "cezar";
|
|
176
|
-
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";
|
|
177
|
-
registeredAt: string;
|
|
178
|
-
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
179
|
-
resolvedAt?: string | undefined;
|
|
180
|
-
deliveredAt?: string | undefined;
|
|
181
|
-
cancelledAt?: string | undefined;
|
|
182
|
-
turnId: string;
|
|
183
|
-
kind: "timer";
|
|
184
|
-
deadline: string;
|
|
185
|
-
seconds: number;
|
|
186
|
-
note?: string | undefined;
|
|
187
|
-
};
|
|
188
|
-
export declare function prWaitEntry(identity: Awaited<ReturnType<CiWatcherSupervisor['resolve']>>, parsed: Extract<SquawkWaitRequest, {
|
|
189
|
-
kind: 'pr';
|
|
190
|
-
}>, via: WaitVia, generation: string, turnId: string, now: number): {
|
|
191
|
-
prUrl: string;
|
|
192
|
-
repository: string;
|
|
193
|
-
prNumber: number;
|
|
194
|
-
headSha: string;
|
|
195
|
-
id: string;
|
|
196
|
-
source: "agent" | "cezar";
|
|
197
|
-
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";
|
|
198
|
-
registeredAt: string;
|
|
199
|
-
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
200
|
-
resolvedAt?: string | undefined;
|
|
201
|
-
deliveredAt?: string | undefined;
|
|
202
|
-
cancelledAt?: string | undefined;
|
|
203
|
-
turnId: string;
|
|
204
|
-
kind: "pr";
|
|
205
|
-
deadline: string;
|
|
206
|
-
generation: string;
|
|
207
|
-
timeoutSeconds: number;
|
|
208
|
-
until: "checks" | "merge" | "merge_or_blocked";
|
|
209
|
-
wakeOnConflict: boolean;
|
|
210
|
-
callerHead?: true | undefined;
|
|
211
|
-
result?: {
|
|
212
|
-
outcome: "blocked" | "cancelled" | "closed" | "conflicting" | "deadline" | "error" | "failed" | "head_changed" | "merged" | "no_checks" | "passed" | "skipped" | "startup_failure" | "stuck";
|
|
164
|
+
/** Typed selectors share the stored kind's list order and phase rule. */
|
|
165
|
+
export declare function waitSelectors<K extends Wait['kind']>(kind: K): {
|
|
166
|
+
is: (wait: Wait) => wait is Extract<Wait, {
|
|
167
|
+
kind: K;
|
|
168
|
+
}>;
|
|
169
|
+
select: (waits: readonly Wait[]) => (Extract<{
|
|
170
|
+
prUrl: string;
|
|
171
|
+
repository: string;
|
|
172
|
+
prNumber: number;
|
|
213
173
|
headSha: string;
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
174
|
+
id: string;
|
|
175
|
+
source: "agent" | "cezar";
|
|
176
|
+
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";
|
|
177
|
+
registeredAt: string;
|
|
178
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
179
|
+
resolvedAt?: string | undefined;
|
|
180
|
+
deliveredAt?: string | undefined;
|
|
181
|
+
cancelledAt?: string | undefined;
|
|
182
|
+
turnId: string;
|
|
183
|
+
kind: "pr";
|
|
184
|
+
deadline: string;
|
|
185
|
+
generation: string;
|
|
186
|
+
timeoutSeconds: number;
|
|
187
|
+
until: "checks" | "merge" | "merge_or_blocked";
|
|
188
|
+
wakeOnConflict: boolean;
|
|
189
|
+
callerHead?: true | undefined;
|
|
190
|
+
result?: {
|
|
191
|
+
outcome: "blocked" | "cancelled" | "closed" | "conflicting" | "deadline" | "error" | "failed" | "head_changed" | "merged" | "no_checks" | "passed" | "skipped" | "startup_failure" | "stuck";
|
|
192
|
+
headSha: string;
|
|
193
|
+
observedHeadSha?: string | undefined;
|
|
194
|
+
mergeable?: "CONFLICTING" | "MERGEABLE" | "UNKNOWN" | undefined;
|
|
195
|
+
mergeStateStatus?: string | undefined;
|
|
196
|
+
mergedAt?: string | undefined;
|
|
197
|
+
mergeCommitSha?: string | undefined;
|
|
198
|
+
mergeBlock?: {
|
|
199
|
+
reason: "conflict" | "no_pending_merge";
|
|
200
|
+
isInMergeQueue: boolean;
|
|
201
|
+
autoMergeEnabled: boolean;
|
|
202
|
+
event?: {
|
|
203
|
+
kind: "auto_merge_disabled" | "queue_removal";
|
|
204
|
+
createdAt: string;
|
|
205
|
+
reason?: string | undefined;
|
|
206
|
+
reasonCode?: string | undefined;
|
|
207
|
+
} | undefined;
|
|
228
208
|
} | undefined;
|
|
209
|
+
observedAt: string;
|
|
210
|
+
checks: {
|
|
211
|
+
name: string;
|
|
212
|
+
state: string;
|
|
213
|
+
link: string;
|
|
214
|
+
}[];
|
|
215
|
+
totalChecks: number;
|
|
216
|
+
truncated: boolean;
|
|
217
|
+
diagnostic?: string | undefined;
|
|
229
218
|
} | undefined;
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
state: string;
|
|
234
|
-
link: string;
|
|
235
|
-
}[];
|
|
236
|
-
totalChecks: number;
|
|
237
|
-
truncated: boolean;
|
|
238
|
-
diagnostic?: string | undefined;
|
|
239
|
-
} | undefined;
|
|
240
|
-
};
|
|
241
|
-
export declare function processWaitEntry(request: Extract<SquawkWaitRequest, {
|
|
242
|
-
kind: 'process';
|
|
243
|
-
}>, via: WaitVia, turnId: string, now: number, startToken: string | undefined, exitFile: string | undefined): {
|
|
244
|
-
id: string;
|
|
245
|
-
source: "agent" | "cezar";
|
|
246
|
-
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";
|
|
247
|
-
registeredAt: string;
|
|
248
|
-
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
249
|
-
resolvedAt?: string | undefined;
|
|
250
|
-
deliveredAt?: string | undefined;
|
|
251
|
-
cancelledAt?: string | undefined;
|
|
252
|
-
turnId: string;
|
|
253
|
-
kind: "process";
|
|
254
|
-
deadline: string;
|
|
255
|
-
timeoutSeconds: number;
|
|
256
|
-
pid: number;
|
|
257
|
-
startToken?: string | undefined;
|
|
258
|
-
exitFile?: string | undefined;
|
|
259
|
-
note?: string | undefined;
|
|
260
|
-
result?: {
|
|
261
|
-
outcome: "deadline" | "error" | "exit_file" | "exited";
|
|
262
|
-
observedAt: string;
|
|
263
|
-
exitCode?: number | undefined;
|
|
264
|
-
exitFileNote?: "not-an-exit-code" | undefined;
|
|
265
|
-
diagnostic?: string | undefined;
|
|
266
|
-
} | undefined;
|
|
267
|
-
};
|
|
268
|
-
/**
|
|
269
|
-
* The open wait a registration repeats, if any. PR: the same PR, target and conflict switch, whatever
|
|
270
|
-
* its timeout (hearsay-tools/cezarion#1425). Timer: the
|
|
271
|
-
* same seconds and note, registered in the same turn (a later turn asking again means a new check).
|
|
272
|
-
* Process: the same PID, start token and resolved exit file in `context`, whatever its timeout or
|
|
273
|
-
* note (hearsay-tools/cezarion#1446).
|
|
274
|
-
*/
|
|
275
|
-
export declare function identicalWait(waits: readonly Wait[], request: SquawkWaitRequestInput, turnId: string, context?: {
|
|
276
|
-
startToken?: string;
|
|
277
|
-
exitFile?: string;
|
|
278
|
-
}): PrWaitEntry | TimerWaitEntry | ProcessWaitEntry | undefined;
|
|
279
|
-
/**
|
|
280
|
-
* The open worker wait a registration repeats (hearsay-tools/cezarion#1235): the same target kind,
|
|
281
|
-
* the same ids in any order and the same mode (`any` when omitted), whatever its timeout.
|
|
282
|
-
*/
|
|
283
|
-
export declare function identicalWorkerWait(waits: readonly Wait[], target: {
|
|
284
|
-
workerIds?: readonly string[];
|
|
285
|
-
requestIds?: readonly string[] | undefined;
|
|
286
|
-
mode?: string | undefined;
|
|
287
|
-
}): WorkerWaitEntry | undefined;
|
|
288
|
-
/** The open peer wait a registration repeats (hearsay-tools/cezarion#1995): the same peers in any
|
|
289
|
-
* order, whatever its timeout. */
|
|
290
|
-
export declare function identicalPeerWait(waits: readonly Wait[], peerIds: readonly string[]): PeerWaitEntry | undefined;
|
|
291
|
-
/** The stored row that serves a tool request kind, including request waits in the worker row. */
|
|
292
|
-
export declare function waitRequestRow(kind: string): import("./wait-kind-registry.ts").WaitKindRegistration;
|
|
293
|
-
type WorkerTarget = Pick<WorkerWaitEntry, 'workerIds' | 'requestIds' | 'outcomes' | 'requestOutcomes' | 'revisions'>;
|
|
294
|
-
declare function peerWaitBuilder(request: {
|
|
295
|
-
peerIds: string[];
|
|
296
|
-
timeoutSeconds: number;
|
|
297
|
-
}, via: 'cezar_wait' | 'cez-message-wait', turnId: () => string): PeerWaitEntry;
|
|
298
|
-
declare function workerWaitBuilder(request: {
|
|
299
|
-
timeoutSeconds: number;
|
|
300
|
-
mode?: 'one' | 'all' | 'any' | undefined;
|
|
301
|
-
}, via: 'cezar_wait' | 'cez-worker-wait', now: number, turnId: string, target: WorkerTarget): WorkerWaitEntry & {
|
|
302
|
-
deadline: string;
|
|
303
|
-
};
|
|
304
|
-
declare function completionWaitEntry(turnId: string, target: WorkerTarget): WorkerWaitEntry;
|
|
305
|
-
declare function askWaitEntry(turnId: string): HumanWaitEntry;
|
|
306
|
-
declare function humanAliasEntry(source: 'agent' | 'cezar', via: WaitVia, turnId: string, card: Pick<HumanWaitEntry, 'questions' | 'context'> | undefined): HumanWaitEntry;
|
|
307
|
-
declare function recoveredAskEntry(askSeq: number): HumanWaitEntry;
|
|
308
|
-
declare function subagentWaitEntry(turnId: string, deadline: string, children: SubagentChild[]): SubagentWaitEntry;
|
|
309
|
-
declare function monitoringTimerEntry(via: WaitVia, now: number, delay: number | undefined, minutes: number, turnId: string): TimerWaitEntry;
|
|
310
|
-
/** Monitoring timers: the timers Squawk opens for live workers (`monitoring-line`, also the via of
|
|
311
|
-
* saved `CEZ:MONITORING` timers) and `ScheduleWakeup`. */
|
|
312
|
-
export declare function isMonitoringTimer(wait: Wait): boolean;
|
|
313
|
-
export { isSquawkHumanWait };
|
|
314
|
-
/** The lifecycle input a resolved wait delivers. Its id is the wait's, so duplicates keep it.
|
|
315
|
-
* `workerStatus` names a worker's current status for a worker wait's text. */
|
|
316
|
-
export declare function waitResultText(wait: Wait, { workerStatus }?: {
|
|
317
|
-
workerStatus?: (workerId: string) => string;
|
|
318
|
-
}): string;
|
|
319
|
-
/** Whether a process wait found no process at its PID when it was registered: it then carries no
|
|
320
|
-
* start identity and was settled by registration's own check, at the registration instant. */
|
|
321
|
-
export declare function processNotRunningAtRegistration(wait: Pick<ProcessWaitEntry, 'startToken' | 'registeredAt' | 'result'>): boolean;
|
|
322
|
-
/** A subagent wait's result (hearsay-tools/cezarion#2431). The children's own output stays with the
|
|
323
|
-
* runner: the agent reads it with its tools. */
|
|
324
|
-
export declare function subagentWaitResultText(wait: SubagentWaitEntry): string;
|
|
325
|
-
/** One wait as the footer names it. A worker's park notice names its waits the same way
|
|
326
|
-
* (hearsay-tools/cezarion#1327). */
|
|
327
|
-
export declare function describeWait(wait: Wait): string;
|
|
328
|
-
/** The footer a delivered turn ends with: every wait still open, or undefined when none is. The
|
|
329
|
-
* user's reply settles a question and a question the user saw cannot be cancelled, so cancel is
|
|
330
|
-
* offered only for CI, worker, request, peer, process and subagent waits and timers (hearsay-tools/cezarion#1234). */
|
|
331
|
-
export declare function openWaitsFooter(waits: readonly Wait[]): string | undefined;
|
|
332
|
-
/** Fixed opening turn; the queued results themselves are delivered after its turn end. */
|
|
333
|
-
export declare function sessionlessWakePrompt(resolved: ReturnType<typeof resolvedWaits>): string;
|
|
334
|
-
/** The first budgeted wait label, with monitoring timers ahead of ordinary timers, processes and peers. */
|
|
335
|
-
export declare function waitDeliveryLabel(waits: readonly Wait[]): string | undefined;
|
|
336
|
-
/** The handler of each registration path. A new path fails typecheck until every router names it. */
|
|
337
|
-
export type RegistrationRoutes<R> = {
|
|
338
|
-
readonly [P in keyof RegistrationRequest]: (request: RegistrationRequest[P]) => R;
|
|
339
|
-
};
|
|
340
|
-
/** Request dispatch follows the typed registration cell of its stored-kind row. */
|
|
341
|
-
export declare function routeRegistration<R>(request: SquawkWaitRequest, routes: RegistrationRoutes<R>): R;
|
|
342
|
-
/** Typed built-in view. Every read still checks the registry's boot seal. */
|
|
343
|
-
export declare const WAIT_KINDS: {
|
|
344
|
-
readonly human: BuiltInWaitKindRow<"human">;
|
|
345
|
-
readonly peer: BuiltInWaitKindRow<"peer">;
|
|
346
|
-
readonly plugin: BuiltInWaitKindRow<"plugin">;
|
|
347
|
-
readonly pr: BuiltInWaitKindRow<"pr">;
|
|
348
|
-
readonly process: BuiltInWaitKindRow<"process">;
|
|
349
|
-
readonly subagent: BuiltInWaitKindRow<"subagent">;
|
|
350
|
-
readonly timer: BuiltInWaitKindRow<"timer">;
|
|
351
|
-
readonly worker: BuiltInWaitKindRow<"worker">;
|
|
352
|
-
};
|
|
353
|
-
export type WaitKindRow<K extends Wait['kind']> = BuiltInWaitKindRow<K>;
|
|
354
|
-
/** Unknown persisted plugin kinds keep their generic display and cancellation policy. */
|
|
355
|
-
export declare function waitPolicyForWait(wait: Wait): BuiltInWaitKindRow<"plugin"> | import("./wait-kind-registry.ts").WaitKindRegistration;
|
|
356
|
-
export declare function builtInWaitRegistration(kind: Exclude<Wait['kind'], 'plugin'>): {
|
|
357
|
-
deadline: 'required' | 'agent-only' | 'none';
|
|
358
|
-
keepsSlot: boolean;
|
|
359
|
-
resolves: readonly {
|
|
360
|
-
trigger: string;
|
|
361
|
-
firedBy: FiredBy;
|
|
362
|
-
}[];
|
|
363
|
-
cancels: readonly string[];
|
|
364
|
-
humanOnly?: string;
|
|
365
|
-
is: (wait: Wait) => wait is {
|
|
219
|
+
}, {
|
|
220
|
+
kind: K;
|
|
221
|
+
}> | Extract<{
|
|
366
222
|
id: string;
|
|
367
223
|
source: "agent" | "cezar";
|
|
368
224
|
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";
|
|
@@ -372,22 +228,13 @@ export declare function builtInWaitRegistration(kind: Exclude<Wait['kind'], 'plu
|
|
|
372
228
|
deliveredAt?: string | undefined;
|
|
373
229
|
cancelledAt?: string | undefined;
|
|
374
230
|
turnId: string;
|
|
375
|
-
kind: "
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
description?: string | undefined;
|
|
383
|
-
}[] | undefined;
|
|
384
|
-
multiSelect?: boolean | undefined;
|
|
385
|
-
allowFreeText?: boolean | undefined;
|
|
386
|
-
}[] | undefined;
|
|
387
|
-
context?: string | undefined;
|
|
388
|
-
askSeq?: number | undefined;
|
|
389
|
-
};
|
|
390
|
-
select: (waits: readonly Wait[]) => {
|
|
231
|
+
kind: "timer";
|
|
232
|
+
deadline: string;
|
|
233
|
+
seconds: number;
|
|
234
|
+
note?: string | undefined;
|
|
235
|
+
}, {
|
|
236
|
+
kind: K;
|
|
237
|
+
}> | Extract<{
|
|
391
238
|
id: string;
|
|
392
239
|
source: "agent" | "cezar";
|
|
393
240
|
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";
|
|
@@ -411,8 +258,9 @@ export declare function builtInWaitRegistration(kind: Exclude<Wait['kind'], 'plu
|
|
|
411
258
|
}[] | undefined;
|
|
412
259
|
context?: string | undefined;
|
|
413
260
|
askSeq?: number | undefined;
|
|
414
|
-
}
|
|
415
|
-
|
|
261
|
+
}, {
|
|
262
|
+
kind: K;
|
|
263
|
+
}> | Extract<{
|
|
416
264
|
id: string;
|
|
417
265
|
source: "agent" | "cezar";
|
|
418
266
|
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";
|
|
@@ -422,81 +270,36 @@ export declare function builtInWaitRegistration(kind: Exclude<Wait['kind'], 'plu
|
|
|
422
270
|
deliveredAt?: string | undefined;
|
|
423
271
|
cancelledAt?: string | undefined;
|
|
424
272
|
turnId: string;
|
|
425
|
-
kind: "
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
}[];
|
|
456
|
-
resolve: (latest: Wait, result: WaitResult | undefined, observed: WorkerWaitEntry | undefined, resolvedAt: string) => Wait;
|
|
457
|
-
inputId: (wait: Wait) => string;
|
|
458
|
-
watch: 'ci' | 'process' | 'none' | 'worker' | 'peer' | 'subagent' | 'timer';
|
|
459
|
-
answerKind: (wait: Wait) => Exclude<Wait['kind'], 'human' | 'subagent'> | 'request' | undefined;
|
|
460
|
-
hasDeadline: (wait: Wait) => boolean;
|
|
461
|
-
registration: "none";
|
|
462
|
-
requestKinds: readonly SquawkWaitRequest['kind'][];
|
|
463
|
-
delegation: boolean;
|
|
464
|
-
entry: typeof askWaitEntry;
|
|
465
|
-
duplicate: (wait: Wait, request: SquawkWaitRequestInput, turnId: string, context: {
|
|
466
|
-
startToken?: string;
|
|
467
|
-
exitFile?: string;
|
|
468
|
-
}) => boolean;
|
|
469
|
-
canonicalize: (request: SquawkWaitRequest) => void;
|
|
470
|
-
repeatTimeout: (wait: Wait) => number | undefined;
|
|
471
|
-
requestedTimeout: (request: SquawkWaitRequest) => number | undefined;
|
|
472
|
-
chargesWake: boolean;
|
|
473
|
-
/** The result ends the wait without what the agent waited for: a failed, cancelled or timed-out
|
|
474
|
-
* check, process, worker, request, peer or subagent. Such a result withdraws an accepted
|
|
475
|
-
* `cezar_done`; a success keeps it (hearsay-tools/squawk#2587). A human wait has no such
|
|
476
|
-
* result: the user's answer is a human message. */
|
|
477
|
-
failedResult: (wait: Wait) => boolean;
|
|
478
|
-
refusesSpentBudget: boolean;
|
|
479
|
-
holdsSession: boolean;
|
|
480
|
-
cancellable: "unshown";
|
|
481
|
-
timersDisabled: false;
|
|
482
|
-
userAnswers: boolean;
|
|
483
|
-
holdsConversationInput: boolean;
|
|
484
|
-
runnerResumeCancels: readonly WaitPhase[];
|
|
485
|
-
aliasEntry: typeof humanAliasEntry;
|
|
486
|
-
recoveredEntry: typeof recoveredAskEntry;
|
|
487
|
-
aliasSource: (via: WaitVia) => 'agent' | 'cezar';
|
|
488
|
-
kind: "human" | "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
489
|
-
inputs: import("./wait-kind-registry.ts").WaitInputDescriptor[];
|
|
490
|
-
} | {
|
|
491
|
-
deadline: 'required' | 'agent-only' | 'none';
|
|
492
|
-
keepsSlot: boolean;
|
|
493
|
-
resolves: readonly {
|
|
494
|
-
trigger: string;
|
|
495
|
-
firedBy: FiredBy;
|
|
496
|
-
}[];
|
|
497
|
-
cancels: readonly string[];
|
|
498
|
-
humanOnly?: string;
|
|
499
|
-
is: (wait: Wait) => wait is {
|
|
273
|
+
kind: "worker";
|
|
274
|
+
deadline?: string | undefined;
|
|
275
|
+
timeoutSeconds?: number | undefined;
|
|
276
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
277
|
+
workerIds?: string[] | undefined;
|
|
278
|
+
revisions?: {
|
|
279
|
+
workerId: string;
|
|
280
|
+
revision: number;
|
|
281
|
+
}[] | undefined;
|
|
282
|
+
outcomes?: {
|
|
283
|
+
workerId: string;
|
|
284
|
+
status: "cancelled" | "done" | "failed" | "review";
|
|
285
|
+
observedAt: string;
|
|
286
|
+
summary?: string | undefined;
|
|
287
|
+
revision?: number | undefined;
|
|
288
|
+
}[] | undefined;
|
|
289
|
+
requestIds?: string[] | undefined;
|
|
290
|
+
requestOutcomes?: {
|
|
291
|
+
requestId: string;
|
|
292
|
+
status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
|
|
293
|
+
observedAt: string;
|
|
294
|
+
replyId?: string | undefined;
|
|
295
|
+
}[] | undefined;
|
|
296
|
+
result?: {
|
|
297
|
+
reason: "outcome" | "timeout";
|
|
298
|
+
} | undefined;
|
|
299
|
+
wakeInputId?: string | undefined;
|
|
300
|
+
}, {
|
|
301
|
+
kind: K;
|
|
302
|
+
}> | Extract<{
|
|
500
303
|
id: string;
|
|
501
304
|
source: "agent" | "cezar";
|
|
502
305
|
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";
|
|
@@ -506,22 +309,23 @@ export declare function builtInWaitRegistration(kind: Exclude<Wait['kind'], 'plu
|
|
|
506
309
|
deliveredAt?: string | undefined;
|
|
507
310
|
cancelledAt?: string | undefined;
|
|
508
311
|
turnId: string;
|
|
509
|
-
kind: "
|
|
312
|
+
kind: "process";
|
|
510
313
|
deadline: string;
|
|
511
314
|
timeoutSeconds: number;
|
|
512
|
-
|
|
315
|
+
pid: number;
|
|
316
|
+
startToken?: string | undefined;
|
|
317
|
+
exitFile?: string | undefined;
|
|
318
|
+
note?: string | undefined;
|
|
513
319
|
result?: {
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
peerRunId: string;
|
|
520
|
-
} | {
|
|
521
|
-
reason: "timeout";
|
|
320
|
+
outcome: "deadline" | "error" | "exit_file" | "exited";
|
|
321
|
+
observedAt: string;
|
|
322
|
+
exitCode?: number | undefined;
|
|
323
|
+
exitFileNote?: "not-an-exit-code" | undefined;
|
|
324
|
+
diagnostic?: string | undefined;
|
|
522
325
|
} | undefined;
|
|
523
|
-
}
|
|
524
|
-
|
|
326
|
+
}, {
|
|
327
|
+
kind: K;
|
|
328
|
+
}> | Extract<{
|
|
525
329
|
id: string;
|
|
526
330
|
source: "agent" | "cezar";
|
|
527
331
|
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";
|
|
@@ -545,90 +349,49 @@ export declare function builtInWaitRegistration(kind: Exclude<Wait['kind'], 'plu
|
|
|
545
349
|
} | {
|
|
546
350
|
reason: "timeout";
|
|
547
351
|
} | undefined;
|
|
548
|
-
}
|
|
549
|
-
|
|
352
|
+
}, {
|
|
353
|
+
kind: K;
|
|
354
|
+
}> | Extract<{
|
|
550
355
|
id: string;
|
|
551
|
-
source: "agent" | "cezar";
|
|
552
|
-
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";
|
|
553
356
|
registeredAt: string;
|
|
554
357
|
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
555
358
|
resolvedAt?: string | undefined;
|
|
556
359
|
deliveredAt?: string | undefined;
|
|
557
360
|
cancelledAt?: string | undefined;
|
|
558
361
|
turnId: string;
|
|
559
|
-
kind: "
|
|
362
|
+
kind: "subagent";
|
|
363
|
+
source: "cezar";
|
|
364
|
+
via: "native-subagents";
|
|
560
365
|
deadline: string;
|
|
561
|
-
|
|
562
|
-
|
|
366
|
+
children: {
|
|
367
|
+
id: string;
|
|
368
|
+
status: "cancelled" | "completed" | "failed" | "running";
|
|
369
|
+
}[];
|
|
563
370
|
result?: {
|
|
564
|
-
reason: "
|
|
565
|
-
peerRunId: string;
|
|
566
|
-
messageId: string;
|
|
567
|
-
} | {
|
|
568
|
-
reason: "settled";
|
|
569
|
-
peerRunId: string;
|
|
570
|
-
} | {
|
|
571
|
-
reason: "timeout";
|
|
371
|
+
reason: "interrupted" | "settled" | "superseded" | "timeout";
|
|
572
372
|
} | undefined;
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
registration: "peer";
|
|
596
|
-
requestKinds: readonly SquawkWaitRequest['kind'][];
|
|
597
|
-
delegation: boolean;
|
|
598
|
-
entry: typeof peerWaitBuilder;
|
|
599
|
-
duplicate: (wait: Wait, request: SquawkWaitRequestInput, turnId: string, context: {
|
|
600
|
-
startToken?: string;
|
|
601
|
-
exitFile?: string;
|
|
602
|
-
}) => boolean;
|
|
603
|
-
canonicalize: (request: SquawkWaitRequest) => void;
|
|
604
|
-
repeatTimeout: (wait: Wait) => number | undefined;
|
|
605
|
-
requestedTimeout: (request: SquawkWaitRequest) => number | undefined;
|
|
606
|
-
chargesWake: (wait: Wait) => boolean;
|
|
607
|
-
/** The result ends the wait without what the agent waited for: a failed, cancelled or timed-out
|
|
608
|
-
* check, process, worker, request, peer or subagent. Such a result withdraws an accepted
|
|
609
|
-
* `cezar_done`; a success keeps it (hearsay-tools/squawk#2587). A human wait has no such
|
|
610
|
-
* result: the user's answer is a human message. */
|
|
611
|
-
failedResult: (wait: Wait) => boolean;
|
|
612
|
-
refusesSpentBudget: boolean;
|
|
613
|
-
holdsSession: boolean;
|
|
614
|
-
cancellable: true;
|
|
615
|
-
timersDisabled: false;
|
|
616
|
-
userAnswers: boolean;
|
|
617
|
-
holdsConversationInput: boolean;
|
|
618
|
-
runnerResumeCancels: readonly WaitPhase[];
|
|
619
|
-
duplicatePeer: typeof identicalPeerWait;
|
|
620
|
-
kind: "human" | "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
621
|
-
inputs: import("./wait-kind-registry.ts").WaitInputDescriptor[];
|
|
622
|
-
} | {
|
|
623
|
-
deadline: 'required' | 'agent-only' | 'none';
|
|
624
|
-
keepsSlot: boolean;
|
|
625
|
-
resolves: readonly {
|
|
626
|
-
trigger: string;
|
|
627
|
-
firedBy: FiredBy;
|
|
628
|
-
}[];
|
|
629
|
-
cancels: readonly string[];
|
|
630
|
-
humanOnly?: string;
|
|
631
|
-
is: (wait: Wait) => wait is {
|
|
373
|
+
}, {
|
|
374
|
+
kind: K;
|
|
375
|
+
}> | Extract<{
|
|
376
|
+
id: string;
|
|
377
|
+
source: "agent" | "cezar";
|
|
378
|
+
registeredAt: string;
|
|
379
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
380
|
+
resolvedAt?: string | undefined;
|
|
381
|
+
deliveredAt?: string | undefined;
|
|
382
|
+
cancelledAt?: string | undefined;
|
|
383
|
+
turnId: string;
|
|
384
|
+
via: string;
|
|
385
|
+
kind: "plugin";
|
|
386
|
+
pluginKind: string;
|
|
387
|
+
deadline?: string | undefined;
|
|
388
|
+
summary: string;
|
|
389
|
+
payload: Record<string, unknown>;
|
|
390
|
+
result?: Record<string, unknown> | undefined;
|
|
391
|
+
}, {
|
|
392
|
+
kind: K;
|
|
393
|
+
}>)[];
|
|
394
|
+
selectOpen: (waits: readonly Wait[]) => (Extract<{
|
|
632
395
|
prUrl: string;
|
|
633
396
|
repository: string;
|
|
634
397
|
prNumber: number;
|
|
@@ -678,12 +441,9 @@ export declare function builtInWaitRegistration(kind: Exclude<Wait['kind'], 'plu
|
|
|
678
441
|
truncated: boolean;
|
|
679
442
|
diagnostic?: string | undefined;
|
|
680
443
|
} | undefined;
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
repository: string;
|
|
685
|
-
prNumber: number;
|
|
686
|
-
headSha: string;
|
|
444
|
+
}, {
|
|
445
|
+
kind: K;
|
|
446
|
+
}> | Extract<{
|
|
687
447
|
id: string;
|
|
688
448
|
source: "agent" | "cezar";
|
|
689
449
|
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";
|
|
@@ -693,48 +453,13 @@ export declare function builtInWaitRegistration(kind: Exclude<Wait['kind'], 'plu
|
|
|
693
453
|
deliveredAt?: string | undefined;
|
|
694
454
|
cancelledAt?: string | undefined;
|
|
695
455
|
turnId: string;
|
|
696
|
-
kind: "
|
|
456
|
+
kind: "timer";
|
|
697
457
|
deadline: string;
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
result?: {
|
|
704
|
-
outcome: "blocked" | "cancelled" | "closed" | "conflicting" | "deadline" | "error" | "failed" | "head_changed" | "merged" | "no_checks" | "passed" | "skipped" | "startup_failure" | "stuck";
|
|
705
|
-
headSha: string;
|
|
706
|
-
observedHeadSha?: string | undefined;
|
|
707
|
-
mergeable?: "CONFLICTING" | "MERGEABLE" | "UNKNOWN" | undefined;
|
|
708
|
-
mergeStateStatus?: string | undefined;
|
|
709
|
-
mergedAt?: string | undefined;
|
|
710
|
-
mergeCommitSha?: string | undefined;
|
|
711
|
-
mergeBlock?: {
|
|
712
|
-
reason: "conflict" | "no_pending_merge";
|
|
713
|
-
isInMergeQueue: boolean;
|
|
714
|
-
autoMergeEnabled: boolean;
|
|
715
|
-
event?: {
|
|
716
|
-
kind: "auto_merge_disabled" | "queue_removal";
|
|
717
|
-
createdAt: string;
|
|
718
|
-
reason?: string | undefined;
|
|
719
|
-
reasonCode?: string | undefined;
|
|
720
|
-
} | undefined;
|
|
721
|
-
} | undefined;
|
|
722
|
-
observedAt: string;
|
|
723
|
-
checks: {
|
|
724
|
-
name: string;
|
|
725
|
-
state: string;
|
|
726
|
-
link: string;
|
|
727
|
-
}[];
|
|
728
|
-
totalChecks: number;
|
|
729
|
-
truncated: boolean;
|
|
730
|
-
diagnostic?: string | undefined;
|
|
731
|
-
} | undefined;
|
|
732
|
-
}[];
|
|
733
|
-
selectOpen: (waits: readonly Wait[]) => {
|
|
734
|
-
prUrl: string;
|
|
735
|
-
repository: string;
|
|
736
|
-
prNumber: number;
|
|
737
|
-
headSha: string;
|
|
458
|
+
seconds: number;
|
|
459
|
+
note?: string | undefined;
|
|
460
|
+
}, {
|
|
461
|
+
kind: K;
|
|
462
|
+
}> | Extract<{
|
|
738
463
|
id: string;
|
|
739
464
|
source: "agent" | "cezar";
|
|
740
465
|
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";
|
|
@@ -744,101 +469,23 @@ export declare function builtInWaitRegistration(kind: Exclude<Wait['kind'], 'plu
|
|
|
744
469
|
deliveredAt?: string | undefined;
|
|
745
470
|
cancelledAt?: string | undefined;
|
|
746
471
|
turnId: string;
|
|
747
|
-
kind: "
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
isInMergeQueue: boolean;
|
|
765
|
-
autoMergeEnabled: boolean;
|
|
766
|
-
event?: {
|
|
767
|
-
kind: "auto_merge_disabled" | "queue_removal";
|
|
768
|
-
createdAt: string;
|
|
769
|
-
reason?: string | undefined;
|
|
770
|
-
reasonCode?: string | undefined;
|
|
771
|
-
} | undefined;
|
|
772
|
-
} | undefined;
|
|
773
|
-
observedAt: string;
|
|
774
|
-
checks: {
|
|
775
|
-
name: string;
|
|
776
|
-
state: string;
|
|
777
|
-
link: string;
|
|
778
|
-
}[];
|
|
779
|
-
totalChecks: number;
|
|
780
|
-
truncated: boolean;
|
|
781
|
-
diagnostic?: string | undefined;
|
|
782
|
-
} | undefined;
|
|
783
|
-
}[];
|
|
784
|
-
capNote: (wait: Wait, maxAutoContinues: number) => string;
|
|
785
|
-
deliveryLabel: (wait: Wait) => readonly {
|
|
786
|
-
priority: number;
|
|
787
|
-
text: string;
|
|
788
|
-
}[];
|
|
789
|
-
sessionlessPrompt: {
|
|
790
|
-
priority: number;
|
|
791
|
-
text: string;
|
|
792
|
-
};
|
|
793
|
-
summary: (wait: Wait) => string;
|
|
794
|
-
resultText: (wait: Wait, workerStatus: (workerId: string) => string) => string;
|
|
795
|
-
footerItem: (wait: Wait) => string;
|
|
796
|
-
footerKinds: readonly {
|
|
797
|
-
order: number;
|
|
798
|
-
text: string;
|
|
799
|
-
}[];
|
|
800
|
-
resolve: (latest: Wait, result: WaitResult | undefined, observed: WorkerWaitEntry | undefined, resolvedAt: string) => Wait;
|
|
801
|
-
inputId: (wait: Wait) => string;
|
|
802
|
-
watch: 'ci' | 'process' | 'none' | 'worker' | 'peer' | 'subagent' | 'timer';
|
|
803
|
-
answerKind: (wait: Wait) => Exclude<Wait['kind'], 'human' | 'subagent'> | 'request' | undefined;
|
|
804
|
-
hasDeadline: (wait: Wait) => boolean;
|
|
805
|
-
registration: "pr";
|
|
806
|
-
requestKinds: readonly SquawkWaitRequest['kind'][];
|
|
807
|
-
delegation: boolean;
|
|
808
|
-
entry: typeof prWaitEntry;
|
|
809
|
-
duplicate: (wait: Wait, request: SquawkWaitRequestInput, turnId: string, context: {
|
|
810
|
-
startToken?: string;
|
|
811
|
-
exitFile?: string;
|
|
812
|
-
}) => boolean;
|
|
813
|
-
canonicalize: (request: SquawkWaitRequest) => void;
|
|
814
|
-
repeatTimeout: (wait: Wait) => number | undefined;
|
|
815
|
-
requestedTimeout: (request: SquawkWaitRequest) => number | undefined;
|
|
816
|
-
chargesWake: boolean;
|
|
817
|
-
/** The result ends the wait without what the agent waited for: a failed, cancelled or timed-out
|
|
818
|
-
* check, process, worker, request, peer or subagent. Such a result withdraws an accepted
|
|
819
|
-
* `cezar_done`; a success keeps it (hearsay-tools/squawk#2587). A human wait has no such
|
|
820
|
-
* result: the user's answer is a human message. */
|
|
821
|
-
failedResult: (wait: Wait) => boolean;
|
|
822
|
-
refusesSpentBudget: boolean;
|
|
823
|
-
holdsSession: boolean;
|
|
824
|
-
cancellable: true;
|
|
825
|
-
timersDisabled: false;
|
|
826
|
-
userAnswers: boolean;
|
|
827
|
-
holdsConversationInput: boolean;
|
|
828
|
-
runnerResumeCancels: readonly WaitPhase[];
|
|
829
|
-
untilText: typeof PR_UNTIL_TEXT;
|
|
830
|
-
kind: "human" | "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
831
|
-
inputs: import("./wait-kind-registry.ts").WaitInputDescriptor[];
|
|
832
|
-
} | {
|
|
833
|
-
deadline: 'required' | 'agent-only' | 'none';
|
|
834
|
-
keepsSlot: boolean;
|
|
835
|
-
resolves: readonly {
|
|
836
|
-
trigger: string;
|
|
837
|
-
firedBy: FiredBy;
|
|
838
|
-
}[];
|
|
839
|
-
cancels: readonly string[];
|
|
840
|
-
humanOnly?: string;
|
|
841
|
-
is: (wait: Wait) => wait is {
|
|
472
|
+
kind: "human";
|
|
473
|
+
questions?: {
|
|
474
|
+
id?: string | undefined;
|
|
475
|
+
header: string;
|
|
476
|
+
question: string;
|
|
477
|
+
options?: {
|
|
478
|
+
label: string;
|
|
479
|
+
description?: string | undefined;
|
|
480
|
+
}[] | undefined;
|
|
481
|
+
multiSelect?: boolean | undefined;
|
|
482
|
+
allowFreeText?: boolean | undefined;
|
|
483
|
+
}[] | undefined;
|
|
484
|
+
context?: string | undefined;
|
|
485
|
+
askSeq?: number | undefined;
|
|
486
|
+
}, {
|
|
487
|
+
kind: K;
|
|
488
|
+
}> | Extract<{
|
|
842
489
|
id: string;
|
|
843
490
|
source: "agent" | "cezar";
|
|
844
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";
|
|
@@ -848,22 +495,36 @@ export declare function builtInWaitRegistration(kind: Exclude<Wait['kind'], 'plu
|
|
|
848
495
|
deliveredAt?: string | undefined;
|
|
849
496
|
cancelledAt?: string | undefined;
|
|
850
497
|
turnId: string;
|
|
851
|
-
kind: "
|
|
852
|
-
deadline
|
|
853
|
-
timeoutSeconds
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
498
|
+
kind: "worker";
|
|
499
|
+
deadline?: string | undefined;
|
|
500
|
+
timeoutSeconds?: number | undefined;
|
|
501
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
502
|
+
workerIds?: string[] | undefined;
|
|
503
|
+
revisions?: {
|
|
504
|
+
workerId: string;
|
|
505
|
+
revision: number;
|
|
506
|
+
}[] | undefined;
|
|
507
|
+
outcomes?: {
|
|
508
|
+
workerId: string;
|
|
509
|
+
status: "cancelled" | "done" | "failed" | "review";
|
|
860
510
|
observedAt: string;
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
511
|
+
summary?: string | undefined;
|
|
512
|
+
revision?: number | undefined;
|
|
513
|
+
}[] | undefined;
|
|
514
|
+
requestIds?: string[] | undefined;
|
|
515
|
+
requestOutcomes?: {
|
|
516
|
+
requestId: string;
|
|
517
|
+
status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
|
|
518
|
+
observedAt: string;
|
|
519
|
+
replyId?: string | undefined;
|
|
520
|
+
}[] | undefined;
|
|
521
|
+
result?: {
|
|
522
|
+
reason: "outcome" | "timeout";
|
|
864
523
|
} | undefined;
|
|
865
|
-
|
|
866
|
-
|
|
524
|
+
wakeInputId?: string | undefined;
|
|
525
|
+
}, {
|
|
526
|
+
kind: K;
|
|
527
|
+
}> | Extract<{
|
|
867
528
|
id: string;
|
|
868
529
|
source: "agent" | "cezar";
|
|
869
530
|
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";
|
|
@@ -887,8 +548,9 @@ export declare function builtInWaitRegistration(kind: Exclude<Wait['kind'], 'plu
|
|
|
887
548
|
exitFileNote?: "not-an-exit-code" | undefined;
|
|
888
549
|
diagnostic?: string | undefined;
|
|
889
550
|
} | undefined;
|
|
890
|
-
}
|
|
891
|
-
|
|
551
|
+
}, {
|
|
552
|
+
kind: K;
|
|
553
|
+
}> | Extract<{
|
|
892
554
|
id: string;
|
|
893
555
|
source: "agent" | "cezar";
|
|
894
556
|
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";
|
|
@@ -898,98 +560,23 @@ export declare function builtInWaitRegistration(kind: Exclude<Wait['kind'], 'plu
|
|
|
898
560
|
deliveredAt?: string | undefined;
|
|
899
561
|
cancelledAt?: string | undefined;
|
|
900
562
|
turnId: string;
|
|
901
|
-
kind: "
|
|
563
|
+
kind: "peer";
|
|
902
564
|
deadline: string;
|
|
903
565
|
timeoutSeconds: number;
|
|
904
|
-
|
|
905
|
-
startToken?: string | undefined;
|
|
906
|
-
exitFile?: string | undefined;
|
|
907
|
-
note?: string | undefined;
|
|
908
|
-
result?: {
|
|
909
|
-
outcome: "deadline" | "error" | "exit_file" | "exited";
|
|
910
|
-
observedAt: string;
|
|
911
|
-
exitCode?: number | undefined;
|
|
912
|
-
exitFileNote?: "not-an-exit-code" | undefined;
|
|
913
|
-
diagnostic?: string | undefined;
|
|
914
|
-
} | undefined;
|
|
915
|
-
}[];
|
|
916
|
-
capNote: (wait: Wait, maxAutoContinues: number) => string;
|
|
917
|
-
deliveryLabel: (wait: Wait) => readonly {
|
|
918
|
-
priority: number;
|
|
919
|
-
text: string;
|
|
920
|
-
}[];
|
|
921
|
-
sessionlessPrompt: {
|
|
922
|
-
priority: number;
|
|
923
|
-
text: string;
|
|
924
|
-
};
|
|
925
|
-
summary: (wait: Wait) => string;
|
|
926
|
-
resultText: (wait: Wait, workerStatus: (workerId: string) => string) => string;
|
|
927
|
-
footerItem: (wait: Wait) => string;
|
|
928
|
-
footerKinds: readonly {
|
|
929
|
-
order: number;
|
|
930
|
-
text: string;
|
|
931
|
-
}[];
|
|
932
|
-
resolve: (latest: Wait, result: WaitResult | undefined, observed: WorkerWaitEntry | undefined, resolvedAt: string) => Wait;
|
|
933
|
-
inputId: (wait: Wait) => string;
|
|
934
|
-
watch: 'ci' | 'process' | 'none' | 'worker' | 'peer' | 'subagent' | 'timer';
|
|
935
|
-
answerKind: (wait: Wait) => Exclude<Wait['kind'], 'human' | 'subagent'> | 'request' | undefined;
|
|
936
|
-
hasDeadline: (wait: Wait) => boolean;
|
|
937
|
-
registration: "process";
|
|
938
|
-
requestKinds: readonly SquawkWaitRequest['kind'][];
|
|
939
|
-
delegation: boolean;
|
|
940
|
-
entry: typeof processWaitEntry;
|
|
941
|
-
duplicate: (wait: Wait, request: SquawkWaitRequestInput, turnId: string, context: {
|
|
942
|
-
startToken?: string;
|
|
943
|
-
exitFile?: string;
|
|
944
|
-
}) => boolean;
|
|
945
|
-
canonicalize: (request: SquawkWaitRequest) => void;
|
|
946
|
-
repeatTimeout: (wait: Wait) => number | undefined;
|
|
947
|
-
requestedTimeout: (request: SquawkWaitRequest) => number | undefined;
|
|
948
|
-
chargesWake: (wait: Wait) => boolean;
|
|
949
|
-
/** The result ends the wait without what the agent waited for: a failed, cancelled or timed-out
|
|
950
|
-
* check, process, worker, request, peer or subagent. Such a result withdraws an accepted
|
|
951
|
-
* `cezar_done`; a success keeps it (hearsay-tools/squawk#2587). A human wait has no such
|
|
952
|
-
* result: the user's answer is a human message. */
|
|
953
|
-
failedResult: (wait: Wait) => boolean;
|
|
954
|
-
refusesSpentBudget: boolean;
|
|
955
|
-
holdsSession: boolean;
|
|
956
|
-
cancellable: true;
|
|
957
|
-
timersDisabled: true;
|
|
958
|
-
userAnswers: boolean;
|
|
959
|
-
holdsConversationInput: boolean;
|
|
960
|
-
runnerResumeCancels: readonly WaitPhase[];
|
|
961
|
-
kind: "human" | "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
962
|
-
inputs: import("./wait-kind-registry.ts").WaitInputDescriptor[];
|
|
963
|
-
} | {
|
|
964
|
-
deadline: 'required' | 'agent-only' | 'none';
|
|
965
|
-
keepsSlot: boolean;
|
|
966
|
-
resolves: readonly {
|
|
967
|
-
trigger: string;
|
|
968
|
-
firedBy: FiredBy;
|
|
969
|
-
}[];
|
|
970
|
-
cancels: readonly string[];
|
|
971
|
-
humanOnly?: string;
|
|
972
|
-
is: (wait: Wait) => wait is {
|
|
973
|
-
id: string;
|
|
974
|
-
registeredAt: string;
|
|
975
|
-
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
976
|
-
resolvedAt?: string | undefined;
|
|
977
|
-
deliveredAt?: string | undefined;
|
|
978
|
-
cancelledAt?: string | undefined;
|
|
979
|
-
turnId: string;
|
|
980
|
-
kind: "subagent";
|
|
981
|
-
source: "cezar";
|
|
982
|
-
via: "native-subagents";
|
|
983
|
-
deadline: string;
|
|
984
|
-
children: {
|
|
985
|
-
id: string;
|
|
986
|
-
status: "cancelled" | "completed" | "failed" | "running";
|
|
987
|
-
}[];
|
|
566
|
+
peerIds: string[];
|
|
988
567
|
result?: {
|
|
989
|
-
reason: "
|
|
568
|
+
reason: "message";
|
|
569
|
+
peerRunId: string;
|
|
570
|
+
messageId: string;
|
|
571
|
+
} | {
|
|
572
|
+
reason: "settled";
|
|
573
|
+
peerRunId: string;
|
|
574
|
+
} | {
|
|
575
|
+
reason: "timeout";
|
|
990
576
|
} | undefined;
|
|
991
|
-
}
|
|
992
|
-
|
|
577
|
+
}, {
|
|
578
|
+
kind: K;
|
|
579
|
+
}> | Extract<{
|
|
993
580
|
id: string;
|
|
994
581
|
registeredAt: string;
|
|
995
582
|
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
@@ -1008,363 +595,155 @@ export declare function builtInWaitRegistration(kind: Exclude<Wait['kind'], 'plu
|
|
|
1008
595
|
result?: {
|
|
1009
596
|
reason: "interrupted" | "settled" | "superseded" | "timeout";
|
|
1010
597
|
} | undefined;
|
|
1011
|
-
}
|
|
1012
|
-
|
|
598
|
+
}, {
|
|
599
|
+
kind: K;
|
|
600
|
+
}> | Extract<{
|
|
1013
601
|
id: string;
|
|
602
|
+
source: "agent" | "cezar";
|
|
1014
603
|
registeredAt: string;
|
|
1015
604
|
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
1016
605
|
resolvedAt?: string | undefined;
|
|
1017
606
|
deliveredAt?: string | undefined;
|
|
1018
607
|
cancelledAt?: string | undefined;
|
|
1019
608
|
turnId: string;
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
deadline: string;
|
|
1024
|
-
children: {
|
|
1025
|
-
id: string;
|
|
1026
|
-
status: "cancelled" | "completed" | "failed" | "running";
|
|
1027
|
-
}[];
|
|
1028
|
-
result?: {
|
|
1029
|
-
reason: "interrupted" | "settled" | "superseded" | "timeout";
|
|
1030
|
-
} | undefined;
|
|
1031
|
-
}[];
|
|
1032
|
-
capNote: (wait: Wait, maxAutoContinues: number) => string;
|
|
1033
|
-
deliveryLabel: (wait: Wait) => readonly {
|
|
1034
|
-
priority: number;
|
|
1035
|
-
text: string;
|
|
1036
|
-
}[];
|
|
1037
|
-
sessionlessPrompt: {
|
|
1038
|
-
priority: number;
|
|
1039
|
-
text: string;
|
|
1040
|
-
};
|
|
1041
|
-
summary: (wait: Wait) => string;
|
|
1042
|
-
resultText: (wait: Wait, workerStatus: (workerId: string) => string) => string;
|
|
1043
|
-
footerItem: (wait: Wait) => string;
|
|
1044
|
-
footerKinds: readonly {
|
|
1045
|
-
order: number;
|
|
1046
|
-
text: string;
|
|
1047
|
-
}[];
|
|
1048
|
-
resolve: (latest: Wait, result: WaitResult | undefined, observed: WorkerWaitEntry | undefined, resolvedAt: string) => Wait;
|
|
1049
|
-
inputId: (wait: Wait) => string;
|
|
1050
|
-
watch: 'ci' | 'process' | 'none' | 'worker' | 'peer' | 'subagent' | 'timer';
|
|
1051
|
-
answerKind: (wait: Wait) => Exclude<Wait['kind'], 'human' | 'subagent'> | 'request' | undefined;
|
|
1052
|
-
hasDeadline: (wait: Wait) => boolean;
|
|
1053
|
-
registration: "none";
|
|
1054
|
-
requestKinds: readonly SquawkWaitRequest['kind'][];
|
|
1055
|
-
delegation: boolean;
|
|
1056
|
-
entry: typeof subagentWaitEntry;
|
|
1057
|
-
duplicate: (wait: Wait, request: SquawkWaitRequestInput, turnId: string, context: {
|
|
1058
|
-
startToken?: string;
|
|
1059
|
-
exitFile?: string;
|
|
1060
|
-
}) => boolean;
|
|
1061
|
-
canonicalize: (request: SquawkWaitRequest) => void;
|
|
1062
|
-
repeatTimeout: (wait: Wait) => number | undefined;
|
|
1063
|
-
requestedTimeout: (request: SquawkWaitRequest) => number | undefined;
|
|
1064
|
-
chargesWake: (wait: Wait) => boolean;
|
|
1065
|
-
/** The result ends the wait without what the agent waited for: a failed, cancelled or timed-out
|
|
1066
|
-
* check, process, worker, request, peer or subagent. Such a result withdraws an accepted
|
|
1067
|
-
* `cezar_done`; a success keeps it (hearsay-tools/squawk#2587). A human wait has no such
|
|
1068
|
-
* result: the user's answer is a human message. */
|
|
1069
|
-
failedResult: (wait: Wait) => boolean;
|
|
1070
|
-
refusesSpentBudget: boolean;
|
|
1071
|
-
holdsSession: boolean;
|
|
1072
|
-
cancellable: true;
|
|
1073
|
-
timersDisabled: false;
|
|
1074
|
-
userAnswers: boolean;
|
|
1075
|
-
holdsConversationInput: boolean;
|
|
1076
|
-
runnerResumeCancels: readonly WaitPhase[];
|
|
1077
|
-
supersededResult: {
|
|
1078
|
-
reason: 'superseded';
|
|
1079
|
-
};
|
|
1080
|
-
kind: "human" | "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
1081
|
-
inputs: import("./wait-kind-registry.ts").WaitInputDescriptor[];
|
|
1082
|
-
} | {
|
|
1083
|
-
deadline: 'required' | 'agent-only' | 'none';
|
|
1084
|
-
keepsSlot: boolean;
|
|
1085
|
-
resolves: readonly {
|
|
1086
|
-
trigger: string;
|
|
1087
|
-
firedBy: FiredBy;
|
|
1088
|
-
}[];
|
|
1089
|
-
cancels: readonly string[];
|
|
1090
|
-
humanOnly?: string;
|
|
1091
|
-
is: (wait: Wait) => wait is {
|
|
1092
|
-
id: string;
|
|
1093
|
-
source: "agent" | "cezar";
|
|
1094
|
-
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";
|
|
1095
|
-
registeredAt: string;
|
|
1096
|
-
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
1097
|
-
resolvedAt?: string | undefined;
|
|
1098
|
-
deliveredAt?: string | undefined;
|
|
1099
|
-
cancelledAt?: string | undefined;
|
|
1100
|
-
turnId: string;
|
|
1101
|
-
kind: "timer";
|
|
1102
|
-
deadline: string;
|
|
1103
|
-
seconds: number;
|
|
1104
|
-
note?: string | undefined;
|
|
1105
|
-
};
|
|
1106
|
-
select: (waits: readonly Wait[]) => {
|
|
1107
|
-
id: string;
|
|
1108
|
-
source: "agent" | "cezar";
|
|
1109
|
-
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";
|
|
1110
|
-
registeredAt: string;
|
|
1111
|
-
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
1112
|
-
resolvedAt?: string | undefined;
|
|
1113
|
-
deliveredAt?: string | undefined;
|
|
1114
|
-
cancelledAt?: string | undefined;
|
|
1115
|
-
turnId: string;
|
|
1116
|
-
kind: "timer";
|
|
1117
|
-
deadline: string;
|
|
1118
|
-
seconds: number;
|
|
1119
|
-
note?: string | undefined;
|
|
1120
|
-
}[];
|
|
1121
|
-
selectOpen: (waits: readonly Wait[]) => {
|
|
1122
|
-
id: string;
|
|
1123
|
-
source: "agent" | "cezar";
|
|
1124
|
-
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";
|
|
1125
|
-
registeredAt: string;
|
|
1126
|
-
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
1127
|
-
resolvedAt?: string | undefined;
|
|
1128
|
-
deliveredAt?: string | undefined;
|
|
1129
|
-
cancelledAt?: string | undefined;
|
|
1130
|
-
turnId: string;
|
|
1131
|
-
kind: "timer";
|
|
1132
|
-
deadline: string;
|
|
1133
|
-
seconds: number;
|
|
1134
|
-
note?: string | undefined;
|
|
1135
|
-
}[];
|
|
1136
|
-
capNote: (wait: Wait, maxAutoContinues: number) => string;
|
|
1137
|
-
deliveryLabel: (wait: Wait) => readonly {
|
|
1138
|
-
priority: number;
|
|
1139
|
-
text: string;
|
|
1140
|
-
}[];
|
|
1141
|
-
sessionlessPrompt: {
|
|
1142
|
-
priority: number;
|
|
1143
|
-
text: string;
|
|
1144
|
-
};
|
|
1145
|
-
summary: (wait: Wait) => string;
|
|
1146
|
-
resultText: (wait: Wait, workerStatus: (workerId: string) => string) => string;
|
|
1147
|
-
footerItem: (wait: Wait) => string;
|
|
1148
|
-
footerKinds: readonly {
|
|
1149
|
-
order: number;
|
|
1150
|
-
text: string;
|
|
1151
|
-
}[];
|
|
1152
|
-
resolve: (latest: Wait, result: WaitResult | undefined, observed: WorkerWaitEntry | undefined, resolvedAt: string) => Wait;
|
|
1153
|
-
inputId: (wait: Wait) => string;
|
|
1154
|
-
watch: 'ci' | 'process' | 'none' | 'worker' | 'peer' | 'subagent' | 'timer';
|
|
1155
|
-
answerKind: (wait: Wait) => Exclude<Wait['kind'], 'human' | 'subagent'> | 'request' | undefined;
|
|
1156
|
-
hasDeadline: (wait: Wait) => boolean;
|
|
1157
|
-
registration: "timer";
|
|
1158
|
-
requestKinds: readonly SquawkWaitRequest['kind'][];
|
|
1159
|
-
delegation: boolean;
|
|
1160
|
-
entry: typeof timerWaitEntry;
|
|
1161
|
-
duplicate: (wait: Wait, request: SquawkWaitRequestInput, turnId: string, context: {
|
|
1162
|
-
startToken?: string;
|
|
1163
|
-
exitFile?: string;
|
|
1164
|
-
}) => boolean;
|
|
1165
|
-
canonicalize: (request: SquawkWaitRequest) => void;
|
|
1166
|
-
repeatTimeout: (wait: Wait) => number | undefined;
|
|
1167
|
-
requestedTimeout: (request: SquawkWaitRequest) => number | undefined;
|
|
1168
|
-
chargesWake: boolean;
|
|
1169
|
-
/** The result ends the wait without what the agent waited for: a failed, cancelled or timed-out
|
|
1170
|
-
* check, process, worker, request, peer or subagent. Such a result withdraws an accepted
|
|
1171
|
-
* `cezar_done`; a success keeps it (hearsay-tools/squawk#2587). A human wait has no such
|
|
1172
|
-
* result: the user's answer is a human message. */
|
|
1173
|
-
failedResult: (wait: Wait) => boolean;
|
|
1174
|
-
refusesSpentBudget: boolean;
|
|
1175
|
-
holdsSession: boolean;
|
|
1176
|
-
cancellable: true;
|
|
1177
|
-
timersDisabled: true;
|
|
1178
|
-
userAnswers: boolean;
|
|
1179
|
-
holdsConversationInput: boolean;
|
|
1180
|
-
runnerResumeCancels: readonly WaitPhase[];
|
|
1181
|
-
monitoring: (wait: Wait) => boolean;
|
|
1182
|
-
monitoringNudge: string;
|
|
1183
|
-
monitoringEntry: typeof monitoringTimerEntry;
|
|
1184
|
-
duplicateMonitoring: (waits: readonly Wait[], via: WaitVia) => boolean;
|
|
1185
|
-
kind: "human" | "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
1186
|
-
inputs: import("./wait-kind-registry.ts").WaitInputDescriptor[];
|
|
1187
|
-
} | {
|
|
1188
|
-
deadline: 'required' | 'agent-only' | 'none';
|
|
1189
|
-
keepsSlot: boolean;
|
|
1190
|
-
resolves: readonly {
|
|
1191
|
-
trigger: string;
|
|
1192
|
-
firedBy: FiredBy;
|
|
1193
|
-
}[];
|
|
1194
|
-
cancels: readonly string[];
|
|
1195
|
-
humanOnly?: string;
|
|
1196
|
-
is: (wait: Wait) => wait is {
|
|
1197
|
-
id: string;
|
|
1198
|
-
source: "agent" | "cezar";
|
|
1199
|
-
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";
|
|
1200
|
-
registeredAt: string;
|
|
1201
|
-
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
1202
|
-
resolvedAt?: string | undefined;
|
|
1203
|
-
deliveredAt?: string | undefined;
|
|
1204
|
-
cancelledAt?: string | undefined;
|
|
1205
|
-
turnId: string;
|
|
1206
|
-
kind: "worker";
|
|
1207
|
-
deadline?: string | undefined;
|
|
1208
|
-
timeoutSeconds?: number | undefined;
|
|
1209
|
-
mode?: "all" | "any" | "one" | undefined;
|
|
1210
|
-
workerIds?: string[] | undefined;
|
|
1211
|
-
revisions?: {
|
|
1212
|
-
workerId: string;
|
|
1213
|
-
revision: number;
|
|
1214
|
-
}[] | undefined;
|
|
1215
|
-
outcomes?: {
|
|
1216
|
-
workerId: string;
|
|
1217
|
-
status: "cancelled" | "done" | "failed" | "review";
|
|
1218
|
-
observedAt: string;
|
|
1219
|
-
summary?: string | undefined;
|
|
1220
|
-
revision?: number | undefined;
|
|
1221
|
-
}[] | undefined;
|
|
1222
|
-
requestIds?: string[] | undefined;
|
|
1223
|
-
requestOutcomes?: {
|
|
1224
|
-
requestId: string;
|
|
1225
|
-
status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
|
|
1226
|
-
observedAt: string;
|
|
1227
|
-
replyId?: string | undefined;
|
|
1228
|
-
}[] | undefined;
|
|
1229
|
-
result?: {
|
|
1230
|
-
reason: "outcome" | "timeout";
|
|
1231
|
-
} | undefined;
|
|
1232
|
-
wakeInputId?: string | undefined;
|
|
1233
|
-
};
|
|
1234
|
-
select: (waits: readonly Wait[]) => {
|
|
1235
|
-
id: string;
|
|
1236
|
-
source: "agent" | "cezar";
|
|
1237
|
-
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";
|
|
1238
|
-
registeredAt: string;
|
|
1239
|
-
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
1240
|
-
resolvedAt?: string | undefined;
|
|
1241
|
-
deliveredAt?: string | undefined;
|
|
1242
|
-
cancelledAt?: string | undefined;
|
|
1243
|
-
turnId: string;
|
|
1244
|
-
kind: "worker";
|
|
1245
|
-
deadline?: string | undefined;
|
|
1246
|
-
timeoutSeconds?: number | undefined;
|
|
1247
|
-
mode?: "all" | "any" | "one" | undefined;
|
|
1248
|
-
workerIds?: string[] | undefined;
|
|
1249
|
-
revisions?: {
|
|
1250
|
-
workerId: string;
|
|
1251
|
-
revision: number;
|
|
1252
|
-
}[] | undefined;
|
|
1253
|
-
outcomes?: {
|
|
1254
|
-
workerId: string;
|
|
1255
|
-
status: "cancelled" | "done" | "failed" | "review";
|
|
1256
|
-
observedAt: string;
|
|
1257
|
-
summary?: string | undefined;
|
|
1258
|
-
revision?: number | undefined;
|
|
1259
|
-
}[] | undefined;
|
|
1260
|
-
requestIds?: string[] | undefined;
|
|
1261
|
-
requestOutcomes?: {
|
|
1262
|
-
requestId: string;
|
|
1263
|
-
status: "cancelled" | "completed-without-reply" | "deleted" | "destroyed" | "failed" | "human-fallback" | "replied" | "replied-late" | "sender-closed" | "timed-out";
|
|
1264
|
-
observedAt: string;
|
|
1265
|
-
replyId?: string | undefined;
|
|
1266
|
-
}[] | undefined;
|
|
1267
|
-
result?: {
|
|
1268
|
-
reason: "outcome" | "timeout";
|
|
1269
|
-
} | undefined;
|
|
1270
|
-
wakeInputId?: string | undefined;
|
|
1271
|
-
}[];
|
|
1272
|
-
selectOpen: (waits: readonly Wait[]) => {
|
|
1273
|
-
id: string;
|
|
1274
|
-
source: "agent" | "cezar";
|
|
1275
|
-
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";
|
|
1276
|
-
registeredAt: string;
|
|
1277
|
-
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
1278
|
-
resolvedAt?: string | undefined;
|
|
1279
|
-
deliveredAt?: string | undefined;
|
|
1280
|
-
cancelledAt?: string | undefined;
|
|
1281
|
-
turnId: string;
|
|
1282
|
-
kind: "worker";
|
|
609
|
+
via: string;
|
|
610
|
+
kind: "plugin";
|
|
611
|
+
pluginKind: string;
|
|
1283
612
|
deadline?: string | undefined;
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
deliveryLabel: (wait: Wait) => readonly {
|
|
1312
|
-
priority: number;
|
|
1313
|
-
text: string;
|
|
1314
|
-
}[];
|
|
1315
|
-
sessionlessPrompt: {
|
|
1316
|
-
priority: number;
|
|
1317
|
-
text: string;
|
|
1318
|
-
};
|
|
1319
|
-
summary: (wait: Wait) => string;
|
|
1320
|
-
resultText: (wait: Wait, workerStatus: (workerId: string) => string) => string;
|
|
1321
|
-
footerItem: (wait: Wait) => string;
|
|
1322
|
-
footerKinds: readonly {
|
|
1323
|
-
order: number;
|
|
1324
|
-
text: string;
|
|
1325
|
-
}[];
|
|
1326
|
-
resolve: (latest: Wait, result: WaitResult | undefined, observed: WorkerWaitEntry | undefined, resolvedAt: string) => Wait;
|
|
1327
|
-
inputId: (wait: Wait) => string;
|
|
1328
|
-
watch: 'ci' | 'process' | 'none' | 'worker' | 'peer' | 'subagent' | 'timer';
|
|
1329
|
-
answerKind: (wait: Wait) => Exclude<Wait['kind'], 'human' | 'subagent'> | 'request' | undefined;
|
|
1330
|
-
hasDeadline: (wait: Wait) => boolean;
|
|
1331
|
-
registration: "worker-list";
|
|
1332
|
-
requestKinds: readonly SquawkWaitRequest['kind'][];
|
|
1333
|
-
delegation: boolean;
|
|
1334
|
-
entry: typeof workerWaitBuilder;
|
|
1335
|
-
duplicate: (wait: Wait, request: SquawkWaitRequestInput, turnId: string, context: {
|
|
1336
|
-
startToken?: string;
|
|
1337
|
-
exitFile?: string;
|
|
1338
|
-
}) => boolean;
|
|
1339
|
-
canonicalize: (request: SquawkWaitRequest) => void;
|
|
1340
|
-
repeatTimeout: (wait: Wait) => number | undefined;
|
|
1341
|
-
requestedTimeout: (request: SquawkWaitRequest) => number | undefined;
|
|
1342
|
-
chargesWake: boolean;
|
|
1343
|
-
/** The result ends the wait without what the agent waited for: a failed, cancelled or timed-out
|
|
1344
|
-
* check, process, worker, request, peer or subagent. Such a result withdraws an accepted
|
|
1345
|
-
* `cezar_done`; a success keeps it (hearsay-tools/squawk#2587). A human wait has no such
|
|
1346
|
-
* result: the user's answer is a human message. */
|
|
1347
|
-
failedResult: (wait: Wait) => boolean;
|
|
1348
|
-
refusesSpentBudget: boolean;
|
|
1349
|
-
holdsSession: boolean;
|
|
1350
|
-
cancellable: true;
|
|
1351
|
-
timersDisabled: false;
|
|
1352
|
-
userAnswers: boolean;
|
|
1353
|
-
holdsConversationInput: boolean;
|
|
1354
|
-
runnerResumeCancels: readonly WaitPhase[];
|
|
1355
|
-
completionEntry: typeof completionWaitEntry;
|
|
1356
|
-
duplicateWorker: typeof identicalWorkerWait;
|
|
1357
|
-
workerListTarget: (request: Extract<SquawkWaitRequest, {
|
|
1358
|
-
kind: 'worker' | 'request';
|
|
1359
|
-
}>) => {
|
|
1360
|
-
workerIds?: string[];
|
|
1361
|
-
requestIds?: string[];
|
|
1362
|
-
mode?: 'one' | 'any' | 'all';
|
|
1363
|
-
timeoutSeconds: number;
|
|
1364
|
-
};
|
|
1365
|
-
kind: "human" | "peer" | "pr" | "process" | "subagent" | "timer" | "worker";
|
|
1366
|
-
inputs: import("./wait-kind-registry.ts").WaitInputDescriptor[];
|
|
613
|
+
summary: string;
|
|
614
|
+
payload: Record<string, unknown>;
|
|
615
|
+
result?: Record<string, unknown> | undefined;
|
|
616
|
+
}, {
|
|
617
|
+
kind: K;
|
|
618
|
+
}>)[];
|
|
619
|
+
};
|
|
620
|
+
type CoreWaitKind = 'timer' | 'process' | 'subagent' | 'plugin' | 'human';
|
|
621
|
+
export declare const BUILT_IN_WAIT_ROWS: {
|
|
622
|
+
readonly [K in CoreWaitKind]: BuiltInWaitKindRow<K>;
|
|
623
|
+
};
|
|
624
|
+
export declare function timerWaitEntry(parsed: Extract<SquawkWaitRequest, {
|
|
625
|
+
kind: 'timer';
|
|
626
|
+
}>, via: WaitVia, turnId: string, now: number): {
|
|
627
|
+
id: string;
|
|
628
|
+
source: "agent" | "cezar";
|
|
629
|
+
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";
|
|
630
|
+
registeredAt: string;
|
|
631
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
632
|
+
resolvedAt?: string | undefined;
|
|
633
|
+
deliveredAt?: string | undefined;
|
|
634
|
+
cancelledAt?: string | undefined;
|
|
635
|
+
turnId: string;
|
|
636
|
+
kind: "timer";
|
|
637
|
+
deadline: string;
|
|
638
|
+
seconds: number;
|
|
639
|
+
note?: string | undefined;
|
|
1367
640
|
};
|
|
1368
|
-
|
|
1369
|
-
|
|
641
|
+
export declare function processWaitEntry(request: Extract<SquawkWaitRequest, {
|
|
642
|
+
kind: 'process';
|
|
643
|
+
}>, via: WaitVia, turnId: string, now: number, startToken: string | undefined, exitFile: string | undefined): {
|
|
644
|
+
id: string;
|
|
645
|
+
source: "agent" | "cezar";
|
|
646
|
+
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";
|
|
647
|
+
registeredAt: string;
|
|
648
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
649
|
+
resolvedAt?: string | undefined;
|
|
650
|
+
deliveredAt?: string | undefined;
|
|
651
|
+
cancelledAt?: string | undefined;
|
|
652
|
+
turnId: string;
|
|
653
|
+
kind: "process";
|
|
654
|
+
deadline: string;
|
|
655
|
+
timeoutSeconds: number;
|
|
656
|
+
pid: number;
|
|
657
|
+
startToken?: string | undefined;
|
|
658
|
+
exitFile?: string | undefined;
|
|
659
|
+
note?: string | undefined;
|
|
660
|
+
result?: {
|
|
661
|
+
outcome: "deadline" | "error" | "exit_file" | "exited";
|
|
662
|
+
observedAt: string;
|
|
663
|
+
exitCode?: number | undefined;
|
|
664
|
+
exitFileNote?: "not-an-exit-code" | undefined;
|
|
665
|
+
diagnostic?: string | undefined;
|
|
666
|
+
} | undefined;
|
|
667
|
+
};
|
|
668
|
+
/**
|
|
669
|
+
* The open wait a registration repeats, if any. PR: the same PR, target and conflict switch, whatever
|
|
670
|
+
* its timeout (hearsay-tools/cezarion#1425). Timer: the
|
|
671
|
+
* same seconds and note, registered in the same turn (a later turn asking again means a new check).
|
|
672
|
+
* Process: the same PID, start token and resolved exit file in `context`, whatever its timeout or
|
|
673
|
+
* note (hearsay-tools/cezarion#1446).
|
|
674
|
+
*/
|
|
675
|
+
export declare function identicalWait(waits: readonly Wait[], request: SquawkWaitRequestInput, turnId: string, context?: {
|
|
676
|
+
startToken?: string;
|
|
677
|
+
exitFile?: string;
|
|
678
|
+
}): PrWaitEntry | TimerWaitEntry | ProcessWaitEntry | undefined;
|
|
679
|
+
/**
|
|
680
|
+
* The open worker wait a registration repeats (hearsay-tools/cezarion#1235): the same target kind,
|
|
681
|
+
* the same ids in any order and the same mode (`any` when omitted), whatever its timeout.
|
|
682
|
+
*/
|
|
683
|
+
export declare function identicalWorkerWait(waits: readonly Wait[], target: {
|
|
684
|
+
workerIds?: readonly string[];
|
|
685
|
+
requestIds?: readonly string[] | undefined;
|
|
686
|
+
mode?: string | undefined;
|
|
687
|
+
}): WorkerWaitEntry | undefined;
|
|
688
|
+
/** The open peer wait a registration repeats (hearsay-tools/cezarion#1995): the same peers in any
|
|
689
|
+
* order, whatever its timeout. */
|
|
690
|
+
export declare function identicalPeerWait(waits: readonly Wait[], peerIds: readonly string[]): PeerWaitEntry | undefined;
|
|
691
|
+
/** The stored row that serves a tool request kind, including request waits in the worker row. */
|
|
692
|
+
export declare function waitRequestRow(kind: string): import("./wait-kind-registry.ts").WaitKindRegistration;
|
|
693
|
+
declare function askWaitEntry(turnId: string): HumanWaitEntry;
|
|
694
|
+
declare function humanAliasEntry(source: 'agent' | 'cezar', via: WaitVia, turnId: string, card: Pick<HumanWaitEntry, 'questions' | 'context'> | undefined): HumanWaitEntry;
|
|
695
|
+
declare function recoveredAskEntry(askSeq: number): HumanWaitEntry;
|
|
696
|
+
declare function subagentWaitEntry(turnId: string, deadline: string, children: SubagentChild[]): SubagentWaitEntry;
|
|
697
|
+
declare function monitoringTimerEntry(via: WaitVia, now: number, delay: number | undefined, minutes: number, turnId: string): TimerWaitEntry;
|
|
698
|
+
/** Monitoring timers: the timers Squawk opens for live workers (`monitoring-line`, also the via of
|
|
699
|
+
* saved `CEZ:MONITORING` timers) and `ScheduleWakeup`. */
|
|
700
|
+
export declare function isMonitoringTimer(wait: Wait): boolean;
|
|
701
|
+
export { isSquawkHumanWait };
|
|
702
|
+
/** A summary clipped to the stored bound. */
|
|
703
|
+
export declare function clipWaitSummary(text: string, max?: number): string;
|
|
704
|
+
/** The lifecycle input a resolved wait delivers. Its id is the wait's, so duplicates keep it.
|
|
705
|
+
* `workerStatus` names a worker's current status for a worker wait's text. */
|
|
706
|
+
export declare function waitResultText(wait: Wait, { workerStatus }?: {
|
|
707
|
+
workerStatus?: (workerId: string) => string;
|
|
708
|
+
}): string;
|
|
709
|
+
/** Whether a process wait found no process at its PID when it was registered: it then carries no
|
|
710
|
+
* start identity and was settled by registration's own check, at the registration instant. */
|
|
711
|
+
export declare function processNotRunningAtRegistration(wait: Pick<ProcessWaitEntry, 'startToken' | 'registeredAt' | 'result'>): boolean;
|
|
712
|
+
/** A subagent wait's result (hearsay-tools/cezarion#2431). The children's own output stays with the
|
|
713
|
+
* runner: the agent reads it with its tools. */
|
|
714
|
+
export declare function subagentWaitResultText(wait: SubagentWaitEntry): string;
|
|
715
|
+
/** One wait as the footer names it. A worker's park notice names its waits the same way
|
|
716
|
+
* (hearsay-tools/cezarion#1327). */
|
|
717
|
+
export declare function describeWait(wait: Wait): string;
|
|
718
|
+
/** The footer a delivered turn ends with: every wait still open, or undefined when none is. The
|
|
719
|
+
* user's reply settles a question and a question the user saw cannot be cancelled, so cancel is
|
|
720
|
+
* offered only for CI, worker, request, peer, process and subagent waits and timers (hearsay-tools/cezarion#1234). */
|
|
721
|
+
export declare function openWaitsFooter(waits: readonly Wait[]): string | undefined;
|
|
722
|
+
/** Fixed opening turn; the queued results themselves are delivered after its turn end. */
|
|
723
|
+
export declare function sessionlessWakePrompt(resolved: ReturnType<typeof resolvedWaits>): string;
|
|
724
|
+
/** The first budgeted wait label, with monitoring timers ahead of ordinary timers, processes and peers. */
|
|
725
|
+
export declare function waitDeliveryLabel(waits: readonly Wait[]): string | undefined;
|
|
726
|
+
/** The handler of each registration path. A new path fails typecheck until every router names it. */
|
|
727
|
+
export type RegistrationRoutes<R> = {
|
|
728
|
+
readonly [P in keyof RegistrationRequest]: (request: RegistrationRequest[P]) => R;
|
|
729
|
+
};
|
|
730
|
+
/** Request dispatch follows the typed registration cell of its stored-kind row. A row that
|
|
731
|
+
* registers its own handler is served by it before this route. */
|
|
732
|
+
export declare function routeRegistration<R>(request: SquawkWaitRequest, routes: RegistrationRoutes<R>): R;
|
|
733
|
+
/** Typed built-in view. Every read still checks the registry's boot seal. */
|
|
734
|
+
export declare const WAIT_KINDS: {
|
|
735
|
+
readonly human: BuiltInWaitKindRow<"human">;
|
|
736
|
+
readonly peer: BuiltInWaitKindRow<"peer">;
|
|
737
|
+
readonly plugin: BuiltInWaitKindRow<"plugin">;
|
|
738
|
+
readonly pr: BuiltInWaitKindRow<"pr">;
|
|
739
|
+
readonly process: BuiltInWaitKindRow<"process">;
|
|
740
|
+
readonly subagent: BuiltInWaitKindRow<"subagent">;
|
|
741
|
+
readonly timer: BuiltInWaitKindRow<"timer">;
|
|
742
|
+
readonly worker: BuiltInWaitKindRow<"worker">;
|
|
743
|
+
};
|
|
744
|
+
export type WaitKindRow<K extends Wait['kind']> = BuiltInWaitKindRow<K>;
|
|
745
|
+
/** Unknown persisted plugin kinds keep their generic display and cancellation policy. */
|
|
746
|
+
export declare function waitPolicyForWait(wait: Wait): BuiltInWaitKindRow<"plugin"> | import("./wait-kind-registry.ts").WaitKindRegistration;
|
|
1370
747
|
export declare function registerCoreWaitKinds(): void;
|
|
748
|
+
/** The runner's native subagent wait, through the same registry. */
|
|
749
|
+
export declare function registerSubagentWaitKind(): void;
|