tea-rags 1.51.2 → 1.52.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 (334) hide show
  1. package/README.md +303 -138
  2. package/benchmarks/bench-model-ab.mjs +407 -0
  3. package/build/bootstrap/factory.d.ts.map +1 -1
  4. package/build/bootstrap/factory.js +19 -15
  5. package/build/bootstrap/factory.js.map +1 -1
  6. package/build/bootstrap/project-ingest-factory.d.ts +7 -3
  7. package/build/bootstrap/project-ingest-factory.d.ts.map +1 -1
  8. package/build/bootstrap/project-ingest-factory.js +2 -2
  9. package/build/bootstrap/project-ingest-factory.js.map +1 -1
  10. package/build/cli/commands/update.d.ts +2 -0
  11. package/build/cli/commands/update.d.ts.map +1 -1
  12. package/build/cli/commands/update.js +9 -1
  13. package/build/cli/commands/update.js.map +1 -1
  14. package/build/cli/plugin-sync/index.d.ts +4 -1
  15. package/build/cli/plugin-sync/index.d.ts.map +1 -1
  16. package/build/cli/plugin-sync/index.js +9 -18
  17. package/build/cli/plugin-sync/index.js.map +1 -1
  18. package/build/cli/plugin-sync/types.d.ts +8 -1
  19. package/build/cli/plugin-sync/types.d.ts.map +1 -1
  20. package/build/cli/plugin-sync/types.js +24 -0
  21. package/build/cli/plugin-sync/types.js.map +1 -1
  22. package/build/cli/plugin-sync/zcode.d.ts +46 -0
  23. package/build/cli/plugin-sync/zcode.d.ts.map +1 -0
  24. package/build/cli/plugin-sync/zcode.js +163 -0
  25. package/build/cli/plugin-sync/zcode.js.map +1 -0
  26. package/build/core/adapters/vcs/git/adapter.d.ts +8 -1
  27. package/build/core/adapters/vcs/git/adapter.d.ts.map +1 -1
  28. package/build/core/adapters/vcs/git/adapter.js.map +1 -1
  29. package/build/core/adapters/vcs/git/es-git/adapter.d.ts +4 -1
  30. package/build/core/adapters/vcs/git/es-git/adapter.d.ts.map +1 -1
  31. package/build/core/adapters/vcs/git/es-git/adapter.js +2 -2
  32. package/build/core/adapters/vcs/git/es-git/adapter.js.map +1 -1
  33. package/build/core/adapters/vcs/git/git-cli/adapter.d.ts +4 -1
  34. package/build/core/adapters/vcs/git/git-cli/adapter.d.ts.map +1 -1
  35. package/build/core/adapters/vcs/git/git-cli/adapter.js +2 -2
  36. package/build/core/adapters/vcs/git/git-cli/adapter.js.map +1 -1
  37. package/build/core/adapters/vcs/git/git-cli/history.d.ts +4 -1
  38. package/build/core/adapters/vcs/git/git-cli/history.d.ts.map +1 -1
  39. package/build/core/adapters/vcs/git/git-cli/history.js +9 -2
  40. package/build/core/adapters/vcs/git/git-cli/history.js.map +1 -1
  41. package/build/core/api/internal/app-factory.d.ts +1 -1
  42. package/build/core/api/internal/app-factory.d.ts.map +1 -1
  43. package/build/core/api/internal/app-factory.js +3 -2
  44. package/build/core/api/internal/app-factory.js.map +1 -1
  45. package/build/core/api/internal/composition.d.ts +1 -1
  46. package/build/core/api/internal/composition.d.ts.map +1 -1
  47. package/build/core/api/internal/composition.js +7 -1
  48. package/build/core/api/internal/composition.js.map +1 -1
  49. package/build/core/api/internal/facades/explore-facade.d.ts +1 -1
  50. package/build/core/api/internal/facades/explore-facade.d.ts.map +1 -1
  51. package/build/core/api/internal/infra/working-tree-graph-read.d.ts +22 -0
  52. package/build/core/api/internal/infra/working-tree-graph-read.d.ts.map +1 -1
  53. package/build/core/api/internal/infra/working-tree-graph-read.js +75 -1
  54. package/build/core/api/internal/infra/working-tree-graph-read.js.map +1 -1
  55. package/build/core/api/internal/migration-parser.d.ts.map +1 -1
  56. package/build/core/api/internal/migration-parser.js +4 -1
  57. package/build/core/api/internal/migration-parser.js.map +1 -1
  58. package/build/core/api/internal/ops/explore-ops.d.ts +7 -2
  59. package/build/core/api/internal/ops/explore-ops.d.ts.map +1 -1
  60. package/build/core/api/internal/ops/explore-ops.js +98 -63
  61. package/build/core/api/internal/ops/explore-ops.js.map +1 -1
  62. package/build/core/api/internal/ops/indexing-ops.js +1 -0
  63. package/build/core/api/internal/ops/indexing-ops.js.map +1 -1
  64. package/build/core/api/public/dto/ingest.d.ts +8 -0
  65. package/build/core/api/public/dto/ingest.d.ts.map +1 -1
  66. package/build/core/api/tools/code/register-index-tools.d.ts.map +1 -1
  67. package/build/core/api/tools/code/register-index-tools.js +2 -0
  68. package/build/core/api/tools/code/register-index-tools.js.map +1 -1
  69. package/build/core/contracts/types/language.d.ts +8 -0
  70. package/build/core/contracts/types/language.d.ts.map +1 -1
  71. package/build/core/contracts/types/language.js.map +1 -1
  72. package/build/core/contracts/types/provider.d.ts +17 -0
  73. package/build/core/contracts/types/provider.d.ts.map +1 -1
  74. package/build/core/domains/explore/index.d.ts +2 -0
  75. package/build/core/domains/explore/index.d.ts.map +1 -1
  76. package/build/core/domains/explore/index.js +2 -0
  77. package/build/core/domains/explore/index.js.map +1 -1
  78. package/build/core/domains/explore/resolver-batch.d.ts +45 -0
  79. package/build/core/domains/explore/resolver-batch.d.ts.map +1 -0
  80. package/build/core/domains/explore/resolver-batch.js +175 -0
  81. package/build/core/domains/explore/resolver-batch.js.map +1 -0
  82. package/build/core/domains/explore/working-tree/tree-graph-marker.d.ts +0 -27
  83. package/build/core/domains/explore/working-tree/tree-graph-marker.d.ts.map +1 -1
  84. package/build/core/domains/explore/working-tree/tree-graph-marker.js +15 -1
  85. package/build/core/domains/explore/working-tree/tree-graph-marker.js.map +1 -1
  86. package/build/core/domains/ingest/errors/ingest-errors.d.ts.map +1 -1
  87. package/build/core/domains/ingest/errors/ingest-errors.js +4 -2
  88. package/build/core/domains/ingest/errors/ingest-errors.js.map +1 -1
  89. package/build/core/domains/ingest/operations/reindexing.d.ts +17 -0
  90. package/build/core/domains/ingest/operations/reindexing.d.ts.map +1 -1
  91. package/build/core/domains/ingest/operations/reindexing.js +45 -1
  92. package/build/core/domains/ingest/operations/reindexing.js.map +1 -1
  93. package/build/core/domains/ingest/pipeline/chunk-point-payload.d.ts.map +1 -1
  94. package/build/core/domains/ingest/pipeline/chunk-point-payload.js +4 -1
  95. package/build/core/domains/ingest/pipeline/chunk-point-payload.js.map +1 -1
  96. package/build/core/domains/ingest/pipeline/chunker/infra/worker.js +3 -0
  97. package/build/core/domains/ingest/pipeline/chunker/infra/worker.js.map +1 -1
  98. package/build/core/domains/ingest/pipeline/enrichment/backfiller.d.ts.map +1 -1
  99. package/build/core/domains/ingest/pipeline/enrichment/backfiller.js +16 -0
  100. package/build/core/domains/ingest/pipeline/enrichment/backfiller.js.map +1 -1
  101. package/build/core/domains/ingest/pipeline/enrichment/completion-runner.d.ts.map +1 -1
  102. package/build/core/domains/ingest/pipeline/enrichment/completion-runner.js +4 -1
  103. package/build/core/domains/ingest/pipeline/enrichment/completion-runner.js.map +1 -1
  104. package/build/core/domains/ingest/pipeline/enrichment/file-phase.d.ts.map +1 -1
  105. package/build/core/domains/ingest/pipeline/enrichment/file-phase.js +11 -0
  106. package/build/core/domains/ingest/pipeline/enrichment/file-phase.js.map +1 -1
  107. package/build/core/domains/ingest/pipeline/file-ingestor.d.ts.map +1 -1
  108. package/build/core/domains/ingest/pipeline/file-ingestor.js +10 -6
  109. package/build/core/domains/ingest/pipeline/file-ingestor.js.map +1 -1
  110. package/build/core/domains/ingest/pipeline/status-module.d.ts.map +1 -1
  111. package/build/core/domains/ingest/pipeline/status-module.js +3 -8
  112. package/build/core/domains/ingest/pipeline/status-module.js.map +1 -1
  113. package/build/core/domains/ingest/sync/index-holes.d.ts +40 -0
  114. package/build/core/domains/ingest/sync/index-holes.d.ts.map +1 -0
  115. package/build/core/domains/ingest/sync/index-holes.js +50 -0
  116. package/build/core/domains/ingest/sync/index-holes.js.map +1 -0
  117. package/build/core/domains/ingest/sync/index.d.ts +1 -0
  118. package/build/core/domains/ingest/sync/index.d.ts.map +1 -1
  119. package/build/core/domains/ingest/sync/index.js +1 -0
  120. package/build/core/domains/ingest/sync/index.js.map +1 -1
  121. package/build/core/domains/language/capability/readme.d.ts +1 -1
  122. package/build/core/domains/language/capability/readme.js +2 -2
  123. package/build/core/domains/language/errors.d.ts +13 -1
  124. package/build/core/domains/language/errors.d.ts.map +1 -1
  125. package/build/core/domains/language/errors.js +18 -0
  126. package/build/core/domains/language/errors.js.map +1 -1
  127. package/build/core/domains/language/factory.d.ts +41 -10
  128. package/build/core/domains/language/factory.d.ts.map +1 -1
  129. package/build/core/domains/language/factory.js +87 -85
  130. package/build/core/domains/language/factory.js.map +1 -1
  131. package/build/core/domains/language/index.d.ts +2 -5
  132. package/build/core/domains/language/index.d.ts.map +1 -1
  133. package/build/core/domains/language/index.js +9 -5
  134. package/build/core/domains/language/index.js.map +1 -1
  135. package/build/core/domains/language/provider-sources.d.ts +56 -0
  136. package/build/core/domains/language/provider-sources.d.ts.map +1 -0
  137. package/build/core/domains/language/provider-sources.js +156 -0
  138. package/build/core/domains/language/provider-sources.js.map +1 -0
  139. package/build/core/domains/language/ruby/capability.d.ts.map +1 -1
  140. package/build/core/domains/language/ruby/capability.js +6 -1
  141. package/build/core/domains/language/ruby/capability.js.map +1 -1
  142. package/build/core/domains/language/ruby/chunking/rspec-scope-chunker.d.ts.map +1 -1
  143. package/build/core/domains/language/ruby/chunking/rspec-scope-chunker.js +4 -1
  144. package/build/core/domains/language/ruby/chunking/rspec-scope-chunker.js.map +1 -1
  145. package/build/core/domains/language/rust/capability.js +1 -1
  146. package/build/core/domains/language/rust/capability.js.map +1 -1
  147. package/build/core/domains/language/typescript/capability.js +1 -1
  148. package/build/core/domains/language/typescript/capability.js.map +1 -1
  149. package/build/core/domains/trajectory/codegraph/factory.d.ts.map +1 -1
  150. package/build/core/domains/trajectory/codegraph/factory.js +3 -0
  151. package/build/core/domains/trajectory/codegraph/factory.js.map +1 -1
  152. package/build/core/domains/trajectory/git/infra/blame-store.d.ts +5 -1
  153. package/build/core/domains/trajectory/git/infra/blame-store.d.ts.map +1 -1
  154. package/build/core/domains/trajectory/git/infra/blame-store.js +62 -8
  155. package/build/core/domains/trajectory/git/infra/blame-store.js.map +1 -1
  156. package/build/core/domains/trajectory/git/infra/file-lifetime-store.d.ts +38 -0
  157. package/build/core/domains/trajectory/git/infra/file-lifetime-store.d.ts.map +1 -0
  158. package/build/core/domains/trajectory/git/infra/file-lifetime-store.js +105 -0
  159. package/build/core/domains/trajectory/git/infra/file-lifetime-store.js.map +1 -0
  160. package/build/core/domains/trajectory/git/infra/file-lifetime.d.ts +24 -0
  161. package/build/core/domains/trajectory/git/infra/file-lifetime.d.ts.map +1 -1
  162. package/build/core/domains/trajectory/git/infra/file-lifetime.js +55 -1
  163. package/build/core/domains/trajectory/git/infra/file-lifetime.js.map +1 -1
  164. package/build/core/domains/trajectory/git/provider.d.ts +15 -1
  165. package/build/core/domains/trajectory/git/provider.d.ts.map +1 -1
  166. package/build/core/domains/trajectory/git/provider.js +61 -8
  167. package/build/core/domains/trajectory/git/provider.js.map +1 -1
  168. package/build/core/types.d.ts +8 -0
  169. package/build/core/types.d.ts.map +1 -1
  170. package/build/mcp/resources/generated/agent-context.d.ts.map +1 -1
  171. package/build/mcp/resources/generated/agent-context.js +1 -1
  172. package/build/mcp/resources/generated/agent-context.js.map +1 -1
  173. package/build/typecheck-tests.tsbuildinfo +1 -0
  174. package/harness/cursor/README.md +4 -1
  175. package/harness/cursor/dinopowers/.cursor-plugin/plugin.json +3 -2
  176. package/harness/cursor/dinopowers/icon.png +0 -0
  177. package/harness/cursor/dinopowers/skills/dino-brainstorming/SKILL.md +14 -12
  178. package/harness/cursor/dinopowers/skills/dino-executing-plans/SKILL.md +7 -3
  179. package/harness/cursor/dinopowers/skills/dino-finishing-a-development-branch/SKILL.md +3 -3
  180. package/harness/cursor/dinopowers/skills/dino-receiving-code-review/SKILL.md +4 -4
  181. package/harness/cursor/dinopowers/skills/dino-requesting-code-review/SKILL.md +3 -3
  182. package/harness/cursor/dinopowers/skills/dino-systematic-debugging/SKILL.md +12 -12
  183. package/harness/cursor/dinopowers/skills/dino-test-driven-development/SKILL.md +6 -3
  184. package/harness/cursor/dinopowers/skills/dino-verification-before-completion/SKILL.md +3 -3
  185. package/harness/cursor/dinopowers/skills/dino-writing-plans/SKILL.md +7 -3
  186. package/harness/cursor/dinopowers/skills/dino-writing-skills/SKILL.md +4 -4
  187. package/harness/cursor/tea-rags/.cursor-plugin/plugin.json +3 -2
  188. package/harness/cursor/tea-rags/icon.png +0 -0
  189. package/harness/cursor/tea-rags/rules/tea-rags-core.mdc +12 -8
  190. package/harness/cursor/tea-rags/scripts/check-build-fresh.sh +1 -0
  191. package/harness/cursor/tea-rags/scripts/reread-ledger.mjs +6 -3
  192. package/harness/cursor/tea-rags/skills/analytics-rerank/SKILL.md +3 -3
  193. package/harness/cursor/tea-rags/skills/architecture-diagnostics/SKILL.md +7 -7
  194. package/harness/cursor/tea-rags/skills/bug-hunt/SKILL.md +9 -9
  195. package/harness/cursor/tea-rags/skills/data-driven-generation/SKILL.md +6 -4
  196. package/harness/cursor/tea-rags/skills/explore/SKILL.md +3 -3
  197. package/harness/cursor/tea-rags/skills/extract-project-patterns/SKILL.md +3 -3
  198. package/harness/cursor/tea-rags/skills/filter-building/SKILL.md +3 -3
  199. package/harness/cursor/tea-rags/skills/force-reindex/SKILL.md +3 -3
  200. package/harness/cursor/tea-rags/skills/index/SKILL.md +3 -3
  201. package/harness/cursor/tea-rags/skills/mr-review/SKILL.md +5 -3
  202. package/harness/cursor/tea-rags/skills/pattern-search/SKILL.md +3 -3
  203. package/harness/cursor/tea-rags/skills/refactoring-planning/SKILL.md +3 -3
  204. package/harness/cursor/tea-rags/skills/refactoring-scan/SKILL.md +3 -3
  205. package/harness/cursor/tea-rags/skills/report-issue/SKILL.md +3 -3
  206. package/harness/cursor/tea-rags/skills/risk-assessment/SKILL.md +4 -4
  207. package/harness/cursor/tea-rags/skills/test-first/SKILL.md +4 -4
  208. package/harness/cursor/tea-rags/skills/tests-as-context/SKILL.md +3 -3
  209. package/harness/cursor/tea-rags-setup/.cursor-plugin/plugin.json +3 -2
  210. package/harness/cursor/tea-rags-setup/icon.png +0 -0
  211. package/harness/cursor/tea-rags-setup/scripts/detect.mjs +4 -0
  212. package/harness/cursor/tea-rags-setup/skills/install/SKILL.md +17 -9
  213. package/harness/cursor/tea-rags-setup/skills/tune/SKILL.md +3 -3
  214. package/harness/zcode/MANUAL-TEST.md +43 -0
  215. package/harness/zcode/README.md +141 -0
  216. package/harness/zcode/dinopowers/.zcode-plugin/plugin.json +10 -0
  217. package/harness/zcode/dinopowers/CHAINING.md +56 -0
  218. package/harness/zcode/dinopowers/FRESHNESS.md +33 -0
  219. package/harness/zcode/dinopowers/hooks/hooks.json +30 -0
  220. package/harness/zcode/dinopowers/icon.png +0 -0
  221. package/harness/zcode/dinopowers/scripts/main-session-routing.sh +41 -0
  222. package/harness/zcode/dinopowers/scripts/main-session-routing.txt +24 -0
  223. package/harness/zcode/dinopowers/scripts/wrapper-routing-agent.sh +19 -0
  224. package/harness/zcode/dinopowers/scripts/wrapper-routing.txt +25 -0
  225. package/harness/zcode/dinopowers/skills/dino-brainstorming/SKILL.md +286 -0
  226. package/harness/zcode/dinopowers/skills/dino-executing-plans/SKILL.md +375 -0
  227. package/harness/zcode/dinopowers/skills/dino-finishing-a-development-branch/SKILL.md +186 -0
  228. package/harness/zcode/dinopowers/skills/dino-receiving-code-review/SKILL.md +275 -0
  229. package/harness/zcode/dinopowers/skills/dino-receiving-code-review/references/call-route.md +53 -0
  230. package/harness/zcode/dinopowers/skills/dino-requesting-code-review/SKILL.md +260 -0
  231. package/harness/zcode/dinopowers/skills/dino-systematic-debugging/SKILL.md +358 -0
  232. package/harness/zcode/dinopowers/skills/dino-systematic-debugging/references/red-flags.md +47 -0
  233. package/harness/zcode/dinopowers/skills/dino-systematic-debugging/references/trace-chain.md +36 -0
  234. package/harness/zcode/dinopowers/skills/dino-test-driven-development/SKILL.md +263 -0
  235. package/harness/zcode/dinopowers/skills/dino-verification-before-completion/SKILL.md +268 -0
  236. package/harness/zcode/dinopowers/skills/dino-writing-plans/SKILL.md +332 -0
  237. package/harness/zcode/dinopowers/skills/dino-writing-skills/SKILL.md +134 -0
  238. package/harness/zcode/marketplace.json +32 -0
  239. package/harness/zcode/tea-rags/.mcp.json +9 -0
  240. package/harness/zcode/tea-rags/.zcode-plugin/plugin.json +11 -0
  241. package/harness/zcode/tea-rags/hooks/hooks.json +129 -0
  242. package/harness/zcode/tea-rags/icon.png +0 -0
  243. package/harness/zcode/tea-rags/repair/README.md +38 -0
  244. package/harness/zcode/tea-rags/repair/cycles.md +36 -0
  245. package/harness/zcode/tea-rags/repair/facadeContract.md +32 -0
  246. package/harness/zcode/tea-rags/repair/hubLike.md +72 -0
  247. package/harness/zcode/tea-rags/repair/layeringBackEdge.md +64 -0
  248. package/harness/zcode/tea-rags/repair/leakingAbstraction.md +58 -0
  249. package/harness/zcode/tea-rags/repair/mainSequence.md +48 -0
  250. package/harness/zcode/tea-rags/repair/silentCoupling.md +43 -0
  251. package/harness/zcode/tea-rags/repair/splitCandidates.md +37 -0
  252. package/harness/zcode/tea-rags/repair/stableDependencies.md +76 -0
  253. package/harness/zcode/tea-rags/rules/core.md +146 -0
  254. package/harness/zcode/tea-rags/rules/references/axis-splitting.md +50 -0
  255. package/harness/zcode/tea-rags/rules/references/report-follow-up.md +36 -0
  256. package/harness/zcode/tea-rags/rules/references/runtime-introspection.md +138 -0
  257. package/harness/zcode/tea-rags/rules/references/signal-interpretation.md +545 -0
  258. package/harness/zcode/tea-rags/scripts/check-build-fresh.sh +24 -0
  259. package/harness/zcode/tea-rags/scripts/cleanup-clone.sh +12 -0
  260. package/harness/zcode/tea-rags/scripts/cleanup-worktree-clone.sh +48 -0
  261. package/harness/zcode/tea-rags/scripts/inject-rules.sh +120 -0
  262. package/harness/zcode/tea-rags/scripts/reread-ledger.mjs +1610 -0
  263. package/harness/zcode/tea-rags/scripts/search-drift.sh +212 -0
  264. package/harness/zcode/tea-rags/scripts/session-digest.sh +33 -0
  265. package/harness/zcode/tea-rags/scripts/session-rules.sh +20 -0
  266. package/harness/zcode/tea-rags/scripts/standard-zone.ere +1 -0
  267. package/harness/zcode/tea-rags/scripts/subagent-block.txt +32 -0
  268. package/harness/zcode/tea-rags/scripts/subagent-context.sh +31 -0
  269. package/harness/zcode/tea-rags/scripts/turn-routing.sh +82 -0
  270. package/harness/zcode/tea-rags/scripts/turn-routing.txt +6 -0
  271. package/harness/zcode/tea-rags/skills/analytics-rerank/SKILL.md +276 -0
  272. package/harness/zcode/tea-rags/skills/architecture-diagnostics/SKILL.md +261 -0
  273. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/anti-patterns.md +55 -0
  274. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-1-report.md +106 -0
  275. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3b-leaking-abstraction.md +46 -0
  276. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3c-silent-coupling.md +55 -0
  277. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3c2-shotgun-surgery.md +93 -0
  278. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3d-main-sequence.md +29 -0
  279. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3d2-hub-like.md +26 -0
  280. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3d3-propagation-cost.md +26 -0
  281. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3e-layering.md +29 -0
  282. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3f-layer-map.md +24 -0
  283. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3g-dependency-norms.md +70 -0
  284. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3h-diff-time.md +37 -0
  285. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-3i-remedy-simulation.md +36 -0
  286. package/harness/zcode/tea-rags/skills/architecture-diagnostics/references/phase-4-exclusions.md +55 -0
  287. package/harness/zcode/tea-rags/skills/bug-hunt/SKILL.md +282 -0
  288. package/harness/zcode/tea-rags/skills/bug-hunt/references/call-path.md +97 -0
  289. package/harness/zcode/tea-rags/skills/bug-hunt/references/probes.md +69 -0
  290. package/harness/zcode/tea-rags/skills/bug-hunt/references/triage.md +56 -0
  291. package/harness/zcode/tea-rags/skills/data-driven-generation/SKILL.md +430 -0
  292. package/harness/zcode/tea-rags/skills/data-driven-generation/references/step-5-style.md +118 -0
  293. package/harness/zcode/tea-rags/skills/data-driven-generation/references/step-6-generate.md +66 -0
  294. package/harness/zcode/tea-rags/skills/data-driven-generation/references/step-7-verify.md +210 -0
  295. package/harness/zcode/tea-rags/skills/data-driven-generation/strategies/conservative.md +19 -0
  296. package/harness/zcode/tea-rags/skills/data-driven-generation/strategies/defensive.md +24 -0
  297. package/harness/zcode/tea-rags/skills/data-driven-generation/strategies/stabilization.md +21 -0
  298. package/harness/zcode/tea-rags/skills/data-driven-generation/strategies/standard.md +13 -0
  299. package/harness/zcode/tea-rags/skills/explore/SKILL.md +112 -0
  300. package/harness/zcode/tea-rags/skills/explore/references/architecture-pattern.md +63 -0
  301. package/harness/zcode/tea-rags/skills/explore/references/cycle-pattern.md +43 -0
  302. package/harness/zcode/tea-rags/skills/explore/references/entry-point-pattern.md +48 -0
  303. package/harness/zcode/tea-rags/skills/explore/references/exemplar-pattern.md +46 -0
  304. package/harness/zcode/tea-rags/skills/explore/references/explain-pattern.md +33 -0
  305. package/harness/zcode/tea-rags/skills/explore/references/explore-flow.md +89 -0
  306. package/harness/zcode/tea-rags/skills/explore/references/naming-pattern.md +15 -0
  307. package/harness/zcode/tea-rags/skills/explore/references/pre-gen-pattern.md +97 -0
  308. package/harness/zcode/tea-rags/skills/explore/references/trace-pattern.md +20 -0
  309. package/harness/zcode/tea-rags/skills/explore/references/usage-pattern.md +75 -0
  310. package/harness/zcode/tea-rags/skills/extract-project-patterns/SKILL.md +149 -0
  311. package/harness/zcode/tea-rags/skills/filter-building/SKILL.md +359 -0
  312. package/harness/zcode/tea-rags/skills/force-reindex/SKILL.md +76 -0
  313. package/harness/zcode/tea-rags/skills/index/SKILL.md +87 -0
  314. package/harness/zcode/tea-rags/skills/mr-review/SKILL.md +217 -0
  315. package/harness/zcode/tea-rags/skills/mr-review/references/delivery-contract.md +160 -0
  316. package/harness/zcode/tea-rags/skills/mr-review/references/dimension-playbook.md +237 -0
  317. package/harness/zcode/tea-rags/skills/pattern-search/SKILL.md +178 -0
  318. package/harness/zcode/tea-rags/skills/refactoring-planning/SKILL.md +193 -0
  319. package/harness/zcode/tea-rags/skills/refactoring-scan/SKILL.md +150 -0
  320. package/harness/zcode/tea-rags/skills/report-issue/SKILL.md +95 -0
  321. package/harness/zcode/tea-rags/skills/risk-assessment/SKILL.md +622 -0
  322. package/harness/zcode/tea-rags/skills/risk-assessment/references/anti-patterns.md +77 -0
  323. package/harness/zcode/tea-rags/skills/risk-assessment/references/classification-tiers.md +28 -0
  324. package/harness/zcode/tea-rags/skills/risk-assessment/references/enrich.md +213 -0
  325. package/harness/zcode/tea-rags/skills/test-first/SKILL.md +112 -0
  326. package/harness/zcode/tea-rags/skills/tests-as-context/SKILL.md +357 -0
  327. package/harness/zcode/tea-rags-setup/.zcode-plugin/plugin.json +9 -0
  328. package/harness/zcode/tea-rags-setup/icon.png +0 -0
  329. package/harness/zcode/tea-rags-setup/scripts/contextignore.mjs +107 -0
  330. package/harness/zcode/tea-rags-setup/scripts/detect.mjs +98 -0
  331. package/harness/zcode/tea-rags-setup/scripts/profile.mjs +110 -0
  332. package/harness/zcode/tea-rags-setup/skills/install/SKILL.md +216 -0
  333. package/harness/zcode/tea-rags-setup/skills/tune/SKILL.md +80 -0
  334. package/package.json +3 -1
