@jamesaphoenix/tx-core 0.4.2 → 0.4.3

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 (330) hide show
  1. package/README.md +480 -0
  2. package/dist/db.d.ts +28 -14
  3. package/dist/db.d.ts.map +1 -1
  4. package/dist/db.js +102 -14
  5. package/dist/db.js.map +1 -1
  6. package/dist/errors.d.ts +178 -34
  7. package/dist/errors.d.ts.map +1 -1
  8. package/dist/errors.js +119 -26
  9. package/dist/errors.js.map +1 -1
  10. package/dist/id.d.ts +10 -0
  11. package/dist/id.d.ts.map +1 -1
  12. package/dist/id.js +17 -1
  13. package/dist/id.js.map +1 -1
  14. package/dist/index.d.ts +15 -7
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +62 -8
  17. package/dist/index.js.map +1 -1
  18. package/dist/layer.d.ts +23 -14
  19. package/dist/layer.d.ts.map +1 -1
  20. package/dist/layer.js +75 -76
  21. package/dist/layer.js.map +1 -1
  22. package/dist/mappers/anchor.d.ts +15 -1
  23. package/dist/mappers/anchor.d.ts.map +1 -1
  24. package/dist/mappers/anchor.js +95 -28
  25. package/dist/mappers/anchor.js.map +1 -1
  26. package/dist/mappers/attempt.d.ts +3 -1
  27. package/dist/mappers/attempt.d.ts.map +1 -1
  28. package/dist/mappers/attempt.js +23 -9
  29. package/dist/mappers/attempt.js.map +1 -1
  30. package/dist/mappers/candidate.d.ts +3 -1
  31. package/dist/mappers/candidate.d.ts.map +1 -1
  32. package/dist/mappers/candidate.js +46 -16
  33. package/dist/mappers/candidate.js.map +1 -1
  34. package/dist/mappers/claim.d.ts +1 -1
  35. package/dist/mappers/claim.d.ts.map +1 -1
  36. package/dist/mappers/claim.js +11 -4
  37. package/dist/mappers/claim.js.map +1 -1
  38. package/dist/mappers/deduplication.d.ts +13 -1
  39. package/dist/mappers/deduplication.d.ts.map +1 -1
  40. package/dist/mappers/deduplication.js +22 -3
  41. package/dist/mappers/deduplication.js.map +1 -1
  42. package/dist/mappers/doc.d.ts +24 -0
  43. package/dist/mappers/doc.d.ts.map +1 -0
  44. package/dist/mappers/doc.js +161 -0
  45. package/dist/mappers/doc.js.map +1 -0
  46. package/dist/mappers/edge.d.ts +10 -1
  47. package/dist/mappers/edge.d.ts.map +1 -1
  48. package/dist/mappers/edge.js +74 -12
  49. package/dist/mappers/edge.js.map +1 -1
  50. package/dist/mappers/file-learning.d.ts.map +1 -1
  51. package/dist/mappers/file-learning.js +2 -1
  52. package/dist/mappers/file-learning.js.map +1 -1
  53. package/dist/mappers/index.d.ts +6 -7
  54. package/dist/mappers/index.d.ts.map +1 -1
  55. package/dist/mappers/index.js +10 -12
  56. package/dist/mappers/index.js.map +1 -1
  57. package/dist/mappers/learning.d.ts +9 -1
  58. package/dist/mappers/learning.d.ts.map +1 -1
  59. package/dist/mappers/learning.js +94 -14
  60. package/dist/mappers/learning.js.map +1 -1
  61. package/dist/mappers/orchestrator-state.d.ts +1 -1
  62. package/dist/mappers/orchestrator-state.d.ts.map +1 -1
  63. package/dist/mappers/orchestrator-state.js +31 -5
  64. package/dist/mappers/orchestrator-state.js.map +1 -1
  65. package/dist/mappers/parse-date.d.ts +11 -0
  66. package/dist/mappers/parse-date.d.ts.map +1 -0
  67. package/dist/mappers/parse-date.js +18 -0
  68. package/dist/mappers/parse-date.js.map +1 -0
  69. package/dist/mappers/run.d.ts +14 -4
  70. package/dist/mappers/run.d.ts.map +1 -1
  71. package/dist/mappers/run.js +49 -18
  72. package/dist/mappers/run.js.map +1 -1
  73. package/dist/mappers/task.d.ts +5 -1
  74. package/dist/mappers/task.d.ts.map +1 -1
  75. package/dist/mappers/task.js +66 -16
  76. package/dist/mappers/task.js.map +1 -1
  77. package/dist/mappers/tracked-project.d.ts +3 -1
  78. package/dist/mappers/tracked-project.d.ts.map +1 -1
  79. package/dist/mappers/tracked-project.js +23 -9
  80. package/dist/mappers/tracked-project.js.map +1 -1
  81. package/dist/mappers/worker.d.ts +1 -1
  82. package/dist/mappers/worker.d.ts.map +1 -1
  83. package/dist/mappers/worker.js +44 -6
  84. package/dist/mappers/worker.js.map +1 -1
  85. package/dist/repo/anchor-repo.d.ts +2 -2
  86. package/dist/repo/anchor-repo.d.ts.map +1 -1
  87. package/dist/repo/anchor-repo.js +46 -5
  88. package/dist/repo/anchor-repo.js.map +1 -1
  89. package/dist/repo/attempt-repo.d.ts +2 -2
  90. package/dist/repo/attempt-repo.d.ts.map +1 -1
  91. package/dist/repo/attempt-repo.js +16 -6
  92. package/dist/repo/attempt-repo.js.map +1 -1
  93. package/dist/repo/candidate-repo.d.ts.map +1 -1
  94. package/dist/repo/candidate-repo.js +22 -1
  95. package/dist/repo/candidate-repo.js.map +1 -1
  96. package/dist/repo/claim-repo.d.ts +46 -2
  97. package/dist/repo/claim-repo.d.ts.map +1 -1
  98. package/dist/repo/claim-repo.js +113 -6
  99. package/dist/repo/claim-repo.js.map +1 -1
  100. package/dist/repo/compaction-repo.d.ts +41 -0
  101. package/dist/repo/compaction-repo.d.ts.map +1 -0
  102. package/dist/repo/compaction-repo.js +84 -0
  103. package/dist/repo/compaction-repo.js.map +1 -0
  104. package/dist/repo/deduplication-repo.d.ts +9 -1
  105. package/dist/repo/deduplication-repo.d.ts.map +1 -1
  106. package/dist/repo/deduplication-repo.js +46 -9
  107. package/dist/repo/deduplication-repo.js.map +1 -1
  108. package/dist/repo/dep-repo.d.ts +27 -3
  109. package/dist/repo/dep-repo.d.ts.map +1 -1
  110. package/dist/repo/dep-repo.js +166 -39
  111. package/dist/repo/dep-repo.js.map +1 -1
  112. package/dist/repo/doc-repo.d.ts +59 -0
  113. package/dist/repo/doc-repo.d.ts.map +1 -0
  114. package/dist/repo/doc-repo.js +276 -0
  115. package/dist/repo/doc-repo.js.map +1 -0
  116. package/dist/repo/edge-repo.d.ts +1 -1
  117. package/dist/repo/edge-repo.d.ts.map +1 -1
  118. package/dist/repo/edge-repo.js +65 -34
  119. package/dist/repo/edge-repo.js.map +1 -1
  120. package/dist/repo/file-learning-repo.d.ts +3 -3
  121. package/dist/repo/file-learning-repo.d.ts.map +1 -1
  122. package/dist/repo/file-learning-repo.js +19 -8
  123. package/dist/repo/file-learning-repo.js.map +1 -1
  124. package/dist/repo/index.d.ts +4 -6
  125. package/dist/repo/index.d.ts.map +1 -1
  126. package/dist/repo/index.js +3 -5
  127. package/dist/repo/index.js.map +1 -1
  128. package/dist/repo/learning-repo.d.ts +10 -3
  129. package/dist/repo/learning-repo.d.ts.map +1 -1
  130. package/dist/repo/learning-repo.js +68 -11
  131. package/dist/repo/learning-repo.js.map +1 -1
  132. package/dist/repo/orchestrator-state-repo.d.ts.map +1 -1
  133. package/dist/repo/orchestrator-state-repo.js +8 -1
  134. package/dist/repo/orchestrator-state-repo.js.map +1 -1
  135. package/dist/repo/run-repo.d.ts +3 -3
  136. package/dist/repo/run-repo.d.ts.map +1 -1
  137. package/dist/repo/run-repo.js +40 -19
  138. package/dist/repo/run-repo.js.map +1 -1
  139. package/dist/repo/task-repo.d.ts +14 -3
  140. package/dist/repo/task-repo.d.ts.map +1 -1
  141. package/dist/repo/task-repo.js +194 -20
  142. package/dist/repo/task-repo.js.map +1 -1
  143. package/dist/repo/tracked-project-repo.d.ts.map +1 -1
  144. package/dist/repo/tracked-project-repo.js +15 -1
  145. package/dist/repo/tracked-project-repo.js.map +1 -1
  146. package/dist/repo/worker-repo.d.ts +3 -2
  147. package/dist/repo/worker-repo.d.ts.map +1 -1
  148. package/dist/repo/worker-repo.js +54 -8
  149. package/dist/repo/worker-repo.js.map +1 -1
  150. package/dist/schemas/sync.js +2 -2
  151. package/dist/schemas/sync.js.map +1 -1
  152. package/dist/schemas/worker.d.ts +1 -0
  153. package/dist/schemas/worker.d.ts.map +1 -1
  154. package/dist/schemas/worker.js +1 -0
  155. package/dist/schemas/worker.js.map +1 -1
  156. package/dist/services/agent-service.d.ts +57 -0
  157. package/dist/services/agent-service.d.ts.map +1 -0
  158. package/dist/services/agent-service.js +81 -0
  159. package/dist/services/agent-service.js.map +1 -0
  160. package/dist/services/anchor-service.js +1 -1
  161. package/dist/services/anchor-service.js.map +1 -1
  162. package/dist/services/anchor-verification.d.ts +8 -0
  163. package/dist/services/anchor-verification.d.ts.map +1 -1
  164. package/dist/services/anchor-verification.js +237 -37
  165. package/dist/services/anchor-verification.js.map +1 -1
  166. package/dist/services/ast-grep-service.d.ts.map +1 -1
  167. package/dist/services/ast-grep-service.js +93 -22
  168. package/dist/services/ast-grep-service.js.map +1 -1
  169. package/dist/services/attempt-service.d.ts.map +1 -1
  170. package/dist/services/attempt-service.js +1 -4
  171. package/dist/services/attempt-service.js.map +1 -1
  172. package/dist/services/auto-sync-service.d.ts +1 -1
  173. package/dist/services/auto-sync-service.d.ts.map +1 -1
  174. package/dist/services/auto-sync-service.js +18 -10
  175. package/dist/services/auto-sync-service.js.map +1 -1
  176. package/dist/services/claim-service.d.ts +8 -2
  177. package/dist/services/claim-service.d.ts.map +1 -1
  178. package/dist/services/claim-service.js +37 -23
  179. package/dist/services/claim-service.js.map +1 -1
  180. package/dist/services/compaction-service.d.ts +105 -0
  181. package/dist/services/compaction-service.d.ts.map +1 -0
  182. package/dist/services/compaction-service.js +369 -0
  183. package/dist/services/compaction-service.js.map +1 -0
  184. package/dist/services/cycle-scan-service.d.ts +32 -0
  185. package/dist/services/cycle-scan-service.d.ts.map +1 -0
  186. package/dist/services/cycle-scan-service.js +542 -0
  187. package/dist/services/cycle-scan-service.js.map +1 -0
  188. package/dist/services/daemon-service.d.ts +40 -2
  189. package/dist/services/daemon-service.d.ts.map +1 -1
  190. package/dist/services/daemon-service.js +199 -52
  191. package/dist/services/daemon-service.js.map +1 -1
  192. package/dist/services/deduplication-service.d.ts +8 -4
  193. package/dist/services/deduplication-service.d.ts.map +1 -1
  194. package/dist/services/deduplication-service.js +79 -25
  195. package/dist/services/deduplication-service.js.map +1 -1
  196. package/dist/services/dep-service.d.ts +2 -2
  197. package/dist/services/dep-service.d.ts.map +1 -1
  198. package/dist/services/dep-service.js +9 -5
  199. package/dist/services/dep-service.js.map +1 -1
  200. package/dist/services/diversifier-service.d.ts +2 -1
  201. package/dist/services/diversifier-service.d.ts.map +1 -1
  202. package/dist/services/diversifier-service.js +37 -43
  203. package/dist/services/diversifier-service.js.map +1 -1
  204. package/dist/services/doc-service.d.ts +49 -0
  205. package/dist/services/doc-service.d.ts.map +1 -0
  206. package/dist/services/doc-service.js +605 -0
  207. package/dist/services/doc-service.js.map +1 -0
  208. package/dist/services/edge-service.js +2 -2
  209. package/dist/services/edge-service.js.map +1 -1
  210. package/dist/services/embedding-service.d.ts +66 -2
  211. package/dist/services/embedding-service.d.ts.map +1 -1
  212. package/dist/services/embedding-service.js +138 -24
  213. package/dist/services/embedding-service.js.map +1 -1
  214. package/dist/services/file-learning-service.d.ts.map +1 -1
  215. package/dist/services/file-learning-service.js +8 -7
  216. package/dist/services/file-learning-service.js.map +1 -1
  217. package/dist/services/file-watcher-service.d.ts.map +1 -1
  218. package/dist/services/file-watcher-service.js +58 -11
  219. package/dist/services/file-watcher-service.js.map +1 -1
  220. package/dist/services/graph-expansion.d.ts +3 -0
  221. package/dist/services/graph-expansion.d.ts.map +1 -1
  222. package/dist/services/graph-expansion.js +28 -7
  223. package/dist/services/graph-expansion.js.map +1 -1
  224. package/dist/services/hierarchy-service.d.ts +1 -1
  225. package/dist/services/hierarchy-service.d.ts.map +1 -1
  226. package/dist/services/hierarchy-service.js +50 -32
  227. package/dist/services/hierarchy-service.js.map +1 -1
  228. package/dist/services/index.d.ts +13 -15
  229. package/dist/services/index.d.ts.map +1 -1
  230. package/dist/services/index.js +13 -15
  231. package/dist/services/index.js.map +1 -1
  232. package/dist/services/learning-service.d.ts +4 -4
  233. package/dist/services/learning-service.d.ts.map +1 -1
  234. package/dist/services/learning-service.js +75 -42
  235. package/dist/services/learning-service.js.map +1 -1
  236. package/dist/services/llm-service.d.ts +62 -0
  237. package/dist/services/llm-service.d.ts.map +1 -0
  238. package/dist/services/llm-service.js +172 -0
  239. package/dist/services/llm-service.js.map +1 -0
  240. package/dist/services/migration-service.d.ts +1 -1
  241. package/dist/services/migration-service.d.ts.map +1 -1
  242. package/dist/services/migration-service.js +18 -7
  243. package/dist/services/migration-service.js.map +1 -1
  244. package/dist/services/orchestrator-service.d.ts +4 -3
  245. package/dist/services/orchestrator-service.d.ts.map +1 -1
  246. package/dist/services/orchestrator-service.js +67 -29
  247. package/dist/services/orchestrator-service.js.map +1 -1
  248. package/dist/services/promotion-service.d.ts +1 -1
  249. package/dist/services/promotion-service.js +1 -1
  250. package/dist/services/promotion-service.js.map +1 -1
  251. package/dist/services/query-expansion-service.d.ts +30 -9
  252. package/dist/services/query-expansion-service.d.ts.map +1 -1
  253. package/dist/services/query-expansion-service.js +54 -63
  254. package/dist/services/query-expansion-service.js.map +1 -1
  255. package/dist/services/ready-service.d.ts +21 -1
  256. package/dist/services/ready-service.d.ts.map +1 -1
  257. package/dist/services/ready-service.js +44 -21
  258. package/dist/services/ready-service.js.map +1 -1
  259. package/dist/services/retriever-service.d.ts +10 -10
  260. package/dist/services/retriever-service.d.ts.map +1 -1
  261. package/dist/services/retriever-service.js +53 -161
  262. package/dist/services/retriever-service.js.map +1 -1
  263. package/dist/services/swarm-verification.d.ts +2 -2
  264. package/dist/services/swarm-verification.d.ts.map +1 -1
  265. package/dist/services/swarm-verification.js +12 -6
  266. package/dist/services/swarm-verification.js.map +1 -1
  267. package/dist/services/sync-service.d.ts +17 -4
  268. package/dist/services/sync-service.d.ts.map +1 -1
  269. package/dist/services/sync-service.js +378 -114
  270. package/dist/services/sync-service.js.map +1 -1
  271. package/dist/services/task-service.d.ts +6 -4
  272. package/dist/services/task-service.d.ts.map +1 -1
  273. package/dist/services/task-service.js +162 -33
  274. package/dist/services/task-service.js.map +1 -1
  275. package/dist/services/tracing-service.d.ts +55 -0
  276. package/dist/services/tracing-service.d.ts.map +1 -0
  277. package/dist/services/tracing-service.js +99 -0
  278. package/dist/services/tracing-service.js.map +1 -0
  279. package/dist/services/transcript-adapter.d.ts +99 -0
  280. package/dist/services/transcript-adapter.d.ts.map +1 -0
  281. package/dist/services/transcript-adapter.js +283 -0
  282. package/dist/services/transcript-adapter.js.map +1 -0
  283. package/dist/services/validation-service.d.ts +85 -0
  284. package/dist/services/validation-service.d.ts.map +1 -0
  285. package/dist/services/validation-service.js +289 -0
  286. package/dist/services/validation-service.js.map +1 -0
  287. package/dist/services/worker-process.d.ts +23 -4
  288. package/dist/services/worker-process.d.ts.map +1 -1
  289. package/dist/services/worker-process.js +159 -70
  290. package/dist/services/worker-process.js.map +1 -1
  291. package/dist/services/worker-service.d.ts.map +1 -1
  292. package/dist/services/worker-service.js +7 -12
  293. package/dist/services/worker-service.js.map +1 -1
  294. package/dist/sync/claude-task-writer.d.ts +49 -0
  295. package/dist/sync/claude-task-writer.d.ts.map +1 -0
  296. package/dist/sync/claude-task-writer.js +135 -0
  297. package/dist/sync/claude-task-writer.js.map +1 -0
  298. package/dist/utils/doc-hash.d.ts +10 -0
  299. package/dist/utils/doc-hash.d.ts.map +1 -0
  300. package/dist/utils/doc-hash.js +14 -0
  301. package/dist/utils/doc-hash.js.map +1 -0
  302. package/dist/utils/doc-renderer.d.ts +44 -0
  303. package/dist/utils/doc-renderer.d.ts.map +1 -0
  304. package/dist/utils/doc-renderer.js +202 -0
  305. package/dist/utils/doc-renderer.js.map +1 -0
  306. package/dist/utils/math.d.ts +5 -1
  307. package/dist/utils/math.d.ts.map +1 -1
  308. package/dist/utils/math.js +12 -4
  309. package/dist/utils/math.js.map +1 -1
  310. package/dist/utils/sql.d.ts +9 -0
  311. package/dist/utils/sql.d.ts.map +1 -0
  312. package/dist/utils/sql.js +9 -0
  313. package/dist/utils/sql.js.map +1 -0
  314. package/dist/utils/toml-config.d.ts +22 -0
  315. package/dist/utils/toml-config.d.ts.map +1 -0
  316. package/dist/utils/toml-config.js +75 -0
  317. package/dist/utils/toml-config.js.map +1 -0
  318. package/dist/worker/hooks.d.ts +102 -0
  319. package/dist/worker/hooks.d.ts.map +1 -0
  320. package/dist/worker/hooks.js +11 -0
  321. package/dist/worker/hooks.js.map +1 -0
  322. package/dist/worker/index.d.ts +9 -0
  323. package/dist/worker/index.d.ts.map +1 -0
  324. package/dist/worker/index.js +8 -0
  325. package/dist/worker/index.js.map +1 -0
  326. package/dist/worker/run-worker.d.ts +33 -0
  327. package/dist/worker/run-worker.d.ts.map +1 -0
  328. package/dist/worker/run-worker.js +265 -0
  329. package/dist/worker/run-worker.js.map +1 -0
  330. package/package.json +14 -12
