@hearsay-tools/squawk 0.18.0-dev.8057 → 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/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/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/delegation/routes.d.ts +79 -79
- 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/runs/run-archive.d.ts +72 -72
- package/dist/server/live-routes.d.ts +6 -6
- package/dist/server/reports-api.d.ts +2 -2
- package/dist/server/runner-install-routes.d.ts +10 -10
- package/dist/server/server.d.ts +1373 -1373
- package/dist/workflows/run/wait-engine.d.ts +95 -109
- 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
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
import { commandText } from '../home/command.js';
|
|
3
|
+
import { isUserAnsweredKind, waitInputId } from '../runs/wait-helpers.js';
|
|
4
|
+
import { familyOf, executionBlockedByRootFinish, historyDeletionPending, rootFinishRequested } from '../workflows/run/run-guards.js';
|
|
5
|
+
import { registerWaitKind } from '../workflows/run/wait-kind-registry.js';
|
|
6
|
+
import { builtInWaitInputs } from '../workflows/run/wait-input-descriptors.js';
|
|
7
|
+
import { ENDS_WAITS, WAIT_KINDS, clipWaitSummary, identicalPeerWait, identicalWorkerWait, waitSelectors } from '../workflows/run/wait-kinds.js';
|
|
8
|
+
import { openRegistered, repeatRegistration } from '../workflows/run/wait-registration.js';
|
|
9
|
+
import { assertOwnedWorkerWaitScope, assertRequestWaitScope, delegationWaitRefusal, peerWaitEntry, peerWaitOf, peerWaitResult, waitCapacityPolicyError, workerListTarget, workerWaitTarget } from '../workflows/wait-scope.js';
|
|
10
|
+
import { DelegationPolicyError, requireMessagingAllowed } from './policy.js';
|
|
11
|
+
function peerWaitBuilder(request, via, turnId) {
|
|
12
|
+
const now = Date.now();
|
|
13
|
+
return { id: randomUUID(), kind: 'peer', source: 'agent', via, registeredAt: new Date(now).toISOString(),
|
|
14
|
+
deadline: new Date(now + request.timeoutSeconds * 1000).toISOString(), timeoutSeconds: request.timeoutSeconds,
|
|
15
|
+
turnId: turnId(), phase: 'open', peerIds: request.peerIds };
|
|
16
|
+
}
|
|
17
|
+
function workerWaitBuilder(request, via, now, turnId, target) {
|
|
18
|
+
const entry = { id: randomUUID(), kind: 'worker', source: 'agent', via, registeredAt: new Date(now).toISOString(),
|
|
19
|
+
deadline: new Date(now + request.timeoutSeconds * 1000).toISOString(), timeoutSeconds: request.timeoutSeconds,
|
|
20
|
+
turnId, phase: 'open', ...(request.mode === undefined ? {} : { mode: request.mode }), ...target };
|
|
21
|
+
return entry;
|
|
22
|
+
}
|
|
23
|
+
function completionWaitEntry(turnId, target) {
|
|
24
|
+
const entry = { id: randomUUID(), kind: 'worker', source: 'cezar', via: 'completion', registeredAt: new Date().toISOString(),
|
|
25
|
+
turnId, phase: 'open', mode: 'all', ...target };
|
|
26
|
+
return entry;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A worker wait's result, worded as `cez worker wait`'s wake always was
|
|
30
|
+
* (hearsay-tools/cezarion#1235). 32 summaries, including worst-case JSON escaping, must fit the
|
|
31
|
+
* ordinary input bound, so each is abbreviated; the full ones stay in the outcomes and events.
|
|
32
|
+
*/
|
|
33
|
+
function workerWaitResultText(wait, workerStatus) {
|
|
34
|
+
const reason = wait.result?.reason ?? 'timeout';
|
|
35
|
+
if (wait.requestIds) {
|
|
36
|
+
return `Request wait ${wait.id} (${reason}). Request outcomes: ${JSON.stringify(wait.requestOutcomes ?? [])}. This is not worker completion or review approval.`;
|
|
37
|
+
}
|
|
38
|
+
const outcomes = (wait.outcomes ?? []).map(outcome => ({ ...outcome, ...(outcome.summary ? { summary: outcome.summary.slice(0, 256) } : {}) }));
|
|
39
|
+
return `Worker wait ${wait.id} (${reason === 'timeout' ? 'deadline reached' : 'terminal outcome'}). ` +
|
|
40
|
+
`Collect each worker's latest settled result before completing the parent. Review is not merge permission. Selected workers: ${JSON.stringify((wait.workerIds ?? []).map(workerId => ({
|
|
41
|
+
workerId, status: workerStatus(workerId),
|
|
42
|
+
})))}. Outcomes (summaries abbreviated): ${JSON.stringify(outcomes)}`;
|
|
43
|
+
}
|
|
44
|
+
/** A peer wait's result (hearsay-tools/cezarion#1995). The message itself arrives as its own
|
|
45
|
+
* input in the same wake; this names only why the wait ended. */
|
|
46
|
+
function peerWaitResultText(wait) {
|
|
47
|
+
const result = wait.result;
|
|
48
|
+
const head = `Peer wait ${wait.id} on ${peerTargetPhrase(wait)}`;
|
|
49
|
+
if (result?.reason === 'message')
|
|
50
|
+
return `${head}: task ${result.peerRunId ?? 'unknown'} sent message ${result.messageId ?? 'unknown'}, delivered with this wake. Register another peer wait if you still wait on it.`;
|
|
51
|
+
if (result?.reason === 'settled')
|
|
52
|
+
return `${head}: task ${result.peerRunId ?? 'unknown'} settled or was deleted; it will not write again until its human continues it. ${commandText('Read its status with cez message tasks.')}`;
|
|
53
|
+
return `${head}: deadline reached with no message. Register another peer wait if you still wait on it.`;
|
|
54
|
+
}
|
|
55
|
+
function peerTargetPhrase(wait) {
|
|
56
|
+
const n = wait.peerIds.length;
|
|
57
|
+
return n === 1 ? `task ${wait.peerIds[0]}` : `${n} tasks`;
|
|
58
|
+
}
|
|
59
|
+
function workerTargetPhrase(wait) {
|
|
60
|
+
const n = (wait.requestIds ?? wait.workerIds)?.length ?? 0;
|
|
61
|
+
return wait.requestIds ? `${n} ${n === 1 ? 'reply' : 'replies'}` : `${n} ${n === 1 ? 'worker' : 'workers'}`;
|
|
62
|
+
}
|
|
63
|
+
const hasWorkerDeadline = (wait) => wait.kind === 'worker' && wait.deadline !== undefined;
|
|
64
|
+
/** The states no worker or peer wait registers in: refusals throw `incompatible_state`. Waits stand
|
|
65
|
+
* beside CI, timer and human waits and beside each other (hearsay-tools/cezarion#1235). */
|
|
66
|
+
function assertCanRegisterWorkerWait(port, runId) {
|
|
67
|
+
const run = port.store.getRun(runId);
|
|
68
|
+
const state = port.active(runId);
|
|
69
|
+
const refuse = (message) => { throw new DelegationPolicyError('incompatible_state', message); };
|
|
70
|
+
if (!run?.delegation || run.delegation.role === 'invalid')
|
|
71
|
+
refuse('Worker waits require an owned worker or parent run');
|
|
72
|
+
if (historyDeletionPending(port.store, runId))
|
|
73
|
+
refuse('History deletion is pending; finish deletion before registering a wait');
|
|
74
|
+
if (executionBlockedByRootFinish(port.store, run))
|
|
75
|
+
refuse('Parent finish is pending; a finishing parent cannot register a wait');
|
|
76
|
+
if (!['running', 'waiting'].includes(run.status) || !state?.liveSession.session?.open || state.liveSession.cancelled) {
|
|
77
|
+
refuse(`Run is ${run.status} with no available active session; register a wait from an executing parent or worker`);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Open a `worker` wait in the list (hearsay-tools/cezarion#1235): on workers the parent owns, or
|
|
82
|
+
* on replies to requests the run sent. It stands beside CI, timer and human waits, up to
|
|
83
|
+
* `WAIT_LIMIT` open ones; the same target and mode return the open wait instead. The family is
|
|
84
|
+
* reconciled at once, so outcomes already in resolve it now, and its deadline is armed.
|
|
85
|
+
* Refusals throw `DelegationPolicyError`: `incompatible_state`, `denied_scope` or
|
|
86
|
+
* `capacity_limit`.
|
|
87
|
+
*/
|
|
88
|
+
function registerWorkerListWait(port, runId, request, via, registration) {
|
|
89
|
+
port.reconcileWorkerWaits();
|
|
90
|
+
assertCanRegisterWorkerWait(port, runId);
|
|
91
|
+
const run = port.store.getRun(runId);
|
|
92
|
+
const state = port.active(runId);
|
|
93
|
+
if (!run.delegation || run.delegation.role === 'invalid')
|
|
94
|
+
throw new DelegationPolicyError('denied_scope', 'Worker scope denied');
|
|
95
|
+
const getRun = (id) => port.store.getRun(id);
|
|
96
|
+
if (request.workerIds)
|
|
97
|
+
assertOwnedWorkerWaitScope(run, request.workerIds, getRun);
|
|
98
|
+
else
|
|
99
|
+
assertRequestWaitScope(run, request.requestIds ?? [], getRun);
|
|
100
|
+
const repeated = identicalWorkerWait(run.waits ?? [], request);
|
|
101
|
+
if (repeated && hasWorkerDeadline(repeated))
|
|
102
|
+
return repeatRegistration(port.store, runId, repeated, request.timeoutSeconds, registration);
|
|
103
|
+
if (!port.engine.hasRoom(run))
|
|
104
|
+
throw waitCapacityPolicyError();
|
|
105
|
+
const now = Date.now();
|
|
106
|
+
const target = workerWaitTarget(request, getRun);
|
|
107
|
+
const entry = workerWaitBuilder(request, via, now, state.waitIdentity.ensureCiTurn(), target);
|
|
108
|
+
return port.engine.open(runId, state, entry, { withdraw: true, receipt: registration, onCommitFailure: { capacity: waitCapacityPolicyError }, park: true }).wait;
|
|
109
|
+
}
|
|
110
|
+
/** Squawk waits on live workers or open requests without adding a deadline of its own. The
|
|
111
|
+
* workers are the ones the completion gate named as blocking this run's done (`liveWorkerIds`):
|
|
112
|
+
* this applies no ownership rule of its own, so the gate and the wait cannot disagree. A blocker
|
|
113
|
+
* whose record is gone has nothing to observe; with no target left, no wait opens. */
|
|
114
|
+
function registerCompletionWait(port, runId, workerIds, requestIds) {
|
|
115
|
+
if (!port.engine.hasRoom(port.store.getRun(runId) ?? {}))
|
|
116
|
+
return;
|
|
117
|
+
const state = port.active(runId);
|
|
118
|
+
const ids = workerIds.filter(id => port.store.getRun(id)?.delegation?.role === 'worker');
|
|
119
|
+
if (!requestIds?.length && !ids.length)
|
|
120
|
+
return;
|
|
121
|
+
const entry = completionWaitEntry(state.waitIdentity.ensureCiTurn(), workerWaitTarget(requestIds?.length ? { requestIds } : { workerIds: ids }, id => port.store.getRun(id)));
|
|
122
|
+
return port.engine.open(runId, state, entry, { withdraw: false, park: false }).wait;
|
|
123
|
+
}
|
|
124
|
+
/** `cezar_wait` kind `peer` and `cez message wait --peer` (hearsay-tools/cezarion#1995): checked
|
|
125
|
+
* and built by `peerWaitEntry`; a peer that already wrote or settled resolves it at once (its arm). */
|
|
126
|
+
function registerPeerWait(port, runId, request, via, registration) {
|
|
127
|
+
assertCanRegisterWorkerWait(port, runId);
|
|
128
|
+
const state = port.active(runId);
|
|
129
|
+
const entry = peerWaitEntry(port.store.getRun(runId), request, via, () => state.waitIdentity.ensureCiTurn(), id => port.store.getRun(id));
|
|
130
|
+
if (port.store.getRun(runId)?.waits?.some(wait => wait.id === entry.id)) {
|
|
131
|
+
return repeatRegistration(port.store, runId, entry, request.timeoutSeconds, registration);
|
|
132
|
+
}
|
|
133
|
+
// A new peer wait is peer messaging (hearsay-tools/cezarion#2784); an open one keeps running.
|
|
134
|
+
requireMessagingAllowed(port.store.getRun(runId));
|
|
135
|
+
return port.engine.open(runId, state, entry, openRegistered(registration)).wait;
|
|
136
|
+
}
|
|
137
|
+
/** `cez message cancel-wait` on a peer wait, through the list, as `cancelWorkerWait`; a settled one comes back as it is. */
|
|
138
|
+
function cancelPeerWait(port, runId, waitId) {
|
|
139
|
+
const run = port.store.getRun(runId);
|
|
140
|
+
if (peerWaitOf(run, waitId).phase !== 'open')
|
|
141
|
+
return peerWaitOf(run, waitId);
|
|
142
|
+
if (port.disposed() || !['queued', 'running', 'waiting'].includes(run.status) || rootFinishRequested(port.store, runId) || historyDeletionPending(port.store, runId)) {
|
|
143
|
+
throw new DelegationPolicyError('incompatible_state', 'Parent cannot cancel a peer wait');
|
|
144
|
+
}
|
|
145
|
+
port.engine.cancel(runId, [waitId]);
|
|
146
|
+
return peerWaitOf(port.store.getRun(runId), waitId);
|
|
147
|
+
}
|
|
148
|
+
/** `cezar_wait` kinds `worker`, `request` and `peer` keep the CLI checks under the tool's codes. */
|
|
149
|
+
function registerDelegation(context, register) {
|
|
150
|
+
if (!context.run.delegation || context.run.delegation.role === 'invalid')
|
|
151
|
+
context.refuse('denied_scope');
|
|
152
|
+
try {
|
|
153
|
+
return register();
|
|
154
|
+
}
|
|
155
|
+
catch (error) {
|
|
156
|
+
if (error && typeof error === 'object' && 'code' in error && error.code === 'duplicate_deadline')
|
|
157
|
+
throw error;
|
|
158
|
+
return context.refuse(delegationWaitRefusal(error, () => context.host.executionBlockedByRootFinish(context.run)));
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* A worker wait's deadline re-observes its family (hearsay-tools/cezarion#1235): the reconcile
|
|
163
|
+
* resolves it with `timeout`, keeping any outcome observed by then. A failed checkpoint is
|
|
164
|
+
* retried every second while the wait is still open, never dropped as an uncaught error. An
|
|
165
|
+
* outcome whose resolution failed to commit arms the same retry with `firstDelay` 1 second.
|
|
166
|
+
*/
|
|
167
|
+
function armWorkerDeadline(context, firstDelay) {
|
|
168
|
+
const wait = context.wait;
|
|
169
|
+
// A deadline-less (Squawk completion) wait ends only when its workers settle (hearsay-tools/cezarion#1301).
|
|
170
|
+
if (firstDelay === undefined && wait.deadline === undefined)
|
|
171
|
+
return;
|
|
172
|
+
const run = context.store.getRun(context.runId);
|
|
173
|
+
if (!run)
|
|
174
|
+
return;
|
|
175
|
+
const family = familyOf(run);
|
|
176
|
+
let warned = false;
|
|
177
|
+
const arm = (delay) => context.armTimer(delay, () => {
|
|
178
|
+
try {
|
|
179
|
+
context.host.reconcileWorkerWaits(family);
|
|
180
|
+
}
|
|
181
|
+
catch {
|
|
182
|
+
if (!warned)
|
|
183
|
+
console.warn(`[hsq] worker wait checkpoint failed; retrying in 1 second`);
|
|
184
|
+
warned = true;
|
|
185
|
+
if (!context.disposed() && context.store.getRun(context.runId)?.waits?.some(entry => entry.id === wait.id && entry.phase === 'open'))
|
|
186
|
+
arm(1_000);
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
arm(Math.max(0, firstDelay ?? Date.parse(wait.deadline) - Date.now()));
|
|
190
|
+
}
|
|
191
|
+
const workerWatch = {
|
|
192
|
+
// Outcomes already in resolve it now (or, with every worker destroyed, cancel it); the rest arm it.
|
|
193
|
+
// A worker that parked before this wait opened tells the parent now (hearsay-tools/cezarion#1327).
|
|
194
|
+
// Squawk's completion wait tells its own workers; an agent's wait tells its family.
|
|
195
|
+
open(context) {
|
|
196
|
+
const run = context.store.getRun(context.runId);
|
|
197
|
+
context.host.reconcileWorkerWaits(familyOf(run));
|
|
198
|
+
context.host.noticeParkedWorkers(context.wait.source === 'cezar' ? context.runId : familyOf(run));
|
|
199
|
+
},
|
|
200
|
+
arm(context) { if (!context.deadlineArmed())
|
|
201
|
+
armWorkerDeadline(context); },
|
|
202
|
+
rearm: armWorkerDeadline,
|
|
203
|
+
// A worker wait the family reconcile already resolved is no longer listed, and parks nothing.
|
|
204
|
+
parkOnlyWhileListed: true,
|
|
205
|
+
// A worker wait with a deadline may already be settled by the reconcile.
|
|
206
|
+
openedEntry: (wait, waits) => waits.find(entry => entry.id === wait.id && hasWorkerDeadline(entry)) ?? wait,
|
|
207
|
+
};
|
|
208
|
+
/** Like a timer, the wake is the agent's own arrangement: a stopping or finishing run takes none,
|
|
209
|
+
* and the wait stays for that transition to cancel. True when the wait is no longer open. */
|
|
210
|
+
function resolvePeerNow(context) {
|
|
211
|
+
const run = context.store.getRun(context.runId);
|
|
212
|
+
if (context.disposed() || !context.host.canProceedWithRun(context.runId, run))
|
|
213
|
+
return false;
|
|
214
|
+
const result = peerWaitResult(run, context.wait, context.store);
|
|
215
|
+
if (result)
|
|
216
|
+
context.resolve(result);
|
|
217
|
+
return !!result && context.store.getRun(context.runId)?.waits?.find(entry => entry.id === context.wait.id)?.phase !== 'open';
|
|
218
|
+
}
|
|
219
|
+
const peerWatch = {
|
|
220
|
+
// A peer that already wrote or settled resolves it first, at registration and recovery alike.
|
|
221
|
+
arm(context) { if (!context.deadlineArmed() && !resolvePeerNow(context))
|
|
222
|
+
context.armDeadline(); },
|
|
223
|
+
reconcile: resolvePeerNow,
|
|
224
|
+
};
|
|
225
|
+
export const WORKER_WAIT_ROW = {
|
|
226
|
+
...waitSelectors('worker'),
|
|
227
|
+
capNote: (wait, maxAutoContinues) => `automatic ${WAIT_KINDS.timer.monitoring(wait) ? 'monitoring' : 'timer'} wake-up cap reached (${maxAutoContinues}); timer ${wait.id} cancelled`,
|
|
228
|
+
deliveryLabel: () => [],
|
|
229
|
+
sessionlessPrompt: { priority: 1, text: `Resume to receive the queued worker wait result. End this opening turn so Squawk can deliver it.` },
|
|
230
|
+
summary: wait => { const worker = wait; return clipWaitSummary(`${worker.requestIds ? 'request' : 'worker'} wait on ${workerTargetPhrase(worker)}`); },
|
|
231
|
+
resultText: (wait, workerStatus) => workerWaitResultText(wait, workerStatus),
|
|
232
|
+
// Squawk's completion wait has no deadline (hearsay-tools/cezarion#1301).
|
|
233
|
+
footerItem: wait => { const worker = wait; return `${worker.requestIds ? 'request' : 'worker'} wait ${worker.id} on ${workerTargetPhrase(worker)}, ${worker.deadline === undefined ? 'no deadline' : `deadline ${worker.deadline}`}`; },
|
|
234
|
+
footerKinds: [{ order: 1, text: 'worker' }, { order: 2, text: 'request' }],
|
|
235
|
+
resolve: (latest, _result, observed, resolvedAt) => ({ ...observed ?? latest, phase: 'resolved', resolvedAt, result: observed?.result ?? { reason: 'timeout' } }),
|
|
236
|
+
inputId: waitInputId,
|
|
237
|
+
entry: workerWaitBuilder,
|
|
238
|
+
completionEntry: completionWaitEntry,
|
|
239
|
+
duplicate: () => false,
|
|
240
|
+
canonicalize: request => { if ((request.kind === 'worker' || request.kind === 'request') && request.mode === undefined)
|
|
241
|
+
request.mode = 'any'; },
|
|
242
|
+
repeatTimeout: wait => 'timeoutSeconds' in wait ? wait.timeoutSeconds : undefined,
|
|
243
|
+
requestedTimeout: request => 'timeout_seconds' in request ? request.timeout_seconds : undefined,
|
|
244
|
+
duplicateWorker: identicalWorkerWait,
|
|
245
|
+
answerKind: wait => 'requestIds' in wait && wait.requestIds ? 'request' : 'worker',
|
|
246
|
+
hasDeadline: wait => 'deadline' in wait && wait.deadline !== undefined,
|
|
247
|
+
registration: 'handler', requestKinds: ['worker', 'request'],
|
|
248
|
+
delegation: true,
|
|
249
|
+
workerListTarget: request => ({ ...(request.kind === 'worker' ? { workerIds: request.worker_ids } : { requestIds: request.request_ids }), ...(request.mode === undefined ? {} : { mode: request.mode }), timeoutSeconds: request.timeout_seconds }),
|
|
250
|
+
registerList: registerWorkerListWait,
|
|
251
|
+
registerCompletion: registerCompletionWait,
|
|
252
|
+
userAnswers: isUserAnsweredKind('worker'), holdsConversationInput: false, runnerResumeCancels: [],
|
|
253
|
+
chargesWake: false, refusesSpentBudget: false, holdsSession: false, cancellable: true, timersDisabled: false,
|
|
254
|
+
failedResult: wait => {
|
|
255
|
+
const worker = wait;
|
|
256
|
+
return worker.result?.reason === 'timeout' || (worker.outcomes ?? []).some(outcome => outcome.status === 'failed' || outcome.status === 'cancelled') ||
|
|
257
|
+
(worker.requestOutcomes ?? []).some(outcome => outcome.status !== 'replied' && outcome.status !== 'replied-late');
|
|
258
|
+
},
|
|
259
|
+
deadline: 'agent-only', keepsSlot: false, cancels: [...ENDS_WAITS, 'the parent settles'], resolves: [
|
|
260
|
+
{ trigger: 'the workers report outcomes or the requests get replies, as its mode says', firedBy: 'worker' },
|
|
261
|
+
{ trigger: `the deadline of an agent wait; Squawk's completion wait has none`, firedBy: 'timer' },
|
|
262
|
+
],
|
|
263
|
+
};
|
|
264
|
+
export const PEER_WAIT_ROW = {
|
|
265
|
+
...waitSelectors('peer'),
|
|
266
|
+
capNote: (wait, maxAutoContinues) => `automatic ${wait.kind} wake-up cap reached (${maxAutoContinues}); ${wait.kind} wait ${wait.id} cancelled`,
|
|
267
|
+
deliveryLabel: () => [{ priority: 3, text: 'peer' }],
|
|
268
|
+
sessionlessPrompt: { priority: 3, text: `Resume to receive the queued timer result. End this opening turn so Squawk can deliver it.` },
|
|
269
|
+
summary: wait => clipWaitSummary(`peer wait on ${peerTargetPhrase(wait)}`),
|
|
270
|
+
resultText: wait => peerWaitResultText(wait),
|
|
271
|
+
footerItem: wait => { const peer = wait; return `peer wait ${peer.id} on ${peerTargetPhrase(peer)}, deadline ${peer.deadline}`; },
|
|
272
|
+
footerKinds: [{ order: 3, text: 'peer' }],
|
|
273
|
+
resolve: (latest, result, _observed, resolvedAt) => ({ ...latest, phase: 'resolved', resolvedAt, result: result ?? { reason: 'timeout' } }),
|
|
274
|
+
inputId: waitInputId,
|
|
275
|
+
entry: peerWaitBuilder,
|
|
276
|
+
duplicate: () => false,
|
|
277
|
+
canonicalize: () => { },
|
|
278
|
+
repeatTimeout: wait => 'timeoutSeconds' in wait ? wait.timeoutSeconds : undefined,
|
|
279
|
+
requestedTimeout: request => 'timeout_seconds' in request ? request.timeout_seconds : undefined,
|
|
280
|
+
duplicatePeer: identicalPeerWait,
|
|
281
|
+
registerPeer: registerPeerWait,
|
|
282
|
+
cancelPeer: cancelPeerWait,
|
|
283
|
+
answerKind: () => 'peer',
|
|
284
|
+
hasDeadline: () => true,
|
|
285
|
+
registration: 'handler', requestKinds: ['peer'],
|
|
286
|
+
delegation: true,
|
|
287
|
+
userAnswers: isUserAnsweredKind('peer'), holdsConversationInput: false, runnerResumeCancels: [],
|
|
288
|
+
chargesWake: wait => wait.result?.reason !== 'timeout', refusesSpentBudget: false, holdsSession: false, cancellable: true, timersDisabled: false,
|
|
289
|
+
failedResult: wait => wait.result?.reason === 'timeout',
|
|
290
|
+
deadline: 'required', keepsSlot: false, cancels: [...ENDS_WAITS, 'the wake budget is spent at its resolution'], resolves: [
|
|
291
|
+
{ trigger: 'a message of any kind from a named peer', firedBy: 'peer' },
|
|
292
|
+
{ trigger: 'a named peer settles or is deleted', firedBy: 'watcher' },
|
|
293
|
+
{ trigger: 'the deadline (1 to 7,200 s, default 600)', firedBy: 'timer' },
|
|
294
|
+
],
|
|
295
|
+
};
|
|
296
|
+
let workerRegistration;
|
|
297
|
+
let peerRegistration;
|
|
298
|
+
/** Register the `worker` wait kind (it also serves `request` waits). A stable reference keeps
|
|
299
|
+
* repeated boot calls idempotent. */
|
|
300
|
+
export function registerWorkerWaitKind() {
|
|
301
|
+
workerRegistration ??= { ...WORKER_WAIT_ROW, kind: 'worker', inputs: builtInWaitInputs('worker'), lifecycle: workerWatch,
|
|
302
|
+
// hearsay-tools/cezarion#1235: as `cez worker wait`, under the tool's own codes. It answers its
|
|
303
|
+
// own repeat, so it is checked before the shared capacity check.
|
|
304
|
+
registerRequest: (request, context) => registerDelegation(context, () => registerWorkerListWait(context.port, context.runId, workerListTarget(request), 'cezar_wait', context.registration)) };
|
|
305
|
+
registerWaitKind(workerRegistration);
|
|
306
|
+
}
|
|
307
|
+
/** Register the `peer` wait kind. */
|
|
308
|
+
export function registerPeerWaitKind() {
|
|
309
|
+
peerRegistration ??= { ...PEER_WAIT_ROW, kind: 'peer', inputs: builtInWaitInputs('peer'), lifecycle: peerWatch,
|
|
310
|
+
// hearsay-tools/cezarion#1995: as `cez message wait`, under the tool's own codes.
|
|
311
|
+
registerRequest: (request, context) => {
|
|
312
|
+
const peer = request;
|
|
313
|
+
return registerDelegation(context, () => registerPeerWait(context.port, context.runId, { peerIds: peer.peer_ids, timeoutSeconds: peer.timeout_seconds }, 'cezar_wait', context.registration));
|
|
314
|
+
} };
|
|
315
|
+
registerWaitKind(peerRegistration);
|
|
316
|
+
}
|
|
317
|
+
//# sourceMappingURL=wait-kinds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait-kinds.js","sourceRoot":"","sources":["../../src/delegation/wait-kinds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrI,OAAO,EAAE,gBAAgB,EAAwH,MAAM,wCAAwC,CAAC;AAChM,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,aAAa,EAAsE,MAAM,gCAAgC,CAAC;AACpN,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAA6B,MAAM,uCAAuC,CAAC;AACtH,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC/N,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAQ7E,SAAS,eAAe,CAAC,OAAsD,EAAE,GAAsC,EAAE,MAAoB;IAC3I,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACvB,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAA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,MAAM,UAAU,oBAAoB;IAClC,gBAAgB,KAAK,EAAE,GAAG,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,SAAS;QAC5G,kFAAkF;QAClF,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;YACpC,MAAM,IAAI,GAAG,OAAsB,CAAC;YACpC,OAAO,kBAAkB,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE,cAAc,EAAE,IAAI,CAAC,eAAe,EAAE,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC;QAChM,CAAC,EAAE,CAAC;IACN,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -228,30 +228,6 @@ export declare class RunArchiveTopic implements RunArchive, RunCompletionActions
|
|
|
228
228
|
deadline: string;
|
|
229
229
|
seconds: number;
|
|
230
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: "process";
|
|
242
|
-
deadline: string;
|
|
243
|
-
timeoutSeconds: number;
|
|
244
|
-
pid: number;
|
|
245
|
-
startToken?: string | undefined;
|
|
246
|
-
exitFile?: string | undefined;
|
|
247
|
-
note?: string | undefined;
|
|
248
|
-
result?: {
|
|
249
|
-
outcome: "deadline" | "error" | "exit_file" | "exited";
|
|
250
|
-
observedAt: string;
|
|
251
|
-
exitCode?: number | undefined;
|
|
252
|
-
exitFileNote?: "not-an-exit-code" | undefined;
|
|
253
|
-
diagnostic?: string | undefined;
|
|
254
|
-
} | undefined;
|
|
255
231
|
} | {
|
|
256
232
|
id: string;
|
|
257
233
|
source: "agent" | "cezar";
|
|
@@ -313,6 +289,30 @@ export declare class RunArchiveTopic implements RunArchive, RunCompletionActions
|
|
|
313
289
|
reason: "outcome" | "timeout";
|
|
314
290
|
} | undefined;
|
|
315
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
316
|
} | {
|
|
317
317
|
id: string;
|
|
318
318
|
source: "agent" | "cezar";
|
|
@@ -440,30 +440,6 @@ export declare class RunArchiveTopic implements RunArchive, RunCompletionActions
|
|
|
440
440
|
deadline: string;
|
|
441
441
|
seconds: number;
|
|
442
442
|
note?: string | undefined;
|
|
443
|
-
} | {
|
|
444
|
-
id: string;
|
|
445
|
-
source: "agent" | "cezar";
|
|
446
|
-
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";
|
|
447
|
-
registeredAt: string;
|
|
448
|
-
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
449
|
-
resolvedAt?: string | undefined;
|
|
450
|
-
deliveredAt?: string | undefined;
|
|
451
|
-
cancelledAt?: string | undefined;
|
|
452
|
-
turnId: string;
|
|
453
|
-
kind: "process";
|
|
454
|
-
deadline: string;
|
|
455
|
-
timeoutSeconds: number;
|
|
456
|
-
pid: number;
|
|
457
|
-
startToken?: string | undefined;
|
|
458
|
-
exitFile?: string | undefined;
|
|
459
|
-
note?: string | undefined;
|
|
460
|
-
result?: {
|
|
461
|
-
outcome: "deadline" | "error" | "exit_file" | "exited";
|
|
462
|
-
observedAt: string;
|
|
463
|
-
exitCode?: number | undefined;
|
|
464
|
-
exitFileNote?: "not-an-exit-code" | undefined;
|
|
465
|
-
diagnostic?: string | undefined;
|
|
466
|
-
} | undefined;
|
|
467
443
|
} | {
|
|
468
444
|
id: string;
|
|
469
445
|
source: "agent" | "cezar";
|
|
@@ -525,6 +501,30 @@ export declare class RunArchiveTopic implements RunArchive, RunCompletionActions
|
|
|
525
501
|
reason: "outcome" | "timeout";
|
|
526
502
|
} | undefined;
|
|
527
503
|
wakeInputId?: string | undefined;
|
|
504
|
+
} | {
|
|
505
|
+
id: string;
|
|
506
|
+
source: "agent" | "cezar";
|
|
507
|
+
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";
|
|
508
|
+
registeredAt: string;
|
|
509
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
510
|
+
resolvedAt?: string | undefined;
|
|
511
|
+
deliveredAt?: string | undefined;
|
|
512
|
+
cancelledAt?: string | undefined;
|
|
513
|
+
turnId: string;
|
|
514
|
+
kind: "process";
|
|
515
|
+
deadline: string;
|
|
516
|
+
timeoutSeconds: number;
|
|
517
|
+
pid: number;
|
|
518
|
+
startToken?: string | undefined;
|
|
519
|
+
exitFile?: string | undefined;
|
|
520
|
+
note?: string | undefined;
|
|
521
|
+
result?: {
|
|
522
|
+
outcome: "deadline" | "error" | "exit_file" | "exited";
|
|
523
|
+
observedAt: string;
|
|
524
|
+
exitCode?: number | undefined;
|
|
525
|
+
exitFileNote?: "not-an-exit-code" | undefined;
|
|
526
|
+
diagnostic?: string | undefined;
|
|
527
|
+
} | undefined;
|
|
528
528
|
} | {
|
|
529
529
|
id: string;
|
|
530
530
|
source: "agent" | "cezar";
|
|
@@ -651,30 +651,6 @@ export declare class RunArchiveTopic implements RunArchive, RunCompletionActions
|
|
|
651
651
|
deadline: string;
|
|
652
652
|
seconds: number;
|
|
653
653
|
note?: string | undefined;
|
|
654
|
-
} | {
|
|
655
|
-
id: string;
|
|
656
|
-
source: "agent" | "cezar";
|
|
657
|
-
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";
|
|
658
|
-
registeredAt: string;
|
|
659
|
-
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
660
|
-
resolvedAt?: string | undefined;
|
|
661
|
-
deliveredAt?: string | undefined;
|
|
662
|
-
cancelledAt?: string | undefined;
|
|
663
|
-
turnId: string;
|
|
664
|
-
kind: "process";
|
|
665
|
-
deadline: string;
|
|
666
|
-
timeoutSeconds: number;
|
|
667
|
-
pid: number;
|
|
668
|
-
startToken?: string | undefined;
|
|
669
|
-
exitFile?: string | undefined;
|
|
670
|
-
note?: string | undefined;
|
|
671
|
-
result?: {
|
|
672
|
-
outcome: "deadline" | "error" | "exit_file" | "exited";
|
|
673
|
-
observedAt: string;
|
|
674
|
-
exitCode?: number | undefined;
|
|
675
|
-
exitFileNote?: "not-an-exit-code" | undefined;
|
|
676
|
-
diagnostic?: string | undefined;
|
|
677
|
-
} | undefined;
|
|
678
654
|
} | {
|
|
679
655
|
id: string;
|
|
680
656
|
source: "agent" | "cezar";
|
|
@@ -736,6 +712,30 @@ export declare class RunArchiveTopic implements RunArchive, RunCompletionActions
|
|
|
736
712
|
reason: "outcome" | "timeout";
|
|
737
713
|
} | undefined;
|
|
738
714
|
wakeInputId?: string | undefined;
|
|
715
|
+
} | {
|
|
716
|
+
id: string;
|
|
717
|
+
source: "agent" | "cezar";
|
|
718
|
+
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";
|
|
719
|
+
registeredAt: string;
|
|
720
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
721
|
+
resolvedAt?: string | undefined;
|
|
722
|
+
deliveredAt?: string | undefined;
|
|
723
|
+
cancelledAt?: string | undefined;
|
|
724
|
+
turnId: string;
|
|
725
|
+
kind: "process";
|
|
726
|
+
deadline: string;
|
|
727
|
+
timeoutSeconds: number;
|
|
728
|
+
pid: number;
|
|
729
|
+
startToken?: string | undefined;
|
|
730
|
+
exitFile?: string | undefined;
|
|
731
|
+
note?: string | undefined;
|
|
732
|
+
result?: {
|
|
733
|
+
outcome: "deadline" | "error" | "exit_file" | "exited";
|
|
734
|
+
observedAt: string;
|
|
735
|
+
exitCode?: number | undefined;
|
|
736
|
+
exitFileNote?: "not-an-exit-code" | undefined;
|
|
737
|
+
diagnostic?: string | undefined;
|
|
738
|
+
} | undefined;
|
|
739
739
|
} | {
|
|
740
740
|
id: string;
|
|
741
741
|
source: "agent" | "cezar";
|
|
@@ -16,12 +16,6 @@ export declare function createLiveRoutes({ resolveProject, serverGeneration, res
|
|
|
16
16
|
output: {
|
|
17
17
|
generation: string;
|
|
18
18
|
results: ({
|
|
19
|
-
projectId: string;
|
|
20
|
-
runId: string;
|
|
21
|
-
type: "error" | "reset";
|
|
22
|
-
status: 400 | 404 | 409 | 413 | 503;
|
|
23
|
-
error: string;
|
|
24
|
-
} | {
|
|
25
19
|
projectId: string;
|
|
26
20
|
runId: string;
|
|
27
21
|
type: "batch";
|
|
@@ -35,6 +29,12 @@ export declare function createLiveRoutes({ resolveProject, serverGeneration, res
|
|
|
35
29
|
cursor: string;
|
|
36
30
|
afterSeq: number;
|
|
37
31
|
hasMore: boolean;
|
|
32
|
+
} | {
|
|
33
|
+
projectId: string;
|
|
34
|
+
runId: string;
|
|
35
|
+
type: "error" | "reset";
|
|
36
|
+
status: 400 | 404 | 409 | 413 | 503;
|
|
37
|
+
error: string;
|
|
38
38
|
})[];
|
|
39
39
|
};
|
|
40
40
|
outputFormat: "json";
|
|
@@ -40,7 +40,7 @@ export declare const reportsRoutes: import("hono/hono-base").HonoBase<ProjectApi
|
|
|
40
40
|
error: string;
|
|
41
41
|
};
|
|
42
42
|
outputFormat: "json";
|
|
43
|
-
status:
|
|
43
|
+
status: 409;
|
|
44
44
|
input: {
|
|
45
45
|
query: {
|
|
46
46
|
q?: string | undefined;
|
|
@@ -53,7 +53,7 @@ export declare const reportsRoutes: import("hono/hono-base").HonoBase<ProjectApi
|
|
|
53
53
|
error: string;
|
|
54
54
|
};
|
|
55
55
|
outputFormat: "json";
|
|
56
|
-
status:
|
|
56
|
+
status: 400;
|
|
57
57
|
input: {
|
|
58
58
|
query: {
|
|
59
59
|
q?: string | undefined;
|
|
@@ -51,15 +51,11 @@ export declare function createRunnerInstallRoutes(options: {
|
|
|
51
51
|
"/runner-install/:runner": {
|
|
52
52
|
$post: {
|
|
53
53
|
output: {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
latestVersion: string | null;
|
|
57
|
-
updateAvailable: boolean;
|
|
58
|
-
phase: "activating" | "checking" | "downloading" | "extracting" | "failed" | "idle" | "removing" | "verifying";
|
|
59
|
-
error: string | null;
|
|
54
|
+
error: string;
|
|
55
|
+
code?: "invalid_input" | undefined;
|
|
60
56
|
};
|
|
61
57
|
outputFormat: "json";
|
|
62
|
-
status:
|
|
58
|
+
status: 400;
|
|
63
59
|
input: {
|
|
64
60
|
param: {
|
|
65
61
|
runner: string;
|
|
@@ -71,11 +67,15 @@ export declare function createRunnerInstallRoutes(options: {
|
|
|
71
67
|
};
|
|
72
68
|
} | {
|
|
73
69
|
output: {
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
supported: boolean;
|
|
71
|
+
installedVersion: string | null;
|
|
72
|
+
latestVersion: string | null;
|
|
73
|
+
updateAvailable: boolean;
|
|
74
|
+
phase: "activating" | "checking" | "downloading" | "extracting" | "failed" | "idle" | "removing" | "verifying";
|
|
75
|
+
error: string | null;
|
|
76
76
|
};
|
|
77
77
|
outputFormat: "json";
|
|
78
|
-
status:
|
|
78
|
+
status: 202;
|
|
79
79
|
input: {
|
|
80
80
|
param: {
|
|
81
81
|
runner: string;
|