@amalgm/live 0.2.81-main.39107155915 → 0.2.81-main.39176188543
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 +91 -68
- package/dist/apply/contracts.d.ts +150 -70
- package/dist/apply/contracts.d.ts.map +1 -1
- package/dist/apply/contracts.js +14 -1
- package/dist/apply/contracts.js.map +1 -1
- package/dist/apply/expected-repository.d.ts +49 -0
- package/dist/apply/expected-repository.d.ts.map +1 -0
- package/dist/apply/expected-repository.js +125 -0
- package/dist/apply/expected-repository.js.map +1 -0
- package/dist/apply/index.d.ts +5 -0
- package/dist/apply/index.d.ts.map +1 -1
- package/dist/apply/index.js +5 -0
- package/dist/apply/index.js.map +1 -1
- package/dist/apply/journey.d.ts +32 -0
- package/dist/apply/journey.d.ts.map +1 -0
- package/dist/apply/journey.js +335 -0
- package/dist/apply/journey.js.map +1 -0
- package/dist/apply/line.d.ts +42 -0
- package/dist/apply/line.d.ts.map +1 -0
- package/dist/apply/line.js +62 -0
- package/dist/apply/line.js.map +1 -0
- package/dist/apply/local-work.d.ts +10 -5
- package/dist/apply/local-work.d.ts.map +1 -1
- package/dist/apply/local-work.js +18 -8
- package/dist/apply/local-work.js.map +1 -1
- package/dist/apply/plans.d.ts +5 -3
- package/dist/apply/plans.d.ts.map +1 -1
- package/dist/apply/plans.js +11 -8
- package/dist/apply/plans.js.map +1 -1
- package/dist/apply/rail.d.ts +25 -12
- package/dist/apply/rail.d.ts.map +1 -1
- package/dist/apply/rail.js +309 -604
- package/dist/apply/rail.js.map +1 -1
- package/dist/apply/repository-boundaries.d.ts +60 -7
- package/dist/apply/repository-boundaries.d.ts.map +1 -1
- package/dist/apply/repository-boundaries.js +61 -11
- package/dist/apply/repository-boundaries.js.map +1 -1
- package/dist/apply/repository-paths.d.ts +33 -0
- package/dist/apply/repository-paths.d.ts.map +1 -0
- package/dist/apply/repository-paths.js +67 -0
- package/dist/apply/repository-paths.js.map +1 -0
- package/dist/apply/repository-result.d.ts +10 -26
- package/dist/apply/repository-result.d.ts.map +1 -1
- package/dist/apply/repository-result.js +50 -84
- package/dist/apply/repository-result.js.map +1 -1
- package/dist/apply/selection.d.ts +11 -4
- package/dist/apply/selection.d.ts.map +1 -1
- package/dist/apply/selection.js +43 -6
- package/dist/apply/selection.js.map +1 -1
- package/dist/apply/settling.d.ts +44 -0
- package/dist/apply/settling.d.ts.map +1 -0
- package/dist/apply/settling.js +36 -0
- package/dist/apply/settling.js.map +1 -0
- package/dist/apply/showing.d.ts +52 -0
- package/dist/apply/showing.d.ts.map +1 -0
- package/dist/apply/showing.js +66 -0
- package/dist/apply/showing.js.map +1 -0
- package/dist/apply/shown-checkpoint.d.ts +13 -0
- package/dist/apply/shown-checkpoint.d.ts.map +1 -0
- package/dist/apply/shown-checkpoint.js +112 -0
- package/dist/apply/shown-checkpoint.js.map +1 -0
- package/dist/detection/classify.d.ts +10 -6
- package/dist/detection/classify.d.ts.map +1 -1
- package/dist/detection/classify.js +6 -5
- package/dist/detection/classify.js.map +1 -1
- package/dist/detection/index.d.ts +0 -2
- package/dist/detection/index.d.ts.map +1 -1
- package/dist/detection/index.js +0 -2
- package/dist/detection/index.js.map +1 -1
- package/dist/detection/refusal.d.ts +7 -1
- package/dist/detection/refusal.d.ts.map +1 -1
- package/dist/detection/refusal.js +10 -3
- package/dist/detection/refusal.js.map +1 -1
- package/dist/detection/scoped-identity.d.ts +4 -1
- package/dist/detection/scoped-identity.d.ts.map +1 -1
- package/dist/detection/scoped-identity.js.map +1 -1
- package/dist/entities/bytes.d.ts +3 -0
- package/dist/entities/bytes.d.ts.map +1 -1
- package/dist/entities/bytes.js +20 -0
- package/dist/entities/bytes.js.map +1 -1
- package/dist/entities/cloud.d.ts +20 -10
- package/dist/entities/cloud.d.ts.map +1 -1
- package/dist/entities/cloud.js +28 -17
- package/dist/entities/cloud.js.map +1 -1
- package/dist/entities/digest-steps.d.ts +14 -0
- package/dist/entities/digest-steps.d.ts.map +1 -0
- package/dist/entities/digest-steps.js +26 -0
- package/dist/entities/digest-steps.js.map +1 -0
- package/dist/entities/index.d.ts +11 -3
- package/dist/entities/index.d.ts.map +1 -1
- package/dist/entities/index.js +11 -3
- package/dist/entities/index.js.map +1 -1
- package/dist/entities/json-steps.d.ts +21 -0
- package/dist/entities/json-steps.d.ts.map +1 -0
- package/dist/entities/json-steps.js +130 -0
- package/dist/entities/json-steps.js.map +1 -0
- package/dist/entities/placement-owed.d.ts +56 -0
- package/dist/entities/placement-owed.d.ts.map +1 -0
- package/dist/entities/placement-owed.js +71 -0
- package/dist/entities/placement-owed.js.map +1 -0
- package/dist/entities/repo-states.d.ts +61 -27
- package/dist/entities/repo-states.d.ts.map +1 -1
- package/dist/entities/repo-states.js +279 -165
- package/dist/entities/repo-states.js.map +1 -1
- package/dist/entities/types.d.ts +11 -0
- package/dist/entities/types.d.ts.map +1 -1
- package/dist/files/commands.d.ts +13 -7
- package/dist/files/commands.d.ts.map +1 -1
- package/dist/files/commands.js +22 -10
- package/dist/files/commands.js.map +1 -1
- package/dist/records/index.d.ts +7 -0
- package/dist/records/index.d.ts.map +1 -1
- package/dist/records/index.js +7 -0
- package/dist/records/index.js.map +1 -1
- package/dist/records/intentional.d.ts +1 -1
- package/dist/records/intentional.d.ts.map +1 -1
- package/dist/records/outbox.d.ts +6 -10
- package/dist/records/outbox.d.ts.map +1 -1
- package/dist/records/outbox.js +7 -37
- package/dist/records/outbox.js.map +1 -1
- package/dist/records/owned-effects.d.ts +15 -0
- package/dist/records/owned-effects.d.ts.map +1 -0
- package/dist/records/owned-effects.js +37 -0
- package/dist/records/owned-effects.js.map +1 -0
- package/dist/records/publication.d.ts +10 -5
- package/dist/records/publication.d.ts.map +1 -1
- package/dist/records/publication.js +16 -5
- package/dist/records/publication.js.map +1 -1
- package/dist/records/rail-ports.d.ts +172 -0
- package/dist/records/rail-ports.d.ts.map +1 -0
- package/dist/records/rail-ports.js +3 -0
- package/dist/records/rail-ports.js.map +1 -0
- package/dist/records/rail.d.ts +21 -168
- package/dist/records/rail.d.ts.map +1 -1
- package/dist/records/rail.js +84 -568
- package/dist/records/rail.js.map +1 -1
- package/dist/records/receive-channel.d.ts +58 -0
- package/dist/records/receive-channel.d.ts.map +1 -0
- package/dist/records/receive-channel.js +114 -0
- package/dist/records/receive-channel.js.map +1 -0
- package/dist/records/receive-loop.d.ts +62 -0
- package/dist/records/receive-loop.d.ts.map +1 -0
- package/dist/records/receive-loop.js +276 -0
- package/dist/records/receive-loop.js.map +1 -0
- package/dist/records/receive-pages.d.ts +28 -0
- package/dist/records/receive-pages.d.ts.map +1 -0
- package/dist/records/receive-pages.js +80 -0
- package/dist/records/receive-pages.js.map +1 -0
- package/dist/records/retry-clock.d.ts +14 -0
- package/dist/records/retry-clock.d.ts.map +1 -0
- package/dist/records/retry-clock.js +35 -0
- package/dist/records/retry-clock.js.map +1 -0
- package/dist/records/send-batch.d.ts +48 -0
- package/dist/records/send-batch.d.ts.map +1 -0
- package/dist/records/send-batch.js +82 -0
- package/dist/records/send-batch.js.map +1 -0
- package/dist/records/send-line.d.ts +82 -0
- package/dist/records/send-line.d.ts.map +1 -0
- package/dist/records/send-line.js +273 -0
- package/dist/records/send-line.js.map +1 -0
- package/dist/records/send-preparation.d.ts +46 -0
- package/dist/records/send-preparation.d.ts.map +1 -0
- package/dist/records/send-preparation.js +209 -0
- package/dist/records/send-preparation.js.map +1 -0
- package/dist/records/submit-frame.d.ts +55 -0
- package/dist/records/submit-frame.d.ts.map +1 -0
- package/dist/records/submit-frame.js +161 -0
- package/dist/records/submit-frame.js.map +1 -0
- package/dist/records/wire.d.ts +16 -30
- package/dist/records/wire.d.ts.map +1 -1
- package/dist/records/wire.js +22 -75
- package/dist/records/wire.js.map +1 -1
- package/dist/steps.d.ts +5 -1
- package/dist/steps.d.ts.map +1 -1
- package/dist/steps.js +13 -1
- package/dist/steps.js.map +1 -1
- package/dist/transfer/stream.d.ts +3 -7
- package/dist/transfer/stream.d.ts.map +1 -1
- package/dist/transfer/stream.js.map +1 -1
- package/dist/watching/suspicion.d.ts +4 -0
- package/dist/watching/suspicion.d.ts.map +1 -1
- package/dist/watching/suspicion.js +128 -70
- package/dist/watching/suspicion.js.map +1 -1
- package/dist-cjs/apply/contracts.js +15 -1
- package/dist-cjs/apply/contracts.js.map +1 -1
- package/dist-cjs/apply/expected-repository.js +128 -0
- package/dist-cjs/apply/expected-repository.js.map +1 -0
- package/dist-cjs/apply/index.js +5 -0
- package/dist-cjs/apply/index.js.map +1 -1
- package/dist-cjs/apply/journey.js +340 -0
- package/dist-cjs/apply/journey.js.map +1 -0
- package/dist-cjs/apply/line.js +69 -0
- package/dist-cjs/apply/line.js.map +1 -0
- package/dist-cjs/apply/local-work.js +18 -8
- package/dist-cjs/apply/local-work.js.map +1 -1
- package/dist-cjs/apply/plans.js +11 -8
- package/dist-cjs/apply/plans.js.map +1 -1
- package/dist-cjs/apply/rail.js +310 -605
- package/dist-cjs/apply/rail.js.map +1 -1
- package/dist-cjs/apply/repository-boundaries.js +66 -12
- package/dist-cjs/apply/repository-boundaries.js.map +1 -1
- package/dist-cjs/apply/repository-paths.js +73 -0
- package/dist-cjs/apply/repository-paths.js.map +1 -0
- package/dist-cjs/apply/repository-result.js +50 -85
- package/dist-cjs/apply/repository-result.js.map +1 -1
- package/dist-cjs/apply/selection.js +43 -6
- package/dist-cjs/apply/selection.js.map +1 -1
- package/dist-cjs/apply/settling.js +40 -0
- package/dist-cjs/apply/settling.js.map +1 -0
- package/dist-cjs/apply/showing.js +70 -0
- package/dist-cjs/apply/showing.js.map +1 -0
- package/dist-cjs/apply/shown-checkpoint.js +115 -0
- package/dist-cjs/apply/shown-checkpoint.js.map +1 -0
- package/dist-cjs/detection/classify.js +6 -5
- package/dist-cjs/detection/classify.js.map +1 -1
- package/dist-cjs/detection/index.js +0 -2
- package/dist-cjs/detection/index.js.map +1 -1
- package/dist-cjs/detection/refusal.js +12 -3
- package/dist-cjs/detection/refusal.js.map +1 -1
- package/dist-cjs/detection/scoped-identity.js.map +1 -1
- package/dist-cjs/entities/bytes.js +21 -0
- package/dist-cjs/entities/bytes.js.map +1 -1
- package/dist-cjs/entities/cloud.js +29 -17
- package/dist-cjs/entities/cloud.js.map +1 -1
- package/dist-cjs/entities/digest-steps.js +30 -0
- package/dist-cjs/entities/digest-steps.js.map +1 -0
- package/dist-cjs/entities/index.js +11 -3
- package/dist-cjs/entities/index.js.map +1 -1
- package/dist-cjs/entities/json-steps.js +135 -0
- package/dist-cjs/entities/json-steps.js.map +1 -0
- package/dist-cjs/entities/placement-owed.js +76 -0
- package/dist-cjs/entities/placement-owed.js.map +1 -0
- package/dist-cjs/entities/repo-states.js +289 -177
- package/dist-cjs/entities/repo-states.js.map +1 -1
- package/dist-cjs/files/commands.js +21 -9
- package/dist-cjs/files/commands.js.map +1 -1
- package/dist-cjs/records/index.js +19 -0
- package/dist-cjs/records/index.js.map +1 -1
- package/dist-cjs/records/outbox.js +8 -39
- package/dist-cjs/records/outbox.js.map +1 -1
- package/dist-cjs/records/owned-effects.js +41 -0
- package/dist-cjs/records/owned-effects.js.map +1 -0
- package/dist-cjs/records/publication.js +17 -5
- package/dist-cjs/records/publication.js.map +1 -1
- package/dist-cjs/records/rail-ports.js +4 -0
- package/dist-cjs/records/rail-ports.js.map +1 -0
- package/dist-cjs/records/rail.js +86 -571
- package/dist-cjs/records/rail.js.map +1 -1
- package/dist-cjs/records/receive-channel.js +119 -0
- package/dist-cjs/records/receive-channel.js.map +1 -0
- package/dist-cjs/records/receive-loop.js +280 -0
- package/dist-cjs/records/receive-loop.js.map +1 -0
- package/dist-cjs/records/receive-pages.js +85 -0
- package/dist-cjs/records/receive-pages.js.map +1 -0
- package/dist-cjs/records/retry-clock.js +39 -0
- package/dist-cjs/records/retry-clock.js.map +1 -0
- package/dist-cjs/records/send-batch.js +88 -0
- package/dist-cjs/records/send-batch.js.map +1 -0
- package/dist-cjs/records/send-line.js +277 -0
- package/dist-cjs/records/send-line.js.map +1 -0
- package/dist-cjs/records/send-preparation.js +213 -0
- package/dist-cjs/records/send-preparation.js.map +1 -0
- package/dist-cjs/records/submit-frame.js +167 -0
- package/dist-cjs/records/submit-frame.js.map +1 -0
- package/dist-cjs/records/wire.js +22 -77
- package/dist-cjs/records/wire.js.map +1 -1
- package/dist-cjs/steps.js +14 -2
- package/dist-cjs/steps.js.map +1 -1
- package/dist-cjs/transfer/stream.js.map +1 -1
- package/dist-cjs/watching/suspicion.js +128 -70
- package/dist-cjs/watching/suspicion.js.map +1 -1
- package/package.json +4 -4
- package/dist/detection/repository.d.ts +0 -26
- package/dist/detection/repository.d.ts.map +0 -1
- package/dist/detection/repository.js +0 -66
- package/dist/detection/repository.js.map +0 -1
- package/dist-cjs/detection/repository.js +0 -69
- package/dist-cjs/detection/repository.js.map +0 -1
package/PURPOSE.md
CHANGED
|
@@ -230,12 +230,14 @@ or certify a new wire contract, cloud migration or cross-machine rollout.
|
|
|
230
230
|
on that machine, while cloud reconciliation preserves every unmaterialized
|
|
231
231
|
boundary. A fresh verified install may be Watch's initial baseline so the
|
|
232
232
|
downloader's own writes are not reinterpreted as user edits.
|
|
233
|
-
21. **A Git marker classifies its containing directory.**
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
233
|
+
21. **A Git marker classifies its containing directory.** A `.git`
|
|
234
|
+
directory or file that Git can use, by Git's own structural test, makes
|
|
235
|
+
its containing directory `repo.git`; its removal, or a break Git itself
|
|
236
|
+
would refuse, returns that same UUID to `workspace` or `folder`, whose
|
|
237
|
+
children then travel as ordinary entities. Git command availability
|
|
238
|
+
governs Card + Checkpoint capture, never classification, and `.git`
|
|
239
|
+
itself, usable or not, is Git's metadata that receives no entity row.
|
|
240
|
+
Each repository directory starts a repository rail: ordinary worktree
|
|
239
241
|
children retain local UUID rows and ride in their nearest repository state
|
|
240
242
|
manifest, while a nested repository and the ancestry spine that reaches it
|
|
241
243
|
remain cloud graph records with their own Card + Checkpoint transport. The
|
|
@@ -245,10 +247,16 @@ or certify a new wire contract, cloud migration or cross-machine rollout.
|
|
|
245
247
|
never invents history beyond it. Every current graph a reader derives
|
|
246
248
|
from a published snapshot and its later delivery tail passes through this
|
|
247
249
|
same projection, and Add refuses a lookup that hands it a record the
|
|
248
|
-
projection would not publish before it moves any bytes.
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
250
|
+
projection would not publish before it moves any bytes. Records follow
|
|
251
|
+
cause before effect: every accepted prefix must be reconstructible from
|
|
252
|
+
its accepted records and retained packages, without waiting for a later
|
|
253
|
+
record. Leaving repository territory publishes the boundary retype first,
|
|
254
|
+
then each newly independent descendant, whose retained latest statement
|
|
255
|
+
supplies its contents until its own record arrives; a repository that
|
|
256
|
+
stays a repository publishes after every record beneath it that crosses
|
|
257
|
+
its boundary. Every deletion is stated by the capture: by an ancestor's
|
|
258
|
+
Trash that still covers the entity, else by the new package of the live
|
|
259
|
+
repository that held it, else by the entity's own Trash record.
|
|
252
260
|
22. **Transfer moves content; it never discovers state.** `upload` moves one
|
|
253
261
|
already-registered immutable artifact toward cloud storage and `download`
|
|
254
262
|
moves that same artifact toward a machine cache. Neither operation scans,
|
|
@@ -374,14 +382,14 @@ or certify a new wire contract, cloud migration or cross-machine rollout.
|
|
|
374
382
|
costs its Card + Checkpoint scope. Only honestly ambiguous evidence enters
|
|
375
383
|
complete reconciliation. Detect ends after the exact proposal and local
|
|
376
384
|
truth are committed together; cloud publication belongs to Send.
|
|
377
|
-
35. **The entity UUID is the ordered channel
|
|
378
|
-
independently to each entity UUID across all
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
+
35. **The entity UUID is the ordered channel; each computer sends one line.**
|
|
386
|
+
Cloud assigns a dense sequence independently to each entity UUID across all
|
|
387
|
+
machines. Within each authority, a computer's records are accepted in its
|
|
388
|
+
local record order, so what others observe of that computer's work is always
|
|
389
|
+
a prefix of what it recorded: a retype that exposes repository-owned ground
|
|
390
|
+
follows the records written before it, and every observable prefix remains a
|
|
391
|
+
complete graph. That line orders delivery, not truth: neither it nor a
|
|
392
|
+
workspace or delivery cursor decides which entity state wins.
|
|
385
393
|
36. **Receive owns the local inbox.** Every cloud-accepted record, including
|
|
386
394
|
one originating on this computer, enters the inbox under
|
|
387
395
|
`(entityId, globalSequence)`. Each entity has its own received-through
|
|
@@ -412,26 +420,28 @@ or certify a new wire contract, cloud migration or cross-machine rollout.
|
|
|
412
420
|
after a final conflict-scoped guard, recoverable reveal, and the target type
|
|
413
421
|
rereading exact truth. Lock and cargo attempts are finite and observable;
|
|
414
422
|
their failure retains responsibility for retry rather than waiting forever.
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
423
|
+
Each authority's accepted records apply in one line, in delivery order:
|
|
424
|
+
recovery work first, then the first unresolved materializable row, whose
|
|
425
|
+
target extends only over the adjacent content run of that same file or
|
|
426
|
+
link. A head with no intent and newer local work on its entity resolves at
|
|
427
|
+
once as superseded. A failed head keeps its durable intent, records its
|
|
428
|
+
outcome, and parks its whole line with bounded backoff while other
|
|
429
|
+
authorities' lines go on; waiting holds the queue position, never the
|
|
430
|
+
ground. The parked line runs again when its backoff elapses, its head
|
|
431
|
+
changes, newer local work appears for the head's entity, the producer its
|
|
432
|
+
dependency names releases it, or, for a conflict, another authority's line
|
|
433
|
+
progresses; a wake it caused itself can never re-run it. Parent and child
|
|
434
|
+
UUIDs remain independent channels. A result plays by what this computer
|
|
435
|
+
shows: one shown neither before nor after resolves in order with no
|
|
436
|
+
effect, so a child never waits for a parent this computer does not show.
|
|
437
|
+
Every file belongs to its nearest repository: a repository result acts
|
|
438
|
+
only on its territory, never on a nested repository's subtree or on ground
|
|
439
|
+
another rail owns here where its map disagrees, so it never waits on a
|
|
440
|
+
boundary. An accepted destination already recorded as
|
|
441
|
+
a different entity is a conflict, never a local change to capture. The park
|
|
442
|
+
timer and attempt count are process-local: after restart, the durable
|
|
443
|
+
intent is re-proved once and, if still blocked, parks again from attempt
|
|
444
|
+
one.
|
|
435
445
|
A host proves current physical repository ground from Card + Checkpoint and
|
|
436
446
|
the exact identity frontier sealed to that immutable transport. Compact
|
|
437
447
|
machine evidence is accepted only when it reproduces the transport's
|
|
@@ -451,13 +461,16 @@ or certify a new wire contract, cloud migration or cross-machine rollout.
|
|
|
451
461
|
retained immutable payload through the target type's adapter; a link is
|
|
452
462
|
restored as literal link target text and only an ordinary file is restored
|
|
453
463
|
through the ordinary-file adapter.
|
|
454
|
-
|
|
455
|
-
passes through one finite Detect boundary. Before
|
|
456
|
-
settled local deletion becomes durable Trash work
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
464
|
+
While an intent is unbound, a missing active target below a still-present
|
|
465
|
+
materialized root first passes through one finite Detect boundary. Before
|
|
466
|
+
reveal, a proven move or settled local deletion becomes durable Trash work
|
|
467
|
+
and supersedes the older Apply. An unbound intent whose target already
|
|
468
|
+
stood re-enters that boundary if the target later disappears; Apply's own
|
|
469
|
+
absence cannot authorize lifecycle, and when no durable local result
|
|
470
|
+
follows, idempotent repair reveals the accepted result, binding first.
|
|
471
|
+
Once bound, absence is read only through the receipt: a prefix of the
|
|
472
|
+
reveal resumes and anything else is a person's. Only exact Verify may
|
|
473
|
+
complete the intent. A missing materialization root
|
|
461
474
|
remains a separate root-recovery responsibility; entity Apply never
|
|
462
475
|
recreates it piecemeal.
|
|
463
476
|
Text uses an exact-base splice with a complete snapshot fallback;
|
|
@@ -471,8 +484,9 @@ or certify a new wire contract, cloud migration or cross-machine rollout.
|
|
|
471
484
|
target, protects that entity's working ground. The local complete result is
|
|
472
485
|
still accepted normally and wins only when cloud assigns its later
|
|
473
486
|
sequence; Apply never rebases, merges, stale-refuses, or rewrites it. A
|
|
474
|
-
|
|
475
|
-
may touch the path
|
|
487
|
+
disk difference found before reveal enters Detect and Record before
|
|
488
|
+
incoming work may touch the path; one found by an owned intent's receipt
|
|
489
|
+
read is returned home and left to Detect.
|
|
476
490
|
41. **Verify, not a write syscall, commits Apply.** Applied Watch rings are
|
|
477
491
|
retained. Only exact type-specific reread may advance resolved and
|
|
478
492
|
materialized cursors, update the local notebook, mark Inbox history
|
|
@@ -485,12 +499,15 @@ or certify a new wire contract, cloud migration or cross-machine rollout.
|
|
|
485
499
|
require old cargo, adopt a changed private survivor, or overwrite later
|
|
486
500
|
observations. A phase alone does not prove whether physical effects exist:
|
|
487
501
|
adopting an exact target may reach `revealed` without changing disk. Only
|
|
488
|
-
a bound receipt proves effect ownership.
|
|
489
|
-
|
|
490
|
-
its
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
502
|
+
a bound receipt proves effect ownership. Shown bytes are attributed, never
|
|
503
|
+
guessed: Apply may drop private work for the newest record, but once it
|
|
504
|
+
binds recovery before its first visible effect it owns that ground until
|
|
505
|
+
it has read it once through the receipt. Its own complete result is
|
|
506
|
+
verified and projected in the commit that ends ownership; a prefix of its
|
|
507
|
+
own reveal resumes; anything else is the person's, returns to its home,
|
|
508
|
+
and is left to Detect. Cancellation preserves sharing values and resolves
|
|
509
|
+
nothing. The newest record then wins, never by releasing unread ground.
|
|
510
|
+
Exact target Verify is still required to claim installation. For a
|
|
494
511
|
repository, Verify commits Card, Checkpoint, and the complete transported
|
|
495
512
|
identity frontier as one notebook fact. The Watch observation caused by
|
|
496
513
|
that reveal must compare equal to that same fact; it can never become a new
|
|
@@ -550,13 +567,15 @@ or certify a new wire contract, cloud migration or cross-machine rollout.
|
|
|
550
567
|
48. **A slot collision changes materialization, never identity.** Mutation-time
|
|
551
568
|
guards refuse a second local owner of one `(parentUUID, name)` slot, but a
|
|
552
569
|
merged graph may contain identities created concurrently in that slot.
|
|
553
|
-
|
|
554
|
-
the
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
570
|
+
A Restore into an occupied name does the same. Every observer preserves
|
|
571
|
+
every UUID and derives the same disk names from the complete active
|
|
572
|
+
sibling set: the identity that arrived in the slot last, by the cloud's
|
|
573
|
+
acceptance order, takes the next free Windows-style ` (n)` suffix before a
|
|
574
|
+
file-like extension, and the earlier one keeps the bare name. Apply still
|
|
575
|
+
derives that order from lexicographic UUIDs; latest-arrival ordering is
|
|
576
|
+
unfinished there. A derived name is never a mutation, version input, or
|
|
577
|
+
portable rename; whenever the sibling set changes, materialization is
|
|
578
|
+
re-derived.
|
|
560
579
|
49. **The executable bit is ordinary-file truth.** A text or binary file
|
|
561
580
|
carries exactly one portable mode, `0644` or `0755`, and that mode is part
|
|
562
581
|
of its canonical version. Detect records a mode-only change without
|
|
@@ -582,14 +601,18 @@ or certify a new wire contract, cloud migration or cross-machine rollout.
|
|
|
582
601
|
## Apply attribution boundary
|
|
583
602
|
|
|
584
603
|
Detect describes observed user ground. A bound, nonterminal Apply recovery receipt
|
|
585
|
-
owns only its original effect participants and address cones; a phase alone
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
604
|
+
owns only its original effect participants and address cones; a phase alone
|
|
605
|
+
defers no Detect attribution, because an unbound revealed intent changed nothing
|
|
606
|
+
on disk (it still Verifies before newer work). Detect defers dependent
|
|
607
|
+
attribution and retains the Watch responsibility, while independent
|
|
608
|
+
observations may commit. Ownership is rechecked at Record admission, including
|
|
609
|
+
an originally empty answer. Terminal commit releases that ownership before
|
|
610
|
+
private cleanup and wakes its original scopes. A bound intent never captures,
|
|
611
|
+
so no capture is blocked by its own receipt: it ends only through its receipt
|
|
612
|
+
read, and only that read's proof of a person's change authorizes cancelling
|
|
613
|
+
it. Cancellation never resolves Inbox or advances verified state.
|
|
614
|
+
Detect's self-blocked capture answer (`replan`) is therefore unreachable and
|
|
615
|
+
awaits removal by its owner. Fresh intents have fresh host-minted attempt identities, even when
|
|
593
616
|
the target and wall clock are identical, and run fresh preflight before new effects.
|
|
594
617
|
Apply uses the same foreign-ownership rule at admission and terminal preparation;
|
|
595
618
|
a dependent cancellation waits without resolving history or discarding evidence.
|
|
@@ -5,7 +5,8 @@ import type { ChangeFacet, TextSplice } from '../detection/record-proposal.js';
|
|
|
5
5
|
import type { AcceptedEntityRecord } from '../records/contracts.js';
|
|
6
6
|
import type { ContentManifest } from '../contracts/content.js';
|
|
7
7
|
import type { TransferArtifact } from '../transfer/artifacts.js';
|
|
8
|
-
|
|
8
|
+
import { type ApplyPlay } from './showing.js';
|
|
9
|
+
export declare const ENTITY_APPLY_INTENT_CONTRACT = "amalgm.entity-apply-intent@3";
|
|
9
10
|
export type ApplyIntentPhase = 'declared' | 'prepared' | 'revealed';
|
|
10
11
|
/** One crash-recovery responsibility. It is written before any machine effect. */
|
|
11
12
|
export interface EntityApplyIntent {
|
|
@@ -19,6 +20,9 @@ export interface EntityApplyIntent {
|
|
|
19
20
|
readonly targetMutationId: string;
|
|
20
21
|
readonly targetState: string;
|
|
21
22
|
readonly targetType: EntityType;
|
|
23
|
+
/** The play judged when the intent began. Recovery finishes it; it is
|
|
24
|
+
* never judged again while the intent stays open. */
|
|
25
|
+
readonly play: ApplyPlay;
|
|
22
26
|
readonly phase: ApplyIntentPhase;
|
|
23
27
|
readonly createdAt: number;
|
|
24
28
|
}
|
|
@@ -27,23 +31,52 @@ export interface MaterializedOfficialState {
|
|
|
27
31
|
readonly globalSequence: number;
|
|
28
32
|
readonly record: CloudEntityRecord;
|
|
29
33
|
}
|
|
30
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* The work at the head of one authority's line: one entity's unresolved
|
|
36
|
+
* Inbox records from its resolved position. Without an intent they run
|
|
37
|
+
* through the end of the entity's adjacent run in the line, the records no
|
|
38
|
+
* other unresolved record separates; with one, through the intent's target.
|
|
39
|
+
*/
|
|
31
40
|
export interface EntityApplyWork {
|
|
32
41
|
readonly authorityId: string;
|
|
33
42
|
readonly entityId: string;
|
|
43
|
+
/** The head's play: its open intent's, or judged at its position. */
|
|
44
|
+
readonly play: ApplyPlay;
|
|
34
45
|
readonly resolvedThrough: number;
|
|
35
46
|
readonly materialized: MaterializedOfficialState | null;
|
|
36
47
|
readonly records: readonly AcceptedEntityRecord[];
|
|
37
48
|
readonly intent: EntityApplyIntent | null;
|
|
49
|
+
/** True once the host durably bound this intent's recovery receipt. The host
|
|
50
|
+
* binds before any visible effect; from then the intent owns its ground
|
|
51
|
+
* until retirement and is never cancelled, even by newer local work. */
|
|
52
|
+
readonly effectsBound: boolean;
|
|
38
53
|
/** A terminal decision owns cleanup even with no remaining Inbox or ground. */
|
|
39
54
|
readonly retirement?: EntityApplyRetirement;
|
|
40
55
|
}
|
|
41
|
-
/**
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
56
|
+
/**
|
|
57
|
+
* The head of an authority's line. An open intent or retirement heads it.
|
|
58
|
+
* Otherwise the head is the first unresolved Inbox row in delivery order,
|
|
59
|
+
* judged at its position (settling.ts): a play is a head whose work is that
|
|
60
|
+
* entity's adjacent run; a settlement owes no effect and resolves where it
|
|
61
|
+
* sits. Nothing is ever read past: a later row plays only after every
|
|
62
|
+
* earlier row resolved.
|
|
63
|
+
*/
|
|
64
|
+
export type EntityApplyLineStep = {
|
|
65
|
+
readonly kind: 'head';
|
|
66
|
+
readonly work: EntityApplyWork;
|
|
67
|
+
} | {
|
|
68
|
+
readonly kind: 'settle';
|
|
69
|
+
readonly entityId: string;
|
|
70
|
+
readonly deliverySequence: number;
|
|
45
71
|
}
|
|
72
|
+
/** No unresolved row is readable whole: the received prefix is resolved,
|
|
73
|
+
* or the first unresolved row waits for Receive to repair its entity's
|
|
74
|
+
* gap. Receive's commit wakes the line. */
|
|
75
|
+
| {
|
|
76
|
+
readonly kind: 'end';
|
|
77
|
+
};
|
|
46
78
|
interface ApplyPlanBase {
|
|
79
|
+
readonly play: ApplyPlay;
|
|
47
80
|
readonly entityId: string;
|
|
48
81
|
readonly fromSequence: number;
|
|
49
82
|
readonly throughSequence: number;
|
|
@@ -98,9 +131,11 @@ export interface RepositoryApplyPlan extends ApplyPlanBase {
|
|
|
98
131
|
readonly parentTransportVersion: string | null;
|
|
99
132
|
readonly transportVersion: string;
|
|
100
133
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
134
|
+
/** The result stops showing here: trashed, deleted, moved under ground this
|
|
135
|
+
* computer does not show, or below a place that is no longer a shown
|
|
136
|
+
* container. Its subtree leaves this disk recoverably; nothing is fetched. */
|
|
137
|
+
export interface LeaveApplyPlan extends ApplyPlanBase {
|
|
138
|
+
readonly kind: 'leave';
|
|
104
139
|
}
|
|
105
140
|
/** A construct payload stages exactly like a binary file. The product's
|
|
106
141
|
* adapter reports `dependency` from guard while a UUID the payload names is
|
|
@@ -110,7 +145,7 @@ export interface ConstructApplyPlan extends ApplyPlanBase {
|
|
|
110
145
|
readonly artifact: TransferArtifact;
|
|
111
146
|
readonly manifest: ContentManifest;
|
|
112
147
|
}
|
|
113
|
-
export type EntityApplyPlan = TextApplyPlan | BinaryApplyPlan | LinkApplyPlan | StructureApplyPlan | ReferenceApplyPlan | RepositoryApplyPlan |
|
|
148
|
+
export type EntityApplyPlan = TextApplyPlan | BinaryApplyPlan | LinkApplyPlan | StructureApplyPlan | ReferenceApplyPlan | RepositoryApplyPlan | LeaveApplyPlan | ConstructApplyPlan;
|
|
114
149
|
/** A concrete prerequisite and the component that can change it. `send`
|
|
115
150
|
* names local results still waiting for their authority sequence. */
|
|
116
151
|
export interface ApplyDependency {
|
|
@@ -118,11 +153,11 @@ export interface ApplyDependency {
|
|
|
118
153
|
readonly entityIds: readonly string[];
|
|
119
154
|
}
|
|
120
155
|
/** A wait a person can see and resolve. It stays a dependency, never a
|
|
121
|
-
* fault: the
|
|
156
|
+
* fault: the line wakes on its producer's progress, not on backoff. A blocker
|
|
122
157
|
* always names what releases it, so the current status can always show it. */
|
|
123
158
|
export interface ApplyBlocker {
|
|
124
159
|
readonly code: 'local-ground-would-be-displaced';
|
|
125
|
-
readonly effect: '
|
|
160
|
+
readonly effect: 'leave' | 'replace-container' | 'repository-reveal';
|
|
126
161
|
}
|
|
127
162
|
/** A named prerequisite that another component's progress can change. */
|
|
128
163
|
export interface ApplyDependencyOutcome {
|
|
@@ -131,6 +166,25 @@ export interface ApplyDependencyOutcome {
|
|
|
131
166
|
readonly waitFor?: ApplyDependency;
|
|
132
167
|
readonly blocker?: ApplyBlocker;
|
|
133
168
|
}
|
|
169
|
+
/**
|
|
170
|
+
* Unbound only: under the ground lock, the play this head was judged at no
|
|
171
|
+
* longer holds, for example its place stopped showing or its workspace root
|
|
172
|
+
* is missing here. The host first makes durable the table fact the store
|
|
173
|
+
* judges by, such as the root being behind, so the next judgment sees it.
|
|
174
|
+
* The private intent retires cancelled and the line judges its head again.
|
|
175
|
+
*/
|
|
176
|
+
export interface ApplyRejudge {
|
|
177
|
+
readonly kind: 'rejudge';
|
|
178
|
+
readonly reason: string;
|
|
179
|
+
}
|
|
180
|
+
/** The reveal found a person's version in the target's place before binding
|
|
181
|
+
* anything. Nothing of this intent is shown; it cancels, and Detect records
|
|
182
|
+
* the person's version. */
|
|
183
|
+
export interface ApplyDeclinedReveal {
|
|
184
|
+
readonly kind: 'declined';
|
|
185
|
+
readonly reason: string;
|
|
186
|
+
}
|
|
187
|
+
/** The named prerequisite a held line waits for. */
|
|
134
188
|
export interface ApplyWait {
|
|
135
189
|
readonly entityId: string;
|
|
136
190
|
readonly reason: string;
|
|
@@ -138,21 +192,23 @@ export interface ApplyWait {
|
|
|
138
192
|
readonly throughSequence: number;
|
|
139
193
|
readonly blocker?: ApplyBlocker;
|
|
140
194
|
}
|
|
141
|
-
export type ApplyGuard =
|
|
195
|
+
export type ApplyGuard =
|
|
196
|
+
/** The effect may run. For a bound intent: the ground is a prefix of this
|
|
197
|
+
* intent's own reveal order, so the reveal resumes. */
|
|
198
|
+
{
|
|
142
199
|
readonly kind: 'safe';
|
|
143
|
-
} | {
|
|
144
|
-
readonly kind: 'already-target';
|
|
145
200
|
}
|
|
146
|
-
/**
|
|
147
|
-
*
|
|
148
|
-
* after that cancellation and its cleanup commit. */
|
|
201
|
+
/** Ground already holds the target. For a bound intent: the host recognized
|
|
202
|
+
* this intent's own complete effect from its recovery receipt. */
|
|
149
203
|
| {
|
|
150
|
-
readonly kind: '
|
|
151
|
-
readonly reason: string;
|
|
204
|
+
readonly kind: 'already-target';
|
|
152
205
|
}
|
|
153
206
|
/** Ground differs from the last observation at this entity's own address,
|
|
154
207
|
* or unrecorded ground holds the destination. Detect + Record can give that
|
|
155
|
-
* ground identity, so the rail captures it before deciding anything.
|
|
208
|
+
* ground identity, so the rail captures it before deciding anything. For a
|
|
209
|
+
* bound intent the ground is neither its own effect nor a prefix of it: it
|
|
210
|
+
* is a person's, and the rail cancels without capture so Detect records it
|
|
211
|
+
* once ownership ends. */
|
|
156
212
|
| {
|
|
157
213
|
readonly kind: 'local-change';
|
|
158
214
|
readonly reason?: string;
|
|
@@ -162,43 +218,59 @@ export type ApplyGuard = {
|
|
|
162
218
|
* removal becomes durable Trash work. After reveal, capture may
|
|
163
219
|
* preserve a concurrent move or save but cannot authorize lifecycle from
|
|
164
220
|
* Apply's own intermediate absence. A durable local result supersedes this
|
|
165
|
-
* Apply; no result authorizes idempotent cloud repair.
|
|
221
|
+
* Apply; no result authorizes idempotent cloud repair. A host never returns
|
|
222
|
+
* this for a bound intent: its receipt names the ground, so the read is
|
|
223
|
+
* always its own effect, a prefix of it, or a person's. */
|
|
166
224
|
| {
|
|
167
225
|
readonly kind: 'unsettled-ground';
|
|
168
226
|
readonly reason?: string;
|
|
169
227
|
}
|
|
170
|
-
/** A prerequisite
|
|
171
|
-
*
|
|
172
|
-
* remainder
|
|
173
|
-
* is re-proved when the named
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
*
|
|
178
|
-
*
|
|
228
|
+
/** A prerequisite whose release can arrive while the line waits: a
|
|
229
|
+
* person's action at this place, such as an unfinished Git operation or
|
|
230
|
+
* local remainder the effect would displace, Detect, Send, or a lock. The
|
|
231
|
+
* line holds without capture or error and is re-proved when the named
|
|
232
|
+
* producer's progress may have changed it. */
|
|
233
|
+
| ApplyDependencyOutcome | ApplyRejudge
|
|
234
|
+
/** Ground this machine observes but sharing does not hold, such as ground
|
|
235
|
+
* its enrollment policy excludes, occupies the derived destination. Every
|
|
236
|
+
* shared sibling derives its own address, so no other recorded occupant is
|
|
237
|
+
* possible, and capture can never turn this one into this entity's local
|
|
238
|
+
* work. The line parks and reports the occupant: it re-runs only when its
|
|
239
|
+
* head changes, or when another authority's line progresses and may have
|
|
240
|
+
* moved the occupant. */
|
|
179
241
|
| {
|
|
180
242
|
readonly kind: 'conflict';
|
|
181
243
|
readonly reason: string;
|
|
182
|
-
}
|
|
244
|
+
}
|
|
245
|
+
/** Nothing is wrong, but ground is not yet settled enough to decide. The
|
|
246
|
+
* line re-proves after bounded backoff without a report. A fault throws
|
|
247
|
+
* instead, and the rail reports its cause under the same backoff. */
|
|
248
|
+
| {
|
|
183
249
|
readonly kind: 'retry';
|
|
184
250
|
readonly reason?: string;
|
|
185
251
|
};
|
|
186
252
|
export type ApplyVerification = {
|
|
187
253
|
readonly kind: 'match';
|
|
188
|
-
} |
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
*
|
|
194
|
-
* boundary. A concurrent move or save remains local work; otherwise the
|
|
195
|
-
* same intent idempotently reveals the official result. */
|
|
254
|
+
} | ApplyDependencyOutcome | ApplyRejudge
|
|
255
|
+
/** Unbound only: an active accepted target below a present materialized
|
|
256
|
+
* root is absent. The rail re-enters the final guard and one
|
|
257
|
+
* lifecycle-protected Detect boundary. A concurrent move or save remains
|
|
258
|
+
* local work; otherwise the same intent idempotently reveals the official
|
|
259
|
+
* result. A bound host reports local-change instead. */
|
|
196
260
|
| {
|
|
197
261
|
readonly kind: 'missing-target';
|
|
198
|
-
}
|
|
262
|
+
}
|
|
263
|
+
/** Ground is not the exact target. Unbound, the rail captures it; bound, it
|
|
264
|
+
* is a person's and the rail cancels so Detect records it. */
|
|
265
|
+
| {
|
|
199
266
|
readonly kind: 'local-change';
|
|
200
267
|
readonly reason?: string;
|
|
201
|
-
}
|
|
268
|
+
}
|
|
269
|
+
/** Nothing is wrong, but the target is not yet observable as complete, such
|
|
270
|
+
* as a product still converging on its accepted payload. The line re-proves
|
|
271
|
+
* after bounded backoff without a report. A fault, including a failed
|
|
272
|
+
* durability flush, throws instead, and the rail reports its cause. */
|
|
273
|
+
| {
|
|
202
274
|
readonly kind: 'retry';
|
|
203
275
|
readonly reason?: string;
|
|
204
276
|
};
|
|
@@ -219,30 +291,25 @@ export interface EntityApplyRetirement {
|
|
|
219
291
|
type MaybePromise<T> = T | Promise<T>;
|
|
220
292
|
/** One prepared SQLite owner supplies these transactions for the rail lifetime. */
|
|
221
293
|
export interface EntityApplyStorePort {
|
|
222
|
-
/**
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
*
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
*
|
|
230
|
-
*
|
|
294
|
+
/** Every authority with an open intent or an unresolved Inbox record. */
|
|
295
|
+
readApplyAuthorities(): MaybePromise<readonly string[]>;
|
|
296
|
+
/** This authority's line head: an open intent or retirement first, else
|
|
297
|
+
* its first unresolved row judged at its position, else the end. Nothing
|
|
298
|
+
* is resolved by reading. */
|
|
299
|
+
readApplyLineStep(authorityId: string): MaybePromise<EntityApplyLineStep>;
|
|
300
|
+
/** Settle the head at `deliverySequence` and the settling heads right
|
|
301
|
+
* after it, in one bounded commit that judges each again (settling.ts) at
|
|
302
|
+
* its position against committed tables. Returns how many settled: none
|
|
303
|
+
* when that row no longer heads the line as a settlement, which the next
|
|
304
|
+
* read then shows. Materialization, observed rows, notebook rows, claims
|
|
305
|
+
* and ground stay unchanged. */
|
|
306
|
+
settle(authorityId: string, deliverySequence: number): MaybePromise<number>;
|
|
307
|
+
/** True when a local Outbox row's official position is unknown or after
|
|
308
|
+
* `targetSequence`. Its position is its acknowledgement, or the Inbox
|
|
309
|
+
* position of the same mutation when Receive holds it before Send stamps
|
|
310
|
+
* the receipt. An accepted local receipt remains protective until its own
|
|
311
|
+
* official position is selected by Apply. */
|
|
231
312
|
hasLocalWorkAfter(authorityId: string, entityId: string, targetSequence: number): MaybePromise<boolean>;
|
|
232
|
-
/**
|
|
233
|
-
* Resolve this computer's own exact publication without any Apply effect.
|
|
234
|
-
* In one transaction, true only when no intent exists, Inbox work still
|
|
235
|
-
* starts at `work.resolvedThrough` and ends at `target`, the retained Outbox
|
|
236
|
-
* receipt `isExactOwnAcceptance` of `target`, no local work follows it, and
|
|
237
|
-
* the local sharing basis still holds `target.resultState`, and the host
|
|
238
|
-
* proves its ground sits at the derived address with no sibling relocation
|
|
239
|
-
* owed. Then the range through `target` resolves and materialization
|
|
240
|
-
* evidence is unchanged.
|
|
241
|
-
* Otherwise nothing is written and the ordinary Apply journey decides.
|
|
242
|
-
* The rail offers a page's lanes together, so calls for different entities
|
|
243
|
-
* overlap.
|
|
244
|
-
*/
|
|
245
|
-
resolveOwnPublication(work: EntityApplyWork, target: AcceptedEntityRecord): MaybePromise<boolean>;
|
|
246
313
|
beginIntent(intent: EntityApplyIntent): MaybePromise<void>;
|
|
247
314
|
setIntentPhase(intent: EntityApplyIntent): MaybePromise<void>;
|
|
248
315
|
cancelIntent(intent: EntityApplyIntent): MaybePromise<EntityApplyRetirement>;
|
|
@@ -257,8 +324,9 @@ export interface EntityApplySocket {
|
|
|
257
324
|
prepare(intent: EntityApplyIntent, plan: EntityApplyPlan): Promise<void>;
|
|
258
325
|
/** Compare ground with the last local observation before preparation and again before reveal. */
|
|
259
326
|
guard(intent: EntityApplyIntent, plan: EntityApplyPlan): Promise<ApplyGuard>;
|
|
260
|
-
/** Final effect admission can discover an owner through a physical alias
|
|
261
|
-
|
|
327
|
+
/** Final effect admission can discover an owner through a physical alias,
|
|
328
|
+
* or decline before binding when a person's version replaced the ground. */
|
|
329
|
+
reveal(intent: EntityApplyIntent, plan: EntityApplyPlan): Promise<void | ApplyDependencyOutcome | ApplyDeclinedReveal>;
|
|
262
330
|
/** Prove and stage a finite cleanup description without deleting recovery.
|
|
263
331
|
* The store consumes this proof together with the requested terminal outcome.
|
|
264
332
|
* Another effect owner can defer this boundary using the normal dependency. */
|
|
@@ -299,8 +367,11 @@ export type LocalCaptureResult = {
|
|
|
299
367
|
*/
|
|
300
368
|
export interface EntityApplyEffectsPort {
|
|
301
369
|
adapterFor(type: EntityType): OperationalEntityApplyAdapter;
|
|
302
|
-
/** Resume only the recorded cleanup; never require
|
|
303
|
-
|
|
370
|
+
/** Resume only the recorded cleanup; never require the entity's current
|
|
371
|
+
* ground or cargo. Its private objects lie in one materialized root: while
|
|
372
|
+
* that root is unavailable the cleanup names it and waits, and the
|
|
373
|
+
* retirement keeps heading its line. */
|
|
374
|
+
cleanup(retirement: EntityApplyRetirement): Promise<void | ApplyDependencyOutcome>;
|
|
304
375
|
/** Await the named observation. Local-only differences retain the Apply
|
|
305
376
|
* intent and must never be treated as safely recorded bytes. After reveal,
|
|
306
377
|
* the host protects the target from lifecycle inference while preserving
|
|
@@ -325,8 +396,8 @@ export interface EntityApplyRailOptions {
|
|
|
325
396
|
readonly schedule: EntityApplySchedulePort;
|
|
326
397
|
readonly sha256Hex: Sha256Hex;
|
|
327
398
|
readonly now: () => number;
|
|
399
|
+
/** How many authority lines run at once. One line is always sequential. */
|
|
328
400
|
readonly concurrency?: number;
|
|
329
|
-
readonly workLimit?: number;
|
|
330
401
|
readonly onWaiting?: (wait: ApplyWait) => void;
|
|
331
402
|
readonly onBackgroundError?: (error: unknown) => void;
|
|
332
403
|
}
|
|
@@ -337,8 +408,17 @@ export declare function createApplyIntent(input: {
|
|
|
337
408
|
readonly entityId: string;
|
|
338
409
|
readonly fromSequence: number;
|
|
339
410
|
readonly target: AcceptedEntityRecord;
|
|
411
|
+
readonly play: ApplyPlay;
|
|
340
412
|
readonly createdAt: number;
|
|
341
413
|
}): EntityApplyIntent;
|
|
414
|
+
/**
|
|
415
|
+
* The one ownership law. Once an intent is revealed or its effects are bound,
|
|
416
|
+
* it owns its ground and ends only on evidence of that ground: a receipt read
|
|
417
|
+
* when bound, or for a revealed intent without effects its unbound Verify or
|
|
418
|
+
* a later durable local result. Anything else is private preparation, which
|
|
419
|
+
* newer work or a covering verified baseline may drop without a read.
|
|
420
|
+
*/
|
|
421
|
+
export declare function applyIntentOwned(intent: EntityApplyIntent, effectsBound: boolean): boolean;
|
|
342
422
|
export declare function advanceApplyIntent(intent: EntityApplyIntent, phase: Exclude<ApplyIntentPhase, 'declared'>): EntityApplyIntent;
|
|
343
423
|
export {};
|
|
344
424
|
//# sourceMappingURL=contracts.d.ts.map
|