@astrosheep/keiyaku 4.6.32 → 4.6.33

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 (199) hide show
  1. package/README.md +8 -6
  2. package/build/plugins/claude/skills/keiyaku-akuma/SKILL.md +13 -9
  3. package/build/plugins/claude/skills/keiyaku-babysit/SKILL.md +8 -6
  4. package/build/plugins/claude/skills/keiyaku-workflow/SKILL.md +2 -1
  5. package/build/plugins/codex/skills/keiyaku-akuma/SKILL.md +13 -9
  6. package/build/plugins/codex/skills/keiyaku-babysit/SKILL.md +8 -6
  7. package/build/plugins/codex/skills/keiyaku-workflow/SKILL.md +2 -1
  8. package/build/plugins/opencode/skills/keiyaku-akuma/SKILL.md +13 -9
  9. package/build/plugins/opencode/skills/keiyaku-babysit/SKILL.md +8 -6
  10. package/build/plugins/opencode/skills/keiyaku-workflow/SKILL.md +2 -1
  11. package/build/plugins/pi/README.md +55 -97
  12. package/build/plugins/pi/keiyaku.ts +2 -9
  13. package/build/skills/keiyaku-akuma/SKILL.md +13 -9
  14. package/build/skills/keiyaku-babysit/SKILL.md +8 -6
  15. package/build/skills/keiyaku-workflow/SKILL.md +2 -1
  16. package/build/src/akuma/akuma-instance.d.ts +11 -0
  17. package/build/src/akuma/akuma-instance.js +1 -2
  18. package/build/src/akuma/akuma-observe.js +73 -14
  19. package/build/src/akuma/akuma-selection-execution.d.ts +82 -7
  20. package/build/src/akuma/akuma-selection-execution.js +26 -27
  21. package/build/src/akuma/akuma-wait.d.ts +40 -1
  22. package/build/src/akuma/akuma-wait.js +58 -29
  23. package/build/src/akuma/akuma.d.ts +11 -0
  24. package/build/src/akuma/body.js +13 -18
  25. package/build/src/akuma/call-initial-tell.d.ts +0 -1
  26. package/build/src/akuma/call-initial-tell.js +0 -1
  27. package/build/src/akuma/heart/activity-schema.d.ts +16 -0
  28. package/build/src/akuma/heart/activity-schema.js +7 -0
  29. package/build/src/akuma/heart/index.d.ts +1 -1
  30. package/build/src/akuma/heart/index.js +9 -1
  31. package/build/src/akuma/heart/timeline.js +4 -4
  32. package/build/src/akuma/projection-read.d.ts +4 -2
  33. package/build/src/akuma/projection-read.js +21 -14
  34. package/build/src/akuma/projection.d.ts +94 -2
  35. package/build/src/akuma/projection.js +47 -47
  36. package/build/src/akuma/provider.d.ts +2 -2
  37. package/build/src/akuma/provider.js +27 -20
  38. package/build/src/akuma/providers/acp/core.js +2 -5
  39. package/build/src/akuma/providers/opencode-sdk/events.d.ts +2 -1
  40. package/build/src/akuma/providers/opencode-sdk/events.js +31 -1
  41. package/build/src/akuma/publication.js +3 -2
  42. package/build/src/akuma/selection-observation.d.ts +23 -0
  43. package/build/src/akuma/selection-observation.js +15 -4
  44. package/build/src/akuma/status-projection.d.ts +14 -1
  45. package/build/src/akuma/status-projection.js +40 -2
  46. package/build/src/akuma/turn-drive.js +21 -15
  47. package/build/src/body/amend.js +5 -17
  48. package/build/src/body/decode.js +11 -1
  49. package/build/src/body/envelope.d.ts +5 -1
  50. package/build/src/body/envelope.js +4 -2
  51. package/build/src/body/render.js +4 -6
  52. package/build/src/cli/commands/akuma-grammar.d.ts +3 -5
  53. package/build/src/cli/commands/akuma-grammar.js +22 -40
  54. package/build/src/cli/commands/akuma.d.ts +1 -2
  55. package/build/src/cli/commands/akuma.js +6 -58
  56. package/build/src/cli/commands/contract-grammar.d.ts +1 -0
  57. package/build/src/cli/commands/contract-grammar.js +7 -11
  58. package/build/src/cli/commands/contract-help.d.ts +3 -2
  59. package/build/src/cli/commands/contract-help.js +11 -5
  60. package/build/src/cli/commands/contract.js +3 -0
  61. package/build/src/cli/commands/debt-grammar.js +2 -4
  62. package/build/src/cli/parse.js +1 -4
  63. package/build/src/cli/render/akuma-activity.d.ts +3 -15
  64. package/build/src/cli/render/akuma-activity.js +19 -73
  65. package/build/src/cli/render/akuma.d.ts +5 -11
  66. package/build/src/cli/render/akuma.js +22 -30
  67. package/build/src/cli/render/catalog.js +1 -4
  68. package/build/src/cli/render/contract-history.js +2 -0
  69. package/build/src/cli/render/contract-observation.d.ts +2 -1
  70. package/build/src/cli/render/contract-observation.js +25 -1
  71. package/build/src/cli/render/contract-wait.d.ts +2 -2
  72. package/build/src/cli/render/contract-wait.js +13 -17
  73. package/build/src/cli/render/contract.js +12 -9
  74. package/build/src/cli/render/debt.js +1 -2
  75. package/build/src/cli/render/execution-progress.js +1 -3
  76. package/build/src/cli/render/kanshi-akuma.js +1 -2
  77. package/build/src/cli/render/kanshi.js +11 -17
  78. package/build/src/cli/render/receipt.d.ts +1 -1
  79. package/build/src/cli/render/receipt.js +33 -28
  80. package/build/src/cli/render/reconcile.js +2 -5
  81. package/build/src/cli/render/refusal.js +3 -6
  82. package/build/src/cli/render/terminal.d.ts +2 -4
  83. package/build/src/cli/render/terminal.js +10 -17
  84. package/build/src/cli/render/verbs.d.ts +1 -0
  85. package/build/src/cli/render/verbs.js +19 -17
  86. package/build/src/cli/runtime.js +3 -9
  87. package/build/src/core/facts/codec.js +7 -2
  88. package/build/src/core/facts/eligibility.d.ts +4 -4
  89. package/build/src/core/facts/eligibility.js +11 -0
  90. package/build/src/core/facts/fold.js +9 -5
  91. package/build/src/core/facts/gate.d.ts +5 -1
  92. package/build/src/core/facts/gate.js +14 -10
  93. package/build/src/core/facts/types.d.ts +5 -1
  94. package/build/src/core/facts/types.js +7 -0
  95. package/build/src/core/subject.d.ts +4 -1
  96. package/build/src/core/subject.js +10 -2
  97. package/build/src/core/verbs/amend.d.ts +15 -4
  98. package/build/src/core/verbs/amend.js +19 -9
  99. package/build/src/debt/index.d.ts +0 -1
  100. package/build/src/debt/index.js +6 -11
  101. package/build/src/debt/input.d.ts +2 -1
  102. package/build/src/debt/input.js +6 -4
  103. package/build/src/dispatch/index.d.ts +0 -17
  104. package/build/src/dispatch/index.js +1 -10
  105. package/build/src/git/identity.js +16 -45
  106. package/build/src/git/nuke.js +13 -23
  107. package/build/src/git/observe.d.ts +3 -0
  108. package/build/src/git/observe.js +25 -23
  109. package/build/src/git/process.js +11 -18
  110. package/build/src/git/read-observation.d.ts +5 -4
  111. package/build/src/git/repository.d.ts +2 -0
  112. package/build/src/git/repository.js +13 -1
  113. package/build/src/git/scratch.js +2 -14
  114. package/build/src/git/terminal-reconcile.js +1 -13
  115. package/build/src/index.d.ts +2 -0
  116. package/build/src/kanshi/index.d.ts +0 -1
  117. package/build/src/kanshi/index.js +0 -1
  118. package/build/src/kanshi/read.d.ts +21 -0
  119. package/build/src/kanshi/read.js +2 -1
  120. package/build/src/kanshi/report.d.ts +94 -0
  121. package/build/src/library/address.d.ts +12 -5
  122. package/build/src/library/address.js +18 -32
  123. package/build/src/library/akuma-creation.d.ts +39 -0
  124. package/build/src/library/akuma-creation.js +3 -9
  125. package/build/src/library/continuation.d.ts +10 -0
  126. package/build/src/library/contract-creation.js +10 -11
  127. package/build/src/library/contract-outcomes.d.ts +72 -1
  128. package/build/src/library/contract-outcomes.js +1 -0
  129. package/build/src/library/contract-types.d.ts +18 -0
  130. package/build/src/library/contract-types.js +2 -0
  131. package/build/src/library/contract-wait.d.ts +7 -0
  132. package/build/src/library/contract-wait.js +53 -49
  133. package/build/src/library/delivery.d.ts +25 -0
  134. package/build/src/library/input.d.ts +5 -23
  135. package/build/src/library/input.js +12 -7
  136. package/build/src/library/kei.js +39 -20
  137. package/build/src/library/keiyaku-classify.js +3 -3
  138. package/build/src/library/keiyaku-debt.js +1 -2
  139. package/build/src/library/keiyaku-identity.d.ts +3 -3
  140. package/build/src/library/keiyaku-identity.js +11 -6
  141. package/build/src/library/keiyaku-verbs.d.ts +456 -1362
  142. package/build/src/library/keiyaku-verbs.js +80 -92
  143. package/build/src/library/keiyaku-wait.d.ts +183 -0
  144. package/build/src/library/keiyaku-wait.js +213 -0
  145. package/build/src/library/keiyaku.d.ts +3 -1
  146. package/build/src/library/keiyaku.js +49 -73
  147. package/build/src/{mcp/output.d.ts → library/model-tools.d.ts} +227 -56
  148. package/build/src/library/model-tools.js +347 -0
  149. package/build/src/library/outcome.js +5 -6
  150. package/build/src/library/refusal.d.ts +25 -1
  151. package/build/src/library/refusal.js +4 -5
  152. package/build/src/library/selection.d.ts +12 -0
  153. package/build/src/library/selection.js +1 -2
  154. package/build/src/mcp/adapter.d.ts +0 -6
  155. package/build/src/mcp/adapter.js +10 -159
  156. package/build/src/mcp/description.d.ts +2 -0
  157. package/build/src/mcp/description.js +2 -0
  158. package/build/src/mcp/help.d.ts +1 -1
  159. package/build/src/mcp/help.js +6 -4
  160. package/build/src/pi/index.d.ts +3 -0
  161. package/build/src/pi/index.js +83 -0
  162. package/build/src/protocol/amend.d.ts +14 -3
  163. package/build/src/protocol/amend.js +113 -46
  164. package/build/src/protocol/bind.d.ts +1 -1
  165. package/build/src/protocol/bind.js +5 -16
  166. package/build/src/protocol/completion.d.ts +30 -0
  167. package/build/src/protocol/completion.js +8 -5
  168. package/build/src/protocol/deliver.js +7 -20
  169. package/build/src/protocol/delivery-preview.d.ts +5 -0
  170. package/build/src/protocol/execution-observation.d.ts +8 -0
  171. package/build/src/protocol/intent.d.ts +1 -0
  172. package/build/src/protocol/intent.js +4 -1
  173. package/build/src/protocol/operations.d.ts +54 -16
  174. package/build/src/protocol/operations.js +17 -31
  175. package/build/src/protocol/placement.js +7 -1
  176. package/build/src/protocol/progress.js +0 -6
  177. package/build/src/protocol/read/status.d.ts +40 -0
  178. package/build/src/protocol/read/status.js +7 -10
  179. package/build/src/protocol/reintegrate.js +2 -2
  180. package/build/src/protocol/result-leaves.d.ts +56 -8
  181. package/build/src/protocol/result-leaves.js +11 -2
  182. package/build/src/protocol/run.js +1 -4
  183. package/build/src/protocol/verify.d.ts +10 -0
  184. package/build/src/protocol/verify.js +1 -0
  185. package/build/src/runtime/proc/windows-launch.exe +0 -0
  186. package/build/src/settlement/settle.js +19 -68
  187. package/package.json +7 -3
  188. package/plugins/pi/README.md +55 -97
  189. package/plugins/pi/keiyaku.ts +2 -9
  190. package/skills/keiyaku-akuma/SKILL.md +13 -9
  191. package/skills/keiyaku-babysit/SKILL.md +8 -6
  192. package/skills/keiyaku-workflow/SKILL.md +2 -1
  193. package/build/plugins/pi/akuma-tools.ts +0 -283
  194. package/build/src/body/keys.d.ts +0 -4
  195. package/build/src/body/keys.js +0 -11
  196. package/build/src/kanshi/roster.d.ts +0 -2
  197. package/build/src/kanshi/roster.js +0 -2
  198. package/build/src/mcp/output.js +0 -193
  199. package/plugins/pi/akuma-tools.ts +0 -283
