@earendil-works/chord 1.4.0 → 1.5.1
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 +92 -0
- package/README.md +115 -90
- 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/contracts/accepts.d.ts +81 -0
- package/dist/contracts/accepts.d.ts.map +1 -0
- package/dist/contracts/accepts.js +123 -0
- package/dist/contracts/accepts.js.map +1 -0
- package/dist/contracts/contract.d.ts +121 -0
- package/dist/contracts/contract.d.ts.map +1 -0
- package/dist/contracts/contract.js +50 -0
- package/dist/contracts/contract.js.map +1 -0
- package/dist/contracts/declare.d.ts +107 -0
- package/dist/contracts/declare.d.ts.map +1 -0
- package/dist/contracts/declare.js +136 -0
- package/dist/contracts/declare.js.map +1 -0
- package/dist/contracts/evolve.d.ts +92 -0
- package/dist/contracts/evolve.d.ts.map +1 -0
- package/dist/contracts/evolve.js +179 -0
- package/dist/contracts/evolve.js.map +1 -0
- package/dist/contracts/fingerprint.d.ts +16 -0
- package/dist/contracts/fingerprint.d.ts.map +1 -0
- package/dist/contracts/fingerprint.js +50 -0
- package/dist/contracts/fingerprint.js.map +1 -0
- package/dist/contracts/history.d.ts +71 -0
- package/dist/contracts/history.d.ts.map +1 -0
- package/dist/contracts/history.js +3 -0
- package/dist/contracts/history.js.map +1 -0
- package/dist/contracts/host-kind.d.ts +40 -0
- package/dist/contracts/host-kind.d.ts.map +1 -0
- package/dist/contracts/host-kind.js +37 -0
- package/dist/contracts/host-kind.js.map +1 -0
- package/dist/contracts/index.d.ts +7 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js +6 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/contracts/internal.d.ts +10 -0
- package/dist/contracts/internal.d.ts.map +1 -0
- package/dist/contracts/internal.js +9 -0
- package/dist/contracts/internal.js.map +1 -0
- package/dist/contracts/names.d.ts +3 -0
- package/dist/contracts/names.d.ts.map +1 -0
- package/dist/contracts/names.js +13 -0
- package/dist/contracts/names.js.map +1 -0
- package/dist/contracts/params.d.ts +28 -0
- package/dist/contracts/params.d.ts.map +1 -0
- package/dist/contracts/params.js +50 -0
- package/dist/contracts/params.js.map +1 -0
- package/dist/contracts/schema.d.ts +102 -0
- package/dist/contracts/schema.d.ts.map +1 -0
- package/dist/contracts/schema.js +103 -0
- package/dist/contracts/schema.js.map +1 -0
- package/dist/contracts/snapshot.d.ts +16 -0
- package/dist/contracts/snapshot.d.ts.map +1 -0
- package/dist/contracts/snapshot.js +167 -0
- package/dist/contracts/snapshot.js.map +1 -0
- package/dist/data/args.d.ts +50 -0
- package/dist/data/args.d.ts.map +1 -0
- package/dist/data/args.js +83 -0
- package/dist/data/args.js.map +1 -0
- package/dist/data/errors.d.ts +80 -0
- package/dist/data/errors.d.ts.map +1 -0
- package/dist/data/errors.js +116 -0
- package/dist/data/errors.js.map +1 -0
- package/dist/data/failure.d.ts +26 -0
- package/dist/data/failure.d.ts.map +1 -0
- package/dist/data/failure.js +77 -0
- package/dist/data/failure.js.map +1 -0
- package/dist/data/index.d.ts +4 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/index.js +5 -0
- package/dist/data/index.js.map +1 -0
- package/dist/data/internal.d.ts +7 -0
- package/dist/data/internal.d.ts.map +1 -0
- package/dist/data/internal.js +8 -0
- package/dist/data/internal.js.map +1 -0
- package/dist/data/params.d.ts +20 -0
- package/dist/data/params.d.ts.map +1 -0
- package/dist/data/params.js +31 -0
- package/dist/data/params.js.map +1 -0
- package/dist/data/principal.d.ts +22 -0
- package/dist/data/principal.d.ts.map +1 -0
- package/dist/data/principal.js +49 -0
- package/dist/data/principal.js.map +1 -0
- package/dist/data/validator.d.ts +12 -0
- package/dist/data/validator.d.ts.map +1 -0
- package/dist/data/validator.js +35 -0
- package/dist/data/validator.js.map +1 -0
- 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/documents/address-source.d.ts +20 -0
- package/dist/documents/address-source.d.ts.map +1 -0
- package/dist/documents/address-source.js +44 -0
- package/dist/documents/address-source.js.map +1 -0
- package/dist/documents/definition.d.ts +84 -0
- package/dist/documents/definition.d.ts.map +1 -0
- package/dist/documents/definition.js +74 -0
- package/dist/documents/definition.js.map +1 -0
- package/dist/documents/documents.d.ts +126 -0
- package/dist/documents/documents.d.ts.map +1 -0
- package/dist/documents/documents.js +248 -0
- package/dist/documents/documents.js.map +1 -0
- package/dist/documents/fence.d.ts +9 -0
- package/dist/documents/fence.d.ts.map +1 -0
- package/dist/documents/fence.js +15 -0
- package/dist/documents/fence.js.map +1 -0
- package/dist/documents/handles.d.ts +76 -0
- package/dist/documents/handles.d.ts.map +1 -0
- package/dist/documents/handles.js +66 -0
- package/dist/documents/handles.js.map +1 -0
- package/dist/documents/index.d.ts +4 -0
- package/dist/documents/index.d.ts.map +1 -0
- package/dist/documents/index.js +3 -0
- package/dist/documents/index.js.map +1 -0
- package/dist/documents/internal.d.ts +9 -0
- package/dist/documents/internal.d.ts.map +1 -0
- package/dist/documents/internal.js +9 -0
- package/dist/documents/internal.js.map +1 -0
- package/dist/documents/keyed-slot.d.ts +103 -0
- package/dist/documents/keyed-slot.d.ts.map +1 -0
- package/dist/documents/keyed-slot.js +395 -0
- package/dist/documents/keyed-slot.js.map +1 -0
- package/dist/documents/line.d.ts +7 -0
- package/dist/documents/line.d.ts.map +1 -0
- package/dist/documents/line.js +14 -0
- package/dist/documents/line.js.map +1 -0
- package/dist/documents/persistence.d.ts +104 -0
- package/dist/documents/persistence.d.ts.map +1 -0
- package/dist/documents/persistence.js +129 -0
- package/dist/documents/persistence.js.map +1 -0
- package/dist/documents/residency.d.ts +31 -0
- package/dist/documents/residency.d.ts.map +1 -0
- package/dist/documents/residency.js +93 -0
- package/dist/documents/residency.js.map +1 -0
- package/dist/documents/slot.d.ts +109 -0
- package/dist/documents/slot.d.ts.map +1 -0
- package/dist/documents/slot.js +181 -0
- package/dist/documents/slot.js.map +1 -0
- package/dist/documents/transaction.d.ts +143 -0
- package/dist/documents/transaction.d.ts.map +1 -0
- package/dist/documents/transaction.js +442 -0
- package/dist/documents/transaction.js.map +1 -0
- package/dist/host/activity.d.ts +31 -0
- package/dist/host/activity.d.ts.map +1 -0
- package/dist/host/activity.js +40 -0
- package/dist/host/activity.js.map +1 -0
- package/dist/host/adapted.d.ts +49 -0
- package/dist/host/adapted.d.ts.map +1 -0
- package/dist/host/adapted.js +214 -0
- package/dist/host/adapted.js.map +1 -0
- package/dist/host/attempt.d.ts +308 -0
- package/dist/host/attempt.d.ts.map +1 -0
- package/dist/host/attempt.js +1199 -0
- package/dist/host/attempt.js.map +1 -0
- package/dist/host/backoff.d.ts +29 -0
- package/dist/host/backoff.d.ts.map +1 -0
- package/dist/host/backoff.js +69 -0
- package/dist/host/backoff.js.map +1 -0
- package/dist/host/ctx.d.ts +94 -0
- package/dist/host/ctx.d.ts.map +1 -0
- package/dist/host/ctx.js +200 -0
- package/dist/host/ctx.js.map +1 -0
- package/dist/host/deadline.d.ts +12 -0
- package/dist/host/deadline.d.ts.map +1 -0
- package/dist/host/deadline.js +40 -0
- package/dist/host/deadline.js.map +1 -0
- package/dist/host/dependencies.d.ts +65 -0
- package/dist/host/dependencies.d.ts.map +1 -0
- package/dist/host/dependencies.js +115 -0
- package/dist/host/dependencies.js.map +1 -0
- package/dist/host/destination.d.ts +48 -0
- package/dist/host/destination.d.ts.map +1 -0
- package/dist/host/destination.js +101 -0
- package/dist/host/destination.js.map +1 -0
- package/dist/host/facet.d.ts +84 -0
- package/dist/host/facet.d.ts.map +1 -0
- package/dist/host/facet.js +55 -0
- package/dist/host/facet.js.map +1 -0
- package/dist/host/follow.d.ts +52 -0
- package/dist/host/follow.d.ts.map +1 -0
- package/dist/host/follow.js +207 -0
- package/dist/host/follow.js.map +1 -0
- package/dist/host/host.d.ts +571 -0
- package/dist/host/host.d.ts.map +1 -0
- package/dist/host/host.js +1318 -0
- package/dist/host/host.js.map +1 -0
- package/dist/host/index.d.ts +17 -0
- package/dist/host/index.d.ts.map +1 -0
- package/dist/host/index.js +6 -0
- package/dist/host/index.js.map +1 -0
- package/dist/host/internal.d.ts +11 -0
- package/dist/host/internal.d.ts.map +1 -0
- package/dist/host/internal.js +9 -0
- package/dist/host/internal.js.map +1 -0
- package/dist/host/members.d.ts +50 -0
- package/dist/host/members.d.ts.map +1 -0
- package/dist/host/members.js +107 -0
- package/dist/host/members.js.map +1 -0
- package/dist/host/native.d.ts +64 -0
- package/dist/host/native.d.ts.map +1 -0
- package/dist/host/native.js +126 -0
- package/dist/host/native.js.map +1 -0
- package/dist/host/object.d.ts +331 -0
- package/dist/host/object.d.ts.map +1 -0
- package/dist/host/object.js +1296 -0
- package/dist/host/object.js.map +1 -0
- package/dist/host/old-work.d.ts +34 -0
- package/dist/host/old-work.d.ts.map +1 -0
- package/dist/host/old-work.js +52 -0
- package/dist/host/old-work.js.map +1 -0
- package/dist/host/parked.d.ts +23 -0
- package/dist/host/parked.d.ts.map +1 -0
- package/dist/host/parked.js +79 -0
- package/dist/host/parked.js.map +1 -0
- package/dist/host/presence.d.ts +34 -0
- package/dist/host/presence.d.ts.map +1 -0
- package/dist/host/presence.js +117 -0
- package/dist/host/presence.js.map +1 -0
- package/dist/host/readiness.d.ts +27 -0
- package/dist/host/readiness.d.ts.map +1 -0
- package/dist/host/readiness.js +134 -0
- package/dist/host/readiness.js.map +1 -0
- package/dist/host/ref-state.d.ts +53 -0
- package/dist/host/ref-state.d.ts.map +1 -0
- package/dist/host/ref-state.js +83 -0
- package/dist/host/ref-state.js.map +1 -0
- package/dist/host/reference-keys.d.ts +36 -0
- package/dist/host/reference-keys.d.ts.map +1 -0
- package/dist/host/reference-keys.js +168 -0
- package/dist/host/reference-keys.js.map +1 -0
- package/dist/host/reference-source.d.ts +65 -0
- package/dist/host/reference-source.d.ts.map +1 -0
- package/dist/host/reference-source.js +285 -0
- package/dist/host/reference-source.js.map +1 -0
- package/dist/host/reference.d.ts +321 -0
- package/dist/host/reference.d.ts.map +1 -0
- package/dist/host/reference.js +797 -0
- package/dist/host/reference.js.map +1 -0
- package/dist/host/reload-cycle.d.ts +16 -0
- package/dist/host/reload-cycle.d.ts.map +1 -0
- package/dist/host/reload-cycle.js +81 -0
- package/dist/host/reload-cycle.js.map +1 -0
- package/dist/host/retry-on.d.ts +28 -0
- package/dist/host/retry-on.d.ts.map +1 -0
- package/dist/host/retry-on.js +52 -0
- package/dist/host/retry-on.js.map +1 -0
- package/dist/host/revocation.d.ts +16 -0
- package/dist/host/revocation.d.ts.map +1 -0
- package/dist/host/revocation.js +27 -0
- package/dist/host/revocation.js.map +1 -0
- package/dist/host/root.d.ts +37 -0
- package/dist/host/root.d.ts.map +1 -0
- package/dist/host/root.js +68 -0
- package/dist/host/root.js.map +1 -0
- package/dist/host/route.d.ts +64 -0
- package/dist/host/route.d.ts.map +1 -0
- package/dist/host/route.js +227 -0
- package/dist/host/route.js.map +1 -0
- package/dist/host/routines.d.ts +78 -0
- package/dist/host/routines.d.ts.map +1 -0
- package/dist/host/routines.js +398 -0
- package/dist/host/routines.js.map +1 -0
- package/dist/host/sleep.d.ts +9 -0
- package/dist/host/sleep.d.ts.map +1 -0
- package/dist/host/sleep.js +40 -0
- package/dist/host/sleep.js.map +1 -0
- package/dist/host/staging.d.ts +94 -0
- package/dist/host/staging.d.ts.map +1 -0
- package/dist/host/staging.js +304 -0
- package/dist/host/staging.js.map +1 -0
- package/dist/host/unbound-clock.d.ts +23 -0
- package/dist/host/unbound-clock.d.ts.map +1 -0
- package/dist/host/unbound-clock.js +58 -0
- package/dist/host/unbound-clock.js.map +1 -0
- package/dist/host/unbound.d.ts +37 -0
- package/dist/host/unbound.d.ts.map +1 -0
- package/dist/host/unbound.js +88 -0
- package/dist/host/unbound.js.map +1 -0
- package/dist/host/uuid.d.ts +3 -0
- package/dist/host/uuid.d.ts.map +1 -0
- package/dist/host/uuid.js +38 -0
- package/dist/host/uuid.js.map +1 -0
- package/dist/index.d.ts +29 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -9
- package/dist/index.js.map +1 -1
- package/dist/jobs/definition.d.ts +96 -0
- package/dist/jobs/definition.d.ts.map +1 -0
- package/dist/jobs/definition.js +83 -0
- package/dist/jobs/definition.js.map +1 -0
- package/dist/jobs/index.d.ts +5 -0
- package/dist/jobs/index.d.ts.map +1 -0
- package/dist/jobs/index.js +3 -0
- package/dist/jobs/index.js.map +1 -0
- package/dist/jobs/internal.d.ts +3 -0
- package/dist/jobs/internal.d.ts.map +1 -0
- package/dist/jobs/internal.js +4 -0
- package/dist/jobs/internal.js.map +1 -0
- package/dist/jobs/job.d.ts +149 -0
- package/dist/jobs/job.d.ts.map +1 -0
- package/dist/jobs/job.js +387 -0
- package/dist/jobs/job.js.map +1 -0
- package/dist/jobs/persisted.d.ts +38 -0
- package/dist/jobs/persisted.d.ts.map +1 -0
- package/dist/jobs/persisted.js +95 -0
- package/dist/jobs/persisted.js.map +1 -0
- package/dist/jobs/records.d.ts +231 -0
- package/dist/jobs/records.d.ts.map +1 -0
- package/dist/jobs/records.js +871 -0
- package/dist/jobs/records.js.map +1 -0
- package/dist/jobs/run-states.d.ts +69 -0
- package/dist/jobs/run-states.d.ts.map +1 -0
- package/dist/jobs/run-states.js +228 -0
- package/dist/jobs/run-states.js.map +1 -0
- package/dist/jobs/run.d.ts +117 -0
- package/dist/jobs/run.d.ts.map +1 -0
- package/dist/jobs/run.js +204 -0
- package/dist/jobs/run.js.map +1 -0
- package/dist/jobs/running.d.ts +44 -0
- package/dist/jobs/running.d.ts.map +1 -0
- package/dist/jobs/running.js +117 -0
- package/dist/jobs/running.js.map +1 -0
- package/dist/jobs/stored.d.ts +63 -0
- package/dist/jobs/stored.d.ts.map +1 -0
- package/dist/jobs/stored.js +55 -0
- package/dist/jobs/stored.js.map +1 -0
- package/dist/link/binary.d.ts +4 -0
- package/dist/link/binary.d.ts.map +1 -0
- package/dist/link/binary.js +544 -0
- package/dist/link/binary.js.map +1 -0
- package/dist/link/channel.d.ts +68 -0
- package/dist/link/channel.d.ts.map +1 -0
- package/dist/link/channel.js +215 -0
- package/dist/link/channel.js.map +1 -0
- package/dist/link/errors.d.ts +7 -0
- package/dist/link/errors.d.ts.map +1 -0
- package/dist/link/errors.js +21 -0
- package/dist/link/errors.js.map +1 -0
- package/dist/link/index.d.ts +8 -0
- package/dist/link/index.d.ts.map +1 -0
- package/dist/link/index.js +8 -0
- package/dist/link/index.js.map +1 -0
- package/dist/link/internal.d.ts +9 -0
- package/dist/link/internal.d.ts.map +1 -0
- package/dist/link/internal.js +10 -0
- package/dist/link/internal.js.map +1 -0
- package/dist/link/ipc.d.ts +22 -0
- package/dist/link/ipc.d.ts.map +1 -0
- package/dist/link/ipc.js +64 -0
- package/dist/link/ipc.js.map +1 -0
- package/dist/link/link.d.ts +34 -0
- package/dist/link/link.d.ts.map +1 -0
- package/dist/link/link.js +87 -0
- package/dist/link/link.js.map +1 -0
- package/dist/link/message.d.ts +262 -0
- package/dist/link/message.d.ts.map +1 -0
- package/dist/link/message.js +156 -0
- package/dist/link/message.js.map +1 -0
- package/dist/link/part.d.ts +80 -0
- package/dist/link/part.d.ts.map +1 -0
- package/dist/link/part.js +165 -0
- package/dist/link/part.js.map +1 -0
- package/dist/link/text.d.ts +6 -0
- package/dist/link/text.d.ts.map +1 -0
- package/dist/link/text.js +355 -0
- package/dist/link/text.js.map +1 -0
- package/dist/link/values.d.ts +40 -0
- package/dist/link/values.d.ts.map +1 -0
- package/dist/link/values.js +121 -0
- package/dist/link/values.js.map +1 -0
- package/dist/link/websocket.d.ts +26 -0
- package/dist/link/websocket.d.ts.map +1 -0
- package/dist/link/websocket.js +91 -0
- package/dist/link/websocket.js.map +1 -0
- package/dist/node/app/app.d.ts +269 -0
- package/dist/node/app/app.d.ts.map +1 -0
- package/dist/node/app/app.js +513 -0
- package/dist/node/app/app.js.map +1 -0
- package/dist/node/app/archive.d.ts +37 -0
- package/dist/node/app/archive.d.ts.map +1 -0
- package/dist/node/app/archive.js +204 -0
- package/dist/node/app/archive.js.map +1 -0
- package/dist/node/app/blobs.d.ts +23 -0
- package/dist/node/app/blobs.d.ts.map +1 -0
- package/dist/node/app/blobs.js +64 -0
- package/dist/node/app/blobs.js.map +1 -0
- package/dist/node/app/data.d.ts +35 -0
- package/dist/node/app/data.d.ts.map +1 -0
- package/dist/node/app/data.js +44 -0
- package/dist/node/app/data.js.map +1 -0
- package/dist/node/app/ephemeral-sessions.d.ts +20 -0
- package/dist/node/app/ephemeral-sessions.d.ts.map +1 -0
- package/dist/node/app/ephemeral-sessions.js +69 -0
- package/dist/node/app/ephemeral-sessions.js.map +1 -0
- package/dist/node/app/ephemeral.d.ts +11 -0
- package/dist/node/app/ephemeral.d.ts.map +1 -0
- package/dist/node/app/ephemeral.js +34 -0
- package/dist/node/app/ephemeral.js.map +1 -0
- package/dist/node/app/files-copy.d.ts +13 -0
- package/dist/node/app/files-copy.d.ts.map +1 -0
- package/dist/node/app/files-copy.js +86 -0
- package/dist/node/app/files-copy.js.map +1 -0
- package/dist/node/app/files-entry.d.ts +4 -0
- package/dist/node/app/files-entry.d.ts.map +1 -0
- package/dist/node/app/files-entry.js +7 -0
- package/dist/node/app/files-entry.js.map +1 -0
- package/dist/node/app/files-index.d.ts +180 -0
- package/dist/node/app/files-index.d.ts.map +1 -0
- package/dist/node/app/files-index.js +535 -0
- package/dist/node/app/files-index.js.map +1 -0
- package/dist/node/app/files.d.ts +363 -0
- package/dist/node/app/files.d.ts.map +1 -0
- package/dist/node/app/files.js +368 -0
- package/dist/node/app/files.js.map +1 -0
- package/dist/node/app/folder-views.d.ts +21 -0
- package/dist/node/app/folder-views.d.ts.map +1 -0
- package/dist/node/app/folder-views.js +55 -0
- package/dist/node/app/folder-views.js.map +1 -0
- package/dist/node/app/index.d.ts +12 -0
- package/dist/node/app/index.d.ts.map +1 -0
- package/dist/node/app/index.js +15 -0
- package/dist/node/app/index.js.map +1 -0
- package/dist/node/app/info.d.ts +66 -0
- package/dist/node/app/info.d.ts.map +1 -0
- package/dist/node/app/info.js +37 -0
- package/dist/node/app/info.js.map +1 -0
- package/dist/node/app/invite.d.ts +5 -0
- package/dist/node/app/invite.d.ts.map +1 -0
- package/dist/node/app/invite.js +64 -0
- package/dist/node/app/invite.js.map +1 -0
- package/dist/node/app/layout.d.ts +36 -0
- package/dist/node/app/layout.d.ts.map +1 -0
- package/dist/node/app/layout.js +87 -0
- package/dist/node/app/layout.js.map +1 -0
- package/dist/node/app/owner.d.ts +31 -0
- package/dist/node/app/owner.d.ts.map +1 -0
- package/dist/node/app/owner.js +104 -0
- package/dist/node/app/owner.js.map +1 -0
- package/dist/node/app/pairing.d.ts +55 -0
- package/dist/node/app/pairing.d.ts.map +1 -0
- package/dist/node/app/pairing.js +183 -0
- package/dist/node/app/pairing.js.map +1 -0
- package/dist/node/app/secrets.d.ts +16 -0
- package/dist/node/app/secrets.d.ts.map +1 -0
- package/dist/node/app/secrets.js +72 -0
- package/dist/node/app/secrets.js.map +1 -0
- package/dist/node/app/sessions.d.ts +72 -0
- package/dist/node/app/sessions.d.ts.map +1 -0
- package/dist/node/app/sessions.js +222 -0
- package/dist/node/app/sessions.js.map +1 -0
- package/dist/node/app/tar.d.ts +24 -0
- package/dist/node/app/tar.d.ts.map +1 -0
- package/dist/node/app/tar.js +167 -0
- package/dist/node/app/tar.js.map +1 -0
- package/dist/node/app/uploads.d.ts +37 -0
- package/dist/node/app/uploads.d.ts.map +1 -0
- package/dist/node/app/uploads.js +157 -0
- package/dist/node/app/uploads.js.map +1 -0
- package/dist/node/app/users.d.ts +37 -0
- package/dist/node/app/users.d.ts.map +1 -0
- package/dist/node/app/users.js +62 -0
- package/dist/node/app/users.js.map +1 -0
- package/dist/node/app/worker.d.ts +18 -0
- package/dist/node/app/worker.d.ts.map +1 -0
- package/dist/node/app/worker.js +84 -0
- package/dist/node/app/worker.js.map +1 -0
- package/dist/node/compression.d.ts +7 -0
- package/dist/node/compression.d.ts.map +1 -0
- package/dist/node/compression.js +25 -0
- package/dist/node/compression.js.map +1 -0
- package/dist/node/http/admission.d.ts +63 -0
- package/dist/node/http/admission.d.ts.map +1 -0
- package/dist/node/http/admission.js +134 -0
- package/dist/node/http/admission.js.map +1 -0
- package/dist/node/http/authenticate.d.ts +21 -0
- package/dist/node/http/authenticate.d.ts.map +1 -0
- package/dist/node/http/authenticate.js +34 -0
- package/dist/node/http/authenticate.js.map +1 -0
- package/dist/node/http/cookies.d.ts +32 -0
- package/dist/node/http/cookies.d.ts.map +1 -0
- package/dist/node/http/cookies.js +70 -0
- package/dist/node/http/cookies.js.map +1 -0
- package/dist/node/http/file.d.ts +23 -0
- package/dist/node/http/file.d.ts.map +1 -0
- package/dist/node/http/file.js +94 -0
- package/dist/node/http/file.js.map +1 -0
- package/dist/node/http/headers.d.ts +37 -0
- package/dist/node/http/headers.d.ts.map +1 -0
- package/dist/node/http/headers.js +136 -0
- package/dist/node/http/headers.js.map +1 -0
- package/dist/node/http/http.d.ts +111 -0
- package/dist/node/http/http.d.ts.map +1 -0
- package/dist/node/http/http.js +524 -0
- package/dist/node/http/http.js.map +1 -0
- package/dist/node/http/incoming.d.ts +19 -0
- package/dist/node/http/incoming.d.ts.map +1 -0
- package/dist/node/http/incoming.js +31 -0
- package/dist/node/http/incoming.js.map +1 -0
- package/dist/node/http/index.d.ts +11 -0
- package/dist/node/http/index.d.ts.map +1 -0
- package/dist/node/http/index.js +12 -0
- package/dist/node/http/index.js.map +1 -0
- package/dist/node/http/node.d.ts +78 -0
- package/dist/node/http/node.d.ts.map +1 -0
- package/dist/node/http/node.js +291 -0
- package/dist/node/http/node.js.map +1 -0
- package/dist/node/http/request.d.ts +60 -0
- package/dist/node/http/request.d.ts.map +1 -0
- package/dist/node/http/request.js +118 -0
- package/dist/node/http/request.js.map +1 -0
- package/dist/node/http/response.d.ts +63 -0
- package/dist/node/http/response.d.ts.map +1 -0
- package/dist/node/http/response.js +202 -0
- package/dist/node/http/response.js.map +1 -0
- package/dist/node/http/router.d.ts +132 -0
- package/dist/node/http/router.d.ts.map +1 -0
- package/dist/node/http/router.js +267 -0
- package/dist/node/http/router.js.map +1 -0
- package/dist/node/http/upgrades.d.ts +61 -0
- package/dist/node/http/upgrades.d.ts.map +1 -0
- package/dist/node/http/upgrades.js +192 -0
- package/dist/node/http/upgrades.js.map +1 -0
- package/dist/node/plugins/base-inputs.d.ts +14 -0
- package/dist/node/plugins/base-inputs.d.ts.map +1 -0
- package/dist/node/plugins/base-inputs.js +33 -0
- package/dist/node/plugins/base-inputs.js.map +1 -0
- package/dist/node/plugins/build.d.ts +77 -0
- package/dist/node/plugins/build.d.ts.map +1 -0
- package/dist/node/plugins/build.js +576 -0
- package/dist/node/plugins/build.js.map +1 -0
- package/dist/node/plugins/css-modules.d.ts +13 -0
- package/dist/node/plugins/css-modules.d.ts.map +1 -0
- package/dist/node/plugins/css-modules.js +58 -0
- package/dist/node/plugins/css-modules.js.map +1 -0
- package/dist/node/plugins/discover.d.ts +67 -0
- package/dist/node/plugins/discover.d.ts.map +1 -0
- package/dist/node/plugins/discover.js +369 -0
- package/dist/node/plugins/discover.js.map +1 -0
- package/dist/node/plugins/evaluate.d.ts +33 -0
- package/dist/node/plugins/evaluate.d.ts.map +1 -0
- package/dist/node/plugins/evaluate.js +121 -0
- package/dist/node/plugins/evaluate.js.map +1 -0
- package/dist/node/plugins/index.d.ts +11 -0
- package/dist/node/plugins/index.d.ts.map +1 -0
- package/dist/node/plugins/index.js +13 -0
- package/dist/node/plugins/index.js.map +1 -0
- package/dist/node/plugins/install.d.ts +38 -0
- package/dist/node/plugins/install.d.ts.map +1 -0
- package/dist/node/plugins/install.js +213 -0
- package/dist/node/plugins/install.js.map +1 -0
- package/dist/node/plugins/plugins.d.ts +162 -0
- package/dist/node/plugins/plugins.d.ts.map +1 -0
- package/dist/node/plugins/plugins.js +244 -0
- package/dist/node/plugins/plugins.js.map +1 -0
- package/dist/node/plugins/runtime.d.ts +57 -0
- package/dist/node/plugins/runtime.d.ts.map +1 -0
- package/dist/node/plugins/runtime.js +92 -0
- package/dist/node/plugins/runtime.js.map +1 -0
- package/dist/node/plugins/stack.d.ts +16 -0
- package/dist/node/plugins/stack.d.ts.map +1 -0
- package/dist/node/plugins/stack.js +61 -0
- package/dist/node/plugins/stack.js.map +1 -0
- package/dist/node/plugins/testing.d.ts +58 -0
- package/dist/node/plugins/testing.d.ts.map +1 -0
- package/dist/node/plugins/testing.js +210 -0
- package/dist/node/plugins/testing.js.map +1 -0
- package/dist/node/plugins/watcher.d.ts +69 -0
- package/dist/node/plugins/watcher.d.ts.map +1 -0
- package/dist/node/plugins/watcher.js +622 -0
- package/dist/node/plugins/watcher.js.map +1 -0
- package/dist/node/surfaces/bundle.d.ts +31 -0
- package/dist/node/surfaces/bundle.d.ts.map +1 -0
- package/dist/node/surfaces/bundle.js +118 -0
- package/dist/node/surfaces/bundle.js.map +1 -0
- package/dist/node/surfaces/current.d.ts +17 -0
- package/dist/node/surfaces/current.d.ts.map +1 -0
- package/dist/node/surfaces/current.js +54 -0
- package/dist/node/surfaces/current.js.map +1 -0
- package/dist/node/surfaces/index.d.ts +6 -0
- package/dist/node/surfaces/index.d.ts.map +1 -0
- package/dist/node/surfaces/index.js +6 -0
- package/dist/node/surfaces/index.js.map +1 -0
- package/dist/node/surfaces/published.d.ts +27 -0
- package/dist/node/surfaces/published.d.ts.map +1 -0
- package/dist/node/surfaces/published.js +142 -0
- package/dist/node/surfaces/published.js.map +1 -0
- package/dist/node/surfaces/served.d.ts +15 -0
- package/dist/node/surfaces/served.d.ts.map +1 -0
- package/dist/node/surfaces/served.js +42 -0
- package/dist/node/surfaces/served.js.map +1 -0
- package/dist/node/surfaces/surface-build.d.ts +53 -0
- package/dist/node/surfaces/surface-build.d.ts.map +1 -0
- package/dist/node/surfaces/surface-build.js +105 -0
- package/dist/node/surfaces/surface-build.js.map +1 -0
- package/dist/node/surfaces/tui.d.ts +40 -0
- package/dist/node/surfaces/tui.d.ts.map +1 -0
- package/dist/node/surfaces/tui.js +55 -0
- package/dist/node/surfaces/tui.js.map +1 -0
- package/dist/node/surfaces/web.d.ts +56 -0
- package/dist/node/surfaces/web.d.ts.map +1 -0
- package/dist/node/surfaces/web.js +108 -0
- package/dist/node/surfaces/web.js.map +1 -0
- package/dist/node/tui/actions.d.ts +49 -0
- package/dist/node/tui/actions.d.ts.map +1 -0
- package/dist/node/tui/actions.js +195 -0
- package/dist/node/tui/actions.js.map +1 -0
- package/dist/node/tui/credentials.d.ts +17 -0
- package/dist/node/tui/credentials.d.ts.map +1 -0
- package/dist/node/tui/credentials.js +54 -0
- package/dist/node/tui/credentials.js.map +1 -0
- package/dist/node/tui/filter.d.ts +5 -0
- package/dist/node/tui/filter.d.ts.map +1 -0
- package/dist/node/tui/filter.js +79 -0
- package/dist/node/tui/filter.js.map +1 -0
- package/dist/node/tui/index.d.ts +6 -0
- package/dist/node/tui/index.d.ts.map +1 -0
- package/dist/node/tui/index.js +6 -0
- package/dist/node/tui/index.js.map +1 -0
- package/dist/node/tui/launcher.d.ts +40 -0
- package/dist/node/tui/launcher.d.ts.map +1 -0
- package/dist/node/tui/launcher.js +439 -0
- package/dist/node/tui/launcher.js.map +1 -0
- package/dist/node/tui/pipe.d.ts +18 -0
- package/dist/node/tui/pipe.d.ts.map +1 -0
- package/dist/node/tui/pipe.js +134 -0
- package/dist/node/tui/pipe.js.map +1 -0
- package/dist/node/tui/sandbox.d.ts +54 -0
- package/dist/node/tui/sandbox.d.ts.map +1 -0
- package/dist/node/tui/sandbox.js +431 -0
- package/dist/node/tui/sandbox.js.map +1 -0
- package/dist/node/workers/base.d.ts +30 -0
- package/dist/node/workers/base.d.ts.map +1 -0
- package/dist/node/workers/base.js +255 -0
- package/dist/node/workers/base.js.map +1 -0
- package/dist/node/workers/child.d.ts +4 -0
- package/dist/node/workers/child.d.ts.map +1 -0
- package/dist/node/workers/child.js +6 -0
- package/dist/node/workers/child.js.map +1 -0
- package/dist/node/workers/control.d.ts +83 -0
- package/dist/node/workers/control.d.ts.map +1 -0
- package/dist/node/workers/control.js +77 -0
- package/dist/node/workers/control.js.map +1 -0
- package/dist/node/workers/index.d.ts +4 -0
- package/dist/node/workers/index.d.ts.map +1 -0
- package/dist/node/workers/index.js +7 -0
- package/dist/node/workers/index.js.map +1 -0
- package/dist/node/workers/lock.d.ts +30 -0
- package/dist/node/workers/lock.d.ts.map +1 -0
- package/dist/node/workers/lock.js +180 -0
- package/dist/node/workers/lock.js.map +1 -0
- package/dist/node/workers/main.d.ts +46 -0
- package/dist/node/workers/main.d.ts.map +1 -0
- package/dist/node/workers/main.js +230 -0
- package/dist/node/workers/main.js.map +1 -0
- package/dist/node/workers/process.d.ts +42 -0
- package/dist/node/workers/process.d.ts.map +1 -0
- package/dist/node/workers/process.js +125 -0
- package/dist/node/workers/process.js.map +1 -0
- package/dist/node/workers/workers.d.ts +122 -0
- package/dist/node/workers/workers.d.ts.map +1 -0
- package/dist/node/workers/workers.js +677 -0
- package/dist/node/workers/workers.js.map +1 -0
- 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/react/hooks.d.ts +43 -0
- package/dist/react/hooks.d.ts.map +1 -0
- package/dist/react/hooks.js +82 -0
- package/dist/react/hooks.js.map +1 -0
- package/dist/react/index.d.ts +3 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +4 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/stores.d.ts +9 -0
- package/dist/react/stores.d.ts.map +1 -0
- package/dist/react/stores.js +37 -0
- package/dist/react/stores.js.map +1 -0
- package/dist/registries/contribution.d.ts +50 -0
- package/dist/registries/contribution.d.ts.map +1 -0
- package/dist/registries/contribution.js +129 -0
- package/dist/registries/contribution.js.map +1 -0
- package/dist/registries/entries.d.ts +18 -0
- package/dist/registries/entries.d.ts.map +1 -0
- package/dist/registries/entries.js +42 -0
- package/dist/registries/entries.js.map +1 -0
- package/dist/registries/index.d.ts +3 -0
- package/dist/registries/index.d.ts.map +1 -0
- package/dist/registries/index.js +5 -0
- package/dist/registries/index.js.map +1 -0
- package/dist/registries/internal.d.ts +4 -0
- package/dist/registries/internal.d.ts.map +1 -0
- package/dist/registries/internal.js +5 -0
- package/dist/registries/internal.js.map +1 -0
- package/dist/registries/record.d.ts +115 -0
- package/dist/registries/record.d.ts.map +1 -0
- package/dist/registries/record.js +283 -0
- package/dist/registries/record.js.map +1 -0
- package/dist/registries/registry.d.ts +74 -0
- package/dist/registries/registry.d.ts.map +1 -0
- package/dist/registries/registry.js +14 -0
- package/dist/registries/registry.js.map +1 -0
- package/dist/registries/value.d.ts +48 -0
- package/dist/registries/value.d.ts.map +1 -0
- package/dist/registries/value.js +224 -0
- package/dist/registries/value.js.map +1 -0
- package/dist/remote/calls.d.ts +25 -0
- package/dist/remote/calls.d.ts.map +1 -0
- package/dist/remote/calls.js +62 -0
- package/dist/remote/calls.js.map +1 -0
- package/dist/remote/consumer.d.ts +43 -0
- package/dist/remote/consumer.d.ts.map +1 -0
- package/dist/remote/consumer.js +350 -0
- package/dist/remote/consumer.js.map +1 -0
- package/dist/remote/hold.d.ts +141 -0
- package/dist/remote/hold.d.ts.map +1 -0
- package/dist/remote/hold.js +579 -0
- package/dist/remote/hold.js.map +1 -0
- package/dist/remote/host-link.d.ts +77 -0
- package/dist/remote/host-link.d.ts.map +1 -0
- package/dist/remote/host-link.js +184 -0
- package/dist/remote/host-link.js.map +1 -0
- package/dist/remote/internal.d.ts +6 -0
- package/dist/remote/internal.d.ts.map +1 -0
- package/dist/remote/internal.js +6 -0
- package/dist/remote/internal.js.map +1 -0
- package/dist/remote/path.d.ts +46 -0
- package/dist/remote/path.d.ts.map +1 -0
- package/dist/remote/path.js +73 -0
- package/dist/remote/path.js.map +1 -0
- package/dist/remote/provider.d.ts +89 -0
- package/dist/remote/provider.d.ts.map +1 -0
- package/dist/remote/provider.js +597 -0
- package/dist/remote/provider.js.map +1 -0
- package/dist/remote/relay.d.ts +69 -0
- package/dist/remote/relay.d.ts.map +1 -0
- package/dist/remote/relay.js +219 -0
- package/dist/remote/relay.js.map +1 -0
- package/dist/remote/remote-object.d.ts +138 -0
- package/dist/remote/remote-object.d.ts.map +1 -0
- package/dist/remote/remote-object.js +492 -0
- package/dist/remote/remote-object.js.map +1 -0
- package/dist/remote/replica.d.ts +59 -0
- package/dist/remote/replica.d.ts.map +1 -0
- package/dist/remote/replica.js +125 -0
- package/dist/remote/replica.js.map +1 -0
- 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 +13 -2
- package/dist/sqlite/node.d.ts.map +1 -1
- package/dist/sqlite/node.js +31 -8
- package/dist/sqlite/node.js.map +1 -1
- package/dist/state/batch.d.ts +64 -0
- package/dist/state/batch.d.ts.map +1 -0
- package/dist/state/batch.js +164 -0
- package/dist/state/batch.js.map +1 -0
- package/dist/state/derive.d.ts +52 -0
- package/dist/state/derive.d.ts.map +1 -0
- package/dist/state/derive.js +182 -0
- package/dist/state/derive.js.map +1 -0
- package/dist/state/index.d.ts +6 -0
- package/dist/state/index.d.ts.map +1 -0
- package/dist/state/index.js +4 -0
- package/dist/state/index.js.map +1 -0
- package/dist/state/internal.d.ts +6 -0
- package/dist/state/internal.d.ts.map +1 -0
- package/dist/state/internal.js +8 -0
- package/dist/state/internal.js.map +1 -0
- package/dist/state/native-source.d.ts +106 -0
- package/dist/state/native-source.d.ts.map +1 -0
- package/dist/state/native-source.js +240 -0
- package/dist/state/native-source.js.map +1 -0
- package/dist/state/watchable.d.ts +114 -0
- package/dist/state/watchable.d.ts.map +1 -0
- package/dist/state/watchable.js +156 -0
- package/dist/state/watchable.js.map +1 -0
- package/dist/state/writable.d.ts +32 -0
- package/dist/state/writable.d.ts.map +1 -0
- package/dist/state/writable.js +49 -0
- package/dist/state/writable.js.map +1 -0
- package/dist/store/adapter.d.ts +67 -0
- package/dist/store/adapter.d.ts.map +1 -0
- package/dist/store/adapter.js +118 -0
- package/dist/store/adapter.js.map +1 -0
- package/dist/store/allocator.d.ts +17 -0
- package/dist/store/allocator.d.ts.map +1 -0
- package/dist/store/allocator.js +30 -0
- package/dist/store/allocator.js.map +1 -0
- package/dist/store/applier.d.ts +8 -0
- package/dist/store/applier.d.ts.map +1 -0
- package/dist/store/applier.js +375 -0
- package/dist/store/applier.js.map +1 -0
- package/dist/store/apply-batch.d.ts +12 -0
- package/dist/store/apply-batch.d.ts.map +1 -0
- package/dist/store/apply-batch.js +83 -0
- package/dist/store/apply-batch.js.map +1 -0
- package/dist/store/archive.d.ts +32 -0
- package/dist/store/archive.d.ts.map +1 -0
- package/dist/store/archive.js +130 -0
- package/dist/store/archive.js.map +1 -0
- package/dist/store/backend.d.ts +10 -0
- package/dist/store/backend.d.ts.map +1 -0
- package/dist/store/backend.js +15 -0
- package/dist/store/backend.js.map +1 -0
- package/dist/store/catalog.d.ts +24 -0
- package/dist/store/catalog.d.ts.map +1 -0
- package/dist/store/catalog.js +17 -0
- package/dist/store/catalog.js.map +1 -0
- package/dist/store/claims.d.ts +23 -0
- package/dist/store/claims.d.ts.map +1 -0
- package/dist/store/claims.js +65 -0
- package/dist/store/claims.js.map +1 -0
- package/dist/store/columns.d.ts +77 -0
- package/dist/store/columns.d.ts.map +1 -0
- package/dist/store/columns.js +77 -0
- package/dist/store/columns.js.map +1 -0
- package/dist/store/engine.d.ts +176 -0
- package/dist/store/engine.d.ts.map +1 -0
- package/dist/store/engine.js +283 -0
- package/dist/store/engine.js.map +1 -0
- package/dist/store/evaluate.d.ts +17 -0
- package/dist/store/evaluate.d.ts.map +1 -0
- package/dist/store/evaluate.js +128 -0
- package/dist/store/evaluate.js.map +1 -0
- package/dist/store/export.d.ts +17 -0
- package/dist/store/export.d.ts.map +1 -0
- package/dist/store/export.js +200 -0
- package/dist/store/export.js.map +1 -0
- package/dist/store/expression.d.ts +150 -0
- package/dist/store/expression.d.ts.map +1 -0
- package/dist/store/expression.js +268 -0
- package/dist/store/expression.js.map +1 -0
- package/dist/store/import.d.ts +10 -0
- package/dist/store/import.d.ts.map +1 -0
- package/dist/store/import.js +276 -0
- package/dist/store/import.js.map +1 -0
- package/dist/store/index.d.ts +16 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +13 -0
- package/dist/store/index.js.map +1 -0
- package/dist/store/json-column.d.ts +33 -0
- package/dist/store/json-column.d.ts.map +1 -0
- package/dist/store/json-column.js +62 -0
- package/dist/store/json-column.js.map +1 -0
- package/dist/store/jsonl.d.ts +9 -0
- package/dist/store/jsonl.d.ts.map +1 -0
- package/dist/store/jsonl.js +61 -0
- package/dist/store/jsonl.js.map +1 -0
- package/dist/store/live-query.d.ts +108 -0
- package/dist/store/live-query.d.ts.map +1 -0
- package/dist/store/live-query.js +254 -0
- package/dist/store/live-query.js.map +1 -0
- package/dist/store/outbox.d.ts +26 -0
- package/dist/store/outbox.d.ts.map +1 -0
- package/dist/store/outbox.js +80 -0
- package/dist/store/outbox.js.map +1 -0
- package/dist/store/query.d.ts +39 -0
- package/dist/store/query.d.ts.map +1 -0
- package/dist/store/query.js +97 -0
- package/dist/store/query.js.map +1 -0
- package/dist/store/refusal.d.ts +15 -0
- package/dist/store/refusal.d.ts.map +1 -0
- package/dist/store/refusal.js +36 -0
- package/dist/store/refusal.js.map +1 -0
- package/dist/store/rows.d.ts +80 -0
- package/dist/store/rows.d.ts.map +1 -0
- package/dist/store/rows.js +183 -0
- package/dist/store/rows.js.map +1 -0
- package/dist/store/schema.d.ts +25 -0
- package/dist/store/schema.d.ts.map +1 -0
- package/dist/store/schema.js +115 -0
- package/dist/store/schema.js.map +1 -0
- package/dist/store/sql.d.ts +73 -0
- package/dist/store/sql.d.ts.map +1 -0
- package/dist/store/sql.js +234 -0
- package/dist/store/sql.js.map +1 -0
- package/dist/store/step.d.ts +50 -0
- package/dist/store/step.d.ts.map +1 -0
- package/dist/store/step.js +52 -0
- package/dist/store/step.js.map +1 -0
- package/dist/store/store.d.ts +171 -0
- package/dist/store/store.d.ts.map +1 -0
- package/dist/store/store.js +818 -0
- package/dist/store/store.js.map +1 -0
- package/dist/store/table-changes.d.ts +29 -0
- package/dist/store/table-changes.d.ts.map +1 -0
- package/dist/store/table-changes.js +102 -0
- package/dist/store/table-changes.js.map +1 -0
- package/dist/store/table-evolve.d.ts +74 -0
- package/dist/store/table-evolve.d.ts.map +1 -0
- package/dist/store/table-evolve.js +201 -0
- package/dist/store/table-evolve.js.map +1 -0
- package/dist/store/table-handle.d.ts +73 -0
- package/dist/store/table-handle.d.ts.map +1 -0
- package/dist/store/table-handle.js +101 -0
- package/dist/store/table-handle.js.map +1 -0
- package/dist/store/table-history.d.ts +75 -0
- package/dist/store/table-history.d.ts.map +1 -0
- package/dist/store/table-history.js +42 -0
- package/dist/store/table-history.js.map +1 -0
- package/dist/store/table-migration.d.ts +16 -0
- package/dist/store/table-migration.d.ts.map +1 -0
- package/dist/store/table-migration.js +202 -0
- package/dist/store/table-migration.js.map +1 -0
- package/dist/store/table-writes.d.ts +125 -0
- package/dist/store/table-writes.d.ts.map +1 -0
- package/dist/store/table-writes.js +170 -0
- package/dist/store/table-writes.js.map +1 -0
- package/dist/store/table.d.ts +80 -0
- package/dist/store/table.d.ts.map +1 -0
- package/dist/store/table.js +103 -0
- package/dist/store/table.js.map +1 -0
- package/dist/store/text.d.ts +14 -0
- package/dist/store/text.d.ts.map +1 -0
- package/dist/store/text.js +51 -0
- package/dist/store/text.js.map +1 -0
- package/dist/store/writes.d.ts +5 -0
- package/dist/store/writes.d.ts.map +1 -0
- package/dist/store/writes.js +4 -0
- package/dist/store/writes.js.map +1 -0
- package/dist/surfaces/active-language.d.ts +20 -0
- package/dist/surfaces/active-language.d.ts.map +1 -0
- package/dist/surfaces/active-language.js +78 -0
- package/dist/surfaces/active-language.js.map +1 -0
- package/dist/surfaces/active-theme.d.ts +16 -0
- package/dist/surfaces/active-theme.d.ts.map +1 -0
- package/dist/surfaces/active-theme.js +47 -0
- package/dist/surfaces/active-theme.js.map +1 -0
- package/dist/surfaces/client.d.ts +96 -0
- package/dist/surfaces/client.d.ts.map +1 -0
- package/dist/surfaces/client.js +264 -0
- package/dist/surfaces/client.js.map +1 -0
- package/dist/surfaces/connection.d.ts +49 -0
- package/dist/surfaces/connection.d.ts.map +1 -0
- package/dist/surfaces/connection.js +142 -0
- package/dist/surfaces/connection.js.map +1 -0
- package/dist/surfaces/format.d.ts +5 -0
- package/dist/surfaces/format.d.ts.map +1 -0
- package/dist/surfaces/format.js +37 -0
- package/dist/surfaces/format.js.map +1 -0
- package/dist/surfaces/index.d.ts +15 -0
- package/dist/surfaces/index.d.ts.map +1 -0
- package/dist/surfaces/index.js +18 -0
- package/dist/surfaces/index.js.map +1 -0
- package/dist/surfaces/language.d.ts +53 -0
- package/dist/surfaces/language.d.ts.map +1 -0
- package/dist/surfaces/language.js +74 -0
- package/dist/surfaces/language.js.map +1 -0
- package/dist/surfaces/loaded.d.ts +42 -0
- package/dist/surfaces/loaded.d.ts.map +1 -0
- package/dist/surfaces/loaded.js +116 -0
- package/dist/surfaces/loaded.js.map +1 -0
- package/dist/surfaces/locale-choice.d.ts +25 -0
- package/dist/surfaces/locale-choice.d.ts.map +1 -0
- package/dist/surfaces/locale-choice.js +14 -0
- package/dist/surfaces/locale-choice.js.map +1 -0
- package/dist/surfaces/messages.d.ts +67 -0
- package/dist/surfaces/messages.d.ts.map +1 -0
- package/dist/surfaces/messages.js +112 -0
- package/dist/surfaces/messages.js.map +1 -0
- package/dist/surfaces/page-state.d.ts +14 -0
- package/dist/surfaces/page-state.d.ts.map +1 -0
- package/dist/surfaces/page-state.js +43 -0
- package/dist/surfaces/page-state.js.map +1 -0
- package/dist/surfaces/preference.d.ts +32 -0
- package/dist/surfaces/preference.d.ts.map +1 -0
- package/dist/surfaces/preference.js +72 -0
- package/dist/surfaces/preference.js.map +1 -0
- package/dist/surfaces/registered.d.ts +33 -0
- package/dist/surfaces/registered.d.ts.map +1 -0
- package/dist/surfaces/registered.js +51 -0
- package/dist/surfaces/registered.js.map +1 -0
- package/dist/surfaces/scripts.d.ts +84 -0
- package/dist/surfaces/scripts.d.ts.map +1 -0
- package/dist/surfaces/scripts.js +28 -0
- package/dist/surfaces/scripts.js.map +1 -0
- package/dist/surfaces/theme-choice.d.ts +31 -0
- package/dist/surfaces/theme-choice.d.ts.map +1 -0
- package/dist/surfaces/theme-choice.js +18 -0
- package/dist/surfaces/theme-choice.js.map +1 -0
- package/dist/surfaces/themes.d.ts +43 -0
- package/dist/surfaces/themes.d.ts.map +1 -0
- package/dist/surfaces/themes.js +110 -0
- package/dist/surfaces/themes.js.map +1 -0
- package/dist/surfaces/translations.d.ts +29 -0
- package/dist/surfaces/translations.d.ts.map +1 -0
- package/dist/surfaces/translations.js +57 -0
- package/dist/surfaces/translations.js.map +1 -0
- package/dist/sync/batch.d.ts +18 -0
- package/dist/sync/batch.d.ts.map +1 -0
- package/dist/sync/batch.js +125 -0
- package/dist/sync/batch.js.map +1 -0
- package/dist/sync/client.d.ts +166 -0
- package/dist/sync/client.d.ts.map +1 -0
- package/dist/sync/client.js +438 -0
- package/dist/sync/client.js.map +1 -0
- package/dist/sync/files.d.ts +46 -0
- package/dist/sync/files.d.ts.map +1 -0
- package/dist/sync/files.js +13 -0
- package/dist/sync/files.js.map +1 -0
- package/dist/sync/filesystem.d.ts +37 -0
- package/dist/sync/filesystem.d.ts.map +1 -0
- package/dist/sync/filesystem.js +185 -0
- package/dist/sync/filesystem.js.map +1 -0
- package/dist/sync/index.d.ts +8 -0
- package/dist/sync/index.d.ts.map +1 -0
- package/dist/sync/index.js +9 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/lines.d.ts +18 -0
- package/dist/sync/lines.d.ts.map +1 -0
- package/dist/sync/lines.js +46 -0
- package/dist/sync/lines.js.map +1 -0
- package/dist/sync/remote.d.ts +130 -0
- package/dist/sync/remote.d.ts.map +1 -0
- package/dist/sync/remote.js +46 -0
- package/dist/sync/remote.js.map +1 -0
- package/dist/sync/state.d.ts +17 -0
- package/dist/sync/state.d.ts.map +1 -0
- package/dist/sync/state.js +40 -0
- package/dist/sync/state.js.map +1 -0
- package/dist/telemetry-ingest/batch.d.ts +70 -0
- package/dist/telemetry-ingest/batch.d.ts.map +1 -0
- package/dist/telemetry-ingest/batch.js +110 -0
- package/dist/telemetry-ingest/batch.js.map +1 -0
- package/dist/telemetry-ingest/facet.d.ts +21 -0
- package/dist/telemetry-ingest/facet.d.ts.map +1 -0
- package/dist/telemetry-ingest/facet.js +96 -0
- package/dist/telemetry-ingest/facet.js.map +1 -0
- package/dist/telemetry-ingest/index.d.ts +5 -0
- package/dist/telemetry-ingest/index.d.ts.map +1 -0
- package/dist/telemetry-ingest/index.js +8 -0
- package/dist/telemetry-ingest/index.js.map +1 -0
- package/dist/telemetry-ingest/recorder.d.ts +50 -0
- package/dist/telemetry-ingest/recorder.d.ts.map +1 -0
- package/dist/telemetry-ingest/recorder.js +298 -0
- package/dist/telemetry-ingest/recorder.js.map +1 -0
- package/dist/telemetry-ingest/sender.d.ts +14 -0
- package/dist/telemetry-ingest/sender.d.ts.map +1 -0
- package/dist/telemetry-ingest/sender.js +64 -0
- package/dist/telemetry-ingest/sender.js.map +1 -0
- package/dist/telemetry-sqlite/index.d.ts +13 -4
- package/dist/telemetry-sqlite/index.d.ts.map +1 -1
- package/dist/telemetry-sqlite/index.js +81 -241
- package/dist/telemetry-sqlite/index.js.map +1 -1
- package/dist/telemetry-sqlite/node.d.ts +13 -0
- package/dist/telemetry-sqlite/node.d.ts.map +1 -0
- package/dist/telemetry-sqlite/node.js +27 -0
- package/dist/telemetry-sqlite/node.js.map +1 -0
- package/dist/telemetry-sqlite/schema.d.ts +9 -0
- package/dist/telemetry-sqlite/schema.d.ts.map +1 -0
- package/dist/telemetry-sqlite/schema.js +61 -0
- package/dist/telemetry-sqlite/schema.js.map +1 -0
- package/dist/telemetry-sqlite/store.d.ts +3 -0
- package/dist/telemetry-sqlite/store.d.ts.map +1 -1
- package/dist/telemetry-sqlite/store.js +24 -13
- package/dist/telemetry-sqlite/store.js.map +1 -1
- package/dist/telemetry.d.ts +937 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +470 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/tui/bridge.d.ts +112 -0
- package/dist/tui/bridge.d.ts.map +1 -0
- package/dist/tui/bridge.js +9 -0
- package/dist/tui/bridge.js.map +1 -0
- package/dist/tui/channel.d.ts +44 -0
- package/dist/tui/channel.d.ts.map +1 -0
- package/dist/tui/channel.js +150 -0
- package/dist/tui/channel.js.map +1 -0
- package/dist/tui/frames.d.ts +5 -0
- package/dist/tui/frames.d.ts.map +1 -0
- package/dist/tui/frames.js +52 -0
- package/dist/tui/frames.js.map +1 -0
- package/dist/tui/index.d.ts +7 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js +8 -0
- package/dist/tui/index.js.map +1 -0
- package/dist/tui/runtime.d.ts +46 -0
- package/dist/tui/runtime.d.ts.map +1 -0
- package/dist/tui/runtime.js +101 -0
- package/dist/tui/runtime.js.map +1 -0
- package/dist/tui/scope.d.ts +46 -0
- package/dist/tui/scope.d.ts.map +1 -0
- package/dist/tui/scope.js +141 -0
- package/dist/tui/scope.js.map +1 -0
- package/dist/tui/terminal.d.ts +15 -0
- package/dist/tui/terminal.d.ts.map +1 -0
- package/dist/tui/terminal.js +37 -0
- package/dist/tui/terminal.js.map +1 -0
- package/dist/tui/theme.d.ts +17 -0
- package/dist/tui/theme.d.ts.map +1 -0
- package/dist/tui/theme.js +38 -0
- package/dist/tui/theme.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/web/environment.d.ts +4 -0
- package/dist/web/environment.d.ts.map +1 -0
- package/dist/web/environment.js +37 -0
- package/dist/web/environment.js.map +1 -0
- package/dist/web/index.d.ts +5 -0
- package/dist/web/index.d.ts.map +1 -0
- package/dist/web/index.js +7 -0
- package/dist/web/index.js.map +1 -0
- package/dist/web/language.d.ts +7 -0
- package/dist/web/language.d.ts.map +1 -0
- package/dist/web/language.js +21 -0
- package/dist/web/language.js.map +1 -0
- package/dist/web/page.d.ts +29 -0
- package/dist/web/page.d.ts.map +1 -0
- package/dist/web/page.js +92 -0
- package/dist/web/page.js.map +1 -0
- package/dist/web/scripts.d.ts +23 -0
- package/dist/web/scripts.d.ts.map +1 -0
- package/dist/web/scripts.js +50 -0
- package/dist/web/scripts.js.map +1 -0
- package/dist/web/styles.d.ts +17 -0
- package/dist/web/styles.d.ts.map +1 -0
- package/dist/web/styles.js +218 -0
- package/dist/web/styles.js.map +1 -0
- package/dist/web/themes.d.ts +6 -0
- package/dist/web/themes.d.ts.map +1 -0
- package/dist/web/themes.js +31 -0
- package/dist/web/themes.js.map +1 -0
- package/docs/benchmarks.md +1036 -0
- package/docs/decisions.md +3436 -0
- package/docs/dependencies/book.md +1671 -0
- package/docs/dependencies/index.html +2641 -0
- package/docs/dependencies/model.md +330 -0
- package/docs/design.md +3065 -0
- package/docs/durable-observers/book.md +432 -0
- package/docs/durable-observers/index.html +517 -0
- package/docs/flow-control/book.md +333 -0
- package/docs/flow-control/fold/index.html +265 -0
- package/docs/flow-control/index.html +548 -0
- package/docs/flow-control/window/index.html +228 -0
- package/docs/guide-plugins-hosts/book.md +957 -0
- package/docs/guide-plugins-hosts/index.html +952 -0
- package/docs/http-workers/book.md +378 -0
- package/docs/http-workers/index.html +515 -0
- package/docs/i18n/book.md +217 -0
- package/docs/i18n/index.html +344 -0
- package/docs/layer-1.md +311 -0
- package/docs/layer-2.md +216 -0
- package/docs/p3-features/README.md +6 -0
- package/docs/p3-features/book.md +478 -0
- package/docs/plugin-authoring.md +276 -0
- package/docs/plugin-model/book.md +186 -0
- package/docs/plugin-model/index.html +310 -0
- package/docs/plugin-primer/book.md +273 -0
- package/docs/plugin-primer/index.html +430 -0
- package/docs/slice-1.md +236 -0
- package/docs/slice-10.md +288 -0
- package/docs/slice-11.md +114 -0
- package/docs/slice-12.md +132 -0
- package/docs/slice-13.md +121 -0
- package/docs/slice-2.md +174 -0
- package/docs/slice-3a.md +296 -0
- package/docs/slice-3b.md +197 -0
- package/docs/slice-4.md +146 -0
- package/docs/slice-4a.md +418 -0
- package/docs/slice-4b.md +208 -0
- package/docs/slice-5.md +281 -0
- package/docs/slice-6a.md +676 -0
- package/docs/slice-6b.md +332 -0
- package/docs/slice-7a.md +130 -0
- package/docs/slice-7b/book.md +608 -0
- package/docs/slice-7b/index.html +842 -0
- package/docs/slice-7b.md +255 -0
- package/docs/slice-7c.md +165 -0
- package/docs/slice-8.md +194 -0
- package/docs/slice-9.md +110 -0
- package/docs/slices.md +241 -0
- package/docs/store/book.md +670 -0
- package/docs/store/index.html +861 -0
- package/docs/store/walkthrough.md +193 -0
- package/docs/theming/book.md +223 -0
- package/docs/theming/index.html +371 -0
- package/docs/tutorial/book.md +2169 -0
- package/docs/tutorial/index.html +2112 -0
- package/docs/tutorial/screens/click-after.png +0 -0
- package/docs/tutorial/screens/click-before.png +0 -0
- package/docs/tutorial/screens/edited.png +0 -0
- package/docs/tutorial/screens/french.png +0 -0
- package/docs/tutorial/screens/harbor.png +0 -0
- package/docs/tutorial/screens/page.png +0 -0
- package/docs/tutorial/screens/traces-ada.png +0 -0
- package/docs/tutorial/screens/traces.png +0 -0
- package/package.json +114 -20
- package/src/delta/README.md +69 -0
- package/dist/cell.d.ts +0 -122
- package/dist/cell.d.ts.map +0 -1
- package/dist/cell.js +0 -356
- package/dist/cell.js.map +0 -1
- package/dist/cluster.d.ts +0 -27
- package/dist/cluster.d.ts.map +0 -1
- package/dist/cluster.js +0 -230
- package/dist/cluster.js.map +0 -1
- package/dist/connection.d.ts +0 -270
- package/dist/connection.d.ts.map +0 -1
- package/dist/connection.js +0 -1216
- package/dist/connection.js.map +0 -1
- package/dist/contract.d.ts +0 -208
- package/dist/contract.d.ts.map +0 -1
- package/dist/contract.js +0 -246
- package/dist/contract.js.map +0 -1
- package/dist/declare.d.ts +0 -33
- package/dist/declare.d.ts.map +0 -1
- package/dist/declare.js +0 -2
- package/dist/declare.js.map +0 -1
- package/dist/errors.d.ts +0 -28
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -59
- package/dist/errors.js.map +0 -1
- package/dist/host.d.ts +0 -348
- package/dist/host.d.ts.map +0 -1
- package/dist/host.js +0 -1000
- package/dist/host.js.map +0 -1
- package/dist/link.d.ts +0 -107
- package/dist/link.d.ts.map +0 -1
- package/dist/link.js +0 -355
- package/dist/link.js.map +0 -1
- package/dist/loader.d.ts +0 -4
- package/dist/loader.d.ts.map +0 -1
- package/dist/loader.js +0 -73
- package/dist/loader.js.map +0 -1
- package/dist/manager.d.ts +0 -115
- package/dist/manager.d.ts.map +0 -1
- package/dist/manager.js +0 -345
- package/dist/manager.js.map +0 -1
- package/dist/node.d.ts +0 -4
- package/dist/node.d.ts.map +0 -1
- package/dist/node.js +0 -4
- package/dist/node.js.map +0 -1
- package/dist/object.d.ts +0 -438
- package/dist/object.d.ts.map +0 -1
- package/dist/object.js +0 -1571
- package/dist/object.js.map +0 -1
- package/dist/publish.d.ts +0 -5
- package/dist/publish.d.ts.map +0 -1
- package/dist/publish.js +0 -40
- package/dist/publish.js.map +0 -1
- package/dist/registry.d.ts +0 -25
- package/dist/registry.d.ts.map +0 -1
- package/dist/registry.js +0 -6
- package/dist/registry.js.map +0 -1
- package/dist/reload.d.ts +0 -126
- package/dist/reload.d.ts.map +0 -1
- package/dist/reload.js +0 -653
- package/dist/reload.js.map +0 -1
- package/dist/remote.d.ts +0 -165
- package/dist/remote.d.ts.map +0 -1
- package/dist/remote.js +0 -612
- package/dist/remote.js.map +0 -1
- package/dist/schema.d.ts +0 -21
- package/dist/schema.d.ts.map +0 -1
- package/dist/schema.js +0 -228
- package/dist/schema.js.map +0 -1
- package/dist/state.d.ts +0 -92
- package/dist/state.d.ts.map +0 -1
- package/dist/state.js +0 -287
- package/dist/state.js.map +0 -1
- package/dist/types.d.ts +0 -88
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/websocket.d.ts +0 -15
- package/dist/websocket.d.ts.map +0 -1
- package/dist/websocket.js +0 -16
- package/dist/websocket.js.map +0 -1
- package/dist/wire.d.ts +0 -216
- package/dist/wire.d.ts.map +0 -1
- package/dist/wire.js +0 -165
- package/dist/wire.js.map +0 -1
- package/docs/guide.md +0 -814
- package/docs/spec.md +0 -288
- package/docs/tutorial.md +0 -931
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.js","sourceRoot":"","sources":["../../src/host/host.ts"],"names":[],"mappings":"AAAA,uHAAuH;AACvH,oHAAoH;AACpH,sHAAsH;AACtH,sHAAsH;AACtH,0DAA0D;AAE1D,OAAO,EACN,sBAAsB,GAItB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACN,gBAAgB,EAChB,kBAAkB,EAElB,eAAe,EACf,k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1B,eAAe,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QAC9D,wEAAwE;QACxE,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;KACxC,CAAC,CAAC;IACH,IAAI,CAAC;QACJ,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;YAClB,MAAM,gBAAgB,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACjD,OAAO,GAAG,OAAO,CAAC,aAAa,EAAQ,CAAC;QACzC,CAAC;IACF,CAAC;YAAS,CAAC;QACV,OAAO,EAAE,CAAC;IACX,CAAC;AACF,CAAC;AAED,gGAAgG;AAChG,SAAS,aAAa;IACrB,OAAO,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC,CAAC;AACxE,CAAC;AAED,qEAAqE;AACrE,SAAS,WAAW,CAAC,IAAY;IAChC,OAAO,IAAI,KAAK,CAAC,WAAW,IAAI,mBAAmB,CAAC,CAAC;AACtD,CAAC;AAED,wHAAwH;AACxH,SAAS,cAAc,CAAC,MAAsB,EAAE,OAAe;IAC9D,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC;IACzC,OAAO,QAAQ,KAAK,OAAO,IAAI,CAAC,QAAQ,GAAG,OAAO,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC;AAChH,CAAC","sourcesContent":["// Hosts (§3): `createHost`, loading facets and the start barrier, links to children, the parent (connected again after\n// a drop) and routes, the origins it relays holds for, getting and holding references as a principal, the heartbeat\n// of every link, revocation (§4), presence (§19) and keep-alive counts, registries and root scopes (slice 8), reloads\n// (staging, the commit, each object's fate, the report; old work and its reload cycles), closing; one batch per host,\n// the backoff map and the endings new instances wait for.\n\nimport {\n\tNOOP_TELEMETRY_CONTEXT,\n\ttype SpanAttributes,\n\ttype TelemetryContext,\n\ttype TelemetrySpan,\n} from \"@earendil-works/pi-telemetry\";\nimport {\n\tawaitWithContext,\n\tBACKGROUND_CONTEXT,\n\ttype Context,\n\twithAbortSignal,\n\twithoutAbortSignal,\n\twithTelemetry,\n} from \"../context/index.ts\";\nimport type { Address, Contract, HostKind, ParamsOf } from \"../contracts/index.ts\";\nimport { contractData, type Params } from \"../contracts/internal.ts\";\nimport { ChordError, type FailureCause, type Principal, type PrincipalKeyFunction } from \"../data/index.ts\";\nimport {\n\tasChordError,\n\tbinds,\n\tcanonicalJson,\n\tcheckParams,\n\tidentityKey,\n\tinvalid,\n\tprincipalKey,\n} from \"../data/internal.ts\";\nimport type { TransactionCancelled } from \"../documents/internal.ts\";\nimport type { JsonValue } from \"../json.ts\";\nimport { binaryCodec, type Codec, type Compression, type Link, type PartLimits } from \"../link/index.ts\";\nimport { linkLimits } from \"../link/internal.ts\";\nimport type { Registry, RegistryValue } from \"../registries/index.ts\";\nimport type { RegistryValueSource } from \"../registries/internal.ts\";\nimport { type RegistryContribution, type RegistryError, RegistryRecord } from \"../registries/internal.ts\";\nimport {\n\ttype HoldRequest,\n\tHostLink,\n\ttype LinkRole,\n\tPath,\n\ttype ProviderSide,\n\tRemoteObject,\n\ttype Upstream,\n} from \"../remote/internal.ts\";\nimport { Batch, type BatchError } from \"../state/internal.ts\";\nimport type { ChordStore, Store } from \"../store/store.ts\";\nimport {\n\ttype ChordMetrics,\n\tcapped,\n\tchordMetrics,\n\tchordSpans,\n\tcountingOnly,\n\tended,\n\thostAttribute,\n\tparentOf,\n\tuntraced,\n} from \"../telemetry.ts\";\nimport type { Watchable } from \"../watch.ts\";\nimport { Activity, type ActivityCounts } from \"./activity.ts\";\nimport { type Attempt, notLive } from \"./attempt.ts\";\nimport { Backoff } from \"./backoff.ts\";\nimport { type Caller, type Ctx, withLinkedAbortSignal } from \"./ctx.ts\";\nimport { Destination, type Placed } from \"./destination.ts\";\nimport type { Facet } from \"./facet.ts\";\nimport { contributionOf } from \"./members.ts\";\nimport type { CloseFailed } from \"./native.ts\";\nimport { ChordObject, type Holder, type ReloadFate, type Served } from \"./object.ts\";\nimport { chainAttempts, OldWork } from \"./old-work.ts\";\nimport { type Presence, References } from \"./presence.ts\";\nimport { Binding, type CheckedParams, type Held, type Reference, type Target } from \"./reference.ts\";\nimport { ReloadCycles } from \"./reload-cycle.ts\";\nimport { RevocationKeys, type RevokedBy } from \"./revocation.ts\";\nimport { type RootOptions, RootScopes } from \"./root.ts\";\nimport { Route, type RouteHandle, type RouteOptions } from \"./route.ts\";\nimport {\n\taddStaged,\n\tcheckPluginNames,\n\temptyStaged,\n\ttype PluginFacet,\n\ttype Recorded,\n\ttype Request,\n\trecordFactory,\n\ttype Staged,\n\ttype StagedPlugin,\n\ttype StagedRegistry,\n\ttype StagingHost,\n\tstagePlugin,\n} from \"./staging.ts\";\nimport { UnboundIndex, type UnboundRequest } from \"./unbound.ts\";\nimport { UnboundClock, type UnboundLong } from \"./unbound-clock.ts\";\nimport { uuidv7 } from \"./uuid.ts\";\n\n/** What `createHost` takes; `R` is the app's revocation type (JSON). */\nexport type HostOptions<P extends Principal = Principal, R extends JsonValue = JsonValue> = {\n\t/** This host's address (`Session({ id })`): it serves only objects placed there. Without one, a client. */\n\treadonly address?: Address;\n\t/** Who this host acts as for its own requests; a host without one (a client) has none. */\n\treadonly principal?: P;\n\t/** The key of a principal in identities; L1's canonical JSON by default. The same function on every host. */\n\treadonly principalKey?: PrincipalKeyFunction<P>;\n\t/**\n\t * The telemetry adapter (§29): this host's root spans (activations, closes, resolves, routines, methods called over\n\t * links) and metrics, and the carriers its links extract; NOOP by default, which records nothing and costs one call\n\t * per span site.\n\t */\n\treadonly telemetry?: TelemetryContext;\n\t/**\n\t * Who a span was for (decision \"Who a span was for\"): the attributes its method and call spans record for a\n\t * principal, in place of the default `chord.principal` (its principal key, capped at 256 characters). Called for\n\t * every span recorded with a principal: synchronous and cheap; caching, if any, is the hook's own. The same\n\t * function on every host.\n\t */\n\treadonly principalAttributes?: PrincipalAttributes<P>;\n\t/** Everything that fails in the background; every app handles it. */\n\treadonly onError: (error: HostError) => void;\n\t/** How long a native's close, and an ending object's running calls, are waited for; 30 s by default. */\n\treadonly closeTimeout?: number;\n\t/** How long an activation attempt, and a `get`, may take until the object is live; 60 s by default. */\n\treadonly readyTimeout?: number;\n\t/**\n\t * How long a reload's restart keeps its old attempt open for old work (its calls, routed calls, its successor's\n\t * readiness) before it is sealed and anything still running is cut off (`released`); 5 s by default, at most\n\t * `closeTimeout`. Ends in seconds the waits Chord cannot see (a root opened without the method's `ctx`).\n\t */\n\treadonly reloadDrainTimeout?: number;\n\t/**\n\t * The heartbeat of every link: a link silent for `ping` ms (15 s by default) sends a `ping`; one silent for `close`\n\t * ms (30 s by default), its handshake included, is closed.\n\t */\n\treadonly heartbeat?: { readonly ping?: number; readonly close?: number };\n\t/**\n\t * What revokes a principal (§4): `host.revoke(r)` ends the objects and closes the child links of every principal\n\t * `p` whose `revokedBy(p)` holds `r` (compared as canonical JSON). The same function on every host.\n\t */\n\treadonly revokedBy?: RevokedBy<P, R>;\n\t/**\n\t * A synchronous compressor (`nodeCompression` for Node): JSON parts above 16 KiB this host originates are deflated\n\t * once, and deflated parts it owns inflated in place. Without one (a browser), nothing is compressed and deflated\n\t * parts are inflated asynchronously, later messages of their link waiting in order.\n\t */\n\treadonly compression?: Compression;\n\t/**\n\t * The store persisted documents and tables live in (`openStore`); the app owns it and closes it after the host.\n\t * One open host per store. A `storage_failed` of the store is reported once and closes the host.\n\t */\n\treadonly store?: Store;\n};\n\n/** The span attributes recorded for a principal (`HostOptions.principalAttributes`): none, its key, or more. */\nexport type PrincipalAttributes<P extends Principal = Principal> = (principal: P) => Readonly<SpanAttributes>;\n\n/** Where a reported part sits on its object: a routine (`on`, `onLive`) or a native, by kind, from 1 in declaration order. */\nexport type Position = { readonly kind: \"on\" | \"onLive\" | \"native\"; readonly position: number };\n\n/**\n * What `onError` gets, by kind. `object` is the object's type, with its params key when it has params; `failure` is a\n * `FailureCause`, `error` the plain error.\n */\nexport type HostError =\n\t| BatchError\n\t| RegistryError\n\t| UnboundLong\n\t| TransactionCancelled\n\t| { readonly kind: \"activation_failed\"; readonly object: string; readonly failure: FailureCause }\n\t/** A live object failed at runtime (a `migrate` failing on access, a stored version newer than the code). */\n\t| { readonly kind: \"object_failed\"; readonly object: string; readonly failure: FailureCause }\n\t/** The host's store stopped after a backend error: the host closes itself (once). */\n\t| { readonly kind: \"storage_failed\"; readonly error: unknown }\n\t| { readonly kind: \"close_failed\"; readonly object: string; readonly native: Position; readonly error: unknown }\n\t| { readonly kind: \"close_timeout\"; readonly object: string; readonly native: Position }\n\t| { readonly kind: \"drain_timeout\"; readonly object: string }\n\t| { readonly kind: \"protocol_error\"; readonly error: unknown }\n\t| { readonly kind: \"resolve_failed\"; readonly address: string; readonly error: unknown }\n\t/**\n\t * A derive's compute threw (its owner's, once per failure episode: the first failure after a value or after its\n\t * creation; a value ends the episode); `member` when it is an exposed state member.\n\t */\n\t| { readonly kind: \"derive_failed\"; readonly object: string; readonly member?: string; readonly error: unknown }\n\t/**\n\t * A live query's run in a commit threw (a row its code cannot read), once per failure episode (a good run ends it):\n\t * the query is a failed member until then (`self.query`).\n\t */\n\t| { readonly kind: \"query_failed\"; readonly object: string; readonly table: string; readonly error: unknown }\n\t/** A routine's call threw, or its source failed for good; `routine` is its kind and position. */\n\t| { readonly kind: \"routine_failed\"; readonly object: string; readonly routine: Position; readonly error: unknown }\n\t/** A job's `run` threw (not after an abort): its outcome is `failed { threw }`. */\n\t| {\n\t\t\treadonly kind: \"job_failed\";\n\t\t\treadonly object: string;\n\t\t\treadonly job: string;\n\t\t\treadonly id: string;\n\t\t\treadonly error: unknown;\n\t }\n\t/** A job's `finish` threw: retried with backoff, blocked after five failures in a row. */\n\t| {\n\t\t\treadonly kind: \"job_finish_failed\";\n\t\t\treadonly object: string;\n\t\t\treadonly job: string;\n\t\t\treadonly id: string;\n\t\t\treadonly error: unknown;\n\t }\n\t/** A persisted run was cut off five times in a row by crashes (D6): it ends `failed { restart_limit }`, `finish` runs. */\n\t| {\n\t\t\treadonly kind: \"job_interrupted\";\n\t\t\treadonly object: string;\n\t\t\treadonly job: string;\n\t\t\treadonly id: string;\n\t\t\treadonly restarts: number;\n\t }\n\t/** A blocked run was dropped without `finish`: aborted, or its object ended. */\n\t| { readonly kind: \"job_dropped\"; readonly object: string; readonly job: string; readonly id: string }\n\t/**\n\t * An attempt parked longer than `readyTimeout` (since `since`, `Date.now()` time), whatever its blocker: once per\n\t * parking episode, naming the first blocker in declaration order (`waitingFor`, a reference's label or `registry\n\t * <name>`) and its `state`; a diagnostic of a ring across hosts started at the same moment or a long wait (nothing\n\t * fails).\n\t */\n\t| {\n\t\t\treadonly kind: \"parked_long\";\n\t\t\treadonly object: string;\n\t\t\treadonly waitingFor: string;\n\t\t\treadonly state: \"loading\" | \"failed\";\n\t\t\treadonly since: number;\n\t };\n\n/**\n * What `accept` and `connect` take: the principal of the host at the other end, as this host stamps it; `trusted` skips\n * the message check on the link (IPC to the host's own processes; never grants the principal fields); the codec both\n * ends of the link use (`binaryCodec` by default); and the limits per part of what arrives on it (Q2: none on a\n * trusted link, 16 MiB on the wire and 64 MiB decoded otherwise, unless set).\n */\nexport type LinkOptions<P extends Principal = Principal> = {\n\treadonly principal: P;\n\treadonly trusted?: boolean;\n\treadonly codec?: Codec;\n\treadonly limits?: PartLimits;\n};\n\n/** What `host.get` and `host.hold` take besides the type, the params and the context. */\nexport type GetOptions = {\n\t/**\n\t * A getter's deadline for its whole wait, and how long a call made while the reference is loading waits (the park\n\t * deadline); the host's `readyTimeout` by default.\n\t */\n\treadonly readyTimeout?: number;\n};\n\n/**\n * A host whatever its principal type, as Chord's own parts use it: `ChordHost<P>` is invariant in `P` (`load` takes\n * facets typed for exactly `P`).\n */\nexport type AnyHost = Omit<ChordHost, \"load\" | \"reload\" | \"accept\" | \"connect\" | \"route\" | \"references\" | \"root\">;\n\n/** A host. `P` is the app's principal type, `R` its revocation type. */\nexport interface Host<P extends Principal = Principal, R extends JsonValue = JsonValue> {\n\t/** This host's address (`HostOptions.address`); `undefined` on a client. */\n\treadonly address: Address | undefined;\n\t/** This run of the host, sent in every handshake (R20): a link's peer sees it as its calls' `ctx.incarnation`. */\n\treadonly incarnation: string;\n\t/**\n\t * The attributes this host's spans record for `principal`: its `principalAttributes` hook's, else `chord.principal`,\n\t * its principal key; none without a principal.\n\t */\n\tprincipalAttributes(principal: P | undefined, context: Context): Readonly<SpanAttributes>;\n\t/**\n\t * Runs every facet's setup and publishes what they declared in one batch (the types and registries served, the\n\t * registries composed once, the contributions); holds that waited for the publication are placed after that batch,\n\t * and a registry with contributions and no provider is reported (`registry_undeclared`). Then activates every\n\t * served type with empty params and resolves when each has had its first outcome (the start barrier, decision (a)):\n\t * live, failed by its own cause, parked with no blocker here still without its first outcome, or ended (failures go\n\t * to `onError`). A plugin whose setup throws or is refused at declaration (a name given twice, a type or registry\n\t * another plugin serves, a remote type here without principal or address, `checkAccepts`) is left out and reported\n\t * (`failed`); it never closes the host. A name that is no npm name throws before anything changes. Runs once.\n\t */\n\tload(facets: readonly PluginFacet<P>[], context: Context): Promise<LoadReport>;\n\t/**\n\t * Reloads this host's plugins (slice 7b): `facets` is its complete new plugin set; a plugin in it and not loaded\n\t * is added, one loaded with another facet value is changed (the same facet object is unchanged: untouched), one\n\t * loaded and not in it is removed. Staging runs every new setup and every affected object's new factory against a\n\t * recording `self`, per plugin: a plugin whose new code fails there keeps its old code (an added one is left out),\n\t * and so does a changed plugin whose recorded requests would not bind because of it (the closure rule); both are\n\t * reported (`failed`); `options.failed` names plugins the caller passes as their loaded facet because their new\n\t * code failed before (a build, an evaluation): the same for the closure rule and the report. Then it commits in one\n\t * batch (types, registries, contributions; a publication waking the requests for the names it serves) and every\n\t * object of a changed or removed plugin takes its fate: restarted (its old attempt finishing old work first),\n\t * retried, or ended (its type removed). Resolves with the report once every fate started (retries checked their\n\t * dependencies; a restart reports what its readiness found at once; it does not wait for objects to go live).\n\t * Reloads run one after another. Throws before `load` resolved and for a name that is no npm name (before anything\n\t * changes); rejects `released/closed` after `close`; `context`'s abort before the commit rejects `aborted` and\n\t * changes nothing, after it only ends the wait (`aborted`, its `details.committed` naming what the commit applied:\n\t * `CommittedReload`).\n\t */\n\treload(facets: readonly PluginFacet<P>[], context: Context, options?: ReloadOptions): Promise<ReloadReport>;\n\t/**\n\t * A reference once its object is live (and hydrated). It acts as the host's principal and goes where its type's host\n\t * address puts it: here, over a route, or over the parent link (`Destination`). It waits while the reference is\n\t * `loading`, `failed { transient }` or `failed { waiting }` until its `readyTimeout`, then rejects with the last\n\t * cause and releases the reference; a broken failure rejects at once, and so does a get before `load` (`not_ready`).\n\t */\n\tget<C extends Contract>(Type: C, params: ParamsOf<C>, context: Context, options?: GetOptions): Promise<Reference<C>>;\n\t/**\n\t * A reference at once, following its object until released: loading, live, failed (retried as its object is) and\n\t * loading again while its link is down; it never rejects. Throws at once only for invalid params and before `load`\n\t * (`not_ready`). A type not served where it goes is `failed { waiting }` (bound when a publication serves it;\n\t * reported `unbound_long` after 5 s); a `hostAddress` or route that refuses fails it broken. Its `variant` is\n\t * `undefined` until its first binding.\n\t */\n\thold<C extends Contract>(Type: C, params: ParamsOf<C>, context: Context, options?: GetOptions): Held<C>;\n\t/**\n\t * A link from a child: this host serves its remote types over it, every hold and call arriving on it acting as\n\t * `principal`. `context` is the parent of the work arriving on it (its cancellation is dropped).\n\t */\n\taccept(link: Link, options: LinkOptions<P>, context: Context): void;\n\t/**\n\t * This host's parent link: remote types not served here and not routed are held over it, every such reference held\n\t * again on a new one; holds arriving on it may name whom they act for. Throws while the previous one is open; once\n\t * it closed (a drop), `connect` takes the next. `principal` is who the parent is.\n\t */\n\tconnect(link: Link, options: LinkOptions<P>, context: Context): void;\n\t/**\n\t * How this host reaches hosts of `Kind` (called before `load`, once per kind): `authorize` admits every hold routed\n\t * over it, `resolve` makes the link of an address, for a new hold, on `retry`, or once after a link that completed\n\t * its handshake dropped while held (no timer). A rejected `resolve`, or a link closed before its handshake, fails the\n\t * address's holders `failed { waiting }` (they stay on its path). `context` is the parent of the route's work (its\n\t * `resolve`s, the holds and calls on its links), aborted for it when this host closes. Returns the address controls.\n\t */\n\troute<N extends string, Q extends Params>(\n\t\tKind: HostKind<N, Q>,\n\t\toptions: RouteOptions<P, HostKind<N, Q>>,\n\t\tcontext: Context,\n\t): RouteHandle<HostKind<N, Q>>;\n\t/**\n\t * Revokes `revocation` (§4, R10, R11), synchronously: every remote object whose principal it revokes (`revokedBy`)\n\t * ends at once, whatever references remain (holders get `forbidden`, running calls are aborted, an activation is\n\t * abandoned); every child link whose principal it revokes closes (never the parent, never this host's own\n\t * principal); and every route link is sent `revoke`, which the host there applies with its own `revokedBy`. Nothing\n\t * is replayed to links made later.\n\t */\n\trevoke(revocation: R, context: Context): void;\n\t/**\n\t * The references to objects of `Type` on this host (§19), one entry per reference: the object's params, the\n\t * principal it acts as (remote types) and its origin, the incarnation of the host it was made for (two tabs are two\n\t * origins). Changes in the batch where a reference binds or ends; a link drop is a departure.\n\t */\n\treferences<C extends Contract>(Type: C): Watchable<readonly Presence<C, P>[]>;\n\t/**\n\t * The work keeping this host busy, for the app's supervisor: holds arriving over links and served here, method\n\t * calls running, running jobs and lingering objects; published at most once per microtask turn with changes.\n\t */\n\treadonly activity: Watchable<ActivityCounts>;\n\t/**\n\t * Registry `R`'s composed value as `R`'s version sees it, for code outside objects, once it is usable: waits while it\n\t * has no value (`unavailable/undeclared` without a provider, a first `compose` that threw, a version not served\n\t * here: `contract_mismatch`) until its `readyTimeout`, then rejects with the last error; before `load` it rejects\n\t * `not_ready` at once.\n\t */\n\tregistry<C, V>(R: Registry<C, V>, context: Context, options?: GetOptions): Promise<RegistryValue<V>>;\n\t/**\n\t * Runs `fn` with a call context for code outside objects (a Durable tool, a CLI): the host's principal (or\n\t * `options.principal`; an explicit `undefined` runs anonymous), this host's incarnation, `context`'s telemetry and signal, `ctx.get`. When `fn` settles or\n\t * `context` aborts, the context is sealed: its signal aborted, `ctx.get` refused `released`, every reference it took\n\t * released; an abort rejects at once. `host.close` seals the open ones; after it, `root` rejects `released`.\n\t */\n\troot<T>(fn: (ctx: Ctx<P>) => Promise<T>, context: Context, options?: RootOptions<P>): Promise<T>;\n\t/**\n\t * Closes its links, seals its root scopes, then ends every object at once, then drains and closes them one by one,\n\t * the last to go live first (reason `close`). Rejects with an `AggregateError` of the closes that threw.\n\t */\n\tclose(context: Context): Promise<void>;\n}\n\n/** A plugin left out at `load`, or whose new code failed at a reload (it kept its old code, if it had any), and why. */\nexport type PluginFailure = { readonly plugin: string; readonly error: unknown };\n\n/**\n * What a reload's commit applied, by plugin name: the `details.committed` of the `aborted` error of a reload whose\n * context aborted after its commit (the commit stands; only the wait for the report ended).\n */\nexport type CommittedReload = {\n\treadonly added: readonly string[];\n\treadonly changed: readonly string[];\n\treadonly removed: readonly string[];\n\t/** The plugins whose new code failed: they kept their old code (an added one was left out). */\n\treadonly failed: readonly string[];\n};\n\n/** What `host.reload` takes besides the plugin set: the plugins whose new code failed before it (a build, an evaluation). */\nexport type ReloadOptions = { readonly failed?: readonly PluginFailure[] };\n\n/** What `load` did (decision \"Per plugin at startup and reload\"): the plugins it left out. */\nexport type LoadReport = { readonly failed: readonly PluginFailure[] };\n\n/**\n * What a reload did (slice 7b §1): its plugins by change (those applied), the plugins whose new code failed, and what\n * every affected object did.\n */\nexport type ReloadReport = {\n\treadonly plugins: {\n\t\treadonly added: readonly string[];\n\t\treadonly changed: readonly string[];\n\t\treadonly removed: readonly string[];\n\t};\n\treadonly failed: readonly PluginFailure[];\n\t/** Every live, activating, parked or failed object of a changed or removed plugin, by its label. */\n\treadonly objects: readonly ReloadedObject[];\n};\n\n/**\n * One object's fate in a reload: `restarted` (its old attempt drained, sealed and closed with reason `reload`, a new\n * attempt on the new code), `ended` (its type is gone), `parked` (its new code waits for a failed dependency,\n * `cause`), or `retried` (it was failed, parked or activating: a new attempt runs on the new code).\n */\nexport type ReloadedObject = { readonly object: string } & (\n\t| { readonly kind: \"restarted\" }\n\t| { readonly kind: \"ended\" }\n\t| { readonly kind: \"parked\"; readonly cause: FailureCause }\n\t| { readonly kind: \"retried\" }\n);\n\n/**\n * What a hold placed here binds to (`serving`): its object, or why it waits unbound (`failed { waiting }`: not served,\n * another version, or placed elsewhere by the provider's code).\n */\nexport type Serving =\n\t| { readonly kind: \"object\"; readonly object: ChordObject }\n\t| { readonly kind: \"waiting\"; readonly cause: FailureCause };\n\n/**\n * A published plugin: its facet (an unchanged reload passes the same object), what its setup staged (a reload that\n * keeps it uses it again, its setup not run) and its contributions in the registries' tables.\n */\ntype LoadedPlugin<P extends Principal> = {\n\treadonly facet: Facet<P>;\n\treadonly staged: StagedPlugin;\n\treadonly contributions: readonly RegistryContribution[];\n};\n\n/**\n * What a reload staged: the staged set, the facets of the plugins it applies, the plugins by change, those that failed,\n * and each affected object's fate.\n */\ntype ReloadPlan<P extends Principal> = {\n\treadonly staged: Staged;\n\treadonly facets: ReadonlyMap<string, Facet<P>>;\n\treadonly added: readonly string[];\n\treadonly changed: readonly string[];\n\treadonly removed: readonly string[];\n\treadonly failed: readonly PluginFailure[];\n\treadonly fates: readonly PlannedFate[];\n};\n\n/** One staging pass of a reload: its plan, or the plugins it found failing (staging runs again without their new code). */\ntype StagingPass<P extends Principal> =\n\t| { readonly kind: \"staged\"; readonly plan: ReloadPlan<P>; readonly recorded: readonly RecordedFactory[] }\n\t| { readonly kind: \"failed\"; readonly failed: ReadonlyMap<string, unknown> };\n\n/** A recorded new factory of an object staging planned a fate for: whose new code it is, and what it declared. */\ntype RecordedFactory = { readonly plugin: string; readonly recorded: Recorded };\n\n/** An affected object's fate, as staging decided it, with its new factory's requests as staging recorded them. */\ntype PlannedFate =\n\t| { readonly kind: \"end\"; readonly object: ChordObject }\n\t| {\n\t\t\treadonly kind: ReloadFate;\n\t\t\treadonly object: ChordObject;\n\t\t\treadonly served: Served;\n\t\t\treadonly requests: readonly Request[];\n\t };\n\n/**\n * A fate started by a reload's commit, for its report: a retry's new attempt is checked first, a restart reports what\n * its readiness found.\n */\ntype StartedFate =\n\t| { readonly object: string; readonly kind: \"ended\" }\n\t| {\n\t\t\treadonly object: string;\n\t\t\treadonly kind: \"restarted\" | \"retried\";\n\t\t\treadonly target: ChordObject;\n\t\t\treadonly attempt: Attempt;\n\t };\n\n/** Creates a host. */\nexport function createHost<P extends Principal = Principal, R extends JsonValue = JsonValue>(\n\toptions: HostOptions<P, R>,\n): Host<P, R> {\n\treturn new ChordHost<P, R>(options);\n}\n\n/** No activation chain (Q5). */\nconst NO_CHAIN: readonly string[] = [];\n\n/** The params of a type with empty params, as checked: nothing, and the empty key. */\nconst EMPTY_PARAMS: CheckedParams = { params: {}, key: \"\" };\n\n/** What a span records for no principal. */\nconst NO_ATTRIBUTES: Readonly<SpanAttributes> = Object.freeze({});\n\n/** The host: its served types, its objects by identity, its batch, backoff and endings. */\nexport class ChordHost<P extends Principal = Principal, R extends JsonValue = JsonValue> implements Host<P, R> {\n\treadonly batch: Batch;\n\treadonly timeouts: { readonly close: number; readonly ready: number; readonly reload: number };\n\t/** Its old work during reloads (whether a context runs under it): see `old-work.ts`. */\n\treadonly oldWork = new OldWork();\n\t/** The waits of old work on objects that are not live, cut at once when they cycle through their own drain. */\n\treadonly reloadCycles = new ReloadCycles();\n\treadonly backoff = new Backoff((identity) => this.#due(identity));\n\treadonly address: Address | undefined;\n\treadonly principal: P | undefined;\n\t/** This run of the host, sent in every handshake (R20). */\n\treadonly incarnation = uuidv7();\n\treadonly compression: Compression | undefined;\n\t/** The host's store, if it has one. */\n\treadonly store: ChordStore | undefined;\n\t/** The telemetry adapter: root spans start on it, carriers from links are extracted with it. */\n\treadonly telemetry: TelemetryContext;\n\t/** The `chord.host` attribute of this host's spans: its address key, `client` without an address. */\n\treadonly spanHost: string;\n\t/** Chord's instruments on the adapter's metrics: the host's own counts (links, holds, calls, commits). */\n\treadonly metrics: ChordMetrics;\n\t/** The telemetry of this host's work under a context without a span (`#counted`); none without an adapter. */\n\treadonly #counting: TelemetrySpan | undefined;\n\treadonly #activity: Activity;\n\treadonly #principalKey: PrincipalKeyFunction<P> | undefined;\n\treadonly #principalAttributes: PrincipalAttributes<P> | undefined;\n\treadonly #revocationKeys: RevocationKeys;\n\t/** The presence list of each type someone asked about (`references`), by type name. */\n\treadonly #references = new Map<string, References>();\n\treadonly #onError: (error: HostError) => void;\n\t/** The served types by name: the published plugin set's (a reload's commit replaces it). */\n\t#types = new Map<string, Served>();\n\t/** The published plugins by name: their facet (an unchanged one is the same object), registries and contributions. */\n\treadonly #plugins = new Map<string, LoadedPlugin<P>>();\n\t/** The reloads, one after another (slice 7b §1): the last one's end, which the next one waits for. */\n\t#reloading: Promise<void> = Promise.resolve();\n\t/** By identity, in the order they went live (the others where they were created). */\n\treadonly #objects = new Map<string, ChordObject>();\n\t/** Teardowns still running, by identity: the next instance of an identity waits for its previous ones. */\n\treadonly #endings = new Map<string, Promise<void>>();\n\t/** The requests waiting unbound after the publication (in the index, and registry readers), reported after 5 s. */\n\treadonly #clock = new UnboundClock((error) => this.report(error));\n\t/** The requests that cannot bind yet, by name: before the publication all of them, then those left unbound. */\n\treadonly #unbound = new UnboundIndex(this.#clock);\n\t/** Resolved at the host's first publication (`load`'s batch), or its close. */\n\treadonly #publication = Promise.withResolvers<void>();\n\t#published = false;\n\t/** Every open link: children, routes and the parent. */\n\treadonly #links = new Set<HostLink>();\n\t/** Where holds go that are not served here and not routed: the parent link, across reconnects. */\n\treadonly #parent = new Path(() => {});\n\t/**\n\t * Remote references failed for a part past a link's limits: on no link's path (no reconnect holds them, no route\n\t * resolves for them) until `ref.retry()` places them anew; ended at `close` like the others.\n\t */\n\treadonly unplaced = new Path(() => {});\n\treadonly #routes = new Map<string, Route>();\n\treadonly #destination: Destination;\n\t/** The downstream origins this host relays holds for, by their number on upstream links (never reused). */\n\treadonly relays = new Map<number, ProviderSide>();\n\t#nextOrigin = 1;\n\t/** Aborted when the host closes: the context of every route's `resolve`, and the end of waiting `host.registry`s. */\n\treadonly #routing = new AbortController();\n\treadonly #heartbeat: { readonly ping: number; readonly close: number };\n\t/** Its registries by name, each made by its first use (a serve, a contribution or a reader). */\n\treadonly #registries = new Map<string, RegistryRecord>();\n\treadonly #roots = new RootScopes(this);\n\t/** The one heartbeat timer, running while the host has a link. */\n\t#ticking: ReturnType<typeof setInterval> | undefined;\n\t#state: \"new\" | \"loading\" | \"loaded\" | \"closed\" = \"new\";\n\t/** The one closing, which every `close` returns. */\n\t#closing: Promise<void> | undefined;\n\n\tconstructor(options: HostOptions<P>) {\n\t\tthis.address = options.address;\n\t\tthis.principal = options.principal;\n\t\tthis.#principalKey = options.principalKey;\n\t\tthis.#principalAttributes = options.principalAttributes;\n\t\tthis.#onError = options.onError;\n\t\tthis.telemetry = options.telemetry ?? NOOP_TELEMETRY_CONTEXT;\n\t\tthis.spanHost = hostAttribute(this.address);\n\t\tthis.metrics = chordMetrics(this.telemetry.metrics);\n\t\tconst metrics = this.telemetry.metrics;\n\t\tthis.#counting = untraced(this.telemetry) || metrics === undefined ? undefined : countingOnly(metrics);\n\t\tthis.batch = new Batch((error) => this.report(error), this.telemetry.metrics);\n\t\tthis.compression = options.compression;\n\t\tthis.#activity = new Activity(this.batch);\n\t\t// `revokedBy` is called with this host's principals only, the `P`s its links stamp.\n\t\tthis.#revocationKeys = new RevocationKeys(options.revokedBy as RevokedBy<Principal, JsonValue> | undefined);\n\t\tconst close = options.closeTimeout ?? 30_000;\n\t\tconst reload = Math.min(close, options.reloadDrainTimeout ?? 5_000);\n\t\tthis.timeouts = { close, ready: options.readyTimeout ?? 60_000, reload };\n\t\tthis.#heartbeat = { ping: options.heartbeat?.ping ?? 15_000, close: options.heartbeat?.close ?? 30_000 };\n\t\tthis.#destination = new Destination(this.address, this.#routes, this.#parent);\n\t\t// Chord's own: `openStore` made it.\n\t\tthis.store = options.store as ChordStore | undefined;\n\t\tthis.store?.attach({ failed: (error) => this.#storageFailed(error), batch: this.batch });\n\t}\n\n\tasync load(facets: readonly PluginFacet<P>[], context: Context): Promise<LoadReport> {\n\t\tthis.batch.assertOutside(\"load\");\n\t\tthis.#assertOpen();\n\t\tif (this.#state !== \"new\") throw new Error(\"load runs once per host\");\n\t\tcheckPluginNames(facets);\n\t\tthis.#state = \"loading\";\n\t\tconst parent = context.telemetry;\n\t\tif (untraced(parent)) return this.#load(facets, context);\n\t\treturn chordSpans(parent)(\"chord.load\", { \"chord.host\": this.spanHost, plugins: facets.length }, async (span) => {\n\t\t\ttry {\n\t\t\t\tconst report = await this.#load(facets, withTelemetry(span, context));\n\t\t\t\tspan.setAttributes({ failed: report.failed.length });\n\t\t\t\treturn report;\n\t\t\t} catch (error) {\n\t\t\t\tended(span, \"load_failed\", error, context.abortSignal);\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t});\n\t}\n\n\t/** `load`'s steps under its span: the setups, the publication, then the start barrier. */\n\tasync #load(facets: readonly PluginFacet<P>[], context: Context): Promise<LoadReport> {\n\t\tconst staged = emptyStaged();\n\t\tconst loaded = new Map<string, Facet<P>>();\n\t\tconst failed: PluginFailure[] = [];\n\t\t// A name given twice is refused the second time whether or not the first staged.\n\t\tconst given = new Set<string>();\n\t\t// In the given order: of two plugins serving one name, the later is left out.\n\t\tfor (const plugin of facets) {\n\t\t\tconst twice = given.has(plugin.name);\n\t\t\tgiven.add(plugin.name);\n\t\t\tconst error = twice ? loadedTwice(plugin.name) : this.#stageInto(staged, plugin);\n\t\t\tif (error === undefined) loaded.set(plugin.name, plugin.facet);\n\t\t\telse failed.push({ plugin: plugin.name, error });\n\t\t}\n\t\tthis.#types = staged.types;\n\t\t// The publication: the types and registries served, the facets' contributions and the first composition of\n\t\t// every served registry, in one batch, before any object activates.\n\t\tthis.batch.commit(() => {\n\t\t\tthis.#publish(staged, loaded);\n\t\t\tfor (const record of this.#registries.values()) record.composeServed();\n\t\t}, context);\n\t\t// After the batch: what waited for the publication is placed (the gate lasted only for the setups).\n\t\tthis.#published = true;\n\t\tthis.#publication.resolve();\n\t\tthis.#reportUndeclared();\n\t\tthis.#unbound.wakeAll();\n\t\tconst objects = [...this.#types.values()]\n\t\t\t.filter((served) => served.kind === \"local\" && served.hostLifetime)\n\t\t\t.map((served) => this.#object(served, EMPTY_PARAMS, undefined, context.telemetry, context));\n\t\tawait Promise.all(objects.map(({ firstOutcome }) => firstOutcome));\n\t\tif (this.#state === \"loading\") this.#state = \"loaded\";\n\t\treturn { failed };\n\t}\n\n\t/**\n\t * Whether a request for `Type` with `params` binds to `served` as a real bind checks it (`bind`): its kind, version\n\t * and fingerprint, and the provider's own host address; one whose `hostAddress` throws does not.\n\t */\n\t#wouldBind(served: Served, Type: Contract, params: ParamsOf<Contract>): boolean {\n\t\tif (unboundCause(served, Type.kind, Type.name, Type.version, Type.fingerprint) !== undefined) return false;\n\t\ttry {\n\t\t\treturn this.#misplaced(Type, served, params) === undefined;\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/** Whether a request for `Type` with `params` goes here; a `hostAddress` that throws: not here (it fails at bind). */\n\t#placedHere(Type: Contract, params: ParamsOf<Contract>): boolean {\n\t\ttry {\n\t\t\treturn this.#destination.placedHere(Type, params);\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/** Stages `plugin`'s new code into `staged`: the error that refuses it (its setup, a declaration, a name served twice). */\n\t#stageInto(staged: Staged, plugin: PluginFacet<P>): unknown {\n\t\ttry {\n\t\t\treturn addStaged(staged, stagePlugin(plugin, this.#stagingHost()));\n\t\t} catch (error) {\n\t\t\treturn error;\n\t\t}\n\t}\n\n\treload(facets: readonly PluginFacet<P>[], context: Context, options: ReloadOptions = {}): Promise<ReloadReport> {\n\t\tthis.batch.assertOutside(\"reload\");\n\t\tif (this.#state === \"closed\") return Promise.reject(this.#closedError());\n\t\tif (this.#state !== \"loaded\") throw new Error(\"reload runs after load\");\n\t\tcheckPluginNames(facets);\n\t\tconst reload = this.#reloading.then(() => this.#reload(facets, options.failed ?? [], context));\n\t\t// The tail settles to nothing: a report kept as its value would keep a rejected facet's closure (its error).\n\t\tthis.#reloading = reload.then(\n\t\t\t() => {},\n\t\t\t() => {},\n\t\t);\n\t\treturn reload;\n\t}\n\n\t/** One reload, after the previous one, in its span: each object's fate an event of it. */\n\tasync #reload(\n\t\tfacets: readonly PluginFacet<P>[],\n\t\tbefore: readonly PluginFailure[],\n\t\tcontext: Context,\n\t): Promise<ReloadReport> {\n\t\tconst parent = context.telemetry;\n\t\tif (untraced(parent)) return this.#reloadSteps(facets, before, context);\n\t\treturn chordSpans(parent)(\n\t\t\t\"chord.reload\",\n\t\t\t{ \"chord.host\": this.spanHost, plugins: facets.length },\n\t\t\tasync (span) => {\n\t\t\t\ttry {\n\t\t\t\t\tconst report = await this.#reloadSteps(facets, before, withTelemetry(span, context));\n\t\t\t\t\tfor (const { object, kind } of report.objects)\n\t\t\t\t\t\tspan.addEvent(\"chord.reload.fate\", { object: capped(object), fate: kind });\n\t\t\t\t\tconst { added, changed, removed } = report.plugins;\n\t\t\t\t\tconst counts = { added: added.length, changed: changed.length, removed: removed.length };\n\t\t\t\t\tspan.setAttributes({ ...counts, failed: report.failed.length, fates: report.objects.length });\n\t\t\t\t\treturn report;\n\t\t\t\t} catch (error) {\n\t\t\t\t\tended(span, \"reload_failed\", error, context.abortSignal);\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t},\n\t\t);\n\t}\n\n\t/** One reload's steps: staging, the commit, the fates, the report. */\n\tasync #reloadSteps(\n\t\tfacets: readonly PluginFacet<P>[],\n\t\tbefore: readonly PluginFailure[],\n\t\tcontext: Context,\n\t): Promise<ReloadReport> {\n\t\tthis.#assertOpen();\n\t\tif (context.abortSignal?.aborted) throw reloadAborted();\n\t\tconst plan = this.#stageReload(facets, before, context);\n\t\t// Aborted while it staged (a setup may abort it synchronously): nothing changed.\n\t\tif (context.abortSignal?.aborted) throw reloadAborted();\n\t\tconst started = this.#commit(plan, context);\n\t\tconst { added, changed, removed, failed } = plan;\n\t\tconst plugins = { added, changed, removed };\n\t\tconst committed: CommittedReload = { ...plugins, failed: failed.map(({ plugin }) => plugin) };\n\t\tconst objects = await this.#report(started, committed, context);\n\t\treturn { plugins, failed, objects };\n\t}\n\n\t/**\n\t * Staging (slice 7b §2), synchronous (no request or arriving hold meets it half done), per plugin (decision \"Per\n\t * plugin at startup and reload\"): a pass stages the new code (`#stagePass`); a plugin whose new code fails there\n\t * (or failed `before`, passed as its loaded facet) keeps its old code (an added one is left out) and staging runs\n\t * again without it; then a changed plugin whose recorded requests would not bind because of such a plugin keeps its\n\t * old code too (`#closure`), until nothing more fails. Bounded by the number of plugins with new code.\n\t */\n\t#stageReload(facets: readonly PluginFacet<P>[], before: readonly PluginFailure[], context: Context): ReloadPlan<P> {\n\t\tconst failed = new Map(before.map(({ plugin, error }) => [plugin, error]));\n\t\tconst given = new Map<string, Facet<P>>();\n\t\t// A name given twice: the second is refused, the first staged.\n\t\tconst twice: PluginFailure[] = [];\n\t\tfor (const { name, facet } of facets) {\n\t\t\tif (given.has(name)) twice.push({ plugin: name, error: loadedTwice(name) });\n\t\t\telse given.set(name, facet);\n\t\t}\n\t\tfor (;;) {\n\t\t\tconst pass = this.#stagePass(given, failed, context);\n\t\t\tif (pass.kind === \"failed\") {\n\t\t\t\tfor (const [name, error] of pass.failed) failed.set(name, error);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst kept = this.#closure(pass.plan, pass.recorded, failed);\n\t\t\tif (kept.size > 0) {\n\t\t\t\tfor (const [name, error] of kept) failed.set(name, error);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst failures = [...failed].map(([plugin, error]) => ({ plugin, error }));\n\t\t\treturn { ...pass.plan, failed: [...twice, ...failures] };\n\t\t}\n\t}\n\n\t/**\n\t * One staging pass: the loaded entries of the plugins kept as they are (unchanged, or failed: their setups not run\n\t * again) first, then every other plugin's new code in the given order (one refused by a name the table has already\n\t * fails), then the new factory of every object of a changed or removed plugin whose type is still served (a throw\n\t * fails the plugin serving it). Its plan, or the plugins that failed.\n\t */\n\t#stagePass(\n\t\tgiven: ReadonlyMap<string, Facet<P>>,\n\t\tfailed: ReadonlyMap<string, unknown>,\n\t\tcontext: Context,\n\t): StagingPass<P> {\n\t\tconst staged = emptyStaged();\n\t\tconst failing = new Map<string, unknown>();\n\t\tconst fresh: PluginFacet<P>[] = [];\n\t\tfor (const [name, facet] of given) {\n\t\t\tconst loaded = this.#plugins.get(name);\n\t\t\tif (loaded !== undefined && (loaded.facet === facet || failed.has(name))) addStaged(staged, loaded.staged);\n\t\t\telse if (!failed.has(name)) fresh.push({ name, facet });\n\t\t}\n\t\tfor (const plugin of fresh) {\n\t\t\tconst error = this.#stageInto(staged, plugin);\n\t\t\tif (error !== undefined) failing.set(plugin.name, error);\n\t\t}\n\t\tif (failing.size > 0) return { kind: \"failed\", failed: failing };\n\t\tconst applied = new Set(fresh.map(({ name }) => name));\n\t\tconst removed = [...this.#plugins.keys()].filter((name) => !given.has(name));\n\t\tconst reloaded = new Set([...applied, ...removed]);\n\t\tconst fates: PlannedFate[] = [];\n\t\tconst recorded: RecordedFactory[] = [];\n\t\tfor (const object of this.#objects.values()) {\n\t\t\tif (!reloaded.has(object.served.plugin)) continue;\n\t\t\tconst served = staged.types.get(object.served.contract.name);\n\t\t\tif (served === undefined || served.kind !== object.served.kind) {\n\t\t\t\tfates.push({ kind: \"end\", object });\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst declared = recordFactory(object, served, context);\n\t\t\t\trecorded.push({ plugin: served.plugin, recorded: declared });\n\t\t\t\tfates.push({ kind: object.reloadFate(), object, served, requests: declared.requests });\n\t\t\t} catch (error) {\n\t\t\t\tif (!failing.has(served.plugin)) failing.set(served.plugin, error);\n\t\t\t}\n\t\t}\n\t\tif (failing.size > 0) return { kind: \"failed\", failed: failing };\n\t\tconst facets = new Map(fresh.map(({ name, facet }) => [name, facet]));\n\t\tconst added = fresh.filter(({ name }) => !this.#plugins.has(name)).map(({ name }) => name);\n\t\tconst changed = fresh.filter(({ name }) => this.#plugins.has(name)).map(({ name }) => name);\n\t\tconst plan = { staged, facets, added, changed, removed, failed: [], fates };\n\t\treturn { kind: \"staged\", plan, recorded };\n\t}\n\n\t/**\n\t * The closure rule: the changed plugins (new code applied) of `plan` with a recorded request that would not bind in\n\t * the staged table because of a plugin that failed in this reload: its name served there by such a plugin's old code,\n\t * or not served at all while some plugin failed (what a failed setup would have served is unknown). Requests to\n\t * another host are not checked (a rollout's rules). Each such plugin with the error it keeps its old code for.\n\t */\n\t#closure(\n\t\tplan: ReloadPlan<P>,\n\t\trecorded: readonly RecordedFactory[],\n\t\tfailed: ReadonlyMap<string, unknown>,\n\t): Map<string, unknown> {\n\t\tconst kept = new Map<string, unknown>();\n\t\tif (failed.size === 0) return kept;\n\t\tfor (const { plugin, recorded: declared } of recorded) {\n\t\t\tif (kept.has(plugin) || !plan.facets.has(plugin)) continue;\n\t\t\tfor (const request of declared.requests) {\n\t\t\t\tconst unbound = this.#unboundRequest(plan.staged, request, failed);\n\t\t\t\tif (unbound === undefined) continue;\n\t\t\t\tkept.set(plugin, new Error(`plugin \"${plugin}\": ${unbound}`));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn kept;\n\t}\n\n\t/**\n\t * Why `request` (of a new factory) would not bind in `staged` because of a plugin in `failed`; `undefined`\n\t * when it binds, is placed on another host, or does not bind for another reason (it waits as any request does).\n\t */\n\t#unboundRequest(staged: Staged, request: Request, failed: ReadonlyMap<string, unknown>): string | undefined {\n\t\tconst name = request.kind === \"type\" ? request.contract.name : request.registry.name;\n\t\tconst provider = request.kind === \"type\" ? staged.types.get(name)?.plugin : staged.registries.get(name)?.plugin;\n\t\tif (provider !== undefined && !failed.has(provider)) return undefined;\n\t\tif (request.kind === \"type\") {\n\t\t\tconst { contract, params } = request;\n\t\t\t// A remote type the object reaches on another host: placed by the rollout's rules, not this host's.\n\t\t\tif (!this.#placedHere(contract, params)) return undefined;\n\t\t\tconst served = staged.types.get(name);\n\t\t\tif (served !== undefined && this.#wouldBind(served, contract, params)) return undefined;\n\t\t\treturn provider === undefined\n\t\t\t\t? `needs ${name} v${contract.version}, which no plugin serves now (a plugin failed)`\n\t\t\t\t: `needs ${name} v${contract.version}, which plugin \"${provider}\" serves on its old code`;\n\t\t}\n\t\tconst served = staged.registries.get(name);\n\t\tif (served !== undefined && registryServes(served, request.registry.version)) return undefined;\n\t\treturn provider === undefined\n\t\t\t? `needs registry ${name} v${request.registry.version}, which no plugin serves now (a plugin failed)`\n\t\t\t: `needs registry ${name} v${request.registry.version}, which plugin \"${provider}\" serves on its old code`;\n\t}\n\n\t/**\n\t * The commit (slice 7b §3), one batch: the served types become the staged ones (an unchanged plugin's stay as\n\t * they were), the removed plugins' registry providers go and the reloaded ones' are replaced, their facet\n\t * contributions replaced by plugin, every changed registry composed once; a removed type's presence list goes.\n\t * Then each object takes its fate (`#startFates`), host-lifetime objects of new types start, and the publication\n\t * wakes the requests waiting for the names the reload serves.\n\t */\n\t#commit(plan: ReloadPlan<P>, context: Context): readonly StartedFate[] {\n\t\tconst { staged, changed, removed } = plan;\n\t\tconst published = new Set(plan.facets.keys());\n\t\t// A kept plugin's types are its loaded ones, as they are: its objects are untouched.\n\t\tconst types = staged.types;\n\t\tthis.batch.commit(() => {\n\t\t\tfor (const name of [...changed, ...removed]) {\n\t\t\t\tconst loaded = this.#plugins.get(name)!;\n\t\t\t\tfor (const registry of loaded.staged.registries.keys()) {\n\t\t\t\t\tif (staged.registries.get(registry)?.plugin !== name) this.registryRecord(registry).unserve();\n\t\t\t\t}\n\t\t\t\tfor (const contribution of loaded.contributions) contribution.record.remove(contribution);\n\t\t\t\tthis.#plugins.delete(name);\n\t\t\t}\n\t\t\tthis.#types = types;\n\t\t\tthis.#publish(staged, plan.facets);\n\t\t\tfor (const name of published) {\n\t\t\t\tfor (const registry of staged.plugins.get(name)!.registries.keys()) {\n\t\t\t\t\tthis.registryRecord(registry).composeServed();\n\t\t\t\t}\n\t\t\t}\n\t\t}, context);\n\t\tthis.#reportUndeclared();\n\t\tfor (const name of this.#references.keys()) if (!types.has(name)) this.#references.delete(name);\n\t\tconst names = new Set<string>();\n\t\tfor (const [name, served] of types) if (published.has(served.plugin)) names.add(name);\n\t\tfor (const [name, { plugin }] of staged.registries) if (published.has(plugin)) names.add(name);\n\t\tconst started = this.#startFates(plan.fates);\n\t\tfor (const type of types.values()) {\n\t\t\tif (type.kind === \"local\" && type.hostLifetime) {\n\t\t\t\tthis.#object(type, EMPTY_PARAMS, undefined, context.telemetry, context);\n\t\t\t}\n\t\t}\n\t\tthis.#unbound.wake(names);\n\t\treturn started;\n\t}\n\n\t/**\n\t * Starts `fates` and returns them in their order, for the report: the removals first (a dependent whose new code\n\t * still needs a removed provider then parks, decision 4), then the restarts and retries; then the restarts'\n\t * readiness and successors, once every object has its new served type (their requests bind against the new code).\n\t */\n\t#startFates(fates: readonly PlannedFate[]): StartedFate[] {\n\t\tconst started = new Map<PlannedFate, StartedFate>();\n\t\tfor (const fate of fates) if (fate.kind === \"end\") started.set(fate, this.#startFate(fate));\n\t\tfor (const fate of fates) if (fate.kind !== \"end\") started.set(fate, this.#startFate(fate));\n\t\tfor (const fate of fates) if (fate.kind === \"restart\") fate.object.startSuccessor();\n\t\t// Every fate started above.\n\t\treturn fates.map((fate) => started.get(fate)!);\n\t}\n\n\t/**\n\t * Starts one object's fate after the commit: a removed type's object ends, its holders waiting `not_served`; any\n\t * other restarts or retries on its new served type.\n\t */\n\t#startFate(fate: PlannedFate): StartedFate {\n\t\tconst { object } = fate;\n\t\tif (fate.kind === \"end\") {\n\t\t\tconst error = new ChordError({\n\t\t\t\tcode: \"unavailable\",\n\t\t\t\tmessage: `${object.served.contract.name} is not served here`,\n\t\t\t});\n\t\t\tobject.remove({ kind: \"waiting\", error });\n\t\t\treturn { object: object.label, kind: \"ended\" };\n\t\t}\n\t\tconst attempt = object.reload(fate.served, fate.kind, fate.requests);\n\t\treturn { object: object.label, kind: fate.kind === \"restart\" ? \"restarted\" : \"retried\", target: object, attempt };\n\t}\n\n\t/**\n\t * The report, once every retry had its first dependency check (a parked one reports why); a restart reports at once\n\t * what its readiness found (its successor's own check follows the old attempt's end). `context`'s abort ends only\n\t * this wait (`aborted`, its `details` naming what the commit applied: `committed`).\n\t */\n\tasync #report(\n\t\tstarted: readonly StartedFate[],\n\t\tcommitted: CommittedReload,\n\t\tcontext: Context,\n\t): Promise<ReloadedObject[]> {\n\t\tconst checks = started.map(async (fate): Promise<ReloadedObject> => {\n\t\t\tif (fate.kind === \"ended\") return { object: fate.object, kind: fate.kind };\n\t\t\tconst cause = await this.#checked(fate);\n\t\t\treturn cause === undefined\n\t\t\t\t? { object: fate.object, kind: fate.kind }\n\t\t\t\t: { object: fate.object, kind: \"parked\", cause };\n\t\t});\n\t\ttry {\n\t\t\treturn await awaitWithContext(Promise.all(checks), context);\n\t\t} catch {\n\t\t\tconst { added, changed, removed, failed } = committed;\n\t\t\tconst details = {\n\t\t\t\tcommitted: { added: [...added], changed: [...changed], removed: [...removed], failed: [...failed] },\n\t\t\t};\n\t\t\tthrow new ChordError({ code: \"aborted\", message: \"reload: aborted after its commit\", details });\n\t\t}\n\t}\n\n\t/**\n\t * Why a restarted or retried object's new attempt waits, for the report: what a restart's readiness found, at once\n\t * (its new attempt's own check follows the old attempt's end), also for a retry of an attempt that still waits for\n\t * an open old attempt; otherwise its new attempt's first dependency check.\n\t */\n\t#checked(fate: Extract<StartedFate, { readonly kind: \"restarted\" | \"retried\" }>): Promise<FailureCause | undefined> {\n\t\tconst { target, attempt } = fate;\n\t\tif (fate.kind === \"restarted\" || target.openOldAttempt !== undefined)\n\t\t\treturn Promise.resolve(target.readinessCause);\n\t\treturn attempt.checked;\n\t}\n\n\t/** This host as staging sees it: whom it acts as, its address and its presence lists. */\n\t#stagingHost(): StagingHost {\n\t\t// Setups get presence lists of this host's `P`; staging passes them on as they are.\n\t\tconst references = (Type: Contract) => this.references(Type);\n\t\treturn { principal: this.principal, address: this.address, references: references as StagingHost[\"references\"] };\n\t}\n\n\tasync get<C extends Contract>(\n\t\tType: C,\n\t\tparams: ParamsOf<C>,\n\t\tcontext: Context,\n\t\toptions: GetOptions = {},\n\t): Promise<Reference<C>> {\n\t\tconst binding = await this.acquire(Type, params, this.#own(), context, options);\n\t\t// The binding was built from `Type`'s members.\n\t\treturn binding.reference as Reference<C>;\n\t}\n\n\thold<C extends Contract>(Type: C, params: ParamsOf<C>, context: Context, options: GetOptions = {}): Held<C> {\n\t\tthis.batch.assertOutside(\"hold\");\n\t\t// The binding was built from `Type`'s members; it may be unbound, so `variant` may be undefined.\n\t\treturn this.#hold(Type, params, this.#own(), context, options).reference as Held<C>;\n\t}\n\n\taccept(link: Link, options: LinkOptions<P>, context: Context): void {\n\t\tthis.#assertOpen();\n\t\tthis.#link(link, \"child\", options, context);\n\t}\n\n\tconnect(link: Link, options: LinkOptions<P>, context: Context): void {\n\t\tthis.#assertOpen();\n\t\tif (this.#parent.link !== undefined) throw new Error(\"connect: this host has an open parent link\");\n\t\tconst parent = this.#link(link, \"parent\", options, context);\n\t\tif (parent.open) this.#parent.connected(parent);\n\t}\n\n\troute<N extends string, Q extends Params>(\n\t\tKind: HostKind<N, Q>,\n\t\toptions: RouteOptions<P, HostKind<N, Q>>,\n\t\tcontext: Context,\n\t): RouteHandle<HostKind<N, Q>> {\n\t\tthis.#assertOpen();\n\t\tif (this.#state !== \"new\") throw new Error(\"route: routes are declared before load\");\n\t\tif (this.#routes.has(Kind.kind)) throw new Error(`route: ${Kind.kind} is routed already`);\n\t\t// The parent of the route's work: its `resolve`s and the holds and calls on its links, aborted when it closes.\n\t\tconst routing = withAbortSignal(this.#routing.signal, context);\n\t\t// A route calls `authorize` with the principals of holds on this host, `P`s, and addresses of `Kind`.\n\t\tconst route = new Route(\n\t\t\tKind as unknown as HostKind,\n\t\t\toptions as unknown as RouteOptions<Principal, HostKind>,\n\t\t\tthis,\n\t\t\trouting,\n\t\t);\n\t\tthis.#routes.set(Kind.kind, route);\n\t\treturn {\n\t\t\tretry: (address) => route.retry(address.key),\n\t\t\tsuspend: (address) => route.suspend(address.key),\n\t\t};\n\t}\n\n\trevoke(revocation: R, context: Context): void {\n\t\tconst count = this.#revoke(revocation, context);\n\t\tconst parent = context.telemetry;\n\t\t// Recorded after the work: a revocation is synchronous, its span only says what it ended.\n\t\tif (!untraced(parent)) {\n\t\t\tconst attributes = { \"chord.host\": this.spanHost };\n\t\t\tvoid chordSpans(parent)(\"chord.revoke\", attributes, (span) => span.setAttributes({ count }));\n\t\t}\n\t}\n\n\t/** `revoke`'s work; how many objects it ended and child links it closed. */\n\t#revoke(revocation: R, context: Context): number {\n\t\tlet count = 0;\n\t\tconst key = canonicalJson(revocation, context);\n\t\tconst revoked = (principal: Principal): boolean =>\n\t\t\t!this.#isOwn(principal, context) && this.#revocationKeys.revokes(principal, key, context);\n\t\tconst error = (label: string): ChordError =>\n\t\t\tnew ChordError({ code: \"forbidden\", reason: \"revoked\", message: `${label}: revoked` });\n\t\tfor (const object of [...this.#objects.values()]) {\n\t\t\tif (object.principal === undefined || !revoked(object.principal)) continue;\n\t\t\tobject.end(error(object.label));\n\t\t\tcount++;\n\t\t}\n\t\t// Requests not bound (waiting for the publication or a provider, refused, waiting for their link) end too: nothing\n\t\t// revives them.\n\t\tconst unbound = error(\"an unbound request\");\n\t\tthis.#unbound.revoke(revoked, unbound);\n\t\tfor (const link of this.#links) link.revokeUnbound(revoked, unbound);\n\t\t// This host's own requests over its paths, linked or not (a route still resolving, a link down): a later link\n\t\t// would hold them again (fix round 1).\n\t\tfor (const holder of this.#pathHolders()) {\n\t\t\tif (holder.kind !== \"remote\") continue;\n\t\t\tconst { principal } = holder.caller;\n\t\t\tif (principal !== undefined && revoked(principal)) holder.revoke(error(holder.label));\n\t\t}\n\t\t// Down the route links before the child links close: a worker ends the principal's objects with the revocation's\n\t\t// error before the closed origins release their holds.\n\t\tfor (const link of this.#links) if (link.role === \"route\") link.send({ kind: \"revoke\", revocation });\n\t\tfor (const link of [...this.#links]) {\n\t\t\tif (link.role !== \"child\" || !revoked(link.principal)) continue;\n\t\t\tlink.close();\n\t\t\tcount++;\n\t\t}\n\t\treturn count;\n\t}\n\n\tget activity(): Watchable<ActivityCounts> {\n\t\t// Its value is an `ActivityCounts`.\n\t\treturn this.#activity as unknown as Watchable<ActivityCounts>;\n\t}\n\n\treferences<C extends Contract>(Type: C): Watchable<readonly Presence<C, P>[]> {\n\t\tlet references = this.#references.get(Type.name);\n\t\tif (references === undefined) {\n\t\t\treferences = new References(this.batch);\n\t\t\tfor (const object of this.#objects.values()) {\n\t\t\t\tif (object.served.contract.name !== Type.name) continue;\n\t\t\t\tfor (const holder of object.holders) if (holder.listed) references.record(object, holder);\n\t\t\t}\n\t\t\tthis.#references.set(Type.name, references);\n\t\t}\n\t\t// Entries of `Type`'s objects, acting as `P`s.\n\t\treturn references as unknown as Watchable<readonly Presence<C, P>[]>;\n\t}\n\n\tasync registry<C, V>(R: Registry<C, V>, context: Context, options: GetOptions = {}): Promise<RegistryValue<V>> {\n\t\tthis.batch.assertOutside(\"registry\");\n\t\tthis.#assertOpen();\n\t\tthis.#assertLoadCalled(`registry ${R.name}`);\n\t\tconst timeout = options.readyTimeout ?? this.timeouts.ready;\n\t\tconst expired = new AbortController();\n\t\tconst waiting = withLinkedAbortSignal(expired.signal, context);\n\t\tlet last: unknown;\n\t\tconst deadline = setTimeout(() => expired.abort(last ?? notLive(`registry ${R.name}`, timeout)), timeout);\n\t\t// The host's close ends the wait at once, `released/closed` (its timer with it).\n\t\tconst closing = (): void => expired.abort(this.#closedError());\n\t\tthis.#routing.signal.addEventListener(\"abort\", closing, { once: true });\n\t\ttry {\n\t\t\tawait awaitWithContext(this.#publication.promise, waiting.context);\n\t\t\tthis.#assertOpen();\n\t\t\tconst value = this.registryRecord(R.name).value(R.version);\n\t\t\t// Its values are the composition as `R`'s version has it, `V`.\n\t\t\tconst usable = (): boolean => {\n\t\t\t\tconst start = value.start();\n\t\t\t\tif (start.kind === \"value\" || start.last !== undefined) return true;\n\t\t\t\tlast = start.error;\n\t\t\t\treturn false;\n\t\t\t};\n\t\t\tif (!usable()) await untilUsable(value, usable, waiting.context);\n\t\t\treturn value as RegistryValue<V>;\n\t\t} finally {\n\t\t\tclearTimeout(deadline);\n\t\t\tthis.#routing.signal.removeEventListener(\"abort\", closing);\n\t\t\twaiting.release();\n\t\t}\n\t}\n\n\tasync root<T>(fn: (ctx: Ctx<P>) => Promise<T>, context: Context, options: RootOptions<P> = {}): Promise<T> {\n\t\tthis.batch.assertOutside(\"root\");\n\t\tthis.#assertOpen();\n\t\t// The scope's ctx acts as `principal`, a `P`: an explicit `undefined` runs anonymous (an HTTP request nobody\n\t\t// authenticated), only an omitted one takes the host's.\n\t\tconst principal = \"principal\" in options ? options.principal : this.principal;\n\t\tconst run = fn as (ctx: Ctx) => Promise<T>;\n\t\tconst trace = options.trace;\n\t\tif (trace === undefined || untraced(this.telemetry))\n\t\t\treturn this.#roots.run(run, principal, this.#counted(context));\n\t\tconst attributes = { \"chord.host\": this.spanHost, ...trace.attributes };\n\t\treturn this.telemetry.startSpan({ name: trace.name, attributes }, async (span) => {\n\t\t\ttry {\n\t\t\t\treturn await this.#roots.run(run, principal, withTelemetry(span, context));\n\t\t\t} catch (error) {\n\t\t\t\tended(span, \"trace_failed\", error, context.abortSignal);\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t});\n\t}\n\n\tprincipalAttributes(principal: P | undefined, context: Context): Readonly<SpanAttributes> {\n\t\tif (principal === undefined) return NO_ATTRIBUTES;\n\t\tif (this.#principalAttributes !== undefined) return this.#principalAttributes(principal);\n\t\treturn { \"chord.principal\": capped(principalKey(principal, context, this.#principalKey)) };\n\t}\n\n\t/**\n\t * The names requests here wait for unbound that no plugin here serves (types and registries: `not_served`), sorted;\n\t * a name served at another version (`version`) is not among them.\n\t */\n\tunservedNames(): string[] {\n\t\treturn this.#unbound\n\t\t\t.names()\n\t\t\t.filter((name) => !this.#types.has(name) && this.#registries.get(name)?.providedVersion === undefined);\n\t}\n\n\t/** How many objects here have an activation under way (`ChordObject.activating`). */\n\tactivationsUnderWay(): number {\n\t\tlet count = 0;\n\t\tfor (const object of this.#objects.values()) if (object.activating) count++;\n\t\treturn count;\n\t}\n\n\t/** The registries with contributions here and no provider, each with the newest version contributed, by name. */\n\tundeclaredRegistries(): { readonly name: string; readonly version: number }[] {\n\t\tconst found: { readonly name: string; readonly version: number }[] = [];\n\t\tfor (const record of this.#registries.values()) {\n\t\t\tconst version = record.newestContribution;\n\t\t\tif (version !== undefined && record.providedVersion === undefined) found.push({ name: record.name, version });\n\t\t}\n\t\treturn found.sort((a, b) => (a.name < b.name ? -1 : 1));\n\t}\n\n\t/** The record of registry `name` on this host, made by its first use. */\n\tregistryRecord(name: string): RegistryRecord {\n\t\tlet record = this.#registries.get(name);\n\t\tif (record === undefined) {\n\t\t\trecord = new RegistryRecord(name, this.batch, (error) => this.report(error), this.#clock);\n\t\t\tthis.#registries.set(name, record);\n\t\t}\n\t\treturn record;\n\t}\n\n\tasync close(_context: Context): Promise<void> {\n\t\tthis.batch.assertOutside(\"close\");\n\t\tthis.#closing ??= this.#close();\n\t\treturn this.#closing;\n\t}\n\n\t/**\n\t * Whether the host published its setups (`load`'s batch): until then requests made here and holds arriving wait in\n\t * the unbound index, placed by the publication.\n\t */\n\tget published(): boolean {\n\t\treturn this.#published;\n\t}\n\n\t/**\n\t * `request` cannot bind yet: indexed under `name` (the type or registry it waits for) until woken or ended, waiting\n\t * for the publication (no `cause`) or for a provider that fits (`cause`).\n\t */\n\tindex(name: string, request: UnboundRequest, cause: FailureCause | undefined): void {\n\t\tthis.#unbound.add(name, request, cause);\n\t}\n\n\t/**\n\t * `binding`, whose object left it (its type removed, its version no longer bound: slice 7b §6), waits unbound with\n\t * `cause` under its type's name; a publication places it again (`params` checked as it was, under `context`).\n\t */\n\trewait(binding: Binding, Type: Contract, params: CheckedParams, cause: FailureCause, context: Context): void {\n\t\tthis.#wait(binding, Type.name, cause, () => this.#place(binding, Type, params, context));\n\t}\n\n\t/** `request` left the unbound index's wait for `name` (it ended, or a retry checks it again). */\n\tunindex(name: string, request: UnboundRequest): void {\n\t\tthis.#unbound.delete(name, request);\n\t}\n\n\t/** Whether the host closes: its objects end through `close`, not through its links. */\n\tget closing(): boolean {\n\t\treturn this.#state === \"closed\";\n\t}\n\n\t/**\n\t * A reference to `Type` made by `caller` (its principal, its origin's incarnation), once it is live (`host.get`,\n\t * `ctx.get`): a hold, waited for up to the getter's one deadline, across reconnects and through `loading`,\n\t * `failed { transient }` and `failed { waiting }`; a broken failure rejects at once, the deadline with the last\n\t * failure's error. A getter that gives up releases its reference.\n\t */\n\tasync acquire(\n\t\tType: Contract,\n\t\tparams: unknown,\n\t\tcaller: Caller,\n\t\tcontext: Context,\n\t\toptions: GetOptions,\n\t): Promise<Binding> {\n\t\tthis.batch.assertOutside(\"get\");\n\t\tconst binding = this.#hold(Type, params, caller, context, options);\n\t\tconst timeout = options.readyTimeout ?? this.timeouts.ready;\n\t\tconst expired = new AbortController();\n\t\tconst waiting = withLinkedAbortSignal(expired.signal, context);\n\t\tconst deadline = setTimeout(() => expired.abort(binding.lastFailure ?? notLive(binding.label, timeout)), timeout);\n\t\ttry {\n\t\t\t// Old work's getter whose target's activation waits on that work's own drain fails at once (rule 6).\n\t\t\tconst target = binding.target;\n\t\t\tconst live = binding.live(waiting.context);\n\t\t\tawait (target instanceof ChordObject ? this.waitAsOldWork(live, target, Type, context) : live);\n\t\t\treturn binding;\n\t\t} catch (error) {\n\t\t\tbinding.release();\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tclearTimeout(deadline);\n\t\t\twaiting.release();\n\t\t}\n\t}\n\n\t/**\n\t * `waiting` (a getter's or a gate's wait on `target`, for `contract`'s version) as `context` makes it: as old work it\n\t * is cut at once with `unavailable/reload_cycle` when it cycles through that work's own drain (`ReloadCycles`);\n\t * otherwise as it is.\n\t */\n\twaitAsOldWork<T>(waiting: Promise<T>, target: ChordObject, contract: Contract, context: Context): Promise<T> {\n\t\tif (!this.oldWork.of(context)) return waiting;\n\t\tconst chain = chainAttempts(context);\n\t\treturn chain.size === 0 ? waiting : this.reloadCycles.wait(waiting, target, contract, chain);\n\t}\n\n\t/** Adds `delta` to the keep-alive count of `kind` (`host.activity`), where the work happens. */\n\tcount(kind: keyof ActivityCounts, delta: number): void {\n\t\tthis.#activity.count(kind, delta);\n\t}\n\n\t/** `holder` references `object`: listed in its type's presence, if someone asked for it and it is listed. */\n\treferenced(object: ChordObject, holder: Holder, context: Context): void {\n\t\tif (holder.listed) this.#references.get(object.served.contract.name)?.add(object, holder, context);\n\t}\n\n\t/** `holders` of `object` ended: gone from its type's presence. */\n\tunreferenced(object: ChordObject, holders: Iterable<Holder>, context: Context): void {\n\t\tthis.#references.get(object.served.contract.name)?.remove(holders, context);\n\t}\n\n\t/** Reports a background failure to `onError`; a throwing `onError` has nowhere left to report to. */\n\treport(error: HostError): void {\n\t\ttry {\n\t\t\tthis.#onError(error);\n\t\t} catch {\n\t\t\t// Nothing to do: teardowns and attempts go on.\n\t\t}\n\t}\n\n\t/**\n\t * An unbound reference to an object of `Type` made by `caller`, declared by `dependent` (`undefined` for\n\t * `host.get`, `host.hold` and `ctx.get`).\n\t */\n\treference(Type: Contract, dependent: ChordObject | undefined, caller: Caller, options: GetOptions): Binding {\n\t\tthis.#assertOpen();\n\t\treturn this.#binding(Type, dependent, caller, options);\n\t}\n\n\t/**\n\t * Binds `binding` to the object for (Type, params) as its principal where its host address puts it (`Destination`):\n\t * the object here, created with its first attempt if there is none, or a remote object held over its path. Placed\n\t * here, the check is only against the type served here: not served (or of the other kind) or not at the caller's\n\t * version and fingerprint, the reference waits unbound, `failed { waiting }`, indexed under the type's name. Returns\n\t * the object it bound to; throws as `Destination.reference` does (a broken refusal).\n\t */\n\tbind(binding: Binding, Type: Contract, params: CheckedParams, context: Context): Target | undefined {\n\t\tconst { principal } = binding.caller;\n\t\tconst placed = this.#destination.reference(Type, params.params, principal, context);\n\t\tif (placed.kind === \"path\") {\n\t\t\tconst { caller, dependent } = binding;\n\t\t\tconst remote = new RemoteObject(\n\t\t\t\tthis,\n\t\t\t\tType,\n\t\t\t\tparams,\n\t\t\t\tplaced.address,\n\t\t\t\tcaller,\n\t\t\t\tplaced.path,\n\t\t\t\tdependent,\n\t\t\t\tcontext.telemetry,\n\t\t\t);\n\t\t\tplaced.path.attach(remote);\n\t\t\tbinding.bind(remote);\n\t\t\treturn remote;\n\t\t}\n\t\tconst served = this.#types.get(Type.name);\n\t\tconst unbound =\n\t\t\tunboundCause(served, Type.kind, Type.name, Type.version, Type.fingerprint) ??\n\t\t\tthis.#misplaced(Type, served!, params.params);\n\t\tif (unbound !== undefined) {\n\t\t\t// Old work never waits for a code update (rule 2): a version the new code dropped binds the object while its\n\t\t\t// open old attempt still serves it, and fails at once otherwise.\n\t\t\tif (unbound.error.code === \"contract_mismatch\" && this.oldWork.of(context)) {\n\t\t\t\tconst object = this.#objects.get(this.#identity(served!, params, principal, context));\n\t\t\t\tif (object === undefined || !object.oldServes(Type.version, Type.fingerprint)) throw unbound.error;\n\t\t\t\tbinding.bind(object);\n\t\t\t\treturn object;\n\t\t\t}\n\t\t\tthis.#wait(binding, Type.name, unbound, () => this.#place(binding, Type, params, context));\n\t\t\treturn undefined;\n\t\t}\n\t\t// An anonymous scope (an HTTP request nobody authenticated) is no principal a remote type's factory can serve\n\t\t// (Opus's build review F5): refused, never bound as the host.\n\t\tif (served!.kind !== \"local\" && principal === undefined) {\n\t\t\tthrow new ChordError({\n\t\t\t\tcode: \"forbidden\",\n\t\t\t\tmessage: `${Type.name}: an anonymous caller gets no remote object`,\n\t\t\t});\n\t\t}\n\t\t// Checked above: served here at the caller's version.\n\t\tconst object = this.#object(served!, params, principal, context.telemetry, context, NO_CHAIN, binding.dependent);\n\t\tbinding.bind(object);\n\t\t// A getter waiting for a shared activation links to it (decision \"Shared work\").\n\t\tconst activation = object.activationSpan;\n\t\tif (activation !== undefined && !untraced(context.telemetry)) context.telemetry.addLink({ context: activation });\n\t\treturn object;\n\t}\n\n\t/** Where a hold arriving on `link` goes (`Destination.hold`: by the address it names); `released` once the host closed. */\n\tplace(request: HoldRequest, link: HostLink, caller: Caller, context: Context): Placed {\n\t\tthis.#assertOpen();\n\t\treturn this.#destination.hold(request, link, caller.principal, context);\n\t}\n\n\t/**\n\t * What a hold placed here binds to, acting as `principal`: the object, or why it waits unbound (`failed\n\t * { waiting }`): a remote type not served here (`not_served`), not at the hold's version and fingerprint, or whose\n\t * params put it on another host (code skew: `version`). Throws for a broken refusal: invalid params, an activation\n\t * the hold's chain waits for (`invalid/cycle`, Q5). A new object keeps the hold's chain.\n\t */\n\tserving(request: HoldRequest, params: unknown, principal: Principal, context: Context): Serving {\n\t\tconst { type, version, fingerprint, chain = NO_CHAIN } = request;\n\t\tconst served = this.#types.get(type);\n\t\tconst unbound = unboundCause(served, \"remote\", type, version, fingerprint);\n\t\tif (unbound !== undefined) return { kind: \"waiting\", cause: unbound };\n\t\t// Checked above: a remote type served here.\n\t\tconst remote = served as Extract<Served, { readonly kind: \"remote\" }>;\n\t\tconst checked = checkParams(remote.contract, params, context);\n\t\tconst misplaced = this.#destination.misplaced(remote.contract, checked.params);\n\t\tif (misplaced !== undefined) return { kind: \"waiting\", cause: { kind: \"waiting\", error: misplaced } };\n\t\t// The hold's carrier with this host's adapter: the first trigger of an object it creates.\n\t\tconst trigger = parentOf(request.trace, this.telemetry);\n\t\tconst object = this.#object(remote, checked, principal, trigger, context, chain);\n\t\tconst activation = object.activationId;\n\t\tif (activation !== undefined && chain.includes(activation)) throw this.cycle(chain, activation, [object.label]);\n\t\treturn { kind: \"object\", object };\n\t}\n\n\t/**\n\t * The path a remote reference of `Type` with `params` acting as `principal` goes over now: `ref.retry()` places a\n\t * reference failed for a part past the limits anew (a route may have forgotten its old path). Throws as\n\t * `Destination.reference` does, and `unavailable` for a type placed here now.\n\t */\n\tpathOf(Type: Contract, params: ParamsOf<Contract>, principal: Principal | undefined): Path {\n\t\t// A retry has no context of its own: its admission checks count on none.\n\t\tconst placed = this.#destination.reference(Type, params, principal, BACKGROUND_CONTEXT);\n\t\tif (placed.kind === \"path\") return placed.path;\n\t\tthrow new ChordError({ code: \"unavailable\", message: `${Type.name} is placed here now` });\n\t}\n\n\t/**\n\t * The `invalid/cycle` error of a cycle through `chain` (Q5): its entries from the activation `id` on, by label\n\t * where the object is on this host (\"…\" for other hosts'), then `closing`.\n\t */\n\tcycle(chain: readonly string[], id: string, closing: readonly string[]): ChordError {\n\t\tconst labels = new Map([...this.#objects.values()].map((each) => [each.activationId, each.label]));\n\t\tconst cycle = chain.slice(chain.indexOf(id)).map((entry) => labels.get(entry) ?? \"…\");\n\t\treturn invalid(\"cycle\", `dependency cycle: ${[...cycle, ...closing].join(\" → \")}`);\n\t}\n\n\t/** A new origin number for `side`, which relays holds upstream; registered in `relays` until it closes. */\n\trelayOrigin(side: ProviderSide): number {\n\t\tconst origin = this.#nextOrigin++;\n\t\tthis.relays.set(origin, side);\n\t\treturn origin;\n\t}\n\n\t/**\n\t * A route's link, its work under the route's `context`: registered with the host and its heartbeat; one closed\n\t * already is returned closed.\n\t */\n\trouteLink(link: Link, options: LinkOptions<Principal>, context: Context): HostLink {\n\t\treturn this.#link(link, \"route\", options, context);\n\t}\n\n\t/** A link completed its handshake: a route's address resolves again once if it drops. */\n\tlinkOpened(link: HostLink): void {\n\t\tif (link.role !== \"route\") return;\n\t\tfor (const route of this.#routes.values()) route.opened(link);\n\t}\n\n\t/**\n\t * Forgets a link once it closed: the origins relaying to it, then the parent's path or its route's address are\n\t * told; the heartbeat may stop.\n\t */\n\tunlink(link: HostLink): void {\n\t\tthis.#links.delete(link);\n\t\tfor (const relay of this.relays.values()) relay.unlinked(link);\n\t\tif (this.#links.size === 0) {\n\t\t\tclearInterval(this.#ticking);\n\t\t\tthis.#ticking = undefined;\n\t\t}\n\t\tif (link.role === \"parent\") this.#parent.disconnected(link);\n\t\tif (link.role === \"route\") for (const route of this.#routes.values()) if (route.closed(link)) break;\n\t}\n\n\t/** Moves `object` behind every object that went live before it (close ends in reverse); its backoff is over. */\n\twentLive(object: ChordObject): void {\n\t\tthis.#objects.delete(object.identity);\n\t\tthis.#objects.set(object.identity, object);\n\t\tthis.backoff.delete(object.identity);\n\t}\n\n\t/** Drops an ended object (once, before a next instance of its identity exists). */\n\tforget(object: ChordObject): void {\n\t\tthis.#objects.delete(object.identity);\n\t\tthis.backoff.ended(object.identity);\n\t}\n\n\t/** Records a teardown for `identity`: its next attempt waits for it and for every earlier one still running. */\n\tending(identity: string, teardown: Promise<void>): void {\n\t\tconst previous = this.#endings.get(identity);\n\t\tconst ending = previous === undefined ? teardown : Promise.all([previous, teardown]).then(() => {});\n\t\tthis.#endings.set(identity, ending);\n\t\tvoid ending.then(() => {\n\t\t\tif (this.#endings.get(identity) === ending) this.#endings.delete(identity);\n\t\t});\n\t}\n\n\t/** What the next attempt for `identity` waits for: its previous instances' teardowns, if any still run. */\n\tendingOf(identity: string): Promise<void> | undefined {\n\t\treturn this.#endings.get(identity);\n\t}\n\n\t/**\n\t * A reference to `Type` made by `caller` for `host.hold` and getters: params checked at once (`invalid/params`,\n\t * also before `load`), then placed (`#place`); before the host's publication it waits in the unbound index,\n\t * `loading`, and the publication places it.\n\t */\n\t#hold(Type: Contract, params: unknown, caller: Caller, context: Context, options: GetOptions): Binding {\n\t\tthis.#assertOpen();\n\t\tthis.#assertLoadCalled(Type.name);\n\t\tconst checked = checkParams(Type, params, context);\n\t\tconst binding = this.#binding(Type, undefined, caller, options);\n\t\tconst place = (): void => this.#place(binding, Type, checked, context);\n\t\tif (this.#published) place();\n\t\telse this.#wait(binding, Type.name, undefined, place);\n\t\treturn binding;\n\t}\n\n\t/**\n\t * Places a reference (`bind`); where it cannot go (a `hostAddress` or `authorize` that throws or refuses) fails it\n\t * broken, until `ref.retry()` places it again. One woken after the host closed ends as the close ended the others.\n\t */\n\t#place(binding: Binding, Type: Contract, checked: CheckedParams, context: Context): void {\n\t\tif (this.#state === \"closed\") {\n\t\t\tbinding.end(this.#closedError());\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tthis.bind(binding, Type, checked, context);\n\t\t} catch (error) {\n\t\t\tconst again = (): void => this.#place(binding, Type, checked, context);\n\t\t\tbinding.refuse({ kind: \"broken\", error: asChordError(error, Type.name) }, again);\n\t\t}\n\t}\n\n\t/**\n\t * The provider's own host-address check of a remote `Type` placed here by the consumer's contract, against the one\n\t * served (`invalid/host_address`, `waiting`: code skew); none when both have the same `hostAddress` (the consumer\n\t * computed it with the provider's function) or the type is local. A provider's `hostAddress` that throws throws.\n\t */\n\t#misplaced(Type: Contract, served: Served, params: ParamsOf<Contract>): FailureCause | undefined {\n\t\tif (served.kind !== \"remote\" || contractData(Type).hostAddress === contractData(served.contract).hostAddress) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst error = this.#destination.misplaced(served.contract, params);\n\t\treturn error === undefined ? undefined : { kind: \"waiting\", error };\n\t}\n\n\t/** Leaves `binding` unbound in the index under `name`: `cause` (`waiting`), or none before the publication. */\n\t#wait(binding: Binding, name: string, cause: FailureCause | undefined, place: () => void): void {\n\t\tbinding.wait(cause, place, () => this.#unbound.delete(name, binding));\n\t\tthis.#unbound.add(name, binding, cause);\n\t}\n\n\t/** A new reference's binding made by `caller`; its parked calls wait its `readyTimeout`. */\n\t#binding(Type: Contract, dependent: ChordObject | undefined, caller: Caller, options: GetOptions): Binding {\n\t\treturn new Binding(Type, this.batch, dependent, caller, options.readyTimeout ?? this.timeouts.ready);\n\t}\n\n\t/** This host as the maker of its own references: its principal and incarnation. */\n\t#own(): Caller {\n\t\treturn { principal: this.principal, incarnation: this.incarnation };\n\t}\n\n\t/** Whether `principal` is this host's own (by principal key): revocation never touches it. */\n\t#isOwn(principal: Principal, context: Context): boolean {\n\t\tconst own = this.principal;\n\t\tif (own === undefined) return false;\n\t\t// Principals on this host are `P`s: its own, and the ones its links stamp.\n\t\treturn (\n\t\t\tprincipalKey(own, context, this.#principalKey) === principalKey(principal as P, context, this.#principalKey)\n\t\t);\n\t}\n\n\t/**\n\t * `context` for work this host does under it (a link's, a root scope's): one without a span carries this host's\n\t * adapter's metrics (`countingOnly`), so the cost counters of that work reach the adapter (review L6).\n\t */\n\t#counted(context: Context): Context {\n\t\tconst counting = this.#counting;\n\t\tif (counting === undefined || context.telemetry !== NOOP_TELEMETRY_CONTEXT) return context;\n\t\treturn withTelemetry(counting, context);\n\t}\n\n\t/** A new link of `role`, registered with the heartbeat while open. */\n\t#link(link: Link, role: LinkRole, options: LinkOptions<Principal>, context: Context): HostLink {\n\t\tconst { principal, trusted = false, codec = binaryCodec } = options;\n\t\tconst limits = linkLimits(trusted, options.limits);\n\t\tconst made = new HostLink(\n\t\t\tthis,\n\t\t\tlink,\n\t\t\t{ role, principal, trusted, codec, limits },\n\t\t\tthis.#counted(withoutAbortSignal(context)),\n\t\t);\n\t\tif (!made.open) return made;\n\t\tthis.#links.add(made);\n\t\tif (this.#ticking === undefined) {\n\t\t\tconst { ping, close } = this.#heartbeat;\n\t\t\tconst every = Math.min(ping, close) / 10;\n\t\t\tlet last = Date.now();\n\t\t\tthis.#ticking = setInterval(() => {\n\t\t\t\tconst now = Date.now();\n\t\t\t\t// A tick a whole interval late is time this process did not run (a sleeping laptop, a blocked event loop).\n\t\t\t\tconst late = now - last - every;\n\t\t\t\tconst paused = late >= every ? late : 0;\n\t\t\t\tlast = now;\n\t\t\t\tfor (const each of [...this.#links]) each.tick(now, paused, ping, close);\n\t\t\t}, every);\n\t\t}\n\t\treturn made;\n\t}\n\n\t/** The identity of `served`'s object for `params` and `principal` (a remote type's includes its principal key). */\n\t#identity(served: Served, params: CheckedParams, principal: Principal | undefined, context: Context): string {\n\t\tif (served.kind === \"local\") return identityKey(served.contract, params.key);\n\t\t// A host serving remote types has a principal, which its references act as unless a link stamped its own (only\n\t\t// `P`s).\n\t\treturn identityKey(served.contract, params.key, principalKey(principal as P, context, this.#principalKey));\n\t}\n\n\t/**\n\t * The object for `params` (checked by L1) and, for a remote type, `principal` (its key is part of the identity),\n\t * created if there is none; its first attempt starts at once, or when its identity's backoff window ends. A new one\n\t * keeps the activation chain it is created for (Q5): `chain` (a hold's), or that of `dependent`'s activation when\n\t * an activation declared it, so its own holds over links carry that chain on. A new one's first activation span\n\t * links to `trigger` (decision \"Shared work\").\n\t */\n\t#object(\n\t\tserved: Served,\n\t\tparams: CheckedParams,\n\t\tprincipal: Principal | undefined,\n\t\ttrigger: TelemetryContext,\n\t\tcontext: Context,\n\t\tchain: readonly string[] = NO_CHAIN,\n\t\tdependent?: ChordObject,\n\t): ChordObject {\n\t\tconst { params: checked, key } = params;\n\t\tconst identity = this.#identity(served, params, principal, context);\n\t\tlet object = this.#objects.get(identity);\n\t\tif (object === undefined) {\n\t\t\t// Shared by every getter: one getter's cancellation does not cancel it.\n\t\t\tconst owner = served.kind === \"local\" ? undefined : principal;\n\t\t\tconst created = dependent?.activationChain() ?? chain;\n\t\t\tobject = new ChordObject(\n\t\t\t\tthis,\n\t\t\t\tserved,\n\t\t\t\tchecked,\n\t\t\t\towner,\n\t\t\t\tkey,\n\t\t\t\tidentity,\n\t\t\t\ttrigger,\n\t\t\t\twithoutAbortSignal(context),\n\t\t\t\tcreated,\n\t\t\t);\n\t\t\tthis.#objects.set(identity, object);\n\t\t\tif (!this.backoff.waiting(identity)) object.attempt();\n\t\t}\n\t\treturn object;\n\t}\n\n\t/**\n\t * Closes the links, then ends every object at once and tears them down one by one, the last to go live first, after\n\t * the endings already running.\n\t */\n\tasync #close(): Promise<void> {\n\t\tthis.#state = \"closed\";\n\t\tthis.#routing.abort(this.#closedError());\n\t\t// Links first, children, routes, then the parent: no `gone` goes out for the objects ending below.\n\t\tconst links = [...this.#links];\n\t\tfor (const role of [\"child\", \"route\", \"parent\"]) for (const link of links) if (link.role === role) link.close();\n\t\t// Remote references end now: their parked calls reject `released`, no later link holds them.\n\t\tconst closed = this.#closedError();\n\t\t// Code outside objects stops at its next use of Chord: an `fn` waiting in `sleep(ms, ctx)` ends.\n\t\tthis.#roots.close(closed);\n\t\tfor (const holder of this.#pathHolders()) if (holder.kind === \"remote\") holder.lost(closed);\n\t\t// At the fence too: requests still waiting for a publication or a provider end as the others did, and gets\n\t\t// waiting for a publication that will not come fail now, not after the slow closes below (fix round 1).\n\t\tthis.#unbound.close(closed);\n\t\tthis.#clock.close();\n\t\tthis.#publication.resolve();\n\t\tthis.backoff.clear();\n\t\t// Every object is sealed before any teardown releases a reference, so none ends in the background.\n\t\tconst teardowns = [...this.#objects.values()].reverse().map((object) => object.stop());\n\t\tawait Promise.all(this.#endings.values());\n\t\tconst failures: CloseFailed[] = [];\n\t\tfor (const tearDown of teardowns) failures.push(...(await tearDown()));\n\t\tthis.#types.clear();\n\t\t// Their facets keep their factories' closures (which may keep objects' handles).\n\t\tthis.#plugins.clear();\n\t\tfor (const record of this.#registries.values()) record.close();\n\t\tthis.#registries.clear();\n\t\tthis.store?.detach();\n\t\tif (failures.length > 0) {\n\t\t\tconst message = `host.close: ${failures.length} native close(s) threw`;\n\t\t\tthrow new AggregateError(\n\t\t\t\tfailures.map(({ error }) => error),\n\t\t\t\tmessage,\n\t\t\t);\n\t\t}\n\t}\n\n\t/** Every holder of the parent path, the unplaced one and every route's paths: this host's requests over links. */\n\t#pathHolders(): Upstream[] {\n\t\tconst routed = [...this.#routes.values()].flatMap((route) => route.holders());\n\t\treturn [...this.#parent.holders(), ...this.unplaced.holders(), ...routed];\n\t}\n\n\t/** The store stopped after a backend error (it tells the host once): reported, and the host closes. */\n\t#storageFailed(error: unknown): void {\n\t\tthis.report({ kind: \"storage_failed\", error });\n\t\tthis.#closing ??= this.#close();\n\t\t// The app's own `close` returns this closing and gets its failures.\n\t\tthis.#closing.catch(() => {});\n\t}\n\n\t/** A backoff window ended: the identity's object is retried; without one the entry goes. */\n\t#due(identity: string): void {\n\t\tconst object = this.#objects.get(identity);\n\t\tif (object === undefined) this.backoff.delete(identity);\n\t\telse object.attempt();\n\t}\n\n\t/**\n\t * Publishes the staged plugins of `facets` (by name), inside the publication's batch: the registries they serve\n\t * served, their facet contributions entered into the tables (the types are the staged table's, set by the caller).\n\t */\n\t#publish(staged: Staged, facets: ReadonlyMap<string, Facet<P>>): void {\n\t\tfor (const [name, facet] of facets) {\n\t\t\tconst plugin = staged.plugins.get(name)!;\n\t\t\tfor (const [registry, { registry: token, provider }] of plugin.registries) {\n\t\t\t\tthis.registryRecord(registry).serve(token.version, provider);\n\t\t\t}\n\t\t\tconst contributions = plugin.contributions.map(({ registry, value }) =>\n\t\t\t\tcontributionOf(\n\t\t\t\t\tthis.registryRecord(registry.name),\n\t\t\t\t\t{ plugin: name, type: undefined },\n\t\t\t\t\tregistry.version,\n\t\t\t\t\tvalue,\n\t\t\t\t),\n\t\t\t);\n\t\t\tfor (const contribution of contributions) contribution.record.add(contribution);\n\t\t\tthis.#plugins.set(name, { facet, staged: plugin, contributions });\n\t\t}\n\t}\n\n\t#assertOpen(): void {\n\t\tif (this.#state === \"closed\") throw this.#closedError();\n\t}\n\n\t/**\n\t * A request of this host's own (`get`, `hold`, `registry`, a root's `ctx.get`) for `name` before its first `load`\n\t * would wait for a publication nobody started: it throws `not_ready` at once (decision \"Mistakes that wait are\n\t * reported at once\" (a)). Holds arriving on its links before `load` still wait for the publication (a worker\n\t * connects first, W6).\n\t */\n\t#assertLoadCalled(name: string): void {\n\t\tif (this.#state !== \"new\") return;\n\t\tconst fix = \"call host.load first (a host with nothing to load calls load([]))\";\n\t\tthrow new ChordError({ code: \"not_ready\", message: `${name}: the host has not loaded; ${fix}` });\n\t}\n\n\t/**\n\t * At each publication (`load`'s, a reload's commit), after its batch: every registry with contributions and no\n\t * provider here is reported `registry_undeclared`, naming its contributors; again only once they change.\n\t */\n\t#reportUndeclared(): void {\n\t\tfor (const record of this.#registries.values()) record.reportUndeclared();\n\t}\n\n\t#closedError(): ChordError {\n\t\treturn new ChordError({ code: \"released\", reason: \"closed\", message: \"the host is closed\" });\n\t}\n}\n\n/**\n * Why a reference to a type of `kind` at `version` and `fingerprint`, placed here, cannot bind to `served` (the type of\n * that name served here): not served, or as the other kind (`unavailable`); another version or fingerprint\n * (`contract_mismatch`); `undefined` when it binds. Both wait for a publication: `failed { waiting }`.\n */\nfunction unboundCause(\n\tserved: Served | undefined,\n\tkind: Contract[\"kind\"],\n\tname: string,\n\tversion: number,\n\tfingerprint: string,\n): FailureCause | undefined {\n\tif (served === undefined || served.kind !== kind) {\n\t\treturn { kind: \"waiting\", error: new ChordError({ code: \"unavailable\", message: `${name} is not served here` }) };\n\t}\n\tconst { contract } = served;\n\tif (binds(served.provider, version, fingerprint)) return undefined;\n\tconst message = `${name} v${version} does not match the served v${contract.version}`;\n\treturn { kind: \"waiting\", error: new ChordError({ code: \"contract_mismatch\", message }) };\n}\n\n/**\n * Waits until `usable()` (a registry value's check, which records its last error) holds, checked at every change the\n * value tells its waiters of (after the batch that made it); rejects when `context` aborts or the value closes. It\n * waits on the value only while it runs.\n */\nasync function untilUsable(value: RegistryValueSource, usable: () => boolean, context: Context): Promise<void> {\n\tlet changed = Promise.withResolvers<void>();\n\tconst release = value.wait({\n\t\tdependencyMoved: () => queueMicrotask(() => changed.resolve()),\n\t\t// The value closed with its host: the wait ends with the close's error.\n\t\tclosed: (error) => changed.reject(error),\n\t});\n\ttry {\n\t\twhile (!usable()) {\n\t\t\tawait awaitWithContext(changed.promise, context);\n\t\t\tchanged = Promise.withResolvers<void>();\n\t\t}\n\t} finally {\n\t\trelease();\n\t}\n}\n\n/** The `aborted` error of a reload whose context aborted before its commit: nothing changed. */\nfunction reloadAborted(): ChordError {\n\treturn new ChordError({ code: \"aborted\", message: \"reload: aborted\" });\n}\n\n/** The error of a plugin name given twice: the second is refused. */\nfunction loadedTwice(name: string): Error {\n\treturn new Error(`plugin \"${name}\" is loaded twice`);\n}\n\n/** Whether registry provider `served` serves readers of `version`: its own, or an older one its `accepts` maps back. */\nfunction registryServes(served: StagedRegistry, version: number): boolean {\n\tconst provided = served.registry.version;\n\treturn provided === version || (provided > version && served.provider.accepts?.[version]?.value !== undefined);\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type { ActivityCounts } from "./activity.ts";
|
|
2
|
+
export type { Factory, Self, StoreSelf } from "./attempt.ts";
|
|
3
|
+
export type { Ctx } from "./ctx.ts";
|
|
4
|
+
export { defineFacet, type Facet, type FacetHost, type FacetSelf, type ServeOptions } from "./facet.ts";
|
|
5
|
+
export type { FollowAttach, FollowAttachment, FollowObserver } from "./follow.ts";
|
|
6
|
+
export { type CommittedReload, createHost, type GetOptions, type Host, type HostError, type HostOptions, type LinkOptions, type LoadReport, type PluginFailure, type Position, type PrincipalAttributes, type ReloadedObject, type ReloadOptions, type ReloadReport, } from "./host.ts";
|
|
7
|
+
export type { Native, NativeCloseReason, NativeOptions } from "./native.ts";
|
|
8
|
+
export type { Presence } from "./presence.ts";
|
|
9
|
+
export type { RefState } from "./ref-state.ts";
|
|
10
|
+
export type { Held, Reference, RefIn } from "./reference.ts";
|
|
11
|
+
export type { RevokedBy } from "./revocation.ts";
|
|
12
|
+
export type { RootOptions } from "./root.ts";
|
|
13
|
+
export type { RouteHandle, RouteOptions } from "./route.ts";
|
|
14
|
+
export type { OnHandler, OnLiveHandler, OnNativeHandler, RoutineDeclarations } from "./routines.ts";
|
|
15
|
+
export { sleep, untilAborted } from "./sleep.ts";
|
|
16
|
+
export type { PluginFacet } from "./staging.ts";
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/host/index.ts"],"names":[],"mappings":"AAGA,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD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|
1
|
+
// Hosts for apps: creating a host, facets, factories, natives, references and the ctx of method handlers, routines and
|
|
2
|
+
// their waiting helpers, revocation, presence and keep-alive counts, root scopes.
|
|
3
|
+
export { defineFacet } from "./facet.js";
|
|
4
|
+
export { createHost, } from "./host.js";
|
|
5
|
+
export { sleep, untilAborted } from "./sleep.js";
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/host/index.ts"],"names":[],"mappings":"AAAA,uHAAuH;AACvH,kFAAkF;AAKlF,OAAO,EAAE,WAAW,EAAiE,MAAM,YAAY,CAAC;AAExG,OAAO,EAEN,UAAU,GAaV,MAAM,WAAW,CAAC;AASnB,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC","sourcesContent":["// Hosts for apps: creating a host, facets, factories, natives, references and the ctx of method handlers, routines and\n// their waiting helpers, revocation, presence and keep-alive counts, root scopes.\n\nexport type { ActivityCounts } from \"./activity.ts\";\nexport type { Factory, Self, StoreSelf } from \"./attempt.ts\";\nexport type { Ctx } from \"./ctx.ts\";\nexport { defineFacet, type Facet, type FacetHost, type FacetSelf, type ServeOptions } from \"./facet.ts\";\nexport type { FollowAttach, FollowAttachment, FollowObserver } from \"./follow.ts\";\nexport {\n\ttype CommittedReload,\n\tcreateHost,\n\ttype GetOptions,\n\ttype Host,\n\ttype HostError,\n\ttype HostOptions,\n\ttype LinkOptions,\n\ttype LoadReport,\n\ttype PluginFailure,\n\ttype Position,\n\ttype PrincipalAttributes,\n\ttype ReloadedObject,\n\ttype ReloadOptions,\n\ttype ReloadReport,\n} from \"./host.ts\";\nexport type { Native, NativeCloseReason, NativeOptions } from \"./native.ts\";\nexport type { Presence } from \"./presence.ts\";\nexport type { RefState } from \"./ref-state.ts\";\nexport type { Held, Reference, RefIn } from \"./reference.ts\";\nexport type { RevokedBy } from \"./revocation.ts\";\nexport type { RootOptions } from \"./root.ts\";\nexport type { RouteHandle, RouteOptions } from \"./route.ts\";\nexport type { OnHandler, OnLiveHandler, OnNativeHandler, RoutineDeclarations } from \"./routines.ts\";\nexport { sleep, untilAborted } from \"./sleep.ts\";\nexport type { PluginFacet } from \"./staging.ts\";\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type { Attempt, PinnedKey } from "./attempt.ts";
|
|
2
|
+
export { nextDelay } from "./backoff.ts";
|
|
3
|
+
export { CallContext, type Caller, SpanCtx } from "./ctx.ts";
|
|
4
|
+
export type { AnyHost, ChordHost, Serving } from "./host.ts";
|
|
5
|
+
export type { ChordObject, Holder, Removal } from "./object.ts";
|
|
6
|
+
export { asRemoteOldWork } from "./old-work.ts";
|
|
7
|
+
export { LIVE, LOADING, type RefState } from "./ref-state.ts";
|
|
8
|
+
export { type Attachable, type Binding, type CheckedParams, type Followed, type RetryWalk, retryWalk, type Target, } from "./reference.ts";
|
|
9
|
+
export type { UnboundRequest } from "./unbound.ts";
|
|
10
|
+
export { uuidv7 } from "./uuid.ts";
|
|
11
|
+
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/host/internal.ts"],"names":[],"mappings":"AAGA,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,KAAK,MAAM,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAC7D,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7D,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EACN,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,SAAS,EACT,KAAK,MAAM,GACX,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Hosts for Chord's layers: what the remote sides of links use of a host, its objects and references (and old work
|
|
2
|
+
// arriving from another host); what jobs use of a handler's ctx, the backoff and ids.
|
|
3
|
+
export { nextDelay } from "./backoff.js";
|
|
4
|
+
export { CallContext, SpanCtx } from "./ctx.js";
|
|
5
|
+
export { asRemoteOldWork } from "./old-work.js";
|
|
6
|
+
export { LIVE, LOADING } from "./ref-state.js";
|
|
7
|
+
export { retryWalk, } from "./reference.js";
|
|
8
|
+
export { uuidv7 } from "./uuid.js";
|
|
9
|
+
//# sourceMappingURL=internal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../src/host/internal.ts"],"names":[],"mappings":"AAAA,mHAAmH;AACnH,sFAAsF;AAGtF,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAe,OAAO,EAAE,MAAM,UAAU,CAAC;AAG7D,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAiB,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAMN,SAAS,GAET,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC","sourcesContent":["// Hosts for Chord's layers: what the remote sides of links use of a host, its objects and references (and old work\n// arriving from another host); what jobs use of a handler's ctx, the backoff and ids.\n\nexport type { Attempt, PinnedKey } from \"./attempt.ts\";\nexport { nextDelay } from \"./backoff.ts\";\nexport { CallContext, type Caller, SpanCtx } from \"./ctx.ts\";\nexport type { AnyHost, ChordHost, Serving } from \"./host.ts\";\nexport type { ChordObject, Holder, Removal } from \"./object.ts\";\nexport { asRemoteOldWork } from \"./old-work.ts\";\nexport { LIVE, LOADING, type RefState } from \"./ref-state.ts\";\nexport {\n\ttype Attachable,\n\ttype Binding,\n\ttype CheckedParams,\n\ttype Followed,\n\ttype RetryWalk,\n\tretryWalk,\n\ttype Target,\n} from \"./reference.ts\";\nexport type { UnboundRequest } from \"./unbound.ts\";\nexport { uuidv7 } from \"./uuid.ts\";\n"]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Context } from "../context/index.ts";
|
|
2
|
+
import type { Contract } from "../contracts/index.ts";
|
|
3
|
+
import type { KeyedSlot } from "../documents/internal.ts";
|
|
4
|
+
import { type Contributor, RegistryContribution, type RegistryRecord } from "../registries/internal.ts";
|
|
5
|
+
import { type Derive, type DeriveSource } from "../state/internal.ts";
|
|
6
|
+
import { type Binding } from "./reference.ts";
|
|
7
|
+
/** A checked implementation, as Chord calls and follows it. */
|
|
8
|
+
export type Members = {
|
|
9
|
+
/** The methods, each called with its arguments (`null` for none) and a context. */
|
|
10
|
+
readonly methods: ReadonlyMap<string, Method>;
|
|
11
|
+
/** The state members, resolved to what Chord follows. */
|
|
12
|
+
readonly state: ReadonlyMap<string, DeriveSource>;
|
|
13
|
+
/** The keyed members (slice 6a §12): the object's own slot, or the provider's member it re-exposes. */
|
|
14
|
+
readonly keyed: ReadonlyMap<string, KeyedBinding>;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* What a keyed member is: a keyed document handle's slot (`own`), or another object's keyed member re-exposed through
|
|
18
|
+
* a reference (`reexposed`), which reads end at the ultimate provider's slot (rule 22) and pinned keys follow.
|
|
19
|
+
*/
|
|
20
|
+
export type KeyedBinding = {
|
|
21
|
+
readonly kind: "own";
|
|
22
|
+
readonly slot: KeyedSlot;
|
|
23
|
+
} | {
|
|
24
|
+
readonly kind: "reexposed";
|
|
25
|
+
readonly binding: Binding;
|
|
26
|
+
readonly member: string;
|
|
27
|
+
};
|
|
28
|
+
/** A method as Chord calls it. */
|
|
29
|
+
export type Method = (args: unknown, context: Context) => Promise<unknown>;
|
|
30
|
+
/**
|
|
31
|
+
* Checks what a factory returned (plugin code): a local contract's members, or a remote contract's `{ variant,
|
|
32
|
+
* members }` naming one of its current variants. Errors name the variant or member (the failure cause adds the
|
|
33
|
+
* object).
|
|
34
|
+
*/
|
|
35
|
+
export declare function checkImplementation(contract: Contract, implementation: unknown): {
|
|
36
|
+
readonly variant: string | undefined;
|
|
37
|
+
readonly members: Members;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Resolves every derive's sources; errors name a derive by the member exposing it, else by its position. `report`
|
|
41
|
+
* makes each derive's failure report, with the member exposing it when there is one (`derive_failed`).
|
|
42
|
+
*/
|
|
43
|
+
export declare function attachDerives(derives: readonly Derive[], state: ReadonlyMap<string, DeriveSource>, report: (member: string | undefined) => (error: unknown) => void): void;
|
|
44
|
+
/**
|
|
45
|
+
* A contribution of `contributor` at `version` to `record`, as Chord follows it: a Chord watchable (a source, a
|
|
46
|
+
* constant, a document handle, a reference member, a native source: another registry's value too) is followed,
|
|
47
|
+
* anything else is a plain value, whatever methods it has (registries carry natives).
|
|
48
|
+
*/
|
|
49
|
+
export declare function contributionOf(record: RegistryRecord, contributor: Contributor, version: number, value: unknown): RegistryContribution;
|
|
50
|
+
//# sourceMappingURL=members.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"members.d.ts","sourceRoot":"","sources":["../../src/host/members.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,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EAAE,SAAS,MAAM,EAAE,EAC1B,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC,EACxC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,KAAK,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAC9D,IAAI,CAYN;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC7B,MAAM,EAAE,cAAc,EACtB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,OAAO,GACZ,oBAAoB,CAEtB"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// The member check (Q14): an implementation is one variant with exactly that variant's members, methods being
|
|
2
|
+
// functions and state members JSON watchables; and the resolution of what Chord follows behind every derive's declared
|
|
3
|
+
// sources (JSON and native) and every contribution to a registry (slice 8).
|
|
4
|
+
//
|
|
5
|
+
// The rule for watches across attempts (decision "References are the only indirection"): consumers' watches and
|
|
6
|
+
// derives over another object's member follow it through their reference's member (`reference-source.ts`) and keys
|
|
7
|
+
// (`reference-keys.ts`), passed straight through to the instance's own document or derive. While the object points at
|
|
8
|
+
// nothing they keep their last values (one `failed` call for a failure); when a new instance goes live they move by
|
|
9
|
+
// name to its member (a key pinned there again), whether a document or a derive: one frame from the last value, and
|
|
10
|
+
// every derive downstream recovers (decision "self healing"). A re-exposed member is the re-exposing object's
|
|
11
|
+
// reference member: it holds with that object, its provider's source goes on. Holds over a link follow the live
|
|
12
|
+
// instance's members and take a snapshot at each binding.
|
|
13
|
+
import { currentVariants, LOCAL, takesNoArgs } from "../contracts/internal.js";
|
|
14
|
+
import { RegistryContribution, } from "../registries/internal.js";
|
|
15
|
+
import { NativeSource } from "../state/internal.js";
|
|
16
|
+
import { resolveKeyed, resolveWatchable } from "./reference.js";
|
|
17
|
+
/**
|
|
18
|
+
* Checks what a factory returned (plugin code): a local contract's members, or a remote contract's `{ variant,
|
|
19
|
+
* members }` naming one of its current variants. Errors name the variant or member (the failure cause adds the
|
|
20
|
+
* object).
|
|
21
|
+
*/
|
|
22
|
+
export function checkImplementation(contract, implementation) {
|
|
23
|
+
const variants = currentVariants(contract);
|
|
24
|
+
if (contract.kind === "local") {
|
|
25
|
+
// The member check establishes the shape.
|
|
26
|
+
return { variant: undefined, members: checkMembers(variants.get(LOCAL), implementation) };
|
|
27
|
+
}
|
|
28
|
+
// Plugin code: a remote factory returns `{ variant, members }`, which the checks below establish.
|
|
29
|
+
const { variant, members } = implementation;
|
|
30
|
+
const data = variants.get(variant);
|
|
31
|
+
if (data === undefined)
|
|
32
|
+
throw new Error(`variant ${JSON.stringify(variant)}: not a variant of ${contract.name}`);
|
|
33
|
+
return { variant, members: checkMembers(data, members) };
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Checks members against a variant's (exactly its members, methods being functions, state members JSON watchables and
|
|
37
|
+
* keyed members keyed document handles); a method without arguments is called with the context alone.
|
|
38
|
+
*/
|
|
39
|
+
function checkMembers({ state, methods, keyed }, implementation) {
|
|
40
|
+
for (const member of Object.keys(implementation)) {
|
|
41
|
+
if (!state.has(member) && !methods.has(member) && !keyed.has(member))
|
|
42
|
+
throw new Error(`${member}: not a member`);
|
|
43
|
+
}
|
|
44
|
+
// Own properties only: an inherited `toString` is no implementation of a member named so.
|
|
45
|
+
const own = (member) => Object.hasOwn(implementation, member) ? implementation[member] : undefined;
|
|
46
|
+
const checked = {
|
|
47
|
+
methods: new Map(),
|
|
48
|
+
state: new Map(),
|
|
49
|
+
keyed: new Map(),
|
|
50
|
+
};
|
|
51
|
+
for (const [member, data] of methods) {
|
|
52
|
+
const method = own(member);
|
|
53
|
+
if (typeof method !== "function")
|
|
54
|
+
throw new Error(`${member}: a method is a function`);
|
|
55
|
+
const call = takesNoArgs(data)
|
|
56
|
+
? (_args, context) => method(context)
|
|
57
|
+
: (args, context) => method(args, context);
|
|
58
|
+
checked.methods.set(member, call);
|
|
59
|
+
}
|
|
60
|
+
for (const member of state.keys()) {
|
|
61
|
+
const source = resolveWatchable(own(member));
|
|
62
|
+
if (source === undefined)
|
|
63
|
+
throw new Error(`${member}: a state member is a JSON watchable`);
|
|
64
|
+
checked.state.set(member, source);
|
|
65
|
+
}
|
|
66
|
+
for (const member of keyed.keys()) {
|
|
67
|
+
const resolved = resolveKeyed(own(member));
|
|
68
|
+
if (resolved === undefined)
|
|
69
|
+
throw new Error(`${member}: a keyed member is a keyed document handle`);
|
|
70
|
+
checked.keyed.set(member, resolved);
|
|
71
|
+
}
|
|
72
|
+
return checked;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Resolves every derive's sources; errors name a derive by the member exposing it, else by its position. `report`
|
|
76
|
+
* makes each derive's failure report, with the member exposing it when there is one (`derive_failed`).
|
|
77
|
+
*/
|
|
78
|
+
export function attachDerives(derives, state, report) {
|
|
79
|
+
const exposed = new Map([...state].map(([member, source]) => [source, member]));
|
|
80
|
+
derives.forEach((derive, position) => {
|
|
81
|
+
const member = exposed.get(derive);
|
|
82
|
+
const name = member ?? `derive #${position + 1}`;
|
|
83
|
+
const resolve = (source, index) => {
|
|
84
|
+
const resolved = resolveWatchable(source) ?? (source instanceof NativeSource ? source : undefined);
|
|
85
|
+
if (resolved === undefined)
|
|
86
|
+
throw new Error(`${name}: source ${index} is not a Chord watchable`);
|
|
87
|
+
return resolved;
|
|
88
|
+
};
|
|
89
|
+
derive.attach(resolve, report(member));
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* A contribution of `contributor` at `version` to `record`, as Chord follows it: a Chord watchable (a source, a
|
|
94
|
+
* constant, a document handle, a reference member, a native source: another registry's value too) is followed,
|
|
95
|
+
* anything else is a plain value, whatever methods it has (registries carry natives).
|
|
96
|
+
*/
|
|
97
|
+
export function contributionOf(record, contributor, version, value) {
|
|
98
|
+
return new RegistryContribution(record, contributor, version, contentOf(value));
|
|
99
|
+
}
|
|
100
|
+
/** What Chord follows behind a contribution: its JSON or native source when it is a Chord watchable. */
|
|
101
|
+
function contentOf(value) {
|
|
102
|
+
if (value instanceof NativeSource)
|
|
103
|
+
return { kind: "native", source: value };
|
|
104
|
+
const source = resolveWatchable(value);
|
|
105
|
+
return source === undefined ? { kind: "plain", value } : { kind: "json", source };
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=members.js.map
|