@akagilnc/pi-workflow-roles 0.1.4956 → 0.1.4980
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/README.md +1 -1
- package/README.zh-CN.md +4 -4
- package/dist/acp-host/production-host.js +157 -266
- package/dist/audit-escalation.js +19 -3
- package/dist/compliance-transport.js +6 -11
- package/dist/doctor-contracts.js +0 -2
- package/dist/gatekeeper-role.js +5 -3
- package/dist/headless-host/production-host.js +157 -266
- package/dist/migrate-book-topology.js +1 -16
- package/dist/packaged-role-registry.js +0 -24
- package/dist/public-cli/main.js +16 -28
- package/dist/public-cli/settlement.js +8 -1
- package/dist/public-cli/terminal.js +2 -2
- package/dist/secretariat-contracts.js +1 -3
- package/dist/submission-ledger.js +11 -0
- package/package.json +1 -1
- package/src/audit-escalation.ts +26 -5
- package/src/collector-role.ts +1 -5
- package/src/compliance-transport.ts +10 -12
- package/src/doctor-auditor.ts +2 -0
- package/src/doctor-contracts.ts +0 -1
- package/src/doctor-role.ts +4 -4
- package/src/gatekeeper-pass-envelope.ts +7 -10
- package/src/gatekeeper-role.ts +5 -3
- package/src/judge-role.ts +45 -31
- package/src/merger-role.ts +1 -2
- package/src/notary-role.ts +1 -2
- package/src/packaged-role-registry.ts +0 -25
- package/src/public-cli/settlement.ts +10 -1
- package/src/public-cli/terminal.ts +2 -2
- package/src/reviewer-role.ts +1 -2
- package/src/role-runtime.ts +59 -156
- package/src/secretariat-contracts.ts +0 -2
- package/src/secretariat-role.ts +3 -162
- package/src/submission-ledger.ts +18 -0
- package/src/worker-role.ts +42 -24
|
@@ -14013,7 +14013,6 @@ var init_packaged_role_registry = __esm({
|
|
|
14013
14013
|
auditTool: JUDGE_AUDIT_TOOL_NAME,
|
|
14014
14014
|
settlement: "sealed",
|
|
14015
14015
|
runnerFailure: "engine-detour-known-first",
|
|
14016
|
-
acceptedText: "\u5927\u7406\u5BFA\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
14017
14016
|
/** Factory board: court until another station has started, then marshal. */
|
|
14018
14017
|
boardPlacement: "judge-history",
|
|
14019
14018
|
/** Navigator subject is the public admitted instruction when the run is bound. */
|
|
@@ -14052,7 +14051,6 @@ var init_packaged_role_registry = __esm({
|
|
|
14052
14051
|
],
|
|
14053
14052
|
method: "observed"
|
|
14054
14053
|
},
|
|
14055
|
-
acceptedText: "\u4FEE\u5185\u53F8\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
14056
14054
|
boardPlacement: "marshal",
|
|
14057
14055
|
activationFlags: [
|
|
14058
14056
|
{ field: "packetPath", flag: "ak-fix-packet", binds: "input" },
|
|
@@ -14091,7 +14089,6 @@ var init_packaged_role_registry = __esm({
|
|
|
14091
14089
|
],
|
|
14092
14090
|
method: "optional"
|
|
14093
14091
|
},
|
|
14094
|
-
acceptedText: "\u5C06\u4F5C\u76D1\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
14095
14092
|
activationFlags: [
|
|
14096
14093
|
{ field: "taskPath", flag: "ak-coder-task", binds: "input" },
|
|
14097
14094
|
{ field: "phase", flag: "ak-coder-phase", binds: "phase" }
|
|
@@ -14137,7 +14134,6 @@ var init_packaged_role_registry = __esm({
|
|
|
14137
14134
|
/** Frozen base/lens/authority become the initial prompt; instruction follows. */
|
|
14138
14135
|
transportPrompt: "skill-args",
|
|
14139
14136
|
runnerFailure: "engine-detour-record-first",
|
|
14140
|
-
acceptedText: "\u5FA1\u53F2\u53F0\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
14141
14137
|
boardPlacement: "marshal",
|
|
14142
14138
|
activationFlags: [
|
|
14143
14139
|
{ field: "baseRevision", flag: "ak-review-base" },
|
|
@@ -14179,7 +14175,6 @@ var init_packaged_role_registry = __esm({
|
|
|
14179
14175
|
{ key: "manifestDigest" }
|
|
14180
14176
|
]
|
|
14181
14177
|
},
|
|
14182
|
-
acceptedText: "\u901A\u8FDB\u53F8\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
14183
14178
|
boardPlacement: "collector",
|
|
14184
14179
|
/** Taishi acceptance is a typed groups array, not a status leaf. */
|
|
14185
14180
|
analystTerminal: "groups",
|
|
@@ -14213,7 +14208,6 @@ var init_packaged_role_registry = __esm({
|
|
|
14213
14208
|
],
|
|
14214
14209
|
doctorReportFacts: true
|
|
14215
14210
|
},
|
|
14216
|
-
acceptedText: "\u592A\u533B\u7F72\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
14217
14211
|
/** Navigator subject is the doctor case, not the case-path file bytes. */
|
|
14218
14212
|
navigatorSubject: "case",
|
|
14219
14213
|
activationFlags: [
|
|
@@ -14249,7 +14243,6 @@ var init_packaged_role_registry = __esm({
|
|
|
14249
14243
|
],
|
|
14250
14244
|
method: "observed"
|
|
14251
14245
|
},
|
|
14252
|
-
acceptedText: "\u5408\u5E76\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
14253
14246
|
activationFlags: [
|
|
14254
14247
|
{ field: "inputPath", from: "mergerInputPath", flag: "ak-merger-input", binds: "input" }
|
|
14255
14248
|
],
|
|
@@ -14282,7 +14275,6 @@ var init_packaged_role_registry = __esm({
|
|
|
14282
14275
|
/** Court reask replaces the initial prompt. Otherwise the fixed kickoff. */
|
|
14283
14276
|
reaskPrompt: true,
|
|
14284
14277
|
transportPrompt: "fixed-kickoff",
|
|
14285
|
-
acceptedText: "\u7B26\u5B9D\u90CE\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
14286
14278
|
gateStageLabel: "\u7B26\u5B9D\u90CE",
|
|
14287
14279
|
/** Gate summon binds --source-run and keeps dialogue off the argv. */
|
|
14288
14280
|
gateSummon: "source-run",
|
|
@@ -14307,7 +14299,6 @@ var init_packaged_role_registry = __esm({
|
|
|
14307
14299
|
phases: [null],
|
|
14308
14300
|
outputTool: COUNTERSIGN_OUTPUT_TOOL_NAME,
|
|
14309
14301
|
settlement: "accepted",
|
|
14310
|
-
acceptedText: "\u7ED9\u4E8B\u4E2D\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
14311
14302
|
gateStageLabel: "\u7ED9\u4E8B\u4E2D",
|
|
14312
14303
|
/** Gate queue reads countersignStatus, not the shared three-state status. */
|
|
14313
14304
|
gateDecision: "countersign-status",
|
|
@@ -14333,7 +14324,6 @@ var init_packaged_role_registry = __esm({
|
|
|
14333
14324
|
settlement: "accepted",
|
|
14334
14325
|
/** Project the durable 给事中 officer entry onto the shared accepted-tool settlement. */
|
|
14335
14326
|
projectCountersignTerminal: true,
|
|
14336
|
-
acceptedText: "\u4E2D\u4E66\u7701\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
14337
14327
|
activationFlags: [
|
|
14338
14328
|
{ field: "ticketNumber" }
|
|
14339
14329
|
],
|
|
@@ -14363,7 +14353,6 @@ var init_packaged_role_registry = __esm({
|
|
|
14363
14353
|
settlement: "accepted",
|
|
14364
14354
|
/** Bound comparison base is the initial prompt; instruction follows. */
|
|
14365
14355
|
transportPrompt: "baseline",
|
|
14366
|
-
acceptedText: "\u5DE6\u62FE\u9057\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
14367
14356
|
activationFlags: [
|
|
14368
14357
|
{ field: "baseRevision", flag: "ak-gleaner-left-base" }
|
|
14369
14358
|
],
|
|
@@ -14394,7 +14383,6 @@ var init_packaged_role_registry = __esm({
|
|
|
14394
14383
|
settlement: "accepted",
|
|
14395
14384
|
/** Court reask replaces the initial prompt. */
|
|
14396
14385
|
reaskPrompt: true,
|
|
14397
|
-
acceptedText: "\u53F0\u9662\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
14398
14386
|
gateStageLabel: "\u53F0\u9662",
|
|
14399
14387
|
activationFlags: [
|
|
14400
14388
|
{
|
|
@@ -14426,7 +14414,6 @@ var init_packaged_role_registry = __esm({
|
|
|
14426
14414
|
outputTool: GATEKEEPER_OUTPUT_TOOL_NAME,
|
|
14427
14415
|
settlement: "accepted",
|
|
14428
14416
|
runnerFailure: "engine-detour-record-first",
|
|
14429
|
-
acceptedText: "\u95E8\u4E0B\u7701\u51B3\u8BAE\u5DF2\u53D7\u7406",
|
|
14430
14417
|
activationStage: "load-and-install",
|
|
14431
14418
|
// Province materials; officers reuse their own public records below.
|
|
14432
14419
|
sessionMaterials: ["CLAUDE.md", "souls/gatekeeper.md", "souls/quality-law.md", "souls/gate-output-guide.md"]
|
|
@@ -14442,7 +14429,6 @@ var init_packaged_role_registry = __esm({
|
|
|
14442
14429
|
outputTool: NAVIGATOR_OUTPUT_TOOL_NAME,
|
|
14443
14430
|
settlement: "accepted",
|
|
14444
14431
|
runnerFailure: "engine-detour-record-first",
|
|
14445
|
-
acceptedText: "\u6E38\u5955\u4F7F\u5EFA\u8BAE\u5DF2\u53D7\u7406",
|
|
14446
14432
|
activationStage: "load-and-install",
|
|
14447
14433
|
sessionMaterials: ["CLAUDE.md", "souls/navigator.md"]
|
|
14448
14434
|
},
|
|
@@ -14466,7 +14452,6 @@ var init_packaged_role_registry = __esm({
|
|
|
14466
14452
|
/** Court reask replaces the initial prompt. */
|
|
14467
14453
|
reaskPrompt: true,
|
|
14468
14454
|
runnerFailure: "engine-detour-record-first",
|
|
14469
|
-
acceptedText: "\u5BA1\u5211\u9662\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
14470
14455
|
gateStageLabel: "\u5BA1\u5211\u9662",
|
|
14471
14456
|
/** Gate summon binds --subject judge and --source-run. */
|
|
14472
14457
|
gateSummon: "subject-source",
|
|
@@ -14485,7 +14470,6 @@ var init_packaged_role_registry = __esm({
|
|
|
14485
14470
|
phases: [null],
|
|
14486
14471
|
outputTool: DIARIST_OUTPUT_TOOL_NAME,
|
|
14487
14472
|
settlement: "accepted",
|
|
14488
|
-
acceptedText: "\u8D77\u5C45\u90CE\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
14489
14473
|
activationStage: "load-and-install",
|
|
14490
14474
|
sessionMaterials: [
|
|
14491
14475
|
"CLAUDE.md",
|
|
@@ -14535,6 +14519,7 @@ var init_compliance_transport = __esm({
|
|
|
14535
14519
|
init_auditor_dossier_tool();
|
|
14536
14520
|
init_gatekeeper_role();
|
|
14537
14521
|
init_terminal();
|
|
14522
|
+
init_readable_gate_item();
|
|
14538
14523
|
AUDITOR_PARENT_ATTEMPT_BINDING_ENTRY_TYPE = "ak_auditor_parent_attempt_binding";
|
|
14539
14524
|
}
|
|
14540
14525
|
});
|
|
@@ -51,7 +51,6 @@ const PUBLIC_ROLE_RECORDS = [
|
|
|
51
51
|
auditTool: JUDGE_AUDIT_TOOL_NAME,
|
|
52
52
|
settlement: "sealed",
|
|
53
53
|
runnerFailure: "engine-detour-known-first",
|
|
54
|
-
acceptedText: "\u5927\u7406\u5BFA\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
55
54
|
/** Factory board: court until another station has started, then marshal. */
|
|
56
55
|
boardPlacement: "judge-history",
|
|
57
56
|
/** Navigator subject is the public admitted instruction when the run is bound. */
|
|
@@ -90,7 +89,6 @@ const PUBLIC_ROLE_RECORDS = [
|
|
|
90
89
|
],
|
|
91
90
|
method: "observed"
|
|
92
91
|
},
|
|
93
|
-
acceptedText: "\u4FEE\u5185\u53F8\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
94
92
|
boardPlacement: "marshal",
|
|
95
93
|
activationFlags: [
|
|
96
94
|
{ field: "packetPath", flag: "ak-fix-packet", binds: "input" },
|
|
@@ -129,7 +127,6 @@ const PUBLIC_ROLE_RECORDS = [
|
|
|
129
127
|
],
|
|
130
128
|
method: "optional"
|
|
131
129
|
},
|
|
132
|
-
acceptedText: "\u5C06\u4F5C\u76D1\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
133
130
|
activationFlags: [
|
|
134
131
|
{ field: "taskPath", flag: "ak-coder-task", binds: "input" },
|
|
135
132
|
{ field: "phase", flag: "ak-coder-phase", binds: "phase" }
|
|
@@ -175,7 +172,6 @@ const PUBLIC_ROLE_RECORDS = [
|
|
|
175
172
|
/** Frozen base/lens/authority become the initial prompt; instruction follows. */
|
|
176
173
|
transportPrompt: "skill-args",
|
|
177
174
|
runnerFailure: "engine-detour-record-first",
|
|
178
|
-
acceptedText: "\u5FA1\u53F2\u53F0\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
179
175
|
boardPlacement: "marshal",
|
|
180
176
|
activationFlags: [
|
|
181
177
|
{ field: "baseRevision", flag: "ak-review-base" },
|
|
@@ -217,7 +213,6 @@ const PUBLIC_ROLE_RECORDS = [
|
|
|
217
213
|
{ key: "manifestDigest" }
|
|
218
214
|
]
|
|
219
215
|
},
|
|
220
|
-
acceptedText: "\u901A\u8FDB\u53F8\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
221
216
|
boardPlacement: "collector",
|
|
222
217
|
/** Taishi acceptance is a typed groups array, not a status leaf. */
|
|
223
218
|
analystTerminal: "groups",
|
|
@@ -251,7 +246,6 @@ const PUBLIC_ROLE_RECORDS = [
|
|
|
251
246
|
],
|
|
252
247
|
doctorReportFacts: true
|
|
253
248
|
},
|
|
254
|
-
acceptedText: "\u592A\u533B\u7F72\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
255
249
|
/** Navigator subject is the doctor case, not the case-path file bytes. */
|
|
256
250
|
navigatorSubject: "case",
|
|
257
251
|
activationFlags: [
|
|
@@ -287,7 +281,6 @@ const PUBLIC_ROLE_RECORDS = [
|
|
|
287
281
|
],
|
|
288
282
|
method: "observed"
|
|
289
283
|
},
|
|
290
|
-
acceptedText: "\u5408\u5E76\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
291
284
|
activationFlags: [
|
|
292
285
|
{ field: "inputPath", from: "mergerInputPath", flag: "ak-merger-input", binds: "input" }
|
|
293
286
|
],
|
|
@@ -320,7 +313,6 @@ const PUBLIC_ROLE_RECORDS = [
|
|
|
320
313
|
/** Court reask replaces the initial prompt. Otherwise the fixed kickoff. */
|
|
321
314
|
reaskPrompt: true,
|
|
322
315
|
transportPrompt: "fixed-kickoff",
|
|
323
|
-
acceptedText: "\u7B26\u5B9D\u90CE\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
324
316
|
gateStageLabel: "\u7B26\u5B9D\u90CE",
|
|
325
317
|
/** Gate summon binds --source-run and keeps dialogue off the argv. */
|
|
326
318
|
gateSummon: "source-run",
|
|
@@ -345,7 +337,6 @@ const PUBLIC_ROLE_RECORDS = [
|
|
|
345
337
|
phases: [null],
|
|
346
338
|
outputTool: COUNTERSIGN_OUTPUT_TOOL_NAME,
|
|
347
339
|
settlement: "accepted",
|
|
348
|
-
acceptedText: "\u7ED9\u4E8B\u4E2D\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
349
340
|
gateStageLabel: "\u7ED9\u4E8B\u4E2D",
|
|
350
341
|
/** Gate queue reads countersignStatus, not the shared three-state status. */
|
|
351
342
|
gateDecision: "countersign-status",
|
|
@@ -371,7 +362,6 @@ const PUBLIC_ROLE_RECORDS = [
|
|
|
371
362
|
settlement: "accepted",
|
|
372
363
|
/** Project the durable 给事中 officer entry onto the shared accepted-tool settlement. */
|
|
373
364
|
projectCountersignTerminal: true,
|
|
374
|
-
acceptedText: "\u4E2D\u4E66\u7701\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
375
365
|
activationFlags: [
|
|
376
366
|
{ field: "ticketNumber" }
|
|
377
367
|
],
|
|
@@ -401,7 +391,6 @@ const PUBLIC_ROLE_RECORDS = [
|
|
|
401
391
|
settlement: "accepted",
|
|
402
392
|
/** Bound comparison base is the initial prompt; instruction follows. */
|
|
403
393
|
transportPrompt: "baseline",
|
|
404
|
-
acceptedText: "\u5DE6\u62FE\u9057\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
405
394
|
activationFlags: [
|
|
406
395
|
{ field: "baseRevision", flag: "ak-gleaner-left-base" }
|
|
407
396
|
],
|
|
@@ -432,7 +421,6 @@ const PUBLIC_ROLE_RECORDS = [
|
|
|
432
421
|
settlement: "accepted",
|
|
433
422
|
/** Court reask replaces the initial prompt. */
|
|
434
423
|
reaskPrompt: true,
|
|
435
|
-
acceptedText: "\u53F0\u9662\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
436
424
|
gateStageLabel: "\u53F0\u9662",
|
|
437
425
|
activationFlags: [
|
|
438
426
|
{
|
|
@@ -464,7 +452,6 @@ const PUBLIC_ROLE_RECORDS = [
|
|
|
464
452
|
outputTool: GATEKEEPER_OUTPUT_TOOL_NAME,
|
|
465
453
|
settlement: "accepted",
|
|
466
454
|
runnerFailure: "engine-detour-record-first",
|
|
467
|
-
acceptedText: "\u95E8\u4E0B\u7701\u51B3\u8BAE\u5DF2\u53D7\u7406",
|
|
468
455
|
activationStage: "load-and-install",
|
|
469
456
|
// Province materials; officers reuse their own public records below.
|
|
470
457
|
sessionMaterials: ["CLAUDE.md", "souls/gatekeeper.md", "souls/quality-law.md", "souls/gate-output-guide.md"]
|
|
@@ -480,7 +467,6 @@ const PUBLIC_ROLE_RECORDS = [
|
|
|
480
467
|
outputTool: NAVIGATOR_OUTPUT_TOOL_NAME,
|
|
481
468
|
settlement: "accepted",
|
|
482
469
|
runnerFailure: "engine-detour-record-first",
|
|
483
|
-
acceptedText: "\u6E38\u5955\u4F7F\u5EFA\u8BAE\u5DF2\u53D7\u7406",
|
|
484
470
|
activationStage: "load-and-install",
|
|
485
471
|
sessionMaterials: ["CLAUDE.md", "souls/navigator.md"]
|
|
486
472
|
},
|
|
@@ -504,7 +490,6 @@ const PUBLIC_ROLE_RECORDS = [
|
|
|
504
490
|
/** Court reask replaces the initial prompt. */
|
|
505
491
|
reaskPrompt: true,
|
|
506
492
|
runnerFailure: "engine-detour-record-first",
|
|
507
|
-
acceptedText: "\u5BA1\u5211\u9662\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
508
493
|
gateStageLabel: "\u5BA1\u5211\u9662",
|
|
509
494
|
/** Gate summon binds --subject judge and --source-run. */
|
|
510
495
|
gateSummon: "subject-source",
|
|
@@ -523,7 +508,6 @@ const PUBLIC_ROLE_RECORDS = [
|
|
|
523
508
|
phases: [null],
|
|
524
509
|
outputTool: DIARIST_OUTPUT_TOOL_NAME,
|
|
525
510
|
settlement: "accepted",
|
|
526
|
-
acceptedText: "\u8D77\u5C45\u90CE\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
527
511
|
activationStage: "load-and-install",
|
|
528
512
|
sessionMaterials: [
|
|
529
513
|
"CLAUDE.md",
|
|
@@ -570,13 +554,6 @@ function packagedRolePhaseFlag(role) {
|
|
|
570
554
|
function packagedRoleOutputTool(role) {
|
|
571
555
|
return packagedRoleMetadata(role)?.outputTool;
|
|
572
556
|
}
|
|
573
|
-
function packagedRoleAcceptedText(role) {
|
|
574
|
-
const record = packagedRoleMetadata(role);
|
|
575
|
-
if (record === void 0) {
|
|
576
|
-
throw new Error(`Unsupported workflow role: ${String(role)}`);
|
|
577
|
-
}
|
|
578
|
-
return record.acceptedText;
|
|
579
|
-
}
|
|
580
557
|
function packagedMethodLoadFailureCause(role) {
|
|
581
558
|
const record = packagedRoleMetadata(role);
|
|
582
559
|
if (record === void 0 || !("methodLoadFailureCause" in record)) return void 0;
|
|
@@ -723,7 +700,6 @@ export {
|
|
|
723
700
|
packagedRebindSourceOnResume,
|
|
724
701
|
packagedResumeSourcePath,
|
|
725
702
|
packagedRoleAcceptedOutputTool,
|
|
726
|
-
packagedRoleAcceptedText,
|
|
727
703
|
packagedRoleActivationFlags,
|
|
728
704
|
packagedRoleInputFlag,
|
|
729
705
|
packagedRoleMetadata,
|
package/dist/public-cli/main.js
CHANGED
|
@@ -15321,7 +15321,6 @@ __export(packaged_role_registry_exports, {
|
|
|
15321
15321
|
packagedRebindSourceOnResume: () => packagedRebindSourceOnResume,
|
|
15322
15322
|
packagedResumeSourcePath: () => packagedResumeSourcePath,
|
|
15323
15323
|
packagedRoleAcceptedOutputTool: () => packagedRoleAcceptedOutputTool,
|
|
15324
|
-
packagedRoleAcceptedText: () => packagedRoleAcceptedText,
|
|
15325
15324
|
packagedRoleActivationFlags: () => packagedRoleActivationFlags,
|
|
15326
15325
|
packagedRoleInputFlag: () => packagedRoleInputFlag,
|
|
15327
15326
|
packagedRoleMetadata: () => packagedRoleMetadata,
|
|
@@ -15369,13 +15368,6 @@ function packagedRolePhaseFlag(role) {
|
|
|
15369
15368
|
function packagedRoleOutputTool(role) {
|
|
15370
15369
|
return packagedRoleMetadata(role)?.outputTool;
|
|
15371
15370
|
}
|
|
15372
|
-
function packagedRoleAcceptedText(role) {
|
|
15373
|
-
const record4 = packagedRoleMetadata(role);
|
|
15374
|
-
if (record4 === void 0) {
|
|
15375
|
-
throw new Error(`Unsupported workflow role: ${String(role)}`);
|
|
15376
|
-
}
|
|
15377
|
-
return record4.acceptedText;
|
|
15378
|
-
}
|
|
15379
15371
|
function packagedMethodLoadFailureCause(role) {
|
|
15380
15372
|
const record4 = packagedRoleMetadata(role);
|
|
15381
15373
|
if (record4 === void 0 || !("methodLoadFailureCause" in record4)) return void 0;
|
|
@@ -15548,7 +15540,6 @@ var init_packaged_role_registry = __esm({
|
|
|
15548
15540
|
auditTool: JUDGE_AUDIT_TOOL_NAME,
|
|
15549
15541
|
settlement: "sealed",
|
|
15550
15542
|
runnerFailure: "engine-detour-known-first",
|
|
15551
|
-
acceptedText: "\u5927\u7406\u5BFA\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
15552
15543
|
/** Factory board: court until another station has started, then marshal. */
|
|
15553
15544
|
boardPlacement: "judge-history",
|
|
15554
15545
|
/** Navigator subject is the public admitted instruction when the run is bound. */
|
|
@@ -15587,7 +15578,6 @@ var init_packaged_role_registry = __esm({
|
|
|
15587
15578
|
],
|
|
15588
15579
|
method: "observed"
|
|
15589
15580
|
},
|
|
15590
|
-
acceptedText: "\u4FEE\u5185\u53F8\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
15591
15581
|
boardPlacement: "marshal",
|
|
15592
15582
|
activationFlags: [
|
|
15593
15583
|
{ field: "packetPath", flag: "ak-fix-packet", binds: "input" },
|
|
@@ -15626,7 +15616,6 @@ var init_packaged_role_registry = __esm({
|
|
|
15626
15616
|
],
|
|
15627
15617
|
method: "optional"
|
|
15628
15618
|
},
|
|
15629
|
-
acceptedText: "\u5C06\u4F5C\u76D1\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
15630
15619
|
activationFlags: [
|
|
15631
15620
|
{ field: "taskPath", flag: "ak-coder-task", binds: "input" },
|
|
15632
15621
|
{ field: "phase", flag: "ak-coder-phase", binds: "phase" }
|
|
@@ -15672,7 +15661,6 @@ var init_packaged_role_registry = __esm({
|
|
|
15672
15661
|
/** Frozen base/lens/authority become the initial prompt; instruction follows. */
|
|
15673
15662
|
transportPrompt: "skill-args",
|
|
15674
15663
|
runnerFailure: "engine-detour-record-first",
|
|
15675
|
-
acceptedText: "\u5FA1\u53F2\u53F0\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
15676
15664
|
boardPlacement: "marshal",
|
|
15677
15665
|
activationFlags: [
|
|
15678
15666
|
{ field: "baseRevision", flag: "ak-review-base" },
|
|
@@ -15714,7 +15702,6 @@ var init_packaged_role_registry = __esm({
|
|
|
15714
15702
|
{ key: "manifestDigest" }
|
|
15715
15703
|
]
|
|
15716
15704
|
},
|
|
15717
|
-
acceptedText: "\u901A\u8FDB\u53F8\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
15718
15705
|
boardPlacement: "collector",
|
|
15719
15706
|
/** Taishi acceptance is a typed groups array, not a status leaf. */
|
|
15720
15707
|
analystTerminal: "groups",
|
|
@@ -15748,7 +15735,6 @@ var init_packaged_role_registry = __esm({
|
|
|
15748
15735
|
],
|
|
15749
15736
|
doctorReportFacts: true
|
|
15750
15737
|
},
|
|
15751
|
-
acceptedText: "\u592A\u533B\u7F72\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
15752
15738
|
/** Navigator subject is the doctor case, not the case-path file bytes. */
|
|
15753
15739
|
navigatorSubject: "case",
|
|
15754
15740
|
activationFlags: [
|
|
@@ -15784,7 +15770,6 @@ var init_packaged_role_registry = __esm({
|
|
|
15784
15770
|
],
|
|
15785
15771
|
method: "observed"
|
|
15786
15772
|
},
|
|
15787
|
-
acceptedText: "\u5408\u5E76\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
15788
15773
|
activationFlags: [
|
|
15789
15774
|
{ field: "inputPath", from: "mergerInputPath", flag: "ak-merger-input", binds: "input" }
|
|
15790
15775
|
],
|
|
@@ -15817,7 +15802,6 @@ var init_packaged_role_registry = __esm({
|
|
|
15817
15802
|
/** Court reask replaces the initial prompt. Otherwise the fixed kickoff. */
|
|
15818
15803
|
reaskPrompt: true,
|
|
15819
15804
|
transportPrompt: "fixed-kickoff",
|
|
15820
|
-
acceptedText: "\u7B26\u5B9D\u90CE\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
15821
15805
|
gateStageLabel: "\u7B26\u5B9D\u90CE",
|
|
15822
15806
|
/** Gate summon binds --source-run and keeps dialogue off the argv. */
|
|
15823
15807
|
gateSummon: "source-run",
|
|
@@ -15842,7 +15826,6 @@ var init_packaged_role_registry = __esm({
|
|
|
15842
15826
|
phases: [null],
|
|
15843
15827
|
outputTool: COUNTERSIGN_OUTPUT_TOOL_NAME,
|
|
15844
15828
|
settlement: "accepted",
|
|
15845
|
-
acceptedText: "\u7ED9\u4E8B\u4E2D\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
15846
15829
|
gateStageLabel: "\u7ED9\u4E8B\u4E2D",
|
|
15847
15830
|
/** Gate queue reads countersignStatus, not the shared three-state status. */
|
|
15848
15831
|
gateDecision: "countersign-status",
|
|
@@ -15868,7 +15851,6 @@ var init_packaged_role_registry = __esm({
|
|
|
15868
15851
|
settlement: "accepted",
|
|
15869
15852
|
/** Project the durable 给事中 officer entry onto the shared accepted-tool settlement. */
|
|
15870
15853
|
projectCountersignTerminal: true,
|
|
15871
|
-
acceptedText: "\u4E2D\u4E66\u7701\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
15872
15854
|
activationFlags: [
|
|
15873
15855
|
{ field: "ticketNumber" }
|
|
15874
15856
|
],
|
|
@@ -15898,7 +15880,6 @@ var init_packaged_role_registry = __esm({
|
|
|
15898
15880
|
settlement: "accepted",
|
|
15899
15881
|
/** Bound comparison base is the initial prompt; instruction follows. */
|
|
15900
15882
|
transportPrompt: "baseline",
|
|
15901
|
-
acceptedText: "\u5DE6\u62FE\u9057\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
15902
15883
|
activationFlags: [
|
|
15903
15884
|
{ field: "baseRevision", flag: "ak-gleaner-left-base" }
|
|
15904
15885
|
],
|
|
@@ -15929,7 +15910,6 @@ var init_packaged_role_registry = __esm({
|
|
|
15929
15910
|
settlement: "accepted",
|
|
15930
15911
|
/** Court reask replaces the initial prompt. */
|
|
15931
15912
|
reaskPrompt: true,
|
|
15932
|
-
acceptedText: "\u53F0\u9662\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
15933
15913
|
gateStageLabel: "\u53F0\u9662",
|
|
15934
15914
|
activationFlags: [
|
|
15935
15915
|
{
|
|
@@ -15961,7 +15941,6 @@ var init_packaged_role_registry = __esm({
|
|
|
15961
15941
|
outputTool: GATEKEEPER_OUTPUT_TOOL_NAME,
|
|
15962
15942
|
settlement: "accepted",
|
|
15963
15943
|
runnerFailure: "engine-detour-record-first",
|
|
15964
|
-
acceptedText: "\u95E8\u4E0B\u7701\u51B3\u8BAE\u5DF2\u53D7\u7406",
|
|
15965
15944
|
activationStage: "load-and-install",
|
|
15966
15945
|
// Province materials; officers reuse their own public records below.
|
|
15967
15946
|
sessionMaterials: ["CLAUDE.md", "souls/gatekeeper.md", "souls/quality-law.md", "souls/gate-output-guide.md"]
|
|
@@ -15977,7 +15956,6 @@ var init_packaged_role_registry = __esm({
|
|
|
15977
15956
|
outputTool: NAVIGATOR_OUTPUT_TOOL_NAME,
|
|
15978
15957
|
settlement: "accepted",
|
|
15979
15958
|
runnerFailure: "engine-detour-record-first",
|
|
15980
|
-
acceptedText: "\u6E38\u5955\u4F7F\u5EFA\u8BAE\u5DF2\u53D7\u7406",
|
|
15981
15959
|
activationStage: "load-and-install",
|
|
15982
15960
|
sessionMaterials: ["CLAUDE.md", "souls/navigator.md"]
|
|
15983
15961
|
},
|
|
@@ -16001,7 +15979,6 @@ var init_packaged_role_registry = __esm({
|
|
|
16001
15979
|
/** Court reask replaces the initial prompt. */
|
|
16002
15980
|
reaskPrompt: true,
|
|
16003
15981
|
runnerFailure: "engine-detour-record-first",
|
|
16004
|
-
acceptedText: "\u5BA1\u5211\u9662\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
16005
15982
|
gateStageLabel: "\u5BA1\u5211\u9662",
|
|
16006
15983
|
/** Gate summon binds --subject judge and --source-run. */
|
|
16007
15984
|
gateSummon: "subject-source",
|
|
@@ -16020,7 +15997,6 @@ var init_packaged_role_registry = __esm({
|
|
|
16020
15997
|
phases: [null],
|
|
16021
15998
|
outputTool: DIARIST_OUTPUT_TOOL_NAME,
|
|
16022
15999
|
settlement: "accepted",
|
|
16023
|
-
acceptedText: "\u8D77\u5C45\u90CE\u56DE\u6267\u5DF2\u63A5\u53D7",
|
|
16024
16000
|
activationStage: "load-and-install",
|
|
16025
16001
|
sessionMaterials: [
|
|
16026
16002
|
"CLAUDE.md",
|
|
@@ -17949,8 +17925,8 @@ function formatTerminalResult(result) {
|
|
|
17949
17925
|
`diagnostic ${encodeTerminalField(result.roleOutcome.diagnostic)}`
|
|
17950
17926
|
);
|
|
17951
17927
|
}
|
|
17952
|
-
if (result.roleOutcome.kind === "failure" || result.roleOutcome.kind === "no_receipt") {
|
|
17953
|
-
const facts = result.roleOutcome.decisiveFacts;
|
|
17928
|
+
if (result.roleOutcome.kind === "failure" || result.roleOutcome.kind === "no_receipt" || result.roleOutcome.kind === "audit_escalation") {
|
|
17929
|
+
const facts = result.roleOutcome.decisiveFacts ?? {};
|
|
17954
17930
|
for (const [key, value] of Object.entries(facts)) {
|
|
17955
17931
|
if (value === void 0) continue;
|
|
17956
17932
|
const rendered = typeof value === "string" ? value : JSON.stringify(value);
|
|
@@ -18031,6 +18007,7 @@ var init_compliance_transport = __esm({
|
|
|
18031
18007
|
init_auditor_dossier_tool();
|
|
18032
18008
|
init_gatekeeper_role();
|
|
18033
18009
|
init_terminal();
|
|
18010
|
+
init_readable_gate_item();
|
|
18034
18011
|
AUDITOR_PARENT_ATTEMPT_BINDING_ENTRY_TYPE = "ak_auditor_parent_attempt_binding";
|
|
18035
18012
|
AUDITOR_COMPLIANCE_FAILURE_ENTRY_TYPE = "ak_auditor_compliance_failure";
|
|
18036
18013
|
}
|
|
@@ -23536,7 +23513,6 @@ var init_auditor_soul = __esm({
|
|
|
23536
23513
|
var init_audit_escalation = __esm({
|
|
23537
23514
|
"src/audit-escalation.ts"() {
|
|
23538
23515
|
"use strict";
|
|
23539
|
-
init_readable_gate_item();
|
|
23540
23516
|
init_submission_errors();
|
|
23541
23517
|
}
|
|
23542
23518
|
});
|
|
@@ -23634,6 +23610,8 @@ function rowFromPayload(kind, payload, accepted, roleFallback) {
|
|
|
23634
23610
|
...role === void 0 ? {} : { role },
|
|
23635
23611
|
kind,
|
|
23636
23612
|
accepted,
|
|
23613
|
+
...Object.hasOwn(payload, "auditReceipt") ? { auditReceipt: payload.auditReceipt } : {},
|
|
23614
|
+
...Object.hasOwn(payload, "auditOfficer") ? { auditOfficer: payload.auditOfficer } : {},
|
|
23637
23615
|
...typeof payload.toolCallId === "string" && payload.toolCallId.length > 0 ? { toolCallId: payload.toolCallId } : {}
|
|
23638
23616
|
};
|
|
23639
23617
|
}
|
|
@@ -24706,7 +24684,17 @@ function roleOutcomeFromRows(role, rows) {
|
|
|
24706
24684
|
if (terminal.length === 0) return void 0;
|
|
24707
24685
|
const payloads = mine.map((row) => row.accepted);
|
|
24708
24686
|
if (terminal.some((row) => row.kind === "audit-escalation")) {
|
|
24709
|
-
|
|
24687
|
+
const audited = terminal.slice().reverse().find((row) => row.kind === "audit-escalation" && Object.hasOwn(row, "auditReceipt"));
|
|
24688
|
+
return {
|
|
24689
|
+
kind: "audit_escalation",
|
|
24690
|
+
role,
|
|
24691
|
+
status: "audit_escalation",
|
|
24692
|
+
payloads,
|
|
24693
|
+
...audited === void 0 ? {} : { decisiveFacts: {
|
|
24694
|
+
auditEscalationReceipt: audited.auditReceipt,
|
|
24695
|
+
...Object.hasOwn(audited, "auditOfficer") ? { auditEscalationOfficer: audited.auditOfficer } : {}
|
|
24696
|
+
} }
|
|
24697
|
+
};
|
|
24710
24698
|
}
|
|
24711
24699
|
return { kind: "accepted", role, payloads };
|
|
24712
24700
|
}
|
|
@@ -57,7 +57,14 @@ function roleOutcomeFromRows(role, rows) {
|
|
|
57
57
|
// Role-result block is the full recorded sequence for this seat, not a sole pick.
|
|
58
58
|
const payloads = mine.map((row) => row.accepted);
|
|
59
59
|
if (terminal.some((row) => row.kind === "audit-escalation")) {
|
|
60
|
-
|
|
60
|
+
const audited = terminal.slice().reverse().find((row) => row.kind === "audit-escalation" && Object.hasOwn(row, "auditReceipt"));
|
|
61
|
+
return {
|
|
62
|
+
kind: "audit_escalation", role, status: "audit_escalation", payloads,
|
|
63
|
+
...(audited === undefined ? {} : { decisiveFacts: {
|
|
64
|
+
auditEscalationReceipt: audited.auditReceipt,
|
|
65
|
+
...(Object.hasOwn(audited, "auditOfficer") ? { auditEscalationOfficer: audited.auditOfficer } : {}),
|
|
66
|
+
} }),
|
|
67
|
+
};
|
|
61
68
|
}
|
|
62
69
|
return { kind: "accepted", role, payloads };
|
|
63
70
|
}
|
|
@@ -69,8 +69,8 @@ export function formatTerminalResult(result) {
|
|
|
69
69
|
if (result.roleOutcome.kind === "failure") {
|
|
70
70
|
lines.push(`diagnostic\t${encodeTerminalField(result.roleOutcome.diagnostic)}`);
|
|
71
71
|
}
|
|
72
|
-
if (result.roleOutcome.kind === "failure" || result.roleOutcome.kind === "no_receipt") {
|
|
73
|
-
const facts = result.roleOutcome.decisiveFacts;
|
|
72
|
+
if (result.roleOutcome.kind === "failure" || result.roleOutcome.kind === "no_receipt" || result.roleOutcome.kind === "audit_escalation") {
|
|
73
|
+
const facts = result.roleOutcome.decisiveFacts ?? {};
|
|
74
74
|
for (const [key, value] of Object.entries(facts)) {
|
|
75
75
|
if (value === undefined)
|
|
76
76
|
continue;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
const SECRETARIAT_OUTPUT_TOOL_NAME = "ak_secretariat_output";
|
|
2
|
-
const SECRETARIAT_SUMMON_COUNTERSIGN_TOOL_NAME = "ak_secretariat_summon_countersign";
|
|
3
2
|
const SECRETARIAT_GATE_OFFICER_ENTRY_TYPE = "ak-secretariat-gate-officer";
|
|
4
3
|
const SECRETARIAT_COUNTERSIGN_TERMINAL_FACT_KEY = "countersignTerminal";
|
|
5
4
|
export {
|
|
6
5
|
SECRETARIAT_COUNTERSIGN_TERMINAL_FACT_KEY,
|
|
7
6
|
SECRETARIAT_GATE_OFFICER_ENTRY_TYPE,
|
|
8
|
-
SECRETARIAT_OUTPUT_TOOL_NAME
|
|
9
|
-
SECRETARIAT_SUMMON_COUNTERSIGN_TOOL_NAME
|
|
7
|
+
SECRETARIAT_OUTPUT_TOOL_NAME
|
|
10
8
|
};
|
|
@@ -160,6 +160,8 @@ function rowFromPayload(kind, payload, accepted, roleFallback) {
|
|
|
160
160
|
...(role === undefined ? {} : { role }),
|
|
161
161
|
kind,
|
|
162
162
|
accepted,
|
|
163
|
+
...(Object.hasOwn(payload, "auditReceipt") ? { auditReceipt: payload.auditReceipt } : {}),
|
|
164
|
+
...(Object.hasOwn(payload, "auditOfficer") ? { auditOfficer: payload.auditOfficer } : {}),
|
|
163
165
|
...(typeof payload.toolCallId === "string" && payload.toolCallId.length > 0
|
|
164
166
|
? { toolCallId: payload.toolCallId }
|
|
165
167
|
: {}),
|
|
@@ -505,6 +507,11 @@ export function createSubmissionLedgerHost(host, outputTools, failInfrastructure
|
|
|
505
507
|
// #836: ledger authority is the LLM tool-call params as-is (角色原话), never result.details.
|
|
506
508
|
// Machine facts on result.details stay on the tool-result face returned to the model.
|
|
507
509
|
if (isAuditEscalationProjection(result.details) || isAuditEscalationProjection(params)) {
|
|
510
|
+
const audit = isAuditEscalationProjection(result.details)
|
|
511
|
+
&& typeof result.details.audit === "object"
|
|
512
|
+
&& result.details.audit !== null
|
|
513
|
+
? result.details.audit
|
|
514
|
+
: undefined;
|
|
508
515
|
const closed = {
|
|
509
516
|
role,
|
|
510
517
|
kind: "audit_escalation",
|
|
@@ -517,6 +524,10 @@ export function createSubmissionLedgerHost(host, outputTools, failInfrastructure
|
|
|
517
524
|
outcome: "audit-escalation",
|
|
518
525
|
role,
|
|
519
526
|
accepted: params,
|
|
527
|
+
...(audit !== undefined && (Object.hasOwn(audit, "receipt") || Object.hasOwn(audit, "conflicts"))
|
|
528
|
+
? { auditReceipt: Object.hasOwn(audit, "receipt") ? audit.receipt : audit.conflicts }
|
|
529
|
+
: {}),
|
|
530
|
+
...(audit !== undefined && Object.hasOwn(audit, "officer") ? { auditOfficer: audit.officer } : {}),
|
|
520
531
|
});
|
|
521
532
|
await projectClosure(closed, context);
|
|
522
533
|
return result;
|
package/package.json
CHANGED
package/src/audit-escalation.ts
CHANGED
|
@@ -3,8 +3,8 @@ import type { Usage } from "@earendil-works/pi-ai";
|
|
|
3
3
|
import type {
|
|
4
4
|
ComplianceDecision,
|
|
5
5
|
} from "./compliance-transport.ts";
|
|
6
|
-
import { readableGateItem } from "./readable-gate-item.ts";
|
|
7
6
|
import { GatekeeperDecisionError } from "./submission-errors.ts";
|
|
7
|
+
import type { GatekeeperNonPassResult } from "./gatekeeper-role.ts";
|
|
8
8
|
|
|
9
9
|
export const AUDIT_ESCALATION_KIND = "audit_escalation" as const;
|
|
10
10
|
|
|
@@ -30,7 +30,7 @@ export type AuditEscalationResult = {
|
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
export type AuditEscalationToolResult = {
|
|
33
|
-
content: [
|
|
33
|
+
content: [];
|
|
34
34
|
details: AuditEscalationResult;
|
|
35
35
|
terminate: true;
|
|
36
36
|
usage?: Usage;
|
|
@@ -38,7 +38,7 @@ export type AuditEscalationToolResult = {
|
|
|
38
38
|
|
|
39
39
|
export type OfficerAuditEscalationDecision = {
|
|
40
40
|
readonly status: "escalate";
|
|
41
|
-
readonly officer?: "inspector" | "notary" | "countersign";
|
|
41
|
+
readonly officer?: "inspector" | "notary" | "auditor" | "countersign";
|
|
42
42
|
readonly reason?: unknown;
|
|
43
43
|
readonly findings?: unknown;
|
|
44
44
|
readonly conflicts?: unknown;
|
|
@@ -66,6 +66,9 @@ export function buildAuditEscalationResult(
|
|
|
66
66
|
const auditOwned: Record<string, unknown> = {
|
|
67
67
|
kind: AUDIT_ESCALATION_KIND,
|
|
68
68
|
};
|
|
69
|
+
if (Object.hasOwn(decision, "receipt")) {
|
|
70
|
+
auditOwned.receipt = (decision as { receipt?: unknown }).receipt;
|
|
71
|
+
}
|
|
69
72
|
if (Object.hasOwn(decision, "conflicts")) {
|
|
70
73
|
auditOwned.conflicts = (decision as { conflicts?: unknown }).conflicts;
|
|
71
74
|
}
|
|
@@ -103,15 +106,33 @@ export function projectAuditEscalation(
|
|
|
103
106
|
deliveredOutput?: unknown,
|
|
104
107
|
): AuditEscalationToolResult {
|
|
105
108
|
const details = buildAuditEscalationResult(decision, deliveredOutput);
|
|
106
|
-
const original = deliveredOutput !== undefined ? deliveredOutput : decision;
|
|
107
109
|
return {
|
|
108
|
-
content: [
|
|
110
|
+
content: [],
|
|
109
111
|
details,
|
|
110
112
|
terminate: true,
|
|
111
113
|
...(decision.usage === undefined ? {} : { usage: decision.usage }),
|
|
112
114
|
};
|
|
113
115
|
}
|
|
114
116
|
|
|
117
|
+
/** Preserve the escalating officer's own gate alongside the raw receipt. */
|
|
118
|
+
export function projectGatekeeperEscalation(
|
|
119
|
+
result: Extract<GatekeeperNonPassResult, { status: "escalate" }>,
|
|
120
|
+
deliveredOutput?: unknown,
|
|
121
|
+
): AuditEscalationToolResult {
|
|
122
|
+
const receipt = result.receipt;
|
|
123
|
+
const record = receipt !== null && typeof receipt === "object" && !Array.isArray(receipt)
|
|
124
|
+
? receipt as Record<string, unknown>
|
|
125
|
+
: undefined;
|
|
126
|
+
return projectAuditEscalation({
|
|
127
|
+
status: "escalate",
|
|
128
|
+
officer: result.officer,
|
|
129
|
+
conflicts: receipt,
|
|
130
|
+
...(record !== undefined && Object.hasOwn(record, "decisionGate")
|
|
131
|
+
? { decisionGate: record.decisionGate }
|
|
132
|
+
: {}),
|
|
133
|
+
}, deliveredOutput);
|
|
134
|
+
}
|
|
135
|
+
|
|
115
136
|
/**
|
|
116
137
|
* Discriminator-only recognition (ADR 0040). Shape of conflicts/options/gate
|
|
117
138
|
* is not a reject gate — element types and cardinality are delivery content.
|
package/src/collector-role.ts
CHANGED
|
@@ -55,7 +55,6 @@ import {
|
|
|
55
55
|
collectorRequestArgsSchema,
|
|
56
56
|
collectorWaitArgsSchema,
|
|
57
57
|
} from "./collector-tool-schemas.ts";
|
|
58
|
-
import { packagedRoleAcceptedText } from "./packaged-role-registry.ts";
|
|
59
58
|
import { CorrectableSubmissionError, isCorrectableExecuteError } from "./submission-correctable-error.ts";
|
|
60
59
|
import { CollectorUnknownEvidenceError } from "./collector-identity.ts";
|
|
61
60
|
|
|
@@ -664,10 +663,7 @@ export function createCollectorRoleRuntime(
|
|
|
664
663
|
activation.ledger.beginOperational(COLLECTOR_OUTPUT_TOOL, toolCallId);
|
|
665
664
|
activation.ledger.recordOutputCandidate();
|
|
666
665
|
return {
|
|
667
|
-
content: [
|
|
668
|
-
type: "text" as const,
|
|
669
|
-
text: packagedRoleAcceptedText("collector"),
|
|
670
|
-
}],
|
|
666
|
+
content: [],
|
|
671
667
|
details: params,
|
|
672
668
|
terminate: true as const,
|
|
673
669
|
};
|