code-auditor-mcp 3.8.1 → 3.9.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 (55) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +21 -0
  3. package/README.md +11 -0
  4. package/dist/cli.js +2 -1
  5. package/dist/cli.js.map +1 -1
  6. package/dist/codeIndexDB.d.ts +3 -5
  7. package/dist/codeIndexDB.d.ts.map +1 -1
  8. package/dist/codeIndexDB.js +10 -40
  9. package/dist/codeIndexDB.js.map +1 -1
  10. package/dist/conventions/conventionMiner.d.ts +3 -3
  11. package/dist/conventions/conventionMiner.d.ts.map +1 -1
  12. package/dist/conventions/conventionMiner.js.map +1 -1
  13. package/dist/graph/blastRadius.d.ts +2 -2
  14. package/dist/graph/blastRadius.d.ts.map +1 -1
  15. package/dist/graph/blastRadius.js.map +1 -1
  16. package/dist/graph/callGraph.d.ts +6 -6
  17. package/dist/graph/callGraph.d.ts.map +1 -1
  18. package/dist/graph/callGraph.js.map +1 -1
  19. package/dist/graph/importGraph.d.ts +5 -5
  20. package/dist/graph/importGraph.d.ts.map +1 -1
  21. package/dist/graph/importGraph.js.map +1 -1
  22. package/dist/ledger.d.ts +19 -19
  23. package/dist/ledger.d.ts.map +1 -1
  24. package/dist/ledger.js.map +1 -1
  25. package/dist/mcpAuditJobs.js.map +1 -1
  26. package/dist/search/QueryParser.d.ts.map +1 -1
  27. package/dist/search/QueryParser.js +5 -1
  28. package/dist/search/QueryParser.js.map +1 -1
  29. package/dist/services/auditJobService.d.ts +5 -5
  30. package/dist/services/auditJobService.d.ts.map +1 -1
  31. package/dist/services/auditJobService.js.map +1 -1
  32. package/dist/sqlite/betterSqlite3.d.ts +27 -0
  33. package/dist/sqlite/betterSqlite3.d.ts.map +1 -0
  34. package/dist/sqlite/betterSqlite3.js +79 -0
  35. package/dist/sqlite/betterSqlite3.js.map +1 -0
  36. package/dist/sqlite/driver.d.ts +24 -0
  37. package/dist/sqlite/driver.d.ts.map +1 -0
  38. package/dist/sqlite/driver.js +90 -0
  39. package/dist/sqlite/driver.js.map +1 -0
  40. package/dist/sqlite/nodeSqlite.d.ts +27 -0
  41. package/dist/sqlite/nodeSqlite.d.ts.map +1 -0
  42. package/dist/sqlite/nodeSqlite.js +168 -0
  43. package/dist/sqlite/nodeSqlite.js.map +1 -0
  44. package/dist/sqlite/types.d.ts +52 -0
  45. package/dist/sqlite/types.d.ts.map +1 -0
  46. package/dist/sqlite/types.js +15 -0
  47. package/dist/sqlite/types.js.map +1 -0
  48. package/dist/styles/styleIndexer.d.ts +2 -2
  49. package/dist/styles/styleIndexer.d.ts.map +1 -1
  50. package/dist/styles/styleIndexer.js.map +1 -1
  51. package/dist/workers/auditJobRunner.js +4 -3
  52. package/dist/workers/auditJobRunner.js.map +1 -1
  53. package/package.json +3 -9
  54. package/plugin/.claude-plugin/plugin.json +1 -1
  55. package/plugin/skills/code-auditor/SKILL.md +1 -1
@@ -10,7 +10,7 @@
10
10
  "name": "code-auditor",
11
11
  "source": "./plugin",
12
12
  "description": "Diff-scoped code quality auditing on every edit. Indexes your codebase, enforces invariants, and feeds violations back to the agent so fixes happen inline.",
13
- "version": "3.8.1",
13
+ "version": "3.9.0",
14
14
  "author": {
15
15
  "name": "Ben Hammond"
16
16
  },
