@earendil-works/chord 1.4.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 +41 -0
- package/README.md +79 -14
- 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 +1 -1
- package/dist/context/index.d.ts.map +1 -1
- package/dist/context/index.js +1 -1
- 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 +1 -1
- package/dist/output.d.ts.map +1 -1
- package/dist/output.js +4 -2
- 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 +2 -0
- package/dist/sqlite/cloudflare.d.ts.map +1 -1
- package/dist/sqlite/cloudflare.js +10 -0
- package/dist/sqlite/cloudflare.js.map +1 -1
- package/dist/sqlite/database.d.ts +5 -2
- package/dist/sqlite/database.d.ts.map +1 -1
- package/dist/sqlite/database.js.map +1 -1
- package/dist/sqlite/node.d.ts +4 -1
- package/dist/sqlite/node.d.ts.map +1 -1
- package/dist/sqlite/node.js +22 -5
- package/dist/sqlite/node.js.map +1 -1
- 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 +22 -6
- package/src/delta/README.md +69 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// Relayed holds (§4, §22, R1; decision "Relay flow control per origin"): a hold that arrived on one link (downstream)
|
|
2
|
+
// and that this host neither serves nor parses, held again on its path's link (upstream) with the same id under its
|
|
3
|
+
// downstream origin's number there; messages are forwarded between the two with the origin rewritten and parts
|
|
4
|
+
// untouched.
|
|
5
|
+
import { ChordError } from "../data/index.js";
|
|
6
|
+
import { wireError } from "../link/internal.js";
|
|
7
|
+
import { actingFor } from "./hold.js";
|
|
8
|
+
/**
|
|
9
|
+
* One relayed hold: `id` on its downstream origin, and the same id upstream on its path's current link (none while
|
|
10
|
+
* the path has no link). It keeps its `hold` message to hold again on the next link. Calls, `abort`, `retry` and
|
|
11
|
+
* `release` go upstream at once; what comes back is forwarded by its downstream origin (`ProviderSide.forward`). Two
|
|
12
|
+
* downstream holds are two upstream holds, each with its own encoders (R1).
|
|
13
|
+
*/
|
|
14
|
+
export class RelayedHold {
|
|
15
|
+
kind = "relayed";
|
|
16
|
+
id;
|
|
17
|
+
#downstream;
|
|
18
|
+
/**
|
|
19
|
+
* What the upstream hold asks for, with the chain and decoded limit this host honoured; its params owned, not a view
|
|
20
|
+
* of the message they came in.
|
|
21
|
+
*/
|
|
22
|
+
#request;
|
|
23
|
+
/** Whom the hold acts for, sent on route links. */
|
|
24
|
+
caller;
|
|
25
|
+
#path;
|
|
26
|
+
/** The upstream link while the path has one, and the downstream origin's number on it. */
|
|
27
|
+
#upstream;
|
|
28
|
+
constructor(id, downstream, request, caller, path) {
|
|
29
|
+
this.id = id;
|
|
30
|
+
this.#downstream = downstream;
|
|
31
|
+
const { params } = request;
|
|
32
|
+
// Params are never deflated: the provider side refused deflated ones.
|
|
33
|
+
const owned = typeof params === "string" ? params : params.slice();
|
|
34
|
+
this.#request = { ...request, params: owned };
|
|
35
|
+
this.caller = caller;
|
|
36
|
+
this.#path = path;
|
|
37
|
+
}
|
|
38
|
+
/** Takes the pending hold's place downstream and holds upstream (now, or when the path has a link). */
|
|
39
|
+
start() {
|
|
40
|
+
this.#downstream.relayed(this);
|
|
41
|
+
this.#path.attach(this);
|
|
42
|
+
}
|
|
43
|
+
/** Whether it is held on `link` now: only that link answers for it. */
|
|
44
|
+
heldOn(link) {
|
|
45
|
+
return this.#upstream?.link === link;
|
|
46
|
+
}
|
|
47
|
+
/** Holds on `link`, the path's link now: its kept `hold` message, with whom it acts for on a route link. */
|
|
48
|
+
attach(link) {
|
|
49
|
+
const origin = this.#downstream.relayTo(link);
|
|
50
|
+
this.#upstream = { link, origin };
|
|
51
|
+
link.send({ kind: "hold", origin, hold: this.id, ...this.#request, ...actingFor(link, this.caller) });
|
|
52
|
+
}
|
|
53
|
+
/** The upstream link dropped: downstream its calls fail and the hold goes loading until the path's next link. */
|
|
54
|
+
dropped(error) {
|
|
55
|
+
const upstream = this.#upstream;
|
|
56
|
+
this.#upstream = undefined;
|
|
57
|
+
if (upstream !== undefined)
|
|
58
|
+
this.#downstream.upstreamDropped(this, error);
|
|
59
|
+
}
|
|
60
|
+
/** Its path's address cannot be reached for now: downstream it fails `waiting` with `error` until the next link. */
|
|
61
|
+
unreachable(error) {
|
|
62
|
+
this.#downstream.send({ kind: "failed", hold: this.id, cause: { kind: "waiting", error: wireError(error) } });
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Whether it waits for its path's link (a route still resolving, or a dropped link's next): a revocation ends it then,
|
|
66
|
+
* since the link it is held on next gets no past `revoke` (§4).
|
|
67
|
+
*/
|
|
68
|
+
get waiting() {
|
|
69
|
+
return this.#upstream === undefined;
|
|
70
|
+
}
|
|
71
|
+
/** Revoked while it waited for its path's link: forgotten, and `gone` with `error` downstream. */
|
|
72
|
+
revoked(error) {
|
|
73
|
+
this.drop();
|
|
74
|
+
this.#downstream.forget(this);
|
|
75
|
+
this.#downstream.send({ kind: "gone", hold: this.id, error: wireError(error) });
|
|
76
|
+
}
|
|
77
|
+
/** `gone` from upstream: the hold is forgotten (the downstream origin forwards the message). */
|
|
78
|
+
lost() {
|
|
79
|
+
this.drop();
|
|
80
|
+
this.#downstream.forget(this);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* A call from downstream (registered there under its id), forwarded upstream at once; its reply comes back by the
|
|
84
|
+
* origin. Without an upstream link it is answered `unavailable` at once (it crossed the `loading` notice).
|
|
85
|
+
*/
|
|
86
|
+
call(message) {
|
|
87
|
+
const upstream = this.#upstream;
|
|
88
|
+
if (upstream !== undefined) {
|
|
89
|
+
upstream.link.send({ ...message, origin: upstream.origin });
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const error = new ChordError({ code: "unavailable", message: `hold ${this.id}: its upstream link is down` });
|
|
93
|
+
this.#downstream.reply(message.call, { kind: "error", call: message.call, error: wireError(error) });
|
|
94
|
+
}
|
|
95
|
+
/** A downstream `abort` of call `id`, forwarded. */
|
|
96
|
+
abort(id) {
|
|
97
|
+
const upstream = this.#upstream;
|
|
98
|
+
upstream?.link.send({ kind: "abort", origin: upstream.origin, call: id });
|
|
99
|
+
}
|
|
100
|
+
/** A downstream `retry`, forwarded with its hop budget as it is (a relay visits no object). */
|
|
101
|
+
retry(message) {
|
|
102
|
+
const upstream = this.#upstream;
|
|
103
|
+
upstream?.link.send({ ...message, origin: upstream.origin });
|
|
104
|
+
}
|
|
105
|
+
/** Released downstream: released upstream (its calls with it) and no later link holds it. */
|
|
106
|
+
release() {
|
|
107
|
+
const upstream = this.#upstream;
|
|
108
|
+
this.drop();
|
|
109
|
+
upstream?.link.send({ kind: "release", origin: upstream.origin, hold: this.id });
|
|
110
|
+
}
|
|
111
|
+
/** No later link holds it (gone, or its downstream origin closed, which `closed` tells the upstream links). */
|
|
112
|
+
drop() {
|
|
113
|
+
this.#upstream = undefined;
|
|
114
|
+
this.#path.detach(this);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=relay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relay.js","sourceRoot":"","sources":["../../../src/next/remote/relay.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,oHAAoH;AACpH,+GAA+G;AAC/G,aAAa;AAEb,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAgB,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAC;AAKxD;;;;;GAKG;AACH,MAAM,OAAO,WAAW;IACd,IAAI,GAAG,SAAS,CAAC;IACjB,EAAE,CAAS;IACX,WAAW,CAAe;IACnC;;;OAGG;IACM,QAAQ,CAAc;IAC/B,mDAAmD;IAC1C,MAAM,CAAS;IACf,KAAK,CAAO;IACrB,0FAA0F;IAC1F,SAAS,CAAmE;IAE5E,YAAY,EAAU,EAAE,UAAwB,EAAE,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AAC;CACD","sourcesContent":["// Relayed holds (§4, §22, R1; decision \"Relay flow control per origin\"): a hold that arrived on one link (downstream)\n// and that this host neither serves nor parses, held again on its path's link (upstream) with the same id under its\n// downstream origin's number there; messages are forwarded between the two with the origin rewritten and parts\n// untouched.\n\nimport { ChordError } from \"../data/index.ts\";\nimport type { Caller } from \"../host/internal.ts\";\nimport { type Message, wireError } from \"../link/internal.ts\";\nimport { actingFor, type HoldRequest } from \"./hold.ts\";\nimport type { HostLink } from \"./host-link.ts\";\nimport type { Path } from \"./path.ts\";\nimport type { ProviderSide } from \"./provider.ts\";\n\n/**\n * One relayed hold: `id` on its downstream origin, and the same id upstream on its path's current link (none while\n * the path has no link). It keeps its `hold` message to hold again on the next link. Calls, `abort`, `retry` and\n * `release` go upstream at once; what comes back is forwarded by its downstream origin (`ProviderSide.forward`). Two\n * downstream holds are two upstream holds, each with its own encoders (R1).\n */\nexport class RelayedHold {\n\treadonly kind = \"relayed\";\n\treadonly id: number;\n\treadonly #downstream: ProviderSide;\n\t/**\n\t * What the upstream hold asks for, with the chain and decoded limit this host honoured; its params owned, not a view\n\t * of the message they came in.\n\t */\n\treadonly #request: HoldRequest;\n\t/** Whom the hold acts for, sent on route links. */\n\treadonly caller: Caller;\n\treadonly #path: Path;\n\t/** The upstream link while the path has one, and the downstream origin's number on it. */\n\t#upstream: { readonly link: HostLink; readonly origin: number } | undefined;\n\n\tconstructor(id: number, downstream: ProviderSide, request: HoldRequest, caller: Caller, path: Path) {\n\t\tthis.id = id;\n\t\tthis.#downstream = downstream;\n\t\tconst { params } = request;\n\t\t// Params are never deflated: the provider side refused deflated ones.\n\t\tconst owned = typeof params === \"string\" ? params : (params as Uint8Array).slice();\n\t\tthis.#request = { ...request, params: owned };\n\t\tthis.caller = caller;\n\t\tthis.#path = path;\n\t}\n\n\t/** Takes the pending hold's place downstream and holds upstream (now, or when the path has a link). */\n\tstart(): void {\n\t\tthis.#downstream.relayed(this);\n\t\tthis.#path.attach(this);\n\t}\n\n\t/** Whether it is held on `link` now: only that link answers for it. */\n\theldOn(link: HostLink): boolean {\n\t\treturn this.#upstream?.link === link;\n\t}\n\n\t/** Holds on `link`, the path's link now: its kept `hold` message, with whom it acts for on a route link. */\n\tattach(link: HostLink): void {\n\t\tconst origin = this.#downstream.relayTo(link);\n\t\tthis.#upstream = { link, origin };\n\t\tlink.send({ kind: \"hold\", origin, hold: this.id, ...this.#request, ...actingFor(link, this.caller) });\n\t}\n\n\t/** The upstream link dropped: downstream its calls fail and the hold goes loading until the path's next link. */\n\tdropped(error: ChordError): void {\n\t\tconst upstream = this.#upstream;\n\t\tthis.#upstream = undefined;\n\t\tif (upstream !== undefined) this.#downstream.upstreamDropped(this, error);\n\t}\n\n\t/** Its path's address cannot be reached for now: downstream it fails `waiting` with `error` until the next link. */\n\tunreachable(error: ChordError): void {\n\t\tthis.#downstream.send({ kind: \"failed\", hold: this.id, cause: { kind: \"waiting\", error: wireError(error) } });\n\t}\n\n\t/**\n\t * Whether it waits for its path's link (a route still resolving, or a dropped link's next): a revocation ends it then,\n\t * since the link it is held on next gets no past `revoke` (§4).\n\t */\n\tget waiting(): boolean {\n\t\treturn this.#upstream === undefined;\n\t}\n\n\t/** Revoked while it waited for its path's link: forgotten, and `gone` with `error` downstream. */\n\trevoked(error: ChordError): void {\n\t\tthis.drop();\n\t\tthis.#downstream.forget(this);\n\t\tthis.#downstream.send({ kind: \"gone\", hold: this.id, error: wireError(error) });\n\t}\n\n\t/** `gone` from upstream: the hold is forgotten (the downstream origin forwards the message). */\n\tlost(): void {\n\t\tthis.drop();\n\t\tthis.#downstream.forget(this);\n\t}\n\n\t/**\n\t * A call from downstream (registered there under its id), forwarded upstream at once; its reply comes back by the\n\t * origin. Without an upstream link it is answered `unavailable` at once (it crossed the `loading` notice).\n\t */\n\tcall(message: Extract<Message, { readonly kind: \"call\" }>): void {\n\t\tconst upstream = this.#upstream;\n\t\tif (upstream !== undefined) {\n\t\t\tupstream.link.send({ ...message, origin: upstream.origin });\n\t\t\treturn;\n\t\t}\n\t\tconst error = new ChordError({ code: \"unavailable\", message: `hold ${this.id}: its upstream link is down` });\n\t\tthis.#downstream.reply(message.call, { kind: \"error\", call: message.call, error: wireError(error) });\n\t}\n\n\t/** A downstream `abort` of call `id`, forwarded. */\n\tabort(id: number): void {\n\t\tconst upstream = this.#upstream;\n\t\tupstream?.link.send({ kind: \"abort\", origin: upstream.origin, call: id });\n\t}\n\n\t/** A downstream `retry`, forwarded with its hop budget as it is (a relay visits no object). */\n\tretry(message: Extract<Message, { readonly kind: \"retry\" }>): void {\n\t\tconst upstream = this.#upstream;\n\t\tupstream?.link.send({ ...message, origin: upstream.origin });\n\t}\n\n\t/** Released downstream: released upstream (its calls with it) and no later link holds it. */\n\trelease(): void {\n\t\tconst upstream = this.#upstream;\n\t\tthis.drop();\n\t\tupstream?.link.send({ kind: \"release\", origin: upstream.origin, hold: this.id });\n\t}\n\n\t/** No later link holds it (gone, or its downstream origin closed, which `closed` tells the upstream links). */\n\tdrop(): void {\n\t\tthis.#upstream = undefined;\n\t\tthis.#path.detach(this);\n\t}\n}\n"]}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { type Context } from "../../context/index.ts";
|
|
2
|
+
import type { Contract } from "../contracts/index.ts";
|
|
3
|
+
import { ChordError } from "../data/index.ts";
|
|
4
|
+
import { type AnyHost, type Attachable, type Binding, type Caller, type CheckedParams, type ChordObject, type Followed, type PinnedKey, type RefState, type RetryWalk, type Target } from "../host/internal.ts";
|
|
5
|
+
import { type BoundEntry, type Message, type StateEntry, type WireAddress } from "../link/internal.ts";
|
|
6
|
+
import type { DeriveSource } from "../state/internal.ts";
|
|
7
|
+
import type { HoldRequest } from "./hold.ts";
|
|
8
|
+
import type { HostLink } from "./host-link.ts";
|
|
9
|
+
import type { Path } from "./path.ts";
|
|
10
|
+
/**
|
|
11
|
+
* One remote reference's object, owned by its host across the links of its path. It is `loading` until a link's hold
|
|
12
|
+
* of it is bound, and again whenever that link drops or its relay's upstream starts over; each link holds it with its
|
|
13
|
+
* own id. Two references are two holds, each member of each with its own Delta decoder.
|
|
14
|
+
*/
|
|
15
|
+
export declare class RemoteObject implements Target {
|
|
16
|
+
#private;
|
|
17
|
+
readonly kind = "remote";
|
|
18
|
+
/** The object in errors: its type, and its params key when it has params. */
|
|
19
|
+
readonly label: string;
|
|
20
|
+
readonly contract: Contract;
|
|
21
|
+
/** What its holds ask for: the params as a part (checked by L1 when the reference was made), the address. */
|
|
22
|
+
readonly request: HoldRequest;
|
|
23
|
+
/** Whom its reference acts for: named on route links (`actingFor`). */
|
|
24
|
+
readonly caller: Caller;
|
|
25
|
+
constructor(host: AnyHost, contract: Contract, { params, key }: CheckedParams, address: WireAddress, caller: Caller, path: Path, dependent: ChordObject | undefined);
|
|
26
|
+
get state(): RefState;
|
|
27
|
+
/** An object over a link is no blocker of this host's first pass. */
|
|
28
|
+
get blocksFirstPass(): false;
|
|
29
|
+
/** The error of the last `failed`, until `bound`. */
|
|
30
|
+
get lastFailure(): ChordError | undefined;
|
|
31
|
+
/** The variant last bound; `undefined` before the first binding. */
|
|
32
|
+
get variant(): string | undefined;
|
|
33
|
+
/** Whether its state members have values: bound once. */
|
|
34
|
+
get hydrated(): boolean;
|
|
35
|
+
/** Its one reference bound to it. */
|
|
36
|
+
hold(binding: Binding): void;
|
|
37
|
+
/** The reference was released: the current link's provider is told and the reference's sent calls rejected. */
|
|
38
|
+
unhold(_binding: Binding): void;
|
|
39
|
+
/**
|
|
40
|
+
* Holds on `link`, the path's link now (a first hold, or a re-hold on a new link), with the activation chain of its
|
|
41
|
+
* dependent while that activates (Q5).
|
|
42
|
+
*/
|
|
43
|
+
attach(link: HostLink): void;
|
|
44
|
+
/**
|
|
45
|
+
* Its path's address cannot be reached for now (a route's `resolve` failed, a suspension): `failed { waiting }` with
|
|
46
|
+
* `error`, still on the path, bound by its next link.
|
|
47
|
+
*/
|
|
48
|
+
unreachable(error: ChordError): void;
|
|
49
|
+
/** The link dropped: loading until a new link's hold is bound (`#startOver`). */
|
|
50
|
+
dropped(_error: ChordError): void;
|
|
51
|
+
/**
|
|
52
|
+
* Calls a method of the bound variant over the link; one outside it fails `invalid/member`. Only a live object is
|
|
53
|
+
* called: bound on an open link.
|
|
54
|
+
*/
|
|
55
|
+
call(method: string, args: unknown, context: Context): Promise<unknown>;
|
|
56
|
+
/**
|
|
57
|
+
* The replica of `member`; `not_ready` before the first binding, `invalid/member` for a member no binding had (one
|
|
58
|
+
* a later variant lacks reads its `invalid/member` failure).
|
|
59
|
+
*/
|
|
60
|
+
member(member: string): DeriveSource;
|
|
61
|
+
/**
|
|
62
|
+
* What its reference follows of `member` (a consumer over a link binds at its own version, mapped at the provider):
|
|
63
|
+
* the replica while live, a member the bound variant lacks (`invalid/member`); while loading or failed nothing, the
|
|
64
|
+
* replica (kept until the next binding) giving its last value (rule 5).
|
|
65
|
+
*/
|
|
66
|
+
followed(member: string, _version: number): Followed;
|
|
67
|
+
/** Its binding while live (its replicas change); `undefined` while loading or failed. */
|
|
68
|
+
get attachable(): Attachable | undefined;
|
|
69
|
+
/** Keyed members are only in local contracts: no instance to pin a key on. */
|
|
70
|
+
get instance(): undefined;
|
|
71
|
+
/** Keyed members are only in local contracts (`keyedMember`). */
|
|
72
|
+
keyedMapping(member: string): never;
|
|
73
|
+
/** Keyed members are only in local contracts (`keyedMember`). */
|
|
74
|
+
pinKey(member: string): Promise<PinnedKey>;
|
|
75
|
+
/** Keyed members are only in local contracts, whose objects are never held over a link (slice 6a §12). */
|
|
76
|
+
keyedMember(member: string): never;
|
|
77
|
+
/** An object over a link activates on another host: it is in no chain here (Q5). */
|
|
78
|
+
get activationId(): undefined;
|
|
79
|
+
/** An object over a link waits for nothing on this host: no chain of waits (its holds carry the chain, Q5). */
|
|
80
|
+
pathTo(): undefined;
|
|
81
|
+
/**
|
|
82
|
+
* `ref.retry()`, as a step of `walk`: a failed object's provider is asked for an attempt with the walk's hop budget,
|
|
83
|
+
* none left: nothing is sent (a hold it refused is started there again; a parked object there passes it on with one
|
|
84
|
+
* hop less). One that failed for a part past the link's limits is placed anew and held with a new id, now or on its
|
|
85
|
+
* path's next link (a `hostAddress` that throws fails it broken again).
|
|
86
|
+
*/
|
|
87
|
+
retry(walk: RetryWalk): void;
|
|
88
|
+
/**
|
|
89
|
+
* A part of its snapshot or of a state change was past the link's limits (`too_large/part`): the hold is released
|
|
90
|
+
* at the provider, and the reference fails broken with `error`, final: no link holds it again (a reconnect
|
|
91
|
+
* included) until `retry`.
|
|
92
|
+
*/
|
|
93
|
+
tooLarge(error: ChordError): void;
|
|
94
|
+
/**
|
|
95
|
+
* Prepares one entry of a `bound` message (a first binding, a re-hold; a live hold is bound again): the
|
|
96
|
+
* variant and every state member once, as a value or as failed. Returns what applies it inside the batch of the
|
|
97
|
+
* whole message: a member it had gets the snapshot as one frame `[["r", value]]` and a fresh decoder, a member
|
|
98
|
+
* outside the new variant fails (its replica stays, for a later binding that has it again), a new one gets its first
|
|
99
|
+
* value. Throws on a snapshot that
|
|
100
|
+
* does not fit (a protocol error), and `too_large/part` for a value past the link's limits, before anything changed.
|
|
101
|
+
* `wentLive` follows the batch.
|
|
102
|
+
*/
|
|
103
|
+
prepareBound(entry: BoundEntry, link: HostLink): () => void;
|
|
104
|
+
/** After a `bound` message's batch: the reference goes live (its parked calls are sent, a parked dependent goes on). */
|
|
105
|
+
wentLive(): void;
|
|
106
|
+
/**
|
|
107
|
+
* `failed`: the provider's object failed and no attempt runs (`retryIn`: the rest of its backoff window), or the hold
|
|
108
|
+
* is unbound there or its object parked on a failed dependency (`waiting`), each new cause a new message. On a bound
|
|
109
|
+
* hold it unbinds it (slice 7b, model §5): the members keep their last values until the next `bound`.
|
|
110
|
+
*/
|
|
111
|
+
failed(message: Extract<Message, {
|
|
112
|
+
readonly kind: "failed";
|
|
113
|
+
}>): void;
|
|
114
|
+
/**
|
|
115
|
+
* `loading`: the provider's object started a new attempt after a failure, or its relay's upstream link dropped
|
|
116
|
+
* (`#startOver`).
|
|
117
|
+
*/
|
|
118
|
+
loading(): void;
|
|
119
|
+
/**
|
|
120
|
+
* Decodes and applies one entry of a state message (its members by index, each with its ops), without changing
|
|
121
|
+
* anything yet: returns what adopts it into the replicas, run inside the batch that applies the whole message.
|
|
122
|
+
* Throws on an entry that does not fit (a protocol error), and `too_large/part` for ops past the link's limits.
|
|
123
|
+
*/
|
|
124
|
+
prepare({ hold: id, members, failed, retired }: StateEntry, link: HostLink): () => void;
|
|
125
|
+
/**
|
|
126
|
+
* Its principal was revoked on this host (`host.revoke`): released at its provider if it is held there, then ended
|
|
127
|
+
* with `error` as `lost` does; no later link holds it.
|
|
128
|
+
*/
|
|
129
|
+
revoke(error: ChordError): void;
|
|
130
|
+
/** `gone`, or the host closes: the reference ends, its calls reject with `error`. */
|
|
131
|
+
lost(error: ChordError): void;
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=remote-object.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-object.d.ts","sourceRoot":"","sources":["../../../src/next/remote/remote-object.ts"],"names":[],"mappings":"AAIA,OAAO,EAAsB,KAAK,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAE1E,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,uBAAuB,CAAC;AAQhE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EACN,KAAK,OAAO,EACZ,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,QAAQ,EAGb,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,MAAM,EACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,KAAK,UAAU,EAGf,KAAK,OAAO,EAEZ,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,MAA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