@ai-dossier/cli 0.13.0 → 0.18.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 (63) hide show
  1. package/README.md +236 -6
  2. package/dist/cache-resolver.d.ts.map +1 -1
  3. package/dist/cache-resolver.js +2 -11
  4. package/dist/cache-resolver.js.map +1 -1
  5. package/dist/cap-log.d.ts +31 -0
  6. package/dist/cap-log.d.ts.map +1 -0
  7. package/dist/cap-log.js +30 -0
  8. package/dist/cap-log.js.map +1 -0
  9. package/dist/capability.d.ts +108 -0
  10. package/dist/capability.d.ts.map +1 -0
  11. package/dist/capability.js +407 -0
  12. package/dist/capability.js.map +1 -0
  13. package/dist/cli.js +6 -0
  14. package/dist/cli.js.map +1 -1
  15. package/dist/commands/cap.d.ts +13 -0
  16. package/dist/commands/cap.d.ts.map +1 -0
  17. package/dist/commands/cap.js +105 -0
  18. package/dist/commands/cap.js.map +1 -0
  19. package/dist/commands/plan.d.ts +20 -0
  20. package/dist/commands/plan.d.ts.map +1 -0
  21. package/dist/commands/plan.js +323 -0
  22. package/dist/commands/plan.js.map +1 -0
  23. package/dist/commands/runstate.d.ts.map +1 -1
  24. package/dist/commands/runstate.js +56 -292
  25. package/dist/commands/runstate.js.map +1 -1
  26. package/dist/commands/sched.d.ts +11 -0
  27. package/dist/commands/sched.d.ts.map +1 -0
  28. package/dist/commands/sched.js +402 -0
  29. package/dist/commands/sched.js.map +1 -0
  30. package/dist/gh.d.ts +155 -0
  31. package/dist/gh.d.ts.map +1 -0
  32. package/dist/gh.js +357 -0
  33. package/dist/gh.js.map +1 -0
  34. package/dist/helpers.d.ts +7 -0
  35. package/dist/helpers.d.ts.map +1 -1
  36. package/dist/helpers.js +19 -0
  37. package/dist/helpers.js.map +1 -1
  38. package/dist/issue-selection.js +2 -2
  39. package/dist/issue-selection.js.map +1 -1
  40. package/dist/jsonl-log.d.ts +14 -0
  41. package/dist/jsonl-log.d.ts.map +1 -0
  42. package/dist/jsonl-log.js +32 -0
  43. package/dist/jsonl-log.js.map +1 -0
  44. package/dist/plan-artifact.d.ts +123 -0
  45. package/dist/plan-artifact.d.ts.map +1 -0
  46. package/dist/plan-artifact.js +213 -0
  47. package/dist/plan-artifact.js.map +1 -0
  48. package/dist/run-log.d.ts.map +1 -1
  49. package/dist/run-log.js +2 -9
  50. package/dist/run-log.js.map +1 -1
  51. package/dist/runstate-stats.d.ts +12 -3
  52. package/dist/runstate-stats.d.ts.map +1 -1
  53. package/dist/runstate-stats.js +33 -14
  54. package/dist/runstate-stats.js.map +1 -1
  55. package/dist/runstate.d.ts +87 -13
  56. package/dist/runstate.d.ts.map +1 -1
  57. package/dist/runstate.js +195 -25
  58. package/dist/runstate.js.map +1 -1
  59. package/dist/version.d.ts +10 -0
  60. package/dist/version.d.ts.map +1 -0
  61. package/dist/version.js +23 -0
  62. package/dist/version.js.map +1 -0
  63. package/package.json +3 -2
