@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-11.md
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Slice 11: web and TUI surfaces (spec)
|
|
2
|
+
|
|
3
|
+
Status: **approved** (owner, 2026-10-30/11-01: P1-P9 in the decisions "Slice 11's points" and "Slice 11, P3" to "P9",
|
|
4
|
+
then "go ahead, just do all the things"). Built after slices 12 and 13: the surfaces are generic plumbing that the app
|
|
5
|
+
kit wires in (`startApp` serves the web surface; a TUI client entry). The app keeps everything visible: HTML shell,
|
|
6
|
+
CSS, components, themes, navigation, layout, keys.
|
|
7
|
+
|
|
8
|
+
Read in full before writing code: this spec; `decisions.md` (slice 11's entries, the plugin model, the app kit);
|
|
9
|
+
`design.md` §3 (clients), §21, §23 (all, "Web and TUI" included); `slice-10.md`, `slice-12.md`, `slice-13.md`; p2's
|
|
10
|
+
`src/hosts/web.ts`, `src/hosts/web/main.tsx`, `src/web/reconnect.ts`, `src/runtime/web.tsx`, `src/hosts/bundles.ts`,
|
|
11
|
+
`src/hosts/tui.ts`, `src/hosts/tui-client.ts`, `src/hosts/tui-sandbox.ts`, `src/hosts/tui-bootstrap.mjs`,
|
|
12
|
+
`src/hosts/tui-worker-runtime.ts`, `src/runtime/tui.ts` (`TuiScope`).
|
|
13
|
+
|
|
14
|
+
## 1. `chord/surfaces` (the web surface's server side)
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
// inside startApp (slice 13), or by hand:
|
|
18
|
+
const web = webSurface(server, {
|
|
19
|
+
kind: "web", plugins,
|
|
20
|
+
entry: "./src/web/main.tsx", // the app's web start code: the base bundle's entry
|
|
21
|
+
page: (request, assets) => shell(request.nonce, assets), // the app's HTML; assets: base script, plugins file, styles
|
|
22
|
+
}, ctx);
|
|
23
|
+
// its facet (routes to Http, the WebScripts object) goes into the server's core facets
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
- **Base bundle** per client kind: built on the server by esbuild from `entry`, with the kind's host packages inlined
|
|
27
|
+
once (the app's API modules for the kind, Chord, React), content-hashed (`/_chord/web/base.<hash>.js`), cached
|
|
28
|
+
forever (`Cache-Control: immutable`, overriding the baseline's `no-store` for these routes only); rebuilt when base
|
|
29
|
+
code changes (the server restarts anyway: built at start).
|
|
30
|
+
- **Plugin scripts:** each web facet served as a script that registers itself (`chordFacet("<plugin>", "<digest>",
|
|
31
|
+
function (require, module, exports) { … })`, P2), at `/_chord/web/plugin/<plugin>.<digest>.js`, immutable; the
|
|
32
|
+
current set as one combined file `/_chord/web/plugins.<set-hash>.js` (P3); stylesheets and assets of the build
|
|
33
|
+
likewise, under `publicPath`.
|
|
34
|
+
- **`WebScripts`** (a `remote` object the surface serves, params `{}`, any principal that may load the app): its state
|
|
35
|
+
is the current set `{ plugins: [{ name, digest, url, css? }], base }`; a rollout that ships the web kind updates it
|
|
36
|
+
(the plugins component's `scripts("web")` changes; the surface follows them) without waiting for pages (P5).
|
|
37
|
+
- Routes and the page are `Http` contributions of the surface's facet; the page route is `page: true` (navigation from
|
|
38
|
+
another site allowed) and public or not as the app says.
|
|
39
|
+
|
|
40
|
+
## 2. `chord/web` (browser side)
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
// src/web/main.tsx (the app's entry, in the base bundle)
|
|
44
|
+
startPage<P>({
|
|
45
|
+
connect: () => new WebSocket(`${location.origin.replace(/^http/, "ws")}/chord`),
|
|
46
|
+
modules: { "@acme/app/v3": api, "@acme/app/v3/web": apiWeb, react: React, "react/jsx-runtime": jsx },
|
|
47
|
+
core: [{ name: "@acme/web", facet: webCore }],
|
|
48
|
+
canRetry: async () => true,
|
|
49
|
+
onConnection: (state) => setBanner(state),
|
|
50
|
+
render: (host) => createRoot(document.getElementById("root")!).render(<HostProvider host={host}><App /></HostProvider>),
|
|
51
|
+
});
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
- A client host (no address); the connection loop (P6, p2's `keepConnected`: reconnect 250 ms to 5 s, wake on
|
|
55
|
+
visibility, `online` and network change, replace a silent socket, stop on an outdated protocol (reload the page) or
|
|
56
|
+
when `canRetry` says no); `onConnection` reports `connecting | connected | waiting`.
|
|
57
|
+
- Loads the combined plugins file, evaluates each registered facet with `modules` (the `require` they get answers only
|
|
58
|
+
host packages and `@earendil-works/chord/plugins`'s browser half if any), loads them with `core` in one
|
|
59
|
+
`host.load`, then holds `WebScripts`: on a new set it fetches the changed scripts (`<script src>`, one each), and
|
|
60
|
+
calls `host.reload` with the complete set (P4: in place; a failed plugin keeps its old facet, reported to the app);
|
|
61
|
+
a changed `base` hash reloads the page.
|
|
62
|
+
- CSP: scripts are `'self'` plus the nonce for the page's inline bootstrap; no `eval`.
|
|
63
|
+
|
|
64
|
+
## 3. `chord/react`
|
|
65
|
+
|
|
66
|
+
`HostProvider`, `useHost()`, `useHold(Type, params)` (a reference held for the component's life, released on unmount,
|
|
67
|
+
re-held when params change), `useWatch(watchable)` (the current value, re-rendering on change; `useSyncExternalStore`),
|
|
68
|
+
`useRegistry(R)`, `useRefState(ref)`. A component unmounted by a reload has not left (design §21): releases are plain
|
|
69
|
+
releases, presence is the app's. No components, no styling.
|
|
70
|
+
|
|
71
|
+
## 4. `chord/tui` and `chord/tui/launcher`
|
|
72
|
+
|
|
73
|
+
- **Launcher** (trusted, a Node process): `startTerminal({ url, token | tokenFile, pairing?, ... })` connects (a token
|
|
74
|
+
from the owner token file, slice 13, or device pairing), downloads the base bundle and the TUI kind's plugin scripts
|
|
75
|
+
over HTTP, and starts the **sandbox**: a child process on pipes (decision "The terminal's sandbox is a child
|
|
76
|
+
process", replacing p2's worker thread: empty environment, Node's permission model granting nothing, no SQLite; no
|
|
77
|
+
terminal, file system, child processes or network except the bridge), always (P8), whose runtime gets a
|
|
78
|
+
bridge terminal (input events in, frames out), the Chord link (messages relayed by the launcher) and the evaluated
|
|
79
|
+
scripts. The launcher keeps credentials, the real terminal and local preferences, and exposes a small set of actions
|
|
80
|
+
to the sandbox (clipboard, open URL), each confirmed by the launcher's own UI when it touches the machine.
|
|
81
|
+
- **Runtime** (inside the sandbox, in the base bundle): a client host like the page's, the same connection loop over
|
|
82
|
+
the bridged link, in-place reloads through a `TuiScripts` object as the web.
|
|
83
|
+
- **`TuiScope`** (P9): `new TuiScope(host, changed)` with `hold`, `watch`, `registry`, `dispose`; no pi-tui dependency.
|
|
84
|
+
|
|
85
|
+
## 4b. Looks and themes (decision "Looks and themes", `docs/theming/`)
|
|
86
|
+
|
|
87
|
+
- The kit ships `Themes` (`defineRegistry<Theme, readonly Theme[]>`, in the shared module the kit's apps re-export),
|
|
88
|
+
`Theme = { id, name, mode: "dark" | "light", colors: { accent, bg, fg, muted, error, warning, success, ...app roles },
|
|
89
|
+
web?, tui? }`, and a `themes` preference per user (`{ dark, light }` theme ids) stored by the kit's users plugin or a
|
|
90
|
+
local object for single-user apps.
|
|
91
|
+
- Web: `startPage` watches `Themes` and the preference with `prefers-color-scheme`, and writes the active theme as CSS
|
|
92
|
+
variables on `:root` (`--accent`, ..., plus `web` extras), with no reload; the base bundle's stylesheet is the app's.
|
|
93
|
+
- TUI: `TuiScope`'s host gets a `theme` lookup by role (true colour, else the nearest of 256 colours, `tui` overrides
|
|
94
|
+
first).
|
|
95
|
+
- CSS modules (`*.module.css`) work in plugin builds (esbuild's local-css loader); documented in `plugin-authoring.md`.
|
|
96
|
+
- Version 1 of `Themes`; a later role is added by a version bump mapping old entries (missing roles from the default
|
|
97
|
+
theme).
|
|
98
|
+
|
|
99
|
+
## 5. In the app kit
|
|
100
|
+
|
|
101
|
+
`startApp` gains `web: { entry, page }` and `tui: { entry }` (optional); with them it creates the surfaces and adds
|
|
102
|
+
their facets. Without, an app has no web or TUI surface (an API-only app).
|
|
103
|
+
|
|
104
|
+
## 6. Tests, examples
|
|
105
|
+
|
|
106
|
+
- One test file per source file. Web server side: the base bundle (hash, immutable, rebuilt per start), plugin
|
|
107
|
+
scripts and the combined file (registration wrapper, no eval, digests), `WebScripts` updated by a rollout, the page
|
|
108
|
+
route and CSP. Browser side under jsdom or a real browser (the repo's browser smoke setup, if it fits): the loop
|
|
109
|
+
(backoff, wake events, outdated protocol, `canRetry`), loading the combined file, an in-place reload keeping a
|
|
110
|
+
component's state, a base change reloading. React hooks (hold released on unmount, watch re-render, registry).
|
|
111
|
+
TUI: the sandbox cannot read a file or spawn a process (a test plugin that tries), the bridge, an in-place reload,
|
|
112
|
+
`TuiScope` disposal; pairing a TUI client against a kit app.
|
|
113
|
+
- Examples: `56-web` (a kit app with a page, two web plugins, an edit applied in place), `57-tui` (a kit app with a
|
|
114
|
+
TUI client, sandboxed), `58-themes` (a theme plugin restyling a page and a TUI live).
|
package/docs/slice-12.md
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Slice 12: the plugin model (spec)
|
|
2
|
+
|
|
3
|
+
Status: **approved** (owner, 2026-11-01: the plugin model's decisions, then "go ahead, just do all the things"; this
|
|
4
|
+
spec written by the redesign session from them, no separate spec review). Builds on 7c's plugins component
|
|
5
|
+
(`src/node/plugins/`) and slice 10's kinds and `createPluginRuntime`.
|
|
6
|
+
|
|
7
|
+
Read in full before writing code: this spec; `decisions.md` entries of 2026-11-01 "Contracts come from where the
|
|
8
|
+
plugin's code came from", "Plugins import only the app's versioned API", "The plugin model, points 3, 4, 5 and 8,
|
|
9
|
+
imports and builds", "Single-file plugins", "Testing a plugin alone"; `design.md` §21 (all of it, "The plugin model"
|
|
10
|
+
included) and §16-§17; `slices.md` (carry-over "Slice 12"); `slice-7c.md`, `slice-10.md` §3 "Plugins in workers";
|
|
11
|
+
`src/node/plugins/README.md` and its sources; the primer `docs/plugin-primer/book.md`.
|
|
12
|
+
|
|
13
|
+
## 1. The app's API (`createPlugins` option `api`)
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const plugins = createPlugins({
|
|
17
|
+
roots: [{ path: "./plugins", required: true }, { path: join(dataDir, "plugins") }],
|
|
18
|
+
api: { name: "@acme/app", versions: ["v3", "v2"] }, // newest first
|
|
19
|
+
kinds: {
|
|
20
|
+
server: { platform: "node", hostPackages: ["@acme/app/v3", "@acme/app/v3/server", "@acme/app/v2"] },
|
|
21
|
+
worker: { platform: "node", hostPackages: ["@acme/app/v3", "@acme/app/v3/worker", "@acme/app/v2"] },
|
|
22
|
+
web: { platform: "browser", hostPackages: ["@acme/app/v3", "@acme/app/v3/web", "@acme/app/v2", "react", "react/jsx-runtime"] },
|
|
23
|
+
},
|
|
24
|
+
onError,
|
|
25
|
+
}, ctx);
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
- `api` names the app's API package and the versions it provides. A plugin import of `<name>/<version>[/<kind>]`:
|
|
29
|
+
a version not listed is a build error naming the listed ones ("@acme/app/v1 is not available: this app provides v3,
|
|
30
|
+
v2"); a listed one that the kind's `hostPackages` lacks (`@acme/app/v3/web` from a worker facet) is a build error
|
|
31
|
+
naming the kind. One facet's imports of the API all use one version (a mix is a build error naming both).
|
|
32
|
+
- Chord itself (`@earendil-works/chord` and its subpaths other than `/plugins`, which stays as in 7c for
|
|
33
|
+
`pluginFile`) is not importable by plugins: a build error pointing to the app's API. Apps that do not set `api` keep
|
|
34
|
+
7c's behaviour (host packages as listed), so Chord's own tests and examples keep importing Chord directly where they
|
|
35
|
+
model base code.
|
|
36
|
+
- `roots` entries may be strings (as today) or `{ path, required? }`. A plugin of a required root whose build,
|
|
37
|
+
evaluation or setup fails at `plugins.load` makes `load` reject (`PluginError` naming it), after the host's own load
|
|
38
|
+
settled; failures in other roots are reported as today. At a reload, a required plugin failing keeps its old code as
|
|
39
|
+
any plugin (reported).
|
|
40
|
+
|
|
41
|
+
## 2. Imports between plugins (replaces slice 10's by-name lookup)
|
|
42
|
+
|
|
43
|
+
- **Relative paths within a root:** an import from one plugin into another plugin's directory under the same root
|
|
44
|
+
(`../notes/contract.ts`) is inlined (listed in `copied`), the copied file under 7c's rule (only host packages and
|
|
45
|
+
files of its own plugin). A relative path leaving the root (base code, another root) is a build error naming the file
|
|
46
|
+
and pointing to the API or a dependency. A git checkout of several plugins cloned into a root is "within a root".
|
|
47
|
+
- **Package names across repositories:** an import of a package in the plugin's `dependencies` resolves as npm does
|
|
48
|
+
through that package's `exports` (`@bob/notes` → its `contract.ts`, `@bob/notes/web` → `contract.web.tsx`), inlined
|
|
49
|
+
at the installed version. A dependency may be an npm version or a git URL with a ref (`github:bob/notes#<commit>`,
|
|
50
|
+
`git+https://...#<tag>`); `installDependencies` installs it with npm as today. A plugin inside a multi-plugin
|
|
51
|
+
repository is reached through a dependency on the whole repository, by path into it (`@bob/plugins/notes/contract.ts`)
|
|
52
|
+
or its `exports` (decision "`chord.plugins` is a package's manifest of plugins").
|
|
53
|
+
- **`chord.plugins`** in a package's `package.json` lists the plugin folders it provides (globs, exclusions); used by
|
|
54
|
+
discovery of a root's packages and by `installPlugin`; without it, conventional discovery.
|
|
55
|
+
- The by-name lookup (`build.ts` `#byName`), its error texts and the six `tsconfig.json` path aliases go; fixtures and
|
|
56
|
+
examples 35-38 import relatively again.
|
|
57
|
+
|
|
58
|
+
## 3. Per-kind files and the import check
|
|
59
|
+
|
|
60
|
+
- A file whose name has a kind segment before its extension (`contract.web.tsx`, `ui.tui.ts`, any `*.<kind>.<ext>` with
|
|
61
|
+
`<kind>` one of `kinds`) is a file of that kind: importing it (directly or through other files) from a facet of
|
|
62
|
+
another kind is a build error naming the chain. Facet files keep their names (`web.tsx`); contract files are
|
|
63
|
+
`contract.ts` (shared) and `contract.<kind>.ts(x)`.
|
|
64
|
+
- The check runs in the existing esbuild `onResolve` path, on the resolved file, for relative imports, dependencies and
|
|
65
|
+
copied files alike.
|
|
66
|
+
- Documented, not checked: a contract file mentions native things only through `import type` (TypeScript erases it;
|
|
67
|
+
a runtime import of a package the kind lacks already fails as above).
|
|
68
|
+
|
|
69
|
+
## 4. Single-file plugins
|
|
70
|
+
|
|
71
|
+
- Discovery also lists files at a root's top named `<name>.<kind>.(ts|tsx|js|mjs)`; files of one `<name>` form one
|
|
72
|
+
plugin named `<name>` (an unscoped valid npm name, else reported), one facet per file, `dir` the root, no
|
|
73
|
+
`package.json` (no dependencies, no `chord.external`). A directory plugin of the same name in the same root is a
|
|
74
|
+
reported duplicate (the directory wins).
|
|
75
|
+
- Its build allows imports of host packages only (the app's API); anything else is a build error saying to make it a
|
|
76
|
+
directory. `pluginFile` refuses (it has no directory of its own).
|
|
77
|
+
- The watcher: such a file appearing or disappearing at a root's top sets `set`; a change marks the plugin dirty.
|
|
78
|
+
|
|
79
|
+
## 5. Installing plugins
|
|
80
|
+
|
|
81
|
+
`installPlugin(source, root, ctx)`: `source` is `{ git: url, ref }` (a shallow clone of the ref into
|
|
82
|
+
`<root>/<repository name>`; a repository whose top has a `package.json` is one plugin, otherwise its subdirectories
|
|
83
|
+
are plugins) or `{ npm: name, version }` (`npm pack` and extract into `<root>/<name>`), then `installDependencies` for
|
|
84
|
+
each new plugin; marks `set`. Returns the installed plugin names. Removal is deleting the directory (`set`). No
|
|
85
|
+
updating in place: install another ref (a new directory) or delete and install.
|
|
86
|
+
|
|
87
|
+
## 6. `testPlugin`
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
const t = await testPlugin("./plugins/stats", {
|
|
91
|
+
kind: "worker",
|
|
92
|
+
api: { name: "@acme/app", versions: ["v3"] },
|
|
93
|
+
modules: { "@acme/app/v3": apiV3, "@acme/app/v3/worker": apiV3Worker }, // the real API modules
|
|
94
|
+
stubs: [{ name: "@acme/notes", facet: notesStub }], // facets serving what it uses
|
|
95
|
+
principal: { kind: "user", id: "u1" }, // the host's principal (optional)
|
|
96
|
+
}, ctx);
|
|
97
|
+
const stats = await t.host.get(Stats, { project: "p1" }, ctx);
|
|
98
|
+
t.contributions(Panels); // what the plugin contributed to a registry nobody serves (the helper serves it)
|
|
99
|
+
t.unserved(); // contract names requests wait for unbound `not_served`
|
|
100
|
+
await t.close(ctx);
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
- Built with the same build as production (`buildFacet` with the kind's options), evaluated with `modules`, loaded on a
|
|
104
|
+
host with `address`/`principal` as given, an in-memory store (`:memory:` SQLite); stubs loaded beside it.
|
|
105
|
+
- The helper serves, as a collecting registry, every registry the plugin contributes to that no stub or the plugin
|
|
106
|
+
itself serves (`t.contributions(R)`: the current entries).
|
|
107
|
+
- `t.unserved()` lists the names of contracts whose requests wait unbound `not_served` on the host (the unbound
|
|
108
|
+
index), so a test knows what to stub. `t.root(fn, ctx, { principal })` runs as another principal.
|
|
109
|
+
- Exported from `chord/plugins` (`testing.ts`); no test-only modes elsewhere.
|
|
110
|
+
|
|
111
|
+
## 7. Docs for authors and agents
|
|
112
|
+
|
|
113
|
+
- `docs/plugin-authoring.md`: a plugin's layout (directory and single-file), its facet and contract files per
|
|
114
|
+
kind, what it may import and how each import resolves, versions, how the server builds it (esbuild, what the build
|
|
115
|
+
handles, no build hooks), installing from git or npm, testing with `testPlugin`; written for agents (short, exact,
|
|
116
|
+
with one complete example plugin).
|
|
117
|
+
- Update `src/node/plugins/README.md`, the guide `docs/guide-plugins-hosts/book.md` (chapters "Plugins Using
|
|
118
|
+
Plugins" and "Base Code and Plugins"; rebuild `index.html`), design §21's slice-10 note.
|
|
119
|
+
|
|
120
|
+
## 8. Tests, examples
|
|
121
|
+
|
|
122
|
+
- One test file per source file; build tests for every refusal and allowance of §1-§4 (an unlisted version, a kind
|
|
123
|
+
module from another kind, mixed versions, a Chord import, a relative path leaving the root, a per-kind file through
|
|
124
|
+
a chain, a package from `dependencies` through `exports`, a git dependency with a ref (a local bare repository in a
|
|
125
|
+
temp directory, no network), a subfolder dependency); discovery of single-file plugins; required roots at load;
|
|
126
|
+
`installPlugin` from a local git repository and a local npm tarball; `testPlugin` (stubs, collected contributions,
|
|
127
|
+
`unserved`, a principal).
|
|
128
|
+
- Examples: `49-plugin-api` (an app API with two versions and per-kind modules, a plugin per version, the refusals),
|
|
129
|
+
`50-plugin-imports` (relative within a root, a git dependency pinned to a commit, per-kind contract files),
|
|
130
|
+
`51-single-file-plugin`, `52-test-plugin` (a plugin tested with a stub). Examples 35-38 updated.
|
|
131
|
+
- No hot path changes; no benchmark beyond a cold build of the 20-plugin set (as 7c's) to show the checks cost nothing
|
|
132
|
+
measurable.
|
package/docs/slice-13.md
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Slice 13: the app kit (spec)
|
|
2
|
+
|
|
3
|
+
Status: **approved** (owner, 2026-11-01: decisions "The app kit, point 1" to "point 5", then "go ahead, just do all
|
|
4
|
+
the things"). Builds on slices 10 (`http`, `workers`) and 12 (the plugin model). `chord/app` in
|
|
5
|
+
`src/node/app/`: an opinionated layer so an app is its API, its built-in plugins and a start script.
|
|
6
|
+
|
|
7
|
+
Read in full before writing code: this spec; `decisions.md` entries of 2026-10-31 and 2026-11-01 (the app kit, the
|
|
8
|
+
plugin model, "The app kit is opinionated", "Settings are arguments, extensions are registries", "The HTTP
|
|
9
|
+
component's security baseline"); `design.md` §3, §4, §10, §21, §23 (all of it, "The app kit" included); `slices.md`
|
|
10
|
+
(carry-over "Slice 13"); `slice-10.md`, `slice-12.md`; the READMEs of `node/http`, `workers`, `plugins`; p2's
|
|
11
|
+
`src/runtime/server.ts`, `src/hosts/server.ts`, `src/hosts/worker.ts`, `src/runtime/loopback-cookie.ts`,
|
|
12
|
+
`src/hosts/principals.ts`, `plugins/devices/`, `plugins/sharing/`, `plugins/files/` for what exists.
|
|
13
|
+
|
|
14
|
+
## 1. `startApp` and `startWorker`
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
// start.ts (the app's start script)
|
|
18
|
+
const app = await startApp<P>({
|
|
19
|
+
name: "acme", // the default data directory: ~/.acme
|
|
20
|
+
dataDir: process.argv[2], // optional; no environment variables
|
|
21
|
+
listen: { host: "127.0.0.1", port: 8788 },
|
|
22
|
+
api: { name: "@acme/app", versions: ["v3"], modules: { "@acme/app/v3": apiV3, "@acme/app/v3/server": apiV3Server } },
|
|
23
|
+
kinds: { server: { platform: "node" }, worker: { platform: "node" }, web: { platform: "browser", packages: { react, "react/jsx-runtime": jsx } } },
|
|
24
|
+
principal: { server: { kind: "server" }, worker: (address) => ({ kind: "worker", key: address.key }) },
|
|
25
|
+
workers: [{
|
|
26
|
+
kind: Project, // a host kind the app defines, any params
|
|
27
|
+
entry: "./worker.ts",
|
|
28
|
+
start: (address, ctx) => ({ id: address.params.id }),
|
|
29
|
+
authorize: (principal, address) => mayReach(principal, address),
|
|
30
|
+
idleMs: () => 5 * 60_000,
|
|
31
|
+
}],
|
|
32
|
+
onError: (error) => log(error),
|
|
33
|
+
}, ctx);
|
|
34
|
+
// app.host, app.http, app.workers, app.plugins, app.applyChanges(ctx), app.exportAddress(address, ctx),
|
|
35
|
+
// app.importAddress(archive, address, ctx), app.ownerLink(), app.close(ctx)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
// worker.ts
|
|
40
|
+
await startWorker<P>({ api, kinds, onError }); // reads the start message, opens the worker's store, loads plugins
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
- `startApp` creates the data directory layout (§4), opens the server store, creates the host (address `Server()`,
|
|
44
|
+
the server principal), `createHttp` (settings as arguments), `createWorkers` per worker kind (`kind` named after the
|
|
45
|
+
host kind; the worker's facet kind is `worker` unless the entry says otherwise), `createPlugins` with the roots of §5
|
|
46
|
+
and the app's API (slice 12), loads the server's plugins with the kit's own facets (§2, §3, §4) as core, and resolves
|
|
47
|
+
once loaded. `close` closes in the right order (http, workers, host, store).
|
|
48
|
+
- `startWorker` is `workerMain` plus: the worker's directory and store under its kind and address, the host with the
|
|
49
|
+
principal from the start message, `connect` first, plugins loaded with the kit's worker facets, `busy` from the app
|
|
50
|
+
if given.
|
|
51
|
+
- The start-data facet: the kit serves `AppInfo` (data directory, app name, version) on the server and `WorkerInfo`
|
|
52
|
+
(address, start data) on workers as core objects plugins `get`.
|
|
53
|
+
- Zero worker kinds: no workers component.
|
|
54
|
+
|
|
55
|
+
## 2. Principals and sessions
|
|
56
|
+
|
|
57
|
+
- The app's principal type `P`; the kit needs only `principal.server` and `principal.worker(address)`. The kit adds
|
|
58
|
+
one variant for its owner: `{ kind: "owner" }` must be assignable to `P` (a type check). (Superseded: decision "The
|
|
59
|
+
kit's owner is a principal the app chooses".)
|
|
60
|
+
- **Sessions** (`app/sessions.ts`, a kit object on the server, persisted in the server store): `issue(principal,
|
|
61
|
+
{ label, kind: "browser" | "device" }, ctx)` returns a token; tokens stored hashed; `revoke(id)`; `list` (watchable:
|
|
62
|
+
label, kind, created, last used). The kit's authenticator (contributed to `Authenticators`) reads the session cookie
|
|
63
|
+
(signed, `HttpOnly`, `SameSite=Strict`) or an `Authorization: Bearer` header, and gives its principal.
|
|
64
|
+
- **Owner link:** at start the kit issues a one-time token (random, single use, valid 10 minutes, replaced at each
|
|
65
|
+
start) and `app.ownerLink()` returns `http://127.0.0.1:8788/_chord/owner#<token>`; the start script prints it. The
|
|
66
|
+
route `GET /_chord/owner` serves a page that posts the token (from the fragment, never sent in a URL to logs) to
|
|
67
|
+
`POST /_chord/owner`, which consumes it and sets a browser session cookie for the owner. No owner by loopback alone.
|
|
68
|
+
- **Owner token file:** `<dataDir>/owner-token` (mode 0600, created at first start, a device session of the owner) for
|
|
69
|
+
command-line clients on the same machine.
|
|
70
|
+
- **Device pairing** (for remote command-line and TUI clients): `POST /_chord/pair` (public) returns `{ code, poll }`;
|
|
71
|
+
the owner approves the code in a browser (`GET /_chord/pair/<code>`, owner only, a confirm page); the client polls
|
|
72
|
+
and receives a device token. Codes expire after 10 minutes.
|
|
73
|
+
- **Deny by default** (an HTTP component change): a route or socket without a principal is refused (401) before plugin
|
|
74
|
+
code, unless its contribution marks it `public: true` (routes: `{ handler, public: true }`; sockets likewise). The
|
|
75
|
+
`/chord` links endpoint requires a principal. Foreign requests stay anonymous as before, so they reach only public
|
|
76
|
+
routes. Slice 10's examples and tests mark their anonymous routes public.
|
|
77
|
+
|
|
78
|
+
## 3. Optional kit plugins
|
|
79
|
+
|
|
80
|
+
Shipped as plugins (in `packages/chord/plugins/` or exported facets the app adds to its root; choose one and say
|
|
81
|
+
why): `users` (accounts keyed by id, a profile schema the app passes in, `self.get(Users, {})` with `get`, `update`,
|
|
82
|
+
`list`), `invite` (invite links issuing a session for a principal the owner chooses), `ephemeral-login` (a public
|
|
83
|
+
route taking a name, issuing a session for `{ kind: "user", id: <fresh>, name }` that ends with the connection; the
|
|
84
|
+
app's `P` must allow it). Each contributes to `Authenticators` or issues sessions through §2.
|
|
85
|
+
|
|
86
|
+
## 4. Storage, files, export
|
|
87
|
+
|
|
88
|
+
- Layout: `<dataDir>/server/store.sqlite`, `<dataDir>/workers/<kind>/<encoded address key>/store.sqlite` plus that
|
|
89
|
+
worker's files, `<dataDir>/plugins/` (the user's root), `<dataDir>/logs/`, `<dataDir>/owner-token`.
|
|
90
|
+
- **Files** (a kit facet on workers, and on the server for server-scoped files): `Files` (`local`, params `{}`, one per
|
|
91
|
+
host) with `put({ name, mime, bytes })` for small files, `begin`/`append`/`finish` for large ones (design §23 chunked
|
|
92
|
+
transfers), `read({ id, offset, length })`, `remove`, `list` (watchable index: id, name, mime, size, created), caps
|
|
93
|
+
per host (an option). Stored under the host's directory (`files/`), the index in the store.
|
|
94
|
+
- **Export / import per address:** `app.exportAddress(address, ctx)` stops the worker (as `workers.stop`), writes one
|
|
95
|
+
archive: the store's export archive (slice 6a) plus the worker's directory (files), and returns a readable stream or
|
|
96
|
+
writes to a path; `importAddress(archive, address, ctx)` refuses an existing address, unpacks, and the next hold
|
|
97
|
+
starts the worker. Format: a tar of `store.archive` and `files/`, with a small manifest (app name, API version,
|
|
98
|
+
kit format version).
|
|
99
|
+
|
|
100
|
+
## 5. Plugins
|
|
101
|
+
|
|
102
|
+
- Roots: the app's `plugins/` (required, slice 12) and `<dataDir>/plugins/`. Installs (`app.plugins.install(source,
|
|
103
|
+
ctx)`, slice 12's `installPlugin`) go to the user's root.
|
|
104
|
+
- `app.applyChanges(ctx)`: build the dirty plugins and roll out (server step, then the workers step); returns the
|
|
105
|
+
rollout result; `app.plugins.state` for the app's button. Never applied by itself.
|
|
106
|
+
|
|
107
|
+
## 6. Not in slice 13
|
|
108
|
+
|
|
109
|
+
Web and TUI clients (slice 11, which builds on this kit: `startApp` gains the web surface there); telemetry (9);
|
|
110
|
+
project plugins (§26 #14).
|
|
111
|
+
|
|
112
|
+
## 7. Tests, examples, docs
|
|
113
|
+
|
|
114
|
+
- One test file per source file: start and close order; a server without workers; two worker kinds; the owner link
|
|
115
|
+
(single use, expiry, the fragment), sessions (issue, revoke, list, hashed storage), the token file mode, device
|
|
116
|
+
pairing, deny by default (a route without principal 401, a public route served, `/chord` refused anonymous), Files
|
|
117
|
+
(small and chunked, caps, list, remove), export and import (a worker with documents, tables and files round-trips;
|
|
118
|
+
importing over an existing address refused), `applyChanges`, required root failure stopping `startApp`.
|
|
119
|
+
- Examples: `53-app` (a small app: start script, API, two plugins, a worker kind, the owner link), `54-app-sessions`
|
|
120
|
+
(pairing a command-line client), `55-app-export` (export and import a worker's address).
|
|
121
|
+
- `src/node/app/README.md`; the guide "Hosts and Plugins" gets a closing chapter on the app kit.
|
package/docs/slice-2.md
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# Slice 2: failures and natives (spec, for the owner's approval)
|
|
2
|
+
|
|
3
|
+
Status: **approved (owner, 2026-10-22)**, after Astra's and Fable's spec reviews. The single source for building slice 2, together with the feature map in `slices.md`
|
|
4
|
+
(entries assigned to slice 2), `design.md` read in full (most relevant: §3 timeouts, §6 lifecycle and failures, §7
|
|
5
|
+
references, §13 natives, §21 start barrier), the decision log, the carry-over (L4 section) and the root `AGENTS.md`
|
|
6
|
+
style section. Builds on slice 1 (`src/state`, `documents`, `host`, committed `d8f5e67e6`) and L1.
|
|
7
|
+
|
|
8
|
+
## What an app can do after this slice
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
host.serve(Inbox, (_, self) => {
|
|
12
|
+
const settings = self.get(Settings, {});
|
|
13
|
+
const watcher = self.open(
|
|
14
|
+
async (context) => watchDir(settings.dir.value.path, context.abortSignal), // opened during activation
|
|
15
|
+
async (w, reason) => w.close(), // closed in reverse when the object ends
|
|
16
|
+
);
|
|
17
|
+
return { count: …, rescan: async (ctx) => watcher.value.rescan(ctx) };
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
host.serve(Remote, (_, self) => {
|
|
21
|
+
self.open(async (context) => {
|
|
22
|
+
const config = readConfig();
|
|
23
|
+
if (!config) throw broken(new Error("no remote configured")); // retrying is pointless: broken
|
|
24
|
+
return connect(config, context.abortSignal); // a throw here is transient: retried with backoff
|
|
25
|
+
}, (c) => c.close());
|
|
26
|
+
return { … };
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const host = createHost({ onError, closeTimeout: 30_000, readyTimeout: 60_000 });
|
|
30
|
+
await host.load(facets, ctx); // resolves once every host-lifetime object is live or failed; failures reported
|
|
31
|
+
const inbox = await host.get(Inbox, {}, ctx); // waits through transient retries up to readyTimeout
|
|
32
|
+
await host.close(ctx); // closes natives (reason "stop"); rejects with every close error
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## 1. Natives (§13)
|
|
36
|
+
|
|
37
|
+
- `self.open(open, close, options?)` in a factory returns a handle (`Native<T>`). Its `value` is readable from the
|
|
38
|
+
moment its own `open` resolved until its `close` starts (so a later opener and handlers during the drain can use
|
|
39
|
+
it); before that it throws `not_ready`, after that `released`.
|
|
40
|
+
- `open(context)` receives a context whose abort signal fires when the attempt is abandoned (the object ends, the
|
|
41
|
+
attempt times out). `close(value, reason, context)` with `reason: { kind: "end" } | { kind: "stop" } | { kind:
|
|
42
|
+
"reload" }` (`end`: last reference gone or a failed attempt; `stop`: `host.close`; `reload` is used from slice 7);
|
|
43
|
+
the close context's signal fires at the native's `closeTimeout`, so a slow close can stop its own work. `options.closeTimeout`
|
|
44
|
+
overrides the host default for this native.
|
|
45
|
+
- **Activation order:** factory; singleton documents hydrated; references live; natives opened **one after another in
|
|
46
|
+
declaration order**; members checked; derives computed; live. An opener may read documents, references and earlier
|
|
47
|
+
natives, not derives (they are computed after the opens).
|
|
48
|
+
- **Closing:** in reverse order. Each close is awaited up to its `closeTimeout`; one that takes longer is reported to
|
|
49
|
+
`onError` as a possible leak and the others continue. A throwing close does not stop the others: `host.close` collects
|
|
50
|
+
every close error and rejects with them (`AggregateError`); an object ending in the background reports each to
|
|
51
|
+
`onError`.
|
|
52
|
+
- **Abandoned opens:** a failed or abandoned attempt closes the natives already open (reason `end`). An `open` that
|
|
53
|
+
resolves after its attempt was abandoned has its value closed at once, exactly once (reason `end`); an abandoned
|
|
54
|
+
attempt never comes back to life. A later attempt opens every native anew.
|
|
55
|
+
- Facets cannot open natives (`FacetSelf` has no `open`). The two restart patterns of R16 (drain in the background,
|
|
56
|
+
swap through a registry) are documentation in the host README; there is nothing to build.
|
|
57
|
+
|
|
58
|
+
## 2. Failures (§6)
|
|
59
|
+
|
|
60
|
+
- Every activation failure becomes a `FailureCause` (L1: `{ kind: "transient" | "broken"; error: ChordError }`,
|
|
61
|
+
foreign errors wrapped by `asChordError`). The kind comes from where it failed, never from the error:
|
|
62
|
+
|
|
63
|
+
| Where | Kind |
|
|
64
|
+
| --- | --- |
|
|
65
|
+
| factory throws; a singleton's `initial()` fails its schema; member check (incl. a native watchable as state, Q14); first derive compute; a dependency cycle (Q5) | broken |
|
|
66
|
+
| an `open` throws | transient, unless it threw `broken(error)` (L1) |
|
|
67
|
+
| the attempt did not become live within `readyTimeout` | transient: `unavailable` "did not become live within …" |
|
|
68
|
+
| a dependency failed (R18) | transient: `unavailable` "A: dependency B failed", with B's error as its `cause` |
|
|
69
|
+
|
|
70
|
+
A keyed document's first `initial()` runs inside a later transaction; a failure there fails that transaction, not the
|
|
71
|
+
object.
|
|
72
|
+
- **Every attempt is bounded** by the host's `readyTimeout`: when it passes, the attempt is abandoned (openers'
|
|
73
|
+
contexts aborted, open natives closed `end`, a late open closed at once) and fails transient. A hanging `open` can
|
|
74
|
+
therefore never block an object or the start barrier.
|
|
75
|
+
- **What a failed object keeps:** only an R18 failure keeps the object's references (so the dependency's recovery can
|
|
76
|
+
retry it); every other failure releases them at once (a cycle, a factory, an open, a derive). A failed object stays
|
|
77
|
+
while anything references it (host-lifetime objects always); it ends with its last reference.
|
|
78
|
+
- **Retries.** One attempt per object at a time; a trigger arriving during an attempt is ignored. Transient: retried
|
|
79
|
+
with a **backoff per identity**, 1 s doubling to 60 s. The backoff lives in a host map `identity → { delay, timer }`
|
|
80
|
+
holding no object (the window is its timer); it is deleted on success, on a broken failure, or when a window has
|
|
81
|
+
passed with no object left to retry, and cleared by `host.close`; while its object stays failed the entry keeps the
|
|
82
|
+
delay for the next doubling. A get inside the
|
|
83
|
+
window waits until `until` before the first attempt; a failed object without references is not retried
|
|
84
|
+
(host-lifetime objects always are). Broken: no automatic retry and no entry; a new object after its end tries at
|
|
85
|
+
once. In this slice a broken host-lifetime object stays failed until the host is recreated (reload, slice 7, and
|
|
86
|
+
`retryOn`, slice 8, add triggers).
|
|
87
|
+
- **Dependency recovery (R18):** when a failed dependency goes live, its R18 dependents are retried at once (their
|
|
88
|
+
backoff timers cancelled). On every retry the new attempt binds its `self.get` references **before** the previous
|
|
89
|
+
attempt's are released, so a dependency held only by this object never ends between attempts.
|
|
90
|
+
- **Reporting:** every failed attempt is reported to `onError` (with the object's name and cause); gets waiting for it
|
|
91
|
+
are rejected in addition (section 3).
|
|
92
|
+
- **The start barrier (§21):** `load` resolves when every host-lifetime object's **first** attempt has an outcome (live
|
|
93
|
+
or failed); later retries never hold `load`. A facet setup that throws or a facet document's `initial()` failing its
|
|
94
|
+
schema still rejects `load` (code errors).
|
|
95
|
+
|
|
96
|
+
## 3. Getting a failing object (§7)
|
|
97
|
+
|
|
98
|
+
- `host.get(Type, params, context, { readyTimeout? })` resolves with a live reference. Each getter has its own deadline
|
|
99
|
+
(`readyTimeout`, host default, overridable per get) for its whole wait, including a wait for `load`; it is separate
|
|
100
|
+
from the attempt's own bound. A broken cause rejects the getter at once with its error; a transient one keeps it
|
|
101
|
+
waiting through retries until the object is live or its deadline passes, then rejects with the last cause's error
|
|
102
|
+
(or `unavailable` if no attempt has failed yet). A getter whose deadline passes or whose context is cancelled
|
|
103
|
+
rejects and releases only its own reference; it never cancels the attempt for other getters.
|
|
104
|
+
|
|
105
|
+
## 4. Ending with natives (§3, §6)
|
|
106
|
+
|
|
107
|
+
- When an object ends: its transactions are sealed at once (`self.tx` throws `released`); callers of its running calls
|
|
108
|
+
are rejected `released` at once and the handlers' contexts aborted (slice 1); Chord keeps each running **handler's**
|
|
109
|
+
own promise and waits for those to settle (the drain), bounded by `closeTimeout`; then it closes its natives in
|
|
110
|
+
reverse order (a handler still running after `closeTimeout` sees its natives close; that is reported); its documents
|
|
111
|
+
stay readable until its closes are done, then are dropped; then the rest as in slice 1.
|
|
112
|
+
- A new attempt or a new object for the same identity starts only after the previous instance's ending has finished;
|
|
113
|
+
gets arriving meanwhile wait.
|
|
114
|
+
- `host.close(context)`: marks every object ended at once (every call on the host fails `released`, every `self.tx`
|
|
115
|
+
throws), aborts pending opens (their late values are closed), joins endings already running in the background, then
|
|
116
|
+
drains and closes object by object in reverse live order (a dependent before its dependencies), with reason `stop`;
|
|
117
|
+
resolves when all are done, or rejects with the collected close errors.
|
|
118
|
+
|
|
119
|
+
## 5. Timeouts (§3, cut C13)
|
|
120
|
+
|
|
121
|
+
Host options with per-thing overrides: `closeTimeout` (default 30 s; per native), `readyTimeout` (default 60 s; per
|
|
122
|
+
get; also bounds each attempt). The call drain uses `closeTimeout` (no separate setting; the design's per-type drain
|
|
123
|
+
override is not built). Park deadline (slice 3), routine handover and `finish` retry (slice 5) and rollout install
|
|
124
|
+
(slice 7) come with their slices.
|
|
125
|
+
|
|
126
|
+
## Cost per hop
|
|
127
|
+
|
|
128
|
+
Commits and derives are unchanged. A call adds one set entry for its handler's promise (the drain needs it).
|
|
129
|
+
Activation adds one awaited open per native and one attempt timer; a failure adds one backoff entry; ending adds the
|
|
130
|
+
drain and the closes.
|
|
131
|
+
|
|
132
|
+
## Carry-over taken by this slice
|
|
133
|
+
|
|
134
|
+
From `carry-over.md` (L4): `broken()`/`openFailure()` used for opens; a native watchable as state fails `broken`
|
|
135
|
+
naming the member; the drain on ending; cuts C5, C6, C7, C13 decided here.
|
|
136
|
+
|
|
137
|
+
## Tests
|
|
138
|
+
|
|
139
|
+
- Natives: open order and access to earlier handles; `not_ready` before live; close in reverse with reasons `end` and
|
|
140
|
+
`stop`; a slow close reported after `closeTimeout` and the others still closed; throwing closes collected by
|
|
141
|
+
`host.close` (AggregateError) and reported to `onError` for a background end; a partly failed attempt closes what it
|
|
142
|
+
opened; the opener's context aborted when the object ends while opening; facets have no `open`.
|
|
143
|
+
- Failures: each row of the table gives the right kind; the cause's error is a ChordError; transient retries follow
|
|
144
|
+
the backoff (fake timers) and reset on success; concurrent gets share one attempt; a broken failure is not retried;
|
|
145
|
+
a failed object ends with its last reference and its backoff entry expires; a get right after a failure waits for
|
|
146
|
+
the scheduled retry.
|
|
147
|
+
- R18: a dependent of a failing dependency fails transient with the dependency's cause, keeps the reference and is
|
|
148
|
+
retried at once when the dependency goes live; releasing the dependent releases the dependency.
|
|
149
|
+
- Start barrier: load resolves with a failed host-lifetime object, reports it to `onError`, and the object goes live
|
|
150
|
+
on a later retry; a throwing facet setup still rejects load.
|
|
151
|
+
- Gets: broken rejects at once; transient waits and succeeds on retry; transient past `readyTimeout` rejects with the
|
|
152
|
+
cause; per-get `readyTimeout`; a cancelled caller releases only its own reference.
|
|
153
|
+
- Ending: the drain waits for a running handler (its own promise, not the rejected caller's) before its native
|
|
154
|
+
closes, bounded by `closeTimeout`; documents readable during closes; transactions sealed at once.
|
|
155
|
+
- Races: an open resolving after its attempt was abandoned is closed once; a get arriving while the previous instance
|
|
156
|
+
closes waits and gets a fresh attempt; simultaneous retry triggers give one attempt; two getters with different
|
|
157
|
+
deadlines; a dependency held only by a retrying dependent is not ended between attempts; `host.close` during a
|
|
158
|
+
pending open, during a background ending, and with several objects in dependency order; a cycle releases its
|
|
159
|
+
references.
|
|
160
|
+
- GC: a failed object (documents, dependencies, natives, callbacks) is collected after its last reference while its
|
|
161
|
+
backoff entry still exists; the entry expires on its own.
|
|
162
|
+
- Examples: `06-natives.ts`, `07-failures.ts` (numbering continues from slice 1).
|
|
163
|
+
|
|
164
|
+
## Decided with the owner (2026-10-22)
|
|
165
|
+
|
|
166
|
+
- `ref.state`, `ref.retry()` and `host.hold` move to slice 3 (no app-held reference can be failed before then).
|
|
167
|
+
- `host.get` on a failing object and the start barrier as in sections 2 and 3; C13 as in section 5; C5: no natives in
|
|
168
|
+
facets; openers take a `Context`; `close` gets a context aborting at `closeTimeout`.
|
|
169
|
+
- C7: `linger` is built in slice 3, with links. The plugin error shape is decided in slice 3, where errors first cross
|
|
170
|
+
a link.
|
|
171
|
+
|
|
172
|
+
## Size
|
|
173
|
+
|
|
174
|
+
About 700 source lines (both reviewers: the attempt states, backoff map, drain and timers).
|