@@ -0,0 +1,407 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Embedding model A/B bench (bd tea-rags-mcp-h6tmp): throughput and retrieval
4
+ * quality of GGUF embedding models served by llama-server (OpenAI-compatible
5
+ * /v1/embeddings), one model instance at a time.
6
+ *
7
+ * Modes:
8
+ * corpus [-size 2048] [-chunk-chars 700] [-out FILE] [-roots src,tests]
9
+ * Build the document corpus from this repo's source + tests,
10
+ * chunked at ~chunk-chars chars on line boundaries (median
11
+ * production code chunk is ~700 chars).
12
+ * queries [-corpus FILE] [-out FILE]
13
+ * Build the query set: A = hand-written natural-language
14
+ * paraphrases (file-level targets, listed below), B = code->test
15
+ * pairs generated from the src/x.ts to tests/x.test.ts naming
16
+ * convention (query = first lines of the source file).
17
+ * throughput -port 8181 [-corpus FILE] [-seconds 30] [-batch 64] [-inflight 4]
18
+ * Sustained texts/s + chars/s (protocol of the 2026-10-03 nucbox
19
+ * benches: fixed batch, fixed in-flight requests, run to deadline).
20
+ * quality -port 8181 -corpus FILE -queries FILE [-limit N]
21
+ * Embed corpus + queries through the model on -port, rank by
22
+ * cosine similarity, report MRR and recall@10 per query set.
23
+ *
24
+ * Corpora and query files are generated artifacts: keep them outside the repo
25
+ * (/tmp) and regenerate. The script itself is the durable part.
26
+ */
27
+ import { readdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
28
+ import { join } from "node:path";
29
+
30
+ const REPO = new URL("../", import.meta.url).pathname;
31
+
32
+ // ── args ────────────────────────────────────────────────────────────────────
33
+ function parseArgs(argv) {
34
+ const mode = argv[0];
35
+ const a = { mode };
36
+ for (let i = 1; i < argv.length; i++) {
37
+ if (argv[i].startsWith("-")) {
38
+ const key = argv[i].replace(/^-+/, "");
39
+ const next = argv[i + 1];
40
+ if (next === undefined || next.startsWith("-")) a[key] = true;
41
+ else {
42
+ a[key] = Number.isNaN(Number(next)) ? next : Number(next);
43
+ i++;
44
+ }
45
+ }
46
+ }
47
+ return a;
48
+ }
49
+
50
+ // ── corpus ──────────────────────────────────────────────────────────────────
51
+ function walkTs(dir, out = []) {
52
+ for (const e of readdirSync(dir, { withFileTypes: true })) {
53
+ if (e.name.startsWith(".") || e.name === "node_modules" || e.name === "__snapshots__") continue;
54
+ const p = join(dir, e.name);
55
+ if (e.isDirectory()) walkTs(p, out);
56
+ else if (e.name.endsWith(".ts") && !e.name.endsWith(".d.ts")) out.push(p);
57
+ }
58
+ return out;
59
+ }
60
+
61
+ function chunkFile(file, chunkChars) {
62
+ const lines = readFileSync(file, "utf8").split("\n");
63
+ const chunks = [];
64
+ let buf = [];
65
+ let len = 0;
66
+ const flush = () => {
67
+ if (buf.length) chunks.push(buf.join("\n"));
68
+ buf = [];
69
+ len = 0;
70
+ };
71
+ for (const line of lines) {
72
+ // A single over-long line (minified fixture, embedded blob) must not make
73
+ // an unembeddable chunk: hard-split it at chunkChars boundaries.
74
+ if (line.length > chunkChars) {
75
+ flush();
76
+ for (let i = 0; i < line.length; i += chunkChars) chunks.push(line.slice(i, i + chunkChars));
77
+ continue;
78
+ }
79
+ buf.push(line);
80
+ len += line.length + 1;
81
+ if (len >= chunkChars) flush();
82
+ }
83
+ flush();
84
+ return chunks.filter((t) => t.trim().length > 60);
85
+ }
86
+
87
+ function buildCorpus(a) {
88
+ const chunkChars = a["chunk-chars"] ?? 700;
89
+ const size = a.size ?? 2048;
90
+ const roots = String(a.roots ?? "src,tests").split(",");
91
+ const files = roots.flatMap((r) => walkTs(join(REPO, r)));
92
+ files.sort();
93
+ // Round-robin one chunk per file first, so no single directory dominates the cap.
94
+ const perFile = files.map((f) => ({ file: f.slice(REPO.length), chunks: chunkFile(f, chunkChars) }));
95
+ const docs = [];
96
+ for (let round = 0; docs.length < size; round++) {
97
+ let added = false;
98
+ for (const f of perFile) {
99
+ if (round < f.chunks.length) {
100
+ docs.push({ i: docs.length, file: f.file, text: f.chunks[round] });
101
+ added = true;
102
+ if (docs.length >= size) break;
103
+ }
104
+ }
105
+ if (!added) break;
106
+ }
107
+ const out = a.out ?? `/tmp/ab-corpus-${chunkChars}.json`;
108
+ writeFileSync(out, JSON.stringify(docs));
109
+ const filesN = new Set(docs.map((d) => d.file)).size;
110
+ const chars = docs.reduce((s, d) => s + d.text.length, 0);
111
+ console.log(
112
+ `corpus: ${docs.length} chunks, ${filesN} files, ${(chars / 1000).toFixed(0)}k chars, avg ${Math.round(chars / docs.length)} -> ${out}`,
113
+ );
114
+ }
115
+
116
+ // ── queries ─────────────────────────────────────────────────────────────────
117
+ // A: natural-language paraphrases. Wording deliberately avoids the identifiers
118
+ // in the target files — that is the point of the paraphrase probe.
119
+ const QUERIES_A = [
120
+ {
121
+ q: "spreading embedding requests over several inference server endpoints",
122
+ file: "src/core/adapters/embeddings/endpoint-pool.ts",
123
+ },
124
+ {
125
+ q: "deciding an inference endpoint is unhealthy and routing around it",
126
+ file: "src/core/adapters/embeddings/endpoint-down-verdicts.ts",
127
+ },
128
+ {
129
+ q: "limiting how many requests hit one endpoint at the same time",
130
+ file: "src/core/adapters/embeddings/endpoint-slot-limiter.ts",
131
+ },
132
+ {
133
+ q: "sending one batch of texts to multiple mirrors and merging the replies",
134
+ file: "src/core/adapters/embeddings/batch-fanout.ts",
135
+ },
136
+ {
137
+ q: "the table of known embedding models and their vector widths",
138
+ file: "src/core/adapters/embeddings/model-catalog.ts",
139
+ },
140
+ { q: "choosing which embedding model a project should use", file: "src/core/adapters/embeddings/model-choice.ts" },
141
+ { q: "retrying failed embedding calls with waits between attempts", file: "src/core/adapters/embeddings/retry.ts" },
142
+ { q: "interface that every embedding backend implements", file: "src/core/adapters/embeddings/base.ts" },
143
+ {
144
+ q: "locating and starting the local llama.cpp inference server executable",
145
+ file: "src/core/adapters/llama-server/binary.ts",
146
+ },
147
+ { q: "entry module wiring the llama-server adapter together", file: "src/core/adapters/llama-server/index.ts" },
148
+ { q: "constructing the vector database client and its connection", file: "src/core/adapters/qdrant/client.ts" },
149
+ { q: "paging through every stored point of a collection", file: "src/core/adapters/qdrant/scroller.ts" },
150
+ {
151
+ q: "making freshly written points visible to subsequent searches",
152
+ file: "src/core/adapters/qdrant/write-barrier.ts",
153
+ },
154
+ {
155
+ q: "creating collections and keeping their vector configuration up to date",
156
+ file: "src/core/adapters/qdrant/collection-admin.ts",
157
+ },
158
+ {
159
+ q: "running a vector search request and returning ranked results",
160
+ file: "src/core/adapters/qdrant/search-executor.ts",
161
+ },
162
+ {
163
+ q: "in-memory staging of points before they are flushed to the database",
164
+ file: "src/core/adapters/qdrant/point-store.ts",
165
+ },
166
+ { q: "sparse keyword vectors for hybrid retrieval", file: "src/core/adapters/qdrant/sparse.ts" },
167
+ {
168
+ q: "the registry that builds walkers and resolvers for each programming language",
169
+ file: "src/core/domains/language/factory.ts",
170
+ },
171
+ { q: "error types thrown when language processing fails", file: "src/core/domains/language/errors.ts" },
172
+ { q: "building the command line application and registering its commands", file: "src/cli/create-cli.ts" },
173
+ { q: "shell completion scripts for the CLI", file: "src/cli/completion.ts" },
174
+ {
175
+ q: "tracking indexing phases and reporting progress to the UI renderer",
176
+ file: "src/cli/index-progress/phase-tracker.ts",
177
+ },
178
+ { q: "core type definitions shared across the server", file: "src/core/types.ts" },
179
+ { q: "package entry point exporting the public server API", file: "src/index.ts" },
180
+ ];
181
+
182
+ function buildQueries(a) {
183
+ const corpusPath = a.corpus ?? "/tmp/ab-corpus-700.json";
184
+ const corpus = JSON.parse(readFileSync(corpusPath, "utf8"));
185
+ const corpusFiles = new Set(corpus.map((d) => d.file));
186
+ const queries = [];
187
+ for (const { q, file } of QUERIES_A) {
188
+ if (!statSync(join(REPO, file), { throwIfNoEntry: false })) throw new Error(`A-query target missing: ${file}`);
189
+ if (!corpusFiles.has(file)) throw new Error(`A-query target not in corpus: ${file} (rebuild corpus with src root)`);
190
+ queries.push({ set: "A", q, expect: file });
191
+ }
192
+ // B: code -> test. Query = opening lines of the source file (imports + first
193
+ // declarations); expected = any chunk of its conventionally-named test file.
194
+ const srcFiles = walkTs(join(REPO, "src")).map((f) => f.slice(REPO.length));
195
+ const testByBasename = new Map();
196
+ for (const f of corpusFiles) {
197
+ if (f.startsWith("tests/") && f.endsWith(".test.ts")) {
198
+ const base = f.slice("tests/".length).replace(/\.test\.ts$/, "");
199
+ if (!testByBasename.has(base)) testByBasename.set(base, f);
200
+ }
201
+ }
202
+ let bCount = 0;
203
+ for (const src of srcFiles) {
204
+ const base = src.slice("src/".length).replace(/\.ts$/, "");
205
+ const test = testByBasename.get(base);
206
+ if (!test) continue;
207
+ const text = readFileSync(join(REPO, src), "utf8");
208
+ const q = text.split("\n").slice(0, 40).join("\n").slice(0, 1200);
209
+ if (q.trim().length < 100) continue;
210
+ queries.push({ set: "B", q, expect: test, src });
211
+ bCount++;
212
+ if (bCount >= 60) break;
213
+ }
214
+ const out = a.out ?? "/tmp/ab-queries.json";
215
+ writeFileSync(out, JSON.stringify(queries));
216
+ console.log(`queries: ${QUERIES_A.length} A + ${bCount} B -> ${out}`);
217
+ }
218
+
219
+ // ── embeddings client ───────────────────────────────────────────────────────
220
+ // llama-server rejects a request whose total tokens exceed its physical batch
221
+ // size (-ub): "input (N tokens) is too large". Split every logical batch into
222
+ // requests that fit an estimated token budget (code ≈ 3.5 chars/token).
223
+ const CHARS_PER_TOKEN = 3.0; // code tokenizes denser than prose; underestimate chars/token
224
+ const UB_MARGIN = 0.85; // stay under -ub even when the estimate is optimistic
225
+
226
+ function fitSlices(texts, batch, ubTokens) {
227
+ const budget = Math.floor(ubTokens * UB_MARGIN);
228
+ const slices = [];
229
+ let cur = [];
230
+ let tok = 0;
231
+ for (const t of texts) {
232
+ const tTok = Math.ceil(t.length / CHARS_PER_TOKEN);
233
+ if (cur.length && (cur.length >= batch || tok + tTok > budget)) {
234
+ slices.push(cur);
235
+ cur = [];
236
+ tok = 0;
237
+ }
238
+ cur.push(t);
239
+ tok += tTok;
240
+ }
241
+ if (cur.length) slices.push(cur);
242
+ return slices;
243
+ }
244
+
245
+ async function embed(port, texts, batch, inflight, ubTokens) {
246
+ const slices = fitSlices(texts, batch, ubTokens);
247
+ let pos = 0;
248
+ const offsets = slices.map((s) => {
249
+ const o = pos;
250
+ pos += s.length;
251
+ return o;
252
+ });
253
+ const vecs = new Map();
254
+ let nextSlice = 0;
255
+ async function run() {
256
+ while (nextSlice < slices.length) {
257
+ const si = nextSlice++;
258
+ const slice = slices[si];
259
+ const start = offsets[si];
260
+ for (let attempt = 0; ; attempt++) {
261
+ try {
262
+ const res = await fetch(`http://127.0.0.1:${port}/v1/embeddings`, {
263
+ method: "POST",
264
+ headers: { "content-type": "application/json" },
265
+ body: JSON.stringify({ input: slice, model: "bench" }),
266
+ signal: AbortSignal.timeout(120000),
267
+ });
268
+ if (!res.ok) throw new Error(`HTTP ${res.status}: ${(await res.text()).slice(0, 200)}`);
269
+ const json = await res.json();
270
+ for (const d of json.data) vecs.set(start + d.index, d.embedding);
271
+ break;
272
+ } catch (e) {
273
+ if (attempt >= 4) throw e;
274
+ await new Promise((r) => setTimeout(r, 500 * (attempt + 1)));
275
+ }
276
+ }
277
+ }
278
+ }
279
+ await Promise.all(Array.from({ length: inflight }, run));
280
+ const out = [];
281
+ for (let i = 0; i < texts.length; i++) {
282
+ const v = vecs.get(i);
283
+ if (!v) throw new Error(`missing embedding ${i}`);
284
+ out.push(v);
285
+ }
286
+ return out;
287
+ }
288
+
289
+ async function throughput(a) {
290
+ const corpus = JSON.parse(readFileSync(a.corpus ?? "/tmp/ab-corpus-700.json", "utf8"));
291
+ const seconds = a.seconds ?? 30;
292
+ const batch = a.batch ?? 64;
293
+ const inflight = a.inflight ?? 4;
294
+ const ubTokens = a.ub ?? 8192;
295
+ const pool = fitSlices(
296
+ corpus.map((d) => d.text),
297
+ batch,
298
+ ubTokens,
299
+ );
300
+ let chars = 0;
301
+ let count = 0;
302
+ let errors = 0;
303
+ const deadline = Date.now() + seconds * 1000;
304
+ async function worker(warm) {
305
+ let i = (warm * 131) % pool.length;
306
+ while (Date.now() < deadline) {
307
+ const slice = pool[i % pool.length];
308
+ i++;
309
+ try {
310
+ const res = await fetch(`http://127.0.0.1:${a.port}/v1/embeddings`, {
311
+ method: "POST",
312
+ headers: { "content-type": "application/json" },
313
+ body: JSON.stringify({ input: slice, model: "bench" }),
314
+ signal: AbortSignal.timeout(120000),
315
+ });
316
+ if (!res.ok) throw new Error(`HTTP ${res.status}`);
317
+ await res.json();
318
+ count += slice.length;
319
+ chars += slice.reduce((s, t) => s + t.length, 0);
320
+ } catch {
321
+ errors += slice.length;
322
+ }
323
+ }
324
+ }
325
+ const t0 = Date.now();
326
+ await Promise.all(Array.from({ length: inflight }, (_, w) => worker(w)));
327
+ const elapsed = (Date.now() - t0) / 1000;
328
+ console.log(
329
+ JSON.stringify({
330
+ port: a.port,
331
+ seconds: +elapsed.toFixed(1),
332
+ texts_per_s: +(count / elapsed).toFixed(1),
333
+ chars_per_s: Math.round(chars / elapsed),
334
+ requests: Math.round(count / (pool.reduce((s, p) => s + p.length, 0) / pool.length)),
335
+ avg_request_texts: +(pool.reduce((s, p) => s + p.length, 0) / pool.length).toFixed(1),
336
+ errors,
337
+ }),
338
+ );
339
+ }
340
+
341
+ function cosineRank(v, docs) {
342
+ const norm = (x) => Math.sqrt(x.reduce((s, c) => s + c * c, 0));
343
+ const vn = norm(v);
344
+ return docs
345
+ .map((d, i) => ({ i, file: d.file, s: v.reduce((s, c, k) => s + c * d.vec[k], 0) / (vn * d.n) }))
346
+ .sort((x, y) => y.s - x.s);
347
+ }
348
+
349
+ async function quality(a) {
350
+ const corpus = JSON.parse(readFileSync(a.corpus, "utf8"));
351
+ const queries = JSON.parse(readFileSync(a.queries ?? "/tmp/ab-queries.json", "utf8"));
352
+ const limit = a.limit ?? queries.length;
353
+ const qs = queries.slice(0, limit);
354
+ const ubTokens = a.ub ?? 8192;
355
+ // -maxchars: emulate producer-side truncation for models whose context the
356
+ // raw corpus exceeds (llama-server REJECTS over-context texts with
357
+ // exceed_context_size rather than truncating them).
358
+ const { maxchars } = a;
359
+ const clip = (t) => (maxchars ? t.slice(0, maxchars) : t);
360
+ const t0 = Date.now();
361
+ const docVecs = await embed(
362
+ a.port,
363
+ corpus.map((d) => clip(d.text)),
364
+ 64,
365
+ 4,
366
+ ubTokens,
367
+ );
368
+ const qVecs = await embed(
369
+ a.port,
370
+ qs.map((q) => clip(q.q)),
371
+ 32,
372
+ 2,
373
+ ubTokens,
374
+ );
375
+ const docs = corpus.map((d, i) => ({
376
+ file: d.file,
377
+ vec: docVecs[i],
378
+ n: Math.sqrt(docVecs[i].reduce((s, c) => s + c * c, 0)),
379
+ }));
380
+ const perSet = {};
381
+ for (let qi = 0; qi < qs.length; qi++) {
382
+ const ranked = cosineRank(qVecs[qi], docs);
383
+ const { expect } = qs[qi];
384
+ const firstRel = ranked.findIndex((r) => r.file === expect);
385
+ const in10 = ranked.slice(0, 10).some((r) => r.file === expect);
386
+ const { set } = qs[qi];
387
+ perSet[set] ??= { n: 0, mrr: 0, r10: 0 };
388
+ perSet[set].n++;
389
+ perSet[set].mrr += firstRel >= 0 ? 1 / (firstRel + 1) : 0;
390
+ perSet[set].r10 += in10 ? 1 : 0;
391
+ }
392
+ const report = {};
393
+ for (const [set, r] of Object.entries(perSet))
394
+ report[set] = { n: r.n, MRR: +(r.mrr / r.n).toFixed(3), recall_at_10: +(r.r10 / r.n).toFixed(3) };
395
+ report.seconds = +((Date.now() - t0) / 1000).toFixed(1);
396
+ console.log(JSON.stringify({ port: a.port, corpus: corpus.length, ...report }));
397
+ }
398
+
399
+ const a = parseArgs(process.argv.slice(2));
400
+ if (a.mode === "corpus") await buildCorpus(a);
401
+ else if (a.mode === "queries") await buildQueries(a);
402
+ else if (a.mode === "throughput") await throughput(a);
403
+ else if (a.mode === "quality") await quality(a);
404
+ else {
405
+ console.error("modes: corpus | queries | throughput | quality (see header comment)");
406
+ process.exit(1);
407
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/bootstrap/factory.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAWpE,OAAO,EAAE,iBAAiB,EAAwB,MAAM,kCAAkC,CAAC;AAE3F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAcrF,OAAO,EAQL,kBAAkB,EA0BlB,WAAW,EAGX,YAAY,EA6BZ,aAAa,EAmBb,WAAW,EAEX,KAAK,cAAc,EACnB,KAAK,GAAG,EACR,KAAK,aAAa,EAElB,KAAK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,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAC,CAYhH;AAED;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,IAAI,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAOnF;AAED,wBAAgB,yBAAyB,CAAC,WAAW,CAAC,EAAE,WAAW,GAAG,mBAAmB,GAAG,SAAS,CAWpG;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,WAAW,CAAC,EAAE,WAAW,GAAG,wBAAwB,GAAG,SAAS,CAQ9G;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,WAAW,CAAC,EAAE,WAAW,GAAG,yBAAyB,GAAG,SAAS,CAQhH"}
@@ -180,7 +180,7 @@ function workingTreeGitSignalConfigOf(zodConfig) {
180
180
  ...(trajectoryGit.anchor === "head" ? { anchor: "head" } : {}),
181
181
  };
182
182
  }
183
- function wireComposition(zodConfig, codegraph) {
183
+ async function wireComposition(zodConfig, codegraph) {
184
184
  // Thread git provider config into composition so the registry surfaces a
185
185
  // fully-configured GitEnrichmentProvider via getAllEnrichmentProviders().
186
186
  // IngestFacade no longer constructs git inline — single source of truth is
@@ -204,7 +204,7 @@ function wireComposition(zodConfig, codegraph) {
204
204
  // cold-reindex event-loop stall — fans out across GitEnrichmentProvider's own
205
205
  // BlameWorkerPool for shallow files while deep blames stay on main's async CLI
206
206
  // (bd tea-rags-mcp-dog1v).
207
- const { registry, reranker, allPayloadSignalDescriptors, allStatsAccumulators, signalFloors, languageCodeVersions, languageChunkSetBumpScopes, namingConventions, languageFactory, } = createComposition({
207
+ const { registry, reranker, allPayloadSignalDescriptors, allStatsAccumulators, signalFloors, languageCodeVersions, languageChunkSetBumpScopes, namingConventions, languageFactory, } = await createComposition({
208
208
  // w2dlu T6: the provider builds its per-root VcsGitAdapter from this kind.
209
209
  // The symbol-commit buffer rides the codegraph deps (minted once in
210
210
  // wireCodegraph, bd tea-rags-mcp-3gz4f) — the same instance the temporal
@@ -945,8 +945,8 @@ function activeEnrichmentProviders(registry, trajectoryIngest) {
945
945
  * sizing, the tuning, and the env snapshot recorded back into the registry —
946
946
  * while `shared` supplies the handles that must stay process-wide.
947
947
  */
948
- function createIngestFacade(zodConfig, config, shared) {
949
- const facadeComposition = wireComposition(zodConfig, shared.codegraphDeps);
948
+ async function createIngestFacade(zodConfig, config, shared) {
949
+ const facadeComposition = await wireComposition(zodConfig, shared.codegraphDeps);
950
950
  const enrichmentProviders = activeEnrichmentProviders(facadeComposition.registry, config.trajectoryIngest);
951
951
  const pipelineTuning = {
952
952
  pipelineConfig: buildPipelineConfig(zodConfig.ingest.tune.pipelineConcurrency, zodConfig.embedding.tune, zodConfig.qdrantTune, { pipelineConcurrencyUserSet: zodConfig.flags.userSetPipelineConcurrency }),
@@ -1080,7 +1080,7 @@ export async function createAppContext(config, options) {
1080
1080
  // after `codegraphContext` exists: snapshot retention compares against the
1081
1081
  // live base graph.
1082
1082
  const stopWorkingTreeGraphSweep = scheduleWorkingTreeGraphSweep(workingTreeGraphCache);
1083
- const composition = wireComposition(zodConfig, codegraphContext?.deps);
1083
+ const composition = await wireComposition(zodConfig, codegraphContext?.deps);
1084
1084
  manifestLanguages.factory = composition.languageFactory;
1085
1085
  const { tracePathOps, ontologyReportOps } = createCodegraphOpsSection({
1086
1086
  codegraphContext,
@@ -1103,7 +1103,7 @@ export async function createAppContext(config, options) {
1103
1103
  statsCache,
1104
1104
  composition,
1105
1105
  });
1106
- const { ingest, projectIngestFactory, projectRegistryOps, worktreeOps } = createIngestSection({
1106
+ const { ingest, projectIngestFactory, projectRegistryOps, worktreeOps } = await createIngestSection({
1107
1107
  config,
1108
1108
  zodConfig,
1109
1109
  ambientEnvRole,
@@ -1149,7 +1149,7 @@ export async function createAppContext(config, options) {
1149
1149
  qdrant: infra.qdrant,
1150
1150
  embeddings: infra.embeddings,
1151
1151
  ingest,
1152
- ingestForPath: (path) => projectIngestFactory.forPath(path),
1152
+ ingestForPath: async (path) => projectIngestFactory.forPath(path),
1153
1153
  workingTreeIndexOf: async (path) => explore.workingTreeIndexOf(path),
1154
1154
  explore,
1155
1155
  reranker: composition.reranker,
@@ -1320,9 +1320,10 @@ function createWorkingTreeSection(deps) {
1320
1320
  // The base index's chunker config: its project's registry env replayed
1321
1321
  // over the server's (`ProjectIngestFactory#forPath`, built below and only
1322
1322
  // read at request time), with the size its embedding model derives.
1323
- const resolveWorkingTreeChunkerConfig = async (tree) => projectIngestFactory()
1324
- .forPath(tree.baseIndex.root ?? tree.root)
1325
- .resolveChunkerConfig(tree.baseIndex.collectionName);
1323
+ const resolveWorkingTreeChunkerConfig = async (tree) => {
1324
+ const facade = await projectIngestFactory().forPath(tree.baseIndex.root ?? tree.root);
1325
+ return facade.resolveChunkerConfig(tree.baseIndex.collectionName);
1326
+ };
1326
1327
  // One overlay per process (bd tea-rags-mcp-xi2r9): its delta reader caches per
1327
1328
  // tree, and every read surface — explore, graph, trace_path — shares it.
1328
1329
  const workingTreeOverlay = new WorkingTreeOverlay({
@@ -1522,7 +1523,7 @@ function createIndexDriftReporter(deps) {
1522
1523
  * factory, the server's own ingest slice, the per-project ingest factory over
1523
1524
  * it, and the project registry and worktree ops.
1524
1525
  */
1525
- function createIngestSection(deps) {
1526
+ async function createIngestSection(deps) {
1526
1527
  const { config, zodConfig, ambientEnvRole, infra, collectionRegistry, collectionEmbeddings, statsCache, composition, driftReporter, codegraphContext, } = deps;
1527
1528
  // Phase 2 of unified-enrichment-worker-pool plan. Production runs through
1528
1529
  // the worker-pool executor unconditionally so heavy trajectory work (git
@@ -1590,7 +1591,7 @@ function createIngestSection(deps) {
1590
1591
  driftReporter,
1591
1592
  footprintFactory,
1592
1593
  };
1593
- const ingest = createIngestFacade(zodConfig, config, ingestSlice);
1594
+ const ingest = await createIngestFacade(zodConfig, config, ingestSlice);
1594
1595
  // Per-project registry env at request scope. The server's process env is
1595
1596
  // fixed for its lifetime, so an index run can only pick up the target
1596
1597
  // project's recorded tuning through the facade it is handed — building it
@@ -1600,13 +1601,16 @@ function createIngestSection(deps) {
1600
1601
  registry: collectionRegistry,
1601
1602
  ambientEnvRole,
1602
1603
  processIngest: ingest,
1603
- buildIngest: (env) => {
1604
+ buildIngest: async (env) => {
1604
1605
  const projectZodConfig = parseAppConfigZod(env);
1605
1606
  // The project's own embedding identity too (bd tea-rags-mcp-b91f5): a
1606
1607
  // project whose stamp names another model than this server's indexes
1607
1608
  // with that model, guarded against it, instead of being refused.
1608
1609
  const embedding = collectionEmbeddings.forEmbeddingConfig(projectZodConfig.embedding);
1609
- return createIngestFacade(projectZodConfig, buildAppConfig(projectZodConfig), { ...ingestSlice, ...embedding });
1610
+ return await createIngestFacade(projectZodConfig, buildAppConfig(projectZodConfig), {
1611
+ ...ingestSlice,
1612
+ ...embedding,
1613
+ });
1610
1614
  },
1611
1615
  });
1612
1616
  const projectRegistryOps = new ProjectRegistryOps({
@@ -1653,7 +1657,7 @@ function createExploreSection(deps) {
1653
1657
  // frame is resolved per request from the same `ProjectIngestFactory#forPath`
1654
1658
  // slice `App.getIndexStatus` reads. A project whose registry env disables
1655
1659
  // git then has no git row on either surface (bd tea-rags-mcp-uebug).
1656
- enrichmentHealthFrameForPath: (path) => projectIngestFactory.forPath(path).enrichmentProviderKeys,
1660
+ enrichmentHealthFrameForPath: async (path) => (await projectIngestFactory.forPath(path)).enrichmentProviderKeys,
1657
1661
  workingTreeOverlay,
1658
1662
  historyAnchor,
1659
1663
  });