package/dist/index.d.ts CHANGED
@@ -6,20 +6,28 @@
6
6
  *
7
7
  * See DD-002 for design specification.
8
8
  */
9
- export { TaskNotFoundError, LearningNotFoundError, FileLearningNotFoundError, AttemptNotFoundError, ValidationError, CircularDependencyError, DatabaseError, EmbeddingUnavailableError, EdgeNotFoundError, AnchorNotFoundError, CandidateNotFoundError, ExtractionUnavailableError, RerankerUnavailableError, RetrievalError, AstGrepError, DaemonError, RegistrationError, WorkerNotFoundError, AlreadyClaimedError, ClaimNotFoundError, ClaimIdNotFoundError, LeaseExpiredError, MaxRenewalsExceededError, OrchestratorError } from "./errors.js";
10
- export { SqliteClient, SqliteClientLive, makeSqliteClient, getSchemaVersion, applyMigrations, type SqliteDatabase, type SqliteStatement } from "./db.js";
9
+ export { TaskNotFoundError, LearningNotFoundError, FileLearningNotFoundError, AttemptNotFoundError, RunNotFoundError, ValidationError, CircularDependencyError, DatabaseError, DependencyNotFoundError, EmbeddingUnavailableError, EmbeddingDimensionMismatchError, RerankerUnavailableError, RetrievalError, LlmUnavailableError, DaemonError, FileWatcherError, WatcherAlreadyRunningError, WatcherNotRunningError, RegistrationError, WorkerNotFoundError, AlreadyClaimedError, ClaimNotFoundError, ClaimIdNotFoundError, LeaseExpiredError, MaxRenewalsExceededError, OrchestratorError, BatchProcessingError, StaleDataError, HasChildrenError, InvalidStatusError, InvalidDateError, DocNotFoundError, DocLockedError, InvalidDocYamlError, InvariantNotFoundError, AgentError, CycleScanError } from "./errors.js";
10
+ export { SqliteClient, SqliteClientLive, makeSqliteClient, getSchemaVersion, applyMigrations, type SqliteDatabase, type SqliteStatement, type SqliteRunResult } from "./db.js";
11
11
  export { generateTaskId, fixtureId } from "./id.js";
