@earendil-works/chord 1.4.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +92 -0
- package/README.md +115 -90
- package/dist/context/index.d.ts +1 -1
- package/dist/context/index.d.ts.map +1 -1
- package/dist/context/index.js +1 -1
- package/dist/context/index.js.map +1 -1
- package/dist/contracts/accepts.d.ts +81 -0
- package/dist/contracts/accepts.d.ts.map +1 -0
- package/dist/contracts/accepts.js +123 -0
- package/dist/contracts/accepts.js.map +1 -0
- package/dist/contracts/contract.d.ts +121 -0
- package/dist/contracts/contract.d.ts.map +1 -0
- package/dist/contracts/contract.js +50 -0
- package/dist/contracts/contract.js.map +1 -0
- package/dist/contracts/declare.d.ts +107 -0
- package/dist/contracts/declare.d.ts.map +1 -0
- package/dist/contracts/declare.js +136 -0
- package/dist/contracts/declare.js.map +1 -0
- package/dist/contracts/evolve.d.ts +92 -0
- package/dist/contracts/evolve.d.ts.map +1 -0
- package/dist/contracts/evolve.js +179 -0
- package/dist/contracts/evolve.js.map +1 -0
- package/dist/contracts/fingerprint.d.ts +16 -0
- package/dist/contracts/fingerprint.d.ts.map +1 -0
- package/dist/contracts/fingerprint.js +50 -0
- package/dist/contracts/fingerprint.js.map +1 -0
- package/dist/contracts/history.d.ts +71 -0
- package/dist/contracts/history.d.ts.map +1 -0
- package/dist/contracts/history.js +3 -0
- package/dist/contracts/history.js.map +1 -0
- package/dist/contracts/host-kind.d.ts +40 -0
- package/dist/contracts/host-kind.d.ts.map +1 -0
- package/dist/contracts/host-kind.js +37 -0
- package/dist/contracts/host-kind.js.map +1 -0
- package/dist/contracts/index.d.ts +7 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js +6 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/contracts/internal.d.ts +10 -0
- package/dist/contracts/internal.d.ts.map +1 -0
- package/dist/contracts/internal.js +9 -0
- package/dist/contracts/internal.js.map +1 -0
- package/dist/contracts/names.d.ts +3 -0
- package/dist/contracts/names.d.ts.map +1 -0
- package/dist/contracts/names.js +13 -0
- package/dist/contracts/names.js.map +1 -0
- package/dist/contracts/params.d.ts +28 -0
- package/dist/contracts/params.d.ts.map +1 -0
- package/dist/contracts/params.js +50 -0
- package/dist/contracts/params.js.map +1 -0
- package/dist/contracts/schema.d.ts +102 -0
- package/dist/contracts/schema.d.ts.map +1 -0
- package/dist/contracts/schema.js +103 -0
- package/dist/contracts/schema.js.map +1 -0
- package/dist/contracts/snapshot.d.ts +16 -0
- package/dist/contracts/snapshot.d.ts.map +1 -0
- package/dist/contracts/snapshot.js +167 -0
- package/dist/contracts/snapshot.js.map +1 -0
- package/dist/data/args.d.ts +50 -0
- package/dist/data/args.d.ts.map +1 -0
- package/dist/data/args.js +83 -0
- package/dist/data/args.js.map +1 -0
- package/dist/data/errors.d.ts +80 -0
- package/dist/data/errors.d.ts.map +1 -0
- package/dist/data/errors.js +116 -0
- package/dist/data/errors.js.map +1 -0
- package/dist/data/failure.d.ts +26 -0
- package/dist/data/failure.d.ts.map +1 -0
- package/dist/data/failure.js +77 -0
- package/dist/data/failure.js.map +1 -0
- package/dist/data/index.d.ts +4 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/index.js +5 -0
- package/dist/data/index.js.map +1 -0
- package/dist/data/internal.d.ts +7 -0
- package/dist/data/internal.d.ts.map +1 -0
- package/dist/data/internal.js +8 -0
- package/dist/data/internal.js.map +1 -0
- package/dist/data/params.d.ts +20 -0
- package/dist/data/params.d.ts.map +1 -0
- package/dist/data/params.js +31 -0
- package/dist/data/params.js.map +1 -0
- package/dist/data/principal.d.ts +22 -0
- package/dist/data/principal.d.ts.map +1 -0
- package/dist/data/principal.js +49 -0
- package/dist/data/principal.js.map +1 -0
- package/dist/data/validator.d.ts +12 -0
- package/dist/data/validator.d.ts.map +1 -0
- package/dist/data/validator.js +35 -0
- package/dist/data/validator.js.map +1 -0
- package/dist/delta/apply-immutable-trusted.js +3 -4
- package/dist/delta/apply-immutable-trusted.js.map +1 -1
- package/dist/delta/diff.d.ts.map +1 -1
- package/dist/delta/diff.js +5 -3
- package/dist/delta/diff.js.map +1 -1
- package/dist/delta/index.d.ts +9 -1
- package/dist/delta/index.d.ts.map +1 -1
- package/dist/delta/index.js +15 -11
- package/dist/delta/index.js.map +1 -1
- package/dist/delta/pending.d.ts +36 -0
- package/dist/delta/pending.d.ts.map +1 -0
- package/dist/delta/pending.js +143 -0
- package/dist/delta/pending.js.map +1 -0
- package/dist/delta/tracker.d.ts +12 -0
- package/dist/delta/tracker.d.ts.map +1 -1
- package/dist/delta/tracker.js +109 -39
- package/dist/delta/tracker.js.map +1 -1
- package/dist/documents/address-source.d.ts +20 -0
- package/dist/documents/address-source.d.ts.map +1 -0
- package/dist/documents/address-source.js +44 -0
- package/dist/documents/address-source.js.map +1 -0
- package/dist/documents/definition.d.ts +84 -0
- package/dist/documents/definition.d.ts.map +1 -0
- package/dist/documents/definition.js +74 -0
- package/dist/documents/definition.js.map +1 -0
- package/dist/documents/documents.d.ts +126 -0
- package/dist/documents/documents.d.ts.map +1 -0
- package/dist/documents/documents.js +248 -0
- package/dist/documents/documents.js.map +1 -0
- package/dist/documents/fence.d.ts +9 -0
- package/dist/documents/fence.d.ts.map +1 -0
- package/dist/documents/fence.js +15 -0
- package/dist/documents/fence.js.map +1 -0
- package/dist/documents/handles.d.ts +76 -0
- package/dist/documents/handles.d.ts.map +1 -0
- package/dist/documents/handles.js +66 -0
- package/dist/documents/handles.js.map +1 -0
- package/dist/documents/index.d.ts +4 -0
- package/dist/documents/index.d.ts.map +1 -0
- package/dist/documents/index.js +3 -0
- package/dist/documents/index.js.map +1 -0
- package/dist/documents/internal.d.ts +9 -0
- package/dist/documents/internal.d.ts.map +1 -0
- package/dist/documents/internal.js +9 -0
- package/dist/documents/internal.js.map +1 -0
- package/dist/documents/keyed-slot.d.ts +103 -0
- package/dist/documents/keyed-slot.d.ts.map +1 -0
- package/dist/documents/keyed-slot.js +395 -0
- package/dist/documents/keyed-slot.js.map +1 -0
- package/dist/documents/line.d.ts +7 -0
- package/dist/documents/line.d.ts.map +1 -0
- package/dist/documents/line.js +14 -0
- package/dist/documents/line.js.map +1 -0
- package/dist/documents/persistence.d.ts +104 -0
- package/dist/documents/persistence.d.ts.map +1 -0
- package/dist/documents/persistence.js +129 -0
- package/dist/documents/persistence.js.map +1 -0
- package/dist/documents/residency.d.ts +31 -0
- package/dist/documents/residency.d.ts.map +1 -0
- package/dist/documents/residency.js +93 -0
- package/dist/documents/residency.js.map +1 -0
- package/dist/documents/slot.d.ts +109 -0
- package/dist/documents/slot.d.ts.map +1 -0
- package/dist/documents/slot.js +181 -0
- package/dist/documents/slot.js.map +1 -0
- package/dist/documents/transaction.d.ts +143 -0
- package/dist/documents/transaction.d.ts.map +1 -0
- package/dist/documents/transaction.js +442 -0
- package/dist/documents/transaction.js.map +1 -0
- package/dist/host/activity.d.ts +31 -0
- package/dist/host/activity.d.ts.map +1 -0
- package/dist/host/activity.js +40 -0
- package/dist/host/activity.js.map +1 -0
- package/dist/host/adapted.d.ts +49 -0
- package/dist/host/adapted.d.ts.map +1 -0
- package/dist/host/adapted.js +214 -0
- package/dist/host/adapted.js.map +1 -0
- package/dist/host/attempt.d.ts +308 -0
- package/dist/host/attempt.d.ts.map +1 -0
- package/dist/host/attempt.js +1199 -0
- package/dist/host/attempt.js.map +1 -0
- package/dist/host/backoff.d.ts +29 -0
- package/dist/host/backoff.d.ts.map +1 -0
- package/dist/host/backoff.js +69 -0
- package/dist/host/backoff.js.map +1 -0
- package/dist/host/ctx.d.ts +94 -0
- package/dist/host/ctx.d.ts.map +1 -0
- package/dist/host/ctx.js +200 -0
- package/dist/host/ctx.js.map +1 -0
- package/dist/host/deadline.d.ts +12 -0
- package/dist/host/deadline.d.ts.map +1 -0
- package/dist/host/deadline.js +40 -0
- package/dist/host/deadline.js.map +1 -0
- package/dist/host/dependencies.d.ts +65 -0
- package/dist/host/dependencies.d.ts.map +1 -0
- package/dist/host/dependencies.js +115 -0
- package/dist/host/dependencies.js.map +1 -0
- package/dist/host/destination.d.ts +48 -0
- package/dist/host/destination.d.ts.map +1 -0
- package/dist/host/destination.js +101 -0
- package/dist/host/destination.js.map +1 -0
- package/dist/host/facet.d.ts +84 -0
- package/dist/host/facet.d.ts.map +1 -0
- package/dist/host/facet.js +55 -0
- package/dist/host/facet.js.map +1 -0
- package/dist/host/follow.d.ts +52 -0
- package/dist/host/follow.d.ts.map +1 -0
- package/dist/host/follow.js +207 -0
- package/dist/host/follow.js.map +1 -0
- package/dist/host/host.d.ts +571 -0
- package/dist/host/host.d.ts.map +1 -0
- package/dist/host/host.js +1318 -0
- package/dist/host/host.js.map +1 -0
- package/dist/host/index.d.ts +17 -0
- package/dist/host/index.d.ts.map +1 -0
- package/dist/host/index.js +6 -0
- package/dist/host/index.js.map +1 -0
- package/dist/host/internal.d.ts +11 -0
- package/dist/host/internal.d.ts.map +1 -0
- package/dist/host/internal.js +9 -0
- package/dist/host/internal.js.map +1 -0
- package/dist/host/members.d.ts +50 -0
- package/dist/host/members.d.ts.map +1 -0
- package/dist/host/members.js +107 -0
- package/dist/host/members.js.map +1 -0
- package/dist/host/native.d.ts +64 -0
- package/dist/host/native.d.ts.map +1 -0
- package/dist/host/native.js +126 -0
- package/dist/host/native.js.map +1 -0
- package/dist/host/object.d.ts +331 -0
- package/dist/host/object.d.ts.map +1 -0
- package/dist/host/object.js +1296 -0
- package/dist/host/object.js.map +1 -0
- package/dist/host/old-work.d.ts +34 -0
- package/dist/host/old-work.d.ts.map +1 -0
- package/dist/host/old-work.js +52 -0
- package/dist/host/old-work.js.map +1 -0
- package/dist/host/parked.d.ts +23 -0
- package/dist/host/parked.d.ts.map +1 -0
- package/dist/host/parked.js +79 -0
- package/dist/host/parked.js.map +1 -0
- package/dist/host/presence.d.ts +34 -0
- package/dist/host/presence.d.ts.map +1 -0
- package/dist/host/presence.js +117 -0
- package/dist/host/presence.js.map +1 -0
- package/dist/host/readiness.d.ts +27 -0
- package/dist/host/readiness.d.ts.map +1 -0
- package/dist/host/readiness.js +134 -0
- package/dist/host/readiness.js.map +1 -0
- package/dist/host/ref-state.d.ts +53 -0
- package/dist/host/ref-state.d.ts.map +1 -0
- package/dist/host/ref-state.js +83 -0
- package/dist/host/ref-state.js.map +1 -0
- package/dist/host/reference-keys.d.ts +36 -0
- package/dist/host/reference-keys.d.ts.map +1 -0
- package/dist/host/reference-keys.js +168 -0
- package/dist/host/reference-keys.js.map +1 -0
- package/dist/host/reference-source.d.ts +65 -0
- package/dist/host/reference-source.d.ts.map +1 -0
- package/dist/host/reference-source.js +285 -0
- package/dist/host/reference-source.js.map +1 -0
- package/dist/host/reference.d.ts +321 -0
- package/dist/host/reference.d.ts.map +1 -0
- package/dist/host/reference.js +797 -0
- package/dist/host/reference.js.map +1 -0
- package/dist/host/reload-cycle.d.ts +16 -0
- package/dist/host/reload-cycle.d.ts.map +1 -0
- package/dist/host/reload-cycle.js +81 -0
- package/dist/host/reload-cycle.js.map +1 -0
- package/dist/host/retry-on.d.ts +28 -0
- package/dist/host/retry-on.d.ts.map +1 -0
- package/dist/host/retry-on.js +52 -0
- package/dist/host/retry-on.js.map +1 -0
- package/dist/host/revocation.d.ts +16 -0
- package/dist/host/revocation.d.ts.map +1 -0
- package/dist/host/revocation.js +27 -0
- package/dist/host/revocation.js.map +1 -0
- package/dist/host/root.d.ts +37 -0
- package/dist/host/root.d.ts.map +1 -0
- package/dist/host/root.js +68 -0
- package/dist/host/root.js.map +1 -0
- package/dist/host/route.d.ts +64 -0
- package/dist/host/route.d.ts.map +1 -0
- package/dist/host/route.js +227 -0
- package/dist/host/route.js.map +1 -0
- package/dist/host/routines.d.ts +78 -0
- package/dist/host/routines.d.ts.map +1 -0
- package/dist/host/routines.js +398 -0
- package/dist/host/routines.js.map +1 -0
- package/dist/host/sleep.d.ts +9 -0
- package/dist/host/sleep.d.ts.map +1 -0
- package/dist/host/sleep.js +40 -0
- package/dist/host/sleep.js.map +1 -0
- package/dist/host/staging.d.ts +94 -0
- package/dist/host/staging.d.ts.map +1 -0
- package/dist/host/staging.js +304 -0
- package/dist/host/staging.js.map +1 -0
- package/dist/host/unbound-clock.d.ts +23 -0
- package/dist/host/unbound-clock.d.ts.map +1 -0
- package/dist/host/unbound-clock.js +58 -0
- package/dist/host/unbound-clock.js.map +1 -0
- package/dist/host/unbound.d.ts +37 -0
- package/dist/host/unbound.d.ts.map +1 -0
- package/dist/host/unbound.js +88 -0
- package/dist/host/unbound.js.map +1 -0
- package/dist/host/uuid.d.ts +3 -0
- package/dist/host/uuid.d.ts.map +1 -0
- package/dist/host/uuid.js +38 -0
- package/dist/host/uuid.js.map +1 -0
- package/dist/index.d.ts +29 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -9
- package/dist/index.js.map +1 -1
- package/dist/jobs/definition.d.ts +96 -0
- package/dist/jobs/definition.d.ts.map +1 -0
- package/dist/jobs/definition.js +83 -0
- package/dist/jobs/definition.js.map +1 -0
- package/dist/jobs/index.d.ts +5 -0
- package/dist/jobs/index.d.ts.map +1 -0
- package/dist/jobs/index.js +3 -0
- package/dist/jobs/index.js.map +1 -0
- package/dist/jobs/internal.d.ts +3 -0
- package/dist/jobs/internal.d.ts.map +1 -0
- package/dist/jobs/internal.js +4 -0
- package/dist/jobs/internal.js.map +1 -0
- package/dist/jobs/job.d.ts +149 -0
- package/dist/jobs/job.d.ts.map +1 -0
- package/dist/jobs/job.js +387 -0
- package/dist/jobs/job.js.map +1 -0
- package/dist/jobs/persisted.d.ts +38 -0
- package/dist/jobs/persisted.d.ts.map +1 -0
- package/dist/jobs/persisted.js +95 -0
- package/dist/jobs/persisted.js.map +1 -0
- package/dist/jobs/records.d.ts +231 -0
- package/dist/jobs/records.d.ts.map +1 -0
- package/dist/jobs/records.js +871 -0
- package/dist/jobs/records.js.map +1 -0
- package/dist/jobs/run-states.d.ts +69 -0
- package/dist/jobs/run-states.d.ts.map +1 -0
- package/dist/jobs/run-states.js +228 -0
- package/dist/jobs/run-states.js.map +1 -0
- package/dist/jobs/run.d.ts +117 -0
- package/dist/jobs/run.d.ts.map +1 -0
- package/dist/jobs/run.js +204 -0
- package/dist/jobs/run.js.map +1 -0
- package/dist/jobs/running.d.ts +44 -0
- package/dist/jobs/running.d.ts.map +1 -0
- package/dist/jobs/running.js +117 -0
- package/dist/jobs/running.js.map +1 -0
- package/dist/jobs/stored.d.ts +63 -0
- package/dist/jobs/stored.d.ts.map +1 -0
- package/dist/jobs/stored.js +55 -0
- package/dist/jobs/stored.js.map +1 -0
- package/dist/link/binary.d.ts +4 -0
- package/dist/link/binary.d.ts.map +1 -0
- package/dist/link/binary.js +544 -0
- package/dist/link/binary.js.map +1 -0
- package/dist/link/channel.d.ts +68 -0
- package/dist/link/channel.d.ts.map +1 -0
- package/dist/link/channel.js +215 -0
- package/dist/link/channel.js.map +1 -0
- package/dist/link/errors.d.ts +7 -0
- package/dist/link/errors.d.ts.map +1 -0
- package/dist/link/errors.js +21 -0
- package/dist/link/errors.js.map +1 -0
- package/dist/link/index.d.ts +8 -0
- package/dist/link/index.d.ts.map +1 -0
- package/dist/link/index.js +8 -0
- package/dist/link/index.js.map +1 -0
- package/dist/link/internal.d.ts +9 -0
- package/dist/link/internal.d.ts.map +1 -0
- package/dist/link/internal.js +10 -0
- package/dist/link/internal.js.map +1 -0
- package/dist/link/ipc.d.ts +22 -0
- package/dist/link/ipc.d.ts.map +1 -0
- package/dist/link/ipc.js +64 -0
- package/dist/link/ipc.js.map +1 -0
- package/dist/link/link.d.ts +34 -0
- package/dist/link/link.d.ts.map +1 -0
- package/dist/link/link.js +87 -0
- package/dist/link/link.js.map +1 -0
- package/dist/link/message.d.ts +262 -0
- package/dist/link/message.d.ts.map +1 -0
- package/dist/link/message.js +156 -0
- package/dist/link/message.js.map +1 -0
- package/dist/link/part.d.ts +80 -0
- package/dist/link/part.d.ts.map +1 -0
- package/dist/link/part.js +165 -0
- package/dist/link/part.js.map +1 -0
- package/dist/link/text.d.ts +6 -0
- package/dist/link/text.d.ts.map +1 -0
- package/dist/link/text.js +355 -0
- package/dist/link/text.js.map +1 -0
- package/dist/link/values.d.ts +40 -0
- package/dist/link/values.d.ts.map +1 -0
- package/dist/link/values.js +121 -0
- package/dist/link/values.js.map +1 -0
- package/dist/link/websocket.d.ts +26 -0
- package/dist/link/websocket.d.ts.map +1 -0
- package/dist/link/websocket.js +91 -0
- package/dist/link/websocket.js.map +1 -0
- package/dist/node/app/app.d.ts +269 -0
- package/dist/node/app/app.d.ts.map +1 -0
- package/dist/node/app/app.js +513 -0
- package/dist/node/app/app.js.map +1 -0
- package/dist/node/app/archive.d.ts +37 -0
- package/dist/node/app/archive.d.ts.map +1 -0
- package/dist/node/app/archive.js +204 -0
- package/dist/node/app/archive.js.map +1 -0
- package/dist/node/app/blobs.d.ts +23 -0
- package/dist/node/app/blobs.d.ts.map +1 -0
- package/dist/node/app/blobs.js +64 -0
- package/dist/node/app/blobs.js.map +1 -0
- package/dist/node/app/data.d.ts +35 -0
- package/dist/node/app/data.d.ts.map +1 -0
- package/dist/node/app/data.js +44 -0
- package/dist/node/app/data.js.map +1 -0
- package/dist/node/app/ephemeral-sessions.d.ts +20 -0
- package/dist/node/app/ephemeral-sessions.d.ts.map +1 -0
- package/dist/node/app/ephemeral-sessions.js +69 -0
- package/dist/node/app/ephemeral-sessions.js.map +1 -0
- package/dist/node/app/ephemeral.d.ts +11 -0
- package/dist/node/app/ephemeral.d.ts.map +1 -0
- package/dist/node/app/ephemeral.js +34 -0
- package/dist/node/app/ephemeral.js.map +1 -0
- package/dist/node/app/files-copy.d.ts +13 -0
- package/dist/node/app/files-copy.d.ts.map +1 -0
- package/dist/node/app/files-copy.js +86 -0
- package/dist/node/app/files-copy.js.map +1 -0
- package/dist/node/app/files-entry.d.ts +4 -0
- package/dist/node/app/files-entry.d.ts.map +1 -0
- package/dist/node/app/files-entry.js +7 -0
- package/dist/node/app/files-entry.js.map +1 -0
- package/dist/node/app/files-index.d.ts +180 -0
- package/dist/node/app/files-index.d.ts.map +1 -0
- package/dist/node/app/files-index.js +535 -0
- package/dist/node/app/files-index.js.map +1 -0
- package/dist/node/app/files.d.ts +363 -0
- package/dist/node/app/files.d.ts.map +1 -0
- package/dist/node/app/files.js +368 -0
- package/dist/node/app/files.js.map +1 -0
- package/dist/node/app/folder-views.d.ts +21 -0
- package/dist/node/app/folder-views.d.ts.map +1 -0
- package/dist/node/app/folder-views.js +55 -0
- package/dist/node/app/folder-views.js.map +1 -0
- package/dist/node/app/index.d.ts +12 -0
- package/dist/node/app/index.d.ts.map +1 -0
- package/dist/node/app/index.js +15 -0
- package/dist/node/app/index.js.map +1 -0
- package/dist/node/app/info.d.ts +66 -0
- package/dist/node/app/info.d.ts.map +1 -0
- package/dist/node/app/info.js +37 -0
- package/dist/node/app/info.js.map +1 -0
- package/dist/node/app/invite.d.ts +5 -0
- package/dist/node/app/invite.d.ts.map +1 -0
- package/dist/node/app/invite.js +64 -0
- package/dist/node/app/invite.js.map +1 -0
- package/dist/node/app/layout.d.ts +36 -0
- package/dist/node/app/layout.d.ts.map +1 -0
- package/dist/node/app/layout.js +87 -0
- package/dist/node/app/layout.js.map +1 -0
- package/dist/node/app/owner.d.ts +31 -0
- package/dist/node/app/owner.d.ts.map +1 -0
- package/dist/node/app/owner.js +104 -0
- package/dist/node/app/owner.js.map +1 -0
- package/dist/node/app/pairing.d.ts +55 -0
- package/dist/node/app/pairing.d.ts.map +1 -0
- package/dist/node/app/pairing.js +183 -0
- package/dist/node/app/pairing.js.map +1 -0
- package/dist/node/app/secrets.d.ts +16 -0
- package/dist/node/app/secrets.d.ts.map +1 -0
- package/dist/node/app/secrets.js +72 -0
- package/dist/node/app/secrets.js.map +1 -0
- package/dist/node/app/sessions.d.ts +72 -0
- package/dist/node/app/sessions.d.ts.map +1 -0
- package/dist/node/app/sessions.js +222 -0
- package/dist/node/app/sessions.js.map +1 -0
- package/dist/node/app/tar.d.ts +24 -0
- package/dist/node/app/tar.d.ts.map +1 -0
- package/dist/node/app/tar.js +167 -0
- package/dist/node/app/tar.js.map +1 -0
- package/dist/node/app/uploads.d.ts +37 -0
- package/dist/node/app/uploads.d.ts.map +1 -0
- package/dist/node/app/uploads.js +157 -0
- package/dist/node/app/uploads.js.map +1 -0
- package/dist/node/app/users.d.ts +37 -0
- package/dist/node/app/users.d.ts.map +1 -0
- package/dist/node/app/users.js +62 -0
- package/dist/node/app/users.js.map +1 -0
- package/dist/node/app/worker.d.ts +18 -0
- package/dist/node/app/worker.d.ts.map +1 -0
- package/dist/node/app/worker.js +84 -0
- package/dist/node/app/worker.js.map +1 -0
- package/dist/node/compression.d.ts +7 -0
- package/dist/node/compression.d.ts.map +1 -0
- package/dist/node/compression.js +25 -0
- package/dist/node/compression.js.map +1 -0
- package/dist/node/http/admission.d.ts +63 -0
- package/dist/node/http/admission.d.ts.map +1 -0
- package/dist/node/http/admission.js +134 -0
- package/dist/node/http/admission.js.map +1 -0
- package/dist/node/http/authenticate.d.ts +21 -0
- package/dist/node/http/authenticate.d.ts.map +1 -0
- package/dist/node/http/authenticate.js +34 -0
- package/dist/node/http/authenticate.js.map +1 -0
- package/dist/node/http/cookies.d.ts +32 -0
- package/dist/node/http/cookies.d.ts.map +1 -0
- package/dist/node/http/cookies.js +70 -0
- package/dist/node/http/cookies.js.map +1 -0
- package/dist/node/http/file.d.ts +23 -0
- package/dist/node/http/file.d.ts.map +1 -0
- package/dist/node/http/file.js +94 -0
- package/dist/node/http/file.js.map +1 -0
- package/dist/node/http/headers.d.ts +37 -0
- package/dist/node/http/headers.d.ts.map +1 -0
- package/dist/node/http/headers.js +136 -0
- package/dist/node/http/headers.js.map +1 -0
- package/dist/node/http/http.d.ts +111 -0
- package/dist/node/http/http.d.ts.map +1 -0
- package/dist/node/http/http.js +524 -0
- package/dist/node/http/http.js.map +1 -0
- package/dist/node/http/incoming.d.ts +19 -0
- package/dist/node/http/incoming.d.ts.map +1 -0
- package/dist/node/http/incoming.js +31 -0
- package/dist/node/http/incoming.js.map +1 -0
- package/dist/node/http/index.d.ts +11 -0
- package/dist/node/http/index.d.ts.map +1 -0
- package/dist/node/http/index.js +12 -0
- package/dist/node/http/index.js.map +1 -0
- package/dist/node/http/node.d.ts +78 -0
- package/dist/node/http/node.d.ts.map +1 -0
- package/dist/node/http/node.js +291 -0
- package/dist/node/http/node.js.map +1 -0
- package/dist/node/http/request.d.ts +60 -0
- package/dist/node/http/request.d.ts.map +1 -0
- package/dist/node/http/request.js +118 -0
- package/dist/node/http/request.js.map +1 -0
- package/dist/node/http/response.d.ts +63 -0
- package/dist/node/http/response.d.ts.map +1 -0
- package/dist/node/http/response.js +202 -0
- package/dist/node/http/response.js.map +1 -0
- package/dist/node/http/router.d.ts +132 -0
- package/dist/node/http/router.d.ts.map +1 -0
- package/dist/node/http/router.js +267 -0
- package/dist/node/http/router.js.map +1 -0
- package/dist/node/http/upgrades.d.ts +61 -0
- package/dist/node/http/upgrades.d.ts.map +1 -0
- package/dist/node/http/upgrades.js +192 -0
- package/dist/node/http/upgrades.js.map +1 -0
- package/dist/node/plugins/base-inputs.d.ts +14 -0
- package/dist/node/plugins/base-inputs.d.ts.map +1 -0
- package/dist/node/plugins/base-inputs.js +33 -0
- package/dist/node/plugins/base-inputs.js.map +1 -0
- package/dist/node/plugins/build.d.ts +77 -0
- package/dist/node/plugins/build.d.ts.map +1 -0
- package/dist/node/plugins/build.js +576 -0
- package/dist/node/plugins/build.js.map +1 -0
- package/dist/node/plugins/css-modules.d.ts +13 -0
- package/dist/node/plugins/css-modules.d.ts.map +1 -0
- package/dist/node/plugins/css-modules.js +58 -0
- package/dist/node/plugins/css-modules.js.map +1 -0
- package/dist/node/plugins/discover.d.ts +67 -0
- package/dist/node/plugins/discover.d.ts.map +1 -0
- package/dist/node/plugins/discover.js +369 -0
- package/dist/node/plugins/discover.js.map +1 -0
- package/dist/node/plugins/evaluate.d.ts +33 -0
- package/dist/node/plugins/evaluate.d.ts.map +1 -0
- package/dist/node/plugins/evaluate.js +121 -0
- package/dist/node/plugins/evaluate.js.map +1 -0
- package/dist/node/plugins/index.d.ts +11 -0
- package/dist/node/plugins/index.d.ts.map +1 -0
- package/dist/node/plugins/index.js +13 -0
- package/dist/node/plugins/index.js.map +1 -0
- package/dist/node/plugins/install.d.ts +38 -0
- package/dist/node/plugins/install.d.ts.map +1 -0
- package/dist/node/plugins/install.js +213 -0
- package/dist/node/plugins/install.js.map +1 -0
- package/dist/node/plugins/plugins.d.ts +162 -0
- package/dist/node/plugins/plugins.d.ts.map +1 -0
- package/dist/node/plugins/plugins.js +244 -0
- package/dist/node/plugins/plugins.js.map +1 -0
- package/dist/node/plugins/runtime.d.ts +57 -0
- package/dist/node/plugins/runtime.d.ts.map +1 -0
- package/dist/node/plugins/runtime.js +92 -0
- package/dist/node/plugins/runtime.js.map +1 -0
- package/dist/node/plugins/stack.d.ts +16 -0
- package/dist/node/plugins/stack.d.ts.map +1 -0
- package/dist/node/plugins/stack.js +61 -0
- package/dist/node/plugins/stack.js.map +1 -0
- package/dist/node/plugins/testing.d.ts +58 -0
- package/dist/node/plugins/testing.d.ts.map +1 -0
- package/dist/node/plugins/testing.js +210 -0
- package/dist/node/plugins/testing.js.map +1 -0
- package/dist/node/plugins/watcher.d.ts +69 -0
- package/dist/node/plugins/watcher.d.ts.map +1 -0
- package/dist/node/plugins/watcher.js +622 -0
- package/dist/node/plugins/watcher.js.map +1 -0
- package/dist/node/surfaces/bundle.d.ts +31 -0
- package/dist/node/surfaces/bundle.d.ts.map +1 -0
- package/dist/node/surfaces/bundle.js +118 -0
- package/dist/node/surfaces/bundle.js.map +1 -0
- package/dist/node/surfaces/current.d.ts +17 -0
- package/dist/node/surfaces/current.d.ts.map +1 -0
- package/dist/node/surfaces/current.js +54 -0
- package/dist/node/surfaces/current.js.map +1 -0
- package/dist/node/surfaces/index.d.ts +6 -0
- package/dist/node/surfaces/index.d.ts.map +1 -0
- package/dist/node/surfaces/index.js +6 -0
- package/dist/node/surfaces/index.js.map +1 -0
- package/dist/node/surfaces/published.d.ts +27 -0
- package/dist/node/surfaces/published.d.ts.map +1 -0
- package/dist/node/surfaces/published.js +142 -0
- package/dist/node/surfaces/published.js.map +1 -0
- package/dist/node/surfaces/served.d.ts +15 -0
- package/dist/node/surfaces/served.d.ts.map +1 -0
- package/dist/node/surfaces/served.js +42 -0
- package/dist/node/surfaces/served.js.map +1 -0
- package/dist/node/surfaces/surface-build.d.ts +53 -0
- package/dist/node/surfaces/surface-build.d.ts.map +1 -0
- package/dist/node/surfaces/surface-build.js +105 -0
- package/dist/node/surfaces/surface-build.js.map +1 -0
- package/dist/node/surfaces/tui.d.ts +40 -0
- package/dist/node/surfaces/tui.d.ts.map +1 -0
- package/dist/node/surfaces/tui.js +55 -0
- package/dist/node/surfaces/tui.js.map +1 -0
- package/dist/node/surfaces/web.d.ts +56 -0
- package/dist/node/surfaces/web.d.ts.map +1 -0
- package/dist/node/surfaces/web.js +108 -0
- package/dist/node/surfaces/web.js.map +1 -0
- package/dist/node/tui/actions.d.ts +49 -0
- package/dist/node/tui/actions.d.ts.map +1 -0
- package/dist/node/tui/actions.js +195 -0
- package/dist/node/tui/actions.js.map +1 -0
- package/dist/node/tui/credentials.d.ts +17 -0
- package/dist/node/tui/credentials.d.ts.map +1 -0
- package/dist/node/tui/credentials.js +54 -0
- package/dist/node/tui/credentials.js.map +1 -0
- package/dist/node/tui/filter.d.ts +5 -0
- package/dist/node/tui/filter.d.ts.map +1 -0
- package/dist/node/tui/filter.js +79 -0
- package/dist/node/tui/filter.js.map +1 -0
- package/dist/node/tui/index.d.ts +6 -0
- package/dist/node/tui/index.d.ts.map +1 -0
- package/dist/node/tui/index.js +6 -0
- package/dist/node/tui/index.js.map +1 -0
- package/dist/node/tui/launcher.d.ts +40 -0
- package/dist/node/tui/launcher.d.ts.map +1 -0
- package/dist/node/tui/launcher.js +439 -0
- package/dist/node/tui/launcher.js.map +1 -0
- package/dist/node/tui/pipe.d.ts +18 -0
- package/dist/node/tui/pipe.d.ts.map +1 -0
- package/dist/node/tui/pipe.js +134 -0
- package/dist/node/tui/pipe.js.map +1 -0
- package/dist/node/tui/sandbox.d.ts +54 -0
- package/dist/node/tui/sandbox.d.ts.map +1 -0
- package/dist/node/tui/sandbox.js +431 -0
- package/dist/node/tui/sandbox.js.map +1 -0
- package/dist/node/workers/base.d.ts +30 -0
- package/dist/node/workers/base.d.ts.map +1 -0
- package/dist/node/workers/base.js +255 -0
- package/dist/node/workers/base.js.map +1 -0
- package/dist/node/workers/child.d.ts +4 -0
- package/dist/node/workers/child.d.ts.map +1 -0
- package/dist/node/workers/child.js +6 -0
- package/dist/node/workers/child.js.map +1 -0
- package/dist/node/workers/control.d.ts +83 -0
- package/dist/node/workers/control.d.ts.map +1 -0
- package/dist/node/workers/control.js +77 -0
- package/dist/node/workers/control.js.map +1 -0
- package/dist/node/workers/index.d.ts +4 -0
- package/dist/node/workers/index.d.ts.map +1 -0
- package/dist/node/workers/index.js +7 -0
- package/dist/node/workers/index.js.map +1 -0
- package/dist/node/workers/lock.d.ts +30 -0
- package/dist/node/workers/lock.d.ts.map +1 -0
- package/dist/node/workers/lock.js +180 -0
- package/dist/node/workers/lock.js.map +1 -0
- package/dist/node/workers/main.d.ts +46 -0
- package/dist/node/workers/main.d.ts.map +1 -0
- package/dist/node/workers/main.js +230 -0
- package/dist/node/workers/main.js.map +1 -0
- package/dist/node/workers/process.d.ts +42 -0
- package/dist/node/workers/process.d.ts.map +1 -0
- package/dist/node/workers/process.js +125 -0
- package/dist/node/workers/process.js.map +1 -0
- package/dist/node/workers/workers.d.ts +122 -0
- package/dist/node/workers/workers.d.ts.map +1 -0
- package/dist/node/workers/workers.js +677 -0
- package/dist/node/workers/workers.js.map +1 -0
- package/dist/output.d.ts +1 -1
- package/dist/output.d.ts.map +1 -1
- package/dist/output.js +4 -2
- package/dist/output.js.map +1 -1
- package/dist/react/hooks.d.ts +43 -0
- package/dist/react/hooks.d.ts.map +1 -0
- package/dist/react/hooks.js +82 -0
- package/dist/react/hooks.js.map +1 -0
- package/dist/react/index.d.ts +3 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +4 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/stores.d.ts +9 -0
- package/dist/react/stores.d.ts.map +1 -0
- package/dist/react/stores.js +37 -0
- package/dist/react/stores.js.map +1 -0
- package/dist/registries/contribution.d.ts +50 -0
- package/dist/registries/contribution.d.ts.map +1 -0
- package/dist/registries/contribution.js +129 -0
- package/dist/registries/contribution.js.map +1 -0
- package/dist/registries/entries.d.ts +18 -0
- package/dist/registries/entries.d.ts.map +1 -0
- package/dist/registries/entries.js +42 -0
- package/dist/registries/entries.js.map +1 -0
- package/dist/registries/index.d.ts +3 -0
- package/dist/registries/index.d.ts.map +1 -0
- package/dist/registries/index.js +5 -0
- package/dist/registries/index.js.map +1 -0
- package/dist/registries/internal.d.ts +4 -0
- package/dist/registries/internal.d.ts.map +1 -0
- package/dist/registries/internal.js +5 -0
- package/dist/registries/internal.js.map +1 -0
- package/dist/registries/record.d.ts +115 -0
- package/dist/registries/record.d.ts.map +1 -0
- package/dist/registries/record.js +283 -0
- package/dist/registries/record.js.map +1 -0
- package/dist/registries/registry.d.ts +74 -0
- package/dist/registries/registry.d.ts.map +1 -0
- package/dist/registries/registry.js +14 -0
- package/dist/registries/registry.js.map +1 -0
- package/dist/registries/value.d.ts +48 -0
- package/dist/registries/value.d.ts.map +1 -0
- package/dist/registries/value.js +224 -0
- package/dist/registries/value.js.map +1 -0
- package/dist/remote/calls.d.ts +25 -0
- package/dist/remote/calls.d.ts.map +1 -0
- package/dist/remote/calls.js +62 -0
- package/dist/remote/calls.js.map +1 -0
- package/dist/remote/consumer.d.ts +43 -0
- package/dist/remote/consumer.d.ts.map +1 -0
- package/dist/remote/consumer.js +350 -0
- package/dist/remote/consumer.js.map +1 -0
- package/dist/remote/hold.d.ts +141 -0
- package/dist/remote/hold.d.ts.map +1 -0
- package/dist/remote/hold.js +579 -0
- package/dist/remote/hold.js.map +1 -0
- package/dist/remote/host-link.d.ts +77 -0
- package/dist/remote/host-link.d.ts.map +1 -0
- package/dist/remote/host-link.js +184 -0
- package/dist/remote/host-link.js.map +1 -0
- package/dist/remote/internal.d.ts +6 -0
- package/dist/remote/internal.d.ts.map +1 -0
- package/dist/remote/internal.js +6 -0
- package/dist/remote/internal.js.map +1 -0
- package/dist/remote/path.d.ts +46 -0
- package/dist/remote/path.d.ts.map +1 -0
- package/dist/remote/path.js +73 -0
- package/dist/remote/path.js.map +1 -0
- package/dist/remote/provider.d.ts +89 -0
- package/dist/remote/provider.d.ts.map +1 -0
- package/dist/remote/provider.js +597 -0
- package/dist/remote/provider.js.map +1 -0
- package/dist/remote/relay.d.ts +69 -0
- package/dist/remote/relay.d.ts.map +1 -0
- package/dist/remote/relay.js +219 -0
- package/dist/remote/relay.js.map +1 -0
- package/dist/remote/remote-object.d.ts +138 -0
- package/dist/remote/remote-object.d.ts.map +1 -0
- package/dist/remote/remote-object.js +492 -0
- package/dist/remote/remote-object.js.map +1 -0
- package/dist/remote/replica.d.ts +59 -0
- package/dist/remote/replica.d.ts.map +1 -0
- package/dist/remote/replica.js +125 -0
- package/dist/remote/replica.js.map +1 -0
- package/dist/sqlite/cloudflare.d.ts +2 -0
- package/dist/sqlite/cloudflare.d.ts.map +1 -1
- package/dist/sqlite/cloudflare.js +10 -0
- package/dist/sqlite/cloudflare.js.map +1 -1
- package/dist/sqlite/database.d.ts +5 -2
- package/dist/sqlite/database.d.ts.map +1 -1
- package/dist/sqlite/database.js.map +1 -1
- package/dist/sqlite/node.d.ts +13 -2
- package/dist/sqlite/node.d.ts.map +1 -1
- package/dist/sqlite/node.js +31 -8
- package/dist/sqlite/node.js.map +1 -1
- package/dist/state/batch.d.ts +64 -0
- package/dist/state/batch.d.ts.map +1 -0
- package/dist/state/batch.js +164 -0
- package/dist/state/batch.js.map +1 -0
- package/dist/state/derive.d.ts +52 -0
- package/dist/state/derive.d.ts.map +1 -0
- package/dist/state/derive.js +182 -0
- package/dist/state/derive.js.map +1 -0
- package/dist/state/index.d.ts +6 -0
- package/dist/state/index.d.ts.map +1 -0
- package/dist/state/index.js +4 -0
- package/dist/state/index.js.map +1 -0
- package/dist/state/internal.d.ts +6 -0
- package/dist/state/internal.d.ts.map +1 -0
- package/dist/state/internal.js +8 -0
- package/dist/state/internal.js.map +1 -0
- package/dist/state/native-source.d.ts +106 -0
- package/dist/state/native-source.d.ts.map +1 -0
- package/dist/state/native-source.js +240 -0
- package/dist/state/native-source.js.map +1 -0
- package/dist/state/watchable.d.ts +114 -0
- package/dist/state/watchable.d.ts.map +1 -0
- package/dist/state/watchable.js +156 -0
- package/dist/state/watchable.js.map +1 -0
- package/dist/state/writable.d.ts +32 -0
- package/dist/state/writable.d.ts.map +1 -0
- package/dist/state/writable.js +49 -0
- package/dist/state/writable.js.map +1 -0
- package/dist/store/adapter.d.ts +67 -0
- package/dist/store/adapter.d.ts.map +1 -0
- package/dist/store/adapter.js +118 -0
- package/dist/store/adapter.js.map +1 -0
- package/dist/store/allocator.d.ts +17 -0
- package/dist/store/allocator.d.ts.map +1 -0
- package/dist/store/allocator.js +30 -0
- package/dist/store/allocator.js.map +1 -0
- package/dist/store/applier.d.ts +8 -0
- package/dist/store/applier.d.ts.map +1 -0
- package/dist/store/applier.js +375 -0
- package/dist/store/applier.js.map +1 -0
- package/dist/store/apply-batch.d.ts +12 -0
- package/dist/store/apply-batch.d.ts.map +1 -0
- package/dist/store/apply-batch.js +83 -0
- package/dist/store/apply-batch.js.map +1 -0
- package/dist/store/archive.d.ts +32 -0
- package/dist/store/archive.d.ts.map +1 -0
- package/dist/store/archive.js +130 -0
- package/dist/store/archive.js.map +1 -0
- package/dist/store/backend.d.ts +10 -0
- package/dist/store/backend.d.ts.map +1 -0
- package/dist/store/backend.js +15 -0
- package/dist/store/backend.js.map +1 -0
- package/dist/store/catalog.d.ts +24 -0
- package/dist/store/catalog.d.ts.map +1 -0
- package/dist/store/catalog.js +17 -0
- package/dist/store/catalog.js.map +1 -0
- package/dist/store/claims.d.ts +23 -0
- package/dist/store/claims.d.ts.map +1 -0
- package/dist/store/claims.js +65 -0
- package/dist/store/claims.js.map +1 -0
- package/dist/store/columns.d.ts +77 -0
- package/dist/store/columns.d.ts.map +1 -0
- package/dist/store/columns.js +77 -0
- package/dist/store/columns.js.map +1 -0
- package/dist/store/engine.d.ts +176 -0
- package/dist/store/engine.d.ts.map +1 -0
- package/dist/store/engine.js +283 -0
- package/dist/store/engine.js.map +1 -0
- package/dist/store/evaluate.d.ts +17 -0
- package/dist/store/evaluate.d.ts.map +1 -0
- package/dist/store/evaluate.js +128 -0
- package/dist/store/evaluate.js.map +1 -0
- package/dist/store/export.d.ts +17 -0
- package/dist/store/export.d.ts.map +1 -0
- package/dist/store/export.js +200 -0
- package/dist/store/export.js.map +1 -0
- package/dist/store/expression.d.ts +150 -0
- package/dist/store/expression.d.ts.map +1 -0
- package/dist/store/expression.js +268 -0
- package/dist/store/expression.js.map +1 -0
- package/dist/store/import.d.ts +10 -0
- package/dist/store/import.d.ts.map +1 -0
- package/dist/store/import.js +276 -0
- package/dist/store/import.js.map +1 -0
- package/dist/store/index.d.ts +16 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +13 -0
- package/dist/store/index.js.map +1 -0
- package/dist/store/json-column.d.ts +33 -0
- package/dist/store/json-column.d.ts.map +1 -0
- package/dist/store/json-column.js +62 -0
- package/dist/store/json-column.js.map +1 -0
- package/dist/store/jsonl.d.ts +9 -0
- package/dist/store/jsonl.d.ts.map +1 -0
- package/dist/store/jsonl.js +61 -0
- package/dist/store/jsonl.js.map +1 -0
- package/dist/store/live-query.d.ts +108 -0
- package/dist/store/live-query.d.ts.map +1 -0
- package/dist/store/live-query.js +254 -0
- package/dist/store/live-query.js.map +1 -0
- package/dist/store/outbox.d.ts +26 -0
- package/dist/store/outbox.d.ts.map +1 -0
- package/dist/store/outbox.js +80 -0
- package/dist/store/outbox.js.map +1 -0
- package/dist/store/query.d.ts +39 -0
- package/dist/store/query.d.ts.map +1 -0
- package/dist/store/query.js +97 -0
- package/dist/store/query.js.map +1 -0
- package/dist/store/refusal.d.ts +15 -0
- package/dist/store/refusal.d.ts.map +1 -0
- package/dist/store/refusal.js +36 -0
- package/dist/store/refusal.js.map +1 -0
- package/dist/store/rows.d.ts +80 -0
- package/dist/store/rows.d.ts.map +1 -0
- package/dist/store/rows.js +183 -0
- package/dist/store/rows.js.map +1 -0
- package/dist/store/schema.d.ts +25 -0
- package/dist/store/schema.d.ts.map +1 -0
- package/dist/store/schema.js +115 -0
- package/dist/store/schema.js.map +1 -0
- package/dist/store/sql.d.ts +73 -0
- package/dist/store/sql.d.ts.map +1 -0
- package/dist/store/sql.js +234 -0
- package/dist/store/sql.js.map +1 -0
- package/dist/store/step.d.ts +50 -0
- package/dist/store/step.d.ts.map +1 -0
- package/dist/store/step.js +52 -0
- package/dist/store/step.js.map +1 -0
- package/dist/store/store.d.ts +171 -0
- package/dist/store/store.d.ts.map +1 -0
- package/dist/store/store.js +818 -0
- package/dist/store/store.js.map +1 -0
- package/dist/store/table-changes.d.ts +29 -0
- package/dist/store/table-changes.d.ts.map +1 -0
- package/dist/store/table-changes.js +102 -0
- package/dist/store/table-changes.js.map +1 -0
- package/dist/store/table-evolve.d.ts +74 -0
- package/dist/store/table-evolve.d.ts.map +1 -0
- package/dist/store/table-evolve.js +201 -0
- package/dist/store/table-evolve.js.map +1 -0
- package/dist/store/table-handle.d.ts +73 -0
- package/dist/store/table-handle.d.ts.map +1 -0
- package/dist/store/table-handle.js +101 -0
- package/dist/store/table-handle.js.map +1 -0
- package/dist/store/table-history.d.ts +75 -0
- package/dist/store/table-history.d.ts.map +1 -0
- package/dist/store/table-history.js +42 -0
- package/dist/store/table-history.js.map +1 -0
- package/dist/store/table-migration.d.ts +16 -0
- package/dist/store/table-migration.d.ts.map +1 -0
- package/dist/store/table-migration.js +202 -0
- package/dist/store/table-migration.js.map +1 -0
- package/dist/store/table-writes.d.ts +125 -0
- package/dist/store/table-writes.d.ts.map +1 -0
- package/dist/store/table-writes.js +170 -0
- package/dist/store/table-writes.js.map +1 -0
- package/dist/store/table.d.ts +80 -0
- package/dist/store/table.d.ts.map +1 -0
- package/dist/store/table.js +103 -0
- package/dist/store/table.js.map +1 -0
- package/dist/store/text.d.ts +14 -0
- package/dist/store/text.d.ts.map +1 -0
- package/dist/store/text.js +51 -0
- package/dist/store/text.js.map +1 -0
- package/dist/store/writes.d.ts +5 -0
- package/dist/store/writes.d.ts.map +1 -0
- package/dist/store/writes.js +4 -0
- package/dist/store/writes.js.map +1 -0
- package/dist/surfaces/active-language.d.ts +20 -0
- package/dist/surfaces/active-language.d.ts.map +1 -0
- package/dist/surfaces/active-language.js +78 -0
- package/dist/surfaces/active-language.js.map +1 -0
- package/dist/surfaces/active-theme.d.ts +16 -0
- package/dist/surfaces/active-theme.d.ts.map +1 -0
- package/dist/surfaces/active-theme.js +47 -0
- package/dist/surfaces/active-theme.js.map +1 -0
- package/dist/surfaces/client.d.ts +96 -0
- package/dist/surfaces/client.d.ts.map +1 -0
- package/dist/surfaces/client.js +264 -0
- package/dist/surfaces/client.js.map +1 -0
- package/dist/surfaces/connection.d.ts +49 -0
- package/dist/surfaces/connection.d.ts.map +1 -0
- package/dist/surfaces/connection.js +142 -0
- package/dist/surfaces/connection.js.map +1 -0
- package/dist/surfaces/format.d.ts +5 -0
- package/dist/surfaces/format.d.ts.map +1 -0
- package/dist/surfaces/format.js +37 -0
- package/dist/surfaces/format.js.map +1 -0
- package/dist/surfaces/index.d.ts +15 -0
- package/dist/surfaces/index.d.ts.map +1 -0
- package/dist/surfaces/index.js +18 -0
- package/dist/surfaces/index.js.map +1 -0
- package/dist/surfaces/language.d.ts +53 -0
- package/dist/surfaces/language.d.ts.map +1 -0
- package/dist/surfaces/language.js +74 -0
- package/dist/surfaces/language.js.map +1 -0
- package/dist/surfaces/loaded.d.ts +42 -0
- package/dist/surfaces/loaded.d.ts.map +1 -0
- package/dist/surfaces/loaded.js +116 -0
- package/dist/surfaces/loaded.js.map +1 -0
- package/dist/surfaces/locale-choice.d.ts +25 -0
- package/dist/surfaces/locale-choice.d.ts.map +1 -0
- package/dist/surfaces/locale-choice.js +14 -0
- package/dist/surfaces/locale-choice.js.map +1 -0
- package/dist/surfaces/messages.d.ts +67 -0
- package/dist/surfaces/messages.d.ts.map +1 -0
- package/dist/surfaces/messages.js +112 -0
- package/dist/surfaces/messages.js.map +1 -0
- package/dist/surfaces/page-state.d.ts +14 -0
- package/dist/surfaces/page-state.d.ts.map +1 -0
- package/dist/surfaces/page-state.js +43 -0
- package/dist/surfaces/page-state.js.map +1 -0
- package/dist/surfaces/preference.d.ts +32 -0
- package/dist/surfaces/preference.d.ts.map +1 -0
- package/dist/surfaces/preference.js +72 -0
- package/dist/surfaces/preference.js.map +1 -0
- package/dist/surfaces/registered.d.ts +33 -0
- package/dist/surfaces/registered.d.ts.map +1 -0
- package/dist/surfaces/registered.js +51 -0
- package/dist/surfaces/registered.js.map +1 -0
- package/dist/surfaces/scripts.d.ts +84 -0
- package/dist/surfaces/scripts.d.ts.map +1 -0
- package/dist/surfaces/scripts.js +28 -0
- package/dist/surfaces/scripts.js.map +1 -0
- package/dist/surfaces/theme-choice.d.ts +31 -0
- package/dist/surfaces/theme-choice.d.ts.map +1 -0
- package/dist/surfaces/theme-choice.js +18 -0
- package/dist/surfaces/theme-choice.js.map +1 -0
- package/dist/surfaces/themes.d.ts +43 -0
- package/dist/surfaces/themes.d.ts.map +1 -0
- package/dist/surfaces/themes.js +110 -0
- package/dist/surfaces/themes.js.map +1 -0
- package/dist/surfaces/translations.d.ts +29 -0
- package/dist/surfaces/translations.d.ts.map +1 -0
- package/dist/surfaces/translations.js +57 -0
- package/dist/surfaces/translations.js.map +1 -0
- package/dist/sync/batch.d.ts +18 -0
- package/dist/sync/batch.d.ts.map +1 -0
- package/dist/sync/batch.js +125 -0
- package/dist/sync/batch.js.map +1 -0
- package/dist/sync/client.d.ts +166 -0
- package/dist/sync/client.d.ts.map +1 -0
- package/dist/sync/client.js +438 -0
- package/dist/sync/client.js.map +1 -0
- package/dist/sync/files.d.ts +46 -0
- package/dist/sync/files.d.ts.map +1 -0
- package/dist/sync/files.js +13 -0
- package/dist/sync/files.js.map +1 -0
- package/dist/sync/filesystem.d.ts +37 -0
- package/dist/sync/filesystem.d.ts.map +1 -0
- package/dist/sync/filesystem.js +185 -0
- package/dist/sync/filesystem.js.map +1 -0
- package/dist/sync/index.d.ts +8 -0
- package/dist/sync/index.d.ts.map +1 -0
- package/dist/sync/index.js +9 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/lines.d.ts +18 -0
- package/dist/sync/lines.d.ts.map +1 -0
- package/dist/sync/lines.js +46 -0
- package/dist/sync/lines.js.map +1 -0
- package/dist/sync/remote.d.ts +130 -0
- package/dist/sync/remote.d.ts.map +1 -0
- package/dist/sync/remote.js +46 -0
- package/dist/sync/remote.js.map +1 -0
- package/dist/sync/state.d.ts +17 -0
- package/dist/sync/state.d.ts.map +1 -0
- package/dist/sync/state.js +40 -0
- package/dist/sync/state.js.map +1 -0
- package/dist/telemetry-ingest/batch.d.ts +70 -0
- package/dist/telemetry-ingest/batch.d.ts.map +1 -0
- package/dist/telemetry-ingest/batch.js +110 -0
- package/dist/telemetry-ingest/batch.js.map +1 -0
- package/dist/telemetry-ingest/facet.d.ts +21 -0
- package/dist/telemetry-ingest/facet.d.ts.map +1 -0
- package/dist/telemetry-ingest/facet.js +96 -0
- package/dist/telemetry-ingest/facet.js.map +1 -0
- package/dist/telemetry-ingest/index.d.ts +5 -0
- package/dist/telemetry-ingest/index.d.ts.map +1 -0
- package/dist/telemetry-ingest/index.js +8 -0
- package/dist/telemetry-ingest/index.js.map +1 -0
- package/dist/telemetry-ingest/recorder.d.ts +50 -0
- package/dist/telemetry-ingest/recorder.d.ts.map +1 -0
- package/dist/telemetry-ingest/recorder.js +298 -0
- package/dist/telemetry-ingest/recorder.js.map +1 -0
- package/dist/telemetry-ingest/sender.d.ts +14 -0
- package/dist/telemetry-ingest/sender.d.ts.map +1 -0
- package/dist/telemetry-ingest/sender.js +64 -0
- package/dist/telemetry-ingest/sender.js.map +1 -0
- package/dist/telemetry-sqlite/index.d.ts +13 -4
- package/dist/telemetry-sqlite/index.d.ts.map +1 -1
- package/dist/telemetry-sqlite/index.js +81 -241
- package/dist/telemetry-sqlite/index.js.map +1 -1
- package/dist/telemetry-sqlite/node.d.ts +13 -0
- package/dist/telemetry-sqlite/node.d.ts.map +1 -0
- package/dist/telemetry-sqlite/node.js +27 -0
- package/dist/telemetry-sqlite/node.js.map +1 -0
- package/dist/telemetry-sqlite/schema.d.ts +9 -0
- package/dist/telemetry-sqlite/schema.d.ts.map +1 -0
- package/dist/telemetry-sqlite/schema.js +61 -0
- package/dist/telemetry-sqlite/schema.js.map +1 -0
- package/dist/telemetry-sqlite/store.d.ts +3 -0
- package/dist/telemetry-sqlite/store.d.ts.map +1 -1
- package/dist/telemetry-sqlite/store.js +24 -13
- package/dist/telemetry-sqlite/store.js.map +1 -1
- package/dist/telemetry.d.ts +937 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +470 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/tui/bridge.d.ts +112 -0
- package/dist/tui/bridge.d.ts.map +1 -0
- package/dist/tui/bridge.js +9 -0
- package/dist/tui/bridge.js.map +1 -0
- package/dist/tui/channel.d.ts +44 -0
- package/dist/tui/channel.d.ts.map +1 -0
- package/dist/tui/channel.js +150 -0
- package/dist/tui/channel.js.map +1 -0
- package/dist/tui/frames.d.ts +5 -0
- package/dist/tui/frames.d.ts.map +1 -0
- package/dist/tui/frames.js +52 -0
- package/dist/tui/frames.js.map +1 -0
- package/dist/tui/index.d.ts +7 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js +8 -0
- package/dist/tui/index.js.map +1 -0
- package/dist/tui/runtime.d.ts +46 -0
- package/dist/tui/runtime.d.ts.map +1 -0
- package/dist/tui/runtime.js +101 -0
- package/dist/tui/runtime.js.map +1 -0
- package/dist/tui/scope.d.ts +46 -0
- package/dist/tui/scope.d.ts.map +1 -0
- package/dist/tui/scope.js +141 -0
- package/dist/tui/scope.js.map +1 -0
- package/dist/tui/terminal.d.ts +15 -0
- package/dist/tui/terminal.d.ts.map +1 -0
- package/dist/tui/terminal.js +37 -0
- package/dist/tui/terminal.js.map +1 -0
- package/dist/tui/theme.d.ts +17 -0
- package/dist/tui/theme.d.ts.map +1 -0
- package/dist/tui/theme.js +38 -0
- package/dist/tui/theme.js.map +1 -0
- package/dist/watch.d.ts +194 -0
- package/dist/watch.d.ts.map +1 -0
- package/dist/watch.js +383 -0
- package/dist/watch.js.map +1 -0
- package/dist/web/environment.d.ts +4 -0
- package/dist/web/environment.d.ts.map +1 -0
- package/dist/web/environment.js +37 -0
- package/dist/web/environment.js.map +1 -0
- package/dist/web/index.d.ts +5 -0
- package/dist/web/index.d.ts.map +1 -0
- package/dist/web/index.js +7 -0
- package/dist/web/index.js.map +1 -0
- package/dist/web/language.d.ts +7 -0
- package/dist/web/language.d.ts.map +1 -0
- package/dist/web/language.js +21 -0
- package/dist/web/language.js.map +1 -0
- package/dist/web/page.d.ts +29 -0
- package/dist/web/page.d.ts.map +1 -0
- package/dist/web/page.js +92 -0
- package/dist/web/page.js.map +1 -0
- package/dist/web/scripts.d.ts +23 -0
- package/dist/web/scripts.d.ts.map +1 -0
- package/dist/web/scripts.js +50 -0
- package/dist/web/scripts.js.map +1 -0
- package/dist/web/styles.d.ts +17 -0
- package/dist/web/styles.d.ts.map +1 -0
- package/dist/web/styles.js +218 -0
- package/dist/web/styles.js.map +1 -0
- package/dist/web/themes.d.ts +6 -0
- package/dist/web/themes.d.ts.map +1 -0
- package/dist/web/themes.js +31 -0
- package/dist/web/themes.js.map +1 -0
- package/docs/benchmarks.md +1036 -0
- package/docs/decisions.md +3436 -0
- package/docs/dependencies/book.md +1671 -0
- package/docs/dependencies/index.html +2641 -0
- package/docs/dependencies/model.md +330 -0
- package/docs/design.md +3065 -0
- package/docs/durable-observers/book.md +432 -0
- package/docs/durable-observers/index.html +517 -0
- package/docs/flow-control/book.md +333 -0
- package/docs/flow-control/fold/index.html +265 -0
- package/docs/flow-control/index.html +548 -0
- package/docs/flow-control/window/index.html +228 -0
- package/docs/guide-plugins-hosts/book.md +957 -0
- package/docs/guide-plugins-hosts/index.html +952 -0
- package/docs/http-workers/book.md +378 -0
- package/docs/http-workers/index.html +515 -0
- package/docs/i18n/book.md +217 -0
- package/docs/i18n/index.html +344 -0
- package/docs/layer-1.md +311 -0
- package/docs/layer-2.md +216 -0
- package/docs/p3-features/README.md +6 -0
- package/docs/p3-features/book.md +478 -0
- package/docs/plugin-authoring.md +276 -0
- package/docs/plugin-model/book.md +186 -0
- package/docs/plugin-model/index.html +310 -0
- package/docs/plugin-primer/book.md +273 -0
- package/docs/plugin-primer/index.html +430 -0
- package/docs/slice-1.md +236 -0
- package/docs/slice-10.md +288 -0
- package/docs/slice-11.md +114 -0
- package/docs/slice-12.md +132 -0
- package/docs/slice-13.md +121 -0
- package/docs/slice-2.md +174 -0
- package/docs/slice-3a.md +296 -0
- package/docs/slice-3b.md +197 -0
- package/docs/slice-4.md +146 -0
- package/docs/slice-4a.md +418 -0
- package/docs/slice-4b.md +208 -0
- package/docs/slice-5.md +281 -0
- package/docs/slice-6a.md +676 -0
- package/docs/slice-6b.md +332 -0
- package/docs/slice-7a.md +130 -0
- package/docs/slice-7b/book.md +608 -0
- package/docs/slice-7b/index.html +842 -0
- package/docs/slice-7b.md +255 -0
- package/docs/slice-7c.md +165 -0
- package/docs/slice-8.md +194 -0
- package/docs/slice-9.md +110 -0
- package/docs/slices.md +241 -0
- package/docs/store/book.md +670 -0
- package/docs/store/index.html +861 -0
- package/docs/store/walkthrough.md +193 -0
- package/docs/theming/book.md +223 -0
- package/docs/theming/index.html +371 -0
- package/docs/tutorial/book.md +2169 -0
- package/docs/tutorial/index.html +2112 -0
- package/docs/tutorial/screens/click-after.png +0 -0
- package/docs/tutorial/screens/click-before.png +0 -0
- package/docs/tutorial/screens/edited.png +0 -0
- package/docs/tutorial/screens/french.png +0 -0
- package/docs/tutorial/screens/harbor.png +0 -0
- package/docs/tutorial/screens/page.png +0 -0
- package/docs/tutorial/screens/traces-ada.png +0 -0
- package/docs/tutorial/screens/traces.png +0 -0
- package/package.json +114 -20
- package/src/delta/README.md +69 -0
- package/dist/cell.d.ts +0 -122
- package/dist/cell.d.ts.map +0 -1
- package/dist/cell.js +0 -356
- package/dist/cell.js.map +0 -1
- package/dist/cluster.d.ts +0 -27
- package/dist/cluster.d.ts.map +0 -1
- package/dist/cluster.js +0 -230
- package/dist/cluster.js.map +0 -1
- package/dist/connection.d.ts +0 -270
- package/dist/connection.d.ts.map +0 -1
- package/dist/connection.js +0 -1216
- package/dist/connection.js.map +0 -1
- package/dist/contract.d.ts +0 -208
- package/dist/contract.d.ts.map +0 -1
- package/dist/contract.js +0 -246
- package/dist/contract.js.map +0 -1
- package/dist/declare.d.ts +0 -33
- package/dist/declare.d.ts.map +0 -1
- package/dist/declare.js +0 -2
- package/dist/declare.js.map +0 -1
- package/dist/errors.d.ts +0 -28
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -59
- package/dist/errors.js.map +0 -1
- package/dist/host.d.ts +0 -348
- package/dist/host.d.ts.map +0 -1
- package/dist/host.js +0 -1000
- package/dist/host.js.map +0 -1
- package/dist/link.d.ts +0 -107
- package/dist/link.d.ts.map +0 -1
- package/dist/link.js +0 -355
- package/dist/link.js.map +0 -1
- package/dist/loader.d.ts +0 -4
- package/dist/loader.d.ts.map +0 -1
- package/dist/loader.js +0 -73
- package/dist/loader.js.map +0 -1
- package/dist/manager.d.ts +0 -115
- package/dist/manager.d.ts.map +0 -1
- package/dist/manager.js +0 -345
- package/dist/manager.js.map +0 -1
- package/dist/node.d.ts +0 -4
- package/dist/node.d.ts.map +0 -1
- package/dist/node.js +0 -4
- package/dist/node.js.map +0 -1
- package/dist/object.d.ts +0 -438
- package/dist/object.d.ts.map +0 -1
- package/dist/object.js +0 -1571
- package/dist/object.js.map +0 -1
- package/dist/publish.d.ts +0 -5
- package/dist/publish.d.ts.map +0 -1
- package/dist/publish.js +0 -40
- package/dist/publish.js.map +0 -1
- package/dist/registry.d.ts +0 -25
- package/dist/registry.d.ts.map +0 -1
- package/dist/registry.js +0 -6
- package/dist/registry.js.map +0 -1
- package/dist/reload.d.ts +0 -126
- package/dist/reload.d.ts.map +0 -1
- package/dist/reload.js +0 -653
- package/dist/reload.js.map +0 -1
- package/dist/remote.d.ts +0 -165
- package/dist/remote.d.ts.map +0 -1
- package/dist/remote.js +0 -612
- package/dist/remote.js.map +0 -1
- package/dist/schema.d.ts +0 -21
- package/dist/schema.d.ts.map +0 -1
- package/dist/schema.js +0 -228
- package/dist/schema.js.map +0 -1
- package/dist/state.d.ts +0 -92
- package/dist/state.d.ts.map +0 -1
- package/dist/state.js +0 -287
- package/dist/state.js.map +0 -1
- package/dist/types.d.ts +0 -88
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/websocket.d.ts +0 -15
- package/dist/websocket.d.ts.map +0 -1
- package/dist/websocket.js +0 -16
- package/dist/websocket.js.map +0 -1
- package/dist/wire.d.ts +0 -216
- package/dist/wire.d.ts.map +0 -1
- package/dist/wire.js +0 -165
- package/dist/wire.js.map +0 -1
- package/docs/guide.md +0 -814
- package/docs/spec.md +0 -288
- package/docs/tutorial.md +0 -931
package/docs/slice-4b.md
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
# Slice 4b: authority and housekeeping (spec)
|
|
2
|
+
|
|
3
|
+
Status: **revised (2026-10-24) for flow control per origin; the owner sent it to building directly**, with reviews of
|
|
4
|
+
the build by fresh reviewers. Guiding rule (owner): simple, fast, correct. The single source for building 4b, together
|
|
5
|
+
with the feature map in `slices.md` (entries assigned to 4b) and its "Carry-over" section for slice 4b, `design.md` read
|
|
6
|
+
in full (most relevant: §3 links, relays and keep-alive, §4 principals and revocation, §6 cycles, §19 presence, §22
|
|
7
|
+
size limits and compression, §26 open points), the decision log (R2, R10, R11, Q2, Q5, R26, "Compression at the
|
|
8
|
+
origin", "Relay flow control per origin", "Slice 4b: `host.activity` is a watchable", "Simplification pass after 4a")
|
|
9
|
+
and the root `AGENTS.md` section "Chord v2 Code Style". Builds on slice 4a as simplified (`79a0206dc`).
|
|
10
|
+
|
|
11
|
+
Points marked **proposal** are the builder's default; the owner decides them after the build (they are collected in
|
|
12
|
+
the last section).
|
|
13
|
+
|
|
14
|
+
## What an app can do after this slice
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
type Revocation = { grant: string } | { device: string } | { session: string };
|
|
18
|
+
const server = createHost<P, Revocation>({
|
|
19
|
+
address: Server(), principal: { kind: "server" }, onError,
|
|
20
|
+
revokedBy: (p) => p.kind === "guest" ? [{ grant: p.grant }, { session: p.session }]
|
|
21
|
+
: p.kind === "owner" && p.access === "device" ? [{ device: p.device }] : [],
|
|
22
|
+
compression: nodeCompression, // Node-only: src/node/compression.ts
|
|
23
|
+
});
|
|
24
|
+
server.revoke({ grant: "g1" }, ctx); // ends g1's objects here and on every worker, closes g1's links
|
|
25
|
+
|
|
26
|
+
host.serve(Notes, ({ session }, principal, self) => {
|
|
27
|
+
const viewers = self.derive([host.references(Notes)], ([refs]) =>
|
|
28
|
+
refs.filter((r) => r.params.session === session).length);
|
|
29
|
+
…
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const activity = await worker.activity.watch(ctx); // the app's supervisor decides
|
|
33
|
+
|
|
34
|
+
server.accept(webSocketLink(ws), { principal, limits: { part: 16 * MiB, decoded: 64 * MiB } }, ctx);
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## 1. Revocation (§4, R10, R11)
|
|
38
|
+
|
|
39
|
+
- `createHost({ revokedBy })`: `(principal: P) => R[]`, `R` JSON; the same app code on every host. A principal's
|
|
40
|
+
**revocation keys** are the canonical JSON of each value `revokedBy` returns, computed once per principal object and
|
|
41
|
+
cached weakly (a `WeakMap` keyed by the principal object, with a GC test). L1's unused `revocationKeys` was cut
|
|
42
|
+
(owner, 2026-10-24): write the helper here, next to its user.
|
|
43
|
+
- `host.revoke(r, context)` on a host, synchronously:
|
|
44
|
+
1. ends at once every object whose identity principal `p` has `r` in its keys (remote objects; local objects have no
|
|
45
|
+
principal), whatever references remain (R11): each holder gets `gone` with `forbidden` ("revoked"), running
|
|
46
|
+
calls' contexts are aborted (their callers are rejected), an activation in progress is abandoned. Teardown then
|
|
47
|
+
runs as for any ending (drain, closes with reason `end`).
|
|
48
|
+
2. closes every **child** link (made by `accept`) whose principal has `r`; never the parent link, never the host's
|
|
49
|
+
own principal. Closing a tab's link at a relay sends `closed { origin }` upstream (4a), so that tab's holds on the
|
|
50
|
+
workers are released without a revocation message.
|
|
51
|
+
3. sends `revoke { revocation: r }` on every **route** link (its children), which apply it with their own
|
|
52
|
+
`revokedBy`, and so on down. Nothing is replayed: a child connected later gets no past revocation (its objects
|
|
53
|
+
are new, and the revoked links are closed already).
|
|
54
|
+
- A `revoke` message is honoured only on the **parent** link (like the principal fields on holds); arriving on any
|
|
55
|
+
other link it is ignored.
|
|
56
|
+
- What `gone` means for consumers is 3a's rule (calls on the hold reject; a relay forwards it). Holds acting for a
|
|
57
|
+
revoked principal arrive at a worker as their own objects (identity principal = the hold's principal, 4a), so the
|
|
58
|
+
worker's own `revokedBy` ends them.
|
|
59
|
+
- Reconnecting never restores revoked authority: authentication is the app's; a changed grant is a new principal (its
|
|
60
|
+
key includes the grant revision, design §4).
|
|
61
|
+
- Jobs and revocation (R11) arrive with slice 5.
|
|
62
|
+
|
|
63
|
+
## 2. Cycles across hosts (§6, Q5)
|
|
64
|
+
|
|
65
|
+
- Every object instance gets an **instance id** (uuidv7) at its first attempt; a restarted object (a new instance)
|
|
66
|
+
gets a new one, so an old chain never matches it (owner, 2026-10-24, D4).
|
|
67
|
+
- A hold made during an activation (a `self.get` of a type that is not served here, routed over a link) carries
|
|
68
|
+
`chain: string[]`: the chain of the activating object (the chain of the hold that created it, if any) plus its own
|
|
69
|
+
instance id; at most 32 entries (a longer chain keeps its last 32: a longer cycle is not detected; documented).
|
|
70
|
+
- A provider refuses a hold whose chain contains the instance id of the object it would bind while that object is
|
|
71
|
+
activating: the hold fails broken `invalid/cycle` naming the cycle by labels where known.
|
|
72
|
+
- **Proposal:** a dependency failing with `invalid/cycle` fails the dependent **broken** with the same error (an
|
|
73
|
+
exception to R18's "dependency failures are transient"). Otherwise, A (server) → B (worker) → A would fail B
|
|
74
|
+
transient, B would retry with backoff, and every retry would hit the same cycle.
|
|
75
|
+
- `chain` is honoured on trusted links (any role: a cycle runs server → worker → server over route and parent links)
|
|
76
|
+
and dropped from holds arriving on untrusted links. Relays copy it upstream unchanged (they activate nothing).
|
|
77
|
+
- One-host cycles stay as built (slice 1: following waiting objects).
|
|
78
|
+
|
|
79
|
+
## 3. Presence: `host.references(Type)` (§19)
|
|
80
|
+
|
|
81
|
+
- `host.references(Type)` (on the host, and on the facet's host): a JSON `Watchable` of the references to objects of
|
|
82
|
+
that type on this host: `{ params, principal, origin }[]` (`principal` absent for a local type). `origin` is the
|
|
83
|
+
incarnation of the host where the reference was made: for a hold over a link, the hold's caller incarnation (the
|
|
84
|
+
tab's own, carried by a relay on route links, 4a); for a local reference, this host's incarnation. Two tabs are two
|
|
85
|
+
origins.
|
|
86
|
+
- It changes in the batch where a reference binds or ends; derives over it recompute there (W1). A link drop is a
|
|
87
|
+
departure (its holds end); smoothing is the UI's. Lingering objects have no references.
|
|
88
|
+
- Cost: one entry added or removed per reference, kept per type (a type nobody asks about costs a counter at most:
|
|
89
|
+
**proposal** build the list per type only while it is watched or read).
|
|
90
|
+
|
|
91
|
+
## 4. Keep-alive counts: `host.activity` (§3, R26)
|
|
92
|
+
|
|
93
|
+
- `host.activity`: a JSON `Watchable` of `{ references, calls, jobs, lingering }` (owner, 2026-10-24): holds arriving
|
|
94
|
+
over links and served here, method calls running on this host (local and remote), running jobs (0 until slice 5),
|
|
95
|
+
lingering objects.
|
|
96
|
+
- Counters are kept where the work happens; a change marks the watchable dirty, and one publication per microtask turn
|
|
97
|
+
carries every change of that turn (not one per call start and end); its value is built from the counters when
|
|
98
|
+
published or read. A slow watcher gets the newest counts (pending queue).
|
|
99
|
+
|
|
100
|
+
## 5. Size limits per part (R2, Q2)
|
|
101
|
+
|
|
102
|
+
- `accept(link, { …, limits })`, `connect(link, { …, limits })` and `resolve`'s result take
|
|
103
|
+
`limits: { part?: number; decoded?: number }` (bytes): `part` bounds a part's size on the wire, `decoded` its size
|
|
104
|
+
after inflating (section 6). Defaults (Q2): none on trusted links (IPC); on untrusted links 16 MiB and 64 MiB.
|
|
105
|
+
- Checked from the part's length before it is parsed or inflated (parts are opaque); the decoded bound is enforced
|
|
106
|
+
while inflating (section 6).
|
|
107
|
+
- An oversized part fails only its hold or call (`too_large/part`); the other parts of the message apply: an argument
|
|
108
|
+
part fails its call (`error` to the caller), a result fails its call, a snapshot fails its hold (no automatic
|
|
109
|
+
re-hold), a state part fails its hold. The link stays up.
|
|
110
|
+
- **The admitting link's limits travel with relayed work** (Q2): a relay checks `part` on the admitting link itself
|
|
111
|
+
(the bytes are there) and stamps `limit` (the admitting link's `decoded`) on the upstream `hold`; honoured only on
|
|
112
|
+
the parent link (like the principal fields); calls on the hold inherit it. The host that inflates enforces the
|
|
113
|
+
smaller of its own link's and the stamped one, so a worker never inflates a tab's argument beyond the tab link's
|
|
114
|
+
limit.
|
|
115
|
+
- The WebSocket's `maxPayload` stays the transport's hard cap (4a).
|
|
116
|
+
|
|
117
|
+
## 6. Compression at the origin (#27: owner leaning (b), built as (b))
|
|
118
|
+
|
|
119
|
+
Problem: encoding happens in the synchronous flush (one message per commit, W1), so compression must be synchronous;
|
|
120
|
+
browsers have only the asynchronous `CompressionStream`/`DecompressionStream`.
|
|
121
|
+
|
|
122
|
+
- **Who compresses:** a host with a synchronous compressor (`createHost({ compression })`) compresses each JSON part
|
|
123
|
+
above 16 KiB (deflate raw, level 1) when it encodes it; the part's envelope says so (a codec flag per part in both
|
|
124
|
+
codecs). Byte segments stay raw. Hosts without one (browsers) send every part uncompressed; their parts are
|
|
125
|
+
arguments and params, which are small.
|
|
126
|
+
- **Who inflates:** the end that owns the part, when its message is handled. Relays never inflate (parts are opaque).
|
|
127
|
+
- **The adapter**, portable: `compression?: { deflate(bytes): Uint8Array; inflate(bytes, limit): Uint8Array }`
|
|
128
|
+
(synchronous). Chord ships `nodeCompression` (Node's `zlib.deflateRawSync`/`inflateRawSync` with
|
|
129
|
+
`maxOutputLength`) in a Node-only subpath; the portable core (`src` but `src/node`) imports no Node module. Without the adapter, a host
|
|
130
|
+
inflates asynchronously with the web `DecompressionStream("deflate-raw")`, counting output bytes and aborting past
|
|
131
|
+
the limit.
|
|
132
|
+
- **Order with asynchronous inflate:** a received message whose parts need an asynchronous inflate is held, and every
|
|
133
|
+
later message of that link waits behind it, in order, until it is inflated and handled. The queue is bounded: a
|
|
134
|
+
provider has at most two `bound`/`state` messages in flight per origin (2W + 2 for a tab behind a relay with W
|
|
135
|
+
workers), at most N = 256 call results per origin, and the `ack` goes out only after the message was applied, so a
|
|
136
|
+
slow inflate is backpressure like a slow consumer (its commits fold at the provider). Control messages (`ping`,
|
|
137
|
+
`pong`) are answered when they are reached in order; the 30 s heartbeat leaves ample room.
|
|
138
|
+
- Threshold (16 KiB) and level (1) are protocol constants, not per link.
|
|
139
|
+
- `PROTOCOL_VERSION` stays 1 (nothing deployed).
|
|
140
|
+
|
|
141
|
+
## Messages
|
|
142
|
+
|
|
143
|
+
- `hold` gains `chain?: string[]` (trusted links only) and `limit?: number` (parent link only).
|
|
144
|
+
- `revoke { revocation }` (parent to child; honoured on the parent link only; no origin).
|
|
145
|
+
- A part's codec flag: in the binary codec a flag in the part's length prefix (builder's choice, documented); in the
|
|
146
|
+
text codec, which is for debugging but may sit on a relayed link, a compressed part travels as a tagged element
|
|
147
|
+
holding its base64 (**proposal**; the text codec itself never compresses).
|
|
148
|
+
|
|
149
|
+
## Races
|
|
150
|
+
|
|
151
|
+
1. `revoke` while an object of the principal activates: the attempt is abandoned, holders get `gone`.
|
|
152
|
+
2. `revoke` while a call of the principal runs: its context is aborted; the caller is rejected (`gone` reaches it).
|
|
153
|
+
3. A hold stamped with a revoked principal is already on its way to a worker: it binds, then the worker's `revoke`
|
|
154
|
+
(sent right after on the same link, per-direction order) ends it: R10's window, accepted.
|
|
155
|
+
4. Two tabs of one grant, one revoked: both principals have the key, so the shared objects end for both and both links
|
|
156
|
+
close.
|
|
157
|
+
5. `revoke` crossing a `resolve`: the new worker link gets no past `revoke`.
|
|
158
|
+
6. A `revoke` from a child link: ignored.
|
|
159
|
+
7. A cycle through a relay: the chain is copied upstream; detection at the provider.
|
|
160
|
+
8. A cycle through a restart: new instance ids, no false cycle.
|
|
161
|
+
9. `host.references` and a link drop in one batch with a commit: the derive sees the departure in that batch.
|
|
162
|
+
10. An oversized part inside a `state` message with other holds' entries: only its hold fails.
|
|
163
|
+
11. A compressed part whose inflated size exceeds the limit: its hold or call fails `too_large/part`; the link stays.
|
|
164
|
+
12. A stamped `limit` or `chain` from a child or untrusted link: ignored.
|
|
165
|
+
13. An asynchronous inflate in flight when the link closes: its message and everything queued behind it are dropped.
|
|
166
|
+
14. A slow asynchronous inflate at a tab: the worker's window for the tab's origin fills; its commits fold.
|
|
167
|
+
|
|
168
|
+
## Cost per hop
|
|
169
|
+
|
|
170
|
+
| Hop | Work |
|
|
171
|
+
| --- | --- |
|
|
172
|
+
| revoke | keys cached per principal; one lookup per object and link; O(objects + links) once |
|
|
173
|
+
| hold during activation | one chain array (at most 32) |
|
|
174
|
+
| presence | one entry added or removed per reference, in the batch |
|
|
175
|
+
| activity | counters; at most one publication per microtask turn with changes |
|
|
176
|
+
| size limits | one comparison per part before parsing |
|
|
177
|
+
| compression | one deflate per part above 16 KiB at its origin, one inflate at its owner; relays nothing |
|
|
178
|
+
|
|
179
|
+
## Carry-over taken (from `slices.md`, section "Slice 4b")
|
|
180
|
+
|
|
181
|
+
All of it: revocation, cross-host cycles with instance ids, `host.references` and `host.activity`, size limits and
|
|
182
|
+
compression, the Durable conversation view's size on re-hold (known cost until pi #11327; nothing to build), route
|
|
183
|
+
links' context (give `route` a `context` option, defaulting to the host's background context, used for the link's
|
|
184
|
+
work and telemetry), one N on every host (unchanged; note stays), `gone` becomes reachable (test it through
|
|
185
|
+
revocation; drop the hand-ended test only if the new one covers the same paths).
|
|
186
|
+
|
|
187
|
+
## Tests
|
|
188
|
+
|
|
189
|
+
Every race; revocation on one host, across a relay to a worker, two tabs of one grant; a child's `revoke` ignored;
|
|
190
|
+
cycles server → worker → server and through a relay, no false cycle after a restart, the broken dependent (proposal);
|
|
191
|
+
presence per origin with derives and link drops; activity counts per kind and one publication per turn; limits per
|
|
192
|
+
part in every message kind, the stamped decoded limit, a compressed bomb (both inflate paths); compression round
|
|
193
|
+
trips in both codecs, relays not inflating (a counter), the asynchronous inflate's ordering and its close race; cost
|
|
194
|
+
guards; GC (revoked objects, presence entries, revocation key cache, chains, the inflate queue). Examples:
|
|
195
|
+
`15-revocation.ts`, `16-presence-and-activity.ts`, `17-limits-and-compression.ts`. Benchmarks in `benchmarks.md`: a
|
|
196
|
+
500 KB snapshot and a 1 MiB result compressed and not (bytes, encode and inflate time, synchronous and asynchronous).
|
|
197
|
+
|
|
198
|
+
## Size
|
|
199
|
+
|
|
200
|
+
About 800-1,000 source lines.
|
|
201
|
+
|
|
202
|
+
## Decisions for the owner after the build
|
|
203
|
+
|
|
204
|
+
Collected here by the builder and reviewers; known now:
|
|
205
|
+
|
|
206
|
+
1. A cycle error makes the dependent broken (section 2), an exception to R18.
|
|
207
|
+
2. Compression (b) as built: adapter shape, the asynchronous fallback, the text codec's form of a compressed part.
|
|
208
|
+
3. `host.references` built lazily per type, or always.
|
package/docs/slice-5.md
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# Slice 5: routines and jobs (spec)
|
|
2
|
+
|
|
3
|
+
Status: **reviewed, ready to build** (2026-10-24; reviews by Astra, Fable, Opus, Sol folded in). Guiding rule (owner): simple, fast, correct. The single source for building
|
|
4
|
+
slice 5, together with `design.md` §14 (routines) and §15 (jobs), read in full with the rest of `design.md`, the
|
|
5
|
+
feature map in `slices.md` (entries assigned to slice 5) and its "Carry-over" for slice 5, the decision log entries
|
|
6
|
+
"Routines for slice 5", "Routines and jobs open points" (with "Jobs keep accepts" and "Job crash handling"), D4, R11,
|
|
7
|
+
Q9, S8, W2b, P2, and the root `AGENTS.md` section "Chord v2 Code Style". Builds on slice 4b (`1c88b45d7`).
|
|
8
|
+
|
|
9
|
+
Slice 5 builds routines completely and jobs **in memory**. Persistence of jobs is slice 6 (it needs the store); the
|
|
10
|
+
reload rules of both (handover, `accepts` in use, `blocked { version }`, native restarts) are slice 7 (they need
|
|
11
|
+
reloads). Their APIs are declared here so that later slices add behaviour, not shape.
|
|
12
|
+
|
|
13
|
+
## What an app can do after this slice
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
// routines
|
|
17
|
+
host.serve(ForwardStore, (_, self) => {
|
|
18
|
+
const forwards = self.state(Forwards);
|
|
19
|
+
const catalog = self.get(Catalog, {});
|
|
20
|
+
self.on(catalog.sessions, async (sessions, ops, ctx) => {
|
|
21
|
+
for (const f of forwards.value.list) if (sessions[f.session]?.archived) await closeForward(f.id, ctx);
|
|
22
|
+
});
|
|
23
|
+
self.onLive(async (ctx) => {
|
|
24
|
+
for (;;) { await sleep(HOUR, ctx); await dropExpired(ctx); }
|
|
25
|
+
});
|
|
26
|
+
return { … };
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
// jobs
|
|
30
|
+
const ShellJob = defineJob("chat.shell", {
|
|
31
|
+
version: 1,
|
|
32
|
+
args: obj({ command: str(), author: Author }),
|
|
33
|
+
result: obj({ exit: int(), output: str() }),
|
|
34
|
+
state: ShellState,
|
|
35
|
+
concurrency: 1,
|
|
36
|
+
});
|
|
37
|
+
const shell = self.job(ShellJob, { run, finish });
|
|
38
|
+
await shell.start({ command: "npm test", author }, ctx, { key: requestId });
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 1. Routines (§14)
|
|
42
|
+
|
|
43
|
+
- `self.on(source, fn)` and `self.onLive(fn)`, declared only while the factory runs (as `state`, `derive`, `get`,
|
|
44
|
+
`open`), in objects of both kinds and in facets (design §16: a facet holds documents, references, routines and
|
|
45
|
+
contributions).
|
|
46
|
+
- `on` over a JSON `Watchable` calls `fn(value, ops, ctx)`; over a `NativeWatchable` (a registry value, `ref.state`)
|
|
47
|
+
`fn(value, ctx)`. Overloads by the source's type. At runtime the source is resolved at declaration with
|
|
48
|
+
`resolveWatchable` (Chord's own sources, constants, reference members); anything else that is a `NativeWatchable`
|
|
49
|
+
(its `watch` yields a `NativeWatch`) is followed as native. There is no separate kind tag.
|
|
50
|
+
- Start: right after the object went live, in the same turn (owner); a method call admitted in that turn may run
|
|
51
|
+
before the first `on` call. Stop: when the object ends, their `ctx` is aborted with the object's end error; the
|
|
52
|
+
drain (§6) waits for routine calls like for method calls, bounded by `closeTimeout`.
|
|
53
|
+
- `on` is implemented over the shared `Watch` with a listener that **never throws** (a throwing listener would end the
|
|
54
|
+
watch): it runs the handler, catches its error, reports it (`routine_failed`) and schedules its own retry. Calls
|
|
55
|
+
never overlap; changes during a call fold into the next (the watch's pending queue: newest value, folded ops); a
|
|
56
|
+
running call is never aborted by a change.
|
|
57
|
+
- The first call gets the current value with `[["r", value]]` (W2b).
|
|
58
|
+
- After a call that threw, the next call (the retry after the backoff, 1 s doubling to 60 s, or a change during the
|
|
59
|
+
backoff, which calls at once) again gets `[["r", value]]`, never only the changes since: a handler that applies
|
|
60
|
+
ops incrementally would otherwise drift. A call that succeeds resets the backoff.
|
|
61
|
+
- The source ending (`ended`, `retired`: a document retired, a reference released) ends the routine without a
|
|
62
|
+
report; the source failing (`failed`: a derive's compute threw, a provider member failed) ends it with one
|
|
63
|
+
`routine_failed` report. (A failed provider member that recovers after a provider reload: slice 7 carry-over.)
|
|
64
|
+
- `onLive`: called once when the object is live. Returning ends it (until the next reload or activation, slice 7);
|
|
65
|
+
throwing is reported and restarts it after the same backoff (reset when a run lasted at least a minute); an abort
|
|
66
|
+
(the object ends) is no error and not reported.
|
|
67
|
+
- Each call's `ctx`: the object's principal (remote) or the host's (local), the host's incarnation, telemetry, and
|
|
68
|
+
`ctx.get` references released when the call settles (`CallContext`).
|
|
69
|
+
- Not counted in `host.activity`.
|
|
70
|
+
- Helpers, exported for apps: `sleep(ms, ctx)` (rejects with the abort reason when `ctx` is aborted; clears its timer
|
|
71
|
+
and listener; delays above the timer limit of 2^31-1 ms are chained) and `untilAborted(ctx)` (resolves when `ctx`
|
|
72
|
+
is aborted). Portable (timers and `AbortSignal` only).
|
|
73
|
+
- `HostError` gains `routine_failed { object, routine, error }`, `routine` being the kind and declaration position
|
|
74
|
+
(`"on #2"`, `"onLive #1"`).
|
|
75
|
+
- The reload handover per object is slice 7 (carry-over); in this slice a routine only starts with the object and
|
|
76
|
+
stops with its end.
|
|
77
|
+
|
|
78
|
+
## 2. Jobs (§15), in memory
|
|
79
|
+
|
|
80
|
+
### Declaration
|
|
81
|
+
|
|
82
|
+
- `defineJob(name, { version, args, result, state?, concurrency?, accepts?, persist? })`: `args` closed (like method
|
|
83
|
+
arguments: checked at `start` with a compiled validator, `invalid/args`); `result` not validated (the provider's);
|
|
84
|
+
`state` a singleton document definition; `concurrency` a positive integer; `accepts` checked at declaration (shape,
|
|
85
|
+
older versions only) and used in slice 7. `persist` has its final shape now, `persist: { resume: "rerun" |
|
|
86
|
+
"abandon" }` (resume required, Durable's wording), and is refused in this slice (`not supported before slice 6`)
|
|
87
|
+
rather than silently kept in memory.
|
|
88
|
+
- `self.job(Job, { run, finish? })` in an object's factory: once per job name per object; returns `JobHandle`.
|
|
89
|
+
- The per-run state documents are Chord's: an internal keyed handle per job (named after the job, keyed by run id),
|
|
90
|
+
separate from the author's own `self.state` handles, so an author may also use the same definition for a document
|
|
91
|
+
of their own without "declared twice".
|
|
92
|
+
|
|
93
|
+
### Run records and `running`
|
|
94
|
+
|
|
95
|
+
- The job keeps its records on the owner (a map by run id, with the key index); records and state documents change
|
|
96
|
+
only inside transactions on the owner's line. Two hooks on `Transaction`: staged record changes (create, outcome,
|
|
97
|
+
delete, block, drop) adopted inside the commit step with the documents, and actions after the commit (start a
|
|
98
|
+
`run`, settle waiters).
|
|
99
|
+
- `running` is a `Source` of its own (not a `Derive`: keyed documents publish nothing), marked changed in the commit
|
|
100
|
+
step whenever a record or a run's state document changed, delivering the new list in that batch. Entries:
|
|
101
|
+
`{ id, version, key?, args, state, phase: "running" | "finishing" } | { id, version, phase: "blocked", reason }`.
|
|
102
|
+
An entry is a new object exactly when its record or its state document's value changed (cached per run by record
|
|
103
|
+
and state value identity, never by record alone); the list is copied on change (O(unsettled runs)).
|
|
104
|
+
|
|
105
|
+
### Start
|
|
106
|
+
|
|
107
|
+
- `start(args, ctx, { key? })`: one transaction on the owner's line; resolves with a `Run` after the commit.
|
|
108
|
+
`tx.start(job, args, { key? })` inside `self.tx` joins the transaction's other writes and returns a `Run` handle at
|
|
109
|
+
once (a handle, not data from a draft); its `outcome(ctx)` waits for the run and rejects `released` if the
|
|
110
|
+
transaction is discarded. So a caller can never miss a short run: the handle exists before the run can settle.
|
|
111
|
+
`job.outcome(id, ctx)` waits by id for an unsettled run only (an id of a settled or unknown run rejects `gone`;
|
|
112
|
+
documented).
|
|
113
|
+
- Order inside a transaction: check args; dedupe by key (an unsettled run with the key, including one started earlier
|
|
114
|
+
in the same transaction, returns its `Run`; the args are not compared: a key names one run); concurrency: running
|
|
115
|
+
plus finishing runs plus runs started earlier in the same transaction, **excluding the run whose `finish` this
|
|
116
|
+
transaction is** (so `finish` can chain the same job at `concurrency: 1`); at the limit `unavailable/busy`; then the
|
|
117
|
+
record and the state document (`initial()`, checked once per definition, R8/D3).
|
|
118
|
+
- `run` starts after the commit, outside the batch, after `self.tx` settled (an action after the commit). An `abort`
|
|
119
|
+
between the commit and the start pre-marks the run's signal, so `run` starts aborted.
|
|
120
|
+
- A `start` reaches only a live object (methods and routines run only then). New error reason `unavailable/busy` (the
|
|
121
|
+
error table; `PROTOCOL_VERSION` stays 1). Run ids: uuidv7.
|
|
122
|
+
|
|
123
|
+
### Run
|
|
124
|
+
|
|
125
|
+
- `run(args, ctx)` runs outside transactions. `JobCtx` = `Ctx` plus `jobId` and `state: { value; change(fn) }` (only
|
|
126
|
+
when the job has a `state`; typed so).
|
|
127
|
+
- `ctx.state.change(fn)` takes **no context**: it is a transaction on the owner's line drafting only the run's
|
|
128
|
+
document, under the owner's context without the run's abort signal, so changes made while `run` stops after an
|
|
129
|
+
abort still commit. It is accepted while the run's invocation is live (until `run` settles) and refused afterwards
|
|
130
|
+
with `released` (an invocation fence: it checks the run's invocation, not only the owner's liveness); it never
|
|
131
|
+
recreates a retired document. Changes admitted before `run` settled commit before the outcome is recorded (line
|
|
132
|
+
order), so `outcome.state` includes them.
|
|
133
|
+
- `run`'s abort signal fires on `abort(id)`, on the object's end and on `host.close`. A run that throws after its
|
|
134
|
+
signal fired ends `failed { aborted, reason: "abort" }` (not `threw`); a run that returns after an abort keeps its
|
|
135
|
+
result.
|
|
136
|
+
- `run` throwing (not aborted): `failed { threw, error }` and a `HostError` `job_failed { object, job, id, error }`.
|
|
137
|
+
|
|
138
|
+
### Finish
|
|
139
|
+
|
|
140
|
+
- When `run` settles: the outcome is recorded on the run (`phase: "finishing"`), and `finish(outcome, tx)` runs in
|
|
141
|
+
one transaction; the same commit deletes the record and the key and retires the state document. Without `finish`,
|
|
142
|
+
the commit only cleans up.
|
|
143
|
+
- `finish` throwing: nothing changes; retried with backoff (1 s doubling to 60 s), each failure reported
|
|
144
|
+
(`job_finish_failed { object, job, id, error }`); after five consecutive failures the run becomes
|
|
145
|
+
`blocked { reason: "finish_failed" }`: outcome, state and key kept, not counted for concurrency, retried on the
|
|
146
|
+
next reload (slice 7); a later `start` with its key returns the blocked run (dedupe).
|
|
147
|
+
- `Run.outcome(ctx)` resolves with the outcome when `finish` committed (also without `finish`); a blocked run's
|
|
148
|
+
waiters keep waiting (their own `ctx` ends the wait); a dropped run's waiters reject `aborted`; the object's end
|
|
149
|
+
rejects them with its error.
|
|
150
|
+
|
|
151
|
+
### Abort, keep-alive, object end
|
|
152
|
+
|
|
153
|
+
- `abort(id)`: fires the signal of a running run; drops a blocked run (owner: no `finish`; record, key and state
|
|
154
|
+
document go in one transaction; reported `job_dropped { object, job, id }`; waiters reject `aborted`); ignored for
|
|
155
|
+
finishing runs and unknown ids.
|
|
156
|
+
- Keep-alive: running and finishing runs are a **count** on the object, not `Holder`s (they are not references, so
|
|
157
|
+
they never appear in `host.references`). An object whose last reference goes while the count is above zero stays;
|
|
158
|
+
when the count reaches zero with no holders, it ends as on its last release (after its type's `linger`). Blocked runs
|
|
159
|
+
do not count: at that end they are dropped with a `job_dropped` report each. `host.activity.jobs` counts running
|
|
160
|
+
plus finishing runs.
|
|
161
|
+
- Object end (revocation R11, `host.close`, the last release): runs' signals fire; the drain waits for `run`
|
|
162
|
+
invocations like for calls (bounded by `closeTimeout`); no `finish`; outcomes, states and waiters end with the
|
|
163
|
+
object (waiters reject with the object's end error).
|
|
164
|
+
|
|
165
|
+
## Messages
|
|
166
|
+
|
|
167
|
+
None: jobs and routines are host-local; `running` is ordinary state.
|
|
168
|
+
|
|
169
|
+
## Races
|
|
170
|
+
|
|
171
|
+
1. Two `start`s with the same key in one turn: the line serializes them; the second sees the first's record and
|
|
172
|
+
returns its run.
|
|
173
|
+
2. A `start` at the concurrency limit while a run is finishing: finishing counts; `busy`.
|
|
174
|
+
3. `tx.start` in a transaction that is then discarded: no record, no run; the `Run` handle it returned rejects
|
|
175
|
+
`released` from `outcome(ctx)`.
|
|
176
|
+
4. `ctx.state.change` after `run` returned but before `finish` committed: refused (`released`); the outcome's state is
|
|
177
|
+
the state at `run`'s settle. A change made after `abort` while `run` is still stopping: commits (no run abort
|
|
178
|
+
signal on it).
|
|
179
|
+
5. `ctx.state.change` in flight (waiting for the line) when `run` settles: it was admitted while live, so it commits
|
|
180
|
+
before the finish transaction (line order); the outcome's state includes it.
|
|
181
|
+
6. `abort` while `finish` runs: ignored.
|
|
182
|
+
7. The object ends while `finish` waits for the line: the finish transaction is refused (`released`); nothing is
|
|
183
|
+
reported as a finish failure (it is the object's end).
|
|
184
|
+
8. `finish` throws five times: blocked; a new `start` with the same key returns the blocked run; a different key
|
|
185
|
+
starts a new run (blocked runs do not count for concurrency).
|
|
186
|
+
9. `on`'s source changes during the backoff after a throw: the call happens at once with the newest value.
|
|
187
|
+
10. A routine call throws while the object ends: the end wins; no restart, no report of the abort.
|
|
188
|
+
11. `sleep` with a huge delay and an abort: the chained timers are cleared.
|
|
189
|
+
12. A job's `run` calls `start` on the same job (recursion): allowed; a new run (it is a different key or none).
|
|
190
|
+
13. `finish` chains the same job at `concurrency: 1`: the finishing run is excluded from its own transaction's check.
|
|
191
|
+
14. Two `tx.start`s with the same key in one transaction: the second returns the first's `Run`.
|
|
192
|
+
15. A short run started with `tx.start` settles before the caller awaits `outcome`: the handle resolves anyway.
|
|
193
|
+
16. `abort` between the start's commit and `run`'s start: `run` starts with its signal aborted.
|
|
194
|
+
17. The last run settles on an object without holders: the object ends after its `linger`; a blocked run is dropped.
|
|
195
|
+
|
|
196
|
+
## Cost
|
|
197
|
+
|
|
198
|
+
| Work | Cost |
|
|
199
|
+
| --- | --- |
|
|
200
|
+
| `on` per change | the shared watch's frame; folded under a busy call |
|
|
201
|
+
| `start` | one transaction: an args check (compiled), a record and a document |
|
|
202
|
+
| `state.change` | one in-memory transaction on the owner's line (prepare, adopt, flush) |
|
|
203
|
+
| `running` per change | one entry replaced; the array copied (O(unsettled runs)) |
|
|
204
|
+
| `finish` | one transaction (finish's writes plus cleanup) |
|
|
205
|
+
|
|
206
|
+
## Carry-over taken
|
|
207
|
+
|
|
208
|
+
From `slices.md` "Slice 5": routine errors reported to `onError` with their own kind; W2b (`on` gets the acquisition
|
|
209
|
+
value first); C3 and C4 (decided); jobs and revocation (R11) and `host.activity.jobs`.
|
|
210
|
+
|
|
211
|
+
## Carry-over left (to `slices.md` in the same change)
|
|
212
|
+
|
|
213
|
+
- Slice 6: `persist: { resume }` built (record and state document in the owner's store; persisted only in `local`
|
|
214
|
+
objects with empty params, P3, enforced at declaration); outcomes and abort requests persisted (a recorded outcome
|
|
215
|
+
resumes only `finish`); the restart limit (five crash interruptions, persisted, clean closes not counted; whether a
|
|
216
|
+
state change resets the count; what a clean close records); deferred persistence for state documents (flushed before
|
|
217
|
+
the outcome is recorded); the `finish` failure count persisted; the job fingerprint stored with every record from
|
|
218
|
+
the start; the run's start trace carrier stored (§29).
|
|
219
|
+
- Slice 7: the routine handover per object on reload (bounded by `closeTimeout`, calls not waiting for it); job
|
|
220
|
+
`accepts` in use (args and result mapped forwards once per run; `blocked { version }` without an adapter or for a
|
|
221
|
+
newer version); when an older run's state document may migrate while its old code still writes it, and an older run
|
|
222
|
+
keeping its old handles valid until it settles; a native restart aborts running runs (`aborted`, reason `reload`)
|
|
223
|
+
and `finish` runs on the new code; a `finish` in flight across a reload; run records and state documents belong to
|
|
224
|
+
the object across attempts (documents belong to an attempt today); blocked runs retried on reload; a job declaration
|
|
225
|
+
removed while runs exist; a job fingerprint over args, result and state (a schema change without a version bump); an
|
|
226
|
+
`on` routine whose source failed and recovers after a provider reload.
|
|
227
|
+
- Slice 9: spans for routine calls and job runs.
|
|
228
|
+
|
|
229
|
+
## Tests
|
|
230
|
+
|
|
231
|
+
Every rule and race above, one `describe` per mechanism:
|
|
232
|
+
|
|
233
|
+
- `on`: first call with `[["r", value]]`; folding; no overlap; a throw reported, retried with `[["r", value]]` after
|
|
234
|
+
the backoff, a change during the backoff calling at once, success resetting it; the watch survives a throwing
|
|
235
|
+
handler; source `ended`/`retired` (no report) and `failed` (one report); native sources (`ref.state`); in a facet.
|
|
236
|
+
- `onLive`: return; throw and backoff, reset after a long run; abort without report.
|
|
237
|
+
- Helpers: `sleep` abort, chaining above 2^31-1 ms (fake timers), no timer left; `untilAborted`.
|
|
238
|
+
- Routines with the drain and `host.close`; a routine call admitted in the first turn next to a method call.
|
|
239
|
+
- Jobs, start: args check; dedupe (across transactions and twice in one transaction; different args, same key);
|
|
240
|
+
concurrency and `busy` (running plus finishing; earlier starts in the same transaction; chaining the same job from
|
|
241
|
+
`finish` at `concurrency: 1`); `tx.start` atomic with other writes; a discarded `tx.start`'s handle rejecting; the
|
|
242
|
+
handle of a short run resolving; `outcome(id)` for unsettled, settled and unknown ids; `run` starting after the
|
|
243
|
+
commit outside the batch; an abort before `run` starts.
|
|
244
|
+
- Jobs, run: with and without state; `state.change` fence (after settle refused; in flight at settle committed before
|
|
245
|
+
the outcome; after abort while stopping committed; never recreating the retired document); throw after abort is
|
|
246
|
+
`aborted`; throw is `threw` with `job_failed`; result after abort kept.
|
|
247
|
+
- Jobs, finish: outcome kinds; record, key and state document gone in the finish commit; retries with backoff,
|
|
248
|
+
`job_finish_failed`, `blocked` after five; dedupe returns the blocked run; abort drops it (`job_dropped`, waiters
|
|
249
|
+
`aborted`).
|
|
250
|
+
- `running`: entries per phase; blocked entries without args or state; an entry replaced on a state-only change; no
|
|
251
|
+
walk of other runs; per-principal views (example 19).
|
|
252
|
+
- Keep-alive: an object without holders stays while runs run, ends after the last one (with `linger`), dropping
|
|
253
|
+
blocked runs; `host.activity.jobs`; runs not in `host.references`.
|
|
254
|
+
- Object end: revocation and `host.close` mid-run (signals, drain, no `finish`, waiters rejected).
|
|
255
|
+
- Cost guards: args compiled once per definition; `running` touches only changed runs.
|
|
256
|
+
- GC: an ended object releases runs, documents and waiters; routines release their watches; `sleep` leaves no timer;
|
|
257
|
+
dropped and finished runs leave nothing.
|
|
258
|
+
|
|
259
|
+
Examples: `18-routines.ts` (`on` with a retry, `onLive` with `sleep`), `19-jobs.ts` (the shell job with a throttled
|
|
260
|
+
state document, flushed in a `finally`, changes awaited or caught, `OutputBuffer` with its required bounds,
|
|
261
|
+
per-principal views, abort and a chained job).
|
|
262
|
+
|
|
263
|
+
## Size
|
|
264
|
+
|
|
265
|
+
About 900-1,200 source lines.
|
|
266
|
+
|
|
267
|
+
## Decided on the draft (owner, 2026-10-24)
|
|
268
|
+
|
|
269
|
+
1. Routines start right after the object went live, in the same turn; a method call admitted in that turn may run
|
|
270
|
+
before the first `on` call.
|
|
271
|
+
2. `abort(id)` on a blocked run drops it: no `finish`, its record, key and state document go, reported
|
|
272
|
+
(`job_dropped { object, job, id }`), waiters reject with `aborted`.
|
|
273
|
+
3. `running` carries every run's `args`; views filter (no opt-in).
|
|
274
|
+
|
|
275
|
+
Folded in from the spec reviews (`/tmp/s5-review-{astra,fable,opus,sol}.md`): routines in facets (design §16); `on`
|
|
276
|
+
over a never-throwing watch listener with its own backoff and a full value after a failure; no kind tag (resolution
|
|
277
|
+
at declaration); internal per-job state handles; records with transaction hooks and `running` as its own source;
|
|
278
|
+
`tx.start` returning a `Run` handle; dedupe and concurrency within one transaction and excluding the finishing run;
|
|
279
|
+
`run` started after the commit outside the batch, an early abort pre-marking it; `state.change` without a context;
|
|
280
|
+
throw after abort is `aborted`; `job_failed`; runs counted, not held, and the object ending when the last one settles;
|
|
281
|
+
`persist`'s final shape.
|