@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,242 @@
1
+ import type Database from "better-sqlite3";
2
+ import type { DetectBasisDescriptor } from "@amalgm/live";
3
+ import { type GroundRow, type SharingGroundRow } from "./ground-row.js";
4
+ import { TerritoryHandle } from "./ground-territory.js";
5
+ export type GroundInventory = "entities" | "detection_notebook";
6
+ export declare class GroundBasisChangedError extends Error {
7
+ }
8
+ /** The same phase owner applies to both the store and direct snapshot entry. */
9
+ export declare function assertGroundWriteAllowed(database: Database.Database): void;
10
+ /** A process's first open of the ground file. No basis or revision string of
11
+ * an earlier process can reach this one, so the stamps restart empty under a
12
+ * new incarnation; a basis read before this commit, by any connection, fails
13
+ * its incarnation check instead of reading a missing stamp as unchanged. The
14
+ * counter stays monotonic, so no S0 or sequence string repeats. */
15
+ export declare function beginGroundEpoch(database: Database.Database): void;
16
+ /** One row by UUID, outside any basis: a read that proves nothing. */
17
+ export declare const readGroundRow: (database: Database.Database, inventory: GroundInventory, uuid: string) => GroundRow | undefined;
18
+ /** The database incarnation that retires every basis read before a reset. */
19
+ export declare const groundIncarnation: (database: Database.Database) => string;
20
+ /** The last stamp any committed write issued: S0 for a read made with it. */
21
+ export declare const currentSequence: (database: Database.Database) => bigint;
22
+ /** The facts stamped after an open observation's S0, as of its latest read.
23
+ * Within an epoch a stamp only rises, so a fact once stamped after S0 stays
24
+ * so, and each late read adds only what was stamped since the read before.
25
+ * A late read then costs one range read over the writes since, however many
26
+ * facts it consumes, instead of a lookup per fact. */
27
+ declare class LaterStamps {
28
+ #private;
29
+ constructor(sequence: bigint);
30
+ /** Bring the set to the snapshot of the read transaction in progress. */
31
+ refresh(database: Database.Database): void;
32
+ has(id: string): boolean;
33
+ }
34
+ /** An open observation after its first read: the basis its reads extend,
35
+ * and the facts stamped after its S0. */
36
+ interface LateRead {
37
+ readonly basis: GroundBasis;
38
+ readonly stamps: LaterStamps;
39
+ }
40
+ /** One root's committed O/B state: equal exactly while no row of that root,
41
+ * in either inventory, has been written. */
42
+ export declare function rootRevision(database: Database.Database, rootUUID: string): string;
43
+ /** An enrolled repository's identity and address, without its state. */
44
+ export interface GroundRepositoryMember {
45
+ readonly uuid: string;
46
+ readonly rootUUID: string;
47
+ readonly absolutePath: string;
48
+ }
49
+ export interface GroundSnapshotReader {
50
+ /** Membership only: the answer depends on which active repositories exist,
51
+ * never on their rows' state. Effective activity (no trashed or deleted
52
+ * ancestor) narrows the candidates but is not a consumed fact: a consumer
53
+ * whose ancestry changes is reconciled through its own rows. */
54
+ repositoryMembers(): readonly GroundRepositoryMember[];
55
+ physical(uuid: string): GroundRow | undefined;
56
+ sharing(uuid: string): SharingGroundRow | undefined;
57
+ atPath(inventory: GroundInventory, rootUUID: string, relativePath: string): readonly GroundRow[];
58
+ /** One root's rows at one filesystem object: its identity candidates. */
59
+ physicalCandidates(inventory: GroundInventory, rootUUID: string, physicalKey: string): readonly GroundRow[];
60
+ /** Every row naming one filesystem object, in any root: its aliases. */
61
+ objectRows(inventory: GroundInventory, physicalKey: string): readonly GroundRow[];
62
+ subtree(inventory: GroundInventory, uuid: string): readonly GroundRow[];
63
+ /** An active repository's subtree with its placement; undefined for any
64
+ * other top. The same facts as its subtree. The handle answers after the
65
+ * snapshot while its view has not moved, and each row it returns is a row
66
+ * this observation read. */
67
+ territory(inventory: GroundInventory, uuid: string): TerritoryHandle | undefined;
68
+ rootsAtPath(inventory: GroundInventory, absolutePath: string): readonly GroundStructure[];
69
+ structure(inventory: GroundInventory, uuid: string): GroundStructure | undefined;
70
+ children(inventory: GroundInventory, parentUUID: string): readonly GroundNamespaceEntry[];
71
+ /** The children holding one portable name: a slot of the child relation,
72
+ * read by one probe however large the container. */
73
+ slot(inventory: GroundInventory, parentUUID: string, name: string): readonly GroundNamespaceEntry[];
74
+ /** A container's complete child relation, each member's whole row. */
75
+ members(inventory: GroundInventory, parentUUID: string): readonly GroundRow[];
76
+ /** null means this entire inventory, used only by a complete reconciliation. */
77
+ inventory(inventory: GroundInventory, rootUUID: string | null): readonly GroundRow[];
78
+ }
79
+ /** The first read fixes S0. Each later read is a late query: it answers with
80
+ * S0's facts only when every fact it consumed is unchanged since S0, else the
81
+ * whole observation fails. A later answer never replaces an original one. */
82
+ export interface GroundObservation {
83
+ read<T>(operation: (reader: GroundSnapshotReader) => T): T;
84
+ finish(): GroundBasis;
85
+ }
86
+ export type GroundNamespaceEntry = Readonly<Pick<GroundRow, "uuid" | "resourceId" | "rootUUID" | "parentUUID" | "name" | "type" | "status" | "relativePath" | "absolutePath">>;
87
+ export type GroundStructure = GroundNamespaceEntry & {
88
+ readonly association: {
89
+ readonly physicalKey: string;
90
+ readonly kind: number;
91
+ } | null;
92
+ };
93
+ /** A database incarnation, the sequence S0 it was read at, and the facts it
94
+ * consumed. Only an open observation can accumulate facts; admission receives
95
+ * a closed basis. */
96
+ export declare class GroundBasis {
97
+ #private;
98
+ private constructor();
99
+ /** How many facts admission must check; the cost of this basis. */
100
+ get size(): number;
101
+ /** Plain evidence of this basis. It lists the facts of a basis small
102
+ * enough to check one by one and counts a larger one. */
103
+ describe(): DetectBasisDescriptor;
104
+ /** What a saver thread needs to accept this basis: its facts, and every
105
+ * row it may protect. */
106
+ toData(): GroundBasisData;
107
+ static fromData(data: GroundBasisData): GroundBasis;
108
+ /** One basis consuming every part's facts and protecting every part's
109
+ * rows; all parts were read at one incarnation and S0. */
110
+ static union(parts: readonly GroundBasis[]): GroundBasis;
111
+ static observe(database: Database.Database): GroundObservation;
112
+ static capture<T>(database: Database.Database, operation: (reader: GroundSnapshotReader) => T, late?: LateRead): {
113
+ value: T;
114
+ basis: GroundBasis;
115
+ };
116
+ /** Same incarnation, and no consumed fact stamped after S0. Never compares
117
+ * the global counter with S0: unrelated writes do not invalidate. A small
118
+ * basis looks up each fact; a large one intersects the few facts stamped
119
+ * since S0, so the check is bounded by the smaller side. */
120
+ unchanged(database: Database.Database): boolean;
121
+ /** Every fact of this basis is a fact of one of these, read against the
122
+ * same incarnation and S0, so their unchanged answers are its answer. No
123
+ * expectation is merged: all of them are S0. */
124
+ within(parts: readonly GroundBasis[]): boolean;
125
+ /** Entities of one inventory written by anyone after S0, and roots whose
126
+ * visible generation changed after S0, each with the sequence that last
127
+ * stamped it. Each such root is a responsibility of its own: its rows can
128
+ * change without their own stamps. */
129
+ changedSince(database: Database.Database, inventory: GroundInventory): {
130
+ readonly entities: readonly (readonly [string, bigint])[];
131
+ readonly roots: readonly (readonly [string, bigint])[];
132
+ };
133
+ /** One admission unit's basis: the same incarnation and S0, over only the
134
+ * facts that unit consumed. Its answers derive from the S0 snapshot, so a
135
+ * fact unchanged since S0 is exactly the validity condition. An entity is
136
+ * protected only when the original observation could protect it; a
137
+ * scoped basis never widens allocation authority. */
138
+ scope(build: (keys: GroundScope) => void): GroundBasis;
139
+ /** A scoped inventory protects its existing rows. A proposed destination
140
+ * cannot prove that a missing UUID was originally absent everywhere. */
141
+ protects(inventory: GroundInventory, uuid: string, before: GroundRow | undefined): boolean;
142
+ includesInventory(inventory: GroundInventory, rootUUID: string): boolean;
143
+ /** May place a row this inventory never held: its root inventory, or its
144
+ * exact destination slot, was observed free. Identity history remains a
145
+ * separate proof; revision <= S0 never authorizes resurrection. */
146
+ allocates(inventory: GroundInventory, after: GroundRow): boolean;
147
+ }
148
+ /** A closed basis as plain data: facts by key, and each inventory's
149
+ * protected rows. */
150
+ export interface GroundBasisData {
151
+ readonly incarnation: string;
152
+ readonly sequence: bigint;
153
+ readonly facts: readonly string[];
154
+ readonly protected: Readonly<Record<GroundInventory, readonly string[]>>;
155
+ readonly inventories: readonly string[];
156
+ }
157
+ /** The facts one admission unit consumed, named by the query arguments that
158
+ * produced them. */
159
+ export interface GroundScope {
160
+ entity(inventory: GroundInventory, uuid: string, before: GroundRow | undefined): void;
161
+ structure(inventory: GroundInventory, uuid: string): void;
162
+ namespace(inventory: GroundInventory, uuid: string): void;
163
+ path(inventory: GroundInventory, rootUUID: string, relativePath: string): void;
164
+ physical(inventory: GroundInventory, rootUUID: string, physicalKey: string): void;
165
+ roots(inventory: GroundInventory, absolutePath: string): void;
166
+ repositories(): void;
167
+ /** Every row this repository owns: the package its Record carries. */
168
+ territory(inventory: GroundInventory, uuid: string): void;
169
+ }
170
+ export interface GroundTransition {
171
+ readonly inventory: GroundInventory;
172
+ readonly before: GroundRow | undefined;
173
+ readonly after: GroundRow | undefined;
174
+ }
175
+ type Placement = Pick<GroundRow, "parentUUID" | "type" | "status">;
176
+ /** The write changed an active repository's own head only; its placement in
177
+ * its owner's package, and so that territory, is unchanged. */
178
+ export declare const repositoryHeadOnly: (before: GroundRow | undefined, after: GroundRow | undefined) => boolean;
179
+ /** The nearest active repository strictly above each identity in one graph,
180
+ * memoized and safe on cycles: the owner whose territory the identity is. */
181
+ export declare function repositoryOwners(lookup: (uuid: string) => Placement | undefined): (uuid: string) => string | null;
182
+ /** Every warm view of one file stops: its receipts may be missing, or the
183
+ * file closed. */
184
+ export declare function retireGroundViews(file: string): void;
185
+ /** One committed saver write, as the main thread's warm views consume it. */
186
+ export interface GroundReceipt {
187
+ readonly incarnation: string;
188
+ readonly sequence: bigint;
189
+ /** The facts it stamped that a warm view can consume, by key. */
190
+ readonly stamped: readonly string[];
191
+ /** Per inventory, v8-serialized `[uuid, row | null, children | null][]`:
192
+ * each written row a territory can hold, as stored, with a present row's
193
+ * children whenever the write created or moved a row there, since only
194
+ * then can a row enter a territory. */
195
+ readonly written: Partial<Record<GroundInventory, Uint8Array>>;
196
+ }
197
+ export declare function saveGroundReceipts(database: Database.Database, sink: (receipt: GroundReceipt) => void): void;
198
+ export declare function registerReceiptSource(file: string, drain: (() => void) | null): void;
199
+ /** Receipts arrive in sequence order, and the main thread's own writes carry
200
+ * its views synchronously, so a view exact at an earlier sequence is exact
201
+ * just before this one. A view this write touches is carried from the rows
202
+ * it stored; one it cannot carry is dropped. */
203
+ export declare function carryGroundReceipt(file: string, receipt: GroundReceipt): void;
204
+ /** One repository's subtrees as a content thread read them: every inventory
205
+ * asked, in one read transaction, with the incarnation and sequence that
206
+ * transaction read, so each is exact at that sequence by construction. */
207
+ export interface TerritoryRead {
208
+ readonly incarnation: string;
209
+ readonly sequence: bigint;
210
+ /** Per inventory asked, in order: its subtree's pages (`subtreePages`), or
211
+ * none when its top is no active repository. */
212
+ readonly subtrees: readonly (readonly Uint8Array[] | null)[];
213
+ }
214
+ /** On a content thread's read-only connection. */
215
+ export declare function readTerritories(database: Database.Database, uuid: string, inventories: readonly GroundInventory[]): TerritoryRead;
216
+ /** Outside every snapshot, before one reads these repositories: the views no
217
+ * snapshot would find exact are read off this thread (`read`), built a page
218
+ * per step, and kept once a short read finds them exact now; each pair's
219
+ * agreement is compared a few rows per step. A view some write moved after
220
+ * its read is read again, a few times at most; one still moving is left to
221
+ * the snapshot, which reads it inside itself. */
222
+ export declare function prepareTerritories(database: Database.Database, repositories: Iterable<string>, read: (uuid: string, inventories: readonly GroundInventory[]) => Promise<TerritoryRead>): Promise<void>;
223
+ /** Stamps every fact these committed transitions change, and the activation
224
+ * vector of each root whose visible generation this transaction changed,
225
+ * with one new sequence, inside the caller's write transaction. Returns the
226
+ * stamp count and the step the caller runs after its outermost commit.
227
+ *
228
+ * A row placed where none stood, in a root whose first generation this
229
+ * transaction installs, beneath a parent placed the same way or none, is
230
+ * stamped by that vector alone. Every earlier answer it could join was
231
+ * empty of it and consumed that root's activation or `*`: an answer keyed
232
+ * inside the root names the root, one keyed by an absent identity or an
233
+ * object names `*`, and the aggregates and the root rows' namespaces
234
+ * are the vector's. A child list of a parent that stood consumed its own
235
+ * root's activation, so a row placed beneath one is stamped as usual. An
236
+ * installation therefore stamps a few facts however many rows it places,
237
+ * and no territory can hold its rows unless its activation is stamped. */
238
+ export declare function advanceGroundBasis(database: Database.Database, transitions: Iterable<GroundTransition>, activated: Iterable<string>, outermost: boolean): {
239
+ readonly writes: number;
240
+ readonly committed: () => void;
241
+ };
242
+ export {};