@hearsay-tools/squawk 0.18.0-pr3733.6901 → 0.18.0-pr3737.6914
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ci-wait/controller.d.ts +16 -1
- package/dist/ci-wait/errors.js +2 -0
- package/dist/ci-wait/errors.js.map +1 -1
- package/dist/ci-wait/tool-catalog.js +1 -1
- package/dist/ci-wait/tool-catalog.js.map +1 -1
- package/dist/ci-wait/tools.d.ts +20 -5
- package/dist/contract/index.js +18 -2
- package/dist/contract/runs.d.ts +31 -0
- package/dist/contract/waits.d.ts +37 -0
- package/dist/delegation/conversations.d.ts +14 -0
- package/dist/delegation/routes.d.ts +73 -73
- package/dist/delegation/transport.d.ts +75 -75
- package/dist/runs/outcome-commit.d.ts +24 -1
- package/dist/runs/outcome-commit.js +15 -0
- package/dist/runs/outcome-commit.js.map +1 -1
- package/dist/runs/run-exits.d.ts +42 -0
- package/dist/runs/store.d.ts +14 -0
- package/dist/runs/store.js +1 -1
- package/dist/runs/store.js.map +1 -1
- package/dist/server/activity-routes.d.ts +23 -23
- package/dist/server/live-routes.d.ts +6 -6
- package/dist/server/server.d.ts +1751 -1625
- package/dist/server/workspace-live-routes.d.ts +6 -6
- package/dist/workflows/continuation-admission.d.ts +7 -0
- package/dist/workflows/run/done-accepted.d.ts +36 -0
- package/dist/workflows/run/done-accepted.js +123 -0
- package/dist/workflows/run/done-accepted.js.map +1 -0
- package/dist/workflows/run/input-delivery.d.ts +11 -0
- package/dist/workflows/run/input-delivery.js +45 -9
- package/dist/workflows/run/input-delivery.js.map +1 -1
- package/dist/workflows/run/run-finish.d.ts +11 -7
- package/dist/workflows/run/run-finish.js +33 -10
- package/dist/workflows/run/run-finish.js.map +1 -1
- package/dist/workflows/run/turn-boundary.d.ts +6 -5
- package/dist/workflows/run/turn-boundary.js +8 -11
- package/dist/workflows/run/turn-boundary.js.map +1 -1
- package/dist/workflows/run/turn-settler.d.ts +45 -4
- package/dist/workflows/run/turn-settler.js +84 -8
- package/dist/workflows/run/turn-settler.js.map +1 -1
- package/dist/workflows/run/types.d.ts +3 -1
- package/dist/workflows/run/wait-engine.d.ts +7 -0
- package/dist/workflows/run/wait-kinds.d.ts +5 -0
- package/dist/workflows/run/wait-kinds.js +13 -0
- package/dist/workflows/run/wait-kinds.js.map +1 -1
- package/dist/workflows/turn-end.d.ts +8 -1
- package/dist/workflows/turn-end.js +6 -0
- package/dist/workflows/turn-end.js.map +1 -1
- package/package.json +4 -4
- package/web/dist/assets/{activity-motion-G1BZ9DIT.js → activity-motion-Dw9VKFf3.js} +1 -1
- package/web/dist/assets/{activity-route-BtpWRWaI.js → activity-route-B0PcG2pV.js} +1 -1
- package/web/dist/assets/{agent-accounts-D3q1WLxk.js → agent-accounts-DqMzt9_9.js} +1 -1
- package/web/dist/assets/attention-Cqji4PT4.js +1 -0
- package/web/dist/assets/{commit-diff-panel-BAcn8Zwc.js → commit-diff-panel-AjehkvQl.js} +1 -1
- package/web/dist/assets/{diff-Ddd4e5lP.js → diff-CgXr-Vj3.js} +2 -2
- package/web/dist/assets/{diff-view-CAj8XOsx.js → diff-view-B44ukwHb.js} +1 -1
- package/web/dist/assets/{file-preview-CzhHbtFx.js → file-preview-9K7NRV-S.js} +1 -1
- package/web/dist/assets/{git-toolbar-pjYcYQ1l.js → git-toolbar-BwqVqZF5.js} +1 -1
- package/web/dist/assets/{github-Db4ZPDpJ.js → github-D4K3g1dq.js} +1 -1
- package/web/dist/assets/{global-activity-route-CfZ-oTGX.js → global-activity-route-BauSAsDZ.js} +1 -1
- package/web/dist/assets/{index-D1o36xol.js → index-7rIsGPsh.js} +4 -4
- package/web/dist/assets/{preview-pane-connected-DWfaVvcP.js → preview-pane-connected-D1q-f2lo.js} +1 -1
- package/web/dist/assets/{project-router-BqAKGSaS.js → project-router-ONhFFLgV.js} +1 -1
- package/web/dist/assets/{project-scope-context-B0yKt2yI.js → project-scope-context-9Q-zjaft.js} +3 -3
- package/web/dist/assets/{prompt-template-menu-DpCrLDWG.js → prompt-template-menu-1krX4ZTh.js} +1 -1
- package/web/dist/assets/{queries-DoYRza8s.js → queries-BIaHxHGs.js} +1 -1
- package/web/dist/assets/{reference-chip-Dd_YU2KX.js → reference-chip-N7Ds8lIY.js} +1 -1
- package/web/dist/assets/{repo-git-DidsKXQR.js → repo-git-D6K1ijkM.js} +1 -1
- package/web/dist/assets/{report-reader-Bot131OL.js → report-reader-DnlQSXH7.js} +1 -1
- package/web/dist/assets/{reports-5btvRQBd.js → reports-BxYfLoON.js} +1 -1
- package/web/dist/assets/{run-header-CW2gc5KU.js → run-header-BqfP1FSM.js} +1 -1
- package/web/dist/assets/{skills-D4z3ycnU.js → skills-eFv2IZVX.js} +1 -1
- package/web/dist/assets/{tab-link-CGzPcVvS.js → tab-link-CtD23wUM.js} +1 -1
- package/web/dist/assets/{task-changes-Cn3UEQgA.js → task-changes-C8tmdSsM.js} +1 -1
- package/web/dist/assets/{task-commits-P_uuPKA_.js → task-commits-DBst5qgV.js} +1 -1
- package/web/dist/assets/{task-files-Ny2doN2P.js → task-files-C9aKsbXo.js} +1 -1
- package/web/dist/assets/{task-github-item-C0Ymd8MZ.js → task-github-item-D8qxN6iN.js} +1 -1
- package/web/dist/assets/{task-thread-BiDNqWXW.js → task-thread-DzMRMGj_.js} +1 -1
- package/web/dist/assets/{thread-state-vR42DISv.js → thread-state-Brut_jkw.js} +1 -1
- package/web/dist/assets/{use-desktop-BwkqVHep.js → use-desktop-Bp049F-t.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-J8aDr8ea.js → use-hand-to-agent-state-Cdr9MMRo.js} +1 -1
- package/web/dist/assets/{useInfiniteQuery-DYAQvmMU.js → useInfiniteQuery-DG4gGVok.js} +1 -1
- package/web/dist/assets/useQuery-D-rAMmNQ.js +1 -0
- package/web/dist/assets/{workflows-CzgcLCOI.js → workflows-TD0kz7GM.js} +1 -1
- package/web/dist/assets/{ws-BXpZYApG.js → ws-7E9_cHrQ.js} +1 -1
- package/web/dist/index.html +12 -12
- package/web/dist/assets/attention-CdwMIvQG.js +0 -1
- package/web/dist/assets/useQuery-CnVG8NoC.js +0 -1
|
@@ -7,7 +7,7 @@ import type { RunExitId, ExitCall } from '../../runs/run-exits.ts';
|
|
|
7
7
|
import * as completionGateReads from './completion-gate.ts';
|
|
8
8
|
import type { RunModuleContext, PendingContinuation } from './types.ts';
|
|
9
9
|
import type { RunSettlement } from './run-settlement.ts';
|
|
10
|
-
import type
|
|
10
|
+
import { type TurnSettler } from './turn-settler.ts';
|
|
11
11
|
import type { TurnNudges } from './turn-nudges.ts';
|
|
12
12
|
import type { RunLine } from './run-line.ts';
|
|
13
13
|
interface RunFinishHost {
|
|
@@ -28,12 +28,16 @@ export declare class RunFinish {
|
|
|
28
28
|
private readonly host;
|
|
29
29
|
constructor(context: RunModuleContext, completionGateHost: completionGateReads.CompletionGateHost, runSettlement: RunSettlement, turnSettler: TurnSettler, turnNudges: TurnNudges, line: RunLine, host: RunFinishHost);
|
|
30
30
|
/**
|
|
31
|
-
* `cezar_done` (hearsay-tools/cezarion#1234). Accepted, the run
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* the
|
|
35
|
-
*
|
|
36
|
-
*
|
|
31
|
+
* `cezar_done` (hearsay-tools/cezarion#1234). Accepted, the run records the done
|
|
32
|
+
* (`doneAccepted`, hearsay-tools/squawk#2587) and finishes at the end of a turn with no new wait
|
|
33
|
+
* or question, through the done branch, which cancels every open wait; in a workflow step that is
|
|
34
|
+
* not the last, that branch completes the step and the next one starts
|
|
35
|
+
* (hearsay-tools/cezarion#1620), and the answer says which. Input that arrives after the done is
|
|
36
|
+
* delivered first, and the run finishes when that turn ends; `turn-settler.ts` retires the record.
|
|
37
|
+
* Refused, the answer says what to do first, and nothing is recorded. The gate, in order: the
|
|
38
|
+
* session, a root finish, the user's question, input still owed to the agent
|
|
39
|
+
* (`input_pending`), then the completion gate: for a root its workers' questions, live workers
|
|
40
|
+
* and uncollected results. The turn end re-checks the completion gate (`deferParentCompletion`).
|
|
37
41
|
*/
|
|
38
42
|
acceptDone(runId: string, generation: string, request: SquawkDoneRequest, signal?: AbortSignal): SquawkDoneAnswer;
|
|
39
43
|
completionRefusal(runId: string): CompletionRefusal | undefined;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { logPrefix } from '../../home/display.js';
|
|
2
2
|
import { WAIT_KINDS } from './wait-kinds.js';
|
|
3
|
-
import { transitionTurnBoundary } from './turn-boundary.js';
|
|
4
3
|
import { squawkDoneRequestSchema } from '../../contract/index.js';
|
|
5
4
|
import { doneErrorMessage } from '../../ci-wait/errors.js';
|
|
6
5
|
import { openCompletionRequests, recordRequestRefusal } from '../completion-policy.js';
|
|
@@ -9,6 +8,8 @@ import { toolSessionRefusal } from './squawk-tools.js';
|
|
|
9
8
|
import { clearIdleTimer, clearAutosaveTimer } from './input-timers.js';
|
|
10
9
|
import { hasPendingHumanAsk } from './pending-ask-facts.js';
|
|
11
10
|
import * as completionGateReads from './completion-gate.js';
|
|
11
|
+
import { retireDoneAccepted } from './turn-settler.js';
|
|
12
|
+
import { owedAtDone } from './done-accepted.js';
|
|
12
13
|
export class RunFinish {
|
|
13
14
|
context;
|
|
14
15
|
completionGateHost;
|
|
@@ -27,21 +28,25 @@ export class RunFinish {
|
|
|
27
28
|
this.host = host;
|
|
28
29
|
}
|
|
29
30
|
/**
|
|
30
|
-
* `cezar_done` (hearsay-tools/cezarion#1234). Accepted, the run
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* the
|
|
34
|
-
*
|
|
35
|
-
*
|
|
31
|
+
* `cezar_done` (hearsay-tools/cezarion#1234). Accepted, the run records the done
|
|
32
|
+
* (`doneAccepted`, hearsay-tools/squawk#2587) and finishes at the end of a turn with no new wait
|
|
33
|
+
* or question, through the done branch, which cancels every open wait; in a workflow step that is
|
|
34
|
+
* not the last, that branch completes the step and the next one starts
|
|
35
|
+
* (hearsay-tools/cezarion#1620), and the answer says which. Input that arrives after the done is
|
|
36
|
+
* delivered first, and the run finishes when that turn ends; `turn-settler.ts` retires the record.
|
|
37
|
+
* Refused, the answer says what to do first, and nothing is recorded. The gate, in order: the
|
|
38
|
+
* session, a root finish, the user's question, input still owed to the agent
|
|
39
|
+
* (`input_pending`), then the completion gate: for a root its workers' questions, live workers
|
|
40
|
+
* and uncollected results. The turn end re-checks the completion gate (`deferParentCompletion`).
|
|
36
41
|
*/
|
|
37
42
|
acceptDone(runId, generation, request, signal) {
|
|
38
43
|
const parsed = squawkDoneRequestSchema.parse(request);
|
|
39
44
|
const state = this.completionGateHost.active.get(runId);
|
|
40
45
|
const open_waits = openWaitList(this.context.store.getRun(runId)?.waits ?? []);
|
|
41
|
-
const refuse = (code, message, workers = []) => {
|
|
46
|
+
const refuse = (code, message, workers = [], owed = []) => {
|
|
42
47
|
// Fixed codes only, as for wait registration.
|
|
43
48
|
console.warn(`${logPrefix()} cezar_done refused: ${code}`);
|
|
44
|
-
return { ok: false, code, message, ...(workers.length ? { workers: workers.slice(0, 64) } : {}), open_waits };
|
|
49
|
+
return { ok: false, code, message, ...(workers.length ? { workers: workers.slice(0, 64) } : {}), open_waits, ...(owed.length ? { owed } : {}) };
|
|
45
50
|
};
|
|
46
51
|
const session = toolSessionRefusal(this.context.store.getRun(runId), state, this.completionGateHost.active.get(runId), generation, signal, this.context.disposed());
|
|
47
52
|
const run = this.context.store.getRun(runId);
|
|
@@ -54,12 +59,22 @@ export class RunFinish {
|
|
|
54
59
|
// (hearsay-tools/cezarion#2442).
|
|
55
60
|
if (state.boundary.pendingHumanAsk || this.host.hasUnansweredHumanAsk(runId) || askedThisTurn(run))
|
|
56
61
|
return refuse('human_question_pending', doneErrorMessage('human_question_pending'));
|
|
62
|
+
const owed = owedAtDone(run, state);
|
|
63
|
+
if (owed.length)
|
|
64
|
+
return refuse('input_pending', doneErrorMessage('input_pending'), [], owed);
|
|
57
65
|
const refusal = this.completionRefusal(runId);
|
|
58
66
|
if (refusal) {
|
|
59
67
|
recordRequestRefusal(state, refusal, true);
|
|
68
|
+
// A done accepted earlier in this run no longer holds: the gate refuses it now.
|
|
69
|
+
retireDoneAccepted(this.context.store, runId, 'reconsidered', `completion refused: ${refusal.code}`);
|
|
60
70
|
return refuse(refusal.code, refusal.message, refusal.workers);
|
|
61
71
|
}
|
|
62
|
-
|
|
72
|
+
try {
|
|
73
|
+
recordDoneAccepted(this.context.store, runId, { session: generation, at: new Date().toISOString(), summary: parsed.summary });
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
return refuse('unavailable', doneErrorMessage('unavailable'));
|
|
77
|
+
}
|
|
63
78
|
const next = state.boundary.nextStep?.session === state.liveSession.session ? state.boundary.nextStep.label : undefined;
|
|
64
79
|
return { ok: true, finishes: 'at_turn_end', ...(next === undefined ? { completes: 'task' } : { completes: 'step', next_step: next }), open_waits };
|
|
65
80
|
}
|
|
@@ -249,6 +264,14 @@ export class RunFinish {
|
|
|
249
264
|
this.context.store.appendEvent(runId, { type: 'human-ask-closed', askSeq, reason: 'finish' });
|
|
250
265
|
}
|
|
251
266
|
}
|
|
267
|
+
/** The only writer of `doneAccepted` (ADR 0064): an accepted `cezar_done`, committed before the
|
|
268
|
+
* tool answers, so a restart still finishes the run on it. `seq` is the last event then: what is
|
|
269
|
+
* recorded after it is new to the done. A done that replaces one still on record keeps its spent
|
|
270
|
+
* free turn, so calling done again earns no second free delivery. */
|
|
271
|
+
function recordDoneAccepted(store, runId, done) {
|
|
272
|
+
const spent = store.getRun(runId)?.doneAccepted?.freeTurn;
|
|
273
|
+
store.commitOutcome(runId, { kind: 'done-accepted', ...done, seq: store.transcriptFacts(runId).lastSeq, ...(spent ? { freeTurn: true } : {}) });
|
|
274
|
+
}
|
|
252
275
|
/** An agent question registered in this turn: open, and not yet shown (no `askSeq`). */
|
|
253
276
|
function askedThisTurn(run) {
|
|
254
277
|
return WAIT_KINDS.human.select(openWaits(run)).some(wait => wait.source !== 'cezar' && wait.askSeq === undefined);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
|
|
2
2
|
import type { ActiveRun } from '../active-run.ts';
|
|
3
3
|
import type { CompletionRefusal } from '../completion-policy.ts';
|
|
4
4
|
import type { TurnEndDecision, TurnEndOutcome } from '../turn-end.ts';
|
|
5
|
+
/** The done a turn end takes to the completion gate: the run's accepted done (`doneAccepted`), or a
|
|
6
|
+
* second `requests_outstanding` refusal that waits on the requests (`requestRefusedDone`). */
|
|
5
7
|
export type DoneRequest = Readonly<{
|
|
6
|
-
session: AgentSession;
|
|
7
8
|
summary?: string;
|
|
8
9
|
}>;
|
|
9
10
|
export type NextStep = Readonly<{
|
|
@@ -92,9 +93,6 @@ type IdleExpiredEvent = {
|
|
|
92
93
|
type BoundaryMutationEvent = Generation & (SessionOpenEvent | TurnEndEvent | InputSubmittedEvent | ReplyExpiredEvent | IdleExpiredEvent | {
|
|
93
94
|
kind: 'turn-started';
|
|
94
95
|
phase: 'clear-boundary';
|
|
95
|
-
} | {
|
|
96
|
-
kind: 'done-request';
|
|
97
|
-
summary?: string;
|
|
98
96
|
} | {
|
|
99
97
|
kind: 'done-step-consumed';
|
|
100
98
|
phase: 'completed' | 'consumed';
|
|
@@ -196,7 +194,10 @@ export declare class BoundaryGroup {
|
|
|
196
194
|
get noWaitNudgeSawContent(): boolean | undefined;
|
|
197
195
|
get noWaitNudgeParked(): AgentSession | undefined;
|
|
198
196
|
get doneAtBoundary(): AgentSession | undefined;
|
|
199
|
-
|
|
197
|
+
/** The session whose second `cezar_done` the completion gate refused for outstanding requests:
|
|
198
|
+
* its turn end takes a done to the gate, which then waits on the requests
|
|
199
|
+
* (hearsay-tools/cezarion#1301). An accepted done is the run's `doneAccepted` record. */
|
|
200
|
+
get requestRefusedDone(): AgentSession | undefined;
|
|
200
201
|
get nextStep(): NextStep | undefined;
|
|
201
202
|
get completedStepId(): string | undefined;
|
|
202
203
|
get doneClose(): DoneClose | undefined;
|
|
@@ -7,7 +7,7 @@ export class BoundaryGroup {
|
|
|
7
7
|
#noWaitNudgeSawContent;
|
|
8
8
|
#noWaitNudgeParked;
|
|
9
9
|
#doneAtBoundary;
|
|
10
|
-
#
|
|
10
|
+
#requestRefusedDone;
|
|
11
11
|
#nextStep;
|
|
12
12
|
#completedStepId;
|
|
13
13
|
#doneClose;
|
|
@@ -35,7 +35,10 @@ export class BoundaryGroup {
|
|
|
35
35
|
get noWaitNudgeSawContent() { return this.#noWaitNudgeSawContent; }
|
|
36
36
|
get noWaitNudgeParked() { return this.#noWaitNudgeParked; }
|
|
37
37
|
get doneAtBoundary() { return this.#doneAtBoundary; }
|
|
38
|
-
|
|
38
|
+
/** The session whose second `cezar_done` the completion gate refused for outstanding requests:
|
|
39
|
+
* its turn end takes a done to the gate, which then waits on the requests
|
|
40
|
+
* (hearsay-tools/cezarion#1301). An accepted done is the run's `doneAccepted` record. */
|
|
41
|
+
get requestRefusedDone() { return this.#requestRefusedDone; }
|
|
39
42
|
get nextStep() { return this.#nextStep; }
|
|
40
43
|
get completedStepId() { return this.#completedStepId; }
|
|
41
44
|
get doneClose() { return this.#doneClose; }
|
|
@@ -59,7 +62,7 @@ export class BoundaryGroup {
|
|
|
59
62
|
this.#atTurnBoundary = event.session;
|
|
60
63
|
return;
|
|
61
64
|
case 'consume-done':
|
|
62
|
-
this.#
|
|
65
|
+
this.#requestRefusedDone = undefined;
|
|
63
66
|
return;
|
|
64
67
|
case 'reset-nudges':
|
|
65
68
|
this.#noWaitNudged = undefined;
|
|
@@ -120,7 +123,7 @@ export class BoundaryGroup {
|
|
|
120
123
|
this.#clearBoundary();
|
|
121
124
|
return;
|
|
122
125
|
case 'human-delivered':
|
|
123
|
-
this.#
|
|
126
|
+
this.#requestRefusedDone = undefined;
|
|
124
127
|
this.#noWaitNudged = undefined;
|
|
125
128
|
this.#noWaitNudgeParked = undefined;
|
|
126
129
|
this.#noWaitNudgeSawContent = undefined;
|
|
@@ -182,7 +185,7 @@ export class BoundaryGroup {
|
|
|
182
185
|
if (event.code !== 'requests_outstanding')
|
|
183
186
|
return;
|
|
184
187
|
if (event.tool && this.#sentRequestRefused && event.session)
|
|
185
|
-
this.#
|
|
188
|
+
this.#requestRefusedDone = event.session;
|
|
186
189
|
this.#sentRequestRefused = true;
|
|
187
190
|
return;
|
|
188
191
|
}
|
|
@@ -230,9 +233,6 @@ export class BoundaryGroup {
|
|
|
230
233
|
this.#apply(event, effects);
|
|
231
234
|
return undefined;
|
|
232
235
|
}
|
|
233
|
-
#requestDone(event) {
|
|
234
|
-
this.#doneRequested = Object.freeze({ session: event.session, ...(event.summary === undefined ? {} : { summary: event.summary }) });
|
|
235
|
-
}
|
|
236
236
|
#humanWaitOpened(event) {
|
|
237
237
|
if (event.phase === 'prepare')
|
|
238
238
|
this.#pendingHumanAsk = true;
|
|
@@ -247,9 +247,6 @@ export class BoundaryGroup {
|
|
|
247
247
|
case 'turn-end':
|
|
248
248
|
this.#turnEnd(event);
|
|
249
249
|
return;
|
|
250
|
-
case 'done-request':
|
|
251
|
-
this.#requestDone(event);
|
|
252
|
-
return;
|
|
253
250
|
case 'done-step-consumed':
|
|
254
251
|
this.#completedStepId = event.phase === 'completed' ? event.stepId : undefined;
|
|
255
252
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turn-boundary.js","sourceRoot":"","sources":["../../../src/workflows/run/turn-boundary.ts"],"names":[],"mappings":"AAmFA,IAAI,kBAAgI,CAAC;AAErI,kGAAkG;AAClG,MAAM,OAAO,aAAa;IACxB,aAAa,CAA2B;IACxC,gBAAgB,CAAU;IAC1B,sBAAsB,CAA6B;IACnD,sBAAsB,CAAsB;IAC5C,kBAAkB,CAA2B;IAC7C,eAAe,CAA2B;IAC1C,cAAc,CAA0B;IACxC,SAAS,CAAuB;IAChC,gBAAgB,CAAqB;IACrC,UAAU,CAAwB;IAClC,aAAa,CAA0B;IACvC,eAAe,CAA2B;IAC1C,UAAU,CAA6B;IACvC,WAAW,CAAsB;IACjC,mBAAmB,CAAsB;IACzC,WAAW,CAAsB;IACjC,MAAM,CAAoB;IA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ACtB,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,IAAI,CAAC;QAC5B,OAAO,kBAAkB,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;IACvD,CAAC;IACD,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACvC,OAAO,kBAAkB,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAC5D,CAAC"}
|
|
@@ -2,7 +2,7 @@ import type { WaitEngine } from './wait-engine.ts';
|
|
|
2
2
|
import type { AgentSession } from '../../core/claude-cli-runner.ts';
|
|
3
3
|
import type { ContentBlock } from '../../core/agent-runner.ts';
|
|
4
4
|
import type { UiEventSink } from '../../runs/ui-event-sink.ts';
|
|
5
|
-
import type { RunRecord, RunStore } from '../../runs/store.ts';
|
|
5
|
+
import type { RunEvent, RunRecord, RunStore } from '../../runs/store.ts';
|
|
6
6
|
import type { RunExitId, ExitCall, RunPatch } from '../../runs/run-exits.ts';
|
|
7
7
|
import type { ActiveRun } from '../active-run.ts';
|
|
8
8
|
import { type CompletionRefusal } from '../completion-policy.ts';
|
|
@@ -55,9 +55,16 @@ export declare class TurnSettler {
|
|
|
55
55
|
private readonly scheduleWakeupMaxSeconds;
|
|
56
56
|
private readonly timers;
|
|
57
57
|
constructor(context: RunModuleContext, host: TurnSettlerHost, idleTimeoutMs: number, maxAutoContinues: number, completionWillWait: string, scheduleWakeupMaxSeconds: number, timers?: LivenessTimers);
|
|
58
|
-
/** The
|
|
59
|
-
*
|
|
58
|
+
/** The done this turn end takes to the completion gate: the run's accepted done
|
|
59
|
+
* (`doneAccepted`, hearsay-tools/squawk#2587) while it still holds (`heldDone`), or this
|
|
60
|
+
* session's second refusal for outstanding requests, which this turn end consumes. */
|
|
60
61
|
private takeDoneRequest;
|
|
62
|
+
/** The run's accepted done when it still holds at this turn end (`acceptedDoneHolds`); one that
|
|
63
|
+
* no longer holds is retired here as `reconsidered`, with its reason. Input that withdraws it
|
|
64
|
+
* and is not delivered yet goes first, with the withdrawal note (`acceptedDoneDelivery`): the
|
|
65
|
+
* record stays for that delivery, which this turn end takes before any done, and the next turn
|
|
66
|
+
* end retires it. */
|
|
67
|
+
private heldDone;
|
|
61
68
|
/** The DONE boundary and close metadata; a refused DONE may retain metadata for readiness. */
|
|
62
69
|
private recordDoneAtBoundary;
|
|
63
70
|
/** Goal achieved (agent contract, #347): the summary `cezar_done` gave as a note, the closing
|
|
@@ -91,7 +98,11 @@ export declare class TurnSettler {
|
|
|
91
98
|
* decision. False when nothing was settled: the done closed the session, or the input checkpoint
|
|
92
99
|
* failed.
|
|
93
100
|
*/
|
|
94
|
-
settleTurn(runId: string, state: ActiveRun, entry: 'turn-end' | 'ack' | 'ready' | 'gate',
|
|
101
|
+
settleTurn(runId: string, state: ActiveRun, entry: 'turn-end' | 'ack' | 'ready' | 'gate', settled: SettledTurn, refusal?: CompletionRefusal): boolean;
|
|
102
|
+
/** A done a boundary kept for a later entry (an acknowledgement, readiness, the gate) is decided
|
|
103
|
+
* again there: what was recorded since may withdraw it. A refused done the boundary kept has
|
|
104
|
+
* no record, and the gate decides it as before. */
|
|
105
|
+
private recheckBoundaryDone;
|
|
95
106
|
/** The completion gate held the done (`settleTurn`). A stopped root, or a question that parked
|
|
96
107
|
* for the user: the done stays at the boundary. False when the input checkpoint failed. */
|
|
97
108
|
private settleHeldTurn;
|
|
@@ -172,4 +183,34 @@ export declare class TurnSettler {
|
|
|
172
183
|
*/
|
|
173
184
|
private openTimerAlias;
|
|
174
185
|
}
|
|
186
|
+
/** The only writer that retires `doneAccepted` (ADR 0064, hearsay-tools/squawk#2587): `completed`
|
|
187
|
+
* when the run or its step finishes on the done; `reconsidered` when a human message, a new
|
|
188
|
+
* instruction, a failed wait result, a wait or question the agent registers, or a completion
|
|
189
|
+
* refusal withdraws it, and the agent must call `cezar_done` again. False when none was on record. */
|
|
190
|
+
export declare function retireDoneAccepted(store: Pick<RunStore, 'getRun' | 'commitOutcome' | 'appendEvent'>, runId: string, as: 'completed' | 'reconsidered', reason: string): boolean;
|
|
191
|
+
/** Signals of the turn that ends, beside what the run recorded: a ScheduleWakeup it asked for and
|
|
192
|
+
* a native question still pending in it. */
|
|
193
|
+
export type DoneTurnSignals = {
|
|
194
|
+
scheduledWake?: boolean | undefined;
|
|
195
|
+
nativeAsk?: boolean | undefined;
|
|
196
|
+
};
|
|
197
|
+
/**
|
|
198
|
+
* Whether the run's accepted `cezar_done` still holds (ADR 0064, hearsay-tools/squawk#2587): the
|
|
199
|
+
* one decision, made from what was recorded after the done on any path. It no longer holds after a
|
|
200
|
+
* human message (its `user-message` event), an instruction among the agent inputs (a steer, an
|
|
201
|
+
* inbox read, a continuation's opening input), a failed wait result, a wait or question the agent
|
|
202
|
+
* registered (the tool, the CLI, a native ask; a replay registers nothing), a native question in
|
|
203
|
+
* this turn, or a ScheduleWakeup in a turn after the done's own. Input still owed is not read here:
|
|
204
|
+
* the call refused it (`input_pending`), and a turn end delivers owed input before any done.
|
|
205
|
+
*/
|
|
206
|
+
export declare function acceptedDoneHolds(run: RunRecord, events: readonly RunEvent[], turn?: DoneTurnSignals): {
|
|
207
|
+
holds: true;
|
|
208
|
+
} | {
|
|
209
|
+
holds: false;
|
|
210
|
+
reason: string;
|
|
211
|
+
byInput: boolean;
|
|
212
|
+
};
|
|
213
|
+
/** The only writer that spends the accepted done's one free delivery turn (hearsay-tools/squawk#2587):
|
|
214
|
+
* later deliveries charge as wakes do, so the wake cap still holds. */
|
|
215
|
+
export declare function spendDoneFreeTurn(store: Pick<RunStore, 'commitOutcome'>, runId: string): void;
|
|
175
216
|
export {};
|
|
@@ -3,6 +3,7 @@ import { WAIT_KINDS } from './wait-kinds.js';
|
|
|
3
3
|
import { transitionTurnBoundary } from './turn-boundary.js';
|
|
4
4
|
import { nudgeRefusedAt, retireNudge } from './turn-nudges.js';
|
|
5
5
|
import { TIMER_MIN_SECONDS } from '../../contract/index.js';
|
|
6
|
+
import { failedResultAfter, humanMessageAfter, instructionAfter, laterTurn, registeredAfter } from './done-accepted.js';
|
|
6
7
|
import { openCompletionRequests, sentRequestInstructions } from '../completion-policy.js';
|
|
7
8
|
import { NO_WAIT_NOTE, COMPLETION_NUDGE_NOTE, decideTurnEnd } from '../turn-end.js';
|
|
8
9
|
import { isSquawkHumanWait, openWaits } from '../waits.js';
|
|
@@ -30,12 +31,31 @@ export class TurnSettler {
|
|
|
30
31
|
this.scheduleWakeupMaxSeconds = scheduleWakeupMaxSeconds;
|
|
31
32
|
this.timers = timers;
|
|
32
33
|
}
|
|
33
|
-
/** The
|
|
34
|
-
*
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
/** The done this turn end takes to the completion gate: the run's accepted done
|
|
35
|
+
* (`doneAccepted`, hearsay-tools/squawk#2587) while it still holds (`heldDone`), or this
|
|
36
|
+
* session's second refusal for outstanding requests, which this turn end consumes. */
|
|
37
|
+
takeDoneRequest(runId, state, scheduledWake) {
|
|
38
|
+
const accepted = this.heldDone(runId, state, scheduledWake);
|
|
39
|
+
const refused = !!state.liveSession.session && state.boundary.requestRefusedDone === state.liveSession.session;
|
|
37
40
|
transitionTurnBoundary(state, { kind: 'turn-end', phase: 'consume-done', session: state.liveSession.session });
|
|
38
|
-
|
|
41
|
+
if (accepted)
|
|
42
|
+
return Object.freeze(accepted.summary === undefined ? {} : { summary: accepted.summary });
|
|
43
|
+
return refused ? Object.freeze({}) : undefined;
|
|
44
|
+
}
|
|
45
|
+
/** The run's accepted done when it still holds at this turn end (`acceptedDoneHolds`); one that
|
|
46
|
+
* no longer holds is retired here as `reconsidered`, with its reason. Input that withdraws it
|
|
47
|
+
* and is not delivered yet goes first, with the withdrawal note (`acceptedDoneDelivery`): the
|
|
48
|
+
* record stays for that delivery, which this turn end takes before any done, and the next turn
|
|
49
|
+
* end retires it. */
|
|
50
|
+
heldDone(runId, state, scheduledWake) {
|
|
51
|
+
const run = this.context.store.getRun(runId);
|
|
52
|
+
if (!run?.doneAccepted)
|
|
53
|
+
return undefined;
|
|
54
|
+
const decision = acceptedDoneHolds(run, this.context.store.readEvents(runId), { scheduledWake, nativeAsk: !!state.boundary.pendingHumanAsk });
|
|
55
|
+
if (decision.holds || (decision.byInput && undeliveredInput(run)))
|
|
56
|
+
return run.doneAccepted;
|
|
57
|
+
retireDoneAccepted(this.context.store, runId, 'reconsidered', decision.reason);
|
|
58
|
+
return undefined;
|
|
39
59
|
}
|
|
40
60
|
/** The DONE boundary and close metadata; a refused DONE may retain metadata for readiness. */
|
|
41
61
|
recordDoneAtBoundary(state, done, request, keepClose = done) {
|
|
@@ -51,6 +71,7 @@ export class TurnSettler {
|
|
|
51
71
|
// A workflow step that is not the last completes, and the next step starts (hearsay-tools/cezarion#1620).
|
|
52
72
|
const step = !!session && state.boundary.nextStep?.session === session;
|
|
53
73
|
transitionTurnBoundary(state, { kind: 'done-step-consumed', phase: 'completed', session: state.liveSession.session, stepId: state.liveSession.currentStepId });
|
|
74
|
+
retireDoneAccepted(this.context.store, runId, 'completed', step ? 'step complete' : 'goal achieved');
|
|
54
75
|
if (close?.summary)
|
|
55
76
|
this.context.store.appendEvent(runId, { type: 'note', message: close.summary });
|
|
56
77
|
this.context.store.appendEvent(runId, { type: 'lifecycle', message: step ? 'step complete — session closed' : 'goal achieved — session closed', via: close?.via ?? 'cezar_done' });
|
|
@@ -69,7 +90,7 @@ export class TurnSettler {
|
|
|
69
90
|
endTurn(runId, state, sink, turn) {
|
|
70
91
|
const sessionOpen = !state.liveSession.cancelled && !!state.liveSession.session?.open;
|
|
71
92
|
const humanWait = this.host.humanWaits.turnEndHumanWait(runId);
|
|
72
|
-
const doneRequest = this.takeDoneRequest(state);
|
|
93
|
+
const doneRequest = this.takeDoneRequest(runId, state, turn.scheduleWakeup !== undefined);
|
|
73
94
|
const read = classifyTurnEnd({
|
|
74
95
|
sessionOpen, pendingHumanAsk: !!state.boundary.pendingHumanAsk,
|
|
75
96
|
scheduledWake: turn.scheduleWakeup !== undefined,
|
|
@@ -133,7 +154,8 @@ export class TurnSettler {
|
|
|
133
154
|
* decision. False when nothing was settled: the done closed the session, or the input checkpoint
|
|
134
155
|
* failed.
|
|
135
156
|
*/
|
|
136
|
-
settleTurn(runId, state, entry,
|
|
157
|
+
settleTurn(runId, state, entry, settled, refusal) {
|
|
158
|
+
const turn = entry === 'turn-end' ? settled : this.recheckBoundaryDone(runId, state, settled);
|
|
137
159
|
const session = state.liveSession.session;
|
|
138
160
|
const stepId = turn.stepId;
|
|
139
161
|
// A done goes to the completion gate first (hearsay-tools/cezarion#1301). A refused done is not a done.
|
|
@@ -166,6 +188,15 @@ export class TurnSettler {
|
|
|
166
188
|
this.host.settledTurnOutcome(runId, entry, outcome);
|
|
167
189
|
return true;
|
|
168
190
|
}
|
|
191
|
+
/** A done a boundary kept for a later entry (an acknowledgement, readiness, the gate) is decided
|
|
192
|
+
* again there: what was recorded since may withdraw it. A refused done the boundary kept has
|
|
193
|
+
* no record, and the gate decides it as before. */
|
|
194
|
+
recheckBoundaryDone(runId, state, turn) {
|
|
195
|
+
if (!turn.done || !this.context.store.getRun(runId)?.doneAccepted || this.heldDone(runId, state, turn.scheduleWakeup !== undefined))
|
|
196
|
+
return turn;
|
|
197
|
+
transitionTurnBoundary(state, { kind: 'turn-end', phase: 'drop-done', session: state.liveSession.session });
|
|
198
|
+
return { ...turn, done: false };
|
|
199
|
+
}
|
|
169
200
|
/** The completion gate held the done (`settleTurn`). A stopped root, or a question that parked
|
|
170
201
|
* for the user: the done stays at the boundary. False when the input checkpoint failed. */
|
|
171
202
|
settleHeldTurn(runId, state, entry, turn) {
|
|
@@ -274,9 +305,13 @@ export class TurnSettler {
|
|
|
274
305
|
if (decisionRefused)
|
|
275
306
|
noteRefusal();
|
|
276
307
|
// A refusal that settles the turn end replaces Squawk's own human wait, as the agent's own wait would.
|
|
277
|
-
const
|
|
308
|
+
const keepsDone = decision.kind === 'defer' && !!decision.keepDone;
|
|
309
|
+
const settlesRefusal = !!refused && !decisionRefused && !keepsDone;
|
|
278
310
|
if (settlesRefusal)
|
|
279
311
|
this.host.humanWaits.withdrawSquawkHumanWaits(runId);
|
|
312
|
+
// The completion gate refused the done: the agent must call it again (hearsay-tools/squawk#2587).
|
|
313
|
+
if (refused && !keepsDone)
|
|
314
|
+
retireDoneAccepted(this.context.store, runId, 'reconsidered', `completion refused: ${refused.code}`);
|
|
280
315
|
return transitionTurnBoundary(runId, state, { kind: 'turn-end', phase: 'carry', session,
|
|
281
316
|
carry: { runId, state, session, stepId, refused, noteRefusal, settlesRefusal }, decision }, this.boundaryEffects);
|
|
282
317
|
}
|
|
@@ -494,4 +529,45 @@ export class TurnSettler {
|
|
|
494
529
|
this.host.waitEngine.open(runId, state, wait, { withdraw: true, onCommitFailure: { log: `${logPrefix()} monitoring timer checkpoint failed` }, park: false });
|
|
495
530
|
}
|
|
496
531
|
}
|
|
532
|
+
/** The only writer that retires `doneAccepted` (ADR 0064, hearsay-tools/squawk#2587): `completed`
|
|
533
|
+
* when the run or its step finishes on the done; `reconsidered` when a human message, a new
|
|
534
|
+
* instruction, a failed wait result, a wait or question the agent registers, or a completion
|
|
535
|
+
* refusal withdraws it, and the agent must call `cezar_done` again. False when none was on record. */
|
|
536
|
+
export function retireDoneAccepted(store, runId, as, reason) {
|
|
537
|
+
if (!store.getRun(runId)?.doneAccepted)
|
|
538
|
+
return false;
|
|
539
|
+
store.commitOutcome(runId, { kind: 'done-retired', as, reason }, {}, { bestEffort: true });
|
|
540
|
+
if (as === 'reconsidered')
|
|
541
|
+
store.appendEvent(runId, { type: 'note', message: `cezar_done withdrawn: ${reason}` });
|
|
542
|
+
return true;
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Whether the run's accepted `cezar_done` still holds (ADR 0064, hearsay-tools/squawk#2587): the
|
|
546
|
+
* one decision, made from what was recorded after the done on any path. It no longer holds after a
|
|
547
|
+
* human message (its `user-message` event), an instruction among the agent inputs (a steer, an
|
|
548
|
+
* inbox read, a continuation's opening input), a failed wait result, a wait or question the agent
|
|
549
|
+
* registered (the tool, the CLI, a native ask; a replay registers nothing), a native question in
|
|
550
|
+
* this turn, or a ScheduleWakeup in a turn after the done's own. Input still owed is not read here:
|
|
551
|
+
* the call refused it (`input_pending`), and a turn end delivers owed input before any done.
|
|
552
|
+
*/
|
|
553
|
+
export function acceptedDoneHolds(run, events, turn = {}) {
|
|
554
|
+
const done = run.doneAccepted;
|
|
555
|
+
if (!done)
|
|
556
|
+
return { holds: false, reason: 'no done on record', byInput: false };
|
|
557
|
+
const input = humanMessageAfter(events, done.seq) ?? instructionAfter(run, done.at) ?? failedResultAfter(run, done.at);
|
|
558
|
+
if (input)
|
|
559
|
+
return { holds: false, reason: input, byInput: true };
|
|
560
|
+
const agent = registeredAfter(run, done.at) ?? (turn.nativeAsk ? 'the agent asked the user' : undefined)
|
|
561
|
+
?? (turn.scheduledWake && laterTurn(events, done.seq) ? 'the agent scheduled a wake-up' : undefined);
|
|
562
|
+
return agent === undefined ? { holds: true } : { holds: false, reason: agent, byInput: false };
|
|
563
|
+
}
|
|
564
|
+
/** The only writer that spends the accepted done's one free delivery turn (hearsay-tools/squawk#2587):
|
|
565
|
+
* later deliveries charge as wakes do, so the wake cap still holds. */
|
|
566
|
+
export function spendDoneFreeTurn(store, runId) {
|
|
567
|
+
store.commitOutcome(runId, { kind: 'done-free-turn' }, {}, { bestEffort: true });
|
|
568
|
+
}
|
|
569
|
+
/** Input the run has not handed to the agent yet: a queued agent input or a resolved wait result. */
|
|
570
|
+
function undeliveredInput(run) {
|
|
571
|
+
return !!run.agentInputs?.some(input => !input.deliveredAt) || (run.waits ?? []).some(wait => wait.phase === 'resolved');
|
|
572
|
+
}
|
|
497
573
|
//# sourceMappingURL=turn-settler.js.map
|