@diffra-ai/chord 0.0.0-stage → 0.2.2
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 +235 -0
- package/README.md +227 -2
- package/dist/context/index.d.ts +43 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +112 -0
- package/dist/context/index.js.map +1 -0
- package/dist/contracts/accepts.d.ts +91 -0
- package/dist/contracts/accepts.d.ts.map +1 -0
- package/dist/contracts/accepts.js +145 -0
- package/dist/contracts/accepts.js.map +1 -0
- package/dist/contracts/contract.d.ts +238 -0
- package/dist/contracts/contract.d.ts.map +1 -0
- package/dist/contracts/contract.js +69 -0
- package/dist/contracts/contract.js.map +1 -0
- package/dist/contracts/declare.d.ts +144 -0
- package/dist/contracts/declare.d.ts.map +1 -0
- package/dist/contracts/declare.js +207 -0
- package/dist/contracts/declare.js.map +1 -0
- package/dist/contracts/evolve.d.ts +142 -0
- package/dist/contracts/evolve.d.ts.map +1 -0
- package/dist/contracts/evolve.js +216 -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 +61 -0
- package/dist/contracts/fingerprint.js.map +1 -0
- package/dist/contracts/history.d.ts +79 -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 +58 -0
- package/dist/contracts/host-kind.d.ts.map +1 -0
- package/dist/contracts/host-kind.js +122 -0
- package/dist/contracts/host-kind.js.map +1 -0
- package/dist/contracts/index.d.ts +8 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js +7 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/contracts/internal.d.ts +12 -0
- package/dist/contracts/internal.d.ts.map +1 -0
- package/dist/contracts/internal.js +11 -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 +55 -0
- package/dist/contracts/params.js.map +1 -0
- package/dist/contracts/schema.d.ts +144 -0
- package/dist/contracts/schema.d.ts.map +1 -0
- package/dist/contracts/schema.js +144 -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 +31 -0
- package/dist/data/failure.d.ts.map +1 -0
- package/dist/data/failure.js +78 -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 +28 -0
- package/dist/data/principal.d.ts.map +1 -0
- package/dist/data/principal.js +64 -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.d.ts +4 -0
- package/dist/delta/apply-immutable-trusted.d.ts.map +1 -0
- package/dist/delta/apply-immutable-trusted.js +126 -0
- package/dist/delta/apply-immutable-trusted.js.map +1 -0
- package/dist/delta/diff.d.ts +5 -0
- package/dist/delta/diff.d.ts.map +1 -0
- package/dist/delta/diff.js +435 -0
- package/dist/delta/diff.js.map +1 -0
- package/dist/delta/draft.d.ts +5 -0
- package/dist/delta/draft.d.ts.map +1 -0
- package/dist/delta/draft.js +2 -0
- package/dist/delta/draft.js.map +1 -0
- package/dist/delta/index.d.ts +120 -0
- package/dist/delta/index.d.ts.map +1 -0
- package/dist/delta/index.js +697 -0
- package/dist/delta/index.js.map +1 -0
- 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/revision-validator.d.ts +7 -0
- package/dist/delta/revision-validator.d.ts.map +1 -0
- package/dist/delta/revision-validator.js +71 -0
- package/dist/delta/revision-validator.js.map +1 -0
- package/dist/delta/tracker.d.ts +38 -0
- package/dist/delta/tracker.d.ts.map +1 -0
- package/dist/delta/tracker.js +2175 -0
- package/dist/delta/tracker.js.map +1 -0
- package/dist/documents/address-source.d.ts +20 -0
- package/dist/documents/address-source.d.ts.map +1 -0
- package/dist/documents/address-source.js +44 -0
- package/dist/documents/address-source.js.map +1 -0
- package/dist/documents/definition.d.ts +92 -0
- package/dist/documents/definition.d.ts.map +1 -0
- package/dist/documents/definition.js +81 -0
- package/dist/documents/definition.js.map +1 -0
- package/dist/documents/documents.d.ts +129 -0
- package/dist/documents/documents.d.ts.map +1 -0
- package/dist/documents/documents.js +258 -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 +81 -0
- package/dist/documents/handles.d.ts.map +1 -0
- package/dist/documents/handles.js +74 -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 +139 -0
- package/dist/documents/keyed-slot.d.ts.map +1 -0
- package/dist/documents/keyed-slot.js +478 -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 +120 -0
- package/dist/documents/persistence.d.ts.map +1 -0
- package/dist/documents/persistence.js +156 -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 +112 -0
- package/dist/documents/slot.d.ts.map +1 -0
- package/dist/documents/slot.js +190 -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 +445 -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 +63 -0
- package/dist/host/adapted.d.ts.map +1 -0
- package/dist/host/adapted.js +298 -0
- package/dist/host/adapted.js.map +1 -0
- package/dist/host/admission.d.ts +137 -0
- package/dist/host/admission.d.ts.map +1 -0
- package/dist/host/admission.js +290 -0
- package/dist/host/admission.js.map +1 -0
- package/dist/host/attempt.d.ts +417 -0
- package/dist/host/attempt.d.ts.map +1 -0
- package/dist/host/attempt.js +1490 -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 +97 -0
- package/dist/host/dependencies.d.ts.map +1 -0
- package/dist/host/dependencies.js +148 -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/events.d.ts +114 -0
- package/dist/host/events.d.ts.map +1 -0
- package/dist/host/events.js +191 -0
- package/dist/host/events.js.map +1 -0
- package/dist/host/facet.d.ts +106 -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-data.d.ts +62 -0
- package/dist/host/host-data.d.ts.map +1 -0
- package/dist/host/host-data.js +229 -0
- package/dist/host/host-data.js.map +1 -0
- package/dist/host/host.d.ts +641 -0
- package/dist/host/host.d.ts.map +1 -0
- package/dist/host/host.js +1449 -0
- package/dist/host/host.js.map +1 -0
- package/dist/host/index.d.ts +20 -0
- package/dist/host/index.d.ts.map +1 -0
- package/dist/host/index.js +7 -0
- package/dist/host/index.js.map +1 -0
- package/dist/host/internal.d.ts +13 -0
- package/dist/host/internal.d.ts.map +1 -0
- package/dist/host/internal.js +11 -0
- package/dist/host/internal.js.map +1 -0
- package/dist/host/list.d.ts +52 -0
- package/dist/host/list.d.ts.map +1 -0
- package/dist/host/list.js +149 -0
- package/dist/host/list.js.map +1 -0
- package/dist/host/members.d.ts +58 -0
- package/dist/host/members.d.ts.map +1 -0
- package/dist/host/members.js +178 -0
- package/dist/host/members.js.map +1 -0
- package/dist/host/named-query.d.ts +67 -0
- package/dist/host/named-query.d.ts.map +1 -0
- package/dist/host/named-query.js +166 -0
- package/dist/host/named-query.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 +388 -0
- package/dist/host/object.d.ts.map +1 -0
- package/dist/host/object.js +1527 -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/query-reader.d.ts +80 -0
- package/dist/host/query-reader.d.ts.map +1 -0
- package/dist/host/query-reader.js +182 -0
- package/dist/host/query-reader.js.map +1 -0
- package/dist/host/read-declarations.d.ts +75 -0
- package/dist/host/read-declarations.d.ts.map +1 -0
- package/dist/host/read-declarations.js +152 -0
- package/dist/host/read-declarations.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-events.d.ts +51 -0
- package/dist/host/reference-events.d.ts.map +1 -0
- package/dist/host/reference-events.js +133 -0
- package/dist/host/reference-events.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 +77 -0
- package/dist/host/reference-source.d.ts.map +1 -0
- package/dist/host/reference-source.js +326 -0
- package/dist/host/reference-source.js.map +1 -0
- package/dist/host/reference.d.ts +377 -0
- package/dist/host/reference.d.ts.map +1 -0
- package/dist/host/reference.js +986 -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-admission.d.ts +24 -0
- package/dist/host/route-admission.d.ts.map +1 -0
- package/dist/host/route-admission.js +238 -0
- package/dist/host/route-admission.js.map +1 -0
- package/dist/host/route.d.ts +88 -0
- package/dist/host/route.d.ts.map +1 -0
- package/dist/host/route.js +247 -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 +100 -0
- package/dist/host/staging.d.ts.map +1 -0
- package/dist/host/staging.js +413 -0
- package/dist/host/staging.js.map +1 -0
- package/dist/host/tiling.d.ts +57 -0
- package/dist/host/tiling.d.ts.map +1 -0
- package/dist/host/tiling.js +269 -0
- package/dist/host/tiling.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 +28 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- 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/json.d.ts +18 -0
- package/dist/json.d.ts.map +1 -0
- package/dist/json.js +124 -0
- package/dist/json.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 +574 -0
- package/dist/link/binary.js.map +1 -0
- package/dist/link/channel.d.ts +78 -0
- package/dist/link/channel.d.ts.map +1 -0
- package/dist/link/channel.js +252 -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 +278 -0
- package/dist/link/message.d.ts.map +1 -0
- package/dist/link/message.js +179 -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 +383 -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 +283 -0
- package/dist/node/app/app.d.ts.map +1 -0
- package/dist/node/app/app.js +598 -0
- package/dist/node/app/app.js.map +1 -0
- package/dist/node/app/archive.d.ts +44 -0
- package/dist/node/app/archive.d.ts.map +1 -0
- package/dist/node/app/archive.js +212 -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 +40 -0
- package/dist/node/app/data.d.ts.map +1 -0
- package/dist/node/app/data.js +47 -0
- package/dist/node/app/data.js.map +1 -0
- package/dist/node/app/ephemeral-sign-ins.d.ts +20 -0
- package/dist/node/app/ephemeral-sign-ins.d.ts.map +1 -0
- package/dist/node/app/ephemeral-sign-ins.js +69 -0
- package/dist/node/app/ephemeral-sign-ins.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 +388 -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 +70 -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/sign-ins.d.ts +74 -0
- package/dist/node/app/sign-ins.d.ts.map +1 -0
- package/dist/node/app/sign-ins.js +222 -0
- package/dist/node/app/sign-ins.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 +39 -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 +64 -0
- package/dist/node/http/admission.d.ts.map +1 -0
- package/dist/node/http/admission.js +137 -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 +114 -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 +62 -0
- package/dist/node/http/upgrades.d.ts.map +1 -0
- package/dist/node/http/upgrades.js +194 -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 +577 -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 +40 -0
- package/dist/node/plugins/install.d.ts.map +1 -0
- package/dist/node/plugins/install.js +215 -0
- package/dist/node/plugins/install.js.map +1 -0
- package/dist/node/plugins/plugins.d.ts +165 -0
- package/dist/node/plugins/plugins.d.ts.map +1 -0
- package/dist/node/plugins/plugins.js +268 -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 +70 -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 +40 -0
- package/dist/node/surfaces/bundle.d.ts.map +1 -0
- package/dist/node/surfaces/bundle.js +121 -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 +17 -0
- package/dist/node/surfaces/served.d.ts.map +1 -0
- package/dist/node/surfaces/served.js +44 -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 +42 -0
- package/dist/node/surfaces/tui.d.ts.map +1 -0
- package/dist/node/surfaces/tui.js +59 -0
- package/dist/node/surfaces/tui.js.map +1 -0
- package/dist/node/surfaces/web.d.ts +82 -0
- package/dist/node/surfaces/web.d.ts.map +1 -0
- package/dist/node/surfaces/web.js +122 -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 +260 -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 +43 -0
- package/dist/node/workers/process.d.ts.map +1 -0
- package/dist/node/workers/process.js +137 -0
- package/dist/node/workers/process.js.map +1 -0
- package/dist/node/workers/workers.d.ts +144 -0
- package/dist/node/workers/workers.d.ts.map +1 -0
- package/dist/node/workers/workers.js +723 -0
- package/dist/node/workers/workers.js.map +1 -0
- package/dist/output.d.ts +91 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/output.js +362 -0
- package/dist/output.js.map +1 -0
- package/dist/react/hooks.d.ts +61 -0
- package/dist/react/hooks.d.ts.map +1 -0
- package/dist/react/hooks.js +119 -0
- package/dist/react/hooks.js.map +1 -0
- package/dist/react/index.d.ts +4 -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 +34 -0
- package/dist/remote/calls.d.ts.map +1 -0
- package/dist/remote/calls.js +75 -0
- package/dist/remote/calls.js.map +1 -0
- package/dist/remote/consumer.d.ts +59 -0
- package/dist/remote/consumer.d.ts.map +1 -0
- package/dist/remote/consumer.js +468 -0
- package/dist/remote/consumer.js.map +1 -0
- package/dist/remote/hold.d.ts +147 -0
- package/dist/remote/hold.d.ts.map +1 -0
- package/dist/remote/hold.js +653 -0
- package/dist/remote/hold.js.map +1 -0
- package/dist/remote/host-link.d.ts +81 -0
- package/dist/remote/host-link.d.ts.map +1 -0
- package/dist/remote/host-link.js +198 -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 +105 -0
- package/dist/remote/path.d.ts.map +1 -0
- package/dist/remote/path.js +197 -0
- package/dist/remote/path.js.map +1 -0
- package/dist/remote/provider.d.ts +113 -0
- package/dist/remote/provider.d.ts.map +1 -0
- package/dist/remote/provider.js +787 -0
- package/dist/remote/provider.js.map +1 -0
- package/dist/remote/relay.d.ts +126 -0
- package/dist/remote/relay.d.ts.map +1 -0
- package/dist/remote/relay.js +334 -0
- package/dist/remote/relay.js.map +1 -0
- package/dist/remote/remote-object.d.ts +181 -0
- package/dist/remote/remote-object.d.ts.map +1 -0
- package/dist/remote/remote-object.js +683 -0
- package/dist/remote/remote-object.js.map +1 -0
- package/dist/remote/replica.d.ts +66 -0
- package/dist/remote/replica.d.ts.map +1 -0
- package/dist/remote/replica.js +148 -0
- package/dist/remote/replica.js.map +1 -0
- package/dist/sqlite/cloudflare.d.ts +54 -0
- package/dist/sqlite/cloudflare.d.ts.map +1 -0
- package/dist/sqlite/cloudflare.js +144 -0
- package/dist/sqlite/cloudflare.js.map +1 -0
- package/dist/sqlite/database.d.ts +40 -0
- package/dist/sqlite/database.d.ts.map +1 -0
- package/dist/sqlite/database.js +2 -0
- package/dist/sqlite/database.js.map +1 -0
- package/dist/sqlite/index.d.ts +4 -0
- package/dist/sqlite/index.d.ts.map +1 -0
- package/dist/sqlite/index.js +3 -0
- package/dist/sqlite/index.js.map +1 -0
- package/dist/sqlite/migrations.d.ts +10 -0
- package/dist/sqlite/migrations.d.ts.map +1 -0
- package/dist/sqlite/migrations.js +33 -0
- package/dist/sqlite/migrations.js.map +1 -0
- package/dist/sqlite/node.d.ts +49 -0
- package/dist/sqlite/node.d.ts.map +1 -0
- package/dist/sqlite/node.js +197 -0
- package/dist/sqlite/node.js.map +1 -0
- package/dist/sqlite/schema.d.ts +3 -0
- package/dist/sqlite/schema.d.ts.map +1 -0
- package/dist/sqlite/schema.js +10 -0
- package/dist/sqlite/schema.js.map +1 -0
- 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 +56 -0
- package/dist/state/derive.d.ts.map +1 -0
- package/dist/state/derive.js +192 -0
- package/dist/state/derive.js.map +1 -0
- package/dist/state/framed.d.ts +43 -0
- package/dist/state/framed.d.ts.map +1 -0
- package/dist/state/framed.js +121 -0
- package/dist/state/framed.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 +7 -0
- package/dist/state/internal.d.ts.map +1 -0
- package/dist/state/internal.js +9 -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 +390 -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 +36 -0
- package/dist/store/archive.d.ts.map +1 -0
- package/dist/store/archive.js +140 -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/column-set.d.ts +64 -0
- package/dist/store/column-set.d.ts.map +1 -0
- package/dist/store/column-set.js +96 -0
- package/dist/store/column-set.js.map +1 -0
- package/dist/store/columns.d.ts +93 -0
- package/dist/store/columns.d.ts.map +1 -0
- package/dist/store/columns.js +87 -0
- package/dist/store/columns.js.map +1 -0
- package/dist/store/engine.d.ts +182 -0
- package/dist/store/engine.d.ts.map +1 -0
- package/dist/store/engine.js +290 -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 +131 -0
- package/dist/store/evaluate.js.map +1 -0
- package/dist/store/export.d.ts +30 -0
- package/dist/store/export.d.ts.map +1 -0
- package/dist/store/export.js +221 -0
- package/dist/store/export.js.map +1 -0
- package/dist/store/expression.d.ts +254 -0
- package/dist/store/expression.d.ts.map +1 -0
- package/dist/store/expression.js +577 -0
- package/dist/store/expression.js.map +1 -0
- package/dist/store/host-column.d.ts +22 -0
- package/dist/store/host-column.d.ts.map +1 -0
- package/dist/store/host-column.js +36 -0
- package/dist/store/host-column.js.map +1 -0
- package/dist/store/host-data.d.ts +100 -0
- package/dist/store/host-data.d.ts.map +1 -0
- package/dist/store/host-data.js +397 -0
- package/dist/store/host-data.js.map +1 -0
- package/dist/store/import-migration.d.ts +19 -0
- package/dist/store/import-migration.d.ts.map +1 -0
- package/dist/store/import-migration.js +124 -0
- package/dist/store/import-migration.js.map +1 -0
- package/dist/store/import.d.ts +12 -0
- package/dist/store/import.d.ts.map +1 -0
- package/dist/store/import.js +279 -0
- package/dist/store/import.js.map +1 -0
- package/dist/store/index.d.ts +19 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +16 -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 +72 -0
- package/dist/store/live-query.d.ts.map +1 -0
- package/dist/store/live-query.js +162 -0
- package/dist/store/live-query.js.map +1 -0
- package/dist/store/open-query.d.ts +90 -0
- package/dist/store/open-query.d.ts.map +1 -0
- package/dist/store/open-query.js +201 -0
- package/dist/store/open-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/page.d.ts +14 -0
- package/dist/store/page.d.ts.map +1 -0
- package/dist/store/page.js +26 -0
- package/dist/store/page.js.map +1 -0
- package/dist/store/query.d.ts +65 -0
- package/dist/store/query.d.ts.map +1 -0
- package/dist/store/query.js +193 -0
- package/dist/store/query.js.map +1 -0
- package/dist/store/read-plan.d.ts +74 -0
- package/dist/store/read-plan.d.ts.map +1 -0
- package/dist/store/read-plan.js +324 -0
- package/dist/store/read-plan.js.map +1 -0
- package/dist/store/read.d.ts +81 -0
- package/dist/store/read.d.ts.map +1 -0
- package/dist/store/read.js +113 -0
- package/dist/store/read.js.map +1 -0
- package/dist/store/reads.d.ts +79 -0
- package/dist/store/reads.d.ts.map +1 -0
- package/dist/store/reads.js +255 -0
- package/dist/store/reads.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 +96 -0
- package/dist/store/rows.d.ts.map +1 -0
- package/dist/store/rows.js +222 -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 +123 -0
- package/dist/store/schema.js.map +1 -0
- package/dist/store/skip.d.ts +26 -0
- package/dist/store/skip.d.ts.map +1 -0
- package/dist/store/skip.js +66 -0
- package/dist/store/skip.js.map +1 -0
- package/dist/store/sql.d.ts +78 -0
- package/dist/store/sql.d.ts.map +1 -0
- package/dist/store/sql.js +244 -0
- package/dist/store/sql.js.map +1 -0
- package/dist/store/step.d.ts +52 -0
- package/dist/store/step.d.ts.map +1 -0
- package/dist/store/step.js +59 -0
- package/dist/store/step.js.map +1 -0
- package/dist/store/store.d.ts +192 -0
- package/dist/store/store.d.ts.map +1 -0
- package/dist/store/store.js +863 -0
- package/dist/store/store.js.map +1 -0
- package/dist/store/table-changes.d.ts +35 -0
- package/dist/store/table-changes.d.ts.map +1 -0
- package/dist/store/table-changes.js +127 -0
- package/dist/store/table-changes.js.map +1 -0
- package/dist/store/table-evolve.d.ts +82 -0
- package/dist/store/table-evolve.d.ts.map +1 -0
- package/dist/store/table-evolve.js +208 -0
- package/dist/store/table-evolve.js.map +1 -0
- package/dist/store/table-handle.d.ts +69 -0
- package/dist/store/table-handle.d.ts.map +1 -0
- package/dist/store/table-handle.js +92 -0
- package/dist/store/table-handle.js.map +1 -0
- package/dist/store/table-history.d.ts +78 -0
- package/dist/store/table-history.d.ts.map +1 -0
- package/dist/store/table-history.js +43 -0
- package/dist/store/table-history.js.map +1 -0
- package/dist/store/table-migration.d.ts +28 -0
- package/dist/store/table-migration.d.ts.map +1 -0
- package/dist/store/table-migration.js +212 -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 +91 -0
- package/dist/store/table.d.ts.map +1 -0
- package/dist/store/table.js +133 -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 +106 -0
- package/dist/surfaces/client.d.ts.map +1 -0
- package/dist/surfaces/client.js +280 -0
- package/dist/surfaces/client.js.map +1 -0
- package/dist/surfaces/connection.d.ts +53 -0
- package/dist/surfaces/connection.d.ts.map +1 -0
- package/dist/surfaces/connection.js +161 -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 +26 -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 +33 -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 +86 -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 +32 -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/surfaces/variant.d.ts +23 -0
- package/dist/surfaces/variant.d.ts.map +1 -0
- package/dist/surfaces/variant.js +18 -0
- package/dist/surfaces/variant.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 +169 -0
- package/dist/sync/client.d.ts.map +1 -0
- package/dist/sync/client.js +459 -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 +205 -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 +145 -0
- package/dist/sync/remote.d.ts.map +1 -0
- package/dist/sync/remote.js +59 -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 +73 -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 +26 -0
- package/dist/telemetry-ingest/facet.d.ts.map +1 -0
- package/dist/telemetry-ingest/facet.js +100 -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 +33 -0
- package/dist/telemetry-sqlite/index.d.ts.map +1 -0
- package/dist/telemetry-sqlite/index.js +113 -0
- package/dist/telemetry-sqlite/index.js.map +1 -0
- 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 +12 -0
- package/dist/telemetry-sqlite/store.d.ts.map +1 -0
- package/dist/telemetry-sqlite/store.js +121 -0
- package/dist/telemetry-sqlite/store.js.map +1 -0
- package/dist/telemetry.d.ts +1013 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +518 -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 +8 -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 +62 -0
- package/dist/tui/scope.d.ts.map +1 -0
- package/dist/tui/scope.js +173 -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 +42 -0
- package/dist/web/page.d.ts.map +1 -0
- package/dist/web/page.js +96 -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/admission/design.md +178 -0
- package/docs/benchmarks.md +1182 -0
- package/docs/decisions.md +3760 -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 +3691 -0
- package/docs/durable-observers/book.md +432 -0
- package/docs/durable-observers/index.html +517 -0
- package/docs/events/spec.md +438 -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 +958 -0
- package/docs/guide-plugins-hosts/index.html +952 -0
- package/docs/host-keyed/spec.md +343 -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 +389 -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/shared-holds/design.md +339 -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-14-design.md +213 -0
- package/docs/slice-14.md +861 -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 +380 -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 +2170 -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 +200 -5
- package/src/delta/README.md +262 -0
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
# Writing a Chord plugin
|
|
2
|
+
|
|
3
|
+
For agents and people writing plugins for an app built on Chord v2. Self-contained: everything a plugin author needs
|
|
4
|
+
is here. In the examples the app is "Acme", its API package `@acme/app`; replace it with your app's (its docs name the
|
|
5
|
+
package and the versions it provides).
|
|
6
|
+
|
|
7
|
+
## What a plugin is
|
|
8
|
+
|
|
9
|
+
A plugin is a feature of a running app: it serves objects (state plus methods) and contributes to the app's
|
|
10
|
+
registries (routes, panels, tools). The app loads it on its hosts (the server, its workers, browser pages, terminal
|
|
11
|
+
clients), reloads it when it is edited, and leaves it out alone when it is broken. Plugins talk to each other only
|
|
12
|
+
through object contracts and registries.
|
|
13
|
+
|
|
14
|
+
## Layout
|
|
15
|
+
|
|
16
|
+
A **directory plugin**, in one of the app's plugin roots:
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
plugins/stats/
|
|
20
|
+
package.json { "name": "@bob/stats", "dependencies": { ... } } required; the name is the plugin's
|
|
21
|
+
server.ts the server facet one file per host kind the app has, each optional:
|
|
22
|
+
worker.ts the worker facet <kind>.ts, .tsx, .js or .mjs; default export: a facet
|
|
23
|
+
web.tsx the web (page) facet
|
|
24
|
+
tui.ts the terminal client facet
|
|
25
|
+
contract.ts contracts every kind may import (data only)
|
|
26
|
+
contract.web.tsx contracts and tokens for web facets only (`contract.<kind>.ts(x)` per kind)
|
|
27
|
+
*.ts, *.css, assets/ plain files of the plugin
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
- `package.json`: `name` (an npm package name, scoped or not) is the plugin's name; `dependencies` are bundled into
|
|
31
|
+
its scripts; `"chord": { "external": ["better-sqlite3"] }` keeps named packages external in Node facets (native
|
|
32
|
+
addons).
|
|
33
|
+
- A **package of several plugins** (a repository holding them) lists their folders in its own `package.json`:
|
|
34
|
+
`"chord": { "plugins": ["./notes", "plugins/*", "!plugins/draft"] }` (paths, globs and `!` exclusions; `.` is the
|
|
35
|
+
package itself; a listed folder inside another listed one is refused). Without the field, the package is one plugin
|
|
36
|
+
when its top has facet files, else **every** subfolder with a `package.json` is a plugin: a repository with nested
|
|
37
|
+
packages that are no plugins (a helper library, examples, fixtures) must list its plugins in `chord.plugins`.
|
|
38
|
+
- A plugin with no facet file holds contracts others import.
|
|
39
|
+
- A **single-file plugin** is a file at a root's top named `<name>.<kind>.ts` (or `.tsx`, `.js`, `.mjs`):
|
|
40
|
+
`hello.server.ts` and `hello.web.tsx` are the plugin `hello` with two facets. No `package.json`, so no
|
|
41
|
+
dependencies; it imports only the app's API and defines its contracts inline. When it needs more, make it the
|
|
42
|
+
directory `hello/` with a `package.json` named `hello`: the app treats it as the same plugin.
|
|
43
|
+
|
|
44
|
+
## A facet
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
// plugins/stats/worker.ts
|
|
48
|
+
import { defineFacet, int, local, str } from "@acme/app/v3";
|
|
49
|
+
import { Indexers } from "@acme/app/v3/worker";
|
|
50
|
+
import { Notes } from "../notes/contract.ts";
|
|
51
|
+
|
|
52
|
+
const Stats = local("bob.stats", { version: 1, params: { project: str() }, members: { words: int() } });
|
|
53
|
+
|
|
54
|
+
export default defineFacet((host, self) => {
|
|
55
|
+
self.contribute(Indexers, { name: "word count" }); // a registry entry while the plugin is loaded
|
|
56
|
+
host.serve(Stats, ({ project }, self) => { // a factory, run per object
|
|
57
|
+
const notes = self.get(Notes, { project }); // a dependency: Stats waits until Notes is live
|
|
58
|
+
return { words: self.derive([notes.text], ([text]) => text.split(/\s+/).filter(Boolean).length) };
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
A facet only declares (`host.serve`, `self.contribute`, `host.references`), synchronously. Everything at runtime
|
|
64
|
+
happens in objects: state in documents and tables, standing behaviour in a `local` object with empty params (it lives
|
|
65
|
+
as long as the host). Names are prefixed by the plugin (`bob.stats`).
|
|
66
|
+
|
|
67
|
+
## Tables shown live
|
|
68
|
+
|
|
69
|
+
A table has no watch. To show its rows live, the object owning it declares a live query with a limit:
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
host.serve(Store, (_params, self) => { // a local type with empty params: it may have tables
|
|
73
|
+
const items = self.table(Items);
|
|
74
|
+
const newest = self.query(items, query(Items).orderBy((i) => i.id, "desc"), 50);
|
|
75
|
+
return { items: newest, add: async (row, ctx) => self.tx(async (tx) => tx.put(items, row), ctx) };
|
|
76
|
+
});
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
- Chord runs it before the object goes live and again in each commit of the object that writes the table; watchers get
|
|
80
|
+
only what changed. A commit writing no such table runs nothing.
|
|
81
|
+
- Only the object's own tables, the query fixed for the object's attempt (decide it from params), the limit required
|
|
82
|
+
(`invalid/args` without one).
|
|
83
|
+
- One query per writing commit, at most `limit` rows (for 100 rows about 60 µs more per commit, 80 µs when watched;
|
|
84
|
+
`benchmarks.md`): there may be dragons for a table written hundreds of times a second. Keep a document for those.
|
|
85
|
+
- Never read a table in `self.open` to fill a window: a live query reruns by itself after every commit and at a
|
|
86
|
+
reload's restart; a read in `self.open` is a one-time snapshot.
|
|
87
|
+
|
|
88
|
+
## Queries other objects read
|
|
89
|
+
|
|
90
|
+
`self.query` is for your own windows. What other objects read, a store offers under names (slice 14):
|
|
91
|
+
|
|
92
|
+
```ts
|
|
93
|
+
// contract: the queries, each with the schema of its arguments (part of the fingerprint)
|
|
94
|
+
sessions: queries(SessionRow, { visible: obj({ app: str(), condition: unknown() }), one: obj({ id: str() }) }),
|
|
95
|
+
|
|
96
|
+
// the table's owner: one builder per listed query; `reads` are the columns the mapping gets
|
|
97
|
+
const sessions = self.queries(rows, { map: rowOf, reads: ["id", "title", "state", "lastTouch"] }, {
|
|
98
|
+
visible: ({ app, condition }) => query(Rows).where((s) => eq(s.app, app)) // index by_app (app, lastTouch)
|
|
99
|
+
.whereNode(SessionColumns, condition).orderBy((s) => s.lastTouch, "desc"),
|
|
100
|
+
one: ({ id }) => query(Rows).where((s) => eq(s.id, id)),
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
// any object on the store's host
|
|
104
|
+
const store = self.get(SessionsStore, {});
|
|
105
|
+
self.liveQuery(store.sessions.visible, args, { first: 50 }) // Watchable<{ rows, more }>; `args` may be a watchable
|
|
106
|
+
self.count(store.sessions.visible, args) // Watchable<number>: read the rule below first
|
|
107
|
+
await store.sessions.visible.page(args, 100, ctx, { after }) // not live: for jobs and scripts
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
- **Name the index.** Each builder says, in a comment, which index its order and its condition's selective part run
|
|
111
|
+
on, and gets a plan test. An `inArray` on one column with an order on another walks the order's index: order by
|
|
112
|
+
the `inArray` column first.
|
|
113
|
+
- **A write names what it changes.** `tx.update(table, key, { lastTouch })` tells every reader which columns
|
|
114
|
+
changed: the ones that depend on none of them skip for free, the others ask one keyed probe before they run. A
|
|
115
|
+
`put` tells them nothing. A touch is an `update`.
|
|
116
|
+
- **`reads` is a projection.** A column the mapping does not list is absent (also one the query orders or matches
|
|
117
|
+
by), and its changes re-run nothing. `partnerReads` is the same for a joined set's row.
|
|
118
|
+
- **A transaction of many rows runs the reads over its table.** A read asks at most eight probes per commit; past
|
|
119
|
+
that it runs. Imports and bulk writes cost one run per open read, not one probe per row.
|
|
120
|
+
- **A reader's arguments come from what is there when the object activates:** params, references, registries,
|
|
121
|
+
writables. Reads open before natives and followed sources, so an object waiting on a read holds no native;
|
|
122
|
+
arguments computed from one fail the object `broken`, with this rule in the message.
|
|
123
|
+
- **A count is exact and expensive.** Every run reads every matching row, nothing caps it, and every write to its
|
|
124
|
+
tables runs it again unless it is an `update` of no condition column. Count what a key or an index bounds (a
|
|
125
|
+
team's sessions), never behind a hot condition column. The number of loaded rows is free: `rows.length`, with
|
|
126
|
+
"+" while `more`.
|
|
127
|
+
- **Another plugin's rows: a column set.** Its contract declares the columns you may use (`defineColumns`), its
|
|
128
|
+
table `exposes` them. Test `exists(Set, { setColumn: column }, (t) => condition)`, or join one row by its key:
|
|
129
|
+
`query(Mine).join(Set, (row) => ({ id: row.session }))`. Tables are matched only by equality to the set's key or
|
|
130
|
+
a declared index.
|
|
131
|
+
- **The driver finds, the condition decides.** Drive a list from rows the person has (their teams, their shares,
|
|
132
|
+
what they created) and apply their whole condition to what the rows point at. An `exists` is never the selective
|
|
133
|
+
part of a list: it walks the table for a person who sees few of many rows.
|
|
134
|
+
- **Conditions are built by server code** (`compile(Set, condition)`, `whereNode`, `existsNode`). Clients send
|
|
135
|
+
values (an app id, a team), never a condition.
|
|
136
|
+
- **No substring filter.** The only text operator is `prefix`. Filtering as you type goes through a search
|
|
137
|
+
plugin's method, its hits read with a named query; never read everything and filter in a derive.
|
|
138
|
+
- **A screen's list is `self.list`.** `self.list("sessions", [[store.sessions.visible, args]], { first: 50 })`
|
|
139
|
+
returns `{ value, more }`: `value` (`{ rows, moreAfter }`) is the state member, `more` the method's body. One
|
|
140
|
+
remote object per screen, with the screen's own id in its params (a fresh id is a fresh list). Never chain
|
|
141
|
+
`liveQuery` calls or page methods to build a list, and never read "the first n" with a growing n: a row that moves
|
|
142
|
+
would leave a gap. `moreAfter` may be stale after a delete: a `more` that loads nothing turns it false.
|
|
143
|
+
- **A source of access fails closed.** A read that decides what someone may see throws when it has `more` rows
|
|
144
|
+
than it read.
|
|
145
|
+
|
|
146
|
+
## Who may do what: admission
|
|
147
|
+
|
|
148
|
+
A factory is synchronous: it cannot read rows about its caller before it builds the caller's object. A remote type
|
|
149
|
+
whose access depends on data declares an **admission** (slice 14): the contract names the value, `admit` reads the
|
|
150
|
+
data and decides, and the factory is handed the value.
|
|
151
|
+
|
|
152
|
+
```ts
|
|
153
|
+
// contract.ts
|
|
154
|
+
export const Transcript = remote("notes.transcript", { version: 1, params: { session: str() },
|
|
155
|
+
hostAddress: ({ session }) => Session({ id: session }),
|
|
156
|
+
admission: obj({ mode: oneOf("read", "write") }),
|
|
157
|
+
variants: { viewer: { … }, participant: { … } } });
|
|
158
|
+
// worker.ts: `PersonHere` is a local object on the worker that follows the server's answer for this person (it
|
|
159
|
+
// holds a remote object of the server, in a contract the app's API owns)
|
|
160
|
+
host.serve(Transcript, (params, principal, admitted, self) =>
|
|
161
|
+
admitted.mode === "read" ? { variant: "viewer", members: … } : { variant: "participant", members: … },
|
|
162
|
+
{ admit: ({ session }, principal, self) =>
|
|
163
|
+
self.derive([self.get(PersonHere, { session, person: principal.id }).mode], ([mode]) =>
|
|
164
|
+
mode === "none" ? deny("no access") : allow({ mode })) });
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
- `admit` declares only `self.get` (and `at(key)`), `self.registry`, `self.derive` and `self.liveQuery`, and returns
|
|
168
|
+
a watchable of `allow(value)` or `deny(reason)`. It runs first in every attempt; the reason is shown to the person.
|
|
169
|
+
- **The value is small and changes rarely** (a mode, a role). It selects the variant and the members. Another value
|
|
170
|
+
rebuilds the person's object; an equal one changes nothing. What a list shows is not in it: a list's condition is
|
|
171
|
+
an argument of its named query.
|
|
172
|
+
- A denial shows `failed { denied }` and keeps no value: reads throw `forbidden`, running calls reject
|
|
173
|
+
`forbidden/revoked`. What your UI already rendered is yours to hide: watch `ref.state`. An object that had failed
|
|
174
|
+
shows the denial too; when the person is allowed again it is retried.
|
|
175
|
+
- **In a component, read the variant with `useVariant(ref, "participant")`** (a terminal: `scope.variant(ref,
|
|
176
|
+
"participant")`), not with `ref.variant === "participant"`: it returns the reference narrowed to that variant
|
|
177
|
+
while it is live in it and `undefined` otherwise, and re-renders when the person's value changes. The variant of
|
|
178
|
+
a held reference is `undefined` before it binds, changes while your component is mounted, and stays the last one
|
|
179
|
+
while the reference loads, so the comparison alone keeps a participant's controls up for a viewer.
|
|
180
|
+
- **No `self.job` in an admitted type.** Work for a person lives in a `local` store, carries the person in its
|
|
181
|
+
arguments, and asks the person's access again on every run.
|
|
182
|
+
- **The objects an admission reads `accept` their previous version.** A reader whose version is refused is sealed
|
|
183
|
+
until its own code follows (a rollout's gap). While such an object only restarts, the last decision is kept.
|
|
184
|
+
- The principal is identity only. Plugins never branch on principal kinds beyond "a person"; they read the value.
|
|
185
|
+
- A route's `admit` (the app's base code, `createWorkers`' `admit`) decides who reaches a worker at all; it reads
|
|
186
|
+
only contracts the app's API owns.
|
|
187
|
+
|
|
188
|
+
## Reports from a worker
|
|
189
|
+
|
|
190
|
+
A server object a worker reports to needs no check against a worker that is gone. When a worker exits, the app's
|
|
191
|
+
workers component closes its link first (a report not handled yet is dropped, a running one is aborted: its
|
|
192
|
+
transaction under `ctx` does not commit), waits for the commits already queued, and only then shows the exit in its
|
|
193
|
+
state and starts a successor. Write the report inside the call, under its `ctx`. For data you keep across runs of a
|
|
194
|
+
worker (the last report of each), store `ctx.incarnation` with it and compare with the incarnation in the workers'
|
|
195
|
+
state (the app's API shows it): another incarnation is another run.
|
|
196
|
+
|
|
197
|
+
## What a plugin may import
|
|
198
|
+
|
|
199
|
+
| Import | Resolves to |
|
|
200
|
+
| --- | --- |
|
|
201
|
+
| its own files (`./label.ts`, `./icon.svg?url` in web facets) | inlined into its script |
|
|
202
|
+
| the app's API, a version in the path: `@acme/app/v3`, its kind's module `@acme/app/v3/worker` | the app's own instance (a host package), never copied |
|
|
203
|
+
| another plugin of the same root (one repository): `../notes/contract.ts` | inlined (a copy, frozen at this build) |
|
|
204
|
+
| a package in `dependencies`: `@bob/notes`, `@bob/notes/web` | inlined from `node_modules` at the installed version, through the package's `exports` |
|
|
205
|
+
| a plugin inside a dependency on a whole repository of several: `@bob/plugins/notes/contract.ts` | inlined, as any package file |
|
|
206
|
+
| a `chord.external` package, a Node builtin (Node facets) | loaded when the script runs |
|
|
207
|
+
| `pluginFile` from `@diffra-ai/chord/plugins` | the absolute path of a file of this plugin |
|
|
208
|
+
|
|
209
|
+
Refused at build, each with the file, line and rule:
|
|
210
|
+
|
|
211
|
+
- `@acme/app/v1` when the app does not list v1 ("@acme/app/v1 is not available: this app provides v3, v2");
|
|
212
|
+
another kind's module (`@acme/app/v3/web` from a worker facet); two API versions in one facet.
|
|
213
|
+
- Chord itself (`@diffra-ai/chord`): the app's API re-exports what plugins may use.
|
|
214
|
+
- A relative path leaving the plugin's root (base code, another root); a file of a directory that is no plugin.
|
|
215
|
+
- A file copied from another plugin importing anything but the API and its own plugin's files.
|
|
216
|
+
- A per-kind file (`contract.web.tsx`, `contract.Web.ts` alike) or another kind's facet file (`web.tsx`) reached from
|
|
217
|
+
a facet of another kind, directly or through other files (the error names the chain). Files inside npm packages are
|
|
218
|
+
checked only when the package is plugin code (its `package.json`, or one above it in the package, has a `chord`
|
|
219
|
+
field); ordinary libraries name files as they like (`pdf.worker.mjs`).
|
|
220
|
+
- A package file whose real path is outside the plugin's own `node_modules` (a `file:` dependency linked elsewhere, a
|
|
221
|
+
package importing `../src`).
|
|
222
|
+
- A copied file importing a Node builtin or a package.
|
|
223
|
+
- A package not in `dependencies`; `import.meta`, `__dirname`, `__filename`, a literal `import("x")`, top-level
|
|
224
|
+
`await` (read files through `pluginFile`).
|
|
225
|
+
- In a single-file plugin, anything but host packages.
|
|
226
|
+
|
|
227
|
+
Contract files mention native things (React components, functions) only through `import type`; at runtime they import
|
|
228
|
+
only the API and the plugin's own data-only files.
|
|
229
|
+
|
|
230
|
+
## An app's API is a package
|
|
231
|
+
|
|
232
|
+
The app's API is a workspace package of the app's repository: a `package.json` named `@acme/app` with an `exports`
|
|
233
|
+
entry per module, listed in the repository root's `workspaces`, so `npm install` links it into `node_modules`:
|
|
234
|
+
|
|
235
|
+
```json
|
|
236
|
+
{
|
|
237
|
+
"name": "@acme/app",
|
|
238
|
+
"private": true,
|
|
239
|
+
"type": "module",
|
|
240
|
+
"exports": {
|
|
241
|
+
"./v3": "./src/api/v3/index.ts",
|
|
242
|
+
"./v3/web": "./src/api/v3/web.ts",
|
|
243
|
+
"./v3/worker": "./src/api/v3/worker.ts"
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Plugins, tests and tools resolve it alike: a facet imports `@acme/app/v3`, and so do the app's base code, a test, and
|
|
249
|
+
a plugin's `contract.ts` that a test or a script imports. In a plugin's build it stays a host package (left out of the
|
|
250
|
+
script, the process's own instance passed in when the script is evaluated).
|
|
251
|
+
|
|
252
|
+
## Errors
|
|
253
|
+
|
|
254
|
+
Throw Chord's own errors where Chord's built-in checks would, from the API (it re-exports them):
|
|
255
|
+
`invalid("args", "a note needs a title")` for arguments a method refuses (`"params"` for params a factory refuses),
|
|
256
|
+
`forbidden("viewers only")` for a principal a factory or method refuses. The caller gets the same
|
|
257
|
+
`{ code: "invalid", reason: "args" }` or `{ code: "forbidden" }` across every link. For codes of the plugin's own throw
|
|
258
|
+
`new PluginError(code, message, details)`. Only the code, reason, message and JSON details cross a link, never a stack
|
|
259
|
+
or a cause.
|
|
260
|
+
|
|
261
|
+
## Contracts and versions
|
|
262
|
+
|
|
263
|
+
A plugin carries the contract it was written against. Plugins changing together (one root, one repository) import
|
|
264
|
+
each other's contract files by relative path. A plugin from another repository takes the contracts as a dependency
|
|
265
|
+
pinned to a version: an npm version, or a git ref (`"@bob/notes": "github:bob/notes#<commit>"`, `"git+https://...#v2"`).
|
|
266
|
+
The app's own contracts for third parties come with its API (`@acme/app/v3` exports `Notes`). When a contract
|
|
267
|
+
changes shape, bump its `version`; the provider serves older consumers through `accepts`, else they wait "contract
|
|
268
|
+
mismatch" (visible, never wrong data).
|
|
269
|
+
|
|
270
|
+
## Reloads
|
|
271
|
+
|
|
272
|
+
A reload of the plugin restarts each of its live objects. The calls running at that moment, and every call they make
|
|
273
|
+
with their `ctx`, finish on the old code; new calls wait for the new code; documents and tables stay. Two rules keep
|
|
274
|
+
that working: a root opened inside a method takes the method's `ctx` (`host.root(fn, withoutAbortSignal(ctx))`), so its
|
|
275
|
+
calls count as the method's; and work longer than a few seconds is a job, since a call still running at
|
|
276
|
+
`reloadDrainTimeout` (5 s) is cut `released`.
|
|
277
|
+
|
|
278
|
+
## How the app builds it
|
|
279
|
+
|
|
280
|
+
The server builds each facet with one esbuild call from source: TypeScript and TSX (JSX with the automatic React
|
|
281
|
+
runtime), JS, JSON, CSS (web facets: one stylesheet per facet), assets and WASM by URL (`import url from "./x.svg?url"`).
|
|
282
|
+
No type check, no build hooks, no `dist` needed; generated files are committed. The script is evaluated in each
|
|
283
|
+
process of its kind with that process's API modules. A failed build or evaluation leaves the plugin out (at startup)
|
|
284
|
+
or keeps its old code (at a reload), reported with the error.
|
|
285
|
+
|
|
286
|
+
## Styles, themes and state across reloads (web and terminal facets)
|
|
287
|
+
|
|
288
|
+
- A web facet's CSS is served with its script and swapped when the plugin reloads. Scope it with a **CSS module**: a
|
|
289
|
+
file named `*.module.css` has its class names made unique to the plugin and the file, and its import is the mapping
|
|
290
|
+
(`import styles from "./notes.module.css"; <div className={styles.card}>`). Plain CSS files still work; their class
|
|
291
|
+
names should then start with the plugin's name.
|
|
292
|
+
- Read the app's look from its CSS variables (`var(--accent)`, `var(--bg)`, `var(--fg)`, `var(--muted)`, `var(--error)`,
|
|
293
|
+
`var(--warning)`, `var(--success)`, and the app's own roles), never fixed colours: the active theme sets them.
|
|
294
|
+
- In a terminal facet, ask the app's theme lookup for a role (`theme.fg("accent", "Notes")`); never write raw colours.
|
|
295
|
+
- A reload of the plugin remounts its components (each is a new function): their `useState` starts over. Keep what
|
|
296
|
+
must survive an update (a half-typed message, a scroll position) in page state, kept by the page's host under a key
|
|
297
|
+
prefixed with the plugin's name: `usePageState("stats.draft", "")` instead of `useState("")` (from the app's web
|
|
298
|
+
API); in a terminal facet `scope.pageState("stats.draft", "")` on the `TuiScope` it was given. Any value, never sent
|
|
299
|
+
anywhere, gone with the page.
|
|
300
|
+
- A theme is data: contribute a `Theme` (`{ id, name, mode, colors, web?, tui? }`) to the kit's `Themes` registry,
|
|
301
|
+
from a web facet and a terminal facet to reach both. Users pick one dark and one light theme.
|
|
302
|
+
|
|
303
|
+
## Messages
|
|
304
|
+
|
|
305
|
+
Text people read is written once, in code, and rendered in each viewer's language (design §23, "Messages and
|
|
306
|
+
languages"). From the app's API:
|
|
307
|
+
|
|
308
|
+
```ts
|
|
309
|
+
// plugins/stats/messages.ts: imported by every facet that renders, and by the worker when it builds messages as data
|
|
310
|
+
export const messages = defineMessages("bob.stats", {
|
|
311
|
+
en: { title: "Stats", words: (n: number) => (n === 1 ? "1 word" : `${formatNumber(n)} words`), done: (by: string) => `${by} finished` },
|
|
312
|
+
de: { title: "Statistik", words: (n) => (n === 1 ? "1 Wort" : `${formatNumber(n)} Wörter`), done: (by) => `${by} ist fertig` },
|
|
313
|
+
});
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
- The namespace is the plugin's name; keys are names (`title`), never English text; the English catalog comes first and
|
|
317
|
+
annotates its functions' parameters, the others take them from it. A missing key, an unknown one or a wrong argument
|
|
318
|
+
is a type error. Plurals and word order are functions; dates, times and numbers go through `formatTime` and
|
|
319
|
+
`formatNumber` inside them (they follow the language being rendered).
|
|
320
|
+
- Every facet that renders contributes the plugin's own catalogs: `self.contribute(Translations, messages.translations)`
|
|
321
|
+
(registries are per host; the host learns the languages offered from them).
|
|
322
|
+
- Render in the host's language: `const { t } = useMessages(messages)` in a component, `const t =
|
|
323
|
+
scope.messages(messages)` in a terminal facet. The plain `messages(key, ...)` has no language of its own (outside a
|
|
324
|
+
render: the first catalog); never use it in UI code.
|
|
325
|
+
- Objects never store sentences: a member typed `union([MessageSchema, nul()])` holds `messages.message("done", by)`
|
|
326
|
+
(keys whose arguments are strings, numbers, booleans or `null`; a date as an ISO string), and each client renders it
|
|
327
|
+
with `t.render(message)`, which shows the key of a message it does not know.
|
|
328
|
+
- A translation is a plugin: its catalogs typed `MessagesOf<typeof messages>` (a type-only import of the other plugin's
|
|
329
|
+
`messages.ts`), partial allowed, in one shared file contributed as a list from each facet that renders:
|
|
330
|
+
`self.contribute(Translations, [{ namespace: "bob.stats", locale: "fr", messages: statsFr }])`; `override: true`
|
|
331
|
+
replaces the plugin's own catalog of that locale.
|
|
332
|
+
- Never translated: the model's prompts and answers, log lines, error codes.
|
|
333
|
+
|
|
334
|
+
## Installing
|
|
335
|
+
|
|
336
|
+
- `plugins.installPlugin({ kind: "git", git: "https://github.com/bob/stats.git", ref: "v1.2.0" }, root, ctx)`: a shallow clone of
|
|
337
|
+
the branch, tag or commit into `<root>/stats`; its plugins are the folders its `chord.plugins` lists, else by
|
|
338
|
+
convention. `{ kind: "npm", npm: "@bob/stats", version: "1.2.0" }`: the package extracted into `<root>/@bob/stats`. Then their
|
|
339
|
+
dependencies are installed (`npm install --omit=dev --ignore-scripts`; no lifecycle scripts run). Refused: a plugin
|
|
340
|
+
name the app has already, an existing directory, a ref or name starting with `-`.
|
|
341
|
+
- Removing is deleting the directory. To update, install another ref (a new directory) or delete and install again.
|
|
342
|
+
|
|
343
|
+
## Testing a plugin alone
|
|
344
|
+
|
|
345
|
+
```ts
|
|
346
|
+
import { testPlugin } from "@diffra-ai/chord/plugins";
|
|
347
|
+
import * as apiV3 from "@acme/app/v3";
|
|
348
|
+
import * as apiV3Worker from "@acme/app/v3/worker";
|
|
349
|
+
|
|
350
|
+
const Notes = apiV3.local("acme.notes", { version: 1, params: { project: apiV3.str() }, members: { text: apiV3.str() } });
|
|
351
|
+
const Stats = apiV3.local("bob.stats", { version: 1, params: { project: apiV3.str() }, members: { words: apiV3.int() } });
|
|
352
|
+
const notesStub = apiV3.defineFacet((host) => host.serve(Notes, () => ({ text: apiV3.constant("a b c") })));
|
|
353
|
+
|
|
354
|
+
const t = await testPlugin("./plugins/stats", {
|
|
355
|
+
kind: "worker",
|
|
356
|
+
kinds: ["server", "worker", "web"], // the app's kinds (by default: those its files name)
|
|
357
|
+
api: { name: "@acme/app", versions: ["v3"] },
|
|
358
|
+
modules: { "@acme/app/v3": apiV3, "@acme/app/v3/worker": apiV3Worker }, // the real API modules
|
|
359
|
+
stubs: [{ name: "@acme/notes", facet: notesStub }], // facets serving what it uses
|
|
360
|
+
principal: { kind: "worker", project: "p1" }, // the host's principal (optional)
|
|
361
|
+
}, ctx);
|
|
362
|
+
const stats = await t.host.get(Stats, { project: "p1" }, ctx); // stats.words.value: 3
|
|
363
|
+
t.contributions(apiV3Worker.Indexers); // its entries in a registry nobody serves (the helper collects them)
|
|
364
|
+
t.unserved(); // contracts its requests wait for: stub these
|
|
365
|
+
await t.root(async (ctx) => ..., ctx, { principal: { kind: "user", id: "u1" } });
|
|
366
|
+
await t.close(ctx);
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
The plugin is built as production builds it and loaded on an in-memory host (a `:memory:` store). Stubs are ordinary
|
|
370
|
+
facets with fake data. A test imports the API by its package name and the plugin's own contracts from its
|
|
371
|
+
`contract.ts` (the build bundles its own copy; contracts are data: the same name, version and schema bind); contracts
|
|
372
|
+
of plugins it has no files of, it declares again, as `Notes` above.
|
|
373
|
+
|
|
374
|
+
## Checklist
|
|
375
|
+
|
|
376
|
+
1. `package.json` with a valid name (or a single file `<name>.<kind>.ts`).
|
|
377
|
+
2. One facet file per kind it runs on; each default-exports `defineFacet(...)`.
|
|
378
|
+
3. Imports: the app's API at one version, own files, same-root contract files by relative path, other repositories'
|
|
379
|
+
by package name pinned in `dependencies`.
|
|
380
|
+
4. Contracts prefixed with the plugin's name; a version bump for every change of shape.
|
|
381
|
+
5. Live rows of a table through `self.query(table, q, limit)` (your own windows) or a named query read with
|
|
382
|
+
`self.liveQuery` (other objects), never a read in `self.open`; an index named for every named query; touches as
|
|
383
|
+
`update`.
|
|
384
|
+
5a. Access that depends on data in an admission (`admission` in the contract, `admit` in `serve`), never in every
|
|
385
|
+
method; no jobs in an admitted type; admission sources `accept` their previous version.
|
|
386
|
+
6. Files of one kind named `*.<kind>.ts(x)`.
|
|
387
|
+
7. A test with `testPlugin` and stubs for every name `t.unserved()` lists.
|
|
388
|
+
8. Texts people read in `messages.ts` (`defineMessages`), its catalogs contributed from each facet that renders, state
|
|
389
|
+
holding messages as data.
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: The Plugin Model: what a plugin is, what it may import, and how versions meet
|
|
3
|
+
cover: The Plugin / Model
|
|
4
|
+
kicker: A design proposal · Chord v2 · 2026-10-31
|
|
5
|
+
subtitle: Plugins, base code, versioned APIs and contracts, in one place, as discussed with the owner on 2026-10-31
|
|
6
|
+
stats:
|
|
7
|
+
- 4 | kinds of import a plugin may write
|
|
8
|
+
- 1 | integer per API version, in the import path
|
|
9
|
+
- 0 | package.json fields Chord reads besides name and dependencies
|
|
10
|
+
- 0 | type checks in the build
|
|
11
|
+
note: |
|
|
12
|
+
A proposal written by the redesign session after a day of discussion with the owner. It collects what was decided
|
|
13
|
+
and what is proposed into one model. Decided points cite their decision in `decisions.md`; proposed ones are marked.
|
|
14
|
+
Nothing here is built yet beyond slices 7c and 10.
|
|
15
|
+
colophon: The Plugin Model · proposal · 2026-10-31
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Before we begin {.preface}
|
|
19
|
+
|
|
20
|
+
An app built on Chord is mostly plugins. Its own features are plugins, users add plugins, and agents write plugins
|
|
21
|
+
while the app runs. A plugin uses the app (where things live, who calls, how to declare objects), uses other plugins
|
|
22
|
+
(their objects and extension points), and uses npm packages. Each of those can change on its own schedule: the app
|
|
23
|
+
gets a new version, a plugin it depends on changes its contract, a package publishes a fix.
|
|
24
|
+
|
|
25
|
+
The questions the owner kept asking were all versions of one: when a plugin is written against one state of the world
|
|
26
|
+
and runs against another, what does it get, and who notices a mismatch? This model answers it with one rule for each
|
|
27
|
+
kind of import, and versions that sit where the dependency is written: in the code.
|
|
28
|
+
|
|
29
|
+
## Eight things to know
|
|
30
|
+
|
|
31
|
+
:::findings
|
|
32
|
+
1. **A plugin is a directory, or a single file.** A directory has a `package.json` (its name, its npm dependencies)
|
|
33
|
+
and one file per host kind; a single file `hello.worker.ts` is a plugin named `hello` with no dependencies.
|
|
34
|
+
2. **Base code is internal unless it is an API.** The app exposes only versioned API modules to plugins; everything
|
|
35
|
+
else is unreachable.
|
|
36
|
+
3. **API versions are in the import path.** `import { Session } from "@acme/app/v3"`: the plugin says what it was
|
|
37
|
+
written for where it imports it; an unavailable version is a build error.
|
|
38
|
+
4. **APIs are split by host kind.** A shared module holds what every host may use (contracts, registry tokens, host
|
|
39
|
+
kinds); `/v3/web` and `/v3/tui` hold UI pieces; a worker never loads React.
|
|
40
|
+
5. **Contracts carry their own versions.** A plugin carries the contract version it was written for; the provider
|
|
41
|
+
binds it if it accepts that version, else the plugin waits with a clear reason.
|
|
42
|
+
6. **A plugin imports four things:** its own files, host packages, its npm dependencies, and the app's own plugins by
|
|
43
|
+
relative path. Nothing else.
|
|
44
|
+
7. **Settings are arguments, extensions are registries.** What the app decides at startup is passed to its components;
|
|
45
|
+
what plugins add is contributed.
|
|
46
|
+
8. **No type checking in the build.** Types come from where imports come from; editors and agents check, the build
|
|
47
|
+
only builds.
|
|
48
|
+
:::
|
|
49
|
+
|
|
50
|
+
## Words used throughout
|
|
51
|
+
|
|
52
|
+
**Base code** is the app's own program; its **API** is the part plugins may import, published as **API modules**,
|
|
53
|
+
one per version and host kind. A **host package** is a module the running process provides to every plugin (Chord,
|
|
54
|
+
the app's API modules). A **contract** is an object type's declaration; a **registry token** an extension point's.
|
|
55
|
+
A **facet** is a plugin's declarations for one host kind.
|
|
56
|
+
|
|
57
|
+
# What a Plugin Is {#plugin lede="A directory or a single file, named once, with one file per host kind."}
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
plugins/notes/ a directory plugin
|
|
61
|
+
package.json { "name": "@acme/notes", "dependencies": { "slugify": "1.6.6" } }
|
|
62
|
+
contract.ts the object types and registry tokens it offers
|
|
63
|
+
worker.ts server.ts web.tsx one facet per host kind it needs
|
|
64
|
+
plugins/hello.worker.ts a single-file plugin "hello" with one worker facet
|
|
65
|
+
plugins/hello.web.tsx the same plugin's web facet
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
A directory plugin's name is its `package.json` name; Chord reads only `name` and `dependencies` from it. A
|
|
69
|
+
single-file plugin's name is its file's base name; it has no dependencies and imports only host packages. When a
|
|
70
|
+
single file needs a package or a second file, it becomes a directory. Two roots with the same name: the first root
|
|
71
|
+
wins, the other is reported (slice 7c).
|
|
72
|
+
|
|
73
|
+
# Base Code: Internal and External {#base lede="What the app keeps to itself, what it exposes, and how exposure is versioned."}
|
|
74
|
+
|
|
75
|
+
The app's base code is everything that starts the process: settings, startup, core objects' implementations, the
|
|
76
|
+
session index, migrations. Plugins must not depend on any of it, or every refactoring of the app would break them.
|
|
77
|
+
So the app draws a line and exposes only its **API**:
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
src/api/v3/index.ts shared: host kinds, the principal type, defineFacet per kind, core contracts, registry tokens
|
|
81
|
+
src/api/v3/web.ts web only: shared UI pieces (a Sheet, theme variables), React-typed registry tokens
|
|
82
|
+
src/api/v3/tui.ts TUI only: its UI pieces
|
|
83
|
+
src/… internal: everything else
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Each API module is a host package of the kinds that may use it: `@acme/app/v3` for every kind, `@acme/app/v3/web` for
|
|
87
|
+
the web kind only. A worker plugin importing `@acme/app/v3/web` is a build error, and a worker process never loads
|
|
88
|
+
React. The shared module stays free of runtime imports of UI libraries: a registry token that needs a React type names
|
|
89
|
+
it with `import type`, which the build erases.
|
|
90
|
+
|
|
91
|
+
:::note | Proposed
|
|
92
|
+
The split of the external API into a shared module and per-kind modules answers the owner's worry about "web, TUI,
|
|
93
|
+
worker, server things all in the same index.ts". Proposed, not yet decided.
|
|
94
|
+
:::
|
|
95
|
+
|
|
96
|
+
# Versions in the Import Path {#versions lede="A plugin says what it was written for where it imports it."}
|
|
97
|
+
|
|
98
|
+
The app's API changes over time: a host kind is renamed, a principal variant changes. A plugin written for an older
|
|
99
|
+
API must not silently get the new one. So every API module has a version in its path, and the app lists which versions
|
|
100
|
+
it still provides:
|
|
101
|
+
|
|
102
|
+
```ts
|
|
103
|
+
// plugins/stats/worker.ts
|
|
104
|
+
import { defineFacet, Session, Panels } from "@acme/app/v3";
|
|
105
|
+
import { remote, str } from "@diffra-ai/chord/v2";
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
- The app provides `/v3`, its current API. If version 2 plugins still work unchanged against it, `/v2` is listed too,
|
|
109
|
+
pointing to the same module. An app that needs a compatibility layer makes `/v2` a thin module over `/v3`.
|
|
110
|
+
- An import of a version the app no longer lists is a build error: "@acme/app/v1 is not available: this app provides
|
|
111
|
+
v3, v2". The plugin keeps its old code, and the message tells an agent exactly what to change.
|
|
112
|
+
- Nothing to fill in elsewhere: no `package.json` field, no npm ranges. Skeletons and examples import the current
|
|
113
|
+
version, so an agent copies it without thinking.
|
|
114
|
+
- Chord's own surface is versioned the same way (`@diffra-ai/chord/v2`).
|
|
115
|
+
|
|
116
|
+
Decided: "the API version must be declared by the plugin in code" (owner, 2026-10-31); the import path is how.
|
|
117
|
+
|
|
118
|
+
# Contracts and Registries {#contracts lede="Finer versions inside the API, and what crosses between plugins."}
|
|
119
|
+
|
|
120
|
+
Contracts and registry tokens keep their own versions inside the API, because they evolve independently of the API as
|
|
121
|
+
a whole:
|
|
122
|
+
|
|
123
|
+
- **An object type**: the consumer carries the contract version it was written for; the provider binds it at that
|
|
124
|
+
version if it accepts it (`accepts` maps arguments forward and results and state back), otherwise the consumer waits
|
|
125
|
+
"contract mismatch: v1, served v3". Shapes are fingerprinted, so a changed shape without a version bump is caught.
|
|
126
|
+
- **A registry token**: a name, a version and TypeScript types for what is contributed and read. Values are in-process
|
|
127
|
+
things (functions, components), which cannot be fingerprinted: bumping the version when they change is the defining
|
|
128
|
+
plugin's rule, and its `accepts` adapts older contributions.
|
|
129
|
+
- **Host kinds on registries** (proposed): a token names the kinds that serve it (`hosts: ["web"]`), typed, so a worker
|
|
130
|
+
facet contributing to a web registry is a type error and a load error, not a silent no-op.
|
|
131
|
+
|
|
132
|
+
A contract file imports only host packages at runtime (Chord, the app's API); native types it mentions are type-only.
|
|
133
|
+
|
|
134
|
+
# What a Plugin May Import {#imports lede="Four kinds of import, each with one rule."}
|
|
135
|
+
|
|
136
|
+
| Import | Resolved to | Versioned by |
|
|
137
|
+
| --- | --- | --- |
|
|
138
|
+
| its own files (`./store.ts`) | copied into its script | the plugin itself |
|
|
139
|
+
| host packages (`@acme/app/v3`, `@diffra-ai/chord/v2`, `react`) | the running process's instance, shared | the path's version; the app lists what it provides |
|
|
140
|
+
| npm packages in its `dependencies` (`slugify`, a third party's contracts package) | its own `node_modules`, bundled | the installed version |
|
|
141
|
+
| the app's own plugins (`../notes/contract.ts`), in the same root | copied into its script | the same revision: one repository |
|
|
142
|
+
|
|
143
|
+
A third-party plugin that wants the app's plugins' contracts gets them through the app's API (core contracts) or the
|
|
144
|
+
app's published package, as an npm dependency at the version it was written for, never from the running plugin's
|
|
145
|
+
files. Anything else (a path into base code, an unlisted version, a package not in its dependencies) is a build error.
|
|
146
|
+
|
|
147
|
+
# Settings and Extensions {#settings lede="How the app configures its components without letting plugins override it."}
|
|
148
|
+
|
|
149
|
+
Decided ("Settings are arguments, extensions are registries"): what the app decides at startup is an argument to the
|
|
150
|
+
component's facet, which base code constructs, and plugins cannot change it:
|
|
151
|
+
|
|
152
|
+
```ts
|
|
153
|
+
const http = createHttp(server, { listen: { port: 8788 }, links: { path: "/chord", maxPayload: MiB }, closeTimeout: 10_000, onError }, ctx);
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
What plugins add while the app runs is a registry: routes, authenticators, tools, panels. A component may offer both
|
|
157
|
+
for one thing: the session index takes its indexer as an argument, and may also follow a registry of indexers if
|
|
158
|
+
plugins should supply them.
|
|
159
|
+
|
|
160
|
+
# Building and Evaluating {#build lede="Unchanged from slices 7c and 10: one build on the server, evaluation everywhere."}
|
|
161
|
+
|
|
162
|
+
Only the server builds, because only the server has the sources. `createPlugins` builds every kind and needs only
|
|
163
|
+
names: per kind its platform and its host package names. Each process evaluates the scripts of its kind with its own
|
|
164
|
+
module objects (the server's at `plugins.load`, a worker's in `workerMain`, a page's in its base bundle), so a plugin
|
|
165
|
+
shares that process's Chord and API. Base-code facets are passed beside the plugins; they are not plugins, because
|
|
166
|
+
they close over the process's own values and never reload.
|
|
167
|
+
|
|
168
|
+
# Types and Tests {#tools lede="Where types come from, and how a plugin is tested alone."}
|
|
169
|
+
|
|
170
|
+
Types come from where imports come from: relative files and npm packages resolve natively in TypeScript; the app's API
|
|
171
|
+
modules ship `.d.ts` per version in the app's package. There is no type checking in the build (the owner: seconds per
|
|
172
|
+
build is too slow); editors check as an author types, and an agent may run `tsc` as a tool.
|
|
173
|
+
|
|
174
|
+
Testing a plugin alone (proposed): `testPlugin(dir, { kind, stubs })` builds the plugin like production, loads it on an
|
|
175
|
+
in-memory host with the kind's real host packages, and loads stub facets that serve the contracts it depends on. A stub
|
|
176
|
+
is an ordinary facet; there is no mocking framework.
|
|
177
|
+
|
|
178
|
+
# Open Questions {.epilogue lede="What is proposed here and still to decide."}
|
|
179
|
+
|
|
180
|
+
1. The external API split by host kind (`/v3`, `/v3/web`, `/v3/tui`).
|
|
181
|
+
2. Host kinds on registry tokens, typed and checked at load.
|
|
182
|
+
3. Single-file plugins (`hello.worker.ts`, named by the file).
|
|
183
|
+
4. Contracts of the app's plugins for third parties: through the API modules only, or also the app's npm package.
|
|
184
|
+
5. `testPlugin` with stub facets.
|
|
185
|
+
6. Reversing "Plugins import each other by name" (2026-10-31, morning) in favour of relative paths within the app
|
|
186
|
+
and npm dependencies across it.
|