vouchington-tooling 0.88.0 → 1.0.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 (64) hide show
  1. package/README.md +1 -8
  2. package/dist/agent-blackboard/feedback-journal-audit.mjs +14 -6
  3. package/dist/agent-blackboard/feedback-journal-sandbox.d.mts +4 -2
  4. package/dist/agent-blackboard/feedback-journal-sandbox.mjs +14 -6
  5. package/dist/audit-journal/audit-block.d.mts +2 -0
  6. package/dist/audit-journal/audit-block.mjs +13 -8
  7. package/dist/audit-journal/ci-failures.d.mts +6 -2
  8. package/dist/audit-journal/ci-failures.mjs +12 -6
  9. package/dist/audit-journal/journal.d.mts +2 -0
  10. package/dist/audit-journal/journal.mjs +18 -3
  11. package/dist/audit-journal/scope.d.mts +25 -0
  12. package/dist/audit-journal/scope.mjs +47 -0
  13. package/dist/audit-journal/types.d.mts +3 -0
  14. package/dist/cli/index.mjs +0 -6
  15. package/dist/cli/parse-forwarded-commands.d.mts +1 -1
  16. package/dist/cli/parse-forwarded-commands.mjs +0 -2
  17. package/dist/cli/parse.d.mts +1 -7
  18. package/dist/cli/parse.mjs +0 -1
  19. package/dist/cli/script-paths.mjs +0 -1
  20. package/dist/cli/usage-text.d.mts +1 -1
  21. package/dist/cli/usage-text.mjs +0 -6
  22. package/dist/gh-cli/exec.d.mts +8 -2
  23. package/dist/gh-cli/exec.mjs +3 -3
  24. package/dist/gha-review-payload/index.d.mts +0 -2
  25. package/dist/gha-review-payload/index.mjs +0 -1
  26. package/dist/index.d.mts +2 -8
  27. package/dist/index.mjs +1 -4
  28. package/dist/mcp-server/pr-diff-size.d.mts +16 -0
  29. package/dist/mcp-server/pr-diff-size.mjs +49 -0
  30. package/dist/mcp-server/pr-live.d.mts +3 -0
  31. package/dist/mcp-server/pr-live.mjs +8 -2
  32. package/dist/mcp-server/pr-prepare.mjs +3 -1
  33. package/dist/mcp-server/worktree.mjs +1 -1
  34. package/docs/mcp-server.md +20 -3
  35. package/package.json +1 -16
  36. package/scripts/__pycache__/run_bounded_process.cpython-314.pyc +0 -0
  37. package/skills/retrospective/SKILL.md +2 -1
  38. package/dist/gha-check-run/cli.d.mts +0 -2
  39. package/dist/gha-check-run/cli.mjs +0 -81
  40. package/dist/gha-check-run/github.d.mts +0 -30
  41. package/dist/gha-check-run/github.mjs +0 -63
  42. package/dist/gha-check-run/index.d.mts +0 -2
  43. package/dist/gha-check-run/index.mjs +0 -2
  44. package/dist/gha-claude-post-review/index.d.mts +0 -3
  45. package/dist/gha-claude-post-review/index.mjs +0 -2
  46. package/dist/gha-post-review/claude-token.d.mts +0 -25
  47. package/dist/gha-post-review/claude-token.mjs +0 -109
  48. package/dist/gha-post-review/cli.d.mts +0 -1
  49. package/dist/gha-post-review/cli.mjs +0 -22
  50. package/dist/gha-post-review/github.d.mts +0 -13
  51. package/dist/gha-post-review/github.mjs +0 -58
  52. package/dist/gha-post-review/index.d.mts +0 -13
  53. package/dist/gha-post-review/index.mjs +0 -8
  54. package/dist/gha-post-review/post.d.mts +0 -24
  55. package/dist/gha-post-review/post.mjs +0 -39
  56. package/dist/gha-post-review/pull-io.d.mts +0 -13
  57. package/dist/gha-post-review/pull-io.mjs +0 -88
  58. package/dist/gha-post-review/token.d.mts +0 -9
  59. package/dist/gha-post-review/token.mjs +0 -21
  60. package/dist/gha-review-payload/cli.d.mts +0 -1
  61. package/dist/gha-review-payload/cli.mjs +0 -24
  62. package/dist/gha-review-payload/file.d.mts +0 -7
  63. package/dist/gha-review-payload/file.mjs +0 -62
  64. package/scripts/gha/materialize-pr-context.sh +0 -123
package/README.md CHANGED
@@ -70,7 +70,6 @@ vouchington clean-workspace
70
70
  vouchington install-github-release --repo lycheeverse/lychee --version 0.24.2 --asset 'lychee-{platform}.tar.gz' --bin lychee
71
71
  vouchington run-with-timeout 120 10 docker push example
72
72
  vouchington lint-links --offline
73
- vouchington materialize-pr-context
74
73
  vouchington wait-for-apt-locks
75
74
  vouchington retrospective-transcript --jsonl /path/to/transcript.jsonl
76
75
  vouchington retrospective-facts --pr 49 --repo vouchington/vouchington-infra --raw
@@ -93,8 +92,6 @@ vouchington tmux agent-reminder session-start
93
92
  vouchington tmux post-tool < hook-payload.json
94
93
  vouchington dead-code --baseline dead-code-baseline.json --config .jscpd.json --update
95
94
  vouchington swift-semantic-equal BASE HEAD App.swift
