carrick 0.3.157 → 0.3.158

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 (142) hide show
  1. package/dist/cli.d.ts +7 -0
  2. package/dist/cli.js +4 -0
  3. package/dist/cli.js.map +1 -1
  4. package/dist/contract.d.ts +8 -1
  5. package/dist/contract.js.map +1 -1
  6. package/dist/engine-ask.d.ts +21 -0
  7. package/dist/engine-ask.js +50 -0
  8. package/dist/engine-ask.js.map +1 -0
  9. package/dist/facts/diff.d.ts +14 -1
  10. package/dist/facts/diff.js +21 -8
  11. package/dist/facts/diff.js.map +1 -1
  12. package/dist/facts/fetch.d.ts +7 -0
  13. package/dist/facts/fetch.js +22 -1
  14. package/dist/facts/fetch.js.map +1 -1
  15. package/dist/facts/lines.d.ts +22 -4
  16. package/dist/facts/lines.js +31 -9
  17. package/dist/facts/lines.js.map +1 -1
  18. package/dist/facts/peers.d.ts +13 -4
  19. package/dist/facts/peers.js +17 -15
  20. package/dist/facts/peers.js.map +1 -1
  21. package/dist/facts/rules/packages.js +3 -1
  22. package/dist/facts/rules/packages.js.map +1 -1
  23. package/dist/facts/rules/same-name.js +1 -1
  24. package/dist/facts/rules/same-name.js.map +1 -1
  25. package/dist/facts/store.d.ts +15 -0
  26. package/dist/facts/store.js +30 -0
  27. package/dist/facts/store.js.map +1 -1
  28. package/dist/held/backoff.d.ts +8 -0
  29. package/dist/held/backoff.js +43 -0
  30. package/dist/held/backoff.js.map +1 -0
  31. package/dist/held/build.d.ts +17 -0
  32. package/dist/held/build.js +62 -0
  33. package/dist/held/build.js.map +1 -0
  34. package/dist/held/client.d.ts +12 -3
  35. package/dist/held/client.js +123 -8
  36. package/dist/held/client.js.map +1 -1
  37. package/dist/held/daemon.d.ts +47 -2
  38. package/dist/held/daemon.js +115 -23
  39. package/dist/held/daemon.js.map +1 -1
  40. package/dist/held/early.d.ts +28 -0
  41. package/dist/held/early.js +115 -0
  42. package/dist/held/early.js.map +1 -0
  43. package/dist/held/paths.d.ts +6 -0
  44. package/dist/held/paths.js +17 -0
  45. package/dist/held/paths.js.map +1 -1
  46. package/dist/held/place.d.ts +76 -30
  47. package/dist/held/place.js +121 -83
  48. package/dist/held/place.js.map +1 -1
  49. package/dist/held/run.js +24 -6
  50. package/dist/held/run.js.map +1 -1
  51. package/dist/held/runtime.d.ts +22 -0
  52. package/dist/held/runtime.js +612 -0
  53. package/dist/held/runtime.js.map +1 -0
  54. package/dist/held/shadow.d.ts +33 -0
  55. package/dist/held/shadow.js +68 -0
  56. package/dist/held/shadow.js.map +1 -0
  57. package/dist/held/steps.d.ts +11 -0
  58. package/dist/held/steps.js +29 -0
  59. package/dist/held/steps.js.map +1 -0
  60. package/dist/hook/confirm.d.ts +79 -0
  61. package/dist/hook/confirm.js +220 -0
  62. package/dist/hook/confirm.js.map +1 -0
  63. package/dist/hook/edit-flow.d.ts +14 -3
  64. package/dist/hook/edit-flow.js +113 -33
  65. package/dist/hook/edit-flow.js.map +1 -1
  66. package/dist/hook/generation.d.ts +19 -0
  67. package/dist/hook/generation.js +75 -0
  68. package/dist/hook/generation.js.map +1 -0
  69. package/dist/hook/late.d.ts +50 -9
  70. package/dist/hook/late.js +104 -24
  71. package/dist/hook/late.js.map +1 -1
  72. package/dist/hook/post-bash.js +3 -3
  73. package/dist/hook/post-bash.js.map +1 -1
  74. package/dist/hook/post-edit.js +2 -2
  75. package/dist/hook/post-edit.js.map +1 -1
  76. package/dist/hook/post-read.js +25 -3
  77. package/dist/hook/post-read.js.map +1 -1
  78. package/dist/hook/post-search.js +1 -1
  79. package/dist/hook/post-search.js.map +1 -1
  80. package/dist/hook/probe.js +1 -0
  81. package/dist/hook/probe.js.map +1 -1
  82. package/dist/hook/read-answer.d.ts +5 -0
  83. package/dist/hook/read-answer.js +8 -4
  84. package/dist/hook/read-answer.js.map +1 -1
  85. package/dist/hook/rechecks.d.ts +58 -2
  86. package/dist/hook/rechecks.js +132 -9
  87. package/dist/hook/rechecks.js.map +1 -1
  88. package/dist/hook/session-start.d.ts +1 -1
  89. package/dist/hook/session-start.js +19 -5
  90. package/dist/hook/session-start.js.map +1 -1
  91. package/dist/hook/similar.d.ts +1 -1
  92. package/dist/hook/similar.js +21 -8
  93. package/dist/hook/similar.js.map +1 -1
  94. package/dist/hook/stop-wait.js +35 -16
  95. package/dist/hook/stop-wait.js.map +1 -1
  96. package/dist/hook/timings.d.ts +29 -1
  97. package/dist/hook/timings.js +7 -1
  98. package/dist/hook/timings.js.map +1 -1
  99. package/dist/hook/user-prompt.js +2 -2
  100. package/dist/hook/user-prompt.js.map +1 -1
  101. package/dist/hosted-snapshot.d.ts +27 -0
  102. package/dist/hosted-snapshot.js +32 -0
  103. package/dist/hosted-snapshot.js.map +1 -1
  104. package/dist/init/hosted.js +2 -9
  105. package/dist/init/hosted.js.map +1 -1
  106. package/dist/render.d.ts +15 -1
  107. package/dist/render.js +50 -4
  108. package/dist/render.js.map +1 -1
  109. package/dist/server.js +1 -1
  110. package/dist/server.js.map +1 -1
  111. package/package.json +6 -6
  112. package/plugin/.claude-plugin/plugin.json +1 -1
  113. package/sidecar/dist/src/capture/anchors.d.ts +8 -0
  114. package/sidecar/dist/src/capture/anchors.js +3 -2
  115. package/sidecar/dist/src/capture/api.d.ts +70 -3
  116. package/sidecar/dist/src/capture/check-classify.d.ts +7 -0
  117. package/sidecar/dist/src/capture/check-classify.js +24 -0
  118. package/sidecar/dist/src/capture/check-probe.d.ts +76 -7
  119. package/sidecar/dist/src/capture/check-probe.js +147 -19
  120. package/sidecar/dist/src/capture/check.js +13 -1
  121. package/sidecar/dist/src/capture/graphql-leaves.d.ts +46 -0
  122. package/sidecar/dist/src/capture/graphql-leaves.js +142 -0
  123. package/sidecar/dist/src/capture/index.d.ts +4 -1
  124. package/sidecar/dist/src/capture/index.js +3 -1
  125. package/sidecar/dist/src/definition-resolver.d.ts +2 -1
  126. package/sidecar/dist/src/definition-resolver.js +15 -9
  127. package/sidecar/dist/src/engine-stamp.json +1 -1
  128. package/sidecar/dist/src/held-shadow.d.ts +12 -2
  129. package/sidecar/dist/src/held-shadow.js +9 -9
  130. package/sidecar/dist/src/index.js +18 -1
  131. package/sidecar/dist/src/library-claims.js +26 -3
  132. package/sidecar/dist/src/retype.d.ts +47 -0
  133. package/sidecar/dist/src/retype.js +274 -18
  134. package/sidecar/dist/src/site-find.d.ts +27 -0
  135. package/sidecar/dist/src/site-find.js +109 -0
  136. package/sidecar/dist/src/type-inferrer.d.ts +5 -0
  137. package/sidecar/dist/src/type-inferrer.js +8 -4
  138. package/sidecar/dist/src/type-structural-expander.d.ts +10 -0
  139. package/sidecar/dist/src/type-structural-expander.js +73 -4
  140. package/sidecar/dist/src/types.d.ts +50 -2
  141. package/sidecar/dist/src/validators.d.ts +328 -8
  142. package/sidecar/dist/src/validators.js +29 -0
