project-athena 0.4.0 → 0.5.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 (51) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +10 -0
  3. package/dist/{activity-BKW7G4I5.js → activity-XCHKBZTG.js} +4 -4
  4. package/dist/{agents-DFSNEOP5.js → agents-HUJ4JXIB.js} +4 -4
  5. package/dist/{ai-ASL4FFQ7.js → ai-LGTLQKL4.js} +3 -3
  6. package/dist/{analyze-ZY3MXBOI.js → analyze-AP4XJT7D.js} +7 -7
  7. package/dist/{chunk-ZB7LC6FP.js → chunk-3KFOI2X4.js} +2 -2
  8. package/dist/{chunk-MPG3IEGB.js → chunk-44EGCEB2.js} +23 -14
  9. package/dist/{chunk-GGXPG6OE.js → chunk-4FETKOY3.js} +8 -7
  10. package/dist/chunk-4IIBVTBS.js +76 -0
  11. package/dist/{chunk-LEMPCNAY.js → chunk-56EXAGTM.js} +3 -3
  12. package/dist/{chunk-DZDI2HRT.js → chunk-6OSQMXUP.js} +5 -5
  13. package/dist/{chunk-OLPSEQS5.js → chunk-AKOI4VTD.js} +10 -1
  14. package/dist/{chunk-FVCDMQUQ.js → chunk-C25FDXOO.js} +133 -23
  15. package/dist/{chunk-7DZK6WSQ.js → chunk-DH5AGULY.js} +2 -2
  16. package/dist/{chunk-TDNZ2RYA.js → chunk-F65QINMR.js} +2 -2
  17. package/dist/{chunk-WVQC2EGO.js → chunk-GU3ZX2J7.js} +2 -2
  18. package/dist/{chunk-UAZLPNVC.js → chunk-GYQG4Q2N.js} +4 -4
  19. package/dist/chunk-IDODPGTX.js +595 -0
  20. package/dist/chunk-KJYSNZXS.js +934 -0
  21. package/dist/{chunk-3XSDI5WF.js → chunk-L2EHJCH4.js} +5 -5
  22. package/dist/{chunk-65TSRDQ3.js → chunk-P4TRQMES.js} +2 -2
  23. package/dist/{chunk-KHMBNT66.js → chunk-PZPMWCXS.js} +5 -5
  24. package/dist/{chunk-XDCKZ5TV.js → chunk-R5AX7VST.js} +2 -2
  25. package/dist/{chunk-QLW657NT.js → chunk-RQKGT2EK.js} +2 -2
  26. package/dist/{chunk-VSYBC3VY.js → chunk-UMWX4UTK.js} +2 -2
  27. package/dist/{chunk-RXNRMIZP.js → chunk-WUIC65QO.js} +2 -2
  28. package/dist/{chunk-JCGDR4UV.js → chunk-WWQ5NKEC.js} +3 -1
  29. package/dist/{chunk-RVTNSNGK.js → chunk-X7EYOAEX.js} +2 -2
  30. package/dist/chunk-Y6SDMZET.js +278 -0
  31. package/dist/{clean-MDBYH62P.js → clean-LQOG56AM.js} +2 -2
  32. package/dist/cli.js +2 -2
  33. package/dist/{context-PLPCAPCO.js → context-G5YHY3L2.js} +8 -8
  34. package/dist/{doctor-BX677KRE.js → doctor-L34QJ7WR.js} +8 -8
  35. package/dist/{event-TNT6CQZR.js → event-6YW6TGFI.js} +3 -3
  36. package/dist/{git-hook-YZNZGAAP.js → git-hook-Y7Y262F7.js} +2 -2
  37. package/dist/{init-WQCAOJ2R.js → init-427QR5AS.js} +7 -7
  38. package/dist/{mcp-U7EPH43L.js → mcp-DWNWRGJW.js} +51 -14
  39. package/dist/{memory-VSVNLEJC.js → memory-XBZCYQLW.js} +3 -3
  40. package/dist/{open-UJZRYF4E.js → open-LJMOB6U2.js} +33 -31
  41. package/dist/{program-CWJNGCTZ.js → program-DCP526LU.js} +46 -32
  42. package/dist/{review-OOKXSYMP.js → review-VEJBPACX.js} +10 -9
  43. package/dist/{rules-4FXJUCXB.js → rules-M4DLLXBL.js} +4 -4
  44. package/dist/scan-JVKCVHPD.js +939 -0
  45. package/dist/{security-LME3XFL3.js → security-JTJN3E7K.js} +13 -11
  46. package/dist/{staged-check-X24C3YRD.js → staged-check-PQSLGQBW.js} +11 -11
  47. package/dist/{status-RR57ZNGI.js → status-PO27BSOZ.js} +4 -4
  48. package/dist/{sync-KFJANRXF.js → sync-GVO2VHPI.js} +10 -10
  49. package/dist/{watch-CY7QHIYN.js → watch-TEHFO47V.js} +10 -10
  50. package/package.json +3 -1
  51. package/dist/chunk-SJ4DQFIJ.js +0 -379