12
- export { makeAppLayer, makeMinimalLayer, SyncService, MigrationService, AutoSyncService, AutoSyncServiceNoop, AutoSyncServiceLive, LearningService, FileLearningService, EmbeddingService, EmbeddingServiceNoop, EmbeddingServiceLive, EmbeddingServiceOpenAI, EmbeddingServiceAuto, createEmbedderLayer, type EmbedderConfig, AttemptService, TaskService, DependencyService, ReadyService, HierarchyService, ScoreService, DeduplicationService, DeduplicationServiceLive } from "./layer.js";
13
- export { TaskServiceLive, DependencyServiceLive, ReadyServiceLive, HierarchyServiceLive, ScoreServiceLive, LearningServiceLive, FileLearningServiceLive, AttemptServiceLive, SyncServiceLive, MigrationServiceLive, AnchorService, AnchorServiceLive, EdgeService, EdgeServiceLive, CandidateExtractorService, CandidateExtractorServiceNoop, CandidateExtractorServiceAnthropic, CandidateExtractorServiceOpenAI, CandidateExtractorServiceAuto, QueryExpansionService, QueryExpansionServiceNoop, QueryExpansionServiceLive, QueryExpansionServiceAuto, RerankerService, RerankerServiceNoop, RerankerServiceLive, RerankerServiceAuto, RetrieverService, RetrieverServiceNoop, RetrieverServiceLive, RetrieverServiceAuto, GraphExpansionService, GraphExpansionServiceLive, AnchorVerificationService, AnchorVerificationServiceLive, SwarmVerificationService, SwarmVerificationServiceLive, calculateMajorityVote, AstGrepService, AstGrepServiceLive, AstGrepServiceNoop, AstGrepServiceAuto, EXT_TO_LANGUAGE, DEFAULT_SYMBOL_PATTERNS, DaemonService, DaemonServiceLive, DaemonServiceNoop, PID_FILE_PATH, LAUNCHD_PLIST_PATH, SYSTEMD_SERVICE_PATH, writePid, readPid, removePid, isProcessRunning, defaultDaemonConfig, generateLaunchdPlist, generateSystemdService, type DaemonStatus, type DaemonConfig, type LaunchdPlistOptions, type SystemdServiceOptions, MIGRATIONS, getLatestVersion, type ScoreBreakdown, type ExportResult, type ImportResult, type SyncStatus, type CompactResult, type ExportOptions, type ExportAllResult, type ImportAllResult, type Migration, type AppliedMigration, type MigrationStatus, type AutoSyncEntity, type AnchorVerificationResult, type BatchVerificationResult, type TypedAnchorInput, type GraphStatusResult, type PruneResult, type NeighborWithDepth, type NeighborWithPath, type FindNeighborsOptions, type QueryExpansionResult, type RerankerResult, type SeedLearning, type ExpandedLearning, type GraphExpansionOptions, type GraphExpansionResult, type VerificationResult, type VerificationSummary, type VerifyOptions, type VerificationBatch, type BatchResult, type SwarmMetrics, type SwarmVerificationResult, type SwarmVerifyOptions, type VoteResult, PromotionService, type PromotionResult, type AutoPromoteResult, FeedbackTrackerService, FeedbackTrackerServiceNoop, FeedbackTrackerServiceLive, type LearningUsageFeedback, WorkerService, WorkerServiceLive, type WorkerRegistration, type WorkerFilter, type FindDeadConfig, ClaimService, ClaimServiceLive, OrchestratorService, OrchestratorServiceLive, type OrchestratorConfig, runWorkerProcess, type WorkerProcessConfig } from "./services/index.js";
14
- export { TaskRepository, TaskRepositoryLive, DependencyRepository, DependencyRepositoryLive, LearningRepository, LearningRepositoryLive, type BM25Result, FileLearningRepository, FileLearningRepositoryLive, AttemptRepository, AttemptRepositoryLive, RunRepository, RunRepositoryLive, AnchorRepository, AnchorRepositoryLive, EdgeRepository, EdgeRepositoryLive, DeduplicationRepository, DeduplicationRepositoryLive, CandidateRepository, CandidateRepositoryLive, TrackedProjectRepository, TrackedProjectRepositoryLive, WorkerRepository, WorkerRepositoryLive, ClaimRepository, ClaimRepositoryLive, OrchestratorStateRepository, OrchestratorStateRepositoryLive, type OrchestratorStateUpdate } from "./repo/index.js";
12
+ export { makeAppLayer, makeAppLayerFromInfra, makeMinimalLayer, SyncService, MigrationService, AutoSyncService, AutoSyncServiceNoop, AutoSyncServiceLive, LearningService, FileLearningService, EmbeddingService, EmbeddingServiceNoop, EmbeddingServiceLive, EmbeddingServiceOpenAI, EmbeddingServiceAuto, createEmbedderLayer, type EmbedderConfig, AttemptService, TaskService, DependencyService, ReadyService, type ReadyCheckResult, isReadyResult, HierarchyService, ScoreService, DiversifierService, DiversifierServiceNoop, DiversifierServiceLive, DiversifierServiceAuto, DocService } from "./layer.js";
13
+ export { TaskServiceLive, DependencyServiceLive, ReadyServiceLive, HierarchyServiceLive, ScoreServiceLive, LearningServiceLive, FileLearningServiceLive, AttemptServiceLive, SyncServiceLive, MigrationServiceLive, RerankerService, RerankerServiceNoop, RerankerServiceLive, RerankerServiceAuto, RetrieverService, RetrieverServiceNoop, RetrieverServiceLive, RetrieverServiceAuto, WorkerService, WorkerServiceLive, type WorkerRegistration, type WorkerFilter, type FindDeadConfig, ClaimService, ClaimServiceLive, OrchestratorService, OrchestratorServiceLive, type OrchestratorConfig, runWorkerProcess, type WorkerProcessConfig, MIGRATIONS, getLatestVersion, type ScoreBreakdown, type ExportResult, type ImportResult, type SyncStatus, type CompactResult, type ExportOptions, type ExportAllResult, type ImportAllResult, type Migration, type AppliedMigration, type MigrationStatus, type AutoSyncEntity, type RerankerResult, isValidLlama, isValidLlamaModel, isValidLlamaEmbeddingContext, isValidOpenAIClient, validateEmbeddingDimensions, LlmService, LlmServiceNoop, LlmServiceClaudeAgentSdk, LlmServiceAnthropicSdk, LlmServiceAuto, LlmOptionsSchema, type LlmOptions, QueryExpansionService, QueryExpansionServiceNoop, QueryExpansionServiceLive, QueryExpansionServiceAuto, QueryExpansionUnavailableError, type QueryExpansionResult, MAX_EXPANSION_QUERIES, MAX_QUERY_LENGTH, validateExpansions, DeduplicationService, DeduplicationServiceLive, DaemonService, DaemonServiceLive, DaemonServiceNoop, PID_FILE_PATH, getPidFilePath, LAUNCHD_PLIST_PATH, writePid, readPid, removePid, removePidIfContentMatches, isProcessRunning, tryAtomicPidCreate, acquirePidLock, defaultDaemonConfig, generateLaunchdPlist, generateSystemdService, type DaemonStatus, type DaemonConfig, type LaunchdPlistOptions, type SystemdServiceOptions, FileWatcherService, FileWatcherServiceLive, FileWatcherServiceNoop, type FileEvent, type FileEventType, type FileWatcherConfig, type FileWatcherStatus, ClaudeCodeAdapter, GenericJSONLAdapter, getAdapter, registerAdapter, type TranscriptAdapter, type ToolCall, type Message, DocServiceLive, AgentService, AgentServiceLive, AgentServiceNoop, type AgentRunConfig, type AgentResult, CycleScanService, CycleScanServiceLive } from "./services/index.js";
14
+ export { TaskRepository, TaskRepositoryLive, DependencyRepository, DependencyRepositoryLive, LearningRepository, LearningRepositoryLive, type BM25Result, FileLearningRepository, FileLearningRepositoryLive, AttemptRepository, AttemptRepositoryLive, RunRepository, RunRepositoryLive, WorkerRepository, WorkerRepositoryLive, ClaimRepository, ClaimRepositoryLive, OrchestratorStateRepository, OrchestratorStateRepositoryLive, type OrchestratorStateUpdate, DeduplicationRepository, DeduplicationRepositoryLive, TrackedProjectRepository, TrackedProjectRepositoryLive, DocRepository, DocRepositoryLive, type InsertDocInput, type UpdateDocInput } from "./repo/index.js";
15
15
  export * from "./schemas/index.js";
16
16
  export { rowToTask, rowToDependency, isValidStatus, isValidTransition, VALID_TRANSITIONS, type TaskRow, type DependencyRow } from "./mappers/task.js";
17
17
  export { rowToLearning, float32ArrayToBuffer, type LearningRow } from "./mappers/learning.js";
18
18
  export { rowToFileLearning, matchesPattern, type FileLearningRow } from "./mappers/file-learning.js";
19
19
  export { rowToAttempt, type AttemptRow } from "./mappers/attempt.js";
20
- export { rowToAnchor, rowToInvalidationLog, type AnchorRow, type InvalidationLogRow } from "./mappers/anchor.js";
21
- export { rowToEdge, type EdgeRow } from "./mappers/edge.js";
22
20
  export { rowToWorker, isValidWorkerStatus, WORKER_STATUSES, type WorkerRow } from "./mappers/worker.js";
