@wildorder/nightshift 0.5.0 → 0.7.0

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 (72) hide show
  1. package/LICENSE +21 -21
  2. package/dist/author.d.ts +13 -0
  3. package/dist/author.d.ts.map +1 -1
  4. package/dist/author.js +46 -13
  5. package/dist/author.js.map +1 -1
  6. package/dist/ci-init.d.ts +51 -0
  7. package/dist/ci-init.d.ts.map +1 -0
  8. package/dist/ci-init.js +274 -0
  9. package/dist/ci-init.js.map +1 -0
  10. package/dist/cli.js +99 -11
  11. package/dist/cli.js.map +1 -1
  12. package/dist/decide.d.ts +13 -5
  13. package/dist/decide.d.ts.map +1 -1
  14. package/dist/decide.js +50 -35
  15. package/dist/decide.js.map +1 -1
  16. package/dist/decider-review.d.ts +68 -1
  17. package/dist/decider-review.d.ts.map +1 -1
  18. package/dist/decider-review.js +211 -3
  19. package/dist/decider-review.js.map +1 -1
  20. package/dist/decision-ledger.d.ts +79 -1
  21. package/dist/decision-ledger.d.ts.map +1 -1
  22. package/dist/decision-ledger.js +118 -11
  23. package/dist/decision-ledger.js.map +1 -1
  24. package/dist/decision-view.d.ts +41 -0
  25. package/dist/decision-view.d.ts.map +1 -0
  26. package/dist/decision-view.js +264 -0
  27. package/dist/decision-view.js.map +1 -0
  28. package/dist/exit-codes.d.ts +44 -0
  29. package/dist/exit-codes.d.ts.map +1 -0
  30. package/dist/exit-codes.js +49 -0
  31. package/dist/exit-codes.js.map +1 -0
  32. package/dist/findings.d.ts +3 -0
  33. package/dist/findings.d.ts.map +1 -1
  34. package/dist/findings.js.map +1 -1
  35. package/dist/index.d.ts +7 -0
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +6 -0
  38. package/dist/index.js.map +1 -1
  39. package/dist/manifest.d.ts +2 -2
  40. package/dist/program-branch.d.ts +65 -0
  41. package/dist/program-branch.d.ts.map +1 -0
  42. package/dist/program-branch.js +123 -0
  43. package/dist/program-branch.js.map +1 -0
  44. package/dist/programs-dir.d.ts +27 -0
  45. package/dist/programs-dir.d.ts.map +1 -0
  46. package/dist/programs-dir.js +52 -0
  47. package/dist/programs-dir.js.map +1 -0
  48. package/dist/publish.d.ts +105 -0
  49. package/dist/publish.d.ts.map +1 -0
  50. package/dist/publish.js +528 -0
  51. package/dist/publish.js.map +1 -0
  52. package/dist/report-path.d.ts +7 -0
  53. package/dist/report-path.d.ts.map +1 -0
  54. package/dist/report-path.js +10 -0
  55. package/dist/report-path.js.map +1 -0
  56. package/dist/review-pass.d.ts +33 -1
  57. package/dist/review-pass.d.ts.map +1 -1
  58. package/dist/review-pass.js +94 -42
  59. package/dist/review-pass.js.map +1 -1
  60. package/dist/run-program.d.ts +29 -3
  61. package/dist/run-program.d.ts.map +1 -1
  62. package/dist/run-program.js +431 -47
  63. package/dist/run-program.js.map +1 -1
  64. package/dist/run-publish.d.ts +41 -0
  65. package/dist/run-publish.d.ts.map +1 -0
  66. package/dist/run-publish.js +33 -0
  67. package/dist/run-publish.js.map +1 -0
  68. package/package.json +5 -4
  69. package/skills/plan-program/SKILL.md +14 -0
  70. package/templates/AGENTS.md +29 -29
  71. package/templates/CLAUDE.md +7 -7
  72. package/templates/vision.md +46 -46
