@akagilnc/pi-workflow-roles 0.1.6108 → 0.1.6115
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/acp-host/production-host.js +209 -177
- package/dist/compliance-transport.js +3 -3
- package/dist/diarist-contracts.js +0 -16
- package/dist/diarist-role.js +1 -2
- package/dist/doctor-contracts.js +1 -5
- package/dist/gatekeeper-role.js +6 -9
- package/dist/headless-host/production-host.js +162 -130
- package/dist/inspector-contracts.js +2 -22
- package/dist/inspector-role.js +1 -2
- package/dist/merger-contracts.js +1 -5
- package/dist/migrate-book-topology.js +32 -45
- package/dist/navigator-invocation-identity.js +8 -10
- package/dist/notary-contracts.js +1 -9
- package/dist/package-contracts/auditor-output.js +0 -10
- package/dist/package-contracts/fixer-output.js +3 -0
- package/dist/package-contracts/gatekeeper-output.js +1 -7
- package/dist/package-contracts/navigator-output.js +1 -25
- package/dist/package-contracts/reviewer-output.js +1 -5
- package/dist/package-contracts/terminating-tools.js +10 -24
- package/dist/packaged-role-registry.js +20 -4
- package/dist/public-cli/countersign-run.js +2 -4
- package/dist/public-cli/instruction-seat-run.js +55 -16
- package/dist/public-cli/invocation.js +22 -12
- package/dist/public-cli/main.js +192 -143
- package/dist/public-cli/post-admission.js +2 -2
- package/dist/review-submission.js +1 -1
- package/dist/role-runtime.js +15 -32
- package/dist/secretariat-contracts.js +1 -1
- package/dist/submission-errors.js +0 -9
- package/dist/submission-gate.js +3 -7
- package/dist/submission-ledger.js +4 -12
- package/dist/ticket-progress.js +64 -28
- package/dist/ticket-trajectory.js +6 -17
- package/dist/worker-role.js +3 -4
- package/package.json +1 -1
- package/src/compliance-transport.ts +3 -3
- package/src/diarist-contracts.ts +0 -16
- package/src/diarist-role.ts +0 -2
- package/src/doctor-contracts.ts +0 -4
- package/src/gatekeeper-role.ts +6 -9
- package/src/inspector-contracts.ts +1 -21
- package/src/inspector-role.ts +0 -2
- package/src/merger-contracts.ts +0 -4
- package/src/navigator-invocation-identity.ts +9 -16
- package/src/notary-contracts.ts +0 -13
- package/src/package-contracts/auditor-output.ts +0 -12
- package/src/package-contracts/fixer-output.ts +4 -0
- package/src/package-contracts/gatekeeper-output.ts +0 -9
- package/src/package-contracts/navigator-output.ts +0 -34
- package/src/package-contracts/reviewer-output.ts +0 -4
- package/src/package-contracts/terminating-tools.ts +21 -37
- package/src/packaged-role-registry.ts +33 -3
- package/src/public-cli/countersign-run.ts +2 -5
- package/src/public-cli/instruction-seat-run.ts +58 -13
- package/src/public-cli/invocation.ts +31 -16
- package/src/public-cli/post-admission.ts +2 -2
- package/src/review-submission.ts +1 -1
- package/src/role-runtime.ts +16 -29
- package/src/secretariat-contracts.ts +2 -3
- package/src/submission-errors.ts +0 -8
- package/src/submission-gate.ts +3 -7
- package/src/submission-ledger.ts +3 -11
- package/src/ticket-progress.ts +76 -33
- package/src/ticket-trajectory.ts +5 -18
- package/src/worker-role.ts +3 -4
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { isRecord } from "./unknown-value.js";
|
|
1
|
+
import { REVIEW_SUBMISSION_OUTPUT_TOOL_NAME } from "./review-submission.js";
|
|
3
2
|
const INSPECTOR_OUTPUT_TOOL_NAME = REVIEW_SUBMISSION_OUTPUT_TOOL_NAME;
|
|
4
3
|
const INSPECTOR_SOURCE_RUN_FLAG = {
|
|
5
4
|
name: "ak-inspector-source-run",
|
|
@@ -8,26 +7,7 @@ const INSPECTOR_SOURCE_RUN_FLAG = {
|
|
|
8
7
|
type: "string"
|
|
9
8
|
}
|
|
10
9
|
};
|
|
11
|
-
function validateRecordedInspectorOutput(value) {
|
|
12
|
-
if (!isRecord(value)) {
|
|
13
|
-
throw new Error("Inspector output has no execution discriminator");
|
|
14
|
-
}
|
|
15
|
-
let status;
|
|
16
|
-
try {
|
|
17
|
-
status = value.status;
|
|
18
|
-
} catch {
|
|
19
|
-
throw new Error("Inspector output has no execution discriminator");
|
|
20
|
-
}
|
|
21
|
-
if (typeof status !== "string") {
|
|
22
|
-
throw new Error("Inspector output has no execution discriminator");
|
|
23
|
-
}
|
|
24
|
-
if (REVIEW_QUEUE_STATUSES.has(status)) {
|
|
25
|
-
return value;
|
|
26
|
-
}
|
|
27
|
-
throw new Error("Inspector output has no execution discriminator");
|
|
28
|
-
}
|
|
29
10
|
export {
|
|
30
11
|
INSPECTOR_OUTPUT_TOOL_NAME,
|
|
31
|
-
INSPECTOR_SOURCE_RUN_FLAG
|
|
32
|
-
validateRecordedInspectorOutput
|
|
12
|
+
INSPECTOR_SOURCE_RUN_FLAG
|
|
33
13
|
};
|
package/dist/inspector-role.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { inspectorSubmissionSchema } from "./review-submission.js";
|
|
2
2
|
import { roleSubmissionDeclaration } from "./role-submission-declarations.js";
|
|
3
|
-
import { INSPECTOR_OUTPUT_TOOL_NAME,
|
|
3
|
+
import { INSPECTOR_OUTPUT_TOOL_NAME, } from "./inspector-contracts.js";
|
|
4
4
|
export { INSPECTOR_OUTPUT_TOOL_NAME, };
|
|
5
5
|
export { INSPECTOR_OUTPUT_TOOL_NAME as INSPECTOR_OUTPUT_TOOL };
|
|
6
|
-
export { validateRecordedInspectorOutput };
|
|
7
6
|
/**
|
|
8
7
|
* 决定工具规格。生命周期装配归注册信封 owner——src/role-runtime.ts(ADR 0018)。
|
|
9
8
|
*/
|
package/dist/merger-contracts.js
CHANGED
|
@@ -61,14 +61,10 @@ function validateMergerInput(value) {
|
|
|
61
61
|
const authorizedChecks = Array.isArray(value.authorizedChecks) ? value.authorizedChecks.filter((check) => isRecord(check)).map((c) => ({ name: asString(c.name), argv: asStringArray(c.argv).filter((a) => a.trim().length > 0) })).filter((c) => c.name.trim().length > 0 && c.argv.length > 0) : [];
|
|
62
62
|
return deepFreeze(structuredClone({ attemptId: value.attemptId.trim(), targetObjectId: asString(value.targetObjectId), sourceObjectId: asString(value.sourceObjectId), materials, expectedConflictPaths: asStringArray(value.expectedConflictPaths), resolutionScope: asStringArray(value.resolutionScope), authorizedChecks }));
|
|
63
63
|
}
|
|
64
|
-
function validateMergerOutput(value) {
|
|
65
|
-
return value;
|
|
66
|
-
}
|
|
67
64
|
export {
|
|
68
65
|
MERGER_OUTPUT_TOOL_NAME,
|
|
69
66
|
MergerInputContractError,
|
|
70
67
|
mergerInputSchema,
|
|
71
68
|
mergerOutputSchema,
|
|
72
|
-
validateMergerInput
|
|
73
|
-
validateMergerOutput
|
|
69
|
+
validateMergerInput
|
|
74
70
|
};
|
|
@@ -8659,7 +8659,6 @@ var init_gatekeeper_output = __esm({
|
|
|
8659
8659
|
init_build();
|
|
8660
8660
|
init_open_tool_schema();
|
|
8661
8661
|
init_terminating_infrastructure();
|
|
8662
|
-
init_unknown_value();
|
|
8663
8662
|
GATEKEEPER_OUTPUT_TOOL_NAME = "ak_gatekeeper_output";
|
|
8664
8663
|
gatekeeperDecisionSchema = openToolObject(
|
|
8665
8664
|
typebox_exports.Object({
|
|
@@ -8955,7 +8954,7 @@ var init_review_submission = __esm({
|
|
|
8955
8954
|
);
|
|
8956
8955
|
ARCH_TABLE_COMMON = "\u67B6\u6784\u5F52\u4F4D\u8868\uFF1A\u5148\u76D8\u65E2\u6709\u67B6\u6784\u2014\u2014docs/adr \u4E0E\u7968\u9762\u70B9\u540D\u6CD5\u6E90\u91CC\u7684\u5C42\u8868\u4E0E\u89C4\u77E9\uFF0C\u518D\u6253\u5F00\u5206\u5C42\u914D\u7F6E\u4E0E\u4EE3\u7801\u770B\u6BCF\u5C42\u73B0\u5728\u88C5\u7740\u4EC0\u4E48\u3001\u6709\u6CA1\u6709\u6CD5\u6E90\u91CC\u6CA1\u6709\u7684\u5C42\u3002\u9075\u5FAA\u884C\uFF1A\u7A3F\u91CC\u6BCF\u6837\u8FDB\u4EE3\u7801\u7684\u4E1C\u897F\u5404\u4E00\u884C\uFF0C\u5F52\u5230\u6CD5\u6E90\u7684\u5C42\u91CC\uFF1B\u6838\u67B6\u6784\u884C\uFF1A\u65E2\u6709\u67B6\u6784\u6BCF\u6761\u6761\u6B3E\u5404\u4E00\u884C\uFF0C\u8054\u7F51\u627E\u6240\u9009\u6846\u67B6\u5B98\u65B9\u6587\u6863\u4E0E\u516C\u8BA4\u8D44\u6599\u91CC\u627F\u62C5\u540C\u4E00\u5173\u5207\u7684\u505A\u6CD5\uFF0C\u9644\u94FE\u63A5\u4E0E\u539F\u53E5\u3002\u6CD5\u6E90\u91CC\u65E2\u6CA1\u6709\u5C42\u8868\u4E5F\u6CA1\u6709\u67B6\u6784\u89C4\u77E9\u65F6\u624D\u4E3A\u7A7A\u6570\u7EC4\uFF0C\u5E76\u5728 note \u5199\u660E\uFF1B\u53EA\u6709\u89C4\u77E9\u6CA1\u6709\u5C42\u8868\u7684\uFF0C\u9075\u5FAA\u884C\u7684 layer \u5199\u88AB\u6838\u7684\u90A3\u6761\u89C4\u77E9\u539F\u53E5\uFF0C\u6838\u67B6\u6784\u884C\u6309\u89C4\u77E9\u9010\u6761\u5217\u3002";
|
|
8957
8956
|
secretariatArchitectureField = typebox_exports.Array(architectureRowSchema, {
|
|
8958
|
-
description: `${ARCH_TABLE_COMMON}\u6709\u300C\u4E0D\u5408\u300D\u6216\u300C\u53EF\u6539\u8FDB\u300D\u884C\
|
|
8957
|
+
description: `${ARCH_TABLE_COMMON}\u6709\u300C\u4E0D\u5408\u300D\u6216\u300C\u53EF\u6539\u8FDB\u300D\u884C\uFF0Cstatus \u53EA\u80FD\u662F escalate\uFF1A\u4E0D\u5408\u884C\u7684\u539F\u6587\u4E0E\u4E24\u8FB9\uFF08\u6539\u7A3F\u5F52\u4F4D\uFF0F\u6539\u67B6\u6784\uFF09\u3001\u53EF\u6539\u8FDB\u7684\u5EFA\u8BAE\uFF0C\u90FD\u5217\u8FDB decisionGate \u7531\u965B\u4E0B\u62CD\uFF0C\u4E0D\u51FA\u7ED9\u5BB0\u76F8\u7B54\u3002`
|
|
8959
8958
|
});
|
|
8960
8959
|
countersignArchitectureField = typebox_exports.Array(architectureRowSchema, {
|
|
8961
8960
|
description: `${ARCH_TABLE_COMMON}\u6709\u300C\u4E0D\u5408\u300D\u884C\u4E0D\u5F97\u7F72\uFF1A\u7968\u9762\u610F\u5728\u6539\u67B6\u6784\u7684\u4E0A\u5448\uFF0C\u5426\u5219\u5C01\u9A73\u9000\u7B7E\u53D1\u65B9\u5F52\u4F4D\uFF1B\u6709\u300C\u53EF\u6539\u8FDB\u300D\u884C\u4E0A\u5448\uFF0C\u5EFA\u8BAE\u9644\u539F\u6587\u3002`
|
|
@@ -9115,6 +9114,9 @@ var init_fixer_output = __esm({
|
|
|
9115
9114
|
classResults: typebox_exports.Unknown({
|
|
9116
9115
|
description: "\u5404\u7C7B class \u7ED3\u7B97\uFF0C\u539F\u6837\u7559\u5B58\u3002\u6BCF\u7C7B\u5199 name\u3001shape\uFF08\u9519\u8BEF\u5F62\u72B6\u4E00\u53E5\uFF09\u3002\u6309\u4EE3\u7801\u5F62\u72B6\u8BA4\u7684\u7C7B\u5199 search\uFF08\u5B9E\u9645\u8DD1\u7684\u641C\u7D22\u547D\u4EE4\uFF0C\u539F\u6837\uFF09\u3001hits\uFF08\u547D\u4EE4\u8F93\u51FA\u7684\u6BCF\u4E2A\u547D\u4E2D\u4E00\u884C { where: path:line, outcome: \u5DF2\u4FEE | \u4E0D\u540C\u7C7B\uFF1A\u7406\u7531 }\uFF09\uFF1B\u6309\u60C5\u5F62\u8BA4\u7684\u7C7B\u5199 cases\uFF08\u6BCF\u79CD\u524D\u5E8F\u7ECF\u5386\u4E00\u884C { case: \u5BF9\u8C61\u5148\u7ECF\u5386\u4E86\u4EC0\u4E48, entry: \u4ECE\u771F\u5B9E\u5165\u53E3\u600E\u4E48\u8D70\u5230\u5B83, before: \u4FEE\u524D\u7ED3\u679C, after: \u4FEE\u540E\u7ED3\u679C }\uFF09\u3002\u5220\u5E76\u7C7B\u5199 files\uFF08\u672C\u7968\u8D77\u70B9\u5230 HEAD \u7684 git diff --name-status \u91CC\u6BCF\u4E2A\u6587\u4EF6\u4E00\u884C { file, hits: \u8BE5\u7C7B\u5728\u6B64\u6587\u4EF6\u7684\u547D\u4E2D path:line \u5217\u8868\uFF0C\u6CA1\u6709\u4E3A\u7A7A, outcome: \u5DF2\u4FEE | \u65E0\uFF1A\u6BD4\u5BF9\u4E86\u54EA\u51E0\u5904\u3001\u4E3A\u4EC0\u4E48\u4E0D\u7B97 | \u672A\u4FEE\uFF1A\u7406\u7531 }\uFF09\u3002\u5B8C\u6210\u9879\u7684 disposition \u4E3A completed\uFF0C\u53EF\u5199 commitSha\u3002\u62D2\u7EDD\u9879\u7684 disposition \u4E3A refused\uFF0C\u53EF\u5199 remainingScope\u3001blocker\u3002"
|
|
9117
9116
|
}),
|
|
9117
|
+
for: typebox_exports.Unknown({
|
|
9118
|
+
description: "\u4FEE\u7684\u662F\u54EA\u4EFD\u5224\u8BCD\uFF1A<\u5E2D>#<\u8F6E>\uFF0C\u5982 judge#5\uFF0C\u539F\u6837\u843D\u5230\u8FDB\u5EA6\u884C\uFF1B\u6CA1\u6709\u5C31\u586B null\u3002"
|
|
9119
|
+
}),
|
|
9118
9120
|
diffItems: diffItemsField,
|
|
9119
9121
|
testEvidence: typebox_exports.Unknown({
|
|
9120
9122
|
description: "\u4EC5 diff \u542B\u6D4B\u8BD5\u6539\u52A8\u65F6\u586B\u6D4B\u8BD5\u8BC1\u636E\u6761\uFF1B\u6CA1\u6709\u5C31\u586B null\u3002\u673A\u5668\u4E0D\u6838\u9A8C\u3002\u53EF\u5199 contract\uFF08\u6D4B\u8BD5\u6539\u52A8\u6240\u8BC1\u660E\u7684\u5951\u7EA6\uFF09\u3001minimumNecessaryCost\uFF08\u6D4B\u8BD5\u6539\u52A8\u7684\u4E00\u884C\u6700\u5C0F\u5FC5\u8981\u6210\u672C\uFF09\u3001measuredDuration\uFF08\u805A\u7126\u9A8C\u8BC1\u5B9E\u6D4B\u65F6\u957F\uFF09\u3002"
|
|
@@ -9246,7 +9248,6 @@ var init_notary_contracts = __esm({
|
|
|
9246
9248
|
"src/notary-contracts.ts"() {
|
|
9247
9249
|
"use strict";
|
|
9248
9250
|
init_review_submission();
|
|
9249
|
-
init_unknown_value();
|
|
9250
9251
|
NOTARY_OUTPUT_TOOL_NAME = REVIEW_SUBMISSION_OUTPUT_TOOL_NAME;
|
|
9251
9252
|
}
|
|
9252
9253
|
});
|
|
@@ -9291,7 +9292,6 @@ var init_inspector_contracts = __esm({
|
|
|
9291
9292
|
"src/inspector-contracts.ts"() {
|
|
9292
9293
|
"use strict";
|
|
9293
9294
|
init_review_submission();
|
|
9294
|
-
init_unknown_value();
|
|
9295
9295
|
INSPECTOR_OUTPUT_TOOL_NAME = REVIEW_SUBMISSION_OUTPUT_TOOL_NAME;
|
|
9296
9296
|
}
|
|
9297
9297
|
});
|
|
@@ -9302,7 +9302,6 @@ var init_auditor_output = __esm({
|
|
|
9302
9302
|
"src/package-contracts/auditor-output.ts"() {
|
|
9303
9303
|
"use strict";
|
|
9304
9304
|
init_review_submission();
|
|
9305
|
-
init_unknown_value();
|
|
9306
9305
|
AUDITOR_OUTPUT_TOOL_NAME = REVIEW_SUBMISSION_OUTPUT_TOOL_NAME;
|
|
9307
9306
|
}
|
|
9308
9307
|
});
|
|
@@ -9463,7 +9462,7 @@ var init_secretariat_contracts = __esm({
|
|
|
9463
9462
|
secretariatVerdictSchema = withTerminatingOutputDeclarations(
|
|
9464
9463
|
typebox_exports.Object(
|
|
9465
9464
|
{
|
|
9466
|
-
|
|
9465
|
+
status: typebox_exports.Unknown({
|
|
9467
9466
|
description: "converged | escalate"
|
|
9468
9467
|
}),
|
|
9469
9468
|
ticketNumber: typebox_exports.Optional(
|
|
@@ -9524,6 +9523,7 @@ var init_packaged_role_registry = __esm({
|
|
|
9524
9523
|
init_diarist_contracts();
|
|
9525
9524
|
init_secretariat_contracts();
|
|
9526
9525
|
init_judge_auditor();
|
|
9526
|
+
init_unknown_value();
|
|
9527
9527
|
LEGACY_REVIEW_OUTPUT_ROLES = /* @__PURE__ */ new Map([
|
|
9528
9528
|
["ak_judge_output", "judge"],
|
|
9529
9529
|
["ak_notary_output", "notary"],
|
|
@@ -9574,7 +9574,6 @@ var init_packaged_role_registry = __esm({
|
|
|
9574
9574
|
/** Factory board: court until another station has started, then marshal. */
|
|
9575
9575
|
boardPlacement: "judge-history",
|
|
9576
9576
|
activationStage: "load-and-install",
|
|
9577
|
-
receiptStatusKey: "status",
|
|
9578
9577
|
sessionMaterials: [
|
|
9579
9578
|
"CLAUDE.md",
|
|
9580
9579
|
"souls/judge.md",
|
|
@@ -9802,7 +9801,6 @@ var init_packaged_role_registry = __esm({
|
|
|
9802
9801
|
{ field: "ticketNumber" }
|
|
9803
9802
|
],
|
|
9804
9803
|
activationStage: "load-and-install",
|
|
9805
|
-
receiptStatusKey: "status",
|
|
9806
9804
|
// #924: 公用《票面法》三席同装
|
|
9807
9805
|
sessionMaterials: ["CLAUDE.md", "souls/countersign.md", "souls/ticket-law.md", "souls/design-law.md", "souls/audit-law.md", "souls/quality-law.md", "resources/countersign-ticket-issue.md", "docs/adr/0057-schema-narrowing-cuts-the-required-set-not-the-declared-set.md"]
|
|
9808
9806
|
},
|
|
@@ -9820,7 +9818,6 @@ var init_packaged_role_registry = __esm({
|
|
|
9820
9818
|
{ field: "ticketNumber" }
|
|
9821
9819
|
],
|
|
9822
9820
|
activationStage: "load-and-install",
|
|
9823
|
-
receiptStatusKey: "secretariatStatus",
|
|
9824
9821
|
// #924: owner-finalized Soul + 票面法 + 给事中/符宝郎行为指南
|
|
9825
9822
|
sessionMaterials: [
|
|
9826
9823
|
"CLAUDE.md",
|
|
@@ -9985,7 +9982,6 @@ var init_submission_errors = __esm({
|
|
|
9985
9982
|
"src/submission-errors.ts"() {
|
|
9986
9983
|
"use strict";
|
|
9987
9984
|
init_readable_gate_item();
|
|
9988
|
-
init_unknown_value();
|
|
9989
9985
|
}
|
|
9990
9986
|
});
|
|
9991
9987
|
|
|
@@ -10183,7 +10179,6 @@ var init_gatekeeper_role = __esm({
|
|
|
10183
10179
|
init_role_submission_declarations();
|
|
10184
10180
|
init_terminal();
|
|
10185
10181
|
init_run_terminal_artifacts();
|
|
10186
|
-
init_unknown_value();
|
|
10187
10182
|
init_serialize_thrown_value();
|
|
10188
10183
|
GATEKEEPER_TOOL_SPEC = roleSubmissionDeclaration("gatekeeper");
|
|
10189
10184
|
}
|
|
@@ -10329,7 +10324,7 @@ var init_compliance_transport = __esm({
|
|
|
10329
10324
|
"use strict";
|
|
10330
10325
|
init_role_run_placement();
|
|
10331
10326
|
init_gatekeeper_role();
|
|
10332
|
-
|
|
10327
|
+
init_packaged_role_registry();
|
|
10333
10328
|
init_terminal();
|
|
10334
10329
|
init_readable_gate_item();
|
|
10335
10330
|
init_receipt_delivery_policy();
|
|
@@ -10613,6 +10608,31 @@ var init_host_contracts = __esm({
|
|
|
10613
10608
|
}
|
|
10614
10609
|
});
|
|
10615
10610
|
|
|
10611
|
+
// src/ticket-progress.ts
|
|
10612
|
+
var init_ticket_progress = __esm({
|
|
10613
|
+
"src/ticket-progress.ts"() {
|
|
10614
|
+
"use strict";
|
|
10615
|
+
init_host_session_record();
|
|
10616
|
+
init_host_contracts();
|
|
10617
|
+
init_packaged_role_registry();
|
|
10618
|
+
init_role_run_placement();
|
|
10619
|
+
init_run_dossier();
|
|
10620
|
+
init_sitian_reader();
|
|
10621
|
+
init_unknown_value();
|
|
10622
|
+
}
|
|
10623
|
+
});
|
|
10624
|
+
|
|
10625
|
+
// src/sha256.ts
|
|
10626
|
+
import { createHash } from "node:crypto";
|
|
10627
|
+
function sha256Hex(bytes) {
|
|
10628
|
+
return createHash("sha256").update(bytes).digest("hex");
|
|
10629
|
+
}
|
|
10630
|
+
var init_sha256 = __esm({
|
|
10631
|
+
"src/sha256.ts"() {
|
|
10632
|
+
"use strict";
|
|
10633
|
+
}
|
|
10634
|
+
});
|
|
10635
|
+
|
|
10616
10636
|
// src/submission-correctable-error.ts
|
|
10617
10637
|
var correctableSubmissionErrorBrand, CorrectableSubmissionError;
|
|
10618
10638
|
var init_submission_correctable_error = __esm({
|
|
@@ -10638,14 +10658,7 @@ var init_terminating_tools = __esm({
|
|
|
10638
10658
|
init_packaged_role_registry();
|
|
10639
10659
|
init_submission_correctable_error();
|
|
10640
10660
|
init_doctor_contracts();
|
|
10641
|
-
init_gatekeeper_output();
|
|
10642
|
-
init_navigator_output();
|
|
10643
|
-
init_auditor_output();
|
|
10644
10661
|
init_merger_contracts();
|
|
10645
|
-
init_notary_contracts();
|
|
10646
|
-
init_inspector_contracts();
|
|
10647
|
-
init_diarist_contracts();
|
|
10648
|
-
init_secretariat_contracts();
|
|
10649
10662
|
init_worker_output();
|
|
10650
10663
|
init_unknown_value();
|
|
10651
10664
|
TERMINATING_TOOL_NAMES = [.../* @__PURE__ */ new Set([
|
|
@@ -10655,32 +10668,6 @@ var init_terminating_tools = __esm({
|
|
|
10655
10668
|
}
|
|
10656
10669
|
});
|
|
10657
10670
|
|
|
10658
|
-
// src/ticket-progress.ts
|
|
10659
|
-
var init_ticket_progress = __esm({
|
|
10660
|
-
"src/ticket-progress.ts"() {
|
|
10661
|
-
"use strict";
|
|
10662
|
-
init_host_session_record();
|
|
10663
|
-
init_host_contracts();
|
|
10664
|
-
init_terminating_tools();
|
|
10665
|
-
init_packaged_role_registry();
|
|
10666
|
-
init_role_run_placement();
|
|
10667
|
-
init_run_dossier();
|
|
10668
|
-
init_sitian_reader();
|
|
10669
|
-
init_unknown_value();
|
|
10670
|
-
}
|
|
10671
|
-
});
|
|
10672
|
-
|
|
10673
|
-
// src/sha256.ts
|
|
10674
|
-
import { createHash } from "node:crypto";
|
|
10675
|
-
function sha256Hex(bytes) {
|
|
10676
|
-
return createHash("sha256").update(bytes).digest("hex");
|
|
10677
|
-
}
|
|
10678
|
-
var init_sha256 = __esm({
|
|
10679
|
-
"src/sha256.ts"() {
|
|
10680
|
-
"use strict";
|
|
10681
|
-
}
|
|
10682
|
-
});
|
|
10683
|
-
|
|
10684
10671
|
// src/doctor-evidence.ts
|
|
10685
10672
|
var init_doctor_evidence = __esm({
|
|
10686
10673
|
"src/doctor-evidence.ts"() {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isTerminatingToolName } from "./package-contracts/terminating-tools.js";
|
|
2
|
+
import { LEGACY_REVIEW_OUTPUT_ROLES, receiptSeat } from "./packaged-role-registry.js";
|
|
2
3
|
import { isUuidV7, uuidv7 } from "./uuidv7.js";
|
|
3
4
|
import { isRecord } from "./unknown-value.js";
|
|
4
5
|
import { workSubjectKeysEqual } from "./work-subject-identity.js";
|
|
@@ -45,9 +46,6 @@ function isNavigatorInfrastructureFailureFact(value) {
|
|
|
45
46
|
if (!hasNavigatorInfrastructureFailureBase(value)) return false;
|
|
46
47
|
return Object.keys(value).length === NAVIGATOR_INFRASTRUCTURE_FAILURE_KEYS.length;
|
|
47
48
|
}
|
|
48
|
-
const PACKAGED_ROLE_OUTPUT_TOOLS = new Map(
|
|
49
|
-
[...PACKAGED_ROLE_REGISTRY.filter((entry) => entry.outputTool !== "ak_submission_output").map((entry) => [entry.outputTool, entry.role]), ...LEGACY_REVIEW_OUTPUT_ROLES]
|
|
50
|
-
);
|
|
51
49
|
function mintNavigatorInvocationId() {
|
|
52
50
|
return uuidv7();
|
|
53
51
|
}
|
|
@@ -87,9 +85,7 @@ function markerMatchesExpectedIdentity(marker, expected) {
|
|
|
87
85
|
}
|
|
88
86
|
function packagedRoleOutputRejectionReason(message) {
|
|
89
87
|
if (typeof message.toolName !== "string") return void 0;
|
|
90
|
-
if (!
|
|
91
|
-
return void 0;
|
|
92
|
-
}
|
|
88
|
+
if (!isTerminatingToolName(message.toolName)) return void 0;
|
|
93
89
|
if (message.isError !== true) return void 0;
|
|
94
90
|
if (classifyPackagedRoleTerminalResult(message).kind !== "nonterminal") return void 0;
|
|
95
91
|
const content = message.content;
|
|
@@ -104,7 +100,7 @@ function packagedRoleOutputRejectionReason(message) {
|
|
|
104
100
|
}
|
|
105
101
|
function classifyPackagedRoleTerminalResult(message) {
|
|
106
102
|
if (typeof message.toolName !== "string") return { kind: "nonterminal" };
|
|
107
|
-
if (!
|
|
103
|
+
if (!isTerminatingToolName(message.toolName)) return { kind: "nonterminal" };
|
|
108
104
|
const hasInfraBase = hasNavigatorInfrastructureFailureBase(message.details);
|
|
109
105
|
const infraFact = hasInfraBase ? buildNavigatorInfrastructureFailureFact() : void 0;
|
|
110
106
|
if (message.isError === true) {
|
|
@@ -128,8 +124,10 @@ function durableTerminalAt(entries, index) {
|
|
|
128
124
|
const entry = entries[index];
|
|
129
125
|
const message = entry?.type === "custom" && entry.customType === "ak-role-submission-closure" ? typeof entry.data === "object" && entry.data !== null ? entry.data : void 0 : entry?.type === "message" && entry.message?.role === "toolResult" ? entry.message : void 0;
|
|
130
126
|
if (typeof message?.toolName !== "string") return void 0;
|
|
131
|
-
const
|
|
132
|
-
|
|
127
|
+
const role = receiptSeat(message.toolName, () => {
|
|
128
|
+
const marker = entries.slice(0, index).reverse().find(isInvocationMarkerEntry);
|
|
129
|
+
return parseInvocationMarkerIdentity(marker?.data)?.role ?? "unknown";
|
|
130
|
+
})?.seat;
|
|
133
131
|
if (role === void 0) return void 0;
|
|
134
132
|
const classification = classifyPackagedRoleTerminalResult(message);
|
|
135
133
|
if (classification.kind !== "accepted" && classification.kind !== "infrastructure") {
|
package/dist/notary-contracts.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { REVIEW_SUBMISSION_OUTPUT_TOOL_NAME } from "./review-submission.js";
|
|
2
|
-
import { isRecord } from "./unknown-value.js";
|
|
3
2
|
const NOTARY_OUTPUT_TOOL_NAME = REVIEW_SUBMISSION_OUTPUT_TOOL_NAME;
|
|
4
3
|
const NOTARY_SOURCE_RUN_FLAG = {
|
|
5
4
|
name: "ak-notary-source-run",
|
|
@@ -15,15 +14,8 @@ const NOTARY_TICKET_FLAG = {
|
|
|
15
14
|
type: "string"
|
|
16
15
|
}
|
|
17
16
|
};
|
|
18
|
-
function validateRecordedNotaryOutput(value) {
|
|
19
|
-
if (!isRecord(value)) {
|
|
20
|
-
throw new Error("Notary output is not an object");
|
|
21
|
-
}
|
|
22
|
-
return value;
|
|
23
|
-
}
|
|
24
17
|
export {
|
|
25
18
|
NOTARY_OUTPUT_TOOL_NAME,
|
|
26
19
|
NOTARY_SOURCE_RUN_FLAG,
|
|
27
|
-
NOTARY_TICKET_FLAG
|
|
28
|
-
validateRecordedNotaryOutput
|
|
20
|
+
NOTARY_TICKET_FLAG
|
|
29
21
|
};
|
|
@@ -3,14 +3,4 @@
|
|
|
3
3
|
* Lawful explicit releases: converged | continue | escalate.
|
|
4
4
|
*/
|
|
5
5
|
import { REVIEW_SUBMISSION_OUTPUT_TOOL_NAME } from "../review-submission.js";
|
|
6
|
-
import { isRecord } from "../unknown-value.js";
|
|
7
6
|
export const AUDITOR_OUTPUT_TOOL_NAME = REVIEW_SUBMISSION_OUTPUT_TOOL_NAME;
|
|
8
|
-
/** #836: no field drop — original object is the receipt. */
|
|
9
|
-
export function projectLawfulAuditorOutput(value) {
|
|
10
|
-
return isRecord(value) ? value : undefined;
|
|
11
|
-
}
|
|
12
|
-
export function validateRecordedAuditorOutput(value) {
|
|
13
|
-
if (!isRecord(value))
|
|
14
|
-
throw new Error("Auditor output is not an object");
|
|
15
|
-
return value;
|
|
16
|
-
}
|
|
@@ -20,6 +20,9 @@ const fixerOutputObject = Type.Object({
|
|
|
20
20
|
classResults: Type.Unknown({
|
|
21
21
|
description: "\u5404\u7C7B class \u7ED3\u7B97\uFF0C\u539F\u6837\u7559\u5B58\u3002\u6BCF\u7C7B\u5199 name\u3001shape\uFF08\u9519\u8BEF\u5F62\u72B6\u4E00\u53E5\uFF09\u3002\u6309\u4EE3\u7801\u5F62\u72B6\u8BA4\u7684\u7C7B\u5199 search\uFF08\u5B9E\u9645\u8DD1\u7684\u641C\u7D22\u547D\u4EE4\uFF0C\u539F\u6837\uFF09\u3001hits\uFF08\u547D\u4EE4\u8F93\u51FA\u7684\u6BCF\u4E2A\u547D\u4E2D\u4E00\u884C { where: path:line, outcome: \u5DF2\u4FEE | \u4E0D\u540C\u7C7B\uFF1A\u7406\u7531 }\uFF09\uFF1B\u6309\u60C5\u5F62\u8BA4\u7684\u7C7B\u5199 cases\uFF08\u6BCF\u79CD\u524D\u5E8F\u7ECF\u5386\u4E00\u884C { case: \u5BF9\u8C61\u5148\u7ECF\u5386\u4E86\u4EC0\u4E48, entry: \u4ECE\u771F\u5B9E\u5165\u53E3\u600E\u4E48\u8D70\u5230\u5B83, before: \u4FEE\u524D\u7ED3\u679C, after: \u4FEE\u540E\u7ED3\u679C }\uFF09\u3002\u5220\u5E76\u7C7B\u5199 files\uFF08\u672C\u7968\u8D77\u70B9\u5230 HEAD \u7684 git diff --name-status \u91CC\u6BCF\u4E2A\u6587\u4EF6\u4E00\u884C { file, hits: \u8BE5\u7C7B\u5728\u6B64\u6587\u4EF6\u7684\u547D\u4E2D path:line \u5217\u8868\uFF0C\u6CA1\u6709\u4E3A\u7A7A, outcome: \u5DF2\u4FEE | \u65E0\uFF1A\u6BD4\u5BF9\u4E86\u54EA\u51E0\u5904\u3001\u4E3A\u4EC0\u4E48\u4E0D\u7B97 | \u672A\u4FEE\uFF1A\u7406\u7531 }\uFF09\u3002\u5B8C\u6210\u9879\u7684 disposition \u4E3A completed\uFF0C\u53EF\u5199 commitSha\u3002\u62D2\u7EDD\u9879\u7684 disposition \u4E3A refused\uFF0C\u53EF\u5199 remainingScope\u3001blocker\u3002"
|
|
22
22
|
}),
|
|
23
|
+
for: Type.Unknown({
|
|
24
|
+
description: "\u4FEE\u7684\u662F\u54EA\u4EFD\u5224\u8BCD\uFF1A<\u5E2D>#<\u8F6E>\uFF0C\u5982 judge#5\uFF0C\u539F\u6837\u843D\u5230\u8FDB\u5EA6\u884C\uFF1B\u6CA1\u6709\u5C31\u586B null\u3002"
|
|
25
|
+
}),
|
|
23
26
|
diffItems: diffItemsField,
|
|
24
27
|
testEvidence: Type.Unknown({
|
|
25
28
|
description: "\u4EC5 diff \u542B\u6D4B\u8BD5\u6539\u52A8\u65F6\u586B\u6D4B\u8BD5\u8BC1\u636E\u6761\uFF1B\u6CA1\u6709\u5C31\u586B null\u3002\u673A\u5668\u4E0D\u6838\u9A8C\u3002\u53EF\u5199 contract\uFF08\u6D4B\u8BD5\u6539\u52A8\u6240\u8BC1\u660E\u7684\u5951\u7EA6\uFF09\u3001minimumNecessaryCost\uFF08\u6D4B\u8BD5\u6539\u52A8\u7684\u4E00\u884C\u6700\u5C0F\u5FC5\u8981\u6210\u672C\uFF09\u3001measuredDuration\uFF08\u805A\u7126\u9A8C\u8BC1\u5B9E\u6D4B\u65F6\u957F\uFF09\u3002"
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Type } from "typebox";
|
|
2
2
|
import { openToolObject } from "../open-tool-schema.js";
|
|
3
3
|
import { withTerminatingOutputDeclarations } from "./terminating-infrastructure.js";
|
|
4
|
-
import { isRecord } from "../unknown-value.js";
|
|
5
4
|
const GATEKEEPER_OUTPUT_TOOL_NAME = "ak_gatekeeper_output";
|
|
6
5
|
const gatekeeperDecisionSchema = openToolObject(
|
|
7
6
|
Type.Object({
|
|
@@ -23,13 +22,8 @@ function asStringArray(value) {
|
|
|
23
22
|
if (!Array.isArray(value)) return [];
|
|
24
23
|
return value.filter((item) => typeof item === "string");
|
|
25
24
|
}
|
|
26
|
-
function validateRecordedGatekeeperOutput(value) {
|
|
27
|
-
if (!isRecord(value)) throw new Error("Gatekeeper output is not an object");
|
|
28
|
-
return value;
|
|
29
|
-
}
|
|
30
25
|
export {
|
|
31
26
|
GATEKEEPER_OUTPUT_TOOL_NAME,
|
|
32
27
|
gatekeeperDecisionSchema,
|
|
33
|
-
gatekeeperOutputSchema
|
|
34
|
-
validateRecordedGatekeeperOutput
|
|
28
|
+
gatekeeperOutputSchema
|
|
35
29
|
};
|
|
@@ -44,28 +44,6 @@ function byStatusFromUnknown(value) {
|
|
|
44
44
|
}
|
|
45
45
|
return out;
|
|
46
46
|
}
|
|
47
|
-
function projectLawfulNavigatorOutput(value) {
|
|
48
|
-
if (value === void 0 || value === null) return void 0;
|
|
49
|
-
if (typeof value === "string") return { prose: value };
|
|
50
|
-
if (isRecord(value)) {
|
|
51
|
-
if (typeof value.prose === "string") return { prose: value.prose };
|
|
52
|
-
if (value.prose !== void 0 && value.prose !== null) {
|
|
53
|
-
const serialized = nonEmptyProse(value.prose);
|
|
54
|
-
if (serialized !== void 0) return { prose: serialized };
|
|
55
|
-
}
|
|
56
|
-
const keys = Object.keys(value);
|
|
57
|
-
if (keys.length === 0) return { prose: "" };
|
|
58
|
-
return { prose: JSON.stringify(value) };
|
|
59
|
-
}
|
|
60
|
-
return { prose: String(value) };
|
|
61
|
-
}
|
|
62
|
-
function validateRecordedNavigatorOutput(value) {
|
|
63
|
-
const projected = projectLawfulNavigatorOutput(value);
|
|
64
|
-
if (projected === void 0) {
|
|
65
|
-
throw new Error("Navigator output is empty");
|
|
66
|
-
}
|
|
67
|
-
return projected;
|
|
68
|
-
}
|
|
69
47
|
function preparedAdviceFromUnknown(value) {
|
|
70
48
|
if (value === void 0 || value === null) return void 0;
|
|
71
49
|
if (typeof value === "string") {
|
|
@@ -124,7 +102,5 @@ export {
|
|
|
124
102
|
navigatorAdviceFields,
|
|
125
103
|
navigatorOutputSchema,
|
|
126
104
|
pickPreparedProse,
|
|
127
|
-
preparedAdviceFromUnknown
|
|
128
|
-
projectLawfulNavigatorOutput,
|
|
129
|
-
validateRecordedNavigatorOutput
|
|
105
|
+
preparedAdviceFromUnknown
|
|
130
106
|
};
|
|
@@ -14,11 +14,7 @@ const reviewerOutputObject = Type.Object({
|
|
|
14
14
|
const reviewerOutputSchema = withTerminatingOutputDeclarations(
|
|
15
15
|
openToolObject(reviewerOutputObject)
|
|
16
16
|
);
|
|
17
|
-
function validateReviewerIntent(output) {
|
|
18
|
-
return output;
|
|
19
|
-
}
|
|
20
17
|
export {
|
|
21
18
|
REVIEWER_OUTPUT_TOOL_NAME,
|
|
22
|
-
reviewerOutputSchema
|
|
23
|
-
validateReviewerIntent
|
|
19
|
+
reviewerOutputSchema
|
|
24
20
|
};
|
|
@@ -4,21 +4,14 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { COLLECTOR_OUTPUT_TOOL, } from "./collector-output.js";
|
|
6
6
|
import { JUDGE_OUTPUT_TOOL_NAME, } from "./judge-output.js";
|
|
7
|
-
import { REVIEWER_OUTPUT_TOOL_NAME,
|
|
8
|
-
import { LEGACY_REVIEW_OUTPUT_ROLES, PACKAGED_ROLE_REGISTRY } from "../packaged-role-registry.js";
|
|
7
|
+
import { REVIEWER_OUTPUT_TOOL_NAME, } from "./reviewer-output.js";
|
|
8
|
+
import { LEGACY_REVIEW_OUTPUT_ROLES, PACKAGED_ROLE_REGISTRY, packagedRoleMetadata, receiptSeat, receiptStatus, } from "../packaged-role-registry.js";
|
|
9
9
|
import { CorrectableSubmissionError } from "../submission-correctable-error.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { NAVIGATOR_OUTPUT_TOOL_NAME, validateRecordedNavigatorOutput } from "./navigator-output.js";
|
|
13
|
-
import { AUDITOR_OUTPUT_TOOL_NAME, validateRecordedAuditorOutput } from "./auditor-output.js";
|
|
14
|
-
import { MERGER_OUTPUT_TOOL_NAME, validateMergerOutput } from "../merger-contracts.js";
|
|
15
|
-
import { NOTARY_OUTPUT_TOOL_NAME, validateRecordedNotaryOutput } from "../notary-contracts.js";
|
|
16
|
-
import { INSPECTOR_OUTPUT_TOOL_NAME, validateRecordedInspectorOutput } from "../inspector-contracts.js";
|
|
17
|
-
import { DIARIST_OUTPUT_TOOL_NAME, validateRecordedDiaristOutput } from "../diarist-contracts.js";
|
|
18
|
-
import { SECRETARIAT_OUTPUT_TOOL_NAME } from "../secretariat-contracts.js";
|
|
10
|
+
import { validateDoctorSubmissionShape } from "../doctor-contracts.js";
|
|
11
|
+
import { MERGER_OUTPUT_TOOL_NAME } from "../merger-contracts.js";
|
|
19
12
|
import { CODER_OUTPUT_TOOL_NAME, FIXER_OUTPUT_TOOL_NAME, validateAcceptedWorkerDetails, } from "./worker-output.js";
|
|
20
13
|
import { isRecord } from "../unknown-value.js";
|
|
21
|
-
export { CODER_OUTPUT_TOOL_NAME, COLLECTOR_OUTPUT_TOOL, FIXER_OUTPUT_TOOL_NAME, JUDGE_OUTPUT_TOOL_NAME, REVIEWER_OUTPUT_TOOL_NAME, MERGER_OUTPUT_TOOL_NAME,
|
|
14
|
+
export { CODER_OUTPUT_TOOL_NAME, COLLECTOR_OUTPUT_TOOL, FIXER_OUTPUT_TOOL_NAME, JUDGE_OUTPUT_TOOL_NAME, REVIEWER_OUTPUT_TOOL_NAME, MERGER_OUTPUT_TOOL_NAME, validateAcceptedWorkerDetails, validateDoctorSubmissionShape, };
|
|
22
15
|
export const TERMINATING_TOOL_NAMES = [...new Set([
|
|
23
16
|
...PACKAGED_ROLE_REGISTRY.map((entry) => entry.outputTool),
|
|
24
17
|
...LEGACY_REVIEW_OUTPUT_ROLES.keys(),
|
|
@@ -44,21 +37,14 @@ export function validateAcceptedDetails(_toolName, details) {
|
|
|
44
37
|
// Non-object payload still records as empty object rather than rejecting.
|
|
45
38
|
return {};
|
|
46
39
|
}
|
|
47
|
-
/**
|
|
48
|
-
* #836: args↔details equality rejection deleted. Details are recorded as submitted.
|
|
49
|
-
*/
|
|
50
|
-
export function validateAcceptedLifecycle(toolName, _argumentsValue, detailsValue) {
|
|
51
|
-
return validateAcceptedDetails(toolName, detailsValue);
|
|
52
|
-
}
|
|
53
40
|
/** Read status/commit leaves the role wrote — never invent defaults (#836). */
|
|
54
41
|
export function acceptedFacts(toolName, details) {
|
|
55
42
|
const record = details;
|
|
56
|
-
const
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
const status = typeof record[statusKey] === "string" ? record[statusKey] : undefined;
|
|
43
|
+
const received = receiptStatus(details);
|
|
44
|
+
const status = typeof received === "string" ? received : undefined;
|
|
45
|
+
// The commit leaf is one seat's own. The shared tool name carries none.
|
|
46
|
+
const seat = receiptSeat(toolName, () => undefined)?.seat;
|
|
47
|
+
const entry = seat === undefined ? undefined : packagedRoleMetadata(seat);
|
|
62
48
|
const commitKey = entry !== undefined && "receiptCommitKey" in entry ? entry.receiptCommitKey : undefined;
|
|
63
49
|
const commitWhen = entry !== undefined && "receiptCommitWhen" in entry ? entry.receiptCommitWhen : undefined;
|
|
64
50
|
const commit = commitKey !== undefined
|
|
@@ -14,6 +14,7 @@ import { AUDITOR_OUTPUT_TOOL_NAME } from "./package-contracts/auditor-output.js"
|
|
|
14
14
|
import { DIARIST_OUTPUT_TOOL_NAME } from "./diarist-contracts.js";
|
|
15
15
|
import { SECRETARIAT_OUTPUT_TOOL_NAME } from "./secretariat-contracts.js";
|
|
16
16
|
import { JUDGE_AUDIT_TOOL_NAME } from "./judge-auditor.js";
|
|
17
|
+
import { isRecord } from "./unknown-value.js";
|
|
17
18
|
const LEGACY_REVIEW_OUTPUT_ROLES = /* @__PURE__ */ new Map([
|
|
18
19
|
["ak_judge_output", "judge"],
|
|
19
20
|
["ak_notary_output", "notary"],
|
|
@@ -21,6 +22,22 @@ const LEGACY_REVIEW_OUTPUT_ROLES = /* @__PURE__ */ new Map([
|
|
|
21
22
|
["ak_inspector_output", "inspector"],
|
|
22
23
|
["ak_auditor_output", "auditor"]
|
|
23
24
|
]);
|
|
25
|
+
const RECEIPT_STATUS_KEYS = ["status", "secretariatStatus", "judgeStatus", "countersignStatus"];
|
|
26
|
+
function receiptStatus(receipt) {
|
|
27
|
+
if (!isRecord(receipt)) return void 0;
|
|
28
|
+
for (const key of RECEIPT_STATUS_KEYS) {
|
|
29
|
+
if (Object.hasOwn(receipt, key)) return receipt[key];
|
|
30
|
+
}
|
|
31
|
+
return void 0;
|
|
32
|
+
}
|
|
33
|
+
function receiptSeat(toolName, runSeat) {
|
|
34
|
+
const legacy = LEGACY_REVIEW_OUTPUT_ROLES.get(toolName);
|
|
35
|
+
if (legacy !== void 0) return { seat: legacy, source: "tool" };
|
|
36
|
+
const owners = PACKAGED_ROLE_REGISTRY.filter((entry) => entry.outputTool === toolName);
|
|
37
|
+
if (owners.length === 1) return { seat: owners[0].role, source: "tool" };
|
|
38
|
+
const seat = owners.length === 0 ? void 0 : runSeat();
|
|
39
|
+
return seat === void 0 ? void 0 : { seat, source: "invocation" };
|
|
40
|
+
}
|
|
24
41
|
const NOTARY_SESSION_MATERIALS = [
|
|
25
42
|
"CLAUDE.md",
|
|
26
43
|
"souls/notary.md",
|
|
@@ -64,7 +81,6 @@ const PUBLIC_ROLE_RECORDS = [
|
|
|
64
81
|
/** Factory board: court until another station has started, then marshal. */
|
|
65
82
|
boardPlacement: "judge-history",
|
|
66
83
|
activationStage: "load-and-install",
|
|
67
|
-
receiptStatusKey: "status",
|
|
68
84
|
sessionMaterials: [
|
|
69
85
|
"CLAUDE.md",
|
|
70
86
|
"souls/judge.md",
|
|
@@ -292,7 +308,6 @@ const PUBLIC_ROLE_RECORDS = [
|
|
|
292
308
|
{ field: "ticketNumber" }
|
|
293
309
|
],
|
|
294
310
|
activationStage: "load-and-install",
|
|
295
|
-
receiptStatusKey: "status",
|
|
296
311
|
// #924: 公用《票面法》三席同装
|
|
297
312
|
sessionMaterials: ["CLAUDE.md", "souls/countersign.md", "souls/ticket-law.md", "souls/design-law.md", "souls/audit-law.md", "souls/quality-law.md", "resources/countersign-ticket-issue.md", "docs/adr/0057-schema-narrowing-cuts-the-required-set-not-the-declared-set.md"]
|
|
298
313
|
},
|
|
@@ -310,7 +325,6 @@ const PUBLIC_ROLE_RECORDS = [
|
|
|
310
325
|
{ field: "ticketNumber" }
|
|
311
326
|
],
|
|
312
327
|
activationStage: "load-and-install",
|
|
313
|
-
receiptStatusKey: "secretariatStatus",
|
|
314
328
|
// #924: owner-finalized Soul + 票面法 + 给事中/符宝郎行为指南
|
|
315
329
|
sessionMaterials: [
|
|
316
330
|
"CLAUDE.md",
|
|
@@ -623,5 +637,7 @@ export {
|
|
|
623
637
|
packagedRolePhaseFlag,
|
|
624
638
|
packagedRoleSessionMaterials,
|
|
625
639
|
packagedStoresSourceRunRaw,
|
|
626
|
-
packagedSubjectChoices
|
|
640
|
+
packagedSubjectChoices,
|
|
641
|
+
receiptSeat,
|
|
642
|
+
receiptStatus
|
|
627
643
|
};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { readableGateItem } from "../readable-gate-item.js";
|
|
2
2
|
import { currentReplyRows } from "./terminal.js";
|
|
3
|
-
import {
|
|
3
|
+
import { receiptStatus } from "../packaged-role-registry.js";
|
|
4
4
|
function isEscalatePayload(payload) {
|
|
5
|
-
|
|
6
|
-
return false;
|
|
7
|
-
return (payload.status === "escalate");
|
|
5
|
+
return receiptStatus(payload) === "escalate";
|
|
8
6
|
}
|
|
9
7
|
/**
|
|
10
8
|
* Parent diagnostic for court-diarist escalate (#953 / 失败诚实 / 传话).
|