@yalehwang/archguard 0.1.31 → 0.1.32

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 (298) hide show
  1. package/README.md +106 -19
  2. package/assets/grammars/benchmarks.md +101 -0
  3. package/assets/grammars/checksums.json +8 -0
  4. package/{node_modules/tree-sitter/LICENSE → assets/grammars/licenses/tree-sitter-cpp.LICENSE} +2 -2
  5. package/{node_modules/node-gyp-build/LICENSE → assets/grammars/licenses/tree-sitter-go.LICENSE} +5 -5
  6. package/assets/grammars/licenses/tree-sitter-java.LICENSE +21 -0
  7. package/assets/grammars/licenses/tree-sitter-kotlin.LICENSE +21 -0
  8. package/assets/grammars/licenses/tree-sitter-python.LICENSE +21 -0
  9. package/assets/grammars/licenses/tree-sitter.LICENSE +21 -0
  10. package/assets/grammars/provenance.json +66 -0
  11. package/assets/grammars/tree-sitter-cpp.wasm +0 -0
  12. package/assets/grammars/tree-sitter-go.wasm +0 -0
  13. package/assets/grammars/tree-sitter-java.wasm +0 -0
  14. package/assets/grammars/tree-sitter-kotlin.wasm +0 -0
  15. package/assets/grammars/tree-sitter-python.wasm +0 -0
  16. package/assets/grammars/tree-sitter.wasm +0 -0
  17. package/dist/analysis/fitness/rule-types.d.ts +1 -33
  18. package/dist/analysis/fitness/rule-types.d.ts.map +1 -1
  19. package/dist/cli/analyze/run-analysis.d.ts +4 -0
  20. package/dist/cli/analyze/run-analysis.d.ts.map +1 -1
  21. package/dist/cli/analyze/run-analysis.js +63 -43
  22. package/dist/cli/analyze/run-analysis.js.map +1 -1
  23. package/dist/cli/cache/cache-manager.js +1 -1
  24. package/dist/cli/cache/cache-manager.js.map +1 -1
  25. package/dist/cli/mcp/analyze-tool.d.ts +2 -0
  26. package/dist/cli/mcp/analyze-tool.d.ts.map +1 -1
  27. package/dist/cli/mcp/analyze-tool.js +5 -0
  28. package/dist/cli/mcp/analyze-tool.js.map +1 -1
  29. package/dist/cli/mcp/mcp-server.d.ts +7 -2
  30. package/dist/cli/mcp/mcp-server.d.ts.map +1 -1
  31. package/dist/cli/mcp/mcp-server.js +37 -3
  32. package/dist/cli/mcp/mcp-server.js.map +1 -1
  33. package/dist/cli/processors/arch-json-provider-types.d.ts +5 -0
  34. package/dist/cli/processors/arch-json-provider-types.d.ts.map +1 -1
  35. package/dist/cli/processors/arch-json-provider.d.ts +5 -0
  36. package/dist/cli/processors/arch-json-provider.d.ts.map +1 -1
  37. package/dist/cli/processors/arch-json-provider.js +104 -55
  38. package/dist/cli/processors/arch-json-provider.js.map +1 -1
  39. package/dist/cli/processors/arch-json-utils.d.ts.map +1 -1
  40. package/dist/cli/processors/arch-json-utils.js +12 -3
  41. package/dist/cli/processors/arch-json-utils.js.map +1 -1
  42. package/dist/cli/processors/diagram-processor.d.ts +4 -0
  43. package/dist/cli/processors/diagram-processor.d.ts.map +1 -1
  44. package/dist/cli/processors/diagram-processor.js +2 -0
  45. package/dist/cli/processors/diagram-processor.js.map +1 -1
  46. package/dist/cli/processors/worker-pool-factory.d.ts +3 -0
  47. package/dist/cli/processors/worker-pool-factory.d.ts.map +1 -1
  48. package/dist/cli/processors/worker-pool-factory.js +9 -0
  49. package/dist/cli/processors/worker-pool-factory.js.map +1 -1
  50. package/dist/mermaid/generator.d.ts.map +1 -1
  51. package/dist/mermaid/generator.js +19 -1
  52. package/dist/mermaid/generator.js.map +1 -1
  53. package/dist/mermaid/renderer.d.ts.map +1 -1
  54. package/dist/mermaid/renderer.js +1 -1
  55. package/dist/mermaid/renderer.js.map +1 -1
  56. package/dist/mermaid/test-coverage-renderer.d.ts.map +1 -1
  57. package/dist/mermaid/test-coverage-renderer.js +18 -12
  58. package/dist/mermaid/test-coverage-renderer.js.map +1 -1
  59. package/dist/parser/archjson-aggregator.js +1 -1
  60. package/dist/parser/archjson-aggregator.js.map +1 -1
  61. package/dist/parser/parallel-parser.d.ts +10 -0
  62. package/dist/parser/parallel-parser.d.ts.map +1 -1
  63. package/dist/parser/parallel-parser.js +76 -35
  64. package/dist/parser/parallel-parser.js.map +1 -1
  65. package/dist/parser/parse-worker-pool.d.ts +59 -0
  66. package/dist/parser/parse-worker-pool.d.ts.map +1 -0
  67. package/dist/parser/parse-worker-pool.js +170 -0
  68. package/dist/parser/parse-worker-pool.js.map +1 -0
  69. package/dist/parser/parse-worker.d.ts +2 -0
  70. package/dist/parser/parse-worker.d.ts.map +1 -0
  71. package/dist/parser/parse-worker.js +71 -0
  72. package/dist/parser/parse-worker.js.map +1 -0
  73. package/dist/parser/process-parse-worker-pools.d.ts +18 -0
  74. package/dist/parser/process-parse-worker-pools.d.ts.map +1 -0
  75. package/dist/parser/process-parse-worker-pools.js +31 -0
  76. package/dist/parser/process-parse-worker-pools.js.map +1 -0
  77. package/dist/plugins/cpp/builders/class-builder.d.ts +2 -2
  78. package/dist/plugins/cpp/builders/class-builder.d.ts.map +1 -1
  79. package/dist/plugins/cpp/builders/class-builder.js.map +1 -1
  80. package/dist/plugins/cpp/index.d.ts +4 -1
  81. package/dist/plugins/cpp/index.d.ts.map +1 -1
  82. package/dist/plugins/cpp/index.js +11 -2
  83. package/dist/plugins/cpp/index.js.map +1 -1
  84. package/dist/plugins/cpp/tree-sitter-bridge.d.ts +3 -2
  85. package/dist/plugins/cpp/tree-sitter-bridge.d.ts.map +1 -1
  86. package/dist/plugins/cpp/tree-sitter-bridge.js +17 -15
  87. package/dist/plugins/cpp/tree-sitter-bridge.js.map +1 -1
  88. package/dist/plugins/golang/builders/function-builder.d.ts +4 -4
  89. package/dist/plugins/golang/builders/function-builder.d.ts.map +1 -1
  90. package/dist/plugins/golang/builders/function-builder.js.map +1 -1
  91. package/dist/plugins/golang/builders/goroutine-builder.d.ts +2 -2
  92. package/dist/plugins/golang/builders/goroutine-builder.d.ts.map +1 -1
  93. package/dist/plugins/golang/builders/goroutine-builder.js.map +1 -1
  94. package/dist/plugins/golang/builders/interface-builder.d.ts +4 -4
  95. package/dist/plugins/golang/builders/interface-builder.d.ts.map +1 -1
  96. package/dist/plugins/golang/builders/interface-builder.js.map +1 -1
  97. package/dist/plugins/golang/builders/node-utils.d.ts +3 -3
  98. package/dist/plugins/golang/builders/node-utils.d.ts.map +1 -1
  99. package/dist/plugins/golang/builders/node-utils.js.map +1 -1
  100. package/dist/plugins/golang/builders/struct-builder.d.ts +2 -2
  101. package/dist/plugins/golang/builders/struct-builder.d.ts.map +1 -1
  102. package/dist/plugins/golang/builders/struct-builder.js.map +1 -1
  103. package/dist/plugins/golang/go-parse-coordinator.d.ts +10 -2
  104. package/dist/plugins/golang/go-parse-coordinator.d.ts.map +1 -1
  105. package/dist/plugins/golang/go-parse-coordinator.js +44 -6
  106. package/dist/plugins/golang/go-parse-coordinator.js.map +1 -1
  107. package/dist/plugins/golang/gopls-client.d.ts +31 -2
  108. package/dist/plugins/golang/gopls-client.d.ts.map +1 -1
  109. package/dist/plugins/golang/gopls-client.js +230 -32
  110. package/dist/plugins/golang/gopls-client.js.map +1 -1
  111. package/dist/plugins/golang/gopls-interface-resolver.d.ts +14 -1
  112. package/dist/plugins/golang/gopls-interface-resolver.d.ts.map +1 -1
  113. package/dist/plugins/golang/gopls-interface-resolver.js +42 -11
  114. package/dist/plugins/golang/gopls-interface-resolver.js.map +1 -1
  115. package/dist/plugins/golang/index.d.ts +3 -1
  116. package/dist/plugins/golang/index.d.ts.map +1 -1
  117. package/dist/plugins/golang/index.js +17 -3
  118. package/dist/plugins/golang/index.js.map +1 -1
  119. package/dist/plugins/golang/interface-matcher.d.ts.map +1 -1
  120. package/dist/plugins/golang/interface-matcher.js +32 -30
  121. package/dist/plugins/golang/interface-matcher.js.map +1 -1
  122. package/dist/plugins/golang/tree-sitter-bridge.d.ts +3 -2
  123. package/dist/plugins/golang/tree-sitter-bridge.d.ts.map +1 -1
  124. package/dist/plugins/golang/tree-sitter-bridge.js +25 -23
  125. package/dist/plugins/golang/tree-sitter-bridge.js.map +1 -1
  126. package/dist/plugins/java/index.d.ts +4 -0
  127. package/dist/plugins/java/index.d.ts.map +1 -1
  128. package/dist/plugins/java/index.js +12 -1
  129. package/dist/plugins/java/index.js.map +1 -1
  130. package/dist/plugins/java/tree-sitter-bridge.d.ts +3 -2
  131. package/dist/plugins/java/tree-sitter-bridge.d.ts.map +1 -1
  132. package/dist/plugins/java/tree-sitter-bridge.js +33 -31
  133. package/dist/plugins/java/tree-sitter-bridge.js.map +1 -1
  134. package/dist/plugins/kotlin/builders/class-builder.d.ts +2 -1
  135. package/dist/plugins/kotlin/builders/class-builder.d.ts.map +1 -1
  136. package/dist/plugins/kotlin/builders/class-builder.js.map +1 -1
  137. package/dist/plugins/kotlin/builders/function-builder.d.ts +2 -1
  138. package/dist/plugins/kotlin/builders/function-builder.d.ts.map +1 -1
  139. package/dist/plugins/kotlin/builders/function-builder.js.map +1 -1
  140. package/dist/plugins/kotlin/index.d.ts +4 -1
  141. package/dist/plugins/kotlin/index.d.ts.map +1 -1
  142. package/dist/plugins/kotlin/index.js +12 -4
  143. package/dist/plugins/kotlin/index.js.map +1 -1
  144. package/dist/plugins/kotlin/tree-sitter-bridge.d.ts +3 -3
  145. package/dist/plugins/kotlin/tree-sitter-bridge.d.ts.map +1 -1
  146. package/dist/plugins/kotlin/tree-sitter-bridge.js +6 -7
  147. package/dist/plugins/kotlin/tree-sitter-bridge.js.map +1 -1
  148. package/dist/plugins/python/index.d.ts +4 -0
  149. package/dist/plugins/python/index.d.ts.map +1 -1
  150. package/dist/plugins/python/index.js +12 -1
  151. package/dist/plugins/python/index.js.map +1 -1
  152. package/dist/plugins/python/tree-sitter-bridge.d.ts +3 -2
  153. package/dist/plugins/python/tree-sitter-bridge.d.ts.map +1 -1
  154. package/dist/plugins/python/tree-sitter-bridge.js +50 -48
  155. package/dist/plugins/python/tree-sitter-bridge.js.map +1 -1
  156. package/dist/plugins/shared/native-parser-backend.d.ts +33 -0
  157. package/dist/plugins/shared/native-parser-backend.d.ts.map +1 -0
  158. package/dist/plugins/shared/native-parser-backend.js +84 -0
  159. package/dist/plugins/shared/native-parser-backend.js.map +1 -0
  160. package/dist/plugins/shared/parser-backend.d.ts +13 -0
  161. package/dist/plugins/shared/parser-backend.d.ts.map +1 -0
  162. package/dist/plugins/shared/parser-backend.js +38 -0
  163. package/dist/plugins/shared/parser-backend.js.map +1 -0
  164. package/dist/plugins/shared/parser-runtime.d.ts +32 -0
  165. package/dist/plugins/shared/parser-runtime.d.ts.map +1 -0
  166. package/dist/plugins/shared/parser-runtime.js +152 -0
  167. package/dist/plugins/shared/parser-runtime.js.map +1 -0
  168. package/dist/plugins/shared/plugin-factory.d.ts +5 -0
  169. package/dist/plugins/shared/plugin-factory.d.ts.map +1 -0
  170. package/dist/plugins/shared/plugin-factory.js +27 -0
  171. package/dist/plugins/shared/plugin-factory.js.map +1 -0
  172. package/dist/plugins/shared/syntax-tree.d.ts +32 -0
  173. package/dist/plugins/shared/syntax-tree.d.ts.map +1 -0
  174. package/dist/plugins/shared/syntax-tree.js +2 -0
  175. package/dist/plugins/shared/syntax-tree.js.map +1 -0
  176. package/dist/plugins/shared/wasm-parser-backend.d.ts +18 -0
  177. package/dist/plugins/shared/wasm-parser-backend.d.ts.map +1 -0
  178. package/dist/plugins/shared/wasm-parser-backend.js +118 -0
  179. package/dist/plugins/shared/wasm-parser-backend.js.map +1 -0
  180. package/dist/plugins/typescript/builders/module-graph-builder.d.ts.map +1 -1
  181. package/dist/plugins/typescript/builders/module-graph-builder.js +2 -1
  182. package/dist/plugins/typescript/builders/module-graph-builder.js.map +1 -1
  183. package/dist/types/config-global.d.ts +7 -1
  184. package/dist/types/config-global.d.ts.map +1 -1
  185. package/dist/types/config.d.ts +1 -0
  186. package/dist/types/config.d.ts.map +1 -1
  187. package/dist/types/config.js +1 -0
  188. package/dist/types/config.js.map +1 -1
  189. package/dist/types/fitness-rules.d.ts +34 -0
  190. package/dist/types/fitness-rules.d.ts.map +1 -0
  191. package/dist/types/fitness-rules.js +2 -0
  192. package/dist/types/fitness-rules.js.map +1 -0
  193. package/dist/types/parser-runtime.d.ts +4 -0
  194. package/dist/types/parser-runtime.d.ts.map +1 -0
  195. package/dist/types/parser-runtime.js +5 -0
  196. package/dist/types/parser-runtime.js.map +1 -0
  197. package/package.json +29 -16
  198. package/node_modules/node-addon-api/LICENSE.md +0 -9
  199. package/node_modules/node-addon-api/README.md +0 -95
  200. package/node_modules/node-addon-api/common.gypi +0 -21
  201. package/node_modules/node-addon-api/except.gypi +0 -25
  202. package/node_modules/node-addon-api/index.js +0 -14
  203. package/node_modules/node-addon-api/napi-inl.deprecated.h +0 -186
  204. package/node_modules/node-addon-api/napi-inl.h +0 -7033
  205. package/node_modules/node-addon-api/napi.h +0 -3309
  206. package/node_modules/node-addon-api/node_addon_api.gyp +0 -42
  207. package/node_modules/node-addon-api/node_api.gyp +0 -9
  208. package/node_modules/node-addon-api/noexcept.gypi +0 -26
  209. package/node_modules/node-addon-api/nothing.c +0 -0
  210. package/node_modules/node-addon-api/package-support.json +0 -21
  211. package/node_modules/node-addon-api/package.json +0 -480
  212. package/node_modules/node-addon-api/tools/README.md +0 -73
  213. package/node_modules/node-addon-api/tools/check-napi.js +0 -99
  214. package/node_modules/node-addon-api/tools/clang-format.js +0 -71
  215. package/node_modules/node-addon-api/tools/conversion.js +0 -301
  216. package/node_modules/node-gyp-build/README.md +0 -58
  217. package/node_modules/node-gyp-build/SECURITY.md +0 -5
  218. package/node_modules/node-gyp-build/bin.js +0 -84
  219. package/node_modules/node-gyp-build/build-test.js +0 -19
  220. package/node_modules/node-gyp-build/index.js +0 -6
  221. package/node_modules/node-gyp-build/node-gyp-build.js +0 -207
  222. package/node_modules/node-gyp-build/optional.js +0 -7
  223. package/node_modules/node-gyp-build/package.json +0 -43
  224. package/node_modules/tree-sitter/README.md +0 -128
  225. package/node_modules/tree-sitter/binding.gyp +0 -80
  226. package/node_modules/tree-sitter/index.js +0 -916
  227. package/node_modules/tree-sitter/package.json +0 -76
  228. package/node_modules/tree-sitter/prebuilds/linux-x64/node.napi.glibc.node +0 -0
  229. package/node_modules/tree-sitter/src/addon_data.h +0 -47
  230. package/node_modules/tree-sitter/src/binding.cc +0 -35
  231. package/node_modules/tree-sitter/src/conversions.cc +0 -140
  232. package/node_modules/tree-sitter/src/conversions.h +0 -22
  233. package/node_modules/tree-sitter/src/language.cc +0 -106
  234. package/node_modules/tree-sitter/src/language.h +0 -17
  235. package/node_modules/tree-sitter/src/logger.cc +0 -70
  236. package/node_modules/tree-sitter/src/logger.h +0 -19
  237. package/node_modules/tree-sitter/src/lookaheaditerator.cc +0 -122
  238. package/node_modules/tree-sitter/src/lookaheaditerator.h +0 -33
  239. package/node_modules/tree-sitter/src/node.cc +0 -1088
  240. package/node_modules/tree-sitter/src/node.h +0 -30
  241. package/node_modules/tree-sitter/src/parser.cc +0 -306
  242. package/node_modules/tree-sitter/src/parser.h +0 -35
  243. package/node_modules/tree-sitter/src/query.cc +0 -397
  244. package/node_modules/tree-sitter/src/query.h +0 -40
  245. package/node_modules/tree-sitter/src/tree.cc +0 -316
  246. package/node_modules/tree-sitter/src/tree.h +0 -45
  247. package/node_modules/tree-sitter/src/tree_cursor.cc +0 -213
  248. package/node_modules/tree-sitter/src/tree_cursor.h +0 -52
  249. package/node_modules/tree-sitter/tree-sitter.d.ts +0 -1042
  250. package/node_modules/tree-sitter/vendor/tree-sitter/lib/include/tree_sitter/api.h +0 -1478
  251. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.c +0 -48
  252. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.h +0 -41
  253. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/array.h +0 -291
  254. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/atomic.h +0 -68
  255. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/clock.h +0 -146
  256. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/error_costs.h +0 -11
  257. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/get_changed_ranges.c +0 -523
  258. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/get_changed_ranges.h +0 -36
  259. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/host.h +0 -21
  260. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.c +0 -293
  261. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.h +0 -293
  262. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/length.h +0 -52
  263. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.c +0 -483
  264. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.h +0 -54
  265. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lib.c +0 -12
  266. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/node.c +0 -875
  267. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.c +0 -2293
  268. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.h +0 -286
  269. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/point.h +0 -48
  270. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/portable/endian.h +0 -239
  271. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/query.c +0 -4350
  272. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/reduce_action.h +0 -34
  273. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/reusable_node.h +0 -95
  274. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.c +0 -911
  275. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.h +0 -133
  276. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.c +0 -1034
  277. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.h +0 -399
  278. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.c +0 -170
  279. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.h +0 -31
  280. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree_cursor.c +0 -717
  281. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree_cursor.h +0 -48
  282. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/ts_assert.h +0 -11
  283. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/ICU_SHA +0 -1
  284. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/LICENSE +0 -414
  285. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/README.md +0 -29
  286. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/ptypes.h +0 -1
  287. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/umachine.h +0 -448
  288. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/urename.h +0 -1
  289. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf.h +0 -1
  290. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf16.h +0 -733
  291. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf8.h +0 -881
  292. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode.h +0 -75
  293. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/stdlib-symbols.txt +0 -24
  294. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/stdlib.c +0 -113
  295. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/wasm-stdlib.h +0 -1314
  296. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm_store.c +0 -1935
  297. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm_store.h +0 -31
  298. package/scripts/postinstall-tree-sitter.mjs +0 -28
