@claudexor/daemon 3.25.1 → 4.0.1

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 (453) hide show
  1. package/dist/account-resets.d.ts +2 -2
  2. package/dist/account-resets.d.ts.map +1 -1
  3. package/dist/account-resets.js +15 -0
  4. package/dist/account-resets.js.map +1 -1
  5. package/dist/client.d.ts +25 -6
  6. package/dist/client.d.ts.map +1 -1
  7. package/dist/client.js +55 -51
  8. package/dist/client.js.map +1 -1
  9. package/dist/command-authority.d.ts +11 -8
  10. package/dist/command-authority.d.ts.map +1 -1
  11. package/dist/command-authority.js +5 -6
  12. package/dist/command-authority.js.map +1 -1
  13. package/dist/command-list-projection.d.ts +0 -1
  14. package/dist/command-list-projection.d.ts.map +1 -1
  15. package/dist/command-list-projection.js +0 -6
  16. package/dist/command-list-projection.js.map +1 -1
  17. package/dist/command-list-select.d.ts +0 -4
  18. package/dist/command-list-select.d.ts.map +1 -1
  19. package/dist/command-list-select.js +1 -115
  20. package/dist/command-list-select.js.map +1 -1
  21. package/dist/command-retention.d.ts +7 -19
  22. package/dist/command-retention.d.ts.map +1 -1
  23. package/dist/command-retention.js +1 -120
  24. package/dist/command-retention.js.map +1 -1
  25. package/dist/command-rpc.d.ts +4 -1
  26. package/dist/command-rpc.d.ts.map +1 -1
  27. package/dist/command-rpc.js +12 -1
  28. package/dist/command-rpc.js.map +1 -1
  29. package/dist/command-store.d.ts +15 -52
  30. package/dist/command-store.d.ts.map +1 -1
  31. package/dist/command-store.js +5 -493
  32. package/dist/command-store.js.map +1 -1
  33. package/dist/daemon-health.d.ts +56 -8
  34. package/dist/daemon-health.d.ts.map +1 -1
  35. package/dist/daemon-health.js +44 -9
  36. package/dist/daemon-health.js.map +1 -1
  37. package/dist/daemon-local-client.d.ts +28 -0
  38. package/dist/daemon-local-client.d.ts.map +1 -0
  39. package/dist/daemon-local-client.js +55 -0
  40. package/dist/daemon-local-client.js.map +1 -0
  41. package/dist/delivery-command.d.ts +4 -4
  42. package/dist/delivery-command.d.ts.map +1 -1
  43. package/dist/delivery-command.js.map +1 -1
  44. package/dist/index.d.ts +23 -8
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +25 -8
  47. package/dist/index.js.map +1 -1
  48. package/dist/interactions.d.ts +12 -28
  49. package/dist/interactions.d.ts.map +1 -1
  50. package/dist/interactions.js +22 -123
  51. package/dist/interactions.js.map +1 -1
  52. package/dist/job-admission.d.ts +26 -0
  53. package/dist/job-admission.d.ts.map +1 -0
  54. package/dist/job-admission.js +67 -0
  55. package/dist/job-admission.js.map +1 -0
  56. package/dist/journal-fold-policy.d.ts +1 -1
  57. package/dist/journal-fold-policy.d.ts.map +1 -1
  58. package/dist/journal-recovery-files.d.ts +1 -41
  59. package/dist/journal-recovery-files.d.ts.map +1 -1
  60. package/dist/journal-recovery-files.js +2 -340
  61. package/dist/journal-recovery-files.js.map +1 -1
  62. package/dist/loop-facts.d.ts +28 -0
  63. package/dist/loop-facts.d.ts.map +1 -0
  64. package/dist/loop-facts.js +97 -0
  65. package/dist/loop-facts.js.map +1 -0
  66. package/dist/memory-facts.d.ts +2 -0
  67. package/dist/memory-facts.d.ts.map +1 -1
  68. package/dist/memory-facts.js +5 -0
  69. package/dist/memory-facts.js.map +1 -1
  70. package/dist/model-operations.d.ts +11 -4
  71. package/dist/model-operations.d.ts.map +1 -1
  72. package/dist/model-operations.js +68 -38
  73. package/dist/model-operations.js.map +1 -1
  74. package/dist/operator-decisions.d.ts +15 -25
  75. package/dist/operator-decisions.d.ts.map +1 -1
  76. package/dist/operator-decisions.js +5 -84
  77. package/dist/operator-decisions.js.map +1 -1
  78. package/dist/projects.d.ts +42 -41
  79. package/dist/projects.d.ts.map +1 -1
  80. package/dist/projects.js +46 -184
  81. package/dist/projects.js.map +1 -1
  82. package/dist/quota-registry-replay.d.ts +2 -2
  83. package/dist/quota-registry-replay.d.ts.map +1 -1
  84. package/dist/quota-registry-replay.js.map +1 -1
  85. package/dist/quota-registry-support.d.ts +4 -1
  86. package/dist/quota-registry-support.d.ts.map +1 -1
  87. package/dist/quota-registry-support.js +15 -2
  88. package/dist/quota-registry-support.js.map +1 -1
  89. package/dist/quota-registry.d.ts +64 -2
  90. package/dist/quota-registry.d.ts.map +1 -1
  91. package/dist/quota-registry.js +10 -3
  92. package/dist/quota-registry.js.map +1 -1
  93. package/dist/quota-resources.d.ts +6 -3
  94. package/dist/quota-resources.d.ts.map +1 -1
  95. package/dist/quota-resources.js +25 -8
  96. package/dist/quota-resources.js.map +1 -1
  97. package/dist/runless-turn-recovery.d.ts +2 -9
  98. package/dist/runless-turn-recovery.d.ts.map +1 -1
  99. package/dist/runless-turn-recovery.js +0 -14
  100. package/dist/runless-turn-recovery.js.map +1 -1
  101. package/dist/server.d.ts +23 -22
  102. package/dist/server.d.ts.map +1 -1
  103. package/dist/server.js +74 -84
  104. package/dist/server.js.map +1 -1
  105. package/dist/store/blob-files.d.ts +71 -0
  106. package/dist/store/blob-files.d.ts.map +1 -0
  107. package/dist/store/blob-files.js +160 -0
  108. package/dist/store/blob-files.js.map +1 -0
  109. package/dist/store/command-prune.d.ts +37 -0
  110. package/dist/store/command-prune.d.ts.map +1 -0
  111. package/dist/store/command-prune.js +123 -0
  112. package/dist/store/command-prune.js.map +1 -0
  113. package/dist/store/command-queries.d.ts +41 -0
  114. package/dist/store/command-queries.d.ts.map +1 -0
  115. package/dist/store/command-queries.js +186 -0
  116. package/dist/store/command-queries.js.map +1 -0
  117. package/dist/store/command-rows.d.ts +66 -0
  118. package/dist/store/command-rows.d.ts.map +1 -0
  119. package/dist/store/command-rows.js +141 -0
  120. package/dist/store/command-rows.js.map +1 -0
  121. package/dist/store/commands.d.ts +49 -0
  122. package/dist/store/commands.d.ts.map +1 -0
  123. package/dist/store/commands.js +247 -0
  124. package/dist/store/commands.js.map +1 -0
  125. package/dist/store/cursors.d.ts +33 -0
  126. package/dist/store/cursors.d.ts.map +1 -0
  127. package/dist/store/cursors.js +82 -0
  128. package/dist/store/cursors.js.map +1 -0
  129. package/dist/store/engine-recovery-files.d.ts +14 -0
  130. package/dist/store/engine-recovery-files.d.ts.map +1 -0
  131. package/dist/store/engine-recovery-files.js +53 -0
  132. package/dist/store/engine-recovery-files.js.map +1 -0
  133. package/dist/store/engine-state-recovery.d.ts +71 -0
  134. package/dist/store/engine-state-recovery.d.ts.map +1 -0
  135. package/dist/store/engine-state-recovery.js +318 -0
  136. package/dist/store/engine-state-recovery.js.map +1 -0
  137. package/dist/store/errors.d.ts +80 -0
  138. package/dist/store/errors.d.ts.map +1 -0
  139. package/dist/store/errors.js +130 -0
  140. package/dist/store/errors.js.map +1 -0
  141. package/dist/store/event-store.d.ts +52 -0
  142. package/dist/store/event-store.d.ts.map +1 -0
  143. package/dist/store/event-store.js +117 -0
  144. package/dist/store/event-store.js.map +1 -0
  145. package/dist/store/external-files.d.ts +40 -0
  146. package/dist/store/external-files.d.ts.map +1 -0
  147. package/dist/store/external-files.js +90 -0
  148. package/dist/store/external-files.js.map +1 -0
  149. package/dist/store/flusher-protocol.d.ts +82 -0
  150. package/dist/store/flusher-protocol.d.ts.map +1 -0
  151. package/dist/store/flusher-protocol.js +23 -0
  152. package/dist/store/flusher-protocol.js.map +1 -0
  153. package/dist/store/flusher-worker.d.ts +24 -0
  154. package/dist/store/flusher-worker.d.ts.map +1 -0
  155. package/dist/store/flusher-worker.js +185 -0
  156. package/dist/store/flusher-worker.js.map +1 -0
  157. package/dist/store/flusher.d.ts +87 -0
  158. package/dist/store/flusher.d.ts.map +1 -0
  159. package/dist/store/flusher.js +264 -0
  160. package/dist/store/flusher.js.map +1 -0
  161. package/dist/store/generations.d.ts +43 -0
  162. package/dist/store/generations.d.ts.map +1 -0
  163. package/dist/store/generations.js +143 -0
  164. package/dist/store/generations.js.map +1 -0
  165. package/dist/store/idempotency.d.ts +25 -0
  166. package/dist/store/idempotency.d.ts.map +1 -0
  167. package/dist/store/idempotency.js +53 -0
  168. package/dist/store/idempotency.js.map +1 -0
  169. package/dist/store/import-context.d.ts +22 -0
  170. package/dist/store/import-context.d.ts.map +1 -0
  171. package/dist/store/import-context.js +87 -0
  172. package/dist/store/import-context.js.map +1 -0
  173. package/dist/store/import-discovery.d.ts +6 -0
  174. package/dist/store/import-discovery.d.ts.map +1 -0
  175. package/dist/store/import-discovery.js +66 -0
  176. package/dist/store/import-discovery.js.map +1 -0
  177. package/dist/store/import-records.d.ts +6 -0
  178. package/dist/store/import-records.d.ts.map +1 -0
  179. package/dist/store/import-records.js +191 -0
  180. package/dist/store/import-records.js.map +1 -0
  181. package/dist/store/import-resources.d.ts +14 -0
  182. package/dist/store/import-resources.d.ts.map +1 -0
  183. package/dist/store/import-resources.js +197 -0
  184. package/dist/store/import-resources.js.map +1 -0
  185. package/dist/store/import-source.d.ts +24 -0
  186. package/dist/store/import-source.d.ts.map +1 -0
  187. package/dist/store/import-source.js +65 -0
  188. package/dist/store/import-source.js.map +1 -0
  189. package/dist/store/import-verify.d.ts +6 -0
  190. package/dist/store/import-verify.d.ts.map +1 -0
  191. package/dist/store/import-verify.js +97 -0
  192. package/dist/store/import-verify.js.map +1 -0
  193. package/dist/store/import-worker.d.ts +18 -0
  194. package/dist/store/import-worker.d.ts.map +1 -0
  195. package/dist/store/import-worker.js +69 -0
  196. package/dist/store/import-worker.js.map +1 -0
  197. package/dist/store/importer.d.ts +42 -0
  198. package/dist/store/importer.d.ts.map +1 -0
  199. package/dist/store/importer.js +239 -0
  200. package/dist/store/importer.js.map +1 -0
  201. package/dist/store/interactions.d.ts +22 -0
  202. package/dist/store/interactions.d.ts.map +1 -0
  203. package/dist/store/interactions.js +82 -0
  204. package/dist/store/interactions.js.map +1 -0
  205. package/dist/store/legacy-journal/frame-codec.d.ts +94 -0
  206. package/dist/store/legacy-journal/frame-codec.d.ts.map +1 -0
  207. package/dist/store/legacy-journal/frame-codec.js +352 -0
  208. package/dist/store/legacy-journal/frame-codec.js.map +1 -0
  209. package/dist/store/legacy-journal/frame-reader.d.ts +30 -0
  210. package/dist/store/legacy-journal/frame-reader.d.ts.map +1 -0
  211. package/dist/store/legacy-journal/frame-reader.js +97 -0
  212. package/dist/store/legacy-journal/frame-reader.js.map +1 -0
  213. package/dist/store/legacy-journal/journal-fold.d.ts +47 -0
  214. package/dist/store/legacy-journal/journal-fold.d.ts.map +1 -0
  215. package/dist/store/legacy-journal/journal-fold.js +81 -0
  216. package/dist/store/legacy-journal/journal-fold.js.map +1 -0
  217. package/dist/store/legacy-journal/journal-partition.d.ts +2 -0
  218. package/dist/store/legacy-journal/journal-partition.d.ts.map +1 -0
  219. package/dist/store/legacy-journal/journal-partition.js +10 -0
  220. package/dist/store/legacy-journal/journal-partition.js.map +1 -0
  221. package/dist/store/legacy-journal/read-only-preparation.d.ts +48 -0
  222. package/dist/store/legacy-journal/read-only-preparation.d.ts.map +1 -0
  223. package/dist/store/legacy-journal/read-only-preparation.js +430 -0
  224. package/dist/store/legacy-journal/read-only-preparation.js.map +1 -0
  225. package/dist/store/maintenance-worker.d.ts +5 -0
  226. package/dist/store/maintenance-worker.d.ts.map +1 -0
  227. package/dist/store/maintenance-worker.js +175 -0
  228. package/dist/store/maintenance-worker.js.map +1 -0
  229. package/dist/store/maintenance.d.ts +124 -0
  230. package/dist/store/maintenance.d.ts.map +1 -0
  231. package/dist/store/maintenance.js +197 -0
  232. package/dist/store/maintenance.js.map +1 -0
  233. package/dist/store/mutation.d.ts +34 -0
  234. package/dist/store/mutation.d.ts.map +1 -0
  235. package/dist/store/mutation.js +85 -0
  236. package/dist/store/mutation.js.map +1 -0
  237. package/dist/store/obligations.d.ts +101 -0
  238. package/dist/store/obligations.d.ts.map +1 -0
  239. package/dist/store/obligations.js +226 -0
  240. package/dist/store/obligations.js.map +1 -0
  241. package/dist/store/operator-decisions.d.ts +23 -0
  242. package/dist/store/operator-decisions.d.ts.map +1 -0
  243. package/dist/store/operator-decisions.js +68 -0
  244. package/dist/store/operator-decisions.js.map +1 -0
  245. package/dist/store/owner-generations.d.ts +33 -0
  246. package/dist/store/owner-generations.d.ts.map +1 -0
  247. package/dist/store/owner-generations.js +63 -0
  248. package/dist/store/owner-generations.js.map +1 -0
  249. package/dist/store/partitions.d.ts +37 -0
  250. package/dist/store/partitions.d.ts.map +1 -0
  251. package/dist/store/partitions.js +68 -0
  252. package/dist/store/partitions.js.map +1 -0
  253. package/dist/store/pragmas.d.ts +32 -0
  254. package/dist/store/pragmas.d.ts.map +1 -0
  255. package/dist/store/pragmas.js +65 -0
  256. package/dist/store/pragmas.js.map +1 -0
  257. package/dist/store/project-router.d.ts +325 -0
  258. package/dist/store/project-router.d.ts.map +1 -0
  259. package/dist/store/project-router.js +298 -0
  260. package/dist/store/project-router.js.map +1 -0
  261. package/dist/store/projects.d.ts +36 -0
  262. package/dist/store/projects.d.ts.map +1 -0
  263. package/dist/store/projects.js +238 -0
  264. package/dist/store/projects.js.map +1 -0
  265. package/dist/store/publish-blob.d.ts +20 -0
  266. package/dist/store/publish-blob.d.ts.map +1 -0
  267. package/dist/store/publish-blob.js +158 -0
  268. package/dist/store/publish-blob.js.map +1 -0
  269. package/dist/store/purge-files.d.ts +30 -0
  270. package/dist/store/purge-files.d.ts.map +1 -0
  271. package/dist/store/purge-files.js +79 -0
  272. package/dist/store/purge-files.js.map +1 -0
  273. package/dist/store/resource-rows.d.ts +40 -0
  274. package/dist/store/resource-rows.d.ts.map +1 -0
  275. package/dist/store/resource-rows.js +103 -0
  276. package/dist/store/resource-rows.js.map +1 -0
  277. package/dist/store/resources.d.ts +67 -0
  278. package/dist/store/resources.d.ts.map +1 -0
  279. package/dist/store/resources.js +147 -0
  280. package/dist/store/resources.js.map +1 -0
  281. package/dist/store/retention.d.ts +95 -0
  282. package/dist/store/retention.d.ts.map +1 -0
  283. package/dist/store/retention.js +173 -0
  284. package/dist/store/retention.js.map +1 -0
  285. package/dist/store/run-events.d.ts +14 -0
  286. package/dist/store/run-events.d.ts.map +1 -0
  287. package/dist/store/run-events.js +35 -0
  288. package/dist/store/run-events.js.map +1 -0
  289. package/dist/store/runtime.d.ts +24 -0
  290. package/dist/store/runtime.d.ts.map +1 -0
  291. package/dist/store/runtime.js +67 -0
  292. package/dist/store/runtime.js.map +1 -0
  293. package/dist/store/schema.d.ts +33 -0
  294. package/dist/store/schema.d.ts.map +1 -0
  295. package/dist/store/schema.js +187 -0
  296. package/dist/store/schema.js.map +1 -0
  297. package/dist/store/setup-bindings.d.ts +20 -0
  298. package/dist/store/setup-bindings.d.ts.map +1 -0
  299. package/dist/store/setup-bindings.js +52 -0
  300. package/dist/store/setup-bindings.js.map +1 -0
  301. package/dist/store/sql-command-router.d.ts +79 -0
  302. package/dist/store/sql-command-router.d.ts.map +1 -0
  303. package/dist/store/sql-command-router.js +92 -0
  304. package/dist/store/sql-command-router.js.map +1 -0
  305. package/dist/store/sql-daemon-services.d.ts +61 -0
  306. package/dist/store/sql-daemon-services.d.ts.map +1 -0
  307. package/dist/store/sql-daemon-services.js +124 -0
  308. package/dist/store/sql-daemon-services.js.map +1 -0
  309. package/dist/store/sql-recovery-export.d.ts +8 -0
  310. package/dist/store/sql-recovery-export.d.ts.map +1 -0
  311. package/dist/store/sql-recovery-export.js +110 -0
  312. package/dist/store/sql-recovery-export.js.map +1 -0
  313. package/dist/store/sql-recovery-inspection.d.ts +22 -0
  314. package/dist/store/sql-recovery-inspection.d.ts.map +1 -0
  315. package/dist/store/sql-recovery-inspection.js +88 -0
  316. package/dist/store/sql-recovery-inspection.js.map +1 -0
  317. package/dist/store/sql-recovery.d.ts +69 -0
  318. package/dist/store/sql-recovery.d.ts.map +1 -0
  319. package/dist/store/sql-recovery.js +169 -0
  320. package/dist/store/sql-recovery.js.map +1 -0
  321. package/dist/store/sql-validation.d.ts +9 -0
  322. package/dist/store/sql-validation.d.ts.map +1 -0
  323. package/dist/store/sql-validation.js +103 -0
  324. package/dist/store/sql-validation.js.map +1 -0
  325. package/dist/store/statement-observer.d.ts +7 -0
  326. package/dist/store/statement-observer.d.ts.map +1 -0
  327. package/dist/store/statement-observer.js +44 -0
  328. package/dist/store/statement-observer.js.map +1 -0
  329. package/dist/store/store.d.ts +110 -0
  330. package/dist/store/store.d.ts.map +1 -0
  331. package/dist/store/store.js +296 -0
  332. package/dist/store/store.js.map +1 -0
  333. package/dist/store/terminal-files.d.ts +21 -0
  334. package/dist/store/terminal-files.d.ts.map +1 -0
  335. package/dist/store/terminal-files.js +115 -0
  336. package/dist/store/terminal-files.js.map +1 -0
  337. package/dist/store/thread-replay.d.ts +12 -0
  338. package/dist/store/thread-replay.d.ts.map +1 -0
  339. package/dist/store/thread-replay.js +49 -0
  340. package/dist/store/thread-replay.js.map +1 -0
  341. package/dist/store/thread-rows.d.ts +25 -0
  342. package/dist/store/thread-rows.d.ts.map +1 -0
  343. package/dist/store/thread-rows.js +141 -0
  344. package/dist/store/thread-rows.js.map +1 -0
  345. package/dist/store/threads.d.ts +105 -0
  346. package/dist/store/threads.d.ts.map +1 -0
  347. package/dist/store/threads.js +423 -0
  348. package/dist/store/threads.js.map +1 -0
  349. package/dist/store/upload-binding-retention.d.ts +26 -0
  350. package/dist/store/upload-binding-retention.d.ts.map +1 -0
  351. package/dist/store/upload-binding-retention.js +142 -0
  352. package/dist/store/upload-binding-retention.js.map +1 -0
  353. package/dist/store/uploads.d.ts +30 -0
  354. package/dist/store/uploads.d.ts.map +1 -0
  355. package/dist/store/uploads.js +238 -0
  356. package/dist/store/uploads.js.map +1 -0
  357. package/dist/store-contracts.d.ts +181 -0
  358. package/dist/store-contracts.d.ts.map +1 -0
  359. package/dist/store-contracts.js +2 -0
  360. package/dist/store-contracts.js.map +1 -0
  361. package/dist/terminal-authority.d.ts +9 -0
  362. package/dist/terminal-authority.d.ts.map +1 -1
  363. package/dist/terminal-authority.js +103 -1
  364. package/dist/terminal-authority.js.map +1 -1
  365. package/dist/thread-lane-checkpoints.d.ts +0 -2
  366. package/dist/thread-lane-checkpoints.d.ts.map +1 -1
  367. package/dist/thread-lane-checkpoints.js +0 -4
  368. package/dist/thread-lane-checkpoints.js.map +1 -1
  369. package/dist/thread-store-support.d.ts +1 -27
  370. package/dist/thread-store-support.d.ts.map +1 -1
  371. package/dist/thread-store-support.js +0 -63
  372. package/dist/thread-store-support.js.map +1 -1
  373. package/dist/threads.d.ts +1 -113
  374. package/dist/threads.d.ts.map +1 -1
  375. package/dist/threads.js +1 -379
  376. package/dist/threads.js.map +1 -1
  377. package/package.json +9 -7
  378. package/dist/command-activity.d.ts +0 -14
  379. package/dist/command-activity.d.ts.map +0 -1
  380. package/dist/command-activity.js +0 -16
  381. package/dist/command-activity.js.map +0 -1
  382. package/dist/journal-events.d.ts +0 -4
  383. package/dist/journal-events.d.ts.map +0 -1
  384. package/dist/journal-events.js +0 -23
  385. package/dist/journal-events.js.map +0 -1
  386. package/dist/journal-maintenance.d.ts +0 -50
  387. package/dist/journal-maintenance.d.ts.map +0 -1
  388. package/dist/journal-maintenance.js +0 -162
  389. package/dist/journal-maintenance.js.map +0 -1
  390. package/dist/journal-manager-journal.d.ts +0 -18
  391. package/dist/journal-manager-journal.d.ts.map +0 -1
  392. package/dist/journal-manager-journal.js +0 -25
  393. package/dist/journal-manager-journal.js.map +0 -1
  394. package/dist/journal-manager-lifecycle.d.ts +0 -11
  395. package/dist/journal-manager-lifecycle.d.ts.map +0 -1
  396. package/dist/journal-manager-lifecycle.js +0 -2
  397. package/dist/journal-manager-lifecycle.js.map +0 -1
  398. package/dist/journal-manager.d.ts +0 -99
  399. package/dist/journal-manager.d.ts.map +0 -1
  400. package/dist/journal-manager.js +0 -559
  401. package/dist/journal-manager.js.map +0 -1
  402. package/dist/journal-prepared-operation.d.ts +0 -53
  403. package/dist/journal-prepared-operation.d.ts.map +0 -1
  404. package/dist/journal-prepared-operation.js +0 -158
  405. package/dist/journal-prepared-operation.js.map +0 -1
  406. package/dist/journal-projection-slot.d.ts +0 -28
  407. package/dist/journal-projection-slot.d.ts.map +0 -1
  408. package/dist/journal-projection-slot.js +0 -71
  409. package/dist/journal-projection-slot.js.map +0 -1
  410. package/dist/journal-projection.d.ts +0 -13
  411. package/dist/journal-projection.d.ts.map +0 -1
  412. package/dist/journal-projection.js +0 -2
  413. package/dist/journal-projection.js.map +0 -1
  414. package/dist/partition-accounts.d.ts +0 -27
  415. package/dist/partition-accounts.d.ts.map +0 -1
  416. package/dist/partition-accounts.js +0 -21
  417. package/dist/partition-accounts.js.map +0 -1
  418. package/dist/project-partition-preparation.d.ts +0 -87
  419. package/dist/project-partition-preparation.d.ts.map +0 -1
  420. package/dist/project-partition-preparation.js +0 -273
  421. package/dist/project-partition-preparation.js.map +0 -1
  422. package/dist/project-partitions.d.ts +0 -214
  423. package/dist/project-partitions.d.ts.map +0 -1
  424. package/dist/project-partitions.js +0 -486
  425. package/dist/project-partitions.js.map +0 -1
  426. package/dist/project-remove.d.ts +0 -11
  427. package/dist/project-remove.d.ts.map +0 -1
  428. package/dist/project-remove.js +0 -65
  429. package/dist/project-remove.js.map +0 -1
  430. package/dist/project-thread-listing.d.ts +0 -14
  431. package/dist/project-thread-listing.d.ts.map +0 -1
  432. package/dist/project-thread-listing.js +0 -37
  433. package/dist/project-thread-listing.js.map +0 -1
  434. package/dist/quota-projection.d.ts +0 -11
  435. package/dist/quota-projection.d.ts.map +0 -1
  436. package/dist/quota-projection.js +0 -10
  437. package/dist/quota-projection.js.map +0 -1
  438. package/dist/resource-store.d.ts +0 -39
  439. package/dist/resource-store.d.ts.map +0 -1
  440. package/dist/resource-store.js +0 -464
  441. package/dist/resource-store.js.map +0 -1
  442. package/dist/run-event-terminal-index.d.ts +0 -13
  443. package/dist/run-event-terminal-index.d.ts.map +0 -1
  444. package/dist/run-event-terminal-index.js +0 -38
  445. package/dist/run-event-terminal-index.js.map +0 -1
  446. package/dist/run-events.d.ts +0 -17
  447. package/dist/run-events.d.ts.map +0 -1
  448. package/dist/run-events.js +0 -31
  449. package/dist/run-events.js.map +0 -1
  450. package/dist/thread-head-ping.d.ts +0 -35
  451. package/dist/thread-head-ping.d.ts.map +0 -1
  452. package/dist/thread-head-ping.js +0 -67
  453. package/dist/thread-head-ping.js.map +0 -1
