seu-claude 1.1.1 → 2.3.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 (430) hide show
  1. package/.claude/settings.json +13 -0
  2. package/.claude/settings.local.json +62 -0
  3. package/.dockerignore +30 -0
  4. package/.eslintrc.cjs +81 -0
  5. package/.eslintrc.json +26 -0
  6. package/.github/CODEOWNERS +16 -0
  7. package/.github/ISSUE_TEMPLATE/bug_report.md +42 -0
  8. package/.github/ISSUE_TEMPLATE/feature_request.md +27 -0
  9. package/.github/PULL_REQUEST_TEMPLATE.md +45 -0
  10. package/.github/SUPPORT.md +54 -0
  11. package/.github/workflows/ci.yml +186 -0
  12. package/.github/workflows/release.yml +137 -0
  13. package/.github/workflows/security.yml +155 -0
  14. package/.github/workflows/stale.yml +27 -0
  15. package/.github/workflows/triage.yml +63 -0
  16. package/.husky/commit-msg +5 -0
  17. package/.husky/pre-commit +8 -0
  18. package/.prettierrc +9 -0
  19. package/.seu-claude-v2/phase4-tasks.db +0 -0
  20. package/ARCHITECTURE_V2.md +548 -0
  21. package/BRAND_CONTEXT.md +169 -0
  22. package/CHANGELOG.md +308 -0
  23. package/CLA.md +23 -0
  24. package/CODE_OF_CONDUCT.md +48 -0
  25. package/CONTINUE_SESSION.md +241 -0
  26. package/CONTRIBUTING.md +231 -0
  27. package/COVERAGE-PLAN.md +88 -0
  28. package/Dockerfile +70 -0
  29. package/FEATURE_AUDIT.md +135 -0
  30. package/FOLLOWUP.md +247 -0
  31. package/LAUNCH_STATUS.md +168 -0
  32. package/LICENSE_COMPLIANCE.md +141 -0
  33. package/MARKETING_KIT.md +326 -0
  34. package/PHASE3-PLAN.md +341 -0
  35. package/PHASE4_APPROACH.md +327 -0
  36. package/PHASE4_COMPLETE.md +321 -0
  37. package/PHASE4_SUMMARY.md +128 -0
  38. package/PRODUCTION_LAUNCH_PLAN.md +539 -0
  39. package/QUICKSTART.md +301 -0
  40. package/README.md +372 -241
  41. package/README_V1_LEGACY.md +531 -0
  42. package/RELEASE_NOTES_V2.3.0.md +394 -0
  43. package/ROADMAP_v2.md +36 -0
  44. package/SECURITY.md +79 -0
  45. package/SOCIAL_POSTS.md +193 -0
  46. package/TASK_CHECKLIST.md +248 -0
  47. package/USER_GUIDE.md +1072 -0
  48. package/V2_MIGRATION.md +402 -0
  49. package/agents/seu-context-summarizer.md +20 -0
  50. package/agents/seu-researcher.md +22 -0
  51. package/agents/seu-xref-explorer.md +23 -0
  52. package/articles/MEDIUM-ARTICLE-DRAFT.md +406 -0
  53. package/assets/landing-page/App.jsx +185 -0
  54. package/assets/logo.png +0 -0
  55. package/assets/logo.svg +52 -0
  56. package/assets/social-preview.png +0 -0
  57. package/assets/social-preview.svg +68 -0
  58. package/bench_img.py +59 -0
  59. package/benchmark-results/benchmark-2026-01-15T18-37-58-249Z.json +14 -0
  60. package/benchmark-results/benchmark-2026-01-15T19-13-32-863Z.json +14 -0
  61. package/benchmark-results.json +116 -0
  62. package/benchmark_results.png +0 -0
  63. package/benchmarks/performance.ts +264 -0
  64. package/commitlint.config.cjs +26 -0
  65. package/demo-linkedin.tape +30 -0
  66. package/demo.tape +105 -0
  67. package/dist/__tests__/crawler.test.js +99 -0
  68. package/dist/__tests__/crawler.test.js.map +1 -1
  69. package/dist/__tests__/embed.test.js +90 -1
  70. package/dist/__tests__/embed.test.js.map +1 -1
  71. package/dist/__tests__/mcp-server.test.d.ts +2 -0
  72. package/dist/__tests__/mcp-server.test.d.ts.map +1 -0
  73. package/dist/__tests__/mcp-server.test.js +29 -0
  74. package/dist/__tests__/mcp-server.test.js.map +1 -0
  75. package/dist/__tests__/search/bm25.test.d.ts +5 -0
  76. package/dist/__tests__/search/bm25.test.d.ts.map +1 -0
  77. package/dist/__tests__/search/bm25.test.js +224 -0
  78. package/dist/__tests__/search/bm25.test.js.map +1 -0
  79. package/dist/__tests__/search/fuzzy.test.d.ts +8 -0
  80. package/dist/__tests__/search/fuzzy.test.d.ts.map +1 -0
  81. package/dist/__tests__/search/fuzzy.test.js +277 -0
  82. package/dist/__tests__/search/fuzzy.test.js.map +1 -0
  83. package/dist/__tests__/search/hybrid.test.d.ts +5 -0
  84. package/dist/__tests__/search/hybrid.test.d.ts.map +1 -0
  85. package/dist/__tests__/search/hybrid.test.js +215 -0
  86. package/dist/__tests__/search/hybrid.test.js.map +1 -0
  87. package/dist/__tests__/search/ranker.test.d.ts +2 -0
  88. package/dist/__tests__/search/ranker.test.d.ts.map +1 -0
  89. package/dist/__tests__/search/ranker.test.js +398 -0
  90. package/dist/__tests__/search/ranker.test.js.map +1 -0
  91. package/dist/__tests__/server.test.js +3 -2
  92. package/dist/__tests__/server.test.js.map +1 -1
  93. package/dist/__tests__/stats/collector.test.js +41 -0
  94. package/dist/__tests__/stats/collector.test.js.map +1 -1
  95. package/dist/__tests__/stats/memory-profiler.test.js +3 -1
  96. package/dist/__tests__/stats/memory-profiler.test.js.map +1 -1
  97. package/dist/__tests__/stats/query-analytics.test.js +1 -1
  98. package/dist/__tests__/stats/query-analytics.test.js.map +1 -1
  99. package/dist/__tests__/stats/token-analytics.test.js +1 -1
  100. package/dist/__tests__/stats/token-analytics.test.js.map +1 -1
  101. package/dist/__tests__/tools/search-ranking.test.d.ts +2 -0
  102. package/dist/__tests__/tools/search-ranking.test.d.ts.map +1 -0
  103. package/dist/__tests__/tools/search-ranking.test.js +286 -0
  104. package/dist/__tests__/tools/search-ranking.test.js.map +1 -0
  105. package/dist/__tests__/tools/search-symbols.test.d.ts +5 -0
  106. package/dist/__tests__/tools/search-symbols.test.d.ts.map +1 -0
  107. package/dist/__tests__/tools/search-symbols.test.js +154 -0
  108. package/dist/__tests__/tools/search-symbols.test.js.map +1 -0
  109. package/dist/__tests__/tools.test.js +397 -34
  110. package/dist/__tests__/tools.test.js.map +1 -1
  111. package/dist/adapters/db/SQLiteTaskStore.d.ts +15 -0
  112. package/dist/adapters/db/SQLiteTaskStore.d.ts.map +1 -0
  113. package/dist/adapters/db/SQLiteTaskStore.js +65 -0
  114. package/dist/adapters/db/SQLiteTaskStore.js.map +1 -0
  115. package/dist/adapters/parsers/TreeSitterAdapter.d.ts +91 -0
  116. package/dist/adapters/parsers/TreeSitterAdapter.d.ts.map +1 -0
  117. package/dist/adapters/parsers/TreeSitterAdapter.js +217 -0
  118. package/dist/adapters/parsers/TreeSitterAdapter.js.map +1 -0
  119. package/dist/adapters/parsers/TreeSitterAdapter.test.d.ts +2 -0
  120. package/dist/adapters/parsers/TreeSitterAdapter.test.d.ts.map +1 -0
  121. package/dist/adapters/parsers/TreeSitterAdapter.test.js +269 -0
  122. package/dist/adapters/parsers/TreeSitterAdapter.test.js.map +1 -0
  123. package/dist/adapters/sandbox/ESLintValidator.d.ts +13 -0
  124. package/dist/adapters/sandbox/ESLintValidator.d.ts.map +1 -0
  125. package/dist/adapters/sandbox/ESLintValidator.js +118 -0
  126. package/dist/adapters/sandbox/ESLintValidator.js.map +1 -0
  127. package/dist/adapters/sandbox/ProcessSandbox.d.ts +24 -0
  128. package/dist/adapters/sandbox/ProcessSandbox.d.ts.map +1 -0
  129. package/dist/adapters/sandbox/ProcessSandbox.js +108 -0
  130. package/dist/adapters/sandbox/ProcessSandbox.js.map +1 -0
  131. package/dist/adapters/sandbox/TypeScriptValidator.d.ts +13 -0
  132. package/dist/adapters/sandbox/TypeScriptValidator.d.ts.map +1 -0
  133. package/dist/adapters/sandbox/TypeScriptValidator.js +94 -0
  134. package/dist/adapters/sandbox/TypeScriptValidator.js.map +1 -0
  135. package/dist/agent/phase3-agent.d.ts +10 -0
  136. package/dist/agent/phase3-agent.d.ts.map +1 -0
  137. package/dist/agent/phase3-agent.js +131 -0
  138. package/dist/agent/phase3-agent.js.map +1 -0
  139. package/dist/cli/__tests__/cli.test.d.ts +7 -0
  140. package/dist/cli/__tests__/cli.test.d.ts.map +1 -0
  141. package/dist/cli/__tests__/cli.test.js +183 -0
  142. package/dist/cli/__tests__/cli.test.js.map +1 -0
  143. package/dist/cli/index.d.ts +13 -0
  144. package/dist/cli/index.d.ts.map +1 -0
  145. package/dist/cli/index.js +282 -0
  146. package/dist/cli/index.js.map +1 -0
  147. package/dist/config/LanguageStrategy.d.ts +57 -0
  148. package/dist/config/LanguageStrategy.d.ts.map +1 -0
  149. package/dist/config/LanguageStrategy.js +2 -0
  150. package/dist/config/LanguageStrategy.js.map +1 -0
  151. package/dist/config/PythonStrategy.d.ts +11 -0
  152. package/dist/config/PythonStrategy.d.ts.map +1 -0
  153. package/dist/config/PythonStrategy.js +210 -0
  154. package/dist/config/PythonStrategy.js.map +1 -0
  155. package/dist/config/TypeScriptStrategy.d.ts +11 -0
  156. package/dist/config/TypeScriptStrategy.d.ts.map +1 -0
  157. package/dist/config/TypeScriptStrategy.js +252 -0
  158. package/dist/config/TypeScriptStrategy.js.map +1 -0
  159. package/dist/core/entities/Task.d.ts +9 -0
  160. package/dist/core/entities/Task.d.ts.map +1 -0
  161. package/dist/core/entities/Task.js +2 -0
  162. package/dist/core/entities/Task.js.map +1 -0
  163. package/dist/core/interfaces/IGatekeeper.d.ts +87 -0
  164. package/dist/core/interfaces/IGatekeeper.d.ts.map +1 -0
  165. package/dist/core/interfaces/IGatekeeper.js +2 -0
  166. package/dist/core/interfaces/IGatekeeper.js.map +1 -0
  167. package/dist/core/interfaces/IHypothesisEngine.d.ts +80 -0
  168. package/dist/core/interfaces/IHypothesisEngine.d.ts.map +1 -0
  169. package/dist/core/interfaces/IHypothesisEngine.js +2 -0
  170. package/dist/core/interfaces/IHypothesisEngine.js.map +1 -0
  171. package/dist/core/interfaces/ISandbox.d.ts +102 -0
  172. package/dist/core/interfaces/ISandbox.d.ts.map +1 -0
  173. package/dist/core/interfaces/ISandbox.js +2 -0
  174. package/dist/core/interfaces/ISandbox.js.map +1 -0
  175. package/dist/core/interfaces/ITaskStore.d.ts +18 -0
  176. package/dist/core/interfaces/ITaskStore.d.ts.map +1 -0
  177. package/dist/core/interfaces/ITaskStore.js +2 -0
  178. package/dist/core/interfaces/ITaskStore.js.map +1 -0
  179. package/dist/core/tests/Gatekeeper.test.d.ts +2 -0
  180. package/dist/core/tests/Gatekeeper.test.d.ts.map +1 -0
  181. package/dist/core/tests/Gatekeeper.test.js +185 -0
  182. package/dist/core/tests/Gatekeeper.test.js.map +1 -0
  183. package/dist/core/tests/HypothesisEngine.test.d.ts +2 -0
  184. package/dist/core/tests/HypothesisEngine.test.d.ts.map +1 -0
  185. package/dist/core/tests/HypothesisEngine.test.js +168 -0
  186. package/dist/core/tests/HypothesisEngine.test.js.map +1 -0
  187. package/dist/core/tests/RecursiveScout.test.d.ts +2 -0
  188. package/dist/core/tests/RecursiveScout.test.d.ts.map +1 -0
  189. package/dist/core/tests/RecursiveScout.test.js +237 -0
  190. package/dist/core/tests/RecursiveScout.test.js.map +1 -0
  191. package/dist/core/tests/Sandbox.test.d.ts +2 -0
  192. package/dist/core/tests/Sandbox.test.d.ts.map +1 -0
  193. package/dist/core/tests/Sandbox.test.js +210 -0
  194. package/dist/core/tests/Sandbox.test.js.map +1 -0
  195. package/dist/core/tests/TaskManager.test.d.ts +2 -0
  196. package/dist/core/tests/TaskManager.test.d.ts.map +1 -0
  197. package/dist/core/tests/TaskManager.test.js +305 -0
  198. package/dist/core/tests/TaskManager.test.js.map +1 -0
  199. package/dist/core/usecases/Gatekeeper.d.ts +53 -0
  200. package/dist/core/usecases/Gatekeeper.d.ts.map +1 -0
  201. package/dist/core/usecases/Gatekeeper.js +112 -0
  202. package/dist/core/usecases/Gatekeeper.js.map +1 -0
  203. package/dist/core/usecases/HypothesisEngine.d.ts +25 -0
  204. package/dist/core/usecases/HypothesisEngine.d.ts.map +1 -0
  205. package/dist/core/usecases/HypothesisEngine.js +197 -0
  206. package/dist/core/usecases/HypothesisEngine.js.map +1 -0
  207. package/dist/core/usecases/RecursiveScout.d.ts +110 -0
  208. package/dist/core/usecases/RecursiveScout.d.ts.map +1 -0
  209. package/dist/core/usecases/RecursiveScout.js +272 -0
  210. package/dist/core/usecases/RecursiveScout.js.map +1 -0
  211. package/dist/core/usecases/TaskManager.d.ts +86 -0
  212. package/dist/core/usecases/TaskManager.d.ts.map +1 -0
  213. package/dist/core/usecases/TaskManager.js +198 -0
  214. package/dist/core/usecases/TaskManager.js.map +1 -0
  215. package/dist/demo-phase2.d.ts +10 -0
  216. package/dist/demo-phase2.d.ts.map +1 -0
  217. package/dist/demo-phase2.js +93 -0
  218. package/dist/demo-phase2.js.map +1 -0
  219. package/dist/index.js +0 -0
  220. package/dist/mcp/commands.d.ts +16 -0
  221. package/dist/mcp/commands.d.ts.map +1 -0
  222. package/dist/mcp/commands.js +26 -0
  223. package/dist/mcp/commands.js.map +1 -0
  224. package/dist/mcp/handler.d.ts +24 -0
  225. package/dist/mcp/handler.d.ts.map +1 -0
  226. package/dist/mcp/handler.js +238 -0
  227. package/dist/mcp/handler.js.map +1 -0
  228. package/dist/mcp/handler.test.d.ts +2 -0
  229. package/dist/mcp/handler.test.d.ts.map +1 -0
  230. package/dist/mcp/handler.test.js +190 -0
  231. package/dist/mcp/handler.test.js.map +1 -0
  232. package/dist/mcp/server.d.ts +9 -0
  233. package/dist/mcp/server.d.ts.map +1 -0
  234. package/dist/mcp/server.js +72 -0
  235. package/dist/mcp/server.js.map +1 -0
  236. package/dist/mcp/tools.d.ts +385 -0
  237. package/dist/mcp/tools.d.ts.map +1 -0
  238. package/dist/mcp/tools.js +211 -0
  239. package/dist/mcp/tools.js.map +1 -0
  240. package/dist/search/bm25.d.ts +107 -0
  241. package/dist/search/bm25.d.ts.map +1 -0
  242. package/dist/search/bm25.js +238 -0
  243. package/dist/search/bm25.js.map +1 -0
  244. package/dist/search/fuzzy.d.ts +91 -0
  245. package/dist/search/fuzzy.d.ts.map +1 -0
  246. package/dist/search/fuzzy.js +196 -0
  247. package/dist/search/fuzzy.js.map +1 -0
  248. package/dist/search/hybrid.d.ts +76 -0
  249. package/dist/search/hybrid.d.ts.map +1 -0
  250. package/dist/search/hybrid.js +121 -0
  251. package/dist/search/hybrid.js.map +1 -0
  252. package/dist/search/index.d.ts +8 -0
  253. package/dist/search/index.d.ts.map +1 -0
  254. package/dist/search/index.js +8 -0
  255. package/dist/search/index.js.map +1 -0
  256. package/dist/search/ranker.d.ts +105 -0
  257. package/dist/search/ranker.d.ts.map +1 -0
  258. package/dist/search/ranker.js +191 -0
  259. package/dist/search/ranker.js.map +1 -0
  260. package/dist/server.d.ts +2 -0
  261. package/dist/server.d.ts.map +1 -1
  262. package/dist/server.js +116 -1
  263. package/dist/server.js.map +1 -1
  264. package/dist/setup.d.ts +5 -1
  265. package/dist/setup.d.ts.map +1 -1
  266. package/dist/setup.js +70 -4
  267. package/dist/setup.js.map +1 -1
  268. package/dist/stats/index.d.ts +1 -1
  269. package/dist/stats/index.d.ts.map +1 -1
  270. package/dist/stats/index.js.map +1 -1
  271. package/dist/stats/memory-profiler.js +4 -4
  272. package/dist/stats/memory-profiler.js.map +1 -1
  273. package/dist/stats/query-analytics.d.ts.map +1 -1
  274. package/dist/stats/query-analytics.js +5 -6
  275. package/dist/stats/query-analytics.js.map +1 -1
  276. package/dist/stats/token-analytics.d.ts.map +1 -1
  277. package/dist/stats/token-analytics.js +1 -2
  278. package/dist/stats/token-analytics.js.map +1 -1
  279. package/dist/tools/get-memory-profile.d.ts.map +1 -1
  280. package/dist/tools/get-memory-profile.js +3 -3
  281. package/dist/tools/get-memory-profile.js.map +1 -1
  282. package/dist/tools/get-query-analytics.d.ts.map +1 -1
  283. package/dist/tools/get-query-analytics.js +3 -3
  284. package/dist/tools/get-query-analytics.js.map +1 -1
  285. package/dist/tools/get-stats.d.ts.map +1 -1
  286. package/dist/tools/get-stats.js.map +1 -1
  287. package/dist/tools/get-token-analytics.d.ts.map +1 -1
  288. package/dist/tools/get-token-analytics.js.map +1 -1
  289. package/dist/tools/index-codebase.d.ts +45 -0
  290. package/dist/tools/index-codebase.d.ts.map +1 -1
  291. package/dist/tools/index-codebase.js +169 -0
  292. package/dist/tools/index-codebase.js.map +1 -1
  293. package/dist/tools/search-codebase.d.ts +55 -1
  294. package/dist/tools/search-codebase.d.ts.map +1 -1
  295. package/dist/tools/search-codebase.js +235 -20
  296. package/dist/tools/search-codebase.js.map +1 -1
  297. package/dist/tools/search-symbols.d.ts +72 -0
  298. package/dist/tools/search-symbols.d.ts.map +1 -0
  299. package/dist/tools/search-symbols.js +133 -0
  300. package/dist/tools/search-symbols.js.map +1 -0
  301. package/dist/v2.d.ts +10 -0
  302. package/dist/v2.d.ts.map +1 -0
  303. package/dist/v2.js +30 -0
  304. package/dist/v2.js.map +1 -0
  305. package/docs/BRANCH_PROTECTION.md +93 -0
  306. package/docs/PUBLISHING.md +123 -0
  307. package/docs/marketing/README.md +152 -0
  308. package/jest.config.js +48 -0
  309. package/package.json +28 -68
  310. package/scripts/benchmark-tokens.ts +330 -0
  311. package/scripts/collect-evidence.sh +151 -0
  312. package/scripts/download-grammars.ts +113 -0
  313. package/scripts/download-model.ts +188 -0
  314. package/scripts/fix-imports.mjs +83 -0
  315. package/scripts/phase4-bootstrap.ts +201 -0
  316. package/scripts/postinstall.js +16 -0
  317. package/scripts/publish-v1.sh +84 -0
  318. package/scripts/quick-publish.sh +25 -0
  319. package/scripts/release.sh +138 -0
  320. package/scripts/validate-phase4-code.ts +43 -0
  321. package/scripts/validate-phase4.ts +178 -0
  322. package/scripts/validate-real-world.ts +147 -0
  323. package/seu-claude-1.0.2.tgz +0 -0
  324. package/sonar-project.properties +24 -0
  325. package/src/__tests__/chunker.test.ts +478 -0
  326. package/src/__tests__/config.test.ts +107 -0
  327. package/src/__tests__/crawler.test.ts +442 -0
  328. package/src/__tests__/embed.test.ts +513 -0
  329. package/src/__tests__/file-index.test.ts +309 -0
  330. package/src/__tests__/git-tracker.test.ts +212 -0
  331. package/src/__tests__/logger.test.ts +96 -0
  332. package/src/__tests__/mcp-server.test.ts +33 -0
  333. package/src/__tests__/parser.test.ts +516 -0
  334. package/src/__tests__/search/bm25.test.ts +258 -0
  335. package/src/__tests__/search/fuzzy.test.ts +334 -0
  336. package/src/__tests__/search/hybrid.test.ts +261 -0
  337. package/src/__tests__/search/ranker.test.ts +463 -0
  338. package/src/__tests__/search-xrefs.test.ts +299 -0
  339. package/src/__tests__/server.test.ts +288 -0
  340. package/src/__tests__/stats/collector.test.ts +253 -0
  341. package/src/__tests__/stats/memory-profiler.test.ts +298 -0
  342. package/src/__tests__/stats/query-analytics.test.ts +246 -0
  343. package/src/__tests__/stats/token-analytics.test.ts +281 -0
  344. package/src/__tests__/store.test.ts +453 -0
  345. package/src/__tests__/tools/search-ranking.test.ts +368 -0
  346. package/src/__tests__/tools/search-symbols.test.ts +184 -0
  347. package/src/__tests__/tools.test.ts +1291 -0
  348. package/src/__tests__/validation.test.ts +207 -0
  349. package/src/__tests__/xref-tracker.test.ts +301 -0
  350. package/src/adapters/db/SQLiteTaskStore.ts +76 -0
  351. package/src/adapters/parsers/TreeSitterAdapter.test.ts +317 -0
  352. package/src/adapters/parsers/TreeSitterAdapter.ts +265 -0
  353. package/src/adapters/sandbox/ESLintValidator.ts +147 -0
  354. package/src/adapters/sandbox/ProcessSandbox.ts +135 -0
  355. package/src/adapters/sandbox/TypeScriptValidator.ts +110 -0
  356. package/src/agent/phase3-agent.ts +166 -0
  357. package/src/cli/__tests__/cli.test.ts +220 -0
  358. package/src/cli/index.ts +323 -0
  359. package/src/cli-index.ts +128 -0
  360. package/src/cli-stats.ts +102 -0
  361. package/src/config/LanguageStrategy.ts +59 -0
  362. package/src/config/PythonStrategy.ts +232 -0
  363. package/src/config/TypeScriptStrategy.ts +275 -0
  364. package/src/core/entities/Task.ts +8 -0
  365. package/src/core/interfaces/IGatekeeper.ts +99 -0
  366. package/src/core/interfaces/IHypothesisEngine.ts +94 -0
  367. package/src/core/interfaces/ISandbox.ts +109 -0
  368. package/src/core/interfaces/ITaskStore.ts +24 -0
  369. package/src/core/tests/Gatekeeper.test.ts +242 -0
  370. package/src/core/tests/HypothesisEngine.test.ts +252 -0
  371. package/src/core/tests/RecursiveScout.test.ts +298 -0
  372. package/src/core/tests/Sandbox.test.ts +244 -0
  373. package/src/core/tests/TaskManager.test.ts +399 -0
  374. package/src/core/usecases/Gatekeeper.ts +152 -0
  375. package/src/core/usecases/HypothesisEngine.ts +235 -0
  376. package/src/core/usecases/RecursiveScout.ts +378 -0
  377. package/src/core/usecases/TaskManager.ts +241 -0
  378. package/src/demo-phase2.ts +111 -0
  379. package/src/doctor.ts +321 -0
  380. package/src/index.ts +78 -0
  381. package/src/indexer/chunker.ts +303 -0
  382. package/src/indexer/crawler.ts +204 -0
  383. package/src/indexer/file-index.ts +154 -0
  384. package/src/indexer/git-tracker.ts +220 -0
  385. package/src/indexer/parser.ts +244 -0
  386. package/src/indexer/xref-tracker.ts +589 -0
  387. package/src/lsp/client.ts +474 -0
  388. package/src/mcp/commands.ts +37 -0
  389. package/src/mcp/handler.test.ts +229 -0
  390. package/src/mcp/handler.ts +288 -0
  391. package/src/mcp/server.ts +87 -0
  392. package/src/mcp/tools.ts +226 -0
  393. package/src/search/bm25.ts +323 -0
  394. package/src/search/fuzzy.ts +256 -0
  395. package/src/search/hybrid.ts +179 -0
  396. package/src/search/index.ts +20 -0
  397. package/src/search/ranker.ts +265 -0
  398. package/src/server.ts +667 -0
  399. package/src/setup.ts +312 -0
  400. package/src/stats/collector.ts +213 -0
  401. package/src/stats/index.ts +21 -0
  402. package/src/stats/memory-profiler.ts +401 -0
  403. package/src/stats/query-analytics.ts +408 -0
  404. package/src/stats/token-analytics.ts +298 -0
  405. package/src/tools/get-memory-profile.ts +62 -0
  406. package/src/tools/get-query-analytics.ts +61 -0
  407. package/src/tools/get-stats.ts +97 -0
  408. package/src/tools/get-token-analytics.ts +61 -0
  409. package/src/tools/index-codebase.ts +497 -0
  410. package/src/tools/read-context.ts +119 -0
  411. package/src/tools/search-codebase.ts +443 -0
  412. package/src/tools/search-symbols.ts +186 -0
  413. package/src/tools/search-xrefs.ts +267 -0
  414. package/src/utils/config.ts +100 -0
  415. package/src/utils/logger.ts +58 -0
  416. package/src/utils/validation.ts +149 -0
  417. package/src/v2.ts +29 -0
  418. package/src/vector/embed.ts +232 -0
  419. package/src/vector/store.ts +226 -0
  420. package/stochastic_drift_benchmark.png +0 -0
  421. package/tsconfig.json +25 -0
  422. package/vitest.config.ts +14 -0
  423. package/languages/tree-sitter-c.wasm +0 -0
  424. package/languages/tree-sitter-cpp.wasm +0 -0
  425. package/languages/tree-sitter-go.wasm +0 -0
  426. package/languages/tree-sitter-java.wasm +0 -0
  427. package/languages/tree-sitter-javascript.wasm +0 -0
  428. package/languages/tree-sitter-python.wasm +0 -0
  429. package/languages/tree-sitter-rust.wasm +0 -0
  430. package/languages/tree-sitter-typescript.wasm +0 -0