21
+ export { normalizeContent, hashContent } from "./mappers/deduplication.js";
22
+ export { rowToDoc, rowToDocLink, rowToTaskDocLink, rowToInvariant, rowToInvariantCheck, isValidDocKind, isValidDocStatus, type DocRow, type DocLinkRow, type TaskDocLinkRow, type InvariantRow, type InvariantCheckRow } from "./mappers/doc.js";
23
23
  export { cosineSimilarity } from "./utils/math.js";
24
24
  export { matchesGlob } from "./utils/glob.js";
25
+ export { escapeLikePattern, DEFAULT_QUERY_LIMIT } from "./utils/sql.js";
26
+ export { computeDocHash } from "./utils/doc-hash.js";
27
+ export { renderDocToMarkdown, renderIndexToMarkdown } from "./utils/doc-renderer.js";
28
+ export { readTxConfig, type TxConfig, type TxDocsConfig } from "./utils/toml-config.js";
29
+ export { type ExecutionResult, type IOCapture, type WorkerContext, type WorkerHooks, type WorkerConfig, runWorker } from "./worker/index.js";
30
+ export { TracingService, TracingServiceLive, TracingServiceNoop, type SpanOptions } from "./services/tracing-service.js";
31
+ export { ValidationService, ValidationServiceLive, type ValidationSeverity, type ValidationIssue, type CheckResult, type ValidationResult, type ValidateOptions } from "./services/validation-service.js";
32
+ export { buildClaudeTaskFiles, ClaudeTaskFileSchema, ClaudeSyncResultSchema, type ClaudeTaskFile, type ClaudeSyncResult } from "./sync/claude-task-writer.js";
25
33
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,EACpB,eAAe,EACf,uBAAuB,EACvB,aAAa,EACb,yBAAyB,EACzB,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,cAAc,EACd,YAAY,EACZ,WAAW,EAEX,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,iBAAiB,EAClB,MAAM,aAAa,CAAA;AAKpB,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,KAAK,cAAc,EACnB,KAAK,eAAe,EACrB,MAAM,SAAS,CAAA;AAKhB,OAAO,EAAE,cA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AAiB,EACjB,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACd,kBAAkB,EAClB,uBAAuB,EACvB,2BAA2B,EAC3B,mBAAmB,EACnB,uBAAuB,EACvB,wBAAwB,EACxB,4BAA4B,EAC5B,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,2BAA2B,EAC3B,+BAA+B,EAC/B,KAAK,uBAAuB,EAC7B,MAAM,iBAAiB,CAAA;AAKxB,cAAc,oBAAoB,CAAA;AAKlC,OAAO,EACL,SAAS,EACT,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,KAAK,OAAO,EACZ,KAAK,aAAa,EACnB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,KAAK,WAAW,EACjB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,KAAK,eAAe,EACrB,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EACL,YAAY,EACZ,KAAK,UAAU,EAChB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,KAAK,SAAS,EACd,KAAK,kBAAkB,EACxB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EACL,SAAS,EACT,KAAK,OAAO,EACb,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,eAAe,EACf,KAAK,SAAS,EACf,MAAM,qBAAqB,CAAA;AAK5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,EACzB,oBA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AAc,EACnB,KAAK,gBAAgB,EACtB,MAAM,8BAA8B,CAAA"}
package/dist/index.js CHANGED
@@ -9,9 +9,25 @@
9
9
  // =============================================================================
10
10
  // Errors
11
11
  // =============================================================================
12
- export { TaskNotFoundError, LearningNotFoundError, FileLearningNotFoundError, AttemptNotFoundError, ValidationError, CircularDependencyError, DatabaseError, EmbeddingUnavailableError, EdgeNotFoundError, AnchorNotFoundError, CandidateNotFoundError, ExtractionUnavailableError, RerankerUnavailableError, RetrievalError, AstGrepError, DaemonError,
12
+ export { TaskNotFoundError, LearningNotFoundError, FileLearningNotFoundError, AttemptNotFoundError, RunNotFoundError, ValidationError, CircularDependencyError, DatabaseError, DependencyNotFoundError, EmbeddingUnavailableError, EmbeddingDimensionMismatchError, RerankerUnavailableError, RetrievalError,
13
+ // LLM service errors (DD-022)
14
+ LlmUnavailableError,
15
+ // Daemon / file-watcher errors
16
+ DaemonError, FileWatcherError, WatcherAlreadyRunningError, WatcherNotRunningError,
13
17
  // Orchestration errors (PRD-018)
14
- RegistrationError, WorkerNotFoundError, AlreadyClaimedError, ClaimNotFoundError, ClaimIdNotFoundError, LeaseExpiredError, MaxRenewalsExceededError, OrchestratorError } from "./errors.js";
18
+ RegistrationError, WorkerNotFoundError, AlreadyClaimedError, ClaimNotFoundError, ClaimIdNotFoundError, LeaseExpiredError, MaxRenewalsExceededError, OrchestratorError,
19
+ // Batch processing errors
20
+ BatchProcessingError,
21
+ // Optimistic locking errors
22
+ StaleDataError,
23
+ // Hierarchy protection errors
24
+ HasChildrenError,
25
+ // Data validation errors
26
+ InvalidStatusError, InvalidDateError,
27
+ // Doc errors (DD-023)
28
+ DocNotFoundError, DocLockedError, InvalidDocYamlError, InvariantNotFoundError,
29
+ // Cycle scan errors
30
+ AgentError, CycleScanError } from "./errors.js";
15
31
  // =============================================================================
16
32
  // Database
17
33
  // =============================================================================
@@ -23,17 +39,35 @@ export { generateTaskId, fixtureId } from "./id.js";
23
39
  // =============================================================================
24
40
  // Layers
25
41
  // =============================================================================
26
- export { makeAppLayer, makeMinimalLayer,
42
+ export { makeAppLayer, makeAppLayerFromInfra, makeMinimalLayer,
27
43
  // Re-exports for convenience
28
- SyncService, MigrationService, AutoSyncService, AutoSyncServiceNoop, AutoSyncServiceLive, LearningService, FileLearningService, EmbeddingService, EmbeddingServiceNoop, EmbeddingServiceLive, EmbeddingServiceOpenAI, EmbeddingServiceAuto, createEmbedderLayer, AttemptService, TaskService, DependencyService, ReadyService, HierarchyService, ScoreService, DeduplicationService, DeduplicationServiceLive } from "./layer.js";
44
+ SyncService, MigrationService, AutoSyncService, AutoSyncServiceNoop, AutoSyncServiceLive, LearningService, FileLearningService, EmbeddingService, EmbeddingServiceNoop, EmbeddingServiceLive, EmbeddingServiceOpenAI, EmbeddingServiceAuto, createEmbedderLayer, AttemptService, TaskService, DependencyService, ReadyService, isReadyResult, HierarchyService, ScoreService, DiversifierService, DiversifierServiceNoop, DiversifierServiceLive, DiversifierServiceAuto, DocService } from "./layer.js";
29
45
  // =============================================================================
30
46
  // Services (full exports)
31
47
  // =============================================================================
32
- export { TaskServiceLive, DependencyServiceLive, ReadyServiceLive, HierarchyServiceLive, ScoreServiceLive, LearningServiceLive, FileLearningServiceLive, AttemptServiceLive, SyncServiceLive, MigrationServiceLive, AnchorService, AnchorServiceLive, EdgeService, EdgeServiceLive, CandidateExtractorService, CandidateExtractorServiceNoop, CandidateExtractorServiceAnthropic, CandidateExtractorServiceOpenAI, CandidateExtractorServiceAuto, QueryExpansionService, QueryExpansionServiceNoop, QueryExpansionServiceLive, QueryExpansionServiceAuto, RerankerService, RerankerServiceNoop, RerankerServiceLive, RerankerServiceAuto, RetrieverService, RetrieverServiceNoop, RetrieverServiceLive, RetrieverServiceAuto, GraphExpansionService, GraphExpansionServiceLive, AnchorVerificationService, AnchorVerificationServiceLive, SwarmVerificationService, SwarmVerificationServiceLive, calculateMajorityVote, AstGrepService, AstGrepServiceLive, AstGrepServiceNoop, AstGrepServiceAuto, EXT_TO_LANGUAGE, DEFAULT_SYMBOL_PATTERNS, DaemonService, DaemonServiceLive, DaemonServiceNoop, PID_FILE_PATH, LAUNCHD_PLIST_PATH, SYSTEMD_SERVICE_PATH, writePid, readPid, removePid, isProcessRunning, defaultDaemonConfig, generateLaunchdPlist, generateSystemdService, MIGRATIONS, getLatestVersion, PromotionService, FeedbackTrackerService, FeedbackTrackerServiceNoop, FeedbackTrackerServiceLive, WorkerService, WorkerServiceLive, ClaimService, ClaimServiceLive, OrchestratorService, OrchestratorServiceLive, runWorkerProcess } from "./services/index.js";
48
+ export { TaskServiceLive, DependencyServiceLive, ReadyServiceLive, HierarchyServiceLive, ScoreServiceLive, LearningServiceLive, FileLearningServiceLive, AttemptServiceLive, SyncServiceLive, MigrationServiceLive, RerankerService, RerankerServiceNoop, RerankerServiceLive, RerankerServiceAuto, RetrieverService, RetrieverServiceNoop, RetrieverServiceLive, RetrieverServiceAuto, WorkerService, WorkerServiceLive, ClaimService, ClaimServiceLive, OrchestratorService, OrchestratorServiceLive, runWorkerProcess, MIGRATIONS, getLatestVersion,
49
+ // Runtime interface validators for optional peer dependencies
50
+ isValidLlama, isValidLlamaModel, isValidLlamaEmbeddingContext, isValidOpenAIClient,
51
+ // Dimension validation
52
+ validateEmbeddingDimensions,
53
+ // LLM service (DD-022)
54
+ LlmService, LlmServiceNoop, LlmServiceClaudeAgentSdk, LlmServiceAnthropicSdk, LlmServiceAuto, LlmOptionsSchema,
55
+ // Query expansion
56
+ QueryExpansionService, QueryExpansionServiceNoop, QueryExpansionServiceLive, QueryExpansionServiceAuto, QueryExpansionUnavailableError, MAX_EXPANSION_QUERIES, MAX_QUERY_LENGTH, validateExpansions,
57
+ // Daemon / file-watcher / deduplication
58
+ DeduplicationService, DeduplicationServiceLive, DaemonService, DaemonServiceLive, DaemonServiceNoop, PID_FILE_PATH, getPidFilePath, LAUNCHD_PLIST_PATH, writePid, readPid, removePid, removePidIfContentMatches, isProcessRunning, tryAtomicPidCreate, acquirePidLock, defaultDaemonConfig, generateLaunchdPlist, generateSystemdService, FileWatcherService, FileWatcherServiceLive, FileWatcherServiceNoop,
59
+ // Transcript adapter
60
+ ClaudeCodeAdapter, GenericJSONLAdapter, getAdapter, registerAdapter,
61
+ // Doc service (DD-023)
62
+ DocServiceLive,
63
+ // Agent service (cycle scan)
64
+ AgentService, AgentServiceLive, AgentServiceNoop,
65
+ // Cycle scan service
66
+ CycleScanService, CycleScanServiceLive } from "./services/index.js";
33
67
  // =============================================================================
