@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,287 @@
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 type { ContentManifest, LinkReplay, TextReplay, TransferArtifact } from "@amalgm/live";
47
+ import type { IdentityDiscovery, IdentityDiscoveryResult } from "./detection/identity-discovery.js";
48
+ import type { CachedReplayRequest } from "./detection/portable.js";
49
+ import type { GroundInventory, TerritoryRead } from "./ground-basis.js";
50
+ import type { RootExamination, RootExaminationResult, RootMaintenance, RootMaintenanceResult } from "./detection/root-examination.js";
51
+ import { type GitHostPin } from "./git-command.js";
52
+ import type { LiteralBatch, LiteralRequest } from "./git-literal-read.js";
53
+ import type { SourceWitness } from "./source-witness.js";
54
+ import { type CargoGroup } from "./cargo-group.js";
55
+ import { type CacheCapture, type CacheStage, type CapturedFileContent } from "./content-cache-host.js";
56
+ import { type CaptureFailure } from "./content-failure.js";
57
+ import { type SourceProof } from "./source-proof.js";
58
+ import type { SourceStat } from "./source-signature.js";
59
+ /** One capture as it crosses to a worker. The expected stat is plain data. */
60
+ export interface CaptureJob {
61
+ readonly kind: "capture";
62
+ readonly id: number;
63
+ readonly sourceFile: string;
64
+ readonly expected: SourceStat;
65
+ readonly cacheDir: string | null;
66
+ readonly collect: boolean;
67
+ }
68
+ /** Held bytes to seal. The worker owns `bytes`: they were transferred. */
69
+ export interface SealJob {
70
+ readonly kind: "seal";
71
+ readonly id: number;
72
+ readonly cacheDir: string;
73
+ readonly artifact: TransferArtifact;
74
+ readonly bytes: Uint8Array;
75
+ }
76
+ /** Rebuild a lost or invalid manifest hint from retained cache bytes. */
77
+ export interface DeriveJob {
78
+ readonly kind: "derive";
79
+ readonly id: number;
80
+ readonly cacheDir: string;
81
+ readonly artifact: TransferArtifact;
82
+ }
83
+ /** Literal reads of one repository's working paths, at most one bounded batch. */
84
+ export interface LiteralJob {
85
+ readonly kind: "literal";
86
+ readonly id: number;
87
+ readonly repository: string;
88
+ readonly format: string;
89
+ readonly requests: readonly LiteralRequest[];
90
+ }
91
+ /** One complete examination of a quiet root, or one maintenance visit of a
92
+ * root, through the dispatcher's Git. */
93
+ export interface ExamineJob {
94
+ readonly kind: "examine";
95
+ readonly id: number;
96
+ readonly examination: RootExamination | RootMaintenance;
97
+ readonly git: GitHostPin;
98
+ }
99
+ /** Where some identities stand in one root's namespace. */
100
+ export interface DiscoverJob {
101
+ readonly kind: "discover";
102
+ readonly id: number;
103
+ readonly discovery: IdentityDiscovery;
104
+ }
105
+ /** Retained witnesses to judge: one list per proof leaf, each in order. */
106
+ export interface CloseJob {
107
+ readonly kind: "close";
108
+ readonly id: number;
109
+ readonly leaves: readonly (readonly SourceWitness[])[];
110
+ }
111
+ /** One repository's subtrees in the inventories asked, from one ground file. */
112
+ export interface TerritoryJob {
113
+ readonly kind: "territory";
114
+ readonly id: number;
115
+ readonly database: string;
116
+ readonly uuid: string;
117
+ readonly inventories: readonly GroundInventory[];
118
+ }
119
+ /** Where one root's committed sharing is not yet its selection under a
120
+ * sharing policy, with the bindings whose declarations selection holds. */
121
+ export interface OwedJob {
122
+ readonly kind: "owed";
123
+ readonly id: number;
124
+ readonly database: string;
125
+ readonly rootUUID: string;
126
+ readonly policy: string;
127
+ readonly bindingDir: string;
128
+ }
129
+ /** One text or link replay, built from the sealed cache bytes it names. */
130
+ export interface ReplayJob {
131
+ readonly kind: "replay";
132
+ readonly id: number;
133
+ readonly cacheDir: string;
134
+ readonly request: CachedReplayRequest;
135
+ }
136
+ /** Close this thread's connection to one ground file. */
137
+ export interface ReleaseJob {
138
+ readonly kind: "release";
139
+ readonly id: number;
140
+ readonly database: string;
141
+ }
142
+ export type ContentJob = CaptureJob | SealJob | DeriveJob | LiteralJob | ExamineJob | DiscoverJob | CloseJob | TerritoryJob | OwedJob | ReplayJob | ReleaseJob;
143
+ /** CPU the capture thread itself spent on one job, in microseconds. */
144
+ export interface CaptureCpu {
145
+ readonly user: number;
146
+ readonly system: number;
147
+ }
148
+ export type ContentReply = {
149
+ readonly id: number;
150
+ readonly cpu: CaptureCpu;
151
+ readonly captured: CacheCapture;
152
+ readonly collected: ArrayBuffer | null;
153
+ } | {
154
+ readonly id: number;
155
+ readonly cpu: CaptureCpu;
156
+ readonly sealed: CacheStage;
157
+ } | {
158
+ readonly id: number;
159
+ readonly cpu: CaptureCpu;
160
+ readonly manifest: ContentManifest;
161
+ } | {
162
+ readonly id: number;
163
+ readonly cpu: CaptureCpu;
164
+ readonly literal: LiteralBatch;
165
+ } | {
166
+ readonly id: number;
167
+ readonly cpu: CaptureCpu;
168
+ readonly examined: RootExaminationResult | RootMaintenanceResult;
169
+ readonly gitSpawns: readonly unknown[];
170
+ } | {
171
+ readonly id: number;
172
+ readonly cpu: CaptureCpu;
173
+ readonly discovered: IdentityDiscoveryResult;
174
+ } | {
175
+ readonly id: number;
176
+ readonly cpu: CaptureCpu;
177
+ readonly closed: readonly (CaptureFailure | null)[];
178
+ } | {
179
+ readonly id: number;
180
+ readonly cpu: CaptureCpu;
181
+ readonly territories: TerritoryRead;
182
+ } | {
183
+ readonly id: number;
184
+ readonly cpu: CaptureCpu;
185
+ readonly owed: readonly string[];
186
+ } | {
187
+ readonly id: number;
188
+ readonly cpu: CaptureCpu;
189
+ readonly replay: TextReplay | LinkReplay;
190
+ } | {
191
+ readonly id: number;
192
+ readonly cpu: CaptureCpu;
193
+ readonly released: string;
194
+ } | {
195
+ readonly id: number;
196
+ readonly cpu: CaptureCpu;
197
+ readonly failure: CaptureFailure;
198
+ };
199
+ /** Which Detect lane asked: queue time is reported per lane. */
200
+ export type CaptureLane = "named" | "complete";
201
+ /** Apply's Verify reads literal leaves too; it is never bulk. */
202
+ export type LiteralLane = CaptureLane | "apply";
203
+ /** Who asked for a seal: queue and run time are reported per origin. */
204
+ export type SealOrigin = "detect-link" | "repository" | "apply" | "intentional";
205
+ /** A capture's result; `collected` holds the exact bytes read when asked. */
206
+ export interface PooledCapture extends CapturedFileContent {
207
+ readonly collected: Buffer | null;
208
+ }
209
+ /** Start every content thread before any edit can need one: a thread boots
210
+ * in tens of milliseconds, which no edit may wait for. */
211
+ export declare function startContentThreads(): void;
212
+ /**
213
+ * Capture one stable file on a content thread: fingerprint check, one read
214
+ * feeding whole and block identity, text/binary evidence, and — with a cache
215
+ * directory — the immutable seal, named before this resolves unless a pass's
216
+ * `cargo` group holds it. `collect` returns the exact bytes read so a fused
217
+ * caller never reads the file again.
218
+ */
219
+ export declare function captureContent(sourceFile: string, expected: SourceStat, cacheDir: string | null, options: {
220
+ readonly lane: CaptureLane;
221
+ readonly collect?: boolean;
222
+ readonly cargo?: CargoGroup;
223
+ }): Promise<PooledCapture>;
224
+ /**
225
+ * Seal held bytes in the machine content cache on a content thread: verify
226
+ * them against the artifact, publish them only over durable bytes, and leave
227
+ * their manifest as a hint. Resolves once the name is published, unless a
228
+ * pass's `cargo` group holds it; directory durability stays with the caller
229
+ * that commits a reference to it.
230
+ */
231
+ export declare function sealContent(cacheDir: string, artifact: TransferArtifact, bytes: Uint8Array, origin: SealOrigin, cargo?: CargoGroup): Promise<void>;
232
+ /**
233
+ * The manifest of a sealed artifact: its hint when that is exactly valid,
234
+ * otherwise derived again on a content thread from the retained bytes. A
235
+ * lost or corrupt hint therefore never fails a reader.
236
+ */
237
+ export declare function contentManifest(cacheDir: string, artifact: TransferArtifact): Promise<ContentManifest>;
238
+ /**
239
+ * One bounded batch of literal repository reads on a content thread. The
240
+ * answers name what was read and its components; requests beyond the batch's
241
+ * byte bound return unread for another batch.
242
+ */
243
+ export declare function readLiteral(repository: string, format: string, requests: readonly LiteralRequest[], lane: LiteralLane): Promise<LiteralBatch>;
244
+ /**
245
+ * Examine one quiet root on a content thread: disk, O and Git compared by
246
+ * the same laws as the main walk, answering unchanged with what admission
247
+ * needs, or the first difference. Bulk work: edits never wait behind it.
248
+ */
249
+ export declare function examineRootContent(examination: RootExamination): Promise<RootExaminationResult>;
250
+ /**
251
+ * Judge retained witnesses on a content thread, one verdict per proof leaf:
252
+ * null when every witness still holds, else the first that does not. The
253
+ * leaf's admission, if any, remains the caller's.
254
+ */
255
+ export declare function judgeSourceWitnesses(leaves: readonly (readonly SourceWitness[])[], lane: CaptureLane): Promise<readonly (CaptureFailure | null)[]>;
256
+ /** One proof's physical close, its witnesses judged on a content thread and
257
+ * then its admission, which only this thread can answer, run here. */
258
+ export declare function closePhysicallyOffThread(proof: SourceProof, lane: CaptureLane): Promise<void>;
259
+ /**
260
+ * The replay of one sealed text or link result, read from the cache and
261
+ * verified on a content thread. Complete-lane replays are bulk work.
262
+ */
263
+ export declare function replayCachedContent(cacheDir: string, request: CachedReplayRequest, lane: CaptureLane): Promise<TextReplay | LinkReplay>;
264
+ /**
265
+ * Where some identities stand in one root's namespace, read on the discovery
266
+ * thread with its retained listings; a gap when it cannot say.
267
+ */
268
+ export declare function discoverRootIdentities(discovery: IdentityDiscovery): Promise<IdentityDiscoveryResult>;
269
+ /**
270
+ * One repository's subtrees in the inventories asked, read in one transaction
271
+ * on a content thread with the incarnation and sequence it read. An edit
272
+ * waits on it, so it never queues as bulk.
273
+ */
274
+ export declare function readGroundTerritories(database: string, uuid: string, inventories: readonly GroundInventory[]): Promise<TerritoryRead>;
275
+ /**
276
+ * The root-relative addresses, outermost only, where one root's committed
277
+ * sharing is not yet its selection under `policy`, read on a content thread.
278
+ * The caller awaits the save that made the policy current, so every earlier
279
+ * admission is read.
280
+ */
281
+ export declare function readOwedAddresses(database: string, rootUUID: string, policy: string, bindingDir: string): Promise<readonly string[]>;
282
+ /**
283
+ * Visit one root on a content thread for maintenance: the same walk and
284
+ * comparison against O, answering with what differs and what it could not
285
+ * read. It concludes nothing. Bulk work: edits never wait behind it.
286
+ */
287
+ export declare function maintainRootContent(maintenance: RootMaintenance): Promise<RootMaintenanceResult>;