@cleocode/core 2026.9.26 → 2026.10.2

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 (410) hide show
  1. package/dist/build-provenance.json +2 -2
  2. package/dist/cloud/journal.d.ts +9 -5
  3. package/dist/cloud/journal.d.ts.map +1 -1
  4. package/dist/cloud/journal.js +29 -8
  5. package/dist/cloud/journal.js.map +1 -1
  6. package/dist/cloud/manifest-check.d.ts +140 -4
  7. package/dist/cloud/manifest-check.d.ts.map +1 -1
  8. package/dist/cloud/manifest-check.js +309 -10
  9. package/dist/cloud/manifest-check.js.map +1 -1
  10. package/dist/cloud/nexus-attach.d.ts +119 -0
  11. package/dist/cloud/nexus-attach.d.ts.map +1 -0
  12. package/dist/cloud/nexus-attach.js +267 -0
  13. package/dist/cloud/nexus-attach.js.map +1 -0
  14. package/dist/cloud/nexus-auth.d.ts +15 -3
  15. package/dist/cloud/nexus-auth.d.ts.map +1 -1
  16. package/dist/cloud/nexus-auth.js +90 -6
  17. package/dist/cloud/nexus-auth.js.map +1 -1
  18. package/dist/cloud/nexus-cloud-activity.d.ts +37 -0
  19. package/dist/cloud/nexus-cloud-activity.d.ts.map +1 -0
  20. package/dist/cloud/nexus-cloud-activity.js +79 -0
  21. package/dist/cloud/nexus-cloud-activity.js.map +1 -0
  22. package/dist/cloud/nexus-cloud-status.d.ts +132 -0
  23. package/dist/cloud/nexus-cloud-status.d.ts.map +1 -0
  24. package/dist/cloud/nexus-cloud-status.js +476 -0
  25. package/dist/cloud/nexus-cloud-status.js.map +1 -0
  26. package/dist/cloud/nexus-cloud.d.ts +179 -0
  27. package/dist/cloud/nexus-cloud.d.ts.map +1 -0
  28. package/dist/cloud/nexus-cloud.js +296 -0
  29. package/dist/cloud/nexus-cloud.js.map +1 -0
  30. package/dist/cloud/nexus-device.d.ts +32 -7
  31. package/dist/cloud/nexus-device.d.ts.map +1 -1
  32. package/dist/cloud/nexus-device.js +54 -7
  33. package/dist/cloud/nexus-device.js.map +1 -1
  34. package/dist/cloud/nexus-enrol.d.ts +35 -4
  35. package/dist/cloud/nexus-enrol.d.ts.map +1 -1
  36. package/dist/cloud/nexus-enrol.js +192 -47
  37. package/dist/cloud/nexus-enrol.js.map +1 -1
  38. package/dist/cloud/nexus-home.d.ts +74 -0
  39. package/dist/cloud/nexus-home.d.ts.map +1 -0
  40. package/dist/cloud/nexus-home.js +97 -0
  41. package/dist/cloud/nexus-home.js.map +1 -0
  42. package/dist/cloud/nexus-link.d.ts +8 -1
  43. package/dist/cloud/nexus-link.d.ts.map +1 -1
  44. package/dist/cloud/nexus-link.js +138 -11
  45. package/dist/cloud/nexus-link.js.map +1 -1
  46. package/dist/cloud/nexus-logout.d.ts +114 -0
  47. package/dist/cloud/nexus-logout.d.ts.map +1 -0
  48. package/dist/cloud/nexus-logout.js +429 -0
  49. package/dist/cloud/nexus-logout.js.map +1 -0
  50. package/dist/cloud/nexus-vault-keys.d.ts +129 -0
  51. package/dist/cloud/nexus-vault-keys.d.ts.map +1 -0
  52. package/dist/cloud/nexus-vault-keys.js +277 -0
  53. package/dist/cloud/nexus-vault-keys.js.map +1 -0
  54. package/dist/cloud/nexus-vault-state.d.ts +121 -0
  55. package/dist/cloud/nexus-vault-state.d.ts.map +1 -0
  56. package/dist/cloud/nexus-vault-state.js +274 -0
  57. package/dist/cloud/nexus-vault-state.js.map +1 -0
  58. package/dist/cloud/nexus-vault.d.ts +160 -0
  59. package/dist/cloud/nexus-vault.d.ts.map +1 -0
  60. package/dist/cloud/nexus-vault.js +1733 -0
  61. package/dist/cloud/nexus-vault.js.map +1 -0
  62. package/dist/cloud/signing.d.ts +24 -8
  63. package/dist/cloud/signing.d.ts.map +1 -1
  64. package/dist/cloud/signing.js +61 -15
  65. package/dist/cloud/signing.js.map +1 -1
  66. package/dist/docs/export-document.js +8341 -3317
  67. package/dist/docs/export-document.js.map +3 -3
  68. package/dist/doctor/migrations.d.ts +75 -0
  69. package/dist/doctor/migrations.d.ts.map +1 -0
  70. package/dist/doctor/migrations.js +136 -0
  71. package/dist/doctor/migrations.js.map +1 -0
  72. package/dist/doctor/sync-sealer.d.ts +48 -0
  73. package/dist/doctor/sync-sealer.d.ts.map +1 -0
  74. package/dist/doctor/sync-sealer.js +109 -0
  75. package/dist/doctor/sync-sealer.js.map +1 -0
  76. package/dist/doctor/sync-triggers.d.ts +53 -0
  77. package/dist/doctor/sync-triggers.d.ts.map +1 -0
  78. package/dist/doctor/sync-triggers.js +157 -0
  79. package/dist/doctor/sync-triggers.js.map +1 -0
  80. package/dist/init.d.ts.map +1 -1
  81. package/dist/init.js +5 -1
  82. package/dist/init.js.map +1 -1
  83. package/dist/internal.d.ts +1 -1
  84. package/dist/internal.d.ts.map +1 -1
  85. package/dist/internal.js +1 -1
  86. package/dist/internal.js.map +1 -1
  87. package/dist/llm/plugin-facade.js +8668 -3644
  88. package/dist/llm/plugin-facade.js.map +3 -3
  89. package/dist/nexus/projects-clean.d.ts +3 -0
  90. package/dist/nexus/projects-clean.d.ts.map +1 -1
  91. package/dist/nexus/projects-clean.js +9 -3
  92. package/dist/nexus/projects-clean.js.map +1 -1
  93. package/dist/nexus/registry-roots.d.ts +3 -1
  94. package/dist/nexus/registry-roots.d.ts.map +1 -1
  95. package/dist/nexus/registry-roots.js +5 -2
  96. package/dist/nexus/registry-roots.js.map +1 -1
  97. package/dist/nexus/registry.d.ts +8 -1
  98. package/dist/nexus/registry.d.ts.map +1 -1
  99. package/dist/nexus/registry.js +24 -10
  100. package/dist/nexus/registry.js.map +1 -1
  101. package/dist/nexus/workspace.d.ts +4 -1
  102. package/dist/nexus/workspace.d.ts.map +1 -1
  103. package/dist/nexus/workspace.js +10 -4
  104. package/dist/nexus/workspace.js.map +1 -1
  105. package/dist/orchestrate/spawn-ops.d.ts.map +1 -1
  106. package/dist/orchestrate/spawn-ops.js +7 -2
  107. package/dist/orchestrate/spawn-ops.js.map +1 -1
  108. package/dist/orchestrate/worker-verify.d.ts +121 -12
  109. package/dist/orchestrate/worker-verify.d.ts.map +1 -1
  110. package/dist/orchestrate/worker-verify.js +172 -21
  111. package/dist/orchestrate/worker-verify.js.map +1 -1
  112. package/dist/orchestration/spawn-prompt.d.ts.map +1 -1
  113. package/dist/orchestration/spawn-prompt.js +15 -9
  114. package/dist/orchestration/spawn-prompt.js.map +1 -1
  115. package/dist/release/ci-evidence.d.ts +9 -0
  116. package/dist/release/ci-evidence.d.ts.map +1 -1
  117. package/dist/release/ci-evidence.js +9 -2
  118. package/dist/release/ci-evidence.js.map +1 -1
  119. package/dist/resources/backend.d.ts +15 -3
  120. package/dist/resources/backend.d.ts.map +1 -1
  121. package/dist/resources/backend.js +7 -3
  122. package/dist/resources/backend.js.map +1 -1
  123. package/dist/resources/darwin-backend.d.ts +142 -0
  124. package/dist/resources/darwin-backend.d.ts.map +1 -0
  125. package/dist/resources/darwin-backend.js +288 -0
  126. package/dist/resources/darwin-backend.js.map +1 -0
  127. package/dist/resources/governor.d.ts +44 -1
  128. package/dist/resources/governor.d.ts.map +1 -1
  129. package/dist/resources/governor.js +100 -36
  130. package/dist/resources/governor.js.map +1 -1
  131. package/dist/resources/heavy-command.d.ts +132 -0
  132. package/dist/resources/heavy-command.d.ts.map +1 -0
  133. package/dist/resources/heavy-command.js +768 -0
  134. package/dist/resources/heavy-command.js.map +1 -0
  135. package/dist/resources/monitor.d.ts +50 -1
  136. package/dist/resources/monitor.d.ts.map +1 -1
  137. package/dist/resources/monitor.js +83 -1
  138. package/dist/resources/monitor.js.map +1 -1
  139. package/dist/resources/run-admission.d.ts +303 -0
  140. package/dist/resources/run-admission.d.ts.map +1 -0
  141. package/dist/resources/run-admission.js +648 -0
  142. package/dist/resources/run-admission.js.map +1 -0
  143. package/dist/resources/run-class.d.ts +111 -0
  144. package/dist/resources/run-class.d.ts.map +1 -0
  145. package/dist/resources/run-class.js +658 -0
  146. package/dist/resources/run-class.js.map +1 -0
  147. package/dist/resources/run-governed.d.ts +158 -0
  148. package/dist/resources/run-governed.d.ts.map +1 -0
  149. package/dist/resources/run-governed.js +406 -0
  150. package/dist/resources/run-governed.js.map +1 -0
  151. package/dist/resources/slot-holder.d.ts +267 -0
  152. package/dist/resources/slot-holder.d.ts.map +1 -0
  153. package/dist/resources/slot-holder.js +505 -0
  154. package/dist/resources/slot-holder.js.map +1 -0
  155. package/dist/resources/tool-groups.d.ts +74 -0
  156. package/dist/resources/tool-groups.d.ts.map +1 -0
  157. package/dist/resources/tool-groups.js +118 -0
  158. package/dist/resources/tool-groups.js.map +1 -0
  159. package/dist/routing/build-command-groups.d.ts.map +1 -1
  160. package/dist/routing/build-command-groups.js +1 -0
  161. package/dist/routing/build-command-groups.js.map +1 -1
  162. package/dist/selfimprove/fix-gen.js +8676 -3652
  163. package/dist/selfimprove/fix-gen.js.map +3 -3
  164. package/dist/sentient/cross-project-hygiene.d.ts +3 -2
  165. package/dist/sentient/cross-project-hygiene.d.ts.map +1 -1
  166. package/dist/sentient/cross-project-hygiene.js +5 -2
  167. package/dist/sentient/cross-project-hygiene.js.map +1 -1
  168. package/dist/sentient/state.d.ts +7 -0
  169. package/dist/sentient/state.d.ts.map +1 -1
  170. package/dist/sentient/state.js.map +1 -1
  171. package/dist/sentient/tick.d.ts +14 -2
  172. package/dist/sentient/tick.d.ts.map +1 -1
  173. package/dist/sentient/tick.js +63 -4
  174. package/dist/sentient/tick.js.map +1 -1
  175. package/dist/setup/sections/nexus-account.d.ts +8 -6
  176. package/dist/setup/sections/nexus-account.d.ts.map +1 -1
  177. package/dist/setup/sections/nexus-account.js +53 -9
  178. package/dist/setup/sections/nexus-account.js.map +1 -1
  179. package/dist/store/backup-recover.d.ts.map +1 -1
  180. package/dist/store/backup-recover.js +5 -0
  181. package/dist/store/backup-recover.js.map +1 -1
  182. package/dist/store/data-accessor.d.ts +1 -0
  183. package/dist/store/data-accessor.d.ts.map +1 -1
  184. package/dist/store/data-accessor.js +7 -0
  185. package/dist/store/data-accessor.js.map +1 -1
  186. package/dist/store/dual-scope-db.d.ts +23 -1
  187. package/dist/store/dual-scope-db.d.ts.map +1 -1
  188. package/dist/store/dual-scope-db.js +126 -36
  189. package/dist/store/dual-scope-db.js.map +1 -1
  190. package/dist/store/exodus/recovery.d.ts.map +1 -1
  191. package/dist/store/exodus/recovery.js +15 -0
  192. package/dist/store/exodus/recovery.js.map +1 -1
  193. package/dist/store/legacy-tasks-lineage.d.ts.map +1 -1
  194. package/dist/store/legacy-tasks-lineage.js +5 -0
  195. package/dist/store/legacy-tasks-lineage.js.map +1 -1
  196. package/dist/store/lock.d.ts +8 -1
  197. package/dist/store/lock.d.ts.map +1 -1
  198. package/dist/store/lock.js +10 -2
  199. package/dist/store/lock.js.map +1 -1
  200. package/dist/store/migration-manager.d.ts +5 -0
  201. package/dist/store/migration-manager.d.ts.map +1 -1
  202. package/dist/store/migration-manager.js +11 -0
  203. package/dist/store/migration-manager.js.map +1 -1
  204. package/dist/store/migration-runner.d.ts +158 -0
  205. package/dist/store/migration-runner.d.ts.map +1 -0
  206. package/dist/store/migration-runner.js +493 -0
  207. package/dist/store/migration-runner.js.map +1 -0
  208. package/dist/store/portable-bundle-import.d.ts +15 -1
  209. package/dist/store/portable-bundle-import.d.ts.map +1 -1
  210. package/dist/store/portable-bundle-import.js +24 -4
  211. package/dist/store/portable-bundle-import.js.map +1 -1
  212. package/dist/store/portable-bundle-relocate.d.ts +43 -0
  213. package/dist/store/portable-bundle-relocate.d.ts.map +1 -1
  214. package/dist/store/portable-bundle-relocate.js +79 -5
  215. package/dist/store/portable-bundle-relocate.js.map +1 -1
  216. package/dist/store/portable-bundle-scan.d.ts +20 -0
  217. package/dist/store/portable-bundle-scan.d.ts.map +1 -1
  218. package/dist/store/portable-bundle-scan.js +38 -3
  219. package/dist/store/portable-bundle-scan.js.map +1 -1
  220. package/dist/store/portable-bundle.d.ts +33 -0
  221. package/dist/store/portable-bundle.d.ts.map +1 -1
  222. package/dist/store/portable-bundle.js +34 -7
  223. package/dist/store/portable-bundle.js.map +1 -1
  224. package/dist/store/row-identity-registry.d.ts +137 -7
  225. package/dist/store/row-identity-registry.d.ts.map +1 -1
  226. package/dist/store/row-identity-registry.js +364 -9
  227. package/dist/store/row-identity-registry.js.map +1 -1
  228. package/dist/store/row-identity.d.ts.map +1 -1
  229. package/dist/store/row-identity.js +9 -10
  230. package/dist/store/row-identity.js.map +1 -1
  231. package/dist/store/sqlite-data-accessor.d.ts.map +1 -1
  232. package/dist/store/sqlite-data-accessor.js +10 -0
  233. package/dist/store/sqlite-data-accessor.js.map +1 -1
  234. package/dist/store/sqlite.d.ts +31 -0
  235. package/dist/store/sqlite.d.ts.map +1 -1
  236. package/dist/store/sqlite.js +5 -1
  237. package/dist/store/sqlite.js.map +1 -1
  238. package/dist/store/sync/capture.d.ts +203 -0
  239. package/dist/store/sync/capture.d.ts.map +1 -0
  240. package/dist/store/sync/capture.js +562 -0
  241. package/dist/store/sync/capture.js.map +1 -0
  242. package/dist/store/sync/clock-store.d.ts.map +1 -1
  243. package/dist/store/sync/clock-store.js +2 -0
  244. package/dist/store/sync/clock-store.js.map +1 -1
  245. package/dist/store/sync/fk-orphans.d.ts +133 -0
  246. package/dist/store/sync/fk-orphans.d.ts.map +1 -0
  247. package/dist/store/sync/fk-orphans.js +265 -0
  248. package/dist/store/sync/fk-orphans.js.map +1 -0
  249. package/dist/store/sync/flags.d.ts +7 -0
  250. package/dist/store/sync/flags.d.ts.map +1 -1
  251. package/dist/store/sync/flags.js +16 -0
  252. package/dist/store/sync/flags.js.map +1 -1
  253. package/dist/store/sync/hlc.d.ts.map +1 -1
  254. package/dist/store/sync/hlc.js +4 -0
  255. package/dist/store/sync/hlc.js.map +1 -1
  256. package/dist/store/sync/identity-fill.d.ts +45 -0
  257. package/dist/store/sync/identity-fill.d.ts.map +1 -0
  258. package/dist/store/sync/identity-fill.js +85 -0
  259. package/dist/store/sync/identity-fill.js.map +1 -0
  260. package/dist/store/sync/machinery.d.ts +27 -0
  261. package/dist/store/sync/machinery.d.ts.map +1 -0
  262. package/dist/store/sync/machinery.js +44 -0
  263. package/dist/store/sync/machinery.js.map +1 -0
  264. package/dist/store/sync/netting.d.ts +120 -0
  265. package/dist/store/sync/netting.d.ts.map +1 -0
  266. package/dist/store/sync/netting.js +336 -0
  267. package/dist/store/sync/netting.js.map +1 -0
  268. package/dist/store/sync/replica.d.ts +59 -3
  269. package/dist/store/sync/replica.d.ts.map +1 -1
  270. package/dist/store/sync/replica.js +84 -3
  271. package/dist/store/sync/replica.js.map +1 -1
  272. package/dist/store/sync/schema.d.ts +18 -3
  273. package/dist/store/sync/schema.d.ts.map +1 -1
  274. package/dist/store/sync/schema.js +27 -3
  275. package/dist/store/sync/schema.js.map +1 -1
  276. package/dist/store/sync/seal-backlog.d.ts +21 -0
  277. package/dist/store/sync/seal-backlog.d.ts.map +1 -0
  278. package/dist/store/sync/seal-backlog.js +24 -0
  279. package/dist/store/sync/seal-backlog.js.map +1 -0
  280. package/dist/store/sync/sealer-values.d.ts +34 -0
  281. package/dist/store/sync/sealer-values.d.ts.map +1 -0
  282. package/dist/store/sync/sealer-values.js +53 -0
  283. package/dist/store/sync/sealer-values.js.map +1 -0
  284. package/dist/store/sync/sealer.d.ts +145 -0
  285. package/dist/store/sync/sealer.d.ts.map +1 -0
  286. package/dist/store/sync/sealer.js +906 -0
  287. package/dist/store/sync/sealer.js.map +1 -0
  288. package/dist/store/sync/structural.d.ts +63 -0
  289. package/dist/store/sync/structural.d.ts.map +1 -0
  290. package/dist/store/sync/structural.js +180 -0
  291. package/dist/store/sync/structural.js.map +1 -0
  292. package/dist/store/sync/timestamps.d.ts +92 -0
  293. package/dist/store/sync/timestamps.d.ts.map +1 -0
  294. package/dist/store/sync/timestamps.js +228 -0
  295. package/dist/store/sync/timestamps.js.map +1 -0
  296. package/dist/store/sync/tombstones.d.ts +75 -0
  297. package/dist/store/sync/tombstones.d.ts.map +1 -0
  298. package/dist/store/sync/tombstones.js +103 -0
  299. package/dist/store/sync/tombstones.js.map +1 -0
  300. package/dist/store/sync/trigger-classes.d.ts +221 -0
  301. package/dist/store/sync/trigger-classes.d.ts.map +1 -0
  302. package/dist/store/sync/trigger-classes.js +441 -0
  303. package/dist/store/sync/trigger-classes.js.map +1 -0
  304. package/dist/store/sync/trigger-suspend-at-path.d.ts +23 -0
  305. package/dist/store/sync/trigger-suspend-at-path.d.ts.map +1 -0
  306. package/dist/store/sync/trigger-suspend-at-path.js +44 -0
  307. package/dist/store/sync/trigger-suspend-at-path.js.map +1 -0
  308. package/dist/store/sync/writer-version.d.ts +43 -0
  309. package/dist/store/sync/writer-version.d.ts.map +1 -0
  310. package/dist/store/sync/writer-version.js +90 -0
  311. package/dist/store/sync/writer-version.js.map +1 -0
  312. package/dist/store/table-classification.d.ts.map +1 -1
  313. package/dist/store/table-classification.js +102 -0
  314. package/dist/store/table-classification.js.map +1 -1
  315. package/dist/store/trigger-suspend-schema.d.ts +44 -0
  316. package/dist/store/trigger-suspend-schema.d.ts.map +1 -0
  317. package/dist/store/trigger-suspend-schema.js +25 -0
  318. package/dist/store/trigger-suspend-schema.js.map +1 -0
  319. package/dist/store/vault-manifest.d.ts +365 -0
  320. package/dist/store/vault-manifest.d.ts.map +1 -0
  321. package/dist/store/vault-manifest.js +812 -0
  322. package/dist/store/vault-manifest.js.map +1 -0
  323. package/dist/store/writer-lease.d.ts +31 -0
  324. package/dist/store/writer-lease.d.ts.map +1 -1
  325. package/dist/store/writer-lease.js +65 -2
  326. package/dist/store/writer-lease.js.map +1 -1
  327. package/dist/system/health.d.ts.map +1 -1
  328. package/dist/system/health.js +21 -0
  329. package/dist/system/health.js.map +1 -1
  330. package/dist/system/project-health.d.ts.map +1 -1
  331. package/dist/system/project-health.js +3 -1
  332. package/dist/system/project-health.js.map +1 -1
  333. package/dist/tasks/affected-packages.d.ts +58 -0
  334. package/dist/tasks/affected-packages.d.ts.map +1 -1
  335. package/dist/tasks/affected-packages.js +75 -6
  336. package/dist/tasks/affected-packages.js.map +1 -1
  337. package/dist/tasks/affected-scope.d.ts +150 -23
  338. package/dist/tasks/affected-scope.d.ts.map +1 -1
  339. package/dist/tasks/affected-scope.js +320 -32
  340. package/dist/tasks/affected-scope.js.map +1 -1
  341. package/dist/tasks/change-set.d.ts +96 -0
  342. package/dist/tasks/change-set.d.ts.map +1 -1
  343. package/dist/tasks/change-set.js +169 -4
  344. package/dist/tasks/change-set.js.map +1 -1
  345. package/dist/tasks/complete-ci.d.ts +115 -0
  346. package/dist/tasks/complete-ci.d.ts.map +1 -0
  347. package/dist/tasks/complete-ci.js +171 -0
  348. package/dist/tasks/complete-ci.js.map +1 -0
  349. package/dist/tasks/complete.d.ts.map +1 -1
  350. package/dist/tasks/complete.js +50 -17
  351. package/dist/tasks/complete.js.map +1 -1
  352. package/dist/tasks/compute-task-view.d.ts.map +1 -1
  353. package/dist/tasks/compute-task-view.js +7 -0
  354. package/dist/tasks/compute-task-view.js.map +1 -1
  355. package/dist/tasks/done-plan.d.ts.map +1 -1
  356. package/dist/tasks/done-plan.js +51 -30
  357. package/dist/tasks/done-plan.js.map +1 -1
  358. package/dist/tasks/done-record.d.ts +6 -0
  359. package/dist/tasks/done-record.d.ts.map +1 -1
  360. package/dist/tasks/done-record.js +9 -3
  361. package/dist/tasks/done-record.js.map +1 -1
  362. package/dist/tasks/evidence.d.ts +3 -2
  363. package/dist/tasks/evidence.d.ts.map +1 -1
  364. package/dist/tasks/evidence.js +143 -12
  365. package/dist/tasks/evidence.js.map +1 -1
  366. package/dist/tasks/gate-notes.d.ts +22 -0
  367. package/dist/tasks/gate-notes.d.ts.map +1 -0
  368. package/dist/tasks/gate-notes.js +33 -0
  369. package/dist/tasks/gate-notes.js.map +1 -0
  370. package/dist/tasks/index.d.ts +2 -1
  371. package/dist/tasks/index.d.ts.map +1 -1
  372. package/dist/tasks/index.js +2 -1
  373. package/dist/tasks/index.js.map +1 -1
  374. package/dist/tasks/test-run-binding.d.ts +117 -0
  375. package/dist/tasks/test-run-binding.d.ts.map +1 -0
  376. package/dist/tasks/test-run-binding.js +365 -0
  377. package/dist/tasks/test-run-binding.js.map +1 -0
  378. package/dist/tasks/tool-cache-env.d.ts +123 -0
  379. package/dist/tasks/tool-cache-env.d.ts.map +1 -0
  380. package/dist/tasks/tool-cache-env.js +287 -0
  381. package/dist/tasks/tool-cache-env.js.map +1 -0
  382. package/dist/tasks/tool-cache-failed-first.d.ts +155 -0
  383. package/dist/tasks/tool-cache-failed-first.d.ts.map +1 -0
  384. package/dist/tasks/tool-cache-failed-first.js +285 -0
  385. package/dist/tasks/tool-cache-failed-first.js.map +1 -0
  386. package/dist/tasks/tool-cache.d.ts +375 -55
  387. package/dist/tasks/tool-cache.d.ts.map +1 -1
  388. package/dist/tasks/tool-cache.js +912 -303
  389. package/dist/tasks/tool-cache.js.map +1 -1
  390. package/dist/tasks/tool-resolver.d.ts +4 -3
  391. package/dist/tasks/tool-resolver.d.ts.map +1 -1
  392. package/dist/tasks/tool-resolver.js +15 -4
  393. package/dist/tasks/tool-resolver.js.map +1 -1
  394. package/dist/tasks/tool-semaphore.d.ts +67 -7
  395. package/dist/tasks/tool-semaphore.d.ts.map +1 -1
  396. package/dist/tasks/tool-semaphore.js +134 -56
  397. package/dist/tasks/tool-semaphore.js.map +1 -1
  398. package/dist/upgrade.d.ts.map +1 -1
  399. package/dist/upgrade.js +4 -0
  400. package/dist/upgrade.js.map +1 -1
  401. package/dist/validation/engine-ops.d.ts +6 -0
  402. package/dist/validation/engine-ops.d.ts.map +1 -1
  403. package/dist/validation/engine-ops.js +8 -0
  404. package/dist/validation/engine-ops.js.map +1 -1
  405. package/migrations/drizzle-cleo-project/20260930170000_t12819-trigger-suspend-clause/migration.sql +367 -0
  406. package/migrations/sync-journal/20260930120000_t12343-capture/migration.sql +47 -0
  407. package/migrations/sync-journal/20261001170000_t12984-sealer/migration.sql +101 -0
  408. package/package.json +13 -13
  409. package/templates/CLEO-INJECTION.md +5 -5
  410. package/templates/CLEO-REFERENCE.md +8 -4