@@ -12,15 +12,19 @@ import { throttledVersionMismatch } from "../init/outdated.js";
12
12
  import { currentVersion } from "../update.js";
13
13
  import { markFacts, markLed, markTold, recordEdit, toldKey, wasLed, wasTold } from "./reuse.js";
14
14
  import { similarLines } from "./similar.js";
15
- import { deliverLate, emitPostToolUse } from "./late.js";
16
- import { needsBackground, probeEdits } from "./probe.js";
15
+ import { deliverEarly, deliverLateFirst, emitPostToolUse } from "./late.js";
16
+ import { needsBackground, probeEdits, probeTimeoutMs } from "./probe.js";
17
17
  import { inOtherWorktree } from "./worktree.js";
18
- import { answerInHand, enqueue, ensureRunner } from "./rechecks.js";
18
+ import { answerInHand, enqueue, ensureRunner, readEarly } from "./rechecks.js";
19
19
  import { engineReadyOf } from "./timings.js";
20
20
  import { factLines } from "../facts/lines.js";
21
+ import { openFacts } from "../facts/store.js";
21
22
  import { isManifest } from "../facts/rules/packages.js";
22
- import { chainLinesEnabled, contractLinesEnabled, factsEnabled } from "../facts/enabled.js";
23
+ import { chainLinesEnabled, compilerLinesEnabled, contractLinesEnabled, factsEnabled } from "../facts/enabled.js";
24
+ import { askHeld } from "../held/client.js";
25
+ import { firstLineGeneration, stampOf } from "./generation.js";
23
26
  const log = createLogger("carrick-hook");