@@ -0,0 +1,13 @@
1
+ {
2
+ "mcpServers": {
3
+ "seu-claude": {
4
+ "command": "npx",
5
+ "args": [
6
+ "seu-claude"
7
+ ],
8
+ "env": {
9
+ "PROJECT_ROOT": "."
10
+ }
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(git init:*)",
5
+ "Bash(git add:*)",
6
+ "Bash(git commit -m \"$\\(cat <<''EOF''\nfeat: initial implementation of seu-claude\n\nLocal Codebase RAG MCP Server for Claude Code with:\n- AST-based semantic chunking using Tree-sitter\n- LanceDB vector store for zero-copy disk-based storage\n- Transformers.js for local embedding generation\n- MCP server with index_codebase, search_codebase, and read_semantic_context tools\n- Incremental file hashing for efficient re-indexing\n- Multi-language support \\(TypeScript, JavaScript, Python, Rust, Go, Java, C/C++\\)\n\nAddresses the \"goldfish memory\" problem by proactively indexing the entire\ncodebase rather than relying on reactive observation of tool usage.\n\nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>\nEOF\n\\)\")",
7
+ "Bash(git config:*)",
8
+ "Bash(git commit:*)",
9
+ "Bash(gh repo create:*)",
10
+ "Bash(gh repo view:*)",
11
+ "Bash(npm install:*)",
12
+ "Bash(npm run build:*)",
13
+ "Bash(node -e:*)",
14
+ "Bash(npm run lint:*)",
15
+ "Bash(timeout 5 node:*)",
16
+ "Bash(npm test:*)",
17
+ "Bash(npm run test:coverage:*)",
18
+ "Bash(git push:*)",
19
+ "Bash(npm run benchmark:*)",
20
+ "WebSearch",
21
+ "Bash(npm run download-model:*)",
22
+ "Bash(ls:*)",
23
+ "Bash(claude mcp add seu-claude --scope project -- npx seu-claude)",
24
+ "Bash(seu-claude doctor:*)",
25
+ "mcp__seu-claude__index_codebase",
26
+ "mcp__seu-claude__search_codebase",
27
+ "mcp__ide__getDiagnostics",
28
+ "Bash(git tag:*)",
29
+ "Bash(gh run:*)",
30
+ "Bash(npx prettier:*)",
31
+ "Bash(npm publish --access public)",
32
+ "Bash(npm view:*)",
33
+ "Bash(gh release list:*)",
34
+ "Bash(gh release create:*)",
35
+ "Bash(xargs cat:*)",
36
+ "Bash(wc:*)",
37
+ "Bash(for i in 1 2 3)",
38
+ "Bash(do echo \"=== Run $i ===\")",
39
+ "Bash(done)",
40
+ "mcp__seu-claude__search_xrefs",
41
+ "mcp__seu-claude__get_stats",
42
+ "Bash(git pull:*)",
43
+ "Bash(git stash:*)",
44
+ "Bash(cat:*)",
45
+ "Bash(npm run format:check:*)",
46
+ "Bash(npm run format:*)",
47
+ "Bash(git checkout:*)",
48
+ "Bash(xargs:*)",
49
+ "Bash(npx ts-node:*)",
50
+ "Bash(git rm:*)",
51
+ "Bash(git reset:*)",
52
+ "Bash(node scripts/fix-imports.mjs:*)",
53
+ "Bash(node:*)",
54
+ "Bash(npx tsx:*)",
55
+ "Bash(echo:*)"
56
+ ]
57
+ },
58
+ "enableAllProjectMcpServers": true,
59
+ "enabledMcpjsonServers": [
60
+ "seu-claude"
61
+ ]
62
+ }
package/.dockerignore ADDED
@@ -0,0 +1,30 @@
1
+ # Docker ignore file
2
+ node_modules/
3
+ dist/
4
+ coverage/
5
+ .git/
6
+ .github/
7
+ .husky/
8
+ .vscode/
9
+
10
+ # Test files
11
+ **/__tests__/
12
+ **/*.test.ts
13
+ **/*.spec.ts
14
+ jest.config.js
15
+
16
+ # Development files
17
+ *.md
18
+ !README.md
19
+ !LICENSE
20
+ !CHANGELOG.md
21
+ .eslintrc*
22
+ .prettierrc
23
+ tsconfig.json
24
+ commitlint.config.cjs
25
+
26
+ # Misc
27
+ *.log
28
+ *.tgz
29
+ .DS_Store
30
+ benchmark-results/
package/.eslintrc.cjs ADDED
@@ -0,0 +1,81 @@
1
+ module.exports = {
2
+ root: true,
3
+ parser: '@typescript-eslint/parser',
4
+ parserOptions: {
5
+ ecmaVersion: 2022,
6
+ sourceType: 'module',
7
+ project: './tsconfig.json',
8
+ },
9
+ plugins: ['@typescript-eslint'],
10
+ extends: [
11
+ 'eslint:recommended',
12
+ 'plugin:@typescript-eslint/recommended',
13
+ 'plugin:@typescript-eslint/recommended-requiring-type-checking',
14
+ ],
15
+ env: {
16
+ node: true,
17
+ es2022: true,
18
+ },
19
+ rules: {
20
+ // TypeScript strict rules
21
+ '@typescript-eslint/explicit-function-return-type': 'warn',
22
+ '@typescript-eslint/no-explicit-any': 'warn',
23
+ '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
24
+ '@typescript-eslint/strict-boolean-expressions': 'off',
25
+ '@typescript-eslint/no-floating-promises': 'error',
26
+ '@typescript-eslint/await-thenable': 'error',
27
+ '@typescript-eslint/no-misused-promises': 'error',
28
+ '@typescript-eslint/prefer-nullish-coalescing': 'warn',
29
+ '@typescript-eslint/prefer-optional-chain': 'warn',
30
+
31
+ // Security rules
32
+ 'no-eval': 'error',
33
+ 'no-implied-eval': 'error',
34
+ 'no-new-func': 'error',
35
+ 'no-script-url': 'error',
36
+
37
+ // Code quality
38
+ 'no-console': ['warn', { allow: ['warn', 'error'] }],
39
+ 'no-debugger': 'error',
40
+ 'no-duplicate-imports': 'error',
41
+ 'no-template-curly-in-string': 'warn',
42
+ 'prefer-const': 'error',
43
+ 'eqeqeq': ['error', 'always'],
44
+
45
+ // Async/Promise handling
46
+ 'no-async-promise-executor': 'error',
47
+ 'no-promise-executor-return': 'error',
48
+ 'require-atomic-updates': 'error',
49
+
50
+ // Error handling
51
+ 'no-throw-literal': 'error',
52
+ },
53
+ overrides: [
54
+ {
55
+ // Relax rules for test files
56
+ files: ['**/__tests__/**/*.ts', '**/*.test.ts', '**/*.spec.ts'],
57
+ rules: {
58
+ '@typescript-eslint/no-explicit-any': 'off',
59
+ '@typescript-eslint/no-unsafe-assignment': 'off',
60
+ '@typescript-eslint/no-unsafe-member-access': 'off',
61
+ '@typescript-eslint/no-unsafe-call': 'off',
62
+ 'no-console': 'off',
63
+ },
64
+ },
65
+ {
66
+ // Relax rules for scripts
67
+ files: ['scripts/**/*.ts'],
68
+ rules: {
69
+ 'no-console': 'off',
70
+ '@typescript-eslint/no-floating-promises': 'off',
71
+ },
72
+ },
73
+ ],
74
+ ignorePatterns: [
75
+ 'dist/',
76
+ 'node_modules/',
77
+ 'coverage/',
78
+ '*.js',
79
+ '*.cjs',
80
+ ],
81
+ };
package/.eslintrc.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "root": true,
3
+ "parser": "@typescript-eslint/parser",
4
+ "parserOptions": {
5
+ "ecmaVersion": 2022,
6
+ "sourceType": "module",
7
+ "project": "./tsconfig.json"
8
+ },
9
+ "plugins": ["@typescript-eslint"],
10
+ "extends": [
11
+ "eslint:recommended",
12
+ "plugin:@typescript-eslint/recommended",
13
+ "plugin:@typescript-eslint/recommended-requiring-type-checking"
14
+ ],
15
+ "env": {
16
+ "node": true,
17
+ "es2022": true
18
+ },
19
+ "rules": {
20
+ "@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
21
+ "@typescript-eslint/explicit-function-return-type": "off",
22
+ "@typescript-eslint/no-explicit-any": "warn",
23
+ "no-console": ["warn", { "allow": ["warn", "error"] }]
24
+ },
25
+ "ignorePatterns": ["dist/", "node_modules/", "*.js"]
26
+ }
@@ -0,0 +1,16 @@
1
+ # Default owners for everything
2
+ * @jardhel
3
+
4
+ # Security-sensitive files require owner review
5
+ SECURITY.md @jardhel
6
+ .github/workflows/** @jardhel
7
+ package.json @jardhel
8
+ package-lock.json @jardhel
9
+
10
+ # Core source code
11
+ src/** @jardhel
12
+
13
+ # Configuration files
14
+ tsconfig.json @jardhel
15
+ .eslintrc* @jardhel
16
+ Dockerfile @jardhel
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: Bug Report
3
+ about: Report a bug or unexpected behavior
4
+ title: '[BUG] '
5
+ labels: bug
6
+ assignees: ''
7
+ ---
8
+
9
+ ## Bug Description
10
+
11
+ A clear and concise description of what the bug is.
12
+
13
+ ## Steps to Reproduce
14
+
15
+ 1. Go to '...'
16
+ 2. Run command '...'
17
+ 3. See error
18
+
19
+ ## Expected Behavior
20
+
21
+ What you expected to happen.
22
+
23
+ ## Actual Behavior
24
+
25
+ What actually happened.
26
+
27
+ ## Environment
28
+
29
+ - OS: [e.g., macOS 14.0, Ubuntu 22.04]
30
+ - Node.js version: [e.g., 20.10.0]
31
+ - seu-claude version: [e.g., 1.0.0]
32
+ - Claude Code/Desktop version: [if applicable]
33
+
34
+ ## Logs
35
+
36
+ ```
37
+ Paste relevant logs here
38
+ ```
39
+
40
+ ## Additional Context
41
+
42
+ Add any other context about the problem here.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: Feature Request
3
+ about: Suggest a new feature or enhancement
4
+ title: '[FEATURE] '
5
+ labels: enhancement
6
+ assignees: ''
7
+ ---
8
+
9
+ ## Feature Description
10
+
11
+ A clear and concise description of the feature you'd like.
12
+
13
+ ## Problem it Solves
14
+
15
+ What problem does this feature solve? Is this related to a frustration?
16
+
17
+ ## Proposed Solution
18
+
19
+ How do you envision this feature working?
20
+
21
+ ## Alternatives Considered
22
+
23
+ What alternatives have you considered?
24
+
25
+ ## Additional Context
26
+
27
+ Add any other context, mockups, or examples about the feature request here.
@@ -0,0 +1,45 @@
1
+ ## Description
2
+
3
+ <!-- Describe your changes in detail -->
4
+
5
+ ## Type of Change
6
+
7
+ <!-- Mark relevant items with an x -->
8
+
9
+ - [ ] Bug fix (non-breaking change that fixes an issue)
10
+ - [ ] New feature (non-breaking change that adds functionality)
11
+ - [ ] Breaking change (fix or feature that changes existing functionality)
12
+ - [ ] Documentation update
13
+ - [ ] Performance improvement
14
+ - [ ] Code refactoring
15
+
16
+ ## Related Issues
17
+
18
+ <!-- Link any related issues here using #issue_number -->
19
+
20
+ Fixes #
21
+
22
+ ## Testing
23
+
24
+ <!-- Describe how you tested your changes -->
25
+
26
+ - [ ] Added/updated unit tests
27
+ - [ ] All existing tests pass
28
+ - [ ] Tested manually with Claude Code/Desktop
29
+
30
+ ## Checklist
31
+
32
+ - [ ] My code follows the project's style guidelines
33
+ - [ ] I have performed a self-review of my code
34
+ - [ ] I have commented my code, particularly in hard-to-understand areas
35
+ - [ ] I have made corresponding changes to the documentation
36
+ - [ ] My changes generate no new warnings
37
+ - [ ] New and existing unit tests pass locally with my changes
38
+
39
+ ## Screenshots (if applicable)
40
+
41
+ <!-- Add screenshots to help explain your changes -->
42
+
43
+ ## Additional Notes
44
+
45
+ <!-- Any additional information that reviewers should know -->
@@ -0,0 +1,54 @@
1
+ # Support
2
+
3
+ Thank you for using **seu-claude**! We're here to help.
4
+
5
+ ## Getting Help
6
+
7
+ ### 📚 Documentation
8
+
9
+ Before opening an issue, please check:
10
+
11
+ - [README.md](README.md) - Installation and quick start
12
+ - [CONTRIBUTING.md](CONTRIBUTING.md) - How to contribute
13
+ - [GitHub Discussions](https://github.com/jardhel/seu-claude/discussions) - Community Q&A
14
+
15
+ ### 🐛 Bug Reports
16
+
17
+ If you've found a bug:
18
+
19
+ 1. Check [existing issues](https://github.com/jardhel/seu-claude/issues) to see if it's already reported
20
+ 2. Use the [Bug Report template](.github/ISSUE_TEMPLATE/bug_report.md)
21
+ 3. Include all requested information
22
+
23
+ ### 💡 Feature Requests
24
+
25
+ Have an idea? We'd love to hear it:
26
+
27
+ 1. Check [existing feature requests](https://github.com/jardhel/seu-claude/issues?q=is%3Aissue+label%3Aenhancement)
28
+ 2. Use the [Feature Request template](.github/ISSUE_TEMPLATE/feature_request.md)
29
+ 3. Explain your use case
30
+
31
+ ### ❓ Questions
32
+
33
+ For general questions:
34
+
35
+ - Open a [GitHub Discussion](https://github.com/jardhel/seu-claude/discussions)
36
+ - Tag with the `question` label
37
+
38
+ ## Response Time
39
+
40
+ - Critical bugs: Within 24 hours
41
+ - Feature requests: Within 1 week
42
+ - Questions: Within 2-3 days
43
+
44
+ ## Community Guidelines
45
+
46
+ Please be respectful and constructive. We follow the [Contributor Covenant Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/).
47
+
48
+ ## Commercial Support
49
+
50
+ For enterprise support or custom development, contact: [your-email@example.com]
51
+
52
+ ---
53
+
54
+ **Thank you for being part of the seu-claude community!** 🚀
@@ -0,0 +1,186 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ lint:
15
+ name: Lint & Format Check
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - name: Checkout repository
19
+ uses: actions/checkout@v4
20
+
21
+ - name: Setup Node.js
22
+ uses: actions/setup-node@v4
23
+ with:
24
+ node-version: '20.x'
25
+ cache: 'npm'
26
+
27
+ - name: Install dependencies
28
+ run: npm ci --ignore-scripts
29
+
30
+ - name: Run ESLint
31
+ run: npm run lint
32
+
33
+ - name: Check formatting
34
+ run: npm run format:check
35
+
36
+ typecheck:
37
+ name: Type Check
38
+ runs-on: ubuntu-latest
39
+ steps:
40
+ - name: Checkout repository
41
+ uses: actions/checkout@v4
42
+
43
+ - name: Setup Node.js
44
+ uses: actions/setup-node@v4
45
+ with:
46
+ node-version: '20.x'
47
+ cache: 'npm'
48
+
49
+ - name: Install dependencies
50
+ run: npm ci --ignore-scripts
51
+
52
+ - name: Type check
53
+ run: npm run typecheck
54
+
55
+ build:
56
+ name: Build & Test
57
+ runs-on: ubuntu-latest
58
+ needs: [lint, typecheck]
59
+
60
+ strategy:
61
+ matrix:
62
+ node-version: [20.x, 22.x]
63
+
64
+ steps:
65
+ - name: Checkout repository
66
+ uses: actions/checkout@v4
67
+ with:
68
+ fetch-depth: 0
69
+
70
+ - name: Setup Node.js ${{ matrix.node-version }}
71
+ uses: actions/setup-node@v4
72
+ with:
73
+ node-version: ${{ matrix.node-version }}
74
+ cache: 'npm'
75
+
76
+ - name: Install dependencies
77
+ run: npm ci --ignore-scripts
78
+
79
+ - name: Download tree-sitter grammars
80
+ run: npm run download-grammars
81
+
82
+ - name: Build
83
+ run: npm run build
84
+
85
+ - name: Run tests with coverage
86
+ run: npm run test:coverage -- --passWithNoTests
87
+
88
+ - name: Upload coverage artifact
89
+ if: matrix.node-version == '20.x'
90
+ uses: actions/upload-artifact@v4
91
+ with:
92
+ name: coverage-report
93
+ path: coverage/
94
+
95
+ - name: Check coverage threshold
96
+ if: matrix.node-version == '20.x'
97
+ run: |
98
+ COVERAGE=$(cat coverage/coverage-summary.json | jq '.total.statements.pct')
99
+ echo "Coverage: $COVERAGE%"
100
+ if (( $(echo "$COVERAGE < 70" | bc -l) )); then
101
+ echo "::error::Coverage $COVERAGE% is below 70% threshold"
102
+ exit 1
103
+ fi
104
+ continue-on-error: true
105
+
106
+ security:
107
+ name: Security Audit
108
+ runs-on: ubuntu-latest
109
+ steps:
110
+ - name: Checkout repository
111
+ uses: actions/checkout@v4
112
+
113
+ - name: Setup Node.js
114
+ uses: actions/setup-node@v4
115
+ with:
116
+ node-version: '20.x'
117
+ cache: 'npm'
118
+
119
+ - name: Install dependencies
120
+ run: npm ci --ignore-scripts
121
+
122
+ - name: Run npm audit
123
+ run: npm audit --audit-level=high
124
+ continue-on-error: true
125
+
126
+ sonarcloud:
127
+ name: SonarCloud Analysis
128
+ needs: build
129
+ runs-on: ubuntu-latest
130
+ if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
131
+ continue-on-error: true # Don't fail the workflow if SonarCloud isn't configured
132
+
133
+ steps:
134
+ - name: Checkout repository
135
+ uses: actions/checkout@v4
136
+ with:
137
+ fetch-depth: 0
138
+
139
+ - name: Setup Node.js
140
+ uses: actions/setup-node@v4
141
+ with:
142
+ node-version: 20.x
143
+ cache: 'npm'
144
+
145
+ - name: Install dependencies
146
+ run: npm ci --ignore-scripts
147
+
148
+ - name: Download tree-sitter grammars
149
+ run: npm run download-grammars
150
+
151
+ - name: Run tests with coverage
152
+ run: npm run test:coverage -- --passWithNoTests
153
+
154
+ - name: SonarCloud Scan
155
+ uses: SonarSource/sonarcloud-github-action@master
156
+ env:
157
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
158
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
159
+
160
+ release:
161
+ needs: [build] # Remove sonarcloud dependency
162
+ runs-on: ubuntu-latest
163
+ if: github.ref == 'refs/heads/main' && github.event_name == 'push'
164
+
165
+ steps:
166
+ - name: Checkout repository
167
+ uses: actions/checkout@v4
168
+
169
+ - name: Setup Node.js
170
+ uses: actions/setup-node@v4
171
+ with:
172
+ node-version: 20.x
173
+ cache: 'npm'
174
+ registry-url: 'https://registry.npmjs.org'
175
+
176
+ - name: Install dependencies
177
+ run: npm ci --ignore-scripts
178
+
179
+ - name: Build
180
+ run: npm run build
181
+
182
+ # Uncomment when ready to publish to npm
183
+ # - name: Publish to npm
184
+ # run: npm publish --access public
185
+ # env:
186
+ # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}