package/README.md CHANGED
@@ -38,30 +38,91 @@ npm install -g @yalehwang/archguard
38
38
 
39
39
  ### Using with Claude Code
40
40
 
41
- Register the MCP server (project scope):
41
+ Install ArchGuard as a Claude Code plugin from the npm-source marketplace.
42
+ Claude Code runs `npm install` of the plugin package, which depends on an
43
+ exact `@yalehwang/archguard` version — the full runtime dependency closure
44
+ (ordinary JS dependencies, `web-tree-sitter`, bundled grammar WASM assets,
45
+ platform-selected optional packages) is resolved on your machine, with no
46
+ global `archguard` binary, vendored `node_modules`, or `NODE_PATH` involved:
42
47
 
43
48
  ```bash
44
- claude mcp add --scope project archguard -- archguard mcp
49
+ claude plugin marketplace add yaleh/archguard
50
+ claude plugin install archguard@archguard
45
51
  ```
46
52
 
47
- Or install it for Claude Code user scope, including the bundled repository
48
- skills from this checkout:
53
+ Restart Claude Code afterwards so the plugin loads. The plugin bundles the
54
+ `archguard` MCP server (launched via `plugin/mcp-launcher.mjs`, which resolves
55
+ the ArchGuard CLI entry from the plugin's own npm dependency tree) plus the
56
+ `feature-developer` and `project-semantics-discovery` skills.
57
+
58
+ Alternatively, register the MCP server directly without the plugin (project
59
+ scope, requires a global `archguard` install):
49
60
 
50
61
  ```bash
51
- bash scripts/install-claude-user-scope.sh
62
+ claude mcp add --scope project archguard -- archguard mcp
52
63
  ```
53
64
 
54
- This installs the `archguard` binary globally for the current user, registers
55
- `archguard mcp` in `~/.claude/mcp.json`, and syncs all skills from
56
- `.agents/skills/` into `~/.claude/skills/`.
65
+ For a local checkout, `scripts/install-claude-user-scope.sh` runs the same
66
+ npm-source marketplace flow against your checkout: it adds (or updates) the
67
+ `archguard` marketplace registration, installs (or updates) the
68
+ `archguard@archguard` plugin at user scope, and removes any legacy ArchGuard
69
+ entry that older installers left in the deprecated `~/.claude/mcp.json`. It
70
+ never installs a global `archguard` binary, never writes a registration into
71
+ `~/.claude/mcp.json`, and never installs or builds native Tree-sitter
72
+ packages. The script is idempotent — re-run it to upgrade after pulling a
73
+ new version:
57
74
 
58
- If you already have fresh `dist/` artifacts and only want to re-install the user
59
- scope wiring, use:
75
+ ```bash
76
+ bash scripts/install-claude-user-scope.sh
77
+ # Register the GitHub marketplace source instead of the local checkout:
78
+ bash scripts/install-claude-user-scope.sh --marketplace-source yaleh/archguard
79
+ ```
80
+
81
+ ### Parser runtime selection (auto | native | wasm)
82
+
83
+ A normal install is the **deterministic WASM baseline**: `web-tree-sitter`
84
+ plus the bundled grammar WASM assets are always installed, and the native
85
+ `tree-sitter` runtime/grammar packages are never installed or built by
86
+ ArchGuard itself. This holds for the Claude plugin installer as well:
87
+ `scripts/install-claude-user-scope.sh` never installs, builds, or globally
88
+ mutates native Tree-sitter packages — the plugin closure it registers is the
89
+ WASM baseline. Per language, `ARCHGUARD_PARSER_RUNTIME` selects the
90
+ backend:
91
+
92
+ - `auto` (default) — probe the native `(runtime, grammar)` tuple with a health
93
+ check; use native only when the probe passes, otherwise fall back to WASM
94
+ and record the reason in diagnostics.
95
+ - `native` — require native; fail loudly with an actionable error if the
96
+ probe fails (never silently substitutes WASM).
97
+ - `wasm` — never touch native modules; portable and deterministic.
98
+
99
+ `ARCHGUARD_PARSER_RUNTIME` is the canonical setting. The former
100
+ `ARCHGUARD_PARSER_BACKEND` is a deprecated alias: it applies only when the
101
+ canonical variable is unset, and ArchGuard then prints a one-time stderr
102
+ warning. Every analysis surfaces a one-line effective-runtime summary —
103
+ language → backend chosen → source of choice → fallback reason — in
104
+ `--verbose` mode and always when a fallback occurs; MCP protocol output
105
+ stays clean (diagnostics route to stderr).
60
106
 
61
107
  ```bash
62
- bash scripts/install-claude-user-scope.sh --skip-build
108
+ # Default (auto): per-language health-checked native-first selection with WASM fallback
109
+ ARCHGUARD_PARSER_RUNTIME=auto archguard analyze -s ./src --lang go
110
+
111
+ # Force the portable baseline (diagnostics, restricted CI)
112
+ ARCHGUARD_PARSER_RUNTIME=wasm archguard analyze -s ./src --lang go
113
+
114
+ # Require the native accelerator; fail if unavailable or ABI-incompatible
115
+ ARCHGUARD_PARSER_RUNTIME=native archguard analyze -s ./src --lang go
63
116
  ```
64
117
 
118
+ Native acceleration is opt-in and discovered only at runtime: install the
119
+ optional native packages (`tree-sitter` + the per-language grammar packages,
120
+ declared as optional peers) into ArchGuard's own package scope, or point
121
+ `ARCHGUARD_NATIVE_MODULE_ROOT=/path/to/root` at a trusted module root
122
+ containing them. The analyzed project's `node_modules` is never consulted.
123
+ See [Parser Runtime Selection](docs/user-guide/parser-runtime.md) for the
124
+ full policy.
125
+
65
126
  Then ask Claude to analyze any project:
66
127
 
67
128
  > Analyze the architecture of `/path/to/my-project` using archguard MCP.
@@ -96,21 +157,45 @@ Claude will call `archguard_analyze(includeTests: true)`, then sequence through
96
157
 
97
158
  ### Using with Codex
98
159
 
99
- Register the MCP server:
160
+ Codex does not read Claude plugin manifests, so its MCP configuration must
161
+ launch an ArchGuard installation that owns its own runtime dependency closure.
162
+ `scripts/install-codex-user-scope.sh` registers exactly one TOML-safe
163
+ `[mcp_servers.archguard]` table in the Codex user config
164
+ (`~/.codex/config.toml`, or `$CODEX_HOME/config.toml`) that invokes the
165
+ npm-installed `@yalehwang/archguard` CLI — never Claude's versioned plugin
166
+ cache and never the source checkout:
100
167
 
101
168
  ```bash
102
- codex mcp add archguard -- archguard mcp
169
+ # Registers the global npm install (discovered via `npm root -g`):
170
+ bash scripts/install-codex-user-scope.sh
171
+
172
+ # Or point at a specific npm-installed ArchGuard root explicitly:
173
+ bash scripts/install-codex-user-scope.sh --archguard-root "$(npm root -g)"
103
174
  ```
104
175
 
105
- Or add to `~/.codex/config.toml`:
176
+ The installer is idempotent (re-run it to refresh after an upgrade): it updates
177
+ the single archguard table in place, preserves all unrelated Codex
178
+ configuration, and forwards the parser-runtime policy as
179
+ `ARCHGUARD_PARSER_RUNTIME` (`--parser-runtime auto|native|wasm`, default
180
+ `auto`). It writes an entry of this shape:
106
181
 
107
182
  ```toml
108
183
  [mcp_servers.archguard]
109
- command = "archguard"
110
- args = ["mcp"]
184
+ command = "node"
185
+ args = ["<npm-install>/@yalehwang/archguard/dist/cli/index.js", "mcp"]
186
+ env = { ARCHGUARD_PARSER_RUNTIME = "auto" }
187
+ startup_timeout_sec = 30
188
+ tool_timeout_sec = 120
189
+ ```
190
+
191
+ Alternatively, register manually (requires `archguard` on Codex's `PATH`):
192
+
193
+ ```bash
194
+ codex mcp add archguard -- archguard mcp
111
195
  ```
112
196
 
113
- Then prompt Codex in the same way. The same MCP tools are available.
197
+ Then prompt Codex in the same way and verify in the Codex TUI with `/mcp` (or
198
+ `codex mcp list`). The same MCP tools are available.
114
199
 
115
200
  ### Analyzing an External Project
116
201
 
@@ -265,10 +350,12 @@ The MCP server exposes the query tools plus `archguard_analyze`, which refreshes
265
350
  claude mcp add --scope project archguard -- archguard mcp
266
351
  ```
267
352
 
268
- **Codex** — add via CLI or `~/.codex/config.toml`:
353
+ **Codex** — register at user scope via the installer (launches the
354
+ npm-installed CLI), or manually via CLI / `~/.codex/config.toml`:
269
355
 
270
356
  ```bash
271
- codex mcp add archguard -- archguard mcp
357
+ bash scripts/install-codex-user-scope.sh # idempotent, TOML-safe
358
+ codex mcp add archguard -- archguard mcp # manual alternative
272
359
  ```
273
360
 
274
361
  **Available MCP tools:**
@@ -0,0 +1,101 @@
1
+ <!-- Generated by scripts/benchmark-parser-backends.mjs (npm run build first). -->
2
+ # Parser backend benchmark (native vs WASM)
3
+
4
+ - date: 2026-07-30
5
+ - node: v26.5.0
6
+ - platform: linux/x64
7
+ - iterations per fixture: 50 (after warm-up)
8
+
9
+ | language | parser-only native (ms) | parser-only wasm (ms) | ratio | pipeline native (ms) | pipeline wasm (ms) | ratio |
10
+ |---|---|---|---|---|---|---|
11
+ | go | 0.235 | 0.731 | 3.11x | 2.998 | 1.378 | 0.46x |
12
+ | java | 0.271 | 0.377 | 1.39x | 2.232 | 0.974 | 0.44x |
13
+ | python | 0.383 | 0.329 | 0.86x | 1.680 | 0.628 | 0.37x |
14
+ | cpp | 0.691 | 2.057 | 2.98x | 3.160 | 1.553 | 0.49x |
15
+ | kotlin | 0.560 | 1.848 | 3.30x | 5.585 | 1.902 | 0.34x |
16
+ | **mean** | 0.428 | 1.069 | **2.33x** | 3.131 | 1.287 | **0.42x** |
17
+
18
+ "pipeline" = plugin.parseCode() (tree-sitter parse + extractor + ArchJSON mapping),
19
+ the parse-dominated portion of an end-to-end ArchGuard analysis.
20
+
21
+ ## TASK-40 after: process caches and parse-worker crossover
22
+
23
+ Measured 2026-07-30 on Node v26.5.0, linux/x64, 4 cores. The small/medium
24
+ runs were heavily contended by three concurrent task worktrees (1-minute load
25
+ 9.40-9.97); the large run had load 2.47. Ratios, not absolute timings, are the
26
+ decision evidence.
27
+
28
+ | fixture size | iterations | parser-only native (mean ms) | parser-only WASM (mean ms) | ratio | full-analysis native (mean ms) | full-analysis WASM (mean ms) | ratio |
29
+ |---|---:|---:|---:|---:|---:|---:|---:|
30
+ | small (1x) | 20 | 0.677 | 0.589 | **1.09x** | 3.400 | 1.188 | **0.45x** |
31
+ | medium (10x) | 10 | 13.719 | 8.378 | **1.05x** | 38.818 | 14.469 | **0.42x** |
32
+ | large (50x) | 5 | 48.947 | 28.224 | **0.93x** | 157.095 | 54.580 | **0.41x** |
33
+
34
+ The committed worker threshold is **12 files** (`PARSE_WORKER_THRESHOLD`). Below
35
+ that, serial parsing avoids worker startup; above it, synchronous parsing runs
36
+ in a bounded pool (maximum configured concurrency). WASM runtime and grammar
37
+ promises are cached per asset directory for the process lifetime and parser
38
+ sessions are reused within their owning worker/plugin.
39
+
40
+ Decision: no exception to the 2.5x full-analysis ceiling is needed. Both measured
41
+ full-analysis ratios are below 1x on this host (and therefore within the stated
42
+ "never exceeds 2.5x" bound). The earlier uncontended baseline remains above for
43
+ comparison; the contended after run must not be read as an absolute speedup.
44
+ Memory/shutdown evidence is enforced by `wasm-memory.test.ts` and
45
+ `parser-pool.test.ts` (success/error termination and serial/parallel determinism).
46
+
47
+
48
+ ### TASK-40 audit remediation: real end-to-end path
49
+
50
+ Measured after production wiring on Node v26.5.0, linux/x64, 4 cores, 1-minute
51
+ load 2.44. Each end-to-end fixture is a 12-file project and includes file
52
+ discovery, runtime selection, threshold decision, process pool lifecycle,
53
+ analysis merge, and query persistence.
54
+
55
+ | scope | parser-only ratio | parse+extract ratio | end-to-end ratio |
56
+ |---|---:|---:|---:|
57
+ | five-language mean | **1.32x** | **0.54x** | **0.62x** |
58
+
59
+ Per-language end-to-end WASM/native ratios: Go 0.17x, Java 0.66x, Python
60
+ 0.97x, C++ 0.64x, Kotlin 0.65x. No result exceeds the 2.5x ceiling. Absolute
61
+ means were 127.9 ms native and 86.5 ms WASM under the recorded load. The
62
+ benchmark uses `runAnalysis()` rather than treating `plugin.parseCode()` as a
63
+ complete analysis; the latter remains separately reported as parse+extract.
64
+
65
+
66
+ ### TASK-40 final audit: verified project-worker dispatch
67
+
68
+ Node v26.5.0, linux/x64, 4 cores; load average 3.30/1.58/1.36. The benchmark
69
+ now fails if `ProcessParseWorkerPools.dispatchCount` remains zero, proving each
70
+ native and WASM sample crossed the 12-file threshold and executed the language
71
+ plugin's complete `parseProject()` inside a real worker. Three measured runs per
72
+ parser-only fixture were used; each end-to-end runtime analyzed one 12-file
73
+ project.
74
+
75
+ | measure | native mean | WASM mean | WASM/native |
76
+ |---|---:|---:|---:|
77
+ | parser-only | 0.713 ms | 0.665 ms | **1.32x** (mean language ratio) |
78
+ | parse+extract | 3.586 ms | 1.476 ms | **0.50x** |
79
+ | end-to-end project | 2141.8 ms | 1858.0 ms | **0.74x** |
80
+
81
+ End-to-end per-language ratios: Go 0.17x, Java 0.77x, Python 0.95x, C++
82
+ 1.05x, Kotlin 0.76x. No 2.5x exception is required. The higher absolute times
83
+ relative to the earlier audit run are worker startup and complete project
84
+ plugin initialization now honestly included rather than bypassed.
85
+
86
+ ### TASK-40 targeted audit: alternating repeated E2E samples
87
+
88
+ Clean build, Node v26.5.0, linux/x64, 4 cores; load 3.53/2.23/1.74.
89
+ Each backend ran three complete 12-file analyses, alternating order by
90
+ iteration. The benchmark fails closed when worker dispatch is zero and compares
91
+ canonical structural output (version, language, source files, entities,
92
+ relations, modules) across native/WASM and all iterations.
93
+
94
+ | measure | native mean | WASM mean | ratio |
95
+ |---|---:|---:|---:|
96
+ | parser-only | 0.766 ms | 0.688 ms | **1.33x** mean language ratio |
97
+ | parse+extract | 3.818 ms | 1.735 ms | **0.54x** |
98
+ | E2E median of 3/backend | 781.1 ms | 774.1 ms | **1.00x** |
99
+
100
+ E2E ratios: Go 1.01x, Java 1.13x, Python 1.02x, C++ 0.89x, Kotlin
101
+ 0.95x. All structural outputs were equivalent and no ratio exceeded 2.5x.
@@ -0,0 +1,8 @@
1
+ {
2
+ "tree-sitter.wasm": "sha256:f38dcc4b43b818f9a0785bc1c6d5611a75ac4cdd428ff3f02757c34ca4e46d7f",
3
+ "tree-sitter-go.wasm": "sha256:9504573f352b20be7f2f1911754d710622aedc15afff16d5ed8fb5645681aee7",
4
+ "tree-sitter-java.wasm": "sha256:4fdeac4ca6ca089f06c6f7e562abcac1733cd465728cc7031ebb73c2019122c4",
5
+ "tree-sitter-python.wasm": "sha256:16108b50df4ee9a30168794252ab55e7c93bfc5765d7fa0aa3e335752c515f47",
6
+ "tree-sitter-cpp.wasm": "sha256:174eb0deb75b2ec7881bcacda9f995648d8e683956e5c2267e69ab6dc503fcbf",
7
+ "tree-sitter-kotlin.wasm": "sha256:7009d69453bc8735e438b2818a633efb21c88f99782769abba60dffedfab73f7"
8
+ }
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2014 maxbrunsfeld
3
+ Copyright (c) 2014 Max Brunsfeld
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
21
+ SOFTWARE.
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2017 Mathias Buus
3
+ Copyright (c) 2014 Max Brunsfeld
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
9
  copies of the Software, and to permit persons to whom the Software is
10
10
  furnished to do so, subject to the following conditions:
11
11
 
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
14
 
15
15
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2017 Ayman Nadeem
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 Amaan Qureshi <amaanq12@gmail.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Max Brunsfeld
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018-2024 Max Brunsfeld
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,66 @@
1
+ {
2
+ "generatedBy": "scripts/fetch-grammar-wasms.mjs",
3
+ "abi": "tree-sitter ABI 14/15 (web-tree-sitter 0.25.x)",
4
+ "sources": [
5
+ {
6
+ "asset": "tree-sitter.wasm",
7
+ "role": "runtime",
8
+ "package": "web-tree-sitter",
9
+ "version": "0.25.10",
10
+ "license": "MIT",
11
+ "licenseFile": "licenses/tree-sitter.LICENSE",
12
+ "tarball": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.25.10.tgz",
13
+ "tarballIntegrity": "sha512-Y09sF44/13XvgVKgO2cNDw5rGk6s26MgoZPXLESvMXeefBf7i6/73eFurre0IsTW6E14Y0ArIzhUMmjoc7xyzA=="
14
+ },
15
+ {
16
+ "asset": "tree-sitter-go.wasm",
17
+ "role": "grammar",
18
+ "package": "tree-sitter-go",
19
+ "version": "0.25.0",
20
+ "license": "MIT",
21
+ "licenseFile": "licenses/tree-sitter-go.LICENSE",
22
+ "tarball": "https://registry.npmjs.org/tree-sitter-go/-/tree-sitter-go-0.25.0.tgz",
23
+ "tarballIntegrity": "sha512-APBc/Dq3xz/e35Xpkhb1blu5UgW+2E3RyGWawZSCNcbGwa7jhSQPS8KsUupuzBla8PCo8+lz9W/JDJjmfRa2tw=="
24
+ },
25
+ {
26
+ "asset": "tree-sitter-java.wasm",
27
+ "role": "grammar",
28
+ "package": "tree-sitter-java",
29
+ "version": "0.23.5",
30
+ "license": "MIT",
31
+ "licenseFile": "licenses/tree-sitter-java.LICENSE",
32
+ "tarball": "https://registry.npmjs.org/tree-sitter-java/-/tree-sitter-java-0.23.5.tgz",
33
+ "tarballIntegrity": "sha512-Yju7oQ0Xx7GcUT01mUglPP+bYfvqjNCGdxqigTnew9nLGoII42PNVP3bHrYeMxswiCRM0yubWmN5qk+zsg0zMA=="
34
+ },
35
+ {
36
+ "asset": "tree-sitter-python.wasm",
37
+ "role": "grammar",
38
+ "package": "tree-sitter-python",
39
+ "version": "0.25.0",
40
+ "license": "MIT",
41
+ "licenseFile": "licenses/tree-sitter-python.LICENSE",
42
+ "tarball": "https://registry.npmjs.org/tree-sitter-python/-/tree-sitter-python-0.25.0.tgz",
43
+ "tarballIntegrity": "sha512-eCmJx6zQa35GxaCtQD+wXHOhYqBxEL+bp71W/s3fcDMu06MrtzkVXR437dRrCrbrDbyLuUDJpAgycs7ncngLXw=="
44
+ },
45
+ {
46
+ "asset": "tree-sitter-cpp.wasm",
47
+ "role": "grammar",
48
+ "package": "tree-sitter-cpp",
49
+ "version": "0.23.4",
50
+ "license": "MIT",
51
+ "licenseFile": "licenses/tree-sitter-cpp.LICENSE",
52
+ "tarball": "https://registry.npmjs.org/tree-sitter-cpp/-/tree-sitter-cpp-0.23.4.tgz",
53
+ "tarballIntegrity": "sha512-qR5qUDyhZ5jJ6V8/umiBxokRbe89bCGmcq/dk94wI4kN86qfdV8k0GHIUEKaqWgcu42wKal5E97LKpLeVW8sKw=="
54
+ },
55
+ {
56
+ "asset": "tree-sitter-kotlin.wasm",
57
+ "role": "grammar",
58
+ "package": "@tree-sitter-grammars/tree-sitter-kotlin",
59
+ "version": "1.1.0",
60
+ "license": "MIT",
61
+ "licenseFile": "licenses/tree-sitter-kotlin.LICENSE",
62
+ "tarball": "https://registry.npmjs.org/@tree-sitter-grammars/tree-sitter-kotlin/-/tree-sitter-kotlin-1.1.0.tgz",
63
+ "tarballIntegrity": "sha512-vlVXaxEE8t2kpJgfZpa8XVvxcnKw9AYtRTgy7KWjsDmAsadk06RxAT80IXOgGQnmM9i/orQn1nD84gPNUHu6DQ=="
64
+ }
65
+ ]
66
+ }
Binary file
@@ -1,34 +1,2 @@
1
- export type ComparisonOp = '<' | '<=' | '>' | '>=' | '==' | '!=';
2
- export interface MetricThresholdRule {
3
- type?: 'metric';
4
- metric: string;
5
- op: ComparisonOp;
6
- value: number;
7
- message: string;
8
- }
9
- export interface DependencyConstraintRule {
10
- type: 'no-dependency';
11
- from: string;
12
- to: string;
13
- message: string;
14
- }
15
- export type GimLossType = 'feasibility' | 'consistency' | 'description-length' | 'generation-alignment';
16
- export interface GimLossRule {
17
- type: 'gim-loss';
18
- loss: GimLossType;
19
- op: ComparisonOp;
20
- value: number;
21
- message: string;
22
- }
23
- export type FitnessRule = MetricThresholdRule | DependencyConstraintRule | GimLossRule;
24
- export interface FitnessConfig {
25
- rules: FitnessRule[];
26
- failOnViolation: boolean;
27
- }
28
- export interface RuleResult {
29
- rule: FitnessRule;
30
- passed: boolean;
31
- actual?: number | string;
32
- detail?: string;
33
- }
1
+ export type { ComparisonOp, MetricThresholdRule, DependencyConstraintRule, GimLossType, GimLossRule, FitnessRule, FitnessConfig, RuleResult, } from '../../types/fitness-rules.js';
34
2
  //# sourceMappingURL=rule-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rule-types.d.ts","sourceRoot":"","sources":["../../../src/analysis/fitness/rule-types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEjE,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG,aAAa,GAAG,oBAAoB,GAAG,sBAAsB,CAAC;AAExG,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,WAAW,CAAC;IAClB,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,WAAW,GAAG,mBAAmB,GAAG,wBAAwB,GAAG,WAAW,CAAC;AAEvF,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
1
+ {"version":3,"file":"rule-types.d.ts","sourceRoot":"","sources":["../../../src/analysis/fitness/rule-types.ts"],"names":[],"mappings":"AAQA,YAAY,EACV,YAAY,EACZ,mBAAmB,EACnB,wBAAwB,EACxB,WAAW,EACX,WAAW,EACX,WAAW,EACX,aAAa,EACb,UAAU,GACX,MAAM,0BAA0B,CAAC"}
@@ -2,11 +2,15 @@ import type { Config } from '../config-loader.js';
2
2
  import type { CLIOptions, DiagramConfig } from '../../types/config.js';
3
3
  import type { ProgressReporterLike } from '../progress/index.js';
4
4
  import type { DiagramResult } from '../processors/diagram-processor.js';
5
+ import { type SelectParserBackendOptions } from '../../plugins/shared/parser-runtime.js';
6
+ import { ProcessParseWorkerPools } from '../../parser/process-parse-worker-pools.js';
7
+ export declare function loadPluginForLanguage(language: string, workspaceRoot: string, parserRuntime?: SelectParserBackendOptions): Promise<import('../../core/interfaces/language-plugin.js').ILanguagePlugin>;
5
8
  export interface RunAnalysisOptions {
6
9
  sessionRoot: string;
7
10
  workDir: string;
8
11
  cliOptions: Partial<CLIOptions>;
9
12
  reporter: ProgressReporterLike;
13
+ parseWorkerPools?: ProcessParseWorkerPools;
10
14
  }
11
15
  export interface RunAnalysisResult {
12
16
  config: Config;
@@ -1 +1 @@
1
- {"version":3,"file":"run-analysis.d.ts","sourceRoot":"","sources":["../../../src/cli/analyze/run-analysis.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAQjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AA8DxE,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAChC,QAAQ,EAAE,oBAAoB,CAAC;CAChC;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAQD,wBAAsB,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAmSzF"}
1
+ {"version":3,"file":"run-analysis.d.ts","sourceRoot":"","sources":["../../../src/cli/analyze/run-analysis.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAQjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAexE,OAAO,EAIL,KAAK,0BAA0B,EAChC,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAYjF,wBAAsB,qBAAqB,CACzC,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,aAAa,GAAE,0BAA+B,GAC7C,OAAO,CAAC,OAAO,sCAAsC,EAAE,eAAe,CAAC,CAsBzE;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAChC,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,gBAAgB,CAAC,EAAE,uBAAuB,CAAC;CAC5C;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAQD,wBAAsB,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAsVzF"}