27
+ /** D13: at most this many compiler lines in one action. */
24
28
  /**
25
29
  * Check `edited` (absolute paths, at least one) as the post-edit hook does and
26
30
  * print the one object for them. `extra` lines (a read answer from the same
@@ -57,48 +61,84 @@ export async function editFlow(input, edited, extra = []) {
57
61
  // (`facts/lines.ts`), read locally. Read before any probe answer is
58
62
  // rendered: a file the fact file covers gets its callers from there, not
59
63
  // the uses-count line.
60
- const facts = channel.channel === "hook"
61
- ? await factLines(choice.root, [...edited, ...(input.factOnly ?? [])]
62
- .filter((file) => !(input.shell && inOtherWorktree(file, cwd ?? process.cwd())))
63
- .map((file) => ({ file, ...input.changes?.get(file) })), session, { contract: contractLinesEnabled(), chain: chainLinesEnabled() })
64
+ const factFiles = [...edited, ...(input.factOnly ?? [])].filter((file) => !(input.shell && inOtherWorktree(file, cwd ?? process.cwd())));
65
+ // The held compiler (part 3, B1): one ask per queued entry of a file in this
66
+ // session's own checkout, made once part 2's entry exists and named by its
67
+ // seq, so the daemon files its early answer beside that entry. The hook waits
68
+ // for the asks until the probe's budget since the edit has run out
69
+ // (`probeTimeoutMs`); a slower answer is printed by the next carrier
70
+ // (`deliverLate`). Off, nothing is asked and nothing below changes.
71
+ const asks = [];
72
+ const askFor = (entries) => {
73
+ if (!compilerLinesEnabled())
74
+ return;
75
+ for (const entry of entries) {
76
+ if (inOtherWorktree(entry.file, cwd ?? process.cwd()))
77
+ continue;
78
+ const waitMs = Math.max(0, editedAt + probeTimeoutMs() - Date.now());
79
+ asks.push(askHeld(choice.root, [entry.file], { session: entry.session, kind: "edit", editedAt, waitMs, seq: entry.seq }).then((answer) => ({ entry, answer })));
80
+ }
81
+ };
82
+ const run = input.run ?? { factLines, probeEdits, openFacts };
83
+ const hook = channel.channel === "hook";
84
+ const queueable = hook && Boolean(session);
85
+ const probeOf = (indexes) => indexes.length > 0
86
+ ? run.probeEdits(indexes.map((index) => relatives[index]), choice.root)
87
+ : Promise.resolve({ results: [], failure: null, ms: 0 });
88
+ // The probe starts first and covers every edited file, queued or not (one
89
+ // call per edit). It is awaited only after the fact lines and the enqueue, so
90
+ // the entry and the held ask never wait for it. Its handler is attached here:
91
+ // the promise sits unawaited while the fact lines run, and an empty answer is
92
+ // the existing "a probe with no answer queues every file" case.
93
+ const probing = probeOf([...relatives.keys()]).catch((error) => ({ results: [], failure: String(error), ms: 0 }));
94
+ // The store is opened once: "is there a fact file" is known from the open.
95
+ // `factLines` takes the opened store and closes it.
96
+ const store = hook && factsEnabled() ? await run.openFacts(choice.root) : null;
97
+ // The edit just landed, so the index describes the file as it was before
98
+ // it. The hook asks the binary once, with a probe that never starts a
99
+ // re-scan: an answer that needs none (the file reads the same, a known miss)
100
+ // comes back at once and prints below. Every other file is queued for the
101
+ // background runner (carrick#3198). With a fact file the fact lines print now
102
+ // and every file is queued in place of the probe's verdict: its answer,
103
+ // problem and uses lines and leads included, arrives on the next carrier
104
+ // (T12-2). The probe still runs beside the fact lines and its similar-function
105
+ // block prints now. A sub-agent's edit takes the same path (P5, #4110), and a
106
+ // file the queue did not take is rendered from the probe in hand as before
107
+ // (R46.1).
108
+ const insteadOfProbe = queueable && store !== null;
109
+ const facts = hook
110
+ ? await run.factLines(choice.root, factFiles.map((file) => ({ file, ...input.changes?.get(file) })), session, { contract: contractLinesEnabled(), chain: chainLinesEnabled(), store })
64
111
  : null;
65
112
  const covered = new Set(facts?.callersRead ?? []);
66
- const queueable = channel.channel === "hook" && Boolean(session);
67
- // The edit just landed, so the index describes the file as it was before
68
- // it. Without a fact file the hook asks the binary once, with a probe that
69
- // never starts a re-scan: an answer that needs none (the file reads the
70
- // same, a known miss) comes back at once and prints
71
- // below. Every other file is queued for the background runner
72
- // (carrick#3198). With a fact file the fact lines print now and every file
73
- // is queued in place of the probe: its answer, problem and uses lines and
74
- // leads included, arrives on the next carrier (T12-2). A sub-agent's edit
75
- // keeps the probe (R46.3), and a file the queue did not take is probed in
76
- // hand as before (R46.1).
77
- const insteadOfProbe = queueable && facts?.present === true && !input.subAgent;
78
113
  const queued = new Set();
79
114
  if (insteadOfProbe && edited.length > 0) {
80
- const entries = enqueue(choice.root, session, edited, editedAt, { factsCallers: covered, insteadOfProbe });
115
+ const entries = enqueue(choice.root, session, edited, editedAt, { factsCallers: covered, insteadOfProbe, cwd });
81
116
  if (entries.length > 0)
82
117
  ensureRunner(choice.root);
83
118
  for (const entry of entries)
84
119
  queued.add(entry.file);
120
+ askFor(entries);
85
121
  }
86
- const probed = [...relatives.keys()].filter((index) => !queued.has(edited[index]));
87
- const answers = probed.length > 0
88
- ? await probeEdits(probed.map((index) => relatives[index]), choice.root)
89
- : { results: [], failure: null, ms: 0 };
122
+ const answers = await probing;
90
123
  if (input.timing)
91
124
  input.timing.waitedMs = answers.ms;
92
125
  // Each file's probe answer by its place in `edited`; null for a file queued
93
- // in place of the probe or one the probe gave no answer for.
94
- const results = relatives.map(() => null);
95
- for (const [at, index] of probed.entries())
96
- results[index] = answers.results[at] ?? null;
126
+ // in place of the probe (its answer is read for the similar-function block
127
+ // only) or one the probe gave no answer for.
128
+ const results = relatives.map((_, index) => (queued.has(edited[index]) ? null : (answers.results[index] ?? null)));
97
129
  const toQueue = [];
98
130
  const rendered = new Map();
99
131
  const leads = new Map();
100
132
  for (const [index, relative] of relatives.entries()) {
101
133
  if (queued.has(edited[index])) {
134
+ // Only the similar-function block is read from the probe; the queued
135
+ // re-check states the edit's answer.
136
+ const answer = answers.results[index] ?? null;
137
+ if (answer) {
138
+ const found = similarLines(answer, relative, cwd, (key) => !session || !wasLed(session, key), log);
139
+ if (found.lines.length > 0)
140
+ leads.set(index, found);
141
+ }
102
142
  log("queued in place of the probe:", relative);
103
143
  continue;
104
144
  }
@@ -115,7 +155,7 @@ export async function editFlow(input, edited, extra = []) {
115
155
  continue;
116
156
  }
117
157
  // The block rides on the probe answer, so a queued file gets it too.
118
- const found = similarLines(result, relative, (key) => !session || !wasLed(session, key), log);
158
+ const found = similarLines(result, relative, cwd, (key) => !session || !wasLed(session, key), log);
119
159
  if (found.lines.length > 0)
120
160
  leads.set(index, found);
121
161
  if (queueable && needsBackground(result)) {
@@ -141,11 +181,12 @@ export async function editFlow(input, edited, extra = []) {
141
181
  if (toQueue.length > 0 && session) {
142
182
  // A file whose callers the fact lines answered keeps its late answer free
143
183
  // of the uses-count line too, as this answer would have been.
144
- const entries = enqueue(choice.root, session, toQueue.map((index) => edited[index]), editedAt, { factsCallers: covered });
184
+ const entries = enqueue(choice.root, session, toQueue.map((index) => edited[index]), editedAt, { factsCallers: covered, cwd });
145
185
  if (entries.length > 0)
146
186
  ensureRunner(choice.root);
147
187
  for (const entry of entries)
148
188
  queued.add(entry.file);
189
+ askFor(entries);
149
190
  // A queued file says nothing now: its answer is delivered with the next
150
191
  // Carrick line only when it holds a finding, and a refused queue entry is a
151
192
  // gap the Stop hook names (hook-wording audit T4).
@@ -173,14 +214,37 @@ export async function editFlow(input, edited, extra = []) {
173
214
  if (recorded.length > 0)
174
215
  recordEdit(session, choice.root, editedAt, undefined, recorded);
175
216
  }
217
+ // The early answers in hand: each ask ends by the edit's deadline, and one
218
+ // that answered `ready` has filed its early answer before replying. Each is
219
+ // claimed before the late answers below are read, so no carrier says it again.
220
+ const answered = await Promise.all(asks);
221
+ const held = mergedAsk(answered.map((a) => a.answer));
222
+ if (input.timing && held && held.state !== "off") {
223
+ input.timing.heldMs = held.ms;
224
+ input.timing.heldState = held.state;
225
+ }
226
+ const seen = new Set();
227
+ const earlyNow = [];
228
+ for (const { entry, answer } of answered) {
229
+ if (answer.state !== "ready")
230
+ continue;
231
+ const early = readEarly(entry.session, entry.seq);
232
+ if (early)
233
+ earlyNow.push(...deliverEarly(entry.session, early, seen, { late: false }));
234
+ }
176
235
  // Delivered after this edit is queued, so an older answer for a file this
177
236
  // edit queues again is skipped (the newer entry carries it).
178
- const late = channel.channel === "hook" ? deliverLate(session) : [];
237
+ const stamps = [];
238
+ const late = channel.channel === "hook" ? await deliverLateFirst(session, Date.now(), seen) : [];
239
+ const generationAt = contexts.length;
179
240
  contexts.push(...late);
180
241
  for (const index of relatives.keys()) {
181
242
  const context = rendered.get(index);
182
243
  if (context)
183
244
  contexts.push(context);
245
+ const stamp = context && results[index] ? stampOf(results[index]) : null;
246
+ if (stamp)
247
+ stamps.push(stamp);
184
248
  const found = leads.get(index);
185
249
  if (found) {
186
250
  // A late answer delivered just above may have claimed the same function.
@@ -196,8 +260,17 @@ export async function editFlow(input, edited, extra = []) {
196
260
  log(`the ${channel.channel} channel owns delivery in this install; printing nothing`);
197
261
  return;
198
262
  }
199
- if (input.timing)
263
+ if (input.timing) {
200
264
  input.timing.factsMs = facts.ms;
265
+ input.timing.factsStops = facts.stops;
266
+ }
267
+ // The first part-2 line of the session says which index it read while it
268
+ // differs from the fact file's (once per session).
269
+ const generation = contexts.length > generationAt ? await firstLineGeneration(choice.root, session, stamps) : null;
270
+ if (generation)
271
+ contexts.splice(generationAt, 0, generation);
272
+ // An early line is ADDED to part 1's: it never replaces a contract line.
273
+ contexts.push(...earlyNow);
201
274
  contexts.push(...facts.lines);
202
275
  // A missing or stale fact file is refreshed in the background, detached.
203
276
  if (facts.stale)
@@ -222,4 +295,11 @@ export async function editFlow(input, edited, extra = []) {
222
295
  contexts.unshift(...extra);
223
296
  emitPostToolUse(contexts);
224
297
  }
298
+ /** One state and time for the action's asks: the first that answered `ready`, else the first; the longest wait. */
299
+ function mergedAsk(answers) {
300
+ if (answers.length === 0)
301
+ return null;
302
+ const first = answers.find((a) => a.state === "ready") ?? answers[0];
303
+ return { ...first, ms: Math.max(...answers.map((a) => a.ms)) };
304
+ }
225
305
  //# sourceMappingURL=edit-flow.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"edit-flow.js","sourceRoot":"","sources":["../../src/hook/edit-flow.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,wEAAwE;AACxE,EAAE;AACF,6EAA6E;AAC7E,2EAA2E;AAC3E,4DAA4D;AAE5D,OAAO,IAAI,MA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CAAC,IAAI,CAAC,CAAC,CAAC;IACpG,MAAM,QAAQ,GAAG,aAAa,CAAC,CAAC,CAAC,wBAAwB,CAAC,MAAM,CAAC,IAAI,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAChG,IAAI,QAAQ;QAAE,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtC,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO;QAAE,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACxD,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO;QAAE,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;IACrD,IAAI,OAAO;QAAE,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9C,QAAQ,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC;IAC3B,eAAe,CAAC,QAAQ,CAAC,CAAC;AAC5B,CAAC;AAED,mHAAmH;AACnH,SAAS,SAAS,CAAC,OAA6B;IAC9C,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACtC,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,OAAO,CAAC,IAAI,OAAO,CAAC,CAAC,CAAE,CAAC;IACtE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;AACjE,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { GenerationGap, LocalStamp } from "../hosted-snapshot.ts";
