@earendil-works/chord 1.3.0 → 1.5.0
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/CHANGELOG.md +54 -0
- package/README.md +129 -10
- package/dist/cell.d.ts +7 -7
- package/dist/cell.d.ts.map +1 -1
- package/dist/cell.js.map +1 -1
- package/dist/context/index.d.ts +8 -0
- package/dist/context/index.d.ts.map +1 -1
- package/dist/context/index.js +15 -0
- package/dist/context/index.js.map +1 -1
- package/dist/contract.d.ts +51 -52
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +19 -24
- package/dist/contract.js.map +1 -1
- package/dist/delta/apply-immutable-trusted.js +3 -4
- package/dist/delta/apply-immutable-trusted.js.map +1 -1
- package/dist/delta/diff.d.ts.map +1 -1
- package/dist/delta/diff.js +5 -3
- package/dist/delta/diff.js.map +1 -1
- package/dist/delta/index.d.ts +9 -1
- package/dist/delta/index.d.ts.map +1 -1
- package/dist/delta/index.js +15 -11
- package/dist/delta/index.js.map +1 -1
- package/dist/delta/pending.d.ts +36 -0
- package/dist/delta/pending.d.ts.map +1 -0
- package/dist/delta/pending.js +143 -0
- package/dist/delta/pending.js.map +1 -0
- package/dist/delta/tracker.d.ts +12 -0
- package/dist/delta/tracker.d.ts.map +1 -1
- package/dist/delta/tracker.js +109 -39
- package/dist/delta/tracker.js.map +1 -1
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +9 -7
- package/dist/host.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/next/contracts/accepts.d.ts +81 -0
- package/dist/next/contracts/accepts.d.ts.map +1 -0
- package/dist/next/contracts/accepts.js +123 -0
- package/dist/next/contracts/accepts.js.map +1 -0
- package/dist/next/contracts/contract.d.ts +121 -0
- package/dist/next/contracts/contract.d.ts.map +1 -0
- package/dist/next/contracts/contract.js +50 -0
- package/dist/next/contracts/contract.js.map +1 -0
- package/dist/next/contracts/declare.d.ts +107 -0
- package/dist/next/contracts/declare.d.ts.map +1 -0
- package/dist/next/contracts/declare.js +136 -0
- package/dist/next/contracts/declare.js.map +1 -0
- package/dist/next/contracts/evolve.d.ts +92 -0
- package/dist/next/contracts/evolve.d.ts.map +1 -0
- package/dist/next/contracts/evolve.js +179 -0
- package/dist/next/contracts/evolve.js.map +1 -0
- package/dist/next/contracts/fingerprint.d.ts +16 -0
- package/dist/next/contracts/fingerprint.d.ts.map +1 -0
- package/dist/next/contracts/fingerprint.js +50 -0
- package/dist/next/contracts/fingerprint.js.map +1 -0
- package/dist/next/contracts/history.d.ts +71 -0
- package/dist/next/contracts/history.d.ts.map +1 -0
- package/dist/next/contracts/history.js +3 -0
- package/dist/next/contracts/history.js.map +1 -0
- package/dist/next/contracts/host-kind.d.ts +40 -0
- package/dist/next/contracts/host-kind.d.ts.map +1 -0
- package/dist/next/contracts/host-kind.js +37 -0
- package/dist/next/contracts/host-kind.js.map +1 -0
- package/dist/next/contracts/index.d.ts +7 -0
- package/dist/next/contracts/index.d.ts.map +1 -0
- package/dist/next/contracts/index.js +6 -0
- package/dist/next/contracts/index.js.map +1 -0
- package/dist/next/contracts/internal.d.ts +10 -0
- package/dist/next/contracts/internal.d.ts.map +1 -0
- package/dist/next/contracts/internal.js +9 -0
- package/dist/next/contracts/internal.js.map +1 -0
- package/dist/next/contracts/names.d.ts +3 -0
- package/dist/next/contracts/names.d.ts.map +1 -0
- package/dist/next/contracts/names.js +13 -0
- package/dist/next/contracts/names.js.map +1 -0
- package/dist/next/contracts/params.d.ts +28 -0
- package/dist/next/contracts/params.d.ts.map +1 -0
- package/dist/next/contracts/params.js +50 -0
- package/dist/next/contracts/params.js.map +1 -0
- package/dist/next/contracts/schema.d.ts +102 -0
- package/dist/next/contracts/schema.d.ts.map +1 -0
- package/dist/next/contracts/schema.js +103 -0
- package/dist/next/contracts/schema.js.map +1 -0
- package/dist/next/contracts/snapshot.d.ts +16 -0
- package/dist/next/contracts/snapshot.d.ts.map +1 -0
- package/dist/next/contracts/snapshot.js +167 -0
- package/dist/next/contracts/snapshot.js.map +1 -0
- package/dist/next/data/args.d.ts +50 -0
- package/dist/next/data/args.d.ts.map +1 -0
- package/dist/next/data/args.js +83 -0
- package/dist/next/data/args.js.map +1 -0
- package/dist/next/data/errors.d.ts +73 -0
- package/dist/next/data/errors.d.ts.map +1 -0
- package/dist/next/data/errors.js +107 -0
- package/dist/next/data/errors.js.map +1 -0
- package/dist/next/data/failure.d.ts +26 -0
- package/dist/next/data/failure.d.ts.map +1 -0
- package/dist/next/data/failure.js +72 -0
- package/dist/next/data/failure.js.map +1 -0
- package/dist/next/data/index.d.ts +4 -0
- package/dist/next/data/index.d.ts.map +1 -0
- package/dist/next/data/index.js +4 -0
- package/dist/next/data/index.js.map +1 -0
- package/dist/next/data/internal.d.ts +7 -0
- package/dist/next/data/internal.d.ts.map +1 -0
- package/dist/next/data/internal.js +8 -0
- package/dist/next/data/internal.js.map +1 -0
- package/dist/next/data/params.d.ts +20 -0
- package/dist/next/data/params.d.ts.map +1 -0
- package/dist/next/data/params.js +31 -0
- package/dist/next/data/params.js.map +1 -0
- package/dist/next/data/principal.d.ts +17 -0
- package/dist/next/data/principal.d.ts.map +1 -0
- package/dist/next/data/principal.js +41 -0
- package/dist/next/data/principal.js.map +1 -0
- package/dist/next/data/validator.d.ts +12 -0
- package/dist/next/data/validator.d.ts.map +1 -0
- package/dist/next/data/validator.js +34 -0
- package/dist/next/data/validator.js.map +1 -0
- package/dist/next/documents/address-source.d.ts +20 -0
- package/dist/next/documents/address-source.d.ts.map +1 -0
- package/dist/next/documents/address-source.js +44 -0
- package/dist/next/documents/address-source.js.map +1 -0
- package/dist/next/documents/definition.d.ts +84 -0
- package/dist/next/documents/definition.d.ts.map +1 -0
- package/dist/next/documents/definition.js +73 -0
- package/dist/next/documents/definition.js.map +1 -0
- package/dist/next/documents/documents.d.ts +106 -0
- package/dist/next/documents/documents.d.ts.map +1 -0
- package/dist/next/documents/documents.js +224 -0
- package/dist/next/documents/documents.js.map +1 -0
- package/dist/next/documents/fence.d.ts +9 -0
- package/dist/next/documents/fence.d.ts.map +1 -0
- package/dist/next/documents/fence.js +15 -0
- package/dist/next/documents/fence.js.map +1 -0
- package/dist/next/documents/handles.d.ts +76 -0
- package/dist/next/documents/handles.d.ts.map +1 -0
- package/dist/next/documents/handles.js +66 -0
- package/dist/next/documents/handles.js.map +1 -0
- package/dist/next/documents/index.d.ts +4 -0
- package/dist/next/documents/index.d.ts.map +1 -0
- package/dist/next/documents/index.js +3 -0
- package/dist/next/documents/index.js.map +1 -0
- package/dist/next/documents/internal.d.ts +9 -0
- package/dist/next/documents/internal.d.ts.map +1 -0
- package/dist/next/documents/internal.js +9 -0
- package/dist/next/documents/internal.js.map +1 -0
- package/dist/next/documents/keyed-slot.d.ts +103 -0
- package/dist/next/documents/keyed-slot.d.ts.map +1 -0
- package/dist/next/documents/keyed-slot.js +395 -0
- package/dist/next/documents/keyed-slot.js.map +1 -0
- package/dist/next/documents/line.d.ts +7 -0
- package/dist/next/documents/line.d.ts.map +1 -0
- package/dist/next/documents/line.js +14 -0
- package/dist/next/documents/line.js.map +1 -0
- package/dist/next/documents/persistence.d.ts +104 -0
- package/dist/next/documents/persistence.d.ts.map +1 -0
- package/dist/next/documents/persistence.js +128 -0
- package/dist/next/documents/persistence.js.map +1 -0
- package/dist/next/documents/residency.d.ts +31 -0
- package/dist/next/documents/residency.d.ts.map +1 -0
- package/dist/next/documents/residency.js +93 -0
- package/dist/next/documents/residency.js.map +1 -0
- package/dist/next/documents/slot.d.ts +109 -0
- package/dist/next/documents/slot.d.ts.map +1 -0
- package/dist/next/documents/slot.js +181 -0
- package/dist/next/documents/slot.js.map +1 -0
- package/dist/next/documents/transaction.d.ts +133 -0
- package/dist/next/documents/transaction.d.ts.map +1 -0
- package/dist/next/documents/transaction.js +409 -0
- package/dist/next/documents/transaction.js.map +1 -0
- package/dist/next/host/activity.d.ts +31 -0
- package/dist/next/host/activity.d.ts.map +1 -0
- package/dist/next/host/activity.js +40 -0
- package/dist/next/host/activity.js.map +1 -0
- package/dist/next/host/adapted.d.ts +49 -0
- package/dist/next/host/adapted.d.ts.map +1 -0
- package/dist/next/host/adapted.js +214 -0
- package/dist/next/host/adapted.js.map +1 -0
- package/dist/next/host/attempt.d.ts +278 -0
- package/dist/next/host/attempt.d.ts.map +1 -0
- package/dist/next/host/attempt.js +1072 -0
- package/dist/next/host/attempt.js.map +1 -0
- package/dist/next/host/backoff.d.ts +29 -0
- package/dist/next/host/backoff.d.ts.map +1 -0
- package/dist/next/host/backoff.js +69 -0
- package/dist/next/host/backoff.js.map +1 -0
- package/dist/next/host/ctx.d.ts +47 -0
- package/dist/next/host/ctx.d.ts.map +1 -0
- package/dist/next/host/ctx.js +108 -0
- package/dist/next/host/ctx.js.map +1 -0
- package/dist/next/host/deadline.d.ts +12 -0
- package/dist/next/host/deadline.d.ts.map +1 -0
- package/dist/next/host/deadline.js +40 -0
- package/dist/next/host/deadline.js.map +1 -0
- package/dist/next/host/dependencies.d.ts +65 -0
- package/dist/next/host/dependencies.d.ts.map +1 -0
- package/dist/next/host/dependencies.js +115 -0
- package/dist/next/host/dependencies.js.map +1 -0
- package/dist/next/host/destination.d.ts +48 -0
- package/dist/next/host/destination.d.ts.map +1 -0
- package/dist/next/host/destination.js +101 -0
- package/dist/next/host/destination.js.map +1 -0
- package/dist/next/host/facet.d.ts +79 -0
- package/dist/next/host/facet.d.ts.map +1 -0
- package/dist/next/host/facet.js +55 -0
- package/dist/next/host/facet.js.map +1 -0
- package/dist/next/host/follow.d.ts +52 -0
- package/dist/next/host/follow.d.ts.map +1 -0
- package/dist/next/host/follow.js +207 -0
- package/dist/next/host/follow.js.map +1 -0
- package/dist/next/host/host.d.ts +495 -0
- package/dist/next/host/host.d.ts.map +1 -0
- package/dist/next/host/host.js +1075 -0
- package/dist/next/host/host.js.map +1 -0
- package/dist/next/host/index.d.ts +17 -0
- package/dist/next/host/index.d.ts.map +1 -0
- package/dist/next/host/index.js +6 -0
- package/dist/next/host/index.js.map +1 -0
- package/dist/next/host/internal.d.ts +10 -0
- package/dist/next/host/internal.d.ts.map +1 -0
- package/dist/next/host/internal.js +8 -0
- package/dist/next/host/internal.js.map +1 -0
- package/dist/next/host/members.d.ts +50 -0
- package/dist/next/host/members.d.ts.map +1 -0
- package/dist/next/host/members.js +107 -0
- package/dist/next/host/members.js.map +1 -0
- package/dist/next/host/native.d.ts +55 -0
- package/dist/next/host/native.d.ts.map +1 -0
- package/dist/next/host/native.js +92 -0
- package/dist/next/host/native.js.map +1 -0
- package/dist/next/host/object.d.ts +290 -0
- package/dist/next/host/object.d.ts.map +1 -0
- package/dist/next/host/object.js +1127 -0
- package/dist/next/host/object.js.map +1 -0
- package/dist/next/host/parked.d.ts +23 -0
- package/dist/next/host/parked.d.ts.map +1 -0
- package/dist/next/host/parked.js +79 -0
- package/dist/next/host/parked.js.map +1 -0
- package/dist/next/host/presence.d.ts +34 -0
- package/dist/next/host/presence.d.ts.map +1 -0
- package/dist/next/host/presence.js +117 -0
- package/dist/next/host/presence.js.map +1 -0
- package/dist/next/host/ref-state.d.ts +53 -0
- package/dist/next/host/ref-state.d.ts.map +1 -0
- package/dist/next/host/ref-state.js +83 -0
- package/dist/next/host/ref-state.js.map +1 -0
- package/dist/next/host/reference-keys.d.ts +36 -0
- package/dist/next/host/reference-keys.d.ts.map +1 -0
- package/dist/next/host/reference-keys.js +168 -0
- package/dist/next/host/reference-keys.js.map +1 -0
- package/dist/next/host/reference-source.d.ts +65 -0
- package/dist/next/host/reference-source.d.ts.map +1 -0
- package/dist/next/host/reference-source.js +285 -0
- package/dist/next/host/reference-source.js.map +1 -0
- package/dist/next/host/reference.d.ts +308 -0
- package/dist/next/host/reference.d.ts.map +1 -0
- package/dist/next/host/reference.js +775 -0
- package/dist/next/host/reference.js.map +1 -0
- package/dist/next/host/retry-on.d.ts +28 -0
- package/dist/next/host/retry-on.d.ts.map +1 -0
- package/dist/next/host/retry-on.js +52 -0
- package/dist/next/host/retry-on.js.map +1 -0
- package/dist/next/host/revocation.d.ts +16 -0
- package/dist/next/host/revocation.d.ts.map +1 -0
- package/dist/next/host/revocation.js +27 -0
- package/dist/next/host/revocation.js.map +1 -0
- package/dist/next/host/root.d.ts +27 -0
- package/dist/next/host/root.d.ts.map +1 -0
- package/dist/next/host/root.js +68 -0
- package/dist/next/host/root.js.map +1 -0
- package/dist/next/host/route.d.ts +64 -0
- package/dist/next/host/route.d.ts.map +1 -0
- package/dist/next/host/route.js +190 -0
- package/dist/next/host/route.js.map +1 -0
- package/dist/next/host/routines.d.ts +76 -0
- package/dist/next/host/routines.d.ts.map +1 -0
- package/dist/next/host/routines.js +350 -0
- package/dist/next/host/routines.js.map +1 -0
- package/dist/next/host/sleep.d.ts +9 -0
- package/dist/next/host/sleep.d.ts.map +1 -0
- package/dist/next/host/sleep.js +40 -0
- package/dist/next/host/sleep.js.map +1 -0
- package/dist/next/host/staging.d.ts +94 -0
- package/dist/next/host/staging.d.ts.map +1 -0
- package/dist/next/host/staging.js +302 -0
- package/dist/next/host/staging.js.map +1 -0
- package/dist/next/host/unbound.d.ts +30 -0
- package/dist/next/host/unbound.d.ts.map +1 -0
- package/dist/next/host/unbound.js +67 -0
- package/dist/next/host/unbound.js.map +1 -0
- package/dist/next/host/uuid.d.ts +3 -0
- package/dist/next/host/uuid.d.ts.map +1 -0
- package/dist/next/host/uuid.js +38 -0
- package/dist/next/host/uuid.js.map +1 -0
- package/dist/next/index.d.ts +28 -0
- package/dist/next/index.d.ts.map +1 -0
- package/dist/next/index.js +18 -0
- package/dist/next/index.js.map +1 -0
- package/dist/next/jobs/definition.d.ts +96 -0
- package/dist/next/jobs/definition.d.ts.map +1 -0
- package/dist/next/jobs/definition.js +83 -0
- package/dist/next/jobs/definition.js.map +1 -0
- package/dist/next/jobs/index.d.ts +5 -0
- package/dist/next/jobs/index.d.ts.map +1 -0
- package/dist/next/jobs/index.js +3 -0
- package/dist/next/jobs/index.js.map +1 -0
- package/dist/next/jobs/internal.d.ts +3 -0
- package/dist/next/jobs/internal.d.ts.map +1 -0
- package/dist/next/jobs/internal.js +4 -0
- package/dist/next/jobs/internal.js.map +1 -0
- package/dist/next/jobs/job.d.ts +152 -0
- package/dist/next/jobs/job.d.ts.map +1 -0
- package/dist/next/jobs/job.js +320 -0
- package/dist/next/jobs/job.js.map +1 -0
- package/dist/next/jobs/persisted.d.ts +38 -0
- package/dist/next/jobs/persisted.d.ts.map +1 -0
- package/dist/next/jobs/persisted.js +95 -0
- package/dist/next/jobs/persisted.js.map +1 -0
- package/dist/next/jobs/records.d.ts +231 -0
- package/dist/next/jobs/records.d.ts.map +1 -0
- package/dist/next/jobs/records.js +869 -0
- package/dist/next/jobs/records.js.map +1 -0
- package/dist/next/jobs/run-states.d.ts +69 -0
- package/dist/next/jobs/run-states.d.ts.map +1 -0
- package/dist/next/jobs/run-states.js +228 -0
- package/dist/next/jobs/run-states.js.map +1 -0
- package/dist/next/jobs/run.d.ts +113 -0
- package/dist/next/jobs/run.d.ts.map +1 -0
- package/dist/next/jobs/run.js +200 -0
- package/dist/next/jobs/run.js.map +1 -0
- package/dist/next/jobs/running.d.ts +44 -0
- package/dist/next/jobs/running.d.ts.map +1 -0
- package/dist/next/jobs/running.js +117 -0
- package/dist/next/jobs/running.js.map +1 -0
- package/dist/next/jobs/stored.d.ts +63 -0
- package/dist/next/jobs/stored.d.ts.map +1 -0
- package/dist/next/jobs/stored.js +55 -0
- package/dist/next/jobs/stored.js.map +1 -0
- package/dist/next/link/binary.d.ts +4 -0
- package/dist/next/link/binary.d.ts.map +1 -0
- package/dist/next/link/binary.js +534 -0
- package/dist/next/link/binary.js.map +1 -0
- package/dist/next/link/channel.d.ts +63 -0
- package/dist/next/link/channel.d.ts.map +1 -0
- package/dist/next/link/channel.js +202 -0
- package/dist/next/link/channel.js.map +1 -0
- package/dist/next/link/errors.d.ts +7 -0
- package/dist/next/link/errors.d.ts.map +1 -0
- package/dist/next/link/errors.js +21 -0
- package/dist/next/link/errors.js.map +1 -0
- package/dist/next/link/index.d.ts +8 -0
- package/dist/next/link/index.d.ts.map +1 -0
- package/dist/next/link/index.js +8 -0
- package/dist/next/link/index.js.map +1 -0
- package/dist/next/link/internal.d.ts +9 -0
- package/dist/next/link/internal.d.ts.map +1 -0
- package/dist/next/link/internal.js +10 -0
- package/dist/next/link/internal.js.map +1 -0
- package/dist/next/link/ipc.d.ts +22 -0
- package/dist/next/link/ipc.d.ts.map +1 -0
- package/dist/next/link/ipc.js +64 -0
- package/dist/next/link/ipc.js.map +1 -0
- package/dist/next/link/link.d.ts +34 -0
- package/dist/next/link/link.d.ts.map +1 -0
- package/dist/next/link/link.js +87 -0
- package/dist/next/link/link.js.map +1 -0
- package/dist/next/link/message.d.ts +249 -0
- package/dist/next/link/message.d.ts.map +1 -0
- package/dist/next/link/message.js +123 -0
- package/dist/next/link/message.js.map +1 -0
- package/dist/next/link/part.d.ts +80 -0
- package/dist/next/link/part.d.ts.map +1 -0
- package/dist/next/link/part.js +164 -0
- package/dist/next/link/part.js.map +1 -0
- package/dist/next/link/text.d.ts +6 -0
- package/dist/next/link/text.d.ts.map +1 -0
- package/dist/next/link/text.js +335 -0
- package/dist/next/link/text.js.map +1 -0
- package/dist/next/link/values.d.ts +40 -0
- package/dist/next/link/values.d.ts.map +1 -0
- package/dist/next/link/values.js +117 -0
- package/dist/next/link/values.js.map +1 -0
- package/dist/next/link/websocket.d.ts +26 -0
- package/dist/next/link/websocket.d.ts.map +1 -0
- package/dist/next/link/websocket.js +91 -0
- package/dist/next/link/websocket.js.map +1 -0
- package/dist/next/registries/contribution.d.ts +50 -0
- package/dist/next/registries/contribution.d.ts.map +1 -0
- package/dist/next/registries/contribution.js +129 -0
- package/dist/next/registries/contribution.js.map +1 -0
- package/dist/next/registries/entries.d.ts +18 -0
- package/dist/next/registries/entries.d.ts.map +1 -0
- package/dist/next/registries/entries.js +42 -0
- package/dist/next/registries/entries.js.map +1 -0
- package/dist/next/registries/index.d.ts +3 -0
- package/dist/next/registries/index.d.ts.map +1 -0
- package/dist/next/registries/index.js +5 -0
- package/dist/next/registries/index.js.map +1 -0
- package/dist/next/registries/internal.d.ts +4 -0
- package/dist/next/registries/internal.d.ts.map +1 -0
- package/dist/next/registries/internal.js +5 -0
- package/dist/next/registries/internal.js.map +1 -0
- package/dist/next/registries/record.d.ts +94 -0
- package/dist/next/registries/record.d.ts.map +1 -0
- package/dist/next/registries/record.js +253 -0
- package/dist/next/registries/record.js.map +1 -0
- package/dist/next/registries/registry.d.ts +74 -0
- package/dist/next/registries/registry.d.ts.map +1 -0
- package/dist/next/registries/registry.js +14 -0
- package/dist/next/registries/registry.js.map +1 -0
- package/dist/next/registries/value.d.ts +48 -0
- package/dist/next/registries/value.d.ts.map +1 -0
- package/dist/next/registries/value.js +199 -0
- package/dist/next/registries/value.js.map +1 -0
- package/dist/next/remote/calls.d.ts +25 -0
- package/dist/next/remote/calls.d.ts.map +1 -0
- package/dist/next/remote/calls.js +62 -0
- package/dist/next/remote/calls.js.map +1 -0
- package/dist/next/remote/consumer.d.ts +42 -0
- package/dist/next/remote/consumer.d.ts.map +1 -0
- package/dist/next/remote/consumer.js +343 -0
- package/dist/next/remote/consumer.js.map +1 -0
- package/dist/next/remote/hold.d.ts +130 -0
- package/dist/next/remote/hold.d.ts.map +1 -0
- package/dist/next/remote/hold.js +537 -0
- package/dist/next/remote/hold.js.map +1 -0
- package/dist/next/remote/host-link.d.ts +77 -0
- package/dist/next/remote/host-link.d.ts.map +1 -0
- package/dist/next/remote/host-link.js +182 -0
- package/dist/next/remote/host-link.js.map +1 -0
- package/dist/next/remote/internal.d.ts +6 -0
- package/dist/next/remote/internal.d.ts.map +1 -0
- package/dist/next/remote/internal.js +6 -0
- package/dist/next/remote/internal.js.map +1 -0
- package/dist/next/remote/path.d.ts +46 -0
- package/dist/next/remote/path.d.ts.map +1 -0
- package/dist/next/remote/path.js +73 -0
- package/dist/next/remote/path.js.map +1 -0
- package/dist/next/remote/provider.d.ts +76 -0
- package/dist/next/remote/provider.d.ts.map +1 -0
- package/dist/next/remote/provider.js +506 -0
- package/dist/next/remote/provider.js.map +1 -0
- package/dist/next/remote/relay.d.ts +58 -0
- package/dist/next/remote/relay.d.ts.map +1 -0
- package/dist/next/remote/relay.js +117 -0
- package/dist/next/remote/relay.js.map +1 -0
- package/dist/next/remote/remote-object.d.ts +133 -0
- package/dist/next/remote/remote-object.d.ts.map +1 -0
- package/dist/next/remote/remote-object.js +411 -0
- package/dist/next/remote/remote-object.js.map +1 -0
- package/dist/next/remote/replica.d.ts +59 -0
- package/dist/next/remote/replica.d.ts.map +1 -0
- package/dist/next/remote/replica.js +125 -0
- package/dist/next/remote/replica.js.map +1 -0
- package/dist/next/state/batch.d.ts +64 -0
- package/dist/next/state/batch.d.ts.map +1 -0
- package/dist/next/state/batch.js +163 -0
- package/dist/next/state/batch.js.map +1 -0
- package/dist/next/state/derive.d.ts +52 -0
- package/dist/next/state/derive.d.ts.map +1 -0
- package/dist/next/state/derive.js +182 -0
- package/dist/next/state/derive.js.map +1 -0
- package/dist/next/state/index.d.ts +6 -0
- package/dist/next/state/index.d.ts.map +1 -0
- package/dist/next/state/index.js +4 -0
- package/dist/next/state/index.js.map +1 -0
- package/dist/next/state/internal.d.ts +6 -0
- package/dist/next/state/internal.d.ts.map +1 -0
- package/dist/next/state/internal.js +8 -0
- package/dist/next/state/internal.js.map +1 -0
- package/dist/next/state/native-source.d.ts +106 -0
- package/dist/next/state/native-source.d.ts.map +1 -0
- package/dist/next/state/native-source.js +240 -0
- package/dist/next/state/native-source.js.map +1 -0
- package/dist/next/state/watchable.d.ts +114 -0
- package/dist/next/state/watchable.d.ts.map +1 -0
- package/dist/next/state/watchable.js +156 -0
- package/dist/next/state/watchable.js.map +1 -0
- package/dist/next/state/writable.d.ts +32 -0
- package/dist/next/state/writable.d.ts.map +1 -0
- package/dist/next/state/writable.js +49 -0
- package/dist/next/state/writable.js.map +1 -0
- package/dist/next/store/adapter.d.ts +67 -0
- package/dist/next/store/adapter.d.ts.map +1 -0
- package/dist/next/store/adapter.js +118 -0
- package/dist/next/store/adapter.js.map +1 -0
- package/dist/next/store/allocator.d.ts +17 -0
- package/dist/next/store/allocator.d.ts.map +1 -0
- package/dist/next/store/allocator.js +30 -0
- package/dist/next/store/allocator.js.map +1 -0
- package/dist/next/store/applier.d.ts +8 -0
- package/dist/next/store/applier.d.ts.map +1 -0
- package/dist/next/store/applier.js +375 -0
- package/dist/next/store/applier.js.map +1 -0
- package/dist/next/store/apply-batch.d.ts +12 -0
- package/dist/next/store/apply-batch.d.ts.map +1 -0
- package/dist/next/store/apply-batch.js +83 -0
- package/dist/next/store/apply-batch.js.map +1 -0
- package/dist/next/store/archive.d.ts +32 -0
- package/dist/next/store/archive.d.ts.map +1 -0
- package/dist/next/store/archive.js +129 -0
- package/dist/next/store/archive.js.map +1 -0
- package/dist/next/store/backend.d.ts +10 -0
- package/dist/next/store/backend.d.ts.map +1 -0
- package/dist/next/store/backend.js +15 -0
- package/dist/next/store/backend.js.map +1 -0
- package/dist/next/store/catalog.d.ts +24 -0
- package/dist/next/store/catalog.d.ts.map +1 -0
- package/dist/next/store/catalog.js +17 -0
- package/dist/next/store/catalog.js.map +1 -0
- package/dist/next/store/claims.d.ts +23 -0
- package/dist/next/store/claims.d.ts.map +1 -0
- package/dist/next/store/claims.js +65 -0
- package/dist/next/store/claims.js.map +1 -0
- package/dist/next/store/columns.d.ts +77 -0
- package/dist/next/store/columns.d.ts.map +1 -0
- package/dist/next/store/columns.js +77 -0
- package/dist/next/store/columns.js.map +1 -0
- package/dist/next/store/engine.d.ts +176 -0
- package/dist/next/store/engine.d.ts.map +1 -0
- package/dist/next/store/engine.js +283 -0
- package/dist/next/store/engine.js.map +1 -0
- package/dist/next/store/evaluate.d.ts +17 -0
- package/dist/next/store/evaluate.d.ts.map +1 -0
- package/dist/next/store/evaluate.js +128 -0
- package/dist/next/store/evaluate.js.map +1 -0
- package/dist/next/store/export.d.ts +17 -0
- package/dist/next/store/export.d.ts.map +1 -0
- package/dist/next/store/export.js +200 -0
- package/dist/next/store/export.js.map +1 -0
- package/dist/next/store/expression.d.ts +150 -0
- package/dist/next/store/expression.d.ts.map +1 -0
- package/dist/next/store/expression.js +268 -0
- package/dist/next/store/expression.js.map +1 -0
- package/dist/next/store/import.d.ts +10 -0
- package/dist/next/store/import.d.ts.map +1 -0
- package/dist/next/store/import.js +276 -0
- package/dist/next/store/import.js.map +1 -0
- package/dist/next/store/index.d.ts +16 -0
- package/dist/next/store/index.d.ts.map +1 -0
- package/dist/next/store/index.js +13 -0
- package/dist/next/store/index.js.map +1 -0
- package/dist/next/store/json-column.d.ts +33 -0
- package/dist/next/store/json-column.d.ts.map +1 -0
- package/dist/next/store/json-column.js +61 -0
- package/dist/next/store/json-column.js.map +1 -0
- package/dist/next/store/jsonl.d.ts +9 -0
- package/dist/next/store/jsonl.d.ts.map +1 -0
- package/dist/next/store/jsonl.js +61 -0
- package/dist/next/store/jsonl.js.map +1 -0
- package/dist/next/store/outbox.d.ts +26 -0
- package/dist/next/store/outbox.d.ts.map +1 -0
- package/dist/next/store/outbox.js +80 -0
- package/dist/next/store/outbox.js.map +1 -0
- package/dist/next/store/query.d.ts +39 -0
- package/dist/next/store/query.d.ts.map +1 -0
- package/dist/next/store/query.js +97 -0
- package/dist/next/store/query.js.map +1 -0
- package/dist/next/store/refusal.d.ts +15 -0
- package/dist/next/store/refusal.d.ts.map +1 -0
- package/dist/next/store/refusal.js +36 -0
- package/dist/next/store/refusal.js.map +1 -0
- package/dist/next/store/rows.d.ts +80 -0
- package/dist/next/store/rows.d.ts.map +1 -0
- package/dist/next/store/rows.js +183 -0
- package/dist/next/store/rows.js.map +1 -0
- package/dist/next/store/schema.d.ts +25 -0
- package/dist/next/store/schema.d.ts.map +1 -0
- package/dist/next/store/schema.js +115 -0
- package/dist/next/store/schema.js.map +1 -0
- package/dist/next/store/sql.d.ts +73 -0
- package/dist/next/store/sql.d.ts.map +1 -0
- package/dist/next/store/sql.js +234 -0
- package/dist/next/store/sql.js.map +1 -0
- package/dist/next/store/step.d.ts +48 -0
- package/dist/next/store/step.d.ts.map +1 -0
- package/dist/next/store/step.js +50 -0
- package/dist/next/store/step.js.map +1 -0
- package/dist/next/store/store.d.ts +161 -0
- package/dist/next/store/store.d.ts.map +1 -0
- package/dist/next/store/store.js +627 -0
- package/dist/next/store/store.js.map +1 -0
- package/dist/next/store/table-changes.d.ts +29 -0
- package/dist/next/store/table-changes.d.ts.map +1 -0
- package/dist/next/store/table-changes.js +102 -0
- package/dist/next/store/table-changes.js.map +1 -0
- package/dist/next/store/table-evolve.d.ts +74 -0
- package/dist/next/store/table-evolve.d.ts.map +1 -0
- package/dist/next/store/table-evolve.js +201 -0
- package/dist/next/store/table-evolve.js.map +1 -0
- package/dist/next/store/table-handle.d.ts +67 -0
- package/dist/next/store/table-handle.d.ts.map +1 -0
- package/dist/next/store/table-handle.js +101 -0
- package/dist/next/store/table-handle.js.map +1 -0
- package/dist/next/store/table-history.d.ts +75 -0
- package/dist/next/store/table-history.d.ts.map +1 -0
- package/dist/next/store/table-history.js +42 -0
- package/dist/next/store/table-history.js.map +1 -0
- package/dist/next/store/table-migration.d.ts +16 -0
- package/dist/next/store/table-migration.d.ts.map +1 -0
- package/dist/next/store/table-migration.js +202 -0
- package/dist/next/store/table-migration.js.map +1 -0
- package/dist/next/store/table-writes.d.ts +125 -0
- package/dist/next/store/table-writes.d.ts.map +1 -0
- package/dist/next/store/table-writes.js +165 -0
- package/dist/next/store/table-writes.js.map +1 -0
- package/dist/next/store/table.d.ts +80 -0
- package/dist/next/store/table.d.ts.map +1 -0
- package/dist/next/store/table.js +103 -0
- package/dist/next/store/table.js.map +1 -0
- package/dist/next/store/text.d.ts +14 -0
- package/dist/next/store/text.d.ts.map +1 -0
- package/dist/next/store/text.js +51 -0
- package/dist/next/store/text.js.map +1 -0
- package/dist/next/store/writes.d.ts +5 -0
- package/dist/next/store/writes.d.ts.map +1 -0
- package/dist/next/store/writes.js +4 -0
- package/dist/next/store/writes.js.map +1 -0
- package/dist/next-node/compression.d.ts +7 -0
- package/dist/next-node/compression.d.ts.map +1 -0
- package/dist/next-node/compression.js +24 -0
- package/dist/next-node/compression.js.map +1 -0
- package/dist/next-node/http/admission.d.ts +63 -0
- package/dist/next-node/http/admission.d.ts.map +1 -0
- package/dist/next-node/http/admission.js +134 -0
- package/dist/next-node/http/admission.js.map +1 -0
- package/dist/next-node/http/authenticate.d.ts +21 -0
- package/dist/next-node/http/authenticate.d.ts.map +1 -0
- package/dist/next-node/http/authenticate.js +34 -0
- package/dist/next-node/http/authenticate.js.map +1 -0
- package/dist/next-node/http/cookies.d.ts +24 -0
- package/dist/next-node/http/cookies.d.ts.map +1 -0
- package/dist/next-node/http/cookies.js +62 -0
- package/dist/next-node/http/cookies.js.map +1 -0
- package/dist/next-node/http/file.d.ts +23 -0
- package/dist/next-node/http/file.d.ts.map +1 -0
- package/dist/next-node/http/file.js +94 -0
- package/dist/next-node/http/file.js.map +1 -0
- package/dist/next-node/http/headers.d.ts +37 -0
- package/dist/next-node/http/headers.d.ts.map +1 -0
- package/dist/next-node/http/headers.js +129 -0
- package/dist/next-node/http/headers.js.map +1 -0
- package/dist/next-node/http/http.d.ts +100 -0
- package/dist/next-node/http/http.d.ts.map +1 -0
- package/dist/next-node/http/http.js +462 -0
- package/dist/next-node/http/http.js.map +1 -0
- package/dist/next-node/http/incoming.d.ts +19 -0
- package/dist/next-node/http/incoming.d.ts.map +1 -0
- package/dist/next-node/http/incoming.js +31 -0
- package/dist/next-node/http/incoming.js.map +1 -0
- package/dist/next-node/http/index.d.ts +11 -0
- package/dist/next-node/http/index.d.ts.map +1 -0
- package/dist/next-node/http/index.js +12 -0
- package/dist/next-node/http/index.js.map +1 -0
- package/dist/next-node/http/node.d.ts +78 -0
- package/dist/next-node/http/node.d.ts.map +1 -0
- package/dist/next-node/http/node.js +291 -0
- package/dist/next-node/http/node.js.map +1 -0
- package/dist/next-node/http/request.d.ts +54 -0
- package/dist/next-node/http/request.d.ts.map +1 -0
- package/dist/next-node/http/request.js +116 -0
- package/dist/next-node/http/request.js.map +1 -0
- package/dist/next-node/http/response.d.ts +63 -0
- package/dist/next-node/http/response.d.ts.map +1 -0
- package/dist/next-node/http/response.js +202 -0
- package/dist/next-node/http/response.js.map +1 -0
- package/dist/next-node/http/router.d.ts +114 -0
- package/dist/next-node/http/router.d.ts.map +1 -0
- package/dist/next-node/http/router.js +261 -0
- package/dist/next-node/http/router.js.map +1 -0
- package/dist/next-node/http/upgrades.d.ts +58 -0
- package/dist/next-node/http/upgrades.d.ts.map +1 -0
- package/dist/next-node/http/upgrades.js +184 -0
- package/dist/next-node/http/upgrades.js.map +1 -0
- package/dist/next-node/plugins/build.d.ts +57 -0
- package/dist/next-node/plugins/build.d.ts.map +1 -0
- package/dist/next-node/plugins/build.js +334 -0
- package/dist/next-node/plugins/build.js.map +1 -0
- package/dist/next-node/plugins/discover.d.ts +36 -0
- package/dist/next-node/plugins/discover.d.ts.map +1 -0
- package/dist/next-node/plugins/discover.js +91 -0
- package/dist/next-node/plugins/discover.js.map +1 -0
- package/dist/next-node/plugins/evaluate.d.ts +33 -0
- package/dist/next-node/plugins/evaluate.d.ts.map +1 -0
- package/dist/next-node/plugins/evaluate.js +98 -0
- package/dist/next-node/plugins/evaluate.js.map +1 -0
- package/dist/next-node/plugins/index.d.ts +9 -0
- package/dist/next-node/plugins/index.d.ts.map +1 -0
- package/dist/next-node/plugins/index.js +11 -0
- package/dist/next-node/plugins/index.js.map +1 -0
- package/dist/next-node/plugins/install.d.ts +13 -0
- package/dist/next-node/plugins/install.d.ts.map +1 -0
- package/dist/next-node/plugins/install.js +37 -0
- package/dist/next-node/plugins/install.js.map +1 -0
- package/dist/next-node/plugins/plugins.d.ts +135 -0
- package/dist/next-node/plugins/plugins.d.ts.map +1 -0
- package/dist/next-node/plugins/plugins.js +206 -0
- package/dist/next-node/plugins/plugins.js.map +1 -0
- package/dist/next-node/plugins/runtime.d.ts +41 -0
- package/dist/next-node/plugins/runtime.d.ts.map +1 -0
- package/dist/next-node/plugins/runtime.js +136 -0
- package/dist/next-node/plugins/runtime.js.map +1 -0
- package/dist/next-node/plugins/stack.d.ts +16 -0
- package/dist/next-node/plugins/stack.d.ts.map +1 -0
- package/dist/next-node/plugins/stack.js +61 -0
- package/dist/next-node/plugins/stack.js.map +1 -0
- package/dist/next-node/plugins/watcher.d.ts +58 -0
- package/dist/next-node/plugins/watcher.d.ts.map +1 -0
- package/dist/next-node/plugins/watcher.js +281 -0
- package/dist/next-node/plugins/watcher.js.map +1 -0
- package/dist/next-node/workers/control.d.ts +83 -0
- package/dist/next-node/workers/control.d.ts.map +1 -0
- package/dist/next-node/workers/control.js +77 -0
- package/dist/next-node/workers/control.js.map +1 -0
- package/dist/next-node/workers/index.d.ts +5 -0
- package/dist/next-node/workers/index.d.ts.map +1 -0
- package/dist/next-node/workers/index.js +7 -0
- package/dist/next-node/workers/index.js.map +1 -0
- package/dist/next-node/workers/lock.d.ts +21 -0
- package/dist/next-node/workers/lock.d.ts.map +1 -0
- package/dist/next-node/workers/lock.js +137 -0
- package/dist/next-node/workers/lock.js.map +1 -0
- package/dist/next-node/workers/main.d.ts +46 -0
- package/dist/next-node/workers/main.d.ts.map +1 -0
- package/dist/next-node/workers/main.js +230 -0
- package/dist/next-node/workers/main.js.map +1 -0
- package/dist/next-node/workers/process.d.ts +42 -0
- package/dist/next-node/workers/process.d.ts.map +1 -0
- package/dist/next-node/workers/process.js +125 -0
- package/dist/next-node/workers/process.js.map +1 -0
- package/dist/next-node/workers/workers.d.ts +80 -0
- package/dist/next-node/workers/workers.d.ts.map +1 -0
- package/dist/next-node/workers/workers.js +572 -0
- package/dist/next-node/workers/workers.js.map +1 -0
- package/dist/object.d.ts +4 -4
- package/dist/object.d.ts.map +1 -1
- package/dist/object.js +3 -4
- package/dist/object.js.map +1 -1
- package/dist/output.d.ts +9 -3
- package/dist/output.d.ts.map +1 -1
- package/dist/output.js +21 -9
- package/dist/output.js.map +1 -1
- package/dist/remote.d.ts.map +1 -1
- package/dist/remote.js +2 -2
- package/dist/remote.js.map +1 -1
- package/dist/schema.d.ts +8 -4
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +180 -5
- package/dist/schema.js.map +1 -1
- package/dist/sqlite/cloudflare.d.ts +54 -0
- package/dist/sqlite/cloudflare.d.ts.map +1 -0
- package/dist/sqlite/cloudflare.js +144 -0
- package/dist/sqlite/cloudflare.js.map +1 -0
- package/dist/sqlite/database.d.ts +40 -0
- package/dist/sqlite/database.d.ts.map +1 -0
- package/dist/sqlite/database.js +2 -0
- package/dist/sqlite/database.js.map +1 -0
- package/dist/sqlite/index.d.ts +4 -0
- package/dist/sqlite/index.d.ts.map +1 -0
- package/dist/sqlite/index.js +3 -0
- package/dist/sqlite/index.js.map +1 -0
- package/dist/sqlite/migrations.d.ts +10 -0
- package/dist/sqlite/migrations.d.ts.map +1 -0
- package/dist/sqlite/migrations.js +33 -0
- package/dist/sqlite/migrations.js.map +1 -0
- package/dist/sqlite/node.d.ts +41 -0
- package/dist/sqlite/node.d.ts.map +1 -0
- package/dist/sqlite/node.js +191 -0
- package/dist/sqlite/node.js.map +1 -0
- package/dist/sqlite/schema.d.ts +3 -0
- package/dist/sqlite/schema.d.ts.map +1 -0
- package/dist/sqlite/schema.js +10 -0
- package/dist/sqlite/schema.js.map +1 -0
- package/dist/telemetry-sqlite/index.d.ts +24 -0
- package/dist/telemetry-sqlite/index.d.ts.map +1 -0
- package/dist/telemetry-sqlite/index.js +273 -0
- package/dist/telemetry-sqlite/index.js.map +1 -0
- package/dist/telemetry-sqlite/store.d.ts +9 -0
- package/dist/telemetry-sqlite/store.d.ts.map +1 -0
- package/dist/telemetry-sqlite/store.js +110 -0
- package/dist/telemetry-sqlite/store.js.map +1 -0
- package/dist/watch.d.ts +194 -0
- package/dist/watch.d.ts.map +1 -0
- package/dist/watch.js +383 -0
- package/dist/watch.js.map +1 -0
- package/dist/wire.d.ts +174 -193
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +81 -80
- package/dist/wire.js.map +1 -1
- package/docs/guide.md +15 -15
- package/docs/next/benchmarks.md +959 -0
- package/docs/next/decisions.md +2957 -0
- package/docs/next/dependencies/book.md +1671 -0
- package/docs/next/dependencies/index.html +2641 -0
- package/docs/next/dependencies/model.md +330 -0
- package/docs/next/design.md +2554 -0
- package/docs/next/durable-observers/book.md +432 -0
- package/docs/next/durable-observers/index.html +517 -0
- package/docs/next/flow-control/book.md +333 -0
- package/docs/next/flow-control/fold/index.html +265 -0
- package/docs/next/flow-control/index.html +548 -0
- package/docs/next/flow-control/window/index.html +228 -0
- package/docs/next/guide-plugins-hosts/book.md +607 -0
- package/docs/next/guide-plugins-hosts/index.html +652 -0
- package/docs/next/http-workers/book.md +378 -0
- package/docs/next/http-workers/index.html +515 -0
- package/docs/next/layer-1.md +311 -0
- package/docs/next/layer-2.md +216 -0
- package/docs/next/plugin-model/book.md +186 -0
- package/docs/next/plugin-model/index.html +310 -0
- package/docs/next/plugin-primer/book.md +273 -0
- package/docs/next/plugin-primer/index.html +430 -0
- package/docs/next/slice-1.md +236 -0
- package/docs/next/slice-10.md +285 -0
- package/docs/next/slice-11.md +93 -0
- package/docs/next/slice-2.md +174 -0
- package/docs/next/slice-3a.md +296 -0
- package/docs/next/slice-3b.md +197 -0
- package/docs/next/slice-4.md +146 -0
- package/docs/next/slice-4a.md +418 -0
- package/docs/next/slice-4b.md +208 -0
- package/docs/next/slice-5.md +281 -0
- package/docs/next/slice-6a.md +676 -0
- package/docs/next/slice-6b.md +332 -0
- package/docs/next/slice-7a.md +130 -0
- package/docs/next/slice-7b/book.md +608 -0
- package/docs/next/slice-7b/index.html +842 -0
- package/docs/next/slice-7b.md +255 -0
- package/docs/next/slice-7c.md +165 -0
- package/docs/next/slice-8.md +194 -0
- package/docs/next/slices.md +230 -0
- package/docs/next/store/book.md +665 -0
- package/docs/next/store/index.html +861 -0
- package/docs/next/store/walkthrough.md +193 -0
- package/docs/spec.md +9 -9
- package/docs/tutorial.md +26 -25
- package/package.json +42 -5
- package/src/delta/README.md +69 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# Slice 3b: surviving drops (spec, for the owner's approval)
|
|
2
|
+
|
|
3
|
+
Status: **approved (owner, 2026-10-22)**, after Astra's and Fable's spec reviews. Guiding rule (owner): simple, fast,
|
|
4
|
+
correct. The single source for building 3b, together with the feature map in `slices.md` (entries assigned to 3b),
|
|
5
|
+
`design.md` read in full (most relevant: §3 links, recovery and timeouts, §4, §6, §7 references, §8, §19, §22), the
|
|
6
|
+
decision log, the carry-over (L4, L5, L6) and the root `AGENTS.md` style section. Builds on L1 and slices 1, 2 and 3a
|
|
7
|
+
(`76b32ed2d`).
|
|
8
|
+
|
|
9
|
+
## What an app can do after this slice
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
const notes = host.hold(Notes, { session: "S1" }, ctx); // a reference at once, not awaited
|
|
13
|
+
notes.state.value; // { kind: "loading" }
|
|
14
|
+
const w = await notes.state.watch(ctx); // the current state, then every change
|
|
15
|
+
w.start(async (state) => render(state)); // loading → live → loading (link dropped) → live …
|
|
16
|
+
|
|
17
|
+
await notes.add({ text: "milk" }, ctx); // parks while loading, sent once live
|
|
18
|
+
if (notes.state.value.kind === "failed") notes.retry(); // a Retry button
|
|
19
|
+
|
|
20
|
+
client.connect(newLink, { principal: { kind: "server" } }, ctx); // after a drop: every reference re-holds
|
|
21
|
+
|
|
22
|
+
host.serve(Notes, factory, { linger: 5 * 60_000 }); // a just-released object stays warm for 5 minutes
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## 1. Reference state (§7)
|
|
26
|
+
|
|
27
|
+
- Every reference has `ref.state`, a `NativeWatchable<RefState>` (in-process: it holds errors; open point 1):
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
type RefState =
|
|
31
|
+
| { kind: "loading" }
|
|
32
|
+
| { kind: "live" }
|
|
33
|
+
| { kind: "failed"; cause: FailureCause; retryAt: number | undefined } // undefined: broken, no automatic retry
|
|
34
|
+
| { kind: "released" };
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`ref.state.watch(ctx)` delivers the current state, then every change. On release the state becomes `released` and
|
|
38
|
+
the watch ends `ended` (the end is the notification; a native watch drops undelivered frames when it ends).
|
|
39
|
+
- **One rule for both sides:** a reference is `loading` while its object is activating or retrying, while it waits for
|
|
40
|
+
`load` or a parent link, and while its link is down; `failed` while its object is failed and no attempt runs; `live`
|
|
41
|
+
when bound; `released` once released. `variant` is `undefined` before the first binding and keeps the last bound
|
|
42
|
+
variant while `loading` or `failed`.
|
|
43
|
+
|
|
44
|
+
| State | Calls | State members |
|
|
45
|
+
| --- | --- | --- |
|
|
46
|
+
| `loading` | park (section 3) | readable: the last value; before the first binding a read throws `not_ready` and a `watch` waits for the first value |
|
|
47
|
+
| `live` | run | readable |
|
|
48
|
+
| `failed` | reject at once with the cause's error | reads throw the cause's error; existing watches stay open |
|
|
49
|
+
| `released` | throw `released` | reads throw `released`; watches end `ended` |
|
|
50
|
+
|
|
51
|
+
- Member watches survive `loading` and `failed` (reference states): they get the next frame when the reference is live
|
|
52
|
+
again. They end only when the reference is released, the member itself fails (W1, `failed`), or the member is not in a
|
|
53
|
+
newly bound variant (`ended`).
|
|
54
|
+
- **Retry** (open point 2): `ref.retry()` asks the object for an attempt now, skipping the backoff window and renewing a
|
|
55
|
+
broken object's readiness (carry-over L5); one attempt runs at a time, so a retry during one is ignored. Local: the
|
|
56
|
+
object's `attempt()`. Remote: a new message `retry { hold }`; the provider does the same for the held object, for all
|
|
57
|
+
its holders. On `live` and `released` references `retry()` does nothing; without an open parent link the next
|
|
58
|
+
`connect` re-holds anyway.
|
|
59
|
+
- **Attempt notice** (open point 2): when a failed object starts a new attempt (backoff, retry, or a dependency going
|
|
60
|
+
live), its holds get `loading { hold }`, so remote references move `failed → loading` and park calls exactly like local
|
|
61
|
+
ones. `failed { hold, cause, retryIn? }` carries the remaining delay of the provider's window (`until - now`, from a
|
|
62
|
+
new `until` on slice 2's backoff entry, carry-over L4) as advice for `retryAt`; the attempt itself is announced by
|
|
63
|
+
`loading`.
|
|
64
|
+
|
|
65
|
+
## 2. Acquiring: `hold` and `get` (§7)
|
|
66
|
+
|
|
67
|
+
| Situation | `host.hold(Type, params, ctx, options?)` | `host.get(…)` |
|
|
68
|
+
| --- | --- | --- |
|
|
69
|
+
| invalid params, a local type not served here, no principal for a same-host remote type | throws at once (made before `load`: `failed` broken once `load` resolved, since the types are known only then) | rejects at once |
|
|
70
|
+
| before `load` resolved, or no parent link yet (remote) | `loading` | waits |
|
|
71
|
+
| the object activates | `loading` | waits |
|
|
72
|
+
| a transient failure | `failed` (with `retryAt`), then `loading` on the next attempt | waits; at its deadline it releases the reference and rejects with the last cause |
|
|
73
|
+
| a broken failure | `failed` | releases the reference and rejects at once with the cause |
|
|
74
|
+
| the link drops before the first binding | `loading`, re-held on the next `connect` | keeps waiting within its one deadline |
|
|
75
|
+
| live | `live` | resolves |
|
|
76
|
+
| the caller's context is aborted | (no effect on a `hold`) | releases the reference and rejects |
|
|
77
|
+
|
|
78
|
+
A `hold` follows its object until released and never rejects. A `get` has one deadline (`readyTimeout`, per get) from
|
|
79
|
+
the moment it is called, across reconnects.
|
|
80
|
+
|
|
81
|
+
## 3. Parking (§3, §7)
|
|
82
|
+
|
|
83
|
+
- A call made on a `loading` reference is queued with its own deadline, measured from the moment it was called (a
|
|
84
|
+
reconnect never renews it). When the reference goes `live`, queued calls are **sent** in the order they were made,
|
|
85
|
+
before any later call (a new call cannot overtake queued ones); their completions may arrive in any order. When the
|
|
86
|
+
reference goes `failed` they reject with the cause; at its deadline a call rejects `unavailable/park_timeout`; the
|
|
87
|
+
caller's cancellation rejects it at once; release rejects them `released`.
|
|
88
|
+
- A queued call is resolved against the binding it is sent on: after a reconnect that bound another variant, a method
|
|
89
|
+
the new variant lacks rejects `invalid/member`; indexes are taken from the new binding.
|
|
90
|
+
- Calls already **sent** when the link drops fail `unavailable` (never resent, §7).
|
|
91
|
+
- **The park deadline is `readyTimeout`** (owner, 2026-10-22; C13's two host timeouts stay): a queued call waits at most
|
|
92
|
+
the reference's `readyTimeout` (host default 60 s, per `get`/`hold` override), then rejects `unavailable/park_timeout`.
|
|
93
|
+
|
|
94
|
+
## 4. Link drops and re-holds (§3 recovery, §4, §22)
|
|
95
|
+
|
|
96
|
+
- **One owner of remote objects across links:** the host keeps its remote references (their objects) independent of any
|
|
97
|
+
one link; each `connect` creates a link with fresh id counters (ids are link-local) and re-holds every non-released
|
|
98
|
+
remote reference on it; a closed link's tables are dropped, and nothing of an old link (a late callback) touches the
|
|
99
|
+
new one.
|
|
100
|
+
- **On a drop:** every non-released remote reference goes `loading` (also a `failed` one), sent calls fail
|
|
101
|
+
`unavailable`, new calls queue. `host.connect(link, …)` may be called again once the previous parent link has closed
|
|
102
|
+
(open point 6); while one is open it throws.
|
|
103
|
+
- **The re-hold:** a new `hold` (new id); on its `bound`, in **one batch** of this host and before any queued call is
|
|
104
|
+
sent: each member of the bound variant gets the snapshot value with one frame `[["r", value]]` and a fresh Delta
|
|
105
|
+
decoder (open point 4); members not in the bound variant end (`ended`, derives over them fail); new members get their
|
|
106
|
+
first value; failed members listed in `bound` fail (W1); `variant` is updated. A different variant is the normal result
|
|
107
|
+
of a changed grant (design §4: reconnect, authenticate anew, re-hold). Then queued calls are sent.
|
|
108
|
+
- **The provider side** is unchanged: a closed link releases its holds (objects with params end with their last
|
|
109
|
+
reference unless they linger, section 5); a reconnecting child is a new `accept` with new holds.
|
|
110
|
+
- **References a host's objects hold** (`self.get` of a remote type) go `loading` the same way; a **live** dependent
|
|
111
|
+
stays live (R18: a dependency leaving `live` does not change it) and its calls through them queue. An **activating**
|
|
112
|
+
dependent keeps waiting for the dependency; its own `readyTimeout` bounds it (slice 2), and R18 retries it on `bound`.
|
|
113
|
+
- Who reconnects is the app (its link adapter calls `connect` again); Chord only re-holds.
|
|
114
|
+
|
|
115
|
+
## 5. `linger` (§3, §6, §19, D8, C7)
|
|
116
|
+
|
|
117
|
+
`host.serve(Type, factory, { linger })` (milliseconds, default 0): a **live** object with params whose last reference
|
|
118
|
+
is released stays live for `linger`, keeping its own dependencies; a `get`, `hold` or arriving `hold` message within
|
|
119
|
+
that time reuses it; otherwise it ends. An object that is waiting, activating or failed when its last reference goes
|
|
120
|
+
ends at once (slice 2). A failed state member is not a failed object and does not end a lingering one. `host.close`
|
|
121
|
+
ends lingering objects at once. Host-lifetime objects (`local`, empty params) never end by references; a remote type
|
|
122
|
+
with empty params lingers like any other.
|
|
123
|
+
|
|
124
|
+
## Races (listed before sizing)
|
|
125
|
+
|
|
126
|
+
1. A sent call when the link drops: fails `unavailable`, never resent.
|
|
127
|
+
2. A call made while `loading`: queued with its deadline; sent once live, in order; `park_timeout`; cancellation;
|
|
128
|
+
release.
|
|
129
|
+
3. A reference released while `loading` (no link): nothing sent; not re-held; queued calls reject `released`.
|
|
130
|
+
4. `connect` while the previous parent link has not finished closing: throws.
|
|
131
|
+
5. A drop during a re-hold's handshake or before its `bound`: stays `loading`; the next `connect` re-holds again.
|
|
132
|
+
6. The re-hold finds the object failed: `failed` with `retryIn`; the provider's next attempt sends `loading`, then
|
|
133
|
+
`bound` when live.
|
|
134
|
+
7. A reconnect creates a fresh object (the old one ended without linger): new snapshot; the old in-memory documents are
|
|
135
|
+
gone (documented).
|
|
136
|
+
8. A get or an arriving `hold` within `linger` versus the linger timer: a reuse cancels the timer; the holder count
|
|
137
|
+
decides, so an expiry never ends an object that has a holder again; no grace period.
|
|
138
|
+
9. A failing object without references ends at once, never lingers; the last release during activation ends it.
|
|
139
|
+
10. `host.close` with queued calls and loading references: queued calls reject `released`, references go `released`.
|
|
140
|
+
11. `ref.retry()` during an attempt or a pending re-hold: ignored.
|
|
141
|
+
12. Shared remote retry: two consumers hold one failed object; one retries; both get `loading`, then `bound` or
|
|
142
|
+
`failed`.
|
|
143
|
+
13. A broken object held by another consumer: a `retry` renews it for everyone.
|
|
144
|
+
14. A reconnect binds another variant (a changed grant): replicas rebuilt in one batch; vanished members' watches end;
|
|
145
|
+
queued calls checked against the new variant.
|
|
146
|
+
15. A release or a call's deadline while a snapshot is being adopted or queued calls are being sent: the reference's
|
|
147
|
+
state decides at each step; nothing is sent for a released reference.
|
|
148
|
+
16. A member `watch` before the first binding: waits; rejects on `failed` (cause) or release.
|
|
149
|
+
17. A re-hold arrives while the previous instance (released by the drop, no linger) still tears down: waits for that
|
|
150
|
+
ending (slice 2), then a fresh object.
|
|
151
|
+
18. An activating dependent whose remote dependency's link drops: it fails transient at the drop (the dependency's
|
|
152
|
+
pending outcome rejects `unavailable`); R18 retries it when the dependency is bound again.
|
|
153
|
+
19. A drop while `failed`: `loading`, re-held on the next `connect`.
|
|
154
|
+
|
|
155
|
+
## Cost per hop
|
|
156
|
+
|
|
157
|
+
Nothing changes for live references (calls, commits, frames as 3a). A drop costs one `hold` and one snapshot per
|
|
158
|
+
reference on reconnect; a queued call holds its arguments until sent; `ref.state` is created lazily on first access.
|
|
159
|
+
|
|
160
|
+
## Benchmarks
|
|
161
|
+
|
|
162
|
+
Extend `test/next/bench/links.ts` (both codecs): reconnect with 1 and 100 references (time to all live, bytes), 1,000
|
|
163
|
+
queued calls flushed on reconnect (time, order), and the live paths of 3a unchanged (regression rows).
|
|
164
|
+
|
|
165
|
+
## Carry-over taken by this slice
|
|
166
|
+
|
|
167
|
+
L4: `retryAt` (backoff `until`). L5: `ref.retry()` renewing a broken object's readiness; calls on a failed reference
|
|
168
|
+
reject with its cause; C8. L6: `linger`, `ref.state`, `ref.retry()`, `host.hold`. Moved out: a second `bound` as a reset
|
|
169
|
+
(slice 4 for `reset` after overflow, slice 7 for restarted objects); the park deadline's per-type override is not
|
|
170
|
+
built.
|
|
171
|
+
|
|
172
|
+
## Tests
|
|
173
|
+
|
|
174
|
+
- `ref.state`: every transition for local and remote references, watched (first value, each change, the end on
|
|
175
|
+
release); `variant` before, during and after bindings.
|
|
176
|
+
- `hold` and `get`: every row of the table in section 2.
|
|
177
|
+
- Parking: queue order, one deadline across reconnects, cancellation, release, failure, a variant change.
|
|
178
|
+
- Drops and re-holds: references go loading; sent calls fail; reconnect re-holds with fresh ids; one batch per bound
|
|
179
|
+
with `[["r", value]]` frames; another variant on reconnect; old-link callbacks never touch the new link.
|
|
180
|
+
- Retry: local and remote; shared across consumers; broken renewed; ignored during an attempt; `loading` notices.
|
|
181
|
+
- `linger`: reuse within the window, end after it, only live objects linger, failed members do not end it,
|
|
182
|
+
`host.close`, reconnect within linger keeps in-memory documents.
|
|
183
|
+
- Every race above, both codecs where a link is involved.
|
|
184
|
+
- GC: a released `hold` reference, a reference across a drop, a closed link's tables, a lingering object after expiry.
|
|
185
|
+
- Examples: `10-drops.ts` (drop, park, reconnect, re-hold, `ref.state`), `11-linger-and-retry.ts`.
|
|
186
|
+
|
|
187
|
+
## Decided with the owner (2026-10-22)
|
|
188
|
+
|
|
189
|
+
`ref.state` is a `NativeWatchable<RefState>` (the `NativeWatchable` interface joins `Watchable` in `src/watch.ts`,
|
|
190
|
+
upstream first); remote retries use two new messages, `retry { hold }` and `loading { hold }`; parked calls wait at most
|
|
191
|
+
`readyTimeout` (no third host timeout); a re-hold replaces each member with `[["r", value]]`; C8 (`state: false`) is
|
|
192
|
+
cut; `connect` may be called again once the previous parent link has closed; `host.root` moves to slice 8.
|
|
193
|
+
|
|
194
|
+
## Size
|
|
195
|
+
|
|
196
|
+
About 1,100-1,400 source lines (reference state, acquisition, parking with its queue, re-holds with variant changes,
|
|
197
|
+
retry and loading notices, `linger`).
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# Slice 4: the topology (draft: scope, structural changes, races)
|
|
2
|
+
|
|
3
|
+
Status: **overview** (owner, 2026-10-23: slice 4 is split into 4a and 4b). The 4a spec proper is `slice-4a.md`, which
|
|
4
|
+
wins where the two differ; 4b is sketched at the end of this file. Reads with `design.md` (§3 hosts, links, routes, flow control; §4 principals and
|
|
5
|
+
revocation; §6 cycles; §7; §19 presence; §22 wire), the decision log (R1, R2, Q1-Q5, Q13, R20, "Flow control: an
|
|
6
|
+
ack-clocked window", "One pending queue for slow consumers of state", "Compression at the origin", "Wire protocol"),
|
|
7
|
+
the carry-over (L6, L7) and slices 3a/3b. Builds on `9066b343c`.
|
|
8
|
+
|
|
9
|
+
## The split
|
|
10
|
+
|
|
11
|
+
| Slice | Contents |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| **4a: links and relays** | IPC and WebSocket links; trusted links; parts as opaque bytes; flow control (acks, pending queue, call window); host kinds, addresses, `placement`; `route` (`authorize`, `resolve`, re-resolve with backoff); relayed holds and calls (ids mapped, principal and origin incarnation stamped, per-hop acks, `reset` and a second `bound`) |
|
|
14
|
+
| **4b: authority and housekeeping** | revocation (`revokedBy`, `host.revoke`, propagation to children); cycle checks across hosts (activation chain in hold headers); `host.references` (origin ids); `host.activity`; size limits per part (the admitting link's decoded limit stamped on relayed work); compression at the origin |
|
|
15
|
+
|
|
16
|
+
4a is what the playground needs (server, workers over IPC, tabs over WebSocket). 4b adds header fields on top of 4a's.
|
|
17
|
+
|
|
18
|
+
## 4a: structural changes the current code needs
|
|
19
|
+
|
|
20
|
+
1. **A link carries both directions.** Slice 3 has `ProviderLink` (`accept`: serve only) and `ConsumerLink` (`connect`:
|
|
21
|
+
hold only). With routes, the server holds worker objects over a resolved link *and* serves the worker's holds of
|
|
22
|
+
server types over the same link; the worker serves the server's holds over its `connect` link *and* holds server
|
|
23
|
+
types over it. One per-link object with both sides (two id spaces: holds this side sent, holds it received; message
|
|
24
|
+
kinds are directional, so dispatch stays by kind).
|
|
25
|
+
2. **Parts are opaque bytes.** Today the codecs parse every value (`params`, `args`, `value`, `ops`, snapshot members)
|
|
26
|
+
at decode. A relay must forward them unparsed (R1), so values become byte parts that only the end that owns them
|
|
27
|
+
decodes (the consumer's replica, the provider's `checkArgs`). Exception: a `hold`'s params, which a relay parses to
|
|
28
|
+
compute placement and authorize (small; checked by `checkParams` anyway). Sizes then come for free (`byteLength`).
|
|
29
|
+
3. **Stamped header fields.** `hold` and `call` gain the origin's principal and incarnation (Q13), set by the relay
|
|
30
|
+
from the link the work came in on; honored only on a link from a parent; overwritten on every other link. 4b adds
|
|
31
|
+
the activation chain, the origin id and the decoded limit the same way.
|
|
32
|
+
4. **`ack`** (consumer to provider, after applying each `bound`/`state` message) and the call window in `hello`
|
|
33
|
+
(`calls: N`).
|
|
34
|
+
5. **Resets as `r` ops** (decided below): a `state` entry flagged `reset: true` carries `[["r", value]]` per member;
|
|
35
|
+
the consumer applies it like any ops (the decoder restarts at `r`). A second `bound` on a live hold stays refused
|
|
36
|
+
until slice 7.
|
|
37
|
+
6. **`loading` on a live hold**: a relay whose upstream link dropped tells its downstream holds; 3b's consumer moves
|
|
38
|
+
only `failed -> loading` on it today.
|
|
39
|
+
7. **The pending queue** (fold, leaf index, cap 10,000) per hold member on the provider side, and in Chord's shared
|
|
40
|
+
watch handle (pi first; carry-over L6).
|
|
41
|
+
|
|
42
|
+
## 4a: races
|
|
43
|
+
|
|
44
|
+
Routes and resolve:
|
|
45
|
+
|
|
46
|
+
1. Two holds (or a hold and a call's re-hold) for one address while its `resolve` runs: one `resolve` per address,
|
|
47
|
+
shared; both holds go out on the link it returns.
|
|
48
|
+
2. `resolve` rejects or its signal aborts: the holds stay `loading`; re-resolve with the per-address backoff (1 s
|
|
49
|
+
doubling to 60 s) while holds for the address exist.
|
|
50
|
+
3. Every hold for an address is released while `resolve` runs: the resolve finishes (a worker start that produced a
|
|
51
|
+
link finishes even if its first requester left, §3); the link is kept for the next hold. Who closes an idle worker
|
|
52
|
+
link is the app's supervisor (`host.activity`, 4b).
|
|
53
|
+
4. `authorize` refuses: the hold fails broken `forbidden` before anything starts; a later hold with another principal
|
|
54
|
+
for the same address still resolves.
|
|
55
|
+
5. Placement: the caller computes `placement(params)` and routes by it; the provider computes it again and refuses an
|
|
56
|
+
object that is not its own (`invalid/placement`, broken). A placement rule changed by a reload between the two is
|
|
57
|
+
that refusal (rollout handling is slice 7).
|
|
58
|
+
6. A worker restarts (crash, the supervisor stopped it): its link drops; the new link's `hello` carries a new
|
|
59
|
+
incarnation; re-holds get fresh objects (in-memory documents gone, as 3b race 7).
|
|
60
|
+
|
|
61
|
+
Relays (server between a tab and a worker):
|
|
62
|
+
|
|
63
|
+
7. The worker link drops with relayed holds: the server sends `loading { hold }` downstream (tabs go `loading`,
|
|
64
|
+
values readable, new calls park on the tab), fails relayed calls in flight with `unavailable` (never resent),
|
|
65
|
+
re-resolves, re-holds upstream, and forwards the new `bound` downstream (accepted while `loading`, as 3b's
|
|
66
|
+
re-hold; another variant is allowed). Superseded by `slice-4a.md` section 4.
|
|
67
|
+
8. A tab call that crossed the `loading` notice reaches the server while the upstream link is down: answered
|
|
68
|
+
`unavailable` (as a call sent before a drop, §7), not parked at the relay.
|
|
69
|
+
9. The tab releases a hold while its upstream re-hold or `resolve` is pending: the relay releases upstream once the
|
|
70
|
+
upstream hold exists; nothing is sent downstream after the release (Q1 covers a `bound` crossing it).
|
|
71
|
+
10. The tab link closes: the relay releases every upstream hold it made for that tab and cancels its relayed calls.
|
|
72
|
+
11. Two tabs of one principal hold the same object: two upstream holds, each with its own encoder (R1, as today).
|
|
73
|
+
12. A worker sends `gone` for a relayed hold: forwarded downstream; the relay forgets the mapping.
|
|
74
|
+
13. A worker holds a server type (or another worker's): it goes over its `connect` link; the server serves it or
|
|
75
|
+
routes it on (worker to worker through the server, §3).
|
|
76
|
+
|
|
77
|
+
Flow control:
|
|
78
|
+
|
|
79
|
+
14. An `ack` crossing a `reset`, a `release` or a link close: acks count messages per link, not holds; an ack for a
|
|
80
|
+
message whose hold was released still frees its slot.
|
|
81
|
+
15. A `reset { hold }` reaching the provider while the hold is pending, failed or released: ignored unless bound
|
|
82
|
+
(Q1).
|
|
83
|
+
16. A relay with a full window towards a tab: it drops new parts for that tab's holds and marks them; when the tab
|
|
84
|
+
acks, it sends `reset { hold }` upstream for each marked hold and drops further parts for a hold until its new
|
|
85
|
+
`bound` arrives.
|
|
86
|
+
17. **Torn resets:** one commit touched holds A and B of a tab; both were dropped and reset; the two new `bound`s
|
|
87
|
+
arrive as two messages, so a derive over A and B could see A new and B old in between. Proposal: `reset` carries
|
|
88
|
+
a list of holds and the provider answers with one message holding all their snapshots.
|
|
89
|
+
18. The pending queue reaches its cap while the window is full: only "replace with the current value" stays; when a
|
|
90
|
+
slot frees, the provider sends a snapshot of the member (a second `bound` part or an `r` op; see open point 3).
|
|
91
|
+
19. Calls: more than N calls from one link are parked by the caller (one FIFO per link, across references); a
|
|
92
|
+
cancel frees the slot at the caller when sent and at the provider when received (per-direction order keeps the
|
|
93
|
+
counts equal).
|
|
94
|
+
20. **Call fairness at the relay:** each tab has N calls towards the server, but the server has one window of N
|
|
95
|
+
towards a worker for all tabs and its own calls. Proposal: the relay parks relayed calls per origin and sends
|
|
96
|
+
round-robin, so one flooding tab cannot occupy the worker's window; the relay holds at most tabs x N parked calls.
|
|
97
|
+
|
|
98
|
+
Links and transports:
|
|
99
|
+
|
|
100
|
+
21. IPC: `send` while the child is exiting, `disconnect` racing a message in flight: the link closes once; messages
|
|
101
|
+
after close are dropped; `process.send` errors close the link.
|
|
102
|
+
22. WebSocket: a frame above the transport's `maxPayload` closes the connection (code 1009); a client that stops
|
|
103
|
+
reading is bounded by the window (2 messages) plus the pending queue cap, not by the socket buffer.
|
|
104
|
+
23. Trusted links skip the message schema check (IPC, carry-over L6) but never grant stamping: stamped fields are
|
|
105
|
+
honored only from the link to the parent.
|
|
106
|
+
|
|
107
|
+
## Decided (owner, 2026-10-23)
|
|
108
|
+
|
|
109
|
+
1. **Trusted links are an explicit option:** `accept(link, { principal, trusted: true })`, and `resolve` may return
|
|
110
|
+
`{ link, principal, trusted }`; default untrusted. Trusted skips the message schema check; stamping is still
|
|
111
|
+
honored only from the parent link.
|
|
112
|
+
2. **Resets and overflow are `r` ops in an ordinary `state` message** (races 16-18): a relay's `reset { holds }`
|
|
113
|
+
(a list) is answered with one `state` message whose entries carry `[["r", value]]` for every member of each reset
|
|
114
|
+
hold that is still bound, all snapshots taken in one synchronous step, applied by the consumer in one batch (no
|
|
115
|
+
torn commit across the reset holds). An overflowed pending queue sends `[["r", value]]` the same way. Delta's
|
|
116
|
+
encoder and decoder restart at an `r`. A state entry gets the header flag `reset: true`, so a relay (which never
|
|
117
|
+
reads parts) knows when to stop dropping a reset hold's parts. A second `bound` stays only for slice 7 (a restarted
|
|
118
|
+
object may choose another variant).
|
|
119
|
+
3. **Call fairness: round-robin per origin at the relay** (race 20): each origin's calls keep their order; while the
|
|
120
|
+
worker's window is full, origins take turns, so one flooding tab cannot starve the others.
|
|
121
|
+
4. **The Durable conversation view:** known cost until Durable's windowed view (pi #11327, waiting for its reporter)
|
|
122
|
+
lands: a re-hold sends the whole active transcript.
|
|
123
|
+
|
|
124
|
+
## 4b: scope and races (sketch)
|
|
125
|
+
|
|
126
|
+
- **Revocation:** `createHost({ revokedBy })`; `host.revoke(r)` ends every object and closes every link whose
|
|
127
|
+
principal has `r` in `revokedBy` (L1's `revocationKeys`), then propagates `r` to children (a `revoke` message on
|
|
128
|
+
trusted child links). Races: a hold stamped with a revoked principal already on its way to a worker (it binds, then
|
|
129
|
+
its link closes: R10's window); revoke during an activation; revoke while a relayed call runs (its handler is
|
|
130
|
+
aborted; R11 jobs later).
|
|
131
|
+
- **Cycles across hosts (Q5):** a hold made during an activation carries the chain of activating instance ids
|
|
132
|
+
(bounded); the provider refuses a hold whose chain contains the instance being activated (`invalid/cycle`); chains
|
|
133
|
+
from untrusted links are ignored. Races: the chain crossing a relay (copied, never extended by the relay); a cycle
|
|
134
|
+
through a host that restarts.
|
|
135
|
+
- **`host.references(Type)`** (presence, §19): who holds objects of a type, with an origin id per client (stamped by
|
|
136
|
+
the relay, so two tabs are two clients); a link drop is a departure.
|
|
137
|
+
- **`host.activity`**: `{ references, calls, jobs, lingering }` as one readable for the app's keep-alive.
|
|
138
|
+
- **Size limits per part (R2, Q2)**: checked from the header before decoding; an oversized part fails only its hold or
|
|
139
|
+
call (`too_large`); the admitting link's decoded limit is stamped on relayed work and enforced where it is decoded.
|
|
140
|
+
- **Compression at the origin**: a part above a threshold is compressed once by its origin (codec field in the
|
|
141
|
+
header); relays forward it compressed; only the end that decodes inflates it, with the decoded limit.
|
|
142
|
+
|
|
143
|
+
## Size
|
|
144
|
+
|
|
145
|
+
Reviewers' estimate for slice 4 as a whole: 2,500-3,000 source lines; 4a carries most of it (the two-sided link, the
|
|
146
|
+
relay, transports, flow control).
|