@@ -1,15 +1,25 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  AnalysisScheduler
4
- } from "./chunk-RVTNSNGK.js";
4
+ } from "./chunk-X7EYOAEX.js";
5
5
  import {
6
6
  getGraph,
7
7
  getRelevantContext,
8
8
  graphSummary
9
- } from "./chunk-UAZLPNVC.js";
9
+ } from "./chunk-GYQG4Q2N.js";
10
+ import {
11
+ evaluateFindings
12
+ } from "./chunk-KJYSNZXS.js";
13
+ import {
14
+ loadFindings
15
+ } from "./chunk-IDODPGTX.js";
16
+ import "./chunk-UMWX4UTK.js";
17
+ import {
18
+ CATEGORIES
19
+ } from "./chunk-Y6SDMZET.js";
10
20
  import {
11
21
  buildStatus
12
- } from "./chunk-ZB7LC6FP.js";
22
+ } from "./chunk-3KFOI2X4.js";
13
23
  import {
14
24
  MEMORY_KINDS,
15
25
  MEMORY_STATUSES,
@@ -17,7 +27,7 @@ import {
17
27
  formatContext,
18
28
  listMemory,
19
29
  recall
20
- } from "./chunk-TDNZ2RYA.js";
30
+ } from "./chunk-F65QINMR.js";
21
31
  import {
22
32
  listRules,
23
33
  parseRules
@@ -28,24 +38,24 @@ import {
28
38
  import "./chunk-KBO7XRBW.js";
29
39
  import {
30
40
  applySync
31
- } from "./chunk-KHMBNT66.js";
32
- import "./chunk-WVQC2EGO.js";
41
+ } from "./chunk-PZPMWCXS.js";
42
+ import "./chunk-GU3ZX2J7.js";
33
43
  import "./chunk-GR4DL2VM.js";
34
- import "./chunk-GGXPG6OE.js";
35
- import {
36
- loadScan
37
- } from "./chunk-MPG3IEGB.js";
38
- import "./chunk-ELKFRTZT.js";
44
+ import "./chunk-4FETKOY3.js";
39
45
  import {
40
46
  ATHENA_VERSION
41
47
  } from "./chunk-2R6PXY6Z.js";
48
+ import {
49
+ loadScan
50
+ } from "./chunk-44EGCEB2.js";
42
51
  import "./chunk-PVCIGUIT.js";
43
- import "./chunk-OLPSEQS5.js";
52
+ import "./chunk-ELKFRTZT.js";
53
+ import "./chunk-AKOI4VTD.js";
44
54
  import "./chunk-SVTEJYMS.js";
45
55
  import "./chunk-QCC4VJUH.js";
46
56
  import {
47
57
  redact
48
- } from "./chunk-JCGDR4UV.js";
58
+ } from "./chunk-WWQ5NKEC.js";
49
59
  import "./chunk-YRIS7ZS6.js";
50
60
  import "./chunk-GHFRQAYT.js";
51
61
  import "./chunk-INT3IGMQ.js";
