@akagilnc/pi-workflow-roles 0.1.5583 → 0.1.5598

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.
Files changed (41) hide show
  1. package/README.md +2 -0
  2. package/README.zh-CN.md +2 -0
  3. package/dist/acp-host/production-host.js +393 -854
  4. package/dist/collector-config.js +0 -44
  5. package/dist/headless-host/production-host.js +361 -822
  6. package/dist/merger-contracts.js +6 -2
  7. package/dist/migrate-book-topology.js +4855 -10472
  8. package/dist/package-contracts/worker-output.js +1 -6
  9. package/dist/packaged-role-registry.js +5 -4
  10. package/dist/public-cli/instruction-seat-run.js +8 -8
  11. package/dist/public-cli/invocation.js +93 -236
  12. package/dist/public-cli/main.js +18409 -18786
  13. package/dist/public-cli/option-definitions.js +7 -7
  14. package/dist/public-cli/post-admission.js +11 -40
  15. package/dist/public-cli/run-lifecycle.js +11 -43
  16. package/dist/public-role-summons.js +1 -1
  17. package/dist/role-run-relocation.js +14 -23
  18. package/package.json +1 -1
  19. package/scripts/build-package.mjs +0 -1
  20. package/src/collector-config.ts +0 -42
  21. package/src/collector-role.ts +10 -20
  22. package/src/host-contracts.ts +0 -3
  23. package/src/merger-contracts.ts +6 -2
  24. package/src/merger-role.ts +11 -1
  25. package/src/navigator-attendance.ts +2 -2
  26. package/src/package-contracts/worker-output.ts +0 -8
  27. package/src/packaged-role-registry.ts +4 -3
  28. package/src/public-cli/instruction-seat-run.ts +7 -8
  29. package/src/public-cli/invocation.ts +113 -351
  30. package/src/public-cli/option-definitions.ts +7 -7
  31. package/src/public-cli/post-admission.ts +12 -56
  32. package/src/public-cli/run-lifecycle.ts +11 -55
  33. package/src/public-role-summons.ts +1 -1
  34. package/src/role-run-placement.ts +0 -1
  35. package/src/role-run-relocation.ts +14 -25
  36. package/src/role-runtime-dependencies.ts +0 -2
  37. package/src/role-runtime.ts +0 -16
  38. package/src/worker-role.ts +11 -78
  39. package/dist/package-contracts/fixer-packet.js +0 -77
  40. package/packets/fixer-prerequisites.json +0 -6
  41. package/src/package-contracts/fixer-packet.ts +0 -91
@@ -6,7 +6,6 @@ import {
6
6
  PARTIALLY_COMPLETED_DEFINITION,
7
7
  validateFixerOutput
8
8
  } from "./fixer-output.js";
9
- import { fixerPrerequisiteSchema, fixerPrerequisitesSchema, parseFixerPrerequisites, validateFixerPrerequisites } from "./fixer-packet.js";
10
9
  import { withTerminatingOutputDeclarations } from "./terminating-infrastructure.js";
11
10
  const CODER_OUTPUT_TOOL_NAME = "ak_coder_output";
