@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
|
@@ -156,55 +156,17 @@ export type SameTicketSummonsMaterials = {
|
|
|
156
156
|
readonly sourceRun?: NotarySourceRunLocator;
|
|
157
157
|
};
|
|
158
158
|
|
|
159
|
-
function resumeRereadInstruction(materialPath: string, handbook: boolean): string {
|
|
160
|
-
return handbook
|
|
161
|
-
? `重新读 ${materialPath},再组装外包 argv`
|
|
162
|
-
: `重新读 ${materialPath}`;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Engine-axis resume-only material lines (#736 / ADR 0069·0071).
|
|
167
|
-
* #755 withdrew this rewrite from 审核循环续话; review same-ticket resume stays
|
|
168
|
-
* plain dialogue via resumeTurnRequestProjectionOptions. Outsourcing resume
|
|
169
|
-
* still rewrites neutral handbook/path pointers into 重新读 instructions.
|
|
170
|
-
* First-round delivery is unchanged; never pastes material body.
|
|
171
|
-
*/
|
|
172
|
-
export function instructResumeHandbookRead(
|
|
173
|
-
prompt: string,
|
|
174
|
-
engineMaterial?: EngineSessionMaterial,
|
|
175
|
-
): string {
|
|
176
|
-
const handbookPath = engineMaterial?.materialPath;
|
|
177
|
-
return prompt
|
|
178
|
-
.split("\n")
|
|
179
|
-
.map((line) => {
|
|
180
|
-
if (!line.startsWith("- ")) return line;
|
|
181
|
-
const value = line.slice(2);
|
|
182
|
-
if (handbookPath !== undefined && value === handbookPath) {
|
|
183
|
-
return resumeRereadInstruction(handbookPath, true);
|
|
184
|
-
}
|
|
185
|
-
if (isAbsolute(value)) return resumeRereadInstruction(value, false);
|
|
186
|
-
return line;
|
|
187
|
-
})
|
|
188
|
-
.join("\n");
|
|
189
|
-
}
|
|
190
|
-
|
|
191
159
|
/**
|
|
192
160
|
* Unique continuation-prompt selector for manual/auto engine-axis resume
|
|
193
|
-
* (#471 / #600 / #736).
|
|
194
|
-
*
|
|
195
|
-
* When engine material is present, append structured engine coordinates then
|
|
196
|
-
* rewrite absolute material pointer lines into 重新读 instructions. Zero parse,
|
|
197
|
-
* zero classify, zero narrow. Pointer only — never material body.
|
|
161
|
+
* (#471 / #600 / #736). Message present → those bytes; absent → engine pointers only.
|
|
162
|
+
* #836: no transport-token prompt, no line-by-line 重新读 rewrite.
|
|
198
163
|
*/
|
|
199
164
|
export function selectResumeContinuationPrompt(
|
|
200
165
|
message?: string,
|
|
201
166
|
engineMaterial?: EngineSessionMaterial,
|
|
202
167
|
): string {
|
|
203
|
-
const
|
|
204
|
-
return
|
|
205
|
-
appendEngineSessionMaterial([base], engineMaterial).join("\n"),
|
|
206
|
-
engineMaterial,
|
|
207
|
-
);
|
|
168
|
+
const lines = message !== undefined ? [message] : [];
|
|
169
|
+
return appendEngineSessionMaterial(lines, engineMaterial).join("\n");
|
|
208
170
|
}
|
|
209
171
|
|
|
210
172
|
/**
|
|
@@ -365,8 +327,15 @@ async function readRoleRunStateDisk(
|
|
|
365
327
|
let raw: unknown;
|
|
366
328
|
try {
|
|
367
329
|
raw = JSON.parse(await readFile(join(runDirectory, RUN_STATE_FILE), "utf8"));
|
|
368
|
-
} catch {
|
|
369
|
-
|
|
330
|
+
} catch (error) {
|
|
331
|
+
// Only true absence (ENOENT) is a lawful "no run state yet". A real read
|
|
332
|
+
// failure (EISDIR, EACCES, ...) or a JSON.parse SyntaxError on a present
|
|
333
|
+
// file is genuine infrastructure/data damage and must keep its own
|
|
334
|
+
// identity — callers route it through the controlled-failure seam
|
|
335
|
+
// (markRunRunning/markRunResumable/markRunTerminal/recordCurrentCourt)
|
|
336
|
+
// instead of it being relabeled "run state missing" (#836).
|
|
337
|
+
if (errorCodeOf(error) === "ENOENT") return undefined;
|
|
338
|
+
throw error;
|
|
370
339
|
}
|
|
371
340
|
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) {
|
|
372
341
|
return undefined;
|