34
68
  // Repositories
35
69
  // =============================================================================
36
- export { TaskRepository, TaskRepositoryLive, DependencyRepository, DependencyRepositoryLive, LearningRepository, LearningRepositoryLive, FileLearningRepository, FileLearningRepositoryLive, AttemptRepository, AttemptRepositoryLive, RunRepository, RunRepositoryLive, AnchorRepository, AnchorRepositoryLive, EdgeRepository, EdgeRepositoryLive, DeduplicationRepository, DeduplicationRepositoryLive, CandidateRepository, CandidateRepositoryLive, TrackedProjectRepository, TrackedProjectRepositoryLive, WorkerRepository, WorkerRepositoryLive, ClaimRepository, ClaimRepositoryLive, OrchestratorStateRepository, OrchestratorStateRepositoryLive } from "./repo/index.js";
70
+ export { TaskRepository, TaskRepositoryLive, DependencyRepository, DependencyRepositoryLive, LearningRepository, LearningRepositoryLive, FileLearningRepository, FileLearningRepositoryLive, AttemptRepository, AttemptRepositoryLive, RunRepository, RunRepositoryLive, WorkerRepository, WorkerRepositoryLive, ClaimRepository, ClaimRepositoryLive, OrchestratorStateRepository, OrchestratorStateRepositoryLive, DeduplicationRepository, DeduplicationRepositoryLive, TrackedProjectRepository, TrackedProjectRepositoryLive, DocRepository, DocRepositoryLive } from "./repo/index.js";
37
71
  // =============================================================================
38
72
  // Schemas
39
73
  // =============================================================================