@@ -1,19 +1,18 @@
1
1
  import type { LiveStatusObservation } from "../../akuma/akuma-observe.js";
2
2
  import type { TellResult } from "../../akuma/body.js";
3
3
  import type { AkumaId } from "../../akuma/identity.js";
4
- import type { AkumaAskResult, AkumaTellResult, AkumaKillResult } from "../../akuma/selection-observation.js";
5
- import type { ForkResult, SpawnResult, SpawnWaitHead } from "../../library/akuma-creation.js";
6
- import { type ObservedCallHead } from "./akuma-activity.js";
4
+ import type { AkumaAskResult, AkumaKillResult } from "../../akuma/selection-observation.js";
5
+ import type { ForkResult, SpawnResult } from "../../library/akuma-creation.js";
7
6
  import { type TextRenderContext } from "./terminal.js";
8
7
  type AskProgress = Readonly<{
9
8
  admitted: (tell: TellResult, id: AkumaId) => readonly string[];
10
9
  observe: (observation: LiveStatusObservation) => readonly string[];
11
10
  frame: () => readonly string[];
12
11
  flush: () => readonly string[];
13
- conclude: (result: AkumaAskResult | AkumaTellResult) => readonly string[];
12
+ conclude: (result: AkumaAskResult) => readonly string[];
14
13
  }>;