12
11
  function validateAcceptedCoderDetails(output) {
@@ -32,11 +31,7 @@ export {
32
31
  FIXER_OUTPUT_TOOL_NAME,
33
32
  coderOutputSchema,
34
33
  fixerOutputSchema,
35
- fixerPrerequisiteSchema,
36
- fixerPrerequisitesSchema,
37
- parseFixerPrerequisites,
38
34
  validateAcceptedCoderDetails,
39
35
  validateAcceptedWorkerDetails,
40
- validateFixerOutput,
41
- validateFixerPrerequisites
36
+ validateFixerOutput
42
37
  };
@@ -91,10 +91,10 @@ const PUBLIC_ROLE_RECORDS = [
91
91
  reportPhase: true
92
92
  },
93
93
  boardPlacement: "marshal",
94
+ /** #1168: dispatch is first message; navigator reads admitted instruction. */
95
+ navigatorSubject: "public-instruction",
94
96
  activationFlags: [
95
- { field: "packetPath", flag: "ak-fix-packet", binds: "input" },
96
- { field: "phase", flag: "ak-fixer-phase", binds: "phase" },
97
- { field: "prerequisitesPath", flag: "ak-fixer-prerequisites" }
97
+ { field: "phase", flag: "ak-fixer-phase", binds: "phase" }
98
98
  ],
99
99
  activationStage: "load-and-install",
100
100
  sessionMaterials: [
@@ -121,8 +121,9 @@ const PUBLIC_ROLE_RECORDS = [
121
121
  artifactFace: {
122
122
  reportPhase: true
123
123
  },
124
+ /** #1168: dispatch is first message; navigator reads admitted instruction. */
125
+ navigatorSubject: "public-instruction",
124
126
  activationFlags: [
125
- { field: "taskPath", flag: "ak-coder-task", binds: "input" },
126
127
  { field: "phase", flag: "ak-coder-phase", binds: "phase" }
127
128
  ],
128
129
  activationStage: "load-and-install",
@@ -27,7 +27,7 @@ import { NotarySourceRunError, resolveNotarySourceRunLocator } from "../notary-s
27
27
  import { packagedAdmitsCountersign, packagedBindsBoardTicket, packagedRebindSourceOnResume, packagedRoleMetadata, } from "../packaged-role-registry.js";
28
28
  import { readAuditorResumeBinding } from "../auditor-soul.js";
29
29
  import { CliUsageError } from "./cli-errors.js";
30
- import { admitPublicRole, bindAdmittedTicketNumber, buildInstructionTransportPrompt, materializeCountersignInvocation, persistAdmittedSourceRunPath, recordAdmittedCorrelation, recordChildDiaristRun, relocateAdmittedRunToTicket, withPreparedAttachments, } from "./invocation.js";
30
+ import { admitPublicRole, bindAdmittedTicketNumber, buildInstructionTransportPrompt, materializeCountersignInvocation, persistAdmittedSourceRunPath, recordAdmittedCorrelation, recordChildDiaristRun, relocateAdmittedRunToTicket, } from "./invocation.js";
31
31
  import { bindDiaristAssertedTicketNumber, presentControlledFailure, packageFaultNoteFor, prepareSummonsResumeMaterials, roleTurnOptions, runPostAdmissionOneShot, runPostAdmissionResumable, runPostAdmissionSeatResume, showResumeErrorPointer, resumeTurnRequestProjectionOptions, } from "./post-admission.js";
32
32
  import { presentTerminal } from "./auto-resume.js";
33
33
  import { buildAutoResumeContinuationPrompt, loadResumablePublicRole, markRunAdmitted, parentRunPathFromGatePointerInstruction, readCurrentCourt, } from "./run-lifecycle.js";
@@ -429,7 +429,7 @@ async function runCountersignBody(parsed, env, io) {
429
429
  summons: {
430
430
  sourceRunPath: gateParentRunPath,
431
431
  instruction: resumeInstruction,
432
- instructionEmpty: resumeInstruction.trim() === "",
432
+ instructionEmpty: resumeInstruction.length === 0,
433
433
  },
434
434
  });
435
435
  if (resumed != null)
@@ -446,12 +446,12 @@ async function runCountersignBody(parsed, env, io) {
446
446
  throw error;
447
447
  }
448
448
  try {
449
- return await withPreparedAttachments(parsed.attachmentPaths ?? [], async (preparedAttachments) => {
449
+ {
450
450
  const materializeAdmission = async (ticketNumber) => {
451
451
  await materializeCountersignInvocation(admitted, {
452
452
  home: env.home,
453
453
  principalAuthority: env.principalAuthority,
454
- preparedAttachments,
454
+ attachmentPaths: parsed.attachmentPaths ?? [],
455
455
  ...(env.model === undefined ? {} : { model: env.model }),
456
456
  ...(ticketNumber === undefined ? {} : { ticketNumber }),
457
457
  });
@@ -486,7 +486,7 @@ async function runCountersignBody(parsed, env, io) {
486
486
  });
487
487
  await relocateAdmittedRunToTicket(admitted, env.principalAuthority);
488
488
  return result;
489
- });
489
+ }
490
490
  }
491
491
  catch (error) {
492
492
  const rejected = usageExit(error, io);
@@ -557,7 +557,7 @@ export async function runPublicInstructionSeat(argv, env, io, role, parseArgv) {
557
557
  const summons = {
558
558
  ...sameParentInstruction(env, {
559
559
  instruction: parsed.instruction ?? "",
560
- instructionEmpty: (parsed.instruction ?? "").trim() === "",
560
+ instructionEmpty: (parsed.instruction ?? "").length === 0,
561
561
  }),
562
562
  attachmentPaths: parsed.attachmentPaths ?? [],
563
563
  };
@@ -583,7 +583,7 @@ export async function runPublicInstructionSeat(argv, env, io, role, parseArgv) {
583
583
  sourceRunPath: parentRunPath,
584
584
  ...sameParentInstruction(env, {
585
585
  instruction: parsed.instruction ?? "",
586
- instructionEmpty: (parsed.instruction ?? "").trim() === "",
586
+ instructionEmpty: (parsed.instruction ?? "").length === 0,
587
587
  }),
588
588
  attachmentPaths: parsed.attachmentPaths ?? [],
589
589
  };
@@ -669,7 +669,7 @@ export async function runPublicInstructionSeat(argv, env, io, role, parseArgv) {
669
669
  instruction: parsed.instruction ?? "",
670
670
  projectRoot: admitted.projectRoot,
671
671
  failureLabel: "secretariat unbound summons",
672
- attachmentPaths: admitted.attachments.map((attachment) => attachment.frozenPath),
672
+ attachmentPaths: admitted.attachments.map((attachment) => attachment.path),
673
673
  correlationId: admitted.runId,
674
674
  }, env, io);
675
675
  }