2
+ import type { CheckResult, StatusService } from "../contract.ts";
3
+ /** The stamp one `check` answer carries for its own repo, or null when it names none. */
4
+ export declare function stampOf(result: Pick<CheckResult, "repo" | "index_commit" | "indexed_at">): LocalStamp | null;
5
+ /** One stamp per repo of `carrick status`: its commit when its services agree on one, else none. */
6
+ export declare function stampsOfStatus(services: readonly Pick<StatusService, "repo" | "index_commit" | "indexed_at">[]): LocalStamp[];
7
+ /** The gaps between the fact file under `root` and `local`, with the fact file's build time. Never throws. */
8
+ export declare function gapsAgainstFacts(root: string, local: readonly LocalStamp[]): Promise<{
9
+ gaps: GenerationGap[];
10
+ builtAt: string | null;
11
+ }>;
12
+ /** The session start's sentence: the gap between the fact file and `carrick status`, or null. */
13
+ export declare function sessionGenerationSentence(root: string, services: readonly StatusService[], now: number): Promise<string | null>;
14
+ /**
15
+ * The sentence for the first part-2 line of a session while the gap stands,
16
+ * from the answers' own stamps (no extra call). Said once per session under
17
+ * `generation::<sorted local commits>`: a new local commit is a new gap.
18
+ */
19
+ export declare function firstLineGeneration(root: string, session: string | undefined, stamps: readonly LocalStamp[], now?: number, home?: string): Promise<string | null>;
@@ -0,0 +1,75 @@
1
+ // Which index each part of the hooks reads (carrick#3434). The fact lines
2
+ // (part 1) read the fact file, which is the hosted index; the re-check, Read,
3
+ // uses and search lines (part 2) read this machine's copy. When the two name
4
+ // different commits for a repo, the first part-2 line of a session says so
5
+ // once, and the session start says so in its first line. The comparison is
6
+ // `generationGap` (`hosted-snapshot.ts`), the one answer; this file reads the
7
+ // fact file and keeps the said-once key.
8
+ import { createLogger } from "../log.js";
9
+ import { generationGap } from "../hosted-snapshot.js";
10
+ import { commitsOf } from "../facts/peers.js";
11
+ import { openFacts } from "../facts/store.js";
12
+ import { generationSentence } from "../render.js";
13
+ import { markTold, wasTold } from "./reuse.js";
14
+ const log = createLogger("carrick-generation");
15
+ /** The stamp one `check` answer carries for its own repo, or null when it names none. */
16
+ export function stampOf(result) {
17
+ if (!result.repo || !result.index_commit)
18
+ return null;
19
+ return { repo: result.repo, commit: result.index_commit, ...(result.indexed_at ? { indexedAt: result.indexed_at } : {}) };
20
+ }
21
+ /** One stamp per repo of `carrick status`: its commit when its services agree on one, else none. */
22
+ export function stampsOfStatus(services) {
23
+ const byRepo = new Map();
24
+ for (const service of services)
25
+ byRepo.set(service.repo, [...(byRepo.get(service.repo) ?? []), service]);
26
+ return [...byRepo].map(([repo, rows]) => {
27
+ const commits = new Set(rows.map((row) => row.index_commit));
28
+ const commit = commits.size === 1 ? rows[0].index_commit : null;
29
+ const indexedAt = rows.find((row) => row.indexed_at)?.indexed_at;
30
+ return { repo, commit, ...(indexedAt ? { indexedAt } : {}) };
31
+ });
32
+ }
33
+ /** The gaps between the fact file under `root` and `local`, with the fact file's build time. Never throws. */
34
+ export async function gapsAgainstFacts(root, local) {
35
+ if (local.length === 0)
36
+ return { gaps: [], builtAt: null };
37
+ try {
38
+ const store = await openFacts(root);
39
+ if (store === null)
40
+ return { gaps: [], builtAt: null };
41
+ try {
42
+ return { gaps: generationGap(commitsOf(store.meta), store.repos, local), builtAt: store.meta["built_at"] ?? null };
43
+ }
44
+ finally {
45
+ store.close();
46
+ }
47
+ }
48
+ catch (error) {
49
+ log("generation read failed", String(error));
50
+ return { gaps: [], builtAt: null };
51
+ }
52
+ }
53
+ /** The session start's sentence: the gap between the fact file and `carrick status`, or null. */
54
+ export async function sessionGenerationSentence(root, services, now) {
55
+ const { gaps, builtAt } = await gapsAgainstFacts(root, stampsOfStatus(services));
56
+ return generationSentence(gaps, builtAt, now);
57
+ }
58
+ /**
59
+ * The sentence for the first part-2 line of a session while the gap stands,
60
+ * from the answers' own stamps (no extra call). Said once per session under
61
+ * `generation::<sorted local commits>`: a new local commit is a new gap.
62
+ */
63
+ export async function firstLineGeneration(root, session, stamps, now = Date.now(), home) {
64
+ if (!session || stamps.length === 0)
65
+ return null;
66
+ const { gaps, builtAt } = await gapsAgainstFacts(root, stamps);
67
+ if (gaps.length === 0)
68
+ return null;
69
+ const key = `generation::${gaps.map((gap) => gap.local).sort().join(",")}`;
70
+ if (wasTold(session, key, home))
71
+ return null;
72
+ markTold(session, [key], home);
73
+ return generationSentence(gaps, builtAt, now);
74
+ }
75
+ //# sourceMappingURL=generation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generation.js","sourceRoot":"","sources":["../../src/hook/generation.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,8EAA8E;AAC9E,6EAA6E;AAC7E,2EAA2E;AAC3E,2EAA2E;AAC3E,8EAA8E;AAC9E,yCAAyC;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,GAAG,GAAG,YAAY,CAAC,oBAAoB,CAAC,CAAC;AAE/C,yFAAyF;AACzF,MAAM,UAAU,OAAO,CAAC,MAAiE;IACvF,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,YAAY;QAAE,OAAO,IAAI,CAAC;IACtD,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AAC5H,CAAC;AAED,oGAAoG;AACpG,MAAM,UAAU,cAAc,CAAC,QAAgF;IAC7G,MAAM,MAAM,GAAG,IAAI,GAAG,EAAqE,CAAC;IAC5F,KAAK,MAAM,OAAO,IAAI,QAAQ;QAAE,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,MAAM,CA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,CAAC;IAC3E,IAAI,OAAO,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC7C,QAAQ,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;IAC/B,OAAO,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;AAChD,CAAC"}
@@ -1,13 +1,41 @@
1
- import type { Answer } from "./rechecks.ts";
1
+ import type { Answer, EarlyAnswer } from "./rechecks.ts";
2
+ import type { LocalStamp } from "../hosted-snapshot.ts";
2
3
  /** The words for one finished answer, or null when there is nothing to say. */
