@amalgm/shell 0.1.164-preview.36072132286 → 0.1.164-preview.36809057014

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 (475) hide show
  1. package/PURPOSE.md +642 -128
  2. package/README.md +10 -8
  3. package/dist/accepted-tail.d.ts +26 -0
  4. package/dist/accepted-tail.js +37 -0
  5. package/dist/accepted-tail.js.map +1 -0
  6. package/dist/agent-execution.d.ts +16 -1
  7. package/dist/agent-execution.js +13 -5
  8. package/dist/agent-execution.js.map +1 -1
  9. package/dist/apply-cleanup.d.ts +28 -0
  10. package/dist/apply-cleanup.js +166 -0
  11. package/dist/apply-cleanup.js.map +1 -0
  12. package/dist/apply-recovery.d.ts +47 -0
  13. package/dist/apply-recovery.js +99 -0
  14. package/dist/apply-recovery.js.map +1 -0
  15. package/dist/apply-rows.d.ts +72 -0
  16. package/dist/apply-rows.js +150 -0
  17. package/dist/apply-rows.js.map +1 -0
  18. package/dist/apply-saves.d.ts +85 -0
  19. package/dist/apply-saves.js +238 -0
  20. package/dist/apply-saves.js.map +1 -0
  21. package/dist/boot.js +2 -1
  22. package/dist/boot.js.map +1 -1
  23. package/dist/capture-work.d.ts +8 -0
  24. package/dist/capture-work.js +67 -0
  25. package/dist/capture-work.js.map +1 -0
  26. package/dist/cargo-group.d.ts +45 -0
  27. package/dist/cargo-group.js +88 -0
  28. package/dist/cargo-group.js.map +1 -0
  29. package/dist/channel-session.d.ts +4 -2
  30. package/dist/channel-session.js +4 -3
  31. package/dist/channel-session.js.map +1 -1
  32. package/dist/chat-composition.d.ts +2 -0
  33. package/dist/chat-composition.js +1 -0
  34. package/dist/chat-composition.js.map +1 -1
  35. package/dist/cli.js +20 -1
  36. package/dist/cli.js.map +1 -1
  37. package/dist/construct-apply-host.d.ts +4 -2
  38. package/dist/construct-apply-host.js +8 -3
  39. package/dist/construct-apply-host.js.map +1 -1
  40. package/dist/construct-door.js +1 -1
  41. package/dist/construct-door.js.map +1 -1
  42. package/dist/construct-ledger.d.ts +6 -1
  43. package/dist/construct-ledger.js +21 -33
  44. package/dist/construct-ledger.js.map +1 -1
  45. package/dist/content-cache-collection.d.ts +18 -0
  46. package/dist/content-cache-collection.js +99 -0
  47. package/dist/content-cache-collection.js.map +1 -0
  48. package/dist/content-cache-host.d.ts +83 -17
  49. package/dist/content-cache-host.js +335 -95
  50. package/dist/content-cache-host.js.map +1 -1
  51. package/dist/content-cache-namespace.d.ts +59 -0
  52. package/dist/content-cache-namespace.js +210 -0
  53. package/dist/content-cache-namespace.js.map +1 -0
  54. package/dist/content-cache-ownership.d.ts +13 -0
  55. package/dist/content-cache-ownership.js +75 -0
  56. package/dist/content-cache-ownership.js.map +1 -0
  57. package/dist/content-cache-retention.d.ts +23 -0
  58. package/dist/content-cache-retention.js +195 -0
  59. package/dist/content-cache-retention.js.map +1 -0
  60. package/dist/content-capture-pool.d.ts +287 -0
  61. package/dist/content-capture-pool.js +461 -0
  62. package/dist/content-capture-pool.js.map +1 -0
  63. package/dist/content-capture-worker.d.ts +8 -0
  64. package/dist/content-capture-worker.js +109 -0
  65. package/dist/content-capture-worker.js.map +1 -0
  66. package/dist/content-clock.d.ts +42 -0
  67. package/dist/content-clock.js +166 -0
  68. package/dist/content-clock.js.map +1 -0
  69. package/dist/content-direct.d.ts +2 -0
  70. package/dist/content-direct.js +12 -0
  71. package/dist/content-direct.js.map +1 -1
  72. package/dist/content-failure.d.ts +18 -0
  73. package/dist/content-failure.js +38 -0
  74. package/dist/content-failure.js.map +1 -0
  75. package/dist/content-stream-thread.d.ts +60 -0
  76. package/dist/content-stream-thread.js +95 -0
  77. package/dist/content-stream-thread.js.map +1 -0
  78. package/dist/content-stream-worker.d.ts +7 -0
  79. package/dist/content-stream-worker.js +52 -0
  80. package/dist/content-stream-worker.js.map +1 -0
  81. package/dist/declaration-absorption.d.ts +37 -0
  82. package/dist/declaration-absorption.js +119 -0
  83. package/dist/declaration-absorption.js.map +1 -0
  84. package/dist/declaration-chain.d.ts +36 -0
  85. package/dist/declaration-chain.js +96 -0
  86. package/dist/declaration-chain.js.map +1 -0
  87. package/dist/declaration-commit.d.ts +31 -0
  88. package/dist/declaration-commit.js +49 -0
  89. package/dist/declaration-commit.js.map +1 -0
  90. package/dist/declaration-hold.d.ts +22 -0
  91. package/dist/declaration-hold.js +24 -0
  92. package/dist/declaration-hold.js.map +1 -0
  93. package/dist/declaration-journal.d.ts +62 -0
  94. package/dist/declaration-journal.js +99 -0
  95. package/dist/declaration-journal.js.map +1 -0
  96. package/dist/declaration-save.d.ts +31 -0
  97. package/dist/declaration-save.js +134 -0
  98. package/dist/declaration-save.js.map +1 -0
  99. package/dist/detection/accepted-result.d.ts +19 -1
  100. package/dist/detection/accepted-result.js +36 -5
  101. package/dist/detection/accepted-result.js.map +1 -1
  102. package/dist/detection/admission-save.d.ts +55 -0
  103. package/dist/detection/admission-save.js +48 -0
  104. package/dist/detection/admission-save.js.map +1 -0
  105. package/dist/detection/admission-units.d.ts +66 -0
  106. package/dist/detection/admission-units.js +322 -0
  107. package/dist/detection/admission-units.js.map +1 -0
  108. package/dist/detection/alias-discovery.d.ts +12 -0
  109. package/dist/detection/alias-discovery.js +80 -0
  110. package/dist/detection/alias-discovery.js.map +1 -0
  111. package/dist/detection/alias-examination.d.ts +30 -0
  112. package/dist/detection/alias-examination.js +49 -0
  113. package/dist/detection/alias-examination.js.map +1 -0
  114. package/dist/detection/apply-ownership.d.ts +81 -0
  115. package/dist/detection/apply-ownership.js +232 -0
  116. package/dist/detection/apply-ownership.js.map +1 -0
  117. package/dist/detection/basis-advanced.d.ts +11 -0
  118. package/dist/detection/basis-advanced.js +26 -0
  119. package/dist/detection/basis-advanced.js.map +1 -0
  120. package/dist/detection/capture-outcome.d.ts +16 -0
  121. package/dist/detection/capture-outcome.js +92 -0
  122. package/dist/detection/capture-outcome.js.map +1 -0
  123. package/dist/detection/container-membership.d.ts +32 -0
  124. package/dist/detection/container-membership.js +49 -0
  125. package/dist/detection/container-membership.js.map +1 -0
  126. package/dist/detection/detect-cancelled.d.ts +6 -0
  127. package/dist/detection/detect-cancelled.js +10 -0
  128. package/dist/detection/detect-cancelled.js.map +1 -0
  129. package/dist/detection/directory-proof.d.ts +47 -0
  130. package/dist/detection/directory-proof.js +77 -0
  131. package/dist/detection/directory-proof.js.map +1 -0
  132. package/dist/detection/disposition-rows.d.ts +18 -0
  133. package/dist/detection/disposition-rows.js +29 -0
  134. package/dist/detection/disposition-rows.js.map +1 -0
  135. package/dist/detection/dispositions.d.ts +130 -0
  136. package/dist/detection/dispositions.js +248 -0
  137. package/dist/detection/dispositions.js.map +1 -0
  138. package/dist/detection/git-notice.d.ts +88 -0
  139. package/dist/detection/git-notice.js +444 -0
  140. package/dist/detection/git-notice.js.map +1 -0
  141. package/dist/detection/ground-proof.d.ts +130 -0
  142. package/dist/detection/ground-proof.js +274 -0
  143. package/dist/detection/ground-proof.js.map +1 -0
  144. package/dist/detection/ground-reader.d.ts +29 -0
  145. package/dist/detection/ground-reader.js +102 -0
  146. package/dist/detection/ground-reader.js.map +1 -0
  147. package/dist/detection/held-territory.d.ts +51 -0
  148. package/dist/detection/held-territory.js +205 -0
  149. package/dist/detection/held-territory.js.map +1 -0
  150. package/dist/detection/identity-discovery.d.ts +45 -0
  151. package/dist/detection/identity-discovery.js +287 -0
  152. package/dist/detection/identity-discovery.js.map +1 -0
  153. package/dist/detection/maintenance-sweep.d.ts +108 -0
  154. package/dist/detection/maintenance-sweep.js +325 -0
  155. package/dist/detection/maintenance-sweep.js.map +1 -0
  156. package/dist/detection/name-reach.d.ts +12 -0
  157. package/dist/detection/name-reach.js +28 -0
  158. package/dist/detection/name-reach.js.map +1 -0
  159. package/dist/detection/notebook-basis.d.ts +5 -7
  160. package/dist/detection/notebook-basis.js +6 -7
  161. package/dist/detection/notebook-basis.js.map +1 -1
  162. package/dist/detection/owed-selection.d.ts +51 -0
  163. package/dist/detection/owed-selection.js +169 -0
  164. package/dist/detection/owed-selection.js.map +1 -0
  165. package/dist/detection/portable.d.ts +34 -34
  166. package/dist/detection/portable.js +67 -93
  167. package/dist/detection/portable.js.map +1 -1
  168. package/dist/detection/reconciliation-coverage.d.ts +7 -0
  169. package/dist/detection/reconciliation-coverage.js +16 -0
  170. package/dist/detection/reconciliation-coverage.js.map +1 -0
  171. package/dist/detection/repository-publication.d.ts +20 -0
  172. package/dist/detection/repository-publication.js +79 -0
  173. package/dist/detection/repository-publication.js.map +1 -0
  174. package/dist/detection/repository-routes.d.ts +43 -0
  175. package/dist/detection/repository-routes.js +97 -0
  176. package/dist/detection/repository-routes.js.map +1 -0
  177. package/dist/detection/root-examination.d.ts +94 -0
  178. package/dist/detection/root-examination.js +523 -0
  179. package/dist/detection/root-examination.js.map +1 -0
  180. package/dist/detection/runtime.d.ts +131 -64
  181. package/dist/detection/runtime.js +808 -1103
  182. package/dist/detection/runtime.js.map +1 -1
  183. package/dist/detection/scoped-identity-port.d.ts +34 -0
  184. package/dist/detection/scoped-identity-port.js +81 -0
  185. package/dist/detection/scoped-identity-port.js.map +1 -0
  186. package/dist/detection/seal-law.d.ts +66 -0
  187. package/dist/detection/seal-law.js +116 -0
  188. package/dist/detection/seal-law.js.map +1 -0
  189. package/dist/detection/sharing-policy.d.ts +11 -0
  190. package/dist/detection/sharing-policy.js +32 -0
  191. package/dist/detection/sharing-policy.js.map +1 -0
  192. package/dist/detection/thread-database.d.ts +4 -0
  193. package/dist/detection/thread-database.js +30 -0
  194. package/dist/detection/thread-database.js.map +1 -0
  195. package/dist/detection/unreadable.d.ts +11 -0
  196. package/dist/detection/unreadable.js +9 -0
  197. package/dist/detection/unreadable.js.map +1 -0
  198. package/dist/detection/verified-content.d.ts +6 -0
  199. package/dist/detection/verified-content.js +12 -0
  200. package/dist/detection/verified-content.js.map +1 -0
  201. package/dist/detection/walk-law.d.ts +34 -0
  202. package/dist/detection/walk-law.js +55 -0
  203. package/dist/detection/walk-law.js.map +1 -0
  204. package/dist/development/fly-guest.js +2 -1
  205. package/dist/development/fly-guest.js.map +1 -1
  206. package/dist/entity-apply-host.d.ts +29 -13
  207. package/dist/entity-apply-host.js +1426 -461
  208. package/dist/entity-apply-host.js.map +1 -1
  209. package/dist/entity-apply-store.d.ts +77 -30
  210. package/dist/entity-apply-store.js +221 -516
  211. package/dist/entity-apply-store.js.map +1 -1
  212. package/dist/entity-record-observability.js +2 -0
  213. package/dist/entity-record-observability.js.map +1 -1
  214. package/dist/entity-record-saves.d.ts +20 -0
  215. package/dist/entity-record-saves.js +91 -0
  216. package/dist/entity-record-saves.js.map +1 -0
  217. package/dist/entity-record-store.d.ts +15 -7
  218. package/dist/entity-record-store.js +57 -117
  219. package/dist/entity-record-store.js.map +1 -1
  220. package/dist/files-register-host.d.ts +22 -3
  221. package/dist/files-register-host.js +70 -31
  222. package/dist/files-register-host.js.map +1 -1
  223. package/dist/filesystem.js +3 -2
  224. package/dist/filesystem.js.map +1 -1
  225. package/dist/git-binding.d.ts +65 -0
  226. package/dist/git-binding.js +220 -0
  227. package/dist/git-binding.js.map +1 -0
  228. package/dist/git-capture.d.ts +39 -0
  229. package/dist/git-capture.js +86 -0
  230. package/dist/git-capture.js.map +1 -0
  231. package/dist/git-card.d.ts +12 -0
  232. package/dist/git-card.js +123 -0
  233. package/dist/git-card.js.map +1 -0
  234. package/dist/git-checkpoint-construction.d.ts +41 -0
  235. package/dist/git-checkpoint-construction.js +96 -0
  236. package/dist/git-checkpoint-construction.js.map +1 -0
  237. package/dist/git-checkpoint-preparation.d.ts +37 -0
  238. package/dist/git-checkpoint-preparation.js +145 -0
  239. package/dist/git-checkpoint-preparation.js.map +1 -0
  240. package/dist/git-command.d.ts +61 -8
  241. package/dist/git-command.js +217 -63
  242. package/dist/git-command.js.map +1 -1
  243. package/dist/git-configuration.d.ts +40 -0
  244. package/dist/git-configuration.js +217 -0
  245. package/dist/git-configuration.js.map +1 -0
  246. package/dist/git-evidence.d.ts +61 -0
  247. package/dist/git-evidence.js +181 -0
  248. package/dist/git-evidence.js.map +1 -0
  249. package/dist/git-index-entries.d.ts +15 -0
  250. package/dist/git-index-entries.js +44 -0
  251. package/dist/git-index-entries.js.map +1 -0
  252. package/dist/git-index-format.d.ts +35 -0
  253. package/dist/git-index-format.js +293 -0
  254. package/dist/git-index-format.js.map +1 -0
  255. package/dist/git-index-witness.d.ts +33 -0
  256. package/dist/git-index-witness.js +69 -0
  257. package/dist/git-index-witness.js.map +1 -0
  258. package/dist/git-literal-host.d.ts +82 -0
  259. package/dist/git-literal-host.js +172 -0
  260. package/dist/git-literal-host.js.map +1 -0
  261. package/dist/git-literal-read.d.ts +88 -0
  262. package/dist/git-literal-read.js +170 -0
  263. package/dist/git-literal-read.js.map +1 -0
  264. package/dist/git-literal-replay.d.ts +33 -0
  265. package/dist/git-literal-replay.js +268 -0
  266. package/dist/git-literal-replay.js.map +1 -0
  267. package/dist/git-native-file.d.ts +42 -0
  268. package/dist/git-native-file.js +145 -0
  269. package/dist/git-native-file.js.map +1 -0
  270. package/dist/git-native-index.d.ts +21 -0
  271. package/dist/git-native-index.js +44 -0
  272. package/dist/git-native-index.js.map +1 -0
  273. package/dist/git-operation-host.d.ts +48 -0
  274. package/dist/git-operation-host.js +127 -0
  275. package/dist/git-operation-host.js.map +1 -0
  276. package/dist/git-private-index.d.ts +11 -0
  277. package/dist/git-private-index.js +42 -0
  278. package/dist/git-private-index.js.map +1 -0
  279. package/dist/git-private-repository.d.ts +4 -0
  280. package/dist/git-private-repository.js +69 -0
  281. package/dist/git-private-repository.js.map +1 -0
  282. package/dist/git-private-view.d.ts +39 -0
  283. package/dist/git-private-view.js +162 -0
  284. package/dist/git-private-view.js.map +1 -0
  285. package/dist/git-ref-store.d.ts +12 -0
  286. package/dist/git-ref-store.js +68 -0
  287. package/dist/git-ref-store.js.map +1 -0
  288. package/dist/git-registration-host.d.ts +20 -30
  289. package/dist/git-registration-host.js +86 -249
  290. package/dist/git-registration-host.js.map +1 -1
  291. package/dist/git-repository-host.d.ts +148 -22
  292. package/dist/git-repository-host.js +633 -650
  293. package/dist/git-repository-host.js.map +1 -1
  294. package/dist/git-worktree-host.d.ts +2 -0
  295. package/dist/git-worktree-host.js +16 -0
  296. package/dist/git-worktree-host.js.map +1 -0
  297. package/dist/graph-publication.d.ts +75 -0
  298. package/dist/graph-publication.js +203 -0
  299. package/dist/graph-publication.js.map +1 -0
  300. package/dist/ground-basis.d.ts +242 -0
  301. package/dist/ground-basis.js +1023 -0
  302. package/dist/ground-basis.js.map +1 -0
  303. package/dist/ground-checkpoint-worker.d.ts +1 -0
  304. package/dist/ground-checkpoint-worker.js +84 -0
  305. package/dist/ground-checkpoint-worker.js.map +1 -0
  306. package/dist/ground-checkpoints.d.ts +16 -0
  307. package/dist/ground-checkpoints.js +45 -0
  308. package/dist/ground-checkpoints.js.map +1 -0
  309. package/dist/ground-coordination.d.ts +107 -3
  310. package/dist/ground-coordination.js +249 -24
  311. package/dist/ground-coordination.js.map +1 -1
  312. package/dist/ground-database.d.ts +42 -0
  313. package/dist/ground-database.js +290 -0
  314. package/dist/ground-database.js.map +1 -0
  315. package/dist/ground-differences.d.ts +23 -0
  316. package/dist/ground-differences.js +47 -0
  317. package/dist/ground-differences.js.map +1 -0
  318. package/dist/ground-holders.d.ts +4 -0
  319. package/dist/ground-holders.js +15 -0
  320. package/dist/ground-holders.js.map +1 -0
  321. package/dist/ground-initialization-worker.d.ts +1 -0
  322. package/dist/ground-initialization-worker.js +20 -0
  323. package/dist/ground-initialization-worker.js.map +1 -0
  324. package/dist/ground-initialization.d.ts +35 -0
  325. package/dist/ground-initialization.js +102 -0
  326. package/dist/ground-initialization.js.map +1 -0
  327. package/dist/ground-install-saves.d.ts +63 -0
  328. package/dist/ground-install-saves.js +139 -0
  329. package/dist/ground-install-saves.js.map +1 -0
  330. package/dist/ground-inventory-schema.d.ts +18 -0
  331. package/dist/ground-inventory-schema.js +168 -0
  332. package/dist/ground-inventory-schema.js.map +1 -0
  333. package/dist/ground-profile.d.ts +7 -0
  334. package/dist/ground-profile.js +52 -0
  335. package/dist/ground-profile.js.map +1 -0
  336. package/dist/ground-root-index.d.ts +2 -1
  337. package/dist/ground-root-index.js +16 -14
  338. package/dist/ground-root-index.js.map +1 -1
  339. package/dist/ground-row.d.ts +62 -0
  340. package/dist/ground-row.js +70 -0
  341. package/dist/ground-row.js.map +1 -0
  342. package/dist/ground-save-ops.d.ts +44 -0
  343. package/dist/ground-save-ops.js +41 -0
  344. package/dist/ground-save-ops.js.map +1 -0
  345. package/dist/ground-saver-worker.d.ts +1 -0
  346. package/dist/ground-saver-worker.js +156 -0
  347. package/dist/ground-saver-worker.js.map +1 -0
  348. package/dist/ground-saver.d.ts +75 -0
  349. package/dist/ground-saver.js +216 -0
  350. package/dist/ground-saver.js.map +1 -0
  351. package/dist/ground-store.d.ts +84 -0
  352. package/dist/ground-store.js +473 -0
  353. package/dist/ground-store.js.map +1 -0
  354. package/dist/ground-territory.d.ts +130 -0
  355. package/dist/ground-territory.js +511 -0
  356. package/dist/ground-territory.js.map +1 -0
  357. package/dist/index.d.ts +1 -1
  358. package/dist/index.js.map +1 -1
  359. package/dist/installation/ownership.d.ts +0 -2
  360. package/dist/installation/ownership.js +3 -15
  361. package/dist/installation/ownership.js.map +1 -1
  362. package/dist/machine-host.d.ts +3 -2
  363. package/dist/machine-host.js +28 -16
  364. package/dist/machine-host.js.map +1 -1
  365. package/dist/materialized-graph.d.ts +7 -7
  366. package/dist/materialized-graph.js +11 -23
  367. package/dist/materialized-graph.js.map +1 -1
  368. package/dist/module-thread.d.ts +9 -0
  369. package/dist/module-thread.js +10 -0
  370. package/dist/module-thread.js.map +1 -0
  371. package/dist/native/fsevents-stream.node +0 -0
  372. package/dist/physical-path-witness.d.ts +64 -0
  373. package/dist/physical-path-witness.js +168 -0
  374. package/dist/physical-path-witness.js.map +1 -0
  375. package/dist/register-upload-fusion.d.ts +5 -4
  376. package/dist/register-upload-fusion.js +9 -6
  377. package/dist/register-upload-fusion.js.map +1 -1
  378. package/dist/registry-graph.d.ts +3 -2
  379. package/dist/registry-graph.js +9 -6
  380. package/dist/registry-graph.js.map +1 -1
  381. package/dist/registry-page-cache.d.ts +5 -2
  382. package/dist/registry-page-cache.js.map +1 -1
  383. package/dist/repository-identity-steps.d.ts +5 -0
  384. package/dist/repository-identity-steps.js +33 -0
  385. package/dist/repository-identity-steps.js.map +1 -0
  386. package/dist/runtime-node-flags.d.ts +10 -0
  387. package/dist/runtime-node-flags.js +11 -0
  388. package/dist/runtime-node-flags.js.map +1 -0
  389. package/dist/service/adapter.d.ts +1 -1
  390. package/dist/service/adapter.js +1 -1
  391. package/dist/service/adapter.js.map +1 -1
  392. package/dist/service/cli.js +16 -20
  393. package/dist/service/cli.js.map +1 -1
  394. package/dist/service/control.d.ts +2 -2
  395. package/dist/service/keepalive.d.ts +4 -11
  396. package/dist/service/keepalive.js +65 -118
  397. package/dist/service/keepalive.js.map +1 -1
  398. package/dist/service/policy.d.ts +36 -0
  399. package/dist/service/policy.js +25 -0
  400. package/dist/service/policy.js.map +1 -0
  401. package/dist/service/portable.d.ts +1 -1
  402. package/dist/service/portable.js +1 -1
  403. package/dist/service/portable.js.map +1 -1
  404. package/dist/service/recovery.d.ts +10 -9
  405. package/dist/service/recovery.js +29 -19
  406. package/dist/service/recovery.js.map +1 -1
  407. package/dist/service/windows-action.d.ts +5 -3
  408. package/dist/service/windows-action.js +6 -9
  409. package/dist/service/windows-action.js.map +1 -1
  410. package/dist/service/windows-task.js +5 -5
  411. package/dist/service/windows-task.js.map +1 -1
  412. package/dist/sharing-admission.d.ts +17 -0
  413. package/dist/sharing-admission.js +128 -0
  414. package/dist/sharing-admission.js.map +1 -0
  415. package/dist/snapshot-delivery-baseline.d.ts +12 -3
  416. package/dist/snapshot-delivery-baseline.js +41 -42
  417. package/dist/snapshot-delivery-baseline.js.map +1 -1
  418. package/dist/source-proof.d.ts +36 -0
  419. package/dist/source-proof.js +70 -0
  420. package/dist/source-proof.js.map +1 -0
  421. package/dist/source-signature.d.ts +56 -0
  422. package/dist/source-signature.js +56 -0
  423. package/dist/source-signature.js.map +1 -0
  424. package/dist/source-witness.d.ts +15 -0
  425. package/dist/source-witness.js +29 -0
  426. package/dist/source-witness.js.map +1 -0
  427. package/dist/sqlite-durability.d.ts +31 -0
  428. package/dist/sqlite-durability.js +28 -0
  429. package/dist/sqlite-durability.js.map +1 -0
  430. package/dist/sqlite.d.ts +8 -2
  431. package/dist/sqlite.js +27 -4
  432. package/dist/sqlite.js.map +1 -1
  433. package/dist/sync-address.d.ts +19 -0
  434. package/dist/sync-address.js +52 -0
  435. package/dist/sync-address.js.map +1 -0
  436. package/dist/sync-setting.d.ts +15 -0
  437. package/dist/sync-setting.js +13 -0
  438. package/dist/sync-setting.js.map +1 -1
  439. package/dist/turns.d.ts +42 -0
  440. package/dist/turns.js +112 -0
  441. package/dist/turns.js.map +1 -0
  442. package/dist/updates/bootstrap.d.ts +53 -7
  443. package/dist/updates/bootstrap.js +224 -137
  444. package/dist/updates/bootstrap.js.map +1 -1
  445. package/dist/updates/controller.d.ts +8 -0
  446. package/dist/updates/controller.js +27 -3
  447. package/dist/updates/controller.js.map +1 -1
  448. package/dist/updates/store.d.ts +3 -0
  449. package/dist/updates/store.js +12 -0
  450. package/dist/updates/store.js.map +1 -1
  451. package/dist/user-ground-host.d.ts +364 -69
  452. package/dist/user-ground-host.js +5231 -3366
  453. package/dist/user-ground-host.js.map +1 -1
  454. package/dist/watching/fsevents.d.ts +52 -1
  455. package/dist/watching/fsevents.js +60 -25
  456. package/dist/watching/fsevents.js.map +1 -1
  457. package/dist/watching/host.d.ts +129 -5
  458. package/dist/watching/host.js +433 -80
  459. package/dist/watching/host.js.map +1 -1
  460. package/dist/watching/index.d.ts +1 -1
  461. package/dist/wire-binary.d.ts +3 -2
  462. package/dist/wire-binary.js +10 -8
  463. package/dist/wire-binary.js.map +1 -1
  464. package/dist/wire-client.d.ts +3 -4
  465. package/dist/wire-client.js +18 -44
  466. package/dist/wire-client.js.map +1 -1
  467. package/dist/wire-outbox.d.ts +34 -0
  468. package/dist/wire-outbox.js +127 -0
  469. package/dist/wire-outbox.js.map +1 -0
  470. package/dist/workspace-host.d.ts +4 -0
  471. package/dist/workspace-host.js +12 -1
  472. package/dist/workspace-host.js.map +1 -1
  473. package/examinations/fixtures/private-wire-authority.js +133 -10
  474. package/npm-shrinkwrap.json +43 -56
  475. package/package.json +26 -13
