@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
package/dist/host/ctx.js
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
// The `ctx` a method handler gets (§8): its call's context, who called, the calling host's incarnation, call-scoped
|
|
2
|
+
// references and child spans (`ctx.trace`, slice 9), its node of the call chain (old work during a reload); and the
|
|
3
|
+
// abort signal of a call's context, linked to long-lived sources until it settles.
|
|
4
|
+
import { withAbortSignal, withoutAbortSignal, withTelemetry } from "../context/index.js";
|
|
5
|
+
import { ChordError } from "../data/index.js";
|
|
6
|
+
import { ended, untraced } from "../telemetry.js";
|
|
7
|
+
import { CALL_CHAIN } from "./old-work.js";
|
|
8
|
+
/**
|
|
9
|
+
* The ctx of one handler run (or root scope): its references are released by `settle` when it settled. A method
|
|
10
|
+
* call's ctx is its own node of the call chain (`on`: the attempt it runs on), so the chain costs no allocation.
|
|
11
|
+
*/
|
|
12
|
+
export class CallContext {
|
|
13
|
+
principal;
|
|
14
|
+
incarnation;
|
|
15
|
+
#context;
|
|
16
|
+
#host;
|
|
17
|
+
/** The attempt a method call runs on; `undefined` for a root scope, a routine or a job run (no chain node). */
|
|
18
|
+
#on;
|
|
19
|
+
/** The references taken with `get`; `undefined` once the handler settled. */
|
|
20
|
+
#references = [];
|
|
21
|
+
/** Aborted when the handler settles: a `get` still waiting gives up and releases its reference. By the first. */
|
|
22
|
+
#settling;
|
|
23
|
+
constructor(context, caller, host, on) {
|
|
24
|
+
this.#context = context;
|
|
25
|
+
this.principal = caller.principal;
|
|
26
|
+
this.incarnation = caller.incarnation;
|
|
27
|
+
this.#host = host;
|
|
28
|
+
this.#on = on;
|
|
29
|
+
}
|
|
30
|
+
get abortSignal() {
|
|
31
|
+
return this.#context.abortSignal;
|
|
32
|
+
}
|
|
33
|
+
get telemetry() {
|
|
34
|
+
return this.#context.telemetry;
|
|
35
|
+
}
|
|
36
|
+
value(key) {
|
|
37
|
+
// A method call's ctx is its chain node; the key's type is `CallNode`, which this is.
|
|
38
|
+
if (key.token === CALL_CHAIN.token && this.#on !== undefined)
|
|
39
|
+
return this;
|
|
40
|
+
return this.#context.value(key);
|
|
41
|
+
}
|
|
42
|
+
/** The attempt its handler runs on (only read through `CALL_CHAIN`, which a method call's ctx answers). */
|
|
43
|
+
get on() {
|
|
44
|
+
return this.#on;
|
|
45
|
+
}
|
|
46
|
+
/** The chain of the call that made this one. */
|
|
47
|
+
up() {
|
|
48
|
+
return this.#context.value(CALL_CHAIN);
|
|
49
|
+
}
|
|
50
|
+
toString() {
|
|
51
|
+
return `${this.#context}.Ctx`;
|
|
52
|
+
}
|
|
53
|
+
/** Its host's `chord.host`, for its child spans. */
|
|
54
|
+
get spanHost() {
|
|
55
|
+
return this.#host.spanHost;
|
|
56
|
+
}
|
|
57
|
+
async get(Type, params, options = {}) {
|
|
58
|
+
// A settled scope refuses `released` whatever aborted it; an aborted call creates nothing.
|
|
59
|
+
if (this.#references === undefined)
|
|
60
|
+
throw settled(Type);
|
|
61
|
+
this.#context.abortSignal?.throwIfAborted();
|
|
62
|
+
// Made for the caller: its principal and its origin's incarnation travel with the reference's holds.
|
|
63
|
+
const caller = { principal: this.principal, incarnation: this.incarnation };
|
|
64
|
+
this.#settling ??= new AbortController();
|
|
65
|
+
// Under this ctx itself: the getter belongs to the call's chain (old work during a reload).
|
|
66
|
+
const scoped = withLinkedAbortSignal(this.#settling.signal, this);
|
|
67
|
+
let binding;
|
|
68
|
+
try {
|
|
69
|
+
binding = await this.#host.acquire(Type, params, caller, scoped.context, options);
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
throw this.#references === undefined ? settled(Type) : error;
|
|
73
|
+
}
|
|
74
|
+
finally {
|
|
75
|
+
scoped.release();
|
|
76
|
+
}
|
|
77
|
+
// A get that finished in the turn its handler settled: nobody releases its reference later.
|
|
78
|
+
if (this.#references === undefined) {
|
|
79
|
+
binding.release();
|
|
80
|
+
throw settled(Type);
|
|
81
|
+
}
|
|
82
|
+
this.#references.push(binding);
|
|
83
|
+
// The binding was built from `Type`'s members.
|
|
84
|
+
return binding.reference;
|
|
85
|
+
}
|
|
86
|
+
trace(name, attributes, fn) {
|
|
87
|
+
return traceUnder(this, name, attributes, fn);
|
|
88
|
+
}
|
|
89
|
+
/** Its child under `span` (`ctx.trace`), every member kept. */
|
|
90
|
+
traced(span) {
|
|
91
|
+
return new SpanCtx(this, span);
|
|
92
|
+
}
|
|
93
|
+
/** The handler settled: its references are released, waiting gets give up, and `get` throws from now on. */
|
|
94
|
+
settle() {
|
|
95
|
+
const references = this.#references ?? [];
|
|
96
|
+
this.#references = undefined;
|
|
97
|
+
this.#settling?.abort();
|
|
98
|
+
for (const binding of references)
|
|
99
|
+
binding.release();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* `ctx.trace` of `ctx`: `fn` in a child span with its child ctx; with nothing recorded, `fn` with `ctx` itself. Either
|
|
104
|
+
* way a synchronous throw of `fn` rejects (review L5: recording changes nothing `fn` sees but its span).
|
|
105
|
+
*/
|
|
106
|
+
function traceUnder(ctx, name, attributes, fn) {
|
|
107
|
+
const parent = ctx.telemetry;
|
|
108
|
+
// Plugin code: a synchronous throw becomes the rejection.
|
|
109
|
+
if (untraced(parent))
|
|
110
|
+
return (async () => fn(ctx))();
|
|
111
|
+
return parent.startSpan({ name, attributes: { "chord.host": ctx.spanHost, ...attributes } }, async (span) => {
|
|
112
|
+
try {
|
|
113
|
+
return await fn(ctx.traced(span));
|
|
114
|
+
}
|
|
115
|
+
catch (error) {
|
|
116
|
+
ended(span, "trace_failed", error, ctx.abortSignal);
|
|
117
|
+
throw error;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
/** A ctx under a child span (`ctx.trace`): its parent's caller, signal and references, `telemetry` the span. */
|
|
122
|
+
export class SpanCtx {
|
|
123
|
+
#parent;
|
|
124
|
+
#context;
|
|
125
|
+
constructor(parent, span) {
|
|
126
|
+
this.#parent = parent;
|
|
127
|
+
this.#context = withTelemetry(span, parent);
|
|
128
|
+
}
|
|
129
|
+
/** Its host's `chord.host`, for its child spans. */
|
|
130
|
+
get spanHost() {
|
|
131
|
+
return this.#parent.spanHost;
|
|
132
|
+
}
|
|
133
|
+
get principal() {
|
|
134
|
+
return this.#parent.principal;
|
|
135
|
+
}
|
|
136
|
+
get incarnation() {
|
|
137
|
+
return this.#parent.incarnation;
|
|
138
|
+
}
|
|
139
|
+
get abortSignal() {
|
|
140
|
+
return this.#context.abortSignal;
|
|
141
|
+
}
|
|
142
|
+
get telemetry() {
|
|
143
|
+
return this.#context.telemetry;
|
|
144
|
+
}
|
|
145
|
+
value(key) {
|
|
146
|
+
return this.#context.value(key);
|
|
147
|
+
}
|
|
148
|
+
toString() {
|
|
149
|
+
return `${this.#parent}.Trace`;
|
|
150
|
+
}
|
|
151
|
+
get(Type, params, options) {
|
|
152
|
+
return this.#parent.get(Type, params, options);
|
|
153
|
+
}
|
|
154
|
+
trace(name, attributes, fn) {
|
|
155
|
+
return traceUnder(this, name, attributes, fn);
|
|
156
|
+
}
|
|
157
|
+
/** Its child under `span`, of its own kind. */
|
|
158
|
+
traced(span) {
|
|
159
|
+
return new SpanCtx(this, span);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
function settled(Type) {
|
|
163
|
+
return new ChordError({
|
|
164
|
+
code: "released",
|
|
165
|
+
reason: "settled",
|
|
166
|
+
message: `${Type.name}: ctx.get after its call settled`,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* A child of `context` aborted by `signal` and by the caller's signal (the caller's reason first) until `release()`,
|
|
171
|
+
* which the call runs when it settles. Not `AbortSignal.any`: before Node 24.16.0 it keeps cleanup entries per call for
|
|
172
|
+
* as long as its sources live (nodejs/node#62367), and a call's sources (its attempt, its reference) live long.
|
|
173
|
+
* Without a caller's signal the child is aborted by `signal` itself and `release` does nothing.
|
|
174
|
+
*/
|
|
175
|
+
export function withLinkedAbortSignal(signal, context) {
|
|
176
|
+
const caller = context.abortSignal;
|
|
177
|
+
if (caller === undefined)
|
|
178
|
+
return { context: withAbortSignal(signal, context), release: NOTHING };
|
|
179
|
+
const linked = new AbortController();
|
|
180
|
+
const listeners = [caller, signal].map((source) => {
|
|
181
|
+
const forward = () => {
|
|
182
|
+
release();
|
|
183
|
+
linked.abort(source.reason);
|
|
184
|
+
};
|
|
185
|
+
return [source, forward];
|
|
186
|
+
});
|
|
187
|
+
const release = () => {
|
|
188
|
+
for (const [source, forward] of listeners)
|
|
189
|
+
source.removeEventListener("abort", forward);
|
|
190
|
+
};
|
|
191
|
+
const aborted = listeners.find(([source]) => source.aborted);
|
|
192
|
+
if (aborted !== undefined)
|
|
193
|
+
linked.abort(aborted[0].reason);
|
|
194
|
+
else
|
|
195
|
+
for (const [source, forward] of listeners)
|
|
196
|
+
source.addEventListener("abort", forward, { once: true });
|
|
197
|
+
return { context: withAbortSignal(linked.signal, withoutAbortSignal(context)), release };
|
|
198
|
+
}
|
|
199
|
+
const NOTHING = () => { };
|
|
200
|
+
//# sourceMappingURL=ctx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ctx.js","sourceRoot":"","sources":["../../src/host/ctx.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,oHAAoH;AACpH,mFAAmF;AAGnF,OAAO,EAAiC,eAAe,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAExH,OAAO,EAAE,UAAU,EAAkB,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAqC,MAAM,eAAe,CAAC;AA0B9E;;;GAGG;AACH,MAAM,OAAO,WAAW;IACd,SAAS,CAAwB;IACjC,WAAW,CAAS;IACpB,QAAQ,CAAU;IAClB,KAAK,CAAU;IACxB,+GAA+G;IACtG,GAAG,CAA4B;IACxC,6EAA6E;IAC7E,WAAW,GAA0B,EAAE,CAAC;IACxC,iHAAiH;IACjH,SAAS,CAA8B;IAEvC,YAAY,OAAgB,EAAE,MAAc,EAAE,IAAa,EAAE,EAAkB;QAC9E,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QAClC,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QACtC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;Q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C;IACjG,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;IACrC,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QACjD,MAAM,OAAO,GAAG,GAAS,EAAE;YAC1B,OAAO,EAAE,CAAC;YACV,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC7B,CAAC,CAAC;QACF,OAAO,CAAC,MAAM,EAAE,OAAO,CAAU,CAAC;IACnC,CAAC,CAAC,CAAC;IACH,MAAM,OAAO,GAAG,GAAS,EAAE;QAC1B,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,SAAS;YAAE,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACzF,CAAC,CAAC;IACF,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC7D,IAAI,OAAO,KAAK,SAAS;QAAE,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;;QACtD,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,SAAS;YAAE,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAC1G,OAAO,EAAE,OAAO,EAAE,eAAe,CAAC,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC;AAC1F,CAAC;AAED,MAAM,OAAO,GAAG,GAAS,EAAE,GAAE,CAAC,CAAC","sourcesContent":["// The `ctx` a method handler gets (§8): its call's context, who called, the calling host's incarnation, call-scoped\n// references and child spans (`ctx.trace`, slice 9), its node of the call chain (old work during a reload); and the\n// abort signal of a call's context, linked to long-lived sources until it settles.\n\nimport type { SpanAttributes, TelemetrySpan } from \"@earendil-works/pi-telemetry\";\nimport { type Context, type ContextKey, withAbortSignal, withoutAbortSignal, withTelemetry } from \"../context/index.ts\";\nimport type { Contract, ParamsOf } from \"../contracts/index.ts\";\nimport { ChordError, type Principal } from \"../data/index.ts\";\nimport { ended, untraced } from \"../telemetry.ts\";\nimport type { AnyHost, GetOptions } from \"./host.ts\";\nimport { CALL_CHAIN, type CallNode, type OldWorkSource } from \"./old-work.ts\";\nimport type { Binding, Reference } from \"./reference.ts\";\n\n/** A handler's context. */\nexport interface Ctx<P extends Principal = Principal> extends Context {\n\t/** The caller as its link stamped it; on a local object's handler the host's principal (none on a client). */\n\treadonly principal: P | undefined;\n\t/** The calling host's incarnation over a link, this host's otherwise (R20). */\n\treadonly incarnation: string;\n\t/**\n\t * A reference as the caller (`principal`) sees it, released when the handler settles; afterwards `get` throws\n\t * `released`.\n\t */\n\tget<C extends Contract>(Type: C, params: ParamsOf<C>, options?: GetOptions): Promise<Reference<C>>;\n\t/**\n\t * Runs `fn` in a child span `name` of this ctx's span (`telemetry`) with its host's `chord.host` and `attributes`:\n\t * `fn` gets a child ctx (the same principal, incarnation, signal and `get`, its references this ctx's), so calls\n\t * inside are parented under it. A throw marks the span failed (`trace_failed`; a cancel keeps it ok) and is rethrown.\n\t * Without an adapter that records, `fn` gets this ctx.\n\t */\n\ttrace<T>(name: string, attributes: SpanAttributes, fn: (ctx: Ctx<P>) => Promise<T>): Promise<T>;\n}\n\n/** Who makes a call: the principal it acts as and its host's incarnation. */\nexport type Caller = { readonly principal: Principal | undefined; readonly incarnation: string };\n\n/**\n * The ctx of one handler run (or root scope): its references are released by `settle` when it settled. A method\n * call's ctx is its own node of the call chain (`on`: the attempt it runs on), so the chain costs no allocation.\n */\nexport class CallContext implements Ctx, CallNode {\n\treadonly principal: Principal | undefined;\n\treadonly incarnation: string;\n\treadonly #context: Context;\n\treadonly #host: AnyHost;\n\t/** The attempt a method call runs on; `undefined` for a root scope, a routine or a job run (no chain node). */\n\treadonly #on: OldWorkSource | undefined;\n\t/** The references taken with `get`; `undefined` once the handler settled. */\n\t#references: Binding[] | undefined = [];\n\t/** Aborted when the handler settles: a `get` still waiting gives up and releases its reference. By the first. */\n\t#settling: AbortController | undefined;\n\n\tconstructor(context: Context, caller: Caller, host: AnyHost, on?: OldWorkSource) {\n\t\tthis.#context = context;\n\t\tthis.principal = caller.principal;\n\t\tthis.incarnation = caller.incarnation;\n\t\tthis.#host = host;\n\t\tthis.#on = on;\n\t}\n\n\tget abortSignal(): AbortSignal | undefined {\n\t\treturn this.#context.abortSignal;\n\t}\n\n\tget telemetry(): Context[\"telemetry\"] {\n\t\treturn this.#context.telemetry;\n\t}\n\n\tvalue<T>(key: ContextKey<T>): T | undefined {\n\t\t// A method call's ctx is its chain node; the key's type is `CallNode`, which this is.\n\t\tif (key.token === CALL_CHAIN.token && this.#on !== undefined) return this as unknown as T;\n\t\treturn this.#context.value(key);\n\t}\n\n\t/** The attempt its handler runs on (only read through `CALL_CHAIN`, which a method call's ctx answers). */\n\tget on(): OldWorkSource {\n\t\treturn this.#on!;\n\t}\n\n\t/** The chain of the call that made this one. */\n\tup(): CallNode | undefined {\n\t\treturn this.#context.value(CALL_CHAIN);\n\t}\n\n\ttoString(): string {\n\t\treturn `${this.#context}.Ctx`;\n\t}\n\n\t/** Its host's `chord.host`, for its child spans. */\n\tget spanHost(): string {\n\t\treturn this.#host.spanHost;\n\t}\n\n\tasync get<C extends Contract>(Type: C, params: ParamsOf<C>, options: GetOptions = {}): Promise<Reference<C>> {\n\t\t// A settled scope refuses `released` whatever aborted it; an aborted call creates nothing.\n\t\tif (this.#references === undefined) throw settled(Type);\n\t\tthis.#context.abortSignal?.throwIfAborted();\n\t\t// Made for the caller: its principal and its origin's incarnation travel with the reference's holds.\n\t\tconst caller = { principal: this.principal, incarnation: this.incarnation };\n\t\tthis.#settling ??= new AbortController();\n\t\t// Under this ctx itself: the getter belongs to the call's chain (old work during a reload).\n\t\tconst scoped = withLinkedAbortSignal(this.#settling.signal, this);\n\t\tlet binding: Binding;\n\t\ttry {\n\t\t\tbinding = await this.#host.acquire(Type, params, caller, scoped.context, options);\n\t\t} catch (error) {\n\t\t\tthrow this.#references === undefined ? settled(Type) : error;\n\t\t} finally {\n\t\t\tscoped.release();\n\t\t}\n\t\t// A get that finished in the turn its handler settled: nobody releases its reference later.\n\t\tif (this.#references === undefined) {\n\t\t\tbinding.release();\n\t\t\tthrow settled(Type);\n\t\t}\n\t\tthis.#references.push(binding);\n\t\t// The binding was built from `Type`'s members.\n\t\treturn binding.reference as Reference<C>;\n\t}\n\n\ttrace<T>(name: string, attributes: SpanAttributes, fn: (ctx: Ctx) => Promise<T>): Promise<T> {\n\t\treturn traceUnder(this, name, attributes, fn);\n\t}\n\n\t/** Its child under `span` (`ctx.trace`), every member kept. */\n\ttraced(span: TelemetrySpan): Ctx {\n\t\treturn new SpanCtx(this, span);\n\t}\n\n\t/** The handler settled: its references are released, waiting gets give up, and `get` throws from now on. */\n\tsettle(): void {\n\t\tconst references = this.#references ?? [];\n\t\tthis.#references = undefined;\n\t\tthis.#settling?.abort();\n\t\tfor (const binding of references) binding.release();\n\t}\n}\n\n/**\n * A ctx that makes its child under a span (`ctx.trace`): the same kind of ctx (a job's has `jobId` and `state`), and\n * its host's `chord.host`.\n */\ntype Traceable = Ctx & { readonly spanHost: string; traced(span: TelemetrySpan): Ctx };\n\n/**\n * `ctx.trace` of `ctx`: `fn` in a child span with its child ctx; with nothing recorded, `fn` with `ctx` itself. Either\n * way a synchronous throw of `fn` rejects (review L5: recording changes nothing `fn` sees but its span).\n */\nfunction traceUnder<T>(\n\tctx: Traceable,\n\tname: string,\n\tattributes: SpanAttributes,\n\tfn: (ctx: Ctx) => Promise<T>,\n): Promise<T> {\n\tconst parent = ctx.telemetry;\n\t// Plugin code: a synchronous throw becomes the rejection.\n\tif (untraced(parent)) return (async () => fn(ctx))();\n\treturn parent.startSpan({ name, attributes: { \"chord.host\": ctx.spanHost, ...attributes } }, async (span) => {\n\t\ttry {\n\t\t\treturn await fn(ctx.traced(span));\n\t\t} catch (error) {\n\t\t\tended(span, \"trace_failed\", error, ctx.abortSignal);\n\t\t\tthrow error;\n\t\t}\n\t});\n}\n\n/** A ctx under a child span (`ctx.trace`): its parent's caller, signal and references, `telemetry` the span. */\nexport class SpanCtx implements Ctx {\n\treadonly #parent: Traceable;\n\treadonly #context: Context;\n\n\tconstructor(parent: Traceable, span: TelemetrySpan) {\n\t\tthis.#parent = parent;\n\t\tthis.#context = withTelemetry(span, parent);\n\t}\n\n\t/** Its host's `chord.host`, for its child spans. */\n\tget spanHost(): string {\n\t\treturn this.#parent.spanHost;\n\t}\n\n\tget principal(): Principal | undefined {\n\t\treturn this.#parent.principal;\n\t}\n\n\tget incarnation(): string {\n\t\treturn this.#parent.incarnation;\n\t}\n\n\tget abortSignal(): AbortSignal | undefined {\n\t\treturn this.#context.abortSignal;\n\t}\n\n\tget telemetry(): Context[\"telemetry\"] {\n\t\treturn this.#context.telemetry;\n\t}\n\n\tvalue<T>(key: ContextKey<T>): T | undefined {\n\t\treturn this.#context.value(key);\n\t}\n\n\ttoString(): string {\n\t\treturn `${this.#parent}.Trace`;\n\t}\n\n\tget<C extends Contract>(Type: C, params: ParamsOf<C>, options?: GetOptions): Promise<Reference<C>> {\n\t\treturn this.#parent.get(Type, params, options);\n\t}\n\n\ttrace<T>(name: string, attributes: SpanAttributes, fn: (ctx: Ctx) => Promise<T>): Promise<T> {\n\t\treturn traceUnder(this, name, attributes, fn);\n\t}\n\n\t/** Its child under `span`, of its own kind. */\n\ttraced(span: TelemetrySpan): Ctx {\n\t\treturn new SpanCtx(this, span);\n\t}\n}\n\nfunction settled(Type: Contract): ChordError {\n\treturn new ChordError({\n\t\tcode: \"released\",\n\t\treason: \"settled\",\n\t\tmessage: `${Type.name}: ctx.get after its call settled`,\n\t});\n}\n\n/**\n * A child of `context` aborted by `signal` and by the caller's signal (the caller's reason first) until `release()`,\n * which the call runs when it settles. Not `AbortSignal.any`: before Node 24.16.0 it keeps cleanup entries per call for\n * as long as its sources live (nodejs/node#62367), and a call's sources (its attempt, its reference) live long.\n * Without a caller's signal the child is aborted by `signal` itself and `release` does nothing.\n */\nexport function withLinkedAbortSignal(\n\tsignal: AbortSignal,\n\tcontext: Context,\n): { readonly context: Context; release(): void } {\n\tconst caller = context.abortSignal;\n\tif (caller === undefined) return { context: withAbortSignal(signal, context), release: NOTHING };\n\tconst linked = new AbortController();\n\tconst listeners = [caller, signal].map((source) => {\n\t\tconst forward = (): void => {\n\t\t\trelease();\n\t\t\tlinked.abort(source.reason);\n\t\t};\n\t\treturn [source, forward] as const;\n\t});\n\tconst release = (): void => {\n\t\tfor (const [source, forward] of listeners) source.removeEventListener(\"abort\", forward);\n\t};\n\tconst aborted = listeners.find(([source]) => source.aborted);\n\tif (aborted !== undefined) linked.abort(aborted[0].reason);\n\telse for (const [source, forward] of listeners) source.addEventListener(\"abort\", forward, { once: true });\n\treturn { context: withAbortSignal(linked.signal, withoutAbortSignal(context)), release };\n}\n\nconst NOTHING = (): void => {};\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** A deadline of `ms` calling `expired` once when reached; paused time does not count. */
|
|
2
|
+
export declare class Deadline {
|
|
3
|
+
#private;
|
|
4
|
+
constructor(ms: number, expired: () => void);
|
|
5
|
+
/** Stops the clock; `resume` restarts it with the budget left. */
|
|
6
|
+
pause(): void;
|
|
7
|
+
/** Restarts a paused clock. */
|
|
8
|
+
resume(): void;
|
|
9
|
+
/** Ends the deadline: `expired` is never called. */
|
|
10
|
+
clear(): void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=deadline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deadline.d.ts","sourceRoot":"","sources":["../../src/host/deadline.ts"],"names":[],"mappings":"AAGA,0FAA0F;AAC1F,qBAAa,QAAQ;;IAQpB,YAAY,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,EAI1C;IAED,kEAAkE;IAClE,KAAK,IAAI,IAAI,CAKZ;IAED,+BAA+B;IAC/B,MAAM,IAAI,IAAI,CAEb;IAED,oDAAoD;IACpD,KAAK,IAAI,IAAI,CAIZ;CAMD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// An activation's `readyTimeout` deadline (slice 6a §9): one timer that eager migration work pauses and resumes with
|
|
2
|
+
// the budget it had left, so a long migration does not fail its object while other activations keep their bounds.
|
|
3
|
+
/** A deadline of `ms` calling `expired` once when reached; paused time does not count. */
|
|
4
|
+
export class Deadline {
|
|
5
|
+
#expired;
|
|
6
|
+
/** The budget left when the timer last started (or paused). */
|
|
7
|
+
#remaining;
|
|
8
|
+
#started = 0;
|
|
9
|
+
#timer;
|
|
10
|
+
#cleared = false;
|
|
11
|
+
constructor(ms, expired) {
|
|
12
|
+
this.#expired = expired;
|
|
13
|
+
this.#remaining = ms;
|
|
14
|
+
this.#start();
|
|
15
|
+
}
|
|
16
|
+
/** Stops the clock; `resume` restarts it with the budget left. */
|
|
17
|
+
pause() {
|
|
18
|
+
if (this.#timer === undefined)
|
|
19
|
+
return;
|
|
20
|
+
clearTimeout(this.#timer);
|
|
21
|
+
this.#timer = undefined;
|
|
22
|
+
this.#remaining = Math.max(0, this.#remaining - (Date.now() - this.#started));
|
|
23
|
+
}
|
|
24
|
+
/** Restarts a paused clock. */
|
|
25
|
+
resume() {
|
|
26
|
+
if (this.#timer === undefined && !this.#cleared)
|
|
27
|
+
this.#start();
|
|
28
|
+
}
|
|
29
|
+
/** Ends the deadline: `expired` is never called. */
|
|
30
|
+
clear() {
|
|
31
|
+
clearTimeout(this.#timer);
|
|
32
|
+
this.#timer = undefined;
|
|
33
|
+
this.#cleared = true;
|
|
34
|
+
}
|
|
35
|
+
#start() {
|
|
36
|
+
this.#started = Date.now();
|
|
37
|
+
this.#timer = setTimeout(this.#expired, this.#remaining);
|
|
38
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G,IAAI,CAAC,GAAG,EAAE,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IAC1D,CAAC;CACD","sourcesContent":["// An activation's `readyTimeout` deadline (slice 6a §9): one timer that eager migration work pauses and resumes with\n// the budget it had left, so a long migration does not fail its object while other activations keep their bounds.\n\n/** A deadline of `ms` calling `expired` once when reached; paused time does not count. */\nexport class Deadline {\n\treadonly #expired: () => void;\n\t/** The budget left when the timer last started (or paused). */\n\t#remaining: number;\n\t#started = 0;\n\t#timer: ReturnType<typeof setTimeout> | undefined;\n\t#cleared = false;\n\n\tconstructor(ms: number, expired: () => void) {\n\t\tthis.#expired = expired;\n\t\tthis.#remaining = ms;\n\t\tthis.#start();\n\t}\n\n\t/** Stops the clock; `resume` restarts it with the budget left. */\n\tpause(): void {\n\t\tif (this.#timer === undefined) return;\n\t\tclearTimeout(this.#timer);\n\t\tthis.#timer = undefined;\n\t\tthis.#remaining = Math.max(0, this.#remaining - (Date.now() - this.#started));\n\t}\n\n\t/** Restarts a paused clock. */\n\tresume(): void {\n\t\tif (this.#timer === undefined && !this.#cleared) this.#start();\n\t}\n\n\t/** Ends the deadline: `expired` is never called. */\n\tclear(): void {\n\t\tclearTimeout(this.#timer);\n\t\tthis.#timer = undefined;\n\t\tthis.#cleared = true;\n\t}\n\n\t#start(): void {\n\t\tthis.#started = Date.now();\n\t\tthis.#timer = setTimeout(this.#expired, this.#remaining);\n\t}\n}\n"]}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { ChordError, type FailureCause } from "../data/index.ts";
|
|
2
|
+
import type { RegistryValueSource } from "../registries/internal.ts";
|
|
3
|
+
import type { ChordObject } from "./object.ts";
|
|
4
|
+
import { type Failed, type RefState } from "./ref-state.ts";
|
|
5
|
+
import type { Binding } from "./reference.ts";
|
|
6
|
+
/** One declared dependency: a reference (`self.get`) or a registry's value (`self.registry`). */
|
|
7
|
+
export type Dependency = {
|
|
8
|
+
readonly kind: "reference";
|
|
9
|
+
readonly binding: Binding;
|
|
10
|
+
} | {
|
|
11
|
+
readonly kind: "registry";
|
|
12
|
+
readonly value: RegistryValueSource;
|
|
13
|
+
};
|
|
14
|
+
/** A blocker as `parked_long` names it: a reference's label or `registry <name>`, and whether it loads or failed. */
|
|
15
|
+
export type Blocker = {
|
|
16
|
+
readonly label: string;
|
|
17
|
+
readonly state: "loading" | "failed";
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* What the dependencies say. `live`: every one is live (hydrated: a reference's members have values). `parked`: what
|
|
21
|
+
* the attempt shows (`loading`, or `failed { waiting }` naming its first failed blocker), whether its first pass is
|
|
22
|
+
* over (`firstPass`: no blocker, loading or failed, is an object here still without its first outcome), and its first
|
|
23
|
+
* blocker in declaration order (`parked_long` names it). `broken`: one failed for a cycle (`invalid/cycle`), for
|
|
24
|
+
* authority (`forbidden`) or ended: it never comes back by itself.
|
|
25
|
+
*/
|
|
26
|
+
export type Check = {
|
|
27
|
+
readonly kind: "live";
|
|
28
|
+
} | {
|
|
29
|
+
readonly kind: "parked";
|
|
30
|
+
readonly shown: RefState;
|
|
31
|
+
readonly firstPass: boolean;
|
|
32
|
+
readonly blocker: Blocker;
|
|
33
|
+
/** The first blocker in declaration order that is only loading (a reload's report names it). */
|
|
34
|
+
readonly loadingOn: string | undefined;
|
|
35
|
+
} | {
|
|
36
|
+
readonly kind: "broken";
|
|
37
|
+
readonly error: ChordError;
|
|
38
|
+
};
|
|
39
|
+
/** Checks `dependencies` in declaration order (the first failed one is the one the attempt names). */
|
|
40
|
+
export declare function checkDependencies(dependencies: readonly Dependency[]): Check;
|
|
41
|
+
/**
|
|
42
|
+
* What a reload reports for a parked attempt (slice 7b §4): its failure's cause, or for a blocker that is only
|
|
43
|
+
* loading a `waiting` cause naming it.
|
|
44
|
+
*/
|
|
45
|
+
export declare function parkedCause(check: Extract<Check, {
|
|
46
|
+
readonly kind: "parked";
|
|
47
|
+
}>): FailureCause;
|
|
48
|
+
/** A parked attempt's state for a blocker `label` that failed with `error`. */
|
|
49
|
+
export declare function waitingOn(label: string, error: ChordError): Failed;
|
|
50
|
+
/**
|
|
51
|
+
* The `parked_long` report of one parking episode (dependency model §7, audit A11): once, when the attempt has been
|
|
52
|
+
* parked longer than `readyTimeout`, whatever its blocker (a ring across hosts started at the same moment stays parked
|
|
53
|
+
* so, and so does a long wait; nothing fails or retries). The clock and the report's `since` start when the episode
|
|
54
|
+
* does (its pinned keys' loading included); the report names the blocker of the latest check. Its one timer runs until
|
|
55
|
+
* the report or the episode's end (`stop`).
|
|
56
|
+
*/
|
|
57
|
+
export declare class ParkedLong {
|
|
58
|
+
#private;
|
|
59
|
+
constructor(object: ChordObject);
|
|
60
|
+
/** What the latest check found blocking. */
|
|
61
|
+
blockedBy(blocker: Blocker): void;
|
|
62
|
+
/** The episode ended: no report from now on. */
|
|
63
|
+
stop(): void;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=dependencies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependencies.d.ts","sourceRoot":"","sources":["../../src/host/dependencies.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,KAAK,YAAY,EAAgB,MAAM,kBAAkB,CAAC;AAE/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,KAAK,MAAM,EAAW,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C,iGAAiG;AACjG,MAAM,MAAM,UAAU,GACnB;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GACzD;IAAE,QAAQ,CAA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AEX;CACD"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
// Parked attempts (dependency model §3, §7): the dependency check, what an attempt's declared dependencies (`self.get`
|
|
2
|
+
// references and `self.registry` values) say at one moment: all live, or what the parked attempt shows while one is not
|
|
3
|
+
// (`loading`, `failed { waiting }` naming the nearest blocker and the root cause, or `broken` for a cycle, authority or
|
|
4
|
+
// an ended dependency), whether this host's first pass can count it (no blocker here still without its first outcome,
|
|
5
|
+
// decision (a)), and its first blocker; and the `parked_long` report of a long parking episode.
|
|
6
|
+
import { ChordError, isChordError } from "../data/index.js";
|
|
7
|
+
import { asChordError, waitingFor } from "../data/internal.js";
|
|
8
|
+
import { LOADING } from "./ref-state.js";
|
|
9
|
+
const LIVE = { kind: "live" };
|
|
10
|
+
/** Checks `dependencies` in declaration order (the first failed one is the one the attempt names). */
|
|
11
|
+
export function checkDependencies(dependencies) {
|
|
12
|
+
let failed;
|
|
13
|
+
let firstPass = true;
|
|
14
|
+
let blocker;
|
|
15
|
+
let loadingOn;
|
|
16
|
+
for (const dependency of dependencies) {
|
|
17
|
+
if (dependency.kind === "registry") {
|
|
18
|
+
const { value } = dependency;
|
|
19
|
+
const start = value.start();
|
|
20
|
+
if (start.kind === "value" || start.last !== undefined)
|
|
21
|
+
continue;
|
|
22
|
+
const label = `registry ${value.name}`;
|
|
23
|
+
failed ??= waitingOn(label, asChordError(start.error, label));
|
|
24
|
+
blocker ??= { label, state: "failed" };
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
const { binding } = dependency;
|
|
28
|
+
const state = binding.refState;
|
|
29
|
+
switch (state.kind) {
|
|
30
|
+
case "live":
|
|
31
|
+
continue;
|
|
32
|
+
case "ended":
|
|
33
|
+
return { kind: "broken", error: state.error };
|
|
34
|
+
case "failed": {
|
|
35
|
+
const { error } = state.cause;
|
|
36
|
+
if (healsNever(error))
|
|
37
|
+
return { kind: "broken", error };
|
|
38
|
+
failed ??= waitingOn(binding.label, error);
|
|
39
|
+
blocker ??= { label: binding.label, state: "failed" };
|
|
40
|
+
// Parked `waiting` on something here still in its first attempt: no first outcome yet (fix round 1).
|
|
41
|
+
if (binding.target?.blocksFirstPass === true)
|
|
42
|
+
firstPass = false;
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
case "loading":
|
|
46
|
+
loadingOn ??= binding.label;
|
|
47
|
+
blocker ??= { label: binding.label, state: "loading" };
|
|
48
|
+
if (binding.target?.blocksFirstPass === true)
|
|
49
|
+
firstPass = false;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (blocker === undefined)
|
|
53
|
+
return LIVE;
|
|
54
|
+
return { kind: "parked", shown: failed ?? LOADING, firstPass, blocker, loadingOn };
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Whether a dependency failed with `error` never heals by itself, so its dependent breaks too: a cycle
|
|
58
|
+
* (`invalid/cycle`: it would wait on a ring) or authority (`forbidden`: an `authorize` that refused, M§3.6; only
|
|
59
|
+
* `retry()` or a reload helps).
|
|
60
|
+
*/
|
|
61
|
+
function healsNever(error) {
|
|
62
|
+
return (isChordError(error, "invalid") && error.reason === "cycle") || isChordError(error, "forbidden");
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* What a reload reports for a parked attempt (slice 7b §4): its failure's cause, or for a blocker that is only
|
|
66
|
+
* loading a `waiting` cause naming it.
|
|
67
|
+
*/
|
|
68
|
+
export function parkedCause(check) {
|
|
69
|
+
const { shown } = check;
|
|
70
|
+
if (shown.kind === "failed")
|
|
71
|
+
return shown.cause;
|
|
72
|
+
const label = check.loadingOn ?? "a dependency";
|
|
73
|
+
return waitingFor(label, new ChordError({ code: "unavailable", message: `${label} is loading` }));
|
|
74
|
+
}
|
|
75
|
+
/** A parked attempt's state for a blocker `label` that failed with `error`. */
|
|
76
|
+
export function waitingOn(label, error) {
|
|
77
|
+
return { kind: "failed", cause: waitingFor(label, error), retryAt: undefined };
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* The `parked_long` report of one parking episode (dependency model §7, audit A11): once, when the attempt has been
|
|
81
|
+
* parked longer than `readyTimeout`, whatever its blocker (a ring across hosts started at the same moment stays parked
|
|
82
|
+
* so, and so does a long wait; nothing fails or retries). The clock and the report's `since` start when the episode
|
|
83
|
+
* does (its pinned keys' loading included); the report names the blocker of the latest check. Its one timer runs until
|
|
84
|
+
* the report or the episode's end (`stop`).
|
|
85
|
+
*/
|
|
86
|
+
export class ParkedLong {
|
|
87
|
+
#since = Date.now();
|
|
88
|
+
#timer;
|
|
89
|
+
/** The blocker the latest check found. */
|
|
90
|
+
#blocker;
|
|
91
|
+
constructor(object) {
|
|
92
|
+
this.#timer = setTimeout(() => {
|
|
93
|
+
const blocker = this.#blocker;
|
|
94
|
+
if (blocker === undefined)
|
|
95
|
+
return;
|
|
96
|
+
const { label, state } = blocker;
|
|
97
|
+
object.host.report({
|
|
98
|
+
kind: "parked_long",
|
|
99
|
+
object: object.label,
|
|
100
|
+
waitingFor: label,
|
|
101
|
+
state,
|
|
102
|
+
since: this.#since,
|
|
103
|
+
});
|
|
104
|
+
}, object.host.timeouts.ready);
|
|
105
|
+
}
|
|
106
|
+
/** What the latest check found blocking. */
|
|
107
|
+
blockedBy(blocker) {
|
|
108
|
+
this.#blocker = blocker;
|
|
109
|
+
}
|
|
110
|
+
/** The episode ended: no report from now on. */
|
|
111
|
+
stop() {
|
|
112
|
+
clearTimeout(this.#timer);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=dependencies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependencies.js","sourceRoot":"","sources":["../../src/host/dependencies.ts"],"names":[],"mappings":"AAAA,uHAAuH;AACvH,wHAAwH;AACxH,wHAAwH;AACxH,sHAAsH;AACtH,gGAAgG;AAEhG,OAAO,EAAE,UAAU,EAAqB,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,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C3B,CAAC;CACD","sourcesContent":["// Parked attempts (dependency model §3, §7): the dependency check, what an attempt's declared dependencies (`self.get`\n// references and `self.registry` values) say at one moment: all live, or what the parked attempt shows while one is not\n// (`loading`, `failed { waiting }` naming the nearest blocker and the root cause, or `broken` for a cycle, authority or\n// an ended dependency), whether this host's first pass can count it (no blocker here still without its first outcome,\n// decision (a)), and its first blocker; and the `parked_long` report of a long parking episode.\n\nimport { ChordError, type FailureCause, isChordError } from \"../data/index.ts\";\nimport { asChordError, waitingFor } from \"../data/internal.ts\";\nimport type { RegistryValueSource } from \"../registries/internal.ts\";\nimport type { ChordObject } from \"./object.ts\";\nimport { type Failed, LOADING, type RefState } from \"./ref-state.ts\";\nimport type { Binding } from \"./reference.ts\";\n\n/** One declared dependency: a reference (`self.get`) or a registry's value (`self.registry`). */\nexport type Dependency =\n\t| { readonly kind: \"reference\"; readonly binding: Binding }\n\t| { readonly kind: \"registry\"; readonly value: RegistryValueSource };\n\n/** A blocker as `parked_long` names it: a reference's label or `registry <name>`, and whether it loads or failed. */\nexport type Blocker = { readonly label: string; readonly state: \"loading\" | \"failed\" };\n\n/**\n * What the dependencies say. `live`: every one is live (hydrated: a reference's members have values). `parked`: what\n * the attempt shows (`loading`, or `failed { waiting }` naming its first failed blocker), whether its first pass is\n * over (`firstPass`: no blocker, loading or failed, is an object here still without its first outcome), and its first\n * blocker in declaration order (`parked_long` names it). `broken`: one failed for a cycle (`invalid/cycle`), for\n * authority (`forbidden`) or ended: it never comes back by itself.\n */\nexport type Check =\n\t| { readonly kind: \"live\" }\n\t| {\n\t\t\treadonly kind: \"parked\";\n\t\t\treadonly shown: RefState;\n\t\t\treadonly firstPass: boolean;\n\t\t\treadonly blocker: Blocker;\n\t\t\t/** The first blocker in declaration order that is only loading (a reload's report names it). */\n\t\t\treadonly loadingOn: string | undefined;\n\t }\n\t| { readonly kind: \"broken\"; readonly error: ChordError };\n\nconst LIVE: Check = { kind: \"live\" };\n\n/** Checks `dependencies` in declaration order (the first failed one is the one the attempt names). */\nexport function checkDependencies(dependencies: readonly Dependency[]): Check {\n\tlet failed: Failed | undefined;\n\tlet firstPass = true;\n\tlet blocker: Blocker | undefined;\n\tlet loadingOn: string | undefined;\n\tfor (const dependency of dependencies) {\n\t\tif (dependency.kind === \"registry\") {\n\t\t\tconst { value } = dependency;\n\t\t\tconst start = value.start();\n\t\t\tif (start.kind === \"value\" || start.last !== undefined) continue;\n\t\t\tconst label = `registry ${value.name}`;\n\t\t\tfailed ??= waitingOn(label, asChordError(start.error, label));\n\t\t\tblocker ??= { label, state: \"failed\" };\n\t\t\tcontinue;\n\t\t}\n\t\tconst { binding } = dependency;\n\t\tconst state = binding.refState;\n\t\tswitch (state.kind) {\n\t\t\tcase \"live\":\n\t\t\t\tcontinue;\n\t\t\tcase \"ended\":\n\t\t\t\treturn { kind: \"broken\", error: state.error };\n\t\t\tcase \"failed\": {\n\t\t\t\tconst { error } = state.cause;\n\t\t\t\tif (healsNever(error)) return { kind: \"broken\", error };\n\t\t\t\tfailed ??= waitingOn(binding.label, error);\n\t\t\t\tblocker ??= { label: binding.label, state: \"failed\" };\n\t\t\t\t// Parked `waiting` on something here still in its first attempt: no first outcome yet (fix round 1).\n\t\t\t\tif (binding.target?.blocksFirstPass === true) firstPass = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tcase \"loading\":\n\t\t\t\tloadingOn ??= binding.label;\n\t\t\t\tblocker ??= { label: binding.label, state: \"loading\" };\n\t\t\t\tif (binding.target?.blocksFirstPass === true) firstPass = false;\n\t\t}\n\t}\n\tif (blocker === undefined) return LIVE;\n\treturn { kind: \"parked\", shown: failed ?? LOADING, firstPass, blocker, loadingOn };\n}\n\n/**\n * Whether a dependency failed with `error` never heals by itself, so its dependent breaks too: a cycle\n * (`invalid/cycle`: it would wait on a ring) or authority (`forbidden`: an `authorize` that refused, M§3.6; only\n * `retry()` or a reload helps).\n */\nfunction healsNever(error: ChordError): boolean {\n\treturn (isChordError(error, \"invalid\") && error.reason === \"cycle\") || isChordError(error, \"forbidden\");\n}\n\n/**\n * What a reload reports for a parked attempt (slice 7b §4): its failure's cause, or for a blocker that is only\n * loading a `waiting` cause naming it.\n */\nexport function parkedCause(check: Extract<Check, { readonly kind: \"parked\" }>): FailureCause {\n\tconst { shown } = check;\n\tif (shown.kind === \"failed\") return shown.cause;\n\tconst label = check.loadingOn ?? \"a dependency\";\n\treturn waitingFor(label, new ChordError({ code: \"unavailable\", message: `${label} is loading` }));\n}\n\n/** A parked attempt's state for a blocker `label` that failed with `error`. */\nexport function waitingOn(label: string, error: ChordError): Failed {\n\treturn { kind: \"failed\", cause: waitingFor(label, error), retryAt: undefined };\n}\n\n/**\n * The `parked_long` report of one parking episode (dependency model §7, audit A11): once, when the attempt has been\n * parked longer than `readyTimeout`, whatever its blocker (a ring across hosts started at the same moment stays parked\n * so, and so does a long wait; nothing fails or retries). The clock and the report's `since` start when the episode\n * does (its pinned keys' loading included); the report names the blocker of the latest check. Its one timer runs until\n * the report or the episode's end (`stop`).\n */\nexport class ParkedLong {\n\treadonly #since = Date.now();\n\treadonly #timer: ReturnType<typeof setTimeout>;\n\t/** The blocker the latest check found. */\n\t#blocker: Blocker | undefined;\n\n\tconstructor(object: ChordObject) {\n\t\tthis.#timer = setTimeout(() => {\n\t\t\tconst blocker = this.#blocker;\n\t\t\tif (blocker === undefined) return;\n\t\t\tconst { label, state } = blocker;\n\t\t\tobject.host.report({\n\t\t\t\tkind: \"parked_long\",\n\t\t\t\tobject: object.label,\n\t\t\t\twaitingFor: label,\n\t\t\t\tstate,\n\t\t\t\tsince: this.#since,\n\t\t\t});\n\t\t}, object.host.timeouts.ready);\n\t}\n\n\t/** What the latest check found blocking. */\n\tblockedBy(blocker: Blocker): void {\n\t\tthis.#blocker = blocker;\n\t}\n\n\t/** The episode ended: no report from now on. */\n\tstop(): void {\n\t\tclearTimeout(this.#timer);\n\t}\n}\n"]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { Context } from "../context/index.ts";
|
|
2
|
+
import type { Address, Contract, ParamsOf } from "../contracts/index.ts";
|
|
3
|
+
import { ChordError, type Principal } from "../data/index.ts";
|
|
4
|
+
import type { WireAddress } from "../link/internal.ts";
|
|
5
|
+
import type { HoldRequest, HostLink, Path } from "../remote/internal.ts";
|
|
6
|
+
import type { Route } from "./route.ts";
|
|
7
|
+
/** Where something is placed: here, or over a path (with the host address it was computed or named with). */
|
|
8
|
+
export type Placed = {
|
|
9
|
+
readonly kind: "here";
|
|
10
|
+
} | {
|
|
11
|
+
readonly kind: "path";
|
|
12
|
+
readonly path: Path;
|
|
13
|
+
readonly address: WireAddress;
|
|
14
|
+
};
|
|
15
|
+
/** A host's destinations: its address, its routes and its parent path, as the host keeps them. */
|
|
16
|
+
export declare class Destination {
|
|
17
|
+
#private;
|
|
18
|
+
constructor(address: Address | undefined, routes: ReadonlyMap<string, Route>, parent: Path);
|
|
19
|
+
/**
|
|
20
|
+
* Where a reference to `Type` with `params` made as `principal` goes: here for a local type, and for a remote type
|
|
21
|
+
* whose host address is this host's, served here or not (the check against what is served is the host's); otherwise
|
|
22
|
+
* over the route of its host address's kind, or over the parent link (the host address decides where an object
|
|
23
|
+
* lives: a worker reaches another worker's object of a type it serves too). Throws `invalid/host_address` for a host
|
|
24
|
+
* address whose params do not fit its kind, `forbidden` when the route refuses, and what a `hostAddress` or
|
|
25
|
+
* `authorize` throws.
|
|
26
|
+
*/
|
|
27
|
+
reference(Type: Contract, params: ParamsOf<Contract>, principal: Principal | undefined, context: Context): Placed;
|
|
28
|
+
/**
|
|
29
|
+
* Whether a reference to `Type` with `params` goes here: a local type, or a remote one whose host address is this
|
|
30
|
+
* host's. A `hostAddress` that throws, throws.
|
|
31
|
+
*/
|
|
32
|
+
placedHere(Type: Contract, params: ParamsOf<Contract>): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Where a hold arriving on `link` acting as `principal` goes, by the address it names: here when it is this host's
|
|
35
|
+
* (a relay never captures a hold for serving the same name); over the route of its kind; else over the parent link
|
|
36
|
+
* (waiting for it while it is down), unless it came on the parent link or this host never had one (`unavailable`).
|
|
37
|
+
* Throws as `reference` does.
|
|
38
|
+
*/
|
|
39
|
+
hold(request: HoldRequest, link: HostLink, principal: Principal | undefined, context: Context): Placed;
|
|
40
|
+
/**
|
|
41
|
+
* The provider's own check of a request placed here for the remote `Type` it serves, with `params` (checked):
|
|
42
|
+
* `invalid/host_address` when its `hostAddress` puts the object on another host (code skew: the consumer computed
|
|
43
|
+
* this host), `undefined` when it lives here. A `hostAddress` that throws throws (the provider's own code). The
|
|
44
|
+
* address a request names only routes it.
|
|
45
|
+
*/
|
|
46
|
+
misplaced(Type: Contract, params: ParamsOf<Contract>): ChordError | undefined;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=destination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"destination.d.ts","sourceRoot":"","sources":["../../src/host/destination.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,6GAA6G;AAC7G,MAAM,MAAM,MAAM,GACf;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,WAAW,C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