code-auditor-mcp 4.0.3 → 4.1.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.
- package/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +124 -0
- package/README.md +5 -5
- package/configs/hhra-compat.json +2 -2
- package/dist/analyzers/applicability.d.ts +25 -2
- package/dist/analyzers/applicability.d.ts.map +1 -1
- package/dist/analyzers/applicability.js +44 -50
- package/dist/analyzers/applicability.js.map +1 -1
- package/dist/analyzers/cross-language/APIContractAnalyzer.d.ts +18 -49
- package/dist/analyzers/cross-language/APIContractAnalyzer.d.ts.map +1 -1
- package/dist/analyzers/cross-language/APIContractAnalyzer.js +22 -240
- package/dist/analyzers/cross-language/APIContractAnalyzer.js.map +1 -1
- package/dist/analyzers/cross-language/SchemaValidator.d.ts +2 -14
- package/dist/analyzers/cross-language/SchemaValidator.d.ts.map +1 -1
- package/dist/analyzers/cross-language/SchemaValidator.js +0 -104
- package/dist/analyzers/cross-language/SchemaValidator.js.map +1 -1
- package/dist/analyzers/orgFilterTiers.d.ts +89 -0
- package/dist/analyzers/orgFilterTiers.d.ts.map +1 -0
- package/dist/analyzers/orgFilterTiers.js +96 -0
- package/dist/analyzers/orgFilterTiers.js.map +1 -0
- package/dist/analyzers/ruleRegistry.d.ts +15 -0
- package/dist/analyzers/ruleRegistry.d.ts.map +1 -1
- package/dist/analyzers/ruleRegistry.js +139 -185
- package/dist/analyzers/ruleRegistry.js.map +1 -1
- package/dist/analyzers/universal/UniversalDataAccessAnalyzer.d.ts +39 -0
- package/dist/analyzers/universal/UniversalDataAccessAnalyzer.d.ts.map +1 -1
- package/dist/analyzers/universal/UniversalDataAccessAnalyzer.js +62 -41
- package/dist/analyzers/universal/UniversalDataAccessAnalyzer.js.map +1 -1
- package/dist/analyzers/universal/UniversalSchemaAnalyzer.d.ts +2 -2
- package/dist/analyzers/universal/UniversalSchemaAnalyzer.d.ts.map +1 -1
- package/dist/analyzers/universal/UniversalSchemaAnalyzer.js +2 -2
- package/dist/analyzers/universal/UniversalSchemaAnalyzer.js.map +1 -1
- package/dist/analyzers/universal/UniversalSecurityAnalyzer.d.ts +86 -0
- package/dist/analyzers/universal/UniversalSecurityAnalyzer.d.ts.map +1 -0
- package/dist/analyzers/universal/UniversalSecurityAnalyzer.js +606 -0
- package/dist/analyzers/universal/UniversalSecurityAnalyzer.js.map +1 -0
- package/dist/analyzers/universal/schema/codeAnalysis.d.ts +14 -0
- package/dist/analyzers/universal/schema/codeAnalysis.d.ts.map +1 -1
- package/dist/analyzers/universal/schema/codeAnalysis.js +35 -18
- package/dist/analyzers/universal/schema/codeAnalysis.js.map +1 -1
- package/dist/analyzers/universal/schema/migrations.d.ts +14 -1
- package/dist/analyzers/universal/schema/migrations.d.ts.map +1 -1
- package/dist/analyzers/universal/schema/migrations.js +58 -14
- package/dist/analyzers/universal/schema/migrations.js.map +1 -1
- package/dist/auditRunner.d.ts.map +1 -1
- package/dist/auditRunner.js +70 -13
- package/dist/auditRunner.js.map +1 -1
- package/dist/churn/churnExtractor.js +5 -5
- package/dist/churn/churnExtractor.js.map +1 -1
- package/dist/cli.js +40 -9
- package/dist/cli.js.map +1 -1
- package/dist/codeIndexDB.d.ts +6 -0
- package/dist/codeIndexDB.d.ts.map +1 -1
- package/dist/codeIndexDB.js +33 -1
- package/dist/codeIndexDB.js.map +1 -1
- package/dist/config/configGeneratePath.d.ts +19 -0
- package/dist/config/configGeneratePath.d.ts.map +1 -0
- package/dist/config/configGeneratePath.js +29 -0
- package/dist/config/configGeneratePath.js.map +1 -0
- package/dist/config/configLoader.d.ts +36 -4
- package/dist/config/configLoader.d.ts.map +1 -1
- package/dist/config/configLoader.js +136 -15
- package/dist/config/configLoader.js.map +1 -1
- package/dist/config/lintConfigReader.d.ts +4 -0
- package/dist/config/lintConfigReader.d.ts.map +1 -1
- package/dist/config/lintConfigReader.js +35 -36
- package/dist/config/lintConfigReader.js.map +1 -1
- package/dist/config/staticObjectExtract.d.ts +35 -0
- package/dist/config/staticObjectExtract.d.ts.map +1 -0
- package/dist/config/staticObjectExtract.js +312 -0
- package/dist/config/staticObjectExtract.js.map +1 -0
- package/dist/constants.d.ts +1 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +0 -2
- package/dist/constants.js.map +1 -1
- package/dist/daemon/core.js +1 -1
- package/dist/daemon/core.js.map +1 -1
- package/dist/daemon/main.js +1 -1
- package/dist/daemon/main.js.map +1 -1
- package/dist/dataPaths.d.ts +11 -0
- package/dist/dataPaths.d.ts.map +1 -1
- package/dist/dataPaths.js +24 -2
- package/dist/dataPaths.js.map +1 -1
- package/dist/generators/BaseConfigGenerator.d.ts +0 -4
- package/dist/generators/BaseConfigGenerator.d.ts.map +1 -1
- package/dist/generators/BaseConfigGenerator.js +1 -7
- package/dist/generators/BaseConfigGenerator.js.map +1 -1
- package/dist/installConfig.d.ts +3 -1
- package/dist/installConfig.d.ts.map +1 -1
- package/dist/installConfig.js +15 -2
- package/dist/installConfig.js.map +1 -1
- package/dist/installer.d.ts +10 -0
- package/dist/installer.d.ts.map +1 -1
- package/dist/installer.js +14 -2
- package/dist/installer.js.map +1 -1
- package/dist/languages/LanguageOrchestrator.js +6 -6
- package/dist/languages/LanguageOrchestrator.js.map +1 -1
- package/dist/languages/RuntimeManager.d.ts +4 -2
- package/dist/languages/RuntimeManager.d.ts.map +1 -1
- package/dist/languages/RuntimeManager.js +77 -44
- package/dist/languages/RuntimeManager.js.map +1 -1
- package/dist/languages/go/{analyzer → analyzer-darwin-amd64} +0 -0
- package/dist/languages/go/analyzer-darwin-arm64 +0 -0
- package/dist/languages/go/analyzer-linux-amd64 +0 -0
- package/dist/languages/go/analyzer-linux-arm64 +0 -0
- package/dist/languages/go/analyzer-windows-amd64.exe +0 -0
- package/dist/languages/goBinary.d.ts +8 -7
- package/dist/languages/goBinary.d.ts.map +1 -1
- package/dist/languages/goBinary.js +8 -7
- package/dist/languages/goBinary.js.map +1 -1
- package/dist/mcp-tools-shared.d.ts.map +1 -1
- package/dist/mcp-tools-shared.js +7 -2
- package/dist/mcp-tools-shared.js.map +1 -1
- package/dist/mcp-ui-simple.d.ts +5 -1
- package/dist/mcp-ui-simple.d.ts.map +1 -1
- package/dist/mcp-ui-simple.js +81 -29
- package/dist/mcp-ui-simple.js.map +1 -1
- package/dist/mcp.js +19 -4
- package/dist/mcp.js.map +1 -1
- package/dist/mcpAuditJobs.d.ts.map +1 -1
- package/dist/mcpAuditJobs.js +1 -0
- package/dist/mcpAuditJobs.js.map +1 -1
- package/dist/nextFileIncremental.js +1 -1
- package/dist/nextFileIncremental.js.map +1 -1
- package/dist/pipeline.d.ts.map +1 -1
- package/dist/pipeline.js +13 -2
- package/dist/pipeline.js.map +1 -1
- package/dist/pipelineAdapters.d.ts +15 -0
- package/dist/pipelineAdapters.d.ts.map +1 -1
- package/dist/pipelineAdapters.js +140 -6
- package/dist/pipelineAdapters.js.map +1 -1
- package/dist/reporting/htmlReportGenerator.js +2 -2
- package/dist/reporting/htmlReportGenerator.js.map +1 -1
- package/dist/ruleAliases.d.ts.map +1 -1
- package/dist/ruleAliases.js +45 -0
- package/dist/ruleAliases.js.map +1 -1
- package/dist/styles/tailwindConfigLoader.d.ts +4 -0
- package/dist/styles/tailwindConfigLoader.d.ts.map +1 -1
- package/dist/styles/tailwindConfigLoader.js +54 -36
- package/dist/styles/tailwindConfigLoader.js.map +1 -1
- package/dist/types.d.ts +55 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +15 -0
- package/dist/types.js.map +1 -1
- package/dist/version.generated.d.ts +1 -1
- package/dist/version.generated.js +1 -1
- package/examples/.auditrc.example.json +2 -2
- package/examples/.auditrc.json +3 -3
- package/examples/nextjs.auditrc.json +1 -1
- package/examples/node-api.auditrc.json +1 -1
- package/examples/react.auditrc.json +2 -2
- package/examples/tolerant-solid.auditrc.json +1 -1
- package/package.json +2 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/scripts/hook-common.sh +27 -27
- package/plugin/skills/code-auditor/SKILL.md +1 -1
- package/server.json +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "code-auditor-mcp",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Architectural invariants and code quality analysis, enforced inside your AI agent's edit loop. MCP server + CLI + Claude Code plugin. TypeScript, JavaScript, Go.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"prepublishOnly": "pnpm run build",
|
|
31
31
|
"test": "vitest run",
|
|
32
32
|
"test:integration": "vitest run --config vitest.integration.config.ts",
|
|
33
|
+
"bench": "tsx bench/verify.ts",
|
|
33
34
|
"test:watch": "vitest watch",
|
|
34
35
|
"verify:disk-space": "node scripts/verify-disk-space.mjs",
|
|
35
36
|
"verify:types": "tsc --noEmit",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "code-auditor",
|
|
3
3
|
"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.",
|
|
4
|
-
"version": "4.0
|
|
4
|
+
"version": "4.1.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Ben Hammond",
|
|
7
7
|
"email": "ben@benhammond.tech"
|
|
@@ -32,23 +32,21 @@
|
|
|
32
32
|
|
|
33
33
|
# resolve_code_audit — emit the CLI invocation to use.
|
|
34
34
|
#
|
|
35
|
-
# Resolution is version-aware: EVERY candidate — bundled sibling,
|
|
36
|
-
# global — is used only when its `--version` matches this plugin's
|
|
37
|
-
# version. A stale candidate is warned about and skipped, so a mismatched
|
|
38
|
-
# no longer turns the hook into a hard failure
|
|
39
|
-
# the correct CLI on its own (and warn_stale tells the user to update so the fast
|
|
40
|
-
# path comes back).
|
|
35
|
+
# Resolution is version-aware: EVERY candidate — bundled sibling, pinned install,
|
|
36
|
+
# project-local, global — is used only when its `--version` matches this plugin's
|
|
37
|
+
# manifest version. A stale candidate is warned about and skipped, so a mismatched
|
|
38
|
+
# binary no longer turns the hook into a hard failure.
|
|
41
39
|
#
|
|
42
40
|
# 1. The plugin's bundled CLI (`${CLAUDE_PLUGIN_ROOT}/../dist/cli.js` ships in the
|
|
43
41
|
# same npm package, so it usually matches) — but a marketplace checkout has no
|
|
44
42
|
# npm-paired dist/, and a locally built one can be stale, so it is
|
|
45
43
|
# version-checked like everything else.
|
|
46
|
-
# 2.
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
#
|
|
44
|
+
# 2. Pinned install, exact manifest version — never a range — tried before the
|
|
45
|
+
# project-local and PATH candidates so a version-matched pin wins over a stale
|
|
46
|
+
# project-local/global shim (the shadowing that resolve_pinned_bin's
|
|
47
|
+
# install-to-known-dir approach exists to avoid).
|
|
48
|
+
# 3. Project-local install (consumer project's own node_modules) — if compatible.
|
|
49
|
+
# 4. Global install / PATH — if compatible.
|
|
52
50
|
resolve_code_audit() {
|
|
53
51
|
local candidate
|
|
54
52
|
if [ -n "${CLAUDE_PLUGIN_ROOT:-}" ] && [ -f "${CLAUDE_PLUGIN_ROOT}/../dist/cli.js" ]; then
|
|
@@ -59,6 +57,18 @@ resolve_code_audit() {
|
|
|
59
57
|
fi
|
|
60
58
|
warn_stale "${candidate}"
|
|
61
59
|
fi
|
|
60
|
+
|
|
61
|
+
# Pin to the plugin's exact version, not a range: `@^3.0.0` could resolve a
|
|
62
|
+
# cached older CLI and silently drive this plugin with the wrong analyzer code.
|
|
63
|
+
local pv bin
|
|
64
|
+
pv="$(plugin_version)"
|
|
65
|
+
if [ -n "${pv}" ]; then
|
|
66
|
+
if bin="$(resolve_pinned_bin)"; then
|
|
67
|
+
echo "${bin}"
|
|
68
|
+
return
|
|
69
|
+
fi
|
|
70
|
+
fi
|
|
71
|
+
|
|
62
72
|
if [ -n "${CLAUDE_PROJECT_DIR:-}" ] && [ -x "${CLAUDE_PROJECT_DIR}/node_modules/.bin/code-audit" ]; then
|
|
63
73
|
candidate="${CLAUDE_PROJECT_DIR}/node_modules/.bin/code-audit"
|
|
64
74
|
if cli_is_compatible "${candidate}"; then
|
|
@@ -75,23 +85,13 @@ resolve_code_audit() {
|
|
|
75
85
|
fi
|
|
76
86
|
warn_stale "${candidate}"
|
|
77
87
|
fi
|
|
78
|
-
|
|
79
|
-
#
|
|
80
|
-
|
|
81
|
-
|
|
88
|
+
|
|
89
|
+
# Pinned install failed (offline, registry error, npm missing), or the manifest
|
|
90
|
+
# is unreadable. Emit the npx form as a last-ditch command so the hook still has
|
|
91
|
+
# something to run; assert_compatible rejects it loudly if it cannot be verified.
|
|
82
92
|
if [ -n "${pv}" ]; then
|
|
83
|
-
|
|
84
|
-
echo "${bin}"
|
|
85
|
-
else
|
|
86
|
-
# Install failed (offline, registry error, npm missing). Emit the npx form
|
|
87
|
-
# as a last-ditch command so the hook still has something to run;
|
|
88
|
-
# assert_compatible rejects it loudly if it cannot be verified — the same
|
|
89
|
-
# treatment as the unreadable-manifest case below.
|
|
90
|
-
echo "npx -y -p code-auditor-mcp@${pv} code-audit"
|
|
91
|
-
fi
|
|
93
|
+
echo "npx -y -p code-auditor-mcp@${pv} code-audit"
|
|
92
94
|
else
|
|
93
|
-
# Manifest unreadable — assert_compatible will reject whatever this fetches,
|
|
94
|
-
# so `@latest` is only a last-ditch command that never survives the pin.
|
|
95
95
|
echo "npx -y -p code-auditor-mcp@latest code-audit"
|
|
96
96
|
fi
|
|
97
97
|
}
|
|
@@ -5,7 +5,7 @@ description: Audit code quality, search the codebase semantically, enforce invar
|
|
|
5
5
|
|
|
6
6
|
# Code Auditor Skill
|
|
7
7
|
|
|
8
|
-
> **Version 4.0
|
|
8
|
+
> **Version 4.1.0** • Run `code-audit --version` to check your installed version.
|
|
9
9
|
> If versions differ, the CLI is authoritative — use `code-audit <command> --help` to see what your install actually supports.
|
|
10
10
|
|
|
11
11
|
You have the `code-audit` CLI available. It indexes every function, component, and struct in the codebase for semantic search and invariant enforcement. Use these commands instead of raw grep/find whenever possible.
|
package/server.json
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
"url": "https://github.com/BenAHammond/code-auditor-mcp",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "4.0
|
|
9
|
+
"version": "4.1.0",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
14
14
|
"identifier": "code-auditor-mcp",
|
|
15
|
-
"version": "4.0
|
|
15
|
+
"version": "4.1.0",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
}
|