3
4
  export declare function lateContext(answer: Answer, uses: boolean): string | null;
5
+ /**
6
+ * The full answer as a carrier prints it once its entry's early answer has
7
+ * spoken (part 3, B1, P10): without the breaks the early rows already stated
8
+ * and their mirror call rows, and one correction line for each early break the
9
+ * full re-check found compatible. An entry with no early answer, or whose early
10
+ * answer was never printed, is printed as it stands: an early break part 2 did
11
+ * not judge is then printed by its own carrier (`deliverEarly`).
12
+ */
13
+ export declare function confirmAnswer(answer: Answer, home?: string): {
14
+ answer: Answer;
15
+ corrections: string[];
16
+ };
4
17
  /**
5
18
  * What a carrier prints for one finished answer it has claimed, oldest first:
6
- * its similar-function blocks, then its words (`lateContext`), with the uses-count and lead
7
- * keys marked as told. Shared by `deliverLate` and by the Stop hook for an
8
- * answer queued in place of the probe (R46.2), so both print it the same way.
19
+ * its similar-function blocks, then its words (`lateContext`), then any
20
+ * correction of its early answer, with the uses-count and lead keys marked as
21
+ * told. Shared by `deliverLate` and by the Stop hook for an answer queued in
22
+ * place of the probe (R46.2), so both print it the same way.
23
+ */
24
+ export declare function deliverOne(session: string, raw: Answer, home?: string): string[];
25
+ /**
26
+ * What a carrier prints for one early answer (part 3, B1) it owes: the breaks
27
+ * not yet printed in this message (`seen`, the rows' keys), through the one
28
+ * renderer, claimed once under `<seq>.early.said` with the keys of every row the
29
+ * message states. When the full answer has already landed, only the rows it did
30
+ * not judge stand and print (R5a); the rest are its to say.
9
31
  */