@@ -45,12 +79,32 @@ export { rowToTask, rowToDependency, isValidStatus, isValidTransition, VALID_TRA
45
79
  export { rowToLearning, float32ArrayToBuffer } from "./mappers/learning.js";
46
80
  export { rowToFileLearning, matchesPattern } from "./mappers/file-learning.js";
47
81
  export { rowToAttempt } from "./mappers/attempt.js";
48
- export { rowToAnchor, rowToInvalidationLog } from "./mappers/anchor.js";
49
- export { rowToEdge } from "./mappers/edge.js";
50
82
  export { rowToWorker, isValidWorkerStatus, WORKER_STATUSES } from "./mappers/worker.js";
83
+ export { normalizeContent, hashContent } from "./mappers/deduplication.js";
84
+ export { rowToDoc, rowToDocLink, rowToTaskDocLink, rowToInvariant, rowToInvariantCheck, isValidDocKind, isValidDocStatus } from "./mappers/doc.js";
51
85
  // =============================================================================
52
86
  // Utils
53
87
  // =============================================================================
54
88
  export { cosineSimilarity } from "./utils/math.js";
55
89
  export { matchesGlob } from "./utils/glob.js";
90
+ export { escapeLikePattern, DEFAULT_QUERY_LIMIT } from "./utils/sql.js";
91
+ export { computeDocHash } from "./utils/doc-hash.js";
92
+ export { renderDocToMarkdown, renderIndexToMarkdown } from "./utils/doc-renderer.js";
93
+ export { readTxConfig } from "./utils/toml-config.js";
94
+ // =============================================================================
95
+ // Worker (PRD-018 headless worker system)
96
+ // =============================================================================
97
+ export { runWorker } from "./worker/index.js";
98
+ // =============================================================================
99
+ // Tracing Service (PRD-019 Execution Tracing)
100
+ // =============================================================================
101
+ export { TracingService, TracingServiceLive, TracingServiceNoop } from "./services/tracing-service.js";
102
+ // =============================================================================
103
+ // Validation Service
104
+ // =============================================================================
105
+ export { ValidationService, ValidationServiceLive } from "./services/validation-service.js";
106
+ // =============================================================================
107
+ // Sync: Claude Code task writer
108
+ // =============================================================================
109
+ export { buildClaudeTaskFiles, ClaudeTaskFileSchema, ClaudeSyncResultSchema } from "./sync/claude-task-writer.js";
56
110
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,gFAAgF;AAChF,SAAS;AACT,gFAAgF;AAChF,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,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EhC,MAAM,iBAAiB,CAAA;AAExB,gFAAgF;AAChF,UAAU;AACV,gFAAgF;AAChF,cAAc,oBAAoB,CAAA;AAElC,gFAAgF;AAChF,UAAU;AACV,gFAAgF;AAChF,OAAO,EACL,SAAS,EACT,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EAGlB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EACL,aAAa,EACb,oBAAoB,EAErB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EACL,iBAAiB,EACjB,cAAc,EAEf,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EACL,YAAY,EAEb,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EACL,WAAW,EACX,oBAAoB,EAGrB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EACL,SAAS,EAEV,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,eAAe,EAEhB,MAAM,qBAAqB,CAAA;AAE5B,gFAAgF;AAChF,QAAQ;AACR,gFAAgF;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,gFAAgF;AAChF,SAAS;AACT,gFAAgF;AAChF,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,uBAAuB,EACvB,aAAa,EACb,uBAAuB,EACvB,yBAAyB,EACzB,+BAA+B,EAC/B,wBAAwB,EACxB,cAAc;AACd,8BAA8B;AAC9B,mBAAmB;AACnB,+BAA+B;AAC/B,WAAW,EACX,gBAAgB,EAChB,0BAA0B,EAC1B,sBAAsB;AACtB,iCAAiC;AACjC,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB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AAyB,CAAA;AACpF,OAAO,EAAE,YAAY,EAAoC,MAAM,wBAAwB,CAAA;AAEvF,gFAAgF;AAChF,0CAA0C;AAC1C,gFAAgF;AAChF,OAAO,EAML,SAAS,EACV,MAAM,mBAAmB,CAAA;AAE1B,gFAAgF;AAChF,8CAA8C;AAC9C,gFAAgF;AAChF,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAEnB,MAAM,+BAA+B,CAAA;AAEtC,gFAAgF;AAChF,qBAAqB;AACrB,gFAAgF;AAChF,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EAMtB,MAAM,kCAAkC,CAAA;AAEzC,gFAAgF;AAChF,gCAAgC;AAChC,gFAAgF;AAChF,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EAGvB,MAAM,8BAA8B,CAAA"}
package/dist/layer.d.ts CHANGED
@@ -5,31 +5,40 @@
5
5
  * See DD-002 for full specification.
6
6
  */
7
7
  import { Layer } from "effect";
8
+ import { type SqliteClient } from "./db.js";
8
9
  export { SyncService } from "./services/sync-service.js";
9
10
  export { MigrationService } from "./services/migration-service.js";
10
11
  export { AutoSyncService, AutoSyncServiceNoop, AutoSyncServiceLive } from "./services/auto-sync-service.js";
11
12
  export { LearningService } from "./services/learning-service.js";
12
13
  export { FileLearningService } from "./services/file-learning-service.js";
13
14
  export { EmbeddingService, EmbeddingServiceNoop, EmbeddingServiceLive, EmbeddingServiceOpenAI, EmbeddingServiceAuto, createEmbedderLayer, type EmbedderConfig } from "./services/embedding-service.js";
14
- export { QueryExpansionService, QueryExpansionServiceNoop, QueryExpansionServiceLive, QueryExpansionServiceAuto, QueryExpansionUnavailableError, type QueryExpansionResult } from "./services/query-expansion-service.js";
15
15
  export { AttemptService } from "./services/attempt-service.js";
16
16
  export { TaskService } from "./services/task-service.js";
17
17
  export { DependencyService } from "./services/dep-service.js";
18
- export { ReadyService } from "./services/ready-service.js";
18
+ export { ReadyService, type ReadyCheckResult, isReadyResult } from "./services/ready-service.js";
19
19
  export { HierarchyService } from "./services/hierarchy-service.js";
20
20
  export { ScoreService } from "./services/score-service.js";
21
- export { RunRepository } from "./repo/run-repo.js";
22
21
  export { RerankerService, RerankerServiceNoop, RerankerServiceLive, RerankerServiceAuto, type RerankerResult } from "./services/reranker-service.js";
23
- export { DeduplicationService, DeduplicationServiceLive } from "./services/deduplication-service.js";
24
22
  export { RetrieverService, RetrieverServiceNoop, RetrieverServiceLive, RetrieverServiceAuto } from "./services/retriever-service.js";
25
- export { GraphExpansionService, GraphExpansionServiceNoop, GraphExpansionServiceLive, type SeedLearning, type ExpandedLearning, type GraphExpansionOptions, type GraphExpansionResult } from "./services/graph-expansion.js";
26
- export { AnchorVerificationService, AnchorVerificationServiceLive, type VerificationResult, type VerificationSummary, type VerifyOptions } from "./services/anchor-verification.js";
27
- export { SwarmVerificationService, SwarmVerificationServiceLive, calculateMajorityVote, type VerificationBatch, type BatchResult, type SwarmMetrics, type SwarmVerificationResult, type SwarmVerifyOptions, type VoteResult } from "./services/swarm-verification.js";
28
- export { PromotionService, PromotionServiceLive, type PromotionResult, type AutoPromoteResult } from "./services/promotion-service.js";
29
- export { FeedbackTrackerService, FeedbackTrackerServiceNoop, FeedbackTrackerServiceLive, type LearningUsageFeedback } from "./services/feedback-tracker.js";
30
- export { CandidateRepository, CandidateRepositoryLive } from "./repo/candidate-repo.js";
31
- export { TrackedProjectRepository, TrackedProjectRepositoryLive } from "./repo/tracked-project-repo.js";
32
- export { DaemonService, DaemonServiceLive, DaemonServiceNoop, type DaemonStatus } from "./services/daemon-service.js";
23
+ export { DiversifierService, DiversifierServiceNoop, DiversifierServiceLive, DiversifierServiceAuto } from "./services/diversifier-service.js";
24
+ export { QueryExpansionService, QueryExpansionServiceNoop, QueryExpansionServiceLive, QueryExpansionServiceAuto, QueryExpansionUnavailableError, type QueryExpansionResult } from "./services/query-expansion-service.js";
25
+ export { DeduplicationService, DeduplicationServiceLive } from "./services/deduplication-service.js";
26
+ export { LlmService, LlmServiceNoop, LlmServiceClaudeAgentSdk, LlmServiceAnthropicSdk, LlmServiceAuto, type LlmOptions } from "./services/llm-service.js";
27
+ export { RunRepository } from "./repo/run-repo.js";
28
+ export { DocService } from "./services/doc-service.js";
29
+ export { AgentService, AgentServiceNoop } from "./services/agent-service.js";
30
+ export { CycleScanService } from "./services/cycle-scan-service.js";
31
+ /**
32
+ * Create the full application layer from an existing SqliteClient infra layer.
33
+ *
34
+ * Use this when you already have a SqliteClient layer (e.g., from Layer.succeed
35
+ * with a pre-created database instance). This is useful for test utilities that
36
+ * need to share a single database across test runs while getting fresh service
37
+ * instances via Layer.fresh.
38
+ *
39
+ * @param infra A layer providing SqliteClient
40
+ */
41
+ export declare const makeAppLayerFromInfra: <E>(infra: Layer.Layer<SqliteClient, E>) => Layer.Layer<import("./services/sync-service.js").SyncService | SqliteClient | import("./services/task-service.js").TaskService | import("./repo/task-repo.js").TaskRepository | import("./repo/dep-repo.js").DependencyRepository | import("./services/dep-service.js").DependencyService | import("./services/ready-service.js").ReadyService | import("./services/hierarchy-service.js").HierarchyService | import("./services/learning-service.js").LearningService | import("./repo/learning-repo.js").LearningRepository | import("./services/retriever-service.js").RetrieverService | import("./services/file-learning-service.js").FileLearningService | import("./repo/file-learning-repo.js").FileLearningRepository | import("./services/attempt-service.js").AttemptService | import("./repo/attempt-repo.js").AttemptRepository | import("./repo/run-repo.js").RunRepository | import("./repo/worker-repo.js").WorkerRepository | import("./repo/claim-repo.js").ClaimRepository | import("./repo/orchestrator-state-repo.js").OrchestratorStateRepository | import("./repo/deduplication-repo.js").DeduplicationRepository | import("./repo/tracked-project-repo.js").TrackedProjectRepository | import("./repo/doc-repo.js").DocRepository | import("./services/diversifier-service.js").DiversifierService | import("./services/worker-service.js").WorkerService | import("./services/claim-service.js").ClaimService | import("./services/orchestrator-service.js").OrchestratorService | import("./services/tracing-service.js").TracingService | import("./services/validation-service.js").ValidationService | import("./services/llm-service.js").LlmService | import("./services/deduplication-service.js").DeduplicationService | import("./services/doc-service.js").DocService | import("./services/agent-service.js").AgentService | import("./services/cycle-scan-service.js").CycleScanService | import("./services/migration-service.js").MigrationService, import("./errors.js").DatabaseError | E | import("./errors.js").LlmUnavailableError | import("./errors.js").AgentError, never>;
33
42
  /**
34
43
  * Create the full application layer with all services.
35
44
  *
@@ -39,12 +48,12 @@ export { DaemonService, DaemonServiceLive, DaemonServiceNoop, type DaemonStatus
39
48
  *
40
49
  * @param dbPath Path to SQLite database file
41
50
  */
42
- export declare const makeAppLayer: (dbPath: string) => Layer.Layer<import("./services/migration-service.js").MigrationService | import("./repo/task-repo.js").TaskRepository | import("./repo/dep-repo.js").DependencyRepository | import("./repo/learning-repo.js").LearningRepository | import("./repo/file-learning-repo.js").FileLearningRepository | import("./repo/attempt-repo.js").AttemptRepository | import("./repo/run-repo.js").RunRepository | import("./repo/anchor-repo.js").AnchorRepository | import("./repo/edge-repo.js").EdgeRepository | import("./repo/deduplication-repo.js").DeduplicationRepository | import("./repo/candidate-repo.js").CandidateRepository | import("./repo/tracked-project-repo.js").TrackedProjectRepository | import("./repo/worker-repo.js").WorkerRepository | import("./repo/claim-repo.js").ClaimRepository | import("./repo/orchestrator-state-repo.js").OrchestratorStateRepository | import("./services/task-service.js").TaskService | import("./services/dep-service.js").DependencyService | import("./services/ready-service.js").ReadyService | import("./services/hierarchy-service.js").HierarchyService | import("./services/edge-service.js").EdgeService | import("./services/graph-expansion.js").GraphExpansionService | import("./services/feedback-tracker.js").FeedbackTrackerService | import("./services/retriever-service.js").RetrieverService | import("./services/learning-service.js").LearningService | import("./services/file-learning-service.js").FileLearningService | import("./services/attempt-service.js").AttemptService | import("./services/anchor-verification.js").AnchorVerificationService | import("./services/anchor-service.js").AnchorService | import("./services/deduplication-service.js").DeduplicationService | import("./services/sync-service.js").SyncService | import("./services/swarm-verification.js").SwarmVerificationService | import("./services/promotion-service.js").PromotionService | import("./services/worker-service.js").WorkerService | import("./services/claim-service.js").ClaimService | import("./services/orchestrator-service.js").OrchestratorService | import("./services/daemon-service.js").DaemonService, import("./errors.js").DatabaseError, never>;
51
+ export declare const makeAppLayer: (dbPath: string) => Layer.Layer<import("./services/sync-service.js").SyncService | SqliteClient | import("./services/task-service.js").TaskService | import("./repo/task-repo.js").TaskRepository | import("./repo/dep-repo.js").DependencyRepository | import("./services/dep-service.js").DependencyService | import("./services/ready-service.js").ReadyService | import("./services/hierarchy-service.js").HierarchyService | import("./services/learning-service.js").LearningService | import("./repo/learning-repo.js").LearningRepository | import("./services/retriever-service.js").RetrieverService | import("./services/file-learning-service.js").FileLearningService | import("./repo/file-learning-repo.js").FileLearningRepository | import("./services/attempt-service.js").AttemptService | import("./repo/attempt-repo.js").AttemptRepository | import("./repo/run-repo.js").RunRepository | import("./repo/worker-repo.js").WorkerRepository | import("./repo/claim-repo.js").ClaimRepository | import("./repo/orchestrator-state-repo.js").OrchestratorStateRepository | import("./repo/deduplication-repo.js").DeduplicationRepository | import("./repo/tracked-project-repo.js").TrackedProjectRepository | import("./repo/doc-repo.js").DocRepository | import("./services/diversifier-service.js").DiversifierService | import("./services/worker-service.js").WorkerService | import("./services/claim-service.js").ClaimService | import("./services/orchestrator-service.js").OrchestratorService | import("./services/tracing-service.js").TracingService | import("./services/validation-service.js").ValidationService | import("./services/llm-service.js").LlmService | import("./services/deduplication-service.js").DeduplicationService | import("./services/doc-service.js").DocService | import("./services/agent-service.js").AgentService | import("./services/cycle-scan-service.js").CycleScanService | import("./services/migration-service.js").MigrationService, import("./errors.js").DatabaseError | import("./errors.js").LlmUnavailableError | import("./errors.js").AgentError, never>;
43
52
  /**
44
53
  * Create a minimal application layer without auto-sync.
45
54
  * Useful for testing and simple CLI operations.
46
55
  *
47
56
  * @param dbPath Path to SQLite database file
48
57
  */
49
- export declare const makeMinimalLayer: (dbPath: string) => Layer.Layer<import("./services/migration-service.js").MigrationService | import("./repo/task-repo.js").TaskRepository | import("./repo/dep-repo.js").DependencyRepository | import("./repo/learning-repo.js").LearningRepository | import("./repo/file-learning-repo.js").FileLearningRepository | import("./repo/attempt-repo.js").AttemptRepository | import("./repo/run-repo.js").RunRepository | import("./repo/anchor-repo.js").AnchorRepository | import("./repo/edge-repo.js").EdgeRepository | import("./repo/deduplication-repo.js").DeduplicationRepository | import("./repo/candidate-repo.js").CandidateRepository | import("./repo/tracked-project-repo.js").TrackedProjectRepository | import("./services/task-service.js").TaskService | import("./services/dep-service.js").DependencyService | import("./services/ready-service.js").ReadyService | import("./services/hierarchy-service.js").HierarchyService | import("./services/edge-service.js").EdgeService | import("./services/graph-expansion.js").GraphExpansionService | import("./services/feedback-tracker.js").FeedbackTrackerService | import("./services/retriever-service.js").RetrieverService | import("./services/learning-service.js").LearningService | import("./services/file-learning-service.js").FileLearningService | import("./services/attempt-service.js").AttemptService | import("./services/anchor-verification.js").AnchorVerificationService | import("./services/anchor-service.js").AnchorService | import("./services/deduplication-service.js").DeduplicationService | import("./services/sync-service.js").SyncService | import("./services/swarm-verification.js").SwarmVerificationService | import("./services/promotion-service.js").PromotionService | import("./services/daemon-service.js").DaemonService, import("./errors.js").DatabaseError, never>;
58
+ export declare const makeMinimalLayer: (dbPath: string) => Layer.Layer<import("./services/sync-service.js").SyncService | import("./services/task-service.js").TaskService | import("./repo/task-repo.js").TaskRepository | import("./repo/dep-repo.js").DependencyRepository | import("./services/dep-service.js").DependencyService | import("./services/ready-service.js").ReadyService | import("./services/hierarchy-service.js").HierarchyService | import("./services/learning-service.js").LearningService | import("./repo/learning-repo.js").LearningRepository | import("./services/retriever-service.js").RetrieverService | import("./services/file-learning-service.js").FileLearningService | import("./repo/file-learning-repo.js").FileLearningRepository | import("./services/attempt-service.js").AttemptService | import("./repo/attempt-repo.js").AttemptRepository | import("./repo/run-repo.js").RunRepository | import("./services/diversifier-service.js").DiversifierService | import("./services/tracing-service.js").TracingService | import("./services/validation-service.js").ValidationService | import("./services/llm-service.js").LlmService | import("./services/migration-service.js").MigrationService, import("./errors.js").DatabaseError, never>;
50
59
  //# sourceMappingURL=layer.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AAmC,CAAA;AAC1C,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,yBAAyB,EACzB,yBAAyB,EACzB,8BAA8B,EAC9B,KAAK,oBAAoB,EAC1B,MAAM,uCAAuC,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAA;AACpG,OAAO,EACL,UAAU,EACV,cAAc,EACd,wBAAwB,EACxB,sBAAsB,EACtB,cAAc,EACd,KAAK,UAAU,EAChB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACtD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AAEnE;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,GAAI,CAAC,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,6/DA+F3E,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GAAI,QAAQ,MAAM,y/DAE1C,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,mqCAyD9C,CAAA"}
package/dist/layer.js CHANGED
@@ -12,14 +12,13 @@ import { LearningRepositoryLive } from "./repo/learning-repo.js";
12
12
  import { FileLearningRepositoryLive } from "./repo/file-learning-repo.js";
13
13
  import { AttemptRepositoryLive } from "./repo/attempt-repo.js";
14
14
  import { RunRepositoryLive } from "./repo/run-repo.js";
15
- import { AnchorRepositoryLive } from "./repo/anchor-repo.js";
16
- import { EdgeRepositoryLive } from "./repo/edge-repo.js";
17
- import { DeduplicationRepositoryLive } from "./repo/deduplication-repo.js";
18
- import { CandidateRepositoryLive } from "./repo/candidate-repo.js";
19
- import { TrackedProjectRepositoryLive } from "./repo/tracked-project-repo.js";
20
15
  import { WorkerRepositoryLive } from "./repo/worker-repo.js";
21
16
  import { ClaimRepositoryLive } from "./repo/claim-repo.js";
22
17
  import { OrchestratorStateRepositoryLive } from "./repo/orchestrator-state-repo.js";
18
+ import { DeduplicationRepositoryLive } from "./repo/deduplication-repo.js";
19
+ import { DeduplicationServiceLive } from "./services/deduplication-service.js";
20
+ import { TrackedProjectRepositoryLive } from "./repo/tracked-project-repo.js";
21
+ import { DocRepositoryLive } from "./repo/doc-repo.js";
23
22
  import { TaskServiceLive } from "./services/task-service.js";
24
23
  import { DependencyServiceLive } from "./services/dep-service.js";
25
24
  import { ReadyServiceLive } from "./services/ready-service.js";
@@ -27,25 +26,22 @@ import { HierarchyServiceLive } from "./services/hierarchy-service.js";
27
26
  import { LearningServiceLive } from "./services/learning-service.js";
28
27
  import { FileLearningServiceLive } from "./services/file-learning-service.js";
29
28
  import { AttemptServiceLive } from "./services/attempt-service.js";
30
- import { AnchorServiceLive } from "./services/anchor-service.js";
31
- import { EdgeServiceLive } from "./services/edge-service.js";
32
- import { DeduplicationServiceLive } from "./services/deduplication-service.js";
33
29
  import { SyncServiceLive } from "./services/sync-service.js";
34
30
  import { AutoSyncServiceLive, AutoSyncServiceNoop } from "./services/auto-sync-service.js";
35
31
  import { MigrationServiceLive } from "./services/migration-service.js";
36
32
  import { EmbeddingServiceNoop } from "./services/embedding-service.js";
37
- import { QueryExpansionServiceNoop } from "./services/query-expansion-service.js";
38
33
  import { RerankerServiceNoop } from "./services/reranker-service.js";
39
34
  import { RetrieverServiceLive } from "./services/retriever-service.js";
40
- import { GraphExpansionServiceLive } from "./services/graph-expansion.js";
41
- import { AnchorVerificationServiceLive } from "./services/anchor-verification.js";
42
- import { SwarmVerificationServiceLive } from "./services/swarm-verification.js";
43
- import { PromotionServiceLive } from "./services/promotion-service.js";
44
- import { FeedbackTrackerServiceLive } from "./services/feedback-tracker.js";
35
+ import { DiversifierServiceLive } from "./services/diversifier-service.js";
45
36
  import { WorkerServiceLive } from "./services/worker-service.js";
46
37
  import { ClaimServiceLive } from "./services/claim-service.js";
47
38
  import { OrchestratorServiceLive } from "./services/orchestrator-service.js";
48
- import { DaemonServiceLive, DaemonServiceNoop } from "./services/daemon-service.js";
39
+ import { TracingServiceLive, TracingServiceNoop } from "./services/tracing-service.js";
40
+ import { ValidationServiceLive } from "./services/validation-service.js";
41
+ import { LlmServiceClaudeAgentSdk, LlmServiceNoop } from "./services/llm-service.js";
42
+ import { DocServiceLive } from "./services/doc-service.js";
43
+ import { AgentServiceLive } from "./services/agent-service.js";
44
+ import { CycleScanServiceLive } from "./services/cycle-scan-service.js";
49
45
  // Re-export services for cleaner imports
50
46
  export { SyncService } from "./services/sync-service.js";
51
47
  export { MigrationService } from "./services/migration-service.js";
@@ -53,70 +49,81 @@ export { AutoSyncService, AutoSyncServiceNoop, AutoSyncServiceLive } from "./ser
53
49
  export { LearningService } from "./services/learning-service.js";
54
50
  export { FileLearningService } from "./services/file-learning-service.js";
55
51
  export { EmbeddingService, EmbeddingServiceNoop, EmbeddingServiceLive, EmbeddingServiceOpenAI, EmbeddingServiceAuto, createEmbedderLayer } from "./services/embedding-service.js";
56
- export { QueryExpansionService, QueryExpansionServiceNoop, QueryExpansionServiceLive, QueryExpansionServiceAuto, QueryExpansionUnavailableError } from "./services/query-expansion-service.js";
57
52
  export { AttemptService } from "./services/attempt-service.js";
58
53
  export { TaskService } from "./services/task-service.js";
59
54
  export { DependencyService } from "./services/dep-service.js";
60
- export { ReadyService } from "./services/ready-service.js";
55
+ export { ReadyService, isReadyResult } from "./services/ready-service.js";
61
56
  export { HierarchyService } from "./services/hierarchy-service.js";
62
57
  export { ScoreService } from "./services/score-service.js";
63
- export { RunRepository } from "./repo/run-repo.js";
64
58
  export { RerankerService, RerankerServiceNoop, RerankerServiceLive, RerankerServiceAuto } from "./services/reranker-service.js";
65
- export { DeduplicationService, DeduplicationServiceLive } from "./services/deduplication-service.js";
66
59
  export { RetrieverService, RetrieverServiceNoop, RetrieverServiceLive, RetrieverServiceAuto } from "./services/retriever-service.js";
67
- export { GraphExpansionService, GraphExpansionServiceNoop, GraphExpansionServiceLive } from "./services/graph-expansion.js";
68
- export { AnchorVerificationService, AnchorVerificationServiceLive } from "./services/anchor-verification.js";
69
- export { SwarmVerificationService, SwarmVerificationServiceLive, calculateMajorityVote } from "./services/swarm-verification.js";
70
- export { PromotionService, PromotionServiceLive } from "./services/promotion-service.js";
71
- export { FeedbackTrackerService, FeedbackTrackerServiceNoop, FeedbackTrackerServiceLive } from "./services/feedback-tracker.js";
72
- export { CandidateRepository, CandidateRepositoryLive } from "./repo/candidate-repo.js";
73
- export { TrackedProjectRepository, TrackedProjectRepositoryLive } from "./repo/tracked-project-repo.js";
74
- export { DaemonService, DaemonServiceLive, DaemonServiceNoop } from "./services/daemon-service.js";
60
+ export { DiversifierService, DiversifierServiceNoop, DiversifierServiceLive, DiversifierServiceAuto } from "./services/diversifier-service.js";
61
+ export { QueryExpansionService, QueryExpansionServiceNoop, QueryExpansionServiceLive, QueryExpansionServiceAuto, QueryExpansionUnavailableError } from "./services/query-expansion-service.js";
62
+ export { DeduplicationService, DeduplicationServiceLive } from "./services/deduplication-service.js";
63
+ export { LlmService, LlmServiceNoop, LlmServiceClaudeAgentSdk, LlmServiceAnthropicSdk, LlmServiceAuto } from "./services/llm-service.js";
64
+ export { RunRepository } from "./repo/run-repo.js";
65
+ export { DocService } from "./services/doc-service.js";
66
+ export { AgentService, AgentServiceNoop } from "./services/agent-service.js";
67
+ export { CycleScanService } from "./services/cycle-scan-service.js";
75
68
  /**
76
- * Create the full application layer with all services.
69
+ * Create the full application layer from an existing SqliteClient infra layer.
77
70
  *
78
- * This is the standard entry point for CLI, MCP, and SDK consumers.
79
- * Provides: TaskService, DependencyService, ReadyService, HierarchyService,
80
- * LearningService, FileLearningService, AttemptService, SyncService, MigrationService
71
+ * Use this when you already have a SqliteClient layer (e.g., from Layer.succeed
72
+ * with a pre-created database instance). This is useful for test utilities that
73
+ * need to share a single database across test runs while getting fresh service
74
+ * instances via Layer.fresh.
81
75
  *
82
- * @param dbPath Path to SQLite database file
76
+ * @param infra A layer providing SqliteClient
83
77
  */
84
- export const makeAppLayer = (dbPath) => {
85
- const infra = SqliteClientLive(dbPath);
86
- const repos = Layer.mergeAll(TaskRepositoryLive, DependencyRepositoryLive, LearningRepositoryLive, FileLearningRepositoryLive, AttemptRepositoryLive, RunRepositoryLive, AnchorRepositoryLive, EdgeRepositoryLive, DeduplicationRepositoryLive, CandidateRepositoryLive, TrackedProjectRepositoryLive, WorkerRepositoryLive, ClaimRepositoryLive, OrchestratorStateRepositoryLive).pipe(Layer.provide(infra));
78
+ export const makeAppLayerFromInfra = (infra) => {
79
+ const repos = Layer.mergeAll(TaskRepositoryLive, DependencyRepositoryLive, LearningRepositoryLive, FileLearningRepositoryLive, AttemptRepositoryLive, RunRepositoryLive, WorkerRepositoryLive, ClaimRepositoryLive, OrchestratorStateRepositoryLive, DeduplicationRepositoryLive, TrackedProjectRepositoryLive, DocRepositoryLive).pipe(Layer.provide(infra));
87
80
  // SyncServiceLive needs TaskService, repos, and infra
88
81
  const syncServiceWithDeps = SyncServiceLive.pipe(Layer.provide(Layer.mergeAll(infra, repos, TaskServiceLive.pipe(Layer.provide(repos)))));
89
82
  // AutoSyncServiceLive needs SyncService and infra
90
83
  const autoSyncService = AutoSyncServiceLive.pipe(Layer.provide(Layer.merge(infra, syncServiceWithDeps)));
91
- // EdgeServiceLive needs EdgeRepository from repos
92
- const edgeService = EdgeServiceLive.pipe(Layer.provide(repos));
93
- // FeedbackTrackerServiceLive needs EdgeService (created early for RetrieverService optional dependency)
94
- const feedbackTrackerService = FeedbackTrackerServiceLive.pipe(Layer.provide(edgeService));
95
- // GraphExpansionServiceLive needs EdgeService, LearningRepository, and AnchorRepository
96
- const graphExpansionService = GraphExpansionServiceLive.pipe(Layer.provide(Layer.merge(repos, edgeService)));
97
- // RetrieverServiceLive needs repos, embedding, query expansion, reranker, graph expansion, and optionally feedback tracker
98
- const retrieverService = RetrieverServiceLive.pipe(Layer.provide(Layer.mergeAll(repos, EmbeddingServiceNoop, QueryExpansionServiceNoop, RerankerServiceNoop, graphExpansionService, feedbackTrackerService)));
99
- // Services need repos, embedding, query expansion, reranker, retriever, and autoSyncService
100
- const services = Layer.mergeAll(TaskServiceLive, DependencyServiceLive, ReadyServiceLive, HierarchyServiceLive, LearningServiceLive, FileLearningServiceLive, AttemptServiceLive, AnchorServiceLive, DeduplicationServiceLive).pipe(Layer.provide(Layer.mergeAll(repos, EmbeddingServiceNoop, QueryExpansionServiceNoop, RerankerServiceNoop, retrieverService, autoSyncService)));
101
- // AnchorVerificationServiceLive needs AnchorRepository from repos
102
- const anchorVerificationService = AnchorVerificationServiceLive.pipe(Layer.provide(repos));
103
- // SwarmVerificationServiceLive needs AnchorVerificationService and AnchorRepository
104
- const swarmVerificationService = SwarmVerificationServiceLive.pipe(Layer.provide(Layer.merge(repos, anchorVerificationService)));
105
- // PromotionServiceLive needs CandidateRepository, LearningService, and EdgeService
106
- const promotionService = PromotionServiceLive.pipe(Layer.provide(Layer.mergeAll(repos, services, edgeService)));
84
+ // RetrieverServiceLive needs repos, embedding, reranker, diversifier
85
+ const retrieverService = RetrieverServiceLive.pipe(Layer.provide(Layer.mergeAll(repos, EmbeddingServiceNoop, RerankerServiceNoop, DiversifierServiceLive)));
86
+ // Services need repos, embedding, reranker, retriever, and autoSyncService
87
+ const services = Layer.mergeAll(TaskServiceLive, DependencyServiceLive, ReadyServiceLive, HierarchyServiceLive, LearningServiceLive, FileLearningServiceLive, AttemptServiceLive).pipe(Layer.provide(Layer.mergeAll(repos, EmbeddingServiceNoop, RerankerServiceNoop, retrieverService, autoSyncService)));
107
88
  // WorkerServiceLive needs WorkerRepository and OrchestratorStateRepository (from repos)
108
89
  const workerService = WorkerServiceLive.pipe(Layer.provide(repos));
109
90
  // ClaimServiceLive needs ClaimRepository and OrchestratorStateRepository (from repos)
110
91
  const claimService = ClaimServiceLive.pipe(Layer.provide(repos));
111
- // OrchestratorServiceLive needs WorkerService, ClaimService, TaskService, and OrchestratorStateRepository
112
- const orchestratorService = OrchestratorServiceLive.pipe(Layer.provide(Layer.mergeAll(repos, services, workerService, claimService)));
113
- // Merge all services including edgeService, graphExpansionService, anchorVerificationService, swarmVerificationService, promotionService, feedbackTrackerService, retrieverService, orchestration services, and daemon service
114
- const allServices = Layer.mergeAll(services, edgeService, graphExpansionService, anchorVerificationService, swarmVerificationService, promotionService, feedbackTrackerService, retrieverService, workerService, claimService, orchestratorService, DaemonServiceLive);
92
+ // OrchestratorServiceLive needs WorkerService, ClaimService, TaskService, OrchestratorStateRepository, and SqliteClient
93
+ const orchestratorService = OrchestratorServiceLive.pipe(Layer.provide(Layer.mergeAll(repos, services, workerService, claimService, infra)));
94
+ // TracingServiceLive needs SqliteClient
95
+ const tracingService = TracingServiceLive.pipe(Layer.provide(infra));
96
+ // ValidationServiceLive needs SqliteClient
97
+ const validationService = ValidationServiceLive.pipe(Layer.provide(infra));
98
+ // DeduplicationServiceLive needs DeduplicationRepository (from repos)
99
+ const deduplicationService = DeduplicationServiceLive.pipe(Layer.provide(repos));
100
+ // DocServiceLive needs DocRepository (from repos)
101
+ const docService = DocServiceLive.pipe(Layer.provide(repos));
102
+ // LlmServiceClaudeAgentSdk is the default — uses Claude Code subscription (DD-022)
103
+ const llmService = LlmServiceClaudeAgentSdk;
104
+ // AgentServiceLive — wraps Claude Agent SDK for sub-agent dispatch (cycle scan)
105
+ const agentService = AgentServiceLive;
106
+ // CycleScanServiceLive needs AgentService + SqliteClient
107
+ const cycleScanService = CycleScanServiceLive.pipe(Layer.provide(Layer.mergeAll(agentService, infra)));
108
+ // Merge all services
109
+ const allServices = Layer.mergeAll(services, retrieverService, DiversifierServiceLive, workerService, claimService, orchestratorService, tracingService, validationService, llmService, deduplicationService, docService, agentService, cycleScanService);
115
110
  // MigrationService only needs SqliteClient
116
111
  const migrationService = MigrationServiceLive.pipe(Layer.provide(infra));
117
112
  // Also expose RunRepository directly for run tracking
118
- // (Note: Consider creating RunService in future refactor)
119
- return Layer.mergeAll(allServices, syncServiceWithDeps, migrationService, repos);
113
+ // Also expose SqliteClient directly for direct database access (e.g., trace commands)
114
+ return Layer.mergeAll(allServices, syncServiceWithDeps, migrationService, repos, infra);
115
+ };
116
+ /**
117
+ * Create the full application layer with all services.
118
+ *
119
+ * This is the standard entry point for CLI, MCP, and SDK consumers.
120
+ * Provides: TaskService, DependencyService, ReadyService, HierarchyService,
121
+ * LearningService, FileLearningService, AttemptService, SyncService, MigrationService
122
+ *
123
+ * @param dbPath Path to SQLite database file
124
+ */
125
+ export const makeAppLayer = (dbPath) => {
126
+ return makeAppLayerFromInfra(SqliteClientLive(dbPath));
120
127
  };
121
128
  /**
122
129
  * Create a minimal application layer without auto-sync.
@@ -126,25 +133,17 @@ export const makeAppLayer = (dbPath) => {
126
133
  */
127
134
  export const makeMinimalLayer = (dbPath) => {
128
135
  const infra = SqliteClientLive(dbPath);
129
- const repos = Layer.mergeAll(TaskRepositoryLive, DependencyRepositoryLive, LearningRepositoryLive, FileLearningRepositoryLive, AttemptRepositoryLive, RunRepositoryLive, AnchorRepositoryLive, EdgeRepositoryLive, DeduplicationRepositoryLive, CandidateRepositoryLive, TrackedProjectRepositoryLive).pipe(Layer.provide(infra));
130
- // EdgeServiceLive needs EdgeRepository from repos
131
- const edgeService = EdgeServiceLive.pipe(Layer.provide(repos));
132
- // FeedbackTrackerServiceLive needs EdgeService (created early for RetrieverService optional dependency)
133
- const feedbackTrackerService = FeedbackTrackerServiceLive.pipe(Layer.provide(edgeService));
134
- // GraphExpansionServiceLive needs EdgeService, LearningRepository, and AnchorRepository
135
- const graphExpansionService = GraphExpansionServiceLive.pipe(Layer.provide(Layer.merge(repos, edgeService)));
136
- // RetrieverServiceLive needs repos, embedding, query expansion, reranker, graph expansion, and optionally feedback tracker
137
- const retrieverService = RetrieverServiceLive.pipe(Layer.provide(Layer.mergeAll(repos, EmbeddingServiceNoop, QueryExpansionServiceNoop, RerankerServiceNoop, graphExpansionService, feedbackTrackerService)));
138
- // Services with Noop embedding, query expansion, reranker, retriever, and auto-sync
139
- const services = Layer.mergeAll(TaskServiceLive, DependencyServiceLive, ReadyServiceLive, HierarchyServiceLive, LearningServiceLive, FileLearningServiceLive, AttemptServiceLive, AnchorServiceLive, DeduplicationServiceLive).pipe(Layer.provide(Layer.mergeAll(repos, EmbeddingServiceNoop, QueryExpansionServiceNoop, RerankerServiceNoop, retrieverService, AutoSyncServiceNoop)));
140
- // AnchorVerificationServiceLive needs AnchorRepository from repos
141
- const anchorVerificationService = AnchorVerificationServiceLive.pipe(Layer.provide(repos));
142
- // SwarmVerificationServiceLive needs AnchorVerificationService and AnchorRepository
143
- const swarmVerificationService = SwarmVerificationServiceLive.pipe(Layer.provide(Layer.merge(repos, anchorVerificationService)));
144
- // PromotionServiceLive needs CandidateRepository, LearningService, and EdgeService
145
- const promotionService = PromotionServiceLive.pipe(Layer.provide(Layer.mergeAll(repos, services, edgeService)));
146
- // Merge all services including edgeService, graphExpansionService, anchorVerificationService, swarmVerificationService, promotionService, feedbackTrackerService, retrieverService, and daemon service (noop for minimal layer)
147
- const allServices = Layer.mergeAll(services, edgeService, graphExpansionService, anchorVerificationService, swarmVerificationService, promotionService, feedbackTrackerService, retrieverService, DaemonServiceNoop);
136
+ const repos = Layer.mergeAll(TaskRepositoryLive, DependencyRepositoryLive, LearningRepositoryLive, FileLearningRepositoryLive, AttemptRepositoryLive, RunRepositoryLive).pipe(Layer.provide(infra));
137
+ // RetrieverServiceLive needs repos, embedding, reranker, diversifier
138
+ const retrieverService = RetrieverServiceLive.pipe(Layer.provide(Layer.mergeAll(repos, EmbeddingServiceNoop, RerankerServiceNoop, DiversifierServiceLive)));
139
+ // Services with Noop embedding, reranker, retriever, and auto-sync
140
+ const services = Layer.mergeAll(TaskServiceLive, DependencyServiceLive, ReadyServiceLive, HierarchyServiceLive, LearningServiceLive, FileLearningServiceLive, AttemptServiceLive).pipe(Layer.provide(Layer.mergeAll(repos, EmbeddingServiceNoop, RerankerServiceNoop, retrieverService, AutoSyncServiceNoop)));
141
+ // ValidationServiceLive needs SqliteClient
142
+ const validationService = ValidationServiceLive.pipe(Layer.provide(infra));
143
+ // LlmServiceNoop for minimal layer no LLM needed for core commands (DD-022)
144
+ const llmService = LlmServiceNoop;
145
+ // Merge all services
146
+ const allServices = Layer.mergeAll(services, retrieverService, DiversifierServiceLive, TracingServiceNoop, validationService, llmService);
148
147
  // MigrationService only needs SqliteClient
149
148
  const migrationService = MigrationServiceLive.pipe(Layer.provide(infra));
150
149
  // SyncService for manual exports