@earendil-works/chord 1.5.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 +51 -0
- package/README.md +50 -90
- package/dist/contracts/accepts.d.ts +81 -0
- package/dist/contracts/accepts.d.ts.map +1 -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.map +1 -0
- package/dist/contracts/declare.d.ts.map +1 -0
- package/dist/contracts/declare.js.map +1 -0
- package/dist/contracts/evolve.d.ts.map +1 -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.map +1 -0
- package/dist/contracts/history.d.ts.map +1 -0
- package/dist/contracts/history.js.map +1 -0
- package/dist/contracts/host-kind.d.ts.map +1 -0
- package/dist/contracts/host-kind.js.map +1 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/contracts/internal.d.ts.map +1 -0
- package/dist/contracts/internal.js.map +1 -0
- package/dist/contracts/names.d.ts.map +1 -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.map +1 -0
- package/dist/contracts/schema.d.ts.map +1 -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.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.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.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/documents/address-source.d.ts +20 -0
- package/dist/documents/address-source.d.ts.map +1 -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.map +1 -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.map +1 -0
- package/dist/documents/index.d.ts.map +1 -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.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.map +1 -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.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.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.map +1 -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.map +1 -0
- package/dist/host/deadline.js.map +1 -0
- package/dist/host/dependencies.d.ts.map +1 -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.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.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.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.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.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.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.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.map +1 -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.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.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.map +1 -0
- package/dist/host/uuid.js.map +1 -0
- package/dist/index.d.ts +29 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -10
- package/dist/index.js.map +1 -1
- package/dist/jobs/definition.d.ts.map +1 -0
- package/dist/jobs/definition.js.map +1 -0
- package/dist/jobs/index.d.ts.map +1 -0
- package/dist/jobs/index.js.map +1 -0
- package/dist/jobs/internal.d.ts.map +1 -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.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.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.map +1 -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.map +1 -0
- package/dist/link/errors.js.map +1 -0
- package/dist/link/index.d.ts.map +1 -0
- package/dist/link/index.js.map +1 -0
- package/dist/link/internal.d.ts.map +1 -0
- package/dist/link/internal.js.map +1 -0
- package/dist/link/ipc.d.ts.map +1 -0
- package/dist/link/ipc.js.map +1 -0
- package/dist/link/link.d.ts.map +1 -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.map +1 -0
- package/dist/link/text.js +355 -0
- package/dist/link/text.js.map +1 -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.map +1 -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.map +1 -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.map +1 -0
- package/dist/node/http/file.js.map +1 -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.map +1 -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.map +1 -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.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.map +1 -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/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.map +1 -0
- package/dist/registries/contribution.js.map +1 -0
- package/dist/registries/entries.d.ts.map +1 -0
- package/dist/registries/entries.js.map +1 -0
- package/dist/registries/index.d.ts.map +1 -0
- package/dist/registries/index.js.map +1 -0
- package/dist/registries/internal.d.ts.map +1 -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.map +1 -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.map +1 -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.map +1 -0
- package/dist/remote/internal.js.map +1 -0
- package/dist/remote/path.d.ts.map +1 -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/node.d.ts +9 -1
- package/dist/sqlite/node.d.ts.map +1 -1
- package/dist/sqlite/node.js +9 -3
- 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.map +1 -0
- package/dist/state/internal.d.ts.map +1 -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.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.map +1 -0
- package/dist/store/allocator.d.ts.map +1 -0
- package/dist/store/allocator.js.map +1 -0
- package/dist/store/applier.d.ts.map +1 -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.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.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.map +1 -0
- package/dist/store/claims.d.ts.map +1 -0
- package/dist/store/claims.js.map +1 -0
- package/dist/store/columns.d.ts.map +1 -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.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.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.map +1 -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.map +1 -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.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.map +1 -0
- package/dist/store/refusal.d.ts.map +1 -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.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.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.map +1 -0
- package/dist/store/table-evolve.d.ts.map +1 -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.map +1 -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.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.map +1 -0
- package/dist/store/text.d.ts.map +1 -0
- package/dist/store/text.js.map +1 -0
- package/dist/store/writes.d.ts.map +1 -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/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/design.md +3065 -0
- package/docs/durable-observers/book.md +432 -0
- package/docs/durable-observers/index.html +517 -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-4a.md +418 -0
- package/docs/slice-4b.md +208 -0
- package/docs/slice-6a.md +676 -0
- package/docs/slice-6b.md +332 -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-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 +99 -21
- 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 -207
- package/dist/contract.d.ts.map +0 -1
- package/dist/contract.js +0 -241
- 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 -1002
- 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/next/contracts/accepts.d.ts +0 -81
- package/dist/next/contracts/accepts.d.ts.map +0 -1
- package/dist/next/contracts/accepts.js.map +0 -1
- package/dist/next/contracts/contract.d.ts +0 -121
- package/dist/next/contracts/contract.d.ts.map +0 -1
- package/dist/next/contracts/contract.js.map +0 -1
- package/dist/next/contracts/declare.d.ts.map +0 -1
- package/dist/next/contracts/declare.js.map +0 -1
- package/dist/next/contracts/evolve.d.ts.map +0 -1
- package/dist/next/contracts/evolve.js.map +0 -1
- package/dist/next/contracts/fingerprint.d.ts +0 -16
- package/dist/next/contracts/fingerprint.d.ts.map +0 -1
- package/dist/next/contracts/fingerprint.js.map +0 -1
- package/dist/next/contracts/history.d.ts.map +0 -1
- package/dist/next/contracts/history.js.map +0 -1
- package/dist/next/contracts/host-kind.d.ts.map +0 -1
- package/dist/next/contracts/host-kind.js.map +0 -1
- package/dist/next/contracts/index.d.ts.map +0 -1
- package/dist/next/contracts/index.js.map +0 -1
- package/dist/next/contracts/internal.d.ts.map +0 -1
- package/dist/next/contracts/internal.js.map +0 -1
- package/dist/next/contracts/names.d.ts.map +0 -1
- package/dist/next/contracts/names.js.map +0 -1
- package/dist/next/contracts/params.d.ts +0 -28
- package/dist/next/contracts/params.d.ts.map +0 -1
- package/dist/next/contracts/params.js.map +0 -1
- package/dist/next/contracts/schema.d.ts.map +0 -1
- package/dist/next/contracts/schema.js.map +0 -1
- package/dist/next/contracts/snapshot.d.ts +0 -16
- package/dist/next/contracts/snapshot.d.ts.map +0 -1
- package/dist/next/contracts/snapshot.js +0 -167
- package/dist/next/contracts/snapshot.js.map +0 -1
- package/dist/next/data/args.d.ts +0 -50
- package/dist/next/data/args.d.ts.map +0 -1
- package/dist/next/data/args.js.map +0 -1
- package/dist/next/data/errors.d.ts +0 -73
- package/dist/next/data/errors.d.ts.map +0 -1
- package/dist/next/data/errors.js +0 -107
- package/dist/next/data/errors.js.map +0 -1
- package/dist/next/data/failure.d.ts.map +0 -1
- package/dist/next/data/failure.js +0 -72
- package/dist/next/data/failure.js.map +0 -1
- package/dist/next/data/index.d.ts +0 -4
- package/dist/next/data/index.d.ts.map +0 -1
- package/dist/next/data/index.js +0 -4
- package/dist/next/data/index.js.map +0 -1
- package/dist/next/data/internal.d.ts +0 -7
- package/dist/next/data/internal.d.ts.map +0 -1
- package/dist/next/data/internal.js +0 -8
- package/dist/next/data/internal.js.map +0 -1
- package/dist/next/data/params.d.ts +0 -20
- package/dist/next/data/params.d.ts.map +0 -1
- package/dist/next/data/params.js.map +0 -1
- package/dist/next/data/principal.d.ts +0 -17
- package/dist/next/data/principal.d.ts.map +0 -1
- package/dist/next/data/principal.js +0 -41
- package/dist/next/data/principal.js.map +0 -1
- package/dist/next/data/validator.d.ts +0 -12
- package/dist/next/data/validator.d.ts.map +0 -1
- package/dist/next/data/validator.js +0 -34
- package/dist/next/data/validator.js.map +0 -1
- package/dist/next/documents/address-source.d.ts +0 -20
- package/dist/next/documents/address-source.d.ts.map +0 -1
- package/dist/next/documents/address-source.js.map +0 -1
- package/dist/next/documents/definition.d.ts +0 -84
- package/dist/next/documents/definition.d.ts.map +0 -1
- package/dist/next/documents/definition.js +0 -73
- package/dist/next/documents/definition.js.map +0 -1
- package/dist/next/documents/documents.d.ts +0 -106
- package/dist/next/documents/documents.d.ts.map +0 -1
- package/dist/next/documents/documents.js +0 -224
- package/dist/next/documents/documents.js.map +0 -1
- package/dist/next/documents/fence.d.ts.map +0 -1
- package/dist/next/documents/fence.js.map +0 -1
- package/dist/next/documents/handles.d.ts +0 -76
- package/dist/next/documents/handles.d.ts.map +0 -1
- package/dist/next/documents/handles.js.map +0 -1
- package/dist/next/documents/index.d.ts.map +0 -1
- package/dist/next/documents/index.js.map +0 -1
- package/dist/next/documents/internal.d.ts +0 -9
- package/dist/next/documents/internal.d.ts.map +0 -1
- package/dist/next/documents/internal.js.map +0 -1
- package/dist/next/documents/keyed-slot.d.ts +0 -103
- package/dist/next/documents/keyed-slot.d.ts.map +0 -1
- package/dist/next/documents/keyed-slot.js +0 -395
- package/dist/next/documents/keyed-slot.js.map +0 -1
- package/dist/next/documents/line.d.ts.map +0 -1
- package/dist/next/documents/line.js.map +0 -1
- package/dist/next/documents/persistence.d.ts +0 -104
- package/dist/next/documents/persistence.d.ts.map +0 -1
- package/dist/next/documents/persistence.js +0 -128
- package/dist/next/documents/persistence.js.map +0 -1
- package/dist/next/documents/residency.d.ts +0 -31
- package/dist/next/documents/residency.d.ts.map +0 -1
- package/dist/next/documents/residency.js.map +0 -1
- package/dist/next/documents/slot.d.ts +0 -109
- package/dist/next/documents/slot.d.ts.map +0 -1
- package/dist/next/documents/slot.js +0 -181
- package/dist/next/documents/slot.js.map +0 -1
- package/dist/next/documents/transaction.d.ts +0 -133
- package/dist/next/documents/transaction.d.ts.map +0 -1
- package/dist/next/documents/transaction.js +0 -409
- package/dist/next/documents/transaction.js.map +0 -1
- package/dist/next/host/activity.d.ts +0 -31
- package/dist/next/host/activity.d.ts.map +0 -1
- package/dist/next/host/activity.js +0 -40
- package/dist/next/host/activity.js.map +0 -1
- package/dist/next/host/adapted.d.ts +0 -49
- package/dist/next/host/adapted.d.ts.map +0 -1
- package/dist/next/host/adapted.js.map +0 -1
- package/dist/next/host/attempt.d.ts +0 -278
- package/dist/next/host/attempt.d.ts.map +0 -1
- package/dist/next/host/attempt.js +0 -1072
- package/dist/next/host/attempt.js.map +0 -1
- package/dist/next/host/backoff.d.ts.map +0 -1
- package/dist/next/host/backoff.js.map +0 -1
- package/dist/next/host/ctx.d.ts +0 -47
- package/dist/next/host/ctx.d.ts.map +0 -1
- package/dist/next/host/ctx.js +0 -108
- package/dist/next/host/ctx.js.map +0 -1
- package/dist/next/host/deadline.d.ts.map +0 -1
- package/dist/next/host/deadline.js.map +0 -1
- package/dist/next/host/dependencies.d.ts.map +0 -1
- package/dist/next/host/dependencies.js.map +0 -1
- package/dist/next/host/destination.d.ts +0 -48
- package/dist/next/host/destination.d.ts.map +0 -1
- package/dist/next/host/destination.js.map +0 -1
- package/dist/next/host/facet.d.ts +0 -79
- package/dist/next/host/facet.d.ts.map +0 -1
- package/dist/next/host/facet.js.map +0 -1
- package/dist/next/host/follow.d.ts +0 -52
- package/dist/next/host/follow.d.ts.map +0 -1
- package/dist/next/host/follow.js.map +0 -1
- package/dist/next/host/host.d.ts +0 -495
- package/dist/next/host/host.d.ts.map +0 -1
- package/dist/next/host/host.js +0 -1075
- package/dist/next/host/host.js.map +0 -1
- package/dist/next/host/index.d.ts +0 -17
- package/dist/next/host/index.d.ts.map +0 -1
- package/dist/next/host/index.js.map +0 -1
- package/dist/next/host/internal.d.ts +0 -10
- package/dist/next/host/internal.d.ts.map +0 -1
- package/dist/next/host/internal.js +0 -8
- package/dist/next/host/internal.js.map +0 -1
- package/dist/next/host/members.d.ts +0 -50
- package/dist/next/host/members.d.ts.map +0 -1
- package/dist/next/host/members.js.map +0 -1
- package/dist/next/host/native.d.ts +0 -55
- package/dist/next/host/native.d.ts.map +0 -1
- package/dist/next/host/native.js +0 -92
- package/dist/next/host/native.js.map +0 -1
- package/dist/next/host/object.d.ts +0 -290
- package/dist/next/host/object.d.ts.map +0 -1
- package/dist/next/host/object.js +0 -1127
- package/dist/next/host/object.js.map +0 -1
- package/dist/next/host/parked.d.ts +0 -23
- package/dist/next/host/parked.d.ts.map +0 -1
- package/dist/next/host/parked.js.map +0 -1
- package/dist/next/host/presence.d.ts +0 -34
- package/dist/next/host/presence.d.ts.map +0 -1
- package/dist/next/host/presence.js.map +0 -1
- package/dist/next/host/ref-state.d.ts +0 -53
- package/dist/next/host/ref-state.d.ts.map +0 -1
- package/dist/next/host/ref-state.js +0 -83
- package/dist/next/host/ref-state.js.map +0 -1
- package/dist/next/host/reference-keys.d.ts +0 -36
- package/dist/next/host/reference-keys.d.ts.map +0 -1
- package/dist/next/host/reference-keys.js +0 -168
- package/dist/next/host/reference-keys.js.map +0 -1
- package/dist/next/host/reference-source.d.ts +0 -65
- package/dist/next/host/reference-source.d.ts.map +0 -1
- package/dist/next/host/reference-source.js +0 -285
- package/dist/next/host/reference-source.js.map +0 -1
- package/dist/next/host/reference.d.ts +0 -308
- package/dist/next/host/reference.d.ts.map +0 -1
- package/dist/next/host/reference.js +0 -775
- package/dist/next/host/reference.js.map +0 -1
- package/dist/next/host/retry-on.d.ts.map +0 -1
- package/dist/next/host/retry-on.js.map +0 -1
- package/dist/next/host/revocation.d.ts +0 -16
- package/dist/next/host/revocation.d.ts.map +0 -1
- package/dist/next/host/revocation.js.map +0 -1
- package/dist/next/host/root.d.ts +0 -27
- package/dist/next/host/root.d.ts.map +0 -1
- package/dist/next/host/root.js +0 -68
- package/dist/next/host/root.js.map +0 -1
- package/dist/next/host/route.d.ts +0 -64
- package/dist/next/host/route.d.ts.map +0 -1
- package/dist/next/host/route.js +0 -190
- package/dist/next/host/route.js.map +0 -1
- package/dist/next/host/routines.d.ts +0 -76
- package/dist/next/host/routines.d.ts.map +0 -1
- package/dist/next/host/routines.js +0 -350
- package/dist/next/host/routines.js.map +0 -1
- package/dist/next/host/sleep.d.ts +0 -9
- package/dist/next/host/sleep.d.ts.map +0 -1
- package/dist/next/host/sleep.js.map +0 -1
- package/dist/next/host/staging.d.ts +0 -94
- package/dist/next/host/staging.d.ts.map +0 -1
- package/dist/next/host/staging.js +0 -302
- package/dist/next/host/staging.js.map +0 -1
- package/dist/next/host/unbound.d.ts +0 -30
- package/dist/next/host/unbound.d.ts.map +0 -1
- package/dist/next/host/unbound.js +0 -67
- package/dist/next/host/unbound.js.map +0 -1
- package/dist/next/host/uuid.d.ts.map +0 -1
- package/dist/next/host/uuid.js.map +0 -1
- package/dist/next/index.d.ts +0 -28
- package/dist/next/index.d.ts.map +0 -1
- package/dist/next/index.js +0 -18
- package/dist/next/index.js.map +0 -1
- package/dist/next/jobs/definition.d.ts.map +0 -1
- package/dist/next/jobs/definition.js.map +0 -1
- package/dist/next/jobs/index.d.ts.map +0 -1
- package/dist/next/jobs/index.js.map +0 -1
- package/dist/next/jobs/internal.d.ts.map +0 -1
- package/dist/next/jobs/internal.js.map +0 -1
- package/dist/next/jobs/job.d.ts +0 -152
- package/dist/next/jobs/job.d.ts.map +0 -1
- package/dist/next/jobs/job.js +0 -320
- package/dist/next/jobs/job.js.map +0 -1
- package/dist/next/jobs/persisted.d.ts +0 -38
- package/dist/next/jobs/persisted.d.ts.map +0 -1
- package/dist/next/jobs/persisted.js.map +0 -1
- package/dist/next/jobs/records.d.ts +0 -231
- package/dist/next/jobs/records.d.ts.map +0 -1
- package/dist/next/jobs/records.js +0 -869
- package/dist/next/jobs/records.js.map +0 -1
- package/dist/next/jobs/run-states.d.ts +0 -69
- package/dist/next/jobs/run-states.d.ts.map +0 -1
- package/dist/next/jobs/run-states.js +0 -228
- package/dist/next/jobs/run-states.js.map +0 -1
- package/dist/next/jobs/run.d.ts +0 -113
- package/dist/next/jobs/run.d.ts.map +0 -1
- package/dist/next/jobs/run.js +0 -200
- package/dist/next/jobs/run.js.map +0 -1
- package/dist/next/jobs/running.d.ts +0 -44
- package/dist/next/jobs/running.d.ts.map +0 -1
- package/dist/next/jobs/running.js.map +0 -1
- package/dist/next/jobs/stored.d.ts +0 -63
- package/dist/next/jobs/stored.d.ts.map +0 -1
- package/dist/next/jobs/stored.js.map +0 -1
- package/dist/next/link/binary.d.ts.map +0 -1
- package/dist/next/link/binary.js +0 -534
- package/dist/next/link/binary.js.map +0 -1
- package/dist/next/link/channel.d.ts +0 -63
- package/dist/next/link/channel.d.ts.map +0 -1
- package/dist/next/link/channel.js +0 -202
- package/dist/next/link/channel.js.map +0 -1
- package/dist/next/link/errors.d.ts.map +0 -1
- package/dist/next/link/errors.js.map +0 -1
- package/dist/next/link/index.d.ts.map +0 -1
- package/dist/next/link/index.js.map +0 -1
- package/dist/next/link/internal.d.ts.map +0 -1
- package/dist/next/link/internal.js.map +0 -1
- package/dist/next/link/ipc.d.ts.map +0 -1
- package/dist/next/link/ipc.js.map +0 -1
- package/dist/next/link/link.d.ts.map +0 -1
- package/dist/next/link/link.js.map +0 -1
- package/dist/next/link/message.d.ts +0 -249
- package/dist/next/link/message.d.ts.map +0 -1
- package/dist/next/link/message.js +0 -123
- package/dist/next/link/message.js.map +0 -1
- package/dist/next/link/part.d.ts +0 -80
- package/dist/next/link/part.d.ts.map +0 -1
- package/dist/next/link/part.js +0 -164
- package/dist/next/link/part.js.map +0 -1
- package/dist/next/link/text.d.ts.map +0 -1
- package/dist/next/link/text.js +0 -335
- package/dist/next/link/text.js.map +0 -1
- package/dist/next/link/values.d.ts.map +0 -1
- package/dist/next/link/values.js +0 -117
- package/dist/next/link/values.js.map +0 -1
- package/dist/next/link/websocket.d.ts.map +0 -1
- package/dist/next/link/websocket.js.map +0 -1
- package/dist/next/registries/contribution.d.ts.map +0 -1
- package/dist/next/registries/contribution.js.map +0 -1
- package/dist/next/registries/entries.d.ts.map +0 -1
- package/dist/next/registries/entries.js.map +0 -1
- package/dist/next/registries/index.d.ts.map +0 -1
- package/dist/next/registries/index.js.map +0 -1
- package/dist/next/registries/internal.d.ts.map +0 -1
- package/dist/next/registries/internal.js.map +0 -1
- package/dist/next/registries/record.d.ts +0 -94
- package/dist/next/registries/record.d.ts.map +0 -1
- package/dist/next/registries/record.js +0 -253
- package/dist/next/registries/record.js.map +0 -1
- package/dist/next/registries/registry.d.ts +0 -74
- package/dist/next/registries/registry.d.ts.map +0 -1
- package/dist/next/registries/registry.js.map +0 -1
- package/dist/next/registries/value.d.ts.map +0 -1
- package/dist/next/registries/value.js +0 -199
- package/dist/next/registries/value.js.map +0 -1
- package/dist/next/remote/calls.d.ts.map +0 -1
- package/dist/next/remote/calls.js.map +0 -1
- package/dist/next/remote/consumer.d.ts +0 -42
- package/dist/next/remote/consumer.d.ts.map +0 -1
- package/dist/next/remote/consumer.js +0 -343
- package/dist/next/remote/consumer.js.map +0 -1
- package/dist/next/remote/hold.d.ts +0 -130
- package/dist/next/remote/hold.d.ts.map +0 -1
- package/dist/next/remote/hold.js +0 -537
- package/dist/next/remote/hold.js.map +0 -1
- package/dist/next/remote/host-link.d.ts +0 -77
- package/dist/next/remote/host-link.d.ts.map +0 -1
- package/dist/next/remote/host-link.js +0 -182
- package/dist/next/remote/host-link.js.map +0 -1
- package/dist/next/remote/internal.d.ts.map +0 -1
- package/dist/next/remote/internal.js.map +0 -1
- package/dist/next/remote/path.d.ts.map +0 -1
- package/dist/next/remote/path.js.map +0 -1
- package/dist/next/remote/provider.d.ts +0 -76
- package/dist/next/remote/provider.d.ts.map +0 -1
- package/dist/next/remote/provider.js +0 -506
- package/dist/next/remote/provider.js.map +0 -1
- package/dist/next/remote/relay.d.ts +0 -58
- package/dist/next/remote/relay.d.ts.map +0 -1
- package/dist/next/remote/relay.js +0 -117
- package/dist/next/remote/relay.js.map +0 -1
- package/dist/next/remote/remote-object.d.ts +0 -133
- package/dist/next/remote/remote-object.d.ts.map +0 -1
- package/dist/next/remote/remote-object.js +0 -411
- package/dist/next/remote/remote-object.js.map +0 -1
- package/dist/next/remote/replica.d.ts +0 -59
- package/dist/next/remote/replica.d.ts.map +0 -1
- package/dist/next/remote/replica.js +0 -125
- package/dist/next/remote/replica.js.map +0 -1
- package/dist/next/state/batch.d.ts +0 -64
- package/dist/next/state/batch.d.ts.map +0 -1
- package/dist/next/state/batch.js +0 -163
- package/dist/next/state/batch.js.map +0 -1
- package/dist/next/state/derive.d.ts +0 -52
- package/dist/next/state/derive.d.ts.map +0 -1
- package/dist/next/state/derive.js +0 -182
- package/dist/next/state/derive.js.map +0 -1
- package/dist/next/state/index.d.ts +0 -6
- package/dist/next/state/index.d.ts.map +0 -1
- package/dist/next/state/index.js.map +0 -1
- package/dist/next/state/internal.d.ts.map +0 -1
- package/dist/next/state/internal.js.map +0 -1
- package/dist/next/state/native-source.d.ts +0 -106
- package/dist/next/state/native-source.d.ts.map +0 -1
- package/dist/next/state/native-source.js +0 -240
- package/dist/next/state/native-source.js.map +0 -1
- package/dist/next/state/watchable.d.ts +0 -114
- package/dist/next/state/watchable.d.ts.map +0 -1
- package/dist/next/state/watchable.js +0 -156
- package/dist/next/state/watchable.js.map +0 -1
- package/dist/next/state/writable.d.ts +0 -32
- package/dist/next/state/writable.d.ts.map +0 -1
- package/dist/next/state/writable.js.map +0 -1
- package/dist/next/store/adapter.d.ts +0 -67
- package/dist/next/store/adapter.d.ts.map +0 -1
- package/dist/next/store/adapter.js.map +0 -1
- package/dist/next/store/allocator.d.ts.map +0 -1
- package/dist/next/store/allocator.js.map +0 -1
- package/dist/next/store/applier.d.ts.map +0 -1
- package/dist/next/store/applier.js.map +0 -1
- package/dist/next/store/apply-batch.d.ts +0 -12
- package/dist/next/store/apply-batch.d.ts.map +0 -1
- package/dist/next/store/apply-batch.js.map +0 -1
- package/dist/next/store/archive.d.ts +0 -32
- package/dist/next/store/archive.d.ts.map +0 -1
- package/dist/next/store/archive.js +0 -129
- package/dist/next/store/archive.js.map +0 -1
- package/dist/next/store/backend.d.ts +0 -10
- package/dist/next/store/backend.d.ts.map +0 -1
- package/dist/next/store/backend.js.map +0 -1
- package/dist/next/store/catalog.d.ts +0 -24
- package/dist/next/store/catalog.d.ts.map +0 -1
- package/dist/next/store/catalog.js.map +0 -1
- package/dist/next/store/claims.d.ts.map +0 -1
- package/dist/next/store/claims.js.map +0 -1
- package/dist/next/store/columns.d.ts.map +0 -1
- package/dist/next/store/columns.js.map +0 -1
- package/dist/next/store/engine.d.ts +0 -176
- package/dist/next/store/engine.d.ts.map +0 -1
- package/dist/next/store/engine.js +0 -283
- package/dist/next/store/engine.js.map +0 -1
- package/dist/next/store/evaluate.d.ts +0 -17
- package/dist/next/store/evaluate.d.ts.map +0 -1
- package/dist/next/store/evaluate.js.map +0 -1
- package/dist/next/store/export.d.ts +0 -17
- package/dist/next/store/export.d.ts.map +0 -1
- package/dist/next/store/export.js +0 -200
- package/dist/next/store/export.js.map +0 -1
- package/dist/next/store/expression.d.ts +0 -150
- package/dist/next/store/expression.d.ts.map +0 -1
- package/dist/next/store/expression.js.map +0 -1
- package/dist/next/store/import.d.ts +0 -10
- package/dist/next/store/import.d.ts.map +0 -1
- package/dist/next/store/import.js +0 -276
- package/dist/next/store/import.js.map +0 -1
- package/dist/next/store/index.d.ts.map +0 -1
- package/dist/next/store/index.js.map +0 -1
- package/dist/next/store/json-column.d.ts +0 -33
- package/dist/next/store/json-column.d.ts.map +0 -1
- package/dist/next/store/json-column.js +0 -61
- package/dist/next/store/json-column.js.map +0 -1
- package/dist/next/store/jsonl.d.ts.map +0 -1
- package/dist/next/store/jsonl.js.map +0 -1
- package/dist/next/store/outbox.d.ts +0 -26
- package/dist/next/store/outbox.d.ts.map +0 -1
- package/dist/next/store/outbox.js.map +0 -1
- package/dist/next/store/query.d.ts +0 -39
- package/dist/next/store/query.d.ts.map +0 -1
- package/dist/next/store/query.js.map +0 -1
- package/dist/next/store/refusal.d.ts.map +0 -1
- package/dist/next/store/refusal.js.map +0 -1
- package/dist/next/store/rows.d.ts +0 -80
- package/dist/next/store/rows.d.ts.map +0 -1
- package/dist/next/store/rows.js.map +0 -1
- package/dist/next/store/schema.d.ts +0 -25
- package/dist/next/store/schema.d.ts.map +0 -1
- package/dist/next/store/schema.js +0 -115
- package/dist/next/store/schema.js.map +0 -1
- package/dist/next/store/sql.d.ts +0 -73
- package/dist/next/store/sql.d.ts.map +0 -1
- package/dist/next/store/sql.js.map +0 -1
- package/dist/next/store/step.d.ts +0 -48
- package/dist/next/store/step.d.ts.map +0 -1
- package/dist/next/store/step.js +0 -50
- package/dist/next/store/step.js.map +0 -1
- package/dist/next/store/store.d.ts +0 -161
- package/dist/next/store/store.d.ts.map +0 -1
- package/dist/next/store/store.js +0 -627
- package/dist/next/store/store.js.map +0 -1
- package/dist/next/store/table-changes.d.ts +0 -29
- package/dist/next/store/table-changes.d.ts.map +0 -1
- package/dist/next/store/table-changes.js.map +0 -1
- package/dist/next/store/table-evolve.d.ts.map +0 -1
- package/dist/next/store/table-evolve.js.map +0 -1
- package/dist/next/store/table-handle.d.ts +0 -67
- package/dist/next/store/table-handle.d.ts.map +0 -1
- package/dist/next/store/table-handle.js +0 -101
- package/dist/next/store/table-handle.js.map +0 -1
- package/dist/next/store/table-history.d.ts.map +0 -1
- package/dist/next/store/table-history.js.map +0 -1
- package/dist/next/store/table-migration.d.ts +0 -16
- package/dist/next/store/table-migration.d.ts.map +0 -1
- package/dist/next/store/table-migration.js +0 -202
- package/dist/next/store/table-migration.js.map +0 -1
- package/dist/next/store/table-writes.d.ts.map +0 -1
- package/dist/next/store/table-writes.js +0 -165
- package/dist/next/store/table-writes.js.map +0 -1
- package/dist/next/store/table.d.ts +0 -80
- package/dist/next/store/table.d.ts.map +0 -1
- package/dist/next/store/table.js.map +0 -1
- package/dist/next/store/text.d.ts.map +0 -1
- package/dist/next/store/text.js.map +0 -1
- package/dist/next/store/writes.d.ts.map +0 -1
- package/dist/next/store/writes.js.map +0 -1
- package/dist/next-node/compression.d.ts +0 -7
- package/dist/next-node/compression.d.ts.map +0 -1
- package/dist/next-node/compression.js +0 -24
- package/dist/next-node/compression.js.map +0 -1
- package/dist/next-node/http/admission.d.ts.map +0 -1
- package/dist/next-node/http/admission.js.map +0 -1
- package/dist/next-node/http/authenticate.d.ts +0 -21
- package/dist/next-node/http/authenticate.d.ts.map +0 -1
- package/dist/next-node/http/authenticate.js +0 -34
- package/dist/next-node/http/authenticate.js.map +0 -1
- package/dist/next-node/http/cookies.d.ts +0 -24
- package/dist/next-node/http/cookies.d.ts.map +0 -1
- package/dist/next-node/http/cookies.js +0 -62
- package/dist/next-node/http/cookies.js.map +0 -1
- package/dist/next-node/http/file.d.ts.map +0 -1
- package/dist/next-node/http/file.js.map +0 -1
- package/dist/next-node/http/headers.d.ts.map +0 -1
- package/dist/next-node/http/headers.js +0 -129
- package/dist/next-node/http/headers.js.map +0 -1
- package/dist/next-node/http/http.d.ts +0 -100
- package/dist/next-node/http/http.d.ts.map +0 -1
- package/dist/next-node/http/http.js +0 -462
- package/dist/next-node/http/http.js.map +0 -1
- package/dist/next-node/http/incoming.d.ts.map +0 -1
- package/dist/next-node/http/incoming.js.map +0 -1
- package/dist/next-node/http/index.d.ts +0 -11
- package/dist/next-node/http/index.d.ts.map +0 -1
- package/dist/next-node/http/index.js +0 -12
- package/dist/next-node/http/index.js.map +0 -1
- package/dist/next-node/http/node.d.ts.map +0 -1
- package/dist/next-node/http/node.js.map +0 -1
- package/dist/next-node/http/request.d.ts +0 -54
- package/dist/next-node/http/request.d.ts.map +0 -1
- package/dist/next-node/http/request.js +0 -116
- package/dist/next-node/http/request.js.map +0 -1
- package/dist/next-node/http/response.d.ts +0 -63
- package/dist/next-node/http/response.d.ts.map +0 -1
- package/dist/next-node/http/response.js.map +0 -1
- package/dist/next-node/http/router.d.ts +0 -114
- package/dist/next-node/http/router.d.ts.map +0 -1
- package/dist/next-node/http/router.js +0 -261
- package/dist/next-node/http/router.js.map +0 -1
- package/dist/next-node/http/upgrades.d.ts +0 -58
- package/dist/next-node/http/upgrades.d.ts.map +0 -1
- package/dist/next-node/http/upgrades.js +0 -184
- package/dist/next-node/http/upgrades.js.map +0 -1
- package/dist/next-node/plugins/build.d.ts +0 -57
- package/dist/next-node/plugins/build.d.ts.map +0 -1
- package/dist/next-node/plugins/build.js +0 -334
- package/dist/next-node/plugins/build.js.map +0 -1
- package/dist/next-node/plugins/discover.d.ts +0 -36
- package/dist/next-node/plugins/discover.d.ts.map +0 -1
- package/dist/next-node/plugins/discover.js +0 -91
- package/dist/next-node/plugins/discover.js.map +0 -1
- package/dist/next-node/plugins/evaluate.d.ts +0 -33
- package/dist/next-node/plugins/evaluate.d.ts.map +0 -1
- package/dist/next-node/plugins/evaluate.js +0 -98
- package/dist/next-node/plugins/evaluate.js.map +0 -1
- package/dist/next-node/plugins/index.d.ts +0 -9
- package/dist/next-node/plugins/index.d.ts.map +0 -1
- package/dist/next-node/plugins/index.js +0 -11
- package/dist/next-node/plugins/index.js.map +0 -1
- package/dist/next-node/plugins/install.d.ts +0 -13
- package/dist/next-node/plugins/install.d.ts.map +0 -1
- package/dist/next-node/plugins/install.js +0 -37
- package/dist/next-node/plugins/install.js.map +0 -1
- package/dist/next-node/plugins/plugins.d.ts +0 -135
- package/dist/next-node/plugins/plugins.d.ts.map +0 -1
- package/dist/next-node/plugins/plugins.js +0 -206
- package/dist/next-node/plugins/plugins.js.map +0 -1
- package/dist/next-node/plugins/runtime.d.ts +0 -41
- package/dist/next-node/plugins/runtime.d.ts.map +0 -1
- package/dist/next-node/plugins/runtime.js +0 -136
- package/dist/next-node/plugins/runtime.js.map +0 -1
- package/dist/next-node/plugins/stack.d.ts.map +0 -1
- package/dist/next-node/plugins/stack.js.map +0 -1
- package/dist/next-node/plugins/watcher.d.ts +0 -58
- package/dist/next-node/plugins/watcher.d.ts.map +0 -1
- package/dist/next-node/plugins/watcher.js +0 -281
- package/dist/next-node/plugins/watcher.js.map +0 -1
- package/dist/next-node/workers/control.d.ts +0 -83
- package/dist/next-node/workers/control.d.ts.map +0 -1
- package/dist/next-node/workers/control.js +0 -77
- package/dist/next-node/workers/control.js.map +0 -1
- package/dist/next-node/workers/index.d.ts +0 -5
- package/dist/next-node/workers/index.d.ts.map +0 -1
- package/dist/next-node/workers/index.js +0 -7
- package/dist/next-node/workers/index.js.map +0 -1
- package/dist/next-node/workers/lock.d.ts +0 -21
- package/dist/next-node/workers/lock.d.ts.map +0 -1
- package/dist/next-node/workers/lock.js +0 -137
- package/dist/next-node/workers/lock.js.map +0 -1
- package/dist/next-node/workers/main.d.ts +0 -46
- package/dist/next-node/workers/main.d.ts.map +0 -1
- package/dist/next-node/workers/main.js +0 -230
- package/dist/next-node/workers/main.js.map +0 -1
- package/dist/next-node/workers/process.d.ts +0 -42
- package/dist/next-node/workers/process.d.ts.map +0 -1
- package/dist/next-node/workers/process.js +0 -125
- package/dist/next-node/workers/process.js.map +0 -1
- package/dist/next-node/workers/workers.d.ts +0 -80
- package/dist/next-node/workers/workers.d.ts.map +0 -1
- package/dist/next-node/workers/workers.js +0 -572
- package/dist/next-node/workers/workers.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 -1570
- 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 -25
- package/dist/schema.d.ts.map +0 -1
- package/dist/schema.js +0 -403
- 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 -197
- package/dist/wire.d.ts.map +0 -1
- package/dist/wire.js +0 -166
- package/dist/wire.js.map +0 -1
- package/docs/guide.md +0 -814
- package/docs/next/benchmarks.md +0 -959
- package/docs/next/decisions.md +0 -2957
- package/docs/next/dependencies/book.md +0 -1671
- package/docs/next/dependencies/index.html +0 -2641
- package/docs/next/design.md +0 -2554
- package/docs/next/durable-observers/book.md +0 -432
- package/docs/next/durable-observers/index.html +0 -517
- package/docs/next/guide-plugins-hosts/book.md +0 -607
- package/docs/next/guide-plugins-hosts/index.html +0 -652
- package/docs/next/http-workers/book.md +0 -378
- package/docs/next/http-workers/index.html +0 -515
- package/docs/next/layer-1.md +0 -311
- package/docs/next/layer-2.md +0 -216
- package/docs/next/plugin-model/book.md +0 -186
- package/docs/next/plugin-model/index.html +0 -310
- package/docs/next/plugin-primer/book.md +0 -273
- package/docs/next/plugin-primer/index.html +0 -430
- package/docs/next/slice-1.md +0 -236
- package/docs/next/slice-10.md +0 -285
- package/docs/next/slice-11.md +0 -93
- package/docs/next/slice-2.md +0 -174
- package/docs/next/slice-3a.md +0 -296
- package/docs/next/slice-3b.md +0 -197
- package/docs/next/slice-4a.md +0 -418
- package/docs/next/slice-4b.md +0 -208
- package/docs/next/slice-6a.md +0 -676
- package/docs/next/slice-6b.md +0 -332
- package/docs/next/slice-7b/book.md +0 -608
- package/docs/next/slice-7b/index.html +0 -842
- package/docs/next/slice-7b.md +0 -255
- package/docs/next/slice-7c.md +0 -165
- package/docs/next/slices.md +0 -230
- package/docs/next/store/book.md +0 -665
- package/docs/next/store/index.html +0 -861
- package/docs/next/store/walkthrough.md +0 -193
- package/docs/spec.md +0 -288
- package/docs/tutorial.md +0 -932
- /package/dist/{next/contracts → contracts}/accepts.js +0 -0
- /package/dist/{next/contracts → contracts}/contract.js +0 -0
- /package/dist/{next/contracts → contracts}/declare.d.ts +0 -0
- /package/dist/{next/contracts → contracts}/declare.js +0 -0
- /package/dist/{next/contracts → contracts}/evolve.d.ts +0 -0
- /package/dist/{next/contracts → contracts}/evolve.js +0 -0
- /package/dist/{next/contracts → contracts}/fingerprint.js +0 -0
- /package/dist/{next/contracts → contracts}/history.d.ts +0 -0
- /package/dist/{next/contracts → contracts}/history.js +0 -0
- /package/dist/{next/contracts → contracts}/host-kind.d.ts +0 -0
- /package/dist/{next/contracts → contracts}/host-kind.js +0 -0
- /package/dist/{next/contracts → contracts}/index.d.ts +0 -0
- /package/dist/{next/contracts → contracts}/index.js +0 -0
- /package/dist/{next/contracts → contracts}/internal.d.ts +0 -0
- /package/dist/{next/contracts → contracts}/internal.js +0 -0
- /package/dist/{next/contracts → contracts}/names.d.ts +0 -0
- /package/dist/{next/contracts → contracts}/names.js +0 -0
- /package/dist/{next/contracts → contracts}/params.js +0 -0
- /package/dist/{next/contracts → contracts}/schema.d.ts +0 -0
- /package/dist/{next/contracts → contracts}/schema.js +0 -0
- /package/dist/{next/data → data}/args.js +0 -0
- /package/dist/{next/data → data}/failure.d.ts +0 -0
- /package/dist/{next/data → data}/params.js +0 -0
- /package/dist/{next/documents → documents}/address-source.js +0 -0
- /package/dist/{next/documents → documents}/fence.d.ts +0 -0
- /package/dist/{next/documents → documents}/fence.js +0 -0
- /package/dist/{next/documents → documents}/handles.js +0 -0
- /package/dist/{next/documents → documents}/index.d.ts +0 -0
- /package/dist/{next/documents → documents}/index.js +0 -0
- /package/dist/{next/documents → documents}/internal.js +0 -0
- /package/dist/{next/documents → documents}/line.d.ts +0 -0
- /package/dist/{next/documents → documents}/line.js +0 -0
- /package/dist/{next/documents → documents}/residency.js +0 -0
- /package/dist/{next/host → host}/adapted.js +0 -0
- /package/dist/{next/host → host}/backoff.d.ts +0 -0
- /package/dist/{next/host → host}/backoff.js +0 -0
- /package/dist/{next/host → host}/deadline.d.ts +0 -0
- /package/dist/{next/host → host}/deadline.js +0 -0
- /package/dist/{next/host → host}/dependencies.d.ts +0 -0
- /package/dist/{next/host → host}/dependencies.js +0 -0
- /package/dist/{next/host → host}/destination.js +0 -0
- /package/dist/{next/host → host}/facet.js +0 -0
- /package/dist/{next/host → host}/follow.js +0 -0
- /package/dist/{next/host → host}/index.js +0 -0
- /package/dist/{next/host → host}/members.js +0 -0
- /package/dist/{next/host → host}/parked.js +0 -0
- /package/dist/{next/host → host}/presence.js +0 -0
- /package/dist/{next/host → host}/retry-on.d.ts +0 -0
- /package/dist/{next/host → host}/retry-on.js +0 -0
- /package/dist/{next/host → host}/revocation.js +0 -0
- /package/dist/{next/host → host}/sleep.js +0 -0
- /package/dist/{next/host → host}/uuid.d.ts +0 -0
- /package/dist/{next/host → host}/uuid.js +0 -0
- /package/dist/{next/jobs → jobs}/definition.d.ts +0 -0
- /package/dist/{next/jobs → jobs}/definition.js +0 -0
- /package/dist/{next/jobs → jobs}/index.d.ts +0 -0
- /package/dist/{next/jobs → jobs}/index.js +0 -0
- /package/dist/{next/jobs → jobs}/internal.d.ts +0 -0
- /package/dist/{next/jobs → jobs}/internal.js +0 -0
- /package/dist/{next/jobs → jobs}/persisted.js +0 -0
- /package/dist/{next/jobs → jobs}/running.js +0 -0
- /package/dist/{next/jobs → jobs}/stored.js +0 -0
- /package/dist/{next/link → link}/binary.d.ts +0 -0
- /package/dist/{next/link → link}/errors.d.ts +0 -0
- /package/dist/{next/link → link}/errors.js +0 -0
- /package/dist/{next/link → link}/index.d.ts +0 -0
- /package/dist/{next/link → link}/index.js +0 -0
- /package/dist/{next/link → link}/internal.d.ts +0 -0
- /package/dist/{next/link → link}/internal.js +0 -0
- /package/dist/{next/link → link}/ipc.d.ts +0 -0
- /package/dist/{next/link → link}/ipc.js +0 -0
- /package/dist/{next/link → link}/link.d.ts +0 -0
- /package/dist/{next/link → link}/link.js +0 -0
- /package/dist/{next/link → link}/text.d.ts +0 -0
- /package/dist/{next/link → link}/values.d.ts +0 -0
- /package/dist/{next/link → link}/websocket.d.ts +0 -0
- /package/dist/{next/link → link}/websocket.js +0 -0
- /package/dist/{next-node → node}/http/admission.d.ts +0 -0
- /package/dist/{next-node → node}/http/admission.js +0 -0
- /package/dist/{next-node → node}/http/file.d.ts +0 -0
- /package/dist/{next-node → node}/http/file.js +0 -0
- /package/dist/{next-node → node}/http/headers.d.ts +0 -0
- /package/dist/{next-node → node}/http/incoming.d.ts +0 -0
- /package/dist/{next-node → node}/http/incoming.js +0 -0
- /package/dist/{next-node → node}/http/node.d.ts +0 -0
- /package/dist/{next-node → node}/http/node.js +0 -0
- /package/dist/{next-node → node}/http/response.js +0 -0
- /package/dist/{next-node → node}/plugins/stack.d.ts +0 -0
- /package/dist/{next-node → node}/plugins/stack.js +0 -0
- /package/dist/{next/registries → registries}/contribution.d.ts +0 -0
- /package/dist/{next/registries → registries}/contribution.js +0 -0
- /package/dist/{next/registries → registries}/entries.d.ts +0 -0
- /package/dist/{next/registries → registries}/entries.js +0 -0
- /package/dist/{next/registries → registries}/index.d.ts +0 -0
- /package/dist/{next/registries → registries}/index.js +0 -0
- /package/dist/{next/registries → registries}/internal.d.ts +0 -0
- /package/dist/{next/registries → registries}/internal.js +0 -0
- /package/dist/{next/registries → registries}/registry.js +0 -0
- /package/dist/{next/registries → registries}/value.d.ts +0 -0
- /package/dist/{next/remote → remote}/calls.d.ts +0 -0
- /package/dist/{next/remote → remote}/calls.js +0 -0
- /package/dist/{next/remote → remote}/internal.d.ts +0 -0
- /package/dist/{next/remote → remote}/internal.js +0 -0
- /package/dist/{next/remote → remote}/path.d.ts +0 -0
- /package/dist/{next/remote → remote}/path.js +0 -0
- /package/dist/{next/state → state}/index.js +0 -0
- /package/dist/{next/state → state}/internal.d.ts +0 -0
- /package/dist/{next/state → state}/internal.js +0 -0
- /package/dist/{next/state → state}/writable.js +0 -0
- /package/dist/{next/store → store}/adapter.js +0 -0
- /package/dist/{next/store → store}/allocator.d.ts +0 -0
- /package/dist/{next/store → store}/allocator.js +0 -0
- /package/dist/{next/store → store}/applier.d.ts +0 -0
- /package/dist/{next/store → store}/applier.js +0 -0
- /package/dist/{next/store → store}/apply-batch.js +0 -0
- /package/dist/{next/store → store}/backend.js +0 -0
- /package/dist/{next/store → store}/catalog.js +0 -0
- /package/dist/{next/store → store}/claims.d.ts +0 -0
- /package/dist/{next/store → store}/claims.js +0 -0
- /package/dist/{next/store → store}/columns.d.ts +0 -0
- /package/dist/{next/store → store}/columns.js +0 -0
- /package/dist/{next/store → store}/evaluate.js +0 -0
- /package/dist/{next/store → store}/expression.js +0 -0
- /package/dist/{next/store → store}/index.d.ts +0 -0
- /package/dist/{next/store → store}/index.js +0 -0
- /package/dist/{next/store → store}/jsonl.d.ts +0 -0
- /package/dist/{next/store → store}/jsonl.js +0 -0
- /package/dist/{next/store → store}/outbox.js +0 -0
- /package/dist/{next/store → store}/query.js +0 -0
- /package/dist/{next/store → store}/refusal.d.ts +0 -0
- /package/dist/{next/store → store}/refusal.js +0 -0
- /package/dist/{next/store → store}/rows.js +0 -0
- /package/dist/{next/store → store}/sql.js +0 -0
- /package/dist/{next/store → store}/table-changes.js +0 -0
- /package/dist/{next/store → store}/table-evolve.d.ts +0 -0
- /package/dist/{next/store → store}/table-evolve.js +0 -0
- /package/dist/{next/store → store}/table-history.d.ts +0 -0
- /package/dist/{next/store → store}/table-history.js +0 -0
- /package/dist/{next/store → store}/table-writes.d.ts +0 -0
- /package/dist/{next/store → store}/table.js +0 -0
- /package/dist/{next/store → store}/text.d.ts +0 -0
- /package/dist/{next/store → store}/text.js +0 -0
- /package/dist/{next/store → store}/writes.d.ts +0 -0
- /package/dist/{next/store → store}/writes.js +0 -0
- /package/docs/{next/dependencies → dependencies}/model.md +0 -0
- /package/docs/{next/flow-control → flow-control}/book.md +0 -0
- /package/docs/{next/flow-control → flow-control}/fold/index.html +0 -0
- /package/docs/{next/flow-control → flow-control}/index.html +0 -0
- /package/docs/{next/flow-control → flow-control}/window/index.html +0 -0
- /package/docs/{next/slice-4.md → slice-4.md} +0 -0
- /package/docs/{next/slice-5.md → slice-5.md} +0 -0
- /package/docs/{next/slice-7a.md → slice-7a.md} +0 -0
- /package/docs/{next/slice-8.md → slice-8.md} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deadline.d.ts","sourceRoot":"","sources":["../../src/host/deadline.ts"],"names":[],"mappings":"AAGA,0FAA0F;AAC1F,qBAAa,QAAQ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C,MAAM,CAAC,CAAC;QAC1B,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;QACxB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACtB,CAAC;IAED,MAAM;QACL,IAAI,CAAC,QAAQ,GAAG,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 @@
|
|
|
1
|
+
{"version":3,"file":"dependencies.d.ts","sourceRoot":"","sources":["../../src/host/dependencies.ts"],"names":[],"mappings":"AAMA,OAAO,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AAE,CAAC;IACpB,MAAM,CAAgC;IAC/C,0CAA0C;IAC1C,QAAQ,CAAsB;IAE9B,YAAY,MAAmB;QAC9B,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,GAAG,EAAE;YAC7B,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC;YAC9B,IAAI,OAAO,KAAK,SAAS;gBAAE,OAAO;YAClC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;YACjC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;gBAClB,IAAI,EAAE,aAAa;gBACnB,MAAM,EAAE,MAAM,CAAC,KAAK;gBACpB,UAAU,EAAE,KAAK;gBACjB,KAAK;gBACL,KAAK,EAAE,IAAI,CAAC,MAAM;aAClB,CAAC,CAAC;QACJ,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;IAED,4CAA4C;IAC5C,SAAS,CAAC,OAAgB;QACzB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,gDAAgD;IAChD,IAAI;QACH,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC3B,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
|
+
//# sour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AC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACvC,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AACrH,CAAC","sourcesContent":["// Destination (§3, section 1's table; dependency model §1): where a reference made on a host, or a hold arriving on one\n// of its links, goes, by address alone: here when the address is this host's (served here or not), else over the\n// route of its host address's kind, or over the parent link; and the check that an object served here lives here.\n\nimport type { Context } from \"../context/index.ts\";\nimport type { Address, Contract, ParamsOf } from \"../contracts/index.ts\";\nimport { contractData } from \"../contracts/internal.ts\";\nimport { ChordError, type Principal } from \"../data/index.ts\";\nimport { invalid } from \"../data/internal.ts\";\nimport type { WireAddress } from \"../link/internal.ts\";\nimport type { HoldRequest, HostLink, Path } from \"../remote/internal.ts\";\nimport type { Route } from \"./route.ts\";\n\n/** Where something is placed: here, or over a path (with the host address it was computed or named with). */\nexport type Placed =\n\t| { readonly kind: \"here\" }\n\t| { readonly kind: \"path\"; readonly path: Path; readonly address: WireAddress };\n\n/** A host's destinations: its address, its routes and its parent path, as the host keeps them. */\nexport class Destination {\n\treadonly #address: Address | undefined;\n\treadonly #routes: ReadonlyMap<string, Route>;\n\treadonly #parent: Path;\n\n\tconstructor(address: Address | undefined, routes: ReadonlyMap<string, Route>, parent: Path) {\n\t\tthis.#address = address;\n\t\tthis.#routes = routes;\n\t\tthis.#parent = parent;\n\t}\n\n\t/**\n\t * Where a reference to `Type` with `params` made as `principal` goes: here for a local type, and for a remote type\n\t * whose host address is this host's, served here or not (the check against what is served is the host's); otherwise\n\t * over the route of its host address's kind, or over the parent link (the host address decides where an object\n\t * lives: a worker reaches another worker's object of a type it serves too). Throws `invalid/host_address` for a host\n\t * address whose params do not fit its kind, `forbidden` when the route refuses, and what a `hostAddress` or\n\t * `authorize` throws.\n\t */\n\treference(Type: Contract, params: ParamsOf<Contract>, principal: Principal | undefined, context: Context): Placed {\n\t\tif (Type.kind === \"local\") return HERE;\n\t\tconst address = hostAddressOf(Type, params);\n\t\tif (this.#isHere(address)) return HERE;\n\t\treturn { kind: \"path\", path: this.#pathTo(address, principal, context) ?? this.#parent, address };\n\t}\n\n\t/**\n\t * Whether a reference to `Type` with `params` goes here: a local type, or a remote one whose host address is this\n\t * host's. A `hostAddress` that throws, throws.\n\t */\n\tplacedHere(Type: Contract, params: ParamsOf<Contract>): boolean {\n\t\treturn Type.kind === \"local\" || this.#isHere(hostAddressOf(Type, params));\n\t}\n\n\t/**\n\t * Where a hold arriving on `link` acting as `principal` goes, by the address it names: here when it is this host's\n\t * (a relay never captures a hold for serving the same name); over the route of its kind; else over the parent link\n\t * (waiting for it while it is down), unless it came on the parent link or this host never had one (`unavailable`).\n\t * Throws as `reference` does.\n\t */\n\thold(request: HoldRequest, link: HostLink, principal: Principal | undefined, context: Context): Placed {\n\t\tconst { address } = request;\n\t\tif (this.#isHere(address)) return HERE;\n\t\tconst routed = this.#pathTo(address, principal, context);\n\t\tif (routed !== undefined) return { kind: \"path\", path: routed, address };\n\t\tif (link.role === \"parent\" || !this.#parent.linked) {\n\t\t\tthrow new ChordError({ code: \"unavailable\", message: `${request.type} is not served here` });\n\t\t}\n\t\treturn { kind: \"path\", path: this.#parent, address };\n\t}\n\n\t/**\n\t * The provider's own check of a request placed here for the remote `Type` it serves, with `params` (checked):\n\t * `invalid/host_address` when its `hostAddress` puts the object on another host (code skew: the consumer computed\n\t * this host), `undefined` when it lives here. A `hostAddress` that throws throws (the provider's own code). The\n\t * address a request names only routes it.\n\t */\n\tmisplaced(Type: Contract, params: ParamsOf<Contract>): ChordError | undefined {\n\t\tconst address = hostAddressOf(Type, params);\n\t\tif (this.#isHere(address)) return undefined;\n\t\t// A host serving a remote type has an address (`serve` refuses one without).\n\t\treturn invalid(\"host_address\", `${Type.name}: placed on ${address.kind}, this host is ${this.#address!.key}`);\n\t}\n\n\t/**\n\t * The path to `address` when this host routes its kind (its params checked, `authorize` run for `principal`);\n\t * `undefined` without a route for its kind.\n\t */\n\t#pathTo(address: WireAddress, principal: Principal | undefined, context: Context): Path | undefined {\n\t\treturn this.#routes.get(address.kind)?.path(address.params, principal, context);\n\t}\n\n\t/** Whether an object whose host address is `address` lives here: this host has that address. */\n\t#isHere(address: WireAddress): boolean {\n\t\tconst own = this.#address;\n\t\treturn own !== undefined && sameAddress(own, address);\n\t}\n}\n\nconst HERE: Placed = { kind: \"here\" };\n\n/** The address a remote `Type`'s `hostAddress` computes for `params`. */\nfunction hostAddressOf(Type: Contract, params: ParamsOf<Contract>): WireAddress {\n\t// Every remote contract has one (declaration policy, `remote`).\n\tconst hostAddress = contractData(Type).hostAddress!;\n\t// Plugin code: what it returns is checked where it is routed or served.\n\tconst { kind, params: values } = hostAddress(params) as { readonly kind: string; readonly params: unknown };\n\treturn { kind, params: values };\n}\n\n/** Whether `address` names the host at `own`: the same kind and the same value for each of its params. */\nfunction sameAddress(own: Address, address: WireAddress): boolean {\n\tif (own.kind !== address.kind || typeof address.params !== \"object\" || address.params === null) return false;\n\tconst values = address.params as { readonly [field: string]: unknown };\n\tconst fields = Object.keys(own.params);\n\treturn Object.keys(values).length === fields.length && fields.every((field) => values[field] === own.params[field]);\n}\n"]}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { AcceptsTable, Contract } from "../contracts/index.ts";
|
|
2
|
+
import type { Principal } from "../data/index.ts";
|
|
3
|
+
import type { Contribution, Registry, RegistryProvider } from "../registries/index.ts";
|
|
4
|
+
import type { Watchable } from "../watch.ts";
|
|
5
|
+
import type { Factory } from "./attempt.ts";
|
|
6
|
+
import type { Presence } from "./presence.ts";
|
|
7
|
+
/** What a setup serves types and registries with (valid only while the setup runs), and the host's presence lists. */
|
|
8
|
+
export interface FacetHost<P extends Principal = Principal> {
|
|
9
|
+
/**
|
|
10
|
+
* Serves a type on this host with `factory`; a remote type's factory gets the principal its object is for.
|
|
11
|
+
* `options.accepts` maps the older versions it still serves (checked here: a declaration error rejects the load or
|
|
12
|
+
* the reload).
|
|
13
|
+
*/
|
|
14
|
+
serve<C extends Contract>(Type: C, factory: Factory<C, P>, options?: ServeOptions<C>): void;
|
|
15
|
+
/**
|
|
16
|
+
* Serves registry `R` on this host (its defining plugin's facet, the one provider, D1): `compose` builds the value
|
|
17
|
+
* from the table, `accepts` adapts older versions. A second serve of a registry is refused at `load`.
|
|
18
|
+
*/
|
|
19
|
+
serve<C, V>(R: Registry<C, V>, provider: RegistryProvider<C, V>): void;
|
|
20
|
+
/** `host.references(Type)`: the references to objects of `Type` on this host (§19), for factories to derive from. */
|
|
21
|
+
references<C extends Contract>(Type: C): Watchable<readonly Presence<C, P>[]>;
|
|
22
|
+
}
|
|
23
|
+
/** What `host.serve` takes besides the type and the factory. */
|
|
24
|
+
export type ServeOptions<C extends Contract = Contract> = {
|
|
25
|
+
/**
|
|
26
|
+
* The older versions of `C` this provider still binds, with the mappings their edits need (Q10, `checkAccepts`):
|
|
27
|
+
* an older consumer's state members mapped per binding, its calls' arguments and results mapped.
|
|
28
|
+
*/
|
|
29
|
+
readonly accepts?: AcceptsTable<C>;
|
|
30
|
+
/**
|
|
31
|
+
* How long, in milliseconds, a live object with params stays live after its last reference is released (0 by
|
|
32
|
+
* default): a reference within that time reuses it, with its documents and dependencies.
|
|
33
|
+
*/
|
|
34
|
+
readonly linger?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Its calls start no `chord.method` span (`true`): Chord's telemetry ingest, whose every call would otherwise record
|
|
37
|
+
* a span about the telemetry it writes. Traced by default.
|
|
38
|
+
*/
|
|
39
|
+
readonly untraced?: true;
|
|
40
|
+
};
|
|
41
|
+
/** What a facet's setup declares with besides the host: its contributions to registries (R21). */
|
|
42
|
+
export interface FacetSelf {
|
|
43
|
+
/**
|
|
44
|
+
* Contributes `value` to registry `R` while this plugin is loaded: a plain value, or a Chord watchable of one
|
|
45
|
+
* (followed: its change recomposes). At most one per registry.
|
|
46
|
+
*/
|
|
47
|
+
contribute<C>(R: Registry<C, unknown>, value: Contribution<C>): void;
|
|
48
|
+
}
|
|
49
|
+
/** What a setup served, by kind: a type (its contract, factory and options), or a registry (its provider). */
|
|
50
|
+
export type ServedEntry = {
|
|
51
|
+
readonly kind: "type";
|
|
52
|
+
readonly contract: Contract;
|
|
53
|
+
readonly factory: ServedFactory;
|
|
54
|
+
readonly options: ServeOptions;
|
|
55
|
+
} | {
|
|
56
|
+
readonly kind: "registry";
|
|
57
|
+
readonly registry: Registry<unknown, unknown>;
|
|
58
|
+
readonly provider: RegistryProvider<unknown, unknown>;
|
|
59
|
+
};
|
|
60
|
+
/** A contribution a setup declared. */
|
|
61
|
+
export type FacetContribution = {
|
|
62
|
+
readonly registry: Registry<unknown, unknown>;
|
|
63
|
+
readonly value: unknown;
|
|
64
|
+
};
|
|
65
|
+
/** A factory as a setup served it, of either kind (the host dispatches on its contract's kind). */
|
|
66
|
+
type ServedFactory = (params: never, principalOrSelf: never, self: never) => unknown;
|
|
67
|
+
/** A plugin's facet for hosts of the app's principal type `P` (type only: nothing is checked at runtime). */
|
|
68
|
+
export type Facet<P extends Principal> = {
|
|
69
|
+
readonly setup: (host: FacetHost<P>, self: FacetSelf) => void;
|
|
70
|
+
/** Type only: the principal type, invariant, so a host takes only facets typed for exactly its `P`. */
|
|
71
|
+
readonly "~principal"?: (principal: P) => P;
|
|
72
|
+
};
|
|
73
|
+
/** Defines a facet; base code binds `P` once, next to its principal type. */
|
|
74
|
+
export declare function defineFacet<P extends Principal>(setup: (host: FacetHost<P>, self: FacetSelf) => void): Facet<P>;
|
|
75
|
+
/**
|
|
76
|
+
* Runs a facet's setup and returns the types and registries it served and its contributions, in order; `references`
|
|
77
|
+
* is the host's.
|
|
78
|
+
*/
|
|
79
|
+
export declare function setUp<P extends Principal>(name: string, facet: Facet<P>, references: <C extends Contract>(Type: C) => Watchable<readonly Presence<C, P>[]>): {
|
|
80
|
+
readonly served: readonly ServedEntry[];
|
|
81
|
+
readonly contributions: readonly FacetContribution[];
|
|
82
|
+
};
|
|
83
|
+
export {};
|
|
84
|
+
//# sourceMappingURL=facet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facet.d.ts","sourceRoot":"","sources":["../../src/host/facet.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACvF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,sHAAsH;AACtH,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS;IACzD;;;;OAIG;IACH,KAAK,CAAC,CAAC,SAAS,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAC5F;;;OAGG;IACH,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;IACvE,qHAAqH;IACrH,UAAU,CAAC,CAAC,SAAS,QAAQ,EAAE,IAAI,EAAE,CAAC,GAAG,SAAS,CAAC,SAAS,QAAQ,CAAC,CAAC,EAAE,CAAC,CAA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CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,QAAsC,EAAE,KAAK,EAAE,CAAC,CAAC;QACjF,CAAC;KACD,CAAC;IACF,IAAI,CAAC;QACJ,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACzB,CAAC;YAAS,CAAC;QACV,IAAI,GAAG,KAAK,CAAC;IACd,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC;AAClC,CAAC","sourcesContent":["// Facets (§16): a plugin's setup for one host, typed by the app's principal type. A setup only declares: the types and\n// registries it serves, its contributions to registries (slice 8) and the host's presence lists; it has no documents,\n// routines or natives, so a facet cannot fail after `load`.\n\nimport type { AcceptsTable, Contract } from \"../contracts/index.ts\";\nimport type { Principal } from \"../data/index.ts\";\nimport type { Contribution, Registry, RegistryProvider } from \"../registries/index.ts\";\nimport type { Watchable } from \"../watch.ts\";\nimport type { Factory } from \"./attempt.ts\";\nimport type { Presence } from \"./presence.ts\";\n\n/** What a setup serves types and registries with (valid only while the setup runs), and the host's presence lists. */\nexport interface FacetHost<P extends Principal = Principal> {\n\t/**\n\t * Serves a type on this host with `factory`; a remote type's factory gets the principal its object is for.\n\t * `options.accepts` maps the older versions it still serves (checked here: a declaration error rejects the load or\n\t * the reload).\n\t */\n\tserve<C extends Contract>(Type: C, factory: Factory<C, P>, options?: ServeOptions<C>): void;\n\t/**\n\t * Serves registry `R` on this host (its defining plugin's facet, the one provider, D1): `compose` builds the value\n\t * from the table, `accepts` adapts older versions. A second serve of a registry is refused at `load`.\n\t */\n\tserve<C, V>(R: Registry<C, V>, provider: RegistryProvider<C, V>): void;\n\t/** `host.references(Type)`: the references to objects of `Type` on this host (§19), for factories to derive from. */\n\treferences<C extends Contract>(Type: C): Watchable<readonly Presence<C, P>[]>;\n}\n\n/** What `host.serve` takes besides the type and the factory. */\nexport type ServeOptions<C extends Contract = Contract> = {\n\t/**\n\t * The older versions of `C` this provider still binds, with the mappings their edits need (Q10, `checkAccepts`):\n\t * an older consumer's state members mapped per binding, its calls' arguments and results mapped.\n\t */\n\treadonly accepts?: AcceptsTable<C>;\n\t/**\n\t * How long, in milliseconds, a live object with params stays live after its last reference is released (0 by\n\t * default): a reference within that time reuses it, with its documents and dependencies.\n\t */\n\treadonly linger?: number;\n\t/**\n\t * Its calls start no `chord.method` span (`true`): Chord's telemetry ingest, whose every call would otherwise record\n\t * a span about the telemetry it writes. Traced by default.\n\t */\n\treadonly untraced?: true;\n};\n\n/** What a facet's setup declares with besides the host: its contributions to registries (R21). */\nexport interface FacetSelf {\n\t/**\n\t * Contributes `value` to registry `R` while this plugin is loaded: a plain value, or a Chord watchable of one\n\t * (followed: its change recomposes). At most one per registry.\n\t */\n\tcontribute<C>(R: Registry<C, unknown>, value: Contribution<C>): void;\n}\n\n/** What a setup served, by kind: a type (its contract, factory and options), or a registry (its provider). */\nexport type ServedEntry =\n\t| {\n\t\t\treadonly kind: \"type\";\n\t\t\treadonly contract: Contract;\n\t\t\treadonly factory: ServedFactory;\n\t\t\treadonly options: ServeOptions;\n\t }\n\t| {\n\t\t\treadonly kind: \"registry\";\n\t\t\treadonly registry: Registry<unknown, unknown>;\n\t\t\treadonly provider: RegistryProvider<unknown, unknown>;\n\t };\n\n/** A contribution a setup declared. */\nexport type FacetContribution = { readonly registry: Registry<unknown, unknown>; readonly value: unknown };\n\n/** A factory as a setup served it, of either kind (the host dispatches on its contract's kind). */\ntype ServedFactory = (params: never, principalOrSelf: never, self: never) => unknown;\n\n/** A plugin's facet for hosts of the app's principal type `P` (type only: nothing is checked at runtime). */\nexport type Facet<P extends Principal> = {\n\treadonly setup: (host: FacetHost<P>, self: FacetSelf) => void;\n\t/** Type only: the principal type, invariant, so a host takes only facets typed for exactly its `P`. */\n\treadonly \"~principal\"?: (principal: P) => P;\n};\n\n/** Defines a facet; base code binds `P` once, next to its principal type. */\nexport function defineFacet<P extends Principal>(setup: (host: FacetHost<P>, self: FacetSelf) => void): Facet<P> {\n\treturn { setup };\n}\n\n/**\n * Runs a facet's setup and returns the types and registries it served and its contributions, in order; `references`\n * is the host's.\n */\nexport function setUp<P extends Principal>(\n\tname: string,\n\tfacet: Facet<P>,\n\treferences: <C extends Contract>(Type: C) => Watchable<readonly Presence<C, P>[]>,\n): { readonly served: readonly ServedEntry[]; readonly contributions: readonly FacetContribution[] } {\n\tconst served: ServedEntry[] = [];\n\tconst contributions: FacetContribution[] = [];\n\tlet open = true;\n\tconst assertOpen = (what: string): void => {\n\t\tif (!open) throw new Error(`${name}: ${what} is valid only in the facet's setup`);\n\t};\n\tconst host: FacetHost<P> = {\n\t\tserve: (Type: Contract | Registry<unknown, unknown>, implementation: unknown, options: ServeOptions = {}) => {\n\t\t\tassertOpen(\"host.serve\");\n\t\t\t// Served types and registries are dispatched by their kind; a factory matches its own contract, a provider\n\t\t\t// its own registry.\n\t\t\tif (Type.kind === \"registry\") {\n\t\t\t\tserved.push({\n\t\t\t\t\tkind: \"registry\",\n\t\t\t\t\tregistry: Type,\n\t\t\t\t\tprovider: implementation as RegistryProvider<unknown, unknown>,\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tserved.push({ kind: \"type\", contract: Type, factory: implementation as ServedFactory, options });\n\t\t\t}\n\t\t},\n\t\treferences,\n\t};\n\tconst self: FacetSelf = {\n\t\tcontribute: (registry, value) => {\n\t\t\tassertOpen(\"self.contribute\");\n\t\t\tif (contributions.some((each) => each.registry.name === registry.name)) {\n\t\t\t\tthrow new Error(`${name}: registry ${registry.name} is contributed to twice`);\n\t\t\t}\n\t\t\tcontributions.push({ registry: registry as Registry<unknown, unknown>, value });\n\t\t},\n\t};\n\ttry {\n\t\tfacet.setup(host, self);\n\t} finally {\n\t\topen = false;\n\t}\n\treturn { served, contributions };\n}\n"]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { Context } from "../context/index.ts";
|
|
2
|
+
import type { JsonValue } from "../json.ts";
|
|
3
|
+
import { type Batch, Source, type Subscriber } from "../state/internal.ts";
|
|
4
|
+
import type { Watch, WatchCall, WatchEnd } from "../watch.ts";
|
|
5
|
+
/** The observer a followed runtime is given: Chord's watch shapes (Durable's `Observer`). */
|
|
6
|
+
export type FollowObserver<T> = {
|
|
7
|
+
/** One change, synchronously and quickly: Chord only records it. */
|
|
8
|
+
advance(call: WatchCall<T>, context: Context): void;
|
|
9
|
+
/** The followed source ended: `failed` (its runtime failed), or `ended` for good. */
|
|
10
|
+
end(end: WatchEnd): void;
|
|
11
|
+
};
|
|
12
|
+
/** What attaching gives: the value every later call starts from, and how to detach (Durable's `Observation`). */
|
|
13
|
+
export type FollowAttachment<T> = {
|
|
14
|
+
readonly value: T;
|
|
15
|
+
detach(): void;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* What `self.follow` takes: attaches `observer`, resolving with the attachment, `undefined` for an absent address.
|
|
19
|
+
* The observer takes calls of any value (it only records them), so `T` is inferred from the attachment alone.
|
|
20
|
+
*/
|
|
21
|
+
export type FollowAttach<T> = (observer: FollowObserver<unknown>, context: Context) => Promise<FollowAttachment<T> | undefined>;
|
|
22
|
+
/** Who a followed source belongs to: its attempt (R4) and its context. */
|
|
23
|
+
export type FollowOwner = {
|
|
24
|
+
readonly label: string;
|
|
25
|
+
readonly context: Context;
|
|
26
|
+
/**
|
|
27
|
+
* The followed runtime ended its observer: `failed` fails the attempt `transient` (live or activating, its retry
|
|
28
|
+
* attaches again); `ended` while the attempt activates fails it `transient` too (it would go live on a source that
|
|
29
|
+
* ended); `ended` while live is final for the source only.
|
|
30
|
+
*/
|
|
31
|
+
ended(end: WatchEnd): void;
|
|
32
|
+
};
|
|
33
|
+
/** A followed source: the runtime's value, its calls applied in order, its frames delivered in the host's batch. */
|
|
34
|
+
export declare class FollowSource extends Source {
|
|
35
|
+
#private;
|
|
36
|
+
constructor(attach: FollowAttach<JsonValue>, owner: FollowOwner, batch: Batch);
|
|
37
|
+
get value(): JsonValue;
|
|
38
|
+
/**
|
|
39
|
+
* Attaches (activation, after the natives opened): the calls that came meanwhile apply on the attachment's value,
|
|
40
|
+
* and an end that came meanwhile takes effect then (the value stays). A rejected attachment, or `undefined` (an
|
|
41
|
+
* absent address), throws; an attachment arriving after its attempt detached the source is detached at once.
|
|
42
|
+
*/
|
|
43
|
+
attach(context: Context): Promise<void>;
|
|
44
|
+
/** Its attempt ended: the observer is detached (also after the runtime ended it) and its watches end `ended`. */
|
|
45
|
+
detach(): void;
|
|
46
|
+
/** A watch of an ended source opens at its value and ends `ended` at once. */
|
|
47
|
+
openWatch(context: Context): Watch<JsonValue>;
|
|
48
|
+
/** A subscriber of an ended source (a reference's watch through its member) ends `ended` at once. */
|
|
49
|
+
subscribe(subscriber: Subscriber): void;
|
|
50
|
+
deliver(context: Context): void;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=follow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"follow.d.ts","sourceRoot":"","sources":["../../src/host/follow.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAGnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE9D,6FAA6F;AAC7F,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI;IAC/B,oEAAoE;IACpE,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACpD,qFAAqF;IACrF,GAAG,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF,iHAAiH;AACjH,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;IAAE,QAAQ,CAAC,KAAK,E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CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC;IAED,qHAAqH;IACrH,MAAM,CAAC,IAA0B;QAChC,iFAAiF;QACjF,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO;YAAE,OAAO;QAClC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAI,IAAI,CAAC,OAAO;YAAE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACvC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YACnB,IAAI,CAAC,OAAO,EAAE,CAAC;YACf,IAAI,IAAI,CAAC,OAAO;gBAAE,IAAI,CAAC,cAAc,EAAE,CAAC;YACxC,OAAO;QACR,CAAC;QACD,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,GAAG;YAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC9C,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YACnB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YACpB,IAAI,CAAC,OAAO,EAAE,CAAC;QAChB,CAAC;QACD,IAAI,IAAI,CAAC,OAAO;YAAE,IAAI,CAAC,cAAc,EAAE,CAAC;IACzC,CAAC;CACD","sourcesContent":["// Followed sources (slice 6b D9, R4, §3): `self.follow(attach)`, a Chord source over a synchronous observer of another\n// runtime (Durable's `observeConversation`, `observeTaskGraph`, `observeDoc`). Attached during its attempt's\n// activation, detached at the attempt's end. Calls inside a running batch (Durable adopting in the store's commit step)\n// are marked in that batch, calls outside one are grouped into one batch on the next microtask, so a derive over two\n// views of one commit computes once with both changes.\n\nimport type { Context } from \"../context/index.ts\";\nimport { ChordError } from \"../data/index.ts\";\nimport type { Op } from \"../delta/index.ts\";\nimport type { JsonValue } from \"../json.ts\";\nimport { type Batch, Source, type Subscriber } from \"../state/internal.ts\";\nimport type { Watch, WatchCall, WatchEnd } from \"../watch.ts\";\n\n/** The observer a followed runtime is given: Chord's watch shapes (Durable's `Observer`). */\nexport type FollowObserver<T> = {\n\t/** One change, synchronously and quickly: Chord only records it. */\n\tadvance(call: WatchCall<T>, context: Context): void;\n\t/** The followed source ended: `failed` (its runtime failed), or `ended` for good. */\n\tend(end: WatchEnd): void;\n};\n\n/** What attaching gives: the value every later call starts from, and how to detach (Durable's `Observation`). */\nexport type FollowAttachment<T> = { readonly value: T; detach(): void };\n\n/**\n * What `self.follow` takes: attaches `observer`, resolving with the attachment, `undefined` for an absent address.\n * The observer takes calls of any value (it only records them), so `T` is inferred from the attachment alone.\n */\nexport type FollowAttach<T> = (\n\tobserver: FollowObserver<unknown>,\n\tcontext: Context,\n) => Promise<FollowAttachment<T> | undefined>;\n\n/** Who a followed source belongs to: its attempt (R4) and its context. */\nexport type FollowOwner = {\n\treadonly label: string;\n\treadonly context: Context;\n\t/**\n\t * The followed runtime ended its observer: `failed` fails the attempt `transient` (live or activating, its retry\n\t * attaches again); `ended` while the attempt activates fails it `transient` too (it would go live on a source that\n\t * ended); `ended` while live is final for the source only.\n\t */\n\tended(end: WatchEnd): void;\n};\n\n/**\n * Where a followed source stands: waiting for its attachment (with the runtime's end when it came first), attached,\n * ended by the runtime (its value stays; detached at its attempt's end), or detached by its attempt.\n */\ntype FollowState =\n\t| { readonly kind: \"attaching\"; readonly end: WatchEnd | undefined }\n\t| { readonly kind: \"attached\"; readonly detach: () => void }\n\t| { readonly kind: \"ended\"; readonly detach: () => void }\n\t| { readonly kind: \"detached\" };\n\nconst NO_OPS: readonly Op[] = [];\n\nconst ENDED: WatchEnd = { kind: \"ended\" };\n\n/** A followed source: the runtime's value, its calls applied in order, its frames delivered in the host's batch. */\nexport class FollowSource extends Source {\n\treadonly #attach: FollowAttach<JsonValue>;\n\treadonly #owner: FollowOwner;\n\t#state: FollowState = { kind: \"attaching\", end: undefined };\n\t#value: JsonValue | undefined;\n\t/** Calls not applied yet: before the attachment resolved, and outside a batch until the next microtask. */\n\t#queued: WatchCall<JsonValue>[] = [];\n\t/** Whether a microtask is queued to apply `#queued` in a batch of its own. */\n\t#scheduled = false;\n\t/**\n\t * The runtime's end, still to reach the watches: `queued` after the queued calls' batch, `frame` after the current\n\t * batch's frame (a retirement and an end in one batch: the retirement first).\n\t */\n\t#ending: \"none\" | \"queued\" | \"frame\" = \"none\";\n\t/** The ops of the current batch's frame (kept only while watched), and whether a retirement came in it. */\n\t#ops: Op[] = [];\n\t#retired = false;\n\t#listed = false;\n\n\tconstructor(attach: FollowAttach<JsonValue>, owner: FollowOwner, batch: Batch) {\n\t\tsuper(batch);\n\t\tthis.#attach = attach;\n\t\tthis.#owner = owner;\n\t}\n\n\tget value(): JsonValue {\n\t\tif (this.#value === undefined) {\n\t\t\tthrow new ChordError({\n\t\t\t\tcode: \"not_ready\",\n\t\t\t\tmessage: `${this.#owner.label}: a followed source read before it attached`,\n\t\t\t});\n\t\t}\n\t\treturn this.#value;\n\t}\n\n\t/**\n\t * Attaches (activation, after the natives opened): the calls that came meanwhile apply on the attachment's value,\n\t * and an end that came meanwhile takes effect then (the value stays). A rejected attachment, or `undefined` (an\n\t * absent address), throws; an attachment arriving after its attempt detached the source is detached at once.\n\t */\n\tasync attach(context: Context): Promise<void> {\n\t\tconst observer: FollowObserver<JsonValue> = {\n\t\t\tadvance: (call) => this.#advance(call),\n\t\t\tend: (end) => this.#end(end),\n\t\t};\n\t\tconst attached = await this.#attach(observer, context);\n\t\tif (attached === undefined) {\n\t\t\tthrow new ChordError({ code: \"unavailable\", message: `${this.#owner.label}: the followed address is absent` });\n\t\t}\n\t\tconst state = this.#state;\n\t\tconst detach = () => attached.detach();\n\t\tif (state.kind !== \"attaching\") {\n\t\t\tdetach();\n\t\t\treturn;\n\t\t}\n\t\tthis.#value = attached.value;\n\t\t// Nothing watches it yet (members are checked after this): the queued calls only move the value on.\n\t\tfor (const call of this.#queued) if (call.kind === \"value\") this.#value = call.value;\n\t\tthis.#queued = [];\n\t\tthis.#state = state.end?.kind === \"ended\" ? { kind: \"ended\", detach } : { kind: \"attached\", detach };\n\t}\n\n\t/** Its attempt ended: the observer is detached (also after the runtime ended it) and its watches end `ended`. */\n\tdetach(): void {\n\t\tconst state = this.#state;\n\t\tthis.#state = { kind: \"detached\" };\n\t\tthis.#queued = [];\n\t\tif (state.kind === \"attached\" || state.kind === \"ended\") state.detach();\n\t\tthis.endWatches();\n\t}\n\n\t/** A watch of an ended source opens at its value and ends `ended` at once. */\n\toverride openWatch(context: Context): Watch<JsonValue> {\n\t\tconst watch = super.openWatch(context);\n\t\tif (this.#over) watch.end(ENDED);\n\t\treturn watch;\n\t}\n\n\t/** A subscriber of an ended source (a reference's watch through its member) ends `ended` at once. */\n\toverride subscribe(subscriber: Subscriber): void {\n\t\tif (this.#over) subscriber.end(ENDED);\n\t\telse super.subscribe(subscriber);\n\t}\n\n\tdeliver(context: Context): void {\n\t\tconst ops = this.#ops;\n\t\tconst retired = this.#retired;\n\t\tthis.#ops = [];\n\t\tthis.#retired = false;\n\t\tthis.#listed = false;\n\t\tthis.publish(this.#value!, ops.length === 0 ? NO_OPS : ops, retired, context);\n\t\tif (this.#ending === \"frame\") {\n\t\t\tthis.#ending = \"none\";\n\t\t\tthis.endWatchesAfterDelivery();\n\t\t}\n\t}\n\n\t/** Whether nothing reaches its watches any more: ended by the runtime (what it gave delivered) or detached. */\n\tget #over(): boolean {\n\t\tconst { kind } = this.#state;\n\t\treturn (kind === \"ended\" && this.#ending === \"none\") || kind === \"detached\";\n\t}\n\n\t/**\n\t * A call of the runtime: before the attachment, queued; inside a running batch, applied there (after what was\n\t * queued); outside one, queued for one batch on the next microtask.\n\t */\n\t#advance(call: WatchCall<JsonValue>): void {\n\t\tconst { kind } = this.#state;\n\t\tif (kind === \"ended\" || kind === \"detached\") return;\n\t\tif (kind === \"attaching\" || !this.batch.running) {\n\t\t\tthis.#queued.push(call);\n\t\t\tif (kind === \"attached\") this.#schedule();\n\t\t\treturn;\n\t\t}\n\t\tthis.#applyQueued();\n\t\tthis.#apply(call);\n\t}\n\n\t/**\n\t * The runtime ended its observer (R4); its attempt is told. `ended` is final: what came before reaches the watches\n\t * first (the queued calls in their batch, a call of the running batch in its frame), then they end, the value\n\t * staying. A `failed` attempt detaches the source.\n\t */\n\t#end(end: WatchEnd): void {\n\t\tconst state = this.#state;\n\t\tif (state.kind === \"ended\" || state.kind === \"detached\") return;\n\t\tif (state.kind === \"attaching\") {\n\t\t\tif (state.end === undefined) this.#state = { kind: \"attaching\", end };\n\t\t\tthis.#owner.ended(end);\n\t\t\treturn;\n\t\t}\n\t\tif (end.kind === \"ended\") {\n\t\t\tthis.#state = { kind: \"ended\", detach: state.detach };\n\t\t\tif (this.#queued.length > 0 && !this.batch.running) this.#ending = \"queued\";\n\t\t\telse {\n\t\t\t\t// Inside a running batch the queued calls join it (none is queued outside one: they wait for their batch).\n\t\t\t\tthis.#applyQueued();\n\t\t\t\tthis.#endAfterFrame();\n\t\t\t}\n\t\t}\n\t\tthis.#owner.ended(end);\n\t}\n\n\t/** The watches end once this batch's frame reached them, at once when the source is in none. */\n\t#endAfterFrame(): void {\n\t\t// No frame to wait for (nothing watches it): the end is over now, and a later watch ends at once.\n\t\tthis.#ending = this.#listed ? \"frame\" : \"none\";\n\t\tif (!this.#listed) this.endWatchesAfterDelivery();\n\t}\n\n\t#schedule(): void {\n\t\tif (this.#scheduled) return;\n\t\tthis.#scheduled = true;\n\t\tthis.batch.soon(() => {\n\t\t\tthis.#scheduled = false;\n\t\t\tconst { kind } = this.#state;\n\t\t\tif (kind === \"attached\" || kind === \"ended\") this.#applyQueued();\n\t\t\tif (this.#ending === \"queued\") this.#endAfterFrame();\n\t\t}, this.#owner.context);\n\t}\n\n\t#applyQueued(): void {\n\t\tconst queued = this.#queued;\n\t\tif (queued.length === 0) return;\n\t\tthis.#queued = [];\n\t\tfor (const call of queued) this.#apply(call);\n\t}\n\n\t/** Applies one value call inside the running batch: the new value, its ops for the frame, the source marked once. */\n\t#apply(call: WatchCall<JsonValue>): void {\n\t\t// The runtime's failures are final: it ends its observer instead of sending one.\n\t\tif (call.kind !== \"value\") return;\n\t\tthis.#value = call.value;\n\t\tif (call.retired) this.#retired = true;\n\t\tif (!this.watched) {\n\t\t\tthis.changed();\n\t\t\tif (call.retired) this.retiredInBatch();\n\t\t\treturn;\n\t\t}\n\t\tfor (const op of call.ops) this.#ops.push(op);\n\t\tif (!this.#listed) {\n\t\t\tthis.#listed = true;\n\t\t\tthis.changed();\n\t\t}\n\t\tif (call.retired) this.retiredInBatch();\n\t}\n}\n"]}
|