10
- export declare function deliverOne(session: string, answer: Answer, home?: string): string[];
32
+ export declare function deliverEarly(owner: string, early: EarlyAnswer, seen: Set<string>, options?: {
33
+ home?: string;
34
+ now?: number;
35
+ late?: boolean;
36
+ }): string[];
37
+ /** Every early answer `session` is owed, printed oldest first (`deliverEarly`). */
38
+ export declare function deliverEarlies(session: string, seen: Set<string>, home?: string, now?: number, listing?: readonly string[]): string[];
11
39
  /** Whether an answer holds a row to act on: a problem, a moved row, a deletion. */
12
40
  export declare function hasFindings(answer: Answer): boolean;
13
41
  /**
@@ -15,18 +43,31 @@ export declare function hasFindings(answer: Answer): boolean;
15
43
  * the findings alone. No uses-count line and no leads, which a parent with
16
44
  * many sub-agents would get once per file it never edited.
17
45
  */
18
- export declare function adoptedLine(answer: Answer): string | null;
46
+ export declare function adoptedLine(raw: Answer, home?: string): string | null;
19
47
  /**
20
48
  * The one reader of a finished `check --changed` answer, for every hook that
21
49
  * speaks it (the carriers and Stop): a problem, or the clean line for the set a
22
50
  * Stop named, once per set. Null when there is nothing to say.
23
51
  */
