@amalgm/shell 0.1.164-main.39109658056 → 0.1.164-main.39172889515
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.
- package/PURPOSE.md +103 -46
- package/dist/accepted-tail.d.ts +5 -3
- package/dist/accepted-tail.js +5 -2
- package/dist/accepted-tail.js.map +1 -1
- package/dist/apply-bound-ground.d.ts +109 -0
- package/dist/apply-bound-ground.js +349 -0
- package/dist/apply-bound-ground.js.map +1 -0
- package/dist/apply-bound-root.d.ts +23 -0
- package/dist/apply-bound-root.js +42 -0
- package/dist/apply-bound-root.js.map +1 -0
- package/dist/apply-enter-build.d.ts +75 -0
- package/dist/apply-enter-build.js +134 -0
- package/dist/apply-enter-build.js.map +1 -0
- package/dist/apply-enter-plan.d.ts +48 -0
- package/dist/apply-enter-plan.js +90 -0
- package/dist/apply-enter-plan.js.map +1 -0
- package/dist/apply-flush.d.ts +8 -0
- package/dist/apply-flush.js +57 -0
- package/dist/apply-flush.js.map +1 -0
- package/dist/apply-git-storage.d.ts +27 -0
- package/dist/apply-git-storage.js +108 -0
- package/dist/apply-git-storage.js.map +1 -0
- package/dist/apply-line.d.ts +54 -0
- package/dist/apply-line.js +126 -0
- package/dist/apply-line.js.map +1 -0
- package/dist/apply-placement.d.ts +31 -0
- package/dist/apply-placement.js +133 -0
- package/dist/apply-placement.js.map +1 -0
- package/dist/apply-recovery.d.ts +51 -6
- package/dist/apply-recovery.js +81 -14
- package/dist/apply-recovery.js.map +1 -1
- package/dist/apply-rows.d.ts +57 -40
- package/dist/apply-rows.js +86 -63
- package/dist/apply-rows.js.map +1 -1
- package/dist/apply-saves.d.ts +51 -27
- package/dist/apply-saves.js +98 -50
- package/dist/apply-saves.js.map +1 -1
- package/dist/apply-showing.d.ts +19 -0
- package/dist/apply-showing.js +44 -0
- package/dist/apply-showing.js.map +1 -0
- package/dist/apply-spelling.d.ts +35 -0
- package/dist/apply-spelling.js +79 -0
- package/dist/apply-spelling.js.map +1 -0
- package/dist/authority-binding.d.ts +1 -24
- package/dist/authority-binding.js +43 -7
- package/dist/authority-binding.js.map +1 -1
- package/dist/bounded-for-each.d.ts +4 -2
- package/dist/bounded-for-each.js +12 -8
- package/dist/bounded-for-each.js.map +1 -1
- package/dist/content-cache-host.d.ts +25 -8
- package/dist/content-cache-host.js +137 -85
- package/dist/content-cache-host.js.map +1 -1
- package/dist/content-cache-index.d.ts +15 -4
- package/dist/content-cache-index.js +30 -18
- package/dist/content-cache-index.js.map +1 -1
- package/dist/content-capture-pool.d.ts +3 -2
- package/dist/content-capture-pool.js +5 -3
- package/dist/content-capture-pool.js.map +1 -1
- package/dist/content-capture-worker.js +4 -5
- package/dist/content-capture-worker.js.map +1 -1
- package/dist/content-clock.d.ts +12 -4
- package/dist/content-clock.js +44 -10
- package/dist/content-clock.js.map +1 -1
- package/dist/declaration-commit.d.ts +1 -1
- package/dist/declaration-save.d.ts +1 -1
- package/dist/declaration-save.js +10 -8
- package/dist/declaration-save.js.map +1 -1
- package/dist/derived-relocation.d.ts +27 -0
- package/dist/derived-relocation.js +67 -0
- package/dist/derived-relocation.js.map +1 -0
- package/dist/detection/admission-save.d.ts +8 -4
- package/dist/detection/admission-save.js +3 -2
- package/dist/detection/admission-save.js.map +1 -1
- package/dist/detection/apply-ownership.d.ts +1 -1
- package/dist/detection/apply-ownership.js +27 -28
- package/dist/detection/apply-ownership.js.map +1 -1
- package/dist/detection/basis-advanced.d.ts +4 -0
- package/dist/detection/basis-advanced.js +9 -0
- package/dist/detection/basis-advanced.js.map +1 -1
- package/dist/detection/capture-outcome.js +2 -1
- package/dist/detection/capture-outcome.js.map +1 -1
- package/dist/detection/container-membership.d.ts +11 -7
- package/dist/detection/container-membership.js +12 -6
- package/dist/detection/container-membership.js.map +1 -1
- package/dist/detection/git-notice.d.ts +16 -1
- package/dist/detection/git-notice.js +65 -34
- package/dist/detection/git-notice.js.map +1 -1
- package/dist/detection/ground-proof.d.ts +16 -6
- package/dist/detection/ground-proof.js +77 -34
- package/dist/detection/ground-proof.js.map +1 -1
- package/dist/detection/ground-reader.d.ts +9 -2
- package/dist/detection/ground-reader.js +39 -2
- package/dist/detection/ground-reader.js.map +1 -1
- package/dist/detection/held-survey.d.ts +39 -0
- package/dist/detection/held-survey.js +105 -0
- package/dist/detection/held-survey.js.map +1 -0
- package/dist/detection/held-territory.d.ts +29 -11
- package/dist/detection/held-territory.js +79 -30
- package/dist/detection/held-territory.js.map +1 -1
- package/dist/detection/identity-discovery.js +8 -18
- package/dist/detection/identity-discovery.js.map +1 -1
- package/dist/detection/maintenance-sweep.d.ts +5 -2
- package/dist/detection/maintenance-sweep.js +6 -2
- package/dist/detection/maintenance-sweep.js.map +1 -1
- package/dist/detection/owed-selection.js +2 -1
- package/dist/detection/owed-selection.js.map +1 -1
- package/dist/detection/own-channel.d.ts +17 -0
- package/dist/detection/own-channel.js +31 -0
- package/dist/detection/own-channel.js.map +1 -0
- package/dist/detection/portable.d.ts +30 -1
- package/dist/detection/portable.js +78 -4
- package/dist/detection/portable.js.map +1 -1
- package/dist/detection/repository-publication.d.ts +2 -0
- package/dist/detection/repository-publication.js +13 -11
- package/dist/detection/repository-publication.js.map +1 -1
- package/dist/detection/repository-routes.d.ts +17 -10
- package/dist/detection/repository-routes.js +56 -34
- package/dist/detection/repository-routes.js.map +1 -1
- package/dist/detection/repository-seals.d.ts +93 -0
- package/dist/detection/repository-seals.js +132 -0
- package/dist/detection/repository-seals.js.map +1 -0
- package/dist/detection/root-examination.d.ts +2 -0
- package/dist/detection/root-examination.js +10 -9
- package/dist/detection/root-examination.js.map +1 -1
- package/dist/detection/runtime.d.ts +23 -17
- package/dist/detection/runtime.js +109 -82
- package/dist/detection/runtime.js.map +1 -1
- package/dist/detection/scope-frame.d.ts +89 -0
- package/dist/detection/scope-frame.js +239 -0
- package/dist/detection/scope-frame.js.map +1 -0
- package/dist/detection/scoped-identity-port.d.ts +4 -3
- package/dist/detection/scoped-identity-port.js +5 -2
- package/dist/detection/scoped-identity-port.js.map +1 -1
- package/dist/detection/seal-law.d.ts +21 -28
- package/dist/detection/seal-law.js +28 -41
- package/dist/detection/seal-law.js.map +1 -1
- package/dist/detection/spelled-lookup.d.ts +15 -0
- package/dist/detection/spelled-lookup.js +59 -0
- package/dist/detection/spelled-lookup.js.map +1 -0
- package/dist/detection/verified-content.d.ts +1 -1
- package/dist/detection/verified-content.js +4 -9
- package/dist/detection/verified-content.js.map +1 -1
- package/dist/detection/walk-law.d.ts +8 -5
- package/dist/detection/walk-law.js +9 -6
- package/dist/detection/walk-law.js.map +1 -1
- package/dist/detection/walked-roots.d.ts +17 -0
- package/dist/detection/walked-roots.js +27 -0
- package/dist/detection/walked-roots.js.map +1 -0
- package/dist/entity-apply-host.d.ts +30 -11
- package/dist/entity-apply-host.js +1493 -1136
- package/dist/entity-apply-host.js.map +1 -1
- package/dist/entity-apply-store.d.ts +27 -30
- package/dist/entity-apply-store.js +52 -109
- package/dist/entity-apply-store.js.map +1 -1
- package/dist/entity-record-observability.d.ts +1 -1
- package/dist/entity-record-observability.js +31 -28
- package/dist/entity-record-observability.js.map +1 -1
- package/dist/entity-record-saves.d.ts +8 -4
- package/dist/entity-record-saves.js +20 -13
- package/dist/entity-record-saves.js.map +1 -1
- package/dist/entity-record-store.d.ts +6 -3
- package/dist/entity-record-store.js +62 -21
- package/dist/entity-record-store.js.map +1 -1
- package/dist/files-register-host.d.ts +8 -2
- package/dist/files-register-host.js +24 -12
- package/dist/files-register-host.js.map +1 -1
- package/dist/filesystem.d.ts +12 -0
- package/dist/filesystem.js +52 -2
- package/dist/filesystem.js.map +1 -1
- package/dist/git-binding.d.ts +38 -8
- package/dist/git-binding.js +279 -54
- package/dist/git-binding.js.map +1 -1
- package/dist/git-capture.d.ts +11 -7
- package/dist/git-capture.js +17 -47
- package/dist/git-capture.js.map +1 -1
- package/dist/git-card.js +11 -8
- package/dist/git-card.js.map +1 -1
- package/dist/git-checkpoint-construction.d.ts +15 -5
- package/dist/git-checkpoint-construction.js +54 -37
- package/dist/git-checkpoint-construction.js.map +1 -1
- package/dist/git-checkpoint-preparation.d.ts +7 -3
- package/dist/git-checkpoint-preparation.js +50 -27
- package/dist/git-checkpoint-preparation.js.map +1 -1
- package/dist/git-command.d.ts +4 -0
- package/dist/git-command.js +12 -3
- package/dist/git-command.js.map +1 -1
- package/dist/git-configuration.d.ts +3 -0
- package/dist/git-configuration.js +19 -4
- package/dist/git-configuration.js.map +1 -1
- package/dist/git-evidence.d.ts +16 -7
- package/dist/git-evidence.js +49 -17
- package/dist/git-evidence.js.map +1 -1
- package/dist/git-index-entries.d.ts +5 -0
- package/dist/git-index-entries.js +25 -5
- package/dist/git-index-entries.js.map +1 -1
- package/dist/git-index-format.d.ts +6 -20
- package/dist/git-index-format.js +89 -51
- package/dist/git-index-format.js.map +1 -1
- package/dist/git-index-witness.d.ts +4 -3
- package/dist/git-index-witness.js +12 -11
- package/dist/git-index-witness.js.map +1 -1
- package/dist/git-literal-batch.d.ts +81 -0
- package/dist/git-literal-batch.js +151 -0
- package/dist/git-literal-batch.js.map +1 -0
- package/dist/git-literal-host.d.ts +34 -42
- package/dist/git-literal-host.js +73 -63
- package/dist/git-literal-host.js.map +1 -1
- package/dist/git-literal-read.d.ts +13 -34
- package/dist/git-literal-read.js +30 -19
- package/dist/git-literal-read.js.map +1 -1
- package/dist/git-literal-replay.d.ts +36 -15
- package/dist/git-literal-replay.js +120 -45
- package/dist/git-literal-replay.js.map +1 -1
- package/dist/git-native-index.d.ts +11 -9
- package/dist/git-native-index.js +23 -27
- package/dist/git-native-index.js.map +1 -1
- package/dist/git-operation-host.d.ts +4 -2
- package/dist/git-operation-host.js +4 -1
- package/dist/git-operation-host.js.map +1 -1
- package/dist/git-private-repository.js +2 -5
- package/dist/git-private-repository.js.map +1 -1
- package/dist/git-private-view.d.ts +15 -3
- package/dist/git-private-view.js +96 -20
- package/dist/git-private-view.js.map +1 -1
- package/dist/git-registration-host.d.ts +6 -5
- package/dist/git-registration-host.js +11 -9
- package/dist/git-registration-host.js.map +1 -1
- package/dist/git-repository-host.d.ts +126 -30
- package/dist/git-repository-host.js +597 -250
- package/dist/git-repository-host.js.map +1 -1
- package/dist/git-spelling.d.ts +41 -0
- package/dist/git-spelling.js +233 -0
- package/dist/git-spelling.js.map +1 -0
- package/dist/git-tree-objects.d.ts +22 -0
- package/dist/git-tree-objects.js +205 -0
- package/dist/git-tree-objects.js.map +1 -0
- package/dist/graph-heads.d.ts +36 -0
- package/dist/graph-heads.js +57 -0
- package/dist/graph-heads.js.map +1 -0
- package/dist/ground-basis.d.ts +47 -52
- package/dist/ground-basis.js +145 -309
- package/dist/ground-basis.js.map +1 -1
- package/dist/ground-coordination.d.ts +6 -3
- package/dist/ground-coordination.js +9 -6
- package/dist/ground-coordination.js.map +1 -1
- package/dist/ground-database.js +67 -11
- package/dist/ground-database.js.map +1 -1
- package/dist/ground-install-saves.d.ts +1 -1
- package/dist/ground-install-saves.js +1 -2
- package/dist/ground-install-saves.js.map +1 -1
- package/dist/ground-inventory-schema.js +9 -5
- package/dist/ground-inventory-schema.js.map +1 -1
- package/dist/ground-marks.d.ts +64 -0
- package/dist/ground-marks.js +173 -0
- package/dist/ground-marks.js.map +1 -0
- package/dist/ground-root-index.d.ts +3 -2
- package/dist/ground-root-index.js +4 -3
- package/dist/ground-root-index.js.map +1 -1
- package/dist/ground-save-ops.d.ts +6 -3
- package/dist/ground-save-ops.js +6 -3
- package/dist/ground-save-ops.js.map +1 -1
- package/dist/ground-saver-worker.js +4 -20
- package/dist/ground-saver-worker.js.map +1 -1
- package/dist/ground-saver.d.ts +0 -4
- package/dist/ground-saver.js +3 -15
- package/dist/ground-saver.js.map +1 -1
- package/dist/ground-store.d.ts +6 -1
- package/dist/ground-store.js +42 -6
- package/dist/ground-store.js.map +1 -1
- package/dist/ground-territory.d.ts +90 -114
- package/dist/ground-territory.js +273 -444
- package/dist/ground-territory.js.map +1 -1
- package/dist/link-target.d.ts +2 -0
- package/dist/link-target.js +16 -0
- package/dist/link-target.js.map +1 -0
- package/dist/materialize-records.d.ts +68 -0
- package/dist/materialize-records.js +435 -0
- package/dist/materialize-records.js.map +1 -0
- package/dist/materialized-graph.d.ts +2 -1
- package/dist/materialized-graph.js +8 -1
- package/dist/materialized-graph.js.map +1 -1
- package/dist/physical-path-witness.d.ts +2 -0
- package/dist/physical-path-witness.js +8 -6
- package/dist/physical-path-witness.js.map +1 -1
- package/dist/placement-owed.d.ts +23 -0
- package/dist/placement-owed.js +25 -0
- package/dist/placement-owed.js.map +1 -0
- package/dist/placement-tidy.d.ts +57 -0
- package/dist/placement-tidy.js +313 -0
- package/dist/placement-tidy.js.map +1 -0
- package/dist/received-state.d.ts +30 -0
- package/dist/received-state.js +102 -0
- package/dist/received-state.js.map +1 -0
- package/dist/repository-checkpoint-file.d.ts +20 -0
- package/dist/repository-checkpoint-file.js +129 -0
- package/dist/repository-checkpoint-file.js.map +1 -0
- package/dist/repository-statement.d.ts +18 -0
- package/dist/repository-statement.js +33 -0
- package/dist/repository-statement.js.map +1 -0
- package/dist/settled.d.ts +9 -0
- package/dist/settled.js +15 -0
- package/dist/settled.js.map +1 -0
- package/dist/sha256.d.ts +3 -0
- package/dist/sha256.js +12 -0
- package/dist/sha256.js.map +1 -0
- package/dist/source-proof.d.ts +2 -15
- package/dist/source-proof.js +9 -4
- package/dist/source-proof.js.map +1 -1
- package/dist/source-signature.d.ts +14 -3
- package/dist/source-signature.js +14 -5
- package/dist/source-signature.js.map +1 -1
- package/dist/sqlite.js +8 -8
- package/dist/sqlite.js.map +1 -1
- package/dist/sync-setting.d.ts +2 -1
- package/dist/sync-setting.js.map +1 -1
- package/dist/turns.d.ts +4 -0
- package/dist/turns.js +17 -1
- package/dist/turns.js.map +1 -1
- package/dist/user-ground-host.d.ts +34 -24
- package/dist/user-ground-host.js +856 -1052
- package/dist/user-ground-host.js.map +1 -1
- package/dist/watching/fsevents.d.ts +5 -2
- package/dist/watching/fsevents.js +11 -3
- package/dist/watching/fsevents.js.map +1 -1
- package/dist/watching/git-storage.d.ts +22 -0
- package/dist/watching/git-storage.js +125 -0
- package/dist/watching/git-storage.js.map +1 -0
- package/dist/watching/host.d.ts +66 -12
- package/dist/watching/host.js +476 -160
- package/dist/watching/host.js.map +1 -1
- package/dist/watching/index.d.ts +3 -2
- package/dist/watching/index.js +2 -1
- package/dist/watching/index.js.map +1 -1
- package/dist/wire-client.js +1 -1
- package/examinations/fixtures/private-wire-authority.js +227 -107
- package/npm-shrinkwrap.json +6 -6
- package/package.json +5 -5
- package/dist/git-private-index.d.ts +0 -11
- package/dist/git-private-index.js +0 -42
- package/dist/git-private-index.js.map +0 -1
- package/dist/repository-identity-steps.d.ts +0 -5
- package/dist/repository-identity-steps.js +0 -33
- package/dist/repository-identity-steps.js.map +0 -1
package/PURPOSE.md
CHANGED
|
@@ -51,13 +51,16 @@ now is inaccessible, not wrong: its durable intent still owns the ground bound
|
|
|
51
51
|
there while its receipt, kept in that binding's control tree, waits unread. A
|
|
52
52
|
binding proved to be another object is unsafe. Neither poisons unrelated roots.
|
|
53
53
|
One preimage association represents source roots (including leaves) and descendant
|
|
54
|
-
directories.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
directories. Every Apply move, of a primary, a room sibling or a tidy, is one no-replace
|
|
55
|
+
move that puts ground first and rows after. Retirement, materialized or cancelled, places
|
|
56
|
+
each participant's rows in both inventories where its object stands, under its
|
|
57
|
+
actual binding and the basis that read them; it changes addresses only, never a
|
|
58
|
+
sharing result or accepted history. Admission and receipt binding share one
|
|
59
|
+
SQLite write transaction, including physical aliases whose pathname leases do
|
|
60
|
+
not overlap. Private unbound receipt
|
|
58
61
|
files grant no effects and cannot be adopted as earlier effect evidence.
|
|
59
62
|
Controlled full-ideal checks cover these recovery paths, including a stopped
|
|
60
|
-
primary rename and a second Apply targeting a still-owned
|
|
63
|
+
primary rename and a second Apply targeting a still-owned room sibling.
|
|
61
64
|
Complete native and multi-machine convergence remain unproved.
|
|
62
65
|
|
|
63
66
|
## Operating axioms
|
|
@@ -648,24 +651,49 @@ after adoption.
|
|
|
648
651
|
root whose own directory entry changed. If the directory at that address
|
|
649
652
|
is still the same device, inode, and filesystem creation generation its
|
|
650
653
|
content handle was opened on, that handle already covers everything inside
|
|
651
|
-
and the ring adds nothing;
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
is
|
|
655
|
-
|
|
654
|
+
and the ring adds nothing; a lost handle or a replaced directory retires
|
|
655
|
+
the handle and re-establishes coverage. The blind interval could hide an
|
|
656
|
+
effect through an alias in any root, so every root is put completely in
|
|
657
|
+
question. Ground that left is not lost coverage (Live's absence law):
|
|
658
|
+
every binding is declared at its physical address, and a declared root
|
|
659
|
+
that is missing, obstructed, or unreadable holds no handle, degrades
|
|
660
|
+
nothing, and is heard returning by its nearest listable ancestor's
|
|
661
|
+
address handle, while every other root keeps recording; a returning root
|
|
662
|
+
is caught up whole. Detect treats a root standing on another device than
|
|
663
|
+
it was bound on as unavailable too (`RootOffDevice`), while one re-created
|
|
664
|
+
on its bound device is the same workspace, read whole and compared (Live's
|
|
665
|
+
deletion law). Watch, the binding inventory, and Detect's domain
|
|
666
|
+
check ask one presence question (`presentDirectory`), so they never
|
|
667
|
+
disagree about which roots are there. The route Git takes from a
|
|
668
|
+
checkout to storage outside every root (each link it follows and each
|
|
669
|
+
directory it leaves by `..`, a gitfile it reads, the storage, its
|
|
670
|
+
`commondir` file, a linked worktree's common directory), resolved
|
|
671
|
+
physically as Git resolves it up to the first name Git cannot pass, is
|
|
672
|
+
declared to Watch as dependencies of
|
|
673
|
+
the root holding the checkout (`watching/git-storage.ts`): a storage
|
|
674
|
+
directory gets its own content and parent address handles, any other
|
|
675
|
+
name is heard at its parent's address handle filtered to its own change, every
|
|
676
|
+
ring is forwarded to `<checkout>/.git`, and absence or replacement rings
|
|
677
|
+
that path without degrading coverage. The route is read again when
|
|
678
|
+
repository membership changes and when a finished Detect pass read ground
|
|
679
|
+
holding the checkout. A checkout whose route Git cannot use yet keeps
|
|
680
|
+
declaring it as far as it reaches, so a repair anywhere on it is heard;
|
|
681
|
+
the walks that read it report it. On macOS each handle
|
|
682
|
+
is its own FSEvents stream through Amalgm's own binding
|
|
656
683
|
(`native/fsevents/`), which asks for per-file events delivered without
|
|
657
684
|
coalescing delay, so a ring reaches Detect at the platform floor and
|
|
658
685
|
opening or closing one never interrupts another; Node's own watcher serves
|
|
659
686
|
every handle in the process from one stream that it recreates, resuming
|
|
660
687
|
from the present, on every change, and loses the events in between.
|
|
661
|
-
Initialization failure or handle death is reported as
|
|
662
|
-
full-root suspicion, and retries independently of Detect;
|
|
663
|
-
reported as active coverage. A Linux descendant directory
|
|
664
|
-
enter is not lost coverage: its parent hears it. One that
|
|
665
|
-
no handle. One this process may not read keeps any handle it
|
|
666
|
-
and Detect names that ground unavailable, until an event on
|
|
667
|
-
again; entering it then ends an interval no handle heard, so
|
|
668
|
-
root is put in question. Only the root's own failure is lost
|
|
688
|
+
Initialization failure or handle death on present ground is reported as
|
|
689
|
+
degraded, retains full-root suspicion, and retries independently of Detect;
|
|
690
|
+
it can never be reported as active coverage. A Linux descendant directory
|
|
691
|
+
the tree cannot enter is not lost coverage: its parent hears it. One that
|
|
692
|
+
vanished needs no handle. One this process may not read keeps any handle it
|
|
693
|
+
already had, and Detect names that ground unavailable, until an event on
|
|
694
|
+
its name asks again; entering it then ends an interval no handle heard, so
|
|
695
|
+
its whole root is put in question. Only the root's own failure is lost
|
|
696
|
+
coverage.
|
|
669
697
|
|
|
670
698
|
17. **Independent content may travel concurrently; authority remains atomic.**
|
|
671
699
|
The host bounds parallel uploads for small immutable objects and processes
|
|
@@ -673,22 +701,29 @@ after adoption.
|
|
|
673
701
|
memory. The registry head advances only after every referenced object is
|
|
674
702
|
durably acknowledged.
|
|
675
703
|
|
|
676
|
-
18. **A Git repository travels through Git.**
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
and
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
and
|
|
704
|
+
18. **A Git repository travels through Git.** A `.git` that passes Git's own
|
|
705
|
+
structural test, read natively without running Git (`namesGitRepository`:
|
|
706
|
+
its storage holds a valid HEAD and its common directory holds `objects` and
|
|
707
|
+
`refs`; a `.git` link is followed, as Git follows it), classifies
|
|
708
|
+
`repo.git`, and the same test draws each nested boundary inside a
|
|
709
|
+
repository's capture. One Git would refuse is no repository: its
|
|
710
|
+
directory is a folder or workspace on the same UUID whose children travel
|
|
711
|
+
as ordinary entities until Git can use it again. `.git` itself, usable or
|
|
712
|
+
not, is never an entity. Past that test, a Git failure defers cloud
|
|
713
|
+
publication for that materialized root but never demotes the entity or
|
|
714
|
+
prevents the watching runtime and unrelated roots from becoming ready. The
|
|
715
|
+
host asks Git to pack the declared refs against the authority's known
|
|
716
|
+
object frontier and asks Git to index received packs. Every directory whose
|
|
717
|
+
`.git` Git can use begins its own repository rail. Ordinary children keep
|
|
718
|
+
their UUID rows locally and ride in the nearest repository state metadata;
|
|
719
|
+
a nested repository and its ancestry spine remain in the cloud graph, carry
|
|
720
|
+
their own Card + Checkpoint, and materialize after their enclosing
|
|
721
|
+
repository. The enclosing Card keeps its own Gitlink and index truth, but
|
|
722
|
+
its Checkpoint excludes the nested worktree because that state belongs
|
|
723
|
+
exclusively to the nested rail. Its enclosing identity entry carries only
|
|
724
|
+
path, UUID, and type—never the nested repository's payload head. A shallow
|
|
725
|
+
boundary travels with that metadata and is installed before Git reads the
|
|
726
|
+
imported objects.
|
|
692
727
|
|
|
693
728
|
19. **Live owns transfer; Shell owns transfer effects.** `@amalgm/live`
|
|
694
729
|
decides which entity types have artifacts, which chunks are missing, when
|
|
@@ -793,10 +828,19 @@ after adoption.
|
|
|
793
828
|
private repository without source remote configuration. Checkpoint decoding
|
|
794
829
|
and member verification have one private preparation owner, separate from
|
|
795
830
|
index installation and working-file effects. Replay consumes and closes that
|
|
796
|
-
preparation; it does not maintain a second package validator.
|
|
797
|
-
entries
|
|
798
|
-
|
|
799
|
-
|
|
831
|
+
preparation; it does not maintain a second package validator. A sparse
|
|
832
|
+
index's folder entries, each one tree outside the cone, are read as Git
|
|
833
|
+
writes them and are their files' meaning. Git is never handed a sparse
|
|
834
|
+
index beside borrowed objects: Git expands one by writing every tree it
|
|
835
|
+
expands, and writing an object Git already holds refreshes the source
|
|
836
|
+
file's time, so the read would ring the repository's own Watch and each
|
|
837
|
+
capture would cause the next. Inventory that needs those files asks one
|
|
838
|
+
Git tree reader over borrowed objects, and Git lists untracked names over
|
|
839
|
+
the full index written from them in private storage, borrowing no
|
|
840
|
+
objects. Any stderr fails either read, because Git reports a tree or a
|
|
841
|
+
folder it cannot read yet exits 0 without it, and Shell's Git is asked for
|
|
842
|
+
no advice. No incomplete inventory escapes, and no source index or object
|
|
843
|
+
is written. A form Git never
|
|
800
844
|
writes, or a required extension Git would not understand, is refused
|
|
801
845
|
rather than guessed. A zero split link has no shared-base dependency.
|
|
802
846
|
Fast reuse closes the complete metadata/namespace proof, whose index
|
|
@@ -1080,7 +1124,12 @@ after adoption.
|
|
|
1080
1124
|
parent and name operations with that grammar, preserving `\\` as a literal
|
|
1081
1125
|
character, and only then resolves those components with the host platform's
|
|
1082
1126
|
path semantics for a filesystem effect. Durable records never rewrite or
|
|
1083
|
-
mix separators accidentally.
|
|
1127
|
+
mix separators accidentally. A link's target text is portable grammar
|
|
1128
|
+
too, as in Git: it travels with `/`, and only a Windows host converts it,
|
|
1129
|
+
`/` to `\` when writing a link and `\` back to `/` when reading one
|
|
1130
|
+
(`src/link-target.ts`). A target with no Windows spelling, such as a
|
|
1131
|
+
literal `\` or a drive-less absolute path, cannot be reproduced there.
|
|
1132
|
+
Bindings and managed references are machine-local paths and stay native.
|
|
1084
1133
|
|
|
1085
1134
|
37. **Git materialization reproduces Card bytes independently of machine
|
|
1086
1135
|
preferences.** A repository created by Add disables receiver-global line
|
|
@@ -1622,7 +1671,11 @@ after adoption.
|
|
|
1622
1671
|
them and never creates, replaces, or removes that nested worktree. Paused
|
|
1623
1672
|
rebase, cherry-pick, and revert state is not yet represented
|
|
1624
1673
|
by the current contract and refuses explicitly rather than being mistaken
|
|
1625
|
-
for transient work or flattened into a clean stage-zero entry.
|
|
1674
|
+
for transient work or flattened into a clean stage-zero entry. Unchanged
|
|
1675
|
+
ground answers that refusal every time, so Detect withholds only that
|
|
1676
|
+
repository's unit and asks again only when its ground, Git storage
|
|
1677
|
+
included, rings; no timer repeats the read. A fault likewise withholds
|
|
1678
|
+
only its own repository's unit, and the pass retries it on its timer.
|
|
1626
1679
|
|
|
1627
1680
|
Scheduling never extends source evidence. A suspended walk retains its
|
|
1628
1681
|
physical identity basis, rechecks it before repository reuse or capture,
|
|
@@ -1650,12 +1703,16 @@ after adoption.
|
|
|
1650
1703
|
|
|
1651
1704
|
74. **Same-slot records keep identity and derive distinct disk addresses.**
|
|
1652
1705
|
Shell never rewrites a portable name to settle concurrent identities.
|
|
1653
|
-
Cold materialization and
|
|
1654
|
-
the complete active sibling set; Detect
|
|
1655
|
-
and that exact derived name as the same
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1706
|
+
Cold materialization, Apply and the placement tidy derive the same
|
|
1707
|
+
UUID-ordered suffixes from the complete active sibling set; Detect
|
|
1708
|
+
recognizes both the portable name and that exact derived name as the same
|
|
1709
|
+
record. A reveal moves only the siblings standing in its target's derived
|
|
1710
|
+
address. Every other sibling-set consequence is a placement note, written
|
|
1711
|
+
in the transaction that changed the slot, which the placement tidy pays
|
|
1712
|
+
off the Apply line. Each such move is one no-replace move, ground first
|
|
1713
|
+
and rows after, never onto an address the observation inventory records
|
|
1714
|
+
for another, so a crash leaves at most one move whose destination was
|
|
1715
|
+
free and Detect re-proves the same portable identities.
|
|
1659
1716
|
|
|
1660
1717
|
75. **Ground storage has one initializer and one visible generation per root.**
|
|
1661
1718
|
A ground file's migration and its process epoch run once per file per
|
package/dist/accepted-tail.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The accepted tail: the latest authority-accepted result of every entity
|
|
3
3
|
* delivered in (M, N], read in one SQLite transaction together with the local
|
|
4
|
-
* delivery cursor
|
|
4
|
+
* delivery cursor and its history floor. N is the cursor, or an earlier
|
|
5
|
+
* position the cursor has passed.
|
|
5
6
|
*
|
|
6
7
|
* The Inbox holds every authority record above the floor through the cursor.
|
|
7
8
|
* A tail may begin only at or above that floor: below it this machine never
|
|
@@ -18,9 +19,10 @@ export declare class AcceptedHistoryUnavailableError extends Error {
|
|
|
18
19
|
export interface AcceptedTail {
|
|
19
20
|
/** M: the base the tail folds onto. */
|
|
20
21
|
readonly after: number;
|
|
21
|
-
/** N: the
|
|
22
|
+
/** N: the position the tail runs through, never past the local gap-free
|
|
23
|
+
* authority cursor. */
|
|
22
24
|
readonly through: number;
|
|
23
25
|
/** The latest accepted result per entity in (after, through]. */
|
|
24
26
|
readonly results: readonly CloudEntityRecord[];
|
|
25
27
|
}
|
|
26
|
-
export declare function readAcceptedTail(database: Database.Database, authorityId: string, after: number): AcceptedTail;
|
|
28
|
+
export declare function readAcceptedTail(database: Database.Database, authorityId: string, after: number, until?: number): AcceptedTail;
|
package/dist/accepted-tail.js
CHANGED
|
@@ -9,14 +9,17 @@ export class AcceptedHistoryUnavailableError extends Error {
|
|
|
9
9
|
this.name = "AcceptedHistoryUnavailableError";
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
export function readAcceptedTail(database, authorityId, after) {
|
|
12
|
+
export function readAcceptedTail(database, authorityId, after, until) {
|
|
13
13
|
return database.transaction(() => {
|
|
14
14
|
const cursor = database.prepare(`
|
|
15
15
|
SELECT received_through AS through, history_floor AS floor
|
|
16
16
|
FROM authority_delivery_cursors WHERE authority_id = ?
|
|
17
17
|
`).get(authorityId);
|
|
18
|
-
const
|
|
18
|
+
const received = cursor?.through ?? 0;
|
|
19
|
+
const through = until ?? received;
|
|
19
20
|
const floor = cursor?.floor ?? 0;
|
|
21
|
+
if (received < through)
|
|
22
|
+
throw new Error(`local delivery cursor ${received} has not reached ${through}`);
|
|
20
23
|
if (through < after) {
|
|
21
24
|
throw new Error("local delivery cursor is behind the active snapshot watermark");
|
|
22
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accepted-tail.js","sourceRoot":"","sources":["../src/accepted-tail.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"accepted-tail.js","sourceRoot":"","sources":["../src/accepted-tail.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,0BAA0B,EAA0B,MAAM,cAAc,CAAC;AAElF,MAAM,OAAO,+BAAgC,SAAQ,KAAK;IACnC;IAAwB;IAA7C,YAAqB,KAAa,EAAW,KAAa;QACxD,KAAK,CAAC,mCAAmC,KAAK,qCAAqC,KAAK,EAAE,CAAC,CAAC;QADzE,UAAK,GAAL,KAAK,CAAQ;QAAW,UAAK,GAAL,KAAK,CAAQ;QAExD,IAAI,CAAC,IAAI,GAAG,iCAAiC,CAAC;IAChD,CAAC;CACF;AAYD,MAAM,UAAU,gBAAgB,CAC9B,QAA2B,EAC3B,WAAmB,EACnB,KAAa,EACb,KAAc;IAEd,OAAO,QAAQ,CAAC,WAAW,CAAC,GAAiB,EAAE;QAC7C,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC;;;KAG/B,CAAC,CAAC,GAAG,CAAC,WAAW,CAAmD,CAAC;QACtE,MAAM,QAAQ,GAAG,MAAM,EAAE,OAAO,IAAI,CAAC,CAAC;QACtC,MAAM,OAAO,GAAG,KAAK,IAAI,QAAQ,CAAC;QAClC,MAAM,KAAK,GAAG,MAAM,EAAE,KAAK,IAAI,CAAC,CAAC;QACjC,IAAI,QAAQ,GAAG,OAAO;YAAE,MAAM,IAAI,KAAK,CAAC,yBAAyB,QAAQ,oBAAoB,OAAO,EAAE,CAAC,CAAC;QACxG,IAAI,OAAO,GAAG,KAAK,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;QACnF,CAAC;QACD,IAAI,KAAK,GAAG,KAAK;YAAE,MAAM,IAAI,+BAA+B,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAC3E,MAAM,MAAM,GAAG,IAAI,GAAG,EAA6B,CAAC;QACpD,KAAK,MAAM,EAAE,UAAU,EAAE,IAAI,QAAQ,CAAC,OAAO,CAAC;;;;KAI7C,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,EAAE,OAAO,CAAqC,EAAE,CAAC;YAC5E,MAAM,QAAQ,GAAG,0BAA0B,CAAC,UAAU,CAAC,CAAC;YACxD,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACxD,CAAC;QACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC;IAC3D,CAAC,CAAC,EAAE,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { type ApplyPreimage, type ApplyRecovery } from "./apply-recovery.js";
|
|
2
|
+
export type BoundGroundEffect = "complete" | "prefix" | "foreign";
|
|
3
|
+
/** The host's exact readings, each judged as the receipt's intent judges.
|
|
4
|
+
* Ground the host refuses to read is ground Apply never produces, so it
|
|
5
|
+
* matches nothing. */
|
|
6
|
+
export interface BoundGroundPort {
|
|
7
|
+
/** Whether `path` holds exactly the target, read as if it stood at the target address. */
|
|
8
|
+
matchesTarget(path: string): Promise<boolean>;
|
|
9
|
+
/** Whether `path` holds `preimage`'s complete ground unchanged. */
|
|
10
|
+
matchesPreimage(preimage: ApplyPreimage, path: string): Promise<boolean>;
|
|
11
|
+
/** Whether the present target's materialized parent stands at the target address's parent. */
|
|
12
|
+
parentStands(): boolean;
|
|
13
|
+
}
|
|
14
|
+
export type ReceiptMove = ApplyRecovery["moves"][number];
|
|
15
|
+
/** The private names one bound intent may hold beneath its control tree. */
|
|
16
|
+
export declare const displacedPath: (control: string) => string;
|
|
17
|
+
export declare const appliedPath: (control: string) => string;
|
|
18
|
+
export declare const relocatedPath: (control: string, uuid: string) => string;
|
|
19
|
+
/** The private names whose directory entries a bound intent's moves change.
|
|
20
|
+
* Both terminal commits flush their parents with the receipt's addresses. */
|
|
21
|
+
export declare const controlEntries: (recovery: ApplyRecovery, control: string) => readonly string[];
|
|
22
|
+
/**
|
|
23
|
+
* The receipt's sibling moves still to perform, in an order that performs
|
|
24
|
+
* them, and those a person blocked. Each makes room for the target, so none
|
|
25
|
+
* waits for the target to leave its source.
|
|
26
|
+
*
|
|
27
|
+
* - A move is a candidate while its source holds the sibling's own anchor. A
|
|
28
|
+
* sibling at neither address was moved by a person, and Detect owns it.
|
|
29
|
+
* - A candidate is kept when no spelling of its destination finds an object,
|
|
30
|
+
* or the object found leaves first: the sibling itself, or an earlier kept
|
|
31
|
+
* sibling.
|
|
32
|
+
* - Any other candidate is blocked: an object Apply never moves stands where
|
|
33
|
+
* the sibling must go. A blocked move is released; the sibling keeps its
|
|
34
|
+
* address.
|
|
35
|
+
*/
|
|
36
|
+
export declare function pendingMoves(recovery: ApplyRecovery): {
|
|
37
|
+
kept: readonly ReceiptMove[];
|
|
38
|
+
blocked: readonly ReceiptMove[];
|
|
39
|
+
};
|
|
40
|
+
/** Whether a repository relocation group still stands at its source, its own
|
|
41
|
+
* object, not yet moved aside. Each group moves into the control tree once
|
|
42
|
+
* the reveal has recreated it from the parcel, proved again right before its
|
|
43
|
+
* move; retirement then proves it unchanged (releaseChangedRelocations). */
|
|
44
|
+
export declare function relocationPending(entry: ApplyRecovery["relocated"][number], control: string): boolean;
|
|
45
|
+
/** The receipt's repository relocation groups still pending. */
|
|
46
|
+
export declare function pendingRelocated(recovery: ApplyRecovery, control: string): ApplyRecovery["relocated"];
|
|
47
|
+
/** The rules in order; the first that decides is the answer. */
|
|
48
|
+
export declare function classifyBoundGround(recovery: ApplyRecovery, control: string, port: BoundGroundPort): Promise<BoundGroundEffect>;
|
|
49
|
+
/** Whether the source stands where the reveal's own steps may have left it:
|
|
50
|
+
* at its home, at the target, or displaced. A source anywhere else was
|
|
51
|
+
* replaced or removed by a person after the final guard, so the reveal acts
|
|
52
|
+
* on none of its ground and Verify finds the person's version. A create has
|
|
53
|
+
* no source, and its address is judged by the reveal's own install. */
|
|
54
|
+
export declare function sourceStands(recovery: ApplyRecovery, control: string): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Cancellation keeps every local version without replacing other ground.
|
|
57
|
+
* The person's version is home-bound when the reveal moved it away from its
|
|
58
|
+
* home (the source's address, or the target's for a create): a changed
|
|
59
|
+
* displaced source, or a source still at home. The reveal is then undone in
|
|
60
|
+
* reverse order, so that version stands at its home before the intent
|
|
61
|
+
* retires. Otherwise the person's version stands where the reveal put it,
|
|
62
|
+
* the reveal's own moves stand with it, and one interrupted between its link
|
|
63
|
+
* and its unlink finishes.
|
|
64
|
+
*
|
|
65
|
+
* 1. The primary. A person's write that reached a name the address still
|
|
66
|
+
* holds stays there, and the private name goes. An unchanged displaced
|
|
67
|
+
* source is no person's version; retirement deletes it. A present result
|
|
68
|
+
* leaves its address into `applied` before it is judged, so no write can
|
|
69
|
+
* reach it between the judgment and the move; only an exact target stays
|
|
70
|
+
* aside, and anything else returns to the address it left as a second
|
|
71
|
+
* local version. A primary between its link and its unlink keeps its home
|
|
72
|
+
* name, where a person's write through either name stands.
|
|
73
|
+
* 2. The person's version returns home.
|
|
74
|
+
* 3. The siblings that left the target's address before it, once the primary
|
|
75
|
+
* has left it again.
|
|
76
|
+
*
|
|
77
|
+
* Once it begins returning a version, every retry continues that return:
|
|
78
|
+
* the displaced name holds only the source (the reveal never displaces
|
|
79
|
+
* another object), so a returned source stands at its home, and a result
|
|
80
|
+
* held aside in `applied` stays there until retirement. Only a person who
|
|
81
|
+
* replaces the returned version at home before a crashed retry ends that
|
|
82
|
+
* evidence (docs/entity-apply.md, Returned version replaced). Every move only
|
|
83
|
+
* fills a vacant address beneath a standing parent, so a sibling whose
|
|
84
|
+
* address a person took keeps where it stands, and Detect owns it. A
|
|
85
|
+
* version that cannot return (a second local version, or a home a person
|
|
86
|
+
* filled or whose parent they removed) stays where it is, and recovery
|
|
87
|
+
* throws for explicit repair with every version kept. Each step skips what
|
|
88
|
+
* an interrupted attempt already did. Cancellation then flushes the
|
|
89
|
+
* receipt's whole footprint, so a retry that finds a move already done
|
|
90
|
+
* still flushes it before the intent can retire.
|
|
91
|
+
*/
|
|
92
|
+
export declare function restoreBoundLocal(recovery: ApplyRecovery, control: string, port: BoundGroundPort): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* Displaced Git storage a person changed is the person's version: it returns
|
|
95
|
+
* as the marker of the folder whose storage it was, under the same law as
|
|
96
|
+
* every other return, and Detect records it once the intent retires. The
|
|
97
|
+
* receipt's manifest stays, so a crash before the cancelled commit reads the
|
|
98
|
+
* returned storage against it and is foreign again. Unchanged storage stays
|
|
99
|
+
* for retirement to delete. Cancellation calls this after restoreBoundLocal,
|
|
100
|
+
* which may have returned the folder home.
|
|
101
|
+
*/
|
|
102
|
+
export declare function releaseChangedGitStorage(recovery: ApplyRecovery, control: string): Promise<void>;
|
|
103
|
+
/**
|
|
104
|
+
* A relocation group a person changed, before or after the reveal moved it
|
|
105
|
+
* aside, is the person's version: it returns to its own address and Detect
|
|
106
|
+
* records it once the intent retires. Only unchanged groups stay for
|
|
107
|
+
* retirement to delete. Either retirement calls this before its proof.
|
|
108
|
+
*/
|
|
109
|
+
export declare function releaseChangedRelocations(recovery: ApplyRecovery, control: string, port: BoundGroundPort): Promise<void>;
|