@@ -0,0 +1,528 @@
1
+ import { execFile, spawn } from "node:child_process";
2
+ import { mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
3
+ import { tmpdir } from "node:os";
4
+ import { join, resolve } from "node:path";
5
+ import { promisify } from "node:util";
6
+ import { sanitizedEnvironment } from "./agent-runner.js";
7
+ import { readDecisionLedger } from "./decision-ledger.js";
8
+ import { escalatedRecords, renderRecord, } from "./decision-view.js";
9
+ import { loadManifest } from "./manifest.js";
10
+ import { detectDefaultBranch, programBranchName } from "./program-branch.js";
11
+ import { runReportPath } from "./report-path.js";
12
+ const execFileAsync = promisify(execFile);
13
+ /**
14
+ * The handover from a finished run to a reviewable pull request: pushes the
15
+ * program branch, opens or updates exactly one draft PR through `gh`,
16
+ * renders the run report as its body (continuing oversized reports into
17
+ * comments), and upserts one comment per escalated decision. Idempotent —
18
+ * re-publishing edits the existing PR and its comments rather than
19
+ * duplicating them.
20
+ *
21
+ * `publish` is deliberately separate from `runProgram`: the runner owns
22
+ * commits and knows nothing about forges, and this command owns the forge
23
+ * and knows nothing about building. Authentication is entirely `gh`'s job —
24
+ * nightshift never reads, stores, or passes a token.
25
+ */
26
+ // GitHub's documented maximum issue/PR body length.
27
+ export const GITHUB_PR_BODY_LIMIT = 65_536;
28
+ const REPORT_CONTINUATION_POINTER = "\n\n---\n_The run report continues in the comments below._";
29
+ const DEGENERATE_CUT_SUFFIX = "\n\n_… (continued)_";
30
+ // Reserve enough headroom that a pre-split atomic unit, plus whichever
31
+ // decoration (pointer or marker line) it ends up rendered with, never
32
+ // itself exceeds the limit.
33
+ const SPLIT_RESERVE = 256;
34
+ const MAX_ATOMIC_SECTION_LENGTH = GITHUB_PR_BODY_LIMIT - SPLIT_RESERVE;
35
+ export const defaultPublishGit = {
36
+ async currentBranch(cwd) {
37
+ const { stdout } = await execFileAsync("git", ["rev-parse", "--abbrev-ref", "HEAD"], { cwd });
38
+ return stdout.trim();
39
+ },
40
+ async commitsAhead(cwd, base, branch) {
41
+ const { stdout } = await execFileAsync("git", ["rev-list", "--count", `${base}..${branch}`], { cwd });
42
+ return Number.parseInt(stdout.trim(), 10);
43
+ },
44
+ async push(cwd, remote, branch) {
45
+ try {
46
+ await execFileAsync("git", ["push", "-u", remote, branch], { cwd });
47
+ }
48
+ catch (error) {
49
+ const stderr = String(error.stderr ?? error.message);
50
+ throw new Error(`git push -u ${remote} ${branch} failed:\n${stderr.trim()}`, { cause: error });
51
+ }
52
+ },
53
+ };
54
+ /**
55
+ * Spawns `gh` through the same primitives the rest of the codebase spawns
56
+ * subprocesses with (`spawn` + `sanitizedEnvironment()`, `windowsHide`), but
57
+ * keeps stdout and stderr separate — `runProcess` in `agent-runner.ts` merges
58
+ * them, which is fine for agent transcripts but wrong for parsing `gh`'s JSON.
59
+ */
60
+ function runGh(cwd, args, input) {
61
+ return new Promise((resolvePromise, rejectPromise) => {
62
+ const child = spawn("gh", args, {
63
+ cwd,
64
+ windowsHide: true,
65
+ stdio: ["pipe", "pipe", "pipe"],
66
+ env: sanitizedEnvironment(),
67
+ });
68
+ let stdout = "";
69
+ let stderr = "";
70
+ child.stdout.setEncoding("utf8");
71
+ child.stderr.setEncoding("utf8");
72
+ child.stdout.on("data", (chunk) => {
73
+ stdout += chunk;
74
+ });
75
+ child.stderr.on("data", (chunk) => {
76
+ stderr += chunk;
77
+ });
78
+ child.on("error", rejectPromise);
79
+ child.on("close", (code) => {
80
+ resolvePromise({ exitCode: code ?? 1, stdout, stderr });
81
+ });
82
+ if (input !== undefined)
83
+ child.stdin.end(input);
84
+ else
85
+ child.stdin.end();
86
+ });
87
+ }
88
+ async function withTempBodyFile(body, fn) {
89
+ const dir = await mkdtemp(join(tmpdir(), "nightshift-publish-"));
90
+ const file = join(dir, "body.md");
91
+ await writeFile(file, body, "utf8");
92
+ try {
93
+ return await fn(file);
94
+ }
95
+ finally {
96
+ await rm(dir, { recursive: true, force: true });
97
+ }
98
+ }
99
+ function ghErrorMessage(action, result) {
100
+ const detail = result.stderr.trim() || result.stdout.trim();
101
+ return `${action} failed:\n${detail}`;
102
+ }
103
+ function normalizeState(raw) {
104
+ const value = raw.toLowerCase();
105
+ if (value === "open" || value === "closed" || value === "merged")
106
+ return value;
107
+ throw new Error(`gh reported an unrecognized pull request state "${raw}"`);
108
+ }
109
+ export const defaultGhClient = {
110
+ async checkAuth(cwd) {
111
+ let result;
112
+ try {
113
+ result = await runGh(cwd, ["auth", "status"]);
114
+ }
115
+ catch (error) {
116
+ if (error.code === "ENOENT") {
117
+ throw new Error("The GitHub CLI (gh) is not installed or not on PATH. Install it " +
118
+ "from https://cli.github.com and run `gh auth login`, then " +
119
+ "re-run publish.", { cause: error });
120
+ }
121
+ throw error;
122
+ }
123
+ if (result.exitCode !== 0) {
124
+ throw new Error("gh is not authenticated. Run `gh auth login` (or set GH_TOKEN in " +
125
+ "CI), then re-run publish.");
126
+ }
127
+ },
128
+ async findOpenPullRequest(cwd, headBranch) {
129
+ const result = await runGh(cwd, [
130
+ "pr",
131
+ "list",
132
+ "--head",
133
+ headBranch,
134
+ "--state",
135
+ "open",
136
+ "--json",
137
+ "number,url,state,isDraft",
138
+ "--limit",
139
+ "1",
140
+ ]);
141
+ if (result.exitCode !== 0) {
142
+ throw new Error(ghErrorMessage("gh pr list", result));
143
+ }
144
+ const parsed = JSON.parse(result.stdout);
145
+ const entry = parsed[0];
146
+ if (!entry)
147
+ return undefined;
148
+ return {
149
+ number: entry.number,
150
+ url: entry.url,
151
+ state: normalizeState(entry.state),
152
+ isDraft: entry.isDraft,
153
+ };
154
+ },
155
+ async createDraftPullRequest(cwd, input) {
156
+ await withTempBodyFile(input.body, async (bodyFile) => {
157
+ const result = await runGh(cwd, [
158
+ "pr",
159
+ "create",
160
+ "--draft",
161
+ "--head",
162
+ input.headBranch,
163
+ "--base",
164
+ input.baseBranch,
165
+ "--title",
166
+ input.title,
167
+ "--body-file",
168
+ bodyFile,
169
+ ]);
170
+ if (result.exitCode !== 0) {
171
+ throw new Error(ghErrorMessage("gh pr create", result));
172
+ }
173
+ });
174
+ const view = await runGh(cwd, [
175
+ "pr",
176
+ "view",
177
+ input.headBranch,
178
+ "--json",
179
+ "number,url,state,isDraft",
180
+ ]);
181
+ if (view.exitCode !== 0) {
182
+ throw new Error(ghErrorMessage("gh pr view (after create)", view));
183
+ }
184
+ const parsed = JSON.parse(view.stdout);
185
+ return {
186
+ number: parsed.number,
187
+ url: parsed.url,
188
+ state: normalizeState(parsed.state),
189
+ isDraft: parsed.isDraft,
190
+ };
191
+ },
192
+ async updatePullRequestBody(cwd, number, body) {
193
+ await withTempBodyFile(body, async (bodyFile) => {
194
+ const result = await runGh(cwd, [
195
+ "pr",
196
+ "edit",
197
+ String(number),
198
+ "--body-file",
199
+ bodyFile,
200
+ ]);
201
+ if (result.exitCode !== 0) {
202
+ throw new Error(ghErrorMessage("gh pr edit", result));
203
+ }
204
+ });
205
+ },
206
+ async listComments(cwd, number) {
207
+ const result = await runGh(cwd, [
208
+ "api",
209
+ "--paginate",
210
+ `repos/{owner}/{repo}/issues/${number}/comments`,
211
+ ]);
212
+ if (result.exitCode !== 0) {
213
+ throw new Error(ghErrorMessage("gh api (list comments)", result));
214
+ }
215
+ const parsed = JSON.parse(result.stdout);
216
+ return parsed.map((entry) => ({ id: String(entry.id), body: entry.body }));
217
+ },
218
+ async createComment(cwd, number, body) {
219
+ await withTempBodyFile(body, async (bodyFile) => {
220
+ const result = await runGh(cwd, [
221
+ "pr",
222
+ "comment",
223
+ String(number),
224
+ "--body-file",
225
+ bodyFile,
226
+ ]);
227
+ if (result.exitCode !== 0) {
228
+ throw new Error(ghErrorMessage("gh pr comment", result));
229
+ }
230
+ });
231
+ },
232
+ async updateComment(cwd, commentId, body) {
233
+ await withTempBodyFile(body, async (bodyFile) => {
234
+ const result = await runGh(cwd, [
235
+ "api",
236
+ "-X",
237
+ "PATCH",
238
+ `repos/{owner}/{repo}/issues/comments/${commentId}`,
239
+ "-F",
240
+ `body=@${bodyFile}`,
241
+ ]);
242
+ if (result.exitCode !== 0) {
243
+ throw new Error(ghErrorMessage("gh api (update comment)", result));
244
+ }
245
+ });
246
+ },
247
+ async deleteComment(cwd, commentId) {
248
+ const result = await runGh(cwd, [
249
+ "api",
250
+ "-X",
251
+ "DELETE",
252
+ `repos/{owner}/{repo}/issues/comments/${commentId}`,
253
+ ]);
254
+ if (result.exitCode !== 0) {
255
+ throw new Error(ghErrorMessage("gh api (delete comment)", result));
256
+ }
257
+ },
258
+ };
259
+ const SECTION_BOUNDARY_RE = /^#{2,3} .*/gmu;
260
+ /** Splits the report into contiguous slices at `## `/`### ` heading lines. */
261
+ function splitIntoSections(report) {
262
+ const boundaries = [];
263
+ for (const match of report.matchAll(SECTION_BOUNDARY_RE)) {
264
+ if (match.index !== undefined)
265
+ boundaries.push(match.index);
266
+ }
267
+ if (boundaries.length === 0)
268
+ return [report];
269
+ const sections = [];
270
+ let start = 0;
271
+ for (const boundary of boundaries) {
272
+ if (boundary > start)
273
+ sections.push(report.slice(start, boundary));
274
+ start = boundary;
275
+ }
276
+ sections.push(report.slice(start));
277
+ return sections;
278
+ }
279
+ /** Splits `text` into pieces at `delimiterRe` matches, delimiters kept with the preceding piece. */
280
+ function splitPreservingDelimiter(text, delimiterRe) {
281
+ const flags = delimiterRe.flags.includes("g")
282
+ ? delimiterRe.flags
283
+ : `${delimiterRe.flags}g`;
284
+ const re = new RegExp(delimiterRe.source, flags);
285
+ const parts = [];
286
+ let lastIndex = 0;
287
+ for (const match of text.matchAll(re)) {
288
+ const end = (match.index ?? 0) + match[0].length;
289
+ parts.push(text.slice(lastIndex, end));
290
+ lastIndex = end;
291
+ }
292
+ if (lastIndex < text.length)
293
+ parts.push(text.slice(lastIndex));
294
+ return parts;
295
+ }
296
+ /** Greedily packs verbatim units into pieces no longer than `maxSize`. */
297
+ function packAtomic(units, maxSize) {
298
+ const pieces = [];
299
+ let current = "";
300
+ for (const unit of units) {
301
+ if (current !== "" && (current + unit).length > maxSize) {
302
+ pieces.push(current);
303
+ current = "";
304
+ }
305
+ current += unit;
306
+ }
307
+ if (current !== "")
308
+ pieces.push(current);
309
+ return pieces;
310
+ }
311
+ function chunkString(text, size) {
312
+ const out = [];
313
+ for (let i = 0; i < text.length; i += size)
314
+ out.push(text.slice(i, i + size));
315
+ return out;
316
+ }
317
+ /**
318
+ * A single section larger than the limit on its own cannot be split on a
319
+ * heading. Falls back to a paragraph (blank-line) boundary, and if even a
320
+ * paragraph exceeds the limit, a hard character boundary. Last resort only.
321
+ */
322
+ function expandOversizedSection(section) {
323
+ if (section.length <= MAX_ATOMIC_SECTION_LENGTH) {
324
+ return [{ text: section, cutMidSection: false }];
325
+ }
326
+ const paragraphs = splitPreservingDelimiter(section, /\n\n+/u);
327
+ let pieces = packAtomic(paragraphs, MAX_ATOMIC_SECTION_LENGTH);
328
+ if (pieces.some((piece) => piece.length > MAX_ATOMIC_SECTION_LENGTH)) {
329
+ pieces = pieces.flatMap((piece) => piece.length <= MAX_ATOMIC_SECTION_LENGTH
330
+ ? [piece]
331
+ : chunkString(piece, MAX_ATOMIC_SECTION_LENGTH));
332
+ }
333
+ return pieces.map((text, index) => ({
334
+ text,
335
+ cutMidSection: index < pieces.length - 1,
336
+ }));
337
+ }
338
+ function continuationMarkerLine(index) {
339
+ return `<!-- nightshift:report-continuation:${index} -->\n`;
340
+ }
341
+ /**
342
+ * Splits the run report into chunks whose payloads are verbatim, contiguous
343
+ * slices of the report — concatenating every payload in order reproduces the
344
+ * report byte-for-byte. A report that fits under the limit is a single
345
+ * chunk; an oversized report is packed on section boundaries, falling back
346
+ * to paragraph/character boundaries only for a section too large on its own.
347
+ */
348
+ export function splitReportIntoChunks(report) {
349
+ if (report.length <= GITHUB_PR_BODY_LIMIT) {
350
+ return [{ payload: report, cutMidSection: false }];
351
+ }
352
+ const sections = splitIntoSections(report).flatMap(expandOversizedSection);
353
+ const chunks = [];
354
+ let current = "";
355
+ let currentCut = false;
356
+ let index = 0;
357
+ while (index < sections.length) {
358
+ const section = sections[index];
359
+ if (section === undefined)
360
+ break;
361
+ const overhead = chunks.length === 0
362
+ ? REPORT_CONTINUATION_POINTER.length
363
+ : continuationMarkerLine(chunks.length).length;
364
+ const candidateLength = current.length + section.text.length + overhead;
365
+ if (candidateLength > GITHUB_PR_BODY_LIMIT && current !== "") {
366
+ chunks.push({ payload: current, cutMidSection: currentCut });
367
+ current = "";
368
+ currentCut = false;
369
+ continue;
370
+ }
371
+ current += section.text;
372
+ currentCut = section.cutMidSection;
373
+ index += 1;
374
+ }
375
+ if (current !== "")
376
+ chunks.push({ payload: current, cutMidSection: currentCut });
377
+ return chunks;
378
+ }
379
+ function renderChunk(chunks, index) {
380
+ const chunk = chunks[index];
381
+ if (!chunk)
382
+ throw new Error(`chunk index ${index} out of range`);
383
+ const isLast = index === chunks.length - 1;
384
+ const suffix = !isLast && chunk.cutMidSection ? DEGENERATE_CUT_SUFFIX : "";
385
+ if (index === 0) {
386
+ const pointer = chunks.length > 1 ? REPORT_CONTINUATION_POINTER : "";
387
+ return chunk.payload + suffix + pointer;
388
+ }
389
+ return `${continuationMarkerLine(index)}${chunk.payload}${suffix}`;
390
+ }
391
+ // ---- comment identity and upsert --------------------------------------
392
+ function decisionMarker(fingerprint) {
393
+ return `nightshift:decision:${fingerprint}`;
394
+ }
395
+ function markerLine(marker) {
396
+ return `<!-- ${marker} -->`;
397
+ }
398
+ const MARKER_RE = /^<!-- (nightshift:(?:decision|report-continuation):\S+) -->/u;
399
+ function extractMarker(body) {
400
+ const firstLine = (body.split(/\r?\n/u)[0] ?? "").trim();
401
+ return MARKER_RE.exec(firstLine)?.[1];
402
+ }
403
+ function renderEscalationComment(programId, record) {
404
+ // Full density is already self-contained, including its own `### title
405
+ // (\`id\`)` heading (decision-view.ts's renderDecisionFull /
406
+ // renderFindingFull / renderLegacyFindingFull all start with one) — do not
407
+ // prepend a second heading here. A caller-owned heading on top of that
408
+ // would duplicate it verbatim on every escalation comment.
409
+ const lines = [
410
+ markerLine(decisionMarker(record.id)),
411
+ ...renderRecord(record, { density: "full", programId }),
412
+ ];
413
+ return lines.join("\n").trimEnd();
414
+ }
415
+ /**
416
+ * Reconciles the PR's nightshift-authored comments to exactly the desired
417
+ * set: upserts every desired marker, and deletes every nightshift marker
418
+ * that is no longer desired (a settled decision, or a shrunk report's
419
+ * higher-index continuation chunk).
420
+ */
421
+ async function reconcileComments(gh, cwd, prNumber, desired) {
422
+ const existing = await gh.listComments(cwd, prNumber);
423
+ const byMarker = new Map();
424
+ for (const comment of existing) {
425
+ const marker = extractMarker(comment.body);
426
+ if (marker !== undefined)
427
+ byMarker.set(marker, comment);
428
+ }
429
+ for (const [marker, body] of desired) {
430
+ const found = byMarker.get(marker);
431
+ if (found) {
432
+ if (found.body !== body)
433
+ await gh.updateComment(cwd, found.id, body);
434
+ }
435
+ else {
436
+ await gh.createComment(cwd, prNumber, body);
437
+ }
438
+ }
439
+ for (const [marker, comment] of byMarker) {
440
+ if (!desired.has(marker))
441
+ await gh.deleteComment(cwd, comment.id);
442
+ }
443
+ let escalationComments = 0;
444
+ let continuationComments = 0;
445
+ for (const marker of desired.keys()) {
446
+ if (marker.startsWith("nightshift:decision:"))
447
+ escalationComments += 1;
448
+ else
449
+ continuationComments += 1;
450
+ }
451
+ return { escalationComments, continuationComments };
452
+ }
453
+ // ---- publish ------------------------------------------------------------
454
+ export async function publish(options) {
455
+ const root = resolve(options.cwd);
456
+ const gh = options.gh ?? defaultGhClient;
457
+ const git = options.git ?? defaultPublishGit;
458
+ const log = options.log ?? ((line) => console.log(line));
459
+ // Auth preflight -> current-branch and no-run checks -> push ->
460
+ // create/update PR -> comments. Checked first so the common failure
461
+ // surfaces as one clean message instead of a confusing mid-operation error.
462
+ await gh.checkAuth(root);
463
+ const manifest = await loadManifest(root, options.programId);
464
+ const branch = programBranchName(options.programId);
465
+ const currentBranch = await git.currentBranch(root);
466
+ if (currentBranch !== branch) {
467
+ throw new Error("publish reads the run report, ledger, and manifest from the working " +
468
+ `tree, but HEAD is \`${currentBranch}\`, not the program branch ` +
469
+ `\`${branch}\`. Check out \`${branch}\` (\`git switch ${branch}\`) ` +
470
+ "and re-run publish.");
471
+ }
472
+ const base = await detectDefaultBranch(root);
473
+ let report;
474
+ try {
475
+ report = await readFile(runReportPath(root, options.programId), "utf8");
476
+ }
477
+ catch {
478
+ throw new Error(`Program ${options.programId} has no run report at ` +
479
+ `\`docs/programs/${options.programId}-run-report.md\`; it has not ` +
480
+ "been run yet. Run the program first: `npx --yes " +
481
+ `@wildorder/nightshift run ${options.programId}\`.`);
482
+ }
483
+ const commitsAhead = await git.commitsAhead(root, base, branch);
484
+ if (commitsAhead === 0) {
485
+ throw new Error(`Program ${options.programId} has no commits on \`${branch}\` beyond ` +
486
+ `\`${base}\`; there is nothing to publish.`);
487
+ }
488
+ await git.push(root, "origin", branch);
489
+ log(`pushed ${branch} to origin`);
490
+ const chunks = splitReportIntoChunks(report);
491
+ const body = renderChunk(chunks, 0);
492
+ const title = `${manifest.program.name} (${options.programId})`;
493
+ const existing = await gh.findOpenPullRequest(root, branch);
494
+ let prNumber;
495
+ let prUrl;
496
+ let action;
497
+ if (existing) {
498
+ await gh.updatePullRequestBody(root, existing.number, body);
499
+ prNumber = existing.number;
500
+ prUrl = existing.url;
501
+ action = "updated";
502
+ log(`updated PR #${prNumber}`);
503
+ }
504
+ else {
505
+ const created = await gh.createDraftPullRequest(root, {
506
+ headBranch: branch,
507
+ baseBranch: base,
508
+ title,
509
+ body,
510
+ });
511
+ prNumber = created.number;
512
+ prUrl = created.url;
513
+ action = "created";
514
+ log(`created draft PR #${prNumber}: ${prUrl}`);
515
+ }
516
+ const ledger = await readDecisionLedger(root, options.programId);
517
+ const escalations = escalatedRecords(ledger);
518
+ const desired = new Map();
519
+ for (const record of escalations) {
520
+ desired.set(decisionMarker(record.id), renderEscalationComment(options.programId, record));
521
+ }
522
+ for (let index = 1; index < chunks.length; index += 1) {
523
+ desired.set(`nightshift:report-continuation:${index}`, renderChunk(chunks, index));
524
+ }
525
+ const { escalationComments, continuationComments } = await reconcileComments(gh, root, prNumber, desired);
526
+ return { prNumber, prUrl, action, escalationComments, continuationComments };
527
+ }
528
+ //# sourceMappingURL=publish.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publish.js","sourceRoot":"","sources":["../src/publish.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,SA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CAAC;IAC1C,KAAK,MAAM,MAAM,IAAI,WAAW,EAAE,CAAC;QACjC,OAAO,CAAC,GAAG,CACT,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC,EACzB,uBAAuB,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CACnD,CAAC;IACJ,CAAC;IACD,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACtD,OAAO,CAAC,GAAG,CAAC,kCAAkC,KAAK,EAAE,EAAE,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;IACrF,CAAC;IAED,MAAM,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,GAAG,MAAM,iBAAiB,CAC1E,EAAE,EACF,IAAI,EACJ,QAAQ,EACR,OAAO,CACR,CAAC;IAEF,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,CAAC;AAC/E,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The single source of the run report's location on disk. `run-program.ts`
3
+ * writes here; `publish.ts` reads from here — importing this instead of
4
+ * re-deriving the path keeps the two from drifting apart.
5
+ */
6
+ export declare function runReportPath(root: string, programId: string): string;
7
+ //# sourceMappingURL=report-path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-path.d.ts","sourceRoot":"","sources":["../src/report-path.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAErE"}
@@ -0,0 +1,10 @@
1
+ import { join } from "node:path";
2
+ /**
3
+ * The single source of the run report's location on disk. `run-program.ts`
4
+ * writes here; `publish.ts` reads from here — importing this instead of
5
+ * re-deriving the path keeps the two from drifting apart.
6
+ */
7
+ export function runReportPath(root, programId) {
8
+ return join(root, "docs", "programs", `${programId}-run-report.md`);
9
+ }
10
+ //# sourceMappingURL=report-path.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-path.js","sourceRoot":"","sources":["../src/report-path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY,EAAE,SAAiB;IAC3D,OAAO,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,SAAS,gBAAgB,CAAC,CAAC;AACtE,CAAC"}
@@ -7,6 +7,38 @@ export interface ParsedFindings {
7
7
  }
8
8
  /** Every fenced ```findings block in an agent's output, in order. */
9
9
  export declare function extractFindings(output: string): ParsedFindings;
10
+ /**
11
+ * Pure lexical containment: does `file` resolve to a path inside `root`? No
12
+ * I/O — this is the whole containment rule and is exhaustively unit-testable.
13
+ * Boundary-aware: only a `..` path *segment* escapes (`..` alone, or a segment
14
+ * ending at `sep`), so an in-repo name like `..cache` is contained. The root
15
+ * itself is contained. An absolute path is contained iff it resolves inside
16
+ * root; an absolute path elsewhere (or on another win32 drive) is not.
17
+ */
18
+ export declare function isInsideRepo(root: string, file: string): boolean;
19
+ /**
20
+ * The runner's concrete `locate` predicate: a cited path locates something in
21
+ * the repository iff it is lexically contained AND exists on disk. Because
22
+ * containment is decided lexically first, `existsSync` is never asked about a
23
+ * path outside root. `existsSync` never throws, so the check can never fail
24
+ * the run.
25
+ */
26
+ export declare function locateInRepo(root: string, file: string): boolean;
27
+ /**
28
+ * Deterministic evidence check: mark each `location` evidence item whose file
29
+ * does not resolve to a path inside the repository. `locate` is injected by
30
+ * the runner (repository-root existence); never a model judgment. Returns new
31
+ * findings — does not mutate. `concern` and `measurement` items are never
32
+ * touched: they assert no path.
33
+ */
34
+ export declare function verifyEvidence(findings: readonly Finding[], locate: (file: string) => boolean): Finding[];
35
+ /**
36
+ * A finding is routable to the ledger unless it makes only false path claims:
37
+ * its evidence is non-empty and every item is an unverifiable `location`.
38
+ * A finding with any `concern`/`measurement` item, any verifiable `location`,
39
+ * or no evidence at all is routable.
40
+ */
41
+ export declare function hasRoutableEvidence(finding: Finding): boolean;
10
42
  /** The ```findings block-format instructions, composed into every reviewer brief. */
11
43
  export declare function findingsContract(): string;
12
44
  export type FindingDestination = "decision-oneway" | "decision" | "report";
@@ -52,7 +84,7 @@ export interface FindingsToLedgerOptions {
52
84
  baseCommit?: string;
53
85
  now: () => Date;
54
86
  }
55
- /** Blocker/major findings -> decision-recorded events; minor/advisory dropped (report-only). */
87
+ /** Blocker/major findings -> finding-recorded events; minor/advisory dropped (report-only). */
56
88
  export declare function findingsToLedgerEvents(options: FindingsToLedgerOptions): LedgerEvent[];
57
89
  /**
58
90
  * A human-facing summary of one completed (or absent) pass, for the run
@@ -1 +1 @@
1
- {"version":3,"file":"review-pass.d.ts","sourceRoot":"","sources":["../src/review-pass.ts"],"names":[],"mappings":"AACA,OAAO,EAML,KAAK,OAAO,EACZ,KAAK,QAAQ,EACd,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AA0CxD,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,qFAAqF;IACrF,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAID,qEAAqE;AACrE,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,CAoC9D;AAgFD,qFAAqF;AACrF,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,GAAG,UAAU,GAAG,QAAQ,CAAC;AAE3E;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,kBAAkB,CAUzE;AAED,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC,MAAM,MAAM,UAAU,GAClB,WAAW,GACX,aAAa,GACb,gBAAgB,GAChB,aA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