wicked-crew 0.8.1 → 0.8.2
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/api/ask-paths.d.ts +90 -0
- package/dist/api/ask-paths.d.ts.map +1 -0
- package/dist/api/ask-paths.js +145 -0
- package/dist/api/ask-paths.js.map +1 -0
- package/dist/api/ask-relay.d.ts +150 -0
- package/dist/api/ask-relay.d.ts.map +1 -0
- package/dist/api/ask-relay.js +601 -0
- package/dist/api/ask-relay.js.map +1 -0
- package/dist/api/chat-scope.d.ts +25 -2
- package/dist/api/chat-scope.d.ts.map +1 -1
- package/dist/api/chat-scope.js +47 -4
- package/dist/api/chat-scope.js.map +1 -1
- package/dist/api/diagnostics.d.ts +5 -2
- package/dist/api/diagnostics.d.ts.map +1 -1
- package/dist/api/diagnostics.js +7 -3
- package/dist/api/diagnostics.js.map +1 -1
- package/dist/api/eval-sample.d.ts +12 -12
- package/dist/api/mcp.d.ts +10 -10
- package/dist/api/plan-schema.d.ts +14 -0
- package/dist/api/plan-schema.d.ts.map +1 -1
- package/dist/api/plan-schema.js +4 -0
- package/dist/api/plan-schema.js.map +1 -1
- package/dist/api/recording.d.ts +30 -1
- package/dist/api/recording.d.ts.map +1 -1
- package/dist/api/recording.js +54 -6
- package/dist/api/recording.js.map +1 -1
- package/dist/api/roster-standing.d.ts.map +1 -1
- package/dist/api/roster-standing.js +6 -2
- package/dist/api/roster-standing.js.map +1 -1
- package/dist/api/routes.d.ts +144 -14
- package/dist/api/routes.d.ts.map +1 -1
- package/dist/api/routes.js +341 -202
- package/dist/api/routes.js.map +1 -1
- package/dist/api/seat-standing.d.ts +9 -1
- package/dist/api/seat-standing.d.ts.map +1 -1
- package/dist/api/seat-standing.js +27 -1
- package/dist/api/seat-standing.js.map +1 -1
- package/dist/api/server.d.ts +5 -0
- package/dist/api/server.d.ts.map +1 -1
- package/dist/api/server.js +76 -5
- package/dist/api/server.js.map +1 -1
- package/dist/api/testing.d.ts +4 -4
- package/dist/campaigns/routes.d.ts +2 -2
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +9 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/core/adapter.d.ts +1 -0
- package/dist/core/adapter.d.ts.map +1 -1
- package/dist/core/adapter.js +8 -0
- package/dist/core/adapter.js.map +1 -1
- package/dist/core/bridge-reaper.d.ts +50 -7
- package/dist/core/bridge-reaper.d.ts.map +1 -1
- package/dist/core/bridge-reaper.js +242 -42
- package/dist/core/bridge-reaper.js.map +1 -1
- package/dist/core/types.d.ts +2 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/decisions/chat-recorder.d.ts +18 -0
- package/dist/decisions/chat-recorder.d.ts.map +1 -1
- package/dist/decisions/chat-recorder.js +107 -14
- package/dist/decisions/chat-recorder.js.map +1 -1
- package/dist/decisions/consider.d.ts +13 -0
- package/dist/decisions/consider.d.ts.map +1 -1
- package/dist/decisions/consider.js +20 -4
- package/dist/decisions/consider.js.map +1 -1
- package/dist/interactive/bridge-pool.d.ts.map +1 -1
- package/dist/interactive/bridge-pool.js +3 -2
- package/dist/interactive/bridge-pool.js.map +1 -1
- package/dist/interactive/draft-events.d.ts +28 -1
- package/dist/interactive/draft-events.d.ts.map +1 -1
- package/dist/interactive/draft-events.js +79 -17
- package/dist/interactive/draft-events.js.map +1 -1
- package/dist/interactive/draft-skill.d.ts.map +1 -1
- package/dist/interactive/draft-skill.js +24 -6
- package/dist/interactive/draft-skill.js.map +1 -1
- package/dist/interactive/review-events.d.ts +1 -1
- package/dist/interactive/review-events.d.ts.map +1 -1
- package/dist/interactive/review-events.js +4 -2
- package/dist/interactive/review-events.js.map +1 -1
- package/dist/studio/assets/index-CGjbTpLl.css +32 -0
- package/dist/studio/assets/index-DRybGZtf.js +580 -0
- package/dist/studio/editors/wicked-page/editor.json +1 -1
- package/dist/studio/editors/wicked-page/index.html +1 -1
- package/dist/studio/index.html +2 -2
- package/dist/studio/testid-inventory.json +112 -4
- package/dist/team/routes.d.ts +38 -0
- package/dist/team/routes.d.ts.map +1 -1
- package/endpoint-manifest.json +1 -1
- package/package.json +3 -3
- package/dist/studio/assets/index-D9cD_lY1.js +0 -580
- package/dist/studio/assets/index-DEBAWrq3.css +0 -32
|
@@ -0,0 +1,601 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DES-ASK-TEAM-CHAT-001 §5.2 (ASK-C2) — the ask relay, crew's READ side of an ask path.
|
|
3
|
+
*
|
|
4
|
+
* After ASK-C1 an ask is a team run: the PA answers in an `understand` step `answer-N`, and the
|
|
5
|
+
* engine publishes the run's unit frames (`unitDispatched`, `unitOutputDelta`, `unitOutputCaptured`,
|
|
6
|
+
* `unitDone`, …) and team rows (`wicked.team.*`) — none of them a chat frame. This relay is the ONE
|
|
7
|
+
* producer of chat frames for a path: it folds the answer unit's `unitOutputDelta` into
|
|
8
|
+
* `chatDelta{chat, cliKey:<PA>}` (live typing only) and folds one `chatReply{chat, cliKey:<PA>, text,
|
|
9
|
+
* ok, run_id, ord}` per answer unit whose text is the output the team row
|
|
10
|
+
* `step.completed{step_id:"answer-N"}.output_ref` names — read through the engine's `work_output` at
|
|
11
|
+
* the FOLD (`unitDone{ord}`), not at the row (the row is published by the worker before the actor
|
|
12
|
+
* folds; the record exists once the fold ran — §5.2 "when the text is readable, verified").
|
|
13
|
+
*
|
|
14
|
+
* The join is by ATTEMPT (codex on #810 r1, 2): `output_ref` is `unit:<run>:<ord>:<attempt>`, and the
|
|
15
|
+
* attempt the fold settles is the latest the engine dispatched for that ord (`unitDispatched`,
|
|
16
|
+
* `unitOutputDelta`, `unitOutputCaptured` all carry it) — a failed attempt's row never decides a
|
|
17
|
+
* successful retry. A fold whose row has not arrived (the bus poll is 2 s) waits for it; past
|
|
18
|
+
* `rowGraceMs` the reply is read from the record anyway, with `ok` from the engine's own
|
|
19
|
+
* `unitOutputCaptured.stepStatus` — the un-teamed run of §8 F7 publishes no team row at all, and its
|
|
20
|
+
* answer still arrives (r1, 5). A RUN-terminal frame with no fold (`sessionFailed{ord}`,
|
|
21
|
+
* `runCancelled`) ends the turn with `ok:false` (r1, 6); `stepFailed` / `unitDenied` are NOT
|
|
22
|
+
* terminal — the engine fails over (a re-pick re-dispatches the ord, §8 F2) or opens an escalation
|
|
23
|
+
* gate whose Approve re-dispatches it, and a failed run says so with `sessionFailed` (r2, 1).
|
|
24
|
+
*
|
|
25
|
+
* The PA: the team rows (`path.started`, `path.repicked`) are authoritative; the unit's assigned seat
|
|
26
|
+
* is the fallback while none has arrived, and the unit record is re-read on every new attempt (a
|
|
27
|
+
* re-pick re-dispatches the same ord on another seat — r1, 1). Control lines (`HELP:`, `PLAN+`,
|
|
28
|
+
* `PLAN <id>:`, `ADVICE <id>:`, `STEP <id>:`, `SCOPE`, `RISK`) are stripped from the displayed text
|
|
29
|
+
* (§4.7); a delta stream that disagrees with the record is overwritten by it (the transcript's
|
|
30
|
+
* `seat` record is written from the reply).
|
|
31
|
+
*
|
|
32
|
+
* Every frame goes through the server's event fold (`fold`), so the turn index stamps `turn_id`, the
|
|
33
|
+
* transcript persists the reply, the decision recorder and the citation verifier see what they saw
|
|
34
|
+
* for a pool chat, and /ws fans it out — unchanged consumers (§5.2, codex #4). Every await is
|
|
35
|
+
* followed by a re-check that the run still belongs to the chat (End forgets it — r1, 4). Crew
|
|
36
|
+
* publishes no bus row (T2 §7 assertion 4). The relay is in-memory: a daemon restart forgets which
|
|
37
|
+
* run is which chat (the ask-path index is in-memory too), so a path that outlives the daemon is
|
|
38
|
+
* read from the run view, not relayed.
|
|
39
|
+
*/
|
|
40
|
+
/** `^` a control line of the team grammar (DES-TEAMING-002 §8.8; §4.7 of the ask design). */
|
|
41
|
+
const CONTROL_LINE = /^\s*(?:HELP:|PLAN\+|PLAN\s+\S+\s*:|ADVICE\s+\S+\s*:|STEP\s+\S+\s*:|SCOPE\b|RISK\b|DONE\s*$)/u;
|
|
42
|
+
/** The displayed text: every control line removed, surrounding blank lines trimmed. */
|
|
43
|
+
export function stripControlLines(text) {
|
|
44
|
+
return text
|
|
45
|
+
.split('\n')
|
|
46
|
+
.filter((line) => !CONTROL_LINE.test(line))
|
|
47
|
+
.join('\n')
|
|
48
|
+
.trim();
|
|
49
|
+
}
|
|
50
|
+
/** `unit:<run>:<ord>:<attempt>` → `{ord, attempt}`, or `null` for any other shape. */
|
|
51
|
+
export function refOf(ref) {
|
|
52
|
+
const m = /^unit:(.+):(\d+):(\d+)$/u.exec(ref);
|
|
53
|
+
if (m === null)
|
|
54
|
+
return null;
|
|
55
|
+
const ord = Number(m[2]);
|
|
56
|
+
const attempt = Number(m[3]);
|
|
57
|
+
return Number.isInteger(ord) && Number.isInteger(attempt) ? { ord, attempt } : null;
|
|
58
|
+
}
|
|
59
|
+
/** `unit:<run>:<ord>:<attempt>` → the ord, or `null` for any other shape. */
|
|
60
|
+
export function ordOfOutputRef(ref) {
|
|
61
|
+
return refOf(ref)?.ord ?? null;
|
|
62
|
+
}
|
|
63
|
+
/** The step id an answer unit's id carries (`<run>:answer-N` → `answer-N`), or `null`. */
|
|
64
|
+
export function answerStepOf(runId, unitId) {
|
|
65
|
+
const prefix = `${runId}:`;
|
|
66
|
+
if (!unitId.startsWith(prefix))
|
|
67
|
+
return null;
|
|
68
|
+
const step = unitId.slice(prefix.length);
|
|
69
|
+
return /^answer-\d+$/u.test(step) ? step : null;
|
|
70
|
+
}
|
|
71
|
+
/** The frames the relay reads, besides the team rows. */
|
|
72
|
+
const UNIT_FRAMES = new Set([
|
|
73
|
+
'unitDispatched',
|
|
74
|
+
'unitOutputDelta',
|
|
75
|
+
'unitOutputCaptured',
|
|
76
|
+
'unitDone',
|
|
77
|
+
'stepFailed',
|
|
78
|
+
'unitDenied',
|
|
79
|
+
'sessionFailed',
|
|
80
|
+
'runCancelled',
|
|
81
|
+
]);
|
|
82
|
+
export class AskRelay {
|
|
83
|
+
deps;
|
|
84
|
+
/** run → ord → attempt → the `step.completed` row. */
|
|
85
|
+
rows = new Map();
|
|
86
|
+
/** run → ord → the latest attempt the engine dispatched / streamed / captured. */
|
|
87
|
+
attempts = new Map();
|
|
88
|
+
/** run → ord → the engine's own status of the latest captured attempt (`unitOutputCaptured`). */
|
|
89
|
+
captured = new Map();
|
|
90
|
+
/** run → ord → the unit (id + seat), resolved lazily from the run view; re-read per attempt. */
|
|
91
|
+
units = new Map();
|
|
92
|
+
/** `${run}:${ord}` → a fold waiting for its row (bounded by `rowGraceMs`). */
|
|
93
|
+
waiting = new Map();
|
|
94
|
+
/** `${run}:${ord}` whose reply went out (or is going out) — exactly one per answer unit. */
|
|
95
|
+
replied = new Set();
|
|
96
|
+
/** `${run}:${ord}` → the partial last line of the delta stream (a control line may split). */
|
|
97
|
+
tails = new Map();
|
|
98
|
+
/** Runs a terminal frame has ended: no later fold, row, grace or read continuation may speak
|
|
99
|
+
* for them (codex on #810 r10, 2). */
|
|
100
|
+
ended = new Set();
|
|
101
|
+
/** `${run}:${ord}` whose reply was actually FOLDED (a reservation in `replied` may still be in
|
|
102
|
+
* flight — a terminal must speak for it, r11, 1). */
|
|
103
|
+
spoken = new Set();
|
|
104
|
+
rowGraceMs;
|
|
105
|
+
constructor(deps) {
|
|
106
|
+
this.deps = deps;
|
|
107
|
+
this.rowGraceMs = deps.rowGraceMs ?? 5_000;
|
|
108
|
+
}
|
|
109
|
+
log(msg) {
|
|
110
|
+
this.deps.log?.(msg);
|
|
111
|
+
}
|
|
112
|
+
/** A `teamEvent` frame's bus row (the team /ws relay hands every row here). */
|
|
113
|
+
onTeamRow(row) {
|
|
114
|
+
if (row === undefined || typeof row.event_type !== 'string')
|
|
115
|
+
return;
|
|
116
|
+
const p = (row.payload ?? {});
|
|
117
|
+
const runId = typeof p['run_id'] === 'string' ? p['run_id'] : undefined;
|
|
118
|
+
if (runId === undefined)
|
|
119
|
+
return;
|
|
120
|
+
const chatId = this.deps.paths.chatOf(runId);
|
|
121
|
+
if (chatId === undefined)
|
|
122
|
+
return;
|
|
123
|
+
switch (row.event_type) {
|
|
124
|
+
case 'wicked.team.path.started': {
|
|
125
|
+
const cli = typeof p['cli'] === 'string' ? p['cli'] : undefined;
|
|
126
|
+
const selection = p['selection'] === 'chosen' ? 'chosen' : 'random';
|
|
127
|
+
if (cli !== undefined)
|
|
128
|
+
this.learnPa(runId, chatId, cli, selection);
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
case 'wicked.team.path.repicked': {
|
|
132
|
+
const to = typeof p['to'] === 'string' ? p['to'] : undefined;
|
|
133
|
+
// The same ord is re-dispatched on another seat: every cached unit of the run is stale.
|
|
134
|
+
this.units.delete(runId);
|
|
135
|
+
if (to !== undefined)
|
|
136
|
+
this.learnPa(runId, chatId, to, 'random');
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
case 'wicked.team.member.joined': {
|
|
140
|
+
const seat = typeof p['seat'] === 'string' ? p['seat'] : null;
|
|
141
|
+
const role = typeof p['role'] === 'string' ? p['role'] : '';
|
|
142
|
+
if (role === 'monitor' || role === 'reviewer')
|
|
143
|
+
this.deps.paths.observe(runId, { reviewer: seat });
|
|
144
|
+
else if (role === 'helper' && seat !== null)
|
|
145
|
+
this.deps.paths.observe(runId, { helper: seat });
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
case 'wicked.team.help.answered': {
|
|
149
|
+
const by = typeof p['member'] === 'string' ? p['member'] : typeof p['seat'] === 'string' ? p['seat'] : undefined;
|
|
150
|
+
if (by !== undefined)
|
|
151
|
+
this.deps.paths.observe(runId, { helper: by });
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
case 'wicked.team.step.completed': {
|
|
155
|
+
const stepId = typeof p['step_id'] === 'string' ? p['step_id'] : undefined;
|
|
156
|
+
const outputRef = typeof p['output_ref'] === 'string' ? p['output_ref'] : undefined;
|
|
157
|
+
const status = typeof p['status'] === 'string' ? p['status'] : 'ok';
|
|
158
|
+
if (stepId === undefined || outputRef === undefined || !/^answer-\d+$/u.test(stepId))
|
|
159
|
+
return;
|
|
160
|
+
const ref = refOf(outputRef);
|
|
161
|
+
if (ref === null)
|
|
162
|
+
return;
|
|
163
|
+
this.nested(this.rows, runId, ref.ord).set(ref.attempt, { stepId, status, attempt: ref.attempt });
|
|
164
|
+
this.noteAttempt(runId, ref.ord, ref.attempt); // one monotonic boundary across rows and frames (r3, 1)
|
|
165
|
+
// A fold is waiting for this very row (the row came late on the poll): the reply is due.
|
|
166
|
+
const key = `${runId}:${ref.ord}`;
|
|
167
|
+
if (this.waiting.has(key) && ref.attempt >= (this.attemptOf(runId, ref.ord) ?? ref.attempt)) {
|
|
168
|
+
this.stopWaiting(key);
|
|
169
|
+
void this.reply(runId, chatId, ref.ord, 'row');
|
|
170
|
+
}
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
default:
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
/** A CoreEvent of the engine's stream — only the unit / terminal frames are read. */
|
|
178
|
+
async onCoreEvent(event) {
|
|
179
|
+
if (!UNIT_FRAMES.has(event.type))
|
|
180
|
+
return;
|
|
181
|
+
const f = event;
|
|
182
|
+
const runId = typeof f['session'] === 'string' ? f['session'] : undefined;
|
|
183
|
+
if (runId === undefined)
|
|
184
|
+
return;
|
|
185
|
+
const chatId = this.deps.paths.chatOf(runId);
|
|
186
|
+
if (chatId === undefined)
|
|
187
|
+
return;
|
|
188
|
+
if (this.ended.has(runId) && event.type !== 'runCancelled' && event.type !== 'sessionFailed')
|
|
189
|
+
return;
|
|
190
|
+
if (event.type === 'runCancelled') {
|
|
191
|
+
await this.terminal(runId, chatId, undefined, 'the run was cancelled');
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
const ord = typeof f['ord'] === 'number' ? f['ord'] : undefined;
|
|
195
|
+
if (ord === undefined)
|
|
196
|
+
return;
|
|
197
|
+
const attempt = typeof f['attempt'] === 'number' ? f['attempt'] : undefined;
|
|
198
|
+
if (attempt !== undefined)
|
|
199
|
+
this.noteAttempt(runId, ord, attempt);
|
|
200
|
+
if (event.type === 'unitDispatched')
|
|
201
|
+
return; // the attempt is noted; the seat is re-read on use
|
|
202
|
+
// A straggler of a superseded attempt (the engine drains a replaced worker's buffered output
|
|
203
|
+
// with its original label): not the voice any more (r2, 2).
|
|
204
|
+
if (this.superseded(runId, ord, attempt))
|
|
205
|
+
return;
|
|
206
|
+
if (event.type === 'unitOutputCaptured') {
|
|
207
|
+
const stepStatus = typeof f['stepStatus'] === 'string' ? f['stepStatus'] : 'ok';
|
|
208
|
+
this.nestedOne(this.captured, runId).set(ord, { attempt: attempt ?? this.attemptOf(runId, ord) ?? 0, stepStatus });
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
if (event.type === 'stepFailed' || event.type === 'unitDenied') {
|
|
212
|
+
// An ATTEMPT ended badly — not the answer's end: the engine fails over to another seat
|
|
213
|
+
// (`path.repicked` + attempt+1) or opens an escalation gate whose Approve re-dispatches the
|
|
214
|
+
// ord; a run that gives up says so with `sessionFailed`. The stream of this attempt is over.
|
|
215
|
+
this.tails.delete(`${runId}:${ord}`);
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
if (event.type === 'sessionFailed') {
|
|
219
|
+
await this.terminal(runId, chatId, ord, 'the run failed at this step');
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
const unit = await this.unit(runId, ord);
|
|
223
|
+
if (this.deps.paths.chatOf(runId) !== chatId)
|
|
224
|
+
return; // ended meanwhile (r1, 4)
|
|
225
|
+
if (this.ended.has(runId))
|
|
226
|
+
return; // a terminal frame settled the turn during the read (r10, 2)
|
|
227
|
+
if (unit === undefined) {
|
|
228
|
+
// The run view did not answer. Live typing is best-effort (dropped); a FOLD is not — it is
|
|
229
|
+
// held for its row / the grace, whose reply re-reads the record (r7, 1).
|
|
230
|
+
if (event.type === 'unitDone')
|
|
231
|
+
this.awaitRow(runId, chatId, ord);
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
if (unit === null || answerStepOf(runId, unit.id) === null)
|
|
235
|
+
return; // not the PA's answer: no chat frame
|
|
236
|
+
// Superseded during the await: neither streamed nor allowed to name the PA (r3, 2).
|
|
237
|
+
if (this.superseded(runId, ord, attempt))
|
|
238
|
+
return;
|
|
239
|
+
const pa = this.paOf(runId, chatId, unit);
|
|
240
|
+
if (event.type === 'unitOutputDelta') {
|
|
241
|
+
const text = typeof f['text'] === 'string' ? f['text'] : '';
|
|
242
|
+
const shown = this.deltaText(`${runId}:${ord}`, text);
|
|
243
|
+
if (shown !== '')
|
|
244
|
+
this.deps.fold({ type: 'chatDelta', chat: chatId, cliKey: pa, text: shown });
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
// `unitDone`: the record exists now (the same fold wrote it). The text is the row's — the row
|
|
248
|
+
// of THIS attempt; a late row is waited for, bounded.
|
|
249
|
+
this.tails.delete(`${runId}:${ord}`);
|
|
250
|
+
const key = `${runId}:${ord}`;
|
|
251
|
+
if (this.replied.has(key))
|
|
252
|
+
return;
|
|
253
|
+
if (this.rowFor(runId, ord) !== undefined) {
|
|
254
|
+
await this.reply(runId, chatId, ord, 'fold');
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
this.awaitRow(runId, chatId, ord);
|
|
258
|
+
}
|
|
259
|
+
/** A fold with no row of its attempt yet: wait for the row (the bus poll is 2 s) — bounded by
|
|
260
|
+
* `rowGraceMs`, after which the reply is read from the record anyway. */
|
|
261
|
+
awaitRow(runId, chatId, ord) {
|
|
262
|
+
const key = `${runId}:${ord}`;
|
|
263
|
+
if (this.ended.has(runId) || this.waiting.has(key) || this.replied.has(key))
|
|
264
|
+
return;
|
|
265
|
+
const timer = setTimeout(() => {
|
|
266
|
+
this.waiting.delete(key);
|
|
267
|
+
if (this.deps.paths.chatOf(runId) !== chatId)
|
|
268
|
+
return;
|
|
269
|
+
this.log(`[ask-relay] ${key}: no step.completed row within ${this.rowGraceMs} ms — answering from the record (un-teamed run?)`);
|
|
270
|
+
void this.reply(runId, chatId, ord, 'grace');
|
|
271
|
+
}, this.rowGraceMs);
|
|
272
|
+
timer.unref?.();
|
|
273
|
+
this.waiting.set(key, { timer });
|
|
274
|
+
}
|
|
275
|
+
/** Forget a run (its chat closed). */
|
|
276
|
+
forget(runId) {
|
|
277
|
+
this.rows.delete(runId);
|
|
278
|
+
this.attempts.delete(runId);
|
|
279
|
+
this.captured.delete(runId);
|
|
280
|
+
this.units.delete(runId);
|
|
281
|
+
const prefix = `${runId}:`;
|
|
282
|
+
for (const key of [...this.waiting.keys()])
|
|
283
|
+
if (key.startsWith(prefix))
|
|
284
|
+
this.stopWaiting(key);
|
|
285
|
+
for (const key of [...this.tails.keys()])
|
|
286
|
+
if (key.startsWith(prefix))
|
|
287
|
+
this.tails.delete(key);
|
|
288
|
+
for (const key of [...this.replied])
|
|
289
|
+
if (key.startsWith(prefix))
|
|
290
|
+
this.replied.delete(key);
|
|
291
|
+
for (const key of [...this.spoken])
|
|
292
|
+
if (key.startsWith(prefix))
|
|
293
|
+
this.spoken.delete(key);
|
|
294
|
+
this.ended.delete(runId);
|
|
295
|
+
}
|
|
296
|
+
// ── internals ─────────────────────────────────────────────────────────────────────────────
|
|
297
|
+
nested(map, runId, ord) {
|
|
298
|
+
let byOrd = map.get(runId);
|
|
299
|
+
if (byOrd === undefined) {
|
|
300
|
+
byOrd = new Map();
|
|
301
|
+
map.set(runId, byOrd);
|
|
302
|
+
}
|
|
303
|
+
let byAttempt = byOrd.get(ord);
|
|
304
|
+
if (byAttempt === undefined) {
|
|
305
|
+
byAttempt = new Map();
|
|
306
|
+
byOrd.set(ord, byAttempt);
|
|
307
|
+
}
|
|
308
|
+
return byAttempt;
|
|
309
|
+
}
|
|
310
|
+
nestedOne(map, runId) {
|
|
311
|
+
let byOrd = map.get(runId);
|
|
312
|
+
if (byOrd === undefined) {
|
|
313
|
+
byOrd = new Map();
|
|
314
|
+
map.set(runId, byOrd);
|
|
315
|
+
}
|
|
316
|
+
return byOrd;
|
|
317
|
+
}
|
|
318
|
+
noteAttempt(runId, ord, attempt) {
|
|
319
|
+
const byOrd = this.nestedOne(this.attempts, runId);
|
|
320
|
+
const prev = byOrd.get(ord);
|
|
321
|
+
if (prev === undefined || attempt > prev) {
|
|
322
|
+
byOrd.set(ord, attempt);
|
|
323
|
+
// A new attempt may sit on another seat (a re-pick): the cached unit is stale, and the
|
|
324
|
+
// previous attempt's partial line must not complete a line of this one (r2, 2).
|
|
325
|
+
if (prev !== undefined) {
|
|
326
|
+
this.units.get(runId)?.delete(ord);
|
|
327
|
+
this.tails.delete(`${runId}:${ord}`);
|
|
328
|
+
// The previous attempt's capture status must not grade this one's reply (r5, 2).
|
|
329
|
+
const cap = this.captured.get(runId)?.get(ord);
|
|
330
|
+
if (cap !== undefined && cap.attempt < attempt)
|
|
331
|
+
this.captured.get(runId)?.delete(ord);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
/** The attempt the fold settles for (run, ord): the latest the engine's frames, the team rows or
|
|
336
|
+
* the unit's persisted counter named — one monotonic boundary (r3, 1); attempts are 0-based
|
|
337
|
+
* (r4, 1), so `undefined` = nothing has named one yet. */
|
|
338
|
+
attemptOf(runId, ord) {
|
|
339
|
+
const seen = this.attempts.get(runId)?.get(ord);
|
|
340
|
+
const rows = this.rows.get(runId)?.get(ord);
|
|
341
|
+
const fromRows = rows !== undefined && rows.size > 0 ? Math.max(...rows.keys()) : undefined;
|
|
342
|
+
if (seen === undefined)
|
|
343
|
+
return fromRows;
|
|
344
|
+
return fromRows === undefined ? seen : Math.max(seen, fromRows);
|
|
345
|
+
}
|
|
346
|
+
/** Whether a frame labelled `attempt` belongs to an attempt the boundary has moved past. */
|
|
347
|
+
superseded(runId, ord, attempt) {
|
|
348
|
+
if (attempt === undefined)
|
|
349
|
+
return false;
|
|
350
|
+
const boundary = this.attemptOf(runId, ord);
|
|
351
|
+
return boundary !== undefined && attempt < boundary;
|
|
352
|
+
}
|
|
353
|
+
rowFor(runId, ord) {
|
|
354
|
+
const boundary = this.attemptOf(runId, ord);
|
|
355
|
+
return boundary === undefined ? undefined : this.rows.get(runId)?.get(ord)?.get(boundary);
|
|
356
|
+
}
|
|
357
|
+
stopWaiting(key) {
|
|
358
|
+
const w = this.waiting.get(key);
|
|
359
|
+
if (w !== undefined)
|
|
360
|
+
clearTimeout(w.timer);
|
|
361
|
+
this.waiting.delete(key);
|
|
362
|
+
}
|
|
363
|
+
learnPa(runId, chatId, cli, selection) {
|
|
364
|
+
this.deps.paths.observe(runId, { pa: cli, selection });
|
|
365
|
+
// The turn was reserved for the eligible roster (a random pick names nobody at send time):
|
|
366
|
+
// narrow it to the voice, so the PA's frames are stamped and nobody else is "pending". The
|
|
367
|
+
// decision recorder's audience follows (r1, 7).
|
|
368
|
+
for (const turn of this.deps.turns.turnsOf(chatId)) {
|
|
369
|
+
if (!turn.seats.includes(cli) || turn.seats.length > 1)
|
|
370
|
+
this.deps.turns.reconcile(chatId, turn.turnId, [cli]);
|
|
371
|
+
// Always told (idempotent): the recorder's turn may be created after this (the route
|
|
372
|
+
// records an accepted send after its engine awaits) and then reads the turn index (r2, 3).
|
|
373
|
+
this.deps.recorderReconcile?.(chatId, turn.turnId, [cli]);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
/** The PA: the unit's seat for the CURRENT attempt (the cache is dropped per attempt, so a read
|
|
377
|
+
* unit is this attempt's — a re-pick shows here before its bus row does; r4, 3); the team rows
|
|
378
|
+
* (`path.started` / `path.repicked`) when the unit names no seat yet. */
|
|
379
|
+
paOf(runId, chatId, unit) {
|
|
380
|
+
const path = this.deps.paths.get(chatId);
|
|
381
|
+
if (unit.assigned_cli !== null) {
|
|
382
|
+
if (path !== undefined && path.pa !== unit.assigned_cli) {
|
|
383
|
+
this.learnPa(runId, chatId, unit.assigned_cli, path.pa === null ? path.selection : 'random');
|
|
384
|
+
}
|
|
385
|
+
return unit.assigned_cli;
|
|
386
|
+
}
|
|
387
|
+
return path?.pa ?? 'pa';
|
|
388
|
+
}
|
|
389
|
+
/** `undefined`: a FRESH read failed — the durable record could not be certified (the caller
|
|
390
|
+
* must not answer from the cache; r6, 1). `null`: no such unit. */
|
|
391
|
+
async unit(runId, ord, fresh = false) {
|
|
392
|
+
const byOrd = this.nestedOne(this.units, runId);
|
|
393
|
+
const cached = byOrd.get(ord);
|
|
394
|
+
// A unit with no seat yet is re-read (the seat is assigned at dispatch). A FRESH read (the
|
|
395
|
+
// fold / reply boundary) bypasses the cache: the engine's live queue is bounded and may have
|
|
396
|
+
// dropped the frames of a retry, so the durable record decides the attempt and the seat (r5, 1).
|
|
397
|
+
if (!fresh && cached !== undefined && (cached === null || cached.assigned_cli !== null))
|
|
398
|
+
return cached;
|
|
399
|
+
const startedUnder = this.attemptOf(runId, ord);
|
|
400
|
+
let found = null;
|
|
401
|
+
try {
|
|
402
|
+
found = (await this.deps.units(runId)).find((u) => u.ord === ord) ?? null;
|
|
403
|
+
}
|
|
404
|
+
catch (err) {
|
|
405
|
+
this.log(`[ask-relay] cannot read the units of ${runId}: ${err instanceof Error ? err.message : String(err)}`);
|
|
406
|
+
// `undefined` = the read failed (nothing certified); a cache is good enough for a non-fresh
|
|
407
|
+
// caller; `null` is reserved for "no such unit" (r7, 1).
|
|
408
|
+
return fresh ? undefined : (cached ?? undefined);
|
|
409
|
+
}
|
|
410
|
+
// Not found: not cached (the unit may be planned later — a continuation adds answer-N). A run
|
|
411
|
+
// forgotten during the read (End) stays forgotten (r2, 4); a read that started under an attempt
|
|
412
|
+
// the engine has since superseded is not cached either — it may name the old seat (r3, 2).
|
|
413
|
+
if (found !== null && this.units.has(runId) && this.attemptOf(runId, ord) === startedUnder) {
|
|
414
|
+
this.nestedOne(this.units, runId).set(ord, found);
|
|
415
|
+
}
|
|
416
|
+
// The unit's persisted attempt is the durable half of the boundary (r4, 2): a row for an older
|
|
417
|
+
// attempt cannot decide a fold whose stored output is this attempt's.
|
|
418
|
+
if (found?.last_attempt !== undefined)
|
|
419
|
+
this.noteAttempt(runId, ord, found.last_attempt);
|
|
420
|
+
return found;
|
|
421
|
+
}
|
|
422
|
+
/** The complete lines of the stream so far, control lines removed; the partial tail is held. */
|
|
423
|
+
deltaText(key, chunk) {
|
|
424
|
+
const buf = (this.tails.get(key) ?? '') + chunk;
|
|
425
|
+
const nl = buf.lastIndexOf('\n');
|
|
426
|
+
if (nl === -1) {
|
|
427
|
+
this.tails.set(key, buf);
|
|
428
|
+
return '';
|
|
429
|
+
}
|
|
430
|
+
this.tails.set(key, buf.slice(nl + 1));
|
|
431
|
+
const lines = buf.slice(0, nl).split('\n').filter((l) => !CONTROL_LINE.test(l));
|
|
432
|
+
return lines.length === 0 ? '' : `${lines.join('\n')}\n`;
|
|
433
|
+
}
|
|
434
|
+
/** ONE reply per answer unit: the key is reserved before the first await (r1, 8). */
|
|
435
|
+
async reply(runId, chatId, ord, via) {
|
|
436
|
+
const key = `${runId}:${ord}`;
|
|
437
|
+
if (this.replied.has(key))
|
|
438
|
+
return;
|
|
439
|
+
this.replied.add(key);
|
|
440
|
+
const unit = await this.unit(runId, ord, true);
|
|
441
|
+
if (this.deps.paths.chatOf(runId) !== chatId)
|
|
442
|
+
return; // ended meanwhile: nothing lands on a reuse
|
|
443
|
+
if (this.ended.has(runId))
|
|
444
|
+
return; // a terminal frame settled the turn during the read (r10, 2)
|
|
445
|
+
if (unit === null || (unit !== undefined && answerStepOf(runId, unit.id) === null)) {
|
|
446
|
+
// No such unit, or not the PA's answer (a waiter armed on a failed read for a reviewer's
|
|
447
|
+
// ord — r8, 1): nothing went out, nothing to say.
|
|
448
|
+
this.replied.delete(key);
|
|
449
|
+
this.stopWaiting(key);
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
// The fresh read may have moved the boundary (a retry whose frames were missed): the row of
|
|
453
|
+
// THAT attempt decides, or none yet — then the reply waits for it like any other (r5, 1; the
|
|
454
|
+
// guard holds for every path but the grace, r6, 2). A read that could not certify the record
|
|
455
|
+
// (`undefined`) waits too: never an answer from an uncertified cache (r6, 1).
|
|
456
|
+
const row = unit === undefined ? undefined : this.rowFor(runId, ord);
|
|
457
|
+
if ((row === undefined || unit === undefined) && via !== 'grace') {
|
|
458
|
+
this.replied.delete(key);
|
|
459
|
+
this.awaitRow(runId, chatId, ord);
|
|
460
|
+
return;
|
|
461
|
+
}
|
|
462
|
+
if (unit === undefined) {
|
|
463
|
+
// The grace expired and the record still cannot be read: say so once rather than answer
|
|
464
|
+
// from a cache the fresh read could not certify — for every seat the turn waits on, so the
|
|
465
|
+
// turn ends (a reply ends a turn only for a seat it names).
|
|
466
|
+
this.spoken.add(key);
|
|
467
|
+
for (const seat of this.voicesFor(chatId)) {
|
|
468
|
+
this.deps.fold({
|
|
469
|
+
type: 'chatReply',
|
|
470
|
+
chat: chatId,
|
|
471
|
+
cliKey: seat,
|
|
472
|
+
text: `the answer's record could not be read (the run view did not answer); see run ${runId}, unit ${ord}`,
|
|
473
|
+
ok: false,
|
|
474
|
+
run_id: runId,
|
|
475
|
+
ord,
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
480
|
+
const pa = this.paOf(runId, chatId, unit);
|
|
481
|
+
const boundary = this.attemptOf(runId, ord);
|
|
482
|
+
const cap = this.captured.get(runId)?.get(ord);
|
|
483
|
+
const capturedStatus = cap !== undefined && (boundary === undefined || cap.attempt === boundary) ? cap.stepStatus : undefined;
|
|
484
|
+
let text = null;
|
|
485
|
+
try {
|
|
486
|
+
text = await this.deps.workOutput(unit.id);
|
|
487
|
+
}
|
|
488
|
+
catch (err) {
|
|
489
|
+
this.log(`[ask-relay] work_output(${unit.id}) failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
490
|
+
}
|
|
491
|
+
if (this.deps.paths.chatOf(runId) !== chatId)
|
|
492
|
+
return; // r1, 4
|
|
493
|
+
if (this.ended.has(runId))
|
|
494
|
+
return; // r10, 2
|
|
495
|
+
const status = row?.status ?? capturedStatus ?? (text !== null ? 'ok' : 'failed');
|
|
496
|
+
const ok = status === 'ok' && text !== null;
|
|
497
|
+
const stepId = row?.stepId ?? answerStepOf(runId, unit.id) ?? `answer (ord ${ord})`;
|
|
498
|
+
const shown = text !== null ? stripControlLines(text) : `${pa} did not answer (${status}): the engine stored no output for ${stepId}`;
|
|
499
|
+
if (via === 'grace')
|
|
500
|
+
this.log(`[ask-relay] ${key}: replied from the record without a team row (status ${status})`);
|
|
501
|
+
this.spoken.add(key);
|
|
502
|
+
this.deps.fold({
|
|
503
|
+
type: 'chatReply',
|
|
504
|
+
chat: chatId,
|
|
505
|
+
cliKey: pa,
|
|
506
|
+
text: shown,
|
|
507
|
+
ok,
|
|
508
|
+
run_id: runId,
|
|
509
|
+
ord,
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
/** The seats a failure must be said for: the PA when the path knows it, else every seat the
|
|
513
|
+
* chat's live turns still wait on (the reserved audience of a random pick), else `pa`. */
|
|
514
|
+
voicesFor(chatId) {
|
|
515
|
+
const pa = this.deps.paths.get(chatId)?.pa ?? null;
|
|
516
|
+
if (pa !== null)
|
|
517
|
+
return [pa];
|
|
518
|
+
const pending = [...new Set(this.deps.turns.turnsOf(chatId).flatMap((t) => t.pending))];
|
|
519
|
+
return pending.length > 0 ? pending : ['pa'];
|
|
520
|
+
}
|
|
521
|
+
/** The run view, retried a few times — a terminal fact must not be lost to one failed read. */
|
|
522
|
+
async unitsRetrying(runId) {
|
|
523
|
+
for (let i = 0; i < 3; i += 1) {
|
|
524
|
+
try {
|
|
525
|
+
return await this.deps.units(runId);
|
|
526
|
+
}
|
|
527
|
+
catch (err) {
|
|
528
|
+
this.log(`[ask-relay] cannot read the units of ${runId} (${i + 1}/3): ${err instanceof Error ? err.message : String(err)}`);
|
|
529
|
+
await new Promise((r) => setTimeout(r, 300));
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
return undefined;
|
|
533
|
+
}
|
|
534
|
+
/** A terminal frame with no fold: the answer unit(s) still pending end the turn with `ok:false`.
|
|
535
|
+
* The run view is read with a bounded retry; if it still cannot be read, the turn is ended
|
|
536
|
+
* without the unit's facts rather than left pending (r8, 2). */
|
|
537
|
+
async terminal(runId, chatId, ord, why) {
|
|
538
|
+
// The run is over: the fence goes up first — no armed waiter answers from the record meanwhile
|
|
539
|
+
// (its grace could fire during the retry below), no read continuation arms a new one, no later
|
|
540
|
+
// fold or row speaks (r10, 2).
|
|
541
|
+
this.ended.add(runId);
|
|
542
|
+
const runPrefix = `${runId}:`;
|
|
543
|
+
for (const key of [...this.waiting.keys()])
|
|
544
|
+
if (key.startsWith(runPrefix))
|
|
545
|
+
this.stopWaiting(key);
|
|
546
|
+
const all = await this.unitsRetrying(runId);
|
|
547
|
+
if (this.deps.paths.chatOf(runId) !== chatId)
|
|
548
|
+
return;
|
|
549
|
+
// The answer units the run view names for this terminal (none when it could not be read, when
|
|
550
|
+
// the run died before its units existed, or when the ord is not an answer).
|
|
551
|
+
// Answer units of the run view for this terminal that have not actually SPOKEN (a reservation
|
|
552
|
+
// still in flight is dropped by the fence, so it is spoken for here — r11, 1).
|
|
553
|
+
const named = all === undefined
|
|
554
|
+
? []
|
|
555
|
+
: all.filter((u) => answerStepOf(runId, u.id) !== null && (ord === undefined || u.ord === ord) && !this.spoken.has(`${runId}:${u.ord}`));
|
|
556
|
+
let spoke = false;
|
|
557
|
+
for (const unit of named) {
|
|
558
|
+
const key = `${runId}:${unit.ord}`;
|
|
559
|
+
// The unit's seat, the path's PA, else every seat the turn still waits on (a random pick
|
|
560
|
+
// cancelled before its seat was assigned names none — r10, 1); only a seat a live turn still
|
|
561
|
+
// waits on is spoken for (a turn an earlier answer ended is not re-ended — r11, 3).
|
|
562
|
+
const voices = (unit.assigned_cli !== null ? [this.paOf(runId, chatId, unit)] : this.voicesFor(chatId)).filter((seat) => this.deps.turns.inFlight(chatId, [seat]) !== null);
|
|
563
|
+
if (voices.length === 0)
|
|
564
|
+
continue;
|
|
565
|
+
this.replied.add(key);
|
|
566
|
+
this.spoken.add(key);
|
|
567
|
+
this.tails.delete(key);
|
|
568
|
+
for (const seat of voices) {
|
|
569
|
+
this.deps.fold({ type: 'chatReply', chat: chatId, cliKey: seat, text: `${seat} did not answer: ${why}`, ok: false, run_id: runId, ord: unit.ord });
|
|
570
|
+
}
|
|
571
|
+
spoke = true;
|
|
572
|
+
}
|
|
573
|
+
if (spoke)
|
|
574
|
+
return;
|
|
575
|
+
// No answer unit could speak (unreadable run view, a run that died before its units existed,
|
|
576
|
+
// a terminal for a non-answer ord): every LIVE turn of the chat still ends — once per turn, for
|
|
577
|
+
// the seats it waits on (an earlier turn's answer says nothing about this one — r11, 2);
|
|
578
|
+
// nothing pending, nothing to say (r9 2+3, r10 1).
|
|
579
|
+
const detail = all === undefined ? ' (the run view could not be read)' : '';
|
|
580
|
+
for (const turn of this.deps.turns.turnsOf(chatId)) {
|
|
581
|
+
const turnKey = `${runId}:terminal:${turn.turnId}`;
|
|
582
|
+
if (this.replied.has(turnKey))
|
|
583
|
+
continue;
|
|
584
|
+
this.replied.add(turnKey);
|
|
585
|
+
if (ord !== undefined)
|
|
586
|
+
this.replied.add(`${runId}:${ord}`);
|
|
587
|
+
for (const seat of turn.pending) {
|
|
588
|
+
this.deps.fold({
|
|
589
|
+
type: 'chatReply',
|
|
590
|
+
chat: chatId,
|
|
591
|
+
cliKey: seat,
|
|
592
|
+
text: `${seat} did not answer: ${why}${detail}`,
|
|
593
|
+
ok: false,
|
|
594
|
+
run_id: runId,
|
|
595
|
+
...(ord !== undefined ? { ord } : {}),
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
//# sourceMappingURL=ask-relay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask-relay.js","sourceRoot":"","sources":["../../src/api/ask-relay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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