96
- vouchington post-review
97
- vouchington stage-review-payload optional|required <source> <destination>
98
95
  ```
99
96
 
100
97
  ### Running `allocate-browser-safe-ports` without an install
@@ -686,8 +683,6 @@ import {
686
683
  import { readResponseBody } from 'vouchington-tooling/http-body'
687
684
  import { runAstGrepRule } from 'vouchington-tooling/ast-grep-rule'
688
685
  import { parseReviewPayload, remapReviewComments } from 'vouchington-tooling/gha-review-payload'
689
- import { postReviewWithTokenFromEnv, runPostReview } from 'vouchington-tooling/gha-post-review'
690
- import { postClaudeReviewFromEnv } from 'vouchington-tooling/gha-claude-post-review'
691
686
  import { nextPageUrlFromLinkHeader } from 'vouchington-tooling/http-link-pagination'
692
687
  import {
693
688
  cmdUpload,
@@ -990,9 +985,7 @@ previous process died first, including SIGKILL. Each workspace records its owner
990
985
  audit can delete directories whose owner is gone.
991
986
 
992
987
  The artifact, review-payload, HTTP body, and pagination APIs validate untrusted inputs at their
993
- boundaries. Neutral review posting lives in `gha-post-review` and requires a caller-supplied GitHub
994
- token. Claude App OIDC is an explicitly selected `gha-claude-post-review` adapter; the legacy
995
- token-source router remains deprecated for one release line.
988
+ boundaries.
996
989
 
997
990
  `vitest-diagnostics` reads Node diagnostic report JSON from a caller-selected directory. It sorts
998
991
  filenames, tolerates partial files, returns only a bounded field allowlist, and never emits raw
@@ -1,7 +1,8 @@
1
- import { buildCiFailuresSection, getConformingGroups, incompleteCiSection, } from "../audit-journal/ci-failures.mjs";
1
+ import { buildCiFailuresSection, countCiFailureBlocks, getConformingGroups, incompleteCiSection, } from "../audit-journal/ci-failures.mjs";
2
2
  import { scanJournal } from "../audit-journal/journal.mjs";
3
+ import { scopeSinceRetrospective } from "../audit-journal/scope.mjs";
3
4
  import { validateSessionId } from "../audit-journal/session-id.mjs";
4
- import { getConformingSandboxBlocks, journalSandboxSection, unavailableSandboxSection, } from "./feedback-journal-sandbox.mjs";
5
+ import { countSandboxBlocks, getConformingSandboxBlocks, journalSandboxSection, unavailableSandboxSection, } from "./feedback-journal-sandbox.mjs";
5
6
  function report(journalStatus, markdown) {
6
7
  return { coverage: { journalStatus, truncated: false }, markdown };
7
8
  }
@@ -23,11 +24,18 @@ export function renderJournalAuditReport(options, scanned) {
23
24
  return unavailable('blackboard unreachable');
24
25
  if (scanned.status === 'not-found')
25
26
  return unavailable('no journal for session');
26
- const ci = getConformingGroups(scanned.entries, options.redact, options.budgets?.ciBytes);
27
- const sandbox = getConformingSandboxBlocks(scanned.entries, options.redact, options.budgets?.sandboxBytes);
27
+ // Only what happened after the session's newest earlier retrospective is new to this one.
28
+ const { included, excluded, boundary } = scopeSinceRetrospective(scanned.entries, scanned.retrospectives);
29
+ const excludedNote = (count) => count > 0 && boundary
30
+ ? `Excluded: ${count} blocks from before retrospective ${boundary.sourceEventId}`
31
+ : undefined;
32
+ const ciNote = excludedNote(countCiFailureBlocks(excluded));
33
+ const sandboxNote = excludedNote(countSandboxBlocks(excluded));
34
+ const ci = getConformingGroups(included, options.redact, options.budgets?.ciBytes);
35
+ const sandbox = getConformingSandboxBlocks(included, options.redact, options.budgets?.sandboxBytes);
28
36
  if (scanned.truncated)
29
- return report('partial', `${incompleteCiSection(ci)}\n\n${unavailableSandboxSection('journal scan incomplete', sandbox)}`);
30
- return report('complete', `${buildCiFailuresSection(ci)}\n\n${journalSandboxSection(sandbox)}`);
37
+ return report('partial', `${incompleteCiSection(ci, ciNote)}\n\n${unavailableSandboxSection('journal scan incomplete', sandbox, sandboxNote)}`);
38
+ return report('complete', `${buildCiFailuresSection(ci, ciNote)}\n\n${journalSandboxSection(sandbox, sandboxNote)}`);
31
39
  }
32
40
  export async function buildJournalAuditReport(sessionId, options) {
33
41
  return renderJournalAuditReport(options, await loadJournalAuditInput(sessionId, options));
@@ -2,5 +2,7 @@ import type { AuditRedactor } from '../audit-journal/text.mts';
2
2
  import type { JournalEntry } from '../audit-journal/types.mts';
3
3
  /** Journal entries that hold sandbox or permission blocks (several per entry), made paste-safe. */
4
4
  export declare function getConformingSandboxBlocks(entries: Iterable<JournalEntry>, redact?: AuditRedactor, maxBytes?: number): string[];
5
- export declare function unavailableSandboxSection(reason: string, blocks?: string[]): string;
6
- export declare function journalSandboxSection(blocks: string[]): string;
5
+ /** How many sandbox blocks the entries hold, for reporting the ones a scope left out. */
6
+ export declare function countSandboxBlocks(entries: Iterable<JournalEntry>): number;
7
+ export declare function unavailableSandboxSection(reason: string, blocks?: string[], note?: string): string;
8
+ export declare function journalSandboxSection(blocks: string[], note?: string): string;
@@ -1,4 +1,5 @@
1
- import { conformingBlocks, matchAuditBlock } from "../audit-journal/audit-block.mjs";
1
+ import { conformingBlocks, countConformingBlocks, matchAuditBlock, } from "../audit-journal/audit-block.mjs";
2
+ import { lineOf } from "../audit-journal/ci-failures.mjs";
2
3
  const SANDBOX_SECTION_HEADER = '## Sandbox & Permission Audit';
3
4
  const SOURCE = 'journal entries only';
4
5
  const EVIDENCE = /^ {2}- Evidence: .*[^\s]$/;
@@ -57,11 +58,18 @@ const UNPARSED = {
57
58
  export function getConformingSandboxBlocks(entries, redact, maxBytes = SANDBOX_BLOCKS_MAX_BYTES) {
58
59
  return conformingBlocks(entries, matchBlock, Math.min(maxBytes, SANDBOX_BLOCKS_MAX_BYTES), redact, omissionBlock, UNPARSED);
59
60
  }
60
- export function unavailableSandboxSection(reason, blocks = []) {
61
- return [`${SANDBOX_SECTION_HEADER}\nStatus: unavailable (${reason})`, ...blocks].join('\n\n');
61
+ /** How many sandbox blocks the entries hold, for reporting the ones a scope left out. */
62
+ export function countSandboxBlocks(entries) {
63
+ return countConformingBlocks(entries, matchBlock);
62
64
  }
63
- export function journalSandboxSection(blocks) {
65
+ export function unavailableSandboxSection(reason, blocks = [], note) {
66
+ return [
67
+ `${SANDBOX_SECTION_HEADER}\nStatus: unavailable (${reason})${lineOf(note)}`,
68
+ ...blocks,
69
+ ].join('\n\n');
70
+ }
71
+ export function journalSandboxSection(blocks, note) {
64
72
  if (blocks.length === 0)
65
- return `${SANDBOX_SECTION_HEADER}\nStatus: none observed (${SOURCE})`;
66
- return `${SANDBOX_SECTION_HEADER}\nStatus: events observed (${SOURCE})\n\n${blocks.join('\n\n')}`;
73
+ return `${SANDBOX_SECTION_HEADER}\nStatus: none observed (${SOURCE})${lineOf(note)}`;
74
+ return `${SANDBOX_SECTION_HEADER}\nStatus: events observed (${SOURCE})${lineOf(note)}\n\n${blocks.join('\n\n')}`;
67
75
  }
@@ -10,6 +10,8 @@ export type UnparsedReport = {
10
10
  marker: RegExp;
11
11
  note: (count: number) => string;
12
12
  };
13
+ /** How many blocks in the entries conform to the grammar `match` checks. */
14
+ export declare function countConformingBlocks(entries: Iterable<JournalEntry>, match: (markdown: string, render: AuditRender) => string | null): number;
13
15
  /**
14
16
  * Matches every journal block whole while together they fit `totalBudgetBytes`. Otherwise it keeps
15
17
  * the leading blocks that fit an equal share of the total and appends `omission(count)` — itself a
@@ -62,6 +62,18 @@ function splitBlocks(markdown) {
62
62
  }
63
63
  return chunks.map((chunk) => chunk.join('\n'));
64
64
  }
65
+ function journalBlocks(entries) {
66
+ return [...entries].flatMap((entry) => {
67
+ const data = entry?.data;
68
+ return data?.type === 'journal' && typeof data.markdown === 'string'
69
+ ? splitBlocks(data.markdown)
70
+ : [];
71
+ });
72
+ }
73
+ /** How many blocks in the entries conform to the grammar `match` checks. */
74
+ export function countConformingBlocks(entries, match) {
75
+ return journalBlocks(entries).filter((markdown) => match(markdown, {}) !== null).length;
76
+ }
65
77
  /**
66
78
  * Matches every journal block whole while together they fit `totalBudgetBytes`. Otherwise it keeps
67
79
  * the leading blocks that fit an equal share of the total and appends `omission(count)` — itself a
@@ -70,14 +82,7 @@ function splitBlocks(markdown) {
70
82
  */
71
83
  export function conformingBlocks(entries, match, totalBudgetBytes, redact, omission, unparsed) {
72
84
  let unparsedCount = 0;
73
- const markdowns = [...entries]
74
- .flatMap((entry) => {
75
- const data = entry?.data;
76
- return data?.type === 'journal' && typeof data.markdown === 'string'
77
- ? splitBlocks(data.markdown)
78
- : [];
79
- })
80
- .filter((markdown) => {
85
+ const markdowns = journalBlocks(entries).filter((markdown) => {
81
86
  if (match(markdown, { redact }) !== null)
82
87
  return true;
83
88
  if (unparsed?.marker.test(markdown))
@@ -1,6 +1,10 @@
1
1
  import type { JournalEntry } from './types.mts';
2
2
  import type { AuditRedactor } from './text.mts';
3
+ /** The optional scope line that follows a section's Status line. */
4
+ export declare const lineOf: (note?: string) => string;
3
5
  export declare function isConformingCiFailureBlock(markdown: string): boolean;
4
6
  export declare function getConformingGroups(entries: Iterable<JournalEntry>, redact?: AuditRedactor, maxBytes?: number): string[];
5
- export declare function incompleteCiSection(markdownBlocks: string[]): string;
6
- export declare function buildCiFailuresSection(markdownBlocks: string[]): string;
7
+ /** How many CI failure blocks the entries hold, for reporting the ones a scope left out. */
8
+ export declare function countCiFailureBlocks(entries: Iterable<JournalEntry>): number;
9
+ export declare function incompleteCiSection(markdownBlocks: string[], note?: string): string;
10
+ export declare function buildCiFailuresSection(markdownBlocks: string[], note?: string): string;
@@ -1,8 +1,10 @@
1
- import { conformingBlocks, matchAuditBlock } from "./audit-block.mjs";
1
+ import { conformingBlocks, countConformingBlocks, matchAuditBlock } from "./audit-block.mjs";
2
2
  const GROUP_HEADER = /^- `(recurring|one-off)` — `GitHub Actions` — .*[^\s]$/;
3
3
  const EVIDENCE = /^ {2}- Evidence: .*[^\s]$/;
4
4
  const ROOT_DIAGNOSTIC = /^ {2}- Root diagnostic: .*[^\s]$/;
5
5
  const DISPOSITION = /^ {2}- Disposition: .*[^\s]$/;
6
+ /** The optional scope line that follows a section's Status line. */
7
+ export const lineOf = (note) => (note === undefined ? '' : `\n${note}`);
6
8
  const CI_FAILURES_HEADER = '## CI Failures';
7
9
  const CI_FAILURE_BLOCK_MAX_BYTES = 10_000;
8
10
  const FIELD_PREFIXES = [
@@ -47,14 +49,18 @@ export function isConformingCiFailureBlock(markdown) {
47
49
  export function getConformingGroups(entries, redact, maxBytes = CI_SECTION_MAX_BYTES) {
48
50
  return conformingBlocks(entries, matchBlock, Math.min(maxBytes, CI_SECTION_MAX_BYTES), redact, omissionGroup, UNPARSED);
49
51
  }
50
- export function incompleteCiSection(markdownBlocks) {
52
+ /** How many CI failure blocks the entries hold, for reporting the ones a scope left out. */
53
+ export function countCiFailureBlocks(entries) {
54
+ return countConformingBlocks(entries, matchBlock);
55
+ }
56
+ export function incompleteCiSection(markdownBlocks, note) {
51
57
  return [
52
- `${CI_FAILURES_HEADER}\nStatus: unavailable (journal scan incomplete)`,
58
+ `${CI_FAILURES_HEADER}\nStatus: unavailable (journal scan incomplete)${lineOf(note)}`,
53
59
  ...markdownBlocks,
54
60
  ].join('\n\n');
55
61
  }
56
- export function buildCiFailuresSection(markdownBlocks) {
62
+ export function buildCiFailuresSection(markdownBlocks, note) {
57
63
  if (markdownBlocks.length === 0)
58
- return `${CI_FAILURES_HEADER}\nStatus: none observed`;
59
- return `${CI_FAILURES_HEADER}\nStatus: failures observed\n\n${markdownBlocks.join('\n\n')}`;
64
+ return `${CI_FAILURES_HEADER}\nStatus: none observed${lineOf(note)}`;
65
+ return `${CI_FAILURES_HEADER}\nStatus: failures observed${lineOf(note)}\n\n${markdownBlocks.join('\n\n')}`;
60
66
  }
@@ -1,7 +1,9 @@
1
1
  import type { JournalEntry, JournalLoader } from './types.mts';
2
+ import type { SavedRetrospective } from './scope.mts';
2
3
  export type JournalScan = {
3
4
  status: 'ok';
4
5
  entries: JournalEntry[];
6
+ retrospectives: SavedRetrospective[];
5
7
  truncated: boolean;
6
8
  } | {
7
9
  status: 'not-found';
@@ -4,7 +4,14 @@ const JOURNAL_TOTAL_MAX_BYTES = 1_000_000;
4
4
  function journalData(entry) {
5
5
  try {
6
6
  const data = entry?.data;
7
- return data ? { type: data.type, markdown: data.markdown } : undefined;
7
+ return data
8
+ ? {
9
+ type: data.type,
10
+ markdown: data.markdown,
11
+ sourceEventId: data.sourceEventId,
12
+ createdAt: entry.createdAt,
13
+ }
14
+ : undefined;
8
15
  }
9
16
  catch {
10
17
  return 'unreadable';
@@ -12,6 +19,7 @@ function journalData(entry) {
12
19
  }
13
20
  async function collectEntries(entries) {
14
21
  const result = [];
22
+ const retrospectives = [];
15
23
  let consumed = 0;
16
24
  let inspectedBytes = 0;
17
25
  let retainedBytes = 0;
@@ -23,6 +31,10 @@ async function collectEntries(entries) {
23
31
  truncated = true;
24
32
  const data = scanned === 'unreadable' ? undefined : scanned;
25
33
  const markdown = data?.markdown;
34
+ if (data?.type === 'retrospective' &&
35
+ typeof data.sourceEventId === 'string' &&
36
+ typeof data.createdAt === 'string')
37
+ retrospectives.push({ sourceEventId: data.sourceEventId, createdAt: data.createdAt });
26
38
  if (data?.type === 'journal' && typeof markdown !== 'string')
27
39
  truncated = true;
28
40
  if (data?.type === 'journal' && typeof markdown === 'string') {
@@ -31,7 +43,10 @@ async function collectEntries(entries) {
31
43
  if (bytes > JOURNAL_MARKDOWN_MAX_BYTES)
32
44
  truncated = true;
33
45
  if (bytes <= JOURNAL_MARKDOWN_MAX_BYTES && retainedBytes + bytes <= JOURNAL_TOTAL_MAX_BYTES) {
34
- result.push({ data: { type: 'journal', markdown } });
46
+ result.push({
47
+ ...(typeof data.createdAt === 'string' ? { createdAt: data.createdAt } : {}),
48
+ data: { type: 'journal', markdown },
49
+ });
35
50
  retainedBytes += bytes;
36
51
  }
37
52
  }
@@ -42,7 +57,7 @@ async function collectEntries(entries) {
42
57
  break;
43
58
  }
44
59
  }
45
- return { entries: result, truncated };
60
+ return { entries: result, retrospectives, truncated };
46
61
  }
47
62
  function errorMessage(error) {
48
63
  try {
@@ -0,0 +1,25 @@
1
+ import type { JournalEntry } from './types.mts';
2
+ /** A retrospective already saved in the session, with the blackboard's creation time for it. */
3
+ export type SavedRetrospective = {
4
+ sourceEventId: string;
5
+ createdAt: string;
6
+ };
7
+ export type JournalScope = {
8
+ included: JournalEntry[];
9
+ excluded: JournalEntry[];
10
+ /** The retrospective whose time bounds the scope; absent when every entry is in scope. */
11
+ boundary?: SavedRetrospective;
12
+ };
13
+ /**
14
+ * Keeps only the entries created after the boundary retrospective, so a later retrospective does
15
+ * not repeat what an earlier one already reported.
16
+ *
17
+ * The boundary is the newest saved retrospective created before the newest entry that holds an
18
+ * audit block. A new composition therefore starts after the latest retrospective (it is older than
19
+ * the newest block), while a revision of the latest retrospective, which has no block after it,
20
+ * falls back to the retrospective before it and so keeps its own blocks. The rule cannot tell a
21
+ * revision from a new retrospective with no new blocks: both repeat the blocks since the one
22
+ * before. Entries without a usable `createdAt` are never excluded, because nothing shows they are
23
+ * older. With no earlier retrospective, or no block, nothing is excluded.
24
+ */
25
+ export declare function scopeSinceRetrospective(entries: JournalEntry[], retrospectives: SavedRetrospective[]): JournalScope;
@@ -0,0 +1,47 @@
1
+ const AUDIT_BLOCK = /^- `(?:recurring|one-off|sandbox-escalation|sandbox-failure|ambiguous-failure)`/m;
2
+ function createdAtOf(entry) {
3
+ return typeof entry.createdAt === 'string' ? entry.createdAt : undefined;
4
+ }
5
+ function hasAuditBlock(entry) {
6
+ const markdown = entry.data?.markdown;
7
+ return typeof markdown === 'string' && AUDIT_BLOCK.test(markdown);
8
+ }
9
+ function newest(items, at) {
10
+ let best;
11
+ for (const item of items) {
12
+ const time = at(item);
13
+ if (time !== undefined && (best === undefined || time > at(best)))
14
+ best = item;
15
+ }
16
+ return best;
17
+ }
18
+ /**
19
+ * Keeps only the entries created after the boundary retrospective, so a later retrospective does
20
+ * not repeat what an earlier one already reported.
21
+ *
22
+ * The boundary is the newest saved retrospective created before the newest entry that holds an
23
+ * audit block. A new composition therefore starts after the latest retrospective (it is older than
24
+ * the newest block), while a revision of the latest retrospective, which has no block after it,
25
+ * falls back to the retrospective before it and so keeps its own blocks. The rule cannot tell a
26
+ * revision from a new retrospective with no new blocks: both repeat the blocks since the one
27
+ * before. Entries without a usable `createdAt` are never excluded, because nothing shows they are
28
+ * older. With no earlier retrospective, or no block, nothing is excluded.
29
+ */
30
+ export function scopeSinceRetrospective(entries, retrospectives) {
31
+ const newestBlock = newest(entries.filter(hasAuditBlock), createdAtOf);
32
+ const blockAt = newestBlock === undefined ? undefined : createdAtOf(newestBlock);
33
+ const boundary = blockAt === undefined
34
+ ? undefined
35
+ : newest(retrospectives.filter((retrospective) => retrospective.createdAt < blockAt), (retrospective) => retrospective.createdAt);
36
+ if (boundary === undefined)
37
+ return { included: entries, excluded: [] };
38
+ const isLater = (entry) => {
39
+ const at = createdAtOf(entry);
40
+ return at === undefined || at > boundary.createdAt;
41
+ };
42
+ return {
43
+ included: entries.filter(isLater),
44
+ excluded: entries.filter((entry) => !isLater(entry)),
45
+ boundary,
46
+ };
47
+ }
@@ -1,7 +1,10 @@
1
1
  export type JournalEntry = {
2
+ /** Service-generated ISO 8601 UTC time the entry was created, as the blackboard returns it. */
3
+ createdAt?: unknown;
2
4
  data?: {
3
5
  type?: unknown;
4
6
  markdown?: unknown;
7
+ sourceEventId?: unknown;
5
8
  };
6
9
  };
7
10
  export type JournalLoadResult = {
@@ -2,8 +2,6 @@
2
2
  import { realpathSync } from 'node:fs';
3
3
  import { resolve } from 'node:path';
4
4
  import { pathToFileURL } from 'node:url';
5
- import { runPostReviewCli } from "../gha-post-review/cli.mjs";
6
- import { runStageReviewPayloadCli } from "../gha-review-payload/cli.mjs";
7
5
  import { runSwiftSemanticEqualCli } from "../swift-semantic-equal/cli.mjs";
8
6
  import { runAgentIssueLabels } from "./commands/agent-issue-labels.mjs";
9
7
  import { runGhaArtifactsCleanup } from "./commands/gha-artifacts-cleanup.mjs";
@@ -90,10 +88,6 @@ export function runCli(argv = process.argv) {
90
88
  return runDeadCodeCli(parsed.args);
91
89
  case 'swift-semantic-equal':
92
90
  return runSwiftSemanticEqualCli(parsed.args);
93
- case 'post-review':
94
- return runPostReviewCli();
95
- case 'stage-review-payload':
96
- return runStageReviewPayloadCli(parsed.args);
97
91
  case 'http-origin':
98
92
  return runHttpOrigin(parsed.field, parsed.value);
99
93
  case 'gha-artifacts-cleanup':
@@ -1,4 +1,4 @@
1
- declare const FORWARDED: readonly ["with-host-lock", "host-storage", "pnpm-install", "vitest-blob-manifest", "vitest-report-attempt", "prepare-vitest-reports", "nuget-central-version", "verify-workflow-secrets", "runner-policy", "dead-code", "swift-semantic-equal", "post-review", "stage-review-payload", "retrospective-transcript", "retrospective-facts", "agent-blackboard", "mcp", "hook", "worktree", "transient-retry", "sandbox-command-audit", "cloc", "coverage-scope-check", "trivy-policy", "docker-image-mirror", "workspace-registry-check", "storybook-browser-runner", "tmux", "final-review"];
1
+ declare const FORWARDED: readonly ["with-host-lock", "host-storage", "pnpm-install", "vitest-blob-manifest", "vitest-report-attempt", "prepare-vitest-reports", "nuget-central-version", "verify-workflow-secrets", "runner-policy", "dead-code", "swift-semantic-equal", "retrospective-transcript", "retrospective-facts", "agent-blackboard", "mcp", "hook", "worktree", "transient-retry", "sandbox-command-audit", "cloc", "coverage-scope-check", "trivy-policy", "docker-image-mirror", "workspace-registry-check", "storybook-browser-runner", "tmux", "final-review"];
2
2
  type Name = (typeof FORWARDED)[number];
3
3
  type ForwardedCommand = {
4
4
  [K in Name]: {
@@ -10,8 +10,6 @@ const FORWARDED = [
10
10
  'runner-policy',
11
11
  'dead-code',
12
12
  'swift-semantic-equal',
13
- 'post-review',
14
- 'stage-review-payload',
15
13
  'retrospective-transcript',
16
14
  'retrospective-facts',
17
15
  'agent-blackboard',
@@ -53,12 +53,6 @@ export type ParsedCli = {
53
53
  } | {
54
54
  kind: 'swift-semantic-equal';
55
55
  args: string[];
56
- } | {
57
- kind: 'post-review';
58
- args: string[];
59
- } | {
60
- kind: 'stage-review-payload';
61
- args: string[];
62
56
  } | {
63
57
  kind: 'http-origin';
64
58
  field: string;
@@ -141,7 +135,7 @@ export type ParsedCli = {
141
135
  workflowDirectories?: string[];
142
136
  actionDirectories?: string[];
143
137
  } | ParsedGhaRuntimeAudit | ParsedGhaArtifactsCleanup | ParsedAgentIssueLabels | ParsedStoryCoverage;
144
- export type ScriptCommand = 'gha-output' | 'gha-needs-results' | 'download-with-diagnostics' | 'download-optional-run-artifacts' | 'host-pressure-diagnostics' | 'allocate-browser-safe-ports' | 'diagnose-port-collision' | 'prepare-trivy-db' | 'check-cache-size' | 'make-shard-matrix' | 'load-runner-env' | 'clean-workspace' | 'install-github-release' | 'run-with-timeout' | 'lint-links' | 'materialize-pr-context' | 'wait-for-apt-locks' | 'install-playwright-chromium-arm64' | 'ghcr-package-retention' | 'harness-admission-lane' | 'gha-collaborator-trust';
138
+ export type ScriptCommand = 'gha-output' | 'gha-needs-results' | 'download-with-diagnostics' | 'download-optional-run-artifacts' | 'host-pressure-diagnostics' | 'allocate-browser-safe-ports' | 'diagnose-port-collision' | 'prepare-trivy-db' | 'check-cache-size' | 'make-shard-matrix' | 'load-runner-env' | 'clean-workspace' | 'install-github-release' | 'run-with-timeout' | 'lint-links' | 'wait-for-apt-locks' | 'install-playwright-chromium-arm64' | 'ghcr-package-retention' | 'harness-admission-lane' | 'gha-collaborator-trust';
145
139
  export declare function parseCli(argv: readonly string[]): ParsedCli;
146
140
  export declare function parseCommandHelp(command: string | undefined, rest: readonly string[]): {
147
141
  kind: 'command-help';
@@ -22,7 +22,6 @@ const SCRIPT_COMMANDS = new Set([
22
22
  'install-github-release',
23
23
  'run-with-timeout',
24
24
  'lint-links',
25
- 'materialize-pr-context',
26
25
  'wait-for-apt-locks',
27
26
  'install-playwright-chromium-arm64',
28
27
  'ghcr-package-retention',
@@ -29,7 +29,6 @@ export const SCRIPT_PATHS = {
29
29
  'install-github-release': { command: 'bash', path: 'scripts/gha/install-github-release.sh' },
30
30
  'run-with-timeout': { command: 'bash', path: 'scripts/gha/run-with-timeout.sh' },
31
31
  'lint-links': { command: 'bash', path: 'scripts/gha/lint-links.sh' },
32
- 'materialize-pr-context': { command: 'bash', path: 'scripts/gha/materialize-pr-context.sh' },
33
32
  'wait-for-apt-locks': { command: 'bash', path: 'scripts/gha/wait-for-apt-locks.sh' },
34
33
  'install-playwright-chromium-arm64': {
35
34
  command: 'bash',
@@ -1 +1 @@
1
- export declare const USAGE = "Usage: vouchington <command> [options]\n\nCommands:\n runner-port-policy Print or validate a runner port policy\n with-host-lock Run a command under a host-wide lock\n host-storage Check free space on caller-supplied paths\n gha-runtime-audit Audit successful GitHub Actions job runtimes\n require-up-to-date Require HEAD to include a fetched remote branch\n fresh-base Classify the worktree against a remote base branch\n gitleaks-directory-scan Scan a directory with Gitleaks\n ast-grep-examples Run AST-grep rule examples\n ast-grep-pack Print shipped unconditional AST-grep pack paths as JSON\n gha-workspace-policy Check GitHub Actions workspace safety policy\n gha-output Write a collision-safe multiline GITHUB_OUTPUT record\n gha-needs-results Fail if required GitHub Actions job results failed\n download-with-diagnostics Download a URL and report HTTP status on failure\n download-optional-run-artifacts Download optional artifacts from the current run\n host-pressure-diagnostics Print a bounded host memory/OOM/PSI snapshot\n allocate-browser-safe-ports Allocate Fetch-safe localhost ports\n diagnose-port-collision Capture bounded localhost port diagnostics\n prepare-trivy-db Download the Trivy vulnerability database\n gha-artifacts-cleanup Delete classified GitHub Actions artifacts\n agent-issue-labels Map changed paths to labels; create missing repository labels\n http-origin Validate an optional HTTP(S) origin\n vitest-blob-manifest Stamp a vitest-blob-manifest:v1 identity file\n vitest-report-attempt Write or read a Vitest report-attempt marker\n prepare-vitest-reports Validate and select Vitest report JSON files\n pnpm-install Install a pnpm workspace with retry and release-age fail-fast\n check-cache-size Measure a path and decide whether to save a GHA cache\n make-shard-matrix Emit a [1..N] GitHub Actions shard matrix\n load-runner-env Overlay a runner env file onto GITHUB_ENV with injection guards\n clean-workspace Reset a persistent-runner workspace with a fork-PR trust gate\n install-github-release Download a checksum-verified GitHub Release binary\n run-with-timeout Run a command with GNU timeout or a Perl fallback\n lint-links Two-pass lychee: internal links fail, external warn\n materialize-pr-context Dump PR title/body/files/diff/comments and #N crawl\n wait-for-apt-locks Wait until apt/dpkg lock files are free\n install-playwright-chromium-arm64 Install Playwright Chromium from browsers.json\n ghcr-package-retention Delete old GHCR package versions (KEEP_MIN or --main-history)\n harness-admission-lane Compute a GITHUB_RUN_ID admission lane for fleet fan-out\n gha-collaborator-trust Classify authors as write-access collaborators or not\n nuget-central-version Validate a Directory.Packages.props PackageVersion delta\n verify-workflow-secrets Check a secret inventory against live repository and environment secrets\n runner-policy Check workflow runner labels and jobs against a config\n dead-code Gate unused code against a committed jscpd baseline\n swift-semantic-equal Compare Swift sources ignoring comments and whitespace\n post-review Post one COMMENT review from a staged payload file\n stage-review-payload Validate a review payload file into a staging directory\n retrospective-transcript Format facts from Claude-compatible, Codex, or Grok transcripts\n link-skill Link one packaged skill into an explicit consumer directory\n retrospective-facts Gather immutable facts for a retrospective\n agent-blackboard Probe an Agent Blackboard deployment, classify distill sessions, manage snapshots\n mcp Serve the agent-blackboard journal tools over stdio (MCP)\n hook Run a repository policy module as a pre/post tool-use hook\n worktree Reclaim finished git worktrees (dry run unless --yes)\n tmux Run configured dev windows in tmux; name panes; agent reminders\n story-coverage Check component exports are imported by stories\n transient-retry Rerun a failed GitHub Actions run when an injected rule matches\n sandbox-command-audit Audit agent transcripts for sandbox escalations and denials\n cloc Count tracked lines of code by category and service with scc\n coverage-scope-check Check positive-threshold coverage rules against the Vitest scope\n trivy-policy Check tracked Trivy workflow scans and the exception registry\n docker-image-mirror Require tracked Docker images to come from a Docker Hub mirror\n workspace-registry-check Check syncpack, pnpm workspace and CI path-filter registries against tracked manifests\n final-review Post, revoke, check, or benchmark multi-pillar final reviews\n storybook-browser-runner Run the Storybook Vitest browser project with cache, retry and watchdog\n\nOptions:\n -h, --help Show this help\n -v, --version Print the package version\n\nrunner-port-policy\n (no args) Print the shipped policy as JSON\n --file <path> Validate and print a policy file\n --reserved <port> Print true if the port is reserved\n\nwith-host-lock\n --name <family>\n [--slots <n>]\n --timeout-seconds <n>\n [--command-timeout-seconds <n>]\n [--failure-diagnostics <absolute-script>]\n [--on-acquire-timeout fail|run-unlocked]\n -- <command> [args...]\n\nhost-storage --path <path> [--path <path>...] [--minimum-free-bytes <bytes>] [--pnpm-store] [--docker-root] [--docker-desktop-path <path>] [--discovery-timeout-ms <ms>]\n\ngha-runtime-audit\n [--repository owner/name] Default GITHUB_REPOSITORY\n [--branch main]\n [--median-threshold-floor <seconds>] Off unless set. Must be below the ceiling\n [--median-threshold-ceiling <seconds>] Default 360. Flags a five-sample median above this\n --pr-workflow <name|/regex/> Repeatable\n --push-workflow <name|/regex/> Repeatable\n\nrequire-up-to-date --remote <name> --branch <name>\nfresh-base [--remote <name>] [--branch <name>] [--skip-fetch]\ngitleaks-directory-scan --config <path> [--directory <path>]\nast-grep-examples --rules <directory> --config <path>\nast-grep-pack\ngha-workspace-policy [--root <directory>] [--workflow-directory <directory>] [--action-directory <directory>]\n\ngha-output <name>\ngha-needs-results [label]\ndownload-with-diagnostics <url> <destination> [-- curl-args...]\ndownload-optional-run-artifacts (--name <name>... | --pattern <pattern>) --dir <directory>\nhost-pressure-diagnostics\nallocate-browser-safe-ports <count> [--policy path] [--forbidden-ports path]\ndiagnose-port-collision [--ports \"2200 2216\"] [--output-dir PATH]\nprepare-trivy-db\ngha-artifacts-cleanup run --run-id <id> [--keep-pattern glob] [--delete-pattern glob] [--patterns-file json]\ngha-artifacts-cleanup sweep --older-than-hours <n> [--keep-pattern glob] [--delete-pattern glob] [--patterns-file json]\nagent-issue-labels labels-from-paths [--labeler <path>] <path>...\nagent-issue-labels ensure-labels [--repo owner/name] [--policy-file json] [--update] <label>...\nhttp-origin [--field NAME] [value]\nvitest-blob-manifest <suite> [reports-directory]\nvitest-report-attempt <write DIRECTORY SUITE|read ROOT>\nprepare-vitest-reports [primary-directory] [fallback-directory] [output-directory]\npnpm-install --runner-lifecycle persistent|ephemeral|ephemeral-full --install-scripts true|false\ncheck-cache-size <path> <max-bytes> <label>\nmake-shard-matrix <total>\nload-runner-env\nclean-workspace\ninstall-github-release --repo owner/name --version X --asset 'name-{platform}.tar.gz' --bin name [--tag-prefix PREFIX] [--expected-sha256 SHA256] [--no-checksum] [--checksums-asset NAME] [--version-flag FLAG] [--bin-dir DIR]\nrun-with-timeout <timeout-seconds> <kill-after-seconds> <command...>\nlint-links [--offline] [--config PATH] [--glob PATTERN] [files...]\nmaterialize-pr-context\nwait-for-apt-locks\ninstall-playwright-chromium-arm64 [name:archive...]\nghcr-package-retention [--main-history] [--apply|--dry-run] [<url-encoded-package>...]\nharness-admission-lane <lanes>\ngha-collaborator-trust <owner/repo> [--allow-bot <login>]... < authors.json\nnuget-central-version <trusted-props> <candidate-props> <metadata-json> <output-props>\nverify-workflow-secrets [--repo OWNER/NAME] [--confirm NAME,...] [--inventory MODULE] [--export NAME] [--branch NAME]\nrunner-policy [--config FILE] [--root DIR]\ndead-code --baseline PATH [--seed|--update] [--config PATH] [--binary PATH] [--repo-root PATH] [--entry GLOB]... [--snapshot-ignore GLOB]... [--exclude GLOB]...\nswift-semantic-equal <base> <head> <file.swift>\npost-review\nstage-review-payload optional|required <source> <destination>\nretrospective-transcript [--session-id ID] [--jsonl PATH] [--projects-dir PATH] [--codex-sessions-dir PATH] [--grok-sessions-dir PATH]\nlink-skill <name> --source-root <skills-dir> --target-root <consumer-skills-dir> Link a packaged or repository-local skill\nretrospective-facts (--pr NUMBER | --branch NAME | --no-pr) [--repo OWNER/NAME] [--raw]\nagent-blackboard probe\nagent-blackboard session-start [--skip-env NAME] [--setup-hint TEXT] [--docs-path PATH] [--restore-hint TEXT] [--timeout-ms N] (SessionStart hook; payload on stdin)\nagent-blackboard distill classify <partition.jsonl> --retro-cutoff ISO8601 --session-cutoff ISO8601\nagent-blackboard snapshot partition --snapshot PATH --checksum SHA256 --counts '{\"sessions\":N,\"entries\":N,\"records\":N,\"bytes\":N}'\nagent-blackboard snapshot cleanup [--snapshot PATH] [--partition-directory PATH --receipt JSON]\nmcp\n (no args) Serve journal_append, journal_entries, outbox_status, outbox_flush,\n session_ensure, retrospective_check, retrospective_save,\n pr_validate, pr_create, pr_update, snapshot_export, snapshot_partition,\n snapshot_archive, snapshot_cleanup, and session_archive over stdio.\n Needs the optional @modelcontextprotocol/sdk peer (and zod).\n Launch it from inside the repository's git worktree.\n\nhook pre-tool-use|post-tool-use --harness claude|codex|cursor|grok --policy <module> [--root <dir>] [--automation-env NAME]...\n Reads the harness hook payload on stdin. <module> default-exports a policy object (or a function\n of the hook context returning one) with a command rule table, post-tool-use checkers, and an\n optional reminder. pre-tool-use exits 2 to block, and also when the policy cannot load.\n post-tool-use is advisory and always exits 0. --root defaults to the working directory.\n Each --automation-env NAME (repeatable) marks the run unattended when that environment variable\n is set, non-empty, and not 0 or false; CI markers and claude -p are always unattended.\n\nworktree reclaim [--yes] [--json] [--max-worktrees N] [--timeout-ms N] [--pr-limit N] [--after PATH]\n Dry run by default. Removes clean, fully pushed worktrees whose same-repository PR for the\n branch is merged or closed at exactly HEAD, using git worktree remove (never forced).\n Skips the main checkout, the current worktree, and locked, bare or detached worktrees.\n\ntransient-retry --rules <module> [--repo owner/name] [--token-env NAME] [--dry-run] <run-id>\n Loads a module exporting \"rules\" (and optionally \"limits\"), evaluates them against the failed run,\n and reruns only on a match. Exits 0 on rerun, 2 when none is warranted, 1 on error.\n\nsandbox-command-audit --rules <module> [--settings-path <file>] [--repo-root <dir>]... [--worktree-glob <glob>]... [--projects-dir <dir>] [--codex-sessions-dir <dir>] [--session-id <id>] [--limit N] [--since DAYS] [--json] [--raw]\n Scans Claude and Codex transcripts scoped to this repository (git roots plus any --worktree-glob\n layouts) and reports Bash escalations, denials and permission failures by command prefix.\n <module> exports an object (default or \"rules\") with loadPolicy({ settingsPath, cwd }), which\n returns { covers(list, commandOrPrefix) } for the allow/deny/excluded lists or { error }, and\n optionally classifyFailure(command, text, source), limits and worktreeGlobs. Transcript roots\n default to CLAUDE_CONFIG_DIR/projects and CODEX_HOME/sessions. --raw prints full command text.\n\ncloc --config <file> [--scc-bin <path>] [--json]\n Counts git-tracked lines with scc (SCC_BIN or --scc-bin, else \"scc\"), classified into\n source/tests/tooling and by service, and prints an aligned table (--json: rows). <file> is a .json\n file or a module whose default (or \"config\") export is the layout: services [{ name, match }],\n defaultService, categories, testPatterns, toolingPatterns, countedRoots, countedRootFiles,\n excludedDirs, ignoredDirs, sccBin, missingSccHint.\n\nfinal-review post --repo owner/name --pr N --head-sha SHA --input findings.json [--dry-run]\nfinal-review diff --repo owner/name --pr N\nfinal-review revoke --repo owner/name --pr N\nfinal-review status --repo owner/name --pr N\nfinal-review bench --cases cases.json --prompts DIR --out DIR [--pillar NAME]... [--case ID]... [--model NAME] [--jobs N] [--max-turns N] [--score-only] [--judge MODEL]\nfinal-review bench-verifier --cases cases.json --findings-from DIR --prompts DIR --out DIR [--case ID]... [--model NAME] [--jobs N] [--max-turns N] [--score-only] [--judge MODEL] [--checker MODEL]\n post renders verified findings as one or more COMMENT reviews (verdict, reviewed SHA and effort in\n the header; inline comments where the diff allows, the rest in the body) and adds the \"final\n approval\" label on Approve or removes it otherwise. It refuses when the head moved. diff prints the pull request\n diff with base and head line numbers on every line, for reviewers to cite. revoke removes\n the label before a re-review. status exits 0 only when the newest final review approved the current\n head and the label is present. bench runs each pillar prompt against labeled cases from a git-free\n snapshot of the pre-merge head and scores recall and precision; --judge grades by claim\n with a model instead of by location. bench-verifier runs only the verifier, one call per case\n and no subagents, on the pillar findings a bench --out DIR saved (each judged-real finding is\n also planted under a second pillar), and scores real findings kept, label recall, severity\n agreement, duplicates merged, and other blocking and high findings confirmed by --checker;\n --prompts is the skill's references directory.\n\ncoverage-scope-check [--rules <path>] [--scope-file <json>] [--include <glob>]... [--exclude <glob>]...\n Fails (exit 1) when a git-tracked file that a coverage rules file (default .coverage-rules.yml)\n gives a patch_coverage_min above 0, and its scope does not ignore, is outside the collector's\n scope. The collector scope is the repeated --include/--exclude globs plus, optionally, the\n include/exclude string arrays of a --scope-file JSON written from the Vitest coverage config.\n At least one include glob is required.\n\ntrivy-policy [--root <dir>] [--ignore-file <path>] [--findings-exit-code-env <NAME>] [--cleanup-url-prefix <url>] [--min-gates N] [--min-sboms N] [--max-expiry-days N]\n Reads git-tracked workflows, composite actions and shell scripts and prints each violation (exit 1).\n Every Trivy package scan must be an auditable CLI command in a workflow run block or shell script (no action, wrapper, substitution or\n background). Vulnerability gates need --scanners vuln, --pkg-types os, --severity CRITICAL,HIGH,\n --ignore-unfixed, --skip-db-update, --quiet, table output to a file, --ignorefile <ignore-file>\n (default .trivyignore.yaml) and --exit-code \"$<NAME>\" (default TRIVY_FINDINGS_EXIT_CODE).\n CycloneDX SBOM scans must be unfiltered with --exit-code 0. At least --min-gates gates and\n --min-sboms SBOM scans (default 2 each) must exist. The tracked ignore registry needs purl-exact OS\n packages, a \"Not exploitable: ... Cleanup: <issue URL>\" statement (URL must start with\n --cleanup-url-prefix when given) and an expired_at between tomorrow and --max-expiry-days (30).\n\ndocker-image-mirror [--root <dir>] [--mirror <host>] [--allow-registry <prefix>]... [--require-digest]\n [--allow-ref-expression <text>]...\n Prints each Docker Hub image in git-tracked workflows, composite actions and Dockerfiles (exit 1):\n run, pull and create commands, containers, services, docker:// references, buildx drivers, FROM,\n COPY --from and # syntax. Images must name a registry host; --mirror (default mirror.gcr.io) is\n the host the message tells you to use. --allow-registry (repeatable) instead requires every image,\n including FROM and COPY --from, to start with one of the prefixes; a reference that expands a\n variable passes only when its literal text before the variable starts with a prefix. --require-digest\n requires @sha256: plus 64 lowercase hex characters. Stage aliases and scratch stay exempt.\n --allow-ref-expression (repeatable) is an audited escape hatch for dynamic job outputs: a reference\n whose raw text exactly equals the value is accepted. Images the same file builds locally are exempt.\n\nworkspace-registry-check [--root <dir>] [--syncpack-config <path>] [--workspace-file <path>]\n [--path-filters <path>] [--tooling-group <name>] [--trigger-only-glob <glob>] [--runtime-prefix <prefix>]\n Reconciles git-tracked package.json manifests with the syncpack \"source\" globs (default\n .syncpackrc.json), the pnpm \"packages\" globs (pnpm-workspace.yaml) and the dorny/paths-filter groups\n (.github/ci-path-filters.yml) and prints one line per violation (exit 1). The --tooling-group group\n (default tooling) must reach every manifest and wildcard workspace glob, and its --trigger-only-glob\n (default **/package.json) does not count as registering a manifest. Each group named with\n --runtime-prefix (default runtime-) must mirror the primary group of the same name.\n\nstorybook-browser-runner --project <name> [--command <cmd>] [--result-file <path>]... [--completion-file <path>] [--coverage-arg=<arg>]... [--optimize-deps-config <path>] [--env-prefix <PREFIX>] [--progress-prefix <text>] [-- <argv>...]\n Spawns <cmd> (default pnpm) in its own process group with <argv> (default \"exec vitest run\n --project <name>\") plus the coverage args (default --coverage) and supervises it: a Vite optimizer\n cache, retries on known Vite and browser start-up flakes, and stall, hang and session-budget\n watchdogs. --result-file paths are removed before each attempt and --completion-file is the one\n whose appearance is recorded. Tuned by <PREFIX>_STARTUP_ATTEMPTS, _OPTIMIZER_STALL_MS, _HANG_MS,\n _SESSION_BUDGET_MS, _DIAGNOSTICS_FILE, _PERSISTENT_CACHE, _PERSISTENT_CACHE_DIR and _COVERAGE\n (PREFIX defaults to STORYBOOK_BROWSER). Exits with the resolved test exit code.\n\ntmux up --config <file> [--root <dir>] [--no-attach] [-v|--verbose]\ntmux name [--socket PATH --pane %ID --worktree PATH] <name> | read-title | post-tool | agent-reminder <event>\n Environment: TMUX_TARGET_BIN, TMUX_TARGET_ROOT, TMUX_NAME_COMMAND, AGENT_TMUX_SOCKET/PANE/WORKTREE.\n\nstory-coverage --root <dir> --component-root <rel> --story-root <rel> --source-extension <ext> --component-extension <ext> --marker <regex> --story-pattern <regex> [--alias <prefix>=<path>] [--exclusions <json>] [--exclusions-label <text>]\n";
1
+ export declare const USAGE = "Usage: vouchington <command> [options]\n\nCommands:\n runner-port-policy Print or validate a runner port policy\n with-host-lock Run a command under a host-wide lock\n host-storage Check free space on caller-supplied paths\n gha-runtime-audit Audit successful GitHub Actions job runtimes\n require-up-to-date Require HEAD to include a fetched remote branch\n fresh-base Classify the worktree against a remote base branch\n gitleaks-directory-scan Scan a directory with Gitleaks\n ast-grep-examples Run AST-grep rule examples\n ast-grep-pack Print shipped unconditional AST-grep pack paths as JSON\n gha-workspace-policy Check GitHub Actions workspace safety policy\n gha-output Write a collision-safe multiline GITHUB_OUTPUT record\n gha-needs-results Fail if required GitHub Actions job results failed\n download-with-diagnostics Download a URL and report HTTP status on failure\n download-optional-run-artifacts Download optional artifacts from the current run\n host-pressure-diagnostics Print a bounded host memory/OOM/PSI snapshot\n allocate-browser-safe-ports Allocate Fetch-safe localhost ports\n diagnose-port-collision Capture bounded localhost port diagnostics\n prepare-trivy-db Download the Trivy vulnerability database\n gha-artifacts-cleanup Delete classified GitHub Actions artifacts\n agent-issue-labels Map changed paths to labels; create missing repository labels\n http-origin Validate an optional HTTP(S) origin\n vitest-blob-manifest Stamp a vitest-blob-manifest:v1 identity file\n vitest-report-attempt Write or read a Vitest report-attempt marker\n prepare-vitest-reports Validate and select Vitest report JSON files\n pnpm-install Install a pnpm workspace with retry and release-age fail-fast\n check-cache-size Measure a path and decide whether to save a GHA cache\n make-shard-matrix Emit a [1..N] GitHub Actions shard matrix\n load-runner-env Overlay a runner env file onto GITHUB_ENV with injection guards\n clean-workspace Reset a persistent-runner workspace with a fork-PR trust gate\n install-github-release Download a checksum-verified GitHub Release binary\n run-with-timeout Run a command with GNU timeout or a Perl fallback\n lint-links Two-pass lychee: internal links fail, external warn\n wait-for-apt-locks Wait until apt/dpkg lock files are free\n install-playwright-chromium-arm64 Install Playwright Chromium from browsers.json\n ghcr-package-retention Delete old GHCR package versions (KEEP_MIN or --main-history)\n harness-admission-lane Compute a GITHUB_RUN_ID admission lane for fleet fan-out\n gha-collaborator-trust Classify authors as write-access collaborators or not\n nuget-central-version Validate a Directory.Packages.props PackageVersion delta\n verify-workflow-secrets Check a secret inventory against live repository and environment secrets\n runner-policy Check workflow runner labels and jobs against a config\n dead-code Gate unused code against a committed jscpd baseline\n swift-semantic-equal Compare Swift sources ignoring comments and whitespace\n retrospective-transcript Format facts from Claude-compatible, Codex, or Grok transcripts\n link-skill Link one packaged skill into an explicit consumer directory\n retrospective-facts Gather immutable facts for a retrospective\n agent-blackboard Probe an Agent Blackboard deployment, classify distill sessions, manage snapshots\n mcp Serve the agent-blackboard journal tools over stdio (MCP)\n hook Run a repository policy module as a pre/post tool-use hook\n worktree Reclaim finished git worktrees (dry run unless --yes)\n tmux Run configured dev windows in tmux; name panes; agent reminders\n story-coverage Check component exports are imported by stories\n transient-retry Rerun a failed GitHub Actions run when an injected rule matches\n sandbox-command-audit Audit agent transcripts for sandbox escalations and denials\n cloc Count tracked lines of code by category and service with scc\n coverage-scope-check Check positive-threshold coverage rules against the Vitest scope\n trivy-policy Check tracked Trivy workflow scans and the exception registry\n docker-image-mirror Require tracked Docker images to come from a Docker Hub mirror\n workspace-registry-check Check syncpack, pnpm workspace and CI path-filter registries against tracked manifests\n final-review Post, revoke, check, or benchmark multi-pillar final reviews\n storybook-browser-runner Run the Storybook Vitest browser project with cache, retry and watchdog\n\nOptions:\n -h, --help Show this help\n -v, --version Print the package version\n\nrunner-port-policy\n (no args) Print the shipped policy as JSON\n --file <path> Validate and print a policy file\n --reserved <port> Print true if the port is reserved\n\nwith-host-lock\n --name <family>\n [--slots <n>]\n --timeout-seconds <n>\n [--command-timeout-seconds <n>]\n [--failure-diagnostics <absolute-script>]\n [--on-acquire-timeout fail|run-unlocked]\n -- <command> [args...]\n\nhost-storage --path <path> [--path <path>...] [--minimum-free-bytes <bytes>] [--pnpm-store] [--docker-root] [--docker-desktop-path <path>] [--discovery-timeout-ms <ms>]\n\ngha-runtime-audit\n [--repository owner/name] Default GITHUB_REPOSITORY\n [--branch main]\n [--median-threshold-floor <seconds>] Off unless set. Must be below the ceiling\n [--median-threshold-ceiling <seconds>] Default 360. Flags a five-sample median above this\n --pr-workflow <name|/regex/> Repeatable\n --push-workflow <name|/regex/> Repeatable\n\nrequire-up-to-date --remote <name> --branch <name>\nfresh-base [--remote <name>] [--branch <name>] [--skip-fetch]\ngitleaks-directory-scan --config <path> [--directory <path>]\nast-grep-examples --rules <directory> --config <path>\nast-grep-pack\ngha-workspace-policy [--root <directory>] [--workflow-directory <directory>] [--action-directory <directory>]\n\ngha-output <name>\ngha-needs-results [label]\ndownload-with-diagnostics <url> <destination> [-- curl-args...]\ndownload-optional-run-artifacts (--name <name>... | --pattern <pattern>) --dir <directory>\nhost-pressure-diagnostics\nallocate-browser-safe-ports <count> [--policy path] [--forbidden-ports path]\ndiagnose-port-collision [--ports \"2200 2216\"] [--output-dir PATH]\nprepare-trivy-db\ngha-artifacts-cleanup run --run-id <id> [--keep-pattern glob] [--delete-pattern glob] [--patterns-file json]\ngha-artifacts-cleanup sweep --older-than-hours <n> [--keep-pattern glob] [--delete-pattern glob] [--patterns-file json]\nagent-issue-labels labels-from-paths [--labeler <path>] <path>...\nagent-issue-labels ensure-labels [--repo owner/name] [--policy-file json] [--update] <label>...\nhttp-origin [--field NAME] [value]\nvitest-blob-manifest <suite> [reports-directory]\nvitest-report-attempt <write DIRECTORY SUITE|read ROOT>\nprepare-vitest-reports [primary-directory] [fallback-directory] [output-directory]\npnpm-install --runner-lifecycle persistent|ephemeral|ephemeral-full --install-scripts true|false\ncheck-cache-size <path> <max-bytes> <label>\nmake-shard-matrix <total>\nload-runner-env\nclean-workspace\ninstall-github-release --repo owner/name --version X --asset 'name-{platform}.tar.gz' --bin name [--tag-prefix PREFIX] [--expected-sha256 SHA256] [--no-checksum] [--checksums-asset NAME] [--version-flag FLAG] [--bin-dir DIR]\nrun-with-timeout <timeout-seconds> <kill-after-seconds> <command...>\nlint-links [--offline] [--config PATH] [--glob PATTERN] [files...]\nwait-for-apt-locks\ninstall-playwright-chromium-arm64 [name:archive...]\nghcr-package-retention [--main-history] [--apply|--dry-run] [<url-encoded-package>...]\nharness-admission-lane <lanes>\ngha-collaborator-trust <owner/repo> [--allow-bot <login>]... < authors.json\nnuget-central-version <trusted-props> <candidate-props> <metadata-json> <output-props>\nverify-workflow-secrets [--repo OWNER/NAME] [--confirm NAME,...] [--inventory MODULE] [--export NAME] [--branch NAME]\nrunner-policy [--config FILE] [--root DIR]\ndead-code --baseline PATH [--seed|--update] [--config PATH] [--binary PATH] [--repo-root PATH] [--entry GLOB]... [--snapshot-ignore GLOB]... [--exclude GLOB]...\nswift-semantic-equal <base> <head> <file.swift>\nretrospective-transcript [--session-id ID] [--jsonl PATH] [--projects-dir PATH] [--codex-sessions-dir PATH] [--grok-sessions-dir PATH]\nlink-skill <name> --source-root <skills-dir> --target-root <consumer-skills-dir> Link a packaged or repository-local skill\nretrospective-facts (--pr NUMBER | --branch NAME | --no-pr) [--repo OWNER/NAME] [--raw]\nagent-blackboard probe\nagent-blackboard session-start [--skip-env NAME] [--setup-hint TEXT] [--docs-path PATH] [--restore-hint TEXT] [--timeout-ms N] (SessionStart hook; payload on stdin)\nagent-blackboard distill classify <partition.jsonl> --retro-cutoff ISO8601 --session-cutoff ISO8601\nagent-blackboard snapshot partition --snapshot PATH --checksum SHA256 --counts '{\"sessions\":N,\"entries\":N,\"records\":N,\"bytes\":N}'\nagent-blackboard snapshot cleanup [--snapshot PATH] [--partition-directory PATH --receipt JSON]\nmcp\n (no args) Serve journal_append, journal_entries, outbox_status, outbox_flush,\n session_ensure, retrospective_check, retrospective_save,\n pr_validate, pr_create, pr_update, snapshot_export, snapshot_partition,\n snapshot_archive, snapshot_cleanup, and session_archive over stdio.\n Needs the optional @modelcontextprotocol/sdk peer (and zod).\n Launch it from inside the repository's git worktree.\n\nhook pre-tool-use|post-tool-use --harness claude|codex|cursor|grok --policy <module> [--root <dir>] [--automation-env NAME]...\n Reads the harness hook payload on stdin. <module> default-exports a policy object (or a function\n of the hook context returning one) with a command rule table, post-tool-use checkers, and an\n optional reminder. pre-tool-use exits 2 to block, and also when the policy cannot load.\n post-tool-use is advisory and always exits 0. --root defaults to the working directory.\n Each --automation-env NAME (repeatable) marks the run unattended when that environment variable\n is set, non-empty, and not 0 or false; CI markers and claude -p are always unattended.\n\nworktree reclaim [--yes] [--json] [--max-worktrees N] [--timeout-ms N] [--pr-limit N] [--after PATH]\n Dry run by default. Removes clean, fully pushed worktrees whose same-repository PR for the\n branch is merged or closed at exactly HEAD, using git worktree remove (never forced).\n Skips the main checkout, the current worktree, and locked, bare or detached worktrees.\n\ntransient-retry --rules <module> [--repo owner/name] [--token-env NAME] [--dry-run] <run-id>\n Loads a module exporting \"rules\" (and optionally \"limits\"), evaluates them against the failed run,\n and reruns only on a match. Exits 0 on rerun, 2 when none is warranted, 1 on error.\n\nsandbox-command-audit --rules <module> [--settings-path <file>] [--repo-root <dir>]... [--worktree-glob <glob>]... [--projects-dir <dir>] [--codex-sessions-dir <dir>] [--session-id <id>] [--limit N] [--since DAYS] [--json] [--raw]\n Scans Claude and Codex transcripts scoped to this repository (git roots plus any --worktree-glob\n layouts) and reports Bash escalations, denials and permission failures by command prefix.\n <module> exports an object (default or \"rules\") with loadPolicy({ settingsPath, cwd }), which\n returns { covers(list, commandOrPrefix) } for the allow/deny/excluded lists or { error }, and\n optionally classifyFailure(command, text, source), limits and worktreeGlobs. Transcript roots\n default to CLAUDE_CONFIG_DIR/projects and CODEX_HOME/sessions. --raw prints full command text.\n\ncloc --config <file> [--scc-bin <path>] [--json]\n Counts git-tracked lines with scc (SCC_BIN or --scc-bin, else \"scc\"), classified into\n source/tests/tooling and by service, and prints an aligned table (--json: rows). <file> is a .json\n file or a module whose default (or \"config\") export is the layout: services [{ name, match }],\n defaultService, categories, testPatterns, toolingPatterns, countedRoots, countedRootFiles,\n excludedDirs, ignoredDirs, sccBin, missingSccHint.\n\nfinal-review post --repo owner/name --pr N --head-sha SHA --input findings.json [--dry-run]\nfinal-review diff --repo owner/name --pr N\nfinal-review revoke --repo owner/name --pr N\nfinal-review status --repo owner/name --pr N\nfinal-review bench --cases cases.json --prompts DIR --out DIR [--pillar NAME]... [--case ID]... [--model NAME] [--jobs N] [--max-turns N] [--score-only] [--judge MODEL]\nfinal-review bench-verifier --cases cases.json --findings-from DIR --prompts DIR --out DIR [--case ID]... [--model NAME] [--jobs N] [--max-turns N] [--score-only] [--judge MODEL] [--checker MODEL]\n post renders verified findings as one or more COMMENT reviews (verdict, reviewed SHA and effort in\n the header; inline comments where the diff allows, the rest in the body) and adds the \"final\n approval\" label on Approve or removes it otherwise. It refuses when the head moved. diff prints the pull request\n diff with base and head line numbers on every line, for reviewers to cite. revoke removes\n the label before a re-review. status exits 0 only when the newest final review approved the current\n head and the label is present. bench runs each pillar prompt against labeled cases from a git-free\n snapshot of the pre-merge head and scores recall and precision; --judge grades by claim\n with a model instead of by location. bench-verifier runs only the verifier, one call per case\n and no subagents, on the pillar findings a bench --out DIR saved (each judged-real finding is\n also planted under a second pillar), and scores real findings kept, label recall, severity\n agreement, duplicates merged, and other blocking and high findings confirmed by --checker;\n --prompts is the skill's references directory.\n\ncoverage-scope-check [--rules <path>] [--scope-file <json>] [--include <glob>]... [--exclude <glob>]...\n Fails (exit 1) when a git-tracked file that a coverage rules file (default .coverage-rules.yml)\n gives a patch_coverage_min above 0, and its scope does not ignore, is outside the collector's\n scope. The collector scope is the repeated --include/--exclude globs plus, optionally, the\n include/exclude string arrays of a --scope-file JSON written from the Vitest coverage config.\n At least one include glob is required.\n\ntrivy-policy [--root <dir>] [--ignore-file <path>] [--findings-exit-code-env <NAME>] [--cleanup-url-prefix <url>] [--min-gates N] [--min-sboms N] [--max-expiry-days N]\n Reads git-tracked workflows, composite actions and shell scripts and prints each violation (exit 1).\n Every Trivy package scan must be an auditable CLI command in a workflow run block or shell script (no action, wrapper, substitution or\n background). Vulnerability gates need --scanners vuln, --pkg-types os, --severity CRITICAL,HIGH,\n --ignore-unfixed, --skip-db-update, --quiet, table output to a file, --ignorefile <ignore-file>\n (default .trivyignore.yaml) and --exit-code \"$<NAME>\" (default TRIVY_FINDINGS_EXIT_CODE).\n CycloneDX SBOM scans must be unfiltered with --exit-code 0. At least --min-gates gates and\n --min-sboms SBOM scans (default 2 each) must exist. The tracked ignore registry needs purl-exact OS\n packages, a \"Not exploitable: ... Cleanup: <issue URL>\" statement (URL must start with\n --cleanup-url-prefix when given) and an expired_at between tomorrow and --max-expiry-days (30).\n\ndocker-image-mirror [--root <dir>] [--mirror <host>] [--allow-registry <prefix>]... [--require-digest]\n [--allow-ref-expression <text>]...\n Prints each Docker Hub image in git-tracked workflows, composite actions and Dockerfiles (exit 1):\n run, pull and create commands, containers, services, docker:// references, buildx drivers, FROM,\n COPY --from and # syntax. Images must name a registry host; --mirror (default mirror.gcr.io) is\n the host the message tells you to use. --allow-registry (repeatable) instead requires every image,\n including FROM and COPY --from, to start with one of the prefixes; a reference that expands a\n variable passes only when its literal text before the variable starts with a prefix. --require-digest\n requires @sha256: plus 64 lowercase hex characters. Stage aliases and scratch stay exempt.\n --allow-ref-expression (repeatable) is an audited escape hatch for dynamic job outputs: a reference\n whose raw text exactly equals the value is accepted. Images the same file builds locally are exempt.\n\nworkspace-registry-check [--root <dir>] [--syncpack-config <path>] [--workspace-file <path>]\n [--path-filters <path>] [--tooling-group <name>] [--trigger-only-glob <glob>] [--runtime-prefix <prefix>]\n Reconciles git-tracked package.json manifests with the syncpack \"source\" globs (default\n .syncpackrc.json), the pnpm \"packages\" globs (pnpm-workspace.yaml) and the dorny/paths-filter groups\n (.github/ci-path-filters.yml) and prints one line per violation (exit 1). The --tooling-group group\n (default tooling) must reach every manifest and wildcard workspace glob, and its --trigger-only-glob\n (default **/package.json) does not count as registering a manifest. Each group named with\n --runtime-prefix (default runtime-) must mirror the primary group of the same name.\n\nstorybook-browser-runner --project <name> [--command <cmd>] [--result-file <path>]... [--completion-file <path>] [--coverage-arg=<arg>]... [--optimize-deps-config <path>] [--env-prefix <PREFIX>] [--progress-prefix <text>] [-- <argv>...]\n Spawns <cmd> (default pnpm) in its own process group with <argv> (default \"exec vitest run\n --project <name>\") plus the coverage args (default --coverage) and supervises it: a Vite optimizer\n cache, retries on known Vite and browser start-up flakes, and stall, hang and session-budget\n watchdogs. --result-file paths are removed before each attempt and --completion-file is the one\n whose appearance is recorded. Tuned by <PREFIX>_STARTUP_ATTEMPTS, _OPTIMIZER_STALL_MS, _HANG_MS,\n _SESSION_BUDGET_MS, _DIAGNOSTICS_FILE, _PERSISTENT_CACHE, _PERSISTENT_CACHE_DIR and _COVERAGE\n (PREFIX defaults to STORYBOOK_BROWSER). Exits with the resolved test exit code.\n\ntmux up --config <file> [--root <dir>] [--no-attach] [-v|--verbose]\ntmux name [--socket PATH --pane %ID --worktree PATH] <name> | read-title | post-tool | agent-reminder <event>\n Environment: TMUX_TARGET_BIN, TMUX_TARGET_ROOT, TMUX_NAME_COMMAND, AGENT_TMUX_SOCKET/PANE/WORKTREE.\n\nstory-coverage --root <dir> --component-root <rel> --story-root <rel> --source-extension <ext> --component-extension <ext> --marker <regex> --story-pattern <regex> [--alias <prefix>=<path>] [--exclusions <json>] [--exclusions-label <text>]\n";
@@ -34,7 +34,6 @@ Commands:
34
34
  install-github-release Download a checksum-verified GitHub Release binary
35
35
  run-with-timeout Run a command with GNU timeout or a Perl fallback
36
36
  lint-links Two-pass lychee: internal links fail, external warn
37
- materialize-pr-context Dump PR title/body/files/diff/comments and #N crawl
38
37
  wait-for-apt-locks Wait until apt/dpkg lock files are free
39
38
  install-playwright-chromium-arm64 Install Playwright Chromium from browsers.json
40
39
  ghcr-package-retention Delete old GHCR package versions (KEEP_MIN or --main-history)
@@ -45,8 +44,6 @@ Commands:
45
44
  runner-policy Check workflow runner labels and jobs against a config
46
45
  dead-code Gate unused code against a committed jscpd baseline
47
46
  swift-semantic-equal Compare Swift sources ignoring comments and whitespace
48
- post-review Post one COMMENT review from a staged payload file
49
- stage-review-payload Validate a review payload file into a staging directory
50
47
  retrospective-transcript Format facts from Claude-compatible, Codex, or Grok transcripts
51
48
  link-skill Link one packaged skill into an explicit consumer directory
52
49
  retrospective-facts Gather immutable facts for a retrospective
@@ -120,7 +117,6 @@ clean-workspace
120
117
  install-github-release --repo owner/name --version X --asset 'name-{platform}.tar.gz' --bin name [--tag-prefix PREFIX] [--expected-sha256 SHA256] [--no-checksum] [--checksums-asset NAME] [--version-flag FLAG] [--bin-dir DIR]
121
118
  run-with-timeout <timeout-seconds> <kill-after-seconds> <command...>
122
119
  lint-links [--offline] [--config PATH] [--glob PATTERN] [files...]
123
- materialize-pr-context
124
120
  wait-for-apt-locks
125
121
  install-playwright-chromium-arm64 [name:archive...]
126
122
  ghcr-package-retention [--main-history] [--apply|--dry-run] [<url-encoded-package>...]
@@ -131,8 +127,6 @@ verify-workflow-secrets [--repo OWNER/NAME] [--confirm NAME,...] [--inventory MO
131
127
  runner-policy [--config FILE] [--root DIR]
132
128
  dead-code --baseline PATH [--seed|--update] [--config PATH] [--binary PATH] [--repo-root PATH] [--entry GLOB]... [--snapshot-ignore GLOB]... [--exclude GLOB]...
133
129
  swift-semantic-equal <base> <head> <file.swift>
134
- post-review
135
- stage-review-payload optional|required <source> <destination>
136
130
  retrospective-transcript [--session-id ID] [--jsonl PATH] [--projects-dir PATH] [--codex-sessions-dir PATH] [--grok-sessions-dir PATH]
137
131
  link-skill <name> --source-root <skills-dir> --target-root <consumer-skills-dir> Link a packaged or repository-local skill
138
132
  retrospective-facts (--pr NUMBER | --branch NAME | --no-pr) [--repo OWNER/NAME] [--raw]
@@ -1,9 +1,14 @@
1
+ /** Per-call limits: the child is killed after `timeout` ms, and output past `maxBuffer` bytes fails. */
2
+ type CommandLimits = {
3
+ timeout?: number;
4
+ maxBuffer?: number;
5
+ };
1
6
  /** A text-mode command runner: argv in, stdout out. Rejects on a non-zero exit. */
2
- export type RunTextCommand = (args: string[]) => Promise<string>;
7
+ export type RunTextCommand = (args: string[], limits?: CommandLimits) => Promise<string>;
3
8
  /** The `child_process.execFile` shape `createCommandRunner` wraps — injectable for tests. */
4
9
  export type ExecFileText = (command: string, args: string[], options?: {
5
10
  env: NodeJS.ProcessEnv;
6
- }) => Promise<{
11
+ } & CommandLimits) => Promise<{
7
12
  stdout: string;
8
13
  }>;
9
14
  /**
@@ -17,3 +22,4 @@ export declare function createCommandRunner(command: string, exec?: ExecFileText
17
22
  export declare const runGh: RunTextCommand;
18
23
  /** Runs `git` and returns its stdout. */
19
24
  export declare const runGit: RunTextCommand;
25
+ export {};
@@ -10,9 +10,9 @@ const MAX_OUTPUT_BYTES = 256 * 1024 * 1024;
10
10
  * are this factory applied to the two binaries this module cares about. `buildEnv` maps the
11
11
  * parent environment to the one the child is spawned with (identity by default).
12
12
  */
13
- export function createCommandRunner(command, exec = (cmd, args, options) => execFileAsync(cmd, args, { ...options, encoding: 'utf8', maxBuffer: MAX_OUTPUT_BYTES }), buildEnv = (env) => env) {
14
- return async (args) => {
15
- const { stdout } = await exec(command, args, { env: buildEnv(process.env) });
13
+ export function createCommandRunner(command, exec = (cmd, args, options) => execFileAsync(cmd, args, { encoding: 'utf8', maxBuffer: MAX_OUTPUT_BYTES, ...options }), buildEnv = (env) => env) {
14
+ return async (args, limits) => {
15
+ const { stdout } = await exec(command, args, { env: buildEnv(process.env), ...limits });
16
16
  return stdout;
17
17
  };
18
18
  }
@@ -3,5 +3,3 @@ export type { ReviewComment, ReviewSide, SanitizedReview } from './payload.mts';
3
3
  export { indexReviewFiles, parsePatchCommentable, parseReviewFilesJson } from './diff.mts';
4
4
  export type { CommentableIndex, CommentableLine, LineKind, ReviewFile } from './diff.mts';
5
5
  export { nearestReviewLine, placeReviewComment, remapReviewComments, rewriteSnappedSuggestion, snapReviewNote, } from './remap.mts';
6
- export { readRegularReviewPayload, stageReviewPayload, writeStagedOutput } from './file.mts';
7
- export type { PayloadRequirement } from './file.mts';