@@ -0,0 +1,277 @@
1
+ /**
2
+ * The vault's connection and keys: a read-write device connection, the
3
+ * account master key, this device's certificate, and the stream data keys.
4
+ *
5
+ * Owner decision (2026-10-01): adding a device needs only `cleo login` and
6
+ * the one-time browser approval; that approval also hands the device the
7
+ * encryption key. So the account master key (MK) is escrowed on Cleo Nexus:
8
+ *
9
+ * 1. `GET /v1/account/keys/escrow` returns MK sealed to this device's X25519
10
+ * key (`sealTo`), released only to an approved, active device. The client
11
+ * opens it with the device's private key and checks it against the
12
+ * escrow's verifier.
13
+ * 2. No escrow and no account keys: this is the account's first vault use.
14
+ * The client mints MK and escrows it (`PUT`, insert-only). A concurrent
15
+ * first device loses the insert with 409 and reads the winner's key.
16
+ * 3. The device certifies itself under MK (a self-grant, `PUT
17
+ * /v1/devices/:id/key`), so other devices can verify its snapshots.
18
+ * 4. Signer trust comes from `certifiedSigners` over `GET /v1/devices/trust`,
19
+ * with the trust state persisted in {@link NexusVaultState}.
20
+ *
21
+ * Threat model (cleo-nexus T082): the escrow `PUT` sends MK to the server
22
+ * over TLS, and the server stores it encrypted under a server-held key
23
+ * (`KEY_ESCROW_SECRET`). Snapshots are therefore encrypted at rest with keys
24
+ * Cleo Nexus can recover: this is server-escrowed encryption, not
25
+ * zero-knowledge end-to-end encryption. What the escrow does guarantee is
26
+ * that MK is released only to an approved, active device of the account,
27
+ * sealed to that device's key.
28
+ *
29
+ * A project's data key (PDK) is minted by its first pusher and stored
30
+ * wrapped by MK (`PUT /v1/projects/:id/keys/:userId`); the home stream key
31
+ * is derived from MK.
32
+ *
33
+ * No function here logs a key, and no error carries one.
34
+ *
35
+ * @task T12336
36
+ * @epic T12322
37
+ */
38
+ import { nexusProjectKeysSchema, nexusUserKeysSchema } from '@cleocode/contracts';
39
+ import { DeviceTrust as DeviceTrustSchema, KeyEscrowGrant, PutKeyEscrowResult, } from '@cleocode/contracts/cloud';
40
+ import { z } from 'zod';
41
+ import { openSealed, randomKey } from './crypto.js';
42
+ import { Http, NexusError } from './http.js';
43
+ import { certifiedSigners, createDeviceGrant, homeStreamKey, masterKeyVerifier, newProjectKey, unwrapProjectKey, wrapProjectKey, } from './keys.js';
44
+ import { NexusAccountError, resolveNexusApiUrl } from './nexus-auth.js';
45
+ import { assertNexusCloudDeviceMode, NEXUS_CLOUD_TIMEOUT_MS, nexusCredentialWarnings, } from './nexus-cloud.js';
46
+ import { ensureNexusDeviceCredential, nexusApiErrorToAccountError } from './nexus-enrol.js';
47
+ import { NexusVaultState } from './nexus-vault-state.js';
48
+ /** Timeout of a snapshot blob upload or download. */
49
+ export const NEXUS_VAULT_BLOB_TIMEOUT_MS = 10 * 60_000;
50
+ /** The sealed-box context of an escrow release (must match the server, cleo-nexus T082). */
51
+ export const escrowContext = (userId, deviceId) => `cleo-nexus/escrow/v1:${userId}:${deviceId}`;
52
+ const b64 = (s) => Buffer.from(s, 'base64');
53
+ function keyPairOf(kp) {
54
+ return { publicKey: b64(kp.publicKey), privateKey: b64(kp.privateKey) };
55
+ }
56
+ /**
57
+ * Open a read-write vault connection with this machine's device credential.
58
+ *
59
+ * @param opts - API URL, account, stores and test overrides.
60
+ * @returns The connection.
61
+ * @throws {NexusAccountError} Not signed in, device mode off, or no device keys.
62
+ */
63
+ export async function connectNexusVault(opts = {}) {
64
+ assertNexusCloudDeviceMode();
65
+ const apiUrl = resolveNexusApiUrl(opts.apiUrl);
66
+ const handle = await ensureNexusDeviceCredential({ ...opts, apiUrl });
67
+ const device = handle.device;
68
+ const bearer = device.currentBearer();
69
+ if (bearer === null) {
70
+ throw new NexusAccountError('E_NEXUS_NOT_SIGNED_IN', `not signed in to Cleo Nexus at ${apiUrl}`, 'run `cleo login nexus`');
71
+ }
72
+ const entryKeys = device.unseal().keys;
73
+ if (entryKeys === null) {
74
+ throw new NexusAccountError('E_NEXUS_VAULT_KEY_UNAVAILABLE', 'this device has no key pair (it was enrolled before device keys existed)', 'run `cleo logout nexus --revoke` and then `cleo login nexus` to enrol it again');
75
+ }
76
+ const base = opts.fetch ?? ((input, init) => globalThis.fetch(input, init));
77
+ const timeoutMs = opts.timeoutMs ?? NEXUS_CLOUD_TIMEOUT_MS;
78
+ const blobTimeoutMs = opts.blobTimeoutMs ?? NEXUS_VAULT_BLOB_TIMEOUT_MS;
79
+ const http = new Http({
80
+ baseUrl: apiUrl,
81
+ token: bearer,
82
+ deviceId: device.deviceId,
83
+ fetch: (input, init) => base(input, { ...init, signal: AbortSignal.timeout(timeoutMs) }),
84
+ maxAttempts: 2,
85
+ });
86
+ const raw = (method, path, schema, body) => http.request(method, path, schema, body);
87
+ return {
88
+ apiUrl,
89
+ userId: device.userId,
90
+ deviceId: device.deviceId,
91
+ device,
92
+ keys: { encryption: keyPairOf(entryKeys.encryption), signing: keyPairOf(entryKeys.signing) },
93
+ http,
94
+ blobFetch: (input, init) => base(input, { ...init, signal: AbortSignal.timeout(blobTimeoutMs) }),
95
+ state: opts.vaultState ?? new NexusVaultState(),
96
+ warnings: nexusCredentialWarnings(handle.warnings),
97
+ raw,
98
+ async call(method, path, schema, body) {
99
+ try {
100
+ return await raw(method, path, schema, body);
101
+ }
102
+ catch (err) {
103
+ throw nexusApiErrorToAccountError(err);
104
+ }
105
+ },
106
+ async find(path, schema) {
107
+ try {
108
+ return await raw('GET', path, schema);
109
+ }
110
+ catch (err) {
111
+ if (err instanceof NexusError && err.status === 404)
112
+ return null;
113
+ throw nexusApiErrorToAccountError(err);
114
+ }
115
+ },
116
+ };
117
+ }
118
+ const isConflict = (err, reason) => err instanceof NexusError &&
119
+ err.status === 409 &&
120
+ (reason === undefined || err.details?.['reason'] === reason);
121
+ function keyUnavailable(message, fix) {
122
+ return new NexusAccountError('E_NEXUS_VAULT_KEY_UNAVAILABLE', message, fix);
123
+ }
124
+ async function openEscrow(conn) {
125
+ const grant = await conn.find('/v1/account/keys/escrow', KeyEscrowGrant);
126
+ if (grant === null)
127
+ return null;
128
+ if (grant.deviceId !== conn.deviceId) {
129
+ throw keyUnavailable('the server released the account key to another device id');
130
+ }
131
+ let mk;
132
+ try {
133
+ mk = openSealed(conn.keys.encryption, b64(grant.sealedMasterKey), escrowContext(conn.userId, conn.deviceId));
134
+ }
135
+ catch {
136
+ throw keyUnavailable('the escrowed account key does not open with this device key', 'run `cleo logout nexus --revoke` and `cleo login nexus` to enrol this machine again');
137
+ }
138
+ if (mk.length !== 32 || masterKeyVerifier(mk) !== grant.masterKeyVerifier) {
139
+ throw keyUnavailable('the escrowed account key does not match its verifier');
140
+ }
141
+ return { mk, kv: grant.keyVersion };
142
+ }
143
+ async function mintEscrow(conn) {
144
+ const existing = await conn.find('/v1/account/keys', nexusUserKeysSchema);
145
+ if (existing !== null) {
146
+ throw keyUnavailable('this account has an encryption key that is not escrowed, so it cannot be handed to this device', 'run `cleo cloud push` once on a device that already holds the key, so it escrows it');
147
+ }
148
+ const mk = randomKey();
149
+ try {
150
+ await conn.raw('PUT', '/v1/account/keys/escrow', PutKeyEscrowResult, {
151
+ masterKey: mk.toString('base64url'),
152
+ keyVersion: 1,
153
+ masterKeyVerifier: masterKeyVerifier(mk),
154
+ });
155
+ return { mk, kv: 1 };
156
+ }
157
+ catch (err) {
158
+ if (!isConflict(err))
159
+ throw nexusApiErrorToAccountError(err);
160
+ // Another device escrowed first: use its key.
161
+ const won = await openEscrow(conn);
162
+ if (won === null)
163
+ throw keyUnavailable('the account key was escrowed concurrently but is not readable');
164
+ return won;
165
+ }
166
+ }
167
+ async function ensureCertified(conn, mk, kv) {
168
+ const trust = await conn.call('GET', '/v1/devices/trust', DeviceTrustSchema);
169
+ const mine = conn.keys.signing.publicKey.toString('base64');
170
+ const certified = trust.certificates.some((c) => c.deviceId === conn.deviceId && c.keyVersion === kv && c.signingPublicKey === mine && c.live);
171
+ if (certified)
172
+ return trust;
173
+ const grant = createDeviceGrant({
174
+ masterKey: mk,
175
+ userId: conn.userId,
176
+ keyVersion: kv,
177
+ recipient: {
178
+ deviceId: conn.deviceId,
179
+ encryptionPublicKey: conn.keys.encryption.publicKey,
180
+ signingPublicKey: conn.keys.signing.publicKey,
181
+ },
182
+ signer: { deviceId: conn.deviceId, signing: conn.keys.signing },
183
+ });
184
+ await conn.call('PUT', `/v1/devices/${encodeURIComponent(conn.deviceId)}/key`, z.looseObject({}), grant);
185
+ return conn.call('GET', '/v1/devices/trust', DeviceTrustSchema);
186
+ }
187
+ /**
188
+ * Get the account master key for this device, minting and escrowing it on
189
+ * the account's first vault use, and certify this device under it.
190
+ *
191
+ * @param conn - A vault connection.
192
+ * @param opts - `readOnly`: never mint, escrow or certify (GET only); a missing escrow is
193
+ * `E_NEXUS_VAULT_EMPTY`.
194
+ * @returns The key, its version and the trusted signers.
195
+ * @throws {NexusAccountError} `E_NEXUS_VAULT_KEY_UNAVAILABLE` when the key
196
+ * cannot be obtained or verified; a mapped API error otherwise.
197
+ */
198
+ export async function unlockNexusAccountKey(conn, opts = {}) {
199
+ const escrowed = await openEscrow(conn);
200
+ if (escrowed === null && opts.readOnly === true) {
201
+ // Nothing was ever pushed from any device: a read has nothing to read, and
202
+ // must not mint the account key as a side effect.
203
+ throw new NexusAccountError('E_NEXUS_VAULT_EMPTY', 'the cloud vault is empty: no device has pushed a snapshot to this account yet', 'run `cleo cloud push` on a device that has the data');
204
+ }
205
+ const unlocked = escrowed ?? (await mintEscrow(conn));
206
+ const trust = opts.readOnly === true
207
+ ? await conn.call('GET', '/v1/devices/trust', DeviceTrustSchema)
208
+ : await ensureCertified(conn, unlocked.mk, unlocked.kv);
209
+ // Read, evaluate and persist the trust state under one lock, so two
210
+ // concurrent commands cannot interleave and lose a narrowed pin.
211
+ const evaluation = conn.state.updateTrust(conn.apiUrl, conn.userId, (current) => {
212
+ const e = certifiedSigners(new Map([[unlocked.kv, unlocked.mk]]), conn.userId, trust, current, unlocked.kv);
213
+ return { trust: e.keyRotated || e.serverError ? current : e.state, result: e };
214
+ });
215
+ if (evaluation.keyRotated || evaluation.serverError) {
216
+ throw keyUnavailable(evaluation.keyRotated
217
+ ? 'the account key was rotated and this device does not hold the new one'
218
+ : 'the server declared an account key version no rotation explains');
219
+ }
220
+ return { masterKey: unlocked.mk, keyVersion: unlocked.kv, signers: evaluation.signers };
221
+ }
222
+ /**
223
+ * The data key of a project stream: unwrap the newest wrapped key, or mint
224
+ * and store one when the project has none yet (its first push).
225
+ *
226
+ * @param conn - A vault connection.
227
+ * @param mk - The unlocked master key.
228
+ * @param projectId - The server's project id.
229
+ * @param mint - Whether a missing key may be created (push: yes; restore: no).
230
+ * @returns The project data key, or `null` when none exists and `mint` is false.
231
+ */
232
+ export async function nexusProjectDataKey(conn, mk, projectId, mint) {
233
+ const path = `/v1/projects/${encodeURIComponent(projectId)}/keys`;
234
+ const read = async () => {
235
+ const list = await conn.find(path, nexusProjectKeysSchema);
236
+ const newest = list?.keys[0];
237
+ if (!newest)
238
+ return null;
239
+ try {
240
+ return unwrapProjectKey(mk, newest.wrappedProjectKey, projectId, newest.keyVersion);
241
+ }
242
+ catch {
243
+ throw keyUnavailable(`the project key of ${projectId} does not open with this account's key`);
244
+ }
245
+ };
246
+ const have = await read();
247
+ if (have !== null || !mint)
248
+ return have;
249
+ const pdk = newProjectKey();
250
+ try {
251
+ await conn.raw('PUT', `${path}/${encodeURIComponent(conn.userId)}`, z.looseObject({}), {
252
+ wrappedProjectKey: wrapProjectKey(mk, pdk, projectId, 1),
253
+ keyVersion: 1,
254
+ });
255
+ return pdk;
256
+ }
257
+ catch (err) {
258
+ if (!isConflict(err))
259
+ throw nexusApiErrorToAccountError(err);
260
+ const won = await read();
261
+ if (won === null)
262
+ throw keyUnavailable(`the project key of ${projectId} is not readable`);
263
+ return won;
264
+ }
265
+ }
266
+ /**
267
+ * The data key of the account's `home:` stream (derived from MK, never stored).
268
+ *
269
+ * @param mk - The unlocked master key.
270
+ * @returns The home stream key.
271
+ */
272
+ export function nexusHomeDataKey(mk) {
273
+ return homeStreamKey(mk);
274
+ }
275
+ /** Re-export for callers that only need the URL resolver. */
276
+ export { resolveNexusApiUrl };
277
+ //# sourceMappingURL=nexus-vault-keys.js.map
@@ -0,0 +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xC,MAAM,GAAG,GAAG,aAAa,EAAE,CAAC;IAC5B,IAAI,CAAC;QACH,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,IAAI,IAAI,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE;YACrF,iBAAiB,EAAE,cAAc,CAAC,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CAAC;YACxD,UAAU,EAAE,CAAC;SACd,CAAC,CAAC;QACH,OAAO,GAAG,CAAC;IACb,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,MAAM,2BAA2B,CAAC,GAAG,CAAC,CAAC;QAC7D,MAAM,GAAG,GAAG,MAAM,IAAI,EAAE,CAAC;QACzB,IAAI,GAAG,KAAK,IAAI;YAAE,MAAM,cAAc,CAAC,sBAAsB,SAAS,kBAAkB,CAAC,CAAC;QAC1F,OAAO,GAAG,CAAC;IACb,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAAU;IACzC,OAAO,aAAa,CAAC,EAAE,CAAC,CAAC;AAC3B,CAAC;AAED,6DAA6D;AAC7D,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
@@ -0,0 +1,121 @@
1
+ /**
2
+ * This machine's cloud vault state (`<cleoHome>/nexus-vault.json`):
3
+ * secret-free, machine-local bookkeeping the vault needs between runs.
4
+ *
5
+ * - Per account: the signer {@link TrustState} learned from
6
+ * `certifiedSigners` (trust only tightens, so it must survive restarts).
7
+ * - Per (stream, local store): the snapshot this store last pushed or
8
+ * restored, which decides "behind" (another device pushed since) and
9
+ * "pending changes" (this store changed since).
10
+ *
11
+ * Every read-modify-write runs under a lock file and writes atomically (temp
12
+ * file + rename). A file this version cannot read (truncated, invalid, or
13
+ * written by a newer CLEO) is moved aside with a warning, never reset in
14
+ * place, so a downgrade or a torn write cannot silently discard the signer
15
+ * pins. Nothing here is secret: keys and tokens stay in the sealed device
16
+ * store.
17
+ *
18
+ * @task T12336
19
+ * @epic T12322
20
+ */
21
+ import type { CloudWarning } from '@cleocode/contracts';
22
+ import { z } from 'zod';
23
+ import { type TrustState } from './keys.js';
24
+ declare const streamStateSchema: z.ZodObject<{
25
+ /** The snapshot this store last pushed or restored. */
26
+ lastCheckpointId: z.ZodNullable<z.ZodString>;
27
+ /** Its coversSeq: an older snapshot is never restored over it without `--checkpoint`. */
28
+ lastCoversSeq: z.ZodNumber;
29
+ updatedAt: z.ZodString;
30
+ /**
31
+ * A push from this store that had not recorded its snapshot yet: the parent it
32
+ * pushed over (T13007). Cleared when the snapshot is recorded.
33
+ */
34
+ pushInFlight: z.ZodOptional<z.ZodObject<{
35
+ parentCheckpointId: z.ZodNullable<z.ZodString>;
36
+ at: z.ZodString;
37
+ gitTracked: z.ZodOptional<z.ZodArray<z.ZodString>>;
38
+ files: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
39
+ }, z.core.$strip>>;
40
+ /**
41
+ * Paths (relative to the section root) the last synced snapshot marks as
42
+ * git-tracked: git's job, so they are left out of every file comparison
43
+ * with it, and a machine without git carries the marks on (T13019).
44
+ */
45
+ gitTracked: z.ZodOptional<z.ZodArray<z.ZodString>>;
46
+ /**
47
+ * The last synced snapshot's plain files, path to digest (a prefix of the
48
+ * vault file digest), so a later comparison judges each file on its own,
49
+ * whatever either side's git tracks (T13038).
50
+ */
51
+ files: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
52
+ }, z.core.$loose>;
53
+ /** What a store last synced with on a stream. */
54
+ export type VaultStreamState = z.infer<typeof streamStateSchema>;
55
+ /** Key of one local store on one stream. */
56
+ export declare const vaultStreamKey: (streamId: string, storeRoot: string) => string;
57
+ /** Warning code: the state file was unreadable or newer, and was moved aside. */
58
+ export declare const W_NEXUS_VAULT_STATE_MOVED = "W_NEXUS_VAULT_STATE_MOVED";
59
+ /**
60
+ * Read/modify/write access to the vault state file.
61
+ */
62
+ export declare class NexusVaultState {
63
+ /** Absolute path of the state file. */
64
+ readonly path: string;
65
+ private warnings;
66
+ /** @param filePath - Override for tests; defaults to {@link resolveNexusVaultStatePath}. */
67
+ constructor(filePath?: string);
68
+ /** Warnings raised since the last call (a moved-aside file), for the command's result. */
69
+ drainWarnings(): CloudWarning[];
70
+ /** Run `fn` holding the state file's lock. */
71
+ private locked;
72
+ /** Move an unusable file aside (never overwrite it) and start empty. */
73
+ private moveAside;
74
+ private read;
75
+ private write;
76
+ /** Read, let `fn` change the state, and write it back, all under the lock. */
77
+ private update;
78
+ /** Read under the lock (moving an unusable file aside). */
79
+ private snapshot;
80
+ private account;
81
+ /** The account's persisted signer trust state. */
82
+ trust(apiUrl: string, userId: string): TrustState;
83
+ /** Persist the trust state returned by `certifiedSigners`. */
84
+ saveTrust(apiUrl: string, userId: string, trust: TrustState): void;
85
+ /**
86
+ * Read the account's trust state, let `fn` evaluate it, and persist the
87
+ * trust it returns, all under one lock.
88
+ *
89
+ * @param apiUrl - Account API URL.
90
+ * @param userId - Account user id.
91
+ * @param fn - Receives the current trust; returns the trust to store and a result.
92
+ * @returns `fn`'s result.
93
+ */
94
+ updateTrust<T>(apiUrl: string, userId: string, fn: (current: TrustState) => {
95
+ trust: TrustState;
96
+ result: T;
97
+ }): T;
98
+ /** What `storeRoot` last synced with on `streamId`, or `null`. */
99
+ stream(apiUrl: string, userId: string, streamId: string, storeRoot: string): VaultStreamState | null;
100
+ /**
101
+ * Record that a push from `storeRoot` is about to create a snapshot over
102
+ * `parentCheckpointId` (T13007). {@link saveStream} clears the mark; when a
103
+ * crash loses that write, the mark tells the next command that the head
104
+ * this device and replica pushed over that parent is this store's own, and
105
+ * what that snapshot marks and holds (`pushed`), so recovering it loses no
106
+ * per-path digest.
107
+ */
108
+ markPushInFlight(apiUrl: string, userId: string, streamId: string, storeRoot: string, parentCheckpointId: string | null, pushed?: {
109
+ gitTracked?: readonly string[];
110
+ files?: Readonly<Record<string, string>>;
111
+ }): void;
112
+ /** Record that `storeRoot` now holds `checkpointId` on `streamId`. */
113
+ saveStream(apiUrl: string, userId: string, streamId: string, storeRoot: string, value: {
114
+ lastCheckpointId: string;
115
+ lastCoversSeq: number;
116
+ gitTracked?: readonly string[];
117
+ files?: Readonly<Record<string, string>>;
118
+ }): void;
119
+ }
120
+ export {};
121
+ //# sourceMappingURL=nexus-vault-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nexus-vault-state.d.ts","sourceRoot":"","sources":["../../src/cloud/nexus-vault-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGxD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAc/D,QAAA,MAAM,iBAAiB;IACrB,uDAAuD;;IAEvD,yFAAyF;;;IAGzF;;;OAGG;;;;;;;IAUH;;;;OAIG;;IAEH;;;;OAIG;;iBAEH,CAAC;AAcH,iDAAiD;AACjD,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAKjE,4CAA4C;AAC5C,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,EAAE,WAAW,MAAM,WACxB,CAAC;AAQ3C,iFAAiF;AACjF,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AAMrE;;GAEG;AACH,qBAAa,eAAe;IAC1B,uCAAuC;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,QAAQ,CAAsB;IAEtC,4FAA4F;gBAChF,QAAQ,CAAC,EAAE,MAAM;IAI7B,0FAA0F;IAC1F,aAAa,IAAI,YAAY,EAAE;IAM/B,8CAA8C;IAC9C,OAAO,CAAC,MAAM;IAyBd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