@@ -185,6 +195,33 @@ _Last dependency scan: ${scan.scannedAt}._` : "\n\n_No dependency audit has been
185
195
  return textResult(await docText(root, "security.md", suffix));
186
196
  }
187
197
  );
198
+ server.registerTool(
199
+ "findings",
200
+ {
201
+ title: "Security findings",
202
+ description: "Summary of the last `athena scan`: gate verdict, ratings, coverage gaps and active findings (rule, severity, confidence, location \u2014 never secret values). Read-only; it does not run a scan. Heuristic findings are marked potential: verify before acting.",
203
+ inputSchema: { category: z.enum(CATEGORIES).optional(), limit: z.number().int().min(1).max(100).optional() }
204
+ },
205
+ async ({ category, limit }) => {
206
+ const result = await loadFindings(root);
207
+ if (!result) return textResult("No scan results yet. Ask the developer to run `athena scan` (Athena does not scan from MCP).");
208
+ const ev = await evaluateFindings(root, result);
209
+ const active = ev.findings.filter((f) => ev.statuses[f.fingerprint]?.active && (!category || f.category === category));
210
+ const max = limit ?? 30;
211
+ const where = (f) => f.location ? ` ${f.location.file}${f.location.startLine ? `:${f.location.startLine}` : ""}` : f.package ? ` ${f.package.name}${f.package.version ? `@${f.package.version}` : ""}` : "";
212
+ const gaps = result.coverage.filter((c) => c.status !== "ok");
213
+ const lines = [
214
+ `Last scan: ${result.scannedAt} (scope ${result.scope.mode}${result.scope.base ? ` vs ${result.scope.base}` : ""}).`,
215
+ `Gate: ${ev.gate.passed ? "passed" : `failed \u2014 ${ev.gate.reasons.join("; ")}`}`,
216
+ `Ratings: ${ev.ratings.map((r) => `${r.category} ${r.rating ?? "not scanned"}`).join(", ")}`,
217
+ ...gaps.length ? [`Not fully covered: ${gaps.map((c) => `${c.engine} (${c.category}) ${c.status}`).join(", ")}`] : [],
218
+ "",
219
+ `Active findings${category ? ` (${category})` : ""}: ${active.length}${active.length > max ? ` (first ${max})` : ""}`,
220
+ ...active.slice(0, max).map((f) => `- [${f.severity}/${f.confidence}] ${f.potential ? "Potential: " : ""}${f.title} \u2014${where(f)} (${f.ruleId}, ${f.label}, fp ${f.fingerprint.slice(0, 12)})`)
221
+ ];
222
+ return textResult(untrustedDocument(".athena/findings.json", lines.join("\n")));
223
+ }
224
+ );
188
225
  server.registerTool(
189
226
  "get_project_rules",
190
227
  { title: "Project rules", description: "Developer-defined rules this project expects agents to follow. Disabled rules are excluded.", inputSchema: {} },
@@ -390,4 +427,4 @@ async function mcpCommand(opts) {
390
427
  export {
391
428
  mcpCommand
392
429
  };
393
- //# sourceMappingURL=mcp-U7EPH43L.js.map
430
+ //# sourceMappingURL=mcp-DWNWRGJW.js.map
@@ -12,7 +12,7 @@ import {
12
12
  searchMemory,
13
13
  supersedeMemory,
14
14
  updateMemory
15
- } from "./chunk-TDNZ2RYA.js";
15
+ } from "./chunk-F65QINMR.js";
16
16
  import "./chunk-3IS2X2Z7.js";
17
17
  import {
18
18
  c,
@@ -32,7 +32,7 @@ import {
32
32
  import "./chunk-KBO7XRBW.js";
33
33
  import "./chunk-SVTEJYMS.js";
34
34
  import "./chunk-QCC4VJUH.js";
35
- import "./chunk-JCGDR4UV.js";
35
+ import "./chunk-WWQ5NKEC.js";
36
36
  import "./chunk-673EPYYH.js";
37
37
  import "./chunk-FQEGEVLY.js";
38
38
  import "./chunk-2DY4PUR4.js";
@@ -390,4 +390,4 @@ export {
390
390
  memorySummary,
391
391
  memorySupersedeCommand
392
392
  };
393
- //# sourceMappingURL=memory-VSVNLEJC.js.map
393
+ //# sourceMappingURL=memory-XBZCYQLW.js.map
@@ -1,4 +1,9 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ INSTANCE_FILE,
4
+ findRunningInstance,
5
+ runDoctor
6
+ } from "./chunk-L2EHJCH4.js";
2
7
  import {
3
8
  contentHash,
4
9
  docAtRevision,
@@ -11,41 +16,39 @@ import {
11
16
  rulesUpdate,
12
17
  saveDoc,
13
18
  searchDocs
14
- } from "./chunk-LEMPCNAY.js";
19
+ } from "./chunk-56EXAGTM.js";
15
20
  import {
16
21
  configureAgents,
17
22
  listAgents,
18
23
  removeAgents
19
- } from "./chunk-QLW657NT.js";
24
+ } from "./chunk-RQKGT2EK.js";
20
25
  import {
21
26
  watchProject
22
- } from "./chunk-DZDI2HRT.js";
27
+ } from "./chunk-6OSQMXUP.js";
23
28
  import {
24
29
  AnalysisScheduler
25
- } from "./chunk-RVTNSNGK.js";
30
+ } from "./chunk-X7EYOAEX.js";
26
31
  import {
27
32
  getRelevantContext,
28
33
  graphSummary,
29
34
  refreshGraph
30
- } from "./chunk-UAZLPNVC.js";
35
+ } from "./chunk-GYQG4Q2N.js";
31
36
  import {
32
- runSecurityScan
33
- } from "./chunk-SJ4DQFIJ.js";
37
+ aiStatus
38
+ } from "./chunk-WUIC65QO.js";
39
+ import {
40
+ runSecurityScan,
41
+ saveScan
42
+ } from "./chunk-4IIBVTBS.js";
43
+ import "./chunk-IDODPGTX.js";
44
+ import "./chunk-UMWX4UTK.js";
34
45
  import {
35
46
  reviewChanges
36
- } from "./chunk-FVCDMQUQ.js";
47
+ } from "./chunk-C25FDXOO.js";
48
+ import "./chunk-Y6SDMZET.js";
37
49
  import {
38
50
  buildStatus
39
- } from "./chunk-ZB7LC6FP.js";
40
- import {
41
- INSTANCE_FILE,
42
- findRunningInstance,
43
- runDoctor
44
- } from "./chunk-3XSDI5WF.js";
45
- import {
46
- aiStatus
47
- } from "./chunk-RXNRMIZP.js";
48
- import "./chunk-VSYBC3VY.js";
51
+ } from "./chunk-3KFOI2X4.js";
49
52
  import {
50
53
  ACTIVITY_FILE,
51
54
  activityFile,
@@ -53,7 +56,7 @@ import {
53
56
  readRecentEvents,
54
57
  rotatedActivityFile,
55
58
  summarizeSessions
56
- } from "./chunk-65TSRDQ3.js";
59
+ } from "./chunk-P4TRQMES.js";
57
60
  import {
58
61
  printHeader
59
62
  } from "./chunk-SHKXELUX.js";
@@ -70,7 +73,7 @@ import {
70
73
  memoryDir,
71
74
  supersedeMemory,
72
75
  updateMemory
73
- } from "./chunk-TDNZ2RYA.js";
76
+ } from "./chunk-F65QINMR.js";
74
77
  import "./chunk-3IS2X2Z7.js";
75
78
  import {
76
79
  c,
@@ -90,28 +93,27 @@ import {
90
93
  applySync,
91
94
  ignorePlan,
92
95
  staleForCheck
93
- } from "./chunk-KHMBNT66.js";
96
+ } from "./chunk-PZPMWCXS.js";
94
97
  import {
95
98
  projectSession,
96
99
  releaseProjectSession
97
- } from "./chunk-WVQC2EGO.js";
100
+ } from "./chunk-GU3ZX2J7.js";
98
101
  import "./chunk-GR4DL2VM.js";
99
102
  import {
100
103
  runPipeline
101
- } from "./chunk-GGXPG6OE.js";
102
- import {
103
- SCAN_FILE,
104
- saveScan
105
- } from "./chunk-MPG3IEGB.js";
106
- import "./chunk-ELKFRTZT.js";
104
+ } from "./chunk-4FETKOY3.js";
107
105
  import {
108
106
  ATHENA_VERSION
109
107
  } from "./chunk-2R6PXY6Z.js";
108
+ import {
109
+ SCAN_FILE
110
+ } from "./chunk-44EGCEB2.js";
110
111
  import "./chunk-PVCIGUIT.js";
111
- import "./chunk-OLPSEQS5.js";
112
+ import "./chunk-ELKFRTZT.js";
113
+ import "./chunk-AKOI4VTD.js";
112
114
  import "./chunk-SVTEJYMS.js";
113
115
  import "./chunk-QCC4VJUH.js";
114
- import "./chunk-JCGDR4UV.js";
116
+ import "./chunk-WWQ5NKEC.js";
115
117
  import "./chunk-YRIS7ZS6.js";
116
118
  import "./chunk-GHFRQAYT.js";
117
119
  import "./chunk-INT3IGMQ.js";
@@ -1447,4 +1449,4 @@ export {
1447
1449
  openBrowser,
1448
1450
  openCommand
1449
1451
  };
1450
- //# sourceMappingURL=open-UJZRYF4E.js.map
1452
+ //# sourceMappingURL=open-LJMOB6U2.js.map
@@ -58,32 +58,46 @@ function buildProgram() {
58
58
  program.command("init").description("Analyze the project and create .athena/ knowledge").option("--agents <list>", 'Agents to configure: comma-separated ids (claude-code, cursor, codex, copilot, gemini-cli, antigravity, windsurf, cline, agents-md), "all" or "none". Default: detected agents + AGENTS.md').option("--no-agents", "Do not configure any agent integration").option("--dry-run", "Analyze and show what would be written, without writing").action(
59
59
  run(async (cmdOpts, cmd) => {
60
60
  const g = globals(cmd);
61
- await (await import("./init-WQCAOJ2R.js")).initCommand({ ...g, agents: typeof cmdOpts.agents === "string" ? cmdOpts.agents : void 0, noAgents: cmdOpts.agents === false, dryRun: cmdOpts.dryRun, signal: controller.signal });
61
+ await (await import("./init-427QR5AS.js")).initCommand({ ...g, agents: typeof cmdOpts.agents === "string" ? cmdOpts.agents : void 0, noAgents: cmdOpts.agents === false, dryRun: cmdOpts.dryRun, signal: controller.signal });
62
62
  })
63
63
  );
64
- program.command("analyze").description("Re-analyze the project and refresh generated knowledge (developer edits are preserved)").option("--force", "Regenerate sections even if they were edited by hand").option("--agents <list>", "Reconfigure these agent integrations").action(run(async (o, cmd) => (await import("./analyze-ZY3MXBOI.js")).analyzeCommand({ ...globals(cmd), ...o, signal: controller.signal })));
65
- program.command("sync").description("Review and apply knowledge updates for changes since the last analysis").option("-y, --yes", "Apply without asking").option("--dry-run", "Show the plan without writing").option("--check", "Exit with code 1 if knowledge is out of date (for CI/hooks)").option("--staged", "With --check: check the staged knowledge against the staged code (the index), ignoring untracked and unstaged changes").option("--diff", "Print full diffs of proposed document changes").option("--force", "Also regenerate sections that were edited by hand").action(run(async (o, cmd) => (await import("./sync-KFJANRXF.js")).syncCommand({ ...globals(cmd), ...o, signal: controller.signal })));
66
- program.command("watch").description("Watch the project and propose knowledge updates as files change").option("--auto-apply", "Apply updates automatically instead of proposing them").option("--debounce <ms>", "Quiet period before checking changes (default 1500)").action(run(async (o, cmd) => (await import("./watch-CY7QHIYN.js")).watchCommand({ ...globals(cmd), ...o, signal: controller.signal })));
67
- program.command("context <task>").description("Show which knowledge an agent should read for a task (deterministic)").option("--full", "Print the full context an agent would receive").option("--max-chars <n>", "Character budget for selected sections").action(run(async (task, o, cmd) => (await import("./context-PLPCAPCO.js")).contextCommand(task, { ...globals(cmd), ...o, signal: controller.signal })));
68
- program.command("graph").description("Inspect the project graph (packages, files, routes, entities and their relationships)").option("--build", "Rebuild the graph from the current code").option("--node <id>", "Show one node and its relationships").option("--kind <kind>", "Filter by node kind (package, file, route, entity, framework, command, infra)").option("--search <term>", "Filter nodes by name or path").action(run(async (o, cmd) => (await import("./context-PLPCAPCO.js")).graphCommand({ ...globals(cmd), ...o, signal: controller.signal })));
69
- program.command("architecture").description("Summarize the project graph").action(run(async (_o, cmd) => (await import("./context-PLPCAPCO.js")).architectureCommand({ ...globals(cmd), signal: controller.signal })));
70
- program.command("mcp").description("Serve Athena project intelligence over MCP (stdio) for AI agents").option("--allow-write", "Permit the update_knowledge tool to apply changes (read-only by default)").option("--no-memory-write", "Disable the remember tool (agents cannot record unreviewed memories)").action(run(async (o, cmd) => (await import("./mcp-U7EPH43L.js")).mcpCommand({ ...globals(cmd), ...o, signal: controller.signal })));
64
+ program.command("analyze").description("Re-analyze the project and refresh generated knowledge (developer edits are preserved)").option("--force", "Regenerate sections even if they were edited by hand").option("--agents <list>", "Reconfigure these agent integrations").action(run(async (o, cmd) => (await import("./analyze-AP4XJT7D.js")).analyzeCommand({ ...globals(cmd), ...o, signal: controller.signal })));
65
+ program.command("sync").description("Review and apply knowledge updates for changes since the last analysis").option("-y, --yes", "Apply without asking").option("--dry-run", "Show the plan without writing").option("--check", "Exit with code 1 if knowledge is out of date (for CI/hooks)").option("--staged", "With --check: check the staged knowledge against the staged code (the index), ignoring untracked and unstaged changes").option("--diff", "Print full diffs of proposed document changes").option("--force", "Also regenerate sections that were edited by hand").action(run(async (o, cmd) => (await import("./sync-GVO2VHPI.js")).syncCommand({ ...globals(cmd), ...o, signal: controller.signal })));
66
+ program.command("watch").description("Watch the project and propose knowledge updates as files change").option("--auto-apply", "Apply updates automatically instead of proposing them").option("--debounce <ms>", "Quiet period before checking changes (default 1500)").action(run(async (o, cmd) => (await import("./watch-TEHFO47V.js")).watchCommand({ ...globals(cmd), ...o, signal: controller.signal })));
67
+ program.command("context <task>").description("Show which knowledge an agent should read for a task (deterministic)").option("--full", "Print the full context an agent would receive").option("--max-chars <n>", "Character budget for selected sections").action(run(async (task, o, cmd) => (await import("./context-G5YHY3L2.js")).contextCommand(task, { ...globals(cmd), ...o, signal: controller.signal })));
68
+ program.command("graph").description("Inspect the project graph (packages, files, routes, entities and their relationships)").option("--build", "Rebuild the graph from the current code").option("--node <id>", "Show one node and its relationships").option("--kind <kind>", "Filter by node kind (package, file, route, entity, framework, command, infra)").option("--search <term>", "Filter nodes by name or path").action(run(async (o, cmd) => (await import("./context-G5YHY3L2.js")).graphCommand({ ...globals(cmd), ...o, signal: controller.signal })));
69
+ program.command("architecture").description("Summarize the project graph").action(run(async (_o, cmd) => (await import("./context-G5YHY3L2.js")).architectureCommand({ ...globals(cmd), signal: controller.signal })));
70
+ program.command("mcp").description("Serve Athena project intelligence over MCP (stdio) for AI agents").option("--allow-write", "Permit the update_knowledge tool to apply changes (read-only by default)").option("--no-memory-write", "Disable the remember tool (agents cannot record unreviewed memories)").action(run(async (o, cmd) => (await import("./mcp-DWNWRGJW.js")).mcpCommand({ ...globals(cmd), ...o, signal: controller.signal })));
71
71
  const ai = program.command("ai").description("Optional AI provider integration (never required)");
72
- ai.command("status", { isDefault: true }).description("Show configured and available AI providers").action(run(async (_o, cmd) => (await import("./ai-ASL4FFQ7.js")).aiStatusCommand(globals(cmd))));
73
- ai.command("enrich").description("Ask the configured provider for INFERRED suggestions based on your knowledge documents").option("--docs <list>", "Documents to send (default: project,architecture,database,api)").option("--consent", "Consent to sending redacted knowledge to a remote provider for this run").option("--dry-run", "Show exactly what would be sent, and send nothing").action(run(async (o, cmd) => (await import("./ai-ASL4FFQ7.js")).aiEnrichCommand({ ...globals(cmd), ...o, signal: controller.signal })));
74
- program.command("security").description("Scan dependencies with the audit tools installed for this project, and report secret findings").option("--no-audit", "Skip dependency audits (report secrets only)").option("--fail-on <severity>", "Exit 1 when a finding at or above this severity exists (critical, high, moderate, low)").option("--last", "Show the last scan instead of running a new one").option("--unrated <policy>", 'With --fail-on: "fail" (default) also fails on findings the tool did not rate (pip-audit, govulncheck); "warn" only reports them', "fail").action(run(async (o, cmd) => (await import("./security-LME3XFL3.js")).securityCommand({ ...globals(cmd), noAudit: o.audit === false, failOn: o.failOn, unrated: o.unrated, last: o.last, signal: controller.signal })));
75
- program.command("review").description("Check the current diff for facts worth reviewing, and list the project rules and checklist").option("--base <ref>", "Compare against this Git ref instead of the working tree").option("--staged", "Review only what is staged for commit (used by the pre-commit hook)").option("--no-sync", "Skip the knowledge freshness check").option("--no-fail", "Always exit 0, even when blockers are found").action(run(async (o, cmd) => (await import("./review-OOKXSYMP.js")).reviewCommand({ ...globals(cmd), base: o.base, staged: o.staged, noSync: o.sync === false, noFail: o.fail === false, signal: controller.signal })));
76
- program.command("status").description("Show knowledge health and changes since the last analysis").action(run(async (_o, cmd) => (await import("./status-RR57ZNGI.js")).statusCommand({ ...globals(cmd), signal: controller.signal })));
77
- program.command("doctor").description("Check the Athena installation, project and integrations").action(run(async (_o, cmd) => (await import("./doctor-BX677KRE.js")).doctorCommand(globals(cmd))));
72
+ ai.command("status", { isDefault: true }).description("Show configured and available AI providers").action(run(async (_o, cmd) => (await import("./ai-LGTLQKL4.js")).aiStatusCommand(globals(cmd))));
73
+ ai.command("enrich").description("Ask the configured provider for INFERRED suggestions based on your knowledge documents").option("--docs <list>", "Documents to send (default: project,architecture,database,api)").option("--consent", "Consent to sending redacted knowledge to a remote provider for this run").option("--dry-run", "Show exactly what would be sent, and send nothing").action(run(async (o, cmd) => (await import("./ai-LGTLQKL4.js")).aiEnrichCommand({ ...globals(cmd), ...o, signal: controller.signal })));
74
+ program.command("security").description("Scan dependencies with the audit tools installed for this project, and report secret findings").option("--no-audit", "Skip dependency audits (report secrets only)").option("--fail-on <severity>", "Exit 1 when a finding at or above this severity exists (critical, high, moderate, low)").option("--last", "Show the last scan instead of running a new one").option("--unrated <policy>", 'With --fail-on: "fail" (default) also fails on findings the tool did not rate (pip-audit, govulncheck); "warn" only reports them', "fail").action(run(async (o, cmd) => (await import("./security-JTJN3E7K.js")).securityCommand({ ...globals(cmd), noAudit: o.audit === false, failOn: o.failOn, unrated: o.unrated, last: o.last, signal: controller.signal })));
75
+ const scanCmds = () => import("./scan-JVKCVHPD.js");
76
+ program.command("scan").description("Scan for secrets, vulnerable dependencies and review issues; apply the policy, baseline and triage; evaluate the quality gate").option("--only <scanners>", "Comma-separated: secrets, deps, review (default: secrets,deps; plus review when scanning a change)").option("--base <ref>", "Scan the changes since this ref (merge-base..HEAD, like a pull request)").option("--staged", "Scan what is staged for commit").option("--changed", "Scan working-tree changes").option("-f, --format <format>", "text, json, markdown, github or sarif").option("-o, --output <file>", "Write the report to a file").option("--fail-on <severity>", "Override the gate threshold: critical, high, medium, low, info").option("--min-confidence <level>", "Override the gate confidence: high, medium, low").option("--unrated <policy>", "Override how unrated findings affect the gate: fail or warn").option("--no-baseline", "Ignore .athena/baseline.json (every finding counts as new)").option("--policy-from <ref>", "Use the policy, baseline and triage committed at this ref, and report changes to them (CI)").option("--offline", "Do not contact the network (dependency audits are skipped and reported as skipped)").option("--no-fail", "Always exit 0, even when the gate fails").option("--list-rules", "List the rules Athena knows and exit").action(run(
77
+ async (o, cmd) => (await scanCmds()).scanCommand({ ...globals(cmd), ...o, noBaseline: o.baseline === false, noFail: o.fail === false, signal: controller.signal })
78
+ ));
79
+ program.command("explain <ruleId>").description("Explain a rule: what it detects, why it matters and what to do").action(run(async (ruleId, _o, cmd) => (await scanCmds()).explainCommand(ruleId, globals(cmd))));
80
+ const baseline = program.command("baseline").description("Record existing findings so only new ones fail the gate (.athena/baseline.json)");
81
+ baseline.command("show", { isDefault: true }).description("Summarize the baseline").action(run(async (_o, cmd) => (await scanCmds()).baselineShowCommand(globals(cmd))));
82
+ baseline.command("create").description("Scan the whole project and baseline every current finding").option("--reason <text>", "Why these findings are accepted for now").option("--last", "Use the last full scan instead of scanning again").option("--offline", "Do not contact the network").option("--force", "Add to an existing baseline").action(run(async (o, cmd) => (await scanCmds()).baselineCreateCommand({ ...globals(cmd), ...o, signal: controller.signal })));
83
+ baseline.command("update").description("Add findings that are not in the baseline yet").option("--reason <text>", "Why these findings are accepted for now").option("--last", "Use the last full scan instead of scanning again").option("--offline", "Do not contact the network").action(run(async (o, cmd) => (await scanCmds()).baselineCreateCommand({ ...globals(cmd), ...o, update: true, signal: controller.signal })));
84
+ baseline.command("prune").description("Remove entries a full scan no longer reports").option("--last", "Use the last full scan instead of scanning again").option("--offline", "Do not contact the network").action(run(async (o, cmd) => (await scanCmds()).baselinePruneCommand({ ...globals(cmd), ...o, signal: controller.signal })));
85
+ const findings = program.command("findings").description("Inspect and triage findings from the last scan");
86
+ findings.command("list", { isDefault: true }).description("List active findings with their fingerprints").option("--status <status>", "open, baselined, suppressed, excluded, triaged, or a triage decision such as to-review").option("--severity <severity>", "Only this severity").option("--category <category>", "Only this category").option("--all", "Include baselined, suppressed, triaged and excluded findings").action(run(async (o, cmd) => (await scanCmds()).findingsListCommand({ ...globals(cmd), ...o, signal: controller.signal })));
87
+ findings.command("show <fingerprint>").description("Show one finding (a fingerprint prefix of 6+ characters is enough)").action(run(async (fp, _o, cmd) => (await scanCmds()).findingsShowCommand(fp, { ...globals(cmd), signal: controller.signal })));
88
+ findings.command("triage <fingerprint> <status>").description('Record a review decision: safe, false-positive, accepted-risk, fixed, to-review (or "clear")').option("--reason <text>", "Why (required; committed in .athena/triage.json)").option("--by <name>", "Who decided").action(run(async (fp, status, o, cmd) => (await scanCmds()).findingsTriageCommand(fp, status, { ...globals(cmd), ...o, signal: controller.signal })));
89
+ program.command("review").description("Check the current diff for facts worth reviewing, and list the project rules and checklist").option("--base <ref>", "Compare against this Git ref instead of the working tree").option("--staged", "Review only what is staged for commit (used by the pre-commit hook)").option("--no-sync", "Skip the knowledge freshness check").option("--no-fail", "Always exit 0, even when blockers are found").action(run(async (o, cmd) => (await import("./review-VEJBPACX.js")).reviewCommand({ ...globals(cmd), base: o.base, staged: o.staged, noSync: o.sync === false, noFail: o.fail === false, signal: controller.signal })));
90
+ program.command("status").description("Show knowledge health and changes since the last analysis").action(run(async (_o, cmd) => (await import("./status-PO27BSOZ.js")).statusCommand({ ...globals(cmd), signal: controller.signal })));
91
+ program.command("doctor").description("Check the Athena installation, project and integrations").action(run(async (_o, cmd) => (await import("./doctor-L34QJ7WR.js")).doctorCommand(globals(cmd))));
78
92
  const rules = program.command("rules").description("List and edit project rules (.athena/rules.md)");
79
- rules.command("list", { isDefault: true }).description("List rules with their numbers").action(run(async (_o, cmd) => (await import("./rules-4FXJUCXB.js")).rulesListCommand(globals(cmd))));
80
- rules.command("add <text>").description("Add a rule").option("-s, --section <name>", "Section heading", "General").action(run(async (text, o, cmd) => (await import("./rules-4FXJUCXB.js")).rulesAddCommand(text, { ...globals(cmd), ...o })));
81
- rules.command("edit <number> <text>").description("Replace the text of a rule").action(run(async (n, text, _o, cmd) => (await import("./rules-4FXJUCXB.js")).rulesEditCommand(n, text, globals(cmd))));
82
- rules.command("enable <number>").description("Enable a rule").action(run(async (n, _o, cmd) => (await import("./rules-4FXJUCXB.js")).rulesEnableCommand(n, globals(cmd))));
83
- rules.command("disable <number>").description("Disable a rule without deleting it").action(run(async (n, _o, cmd) => (await import("./rules-4FXJUCXB.js")).rulesDisableCommand(n, globals(cmd))));
84
- rules.command("remove <number>").description("Delete a rule").action(run(async (n, _o, cmd) => (await import("./rules-4FXJUCXB.js")).rulesRemoveCommand(n, globals(cmd))));
93
+ rules.command("list", { isDefault: true }).description("List rules with their numbers").action(run(async (_o, cmd) => (await import("./rules-M4DLLXBL.js")).rulesListCommand(globals(cmd))));
94
+ rules.command("add <text>").description("Add a rule").option("-s, --section <name>", "Section heading", "General").action(run(async (text, o, cmd) => (await import("./rules-M4DLLXBL.js")).rulesAddCommand(text, { ...globals(cmd), ...o })));
95
+ rules.command("edit <number> <text>").description("Replace the text of a rule").action(run(async (n, text, _o, cmd) => (await import("./rules-M4DLLXBL.js")).rulesEditCommand(n, text, globals(cmd))));
96
+ rules.command("enable <number>").description("Enable a rule").action(run(async (n, _o, cmd) => (await import("./rules-M4DLLXBL.js")).rulesEnableCommand(n, globals(cmd))));
97
+ rules.command("disable <number>").description("Disable a rule without deleting it").action(run(async (n, _o, cmd) => (await import("./rules-M4DLLXBL.js")).rulesDisableCommand(n, globals(cmd))));
98
+ rules.command("remove <number>").description("Delete a rule").action(run(async (n, _o, cmd) => (await import("./rules-M4DLLXBL.js")).rulesRemoveCommand(n, globals(cmd))));
85
99
  const repeat = (value, prev = []) => [...prev, ...value.split(",").map((s) => s.trim()).filter(Boolean)];
86
- const mem = () => import("./memory-VSVNLEJC.js");
100
+ const mem = () => import("./memory-XBZCYQLW.js");
87
101
  const memory = program.command("memory").description("Record, review and recall project memory (.athena/memory/)");
88
102
  memory.command("list", { isDefault: true }).description("List memory entries with their label (FACT/INFERRED), status and staleness").option("--kind <kind>", "Only this kind (decision, gotcha, bug, convention, todo, fact)").option("--status <status>", "Only this status (unreviewed, confirmed, superseded)").option("--stale", "Only entries whose linked files changed since").action(run(async (o, cmd) => (await mem()).memoryListCommand({ ...globals(cmd), ...o })));
89
103
  memory.command("show <id>").description("Show one entry in full: files, tags, evidence, staleness, warnings").action(run(async (id, _o, cmd) => (await mem()).memoryShowCommand(id, globals(cmd))));
@@ -97,22 +111,22 @@ function buildProgram() {
97
111
  memory.command("stale").description("Entries whose linked files changed since they were recorded or confirmed").action(run(async (_o, cmd) => (await mem()).memoryStaleCommand(globals(cmd))));
98
112
  memory.command("review").description("Walk through unreviewed (agent-written) entries: confirm, forget or skip").action(run(async (_o, cmd) => (await mem()).memoryReviewCommand(globals(cmd))));
99
113
  const agents = program.command("agents").description("Manage AI agent integrations");
100
- agents.command("list", { isDefault: true }).description("Show supported agents and integration status").action(run(async (_o, cmd) => (await import("./agents-DFSNEOP5.js")).agentsListCommand(globals(cmd))));
101
- agents.command("add <agents...>").description('Configure integrations (claude-code, cursor, codex, copilot, gemini-cli, antigravity, windsurf, cline, agents-md, or "all")').action(run(async (names, _o, cmd) => (await import("./agents-DFSNEOP5.js")).agentsAddCommand(names, globals(cmd))));
102
- agents.command("remove <agents...>").description("Remove Athena-managed integration files/blocks").action(run(async (names, _o, cmd) => (await import("./agents-DFSNEOP5.js")).agentsRemoveCommand(names, globals(cmd))));
114
+ agents.command("list", { isDefault: true }).description("Show supported agents and integration status").action(run(async (_o, cmd) => (await import("./agents-HUJ4JXIB.js")).agentsListCommand(globals(cmd))));
115
+ agents.command("add <agents...>").description('Configure integrations (claude-code, cursor, codex, copilot, gemini-cli, antigravity, windsurf, cline, agents-md, or "all")').action(run(async (names, _o, cmd) => (await import("./agents-HUJ4JXIB.js")).agentsAddCommand(names, globals(cmd))));
116
+ agents.command("remove <agents...>").description("Remove Athena-managed integration files/blocks").action(run(async (names, _o, cmd) => (await import("./agents-HUJ4JXIB.js")).agentsRemoveCommand(names, globals(cmd))));
103
117
  const gitHook = program.command("git-hook").description("Install a Git pre-commit hook that blocks commits when knowledge is out of date");
104
- gitHook.command("status", { isDefault: true }).description("Show whether the Athena pre-commit hook is installed").action(run(async (_o, cmd) => (await import("./git-hook-YZNZGAAP.js")).gitHookStatusCommand(globals(cmd))));
105
- gitHook.command("install").description("Add the Athena pre-commit hook (existing hooks are kept; Athena adds a marked block)").option("--review", "Also run `athena review` and block commits with possible secrets or env files").action(run(async (o, cmd) => (await import("./git-hook-YZNZGAAP.js")).gitHookInstallCommand({ ...globals(cmd), review: o.review })));
106
- gitHook.command("uninstall").description("Remove Athena's pre-commit hook or block").action(run(async (_o, cmd) => (await import("./git-hook-YZNZGAAP.js")).gitHookUninstallCommand(globals(cmd))));
107
- program.command("open").description("Start (or reuse) the local web UI and open it in your browser").option("-p, --port <port>", "Port to bind (default: first free port from 7432)").option("--host <host>", "Interface to bind (default: 127.0.0.1)").option("--allow-remote", "Allow binding to a non-loopback interface").option("--no-open", "Do not launch a browser").option("--no-watch", "Do not watch the project for changes").action(run(async (o, cmd) => (await import("./open-UJZRYF4E.js")).openCommand({ ...globals(cmd), ...o, signal: controller.signal })));
108
- program.command("activity").description("Show AI agent activity observed through hooks").option("-n, --limit <count>", "Number of events to show (default 30)").option("--agent <id>", "Only show events from this agent").action(run(async (o, cmd) => (await import("./activity-BKW7G4I5.js")).activityCommand({ ...globals(cmd), ...o })));
118
+ gitHook.command("status", { isDefault: true }).description("Show whether the Athena pre-commit hook is installed").action(run(async (_o, cmd) => (await import("./git-hook-Y7Y262F7.js")).gitHookStatusCommand(globals(cmd))));
119
+ gitHook.command("install").description("Add the Athena pre-commit hook (existing hooks are kept; Athena adds a marked block)").option("--review", "Also run `athena review` and block commits with possible secrets or env files").action(run(async (o, cmd) => (await import("./git-hook-Y7Y262F7.js")).gitHookInstallCommand({ ...globals(cmd), review: o.review })));
120
+ gitHook.command("uninstall").description("Remove Athena's pre-commit hook or block").action(run(async (_o, cmd) => (await import("./git-hook-Y7Y262F7.js")).gitHookUninstallCommand(globals(cmd))));
121
+ program.command("open").description("Start (or reuse) the local web UI and open it in your browser").option("-p, --port <port>", "Port to bind (default: first free port from 7432)").option("--host <host>", "Interface to bind (default: 127.0.0.1)").option("--allow-remote", "Allow binding to a non-loopback interface").option("--no-open", "Do not launch a browser").option("--no-watch", "Do not watch the project for changes").action(run(async (o, cmd) => (await import("./open-LJMOB6U2.js")).openCommand({ ...globals(cmd), ...o, signal: controller.signal })));
122
+ program.command("activity").description("Show AI agent activity observed through hooks").option("-n, --limit <count>", "Number of events to show (default 30)").option("--agent <id>", "Only show events from this agent").action(run(async (o, cmd) => (await import("./activity-XCHKBZTG.js")).activityCommand({ ...globals(cmd), ...o })));
109
123
  program.command("event").description("Record an agent hook event (called by AI coding agents, reads JSON on stdin)").option("--agent <id>", "Agent that fired the hook").option("--hook <name>", "Hook event name").option("--athena-hook", "Marker used to identify Athena-managed hook entries").option("--verbose-errors", "Print errors to stderr (hooks stay silent by default)").action(
110
124
  run(async (o, cmd) => {
111
125
  const g = globals(cmd);
112
- await (await import("./event-TNT6CQZR.js")).eventCommand({ agent: o.agent, hook: o.hook, cwd: g.cwd, verbose: o.verboseErrors });
126
+ await (await import("./event-6YW6TGFI.js")).eventCommand({ agent: o.agent, hook: o.hook, cwd: g.cwd, verbose: o.verboseErrors });
113
127
  })
114
128
  );
115
- program.command("clean").description("Remove .athena/ and Athena agent integrations").option("-y, --yes", "Skip confirmation").option("--keep-agents", "Keep agent integration files/blocks").action(run(async (o, cmd) => (await import("./clean-MDBYH62P.js")).cleanCommand({ ...globals(cmd), ...o })));
129
+ program.command("clean").description("Remove .athena/ and Athena agent integrations").option("-y, --yes", "Skip confirmation").option("--keep-agents", "Keep agent integration files/blocks").action(run(async (o, cmd) => (await import("./clean-LQOG56AM.js")).cleanCommand({ ...globals(cmd), ...o })));
116
130
  program.command("version").description("Print the Athena version").action(run(async (_o, cmd) => {
117
131
  if (globals(cmd).json) json({ version: ATHENA_VERSION, node: process.versions.node, platform: process.platform });
118
132
  else line(ATHENA_VERSION);
@@ -162,4 +176,4 @@ export {
162
176
  buildProgram,
163
177
  main
164
178
  };
165
- //# sourceMappingURL=program-CWJNGCTZ.js.map
179
+ //# sourceMappingURL=program-DCP526LU.js.map
@@ -2,7 +2,8 @@
2
2
  import {
3
3
  hasBlockers,
4
4
  reviewChanges
5
- } from "./chunk-FVCDMQUQ.js";
5
+ } from "./chunk-C25FDXOO.js";
6
+ import "./chunk-Y6SDMZET.js";
6
7
  import "./chunk-3IS2X2Z7.js";
7
8
  import {
8
9
  c,
@@ -22,18 +23,18 @@ import "./chunk-KBO7XRBW.js";
22
23
  import {
23
24
  planSync,
24
25
  staleForCheck
25
- } from "./chunk-KHMBNT66.js";
26
- import "./chunk-WVQC2EGO.js";
26
+ } from "./chunk-PZPMWCXS.js";
27
+ import "./chunk-GU3ZX2J7.js";
27
28
  import "./chunk-GR4DL2VM.js";
28
- import "./chunk-GGXPG6OE.js";
29
- import "./chunk-MPG3IEGB.js";
30
- import "./chunk-ELKFRTZT.js";
29
+ import "./chunk-4FETKOY3.js";
31
30
  import "./chunk-2R6PXY6Z.js";
31
+ import "./chunk-44EGCEB2.js";
32
32
  import "./chunk-PVCIGUIT.js";
33
- import "./chunk-OLPSEQS5.js";
33
+ import "./chunk-ELKFRTZT.js";
34
+ import "./chunk-AKOI4VTD.js";
34
35
  import "./chunk-SVTEJYMS.js";
35
36
  import "./chunk-QCC4VJUH.js";
36
- import "./chunk-JCGDR4UV.js";
37
+ import "./chunk-WWQ5NKEC.js";
37
38
  import "./chunk-YRIS7ZS6.js";
38
39
  import "./chunk-GHFRQAYT.js";
39
40
  import "./chunk-INT3IGMQ.js";
@@ -114,4 +115,4 @@ ${blockers} blocker${blockers === 1 ? "" : "s"} found.`));
114
115
  export {
115
116
  reviewCommand
116
117
  };
117
- //# sourceMappingURL=review-OOKXSYMP.js.map
118
+ //# sourceMappingURL=review-VEJBPACX.js.map
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getRules,
4
4
  mutateRules
5
- } from "./chunk-LEMPCNAY.js";
5
+ } from "./chunk-56EXAGTM.js";
6
6
  import {
7
7
  addRule,
8
8
  removeRule,
@@ -20,8 +20,8 @@ import {
20
20
  requireProjectRoot
21
21
  } from "./chunk-XFN7UZCS.js";
22
22
  import "./chunk-KBO7XRBW.js";
23
- import "./chunk-OLPSEQS5.js";
24
- import "./chunk-JCGDR4UV.js";
23
+ import "./chunk-AKOI4VTD.js";
24
+ import "./chunk-WWQ5NKEC.js";
25
25
  import "./chunk-673EPYYH.js";
26
26
  import "./chunk-FQEGEVLY.js";
27
27
  import "./chunk-2DY4PUR4.js";
@@ -80,4 +80,4 @@ export {
80
80
  rulesListCommand,
81
81
  rulesRemoveCommand
82
82
  };
83
- //# sourceMappingURL=rules-4FXJUCXB.js.map
83
+ //# sourceMappingURL=rules-M4DLLXBL.js.map