@@ -1,486 +0,0 @@
1
- import { existsSync } from "node:fs";
2
- import { isEphemeralRunScope, PROJECT_NOT_REGISTERED_REQUIRED_ACTIONS } from "@claudexor/schema";
3
- import { hashJson, isClaudexorOwnedRuntimePath } from "@claudexor/util";
4
- import { isJournaledRunEvent, journaledRunEventCopy } from "./journaled-run-events.js";
5
- import { beginDeliveryCommand, completeDeliveryCommand, failDeliveryCommand, } from "./delivery-command.js";
6
- import { activatePreparedProjectPartitions, prepareProjectPartitions, refreshProjectPartitionsPreparation, ProjectPartitionCollection, } from "./project-partition-preparation.js";
7
- import { listProjectThreadsResilient } from "./project-thread-listing.js";
8
- import { applyProfileContinuityAcross, invalidateCredentialProfileAcross, } from "./partition-accounts.js";
9
- import { removeProjectFromPartitions } from "./project-remove.js";
10
- export class ProjectPartitions {
11
- rootDir;
12
- projects;
13
- globalCommands;
14
- globalInteractions;
15
- globalDecisions;
16
- globalRunEvents;
17
- globalThreads;
18
- headPing;
19
- requestMaintenance;
20
- partitions;
21
- preparationResult = null;
22
- constructor(rootDir, projects, globalCommands, globalInteractions, globalDecisions, globalRunEvents, globalThreads,
23
- /** Global-partition `thread.head.updated` sink, threaded into every project ThreadStore. */
24
- headPing, requestMaintenance) {
25
- this.rootDir = rootDir;
26
- this.projects = projects;
27
- this.globalCommands = globalCommands;
28
- this.globalInteractions = globalInteractions;
29
- this.globalDecisions = globalDecisions;
30
- this.globalRunEvents = globalRunEvents;
31
- this.globalThreads = globalThreads;
32
- this.headPing = headPing;
33
- this.requestMaintenance = requestMaintenance;
34
- this.partitions = new ProjectPartitionCollection(rootDir, projects, headPing, requestMaintenance);
35
- }
36
- prepare() {
37
- if (this.preparationResult)
38
- return this.preparationResult;
39
- const prepared = prepareProjectPartitions({
40
- rootDir: this.rootDir,
41
- projects: this.projects,
42
- headPing: this.headPing,
43
- requestMaintenance: this.requestMaintenance,
44
- });
45
- this.partitions.clear();
46
- for (const [id, entry] of prepared.entries)
47
- this.partitions.set(id, entry);
48
- this.preparationResult = prepared.receipt;
49
- return prepared.receipt;
50
- }
51
- revalidatePreparation() {
52
- if (!this.preparationResult)
53
- throw new Error("project partitions are not prepared");
54
- for (const entry of this.partitions.values()) {
55
- // A manager reopened by a recovery-route quarantine is live authority
56
- // (C6): only still-prepared partitions revalidate.
57
- if (entry.manager.ready())
58
- continue;
59
- entry.manager.revalidatePreparation();
60
- }
61
- }
62
- /** Live stage-2 re-verdict for the in-process reopen (C6): quarantined
63
- * partitions reopened by their manager count ready, and a registry that
64
- * became readable after a global reopen restores coverage. Refreshes the
65
- * cached receipt the activation gate checks. */
66
- refreshPreparation() {
67
- if (!this.preparationResult)
68
- throw new Error("project partitions are not prepared");
69
- this.preparationResult = refreshProjectPartitionsPreparation({
70
- rootDir: this.rootDir,
71
- projects: this.projects,
72
- headPing: this.headPing,
73
- requestMaintenance: this.requestMaintenance,
74
- previous: this.preparationResult,
75
- entries: this.partitions,
76
- });
77
- return this.preparationResult;
78
- }
79
- activatePrepared() {
80
- if (!this.preparationResult)
81
- throw new Error("project partitions are not prepared");
82
- activatePreparedProjectPartitions({
83
- rootDir: this.rootDir,
84
- projects: this.projects,
85
- headPing: this.headPing,
86
- requestMaintenance: this.requestMaintenance,
87
- receipt: this.preparationResult,
88
- entries: this.partitions,
89
- resetReceipt: (receipt) => (this.preparationResult = receipt),
90
- });
91
- }
92
- recoverAfterStartup() {
93
- for (const entry of this.partitions.values())
94
- entry.manager.recoverAfterStartup();
95
- }
96
- all() {
97
- return [
98
- this.globalCommands.current(),
99
- ...this.partitions.healthy().map((entry) => entry.commands.current()),
100
- ];
101
- }
102
- interactionStores() {
103
- return [
104
- this.globalInteractions.current(),
105
- ...this.partitions.healthy().map((entry) => entry.interactions.current()),
106
- ];
107
- }
108
- interactionsForRequest(params) {
109
- const commandStore = this.forRequest(params);
110
- if (commandStore === this.globalCommands.current())
111
- return this.globalInteractions.current();
112
- const entry = this.partitions
113
- .healthy()
114
- .find((candidate) => candidate.commands.current() === commandStore);
115
- if (!entry)
116
- throw new Error("command partition has no interaction authority");
117
- return entry.interactions.current();
118
- }
119
- operatorDecision(params, runId) {
120
- return this.decisionStoreForRequest(params).get(runId);
121
- }
122
- findOperatorDecisionByIdempotency(params, runId, idempotency) {
123
- return this.decisionStoreForRequest(params).findByIdempotency(runId, idempotency);
124
- }
125
- recordOperatorDecision(params, decision, idempotency) {
126
- return this.decisionStoreForRequest(params).record(decision, idempotency);
127
- }
128
- /**
129
- * Durable sink for run events. Only the lifecycle-significant subset is
130
- * journaled (`JOURNALED_RUN_EVENT_TYPES`); a filtered event is returned
131
- * untouched and can never fail its producer. The journaled `run.created`
132
- * carries the prompt digest, never the prompt text.
133
- */
134
- recordRunEvent(params, event) {
135
- if (isJournaledRunEvent(event)) {
136
- this.runEventStoreForRequest(params).record(journaledRunEventCopy(event));
137
- }
138
- // The producer keeps its own event (prompt included) for events.jsonl and
139
- // the live bus; only the journal copy carries the digest.
140
- return event;
141
- }
142
- forRequest(params) {
143
- const input = record(params);
144
- const threadId = stringField(input, "threadId");
145
- if (threadId) {
146
- const store = this.threadStoreForThread(threadId);
147
- if (store)
148
- return this.commandStoreForThreadStore(store);
149
- }
150
- const scope = record(input.scope);
151
- if (scope.kind !== "project")
152
- return this.globalCommands.current();
153
- // A declared one-shot root is never registered, so INV-035's "no-project
154
- // state remains global" governs it (partitionForRoot would 404 instead).
155
- if (isEphemeralRunScope(scope))
156
- return this.globalCommands.current();
157
- const root = stringField(scope, "root");
158
- return this.partitionForRoot(root).commands.current();
159
- }
160
- findById(id) {
161
- return this.all().find((store) => store.get(id));
162
- }
163
- beginDelivery(params, input) {
164
- return beginDeliveryCommand(this.forRequest(params), params, input);
165
- }
166
- completeDelivery(id, result) {
167
- completeDeliveryCommand(this.findById(id), id, result);
168
- }
169
- failDelivery(id, error) {
170
- failDeliveryCommand(this.findById(id), id, error);
171
- }
172
- registerProject(input) {
173
- const project = this.projects.current().register(input);
174
- this.partitions.ensure(project.id);
175
- return project;
176
- }
177
- /**
178
- * F2 ghost-cleanup sweep: unregister every project that can never
179
- * be a legitimate user project — its root is INSIDE the Claudexor runtime
180
- * tree (an envelope worktree that was auto-registered as a ghost) or its root
181
- * is permanently GONE from disk. Closes and drops each ghost's partition so
182
- * it stops polluting listings/retention. Idempotent and best-effort; returns
183
- * the retired projects for disclosure/logging.
184
- */
185
- quarantineGhostProjects() {
186
- const registry = this.projects.current();
187
- const retired = [];
188
- for (const project of registry.list()) {
189
- const owned = isClaudexorOwnedRuntimePath(project.root);
190
- const gone = !existsSync(project.root);
191
- if (!owned && !gone)
192
- continue;
193
- registry.unregister(project.id);
194
- retired.push({
195
- projectId: project.id,
196
- root: project.root,
197
- reason: owned ? "root_inside_claudexor_runtime" : "root_permanently_missing",
198
- });
199
- }
200
- if (retired.length > 0)
201
- this.partitions.sync();
202
- return retired;
203
- }
204
- relinkProject(id, root) {
205
- const project = this.projects.current().relink(id, root);
206
- this.partitions.ensure(id).threads.current().relinkProjectRoot(project.root);
207
- return project;
208
- }
209
- /**
210
- * QA-049 minimal project remove: retire a registered project. Fails CLOSED
211
- * with a typed 409 while any NON-PURGED thread or any live/queued run still
212
- * references it (the caller supplies the roots with active runs, since the job
213
- * list lives in the daemon composition). On success, ARCHIVE the journal
214
- * partition (rename out of the active tree — never delete) FIRST — that fallible
215
- * rename+fsync must throw with the registry still intact rather than strand an
216
- * unregistered project whose partition never moved — THEN unregister the durable
217
- * registry entry and drop the in-memory partition. Artifact trees are left for
218
- * GC/retention. Unknown id -> 404. Recovery-pending partition -> 409.
219
- */
220
- removeProject(id, activeRunRoots) {
221
- this.partitions.sync();
222
- return removeProjectFromPartitions(this.projects.current(), this.partitions, id, activeRunRoots);
223
- }
224
- journal(partition) {
225
- if (!partition.startsWith("project:"))
226
- throw unknownPartition(partition);
227
- const id = partition.slice("project:".length);
228
- const prepared = this.partitions.get(id);
229
- if (prepared)
230
- return prepared.manager;
231
- if (this.preparationResult?.coverage === "global_registry_unavailable") {
232
- throw unknownPartition(partition);
233
- }
234
- if (!id || !this.projects.current().get(id))
235
- throw unknownPartition(partition);
236
- return this.partitions.ensure(id).manager;
237
- }
238
- /** `ephemeral`: the caller declared this root ONE-SHOT (INV-035) — never registered, so the
239
- * thread takes the global no-project partition, exactly as its commands and run events do. */
240
- createThread(input) {
241
- const root = input.ephemeral === true ? null : (input.repoRoot ?? null);
242
- if (root && !this.projects.current().findByRoot(root)) {
243
- const idempotencyKey = `thread-auto-register-${hashJson(root)}`;
244
- this.registerProject({ root, idempotencyKey, clientId: "thread-create" });
245
- }
246
- return this.threadStoreForRoot(root).createThread(input);
247
- }
248
- preparedExecutionRoots() {
249
- return this.partitions.preparedExecutionRoots();
250
- }
251
- /** Exact accepted-creation replay lookup; registers and creates nothing. */
252
- findThreadCreation(input) {
253
- return this.partitions.findThreadCreation(input, this.globalThreads.current());
254
- }
255
- listThreads() {
256
- return this.listThreadsResilient().threads;
257
- }
258
- /** Dead-project-resilient listing in one global recency order (F2);
259
- * the mechanics live in project-thread-listing.ts. */
260
- listThreadsResilient() {
261
- return listProjectThreadsResilient({
262
- partitions: this.partitions,
263
- projects: this.projects,
264
- globalThreads: this.globalThreads,
265
- });
266
- }
267
- /** Purged threads of every READY store. Every listing hides them; the
268
- * retention pass reads them to finish a byte cleanup that failed after the
269
- * purge was journaled. */
270
- listPurgedThreads() {
271
- this.partitions.sync();
272
- return this.threadStores().flatMap((store) => store.listThreads("purged"));
273
- }
274
- getThread(id) {
275
- return this.threadStoreForThread(id)?.getThread(id);
276
- }
277
- turnsFor(id) {
278
- return this.threadStoreForThread(id)?.turnsFor(id) ?? [];
279
- }
280
- sessionsForThread(id) {
281
- return this.threadStoreForThread(id)?.sessionsForThread(id) ?? [];
282
- }
283
- createTurn(id, prompt, input = {}) {
284
- return this.requireThreadStore(id).createTurn(id, prompt, input);
285
- }
286
- findTurnByIdempotency(id, input) {
287
- return this.requireThreadStore(id).findTurnByIdempotency(id, input);
288
- }
289
- updateThread(id, patch) {
290
- return this.requireThreadStore(id).updateThread(id, patch);
291
- }
292
- /** Unified-accounts continuity steps (contract: partition-accounts.ts). */
293
- migrateNullProfileContinuity(harnessId, rowId) {
294
- return applyProfileContinuityAcross(this.continuityHosts(), (store) => store.migrateNullProfileContinuity(harnessId, rowId));
295
- }
296
- rollbackProfileContinuity(harnessId, rowId) {
297
- return applyProfileContinuityAcross(this.continuityHosts(), (store) => store.rollbackProfileContinuity(harnessId, rowId));
298
- }
299
- continuityHosts() {
300
- this.partitions.sync();
301
- return {
302
- stores: this.threadStores(),
303
- skippedPartitions: [...this.partitions.entries()]
304
- .filter(([, entry]) => !entry.manager.ready())
305
- .map(([id]) => id),
306
- };
307
- }
308
- invalidateCredentialProfile(harnessId, profileId) {
309
- this.assertCredentialProfileInvalidationReady();
310
- return invalidateCredentialProfileAcross(this.threadStores(), harnessId, profileId);
311
- }
312
- assertCredentialProfileInvalidationReady() {
313
- this.partitions.sync();
314
- const unavailable = [...this.partitions.entries()]
315
- .filter(([, entry]) => !entry.manager.ready())
316
- .map(([id]) => id);
317
- if (unavailable.length > 0) {
318
- throw Object.assign(new Error(`credential profile deletion requires recovery of project partition(s): ${unavailable.join(", ")}`), { status: 409, code: "journal_recovery_required" });
319
- }
320
- }
321
- trashThread(id) {
322
- return this.requireThreadStore(id).trashThread(id);
323
- }
324
- restoreThread(id) {
325
- return this.requireThreadStore(id).restoreThread(id);
326
- }
327
- purgeThread(id) {
328
- return this.requireThreadStore(id).purgeThread(id);
329
- }
330
- setThreadWorktree(id, path, baseSha, deliveredThroughRunId) {
331
- this.requireThreadStore(id).setThreadWorktree(id, path, baseSha, deliveredThroughRunId);
332
- }
333
- assertKnownIds(threadId, turnId) {
334
- const id = typeof threadId === "string" && threadId ? threadId : undefined;
335
- const turn = typeof turnId === "string" && turnId ? turnId : undefined;
336
- const store = id
337
- ? this.requireThreadStore(id)
338
- : turn
339
- ? this.requireTurnStore(turn)
340
- : this.globalThreads.current();
341
- return store.assertKnownIds(threadId, turnId);
342
- }
343
- getTurn(id) {
344
- return this.threadStoreForTurn(id)?.getTurn(id);
345
- }
346
- bindTurnRun(id, runId) {
347
- this.requireTurnStore(id).bindTurnRun(id, runId);
348
- }
349
- setTurnEnqueueError(id, problem) {
350
- this.requireTurnStore(id).setTurnEnqueueError(id, problem);
351
- }
352
- resumeMap(id, profileId = null) {
353
- return this.requireThreadStore(id).resumeMap(id, profileId);
354
- }
355
- resumeMapAuto(id) {
356
- return this.requireThreadStore(id).resumeMapAuto(id);
357
- }
358
- accountBindings(id) {
359
- return this.requireThreadStore(id).accountBindings(id);
360
- }
361
- recordSession(id, harnessId, nativeSessionId, observedModel, profileId = null) {
362
- this.requireThreadStore(id).recordSession(id, harnessId, nativeSessionId, observedModel, profileId);
363
- }
364
- recordLaneCheckpoint(id, harnessId, profileId, turnId) {
365
- this.requireThreadStore(id).recordLaneCheckpoint(id, harnessId, profileId, turnId);
366
- }
367
- laneCheckpoint(id, harnessId, profileId) {
368
- return this.threadStoreForThread(id)?.laneCheckpoint(id, harnessId, profileId) ?? null;
369
- }
370
- laneCheckpointsForThread(id) {
371
- return this.threadStoreForThread(id)?.laneCheckpointsForThread(id) ?? [];
372
- }
373
- setTurnContinuity(turnId, disclosure) {
374
- this.threadStoreForTurn(turnId)?.setTurnContinuity(turnId, disclosure);
375
- }
376
- /**
377
- * Run-terminal invalidation (the W12 path with no store mutation to ride):
378
- * a terminal changes the thread's presented state (needs-me, outcome), so
379
- * the daemon pings the owning store's head directly.
380
- */
381
- pingThreadHead(id) {
382
- this.threadStoreForThread(id)?.pingHead(id);
383
- }
384
- close() {
385
- for (const entry of this.partitions.values())
386
- entry.manager.close();
387
- this.partitions.clear();
388
- }
389
- /**
390
- * Canonical roots whose partition journal is READY — the set whose thread
391
- * lineage / job records are trustworthy. Retention (W3.6) fails CLOSED on a
392
- * quarantined partition: its runs are protected, never GC'd against an empty
393
- * reference set (a non-ready partition contributes nothing to listThreads,
394
- * so its referenced runs would otherwise look unreferenced).
395
- */
396
- healthyProjectRoots() {
397
- return this.partitions.healthyRoots();
398
- }
399
- partitionForRoot(root) {
400
- const project = this.projects.current().findByRoot(root);
401
- if (!project) {
402
- throw Object.assign(new Error(`project is not registered: ${root}`), {
403
- code: "project_not_registered",
404
- status: 404,
405
- retryable: false,
406
- requiredActions: [...PROJECT_NOT_REGISTERED_REQUIRED_ACTIONS],
407
- });
408
- }
409
- return this.partitions.ensure(project.id);
410
- }
411
- threadStores() {
412
- return [
413
- this.globalThreads.current(),
414
- ...this.partitions.healthy().map((entry) => entry.threads.current()),
415
- ];
416
- }
417
- threadStoreForRoot(root) {
418
- return root ? this.partitionForRoot(root).threads.current() : this.globalThreads.current();
419
- }
420
- threadStoreForThread(id) {
421
- return this.threadStores().find((store) => store.getThread(id));
422
- }
423
- threadStoreForTurn(id) {
424
- return this.threadStores().find((store) => store.getTurn(id));
425
- }
426
- requireThreadStore(id) {
427
- const store = this.threadStoreForThread(id);
428
- if (!store)
429
- throw Object.assign(new Error(`no such thread: ${id}`), { status: 404 });
430
- return store;
431
- }
432
- requireTurnStore(id) {
433
- const store = this.threadStoreForTurn(id);
434
- if (!store)
435
- throw Object.assign(new Error(`no such turn: ${id}`), { status: 404 });
436
- return store;
437
- }
438
- commandStoreForThreadStore(store) {
439
- if (store === this.globalThreads.current())
440
- return this.globalCommands.current();
441
- const entry = this.partitions
442
- .healthy()
443
- .find((candidate) => candidate.threads.current() === store);
444
- if (!entry)
445
- throw new Error("thread partition has no command authority");
446
- return entry.commands.current();
447
- }
448
- decisionStoreForRequest(params) {
449
- const commands = this.forRequest(params);
450
- if (commands === this.globalCommands.current())
451
- return this.globalDecisions.current();
452
- const entry = this.partitions
453
- .healthy()
454
- .find((candidate) => candidate.commands.current() === commands);
455
- if (!entry)
456
- throw new Error("command partition has no operator-decision authority");
457
- return entry.decisions.current();
458
- }
459
- runEventStoreForRequest(params) {
460
- const commands = this.forRequest(params);
461
- if (commands === this.globalCommands.current())
462
- return this.globalRunEvents.current();
463
- const entry = this.partitions
464
- .healthy()
465
- .find((candidate) => candidate.commands.current() === commands);
466
- if (!entry)
467
- throw new Error("command partition has no run-event authority");
468
- return entry.runEvents.current();
469
- }
470
- }
471
- function record(value) {
472
- return value && typeof value === "object" && !Array.isArray(value)
473
- ? value
474
- : {};
475
- }
476
- function stringField(value, key) {
477
- const field = value[key];
478
- return typeof field === "string" ? field : "";
479
- }
480
- function unknownPartition(partition) {
481
- return Object.assign(new Error(`no such journal partition: ${partition}`), {
482
- code: "journal_partition_not_found",
483
- status: 404,
484
- });
485
- }
486
- //# sourceMappingURL=project-partitions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"project-partitions.js","sourceRoot":"","sources":["../src/project-partitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAQrC,OAAO,EAAE,mBAAmB,EAAE,uCAAuC,EAAE,MAAM,mBAAmB,CAAC;AACjG,OAAO,EAAE,QAAQ,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAKxE,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAgBvF,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,iCAAiC,EACjC,wBAAwB,EACxB,mCAAmC,EACnC,0BAA0B,GAE3B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EACL,4BAA4B,EAC5B,iCAAiC,GAElC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAGlE,MAAM,OAAO,iBAAiB;IAKT,OAAO;IACP,QAAQ;IACR,cAAc;IACd,kBAAkB;IAClB,eAAe;IACf,eAAe;IACf,aAAa;IAEb,QAAQ;IAC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C,KAA8B,EAAE,GAAW;IAC9D,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;IACzB,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AAChD,CAAC;AAED,SAAS,gBAAgB,CAAC,SAAiB;IACzC,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,8BAA8B,SAAS,EAAE,CAAC,EAAE;QACzE,IAAI,EAAE,6BAA6B;QACnC,MAAM,EAAE,GAAG;KACZ,CAAC,CAAC;AACL,CAAC"}
@@ -1,11 +0,0 @@
1
- import type { ControlProjectRemoveReceipt } from "@claudexor/schema";
2
- import type { ProjectPartitionCollection } from "./project-partition-preparation.js";
3
- import type { ProjectStore } from "./projects.js";
4
- /**
5
- * QA-049 minimal project remove (extracted from project-partitions.ts,
6
- * INV-124): retire the durable registry entry and archive the journal
7
- * partition, fenced against non-purged threads and live/queued runs. The
8
- * caller has already synced the partition collection.
9
- */
10
- export declare function removeProjectFromPartitions(registry: ProjectStore, partitions: ProjectPartitionCollection, id: string, activeRunRoots: ReadonlySet<string>): ControlProjectRemoveReceipt;
11
- //# sourceMappingURL=project-remove.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"project-remove.d.ts","sourceRoot":"","sources":["../src/project-remove.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AACrF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,YAAY,EACtB,UAAU,EAAE,0BAA0B,EACtC,EAAE,EAAE,MAAM,EACV,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,GAClC,2BAA2B,CAuE7B"}
@@ -1,65 +0,0 @@
1
- /**
2
- * QA-049 minimal project remove (extracted from project-partitions.ts,
3
- * INV-124): retire the durable registry entry and archive the journal
4
- * partition, fenced against non-purged threads and live/queued runs. The
5
- * caller has already synced the partition collection.
6
- */
7
- export function removeProjectFromPartitions(registry, partitions, id, activeRunRoots) {
8
- const project = registry.get(id);
9
- if (!project) {
10
- throw Object.assign(new Error(`no such project: ${id}`), {
11
- code: "project_not_found",
12
- status: 404,
13
- });
14
- }
15
- const entry = partitions.get(id);
16
- if (entry) {
17
- if (!entry.manager.ready()) {
18
- throw Object.assign(new Error(`project ${id} partition requires journal recovery before it can be removed`), { code: "journal_recovery_required", status: 409 });
19
- }
20
- const blocking = entry.threads
21
- .current()
22
- .listThreads()
23
- .filter((thread) => thread.state !== "purged");
24
- if (blocking.length > 0) {
25
- throw Object.assign(new Error(`project ${id} still has ${blocking.length} thread(s); trash and purge them before removing it`), { code: "project_has_threads", status: 409 });
26
- }
27
- }
28
- if (activeRunRoots.has(project.root)) {
29
- throw Object.assign(new Error(`project ${id} has a live or queued run; wait for it to finish before removing it`), { code: "project_has_active_run", status: 409 });
30
- }
31
- const archivedPartitionPath = entry ? entry.manager.archivePartition() : null;
32
- try {
33
- registry.unregister(id);
34
- }
35
- catch (unregisterError) {
36
- // Archive succeeded but the durable registry rejected the unregister: the
37
- // project is now archived-but-registered. Roll the archive back into the
38
- // active tree so the two views stay consistent, then surface the original
39
- // unregister failure. If the rollback ITSELF fails we cannot restore
40
- // consistency — disclose the partial state honestly with a typed error
41
- // rather than pretend the remove succeeded (Ф2 finding 4).
42
- if (entry && archivedPartitionPath) {
43
- try {
44
- entry.manager.restoreArchivedPartition(archivedPartitionPath);
45
- }
46
- catch (rollbackError) {
47
- throw Object.assign(new Error(`project ${id} could not be removed: its journal partition was archived to ${archivedPartitionPath}, the registry unregister failed, and the archive could not be rolled back (${rollbackError instanceof Error ? rollbackError.message : String(rollbackError)}); the project is archived-but-registered and needs manual reconciliation`), { code: "project_remove_partial", status: 500, archivedPartitionPath });
48
- }
49
- }
50
- throw unregisterError;
51
- }
52
- partitions.delete(id);
53
- return {
54
- projectId: project.id,
55
- root: project.root,
56
- registryRemoved: true,
57
- journalPartitionArchived: archivedPartitionPath !== null,
58
- archivedPartitionPath,
59
- artifactsRetained: true,
60
- // The in-process caller snapshots and removes in one synchronous turn.
61
- // Keep the existing wire literal for older receipt readers.
62
- activeRunCheck: "snapshot",
63
- };
64
- }
65
- //# sourceMappingURL=project-remove.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"project-remove.js","sourceRoot":"","sources":["../src/project-remove.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CACzC,QAAsB,EACtB,UAAsC,EACtC,EAAU,EACV,cAAmC;IAEnC,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACjC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,oBAAoB,EAAE,EAAE,CAAC,EAAE;YACvD,IAAI,EAAE,mBAAmB;YACzB,MAAM,EAAE,GAAG;SACZ,CAAC,CAAC;IACL,CAAC;IACD,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACjC,IAAI,KAAK,EAAE,CAAC;QACV,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;YAC3B,MAAM,MAAM,CAAC,MAAM,CACjB,IAAI,KAAK,CAAC,WAAW,EAAE,+DAA+D,CAAC,EACvF,EAAE,IAAI,EAAE,2BAA2B,EAAE,MAAM,EAAE,GAAG,EAAE,CACnD,CAAC;QACJ,CAAC;QACD,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO;aAC3B,OAAO,EAAE;aACT,WAAW,EAAE;aACb,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC;Q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AAE,GAAG,EAAE,qBAAqB,EAAE,CACvE,CAAC;YACJ,CAAC;QACH,CAAC;QACD,MAAM,eAAe,CAAC;IACxB,CAAC;IACD,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACtB,OAAO;QACL,SAAS,EAAE,OAAO,CAAC,EAAE;QACrB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,eAAe,EAAE,IAAI;QACrB,wBAAwB,EAAE,qBAAqB,KAAK,IAAI;QACxD,qBAAqB;QACrB,iBAAiB,EAAE,IAAI;QACvB,uEAAuE;QACvE,4DAA4D;QAC5D,cAAc,EAAE,UAAU;KAC3B,CAAC;AACJ,CAAC"}
@@ -1,14 +0,0 @@
1
- import type { ControlProjectListingProblem, Thread } from "@claudexor/schema";
2
- import type { JournalProjectionSlot } from "./journal-manager.js";
3
- import type { ProjectPartitionCollection } from "./project-partition-preparation.js";
4
- import type { ProjectStore } from "./projects.js";
5
- import type { ThreadStore } from "./threads.js";
6
- export declare function listProjectThreadsResilient(input: {
7
- partitions: ProjectPartitionCollection;
8
- projects: JournalProjectionSlot<ProjectStore>;
9
- globalThreads: JournalProjectionSlot<ThreadStore>;
10
- }): {
11
- threads: Thread[];
12
- problems: ControlProjectListingProblem[];
13
- };
14
- //# sourceMappingURL=project-thread-listing.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"project-thread-listing.d.ts","sourceRoot":"","sources":["../src/project-thread-listing.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AACrF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE;IACjD,UAAU,EAAE,0BAA0B,CAAC;IACvC,QAAQ,EAAE,qBAAqB,CAAC,YAAY,CAAC,CAAC;IAC9C,aAAa,EAAE,qBAAqB,CAAC,WAAW,CAAC,CAAC;CACnD,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,4BAA4B,EAAE,CAAA;CAAE,CAsBlE"}
@@ -1,37 +0,0 @@
1
- /**
2
- * Thread listing that is RESILIENT to a dead project (F2): a registered
3
- * project whose filesystem root has vanished (e.g. a swept ghost envelope
4
- * worktree) is SKIPPED with a disclosed per-project problem instead of
5
- * failing the whole listing, while every other project's threads load. Each
6
- * store sorts ITS threads by recency, but the stores concatenate — without a
7
- * merge-sort a fresh project thread lands below every global one (dogfood:
8
- * the fresh thread sank to the bottom). One global recency order.
9
- */
10
- import { existsSync } from "node:fs";
11
- export function listProjectThreadsResilient(input) {
12
- input.partitions.sync();
13
- const registry = input.projects.current();
14
- const threads = [...input.globalThreads.current().listThreads()];
15
- const problems = [];
16
- for (const [id, entry] of input.partitions) {
17
- if (!entry.manager.ready())
18
- continue;
19
- const root = registry.get(id)?.root;
20
- if (!root)
21
- continue;
22
- if (!existsSync(root)) {
23
- problems.push({
24
- projectId: id,
25
- root,
26
- code: "project_root_missing",
27
- message: `project root no longer exists: ${root}`,
28
- });
29
- continue;
30
- }
31
- for (const thread of entry.threads.current().listThreads())
32
- threads.push(thread);
33
- }
34
- threads.sort((a, b) => (a.updated_at < b.updated_at ? 1 : a.updated_at > b.updated_at ? -1 : 0));
35
- return { threads, problems };
36
- }
37
- //# sourceMappingURL=project-thread-listing.js.map