@akagilnc/pi-workflow-roles 0.1.3932 → 0.1.3975
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/CLAUDE.md +1 -1
- package/dist/acp-host/production-host.js +2389 -6018
- package/dist/analyst-gate-cycles-read.js +15 -19
- package/dist/audit-escalation.js +16 -46
- package/dist/auditor-dossier-tool.js +7 -62
- package/dist/collector-identity.js +0 -157
- package/dist/collector-ledger.js +2 -42
- package/dist/compliance-transport.js +40 -14
- package/dist/diarist-contracts.js +2 -40
- package/dist/doctor-contracts.js +39 -108
- package/dist/doctor-evidence.js +1 -5
- package/dist/engine-detour-tool.js +1 -1
- package/dist/gatekeeper-role.js +49 -38
- package/dist/headless-host/production-host.js +4814 -8450
- package/dist/host-contracts.js +0 -5
- package/dist/merger-contracts.js +4 -6
- package/dist/navigator-attendance.js +30 -52
- package/dist/navigator-invocation-identity.js +0 -1
- package/dist/navigator-public-session.js +2 -1
- package/dist/notary-contracts.js +4 -10
- package/dist/package-contracts/auditor-output.js +5 -23
- package/dist/package-contracts/fixer-output.js +25 -49
- package/dist/package-contracts/gatekeeper-output.js +3 -13
- package/dist/package-contracts/navigator-output.js +4 -7
- package/dist/package-contracts/reviewer-output.js +1 -95
- package/dist/package-contracts/terminating-tools.js +33 -144
- package/dist/package-contracts/worker-output.js +1 -3
- package/dist/public-cli/auto-resume.js +30 -68
- package/dist/public-cli/case-dossier-delivery.js +5 -17
- package/dist/public-cli/diarist-run.js +9 -4
- package/dist/public-cli/inspector-run.js +2 -8
- package/dist/public-cli/instruction-seat-run.js +3 -7
- package/dist/public-cli/invocation.js +5 -2
- package/dist/public-cli/main.js +6068 -6964
- package/dist/public-cli/notary-run.js +1 -8
- package/dist/public-cli/post-admission.js +314 -113
- package/dist/public-cli/run-lifecycle.js +14 -38
- package/dist/public-cli/settlement.js +209 -390
- package/dist/public-cli/terminal.js +51 -45
- package/dist/public-role-summons.js +1 -12
- package/dist/reviewer-dispatch.js +12 -258
- package/dist/submission-correctable-error.js +0 -12
- package/dist/submission-errors.js +6 -1
- package/dist/submission-ledger.js +125 -168
- package/dist/ticket-provenance-contracts.js +2 -49
- package/dist/ticket-provenance.js +82 -31
- package/extensions/role-runtime.ts +1 -6
- package/package.json +1 -1
- package/resources/836-deleted-machine-instruction-inventory.md +18 -0
- package/src/acp-host/role-turn-host.ts +8 -3
- package/src/analyst-gate-cycles-read.ts +17 -29
- package/src/audit-escalation.ts +20 -50
- package/src/auditor-dossier-tool.ts +5 -103
- package/src/canonical-skill-binding.ts +3 -2
- package/src/collector-identity.ts +0 -179
- package/src/collector-ledger.ts +3 -46
- package/src/collector-role.ts +32 -61
- package/src/collector-tool-schemas.ts +20 -14
- package/src/compliance-transport.ts +55 -17
- package/src/countersign-role.ts +17 -8
- package/src/diarist-contracts.ts +3 -36
- package/src/diarist-role.ts +13 -7
- package/src/diarist.ts +4 -16
- package/src/doctor-contracts.ts +73 -94
- package/src/doctor-evidence.ts +1 -1
- package/src/doctor-role.ts +3 -3
- package/src/engine-detour-tool.ts +4 -1
- package/src/external-host-turn-loop.ts +9 -3
- package/src/gatekeeper-pass-envelope.ts +7 -12
- package/src/gatekeeper-role.ts +56 -50
- package/src/gleaner-left-role.ts +4 -2
- package/src/headless-host/role-turn-host.ts +4 -5
- package/src/host-contracts.ts +3 -8
- package/src/judge-role.ts +19 -13
- package/src/merger-contracts.ts +10 -6
- package/src/merger-role.ts +1 -5
- package/src/navigator-attendance.ts +37 -74
- package/src/navigator-invocation-identity.ts +0 -6
- package/src/navigator-public-session.ts +2 -1
- package/src/notary-contracts.ts +7 -10
- package/src/package-contracts/auditor-output.ts +4 -21
- package/src/package-contracts/fixer-output.ts +34 -52
- package/src/package-contracts/gatekeeper-output.ts +5 -22
- package/src/package-contracts/navigator-output.ts +7 -7
- package/src/package-contracts/reviewer-output.ts +2 -150
- package/src/package-contracts/terminating-tools.ts +32 -147
- package/src/package-contracts/worker-output.ts +0 -1
- package/src/pi/adapter.ts +3 -8
- package/src/public-cli/auto-resume.ts +41 -94
- package/src/public-cli/case-dossier-delivery.ts +5 -15
- package/src/public-cli/countersign-run.ts +14 -6
- package/src/public-cli/diarist-run.ts +11 -9
- package/src/public-cli/inspector-run.ts +2 -18
- package/src/public-cli/instruction-seat-run.ts +3 -17
- package/src/public-cli/invocation.ts +5 -2
- package/src/public-cli/merger-run.ts +1 -1
- package/src/public-cli/notary-run.ts +1 -18
- package/src/public-cli/post-admission.ts +385 -115
- package/src/public-cli/run-lifecycle.ts +13 -44
- package/src/public-cli/settlement.ts +314 -562
- package/src/public-cli/terminal.ts +66 -72
- package/src/public-role-summons.ts +5 -30
- package/src/reviewer-dispatch.ts +29 -331
- package/src/reviewer-role.ts +16 -83
- package/src/role-envelope.ts +16 -24
- package/src/role-runtime-dependencies.ts +1 -6
- package/src/role-runtime.ts +65 -201
- package/src/submission-correctable-error.ts +0 -14
- package/src/submission-errors.ts +6 -1
- package/src/submission-ledger.ts +187 -187
- package/src/ticket-provenance-contracts.ts +4 -60
- package/src/ticket-provenance.ts +98 -32
- package/src/worker-role.ts +35 -36
- package/dist/activation-ledger-session.js +0 -105
- package/dist/activation-ledger.js +0 -139
- package/dist/activation-trace.js +0 -33
- package/dist/atomic-write.js +0 -23
- package/dist/auditor-role.js +0 -12
- package/dist/canonical-skill-binding.js +0 -61
- package/dist/collector-handbook.js +0 -142
- package/dist/collector-receipt.js +0 -107
- package/dist/collector-role.js +0 -566
- package/dist/collector-tool-schemas.js +0 -107
- package/dist/countersign-role.js +0 -28
- package/dist/diarist-role.js +0 -44
- package/dist/diarist.js +0 -66
- package/dist/doctor-role.js +0 -75
- package/dist/fixer-bash-seatbelt.js +0 -13
- package/dist/gatekeeper-pass-envelope.js +0 -77
- package/dist/gleaner-left-role.js +0 -26
- package/dist/inspector-role.js +0 -29
- package/dist/judge-role.js +0 -104
- package/dist/merger-role.js +0 -55
- package/dist/navigator-role.js +0 -12
- package/dist/notary-role.js +0 -134
- package/dist/oauth-keepalive.js +0 -158
- package/dist/pi/adapter.js +0 -223
- package/dist/reviewer-agent.js +0 -122
- package/dist/reviewer-child-executor.js +0 -194
- package/dist/reviewer-construction.js +0 -103
- package/dist/reviewer-execution-ledger.js +0 -166
- package/dist/reviewer-failure-diagnostic.js +0 -17
- package/dist/reviewer-role.js +0 -159
- package/dist/reviewer-scope-prompt.js +0 -21
- package/dist/reviewer-settlement.js +0 -66
- package/dist/reviewer-workspace.js +0 -132
- package/dist/role-runtime.js +0 -1604
- package/dist/stderr-jsonl.js +0 -26
- package/dist/tool-execution-observation.js +0 -141
- package/dist/worker-role.js +0 -345
- package/dist/worker-submission-gates.js +0 -305
- package/src/collector-receipt.ts +0 -140
- package/src/diagnostic-tail.ts +0 -18
- package/src/reviewer-agent.ts +0 -135
- package/src/reviewer-child-executor.ts +0 -252
- package/src/reviewer-construction.ts +0 -195
- package/src/reviewer-execution-ledger.ts +0 -212
- package/src/reviewer-failure-diagnostic.ts +0 -18
- package/src/reviewer-scope-prompt.ts +0 -24
- package/src/reviewer-settlement.ts +0 -74
- package/src/reviewer-workspace.ts +0 -105
- package/src/shape-unreadable-failure.ts +0 -49
|
@@ -18,13 +18,9 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
REVIEWER_ACCEPTED_TEXT,
|
|
20
20
|
REVIEWER_OUTPUT_TOOL_NAME,
|
|
21
|
-
projectReviewerIntentToReceipt,
|
|
22
21
|
validateReviewerIntent,
|
|
23
|
-
validateRuntimeReviewerReceipt,
|
|
24
22
|
type ReviewerIntent,
|
|
25
|
-
type RuntimeReviewerReceiptV2,
|
|
26
23
|
} from "./reviewer-output.ts";
|
|
27
|
-
import { isAuditEscalationResult } from "../audit-escalation.ts";
|
|
28
24
|
import { CorrectableSubmissionError } from "../submission-correctable-error.ts";
|
|
29
25
|
import { DOCTOR_ACCEPTED_TEXT, DOCTOR_OUTPUT_TOOL_NAME, validateDoctorSubmissionShape, validateRecordedDoctorOutput, type DoctorOutput, type DoctorSubmission } from "../doctor-contracts.ts";
|
|
30
26
|
import { GATEKEEPER_ACCEPTED_TEXT, GATEKEEPER_OUTPUT_TOOL_NAME, validateRecordedGatekeeperOutput, type GatekeeperDirectOutput } from "./gatekeeper-output.ts";
|
|
@@ -60,9 +56,7 @@ export {
|
|
|
60
56
|
MERGER_OUTPUT_TOOL_NAME,
|
|
61
57
|
validateAcceptedCollectorReceipt,
|
|
62
58
|
validateAcceptedJudgeDetails,
|
|
63
|
-
projectReviewerIntentToReceipt,
|
|
64
59
|
validateReviewerIntent,
|
|
65
|
-
validateRuntimeReviewerReceipt,
|
|
66
60
|
validateAcceptedWorkerDetails,
|
|
67
61
|
validateDoctorSubmissionShape,
|
|
68
62
|
validateRecordedDoctorOutput,
|
|
@@ -80,7 +74,6 @@ export type {
|
|
|
80
74
|
CollectorReceipt,
|
|
81
75
|
JudgeVerdict,
|
|
82
76
|
ReviewerIntent,
|
|
83
|
-
RuntimeReviewerReceiptV2,
|
|
84
77
|
WorkerOutput,
|
|
85
78
|
DoctorOutput,
|
|
86
79
|
DoctorSubmission,
|
|
@@ -117,7 +110,7 @@ export type TerminatingToolName = (typeof TERMINATING_TOOL_NAMES)[number];
|
|
|
117
110
|
|
|
118
111
|
export type AcceptedDetails =
|
|
119
112
|
| WorkerOutput
|
|
120
|
-
|
|
|
113
|
+
| ReviewerIntent
|
|
121
114
|
| JudgeVerdict
|
|
122
115
|
| CollectorReceipt
|
|
123
116
|
| DoctorOutput
|
|
@@ -180,138 +173,31 @@ export class AcceptedDetailsContractError extends CorrectableSubmissionError {
|
|
|
180
173
|
}
|
|
181
174
|
}
|
|
182
175
|
|
|
183
|
-
function safeProperty(candidate: Record<string, unknown> | undefined, property: string): unknown {
|
|
184
|
-
try {
|
|
185
|
-
return candidate?.[property];
|
|
186
|
-
} catch {
|
|
187
|
-
return undefined;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
176
|
|
|
177
|
+
/**
|
|
178
|
+
* #836: status allowlist rejection deleted. Original object is the receipt.
|
|
179
|
+
* Callers that need a typed view may still cast; code must not bounce on status.
|
|
180
|
+
*/
|
|
191
181
|
export function validateAcceptedDetails(
|
|
192
|
-
|
|
182
|
+
_toolName: TerminatingToolName,
|
|
193
183
|
details: unknown,
|
|
194
184
|
): AcceptedDetails {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
: undefined;
|
|
198
|
-
let auditEscalation = false;
|
|
199
|
-
try {
|
|
200
|
-
auditEscalation = isAuditEscalationResult(details);
|
|
201
|
-
} catch {
|
|
202
|
-
// Hostile getters are not recognizable audit escalation evidence.
|
|
203
|
-
}
|
|
204
|
-
if (auditEscalation || safeProperty(candidate, "kind") === "audit_escalation") {
|
|
205
|
-
throw new AcceptedDetailsContractError(
|
|
206
|
-
"audit escalation is not an accepted role receipt",
|
|
207
|
-
);
|
|
208
|
-
}
|
|
209
|
-
const statusKey =
|
|
210
|
-
toolName === JUDGE_OUTPUT_TOOL_NAME
|
|
211
|
-
? "judgeStatus"
|
|
212
|
-
: toolName === COUNTERSIGN_OUTPUT_TOOL_NAME
|
|
213
|
-
? "countersignStatus"
|
|
214
|
-
: "status";
|
|
215
|
-
const discriminator = safeProperty(candidate, statusKey);
|
|
216
|
-
const lawfulStatuses: Readonly<Record<TerminatingToolName, readonly string[]>> = {
|
|
217
|
-
[CODER_OUTPUT_TOOL_NAME]: ["planned", "completed", "refused", "unfinished"],
|
|
218
|
-
[FIXER_OUTPUT_TOOL_NAME]: ["planned", "completed", "refused", "partially_completed", "unfinished"],
|
|
219
|
-
[REVIEWER_OUTPUT_TOOL_NAME]: ["completed", "refused"],
|
|
220
|
-
[JUDGE_OUTPUT_TOOL_NAME]: ["converged", "continue", "escalate"],
|
|
221
|
-
[COLLECTOR_OUTPUT_TOOL]: [],
|
|
222
|
-
[DOCTOR_OUTPUT_TOOL_NAME]: ["completed", "refused"],
|
|
223
|
-
[MERGER_OUTPUT_TOOL_NAME]: ["completed", "escalate"],
|
|
224
|
-
[NOTARY_OUTPUT_TOOL_NAME]: ["pass", "bounce", "escalate"],
|
|
225
|
-
[COUNTERSIGN_OUTPUT_TOOL_NAME]: ["converged", "continue", "escalate"],
|
|
226
|
-
[GLEANER_LEFT_OUTPUT_TOOL_NAME]: ["completed"],
|
|
227
|
-
[INSPECTOR_OUTPUT_TOOL_NAME]: ["pass", "bounce", "escalate"],
|
|
228
|
-
[GATEKEEPER_OUTPUT_TOOL_NAME]: ["dispatch", "pass"],
|
|
229
|
-
[NAVIGATOR_OUTPUT_TOOL_NAME]: ["advice"],
|
|
230
|
-
[AUDITOR_OUTPUT_TOOL_NAME]: ["pass", "bounce", "escalate"],
|
|
231
|
-
[DIARIST_OUTPUT_TOOL_NAME]: ["completed", "escalate"],
|
|
232
|
-
};
|
|
233
|
-
const collectorDiscriminator = toolName === COLLECTOR_OUTPUT_TOOL && Array.isArray(candidate?.groups);
|
|
234
|
-
const baseDiscriminator = discriminator;
|
|
235
|
-
const runtimeBindingMissing =
|
|
236
|
-
(toolName === DOCTOR_OUTPUT_TOOL_NAME && baseDiscriminator === "completed" && !(candidate?.cost !== null && typeof candidate?.cost === "object")) ||
|
|
237
|
-
(toolName === REVIEWER_OUTPUT_TOOL_NAME && candidate?.version !== 2);
|
|
238
|
-
if (
|
|
239
|
-
runtimeBindingMissing ||
|
|
240
|
-
(!collectorDiscriminator && (typeof discriminator !== "string" || !lawfulStatuses[toolName].includes(baseDiscriminator as string)))
|
|
241
|
-
) {
|
|
242
|
-
throw new AcceptedDetailsContractError("terminating receipt has no recognized execution discriminator");
|
|
243
|
-
}
|
|
244
|
-
try {
|
|
245
|
-
switch (toolName) {
|
|
246
|
-
case CODER_OUTPUT_TOOL_NAME:
|
|
247
|
-
return validateAcceptedWorkerDetails(details, "Coder");
|
|
248
|
-
case FIXER_OUTPUT_TOOL_NAME:
|
|
249
|
-
return validateAcceptedWorkerDetails(details, "Fixer");
|
|
250
|
-
case REVIEWER_OUTPUT_TOOL_NAME:
|
|
251
|
-
return validateRuntimeReviewerReceipt(details);
|
|
252
|
-
case JUDGE_OUTPUT_TOOL_NAME:
|
|
253
|
-
return validateAcceptedJudgeDetails(details);
|
|
254
|
-
case COLLECTOR_OUTPUT_TOOL:
|
|
255
|
-
return validateAcceptedCollectorReceipt(details);
|
|
256
|
-
case DOCTOR_OUTPUT_TOOL_NAME:
|
|
257
|
-
return validateRecordedDoctorOutput(details);
|
|
258
|
-
case MERGER_OUTPUT_TOOL_NAME:
|
|
259
|
-
return validateMergerOutput(details);
|
|
260
|
-
case NOTARY_OUTPUT_TOOL_NAME:
|
|
261
|
-
return validateRecordedNotaryOutput(details);
|
|
262
|
-
case COUNTERSIGN_OUTPUT_TOOL_NAME:
|
|
263
|
-
return validateRecordedCountersignOutput(details);
|
|
264
|
-
case GLEANER_LEFT_OUTPUT_TOOL_NAME:
|
|
265
|
-
return validateRecordedGleanerLeftOutput(details);
|
|
266
|
-
case INSPECTOR_OUTPUT_TOOL_NAME:
|
|
267
|
-
return validateRecordedInspectorOutput(details);
|
|
268
|
-
case GATEKEEPER_OUTPUT_TOOL_NAME:
|
|
269
|
-
return validateRecordedGatekeeperOutput(details);
|
|
270
|
-
case NAVIGATOR_OUTPUT_TOOL_NAME:
|
|
271
|
-
return validateRecordedNavigatorOutput(details);
|
|
272
|
-
case AUDITOR_OUTPUT_TOOL_NAME:
|
|
273
|
-
return validateRecordedAuditorOutput(details);
|
|
274
|
-
case DIARIST_OUTPUT_TOOL_NAME:
|
|
275
|
-
return validateRecordedDiaristOutput(details);
|
|
276
|
-
}
|
|
277
|
-
} catch (error) {
|
|
278
|
-
if (error instanceof Error && error.constructor === Error) throw new AcceptedDetailsContractError(error.message, { cause: error });
|
|
279
|
-
throw error;
|
|
185
|
+
if (details !== null && typeof details === "object" && !Array.isArray(details)) {
|
|
186
|
+
return details as AcceptedDetails;
|
|
280
187
|
}
|
|
188
|
+
// Non-object payload still records as empty object rather than rejecting.
|
|
189
|
+
return {} as AcceptedDetails;
|
|
281
190
|
}
|
|
282
191
|
|
|
192
|
+
/**
|
|
193
|
+
* #836: args↔details equality rejection deleted. Details are recorded as submitted.
|
|
194
|
+
*/
|
|
283
195
|
export function validateAcceptedLifecycle(
|
|
284
196
|
toolName: TerminatingToolName,
|
|
285
|
-
|
|
197
|
+
_argumentsValue: unknown,
|
|
286
198
|
detailsValue: unknown,
|
|
287
199
|
): AcceptedDetails {
|
|
288
|
-
|
|
289
|
-
if (toolName === DOCTOR_OUTPUT_TOOL_NAME) {
|
|
290
|
-
const testimony = validateDoctorSubmissionShape(argumentsValue);
|
|
291
|
-
if ((String(testimony.status)) === "refused") {
|
|
292
|
-
if (!deepEqual(testimony, details)) throw new Error("accepted tool lifecycle details mismatch");
|
|
293
|
-
return details;
|
|
294
|
-
}
|
|
295
|
-
const receipt = details as DoctorOutput & { cost?: unknown };
|
|
296
|
-
if ((String(receipt.status)) !== "completed") {
|
|
297
|
-
throw new Error("accepted tool lifecycle details mismatch");
|
|
298
|
-
}
|
|
299
|
-
const { cost: _runtimeCost, ...projected } = receipt;
|
|
300
|
-
if (!deepEqual(testimony, projected)) throw new Error("accepted tool lifecycle details mismatch");
|
|
301
|
-
return details;
|
|
302
|
-
}
|
|
303
|
-
if (toolName === DIARIST_OUTPUT_TOOL_NAME) {
|
|
304
|
-
// Envelope-owned mechanical sitian facts are runtime-bound on details only
|
|
305
|
-
// (same shape as the Doctor runtime cost); the submitted arguments carry the
|
|
306
|
-
// role's own entries. Machine facts never come from model self-report.
|
|
307
|
-
const { sitian: _mechanical, ...submitted } = details as DiaristOutput & { sitian?: unknown };
|
|
308
|
-
const testimony = validateAcceptedDetails(toolName, argumentsValue);
|
|
309
|
-
if (!deepEqual(testimony, submitted)) throw new Error("accepted tool lifecycle details mismatch");
|
|
310
|
-
return details;
|
|
311
|
-
}
|
|
312
|
-
const argumentsDetails = validateAcceptedDetails(toolName, argumentsValue);
|
|
313
|
-
if (!deepEqual(argumentsDetails, details)) throw new Error("accepted tool lifecycle details mismatch");
|
|
314
|
-
return details;
|
|
200
|
+
return validateAcceptedDetails(toolName, detailsValue);
|
|
315
201
|
}
|
|
316
202
|
|
|
317
203
|
/** Machine-facing facts from an accepted terminating receipt. No presentation joins. */
|
|
@@ -320,29 +206,28 @@ export type AcceptedFacts = {
|
|
|
320
206
|
commit?: string;
|
|
321
207
|
};
|
|
322
208
|
|
|
209
|
+
/** Read status/commit leaves the role wrote — never invent defaults (#836). */
|
|
323
210
|
export function acceptedFacts(toolName: TerminatingToolName, details: AcceptedDetails): AcceptedFacts {
|
|
211
|
+
const record = details as Record<string, unknown>;
|
|
324
212
|
switch (toolName) {
|
|
325
|
-
case
|
|
326
|
-
|
|
327
|
-
case
|
|
328
|
-
|
|
329
|
-
case NOTARY_OUTPUT_TOOL_NAME:
|
|
330
|
-
case GLEANER_LEFT_OUTPUT_TOOL_NAME:
|
|
331
|
-
case INSPECTOR_OUTPUT_TOOL_NAME:
|
|
332
|
-
case GATEKEEPER_OUTPUT_TOOL_NAME:
|
|
333
|
-
case NAVIGATOR_OUTPUT_TOOL_NAME:
|
|
334
|
-
case AUDITOR_OUTPUT_TOOL_NAME:
|
|
335
|
-
return { status: (details as { status: string }).status };
|
|
336
|
-
case DIARIST_OUTPUT_TOOL_NAME: return { status: (details as { status: string }).status };
|
|
337
|
-
case JUDGE_OUTPUT_TOOL_NAME: return { status: (details as { judgeStatus: string }).judgeStatus };
|
|
338
|
-
case COUNTERSIGN_OUTPUT_TOOL_NAME: return { status: (details as { countersignStatus: string }).countersignStatus };
|
|
213
|
+
case JUDGE_OUTPUT_TOOL_NAME:
|
|
214
|
+
return typeof record.judgeStatus === "string" ? { status: record.judgeStatus } : {};
|
|
215
|
+
case COUNTERSIGN_OUTPUT_TOOL_NAME:
|
|
216
|
+
return typeof record.countersignStatus === "string" ? { status: record.countersignStatus } : {};
|
|
339
217
|
case MERGER_OUTPUT_TOOL_NAME: {
|
|
340
|
-
const
|
|
341
|
-
|
|
342
|
-
|
|
218
|
+
const status = typeof record.status === "string" ? record.status : undefined;
|
|
219
|
+
return {
|
|
220
|
+
...(status === undefined ? {} : { status }),
|
|
221
|
+
...(status === "completed" && typeof record.mergeCommitId === "string"
|
|
222
|
+
? { commit: record.mergeCommitId }
|
|
223
|
+
: {}),
|
|
224
|
+
};
|
|
343
225
|
}
|
|
344
226
|
case COLLECTOR_OUTPUT_TOOL:
|
|
345
|
-
|
|
227
|
+
// Collector has no status leaf — do not invent "collected".
|
|
228
|
+
return typeof record.status === "string" ? { status: record.status } : {};
|
|
229
|
+
default:
|
|
230
|
+
return typeof record.status === "string" ? { status: record.status } : {};
|
|
346
231
|
}
|
|
347
232
|
}
|
|
348
233
|
|
package/src/pi/adapter.ts
CHANGED
|
@@ -21,7 +21,7 @@ import type {
|
|
|
21
21
|
import { createOAuthKeepalive, type OAuthKeepaliveOptions } from "../oauth-keepalive.ts";
|
|
22
22
|
import { createRoleRuntimeExtension, type RoleRuntimeDependencies } from "../role-runtime.ts";
|
|
23
23
|
import { renderAgentStartMaterials } from "../agent-start-materials.ts";
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
|
|
26
26
|
export type PiRoleHostAdapter = RoleEnvelopeHost;
|
|
27
27
|
|
|
@@ -137,13 +137,8 @@ export function createPiRoleHostAdapter(
|
|
|
137
137
|
): PiRoleHostAdapter {
|
|
138
138
|
const keepalive = createOAuthKeepalive(options.oauthKeepalive);
|
|
139
139
|
const host: RoleHost = {
|
|
140
|
-
deliverSubmissionRejection(
|
|
141
|
-
|
|
142
|
-
customType: "ak-role-submission-rejection",
|
|
143
|
-
content: mechanicalSubmissionRejectionResumeMessage(rejection.code),
|
|
144
|
-
display: true,
|
|
145
|
-
details: rejection,
|
|
146
|
-
}, { triggerTurn: true, deliverAs: "followUp" });
|
|
140
|
+
deliverSubmissionRejection(_rejection) {
|
|
141
|
+
// #836 删 1/A4.5: no package-authored non-sole resume sentence.
|
|
147
142
|
},
|
|
148
143
|
capabilities: {
|
|
149
144
|
skillExpansion(prompt) {
|
|
@@ -36,7 +36,6 @@ import {
|
|
|
36
36
|
presentFailureTerminal,
|
|
37
37
|
presentStructuralRejection,
|
|
38
38
|
resolveControlledFailureResumeObservation,
|
|
39
|
-
type SealedAcceptanceRedispatchDisposition,
|
|
40
39
|
} from "./settlement.ts";
|
|
41
40
|
import type { CliIo } from "./cli-io.ts";
|
|
42
41
|
|
|
@@ -273,34 +272,20 @@ function jsonSafeReplacer(): (key: string, value: unknown) => unknown {
|
|
|
273
272
|
* open (O_EXCL) with a per-attempt unique name enforces 史必追加 (#419): a later
|
|
274
273
|
* attempt can never overwrite an earlier attempt's file.
|
|
275
274
|
*/
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
const
|
|
290
|
-
{
|
|
291
|
-
version: 1,
|
|
292
|
-
attempt,
|
|
293
|
-
recordedAt: new Date().toISOString(),
|
|
294
|
-
error: serializeThrownValue(error),
|
|
295
|
-
},
|
|
296
|
-
jsonSafeReplacer(),
|
|
297
|
-
2,
|
|
298
|
-
)}\n`;
|
|
299
|
-
// O_EXCL: exclusive create — the retention history is append-only by
|
|
300
|
-
// construction; a colliding name fails loudly instead of overwriting.
|
|
301
|
-
// O_NOFOLLOW when the platform provides it keeps a planted symlink from
|
|
302
|
-
// being followed; on platforms without it, exclusivity still holds.
|
|
303
|
-
// AK artifact owner stays here; only the session JSONL pointer uses Pi codec.
|
|
275
|
+
/**
|
|
276
|
+
* Hardened create-once JSON write shared by every durable artifact this loop
|
|
277
|
+
* retains directly (dispatch-error dumps, lawful-persist-failure error/
|
|
278
|
+
* evidence records): O_EXCL (fail loud on a colliding name, never overwrite)
|
|
279
|
+
* + O_NOFOLLOW where the platform provides it (a planted symlink is never
|
|
280
|
+
* followed) — mirrors settlement.ts's own hardened artifact writers.
|
|
281
|
+
*/
|
|
282
|
+
async function writeHardenedArtifactFile(
|
|
283
|
+
artifactsDir: string,
|
|
284
|
+
namePrefix: string,
|
|
285
|
+
payload: Record<string, unknown>,
|
|
286
|
+
): Promise<string> {
|
|
287
|
+
const filePath = join(artifactsDir, `${namePrefix}-${randomUUID()}.json`);
|
|
288
|
+
const body = `${JSON.stringify(payload, jsonSafeReplacer(), 2)}\n`;
|
|
304
289
|
const noFollowFlag =
|
|
305
290
|
typeof fsConstants.O_NOFOLLOW === "number" ? fsConstants.O_NOFOLLOW : 0;
|
|
306
291
|
const handle = await open(
|
|
@@ -309,10 +294,28 @@ async function retainDispatchError(
|
|
|
309
294
|
0o600,
|
|
310
295
|
);
|
|
311
296
|
try {
|
|
312
|
-
await handle.writeFile(
|
|
297
|
+
await handle.writeFile(body, "utf8");
|
|
313
298
|
} finally {
|
|
314
299
|
await handle.close();
|
|
315
300
|
}
|
|
301
|
+
return filePath;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
async function retainDispatchError(
|
|
305
|
+
admitted: { runDirectory: string; principal: DurablePrincipal },
|
|
306
|
+
principalAuthority: DurablePrincipalAuthority,
|
|
307
|
+
sessionAppender: SessionCustomEntryAppender,
|
|
308
|
+
attempt: number,
|
|
309
|
+
error: unknown,
|
|
310
|
+
): Promise<{ file: string; pointerError?: unknown }> {
|
|
311
|
+
const artifactsDir = await ensureRealArtifactsDirectory(admitted.runDirectory);
|
|
312
|
+
// Whole-object dump: everything the thrown value carries, nothing picked.
|
|
313
|
+
const filePath = await writeHardenedArtifactFile(artifactsDir, `dispatch-error-attempt-${attempt}`, {
|
|
314
|
+
version: 1,
|
|
315
|
+
attempt,
|
|
316
|
+
recordedAt: new Date().toISOString(),
|
|
317
|
+
error: serializeThrownValue(error),
|
|
318
|
+
});
|
|
316
319
|
// Addressable pointer in the dossier (卷宗): Pi session custom-entry codec
|
|
317
320
|
// (appendPiSessionCustomEntry). Lease still owned here with run-writer.
|
|
318
321
|
let pointerLease: RunWriterLease;
|
|
@@ -448,13 +451,6 @@ export async function runWithAutoResumeLoop<
|
|
|
448
451
|
buildInitialPayload: () => TPayload;
|
|
449
452
|
buildResumePayload: () => TPayload;
|
|
450
453
|
dispatch: (payload: TPayload, lease: RunWriterLease, isFirst: boolean, attemptIo: CliIo) => Promise<T>;
|
|
451
|
-
/**
|
|
452
|
-
* After a non-lawful terminal or dispatch throw, consult settlement-owned
|
|
453
|
-
* sealed-acceptance redispatch disposition (#672 / ADR 0080). Publication
|
|
454
|
-
* miss must not redispatch and destroy the sealed read (#648 / #599).
|
|
455
|
-
* Loop presents entry-specific terminals; it must not rebuild the gate.
|
|
456
|
-
*/
|
|
457
|
-
sealedAcceptanceDisposition?: () => Promise<SealedAcceptanceRedispatchDisposition>;
|
|
458
454
|
}): Promise<T> {
|
|
459
455
|
// #422 single-point resolution + domain validation. NaN would bypass every
|
|
460
456
|
// `attempts >= limit` comparison (always false) — reject here, before any dispatch.
|
|
@@ -530,7 +526,14 @@ export async function runWithAutoResumeLoop<
|
|
|
530
526
|
}
|
|
531
527
|
dispatchOrdinal += 1;
|
|
532
528
|
|
|
533
|
-
|
|
529
|
+
// #836 r12 class 3: run-state persist for a dispatch that deferred it
|
|
530
|
+
// (needsPersist) is settled by the dispatch closure itself, before this
|
|
531
|
+
// loop ever sees the result — through the single existing
|
|
532
|
+
// presentControlledFailure / settleFailureTerminalResult authority (ADR
|
|
533
|
+
// 0080), never a second hand-rolled classify/artifact/Terminal here. This
|
|
534
|
+
// loop only ever sees the already-resolved outcome: a lawful/failure
|
|
535
|
+
// Terminal (with skipAutoResume set when persist failed after an
|
|
536
|
+
// already-settled result) or the original non-lawful result unchanged.
|
|
534
537
|
if (result !== undefined) {
|
|
535
538
|
everyAttemptThrew = false;
|
|
536
539
|
const terminal = (result as { terminal?: TerminalResult }).terminal;
|
|
@@ -539,23 +542,6 @@ export async function runWithAutoResumeLoop<
|
|
|
539
542
|
}
|
|
540
543
|
|
|
541
544
|
const lawful = terminal !== undefined && isLawfulTypedTerminalOutcome(terminal.roleOutcome);
|
|
542
|
-
if (result.needsPersist === true) {
|
|
543
|
-
// Persist on the loop seam, not inside retried dispatch.
|
|
544
|
-
try {
|
|
545
|
-
await persistReturnedRunState(
|
|
546
|
-
options.admitted,
|
|
547
|
-
{ isAvailable: isPrincipalAvailable },
|
|
548
|
-
lawful ? { lawful: true } : undefined,
|
|
549
|
-
);
|
|
550
|
-
} catch (persistError) {
|
|
551
|
-
// Lawful persist stays loud (no fake terminal). Non-lawful persist is
|
|
552
|
-
// not a host-turn failure — do not auto-resume it — but sealed stop
|
|
553
|
-
// must still see the already-settled result (#648).
|
|
554
|
-
if (lawful) throw persistError;
|
|
555
|
-
persistFailure = { error: persistError };
|
|
556
|
-
lastThrownError = persistError;
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
545
|
if (lawful) {
|
|
560
546
|
if (terminal !== undefined) {
|
|
561
547
|
// Present lawful terminal once to real io (dummy was used inside dispatch)
|
|
@@ -569,45 +555,6 @@ export async function runWithAutoResumeLoop<
|
|
|
569
555
|
}
|
|
570
556
|
}
|
|
571
557
|
|
|
572
|
-
// Settlement-owned sealed disposition before any redispatch (#648 / #672):
|
|
573
|
-
// shared for non-lawful return and direct throw. Only entry presentation
|
|
574
|
-
// differs (present returned terminal vs throw-path synthetic).
|
|
575
|
-
if (options.sealedAcceptanceDisposition !== undefined) {
|
|
576
|
-
const disposition = await options.sealedAcceptanceDisposition();
|
|
577
|
-
if (disposition.kind === "block") {
|
|
578
|
-
if (disposition.reason === "sealed-accepted" && result !== undefined) {
|
|
579
|
-
const terminal = (result as { terminal?: TerminalResult }).terminal;
|
|
580
|
-
if (terminal !== undefined) presentTerminal(terminal, options.io);
|
|
581
|
-
return result;
|
|
582
|
-
}
|
|
583
|
-
const terminal = dispatchExceptionFailureTerminal({
|
|
584
|
-
role: options.admitted.role,
|
|
585
|
-
runId: options.admitted.runId,
|
|
586
|
-
causeError:
|
|
587
|
-
disposition.reason === "authority-failed"
|
|
588
|
-
? disposition.cause
|
|
589
|
-
: lastThrownError,
|
|
590
|
-
errorFiles: retainedErrorFiles,
|
|
591
|
-
autoResumeAttempts,
|
|
592
|
-
endReason:
|
|
593
|
-
disposition.reason === "authority-failed"
|
|
594
|
-
? "sealed-acceptance authority failed closed"
|
|
595
|
-
: "sealed accepted projection already present",
|
|
596
|
-
everyAttemptThrew,
|
|
597
|
-
});
|
|
598
|
-
await finalizeExceptionRunBestEffort(options.admitted.runDirectory, options.io);
|
|
599
|
-
presentTerminal(terminal, options.io);
|
|
600
|
-
return {
|
|
601
|
-
exitCode: 1,
|
|
602
|
-
terminal,
|
|
603
|
-
} as T;
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
if (persistFailure !== undefined) {
|
|
608
|
-
throw persistFailure.error;
|
|
609
|
-
}
|
|
610
|
-
|
|
611
558
|
if (result !== undefined) {
|
|
612
559
|
const terminal = (result as { terminal?: TerminalResult }).terminal;
|
|
613
560
|
if (autoResumeAttempts >= limit) {
|
|
@@ -7,24 +7,14 @@
|
|
|
7
7
|
*
|
|
8
8
|
* 递送挂载点唯一:`post-admission` 在 beforeDispatch 之后为每个公共入口追加本段。
|
|
9
9
|
*/
|
|
10
|
-
import { stat } from "node:fs/promises";
|
|
11
|
-
|
|
12
10
|
import { resolveTicketProvenanceVolume } from "../ticket-provenance.ts";
|
|
13
11
|
|
|
14
12
|
/** Section heading of the system-delivered dossier pointer (presentation only). */
|
|
15
13
|
const CASE_DOSSIER_SECTION_HEADING = "## 本票起居录(系统随案提供)" as const;
|
|
16
14
|
|
|
17
|
-
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const stats = await stat(path);
|
|
21
|
-
if (!stats.isFile()) return `不可读(非普通文件):${path}`;
|
|
22
|
-
return path;
|
|
23
|
-
} catch (error) {
|
|
24
|
-
const code = (error as NodeJS.ErrnoException).code;
|
|
25
|
-
if (code === "ENOENT") return `尚未生成:${path}`;
|
|
26
|
-
return `不可读(${code ?? "未知错误"}):${path}`;
|
|
27
|
-
}
|
|
15
|
+
/** Pointer only — presence/absence is for the role to observe at the path. */
|
|
16
|
+
function describeDossierFile(path: string): string {
|
|
17
|
+
return path;
|
|
28
18
|
}
|
|
29
19
|
|
|
30
20
|
/**
|
|
@@ -48,7 +38,7 @@ export async function projectCaseDossierPointerSection(input: {
|
|
|
48
38
|
CASE_DOSSIER_SECTION_HEADING,
|
|
49
39
|
"",
|
|
50
40
|
`票号:#${input.ticketNumber}`,
|
|
51
|
-
`人读视图:${
|
|
52
|
-
`记录卷宗:${
|
|
41
|
+
`人读视图:${describeDossierFile(volume.humanViewFile)}`,
|
|
42
|
+
`记录卷宗:${describeDossierFile(volume.recordFile)}`,
|
|
53
43
|
].join("\n");
|
|
54
44
|
}
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
trySettleCountersignTerminalResult,
|
|
55
55
|
} from "./settlement.ts";
|
|
56
56
|
import type { CliIo } from "./cli-io.ts";
|
|
57
|
-
import type
|
|
57
|
+
import { lastRolePayloadRecord, type TerminalResult } from "./terminal.ts";
|
|
58
58
|
import {
|
|
59
59
|
projectRoleTurnRequest,
|
|
60
60
|
type RoleTurnRequestProjectionOptions,
|
|
@@ -145,12 +145,20 @@ async function invokeCourtDiarist(input: {
|
|
|
145
145
|
});
|
|
146
146
|
|
|
147
147
|
const roleOutcome = result.terminal?.roleOutcome;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
if (roleOutcome !== undefined && (roleOutcome.kind === "accepted" || roleOutcome.kind === "audit_escalation")) {
|
|
149
|
+
const facts = lastRolePayloadRecord(roleOutcome.payloads ?? []);
|
|
150
|
+
const status =
|
|
151
|
+
typeof facts?.status === "string"
|
|
152
|
+
? facts.status
|
|
153
|
+
: typeof facts?.countersignStatus === "string"
|
|
154
|
+
? facts.countersignStatus
|
|
155
|
+
: roleOutcome.kind === "audit_escalation"
|
|
156
|
+
? "escalate"
|
|
157
|
+
: undefined;
|
|
158
|
+
if (status === "escalate") {
|
|
151
159
|
const reason =
|
|
152
|
-
typeof
|
|
153
|
-
?
|
|
160
|
+
typeof facts?.reason === "string"
|
|
161
|
+
? facts.reason
|
|
154
162
|
: "diarist escalated without reason";
|
|
155
163
|
return { identity: { kind: "escalate", reason } };
|
|
156
164
|
}
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
trySettleDiaristTerminalResult,
|
|
36
36
|
} from "./settlement.ts";
|
|
37
37
|
import type { CliIo } from "./cli-io.ts";
|
|
38
|
-
import type
|
|
38
|
+
import { lastRolePayloadRecord, type TerminalResult } from "./terminal.ts";
|
|
39
39
|
import {
|
|
40
40
|
projectRoleTurnRequest,
|
|
41
41
|
type RoleTurnRequestProjectionOptions,
|
|
@@ -196,20 +196,22 @@ export async function runPublicDiarist(
|
|
|
196
196
|
// leak an unverified ticketNumber into the caller-visible typed key.
|
|
197
197
|
if (admitted.ticketNumber === undefined && result.admitted !== undefined) {
|
|
198
198
|
const roleOutcome = result.terminal?.roleOutcome;
|
|
199
|
+
const facts =
|
|
200
|
+
roleOutcome?.kind === "accepted"
|
|
201
|
+
? lastRolePayloadRecord(roleOutcome.payloads ?? [])
|
|
202
|
+
: undefined;
|
|
199
203
|
if (
|
|
200
204
|
roleOutcome !== undefined &&
|
|
201
205
|
roleOutcome.kind === "accepted" &&
|
|
202
|
-
|
|
206
|
+
facts?.status !== "escalate"
|
|
203
207
|
) {
|
|
204
|
-
const facts = roleOutcome.decisiveFacts as {
|
|
205
|
-
ticketNumber?: unknown;
|
|
206
|
-
sitian?: { ticketNumber?: unknown };
|
|
207
|
-
};
|
|
208
208
|
const raw =
|
|
209
|
-
typeof facts
|
|
209
|
+
typeof facts?.ticketNumber === "number"
|
|
210
210
|
? facts.ticketNumber
|
|
211
|
-
: typeof facts
|
|
212
|
-
|
|
211
|
+
: typeof facts?.sitian === "object"
|
|
212
|
+
&& facts.sitian !== null
|
|
213
|
+
&& typeof (facts.sitian as { ticketNumber?: unknown }).ticketNumber === "number"
|
|
214
|
+
? (facts.sitian as { ticketNumber: number }).ticketNumber
|
|
213
215
|
: undefined;
|
|
214
216
|
if (typeof raw === "number" && Number.isSafeInteger(raw) && raw >= 1) {
|
|
215
217
|
(admitted as { ticketNumber?: number }).ticketNumber = raw;
|
|
@@ -50,11 +50,6 @@ export type InspectorRunEnv = PostAdmissionEnv & {
|
|
|
50
50
|
* Never a public CLI argv — must not pollute the 卷宗指针 parentRunPath key (#747).
|
|
51
51
|
*/
|
|
52
52
|
reviewReask?: string;
|
|
53
|
-
/**
|
|
54
|
-
* #786 same-parent re-summons: verbatim parent-submission body.
|
|
55
|
-
* Rides summons.instruction when reviewReask is absent. Fresh mint keeps argv 卷宗指针.
|
|
56
|
-
*/
|
|
57
|
-
gateReviewInstruction?: string;
|
|
58
53
|
};
|
|
59
54
|
|
|
60
55
|
/** Project admitted invocation onto the host-neutral turn request. */
|
|
@@ -102,8 +97,9 @@ export async function runPublicInspector(
|
|
|
102
97
|
// #753/#786: gate re-ask / verbatim submission body ride summons.instruction on resume.
|
|
103
98
|
const parentRunPath = parentRunPathFromGatePointerInstruction(parsed.instruction);
|
|
104
99
|
if (parentRunPath !== undefined) {
|
|
105
|
-
const resumeInstruction = env.reviewReask
|
|
100
|
+
const resumeInstruction = env.reviewReask;
|
|
106
101
|
const summons: SameTicketSummonsMaterials = {
|
|
102
|
+
sourceRunPath: parentRunPath,
|
|
107
103
|
...(resumeInstruction === undefined
|
|
108
104
|
? {
|
|
109
105
|
instruction: parsed.instruction,
|
|
@@ -127,18 +123,6 @@ export async function runPublicInspector(
|
|
|
127
123
|
),
|
|
128
124
|
});
|
|
129
125
|
if (resumed !== undefined) return resumed;
|
|
130
|
-
// Reask without a prior same-parent run cannot deliver the plain-language ask
|
|
131
|
-
// on a fresh mint without inventing a second prompt path — fail loud (#753).
|
|
132
|
-
// gateReviewInstruction (verbatim body) alone is resume-only; fresh mint keeps argv 卷宗指针.
|
|
133
|
-
if (env.reviewReask !== undefined) {
|
|
134
|
-
presentStructuralRejection(
|
|
135
|
-
new CliUsageError(
|
|
136
|
-
"inspector review reask requires a prior same-parent run to resume",
|
|
137
|
-
),
|
|
138
|
-
io,
|
|
139
|
-
);
|
|
140
|
-
return { exitCode: 2 };
|
|
141
|
-
}
|
|
142
126
|
}
|
|
143
127
|
|
|
144
128
|
let admitted: AdmittedInspectorInvocation;
|
|
@@ -69,11 +69,6 @@ export type InstructionSeatRunEnv = PostAdmissionEnv & {
|
|
|
69
69
|
* Never a public CLI argv — must not pollute the --source-run parent lookup key (#747).
|
|
70
70
|
*/
|
|
71
71
|
reviewReask?: string;
|
|
72
|
-
/**
|
|
73
|
-
* #786 same-parent re-summons: verbatim parent-submission body.
|
|
74
|
-
* Rides summons.instruction when reviewReask is absent. Fresh mint keeps argv instruction.
|
|
75
|
-
*/
|
|
76
|
-
gateReviewInstruction?: string;
|
|
77
72
|
};
|
|
78
73
|
|
|
79
74
|
/** Project an admitted instruction-seat invocation onto the host-neutral turn request. */
|
|
@@ -295,7 +290,7 @@ export async function runPublicInstructionSeat(
|
|
|
295
290
|
}
|
|
296
291
|
|
|
297
292
|
// #756/#786: auditor reask / verbatim submission body ride summons.instruction on resume.
|
|
298
|
-
const resumeInstruction = env.reviewReask
|
|
293
|
+
const resumeInstruction = env.reviewReask;
|
|
299
294
|
const summons: SameTicketSummonsMaterials = {
|
|
300
295
|
...(resumeInstruction === undefined
|
|
301
296
|
? {
|
|
@@ -326,17 +321,8 @@ export async function runPublicInstructionSeat(
|
|
|
326
321
|
}),
|
|
327
322
|
});
|
|
328
323
|
if (resumed !== undefined) return resumed;
|
|
329
|
-
//
|
|
330
|
-
//
|
|
331
|
-
if (env.reviewReask !== undefined) {
|
|
332
|
-
presentStructuralRejection(
|
|
333
|
-
new CliUsageError(
|
|
334
|
-
"auditor review reask requires a prior same-parent run to resume",
|
|
335
|
-
),
|
|
336
|
-
io,
|
|
337
|
-
);
|
|
338
|
-
return { exitCode: 2 };
|
|
339
|
-
}
|
|
324
|
+
// #836: reask without a prior same-parent run still mints; summons.instruction
|
|
325
|
+
// already carries the reask text. Do not structurally terminate the queue.
|
|
340
326
|
}
|
|
341
327
|
|
|
342
328
|
let admitted: AdmittedInstructionSeatInvocation;
|