@@ -0,0 +1,323 @@
1
+ "use strict";
2
+ /**
3
+ * `ai-dossier plan` — post, read, and validate `plan:v1` artifacts on a GitHub issue.
4
+ *
5
+ * One canonical per-issue plan (#462, RFC-0001 C.6): posting is append-only (a new post
6
+ * supersedes — readers always take the LAST plan:v1 comment), reading is `get`, and
7
+ * `validate` runs the deterministic checks — referenced files exist at HEAD, head-distance,
8
+ * risk-floor path scan — with no model call anywhere.
9
+ */
10
+ var __importDefault = (this && this.__importDefault) || function (mod) {
11
+ return (mod && mod.__esModule) ? mod : { "default": mod };
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.registerPlanCommand = registerPlanCommand;
15
+ const node_fs_1 = __importDefault(require("node:fs"));
16
+ const gh_1 = require("../gh");
17
+ const plan_artifact_1 = require("../plan-artifact");
18
+ /**
19
+ * snake_case JSON keys for section content, pinned by the format spec. Predicted Files
20
+ * is deliberately absent: its JSON key carries the extracted path ARRAY, not the raw
21
+ * section markdown, so it is assigned once outside this map.
22
+ */
23
+ const SECTION_JSON_KEYS = {
24
+ Problem: 'problem',
25
+ 'Acceptance Criteria': 'acceptance_criteria',
26
+ Approach: 'approach',
27
+ 'Test Scope': 'test_scope',
28
+ };
29
+ /** `git cat-file -e` exits 1 for "no such object at HEAD" — an answer, not a fault. */
30
+ const GIT_NO_SUCH_OBJECT = 1;
31
+ /** Characters kept when quoting a network-derived path inside an error message. */
32
+ const PATH_SNIPPET_LENGTH = 80;
33
+ /** Author associations GitHub treats as having write access to the repository. */
34
+ const WRITE_ACCESS_ASSOCIATIONS = new Set(['MEMBER', 'OWNER', 'COLLABORATOR', 'BOT']);
35
+ /** Read the plan file, exiting with the errno when it cannot be read. */
36
+ function readPlanFile(file) {
37
+ try {
38
+ return node_fs_1.default.readFileSync(file, 'utf8');
39
+ }
40
+ catch (err) {
41
+ const e = err;
42
+ (0, gh_1.fail)([
43
+ `Could not read plan file '${file}': ${e.code ?? 'error'} — ${(0, gh_1.snippet)(e.message, PATH_SNIPPET_LENGTH)}.`,
44
+ ]);
45
+ }
46
+ }
47
+ /** Resolve the `head=` stamp: the `--head` override, else the repo's current HEAD. */
48
+ function resolveHead(override) {
49
+ if (override !== undefined)
50
+ return override;
51
+ const res = (0, gh_1.exec)('git', ['rev-parse', '--short', 'HEAD']);
52
+ if (!res.ok) {
53
+ (0, gh_1.fail)([
54
+ [
55
+ `Could not stamp head= — 'git rev-parse --short HEAD' failed.`,
56
+ `Fix: run from inside the repository the plan targets, or pass --head <sha> explicitly.`,
57
+ ].join('\n'),
58
+ ]);
59
+ }
60
+ return res.stdout;
61
+ }
62
+ /** Find the canonical (latest) plan on an issue, or `null` when none exists. */
63
+ function fetchLatestPlan(issue, repo) {
64
+ const result = (0, gh_1.tryFetchComments)(issue, repo);
65
+ if (!result.ok)
66
+ (0, gh_1.fail)([result.error]);
67
+ const bodies = result.comments.map((c) => (typeof c?.body === 'string' ? c.body : ''));
68
+ const latest = (0, plan_artifact_1.findLatestPlan)(bodies);
69
+ if (latest === null)
70
+ return null;
71
+ const comment = result.comments[latest.index];
72
+ return {
73
+ artifact: latest.artifact,
74
+ url: (0, gh_1.asString)(comment?.url),
75
+ createdAt: (0, gh_1.asString)(comment?.createdAt),
76
+ author: (0, gh_1.asString)(comment?.author?.login),
77
+ authorAssociation: (0, gh_1.asString)(comment?.authorAssociation),
78
+ };
79
+ }
80
+ /** `plan post` — validate a markdown file, stamp it with head=, comment it onto the issue. */
81
+ function registerPostSubcommand(cmd) {
82
+ cmd
83
+ .command('post')
84
+ .description('Post a plan:v1 artifact comment (validates sections first; supersedes = append)')
85
+ .requiredOption('--issue <number>', 'GitHub issue number')
86
+ .requiredOption('--file <path>', 'Markdown file with the five required sections')
87
+ .option('--head <sha>', 'Override the head= stamp (defaults to current HEAD)')
88
+ .option('--repo <owner/name>', 'Target repository (defaults to the current one)')
89
+ .option('--dry-run', 'Print the comment body without posting it')
90
+ .option('--json', 'Output the result as JSON')
91
+ .action((options) => {
92
+ (0, gh_1.requireIssueTarget)(options);
93
+ const markdown = readPlanFile(options.file);
94
+ const sectionErrors = (0, plan_artifact_1.validateArtifactBody)(markdown);
95
+ if (sectionErrors.length > 0) {
96
+ (0, gh_1.fail)([
97
+ [
98
+ `Plan file '${options.file}' is not a postable plan:v1 artifact.`,
99
+ 'Fix: give it all five sections — ' +
100
+ plan_artifact_1.PLAN_SECTIONS.map((s) => `## ${s}`).join(', ') +
101
+ ' — as documented in docs/reference/plan-artifact.md.',
102
+ ].join('\n'),
103
+ ...sectionErrors,
104
+ ]);
105
+ }
106
+ const head = resolveHead(options.head);
107
+ if (!(0, plan_artifact_1.isHeadSha)(head)) {
108
+ (0, gh_1.fail)([
109
+ `Invalid head '${(0, gh_1.snippet)(head, PATH_SNIPPET_LENGTH)}' — expected 7-40 lowercase hex characters, as printed by 'git rev-parse --short HEAD' (e.g. abc1234).\nFix: a plan posted with a malformed head= can never be read back — get and validate would silently ignore it.`,
110
+ ]);
111
+ }
112
+ const body = (0, plan_artifact_1.buildPlanComment)(head, markdown);
113
+ if (body.length > plan_artifact_1.MAX_ARTIFACT_BODY_LENGTH) {
114
+ (0, gh_1.fail)([
115
+ [
116
+ `Plan is ${body.length} characters — GitHub rejects an issue comment over ${plan_artifact_1.MAX_ARTIFACT_BODY_LENGTH}.`,
117
+ `Fix: trim the plan; an artifact is a plan, not a report — details belong in linked documents.`,
118
+ ].join('\n'),
119
+ ]);
120
+ }
121
+ if (options.dryRun) {
122
+ (0, gh_1.printDryRun)(body, options.json, { head });
123
+ return;
124
+ }
125
+ (0, gh_1.postIssueComment)({
126
+ issue: options.issue,
127
+ repo: options.repo,
128
+ body,
129
+ noun: 'plan',
130
+ action: `Failed to post the plan artifact to issue #${options.issue}`,
131
+ json: options.json,
132
+ jsonExtras: { head },
133
+ successLine: (url) => `✅ plan:v1 head=${head} → ${url}`,
134
+ });
135
+ });
136
+ }
137
+ /**
138
+ * Whether `git cat-file -e HEAD:<path>` says the path exists at HEAD, or why git could
139
+ * not answer. A path that failed the {@link isSafeArg} guard never reaches git: marker
140
+ * values are network-reachable, and a `-`-prefixed or spaced value would be read as a
141
+ * flag or split into arguments.
142
+ */
143
+ function fileExistsAtHead(path) {
144
+ if (!(0, gh_1.isSafeArg)(path)) {
145
+ return {
146
+ ok: false,
147
+ error: `'${(0, gh_1.snippet)(path, PATH_SNIPPET_LENGTH)}' is not a usable path (flag-like, spaced, or control characters)`,
148
+ };
149
+ }
150
+ const res = (0, gh_1.exec)('git', ['cat-file', '-e', `HEAD:${path}`]);
151
+ if (res.ok)
152
+ return { ok: true, exists: true };
153
+ if (res.error.status === GIT_NO_SUCH_OBJECT)
154
+ return { ok: true, exists: false };
155
+ return { ok: false, error: (0, gh_1.gitFailure)(res.error) };
156
+ }
157
+ /** Commits between the artifact's `head=` and the local HEAD, or why git could not answer. */
158
+ function headDistance(head) {
159
+ if (!(0, gh_1.isSafeArg)(head)) {
160
+ return { ok: false, error: `head='${(0, gh_1.snippet)(head, PATH_SNIPPET_LENGTH)}' is not a usable sha` };
161
+ }
162
+ const res = (0, gh_1.exec)('git', ['rev-list', '--count', `${head}..HEAD`]);
163
+ if (!res.ok) {
164
+ return { ok: false, error: (0, gh_1.gitFailure)(res.error) };
165
+ }
166
+ const count = Number(res.stdout);
167
+ // A count line that is not a number means git answered something we did not ask —
168
+ // report it rather than letting NaN silently read as "distance 0".
169
+ if (!Number.isInteger(count) || count < 0) {
170
+ return { ok: false, error: `git printed a non-numeric count: ${(0, gh_1.snippet)(res.stdout)}` };
171
+ }
172
+ return { ok: true, count };
173
+ }
174
+ /** Strip terminal-control characters — comment bodies are network-reachable. */
175
+ // biome-ignore lint/suspicious/noControlCharactersInRegex: matching (and stripping) control characters is exactly this regex's job
176
+ const CONTROL_CHARS_RE = /[\u0000-\u0008\u000b-\u001f\u007f\u009b]/g;
177
+ /**
178
+ * The deterministic per-artifact checks: sections, predicted-file existence at HEAD,
179
+ * head-distance, and the risk-floor scan. Pure assembly — every probe failure degrades
180
+ * to a reason naming the cause, never a crash.
181
+ */
182
+ function artifactReasons(artifact) {
183
+ const reasons = [];
184
+ for (const error of (0, plan_artifact_1.validateArtifactBody)(artifact.markdown)) {
185
+ reasons.push({ check: 'sections', severity: 'error', message: error });
186
+ }
187
+ if (artifact.predictedFiles.length === 0) {
188
+ reasons.push({
189
+ check: 'sections',
190
+ severity: 'warn',
191
+ message: "Predicted Files section produced no paths — expected one '- `path`' bullet per file.",
192
+ });
193
+ }
194
+ for (const path of artifact.predictedFiles) {
195
+ const exists = fileExistsAtHead(path);
196
+ if (!exists.ok) {
197
+ reasons.push({
198
+ check: 'git',
199
+ severity: 'error',
200
+ message: `Cannot verify '${path}' at HEAD: ${exists.error} — run from inside the repository the plan targets.`,
201
+ });
202
+ }
203
+ else if (!exists.exists) {
204
+ reasons.push({
205
+ check: 'missing-file',
206
+ severity: 'error',
207
+ message: `Predicted file '${path}' does not exist at current HEAD.`,
208
+ });
209
+ }
210
+ }
211
+ const distance = headDistance(artifact.head);
212
+ if (!distance.ok) {
213
+ reasons.push({
214
+ check: 'git',
215
+ severity: 'warn',
216
+ message: `Cannot measure head-distance: ${distance.error} — run from inside the repository the plan targets.`,
217
+ });
218
+ }
219
+ else if (distance.count > 0) {
220
+ reasons.push({
221
+ check: 'head-distance',
222
+ severity: 'info',
223
+ message: `${distance.count} commit(s) on HEAD since the plan's head=${artifact.head} — re-check Predicted Files against what changed.`,
224
+ });
225
+ }
226
+ for (const hit of (0, plan_artifact_1.scanRiskFloor)(artifact.predictedFiles)) {
227
+ reasons.push({
228
+ check: 'risk-floor',
229
+ severity: 'info',
230
+ message: `Predicted file '${hit.path}' touches '${hit.pattern}' — elevated-risk surface; review tier should not go below the risk floor.`,
231
+ });
232
+ }
233
+ return reasons;
234
+ }
235
+ /** `plan get` — print the latest artifact; exit 1 distinguishably when none exists. */
236
+ function registerGetSubcommand(cmd) {
237
+ cmd
238
+ .command('get')
239
+ .description('Print the latest plan:v1 artifact on an issue (read-only)')
240
+ .requiredOption('--issue <number>', 'GitHub issue number')
241
+ .option('--repo <owner/name>', 'Target repository (defaults to the current one)')
242
+ .option('--json', 'Output the parsed artifact as JSON')
243
+ .action((options) => {
244
+ (0, gh_1.requireIssueTarget)(options);
245
+ const found = fetchLatestPlan(options.issue, options.repo);
246
+ if (found === null) {
247
+ // Distinguishable "no plan" exit (#462 AC2): stderr message + exit code 1, so a
248
+ // caller can fall back to full planning without parsing output text.
249
+ console.error(`No plan:v1 artifact on issue #${options.issue}.`);
250
+ console.error(`Fix: post one — ai-dossier plan post --issue ${options.issue} --file <md>`);
251
+ process.exit(1);
252
+ }
253
+ const { artifact, url, createdAt, author } = found;
254
+ if (options.json) {
255
+ const sections = {};
256
+ for (const section of plan_artifact_1.PLAN_SECTIONS) {
257
+ if (section === 'Predicted Files')
258
+ continue;
259
+ sections[SECTION_JSON_KEYS[section]] = artifact.sections[section];
260
+ }
261
+ console.log(JSON.stringify({
262
+ head: artifact.head,
263
+ ...sections,
264
+ predicted_files: artifact.predictedFiles,
265
+ url,
266
+ created_at: createdAt,
267
+ author,
268
+ }, null, 2));
269
+ return;
270
+ }
271
+ // The body is network-reachable; on a TTY, strip control sequences so a forged
272
+ // comment cannot rewrite the terminal. Piped output stays byte-exact.
273
+ const safe = process.stdout.isTTY ? artifact.raw.replace(CONTROL_CHARS_RE, '') : artifact.raw;
274
+ process.stdout.write(safe);
275
+ });
276
+ }
277
+ /** `plan validate` — deterministic checks and a `{valid, reasons[]}` JSON verdict. */
278
+ function registerValidateSubcommand(cmd) {
279
+ cmd
280
+ .command('validate')
281
+ .description('Deterministically validate the latest plan artifact (JSON verdict, no model call)')
282
+ .requiredOption('--issue <number>', 'GitHub issue number')
283
+ .option('--repo <owner/name>', 'Target repository (defaults to the current one)')
284
+ .action((options) => {
285
+ (0, gh_1.requireIssueTarget)(options);
286
+ const reasons = [];
287
+ const found = fetchLatestPlan(options.issue, options.repo);
288
+ if (found === null) {
289
+ reasons.push({
290
+ check: 'artifact',
291
+ severity: 'error',
292
+ message: `No plan:v1 artifact on issue #${options.issue} — post one with 'ai-dossier plan post'.`,
293
+ });
294
+ }
295
+ else {
296
+ reasons.push(...artifactReasons(found.artifact));
297
+ // Authorship signal, not a gate: selection is last-plan-wins by design (the
298
+ // runstate:v1 convention), but a canonical plan from an account without write
299
+ // access deserves a flag a consumer can act on.
300
+ if (!WRITE_ACCESS_ASSOCIATIONS.has(found.authorAssociation)) {
301
+ reasons.push({
302
+ check: 'artifact',
303
+ severity: 'warn',
304
+ message: `Latest plan was posted by '${found.author || 'unknown'}' (association ${found.authorAssociation || 'UNKNOWN'}) — an account without write access. Verify authorship before trusting this plan.`,
305
+ });
306
+ }
307
+ }
308
+ const valid = reasons.every((r) => r.severity !== 'error');
309
+ console.log(JSON.stringify({ valid, reasons }, null, 2));
310
+ if (!valid)
311
+ process.exit(1);
312
+ });
313
+ }
314
+ /** Registers the `plan` command tree (post, get, validate). */
315
+ function registerPlanCommand(program) {
316
+ const planCmd = program
317
+ .command('plan')
318
+ .description('Post, read, and validate plan:v1 artifacts on a GitHub issue');
319
+ registerPostSubcommand(planCmd);
320
+ registerGetSubcommand(planCmd);
321
+ registerValidateSubcommand(planCmd);
322
+ }
323
+ //# sourceMappingURL=plan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan.js","sourceRoot":"","sources":["../../src/commands/plan.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;AA4YH,kDAQC;AAlZD,sDAAyB;AAEzB,8BAWe;AACf,oDAU0B;AA+B1B;;;;GAIG;AACH,MAAM,iBAAiB,GAA4D;IACjF,OAAO,EAAE,SAAS;IAClB,qBAAqB,EAAE,qBAAqB;IAC5C,QAAQ,EAAE,UAAU;IACpB,YAAY,EAAE,YAAY;CAC3B,CAAC;AAEF,uFAAuF;AACvF,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAE7B,mFAAmF;AACnF,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAa/B,kFAAkF;AAClF,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,CAAC,CAAC,CAAC;AAEtF,yEAAyE;AACzE,SAAS,YAAY,CAAC,IAAY;IAChC,IAAI,CAAC;QACH,OAAO,iBAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,CAAC,GAAG,GAA4B,CAAC;QACvC,IAAA,SAAI,EAAC;YACH,6BAA6B,IAAI,MAAM,CAAC,CAAC,IAAI,IAAI,OAAO,MAAM,IAAA,YAAO,EAAC,CAAC,CAAC,OAAO,EAAE,mBAAmB,CAAC,GAAG;SACzG,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAED,sFAAsF;AACtF,SAAS,WAAW,CAAC,QAAiB;IACpC,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,QAAQ,CAAC;IAC5C,MAAM,GAAG,GAAG,IAAA,SAAI,EAAC,KAAK,EAAE,CAAC,W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,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QACzD,IAAI,CAAC,KAAK;YAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;AACP,CAAC;AAED,+DAA+D;AAC/D,SAAgB,mBAAmB,CAAC,OAAgB;IAClD,MAAM,OAAO,GAAG,OAAO;SACpB,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,8DAA8D,CAAC,CAAC;IAE/E,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAChC,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAC/B,0BAA0B,CAAC,OAAO,CAAC,CAAC;AACtC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"runstate.d.ts","sourceRoot":"","sources":["../../src/commands/runstate.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAi/BzC,+EAA+E;AAC/E,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAU9D"}
1
+ {"version":3,"file":"runstate.d.ts","sourceRoot":"","sources":["../../src/commands/runstate.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuuBzC,+EAA+E;AAC/E,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAU9D"}