@akagilnc/pi-workflow-roles 0.1.6115 → 0.1.6123

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 (43) hide show
  1. package/README.md +3 -3
  2. package/README.zh-CN.md +3 -3
  3. package/dist/acp-host/production-host.js +354 -250
  4. package/dist/engine-detour-usage.js +2 -1
  5. package/dist/gatekeeper-role.js +3 -15
  6. package/dist/headless-host/production-host.js +339 -235
  7. package/dist/migrate-book-topology.js +39 -22
  8. package/dist/notary-source-run.js +8 -8
  9. package/dist/public-cli/auto-resume.js +3 -3
  10. package/dist/public-cli/cli.js +38 -32
  11. package/dist/public-cli/instruction-seat-run.js +2 -5
  12. package/dist/public-cli/main.js +310 -208
  13. package/dist/public-cli/option-definitions.js +22 -21
  14. package/dist/public-cli/run-lifecycle.js +27 -26
  15. package/dist/public-cli/seat-ticket-binding.js +2 -1
  16. package/dist/public-cli/settlement.js +33 -8
  17. package/dist/public-cli/terminal.js +13 -3
  18. package/dist/public-role-summons.js +1 -7
  19. package/dist/role-run-placement.js +1 -1
  20. package/dist/run-dossier-files.js +4 -2
  21. package/dist/submission-gate.js +3 -3
  22. package/dist/submission-ledger.js +29 -3
  23. package/dist/ticket-address.js +77 -0
  24. package/dist/ticket-progress.js +31 -0
  25. package/package.json +1 -1
  26. package/src/engine-detour-usage.ts +2 -1
  27. package/src/gatekeeper-role.ts +5 -18
  28. package/src/notary-source-run.ts +8 -8
  29. package/src/public-cli/auto-resume.ts +4 -3
  30. package/src/public-cli/cli.ts +53 -32
  31. package/src/public-cli/instruction-seat-run.ts +2 -5
  32. package/src/public-cli/option-definitions.ts +22 -21
  33. package/src/public-cli/run-lifecycle.ts +31 -31
  34. package/src/public-cli/seat-ticket-binding.ts +2 -1
  35. package/src/public-cli/settlement.ts +43 -7
  36. package/src/public-cli/terminal.ts +33 -14
  37. package/src/public-role-summons.ts +3 -15
  38. package/src/role-run-placement.ts +1 -1
  39. package/src/run-dossier-files.ts +5 -2
  40. package/src/submission-gate.ts +3 -2
  41. package/src/submission-ledger.ts +32 -2
  42. package/src/ticket-address.ts +91 -0
  43. package/src/ticket-progress.ts +42 -0
@@ -29,7 +29,8 @@ export const ENGINE_DETOUR_CALL_KIND = "engine-detour-call";
29
29
  export const ENGINE_DETOUR_TOOL_USAGE_FACT_KEY = "engineDetourToolUsage";
30
30
  /**
31
31
  * Run-relative path of the log that holds one detour call's record.
32
- * Openable once the run directory is known from the terminal's run id.
32
+ * Openable once the leg directory is known from the paths the terminal reports
33
+ * (receipt, artifact, or the no-receipt run pointer).
33
34
  * Contains no runId bytes itself (#108 + #537).
34
35
  */
35
36
  export const ENGINE_DETOUR_CALL_RECORD_FILE_RELATIVE = RUN_LOG_FILE;
@@ -80,20 +80,9 @@ function projectOfficerPayloads(officer, payloads, fallbackStatus) {
80
80
  // Single this-court seal is the common path. Never fold history into an array receipt.
81
81
  return projectOfficerDecision(officer, payloads[payloads.length - 1], fallbackStatus);
82
82
  }
83
- /** Nested officer runId from summoned.runDirectory, else terminal.runId (resume identity). */
83
+ /** Nested officer runId from the summoned leg's run directory (package-internal resume identity). */
84
84
  export function officerRunIdFromSummoned(summoned) {
85
- if (typeof summoned.runDirectory === "string" && summoned.runDirectory.trim() !== "") {
86
- const fromDir = runIdFromRunDirectory(summoned.runDirectory);
87
- if (fromDir !== undefined)
88
- return fromDir;
89
- }
90
- const terminal = summoned.terminal;
91
- if (terminal !== undefined
92
- && typeof terminal.runId === "string"
93
- && terminal.runId.trim() !== "") {
94
- return terminal.runId;
95
- }
96
- return undefined;
85
+ return summoned.runDirectory === undefined ? undefined : runIdFromRunDirectory(summoned.runDirectory);
97
86
  }
98
87
  function withOfficerRunId(result, summoned) {
99
88
  if (result.status !== "converged"
@@ -156,8 +145,7 @@ function projectOfficerTerminal(officer, summoned) {
156
145
  }
157
146
  if (outcome.kind === "accepted") {
158
147
  // Nested / prior incomplete (directionUnsettled) is not a gate pass (ADR 0055).
159
- // Receipt stays this-court or retained; runId comes from the summoned volume
160
- // (public-role-summons already prefers nested terminal.runId when roles differ).
148
+ // Receipt stays this-court or retained; runId comes from the summoned volume.
161
149
  // No parent-side officerPayloads / officerRunId copies (#1195).
162
150
  if (outcome.decisiveFacts?.directionUnsettled === true) {
163
151
  const receipt = thisCourt.length > 0 ? thisCourt[thisCourt.length - 1] : retainedReceipt(outcome);