@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.
@@ -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", "incomplete"],
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 residual incomplete share one present path.
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 + residual incomplete).
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).