15
14
  export declare function askProgressStream(akuma: AkumaId | undefined, alias: string | undefined, context: TextRenderContext, now?: () => number | undefined): AskProgress;
16
- export declare function waitedTellProgress(result: AkumaAskResult | AkumaTellResult, input: Readonly<{
15
+ export declare function waitedTellProgress(result: AkumaAskResult, input: Readonly<{
17
16
  prompt: string;
18
17
  alias?: string;
19
18
  }>, context: TextRenderContext): string;
@@ -23,13 +22,8 @@ type SpawnPresentation = Readonly<{
23
22
  alias?: string;
24
23
  contractId?: string;
25
24
  }>;
26
- /** The shared frame consumes owner evidence and explicit invocation context. */
27
- export declare function callObservationHead(input: SpawnResult | (SpawnWaitHead & Readonly<{
28
- akumaId: string;
29
- }>), presentation?: SpawnPresentation): ObservedCallHead;
30
- export declare function renderCallText(result: SpawnResult, streamed: boolean, context: TextRenderContext, input?: SpawnPresentation): string;
25
+ export declare function renderCallText(result: SpawnResult, context: TextRenderContext, input?: SpawnPresentation): string;
31
26
  export declare function renderSpawnFailure(result: SpawnResult, diagnostic: string, context: TextRenderContext, input?: SpawnPresentation): string;
32
- export declare function renderFailedCallObservation(result: SpawnResult, context: TextRenderContext, input?: SpawnPresentation): string;
33
27
  export declare function renderForkText(receipt: ForkResult, input: Readonly<{
34
28
  akuma: string;
35
29
  at: string;
@@ -1,10 +1,10 @@
1
- import { actionReceipt, callObservationStream, inputWaitStream, killResultText, subordinateLines, tellAdmissionRow, callFailureLines, askRawAnswer, inputObservation, tellControlLines, tellPayloadLines, } from "./akuma-activity.js";
1
+ import { actionReceipt, inputWaitStream, killResultText, subordinateLines, tellAdmissionRow, callFailureLines, askRawAnswer, observationCompletedAt, tellControlLines, tellPayloadLines, } from "./akuma-activity.js";
2
2
  import { safeText } from "./terminal.js";
3
3
  export function askProgressStream(akuma, alias, context, now) {
4
4
  let target = akuma;
5
5
  const stream = inputWaitStream(context, () => {
6
6
  if (target === undefined)
7
- throw new Error("Tell progress used before admission");
7
+ throw new Error("Ask progress used before admission");
8
8
  return { id: target, ...(alias === undefined ? {} : { alias }), contract: { kind: "none" }, facts: [] };
9
9
  }, { cursor: "admission", answerSeparator: true, ...(now === undefined ? {} : { now }) });
10
10
  return {
@@ -21,8 +21,14 @@ export function askProgressStream(akuma, alias, context, now) {
21
21
  flush: () => stream.flush(),
22
22
  conclude: (result) => {
23
23
  const controls = tellControlLines(result, context);
24
+ const observation = result;
25
+ const completedAt = observationCompletedAt(observation);
24
26
  return [
25
- stream.conclude({ kind: "observed", observation: inputObservation(result) }),
27
+ stream.conclude({
28
+ kind: "observed",
29
+ observation,
30
+ ...(completedAt === undefined ? {} : { completedAt }),
31
+ }),
26
32
  ...subordinateLines([
27
33
  ...(controls.length === 0 && askRawAnswer(result) !== undefined ? [] : [`input ${result.tellId}`]),
28
34
  ...controls,
@@ -39,31 +45,27 @@ export function waitedTellProgress(result, input, context) {
39
45
  facts: [],
40
46
  }), { cursor: "admission", answerSeparator: true, now: () => context.now });
41
47
  const admitted = stream.admitted({ rows: [tellAdmissionRow(input.prompt, context, result.wake)] });
48
+ const observation = result;
49
+ const completedAt = observationCompletedAt(observation);
42
50
  return [
43
51
  ...admitted,
44
52
  stream.conclude({
45
53
  kind: "observed",
46
- observation: inputObservation(result),
54
+ observation,
55
+ ...(completedAt === undefined ? {} : { completedAt }),
47
56
  }),
48
57
  ...subordinateLines([`input ${result.tellId}`, ...tellControlLines(result, context)]),
49
58
  ...(askRawAnswer(result) === undefined ? [] : [askRawAnswer(result)]),
50
59
  ...(result.kind === "invalid-output" ? ["invalid answer", result.answer] : []),
51
60
  ].join("\n");
52
61
  }
53
- /** The shared frame consumes owner evidence and explicit invocation context. */
54
- export function callObservationHead(input, presentation = {}) {
55
- const failures = "failures" in input ? (input.failures ?? []) : [];
62
+ function spawnHead(input, presentation = {}) {
63
+ const failures = input.kind === "failed" ? input.failures : [];
56
64
  const alias = failures.some((failure) => failure.stage === "dispatch" || failure.stage === "alias")
57
65
  ? undefined
58
- : "aliasName" in input
59
- ? input.aliasName
60
- : presentation.alias;
61
- const contractId = failures.some((failure) => failure.stage === "dispatch")
62
- ? undefined
63
- : "contractId" in input
64
- ? input.contractId
65
- : presentation.contractId;
66
- const cwd = "cwd" in input ? input.cwd : presentation.cwd;
66
+ : presentation.alias;
67
+ const contractId = failures.some((failure) => failure.stage === "dispatch") ? undefined : presentation.contractId;
68
+ const cwd = presentation.cwd;
67
69
  const facts = [
68
70
  ...(input.dispatchWarning === undefined ? [] : [`dispatch lag ${safeText(input.dispatchWarning)}`]),
69
71
  ...(input.alias === undefined ? [] : [`alias moved · previous ${input.alias.previousAkumaId}`]),
@@ -77,7 +79,7 @@ export function callObservationHead(input, presentation = {}) {
77
79
  };
78
80
  }
79
81
  function spawnEvidence(result, context, input) {
80
- const head = callObservationHead(result, input);
82
+ const head = spawnHead(result, input);
81
83
  return [
82
84
  ...(head.contract.kind === "associated" ? [safeText(head.contract.contractId)] : []),
83
85
  ...(head.cwd === undefined ? [] : [safeText(head.cwd)]),
@@ -90,14 +92,8 @@ function spawnEvidence(result, context, input) {
90
92
  ...(result.kind === "failed" ? callFailureLines(result.failures, context) : []),
91
93
  ];
92
94
  }
93
- export function renderCallText(result, streamed, context, input = {}) {
94
- if (streamed)
95
- return "";
96
- const head = callObservationHead(result, input);
97
- if (result.input !== undefined) {
98
- const stream = callObservationStream(context, head, { now: () => context.now });
99
- return [stream.conclude(result), ...(result.input.kind === "answered" ? [result.input.answer] : [])].join("\n");
100
- }
95
+ export function renderCallText(result, context, input = {}) {
96
+ const head = spawnHead(result, input);
101
97
  return actionReceipt({
102
98
  mark: result.kind === "failed" ? "!" : "✓",
103
99
  verb: "spawned",
@@ -107,7 +103,7 @@ export function renderCallText(result, streamed, context, input = {}) {
107
103
  }).join("\n");
108
104
  }
109
105
  export function renderSpawnFailure(result, diagnostic, context, input = {}) {
110
- const head = callObservationHead(result, input);
106
+ const head = spawnHead(result, input);
111
107
  return actionReceipt({
112
108
  mark: "!",
113
109
  verb: "spawn failed",
@@ -116,10 +112,6 @@ export function renderSpawnFailure(result, diagnostic, context, input = {}) {
116
112
  evidence: [...spawnEvidence(result, context, input), `reason ${safeText(diagnostic)}`],
117
113
  }).join("\n");
118
114
  }
119
- export function renderFailedCallObservation(result, context, input = {}) {
120
- const failure = callObservationStream(context, callObservationHead(result, input), input);
121
- return failure.conclude(result);
122
- }
123
115
  export function renderForkText(receipt, input) {
124
116
  const parent = receipt.parentAkumaId ?? input.akuma;
125
117
  if (receipt.kind !== "forked" && receipt.kind !== "failed") {
@@ -1,12 +1,9 @@
1
1
  import { contractAttentionFacts, progressStrip } from "./contract-observation.js";
2
2
  import { ageText, emptyCatalogue, safeText } from "./terminal.js";
3
3
  import { contractMark } from "./marks.js";
4
- function formatAge(source, observedAt) {
5
- return ageText(source, observedAt, "future");
6
- }
7
4
  /** One summary row names identity, age, title, and a terminal outcome or the current candidate strip. */
8
5
  function contractCatalogueBlock(row, observedAt) {
9
- const head = `${contractMark(row)} ${safeText(row.id)} · ${formatAge(row.phaseAt, observedAt)} · ${safeText(row.title ?? "title unavailable")}`;
6
+ const head = `${contractMark(row)} ${safeText(row.id)} · ${ageText(row.phaseAt, observedAt, "future")} · ${safeText(row.title ?? "title unavailable")}`;
10
7
  return [head, ` ${progressStrip(row)}`, ...contractAttentionFacts(row).map((fact) => ` ${safeText(fact)}`)].join("\n");
11
8
  }
12
9
  export function renderContractCatalogue(list) {
@@ -34,6 +34,7 @@ function eventLine(event, dispatches = []) {
34
34
  ...(event.changedSections ?? []),
35
35
  ...(event.gates === undefined ? [] : ["gates"]),
36
36
  ...(event.after === undefined ? [] : ["after"]),
37
+ ...(event.target === undefined ? [] : [`target ${targetName(event.target)}`]),
37
38
  ];
38
39
  return `amended${changed.length === 0 ? "" : ` · ${changed.join(" · ")}`}`;
39
40
  }
@@ -67,6 +68,7 @@ function semanticBody(event) {
67
68
  case "amend":
68
69
  return [
69
70
  ...listFact("changed sections", event.changedSections),
71
+ ...(event.target === undefined ? [] : [` target ${targetName(event.target)}`]),
70
72
  ...listFact("gates", event.gates),
71
73
  ...listFact("after", event.after),
72
74
  ];
@@ -1,4 +1,4 @@
1
- import type { ContractAfterEdge, ContractDetail, ContractGateReport, ContractSummary } from "../../index.js";
1
+ import type { ContractAfterEdge, ContractDetail, ContractGateReport, ContractSummary, GateStaleReason } from "../../index.js";
2
2
  import type { ContractDetailWorkspace } from "../../protocol/read/status.js";
3
3
  export declare function shortGitId(value: string): string;
4
4
  export declare function contractOperationName(operation: string): string;
@@ -21,6 +21,7 @@ export declare function requirementDisplayName(gate: string, requirement: Readon
21
21
  requirement?: string | undefined;
22
22
  index?: number | undefined;
23
23
  }>): string;
24
+ export declare function staleReasonFact(reason: GateStaleReason): string;
24
25
  /** Currentness is supplied by the owner for every requirement; rendering never aggregates testimony. */
25
26
  export declare function gateRequirementFacts(report: ContractGateReport): readonly string[];
26
27
  /** Every unresolved prerequisite edge names the condition that still blocks the candidate. */
@@ -72,9 +72,33 @@ export function requirementDisplayName(gate, requirement) {
72
72
  ? name
73
73
  : `${name} ${requirement.requirement}`;
74
74
  }
75
+ export function staleReasonFact(reason) {
76
+ switch (reason.kind) {
77
+ case "snapshot-changed": {
78
+ const ids = abbreviateGitIds([reason.previousSnapshot, reason.currentSnapshot]);
79
+ return `snapshot changed ${displayGitId(reason.previousSnapshot, ids)} -> ${displayGitId(reason.currentSnapshot, ids)}`;
80
+ }
81
+ case "candidate-content-changed": {
82
+ const ids = abbreviateGitIds([reason.previousChange, reason.currentChange]);
83
+ return `candidate content changed ${displayGitId(reason.previousChange, ids)} -> ${displayGitId(reason.currentChange, ids)}${reason.target === undefined ? "" : ` · ${reason.target}`}`;
84
+ }
85
+ default: {
86
+ const exhaustive = reason;
87
+ return exhaustive;
88
+ }
89
+ }
90
+ }
75
91
  /** Currentness is supplied by the owner for every requirement; rendering never aggregates testimony. */
76
92
  export function gateRequirementFacts(report) {
77
- return report.requirements.map((requirement) => `${gateGlyph(requirement)} ${requirementDisplayName(report.gate, requirement)}${requirement.current.kind === "stale" ? " · stale" : requirement.current.kind === "missing" ? " · missing" : ""}`);
93
+ return report.requirements.map((requirement) => {
94
+ const current = requirement.current;
95
+ const detail = current.kind === "stale"
96
+ ? ` · stale${current.reason === undefined ? "" : ` · ${staleReasonFact(current.reason)}`}`
97
+ : current.kind === "missing"
98
+ ? " · missing"
99
+ : "";
100
+ return `${gateGlyph(requirement)} ${requirementDisplayName(report.gate, requirement)}${detail}`;
101
+ });
78
102
  }
79
103
  /** Every unresolved prerequisite edge names the condition that still blocks the candidate. */
80
104
  export function afterWording(edge) {
@@ -1,2 +1,2 @@
1
- import type { ContractWaitResult } from "../../library/contract-wait.js";
2
- export declare function contractWaitText(result: ContractWaitResult): string;
1
+ import type { ContractWaitMember } from "../../library/contract-wait.js";
2
+ export declare function contractWaitMemberText(member: ContractWaitMember): string;
@@ -1,18 +1,14 @@
1
- export function contractWaitText(result) {
2
- return `${result.reason}: ${result.contracts
3
- .map((member) => {
4
- const facts = [];
5
- if (member.presence === "unknown")
6
- facts.push("unobserved");
7
- else if (member.presence === "missing")
8
- facts.push("missing");
9
- else {
10
- if (member.changed === true)
11
- facts.push("changed");
12
- if (member.terminal !== undefined)
13
- facts.push(member.terminal === "claimed" ? "accepted" : "abandoned");
14
- }
15
- return `${member.id}${facts.length === 0 ? "" : ` (${facts.join(", ")})`}`;
16
- })
17
- .join(", ")}`;
1
+ export function contractWaitMemberText(member) {
2
+ const facts = [];
3
+ if (member.presence === "unknown")
4
+ facts.push("unobserved");
5
+ else if (member.presence === "missing")
6
+ facts.push("missing");
7
+ else {
8
+ if (member.changed === true)
9
+ facts.push("changed");
10
+ if (member.terminal !== undefined)
11
+ facts.push(member.terminal === "claimed" ? "accepted" : "abandoned");
12
+ }
13
+ return `${member.id}${facts.length === 0 ? "" : ` (${facts.join(", ")})`}`;
18
14
  }
@@ -1,9 +1,6 @@
1
1
  import { deliveryIdentityRows, gatesAwaitLines, targetMovementRows, receiptPayload, receiptRow, recoverySnapshotLines, stopLines, titleLines, verificationCheckLines, outcomeLines, } from "./receipt.js";
2
2
  import { abbreviateGitIds, displayGitId } from "./contract-observation.js";
3
- import { DEFAULT_CLI_COLUMNS, quotedText, renderOpaqueBlock, safeText, tone, } from "./terminal.js";
4
- function words(kind) {
5
- return kind.replaceAll("-", " ");
6
- }
3
+ import { DEFAULT_CLI_COLUMNS, kindWords, quotedText, renderOpaqueBlock, safeText, tone, } from "./terminal.js";
7
4
  function checkoutBehindRows(path, target, columns) {
8
5
  const lines = [];
9
6
  receiptRow(lines, "!", "lag", [{ text: "checkout behind" }, { text: path, opaque: true }, { text: `· ${target}`, opaque: true }], columns);
@@ -28,7 +25,7 @@ function retainedIssueRows(issue, columns) {
28
25
  receiptPayload(lines, "reason", issue.diagnostic);
29
26
  return lines;
30
27
  case "worktree-follow-retained":
31
- receiptRow(lines, " ", "worktree follow kept at", [{ text: issue.path, opaque: true }, { text: `· ${words(issue.reason)}` }], columns);
28
+ receiptRow(lines, " ", "worktree follow kept at", [{ text: issue.path, opaque: true }, { text: `· ${kindWords(issue.reason)}` }], columns);
32
29
  return lines;
33
30
  case "unsealed-bytes":
34
31
  receiptRow(lines, " ", "unsealed bytes kept at", [{ text: issue.path, opaque: true }], columns);
@@ -38,7 +35,7 @@ function retainedIssueRows(issue, columns) {
38
35
  receiptPayload(lines, "reason", issue.diagnostic);
39
36
  return lines;
40
37
  case "target-workspace-retained":
41
- receiptRow(lines, "!", "target workspace unavailable", [{ text: issue.targetContractId, opaque: true }, { text: words(issue.reason) }], columns);
38
+ receiptRow(lines, "!", "target workspace unavailable", [{ text: issue.targetContractId, opaque: true }, { text: kindWords(issue.reason) }], columns);
42
39
  return lines;
43
40
  case "worktree-hook-failed":
44
41
  receiptRow(lines, "!", "lag", [{ text: `worktree-hook-failed ${issue.phase} ${issue.path} name ${issue.name}`, opaque: true }], columns);
@@ -187,7 +184,10 @@ function bind(result, columns, color) {
187
184
  }
188
185
  function amend(result, columns, color) {
189
186
  const lines = titleLines("✓", "amended", result.contractId, columns);
190
- if (result.changedSections === undefined && result.gatesChanged === undefined && result.afterChanged === undefined)
187
+ if (result.changedSections === undefined &&
188
+ result.gatesChanged === undefined &&
189
+ result.afterChanged === undefined &&
190
+ result.target === undefined)
191
191
  receiptRow(lines, " ", "terms", [{ text: "unchanged" }], columns);
192
192
  if (result.changedSections !== undefined)
193
193
  receiptRow(lines, " ", "changed sections", [{ text: result.changedSections.join(" · ") }], columns);
@@ -195,6 +195,8 @@ function amend(result, columns, color) {
195
195
  receiptRow(lines, " ", "gates", [{ text: "changed" }], columns);
196
196
  if (result.afterChanged === true)
197
197
  receiptRow(lines, " ", "after", [{ text: "changed" }], columns);
198
+ if (result.target !== undefined)
199
+ receiptRow(lines, " ", "target", [{ text: result.target }], columns);
198
200
  lines.push(...deviations(result, columns, color), ...contractIssueLines(result, columns, { mode: "receipt" }), ...recoverySnapshotLines(result.recoverySnapshots, columns, result.contractId));
199
201
  return lines.join("\n");
200
202
  }
@@ -274,7 +276,8 @@ function review(result, columns, input, surface) {
274
276
  }
275
277
  function verify(result, columns, surface) {
276
278
  const lines = titleLines("✓", "verify", result.contractId, columns);
277
- lines.push(...verificationCheckLines(result.checks, result.snapshot, columns, result.contractId, surface), ...trailingPlacementLines(result, columns, surface));
279
+ receiptRow(lines, " ", "snapshot", [{ text: displayGitId(result.snapshot, abbreviateGitIds([result.snapshot])) }], columns);
280
+ lines.push(...verificationCheckLines(result.checks, columns, result.contractId, surface), ...trailingPlacementLines(result, columns, surface));
278
281
  return lines.join("\n");
279
282
  }
280
283
  /** The operation and supplied input stay renderer context, never fields manufactured on the native result. */
@@ -312,7 +315,7 @@ export function renderAccepted(operation, result, context, input = {}) {
312
315
  export function renderRetry(operation, result, context) {
313
316
  const columns = context?.columns ?? DEFAULT_CLI_COLUMNS;
314
317
  const lines = outcomeLines("?", operation, "retry", "contractId" in result ? result.contractId : undefined, columns);
315
- lines.push(...renderOpaqueBlock(words(result.reason), " ", columns));
318
+ lines.push(...renderOpaqueBlock(kindWords(result.reason), " ", columns));
316
319
  if (result.reason === "publication-failed")
317
320
  receiptPayload(lines, "reason", result.diagnostic);
318
321
  return lines.join("\n");
@@ -44,9 +44,8 @@ export function renderDebtList(result, context = DEFAULT_CONTEXT) {
44
44
  if ("absent" in page)
45
45
  return "debt world absent";
46
46
  const rows = page.rows ?? [];
47
- const view = "debts";
48
47
  if (rows.length === 0)
49
- return emptyCatalogue(view);
48
+ return emptyCatalogue("debts");
50
49
  return [
51
50
  "DEBTS // world",
52
51
  ...rows.flatMap((row) => entityLines({ ...row, mark: debtMark(row.disposition), word: row.disposition }, columns)),
@@ -1,4 +1,3 @@
1
- import { shortGitId } from "./contract-observation.js";
2
1
  import { StatusLine } from "./status-line.js";
3
2
  import { renderOpaqueBlock, safeText } from "./terminal.js";
4
3
  const LIVE_OUTPUT_BYTES = 4 * 1024;
@@ -19,10 +18,9 @@ function elapsed(ms) {
19
18
  return seconds < 60 ? `${seconds}s` : `${Math.floor(seconds / 60)}m${seconds % 60}s`;
20
19
  }
21
20
  function phaseDetail(observation) {
22
- const detail = observation.phase === "declaration"
21
+ return observation.phase === "declaration"
23
22
  ? `declaration ${observation.index}/${observation.total}`
24
23
  : `${observation.phase} · check ${observation.index}/${observation.total}${observation.name === undefined ? "" : ` · ${safeText(observation.name)}`}`;
25
- return `${detail} · snapshot ${shortGitId(observation.snapshot)} · ${safeText(observation.requirement)}`;
26
24
  }
27
25
  function phaseMark(outcome) {
28
26
  if (outcome === undefined)
@@ -103,8 +103,7 @@ function renderAkumaBoard(section, observedAt, context, emptyRows = [emptyCatalo
103
103
  if (section.kind === "absent")
104
104
  return ["AKUMA // absent"];
105
105
  if (section.kind === "failed") {
106
- const failure = ["AKUMA // unavailable", "", tone(`! ${safeText(section.diagnostic)}`, "alert", context.color)];
107
- return failure;
106
+ return ["AKUMA // unavailable", "", tone(`! ${safeText(section.diagnostic)}`, "alert", context.color)];
108
107
  }
109
108
  const board = section;
110
109
  const rows = board.rows ?? [];
@@ -62,8 +62,7 @@ function renderContractBoard(section, observedAt, context) {
62
62
  if (section.kind === "absent")
63
63
  return ["CONTRACTS // absent"];
64
64
  if (section.kind === "failed") {
65
- const failure = ["CONTRACTS // unavailable", "", tone(`! ${safeText(section.diagnostic)}`, "alert", context.color)];
66
- return failure;
65
+ return ["CONTRACTS // unavailable", "", tone(`! ${safeText(section.diagnostic)}`, "alert", context.color)];
67
66
  }
68
67
  if ((section.rows ?? []).length === 0)
69
68
  return [];
@@ -79,7 +78,7 @@ function detailHasError(row) {
79
78
  row.workspace.kind === "unavailable" ||
80
79
  row.issue !== undefined);
81
80
  }
82
- function semanticBlock(_name, facts, _context) {
81
+ function semanticBlock(facts) {
83
82
  if (facts.length === 0)
84
83
  return [];
85
84
  return facts.map((fact) => ` ${safeText(fact)}`);
@@ -192,29 +191,29 @@ function renderSelectedContractRow(id, row, context) {
192
191
  const outcome = terminalFacts(row, context, abbreviations);
193
192
  lines.push(...outcome.map((fact) => (fact.startsWith(" ") ? fact : ` ${safeText(fact)}`)));
194
193
  // A terminal Contract still carries a physical retention issue; its worktree is expected to be gone.
195
- lines.push(...semanticBlock("alarms", row.issue === undefined ? [] : [`! ${issueAlarm(row.issue, row.target)}`], context));
194
+ lines.push(...semanticBlock(row.issue === undefined ? [] : [`! ${issueAlarm(row.issue, row.target)}`]));
196
195
  lines.push(...linkedAkumaRows(row));
197
196
  return lines;
198
197
  }
199
198
  const deniedReview = (row.gates ?? [])
200
199
  .find((gate) => gate.gate === "reviewed")
201
200
  ?.requirements.find((requirement) => requirement.current.kind === "attested" && requirement.current.verdict === "unsatisfied");
202
- lines.push(...semanticBlock("ball", [detailProgressStrip(row)], context));
203
- lines.push(...semanticBlock("gates", (row.gates ?? []).flatMap(gateRequirementFacts), context));
204
- lines.push(...semanticBlock("prerequisites", (row.after ?? []).map(afterWording), context));
201
+ lines.push(...semanticBlock([detailProgressStrip(row)]));
202
+ lines.push(...semanticBlock((row.gates ?? []).flatMap(gateRequirementFacts)));
203
+ lines.push(...semanticBlock((row.after ?? []).map(afterWording)));
205
204
  if (row.delivery !== undefined) {
206
205
  const moved = targetMoved(row);
207
- lines.push(...semanticBlock("candidate", [
206
+ lines.push(...semanticBlock([
208
207
  `candidate ${displayGitId(row.delivery.candidate, abbreviations)}`,
209
208
  `integration result ${displayGitId(row.delivery.integration, abbreviations)}${moved ? " · target moved since" : ""}`,
210
209
  ...(moved ? targetMovementFacts(row, abbreviations) : []),
211
- ], context));
210
+ ]));
212
211
  }
213
212
  if (deniedReview?.current.kind === "attested" && deniedReview.current.summary !== undefined)
214
213
  lines.push(...payload("review ×", deniedReview.current.summary, context));
215
214
  lines.push(...linkedAkumaRows(row));
216
- lines.push(...semanticBlock("worktree", worktreeFacts(row), context));
217
- lines.push(...semanticBlock("alarms", liveAlarms(row), context));
215
+ lines.push(...semanticBlock(worktreeFacts(row)));
216
+ lines.push(...semanticBlock(liveAlarms(row)));
218
217
  return lines;
219
218
  }
220
219
  function debtFailureFact(failure) {
@@ -241,12 +240,7 @@ function renderDebts(report, context) {
241
240
  if (section.kind === "absent")
242
241
  return ["DEBTS // absent"];
243
242
  if (section.kind === "failed") {
244
- const failure = [
245
- "DEBTS // unavailable",
246
- "",
247
- tone(`! ${safeText(debtFailureFact(section))}`, "alert", context.color),
248
- ];
249
- return failure;
243
+ return ["DEBTS // unavailable", "", tone(`! ${safeText(debtFailureFact(section))}`, "alert", context.color)];
250
244
  }
251
245
  return (section.rows ?? []).length === 0 ? [] : debtBoardRows(section, context);
252
246
  }
@@ -39,7 +39,7 @@ export declare function targetMovementRows(lines: string[], placement: Readonly<
39
39
  }>, columns: number): void;
40
40
  export declare function gatesAwaitLines(placement: PlacementStop | undefined): readonly string[];
41
41
  /** The performed work and its admission conclusion, with no aggregate gate testimony. */
42
- export declare function verificationCheckLines(checks: readonly VerificationCheck[], snapshot: string, columns: number, addressed: string, surface?: TextRenderContext["surface"]): readonly string[];
42
+ export declare function verificationCheckLines(checks: readonly VerificationCheck[], columns: number, addressed: string, surface?: TextRenderContext["surface"]): readonly string[];
43
43
  type RecoverySnapshot = string | Readonly<{
44
44
  snapshot: string;
45
45
  contractId?: string;
@@ -1,6 +1,6 @@
1
- import { contractOperationName, requirementDisplayName } from "./contract-observation.js";
1
+ import { contractOperationName, requirementDisplayName, staleReasonFact } from "./contract-observation.js";
2
2
  import { renderRefusalFacts } from "./refusal.js";
3
- import { DEFAULT_CLI_COLUMNS, displayColumns, orderRefusalFacts, quotedText, renderOpaqueBlock, safeText, } from "./terminal.js";
3
+ import { DEFAULT_CLI_COLUMNS, displayColumns, kindWords, orderRefusalFacts, quotedText, renderOpaqueBlock, safeText, } from "./terminal.js";
4
4
  import { abbreviateGitIds, displayGitId } from "./contract-observation.js";
5
5
  export function receiptRow(lines, mark, label, segments, columns) {
6
6
  const prefix = mark.trim().length === 0 ? " " : `${mark} `;
@@ -44,9 +44,6 @@ export function titleLines(mark, title, contract, columns = DEFAULT_CLI_COLUMNS)
44
44
  const inline = `${base} ${contract}`;
45
45
  return displayColumns(inline) <= columns ? [inline] : [base, ` contract ${safeText(contract)}`];
46
46
  }
47
- function words(kind) {
48
- return kind.replaceAll("-", " ");
49
- }
50
47
  function unmetRequirementLines(unmet, columns) {
51
48
  const lines = [];
52
49
  const ids = abbreviateGitIds(unmet.flatMap((problem) => problem.state === "stale" ? [problem.previousContentId ?? "", problem.currentContentId ?? ""] : []));
@@ -55,6 +52,7 @@ function unmetRequirementLines(unmet, columns) {
55
52
  const detail = problem.state === "stale"
56
53
  ? [
57
54
  { text: "stale" },
55
+ ...(problem.reason === undefined ? [] : [{ text: staleReasonFact(problem.reason) }]),
58
56
  ...(problem.previousContentId === undefined || problem.currentContentId === undefined
59
57
  ? []
60
58
  : [
@@ -75,7 +73,7 @@ export { unmetRequirementLines };
75
73
  function retryRows(reason, columns, dependent) {
76
74
  const lines = [];
77
75
  receiptRow(lines, "?", "retry", [
78
- { text: words(reason.reason) },
76
+ { text: kindWords(reason.reason) },
79
77
  ...(dependent === undefined ? [] : [{ text: "·" }, { text: dependent, opaque: true }]),
80
78
  ], columns);
81
79
  if (reason.reason === "publication-failed")
@@ -99,7 +97,7 @@ function runtimeStopLines(stop, columns, dependent) {
99
97
  const segments = dependent === undefined ? [] : [{ text: "·" }, { text: dependent, opaque: true }];
100
98
  if (stop.kind === "environment-hook-failure")
101
99
  segments.push({ text: `name ${quotedText(stop.name)}` });
102
- receiptRow(lines, "!", dependent ?? words(stop.kind), segments, columns);
100
+ receiptRow(lines, "!", dependent ?? kindWords(stop.kind), segments, columns);
103
101
  const diagnostic = "diagnostic" in stop ? stop.diagnostic : undefined;
104
102
  if (diagnostic !== undefined && diagnostic.length > 0)
105
103
  receiptPayload(lines, "reason", diagnostic);
@@ -127,10 +125,10 @@ function requirementStopRows(stop, columns, dependent) {
127
125
  function availabilityStopRows(stop, columns, dependent) {
128
126
  const lines = [];
129
127
  if (stop.kind !== "target-workspace-unavailable") {
130
- dependentRow(lines, dependent, words(stop.kind), columns);
128
+ dependentRow(lines, dependent, kindWords(stop.kind), columns);
131
129
  return lines;
132
130
  }
133
- receiptRow(lines, "!", "target workspace unavailable", [{ text: stop.targetContractId, opaque: true }, { text: words(stop.reason) }], columns);
131
+ receiptRow(lines, "!", "target workspace unavailable", [{ text: stop.targetContractId, opaque: true }, { text: kindWords(stop.reason) }], columns);
134
132
  return lines;
135
133
  }
136
134
  function outcomeStopRows(stop, columns, addressed, dependent, surface) {
@@ -251,29 +249,27 @@ export function gatesAwaitLines(placement) {
251
249
  return events.length === 0 ? [] : [`⧗ awaiting ${events.join(", ")}`];
252
250
  }
253
251
  /** The performed work and its admission conclusion, with no aggregate gate testimony. */
254
- export function verificationCheckLines(checks, snapshot, columns, addressed, surface) {
255
- const ids = abbreviateGitIds([snapshot]);
252
+ export function verificationCheckLines(checks, columns, addressed, surface) {
256
253
  const lines = [];
257
254
  for (const check of checks) {
258
- receiptRow(lines, " ", `check ${check.index}`, [
259
- { text: check.kind === "terminal" ? "executed" : "execution stopped" },
260
- { text: check.requirement, opaque: true },
261
- { text: `· snapshot ${displayGitId(snapshot, ids)}` },
262
- ], columns);
263
- if (check.kind !== "terminal") {
255
+ if (check.kind === "stopped") {
256
+ receiptRow(lines, "!", `check ${check.index}`, [{ text: "execution stopped" }], columns);
264
257
  lines.push(...stopLines(check.stop, columns, addressed, undefined, surface));
265
258
  }
266
259
  else {
267
- receiptRow(lines, check.verdict === "satisfied" ? "✓" : "×", "verdict", [{ text: check.verdict }], columns);
260
+ const admission = check.admission;
261
+ const recording = typeof admission !== "string"
262
+ ? "admission stopped"
263
+ : admission === "unrecorded"
264
+ ? "not recorded"
265
+ : admission === "admitted"
266
+ ? "recorded"
267
+ : "reused";
268
+ receiptRow(lines, check.verdict === "satisfied" ? "✓" : "×", `check ${check.index}`, [{ text: `${check.verdict} · ${recording}` }], columns);
268
269
  if (check.verdict === "unsatisfied")
269
270
  receiptPayload(lines, "summary", check.summary);
270
- const admission = check.admission;
271
- if (typeof admission === "string")
272
- receiptRow(lines, " ", "attestation", [{ text: admission === "unrecorded" ? "not recorded" : admission }], columns);
273
- else {
274
- receiptRow(lines, "!", "admission", [{ text: "stopped" }], columns);
271
+ if (typeof admission !== "string")
275
272
  lines.push(...stopLines(admission, columns, addressed, undefined, surface));
276
- }
277
273
  }
278
274
  if (check.retainedPath !== undefined)
279
275
  receiptRow(lines, " ", "scratch retained", [{ text: check.retainedPath, opaque: true }], columns);
@@ -369,7 +365,7 @@ function effectLines(effect, columns, primary) {
369
365
  return lines;
370
366
  case "worktree-created":
371
367
  case "worktree-removed":
372
- receiptRow(lines, " ", words(effect.kind), [{ text: effect.path, opaque: true }], columns);
368
+ receiptRow(lines, " ", kindWords(effect.kind), [{ text: effect.path, opaque: true }], columns);
373
369
  return lines;
374
370
  }
375
371
  }
@@ -385,8 +381,17 @@ function placementEvidenceLines(placement, columns, addressed, surface) {
385
381
  /** Confirmed admissions and irreversible movement survive a trailing failure without a journal reread. */
386
382
  export function executionEvidenceLines(receipt, columns, surface) {
387
383
  const lines = [];
388
- for (const admission of receipt.admitted ?? [])
389
- lines.push(...admittedLines(admission, columns, receipt.contractId));
384
+ if (receipt.snapshot !== undefined)
385
+ receiptRow(lines, " ", "snapshot", [{ text: displayGitId(receipt.snapshot, abbreviateGitIds([receipt.snapshot])) }], columns);
386
+ if (receipt.checks !== undefined)
387
+ lines.push(...verificationCheckLines(receipt.checks, columns, receipt.contractId ?? "", surface));
388
+ for (const admission of receipt.admitted ?? []) {
389
+ const shownByCheck = admission.kind === "attestation" &&
390
+ (admission.contractId === undefined || admission.contractId === receipt.contractId) &&
391
+ receipt.checks?.some((check) => check.kind === "terminal" && check.admission === "admitted" && check.requirement === admission.requirement);
392
+ if (!shownByCheck)
393
+ lines.push(...admittedLines(admission, columns, receipt.contractId));
394
+ }
390
395
  if (receipt.placement !== undefined)
391
396
  lines.push(...placementEvidenceLines(receipt.placement, columns, receipt.contractId ?? "", surface));
392
397
  for (const effect of receipt.effects ?? [])
@@ -406,7 +411,7 @@ export function executionFailureLines(operation, receipt, failure, columns, surf
406
411
  for (const [owner, count] of Object.entries(receipt.removed ?? {}))
407
412
  receiptRow(lines, " ", `${owner} removed`, [{ text: String(count) }], columns);
408
413
  for (const issue of receipt.issues ?? []) {
409
- receiptRow(lines, "!", words(issue.kind), issue.kind === "reset-owner-stopped" ? [{ text: issue.owner }] : [], columns);
414
+ receiptRow(lines, "!", kindWords(issue.kind), issue.kind === "reset-owner-stopped" ? [{ text: issue.owner }] : [], columns);
410
415
  receiptPayload(lines, "reason", issue.diagnostic);
411
416
  }
412
417
  }
@@ -2,10 +2,7 @@ import { invocationIssueIsFailure } from "../../library/outcome.js";
2
2
  import { contractIssueLines } from "./contract.js";
3
3
  import { abbreviateGitIds, displayGitId } from "./contract-observation.js";
4
4
  import { receiptRow } from "./receipt.js";
5
- import { DEFAULT_CLI_COLUMNS, safeText } from "./terminal.js";
6
- function words(kind) {
7
- return kind.replaceAll("-", " ");
8
- }
5
+ import { DEFAULT_CLI_COLUMNS, kindWords, safeText } from "./terminal.js";
9
6
  function effectSegments(effect) {
10
7
  switch (effect.kind) {
11
8
  case "ref": {
@@ -29,7 +26,7 @@ function effectSegments(effect) {
29
26
  return [{ text: "debt settled" }, { text: effect.debtId, opaque: true }];
30
27
  case "worktree-created":
31
28
  case "worktree-removed":
32
- return [{ text: words(effect.kind) }, { text: effect.path, opaque: true }];
29
+ return [{ text: kindWords(effect.kind) }, { text: effect.path, opaque: true }];
33
30
  }
34
31
  }
35
32
  function nativeDisposition(report) {