package/CHANGELOG.md CHANGED
@@ -2,6 +2,27 @@
2
2
 
3
3
  All notable changes to the Code Auditor MCP project.
4
4
 
5
+ ## [3.9.0] — 2026-09-09
6
+
7
+ ### SQLite without a native install (Spec 51)
8
+ `better-sqlite3` is no longer a hard dependency. The tool now selects its SQLite
9
+ backend at runtime: the built-in `node:sqlite` (`DatabaseSync`/`StatementSync`)
10
+ is the primary backend on Node 23.4+ and needs no native install or prebuilt
11
+ binary, so a fresh `npm install` on npm 11.2+/12 (which block install scripts by
12
+ default) just works. `better-sqlite3` remains as an `optionalDependencies`
13
+ fallback for Node 18–23.3.
14
+
15
+ - Backend selection is a runtime capability check, not a version-string match
16
+ (`CODE_AUDITOR_SQLITE_BACKEND=node-sqlite|better-sqlite3` forces one for the
17
+ parity suite). The active backend is reported in `code-audit --version`.
18
+ - `node:sqlite`'s missing `.transaction()`/`.pragma()` and its stricter
19
+ named-parameter binding are shimmed behind the same interface; error codes are
20
+ normalized to better-sqlite3's `SqliteError` shape so callers branching on
21
+ `SQLITE_BUSY` etc. behave identically.
22
+ - Full-suite and corpus parity verified: both backends produce byte-identical
23
+ results (recall-protocol corpus: 4,351 advisory findings under both).
24
+ - **Node floor:** `>=18` to run, `>=23.4` for the zero-native-install path.
25
+
5
26
  ## [3.8.1] — 2026-09-08
6
27
 
7
28
  ### Fresh-install fix — better-sqlite3 prebuild gap
package/README.md CHANGED
@@ -26,6 +26,17 @@ claude plugin install code-auditor
26
26
 
27
27
  The hook auto-installs the auditor on first use via npx.
28
28
 
29
+ ## Requirements
30
+
31
+ - **Node 18+** to run. **Node 23.4+** gets the zero-native-install path: Code
32
+ Auditor uses the built-in `node:sqlite` module, so nothing needs to compile or
33
+ download a prebuilt binary on install.
34
+ - On older Node (18–23.3), Code Auditor falls back to `better-sqlite3`, an
35
+ *optional* dependency whose install script must be approved once on npm
36
+ 11.2+/12 (they block dependency install scripts by default):
37
+ `npm install-scripts approve better-sqlite3 && npm rebuild better-sqlite3`
38
+ (with pnpm: `pnpm approve-builds`, then select `better-sqlite3`).
39
+
29
40
  ## Prompt examples
30
41
 
31
42
  **"Index the codebase and run a full audit, then walk the violations file-by-file with `code-audit next-file`."**
package/dist/cli.js CHANGED
@@ -26,6 +26,7 @@ import { computeGatingDecision } from './enforcement/gate.js';
26
26
  import { DEFAULT_BLOCKING_SEVERITIES } from './config/defaults.js';
27
27
  import { rankFilesByPriority, orderFindingsWithinFile } from './nextFile.js';
28
28
  import { runNextFile } from './nextFileIncremental.js';
29
+ import { describeSqliteBackend } from './sqlite/driver.js';
29
30
  // Get package.json for version info
30
31
  const __filename = fileURLToPath(import.meta.url);
31
32
  const __dirname = dirname(__filename);
@@ -82,7 +83,7 @@ function printFileAccounting(result, explainSkipped) {
82
83
  program
83
84
  .name('code-auditor')
84
85
  .description('TypeScript/JavaScript code quality auditor with AI tool integration')
85
- .version(packageJson.version);
86
+ .version(`${packageJson.version} (sqlite: ${describeSqliteBackend()})`);
86
87
  // Legacy audit command (default behavior)
87
88
  program
88
89
  .command('audit', { isDefault: true })