@akagilnc/pi-workflow-roles 0.1.2383 → 0.1.2397
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/audit-escalation.js +0 -13
- package/dist/compliance-transport.js +28 -5
- package/dist/dossier-resolution.js +21 -2
- package/dist/evidence-child-executor.js +1 -1
- package/dist/navigator-invocation-identity.js +16 -4
- package/dist/notary-contracts.js +4 -17
- package/dist/package-contracts/terminating-tools.js +1 -1
- package/dist/public-cli/main.js +101 -374
- package/package.json +1 -1
- package/src/analyst-gate-cycles-read.ts +5 -8
- package/src/audit-escalation.ts +0 -25
- package/src/compliance-transport.ts +38 -6
- package/src/doctor-auditor.ts +3 -3
- package/src/doctor-role.ts +1 -1
- package/src/dossier-resolution.ts +25 -4
- package/src/evidence-child-executor.ts +1 -1
- package/src/gatekeeper-role.ts +33 -43
- package/src/judge-auditor.ts +3 -3
- package/src/judge-role.ts +0 -1
- package/src/navigator-invocation-identity.ts +34 -13
- package/src/notary-contracts.ts +5 -19
- package/src/notary-role.ts +2 -2
- package/src/package-contracts/terminating-tools.ts +1 -1
- package/src/public-cli/doctor-run.ts +0 -2
- package/src/public-cli/fixer-run.ts +0 -15
- package/src/public-cli/judge-run.ts +0 -16
- package/src/public-cli/notary-run.ts +1 -1
- package/src/public-cli/one-shot-dispatch.ts +1 -1
- package/src/public-cli/reviewer-run.ts +0 -15
- package/src/public-cli/settlement.ts +102 -348
- package/src/public-cli/terminal.ts +3 -71
- package/src/reviewer-auditor.ts +3 -3
- package/src/reviewer-role.ts +0 -1
- package/src/role-runtime.ts +42 -9
|
@@ -168,7 +168,7 @@ export function validateAcceptedDetails(
|
|
|
168
168
|
[COLLECTOR_OUTPUT_TOOL]: [],
|
|
169
169
|
[DOCTOR_OUTPUT_TOOL_NAME]: ["completed", "refused"],
|
|
170
170
|
[MERGER_OUTPUT_TOOL_NAME]: ["completed", "escalate"],
|
|
171
|
-
[NOTARY_OUTPUT_TOOL_NAME]: ["pass", "bounce"
|
|
171
|
+
[NOTARY_OUTPUT_TOOL_NAME]: ["pass", "bounce"],
|
|
172
172
|
};
|
|
173
173
|
const collectorDiscriminator = toolName === COLLECTOR_OUTPUT_TOOL && Array.isArray(candidate?.groups);
|
|
174
174
|
const baseDiscriminator = typeof discriminator === "string" ? seatFallbackBaseStatus(discriminator) : discriminator;
|
|
@@ -21,7 +21,6 @@ import {
|
|
|
21
21
|
} from "./one-shot-dispatch.ts";
|
|
22
22
|
import {
|
|
23
23
|
presentStructuralRejection,
|
|
24
|
-
trySettleComplianceAuditIncompleteTerminalResult,
|
|
25
24
|
trySettleDoctorTerminalResult,
|
|
26
25
|
} from "./settlement.ts";
|
|
27
26
|
import type { CliIo } from "./cli-io.ts";
|
|
@@ -122,7 +121,6 @@ export async function runPublicDoctor(
|
|
|
122
121
|
trySettle: trySettleDoctorTerminalResult,
|
|
123
122
|
shouldPresentSettled: (terminal) =>
|
|
124
123
|
isLawfulTypedTerminalOutcome(terminal.roleOutcome),
|
|
125
|
-
trySettleSecondary: trySettleComplianceAuditIncompleteTerminalResult,
|
|
126
124
|
},
|
|
127
125
|
...(env.engine === undefined ? {} : { effectiveEngine: env.engine }),
|
|
128
126
|
});
|
|
@@ -70,7 +70,6 @@ import {
|
|
|
70
70
|
explicitInternalKnownFailureClassificationInput,
|
|
71
71
|
settleFailureTerminalResult,
|
|
72
72
|
trySettleFixerTerminalResult,
|
|
73
|
-
trySettleComplianceAuditIncompleteTerminalResult,
|
|
74
73
|
} from "./settlement.ts";
|
|
75
74
|
import type { CliIo } from "./cli-io.ts";
|
|
76
75
|
import type {
|
|
@@ -390,20 +389,6 @@ async function dispatchAdmittedFixer(input: {
|
|
|
390
389
|
};
|
|
391
390
|
}
|
|
392
391
|
|
|
393
|
-
const auditIncomplete = await trySettleComplianceAuditIncompleteTerminalResult(admitted);
|
|
394
|
-
if (auditIncomplete !== undefined) {
|
|
395
|
-
await markRunTerminal(admitted.runDirectory).catch(() => undefined);
|
|
396
|
-
if (auditIncomplete.roleOutcome.kind === "failure") {
|
|
397
|
-
presentFailureTerminal(auditIncomplete, io);
|
|
398
|
-
} else {
|
|
399
|
-
io.stdout(formatTerminalResult(auditIncomplete));
|
|
400
|
-
}
|
|
401
|
-
return {
|
|
402
|
-
exitCode: exitCodeForTerminalOutcome(auditIncomplete.roleOutcome),
|
|
403
|
-
admitted,
|
|
404
|
-
terminal: auditIncomplete,
|
|
405
|
-
};
|
|
406
|
-
}
|
|
407
392
|
|
|
408
393
|
const credentialFailure = postRunMissingCredentialFailure(
|
|
409
394
|
result,
|
|
@@ -64,7 +64,6 @@ import {
|
|
|
64
64
|
readEngineDetourInfrastructureFailure,
|
|
65
65
|
settleJudgeFailureTerminalResult,
|
|
66
66
|
trySettleJudgeTerminalResult,
|
|
67
|
-
trySettleComplianceAuditIncompleteTerminalResult,
|
|
68
67
|
} from "./settlement.ts";
|
|
69
68
|
import type { CliIo } from "./cli-io.ts";
|
|
70
69
|
import type {
|
|
@@ -370,21 +369,6 @@ async function dispatchAdmittedJudge(input: {
|
|
|
370
369
|
};
|
|
371
370
|
}
|
|
372
371
|
|
|
373
|
-
const auditIncomplete = await trySettleComplianceAuditIncompleteTerminalResult(admitted);
|
|
374
|
-
if (auditIncomplete !== undefined) {
|
|
375
|
-
await markRunTerminal(admitted.runDirectory).catch(() => undefined);
|
|
376
|
-
if (auditIncomplete.roleOutcome.kind === "failure") {
|
|
377
|
-
presentFailureTerminal(auditIncomplete, io);
|
|
378
|
-
} else {
|
|
379
|
-
io.stdout(formatTerminalResult(auditIncomplete));
|
|
380
|
-
}
|
|
381
|
-
return {
|
|
382
|
-
exitCode: exitCodeForTerminalOutcome(auditIncomplete.roleOutcome),
|
|
383
|
-
admitted,
|
|
384
|
-
terminal: auditIncomplete,
|
|
385
|
-
};
|
|
386
|
-
}
|
|
387
|
-
|
|
388
372
|
// Prefer engine-detour infrastructure failure already on the session principal
|
|
389
373
|
// over a later secondary provider-stop after abort (#357 T2 / collector-isomorphic).
|
|
390
374
|
const infrastructureFailure = await readEngineDetourInfrastructureFailure(
|
|
@@ -109,7 +109,7 @@ export async function runPublicNotary(
|
|
|
109
109
|
extraArgs,
|
|
110
110
|
adapters: {
|
|
111
111
|
trySettle: trySettleNotaryTerminalResult,
|
|
112
|
-
// Accepted receipts and
|
|
112
|
+
// Accepted receipts and failure terminals both present via shared path.
|
|
113
113
|
shouldPresentSettled: () => true,
|
|
114
114
|
},
|
|
115
115
|
...(env.engine === undefined ? {} : { effectiveEngine: env.engine }),
|
|
@@ -59,7 +59,7 @@ export type OneShotRunEnv = {
|
|
|
59
59
|
/**
|
|
60
60
|
* Role-specific settlement hooks. Lifecycle coordination stays in this module.
|
|
61
61
|
* - Doctor: present only lawful typed outcomes; optional compliance-audit secondary.
|
|
62
|
-
* - Notary: present any settled terminal (accepted
|
|
62
|
+
* - Notary: present any settled terminal (accepted or failure).
|
|
63
63
|
*/
|
|
64
64
|
export type OneShotSettlementAdapters<A extends AdmittedRoleInvocation> = {
|
|
65
65
|
trySettle: (admitted: A) => Promise<TerminalResult | undefined>;
|
|
@@ -72,7 +72,6 @@ import {
|
|
|
72
72
|
readEngineDetourInfrastructureFailure,
|
|
73
73
|
settleFailureTerminalResult,
|
|
74
74
|
trySettleReviewerTerminalResult,
|
|
75
|
-
trySettleComplianceAuditIncompleteTerminalResult,
|
|
76
75
|
} from "./settlement.ts";
|
|
77
76
|
import type { CliIo } from "./cli-io.ts";
|
|
78
77
|
import type {
|
|
@@ -398,20 +397,6 @@ async function dispatchAdmittedReviewer(input: {
|
|
|
398
397
|
};
|
|
399
398
|
}
|
|
400
399
|
|
|
401
|
-
const auditIncomplete = await trySettleComplianceAuditIncompleteTerminalResult(admitted);
|
|
402
|
-
if (auditIncomplete !== undefined) {
|
|
403
|
-
await markRunTerminal(admitted.runDirectory).catch(() => undefined);
|
|
404
|
-
if (auditIncomplete.roleOutcome.kind === "failure") {
|
|
405
|
-
presentFailureTerminal(auditIncomplete, io);
|
|
406
|
-
} else {
|
|
407
|
-
io.stdout(formatTerminalResult(auditIncomplete));
|
|
408
|
-
}
|
|
409
|
-
return {
|
|
410
|
-
exitCode: exitCodeForTerminalOutcome(auditIncomplete.roleOutcome),
|
|
411
|
-
admitted,
|
|
412
|
-
terminal: auditIncomplete,
|
|
413
|
-
};
|
|
414
|
-
}
|
|
415
400
|
|
|
416
401
|
// Prefer engine-detour infrastructure failure already on the session principal
|
|
417
402
|
// over a later secondary knownFailure / provider-stop after abort (#357 T2 / #378).
|