@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,6 +1,6 @@
|
|
|
1
1
|
import { auditorRunDirectory } from "./role-run-placement.js";
|
|
2
2
|
import { officerConclusionReask } from "./gatekeeper-role.js";
|
|
3
|
-
import {
|
|
3
|
+
import { receiptStatus } from "./packaged-role-registry.js";
|
|
4
4
|
import { currentReplyRows } from "./public-cli/terminal.js";
|
|
5
5
|
import { readableGateItem } from "./readable-gate-item.js";
|
|
6
6
|
import { deliveryLimitFromConfig } from "./receipt-delivery-policy.js";
|
|
@@ -22,7 +22,7 @@ function tryReadComplianceCandidate(arguments_, usage) {
|
|
|
22
22
|
return void 0;
|
|
23
23
|
}
|
|
24
24
|
const args = arguments_;
|
|
25
|
-
const status =
|
|
25
|
+
const status = receiptStatus(arguments_);
|
|
26
26
|
if (status === "converged") return { status, receipt: arguments_, ...usage === void 0 ? {} : { usage } };
|
|
27
27
|
if (status === "continue") return { status, violations: readListField(args.violations), receipt: arguments_, ...usage === void 0 ? {} : { usage } };
|
|
28
28
|
if (status === "escalate") {
|
|
@@ -126,7 +126,7 @@ async function runComplianceAudit(options) {
|
|
|
126
126
|
if (decision.status === "received") {
|
|
127
127
|
if (reasksSpent >= reaskLimit) return decision;
|
|
128
128
|
reasksSpent += 1;
|
|
129
|
-
reask = officerConclusionReask(
|
|
129
|
+
reask = officerConclusionReask(receiptStatus(decision.reply));
|
|
130
130
|
continue;
|
|
131
131
|
}
|
|
132
132
|
return decision;
|
|
@@ -13,22 +13,6 @@ import { projectTicketProvenanceSessions, } from "./ticket-provenance-contracts.
|
|
|
13
13
|
import { isSafePositiveTicketNumber } from "./run-ticket-number.js";
|
|
14
14
|
import { isRecord } from "./unknown-value.js";
|
|
15
15
|
export const DIARIST_OUTPUT_TOOL_NAME = "ak_diarist_output";
|
|
16
|
-
export function validateRecordedDiaristOutput(value) {
|
|
17
|
-
if (!isRecord(value)) {
|
|
18
|
-
throw new Error("Diarist output has no execution discriminator");
|
|
19
|
-
}
|
|
20
|
-
let status;
|
|
21
|
-
try {
|
|
22
|
-
status = value.status;
|
|
23
|
-
}
|
|
24
|
-
catch {
|
|
25
|
-
throw new Error("Diarist output has no execution discriminator");
|
|
26
|
-
}
|
|
27
|
-
if (status === "completed" || status === "escalate") {
|
|
28
|
-
return value;
|
|
29
|
-
}
|
|
30
|
-
throw new Error("Diarist output has no execution discriminator");
|
|
31
|
-
}
|
|
32
16
|
/**
|
|
33
17
|
* Project sessions from a completed diarist payload.
|
|
34
18
|
* Null / absent key → empty (lawful). Non-null but unusable → undefined (caller reasks).
|
package/dist/diarist-role.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { DIARIST_OUTPUT_TOOL_NAME, diaristOutputSchema,
|
|
1
|
+
import { DIARIST_OUTPUT_TOOL_NAME, diaristOutputSchema, } from "./diarist-contracts.js";
|
|
2
2
|
import { roleSubmissionDeclaration } from "./role-submission-declarations.js";
|
|
3
3
|
export { DIARIST_OUTPUT_TOOL_NAME, diaristOutputSchema, } from "./diarist-contracts.js";
|
|
4
|
-
export { validateRecordedDiaristOutput };
|
|
5
4
|
/**
|
|
6
5
|
* 决定工具规格。生命周期装配归注册信封 owner——src/role-runtime.ts(ADR 0018)。
|
|
7
6
|
*/
|
package/dist/doctor-contracts.js
CHANGED
|
@@ -46,9 +46,6 @@ function read(value, key) {
|
|
|
46
46
|
function validateDoctorSubmissionShape(value) {
|
|
47
47
|
return value;
|
|
48
48
|
}
|
|
49
|
-
function validateRecordedDoctorOutput(value) {
|
|
50
|
-
return value;
|
|
51
|
-
}
|
|
52
49
|
class DoctorEvidenceStore {
|
|
53
50
|
constructor(patient) {
|
|
54
51
|
this.patient = patient;
|
|
@@ -109,6 +106,5 @@ export {
|
|
|
109
106
|
doctorEvidenceReadSchema,
|
|
110
107
|
doctorSubmissionSchema,
|
|
111
108
|
validateDoctorOutput,
|
|
112
|
-
validateDoctorSubmissionShape
|
|
113
|
-
validateRecordedDoctorOutput
|
|
109
|
+
validateDoctorSubmissionShape
|
|
114
110
|
};
|
package/dist/gatekeeper-role.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { auditorRunDirectory } from "./role-run-placement.js";
|
|
2
|
-
import { packagedGateStageLabel } from "./packaged-role-registry.js";
|
|
3
|
-
import {
|
|
2
|
+
import { packagedGateStageLabel, receiptStatus } from "./packaged-role-registry.js";
|
|
3
|
+
import { unreadableDiscriminatorNotice } from "./submission-errors.js";
|
|
4
4
|
import { INSPECTOR_OUTPUT_TOOL_NAME } from "./inspector-contracts.js";
|
|
5
5
|
import { REVIEW_QUEUE_STATUSES, REVIEW_SUBMISSION_OUTPUT_TOOL_NAME } from "./review-submission.js";
|
|
6
6
|
import { GATEKEEPER_OUTPUT_TOOL_NAME } from "./package-contracts/gatekeeper-output.js";
|
|
7
7
|
import { roleSubmissionDeclaration } from "./role-submission-declarations.js";
|
|
8
8
|
import { currentReplyRows } from "./public-cli/terminal.js";
|
|
9
9
|
import { runIdFromRunDirectory } from "./run-terminal-artifacts.js";
|
|
10
|
-
import { isRecord } from "./unknown-value.js";
|
|
11
10
|
import { serializeThrownValue } from "./serialize-thrown-value.js";
|
|
12
11
|
export const INSPECTOR_OUTPUT_TOOL = INSPECTOR_OUTPUT_TOOL_NAME;
|
|
13
12
|
export const NOTARY_OUTPUT_TOOL = REVIEW_SUBMISSION_OUTPUT_TOOL_NAME;
|
|
@@ -49,10 +48,8 @@ function reviewQueueStatus(status) {
|
|
|
49
48
|
}
|
|
50
49
|
function projectOfficerDecision(officer, decision, fallbackStatus) {
|
|
51
50
|
const receipt = retainedReceipt(decision);
|
|
52
|
-
const
|
|
53
|
-
const status =
|
|
54
|
-
? receivedDiscriminator(record, "status")
|
|
55
|
-
: fallbackStatus;
|
|
51
|
+
const received = receiptStatus(decision);
|
|
52
|
+
const status = received === undefined ? fallbackStatus : received;
|
|
56
53
|
const queueStatus = typeof status === "string" ? reviewQueueStatus(status) : undefined;
|
|
57
54
|
if (queueStatus === "converged") {
|
|
58
55
|
return { status: "converged", officer, receipt };
|
|
@@ -168,7 +165,7 @@ function projectOfficerTerminal(officer, summoned) {
|
|
|
168
165
|
status: "needs_reask",
|
|
169
166
|
officer,
|
|
170
167
|
receipt,
|
|
171
|
-
receivedStatus:
|
|
168
|
+
receivedStatus: receiptStatus(receipt),
|
|
172
169
|
}, summoned);
|
|
173
170
|
}
|
|
174
171
|
// outcome.status is the fixture/compat leaf: production settlement leaves
|
|
@@ -182,7 +179,7 @@ function projectOfficerTerminal(officer, summoned) {
|
|
|
182
179
|
officer,
|
|
183
180
|
// This-court receipt only (#879).
|
|
184
181
|
receipt,
|
|
185
|
-
receivedStatus:
|
|
182
|
+
receivedStatus: receiptStatus(receipt),
|
|
186
183
|
}, summoned);
|
|
187
184
|
}
|
|
188
185
|
/**
|