24
52
  export declare function changedLine(session: string, answer: Answer, home?: string): string | null;
53
+ /** The index a delivered answer was read from, and where in the returned contexts its words start. */
54
+ export type LateStamp = {
55
+ root: string;
56
+ stamp: LocalStamp;
57
+ at: number;
58
+ };
59
+ /**
60
+ * `deliverLate`, with the sentence saying which index the first part-2 line of
61
+ * the session read when it differs from the fact file's (once per session,
62
+ * `generation.ts`), placed before that line.
63
+ */
64
+ export declare function deliverLateFirst(session: string | undefined, now?: number, seen?: Set<string>, home?: string): Promise<string[]>;
25
65
  /**
26
66
  * Claim and render every finished answer this session has not been given.
27
- * Returns the contexts to print, oldest first. Nothing here throws.
67
+ * Returns the contexts to print, oldest first. Nothing here throws. `seen` are
68
+ * the early rows this message already states (the edit hook's in hand).
28
69
  */
29
- export declare function deliverLate(session: string | undefined, now?: number): string[];
70
+ export declare function deliverLate(session: string | undefined, now?: number, seen?: Set<string>, home?: string, stamps?: LateStamp[]): string[];
30
71
  /** The one JSON object a PostToolUse hook prints (the host attaches it to the tool result), or nothing when there are no lines. */
31
72
  export declare function emitPostToolUse(contexts: readonly string[]): void;
32
73
  /**
@@ -34,4 +75,4 @@ export declare function emitPostToolUse(contexts: readonly string[]): void;
34
75
  * command that names no source file, a search tool): on the hook channel only,
35
76
  * and nothing when none has landed.
36
77
  */
37
- export declare function printLateOnly(session: string | undefined): void;
78
+ export declare function printLateOnly(session: string | undefined): Promise<void>;