@@ -0,0 +1,461 @@
1
+ /**
2
+ * Content capture and cache sealing run on a small pool of worker threads.
3
+ *
4
+ * Capture is the expensive part of Detect: every byte is read and hashed
5
+ * twice (whole-file and per-block identity), and a sealing capture stages
6
+ * the bytes for the immutable cache. Sealing held bytes verifies, hashes and
7
+ * stages them. None of that may occupy the one thread that schedules Watch,
8
+ * Detect admission, Apply and Send. Like Syncthing's hashers, a fixed number
9
+ * of content threads work in parallel, all started with the ground; the main
10
+ * thread only dispatches and receives results. The capture and publication
11
+ * laws stay in content-cache-host; literal repository reads stay in
12
+ * git-literal-read. What
13
+ * a reply staged is published on the main thread, after the group barrier
14
+ * that makes it durable, so a content thread never waits for a drive flush:
15
+ * before its caller resumes, or, for a pass's capture, when the pass names
16
+ * its whole set (cargo-group.ts).
17
+ *
18
+ * Complete-lane work is bulk: a whole-root walk can queue
19
+ * thousands of jobs. Every other job answers one edit. Service is fair, not
20
+ * only prioritized: waiting bulk work always holds one thread, so a steady
21
+ * stream of edits never starves a whole-root pass; edits take every other
22
+ * thread first, and bulk never holds the last one. With one thread the two alternate while both
23
+ * wait, so an edit waits for at most one bounded bulk job.
24
+ *
25
+ * A physical close is judged here too: the witnesses an admission retained
26
+ * are sampled again and compared, so the admitting thread never re-reads
27
+ * ground. Only what a witness cannot carry — host authority and checks over
28
+ * live objects — stays with the admission that runs on the main thread.
29
+ *
30
+ * Identity discovery runs on one more thread of its own, in arrival order:
31
+ * the listings it retains live in that thread, so every discovery finds
32
+ * them, and no capture or examination ever waits behind one.
33
+ *
34
+ * A repository's ground subtrees are read here too, in one read transaction,
35
+ * so no read of a whole territory waits on the drive on the main thread, as
36
+ * is what a root's changed sharing policy newly includes.
37
+ *
38
+ * So is every replay built from sealed cache bytes: a text result's delta or
39
+ * snapshot and a link's target. A cache read can wait behind the cache
40
+ * directory's full flush, and the main thread never waits on a drive.
41
+ *
42
+ * A thread that read a ground file keeps its connection to it
43
+ * (detection/thread-database.ts). Releasing that file reaches every live
44
+ * thread, each after the job it is running (ground-holders.ts).
45
+ */
46
+ import { channel } from "node:diagnostics_channel";
47
+ import { availableParallelism } from "node:os";
48
+ import { gitHostPin } from "./git-command.js";
49
+ import { ALONE } from "./cargo-group.js";
50
+ import { holdGroundFiles } from "./ground-holders.js";
51
+ import { readManifestHint, } from "./content-cache-host.js";
52
+ import { restoreFailure } from "./content-failure.js";
53
+ import { moduleThread } from "./module-thread.js";
54
+ import { admitPhysically, proofLeaves } from "./source-proof.js";
55
+ import { queueTurn } from "./turns.js";
56
+ const captures = channel("amalgm:content-capture");
57
+ const seals = channel("amalgm:content-seal");
58
+ const derivations = channel("amalgm:content-derive");
59
+ const literals = channel("amalgm:content-literal");
60
+ const examinations = channel("amalgm:content-examine");
61
+ const closes = channel("amalgm:content-close");
62
+ /** A content thread's Git processes, reported where every other one is. */
63
+ const gitSpawns = channel("amalgm:git");
64
+ const WIDTH = Math.max(1, Math.floor(availableParallelism() / 2));
65
+ const BULK_WIDTH = Math.max(1, WIDTH - 1);
66
+ const WORKER = new URL("./content-capture-worker.js", import.meta.url);
67
+ class ContentThreadPool {
68
+ #threads = new Set();
69
+ #idle = [];
70
+ #edits = [];
71
+ #bulk = [];
72
+ #discoveries = [];
73
+ #discoverer = null;
74
+ #bulkRunning = 0;
75
+ #lastBulk = false;
76
+ #nextId = 1;
77
+ /** Every thread at once, idle until work arrives; a lost thread is
78
+ * replaced when work next needs it. */
79
+ start() {
80
+ while (this.#threads.size < WIDTH)
81
+ this.#idle.push(this.#spawn(true));
82
+ this.#discoverer ??= this.#spawn(false);
83
+ }
84
+ async capture(sourceFile, expected, cacheDir, collect, lane, cargo) {
85
+ const reply = await this.#run(0, {
86
+ kind: "capture",
87
+ id: this.#nextId++,
88
+ sourceFile,
89
+ // Only the signed fields travel; a Stats object loses its prototype.
90
+ expected: {
91
+ dev: expected.dev, ino: expected.ino, mode: expected.mode, nlink: expected.nlink,
92
+ size: expected.size, mtimeNs: expected.mtimeNs, ctimeNs: expected.ctimeNs,
93
+ },
94
+ cacheDir,
95
+ collect,
96
+ }, lane, []);
97
+ if (!("captured" in reply))
98
+ throw new Error("content thread answered a capture without its result");
99
+ const { cache, ...captured } = reply.captured;
100
+ if (cache && cacheDir)
101
+ await cargo.hold(cacheDir, captured.contentHash, cache);
102
+ return { ...captured, collected: reply.collected ? Buffer.from(reply.collected) : null };
103
+ }
104
+ async seal(cacheDir, artifact, bytes, origin, cargo) {
105
+ // The worker receives its own exact copy; the caller keeps its bytes.
106
+ const copyStarted = performance.now();
107
+ const owned = new Uint8Array(bytes);
108
+ const reply = await this.#run(performance.now() - copyStarted, { kind: "seal", id: this.#nextId++, cacheDir, artifact, bytes: owned }, origin, [owned.buffer]);
109
+ if (!("sealed" in reply))
110
+ throw new Error("content thread answered a seal without its stage");
111
+ await cargo.hold(cacheDir, artifact.contentHash, reply.sealed);
112
+ }
113
+ async derive(cacheDir, artifact) {
114
+ const reply = await this.#run(0, { kind: "derive", id: this.#nextId++, cacheDir, artifact }, "derive", []);
115
+ if (!("manifest" in reply))
116
+ throw new Error("content thread answered a derivation without its manifest");
117
+ return reply.manifest;
118
+ }
119
+ async literal(repository, format, requests, lane) {
120
+ const reply = await this.#run(0, { kind: "literal", id: this.#nextId++, repository, format, requests }, lane, []);
121
+ if (!("literal" in reply))
122
+ throw new Error("content thread answered a literal read without its batch");
123
+ return reply.literal;
124
+ }
125
+ async examine(examination) {
126
+ const reply = await this.#run(0, { kind: "examine", id: this.#nextId++, examination, git: gitHostPin() }, "complete", []);
127
+ if (!("examined" in reply))
128
+ throw new Error("content thread answered an examination without its result");
129
+ return reply.examined;
130
+ }
131
+ async close(leaves, lane) {
132
+ const reply = await this.#run(0, { kind: "close", id: this.#nextId++, leaves }, lane, []);
133
+ if (!("closed" in reply) || reply.closed.length !== leaves.length) {
134
+ throw new Error("content thread answered a close without one verdict per leaf");
135
+ }
136
+ return reply.closed;
137
+ }
138
+ async territories(database, uuid, inventories) {
139
+ const reply = await this.#run(0, { kind: "territory", id: this.#nextId++, database, uuid, inventories }, "territory", []);
140
+ if (!("territories" in reply) || reply.territories.subtrees.length !== inventories.length) {
141
+ throw new Error("content thread answered a territory read without one subtree per inventory");
142
+ }
143
+ return reply.territories;
144
+ }
145
+ async owed(database, rootUUID, policy, bindingDir) {
146
+ const reply = await this.#run(0, { kind: "owed", id: this.#nextId++, database, rootUUID, policy, bindingDir }, "owed", []);
147
+ if (!("owed" in reply))
148
+ throw new Error("content thread answered an owed-selection read without its paths");
149
+ return reply.owed;
150
+ }
151
+ async replay(cacheDir, request, lane) {
152
+ const reply = await this.#run(0, { kind: "replay", id: this.#nextId++, cacheDir, request }, lane, []);
153
+ if (!("replay" in reply) || reply.replay.kind !== request.type) {
154
+ throw new Error("content thread answered a replay without its instruction");
155
+ }
156
+ return reply.replay;
157
+ }
158
+ /** Every live thread lets one ground file go after the job it is running. */
159
+ async release(database) {
160
+ const threads = this.#discoverer ? [...this.#threads, this.#discoverer] : [...this.#threads];
161
+ await Promise.all(threads.map(thread => this.#reserve(thread, { kind: "release", id: this.#nextId++, database })));
162
+ }
163
+ #reserve(thread, job) {
164
+ return new Promise((resolve, reject) => {
165
+ const pending = { job, label: "release", bulk: false, transfer: [], bytes: 0, copyMs: 0,
166
+ queuedAt: performance.now(), resolve, reject };
167
+ if (thread.current) {
168
+ thread.reserved.push(pending);
169
+ return;
170
+ }
171
+ const index = this.#idle.indexOf(thread);
172
+ if (index >= 0)
173
+ this.#idle.splice(index, 1);
174
+ this.#start(thread, pending);
175
+ });
176
+ }
177
+ async discover(discovery) {
178
+ const reply = await this.#run(0, { kind: "discover", id: this.#nextId++, discovery }, "discover", []);
179
+ if (!("discovered" in reply))
180
+ throw new Error("content thread answered a discovery without its result");
181
+ return reply.discovered;
182
+ }
183
+ #run(copyMs, job, label, transfer) {
184
+ return new Promise((resolve, reject) => {
185
+ const bytes = job.kind === "seal" ? job.bytes.byteLength : 0;
186
+ const bulk = label === "complete";
187
+ const pending = { job, label, bulk, transfer, bytes, copyMs, queuedAt: performance.now(), resolve, reject };
188
+ if (job.kind === "discover") {
189
+ this.#discoveries.push(pending);
190
+ this.#discover();
191
+ return;
192
+ }
193
+ (bulk ? this.#bulk : this.#edits).push(pending);
194
+ this.#dispatch();
195
+ });
196
+ }
197
+ /** The discovery thread takes the oldest discovery once it is free. */
198
+ #discover() {
199
+ if (this.#discoverer?.current || !this.#discoveries.length)
200
+ return;
201
+ this.#discoverer ??= this.#spawn(false);
202
+ this.#start(this.#discoverer, this.#discoveries.shift());
203
+ }
204
+ #start(thread, pending) {
205
+ const current = { ...pending, startedAt: performance.now(), postMs: 0 };
206
+ thread.current = current;
207
+ // A busy thread keeps the process alive; an idle pool never does.
208
+ thread.worker.ref();
209
+ thread.worker.postMessage(pending.job, pending.transfer);
210
+ current.postMs = performance.now() - current.startedAt;
211
+ }
212
+ /** Waiting bulk work holds one thread; edits take the rest first. */
213
+ #nextQueue() {
214
+ if (this.#bulk.length && this.#bulkRunning === 0
215
+ && !(WIDTH === 1 && this.#lastBulk && this.#edits.length))
216
+ return this.#bulk;
217
+ if (this.#edits.length)
218
+ return this.#edits;
219
+ return this.#bulk.length && this.#bulkRunning < BULK_WIDTH ? this.#bulk : null;
220
+ }
221
+ #dispatch() {
222
+ for (;;) {
223
+ const queue = this.#nextQueue();
224
+ if (!queue)
225
+ return;
226
+ const thread = this.#idle.pop() ?? (this.#threads.size < WIDTH ? this.#spawn(true) : null);
227
+ if (!thread)
228
+ return;
229
+ const pending = queue.shift();
230
+ this.#lastBulk = pending.bulk;
231
+ if (pending.bulk)
232
+ this.#bulkRunning++;
233
+ this.#start(thread, pending);
234
+ }
235
+ }
236
+ #spawn(pooled) {
237
+ const thread = { worker: moduleThread(WORKER), current: null, reserved: [] };
238
+ if (pooled)
239
+ this.#threads.add(thread);
240
+ let failure = null;
241
+ thread.worker.on("message", (reply) => this.#settle(thread, reply));
242
+ thread.worker.on("error", error => { failure ??= error; });
243
+ // A job fails only once its thread has exited. Node drains a worker's
244
+ // outstanding file requests before exit, so a caller released by this
245
+ // failure can no longer race the thread's I/O in the cache.
246
+ thread.worker.on("exit", code => this.#lose(thread, failure ?? new Error(`content worker exited with code ${code}`)));
247
+ // Idle until it starts a job. Last: a listener added after unref refs it again.
248
+ thread.worker.unref();
249
+ return thread;
250
+ }
251
+ #settle(thread, reply) {
252
+ const current = thread.current;
253
+ if (!current || current.job.id !== reply.id) {
254
+ this.#retire(thread);
255
+ return;
256
+ }
257
+ thread.current = null;
258
+ if (current.bulk)
259
+ this.#bulkRunning--;
260
+ thread.worker.unref();
261
+ const reserved = thread.reserved.shift();
262
+ if (reserved)
263
+ this.#start(thread, reserved);
264
+ else if (thread !== this.#discoverer)
265
+ this.#idle.push(thread);
266
+ const finishedAt = performance.now();
267
+ const timing = {
268
+ outcome: "failure" in reply ? "failed" : "completed",
269
+ queuedMs: current.startedAt - current.queuedAt,
270
+ runMs: finishedAt - current.startedAt,
271
+ threadUserMs: reply.cpu.user / 1e3,
272
+ threadSystemMs: reply.cpu.system / 1e3,
273
+ };
274
+ if (current.job.kind === "capture" && captures.hasSubscribers) {
275
+ captures.publish({ ...timing, lane: current.label,
276
+ outcome: "failure" in reply ? "failed" : "captured",
277
+ bytes: "captured" in reply ? reply.captured.bytes : 0, sealed: current.job.cacheDir !== null });
278
+ }
279
+ if (current.job.kind === "seal" && seals.hasSubscribers) {
280
+ seals.publish({ ...timing, origin: current.label, bytes: current.bytes, copyMs: current.copyMs });
281
+ }
282
+ if (current.job.kind === "derive" && derivations.hasSubscribers)
283
+ derivations.publish(timing);
284
+ if (current.job.kind === "literal" && literals.hasSubscribers) {
285
+ literals.publish({ ...timing, lane: current.label, requests: current.job.requests.length,
286
+ answered: "literal" in reply ? reply.literal.answers.length : 0,
287
+ bytes: "literal" in reply ? reply.literal.answers.reduce((sum, answer) => sum + (answer.kind === "leaf" ? answer.leaf.content?.byteLength ?? 0 : 0), 0) : 0 });
288
+ }
289
+ if (current.job.kind === "close" && closes.hasSubscribers) {
290
+ closes.publish({ ...timing, lane: current.label, postMs: current.postMs, leaves: current.job.leaves.length,
291
+ witnesses: current.job.leaves.reduce((sum, leaf) => sum + leaf.length, 0),
292
+ failed: "closed" in reply ? reply.closed.filter(Boolean).length : 0 });
293
+ }
294
+ if ("gitSpawns" in reply && gitSpawns.hasSubscribers)
295
+ for (const spawn of reply.gitSpawns)
296
+ gitSpawns.publish(spawn);
297
+ if (current.job.kind === "examine" && examinations.hasSubscribers) {
298
+ examinations.publish({ ...timing, root: current.job.examination.rootPath,
299
+ ...("examined" in reply ? { result: reply.examined.kind,
300
+ ...(reply.examined.kind === "fallback" ? { reason: reply.examined.reason } : {}),
301
+ ...reply.examined.timings } : {}) });
302
+ }
303
+ // The freed thread takes its next job now; the caller's continuation is
304
+ // the next chunk of its rail and waits for a dispatcher turn.
305
+ if ("failure" in reply) {
306
+ const failure = restoreFailure(reply.failure);
307
+ queueTurn(() => current.reject(failure));
308
+ }
309
+ else
310
+ queueTurn(() => current.resolve(reply));
311
+ this.#dispatch();
312
+ this.#discover();
313
+ }
314
+ /** A thread that broke protocol takes no more work; its exit fails its job. */
315
+ #retire(thread) {
316
+ const index = this.#idle.indexOf(thread);
317
+ if (index >= 0)
318
+ this.#idle.splice(index, 1);
319
+ void thread.worker.terminate();
320
+ }
321
+ /** An exited thread fails only its own jobs, except a release, which its
322
+ * exit completed: its connections closed with it. Queued work gets a new
323
+ * thread. */
324
+ #lose(thread, error) {
325
+ if (thread === this.#discoverer)
326
+ this.#discoverer = null;
327
+ else if (!this.#threads.delete(thread))
328
+ return;
329
+ const index = this.#idle.indexOf(thread);
330
+ if (index >= 0)
331
+ this.#idle.splice(index, 1);
332
+ if (thread.current?.bulk)
333
+ this.#bulkRunning--;
334
+ for (const pending of [thread.current, ...thread.reserved]) {
335
+ if (pending?.job.kind === "release") {
336
+ pending.resolve({ id: pending.job.id, cpu: { user: 0, system: 0 }, released: pending.job.database });
337
+ }
338
+ else
339
+ pending?.reject(error);
340
+ }
341
+ thread.current = null;
342
+ thread.reserved.length = 0;
343
+ this.#dispatch();
344
+ this.#discover();
345
+ }
346
+ }
347
+ const pool = new ContentThreadPool();
348
+ holdGroundFiles(file => pool.release(file));
349
+ /** Start every content thread before any edit can need one: a thread boots
350
+ * in tens of milliseconds, which no edit may wait for. */
351
+ export function startContentThreads() {
352
+ pool.start();
353
+ }
354
+ /**
355
+ * Capture one stable file on a content thread: fingerprint check, one read
356
+ * feeding whole and block identity, text/binary evidence, and — with a cache
357
+ * directory — the immutable seal, named before this resolves unless a pass's
358
+ * `cargo` group holds it. `collect` returns the exact bytes read so a fused
359
+ * caller never reads the file again.
360
+ */
361
+ export function captureContent(sourceFile, expected, cacheDir, options) {
362
+ return pool.capture(sourceFile, expected, cacheDir, options.collect === true, options.lane, options.cargo ?? ALONE);
363
+ }
364
+ /**
365
+ * Seal held bytes in the machine content cache on a content thread: verify
366
+ * them against the artifact, publish them only over durable bytes, and leave
367
+ * their manifest as a hint. Resolves once the name is published, unless a
368
+ * pass's `cargo` group holds it; directory durability stays with the caller
369
+ * that commits a reference to it.
370
+ */
371
+ export function sealContent(cacheDir, artifact, bytes, origin, cargo = ALONE) {
372
+ return pool.seal(cacheDir, artifact, bytes, origin, cargo);
373
+ }
374
+ /**
375
+ * The manifest of a sealed artifact: its hint when that is exactly valid,
376
+ * otherwise derived again on a content thread from the retained bytes. A
377
+ * lost or corrupt hint therefore never fails a reader.
378
+ */
379
+ export async function contentManifest(cacheDir, artifact) {
380
+ return await readManifestHint(cacheDir, artifact) ?? pool.derive(cacheDir, artifact);
381
+ }
382
+ /**
383
+ * One bounded batch of literal repository reads on a content thread. The
384
+ * answers name what was read and its components; requests beyond the batch's
385
+ * byte bound return unread for another batch.
386
+ */
387
+ export function readLiteral(repository, format, requests, lane) {
388
+ return pool.literal(repository, format, requests, lane);
389
+ }
390
+ /**
391
+ * Examine one quiet root on a content thread: disk, O and Git compared by
392
+ * the same laws as the main walk, answering unchanged with what admission
393
+ * needs, or the first difference. Bulk work: edits never wait behind it.
394
+ */
395
+ export async function examineRootContent(examination) {
396
+ const result = await pool.examine(examination);
397
+ if (result.kind === "maintained")
398
+ throw new Error("content thread answered an examination with a maintenance visit");
399
+ return result;
400
+ }
401
+ /**
402
+ * Judge retained witnesses on a content thread, one verdict per proof leaf:
403
+ * null when every witness still holds, else the first that does not. The
404
+ * leaf's admission, if any, remains the caller's.
405
+ */
406
+ export function judgeSourceWitnesses(leaves, lane) {
407
+ return pool.close(leaves, lane);
408
+ }
409
+ /** One proof's physical close, its witnesses judged on a content thread and
410
+ * then its admission, which only this thread can answer, run here. */
411
+ export async function closePhysicallyOffThread(proof, lane) {
412
+ const leaves = proofLeaves(proof).filter(leaf => leaf.witnesses.length > 0);
413
+ const verdicts = leaves.length ? await pool.close(leaves.map(leaf => leaf.witnesses), lane) : [];
414
+ const failed = verdicts.find(verdict => verdict !== null);
415
+ if (failed)
416
+ throw restoreFailure(failed);
417
+ admitPhysically(proof);
418
+ }
419
+ /**
420
+ * The replay of one sealed text or link result, read from the cache and
421
+ * verified on a content thread. Complete-lane replays are bulk work.
422
+ */
423
+ export function replayCachedContent(cacheDir, request, lane) {
424
+ return pool.replay(cacheDir, request, lane);
425
+ }
426
+ /**
427
+ * Where some identities stand in one root's namespace, read on the discovery
428
+ * thread with its retained listings; a gap when it cannot say.
429
+ */
430
+ export function discoverRootIdentities(discovery) {
431
+ return pool.discover(discovery);
432
+ }
433
+ /**
434
+ * One repository's subtrees in the inventories asked, read in one transaction
435
+ * on a content thread with the incarnation and sequence it read. An edit
436
+ * waits on it, so it never queues as bulk.
437
+ */
438
+ export function readGroundTerritories(database, uuid, inventories) {
439
+ return pool.territories(database, uuid, inventories);
440
+ }
441
+ /**
442
+ * The root-relative addresses, outermost only, where one root's committed
443
+ * sharing is not yet its selection under `policy`, read on a content thread.
444
+ * The caller awaits the save that made the policy current, so every earlier
445
+ * admission is read.
446
+ */
447
+ export function readOwedAddresses(database, rootUUID, policy, bindingDir) {
448
+ return pool.owed(database, rootUUID, policy, bindingDir);
449
+ }
450
+ /**
451
+ * Visit one root on a content thread for maintenance: the same walk and
452
+ * comparison against O, answering with what differs and what it could not
453
+ * read. It concludes nothing. Bulk work: edits never wait behind it.
454
+ */
455
+ export async function maintainRootContent(maintenance) {
456
+ const result = await pool.examine(maintenance);
457
+ if (result.kind !== "maintained")
458
+ throw new Error("content thread answered a maintenance visit with an examination");
459
+ return result;
460
+ }
461
+ //# sourceMappingURL=content-capture-pool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-capture-pool.js","sourceRoot":"","sources":["../src/content-capture-pool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAS/C,OAAO,EAAE,UAAU,EAAmB,MAAM,kBAAkB,CAAC;AAI/D,OAAO,EAAE,KAAK,EAAmB,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EACL,gBAAgB,GAIjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAuB,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAoB,MAAM,mBAAmB,CAAC;AAEnF,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AA4JvC,MAAM,QAAQ,GA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AACH,MAAM,UAAU,sBAAsB,CAAC,SAA4B;IACjE,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CACnC,QAAgB,EAAE,IAAY,EAAE,WAAuC;IAEvE,OAAO,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;AACvD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,QAAgB,EAAE,QAAgB,EAAE,MAAc,EAClF,UAAkB;IAClB,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;AAC3D,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,WAA4B;IACpE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAC/C,IAAI,MAAM,CAAC,IAAI,KAAK,YAAY;QAAE,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;IACrH,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * One content thread. It runs exactly one capture, seal, manifest derivation,
3
+ * literal batch, root examination, maintenance visit, identity discovery,
4
+ * territory read, owed-selection read, cached replay, witness judgment or
5
+ * ground-file release at a time and answers with the result, or with the
6
+ * failure fields callers classify by.
7
+ */
8
+ export {};
@@ -0,0 +1,109 @@
1
+ /**
2
+ * One content thread. It runs exactly one capture, seal, manifest derivation,
3
+ * literal batch, root examination, maintenance visit, identity discovery,
4
+ * territory read, owed-selection read, cached replay, witness judgment or
5
+ * ground-file release at a time and answers with the result, or with the
6
+ * failure fields callers classify by.
7
+ */
8
+ import { subscribe } from "node:diagnostics_channel";
9
+ import { parentPort } from "node:worker_threads";
10
+ import { captureContentFile, contentBlockCollector, deriveCachedManifest, sealCapturedArtifact, } from "./content-cache-host.js";
11
+ import { describeFailure } from "./content-failure.js";
12
+ import { materializedWorkspaceBindings } from "./files-register-host.js";
13
+ import { discoverIdentities } from "./detection/identity-discovery.js";
14
+ import { cachedReplay } from "./detection/portable.js";
15
+ import { examineRoot } from "./detection/root-examination.js";
16
+ import { owedAddresses } from "./detection/owed-selection.js";
17
+ import { releaseThreadDatabase, threadDatabase } from "./detection/thread-database.js";
18
+ import { pinGitHost } from "./git-command.js";
19
+ import { readTerritories } from "./ground-basis.js";
20
+ import { readLiteralBatch } from "./git-literal-read.js";
21
+ import { judgeWitnesses } from "./source-witness.js";
22
+ const port = parentPort;
23
+ if (!port)
24
+ throw new Error("content capture must run on a worker thread");
25
+ // One job at a time, so every Git process this thread finishes is the job's.
26
+ let spawned = [];
27
+ subscribe("amalgm:git", spawn => { spawned.push(spawn); });
28
+ port.on("message", async (job) => {
29
+ let reply;
30
+ let transfer = [];
31
+ // This thread runs one job at a time, so its CPU delta is the job's.
32
+ const cpuBefore = process.threadCpuUsage();
33
+ const cpu = () => process.threadCpuUsage(cpuBefore);
34
+ try {
35
+ if (job.kind === "seal") {
36
+ const sealed = await sealCapturedArtifact(job.cacheDir, job.artifact, job.bytes);
37
+ reply = { id: job.id, cpu: cpu(), sealed };
38
+ }
39
+ else if (job.kind === "derive") {
40
+ const manifest = await deriveCachedManifest(job.cacheDir, job.artifact);
41
+ reply = { id: job.id, cpu: cpu(), manifest };
42
+ }
43
+ else if (job.kind === "examine") {
44
+ pinGitHost(job.git);
45
+ spawned = [];
46
+ const examined = await examineRoot(job.examination);
47
+ if (examined.kind === "examined")
48
+ transfer.push(examined.physical.buffer);
49
+ reply = { id: job.id, cpu: cpu(), examined, gitSpawns: spawned };
50
+ }
51
+ else if (job.kind === "close") {
52
+ const closed = job.leaves.map(witnesses => {
53
+ try {
54
+ judgeWitnesses(witnesses);
55
+ return null;
56
+ }
57
+ catch (error) {
58
+ return describeFailure(error);
59
+ }
60
+ });
61
+ reply = { id: job.id, cpu: cpu(), closed };
62
+ }
63
+ else if (job.kind === "territory") {
64
+ const territories = readTerritories(threadDatabase(job.database), job.uuid, job.inventories);
65
+ for (const pages of territories.subtrees)
66
+ for (const page of pages ?? [])
67
+ transfer.push(page.buffer);
68
+ reply = { id: job.id, cpu: cpu(), territories };
69
+ }
70
+ else if (job.kind === "owed") {
71
+ const bindings = materializedWorkspaceBindings(job.bindingDir).map(binding => binding.workspaceId);
72
+ reply = { id: job.id, cpu: cpu(), owed: owedAddresses(threadDatabase(job.database), { rootUUID: job.rootUUID, policy: job.policy, bindings }) };
73
+ }
74
+ else if (job.kind === "replay") {
75
+ const replay = await cachedReplay(job.cacheDir, job.request);
76
+ if (replay.kind === "file.text" && replay.delta)
77
+ transfer.push(replay.delta.insert.buffer);
78
+ reply = { id: job.id, cpu: cpu(), replay };
79
+ }
80
+ else if (job.kind === "release") {
81
+ releaseThreadDatabase(job.database);
82
+ reply = { id: job.id, cpu: cpu(), released: job.database };
83
+ }
84
+ else if (job.kind === "discover") {
85
+ reply = { id: job.id, cpu: cpu(), discovered: discoverIdentities(job.discovery) };
86
+ }
87
+ else if (job.kind === "literal") {
88
+ const literal = readLiteralBatch(job.repository, job.format, job.requests);
89
+ for (const answer of literal.answers) {
90
+ if (answer.kind === "leaf" && answer.leaf.content)
91
+ transfer.push(answer.leaf.content.buffer);
92
+ }
93
+ reply = { id: job.id, cpu: cpu(), literal };
94
+ }
95
+ else {
96
+ const collect = job.collect ? contentBlockCollector(Number(job.expected.size)) : null;
97
+ const captured = await captureContentFile(job.sourceFile, job.expected, job.cacheDir, collect);
98
+ const collected = collect ? collect.collected.buffer : null;
99
+ if (collected)
100
+ transfer = [collected];
101
+ reply = { id: job.id, cpu: cpu(), captured, collected };
102
+ }
103
+ }
104
+ catch (error) {
105
+ reply = { id: job.id, cpu: cpu(), failure: describeFailure(error) };
106
+ }
107
+ port.postMessage(reply, transfer);
108
+ });
109
+ //# sourceMappingURL=content-capture-worker.js.map
@@ -0,0 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