@earendil-works/chord 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +51 -0
- package/README.md +50 -90
- package/dist/contracts/accepts.d.ts +81 -0
- package/dist/contracts/accepts.d.ts.map +1 -0
- package/dist/contracts/accepts.js.map +1 -0
- package/dist/contracts/contract.d.ts +121 -0
- package/dist/contracts/contract.d.ts.map +1 -0
- package/dist/contracts/contract.js.map +1 -0
- package/dist/contracts/declare.d.ts.map +1 -0
- package/dist/contracts/declare.js.map +1 -0
- package/dist/contracts/evolve.d.ts.map +1 -0
- package/dist/contracts/evolve.js.map +1 -0
- package/dist/contracts/fingerprint.d.ts +16 -0
- package/dist/contracts/fingerprint.d.ts.map +1 -0
- package/dist/contracts/fingerprint.js.map +1 -0
- package/dist/contracts/history.d.ts.map +1 -0
- package/dist/contracts/history.js.map +1 -0
- package/dist/contracts/host-kind.d.ts.map +1 -0
- package/dist/contracts/host-kind.js.map +1 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/contracts/internal.d.ts.map +1 -0
- package/dist/contracts/internal.js.map +1 -0
- package/dist/contracts/names.d.ts.map +1 -0
- package/dist/contracts/names.js.map +1 -0
- package/dist/contracts/params.d.ts +28 -0
- package/dist/contracts/params.d.ts.map +1 -0
- package/dist/contracts/params.js.map +1 -0
- package/dist/contracts/schema.d.ts.map +1 -0
- package/dist/contracts/schema.js.map +1 -0
- package/dist/contracts/snapshot.d.ts +16 -0
- package/dist/contracts/snapshot.d.ts.map +1 -0
- package/dist/contracts/snapshot.js +167 -0
- package/dist/contracts/snapshot.js.map +1 -0
- package/dist/data/args.d.ts +50 -0
- package/dist/data/args.d.ts.map +1 -0
- package/dist/data/args.js.map +1 -0
- package/dist/data/errors.d.ts +80 -0
- package/dist/data/errors.d.ts.map +1 -0
- package/dist/data/errors.js +116 -0
- package/dist/data/errors.js.map +1 -0
- package/dist/data/failure.d.ts.map +1 -0
- package/dist/data/failure.js +77 -0
- package/dist/data/failure.js.map +1 -0
- package/dist/data/index.d.ts +4 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/index.js +5 -0
- package/dist/data/index.js.map +1 -0
- package/dist/data/internal.d.ts +7 -0
- package/dist/data/internal.d.ts.map +1 -0
- package/dist/data/internal.js +8 -0
- package/dist/data/internal.js.map +1 -0
- package/dist/data/params.d.ts +20 -0
- package/dist/data/params.d.ts.map +1 -0
- package/dist/data/params.js.map +1 -0
- package/dist/data/principal.d.ts +22 -0
- package/dist/data/principal.d.ts.map +1 -0
- package/dist/data/principal.js +49 -0
- package/dist/data/principal.js.map +1 -0
- package/dist/data/validator.d.ts +12 -0
- package/dist/data/validator.d.ts.map +1 -0
- package/dist/data/validator.js +35 -0
- package/dist/data/validator.js.map +1 -0
- package/dist/documents/address-source.d.ts +20 -0
- package/dist/documents/address-source.d.ts.map +1 -0
- package/dist/documents/address-source.js.map +1 -0
- package/dist/documents/definition.d.ts +84 -0
- package/dist/documents/definition.d.ts.map +1 -0
- package/dist/documents/definition.js +74 -0
- package/dist/documents/definition.js.map +1 -0
- package/dist/documents/documents.d.ts +126 -0
- package/dist/documents/documents.d.ts.map +1 -0
- package/dist/documents/documents.js +248 -0
- package/dist/documents/documents.js.map +1 -0
- package/dist/documents/fence.d.ts.map +1 -0
- package/dist/documents/fence.js.map +1 -0
- package/dist/documents/handles.d.ts +76 -0
- package/dist/documents/handles.d.ts.map +1 -0
- package/dist/documents/handles.js.map +1 -0
- package/dist/documents/index.d.ts.map +1 -0
- package/dist/documents/index.js.map +1 -0
- package/dist/documents/internal.d.ts +9 -0
- package/dist/documents/internal.d.ts.map +1 -0
- package/dist/documents/internal.js.map +1 -0
- package/dist/documents/keyed-slot.d.ts +103 -0
- package/dist/documents/keyed-slot.d.ts.map +1 -0
- package/dist/documents/keyed-slot.js +395 -0
- package/dist/documents/keyed-slot.js.map +1 -0
- package/dist/documents/line.d.ts.map +1 -0
- package/dist/documents/line.js.map +1 -0
- package/dist/documents/persistence.d.ts +104 -0
- package/dist/documents/persistence.d.ts.map +1 -0
- package/dist/documents/persistence.js +129 -0
- package/dist/documents/persistence.js.map +1 -0
- package/dist/documents/residency.d.ts +31 -0
- package/dist/documents/residency.d.ts.map +1 -0
- package/dist/documents/residency.js.map +1 -0
- package/dist/documents/slot.d.ts +109 -0
- package/dist/documents/slot.d.ts.map +1 -0
- package/dist/documents/slot.js +181 -0
- package/dist/documents/slot.js.map +1 -0
- package/dist/documents/transaction.d.ts +143 -0
- package/dist/documents/transaction.d.ts.map +1 -0
- package/dist/documents/transaction.js +442 -0
- package/dist/documents/transaction.js.map +1 -0
- package/dist/host/activity.d.ts +31 -0
- package/dist/host/activity.d.ts.map +1 -0
- package/dist/host/activity.js +40 -0
- package/dist/host/activity.js.map +1 -0
- package/dist/host/adapted.d.ts +49 -0
- package/dist/host/adapted.d.ts.map +1 -0
- package/dist/host/adapted.js.map +1 -0
- package/dist/host/attempt.d.ts +308 -0
- package/dist/host/attempt.d.ts.map +1 -0
- package/dist/host/attempt.js +1199 -0
- package/dist/host/attempt.js.map +1 -0
- package/dist/host/backoff.d.ts.map +1 -0
- package/dist/host/backoff.js.map +1 -0
- package/dist/host/ctx.d.ts +94 -0
- package/dist/host/ctx.d.ts.map +1 -0
- package/dist/host/ctx.js +200 -0
- package/dist/host/ctx.js.map +1 -0
- package/dist/host/deadline.d.ts.map +1 -0
- package/dist/host/deadline.js.map +1 -0
- package/dist/host/dependencies.d.ts.map +1 -0
- package/dist/host/dependencies.js.map +1 -0
- package/dist/host/destination.d.ts +48 -0
- package/dist/host/destination.d.ts.map +1 -0
- package/dist/host/destination.js.map +1 -0
- package/dist/host/facet.d.ts +84 -0
- package/dist/host/facet.d.ts.map +1 -0
- package/dist/host/facet.js.map +1 -0
- package/dist/host/follow.d.ts +52 -0
- package/dist/host/follow.d.ts.map +1 -0
- package/dist/host/follow.js.map +1 -0
- package/dist/host/host.d.ts +571 -0
- package/dist/host/host.d.ts.map +1 -0
- package/dist/host/host.js +1318 -0
- package/dist/host/host.js.map +1 -0
- package/dist/host/index.d.ts +17 -0
- package/dist/host/index.d.ts.map +1 -0
- package/dist/host/index.js.map +1 -0
- package/dist/host/internal.d.ts +11 -0
- package/dist/host/internal.d.ts.map +1 -0
- package/dist/host/internal.js +9 -0
- package/dist/host/internal.js.map +1 -0
- package/dist/host/members.d.ts +50 -0
- package/dist/host/members.d.ts.map +1 -0
- package/dist/host/members.js.map +1 -0
- package/dist/host/native.d.ts +64 -0
- package/dist/host/native.d.ts.map +1 -0
- package/dist/host/native.js +126 -0
- package/dist/host/native.js.map +1 -0
- package/dist/host/object.d.ts +331 -0
- package/dist/host/object.d.ts.map +1 -0
- package/dist/host/object.js +1296 -0
- package/dist/host/object.js.map +1 -0
- package/dist/host/old-work.d.ts +34 -0
- package/dist/host/old-work.d.ts.map +1 -0
- package/dist/host/old-work.js +52 -0
- package/dist/host/old-work.js.map +1 -0
- package/dist/host/parked.d.ts +23 -0
- package/dist/host/parked.d.ts.map +1 -0
- package/dist/host/parked.js.map +1 -0
- package/dist/host/presence.d.ts +34 -0
- package/dist/host/presence.d.ts.map +1 -0
- package/dist/host/presence.js.map +1 -0
- package/dist/host/readiness.d.ts +27 -0
- package/dist/host/readiness.d.ts.map +1 -0
- package/dist/host/readiness.js +134 -0
- package/dist/host/readiness.js.map +1 -0
- package/dist/host/ref-state.d.ts +53 -0
- package/dist/host/ref-state.d.ts.map +1 -0
- package/dist/host/ref-state.js +83 -0
- package/dist/host/ref-state.js.map +1 -0
- package/dist/host/reference-keys.d.ts +36 -0
- package/dist/host/reference-keys.d.ts.map +1 -0
- package/dist/host/reference-keys.js +168 -0
- package/dist/host/reference-keys.js.map +1 -0
- package/dist/host/reference-source.d.ts +65 -0
- package/dist/host/reference-source.d.ts.map +1 -0
- package/dist/host/reference-source.js +285 -0
- package/dist/host/reference-source.js.map +1 -0
- package/dist/host/reference.d.ts +321 -0
- package/dist/host/reference.d.ts.map +1 -0
- package/dist/host/reference.js +797 -0
- package/dist/host/reference.js.map +1 -0
- package/dist/host/reload-cycle.d.ts +16 -0
- package/dist/host/reload-cycle.d.ts.map +1 -0
- package/dist/host/reload-cycle.js +81 -0
- package/dist/host/reload-cycle.js.map +1 -0
- package/dist/host/retry-on.d.ts.map +1 -0
- package/dist/host/retry-on.js.map +1 -0
- package/dist/host/revocation.d.ts +16 -0
- package/dist/host/revocation.d.ts.map +1 -0
- package/dist/host/revocation.js.map +1 -0
- package/dist/host/root.d.ts +37 -0
- package/dist/host/root.d.ts.map +1 -0
- package/dist/host/root.js +68 -0
- package/dist/host/root.js.map +1 -0
- package/dist/host/route.d.ts +64 -0
- package/dist/host/route.d.ts.map +1 -0
- package/dist/host/route.js +227 -0
- package/dist/host/route.js.map +1 -0
- package/dist/host/routines.d.ts +78 -0
- package/dist/host/routines.d.ts.map +1 -0
- package/dist/host/routines.js +398 -0
- package/dist/host/routines.js.map +1 -0
- package/dist/host/sleep.d.ts +9 -0
- package/dist/host/sleep.d.ts.map +1 -0
- package/dist/host/sleep.js.map +1 -0
- package/dist/host/staging.d.ts +94 -0
- package/dist/host/staging.d.ts.map +1 -0
- package/dist/host/staging.js +304 -0
- package/dist/host/staging.js.map +1 -0
- package/dist/host/unbound-clock.d.ts +23 -0
- package/dist/host/unbound-clock.d.ts.map +1 -0
- package/dist/host/unbound-clock.js +58 -0
- package/dist/host/unbound-clock.js.map +1 -0
- package/dist/host/unbound.d.ts +37 -0
- package/dist/host/unbound.d.ts.map +1 -0
- package/dist/host/unbound.js +88 -0
- package/dist/host/unbound.js.map +1 -0
- package/dist/host/uuid.d.ts.map +1 -0
- package/dist/host/uuid.js.map +1 -0
- package/dist/index.d.ts +29 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -10
- package/dist/index.js.map +1 -1
- package/dist/jobs/definition.d.ts.map +1 -0
- package/dist/jobs/definition.js.map +1 -0
- package/dist/jobs/index.d.ts.map +1 -0
- package/dist/jobs/index.js.map +1 -0
- package/dist/jobs/internal.d.ts.map +1 -0
- package/dist/jobs/internal.js.map +1 -0
- package/dist/jobs/job.d.ts +149 -0
- package/dist/jobs/job.d.ts.map +1 -0
- package/dist/jobs/job.js +387 -0
- package/dist/jobs/job.js.map +1 -0
- package/dist/jobs/persisted.d.ts +38 -0
- package/dist/jobs/persisted.d.ts.map +1 -0
- package/dist/jobs/persisted.js.map +1 -0
- package/dist/jobs/records.d.ts +231 -0
- package/dist/jobs/records.d.ts.map +1 -0
- package/dist/jobs/records.js +871 -0
- package/dist/jobs/records.js.map +1 -0
- package/dist/jobs/run-states.d.ts +69 -0
- package/dist/jobs/run-states.d.ts.map +1 -0
- package/dist/jobs/run-states.js +228 -0
- package/dist/jobs/run-states.js.map +1 -0
- package/dist/jobs/run.d.ts +117 -0
- package/dist/jobs/run.d.ts.map +1 -0
- package/dist/jobs/run.js +204 -0
- package/dist/jobs/run.js.map +1 -0
- package/dist/jobs/running.d.ts +44 -0
- package/dist/jobs/running.d.ts.map +1 -0
- package/dist/jobs/running.js.map +1 -0
- package/dist/jobs/stored.d.ts +63 -0
- package/dist/jobs/stored.d.ts.map +1 -0
- package/dist/jobs/stored.js.map +1 -0
- package/dist/link/binary.d.ts.map +1 -0
- package/dist/link/binary.js +544 -0
- package/dist/link/binary.js.map +1 -0
- package/dist/link/channel.d.ts +68 -0
- package/dist/link/channel.d.ts.map +1 -0
- package/dist/link/channel.js +215 -0
- package/dist/link/channel.js.map +1 -0
- package/dist/link/errors.d.ts.map +1 -0
- package/dist/link/errors.js.map +1 -0
- package/dist/link/index.d.ts.map +1 -0
- package/dist/link/index.js.map +1 -0
- package/dist/link/internal.d.ts.map +1 -0
- package/dist/link/internal.js.map +1 -0
- package/dist/link/ipc.d.ts.map +1 -0
- package/dist/link/ipc.js.map +1 -0
- package/dist/link/link.d.ts.map +1 -0
- package/dist/link/link.js.map +1 -0
- package/dist/link/message.d.ts +262 -0
- package/dist/link/message.d.ts.map +1 -0
- package/dist/link/message.js +156 -0
- package/dist/link/message.js.map +1 -0
- package/dist/link/part.d.ts +80 -0
- package/dist/link/part.d.ts.map +1 -0
- package/dist/link/part.js +165 -0
- package/dist/link/part.js.map +1 -0
- package/dist/link/text.d.ts.map +1 -0
- package/dist/link/text.js +355 -0
- package/dist/link/text.js.map +1 -0
- package/dist/link/values.d.ts.map +1 -0
- package/dist/link/values.js +121 -0
- package/dist/link/values.js.map +1 -0
- package/dist/link/websocket.d.ts.map +1 -0
- package/dist/link/websocket.js.map +1 -0
- package/dist/node/app/app.d.ts +269 -0
- package/dist/node/app/app.d.ts.map +1 -0
- package/dist/node/app/app.js +513 -0
- package/dist/node/app/app.js.map +1 -0
- package/dist/node/app/archive.d.ts +37 -0
- package/dist/node/app/archive.d.ts.map +1 -0
- package/dist/node/app/archive.js +204 -0
- package/dist/node/app/archive.js.map +1 -0
- package/dist/node/app/blobs.d.ts +23 -0
- package/dist/node/app/blobs.d.ts.map +1 -0
- package/dist/node/app/blobs.js +64 -0
- package/dist/node/app/blobs.js.map +1 -0
- package/dist/node/app/data.d.ts +35 -0
- package/dist/node/app/data.d.ts.map +1 -0
- package/dist/node/app/data.js +44 -0
- package/dist/node/app/data.js.map +1 -0
- package/dist/node/app/ephemeral-sessions.d.ts +20 -0
- package/dist/node/app/ephemeral-sessions.d.ts.map +1 -0
- package/dist/node/app/ephemeral-sessions.js +69 -0
- package/dist/node/app/ephemeral-sessions.js.map +1 -0
- package/dist/node/app/ephemeral.d.ts +11 -0
- package/dist/node/app/ephemeral.d.ts.map +1 -0
- package/dist/node/app/ephemeral.js +34 -0
- package/dist/node/app/ephemeral.js.map +1 -0
- package/dist/node/app/files-copy.d.ts +13 -0
- package/dist/node/app/files-copy.d.ts.map +1 -0
- package/dist/node/app/files-copy.js +86 -0
- package/dist/node/app/files-copy.js.map +1 -0
- package/dist/node/app/files-entry.d.ts +4 -0
- package/dist/node/app/files-entry.d.ts.map +1 -0
- package/dist/node/app/files-entry.js +7 -0
- package/dist/node/app/files-entry.js.map +1 -0
- package/dist/node/app/files-index.d.ts +180 -0
- package/dist/node/app/files-index.d.ts.map +1 -0
- package/dist/node/app/files-index.js +535 -0
- package/dist/node/app/files-index.js.map +1 -0
- package/dist/node/app/files.d.ts +363 -0
- package/dist/node/app/files.d.ts.map +1 -0
- package/dist/node/app/files.js +368 -0
- package/dist/node/app/files.js.map +1 -0
- package/dist/node/app/folder-views.d.ts +21 -0
- package/dist/node/app/folder-views.d.ts.map +1 -0
- package/dist/node/app/folder-views.js +55 -0
- package/dist/node/app/folder-views.js.map +1 -0
- package/dist/node/app/index.d.ts +12 -0
- package/dist/node/app/index.d.ts.map +1 -0
- package/dist/node/app/index.js +15 -0
- package/dist/node/app/index.js.map +1 -0
- package/dist/node/app/info.d.ts +66 -0
- package/dist/node/app/info.d.ts.map +1 -0
- package/dist/node/app/info.js +37 -0
- package/dist/node/app/info.js.map +1 -0
- package/dist/node/app/invite.d.ts +5 -0
- package/dist/node/app/invite.d.ts.map +1 -0
- package/dist/node/app/invite.js +64 -0
- package/dist/node/app/invite.js.map +1 -0
- package/dist/node/app/layout.d.ts +36 -0
- package/dist/node/app/layout.d.ts.map +1 -0
- package/dist/node/app/layout.js +87 -0
- package/dist/node/app/layout.js.map +1 -0
- package/dist/node/app/owner.d.ts +31 -0
- package/dist/node/app/owner.d.ts.map +1 -0
- package/dist/node/app/owner.js +104 -0
- package/dist/node/app/owner.js.map +1 -0
- package/dist/node/app/pairing.d.ts +55 -0
- package/dist/node/app/pairing.d.ts.map +1 -0
- package/dist/node/app/pairing.js +183 -0
- package/dist/node/app/pairing.js.map +1 -0
- package/dist/node/app/secrets.d.ts +16 -0
- package/dist/node/app/secrets.d.ts.map +1 -0
- package/dist/node/app/secrets.js +72 -0
- package/dist/node/app/secrets.js.map +1 -0
- package/dist/node/app/sessions.d.ts +72 -0
- package/dist/node/app/sessions.d.ts.map +1 -0
- package/dist/node/app/sessions.js +222 -0
- package/dist/node/app/sessions.js.map +1 -0
- package/dist/node/app/tar.d.ts +24 -0
- package/dist/node/app/tar.d.ts.map +1 -0
- package/dist/node/app/tar.js +167 -0
- package/dist/node/app/tar.js.map +1 -0
- package/dist/node/app/uploads.d.ts +37 -0
- package/dist/node/app/uploads.d.ts.map +1 -0
- package/dist/node/app/uploads.js +157 -0
- package/dist/node/app/uploads.js.map +1 -0
- package/dist/node/app/users.d.ts +37 -0
- package/dist/node/app/users.d.ts.map +1 -0
- package/dist/node/app/users.js +62 -0
- package/dist/node/app/users.js.map +1 -0
- package/dist/node/app/worker.d.ts +18 -0
- package/dist/node/app/worker.d.ts.map +1 -0
- package/dist/node/app/worker.js +84 -0
- package/dist/node/app/worker.js.map +1 -0
- package/dist/node/compression.d.ts +7 -0
- package/dist/node/compression.d.ts.map +1 -0
- package/dist/node/compression.js +25 -0
- package/dist/node/compression.js.map +1 -0
- package/dist/node/http/admission.d.ts.map +1 -0
- package/dist/node/http/admission.js.map +1 -0
- package/dist/node/http/authenticate.d.ts +21 -0
- package/dist/node/http/authenticate.d.ts.map +1 -0
- package/dist/node/http/authenticate.js +34 -0
- package/dist/node/http/authenticate.js.map +1 -0
- package/dist/node/http/cookies.d.ts +32 -0
- package/dist/node/http/cookies.d.ts.map +1 -0
- package/dist/node/http/cookies.js +70 -0
- package/dist/node/http/cookies.js.map +1 -0
- package/dist/node/http/file.d.ts.map +1 -0
- package/dist/node/http/file.js.map +1 -0
- package/dist/node/http/headers.d.ts.map +1 -0
- package/dist/node/http/headers.js +136 -0
- package/dist/node/http/headers.js.map +1 -0
- package/dist/node/http/http.d.ts +111 -0
- package/dist/node/http/http.d.ts.map +1 -0
- package/dist/node/http/http.js +524 -0
- package/dist/node/http/http.js.map +1 -0
- package/dist/node/http/incoming.d.ts.map +1 -0
- package/dist/node/http/incoming.js.map +1 -0
- package/dist/node/http/index.d.ts +11 -0
- package/dist/node/http/index.d.ts.map +1 -0
- package/dist/node/http/index.js +12 -0
- package/dist/node/http/index.js.map +1 -0
- package/dist/node/http/node.d.ts.map +1 -0
- package/dist/node/http/node.js.map +1 -0
- package/dist/node/http/request.d.ts +60 -0
- package/dist/node/http/request.d.ts.map +1 -0
- package/dist/node/http/request.js +118 -0
- package/dist/node/http/request.js.map +1 -0
- package/dist/node/http/response.d.ts +63 -0
- package/dist/node/http/response.d.ts.map +1 -0
- package/dist/node/http/response.js.map +1 -0
- package/dist/node/http/router.d.ts +132 -0
- package/dist/node/http/router.d.ts.map +1 -0
- package/dist/node/http/router.js +267 -0
- package/dist/node/http/router.js.map +1 -0
- package/dist/node/http/upgrades.d.ts +61 -0
- package/dist/node/http/upgrades.d.ts.map +1 -0
- package/dist/node/http/upgrades.js +192 -0
- package/dist/node/http/upgrades.js.map +1 -0
- package/dist/node/plugins/base-inputs.d.ts +14 -0
- package/dist/node/plugins/base-inputs.d.ts.map +1 -0
- package/dist/node/plugins/base-inputs.js +33 -0
- package/dist/node/plugins/base-inputs.js.map +1 -0
- package/dist/node/plugins/build.d.ts +77 -0
- package/dist/node/plugins/build.d.ts.map +1 -0
- package/dist/node/plugins/build.js +576 -0
- package/dist/node/plugins/build.js.map +1 -0
- package/dist/node/plugins/css-modules.d.ts +13 -0
- package/dist/node/plugins/css-modules.d.ts.map +1 -0
- package/dist/node/plugins/css-modules.js +58 -0
- package/dist/node/plugins/css-modules.js.map +1 -0
- package/dist/node/plugins/discover.d.ts +67 -0
- package/dist/node/plugins/discover.d.ts.map +1 -0
- package/dist/node/plugins/discover.js +369 -0
- package/dist/node/plugins/discover.js.map +1 -0
- package/dist/node/plugins/evaluate.d.ts +33 -0
- package/dist/node/plugins/evaluate.d.ts.map +1 -0
- package/dist/node/plugins/evaluate.js +121 -0
- package/dist/node/plugins/evaluate.js.map +1 -0
- package/dist/node/plugins/index.d.ts +11 -0
- package/dist/node/plugins/index.d.ts.map +1 -0
- package/dist/node/plugins/index.js +13 -0
- package/dist/node/plugins/index.js.map +1 -0
- package/dist/node/plugins/install.d.ts +38 -0
- package/dist/node/plugins/install.d.ts.map +1 -0
- package/dist/node/plugins/install.js +213 -0
- package/dist/node/plugins/install.js.map +1 -0
- package/dist/node/plugins/plugins.d.ts +162 -0
- package/dist/node/plugins/plugins.d.ts.map +1 -0
- package/dist/node/plugins/plugins.js +244 -0
- package/dist/node/plugins/plugins.js.map +1 -0
- package/dist/node/plugins/runtime.d.ts +57 -0
- package/dist/node/plugins/runtime.d.ts.map +1 -0
- package/dist/node/plugins/runtime.js +92 -0
- package/dist/node/plugins/runtime.js.map +1 -0
- package/dist/node/plugins/stack.d.ts.map +1 -0
- package/dist/node/plugins/stack.js.map +1 -0
- package/dist/node/plugins/testing.d.ts +58 -0
- package/dist/node/plugins/testing.d.ts.map +1 -0
- package/dist/node/plugins/testing.js +210 -0
- package/dist/node/plugins/testing.js.map +1 -0
- package/dist/node/plugins/watcher.d.ts +69 -0
- package/dist/node/plugins/watcher.d.ts.map +1 -0
- package/dist/node/plugins/watcher.js +622 -0
- package/dist/node/plugins/watcher.js.map +1 -0
- package/dist/node/surfaces/bundle.d.ts +31 -0
- package/dist/node/surfaces/bundle.d.ts.map +1 -0
- package/dist/node/surfaces/bundle.js +118 -0
- package/dist/node/surfaces/bundle.js.map +1 -0
- package/dist/node/surfaces/current.d.ts +17 -0
- package/dist/node/surfaces/current.d.ts.map +1 -0
- package/dist/node/surfaces/current.js +54 -0
- package/dist/node/surfaces/current.js.map +1 -0
- package/dist/node/surfaces/index.d.ts +6 -0
- package/dist/node/surfaces/index.d.ts.map +1 -0
- package/dist/node/surfaces/index.js +6 -0
- package/dist/node/surfaces/index.js.map +1 -0
- package/dist/node/surfaces/published.d.ts +27 -0
- package/dist/node/surfaces/published.d.ts.map +1 -0
- package/dist/node/surfaces/published.js +142 -0
- package/dist/node/surfaces/published.js.map +1 -0
- package/dist/node/surfaces/served.d.ts +15 -0
- package/dist/node/surfaces/served.d.ts.map +1 -0
- package/dist/node/surfaces/served.js +42 -0
- package/dist/node/surfaces/served.js.map +1 -0
- package/dist/node/surfaces/surface-build.d.ts +53 -0
- package/dist/node/surfaces/surface-build.d.ts.map +1 -0
- package/dist/node/surfaces/surface-build.js +105 -0
- package/dist/node/surfaces/surface-build.js.map +1 -0
- package/dist/node/surfaces/tui.d.ts +40 -0
- package/dist/node/surfaces/tui.d.ts.map +1 -0
- package/dist/node/surfaces/tui.js +55 -0
- package/dist/node/surfaces/tui.js.map +1 -0
- package/dist/node/surfaces/web.d.ts +56 -0
- package/dist/node/surfaces/web.d.ts.map +1 -0
- package/dist/node/surfaces/web.js +108 -0
- package/dist/node/surfaces/web.js.map +1 -0
- package/dist/node/tui/actions.d.ts +49 -0
- package/dist/node/tui/actions.d.ts.map +1 -0
- package/dist/node/tui/actions.js +195 -0
- package/dist/node/tui/actions.js.map +1 -0
- package/dist/node/tui/credentials.d.ts +17 -0
- package/dist/node/tui/credentials.d.ts.map +1 -0
- package/dist/node/tui/credentials.js +54 -0
- package/dist/node/tui/credentials.js.map +1 -0
- package/dist/node/tui/filter.d.ts +5 -0
- package/dist/node/tui/filter.d.ts.map +1 -0
- package/dist/node/tui/filter.js +79 -0
- package/dist/node/tui/filter.js.map +1 -0
- package/dist/node/tui/index.d.ts +6 -0
- package/dist/node/tui/index.d.ts.map +1 -0
- package/dist/node/tui/index.js +6 -0
- package/dist/node/tui/index.js.map +1 -0
- package/dist/node/tui/launcher.d.ts +40 -0
- package/dist/node/tui/launcher.d.ts.map +1 -0
- package/dist/node/tui/launcher.js +439 -0
- package/dist/node/tui/launcher.js.map +1 -0
- package/dist/node/tui/pipe.d.ts +18 -0
- package/dist/node/tui/pipe.d.ts.map +1 -0
- package/dist/node/tui/pipe.js +134 -0
- package/dist/node/tui/pipe.js.map +1 -0
- package/dist/node/tui/sandbox.d.ts +54 -0
- package/dist/node/tui/sandbox.d.ts.map +1 -0
- package/dist/node/tui/sandbox.js +431 -0
- package/dist/node/tui/sandbox.js.map +1 -0
- package/dist/node/workers/base.d.ts +30 -0
- package/dist/node/workers/base.d.ts.map +1 -0
- package/dist/node/workers/base.js +255 -0
- package/dist/node/workers/base.js.map +1 -0
- package/dist/node/workers/child.d.ts +4 -0
- package/dist/node/workers/child.d.ts.map +1 -0
- package/dist/node/workers/child.js +6 -0
- package/dist/node/workers/child.js.map +1 -0
- package/dist/node/workers/control.d.ts +83 -0
- package/dist/node/workers/control.d.ts.map +1 -0
- package/dist/node/workers/control.js +77 -0
- package/dist/node/workers/control.js.map +1 -0
- package/dist/node/workers/index.d.ts +4 -0
- package/dist/node/workers/index.d.ts.map +1 -0
- package/dist/node/workers/index.js +7 -0
- package/dist/node/workers/index.js.map +1 -0
- package/dist/node/workers/lock.d.ts +30 -0
- package/dist/node/workers/lock.d.ts.map +1 -0
- package/dist/node/workers/lock.js +180 -0
- package/dist/node/workers/lock.js.map +1 -0
- package/dist/node/workers/main.d.ts +46 -0
- package/dist/node/workers/main.d.ts.map +1 -0
- package/dist/node/workers/main.js +230 -0
- package/dist/node/workers/main.js.map +1 -0
- package/dist/node/workers/process.d.ts +42 -0
- package/dist/node/workers/process.d.ts.map +1 -0
- package/dist/node/workers/process.js +125 -0
- package/dist/node/workers/process.js.map +1 -0
- package/dist/node/workers/workers.d.ts +122 -0
- package/dist/node/workers/workers.d.ts.map +1 -0
- package/dist/node/workers/workers.js +677 -0
- package/dist/node/workers/workers.js.map +1 -0
- package/dist/react/hooks.d.ts +43 -0
- package/dist/react/hooks.d.ts.map +1 -0
- package/dist/react/hooks.js +82 -0
- package/dist/react/hooks.js.map +1 -0
- package/dist/react/index.d.ts +3 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +4 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/stores.d.ts +9 -0
- package/dist/react/stores.d.ts.map +1 -0
- package/dist/react/stores.js +37 -0
- package/dist/react/stores.js.map +1 -0
- package/dist/registries/contribution.d.ts.map +1 -0
- package/dist/registries/contribution.js.map +1 -0
- package/dist/registries/entries.d.ts.map +1 -0
- package/dist/registries/entries.js.map +1 -0
- package/dist/registries/index.d.ts.map +1 -0
- package/dist/registries/index.js.map +1 -0
- package/dist/registries/internal.d.ts.map +1 -0
- package/dist/registries/internal.js.map +1 -0
- package/dist/registries/record.d.ts +115 -0
- package/dist/registries/record.d.ts.map +1 -0
- package/dist/registries/record.js +283 -0
- package/dist/registries/record.js.map +1 -0
- package/dist/registries/registry.d.ts +74 -0
- package/dist/registries/registry.d.ts.map +1 -0
- package/dist/registries/registry.js.map +1 -0
- package/dist/registries/value.d.ts.map +1 -0
- package/dist/registries/value.js +224 -0
- package/dist/registries/value.js.map +1 -0
- package/dist/remote/calls.d.ts.map +1 -0
- package/dist/remote/calls.js.map +1 -0
- package/dist/remote/consumer.d.ts +43 -0
- package/dist/remote/consumer.d.ts.map +1 -0
- package/dist/remote/consumer.js +350 -0
- package/dist/remote/consumer.js.map +1 -0
- package/dist/remote/hold.d.ts +141 -0
- package/dist/remote/hold.d.ts.map +1 -0
- package/dist/remote/hold.js +579 -0
- package/dist/remote/hold.js.map +1 -0
- package/dist/remote/host-link.d.ts +77 -0
- package/dist/remote/host-link.d.ts.map +1 -0
- package/dist/remote/host-link.js +184 -0
- package/dist/remote/host-link.js.map +1 -0
- package/dist/remote/internal.d.ts.map +1 -0
- package/dist/remote/internal.js.map +1 -0
- package/dist/remote/path.d.ts.map +1 -0
- package/dist/remote/path.js.map +1 -0
- package/dist/remote/provider.d.ts +89 -0
- package/dist/remote/provider.d.ts.map +1 -0
- package/dist/remote/provider.js +597 -0
- package/dist/remote/provider.js.map +1 -0
- package/dist/remote/relay.d.ts +69 -0
- package/dist/remote/relay.d.ts.map +1 -0
- package/dist/remote/relay.js +219 -0
- package/dist/remote/relay.js.map +1 -0
- package/dist/remote/remote-object.d.ts +138 -0
- package/dist/remote/remote-object.d.ts.map +1 -0
- package/dist/remote/remote-object.js +492 -0
- package/dist/remote/remote-object.js.map +1 -0
- package/dist/remote/replica.d.ts +59 -0
- package/dist/remote/replica.d.ts.map +1 -0
- package/dist/remote/replica.js +125 -0
- package/dist/remote/replica.js.map +1 -0
- package/dist/sqlite/node.d.ts +9 -1
- package/dist/sqlite/node.d.ts.map +1 -1
- package/dist/sqlite/node.js +9 -3
- package/dist/sqlite/node.js.map +1 -1
- package/dist/state/batch.d.ts +64 -0
- package/dist/state/batch.d.ts.map +1 -0
- package/dist/state/batch.js +164 -0
- package/dist/state/batch.js.map +1 -0
- package/dist/state/derive.d.ts +52 -0
- package/dist/state/derive.d.ts.map +1 -0
- package/dist/state/derive.js +182 -0
- package/dist/state/derive.js.map +1 -0
- package/dist/state/index.d.ts +6 -0
- package/dist/state/index.d.ts.map +1 -0
- package/dist/state/index.js.map +1 -0
- package/dist/state/internal.d.ts.map +1 -0
- package/dist/state/internal.js.map +1 -0
- package/dist/state/native-source.d.ts +106 -0
- package/dist/state/native-source.d.ts.map +1 -0
- package/dist/state/native-source.js +240 -0
- package/dist/state/native-source.js.map +1 -0
- package/dist/state/watchable.d.ts +114 -0
- package/dist/state/watchable.d.ts.map +1 -0
- package/dist/state/watchable.js +156 -0
- package/dist/state/watchable.js.map +1 -0
- package/dist/state/writable.d.ts +32 -0
- package/dist/state/writable.d.ts.map +1 -0
- package/dist/state/writable.js.map +1 -0
- package/dist/store/adapter.d.ts +67 -0
- package/dist/store/adapter.d.ts.map +1 -0
- package/dist/store/adapter.js.map +1 -0
- package/dist/store/allocator.d.ts.map +1 -0
- package/dist/store/allocator.js.map +1 -0
- package/dist/store/applier.d.ts.map +1 -0
- package/dist/store/applier.js.map +1 -0
- package/dist/store/apply-batch.d.ts +12 -0
- package/dist/store/apply-batch.d.ts.map +1 -0
- package/dist/store/apply-batch.js.map +1 -0
- package/dist/store/archive.d.ts +32 -0
- package/dist/store/archive.d.ts.map +1 -0
- package/dist/store/archive.js +130 -0
- package/dist/store/archive.js.map +1 -0
- package/dist/store/backend.d.ts +10 -0
- package/dist/store/backend.d.ts.map +1 -0
- package/dist/store/backend.js.map +1 -0
- package/dist/store/catalog.d.ts +24 -0
- package/dist/store/catalog.d.ts.map +1 -0
- package/dist/store/catalog.js.map +1 -0
- package/dist/store/claims.d.ts.map +1 -0
- package/dist/store/claims.js.map +1 -0
- package/dist/store/columns.d.ts.map +1 -0
- package/dist/store/columns.js.map +1 -0
- package/dist/store/engine.d.ts +176 -0
- package/dist/store/engine.d.ts.map +1 -0
- package/dist/store/engine.js +283 -0
- package/dist/store/engine.js.map +1 -0
- package/dist/store/evaluate.d.ts +17 -0
- package/dist/store/evaluate.d.ts.map +1 -0
- package/dist/store/evaluate.js.map +1 -0
- package/dist/store/export.d.ts +17 -0
- package/dist/store/export.d.ts.map +1 -0
- package/dist/store/export.js +200 -0
- package/dist/store/export.js.map +1 -0
- package/dist/store/expression.d.ts +150 -0
- package/dist/store/expression.d.ts.map +1 -0
- package/dist/store/expression.js.map +1 -0
- package/dist/store/import.d.ts +10 -0
- package/dist/store/import.d.ts.map +1 -0
- package/dist/store/import.js +276 -0
- package/dist/store/import.js.map +1 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js.map +1 -0
- package/dist/store/json-column.d.ts +33 -0
- package/dist/store/json-column.d.ts.map +1 -0
- package/dist/store/json-column.js +62 -0
- package/dist/store/json-column.js.map +1 -0
- package/dist/store/jsonl.d.ts.map +1 -0
- package/dist/store/jsonl.js.map +1 -0
- package/dist/store/live-query.d.ts +108 -0
- package/dist/store/live-query.d.ts.map +1 -0
- package/dist/store/live-query.js +254 -0
- package/dist/store/live-query.js.map +1 -0
- package/dist/store/outbox.d.ts +26 -0
- package/dist/store/outbox.d.ts.map +1 -0
- package/dist/store/outbox.js.map +1 -0
- package/dist/store/query.d.ts +39 -0
- package/dist/store/query.d.ts.map +1 -0
- package/dist/store/query.js.map +1 -0
- package/dist/store/refusal.d.ts.map +1 -0
- package/dist/store/refusal.js.map +1 -0
- package/dist/store/rows.d.ts +80 -0
- package/dist/store/rows.d.ts.map +1 -0
- package/dist/store/rows.js.map +1 -0
- package/dist/store/schema.d.ts +25 -0
- package/dist/store/schema.d.ts.map +1 -0
- package/dist/store/schema.js +115 -0
- package/dist/store/schema.js.map +1 -0
- package/dist/store/sql.d.ts +73 -0
- package/dist/store/sql.d.ts.map +1 -0
- package/dist/store/sql.js.map +1 -0
- package/dist/store/step.d.ts +50 -0
- package/dist/store/step.d.ts.map +1 -0
- package/dist/store/step.js +52 -0
- package/dist/store/step.js.map +1 -0
- package/dist/store/store.d.ts +171 -0
- package/dist/store/store.d.ts.map +1 -0
- package/dist/store/store.js +818 -0
- package/dist/store/store.js.map +1 -0
- package/dist/store/table-changes.d.ts +29 -0
- package/dist/store/table-changes.d.ts.map +1 -0
- package/dist/store/table-changes.js.map +1 -0
- package/dist/store/table-evolve.d.ts.map +1 -0
- package/dist/store/table-evolve.js.map +1 -0
- package/dist/store/table-handle.d.ts +73 -0
- package/dist/store/table-handle.d.ts.map +1 -0
- package/dist/store/table-handle.js +101 -0
- package/dist/store/table-handle.js.map +1 -0
- package/dist/store/table-history.d.ts.map +1 -0
- package/dist/store/table-history.js.map +1 -0
- package/dist/store/table-migration.d.ts +16 -0
- package/dist/store/table-migration.d.ts.map +1 -0
- package/dist/store/table-migration.js +202 -0
- package/dist/store/table-migration.js.map +1 -0
- package/dist/store/table-writes.d.ts.map +1 -0
- package/dist/store/table-writes.js +170 -0
- package/dist/store/table-writes.js.map +1 -0
- package/dist/store/table.d.ts +80 -0
- package/dist/store/table.d.ts.map +1 -0
- package/dist/store/table.js.map +1 -0
- package/dist/store/text.d.ts.map +1 -0
- package/dist/store/text.js.map +1 -0
- package/dist/store/writes.d.ts.map +1 -0
- package/dist/store/writes.js.map +1 -0
- package/dist/surfaces/active-language.d.ts +20 -0
- package/dist/surfaces/active-language.d.ts.map +1 -0
- package/dist/surfaces/active-language.js +78 -0
- package/dist/surfaces/active-language.js.map +1 -0
- package/dist/surfaces/active-theme.d.ts +16 -0
- package/dist/surfaces/active-theme.d.ts.map +1 -0
- package/dist/surfaces/active-theme.js +47 -0
- package/dist/surfaces/active-theme.js.map +1 -0
- package/dist/surfaces/client.d.ts +96 -0
- package/dist/surfaces/client.d.ts.map +1 -0
- package/dist/surfaces/client.js +264 -0
- package/dist/surfaces/client.js.map +1 -0
- package/dist/surfaces/connection.d.ts +49 -0
- package/dist/surfaces/connection.d.ts.map +1 -0
- package/dist/surfaces/connection.js +142 -0
- package/dist/surfaces/connection.js.map +1 -0
- package/dist/surfaces/format.d.ts +5 -0
- package/dist/surfaces/format.d.ts.map +1 -0
- package/dist/surfaces/format.js +37 -0
- package/dist/surfaces/format.js.map +1 -0
- package/dist/surfaces/index.d.ts +15 -0
- package/dist/surfaces/index.d.ts.map +1 -0
- package/dist/surfaces/index.js +18 -0
- package/dist/surfaces/index.js.map +1 -0
- package/dist/surfaces/language.d.ts +53 -0
- package/dist/surfaces/language.d.ts.map +1 -0
- package/dist/surfaces/language.js +74 -0
- package/dist/surfaces/language.js.map +1 -0
- package/dist/surfaces/loaded.d.ts +42 -0
- package/dist/surfaces/loaded.d.ts.map +1 -0
- package/dist/surfaces/loaded.js +116 -0
- package/dist/surfaces/loaded.js.map +1 -0
- package/dist/surfaces/locale-choice.d.ts +25 -0
- package/dist/surfaces/locale-choice.d.ts.map +1 -0
- package/dist/surfaces/locale-choice.js +14 -0
- package/dist/surfaces/locale-choice.js.map +1 -0
- package/dist/surfaces/messages.d.ts +67 -0
- package/dist/surfaces/messages.d.ts.map +1 -0
- package/dist/surfaces/messages.js +112 -0
- package/dist/surfaces/messages.js.map +1 -0
- package/dist/surfaces/page-state.d.ts +14 -0
- package/dist/surfaces/page-state.d.ts.map +1 -0
- package/dist/surfaces/page-state.js +43 -0
- package/dist/surfaces/page-state.js.map +1 -0
- package/dist/surfaces/preference.d.ts +32 -0
- package/dist/surfaces/preference.d.ts.map +1 -0
- package/dist/surfaces/preference.js +72 -0
- package/dist/surfaces/preference.js.map +1 -0
- package/dist/surfaces/registered.d.ts +33 -0
- package/dist/surfaces/registered.d.ts.map +1 -0
- package/dist/surfaces/registered.js +51 -0
- package/dist/surfaces/registered.js.map +1 -0
- package/dist/surfaces/scripts.d.ts +84 -0
- package/dist/surfaces/scripts.d.ts.map +1 -0
- package/dist/surfaces/scripts.js +28 -0
- package/dist/surfaces/scripts.js.map +1 -0
- package/dist/surfaces/theme-choice.d.ts +31 -0
- package/dist/surfaces/theme-choice.d.ts.map +1 -0
- package/dist/surfaces/theme-choice.js +18 -0
- package/dist/surfaces/theme-choice.js.map +1 -0
- package/dist/surfaces/themes.d.ts +43 -0
- package/dist/surfaces/themes.d.ts.map +1 -0
- package/dist/surfaces/themes.js +110 -0
- package/dist/surfaces/themes.js.map +1 -0
- package/dist/surfaces/translations.d.ts +29 -0
- package/dist/surfaces/translations.d.ts.map +1 -0
- package/dist/surfaces/translations.js +57 -0
- package/dist/surfaces/translations.js.map +1 -0
- package/dist/sync/batch.d.ts +18 -0
- package/dist/sync/batch.d.ts.map +1 -0
- package/dist/sync/batch.js +125 -0
- package/dist/sync/batch.js.map +1 -0
- package/dist/sync/client.d.ts +166 -0
- package/dist/sync/client.d.ts.map +1 -0
- package/dist/sync/client.js +438 -0
- package/dist/sync/client.js.map +1 -0
- package/dist/sync/files.d.ts +46 -0
- package/dist/sync/files.d.ts.map +1 -0
- package/dist/sync/files.js +13 -0
- package/dist/sync/files.js.map +1 -0
- package/dist/sync/filesystem.d.ts +37 -0
- package/dist/sync/filesystem.d.ts.map +1 -0
- package/dist/sync/filesystem.js +185 -0
- package/dist/sync/filesystem.js.map +1 -0
- package/dist/sync/index.d.ts +8 -0
- package/dist/sync/index.d.ts.map +1 -0
- package/dist/sync/index.js +9 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/lines.d.ts +18 -0
- package/dist/sync/lines.d.ts.map +1 -0
- package/dist/sync/lines.js +46 -0
- package/dist/sync/lines.js.map +1 -0
- package/dist/sync/remote.d.ts +130 -0
- package/dist/sync/remote.d.ts.map +1 -0
- package/dist/sync/remote.js +46 -0
- package/dist/sync/remote.js.map +1 -0
- package/dist/sync/state.d.ts +17 -0
- package/dist/sync/state.d.ts.map +1 -0
- package/dist/sync/state.js +40 -0
- package/dist/sync/state.js.map +1 -0
- package/dist/telemetry-ingest/batch.d.ts +70 -0
- package/dist/telemetry-ingest/batch.d.ts.map +1 -0
- package/dist/telemetry-ingest/batch.js +110 -0
- package/dist/telemetry-ingest/batch.js.map +1 -0
- package/dist/telemetry-ingest/facet.d.ts +21 -0
- package/dist/telemetry-ingest/facet.d.ts.map +1 -0
- package/dist/telemetry-ingest/facet.js +96 -0
- package/dist/telemetry-ingest/facet.js.map +1 -0
- package/dist/telemetry-ingest/index.d.ts +5 -0
- package/dist/telemetry-ingest/index.d.ts.map +1 -0
- package/dist/telemetry-ingest/index.js +8 -0
- package/dist/telemetry-ingest/index.js.map +1 -0
- package/dist/telemetry-ingest/recorder.d.ts +50 -0
- package/dist/telemetry-ingest/recorder.d.ts.map +1 -0
- package/dist/telemetry-ingest/recorder.js +298 -0
- package/dist/telemetry-ingest/recorder.js.map +1 -0
- package/dist/telemetry-ingest/sender.d.ts +14 -0
- package/dist/telemetry-ingest/sender.d.ts.map +1 -0
- package/dist/telemetry-ingest/sender.js +64 -0
- package/dist/telemetry-ingest/sender.js.map +1 -0
- package/dist/telemetry-sqlite/index.d.ts +13 -4
- package/dist/telemetry-sqlite/index.d.ts.map +1 -1
- package/dist/telemetry-sqlite/index.js +81 -241
- package/dist/telemetry-sqlite/index.js.map +1 -1
- package/dist/telemetry-sqlite/node.d.ts +13 -0
- package/dist/telemetry-sqlite/node.d.ts.map +1 -0
- package/dist/telemetry-sqlite/node.js +27 -0
- package/dist/telemetry-sqlite/node.js.map +1 -0
- package/dist/telemetry-sqlite/schema.d.ts +9 -0
- package/dist/telemetry-sqlite/schema.d.ts.map +1 -0
- package/dist/telemetry-sqlite/schema.js +61 -0
- package/dist/telemetry-sqlite/schema.js.map +1 -0
- package/dist/telemetry-sqlite/store.d.ts +3 -0
- package/dist/telemetry-sqlite/store.d.ts.map +1 -1
- package/dist/telemetry-sqlite/store.js +24 -13
- package/dist/telemetry-sqlite/store.js.map +1 -1
- package/dist/telemetry.d.ts +937 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +470 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/tui/bridge.d.ts +112 -0
- package/dist/tui/bridge.d.ts.map +1 -0
- package/dist/tui/bridge.js +9 -0
- package/dist/tui/bridge.js.map +1 -0
- package/dist/tui/channel.d.ts +44 -0
- package/dist/tui/channel.d.ts.map +1 -0
- package/dist/tui/channel.js +150 -0
- package/dist/tui/channel.js.map +1 -0
- package/dist/tui/frames.d.ts +5 -0
- package/dist/tui/frames.d.ts.map +1 -0
- package/dist/tui/frames.js +52 -0
- package/dist/tui/frames.js.map +1 -0
- package/dist/tui/index.d.ts +7 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js +8 -0
- package/dist/tui/index.js.map +1 -0
- package/dist/tui/runtime.d.ts +46 -0
- package/dist/tui/runtime.d.ts.map +1 -0
- package/dist/tui/runtime.js +101 -0
- package/dist/tui/runtime.js.map +1 -0
- package/dist/tui/scope.d.ts +46 -0
- package/dist/tui/scope.d.ts.map +1 -0
- package/dist/tui/scope.js +141 -0
- package/dist/tui/scope.js.map +1 -0
- package/dist/tui/terminal.d.ts +15 -0
- package/dist/tui/terminal.d.ts.map +1 -0
- package/dist/tui/terminal.js +37 -0
- package/dist/tui/terminal.js.map +1 -0
- package/dist/tui/theme.d.ts +17 -0
- package/dist/tui/theme.d.ts.map +1 -0
- package/dist/tui/theme.js +38 -0
- package/dist/tui/theme.js.map +1 -0
- package/dist/web/environment.d.ts +4 -0
- package/dist/web/environment.d.ts.map +1 -0
- package/dist/web/environment.js +37 -0
- package/dist/web/environment.js.map +1 -0
- package/dist/web/index.d.ts +5 -0
- package/dist/web/index.d.ts.map +1 -0
- package/dist/web/index.js +7 -0
- package/dist/web/index.js.map +1 -0
- package/dist/web/language.d.ts +7 -0
- package/dist/web/language.d.ts.map +1 -0
- package/dist/web/language.js +21 -0
- package/dist/web/language.js.map +1 -0
- package/dist/web/page.d.ts +29 -0
- package/dist/web/page.d.ts.map +1 -0
- package/dist/web/page.js +92 -0
- package/dist/web/page.js.map +1 -0
- package/dist/web/scripts.d.ts +23 -0
- package/dist/web/scripts.d.ts.map +1 -0
- package/dist/web/scripts.js +50 -0
- package/dist/web/scripts.js.map +1 -0
- package/dist/web/styles.d.ts +17 -0
- package/dist/web/styles.d.ts.map +1 -0
- package/dist/web/styles.js +218 -0
- package/dist/web/styles.js.map +1 -0
- package/dist/web/themes.d.ts +6 -0
- package/dist/web/themes.d.ts.map +1 -0
- package/dist/web/themes.js +31 -0
- package/dist/web/themes.js.map +1 -0
- package/docs/benchmarks.md +1036 -0
- package/docs/decisions.md +3436 -0
- package/docs/dependencies/book.md +1671 -0
- package/docs/dependencies/index.html +2641 -0
- package/docs/design.md +3065 -0
- package/docs/durable-observers/book.md +432 -0
- package/docs/durable-observers/index.html +517 -0
- package/docs/guide-plugins-hosts/book.md +957 -0
- package/docs/guide-plugins-hosts/index.html +952 -0
- package/docs/http-workers/book.md +378 -0
- package/docs/http-workers/index.html +515 -0
- package/docs/i18n/book.md +217 -0
- package/docs/i18n/index.html +344 -0
- package/docs/layer-1.md +311 -0
- package/docs/layer-2.md +216 -0
- package/docs/p3-features/README.md +6 -0
- package/docs/p3-features/book.md +478 -0
- package/docs/plugin-authoring.md +276 -0
- package/docs/plugin-model/book.md +186 -0
- package/docs/plugin-model/index.html +310 -0
- package/docs/plugin-primer/book.md +273 -0
- package/docs/plugin-primer/index.html +430 -0
- package/docs/slice-1.md +236 -0
- package/docs/slice-10.md +288 -0
- package/docs/slice-11.md +114 -0
- package/docs/slice-12.md +132 -0
- package/docs/slice-13.md +121 -0
- package/docs/slice-2.md +174 -0
- package/docs/slice-3a.md +296 -0
- package/docs/slice-3b.md +197 -0
- package/docs/slice-4a.md +418 -0
- package/docs/slice-4b.md +208 -0
- package/docs/slice-6a.md +676 -0
- package/docs/slice-6b.md +332 -0
- package/docs/slice-7b/book.md +608 -0
- package/docs/slice-7b/index.html +842 -0
- package/docs/slice-7b.md +255 -0
- package/docs/slice-7c.md +165 -0
- package/docs/slice-9.md +110 -0
- package/docs/slices.md +241 -0
- package/docs/store/book.md +670 -0
- package/docs/store/index.html +861 -0
- package/docs/store/walkthrough.md +193 -0
- package/docs/theming/book.md +223 -0
- package/docs/theming/index.html +371 -0
- package/docs/tutorial/book.md +2169 -0
- package/docs/tutorial/index.html +2112 -0
- package/docs/tutorial/screens/click-after.png +0 -0
- package/docs/tutorial/screens/click-before.png +0 -0
- package/docs/tutorial/screens/edited.png +0 -0
- package/docs/tutorial/screens/french.png +0 -0
- package/docs/tutorial/screens/harbor.png +0 -0
- package/docs/tutorial/screens/page.png +0 -0
- package/docs/tutorial/screens/traces-ada.png +0 -0
- package/docs/tutorial/screens/traces.png +0 -0
- package/package.json +99 -21
- package/dist/cell.d.ts +0 -122
- package/dist/cell.d.ts.map +0 -1
- package/dist/cell.js +0 -356
- package/dist/cell.js.map +0 -1
- package/dist/cluster.d.ts +0 -27
- package/dist/cluster.d.ts.map +0 -1
- package/dist/cluster.js +0 -230
- package/dist/cluster.js.map +0 -1
- package/dist/connection.d.ts +0 -270
- package/dist/connection.d.ts.map +0 -1
- package/dist/connection.js +0 -1216
- package/dist/connection.js.map +0 -1
- package/dist/contract.d.ts +0 -207
- package/dist/contract.d.ts.map +0 -1
- package/dist/contract.js +0 -241
- package/dist/contract.js.map +0 -1
- package/dist/declare.d.ts +0 -33
- package/dist/declare.d.ts.map +0 -1
- package/dist/declare.js +0 -2
- package/dist/declare.js.map +0 -1
- package/dist/errors.d.ts +0 -28
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -59
- package/dist/errors.js.map +0 -1
- package/dist/host.d.ts +0 -348
- package/dist/host.d.ts.map +0 -1
- package/dist/host.js +0 -1002
- package/dist/host.js.map +0 -1
- package/dist/link.d.ts +0 -107
- package/dist/link.d.ts.map +0 -1
- package/dist/link.js +0 -355
- package/dist/link.js.map +0 -1
- package/dist/loader.d.ts +0 -4
- package/dist/loader.d.ts.map +0 -1
- package/dist/loader.js +0 -73
- package/dist/loader.js.map +0 -1
- package/dist/manager.d.ts +0 -115
- package/dist/manager.d.ts.map +0 -1
- package/dist/manager.js +0 -345
- package/dist/manager.js.map +0 -1
- package/dist/next/contracts/accepts.d.ts +0 -81
- package/dist/next/contracts/accepts.d.ts.map +0 -1
- package/dist/next/contracts/accepts.js.map +0 -1
- package/dist/next/contracts/contract.d.ts +0 -121
- package/dist/next/contracts/contract.d.ts.map +0 -1
- package/dist/next/contracts/contract.js.map +0 -1
- package/dist/next/contracts/declare.d.ts.map +0 -1
- package/dist/next/contracts/declare.js.map +0 -1
- package/dist/next/contracts/evolve.d.ts.map +0 -1
- package/dist/next/contracts/evolve.js.map +0 -1
- package/dist/next/contracts/fingerprint.d.ts +0 -16
- package/dist/next/contracts/fingerprint.d.ts.map +0 -1
- package/dist/next/contracts/fingerprint.js.map +0 -1
- package/dist/next/contracts/history.d.ts.map +0 -1
- package/dist/next/contracts/history.js.map +0 -1
- package/dist/next/contracts/host-kind.d.ts.map +0 -1
- package/dist/next/contracts/host-kind.js.map +0 -1
- package/dist/next/contracts/index.d.ts.map +0 -1
- package/dist/next/contracts/index.js.map +0 -1
- package/dist/next/contracts/internal.d.ts.map +0 -1
- package/dist/next/contracts/internal.js.map +0 -1
- package/dist/next/contracts/names.d.ts.map +0 -1
- package/dist/next/contracts/names.js.map +0 -1
- package/dist/next/contracts/params.d.ts +0 -28
- package/dist/next/contracts/params.d.ts.map +0 -1
- package/dist/next/contracts/params.js.map +0 -1
- package/dist/next/contracts/schema.d.ts.map +0 -1
- package/dist/next/contracts/schema.js.map +0 -1
- package/dist/next/contracts/snapshot.d.ts +0 -16
- package/dist/next/contracts/snapshot.d.ts.map +0 -1
- package/dist/next/contracts/snapshot.js +0 -167
- package/dist/next/contracts/snapshot.js.map +0 -1
- package/dist/next/data/args.d.ts +0 -50
- package/dist/next/data/args.d.ts.map +0 -1
- package/dist/next/data/args.js.map +0 -1
- package/dist/next/data/errors.d.ts +0 -73
- package/dist/next/data/errors.d.ts.map +0 -1
- package/dist/next/data/errors.js +0 -107
- package/dist/next/data/errors.js.map +0 -1
- package/dist/next/data/failure.d.ts.map +0 -1
- package/dist/next/data/failure.js +0 -72
- package/dist/next/data/failure.js.map +0 -1
- package/dist/next/data/index.d.ts +0 -4
- package/dist/next/data/index.d.ts.map +0 -1
- package/dist/next/data/index.js +0 -4
- package/dist/next/data/index.js.map +0 -1
- package/dist/next/data/internal.d.ts +0 -7
- package/dist/next/data/internal.d.ts.map +0 -1
- package/dist/next/data/internal.js +0 -8
- package/dist/next/data/internal.js.map +0 -1
- package/dist/next/data/params.d.ts +0 -20
- package/dist/next/data/params.d.ts.map +0 -1
- package/dist/next/data/params.js.map +0 -1
- package/dist/next/data/principal.d.ts +0 -17
- package/dist/next/data/principal.d.ts.map +0 -1
- package/dist/next/data/principal.js +0 -41
- package/dist/next/data/principal.js.map +0 -1
- package/dist/next/data/validator.d.ts +0 -12
- package/dist/next/data/validator.d.ts.map +0 -1
- package/dist/next/data/validator.js +0 -34
- package/dist/next/data/validator.js.map +0 -1
- package/dist/next/documents/address-source.d.ts +0 -20
- package/dist/next/documents/address-source.d.ts.map +0 -1
- package/dist/next/documents/address-source.js.map +0 -1
- package/dist/next/documents/definition.d.ts +0 -84
- package/dist/next/documents/definition.d.ts.map +0 -1
- package/dist/next/documents/definition.js +0 -73
- package/dist/next/documents/definition.js.map +0 -1
- package/dist/next/documents/documents.d.ts +0 -106
- package/dist/next/documents/documents.d.ts.map +0 -1
- package/dist/next/documents/documents.js +0 -224
- package/dist/next/documents/documents.js.map +0 -1
- package/dist/next/documents/fence.d.ts.map +0 -1
- package/dist/next/documents/fence.js.map +0 -1
- package/dist/next/documents/handles.d.ts +0 -76
- package/dist/next/documents/handles.d.ts.map +0 -1
- package/dist/next/documents/handles.js.map +0 -1
- package/dist/next/documents/index.d.ts.map +0 -1
- package/dist/next/documents/index.js.map +0 -1
- package/dist/next/documents/internal.d.ts +0 -9
- package/dist/next/documents/internal.d.ts.map +0 -1
- package/dist/next/documents/internal.js.map +0 -1
- package/dist/next/documents/keyed-slot.d.ts +0 -103
- package/dist/next/documents/keyed-slot.d.ts.map +0 -1
- package/dist/next/documents/keyed-slot.js +0 -395
- package/dist/next/documents/keyed-slot.js.map +0 -1
- package/dist/next/documents/line.d.ts.map +0 -1
- package/dist/next/documents/line.js.map +0 -1
- package/dist/next/documents/persistence.d.ts +0 -104
- package/dist/next/documents/persistence.d.ts.map +0 -1
- package/dist/next/documents/persistence.js +0 -128
- package/dist/next/documents/persistence.js.map +0 -1
- package/dist/next/documents/residency.d.ts +0 -31
- package/dist/next/documents/residency.d.ts.map +0 -1
- package/dist/next/documents/residency.js.map +0 -1
- package/dist/next/documents/slot.d.ts +0 -109
- package/dist/next/documents/slot.d.ts.map +0 -1
- package/dist/next/documents/slot.js +0 -181
- package/dist/next/documents/slot.js.map +0 -1
- package/dist/next/documents/transaction.d.ts +0 -133
- package/dist/next/documents/transaction.d.ts.map +0 -1
- package/dist/next/documents/transaction.js +0 -409
- package/dist/next/documents/transaction.js.map +0 -1
- package/dist/next/host/activity.d.ts +0 -31
- package/dist/next/host/activity.d.ts.map +0 -1
- package/dist/next/host/activity.js +0 -40
- package/dist/next/host/activity.js.map +0 -1
- package/dist/next/host/adapted.d.ts +0 -49
- package/dist/next/host/adapted.d.ts.map +0 -1
- package/dist/next/host/adapted.js.map +0 -1
- package/dist/next/host/attempt.d.ts +0 -278
- package/dist/next/host/attempt.d.ts.map +0 -1
- package/dist/next/host/attempt.js +0 -1072
- package/dist/next/host/attempt.js.map +0 -1
- package/dist/next/host/backoff.d.ts.map +0 -1
- package/dist/next/host/backoff.js.map +0 -1
- package/dist/next/host/ctx.d.ts +0 -47
- package/dist/next/host/ctx.d.ts.map +0 -1
- package/dist/next/host/ctx.js +0 -108
- package/dist/next/host/ctx.js.map +0 -1
- package/dist/next/host/deadline.d.ts.map +0 -1
- package/dist/next/host/deadline.js.map +0 -1
- package/dist/next/host/dependencies.d.ts.map +0 -1
- package/dist/next/host/dependencies.js.map +0 -1
- package/dist/next/host/destination.d.ts +0 -48
- package/dist/next/host/destination.d.ts.map +0 -1
- package/dist/next/host/destination.js.map +0 -1
- package/dist/next/host/facet.d.ts +0 -79
- package/dist/next/host/facet.d.ts.map +0 -1
- package/dist/next/host/facet.js.map +0 -1
- package/dist/next/host/follow.d.ts +0 -52
- package/dist/next/host/follow.d.ts.map +0 -1
- package/dist/next/host/follow.js.map +0 -1
- package/dist/next/host/host.d.ts +0 -495
- package/dist/next/host/host.d.ts.map +0 -1
- package/dist/next/host/host.js +0 -1075
- package/dist/next/host/host.js.map +0 -1
- package/dist/next/host/index.d.ts +0 -17
- package/dist/next/host/index.d.ts.map +0 -1
- package/dist/next/host/index.js.map +0 -1
- package/dist/next/host/internal.d.ts +0 -10
- package/dist/next/host/internal.d.ts.map +0 -1
- package/dist/next/host/internal.js +0 -8
- package/dist/next/host/internal.js.map +0 -1
- package/dist/next/host/members.d.ts +0 -50
- package/dist/next/host/members.d.ts.map +0 -1
- package/dist/next/host/members.js.map +0 -1
- package/dist/next/host/native.d.ts +0 -55
- package/dist/next/host/native.d.ts.map +0 -1
- package/dist/next/host/native.js +0 -92
- package/dist/next/host/native.js.map +0 -1
- package/dist/next/host/object.d.ts +0 -290
- package/dist/next/host/object.d.ts.map +0 -1
- package/dist/next/host/object.js +0 -1127
- package/dist/next/host/object.js.map +0 -1
- package/dist/next/host/parked.d.ts +0 -23
- package/dist/next/host/parked.d.ts.map +0 -1
- package/dist/next/host/parked.js.map +0 -1
- package/dist/next/host/presence.d.ts +0 -34
- package/dist/next/host/presence.d.ts.map +0 -1
- package/dist/next/host/presence.js.map +0 -1
- package/dist/next/host/ref-state.d.ts +0 -53
- package/dist/next/host/ref-state.d.ts.map +0 -1
- package/dist/next/host/ref-state.js +0 -83
- package/dist/next/host/ref-state.js.map +0 -1
- package/dist/next/host/reference-keys.d.ts +0 -36
- package/dist/next/host/reference-keys.d.ts.map +0 -1
- package/dist/next/host/reference-keys.js +0 -168
- package/dist/next/host/reference-keys.js.map +0 -1
- package/dist/next/host/reference-source.d.ts +0 -65
- package/dist/next/host/reference-source.d.ts.map +0 -1
- package/dist/next/host/reference-source.js +0 -285
- package/dist/next/host/reference-source.js.map +0 -1
- package/dist/next/host/reference.d.ts +0 -308
- package/dist/next/host/reference.d.ts.map +0 -1
- package/dist/next/host/reference.js +0 -775
- package/dist/next/host/reference.js.map +0 -1
- package/dist/next/host/retry-on.d.ts.map +0 -1
- package/dist/next/host/retry-on.js.map +0 -1
- package/dist/next/host/revocation.d.ts +0 -16
- package/dist/next/host/revocation.d.ts.map +0 -1
- package/dist/next/host/revocation.js.map +0 -1
- package/dist/next/host/root.d.ts +0 -27
- package/dist/next/host/root.d.ts.map +0 -1
- package/dist/next/host/root.js +0 -68
- package/dist/next/host/root.js.map +0 -1
- package/dist/next/host/route.d.ts +0 -64
- package/dist/next/host/route.d.ts.map +0 -1
- package/dist/next/host/route.js +0 -190
- package/dist/next/host/route.js.map +0 -1
- package/dist/next/host/routines.d.ts +0 -76
- package/dist/next/host/routines.d.ts.map +0 -1
- package/dist/next/host/routines.js +0 -350
- package/dist/next/host/routines.js.map +0 -1
- package/dist/next/host/sleep.d.ts +0 -9
- package/dist/next/host/sleep.d.ts.map +0 -1
- package/dist/next/host/sleep.js.map +0 -1
- package/dist/next/host/staging.d.ts +0 -94
- package/dist/next/host/staging.d.ts.map +0 -1
- package/dist/next/host/staging.js +0 -302
- package/dist/next/host/staging.js.map +0 -1
- package/dist/next/host/unbound.d.ts +0 -30
- package/dist/next/host/unbound.d.ts.map +0 -1
- package/dist/next/host/unbound.js +0 -67
- package/dist/next/host/unbound.js.map +0 -1
- package/dist/next/host/uuid.d.ts.map +0 -1
- package/dist/next/host/uuid.js.map +0 -1
- package/dist/next/index.d.ts +0 -28
- package/dist/next/index.d.ts.map +0 -1
- package/dist/next/index.js +0 -18
- package/dist/next/index.js.map +0 -1
- package/dist/next/jobs/definition.d.ts.map +0 -1
- package/dist/next/jobs/definition.js.map +0 -1
- package/dist/next/jobs/index.d.ts.map +0 -1
- package/dist/next/jobs/index.js.map +0 -1
- package/dist/next/jobs/internal.d.ts.map +0 -1
- package/dist/next/jobs/internal.js.map +0 -1
- package/dist/next/jobs/job.d.ts +0 -152
- package/dist/next/jobs/job.d.ts.map +0 -1
- package/dist/next/jobs/job.js +0 -320
- package/dist/next/jobs/job.js.map +0 -1
- package/dist/next/jobs/persisted.d.ts +0 -38
- package/dist/next/jobs/persisted.d.ts.map +0 -1
- package/dist/next/jobs/persisted.js.map +0 -1
- package/dist/next/jobs/records.d.ts +0 -231
- package/dist/next/jobs/records.d.ts.map +0 -1
- package/dist/next/jobs/records.js +0 -869
- package/dist/next/jobs/records.js.map +0 -1
- package/dist/next/jobs/run-states.d.ts +0 -69
- package/dist/next/jobs/run-states.d.ts.map +0 -1
- package/dist/next/jobs/run-states.js +0 -228
- package/dist/next/jobs/run-states.js.map +0 -1
- package/dist/next/jobs/run.d.ts +0 -113
- package/dist/next/jobs/run.d.ts.map +0 -1
- package/dist/next/jobs/run.js +0 -200
- package/dist/next/jobs/run.js.map +0 -1
- package/dist/next/jobs/running.d.ts +0 -44
- package/dist/next/jobs/running.d.ts.map +0 -1
- package/dist/next/jobs/running.js.map +0 -1
- package/dist/next/jobs/stored.d.ts +0 -63
- package/dist/next/jobs/stored.d.ts.map +0 -1
- package/dist/next/jobs/stored.js.map +0 -1
- package/dist/next/link/binary.d.ts.map +0 -1
- package/dist/next/link/binary.js +0 -534
- package/dist/next/link/binary.js.map +0 -1
- package/dist/next/link/channel.d.ts +0 -63
- package/dist/next/link/channel.d.ts.map +0 -1
- package/dist/next/link/channel.js +0 -202
- package/dist/next/link/channel.js.map +0 -1
- package/dist/next/link/errors.d.ts.map +0 -1
- package/dist/next/link/errors.js.map +0 -1
- package/dist/next/link/index.d.ts.map +0 -1
- package/dist/next/link/index.js.map +0 -1
- package/dist/next/link/internal.d.ts.map +0 -1
- package/dist/next/link/internal.js.map +0 -1
- package/dist/next/link/ipc.d.ts.map +0 -1
- package/dist/next/link/ipc.js.map +0 -1
- package/dist/next/link/link.d.ts.map +0 -1
- package/dist/next/link/link.js.map +0 -1
- package/dist/next/link/message.d.ts +0 -249
- package/dist/next/link/message.d.ts.map +0 -1
- package/dist/next/link/message.js +0 -123
- package/dist/next/link/message.js.map +0 -1
- package/dist/next/link/part.d.ts +0 -80
- package/dist/next/link/part.d.ts.map +0 -1
- package/dist/next/link/part.js +0 -164
- package/dist/next/link/part.js.map +0 -1
- package/dist/next/link/text.d.ts.map +0 -1
- package/dist/next/link/text.js +0 -335
- package/dist/next/link/text.js.map +0 -1
- package/dist/next/link/values.d.ts.map +0 -1
- package/dist/next/link/values.js +0 -117
- package/dist/next/link/values.js.map +0 -1
- package/dist/next/link/websocket.d.ts.map +0 -1
- package/dist/next/link/websocket.js.map +0 -1
- package/dist/next/registries/contribution.d.ts.map +0 -1
- package/dist/next/registries/contribution.js.map +0 -1
- package/dist/next/registries/entries.d.ts.map +0 -1
- package/dist/next/registries/entries.js.map +0 -1
- package/dist/next/registries/index.d.ts.map +0 -1
- package/dist/next/registries/index.js.map +0 -1
- package/dist/next/registries/internal.d.ts.map +0 -1
- package/dist/next/registries/internal.js.map +0 -1
- package/dist/next/registries/record.d.ts +0 -94
- package/dist/next/registries/record.d.ts.map +0 -1
- package/dist/next/registries/record.js +0 -253
- package/dist/next/registries/record.js.map +0 -1
- package/dist/next/registries/registry.d.ts +0 -74
- package/dist/next/registries/registry.d.ts.map +0 -1
- package/dist/next/registries/registry.js.map +0 -1
- package/dist/next/registries/value.d.ts.map +0 -1
- package/dist/next/registries/value.js +0 -199
- package/dist/next/registries/value.js.map +0 -1
- package/dist/next/remote/calls.d.ts.map +0 -1
- package/dist/next/remote/calls.js.map +0 -1
- package/dist/next/remote/consumer.d.ts +0 -42
- package/dist/next/remote/consumer.d.ts.map +0 -1
- package/dist/next/remote/consumer.js +0 -343
- package/dist/next/remote/consumer.js.map +0 -1
- package/dist/next/remote/hold.d.ts +0 -130
- package/dist/next/remote/hold.d.ts.map +0 -1
- package/dist/next/remote/hold.js +0 -537
- package/dist/next/remote/hold.js.map +0 -1
- package/dist/next/remote/host-link.d.ts +0 -77
- package/dist/next/remote/host-link.d.ts.map +0 -1
- package/dist/next/remote/host-link.js +0 -182
- package/dist/next/remote/host-link.js.map +0 -1
- package/dist/next/remote/internal.d.ts.map +0 -1
- package/dist/next/remote/internal.js.map +0 -1
- package/dist/next/remote/path.d.ts.map +0 -1
- package/dist/next/remote/path.js.map +0 -1
- package/dist/next/remote/provider.d.ts +0 -76
- package/dist/next/remote/provider.d.ts.map +0 -1
- package/dist/next/remote/provider.js +0 -506
- package/dist/next/remote/provider.js.map +0 -1
- package/dist/next/remote/relay.d.ts +0 -58
- package/dist/next/remote/relay.d.ts.map +0 -1
- package/dist/next/remote/relay.js +0 -117
- package/dist/next/remote/relay.js.map +0 -1
- package/dist/next/remote/remote-object.d.ts +0 -133
- package/dist/next/remote/remote-object.d.ts.map +0 -1
- package/dist/next/remote/remote-object.js +0 -411
- package/dist/next/remote/remote-object.js.map +0 -1
- package/dist/next/remote/replica.d.ts +0 -59
- package/dist/next/remote/replica.d.ts.map +0 -1
- package/dist/next/remote/replica.js +0 -125
- package/dist/next/remote/replica.js.map +0 -1
- package/dist/next/state/batch.d.ts +0 -64
- package/dist/next/state/batch.d.ts.map +0 -1
- package/dist/next/state/batch.js +0 -163
- package/dist/next/state/batch.js.map +0 -1
- package/dist/next/state/derive.d.ts +0 -52
- package/dist/next/state/derive.d.ts.map +0 -1
- package/dist/next/state/derive.js +0 -182
- package/dist/next/state/derive.js.map +0 -1
- package/dist/next/state/index.d.ts +0 -6
- package/dist/next/state/index.d.ts.map +0 -1
- package/dist/next/state/index.js.map +0 -1
- package/dist/next/state/internal.d.ts.map +0 -1
- package/dist/next/state/internal.js.map +0 -1
- package/dist/next/state/native-source.d.ts +0 -106
- package/dist/next/state/native-source.d.ts.map +0 -1
- package/dist/next/state/native-source.js +0 -240
- package/dist/next/state/native-source.js.map +0 -1
- package/dist/next/state/watchable.d.ts +0 -114
- package/dist/next/state/watchable.d.ts.map +0 -1
- package/dist/next/state/watchable.js +0 -156
- package/dist/next/state/watchable.js.map +0 -1
- package/dist/next/state/writable.d.ts +0 -32
- package/dist/next/state/writable.d.ts.map +0 -1
- package/dist/next/state/writable.js.map +0 -1
- package/dist/next/store/adapter.d.ts +0 -67
- package/dist/next/store/adapter.d.ts.map +0 -1
- package/dist/next/store/adapter.js.map +0 -1
- package/dist/next/store/allocator.d.ts.map +0 -1
- package/dist/next/store/allocator.js.map +0 -1
- package/dist/next/store/applier.d.ts.map +0 -1
- package/dist/next/store/applier.js.map +0 -1
- package/dist/next/store/apply-batch.d.ts +0 -12
- package/dist/next/store/apply-batch.d.ts.map +0 -1
- package/dist/next/store/apply-batch.js.map +0 -1
- package/dist/next/store/archive.d.ts +0 -32
- package/dist/next/store/archive.d.ts.map +0 -1
- package/dist/next/store/archive.js +0 -129
- package/dist/next/store/archive.js.map +0 -1
- package/dist/next/store/backend.d.ts +0 -10
- package/dist/next/store/backend.d.ts.map +0 -1
- package/dist/next/store/backend.js.map +0 -1
- package/dist/next/store/catalog.d.ts +0 -24
- package/dist/next/store/catalog.d.ts.map +0 -1
- package/dist/next/store/catalog.js.map +0 -1
- package/dist/next/store/claims.d.ts.map +0 -1
- package/dist/next/store/claims.js.map +0 -1
- package/dist/next/store/columns.d.ts.map +0 -1
- package/dist/next/store/columns.js.map +0 -1
- package/dist/next/store/engine.d.ts +0 -176
- package/dist/next/store/engine.d.ts.map +0 -1
- package/dist/next/store/engine.js +0 -283
- package/dist/next/store/engine.js.map +0 -1
- package/dist/next/store/evaluate.d.ts +0 -17
- package/dist/next/store/evaluate.d.ts.map +0 -1
- package/dist/next/store/evaluate.js.map +0 -1
- package/dist/next/store/export.d.ts +0 -17
- package/dist/next/store/export.d.ts.map +0 -1
- package/dist/next/store/export.js +0 -200
- package/dist/next/store/export.js.map +0 -1
- package/dist/next/store/expression.d.ts +0 -150
- package/dist/next/store/expression.d.ts.map +0 -1
- package/dist/next/store/expression.js.map +0 -1
- package/dist/next/store/import.d.ts +0 -10
- package/dist/next/store/import.d.ts.map +0 -1
- package/dist/next/store/import.js +0 -276
- package/dist/next/store/import.js.map +0 -1
- package/dist/next/store/index.d.ts.map +0 -1
- package/dist/next/store/index.js.map +0 -1
- package/dist/next/store/json-column.d.ts +0 -33
- package/dist/next/store/json-column.d.ts.map +0 -1
- package/dist/next/store/json-column.js +0 -61
- package/dist/next/store/json-column.js.map +0 -1
- package/dist/next/store/jsonl.d.ts.map +0 -1
- package/dist/next/store/jsonl.js.map +0 -1
- package/dist/next/store/outbox.d.ts +0 -26
- package/dist/next/store/outbox.d.ts.map +0 -1
- package/dist/next/store/outbox.js.map +0 -1
- package/dist/next/store/query.d.ts +0 -39
- package/dist/next/store/query.d.ts.map +0 -1
- package/dist/next/store/query.js.map +0 -1
- package/dist/next/store/refusal.d.ts.map +0 -1
- package/dist/next/store/refusal.js.map +0 -1
- package/dist/next/store/rows.d.ts +0 -80
- package/dist/next/store/rows.d.ts.map +0 -1
- package/dist/next/store/rows.js.map +0 -1
- package/dist/next/store/schema.d.ts +0 -25
- package/dist/next/store/schema.d.ts.map +0 -1
- package/dist/next/store/schema.js +0 -115
- package/dist/next/store/schema.js.map +0 -1
- package/dist/next/store/sql.d.ts +0 -73
- package/dist/next/store/sql.d.ts.map +0 -1
- package/dist/next/store/sql.js.map +0 -1
- package/dist/next/store/step.d.ts +0 -48
- package/dist/next/store/step.d.ts.map +0 -1
- package/dist/next/store/step.js +0 -50
- package/dist/next/store/step.js.map +0 -1
- package/dist/next/store/store.d.ts +0 -161
- package/dist/next/store/store.d.ts.map +0 -1
- package/dist/next/store/store.js +0 -627
- package/dist/next/store/store.js.map +0 -1
- package/dist/next/store/table-changes.d.ts +0 -29
- package/dist/next/store/table-changes.d.ts.map +0 -1
- package/dist/next/store/table-changes.js.map +0 -1
- package/dist/next/store/table-evolve.d.ts.map +0 -1
- package/dist/next/store/table-evolve.js.map +0 -1
- package/dist/next/store/table-handle.d.ts +0 -67
- package/dist/next/store/table-handle.d.ts.map +0 -1
- package/dist/next/store/table-handle.js +0 -101
- package/dist/next/store/table-handle.js.map +0 -1
- package/dist/next/store/table-history.d.ts.map +0 -1
- package/dist/next/store/table-history.js.map +0 -1
- package/dist/next/store/table-migration.d.ts +0 -16
- package/dist/next/store/table-migration.d.ts.map +0 -1
- package/dist/next/store/table-migration.js +0 -202
- package/dist/next/store/table-migration.js.map +0 -1
- package/dist/next/store/table-writes.d.ts.map +0 -1
- package/dist/next/store/table-writes.js +0 -165
- package/dist/next/store/table-writes.js.map +0 -1
- package/dist/next/store/table.d.ts +0 -80
- package/dist/next/store/table.d.ts.map +0 -1
- package/dist/next/store/table.js.map +0 -1
- package/dist/next/store/text.d.ts.map +0 -1
- package/dist/next/store/text.js.map +0 -1
- package/dist/next/store/writes.d.ts.map +0 -1
- package/dist/next/store/writes.js.map +0 -1
- package/dist/next-node/compression.d.ts +0 -7
- package/dist/next-node/compression.d.ts.map +0 -1
- package/dist/next-node/compression.js +0 -24
- package/dist/next-node/compression.js.map +0 -1
- package/dist/next-node/http/admission.d.ts.map +0 -1
- package/dist/next-node/http/admission.js.map +0 -1
- package/dist/next-node/http/authenticate.d.ts +0 -21
- package/dist/next-node/http/authenticate.d.ts.map +0 -1
- package/dist/next-node/http/authenticate.js +0 -34
- package/dist/next-node/http/authenticate.js.map +0 -1
- package/dist/next-node/http/cookies.d.ts +0 -24
- package/dist/next-node/http/cookies.d.ts.map +0 -1
- package/dist/next-node/http/cookies.js +0 -62
- package/dist/next-node/http/cookies.js.map +0 -1
- package/dist/next-node/http/file.d.ts.map +0 -1
- package/dist/next-node/http/file.js.map +0 -1
- package/dist/next-node/http/headers.d.ts.map +0 -1
- package/dist/next-node/http/headers.js +0 -129
- package/dist/next-node/http/headers.js.map +0 -1
- package/dist/next-node/http/http.d.ts +0 -100
- package/dist/next-node/http/http.d.ts.map +0 -1
- package/dist/next-node/http/http.js +0 -462
- package/dist/next-node/http/http.js.map +0 -1
- package/dist/next-node/http/incoming.d.ts.map +0 -1
- package/dist/next-node/http/incoming.js.map +0 -1
- package/dist/next-node/http/index.d.ts +0 -11
- package/dist/next-node/http/index.d.ts.map +0 -1
- package/dist/next-node/http/index.js +0 -12
- package/dist/next-node/http/index.js.map +0 -1
- package/dist/next-node/http/node.d.ts.map +0 -1
- package/dist/next-node/http/node.js.map +0 -1
- package/dist/next-node/http/request.d.ts +0 -54
- package/dist/next-node/http/request.d.ts.map +0 -1
- package/dist/next-node/http/request.js +0 -116
- package/dist/next-node/http/request.js.map +0 -1
- package/dist/next-node/http/response.d.ts +0 -63
- package/dist/next-node/http/response.d.ts.map +0 -1
- package/dist/next-node/http/response.js.map +0 -1
- package/dist/next-node/http/router.d.ts +0 -114
- package/dist/next-node/http/router.d.ts.map +0 -1
- package/dist/next-node/http/router.js +0 -261
- package/dist/next-node/http/router.js.map +0 -1
- package/dist/next-node/http/upgrades.d.ts +0 -58
- package/dist/next-node/http/upgrades.d.ts.map +0 -1
- package/dist/next-node/http/upgrades.js +0 -184
- package/dist/next-node/http/upgrades.js.map +0 -1
- package/dist/next-node/plugins/build.d.ts +0 -57
- package/dist/next-node/plugins/build.d.ts.map +0 -1
- package/dist/next-node/plugins/build.js +0 -334
- package/dist/next-node/plugins/build.js.map +0 -1
- package/dist/next-node/plugins/discover.d.ts +0 -36
- package/dist/next-node/plugins/discover.d.ts.map +0 -1
- package/dist/next-node/plugins/discover.js +0 -91
- package/dist/next-node/plugins/discover.js.map +0 -1
- package/dist/next-node/plugins/evaluate.d.ts +0 -33
- package/dist/next-node/plugins/evaluate.d.ts.map +0 -1
- package/dist/next-node/plugins/evaluate.js +0 -98
- package/dist/next-node/plugins/evaluate.js.map +0 -1
- package/dist/next-node/plugins/index.d.ts +0 -9
- package/dist/next-node/plugins/index.d.ts.map +0 -1
- package/dist/next-node/plugins/index.js +0 -11
- package/dist/next-node/plugins/index.js.map +0 -1
- package/dist/next-node/plugins/install.d.ts +0 -13
- package/dist/next-node/plugins/install.d.ts.map +0 -1
- package/dist/next-node/plugins/install.js +0 -37
- package/dist/next-node/plugins/install.js.map +0 -1
- package/dist/next-node/plugins/plugins.d.ts +0 -135
- package/dist/next-node/plugins/plugins.d.ts.map +0 -1
- package/dist/next-node/plugins/plugins.js +0 -206
- package/dist/next-node/plugins/plugins.js.map +0 -1
- package/dist/next-node/plugins/runtime.d.ts +0 -41
- package/dist/next-node/plugins/runtime.d.ts.map +0 -1
- package/dist/next-node/plugins/runtime.js +0 -136
- package/dist/next-node/plugins/runtime.js.map +0 -1
- package/dist/next-node/plugins/stack.d.ts.map +0 -1
- package/dist/next-node/plugins/stack.js.map +0 -1
- package/dist/next-node/plugins/watcher.d.ts +0 -58
- package/dist/next-node/plugins/watcher.d.ts.map +0 -1
- package/dist/next-node/plugins/watcher.js +0 -281
- package/dist/next-node/plugins/watcher.js.map +0 -1
- package/dist/next-node/workers/control.d.ts +0 -83
- package/dist/next-node/workers/control.d.ts.map +0 -1
- package/dist/next-node/workers/control.js +0 -77
- package/dist/next-node/workers/control.js.map +0 -1
- package/dist/next-node/workers/index.d.ts +0 -5
- package/dist/next-node/workers/index.d.ts.map +0 -1
- package/dist/next-node/workers/index.js +0 -7
- package/dist/next-node/workers/index.js.map +0 -1
- package/dist/next-node/workers/lock.d.ts +0 -21
- package/dist/next-node/workers/lock.d.ts.map +0 -1
- package/dist/next-node/workers/lock.js +0 -137
- package/dist/next-node/workers/lock.js.map +0 -1
- package/dist/next-node/workers/main.d.ts +0 -46
- package/dist/next-node/workers/main.d.ts.map +0 -1
- package/dist/next-node/workers/main.js +0 -230
- package/dist/next-node/workers/main.js.map +0 -1
- package/dist/next-node/workers/process.d.ts +0 -42
- package/dist/next-node/workers/process.d.ts.map +0 -1
- package/dist/next-node/workers/process.js +0 -125
- package/dist/next-node/workers/process.js.map +0 -1
- package/dist/next-node/workers/workers.d.ts +0 -80
- package/dist/next-node/workers/workers.d.ts.map +0 -1
- package/dist/next-node/workers/workers.js +0 -572
- package/dist/next-node/workers/workers.js.map +0 -1
- package/dist/node.d.ts +0 -4
- package/dist/node.d.ts.map +0 -1
- package/dist/node.js +0 -4
- package/dist/node.js.map +0 -1
- package/dist/object.d.ts +0 -438
- package/dist/object.d.ts.map +0 -1
- package/dist/object.js +0 -1570
- package/dist/object.js.map +0 -1
- package/dist/publish.d.ts +0 -5
- package/dist/publish.d.ts.map +0 -1
- package/dist/publish.js +0 -40
- package/dist/publish.js.map +0 -1
- package/dist/registry.d.ts +0 -25
- package/dist/registry.d.ts.map +0 -1
- package/dist/registry.js +0 -6
- package/dist/registry.js.map +0 -1
- package/dist/reload.d.ts +0 -126
- package/dist/reload.d.ts.map +0 -1
- package/dist/reload.js +0 -653
- package/dist/reload.js.map +0 -1
- package/dist/remote.d.ts +0 -165
- package/dist/remote.d.ts.map +0 -1
- package/dist/remote.js +0 -612
- package/dist/remote.js.map +0 -1
- package/dist/schema.d.ts +0 -25
- package/dist/schema.d.ts.map +0 -1
- package/dist/schema.js +0 -403
- package/dist/schema.js.map +0 -1
- package/dist/state.d.ts +0 -92
- package/dist/state.d.ts.map +0 -1
- package/dist/state.js +0 -287
- package/dist/state.js.map +0 -1
- package/dist/types.d.ts +0 -88
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/websocket.d.ts +0 -15
- package/dist/websocket.d.ts.map +0 -1
- package/dist/websocket.js +0 -16
- package/dist/websocket.js.map +0 -1
- package/dist/wire.d.ts +0 -197
- package/dist/wire.d.ts.map +0 -1
- package/dist/wire.js +0 -166
- package/dist/wire.js.map +0 -1
- package/docs/guide.md +0 -814
- package/docs/next/benchmarks.md +0 -959
- package/docs/next/decisions.md +0 -2957
- package/docs/next/dependencies/book.md +0 -1671
- package/docs/next/dependencies/index.html +0 -2641
- package/docs/next/design.md +0 -2554
- package/docs/next/durable-observers/book.md +0 -432
- package/docs/next/durable-observers/index.html +0 -517
- package/docs/next/guide-plugins-hosts/book.md +0 -607
- package/docs/next/guide-plugins-hosts/index.html +0 -652
- package/docs/next/http-workers/book.md +0 -378
- package/docs/next/http-workers/index.html +0 -515
- package/docs/next/layer-1.md +0 -311
- package/docs/next/layer-2.md +0 -216
- package/docs/next/plugin-model/book.md +0 -186
- package/docs/next/plugin-model/index.html +0 -310
- package/docs/next/plugin-primer/book.md +0 -273
- package/docs/next/plugin-primer/index.html +0 -430
- package/docs/next/slice-1.md +0 -236
- package/docs/next/slice-10.md +0 -285
- package/docs/next/slice-11.md +0 -93
- package/docs/next/slice-2.md +0 -174
- package/docs/next/slice-3a.md +0 -296
- package/docs/next/slice-3b.md +0 -197
- package/docs/next/slice-4a.md +0 -418
- package/docs/next/slice-4b.md +0 -208
- package/docs/next/slice-6a.md +0 -676
- package/docs/next/slice-6b.md +0 -332
- package/docs/next/slice-7b/book.md +0 -608
- package/docs/next/slice-7b/index.html +0 -842
- package/docs/next/slice-7b.md +0 -255
- package/docs/next/slice-7c.md +0 -165
- package/docs/next/slices.md +0 -230
- package/docs/next/store/book.md +0 -665
- package/docs/next/store/index.html +0 -861
- package/docs/next/store/walkthrough.md +0 -193
- package/docs/spec.md +0 -288
- package/docs/tutorial.md +0 -932
- /package/dist/{next/contracts → contracts}/accepts.js +0 -0
- /package/dist/{next/contracts → contracts}/contract.js +0 -0
- /package/dist/{next/contracts → contracts}/declare.d.ts +0 -0
- /package/dist/{next/contracts → contracts}/declare.js +0 -0
- /package/dist/{next/contracts → contracts}/evolve.d.ts +0 -0
- /package/dist/{next/contracts → contracts}/evolve.js +0 -0
- /package/dist/{next/contracts → contracts}/fingerprint.js +0 -0
- /package/dist/{next/contracts → contracts}/history.d.ts +0 -0
- /package/dist/{next/contracts → contracts}/history.js +0 -0
- /package/dist/{next/contracts → contracts}/host-kind.d.ts +0 -0
- /package/dist/{next/contracts → contracts}/host-kind.js +0 -0
- /package/dist/{next/contracts → contracts}/index.d.ts +0 -0
- /package/dist/{next/contracts → contracts}/index.js +0 -0
- /package/dist/{next/contracts → contracts}/internal.d.ts +0 -0
- /package/dist/{next/contracts → contracts}/internal.js +0 -0
- /package/dist/{next/contracts → contracts}/names.d.ts +0 -0
- /package/dist/{next/contracts → contracts}/names.js +0 -0
- /package/dist/{next/contracts → contracts}/params.js +0 -0
- /package/dist/{next/contracts → contracts}/schema.d.ts +0 -0
- /package/dist/{next/contracts → contracts}/schema.js +0 -0
- /package/dist/{next/data → data}/args.js +0 -0
- /package/dist/{next/data → data}/failure.d.ts +0 -0
- /package/dist/{next/data → data}/params.js +0 -0
- /package/dist/{next/documents → documents}/address-source.js +0 -0
- /package/dist/{next/documents → documents}/fence.d.ts +0 -0
- /package/dist/{next/documents → documents}/fence.js +0 -0
- /package/dist/{next/documents → documents}/handles.js +0 -0
- /package/dist/{next/documents → documents}/index.d.ts +0 -0
- /package/dist/{next/documents → documents}/index.js +0 -0
- /package/dist/{next/documents → documents}/internal.js +0 -0
- /package/dist/{next/documents → documents}/line.d.ts +0 -0
- /package/dist/{next/documents → documents}/line.js +0 -0
- /package/dist/{next/documents → documents}/residency.js +0 -0
- /package/dist/{next/host → host}/adapted.js +0 -0
- /package/dist/{next/host → host}/backoff.d.ts +0 -0
- /package/dist/{next/host → host}/backoff.js +0 -0
- /package/dist/{next/host → host}/deadline.d.ts +0 -0
- /package/dist/{next/host → host}/deadline.js +0 -0
- /package/dist/{next/host → host}/dependencies.d.ts +0 -0
- /package/dist/{next/host → host}/dependencies.js +0 -0
- /package/dist/{next/host → host}/destination.js +0 -0
- /package/dist/{next/host → host}/facet.js +0 -0
- /package/dist/{next/host → host}/follow.js +0 -0
- /package/dist/{next/host → host}/index.js +0 -0
- /package/dist/{next/host → host}/members.js +0 -0
- /package/dist/{next/host → host}/parked.js +0 -0
- /package/dist/{next/host → host}/presence.js +0 -0
- /package/dist/{next/host → host}/retry-on.d.ts +0 -0
- /package/dist/{next/host → host}/retry-on.js +0 -0
- /package/dist/{next/host → host}/revocation.js +0 -0
- /package/dist/{next/host → host}/sleep.js +0 -0
- /package/dist/{next/host → host}/uuid.d.ts +0 -0
- /package/dist/{next/host → host}/uuid.js +0 -0
- /package/dist/{next/jobs → jobs}/definition.d.ts +0 -0
- /package/dist/{next/jobs → jobs}/definition.js +0 -0
- /package/dist/{next/jobs → jobs}/index.d.ts +0 -0
- /package/dist/{next/jobs → jobs}/index.js +0 -0
- /package/dist/{next/jobs → jobs}/internal.d.ts +0 -0
- /package/dist/{next/jobs → jobs}/internal.js +0 -0
- /package/dist/{next/jobs → jobs}/persisted.js +0 -0
- /package/dist/{next/jobs → jobs}/running.js +0 -0
- /package/dist/{next/jobs → jobs}/stored.js +0 -0
- /package/dist/{next/link → link}/binary.d.ts +0 -0
- /package/dist/{next/link → link}/errors.d.ts +0 -0
- /package/dist/{next/link → link}/errors.js +0 -0
- /package/dist/{next/link → link}/index.d.ts +0 -0
- /package/dist/{next/link → link}/index.js +0 -0
- /package/dist/{next/link → link}/internal.d.ts +0 -0
- /package/dist/{next/link → link}/internal.js +0 -0
- /package/dist/{next/link → link}/ipc.d.ts +0 -0
- /package/dist/{next/link → link}/ipc.js +0 -0
- /package/dist/{next/link → link}/link.d.ts +0 -0
- /package/dist/{next/link → link}/link.js +0 -0
- /package/dist/{next/link → link}/text.d.ts +0 -0
- /package/dist/{next/link → link}/values.d.ts +0 -0
- /package/dist/{next/link → link}/websocket.d.ts +0 -0
- /package/dist/{next/link → link}/websocket.js +0 -0
- /package/dist/{next-node → node}/http/admission.d.ts +0 -0
- /package/dist/{next-node → node}/http/admission.js +0 -0
- /package/dist/{next-node → node}/http/file.d.ts +0 -0
- /package/dist/{next-node → node}/http/file.js +0 -0
- /package/dist/{next-node → node}/http/headers.d.ts +0 -0
- /package/dist/{next-node → node}/http/incoming.d.ts +0 -0
- /package/dist/{next-node → node}/http/incoming.js +0 -0
- /package/dist/{next-node → node}/http/node.d.ts +0 -0
- /package/dist/{next-node → node}/http/node.js +0 -0
- /package/dist/{next-node → node}/http/response.js +0 -0
- /package/dist/{next-node → node}/plugins/stack.d.ts +0 -0
- /package/dist/{next-node → node}/plugins/stack.js +0 -0
- /package/dist/{next/registries → registries}/contribution.d.ts +0 -0
- /package/dist/{next/registries → registries}/contribution.js +0 -0
- /package/dist/{next/registries → registries}/entries.d.ts +0 -0
- /package/dist/{next/registries → registries}/entries.js +0 -0
- /package/dist/{next/registries → registries}/index.d.ts +0 -0
- /package/dist/{next/registries → registries}/index.js +0 -0
- /package/dist/{next/registries → registries}/internal.d.ts +0 -0
- /package/dist/{next/registries → registries}/internal.js +0 -0
- /package/dist/{next/registries → registries}/registry.js +0 -0
- /package/dist/{next/registries → registries}/value.d.ts +0 -0
- /package/dist/{next/remote → remote}/calls.d.ts +0 -0
- /package/dist/{next/remote → remote}/calls.js +0 -0
- /package/dist/{next/remote → remote}/internal.d.ts +0 -0
- /package/dist/{next/remote → remote}/internal.js +0 -0
- /package/dist/{next/remote → remote}/path.d.ts +0 -0
- /package/dist/{next/remote → remote}/path.js +0 -0
- /package/dist/{next/state → state}/index.js +0 -0
- /package/dist/{next/state → state}/internal.d.ts +0 -0
- /package/dist/{next/state → state}/internal.js +0 -0
- /package/dist/{next/state → state}/writable.js +0 -0
- /package/dist/{next/store → store}/adapter.js +0 -0
- /package/dist/{next/store → store}/allocator.d.ts +0 -0
- /package/dist/{next/store → store}/allocator.js +0 -0
- /package/dist/{next/store → store}/applier.d.ts +0 -0
- /package/dist/{next/store → store}/applier.js +0 -0
- /package/dist/{next/store → store}/apply-batch.js +0 -0
- /package/dist/{next/store → store}/backend.js +0 -0
- /package/dist/{next/store → store}/catalog.js +0 -0
- /package/dist/{next/store → store}/claims.d.ts +0 -0
- /package/dist/{next/store → store}/claims.js +0 -0
- /package/dist/{next/store → store}/columns.d.ts +0 -0
- /package/dist/{next/store → store}/columns.js +0 -0
- /package/dist/{next/store → store}/evaluate.js +0 -0
- /package/dist/{next/store → store}/expression.js +0 -0
- /package/dist/{next/store → store}/index.d.ts +0 -0
- /package/dist/{next/store → store}/index.js +0 -0
- /package/dist/{next/store → store}/jsonl.d.ts +0 -0
- /package/dist/{next/store → store}/jsonl.js +0 -0
- /package/dist/{next/store → store}/outbox.js +0 -0
- /package/dist/{next/store → store}/query.js +0 -0
- /package/dist/{next/store → store}/refusal.d.ts +0 -0
- /package/dist/{next/store → store}/refusal.js +0 -0
- /package/dist/{next/store → store}/rows.js +0 -0
- /package/dist/{next/store → store}/sql.js +0 -0
- /package/dist/{next/store → store}/table-changes.js +0 -0
- /package/dist/{next/store → store}/table-evolve.d.ts +0 -0
- /package/dist/{next/store → store}/table-evolve.js +0 -0
- /package/dist/{next/store → store}/table-history.d.ts +0 -0
- /package/dist/{next/store → store}/table-history.js +0 -0
- /package/dist/{next/store → store}/table-writes.d.ts +0 -0
- /package/dist/{next/store → store}/table.js +0 -0
- /package/dist/{next/store → store}/text.d.ts +0 -0
- /package/dist/{next/store → store}/text.js +0 -0
- /package/dist/{next/store → store}/writes.d.ts +0 -0
- /package/dist/{next/store → store}/writes.js +0 -0
- /package/docs/{next/dependencies → dependencies}/model.md +0 -0
- /package/docs/{next/flow-control → flow-control}/book.md +0 -0
- /package/docs/{next/flow-control → flow-control}/fold/index.html +0 -0
- /package/docs/{next/flow-control → flow-control}/index.html +0 -0
- /package/docs/{next/flow-control → flow-control}/window/index.html +0 -0
- /package/docs/{next/slice-4.md → slice-4.md} +0 -0
- /package/docs/{next/slice-5.md → slice-5.md} +0 -0
- /package/docs/{next/slice-7a.md → slice-7a.md} +0 -0
- /package/docs/{next/slice-8.md → slice-8.md} +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { BridgeRequest } from "../../tui/bridge.ts";
|
|
2
|
+
/**
|
|
3
|
+
* The launcher's prompt on the real terminal, `columns` wide: `ask` shows `lines` (the question last) and resolves
|
|
4
|
+
* with the user's answer, yes or no; `write` writes to the terminal past the output filter (the launcher's own
|
|
5
|
+
* sequences).
|
|
6
|
+
*/
|
|
7
|
+
export type PromptTerminal = {
|
|
8
|
+
readonly columns: number;
|
|
9
|
+
ask(lines: readonly string[]): Promise<boolean>;
|
|
10
|
+
write(data: string): void;
|
|
11
|
+
};
|
|
12
|
+
/** The prompt's rows for `lines` at `columns` wide: control characters removed, each line wrapped, never cut. */
|
|
13
|
+
export declare function promptLines(lines: readonly string[], columns: number): string[];
|
|
14
|
+
/**
|
|
15
|
+
* `line` with control characters removed, in rows of at most `width` columns, counting every character but printable
|
|
16
|
+
* ASCII as two (wide characters never push text past the edge, where the next row would cover it).
|
|
17
|
+
*/
|
|
18
|
+
export declare function wrap(line: string, width: number): string[];
|
|
19
|
+
/**
|
|
20
|
+
* Does the sandbox's `request` (`copy`, `open`) once the user confirmed it: whether it was done. Throws (the request
|
|
21
|
+
* refused) for text it will not copy and URLs it will not open. `opener` opens a URL (the platform's by default).
|
|
22
|
+
*/
|
|
23
|
+
export declare function act(request: Extract<BridgeRequest, {
|
|
24
|
+
kind: "copy" | "open";
|
|
25
|
+
}>, terminal: PromptTerminal, opener?: (url: string) => Promise<void>): Promise<boolean>;
|
|
26
|
+
/** The largest file the sandbox may be given: 16 MiB. */
|
|
27
|
+
export declare const MAX_ATTACHMENT: number;
|
|
28
|
+
/**
|
|
29
|
+
* Reads the file at `path` (as the sandbox gave it; `~/` the home directory) for the sandbox once the user confirmed
|
|
30
|
+
* it: its name and bytes, or `null` when declined. Refused at once: a path with control, format or unusual whitespace
|
|
31
|
+
* characters, and on Windows a UNC, device or `//host` path or a reserved device name. Nothing on the machine is looked
|
|
32
|
+
* at before the user's yes (Opus E9: on Windows a lookup of `\\host\share` alone sends the user's credentials): the
|
|
33
|
+
* prompt shows the path resolved by its text (`~`, `.` and `..`); after the yes its links are resolved, and a path
|
|
34
|
+
* that leads elsewhere is asked about again, showing where; what is opened must be the file confirmed (its device and
|
|
35
|
+
* inode as when the last prompt was shown). Then it is opened without blocking (a FIFO waits for no
|
|
36
|
+
* writer: Opus E12) and read only when it is a regular file of at most `MAX_ATTACHMENT` bytes; one refusal for anything
|
|
37
|
+
* else (no hint what is there).
|
|
38
|
+
*/
|
|
39
|
+
export declare function attach(path: string, terminal: PromptTerminal, platform?: NodeJS.Platform): Promise<{
|
|
40
|
+
readonly name: string;
|
|
41
|
+
readonly bytes: Uint8Array;
|
|
42
|
+
} | null>;
|
|
43
|
+
/**
|
|
44
|
+
* The command and arguments opening `url` on `platform`, as the coding agent opens a browser (`open-browser.ts`): never
|
|
45
|
+
* a shell (on Windows not `cmd /c start`, whose parsing runs what follows a `&`): `rundll32
|
|
46
|
+
* url.dll,FileProtocolHandler <url>` on Windows, `open` on macOS, `xdg-open` elsewhere, the URL one argument.
|
|
47
|
+
*/
|
|
48
|
+
export declare function openerCommand(url: string, platform?: NodeJS.Platform): [string, string[]];
|
|
49
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/node/tui/actions.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,GAAG,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAChD,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC;AAEF,iHAAiH;AACjH,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAE/E;AAOD;;;GAGG;AACH,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAgB1D;AAKD;;;GAGG;AACH,wBAAsB,GAAG,CACxB,OAAO,EAAE,OAAO,CAAC,aAAa,EAAE;IAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC,EAC1D,QAAQ,EAAE,cAAc,EACxB,MAAM,GAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAkB,GACrD,OAAO,CAAC,OAAO,CAAC,CAyBlB;AAED,yDAAyD;AACzD,eAAO,MAAM,cAAc,QAAmB,CAAC;AAE/C;;;;;;;;;;GAUG;AACH,wBAAsB,MAAM,CAC3B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,cAAc,EACxB,QAAQ,GAAE,MAAM,CAAC,QAA2B,GAC1C,OAAO,CAAC;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;CAAE,GAAG,IAAI,CAAC,CAmCvE;AAyCD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAM,CAAC,QAA2B,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAG3G"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
// The launcher's actions (slice 11 §4; fix rounds 1 to 4: Fable's H1, H2, M1, L4, L6 and Opus's M1, M3, L2, L3, E5,
|
|
2
|
+
// E6, E9, E12, R1): what the sandbox may ask of the machine, each confirmed by the user on the launcher's own prompt
|
|
3
|
+
// before it touches it. Every line the prompt shows is wrapped to the terminal's width, never cut. Copying writes the
|
|
4
|
+
// text to the terminal's clipboard (OSC 52, which the output filter refuses to sandboxed code) and shows it first (up
|
|
5
|
+
// to five rows, then how many more characters); text with control characters (a newline and a tab aside) or
|
|
6
|
+
// bidirectional controls is refused. Opening a URL (http or https, no user info) names its host first and runs the
|
|
7
|
+
// platform's opener without a shell (as the coding agent's `open-browser.ts`). Attaching refuses a path with control,
|
|
8
|
+
// format or unusual whitespace characters (and on Windows UNC and device paths), shows the path resolved by its text
|
|
9
|
+
// (its name on its own line) without looking at the machine, after the user's yes resolves its links and asks again
|
|
10
|
+
// when they lead elsewhere, and reads the very file confirmed (its device and inode), a regular file of at most 16 MiB,
|
|
11
|
+
// exactly at the size its open handle has.
|
|
12
|
+
import { spawn } from "node:child_process";
|
|
13
|
+
import { constants } from "node:fs";
|
|
14
|
+
import { open, realpath, stat } from "node:fs/promises";
|
|
15
|
+
import { homedir } from "node:os";
|
|
16
|
+
import { posix, win32 } from "node:path";
|
|
17
|
+
/** The prompt's rows for `lines` at `columns` wide: control characters removed, each line wrapped, never cut. */
|
|
18
|
+
export function promptLines(lines, columns) {
|
|
19
|
+
return lines.flatMap((line) => wrap(line, promptWidth(columns)));
|
|
20
|
+
}
|
|
21
|
+
/** The text width of a prompt row (one column of padding each side). */
|
|
22
|
+
function promptWidth(columns) {
|
|
23
|
+
return Math.max(10, columns - 2);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* `line` with control characters removed, in rows of at most `width` columns, counting every character but printable
|
|
27
|
+
* ASCII as two (wide characters never push text past the edge, where the next row would cover it).
|
|
28
|
+
*/
|
|
29
|
+
export function wrap(line, width) {
|
|
30
|
+
const rows = [];
|
|
31
|
+
let row = "";
|
|
32
|
+
let used = 0;
|
|
33
|
+
for (const character of visible(line)) {
|
|
34
|
+
const cells = character >= " " && character <= "~" ? 1 : 2;
|
|
35
|
+
if (used + cells > width) {
|
|
36
|
+
rows.push(row);
|
|
37
|
+
row = "";
|
|
38
|
+
used = 0;
|
|
39
|
+
}
|
|
40
|
+
row += character;
|
|
41
|
+
used += cells;
|
|
42
|
+
}
|
|
43
|
+
rows.push(row);
|
|
44
|
+
return rows;
|
|
45
|
+
}
|
|
46
|
+
/** How many rows of a copied text the prompt shows before "and N more characters". */
|
|
47
|
+
const SHOWN_ROWS = 5;
|
|
48
|
+
/**
|
|
49
|
+
* Does the sandbox's `request` (`copy`, `open`) once the user confirmed it: whether it was done. Throws (the request
|
|
50
|
+
* refused) for text it will not copy and URLs it will not open. `opener` opens a URL (the platform's by default).
|
|
51
|
+
*/
|
|
52
|
+
export async function act(request, terminal, opener = platformOpener) {
|
|
53
|
+
if (request.kind === "copy") {
|
|
54
|
+
const { text } = request;
|
|
55
|
+
// Control characters (but newlines and tabs) and bidirectional controls could hide what a paste runs.
|
|
56
|
+
if (/[\u0000-\u0008\u000b-\u001f\u007f-\u009f\u202a-\u202e\u2066-\u2069]/.test(text)) {
|
|
57
|
+
throw new Error("copy: the text holds control characters");
|
|
58
|
+
}
|
|
59
|
+
const lines = text.split("\n");
|
|
60
|
+
// Wrapped, never cut: a long line's end is where a pasted command would hide (Opus E6).
|
|
61
|
+
const rows = lines.flatMap((line) => wrap(line, promptWidth(terminal.columns) - 2));
|
|
62
|
+
const hidden = rows.slice(SHOWN_ROWS).reduce((sum, row) => sum + row.length, 0);
|
|
63
|
+
const question = `Copy these ${text.length} characters (${lines.length} line${lines.length === 1 ? "" : "s"})? [y/N]`;
|
|
64
|
+
const shown = [
|
|
65
|
+
...rows.slice(0, SHOWN_ROWS).map((row) => ` ${row}`),
|
|
66
|
+
...(hidden > 0 ? [` … and ${hidden} more characters`] : []),
|
|
67
|
+
];
|
|
68
|
+
if (!(await terminal.ask([...shown, question])))
|
|
69
|
+
return false;
|
|
70
|
+
terminal.write(`\x1b]52;c;${Buffer.from(text).toString("base64")}\x07`);
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
const url = openable(request.url);
|
|
74
|
+
if (url === undefined)
|
|
75
|
+
throw new Error("open: only http and https URLs without user info open");
|
|
76
|
+
if (!(await terminal.ask([` ${url.href}`, `Open ${url.host} in the browser? [y/N]`])))
|
|
77
|
+
return false;
|
|
78
|
+
await opener(url.href);
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
/** The largest file the sandbox may be given: 16 MiB. */
|
|
82
|
+
export const MAX_ATTACHMENT = 16 * 1024 * 1024;
|
|
83
|
+
/**
|
|
84
|
+
* Reads the file at `path` (as the sandbox gave it; `~/` the home directory) for the sandbox once the user confirmed
|
|
85
|
+
* it: its name and bytes, or `null` when declined. Refused at once: a path with control, format or unusual whitespace
|
|
86
|
+
* characters, and on Windows a UNC, device or `//host` path or a reserved device name. Nothing on the machine is looked
|
|
87
|
+
* at before the user's yes (Opus E9: on Windows a lookup of `\\host\share` alone sends the user's credentials): the
|
|
88
|
+
* prompt shows the path resolved by its text (`~`, `.` and `..`); after the yes its links are resolved, and a path
|
|
89
|
+
* that leads elsewhere is asked about again, showing where; what is opened must be the file confirmed (its device and
|
|
90
|
+
* inode as when the last prompt was shown). Then it is opened without blocking (a FIFO waits for no
|
|
91
|
+
* writer: Opus E12) and read only when it is a regular file of at most `MAX_ATTACHMENT` bytes; one refusal for anything
|
|
92
|
+
* else (no hint what is there).
|
|
93
|
+
*/
|
|
94
|
+
export async function attach(path, terminal, platform = process.platform) {
|
|
95
|
+
if (!attachable(path, platform))
|
|
96
|
+
throw cannotAttach();
|
|
97
|
+
const paths = platform === "win32" ? win32 : posix;
|
|
98
|
+
const home = /^~(?:$|[\\/])/.test(path) ? paths.join(homedir(), path.slice(1)) : path;
|
|
99
|
+
const named = paths.resolve(home);
|
|
100
|
+
if (!(await terminal.ask(fileLines(named, paths, "Attach this file? [y/N]"))))
|
|
101
|
+
return null;
|
|
102
|
+
const file = await realpath(named).catch(() => undefined);
|
|
103
|
+
if (file === undefined)
|
|
104
|
+
throw cannotAttach();
|
|
105
|
+
// The file the user confirms, by identity: what is read must be it (Opus R1: a parent directory swapped for a link
|
|
106
|
+
// after the yes would lead elsewhere, past `O_NOFOLLOW`, which guards the last step only).
|
|
107
|
+
const shown = await stat(file, { bigint: true }).catch(() => undefined);
|
|
108
|
+
if (shown === undefined)
|
|
109
|
+
throw cannotAttach();
|
|
110
|
+
if (file !== named && !(await terminal.ask(fileLines(file, paths, "It links here. Attach this file? [y/N]")))) {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
// No waiting on a FIFO or device, and no link swapped in at the last step since the user saw the path.
|
|
114
|
+
const flags = constants.O_RDONLY | (constants.O_NONBLOCK ?? 0) | (constants.O_NOFOLLOW ?? 0);
|
|
115
|
+
const handle = await open(file, flags).catch(() => undefined);
|
|
116
|
+
if (handle === undefined)
|
|
117
|
+
throw cannotAttach();
|
|
118
|
+
try {
|
|
119
|
+
const info = await handle.stat({ bigint: true });
|
|
120
|
+
if (info.dev !== shown.dev || info.ino !== shown.ino)
|
|
121
|
+
throw cannotAttach();
|
|
122
|
+
if (!info.isFile() || info.size > BigInt(MAX_ATTACHMENT))
|
|
123
|
+
throw cannotAttach();
|
|
124
|
+
// Exactly its size now: a file growing meanwhile is read up to what was checked.
|
|
125
|
+
const bytes = new Uint8Array(Number(info.size));
|
|
126
|
+
let read = 0;
|
|
127
|
+
while (read < bytes.length) {
|
|
128
|
+
const { bytesRead } = await handle.read(bytes, read, bytes.length - read, read);
|
|
129
|
+
if (bytesRead === 0)
|
|
130
|
+
break;
|
|
131
|
+
read += bytesRead;
|
|
132
|
+
}
|
|
133
|
+
return { name: paths.basename(file), bytes: bytes.subarray(0, read) };
|
|
134
|
+
}
|
|
135
|
+
finally {
|
|
136
|
+
await handle.close();
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Whether `path` may be shown and, once confirmed, opened on `platform`: no character that hides or moves what the
|
|
141
|
+
* prompt shows (controls, format characters such as bidirectional and zero-width ones, whitespace but single spaces
|
|
142
|
+
* between words: Opus E5), and on Windows no UNC, device or `//host` path and no reserved device name (Opus E9).
|
|
143
|
+
*/
|
|
144
|
+
function attachable(path, platform) {
|
|
145
|
+
if (/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]|[^\S ]| {2}|^ | $/u.test(path))
|
|
146
|
+
return false;
|
|
147
|
+
if (platform !== "win32")
|
|
148
|
+
return true;
|
|
149
|
+
if (/^[\\/]{2}/.test(path))
|
|
150
|
+
return false;
|
|
151
|
+
return !path
|
|
152
|
+
.split(/[\\/]/)
|
|
153
|
+
.some((segment) => /^(?:con|prn|aux|nul|com\d|lpt\d|conin\$|conout\$)(?:\..*)?$/i.test(segment));
|
|
154
|
+
}
|
|
155
|
+
/** The prompt's lines for the file at `file`: its name, its directory, then `question`. */
|
|
156
|
+
function fileLines(file, paths, question) {
|
|
157
|
+
return [`File: ${paths.basename(file)}`, `In: ${paths.dirname(file)}`, question];
|
|
158
|
+
}
|
|
159
|
+
function cannotAttach() {
|
|
160
|
+
return new Error("attach: that file cannot be attached");
|
|
161
|
+
}
|
|
162
|
+
/** `text` with control and format characters (bidirectional, zero width) removed: sandboxed text in the prompt. */
|
|
163
|
+
function visible(text) {
|
|
164
|
+
return text.replace(/[\p{Cc}\p{Cf}]/gu, "");
|
|
165
|
+
}
|
|
166
|
+
/** `url` when it is an http or https URL without user info; else `undefined`. */
|
|
167
|
+
function openable(url) {
|
|
168
|
+
try {
|
|
169
|
+
const value = new URL(url);
|
|
170
|
+
const web = value.protocol === "http:" || value.protocol === "https:";
|
|
171
|
+
return web && value.username === "" && value.password === "" ? value : undefined;
|
|
172
|
+
}
|
|
173
|
+
catch {
|
|
174
|
+
return undefined;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* The command and arguments opening `url` on `platform`, as the coding agent opens a browser (`open-browser.ts`): never
|
|
179
|
+
* a shell (on Windows not `cmd /c start`, whose parsing runs what follows a `&`): `rundll32
|
|
180
|
+
* url.dll,FileProtocolHandler <url>` on Windows, `open` on macOS, `xdg-open` elsewhere, the URL one argument.
|
|
181
|
+
*/
|
|
182
|
+
export function openerCommand(url, platform = process.platform) {
|
|
183
|
+
if (platform === "win32")
|
|
184
|
+
return ["rundll32", ["url.dll,FileProtocolHandler", url]];
|
|
185
|
+
return [platform === "darwin" ? "open" : "xdg-open", [url]];
|
|
186
|
+
}
|
|
187
|
+
/** Opens `url` with the platform's opener (`openerCommand`), detached, best effort: a missing opener is no crash. */
|
|
188
|
+
async function platformOpener(url) {
|
|
189
|
+
const [command, args] = openerCommand(url);
|
|
190
|
+
// The root as its directory: no opener needs the launcher's (a WSL path too long for explorer.exe, pi #11592).
|
|
191
|
+
spawn(command, args, { stdio: "ignore", detached: true, cwd: "/", shell: false })
|
|
192
|
+
.on("error", () => { })
|
|
193
|
+
.unref();
|
|
194
|
+
}
|
|
195
|
+
//# sourceMappingURL=actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../src/node/tui/actions.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,qHAAqH;AACrH,sHAAsH;AACtH,sHAAsH;AACtH,4GAA4G;AAC5G,mHAAmH;AACnH,sHAAsH;AACtH,qHAAqH;AACrH,oHAAoH;AACpH,wHAAwH;AACxH,2CAA2C;AAE3C,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAczC,iHAAiH;AACjH,MAAM,UAAU,WAAW,CAAC,KAAwB,EAAE,OAAe;IACpE,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC;AAED,wEAAwE;AACxE,SAAS,WAAW,CAAC,OAAe;IACnC,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC;AAClC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,IAA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ACrB,KAAK,EAAE,CAAC;AACX,CAAC","sourcesContent":["// The launcher's actions (slice 11 §4; fix rounds 1 to 4: Fable's H1, H2, M1, L4, L6 and Opus's M1, M3, L2, L3, E5,\n// E6, E9, E12, R1): what the sandbox may ask of the machine, each confirmed by the user on the launcher's own prompt\n// before it touches it. Every line the prompt shows is wrapped to the terminal's width, never cut. Copying writes the\n// text to the terminal's clipboard (OSC 52, which the output filter refuses to sandboxed code) and shows it first (up\n// to five rows, then how many more characters); text with control characters (a newline and a tab aside) or\n// bidirectional controls is refused. Opening a URL (http or https, no user info) names its host first and runs the\n// platform's opener without a shell (as the coding agent's `open-browser.ts`). Attaching refuses a path with control,\n// format or unusual whitespace characters (and on Windows UNC and device paths), shows the path resolved by its text\n// (its name on its own line) without looking at the machine, after the user's yes resolves its links and asks again\n// when they lead elsewhere, and reads the very file confirmed (its device and inode), a regular file of at most 16 MiB,\n// exactly at the size its open handle has.\n\nimport { spawn } from \"node:child_process\";\nimport { constants } from \"node:fs\";\nimport { open, realpath, stat } from \"node:fs/promises\";\nimport { homedir } from \"node:os\";\nimport { posix, win32 } from \"node:path\";\nimport type { BridgeRequest } from \"../../tui/bridge.ts\";\n\n/**\n * The launcher's prompt on the real terminal, `columns` wide: `ask` shows `lines` (the question last) and resolves\n * with the user's answer, yes or no; `write` writes to the terminal past the output filter (the launcher's own\n * sequences).\n */\nexport type PromptTerminal = {\n\treadonly columns: number;\n\task(lines: readonly string[]): Promise<boolean>;\n\twrite(data: string): void;\n};\n\n/** The prompt's rows for `lines` at `columns` wide: control characters removed, each line wrapped, never cut. */\nexport function promptLines(lines: readonly string[], columns: number): string[] {\n\treturn lines.flatMap((line) => wrap(line, promptWidth(columns)));\n}\n\n/** The text width of a prompt row (one column of padding each side). */\nfunction promptWidth(columns: number): number {\n\treturn Math.max(10, columns - 2);\n}\n\n/**\n * `line` with control characters removed, in rows of at most `width` columns, counting every character but printable\n * ASCII as two (wide characters never push text past the edge, where the next row would cover it).\n */\nexport function wrap(line: string, width: number): string[] {\n\tconst rows: string[] = [];\n\tlet row = \"\";\n\tlet used = 0;\n\tfor (const character of visible(line)) {\n\t\tconst cells = character >= \" \" && character <= \"~\" ? 1 : 2;\n\t\tif (used + cells > width) {\n\t\t\trows.push(row);\n\t\t\trow = \"\";\n\t\t\tused = 0;\n\t\t}\n\t\trow += character;\n\t\tused += cells;\n\t}\n\trows.push(row);\n\treturn rows;\n}\n\n/** How many rows of a copied text the prompt shows before \"and N more characters\". */\nconst SHOWN_ROWS = 5;\n\n/**\n * Does the sandbox's `request` (`copy`, `open`) once the user confirmed it: whether it was done. Throws (the request\n * refused) for text it will not copy and URLs it will not open. `opener` opens a URL (the platform's by default).\n */\nexport async function act(\n\trequest: Extract<BridgeRequest, { kind: \"copy\" | \"open\" }>,\n\tterminal: PromptTerminal,\n\topener: (url: string) => Promise<void> = platformOpener,\n): Promise<boolean> {\n\tif (request.kind === \"copy\") {\n\t\tconst { text } = request;\n\t\t// Control characters (but newlines and tabs) and bidirectional controls could hide what a paste runs.\n\t\tif (/[\\u0000-\\u0008\\u000b-\\u001f\\u007f-\\u009f\\u202a-\\u202e\\u2066-\\u2069]/.test(text)) {\n\t\t\tthrow new Error(\"copy: the text holds control characters\");\n\t\t}\n\t\tconst lines = text.split(\"\\n\");\n\t\t// Wrapped, never cut: a long line's end is where a pasted command would hide (Opus E6).\n\t\tconst rows = lines.flatMap((line) => wrap(line, promptWidth(terminal.columns) - 2));\n\t\tconst hidden = rows.slice(SHOWN_ROWS).reduce((sum, row) => sum + row.length, 0);\n\t\tconst question = `Copy these ${text.length} characters (${lines.length} line${lines.length === 1 ? \"\" : \"s\"})? [y/N]`;\n\t\tconst shown = [\n\t\t\t...rows.slice(0, SHOWN_ROWS).map((row) => ` ${row}`),\n\t\t\t...(hidden > 0 ? [` … and ${hidden} more characters`] : []),\n\t\t];\n\t\tif (!(await terminal.ask([...shown, question]))) return false;\n\t\tterminal.write(`\\x1b]52;c;${Buffer.from(text).toString(\"base64\")}\\x07`);\n\t\treturn true;\n\t}\n\tconst url = openable(request.url);\n\tif (url === undefined) throw new Error(\"open: only http and https URLs without user info open\");\n\tif (!(await terminal.ask([` ${url.href}`, `Open ${url.host} in the browser? [y/N]`]))) return false;\n\tawait opener(url.href);\n\treturn true;\n}\n\n/** The largest file the sandbox may be given: 16 MiB. */\nexport const MAX_ATTACHMENT = 16 * 1024 * 1024;\n\n/**\n * Reads the file at `path` (as the sandbox gave it; `~/` the home directory) for the sandbox once the user confirmed\n * it: its name and bytes, or `null` when declined. Refused at once: a path with control, format or unusual whitespace\n * characters, and on Windows a UNC, device or `//host` path or a reserved device name. Nothing on the machine is looked\n * at before the user's yes (Opus E9: on Windows a lookup of `\\\\host\\share` alone sends the user's credentials): the\n * prompt shows the path resolved by its text (`~`, `.` and `..`); after the yes its links are resolved, and a path\n * that leads elsewhere is asked about again, showing where; what is opened must be the file confirmed (its device and\n * inode as when the last prompt was shown). Then it is opened without blocking (a FIFO waits for no\n * writer: Opus E12) and read only when it is a regular file of at most `MAX_ATTACHMENT` bytes; one refusal for anything\n * else (no hint what is there).\n */\nexport async function attach(\n\tpath: string,\n\tterminal: PromptTerminal,\n\tplatform: NodeJS.Platform = process.platform,\n): Promise<{ readonly name: string; readonly bytes: Uint8Array } | null> {\n\tif (!attachable(path, platform)) throw cannotAttach();\n\tconst paths = platform === \"win32\" ? win32 : posix;\n\tconst home = /^~(?:$|[\\\\/])/.test(path) ? paths.join(homedir(), path.slice(1)) : path;\n\tconst named = paths.resolve(home);\n\tif (!(await terminal.ask(fileLines(named, paths, \"Attach this file? [y/N]\")))) return null;\n\tconst file = await realpath(named).catch(() => undefined);\n\tif (file === undefined) throw cannotAttach();\n\t// The file the user confirms, by identity: what is read must be it (Opus R1: a parent directory swapped for a link\n\t// after the yes would lead elsewhere, past `O_NOFOLLOW`, which guards the last step only).\n\tconst shown = await stat(file, { bigint: true }).catch(() => undefined);\n\tif (shown === undefined) throw cannotAttach();\n\tif (file !== named && !(await terminal.ask(fileLines(file, paths, \"It links here. Attach this file? [y/N]\")))) {\n\t\treturn null;\n\t}\n\t// No waiting on a FIFO or device, and no link swapped in at the last step since the user saw the path.\n\tconst flags = constants.O_RDONLY | (constants.O_NONBLOCK ?? 0) | (constants.O_NOFOLLOW ?? 0);\n\tconst handle = await open(file, flags).catch(() => undefined);\n\tif (handle === undefined) throw cannotAttach();\n\ttry {\n\t\tconst info = await handle.stat({ bigint: true });\n\t\tif (info.dev !== shown.dev || info.ino !== shown.ino) throw cannotAttach();\n\t\tif (!info.isFile() || info.size > BigInt(MAX_ATTACHMENT)) throw cannotAttach();\n\t\t// Exactly its size now: a file growing meanwhile is read up to what was checked.\n\t\tconst bytes = new Uint8Array(Number(info.size));\n\t\tlet read = 0;\n\t\twhile (read < bytes.length) {\n\t\t\tconst { bytesRead } = await handle.read(bytes, read, bytes.length - read, read);\n\t\t\tif (bytesRead === 0) break;\n\t\t\tread += bytesRead;\n\t\t}\n\t\treturn { name: paths.basename(file), bytes: bytes.subarray(0, read) };\n\t} finally {\n\t\tawait handle.close();\n\t}\n}\n\n/**\n * Whether `path` may be shown and, once confirmed, opened on `platform`: no character that hides or moves what the\n * prompt shows (controls, format characters such as bidirectional and zero-width ones, whitespace but single spaces\n * between words: Opus E5), and on Windows no UNC, device or `//host` path and no reserved device name (Opus E9).\n */\nfunction attachable(path: string, platform: NodeJS.Platform): boolean {\n\tif (/[\\p{Cc}\\p{Cf}\\p{Zl}\\p{Zp}]|[^\\S ]| {2}|^ | $/u.test(path)) return false;\n\tif (platform !== \"win32\") return true;\n\tif (/^[\\\\/]{2}/.test(path)) return false;\n\treturn !path\n\t\t.split(/[\\\\/]/)\n\t\t.some((segment) => /^(?:con|prn|aux|nul|com\\d|lpt\\d|conin\\$|conout\\$)(?:\\..*)?$/i.test(segment));\n}\n\n/** The prompt's lines for the file at `file`: its name, its directory, then `question`. */\nfunction fileLines(file: string, paths: typeof posix, question: string): string[] {\n\treturn [`File: ${paths.basename(file)}`, `In: ${paths.dirname(file)}`, question];\n}\n\nfunction cannotAttach(): Error {\n\treturn new Error(\"attach: that file cannot be attached\");\n}\n\n/** `text` with control and format characters (bidirectional, zero width) removed: sandboxed text in the prompt. */\nfunction visible(text: string): string {\n\treturn text.replace(/[\\p{Cc}\\p{Cf}]/gu, \"\");\n}\n\n/** `url` when it is an http or https URL without user info; else `undefined`. */\nfunction openable(url: string): URL | undefined {\n\ttry {\n\t\tconst value = new URL(url);\n\t\tconst web = value.protocol === \"http:\" || value.protocol === \"https:\";\n\t\treturn web && value.username === \"\" && value.password === \"\" ? value : undefined;\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n\n/**\n * The command and arguments opening `url` on `platform`, as the coding agent opens a browser (`open-browser.ts`): never\n * a shell (on Windows not `cmd /c start`, whose parsing runs what follows a `&`): `rundll32\n * url.dll,FileProtocolHandler <url>` on Windows, `open` on macOS, `xdg-open` elsewhere, the URL one argument.\n */\nexport function openerCommand(url: string, platform: NodeJS.Platform = process.platform): [string, string[]] {\n\tif (platform === \"win32\") return [\"rundll32\", [\"url.dll,FileProtocolHandler\", url]];\n\treturn [platform === \"darwin\" ? \"open\" : \"xdg-open\", [url]];\n}\n\n/** Opens `url` with the platform's opener (`openerCommand`), detached, best effort: a missing opener is no crash. */\nasync function platformOpener(url: string): Promise<void> {\n\tconst [command, args] = openerCommand(url);\n\t// The root as its directory: no opener needs the launcher's (a WSL path too long for explorer.exe, pi #11592).\n\tspawn(command, args, { stdio: \"ignore\", detached: true, cwd: \"/\", shell: false })\n\t\t.on(\"error\", () => {})\n\t\t.unref();\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Where the launcher's token comes from. */
|
|
2
|
+
export type TerminalCredentials = {
|
|
3
|
+
readonly kind: "token";
|
|
4
|
+
readonly token: string;
|
|
5
|
+
} | {
|
|
6
|
+
readonly kind: "file";
|
|
7
|
+
readonly path: string;
|
|
8
|
+
}
|
|
9
|
+
/** Pairing with the server, the device named `label`; the token saved to `save` (created, mode 0600) when given. */
|
|
10
|
+
| {
|
|
11
|
+
readonly kind: "pairing";
|
|
12
|
+
readonly label: string;
|
|
13
|
+
readonly save?: string;
|
|
14
|
+
};
|
|
15
|
+
/** The launcher's token for the server at `url`; pairing shows its code through `say`. */
|
|
16
|
+
export declare function tokenOf(credentials: TerminalCredentials, url: URL, say: (line: string) => void, signal: AbortSignal): Promise<string>;
|
|
17
|
+
//# sourceMappingURL=credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../src/node/tui/credentials.ts"],"names":[],"mappings":"AAQA,6CAA6C;AAC7C,MAAM,MAAM,mBAAmB,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAClD;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AAClD,oHAAoH;GAClH;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAKhF,0FAA0F;AAC1F,wBAAsB,OAAO,CAC5B,WAAW,EAAE,mBAAmB,EAChC,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,EAC3B,MAAM,EAAE,WAAW,GACjB,OAAO,CAAC,MAAM,CAAC,CASjB"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// The launcher's credentials (slice 11 §4, decision "The app kit, point 3" (c)): a device token the launcher keeps,
|
|
2
|
+
// never the sandbox. It is given, read from a token file (the owner token file on the server's machine, slice 13), or
|
|
3
|
+
// got by device pairing: the launcher asks for a code, shows it, and polls until the owner approved it in a browser;
|
|
4
|
+
// a paired token may be saved to a file (mode 0600) for the next start.
|
|
5
|
+
import { readFile } from "node:fs/promises";
|
|
6
|
+
import { writeSecret } from "../app/secrets.js";
|
|
7
|
+
/** How often a pairing is polled. */
|
|
8
|
+
const POLL_MS = 2000;
|
|
9
|
+
/** The launcher's token for the server at `url`; pairing shows its code through `say`. */
|
|
10
|
+
export async function tokenOf(credentials, url, say, signal) {
|
|
11
|
+
switch (credentials.kind) {
|
|
12
|
+
case "token":
|
|
13
|
+
return credentials.token;
|
|
14
|
+
case "file":
|
|
15
|
+
return (await readFile(credentials.path, "utf8")).trim();
|
|
16
|
+
case "pairing":
|
|
17
|
+
return pair(credentials, url, say, signal);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/** Pairs this device: a code shown, the approval polled for, the token returned (and saved when asked). */
|
|
21
|
+
async function pair(credentials, url, say, signal) {
|
|
22
|
+
const asked = await post(new URL("/_chord/pair", url), { label: credentials.label }, signal);
|
|
23
|
+
if (!asked.ok)
|
|
24
|
+
throw new Error(`terminal: the server refused to pair (${asked.status})`);
|
|
25
|
+
const { code, poll } = (await asked.json());
|
|
26
|
+
// A trust boundary: the server's answer is shown on the terminal and sent back.
|
|
27
|
+
if (typeof code !== "string" || !/^[A-Za-z0-9-]{4,32}$/.test(code) || typeof poll !== "string") {
|
|
28
|
+
throw new Error("terminal: the server's pairing answer is malformed");
|
|
29
|
+
}
|
|
30
|
+
say(`Pairing code ${code}: approve it at ${new URL(`/_chord/pair/${code}`, url)} (signed in as the owner).`);
|
|
31
|
+
for (;;) {
|
|
32
|
+
await new Promise((resolve) => setTimeout(resolve, POLL_MS));
|
|
33
|
+
signal.throwIfAborted();
|
|
34
|
+
const polled = await post(new URL("/_chord/pair/poll", url), { poll }, signal);
|
|
35
|
+
if (!polled.ok)
|
|
36
|
+
throw new Error("terminal: the pairing ended without approval");
|
|
37
|
+
const answer = (await polled.json());
|
|
38
|
+
if (answer.status !== "approved" || answer.token === undefined)
|
|
39
|
+
continue;
|
|
40
|
+
if (credentials.save !== undefined)
|
|
41
|
+
await writeSecret(credentials.save, answer.token, "create");
|
|
42
|
+
return answer.token;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/** A JSON post. */
|
|
46
|
+
function post(url, body, signal) {
|
|
47
|
+
return fetch(url, {
|
|
48
|
+
method: "POST",
|
|
49
|
+
headers: { "content-type": "application/json" },
|
|
50
|
+
body: JSON.stringify(body),
|
|
51
|
+
signal,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../../../src/node/tui/credentials.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,sHAAsH;AACtH,qHAAqH;AACrH,wEAAwE;AAExE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAShD,qCAAqC;AACrC,MAAM,OAAO,GAAG,IAAI,CAAC;AAErB,0FAA0F;AAC1F,MAAM,CAAC,KAAK,UAAU,OAAO,CAC5B,WAAgC,EAChC,GAAQ,EACR,GAA2B,EAC3B,MAAmB;IAEnB,QAAQ,WAAW,CAAC,IAAI,EAAE,CAAC;QAC1B,KAAK,OAAO;YACX,OAAO,WAAW,CAAC,KAAK,CAAC;QAC1B,KAAK,MAAM;YACV,OAAO,CAAC,MAAM,QAAQ,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAC1D,KAAK,SAAS;YACb,OAAO,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;IAC7C,CAAC;AACF,CAAC;AAED,2GAA2G;AAC3G,KAAK,UAAU,IAAI,CAClB,WAA8D,EAC9D,GAAQ,EACR,GAA2B,EAC3B,MAAmB;IAEnB,MAAM,KAAK,GAAG,MAA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CAAC,IAAI,KAAK,SAAS;YAAE,MAAM,WAAW,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAChG,OAAO,MAAM,CAAC,KAAK,CAAC;IACrB,CAAC;AACF,CAAC;AAED,mBAAmB;AACnB,SAAS,IAAI,CAAC,GAAQ,EAAE,IAAa,EAAE,MAAmB;IACzD,OAAO,KAAK,CAAC,GAAG,EAAE;QACjB,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;QAC1B,MAAM;KACN,CAAC,CAAC;AACJ,CAAC","sourcesContent":["// The launcher's credentials (slice 11 §4, decision \"The app kit, point 3\" (c)): a device token the launcher keeps,\n// never the sandbox. It is given, read from a token file (the owner token file on the server's machine, slice 13), or\n// got by device pairing: the launcher asks for a code, shows it, and polls until the owner approved it in a browser;\n// a paired token may be saved to a file (mode 0600) for the next start.\n\nimport { readFile } from \"node:fs/promises\";\nimport { writeSecret } from \"../app/secrets.ts\";\n\n/** Where the launcher's token comes from. */\nexport type TerminalCredentials =\n\t| { readonly kind: \"token\"; readonly token: string }\n\t| { readonly kind: \"file\"; readonly path: string }\n\t/** Pairing with the server, the device named `label`; the token saved to `save` (created, mode 0600) when given. */\n\t| { readonly kind: \"pairing\"; readonly label: string; readonly save?: string };\n\n/** How often a pairing is polled. */\nconst POLL_MS = 2000;\n\n/** The launcher's token for the server at `url`; pairing shows its code through `say`. */\nexport async function tokenOf(\n\tcredentials: TerminalCredentials,\n\turl: URL,\n\tsay: (line: string) => void,\n\tsignal: AbortSignal,\n): Promise<string> {\n\tswitch (credentials.kind) {\n\t\tcase \"token\":\n\t\t\treturn credentials.token;\n\t\tcase \"file\":\n\t\t\treturn (await readFile(credentials.path, \"utf8\")).trim();\n\t\tcase \"pairing\":\n\t\t\treturn pair(credentials, url, say, signal);\n\t}\n}\n\n/** Pairs this device: a code shown, the approval polled for, the token returned (and saved when asked). */\nasync function pair(\n\tcredentials: Extract<TerminalCredentials, { kind: \"pairing\" }>,\n\turl: URL,\n\tsay: (line: string) => void,\n\tsignal: AbortSignal,\n): Promise<string> {\n\tconst asked = await post(new URL(\"/_chord/pair\", url), { label: credentials.label }, signal);\n\tif (!asked.ok) throw new Error(`terminal: the server refused to pair (${asked.status})`);\n\tconst { code, poll } = (await asked.json()) as { readonly code?: unknown; readonly poll?: unknown };\n\t// A trust boundary: the server's answer is shown on the terminal and sent back.\n\tif (typeof code !== \"string\" || !/^[A-Za-z0-9-]{4,32}$/.test(code) || typeof poll !== \"string\") {\n\t\tthrow new Error(\"terminal: the server's pairing answer is malformed\");\n\t}\n\tsay(`Pairing code ${code}: approve it at ${new URL(`/_chord/pair/${code}`, url)} (signed in as the owner).`);\n\tfor (;;) {\n\t\tawait new Promise((resolve) => setTimeout(resolve, POLL_MS));\n\t\tsignal.throwIfAborted();\n\t\tconst polled = await post(new URL(\"/_chord/pair/poll\", url), { poll }, signal);\n\t\tif (!polled.ok) throw new Error(\"terminal: the pairing ended without approval\");\n\t\tconst answer = (await polled.json()) as { readonly status: string; readonly token?: string };\n\t\tif (answer.status !== \"approved\" || answer.token === undefined) continue;\n\t\tif (credentials.save !== undefined) await writeSecret(credentials.save, answer.token, \"create\");\n\t\treturn answer.token;\n\t}\n}\n\n/** A JSON post. */\nfunction post(url: URL, body: unknown, signal: AbortSignal): Promise<Response> {\n\treturn fetch(url, {\n\t\tmethod: \"POST\",\n\t\theaders: { \"content-type\": \"application/json\" },\n\t\tbody: JSON.stringify(body),\n\t\tsignal,\n\t});\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** The longest frame the sandbox may write. */
|
|
2
|
+
export declare const MAX_FRAME: number;
|
|
3
|
+
/** `output` with only the allowed sequences; throws for a frame over `MAX_FRAME`. */
|
|
4
|
+
export declare function filterOutput(output: string): string;
|
|
5
|
+
//# sourceMappingURL=filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../src/node/tui/filter.ts"],"names":[],"mappings":"AAMA,+CAA+C;AAC/C,eAAO,MAAM,SAAS,QAAY,CAAC;AAOnC,qFAAqF;AACrF,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAgBnD"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// The terminal's output filter (slice 11 §4; p2's `tui-filter.ts`): the only path from the sandbox to the real
|
|
2
|
+
// terminal. A frame's text and the escape sequences a terminal UI needs to draw pass (cursor moves, erasing, colours,
|
|
3
|
+
// the alternate screen, bracketed paste, synchronized output, mouse reporting); every other sequence is dropped, so
|
|
4
|
+
// sandboxed code cannot set the clipboard (OSC 52), retitle or reconfigure the terminal, or smuggle a sequence across
|
|
5
|
+
// frames: an unterminated one ends with its frame.
|
|
6
|
+
/** The longest frame the sandbox may write. */
|
|
7
|
+
export const MAX_FRAME = 64 * 1024;
|
|
8
|
+
const ESC = "\x1b";
|
|
9
|
+
/** DEC private modes output may set: cursor visibility, bracketed paste, sync, alternate screen, autowrap, mouse. */
|
|
10
|
+
const MODES = new Set(["25", "2004", "2026", "1049", "7", "1000", "1002", "1006", "1004"]);
|
|
11
|
+
/** `output` with only the allowed sequences; throws for a frame over `MAX_FRAME`. */
|
|
12
|
+
export function filterOutput(output) {
|
|
13
|
+
if (output.length > MAX_FRAME || Buffer.byteLength(output) > MAX_FRAME) {
|
|
14
|
+
throw new RangeError("terminal: a frame over 64 KiB");
|
|
15
|
+
}
|
|
16
|
+
let kept = "";
|
|
17
|
+
for (let index = 0; index < output.length; index++) {
|
|
18
|
+
const code = output.charCodeAt(index);
|
|
19
|
+
if (code === 27 || (code >= 0x80 && code <= 0x9f)) {
|
|
20
|
+
const [next, sequence] = escapeAt(output, index);
|
|
21
|
+
index = next;
|
|
22
|
+
kept += sequence;
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
if (code === 9 || code === 10 || code === 13 || (code >= 0x20 && code !== 0x7f))
|
|
26
|
+
kept += output[index];
|
|
27
|
+
}
|
|
28
|
+
return kept;
|
|
29
|
+
}
|
|
30
|
+
/** The escape at `index`: the index of its last character, and the sequence kept (`""` when dropped). */
|
|
31
|
+
function escapeAt(output, start) {
|
|
32
|
+
let index = start;
|
|
33
|
+
const code = output.charCodeAt(index);
|
|
34
|
+
const introducer = code === 27 ? (output[++index] ?? "") : output[index];
|
|
35
|
+
if (introducer === "[" || code === 0x9b) {
|
|
36
|
+
const body = index + 1;
|
|
37
|
+
while (index + 1 < output.length &&
|
|
38
|
+
output.charCodeAt(index + 1) >= 0x20 &&
|
|
39
|
+
output.charCodeAt(index + 1) <= 0x3f) {
|
|
40
|
+
index++;
|
|
41
|
+
}
|
|
42
|
+
const final = output[++index] ?? "";
|
|
43
|
+
const text = output.slice(body, index);
|
|
44
|
+
return [index, code === 27 && final !== "" && allowedCsi(text, final) ? `${ESC}[${text}${final}` : ""];
|
|
45
|
+
}
|
|
46
|
+
if ((introducer !== "" && "]PX^_".includes(introducer)) || [0x90, 0x98, 0x9d, 0x9e, 0x9f].includes(code)) {
|
|
47
|
+
// A control string (OSC, DCS, ...): dropped up to its terminator, or the end of the frame.
|
|
48
|
+
while (++index < output.length) {
|
|
49
|
+
if (output.charCodeAt(index) === 0x9c || output.charCodeAt(index) === 7)
|
|
50
|
+
break;
|
|
51
|
+
if (output[index] === ESC && output[index + 1] === "\\")
|
|
52
|
+
return [index + 1, ""];
|
|
53
|
+
}
|
|
54
|
+
return [index, ""];
|
|
55
|
+
}
|
|
56
|
+
// Any other ESC sequence with its intermediates (charset selection, ...): dropped.
|
|
57
|
+
while (index < output.length && output.charCodeAt(index) >= 0x20 && output.charCodeAt(index) <= 0x2f)
|
|
58
|
+
index++;
|
|
59
|
+
return [index, ""];
|
|
60
|
+
}
|
|
61
|
+
/** Whether the CSI sequence with parameters `body` and final `final` may reach the terminal. */
|
|
62
|
+
function allowedCsi(body, final) {
|
|
63
|
+
if (body.length > 128)
|
|
64
|
+
return false;
|
|
65
|
+
if (final === "h" || final === "l")
|
|
66
|
+
return body.startsWith("?") && MODES.has(body.slice(1));
|
|
67
|
+
if (final === "m")
|
|
68
|
+
return /^[\d;:]*$/.test(body) && !/\d{5}/.test(body);
|
|
69
|
+
if (!/^[\d;]*$/.test(body) || /\d{5}/.test(body))
|
|
70
|
+
return false;
|
|
71
|
+
if ("ABCDEFGHfd".includes(final))
|
|
72
|
+
return body.split(";").length <= ("Hf".includes(final) ? 2 : 1);
|
|
73
|
+
if (final === "J" || final === "K")
|
|
74
|
+
return /^[012]?$/.test(body);
|
|
75
|
+
if (final === "r")
|
|
76
|
+
return /^(?:\d{1,4};\d{1,4})?$/.test(body);
|
|
77
|
+
return (final === "s" || final === "u") && body === "";
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=filter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter.js","sourceRoot":"","sources":["../../../src/node/tui/filter.ts"],"names":[],"mappings":"AAAA,+GAA+G;AAC/G,sHAAsH;AACtH,oHAAoH;AACpH,sHAAsH;AACtH,mDAAmD;AAEnD,+CAA+C;AAC/C,MAAM,CAAC,MAAM,SAAS,GAAG,EAAE,GAAG,IAAI,CAAC;AAEnC,MAAM,GAAG,GAAG,MAAM,CAAC;AAEnB,qHAAqH;AACrH,MAAM,KAAK,GAAwB,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEhH,qFAAqF;AACrF,MAAM,UAAU,YAAY,CAAC,MAAc;IAC1C,IAAI,MAAM,CAAC,MAAM,GAAG,SAAS,IAAI,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,SAAS,EAAE,CAAC;QACxE,MA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K,GAAG,IAAI,KAAK,KAAK,GAAG,CAAC,IAAI,IAAI,KAAK,EAAE,CAAC;AACxD,CAAC","sourcesContent":["// The terminal's output filter (slice 11 §4; p2's `tui-filter.ts`): the only path from the sandbox to the real\n// terminal. A frame's text and the escape sequences a terminal UI needs to draw pass (cursor moves, erasing, colours,\n// the alternate screen, bracketed paste, synchronized output, mouse reporting); every other sequence is dropped, so\n// sandboxed code cannot set the clipboard (OSC 52), retitle or reconfigure the terminal, or smuggle a sequence across\n// frames: an unterminated one ends with its frame.\n\n/** The longest frame the sandbox may write. */\nexport const MAX_FRAME = 64 * 1024;\n\nconst ESC = \"\\x1b\";\n\n/** DEC private modes output may set: cursor visibility, bracketed paste, sync, alternate screen, autowrap, mouse. */\nconst MODES: ReadonlySet<string> = new Set([\"25\", \"2004\", \"2026\", \"1049\", \"7\", \"1000\", \"1002\", \"1006\", \"1004\"]);\n\n/** `output` with only the allowed sequences; throws for a frame over `MAX_FRAME`. */\nexport function filterOutput(output: string): string {\n\tif (output.length > MAX_FRAME || Buffer.byteLength(output) > MAX_FRAME) {\n\t\tthrow new RangeError(\"terminal: a frame over 64 KiB\");\n\t}\n\tlet kept = \"\";\n\tfor (let index = 0; index < output.length; index++) {\n\t\tconst code = output.charCodeAt(index);\n\t\tif (code === 27 || (code >= 0x80 && code <= 0x9f)) {\n\t\t\tconst [next, sequence] = escapeAt(output, index);\n\t\t\tindex = next;\n\t\t\tkept += sequence;\n\t\t\tcontinue;\n\t\t}\n\t\tif (code === 9 || code === 10 || code === 13 || (code >= 0x20 && code !== 0x7f)) kept += output[index];\n\t}\n\treturn kept;\n}\n\n/** The escape at `index`: the index of its last character, and the sequence kept (`\"\"` when dropped). */\nfunction escapeAt(output: string, start: number): [number, string] {\n\tlet index = start;\n\tconst code = output.charCodeAt(index);\n\tconst introducer = code === 27 ? (output[++index] ?? \"\") : output[index]!;\n\tif (introducer === \"[\" || code === 0x9b) {\n\t\tconst body = index + 1;\n\t\twhile (\n\t\t\tindex + 1 < output.length &&\n\t\t\toutput.charCodeAt(index + 1) >= 0x20 &&\n\t\t\toutput.charCodeAt(index + 1) <= 0x3f\n\t\t) {\n\t\t\tindex++;\n\t\t}\n\t\tconst final = output[++index] ?? \"\";\n\t\tconst text = output.slice(body, index);\n\t\treturn [index, code === 27 && final !== \"\" && allowedCsi(text, final) ? `${ESC}[${text}${final}` : \"\"];\n\t}\n\tif ((introducer !== \"\" && \"]PX^_\".includes(introducer)) || [0x90, 0x98, 0x9d, 0x9e, 0x9f].includes(code)) {\n\t\t// A control string (OSC, DCS, ...): dropped up to its terminator, or the end of the frame.\n\t\twhile (++index < output.length) {\n\t\t\tif (output.charCodeAt(index) === 0x9c || output.charCodeAt(index) === 7) break;\n\t\t\tif (output[index] === ESC && output[index + 1] === \"\\\\\") return [index + 1, \"\"];\n\t\t}\n\t\treturn [index, \"\"];\n\t}\n\t// Any other ESC sequence with its intermediates (charset selection, ...): dropped.\n\twhile (index < output.length && output.charCodeAt(index) >= 0x20 && output.charCodeAt(index) <= 0x2f) index++;\n\treturn [index, \"\"];\n}\n\n/** Whether the CSI sequence with parameters `body` and final `final` may reach the terminal. */\nfunction allowedCsi(body: string, final: string): boolean {\n\tif (body.length > 128) return false;\n\tif (final === \"h\" || final === \"l\") return body.startsWith(\"?\") && MODES.has(body.slice(1));\n\tif (final === \"m\") return /^[\\d;:]*$/.test(body) && !/\\d{5}/.test(body);\n\tif (!/^[\\d;]*$/.test(body) || /\\d{5}/.test(body)) return false;\n\tif (\"ABCDEFGHfd\".includes(final)) return body.split(\";\").length <= (\"Hf\".includes(final) ? 2 : 1);\n\tif (final === \"J\" || final === \"K\") return /^[012]?$/.test(body);\n\tif (final === \"r\") return /^(?:\\d{1,4};\\d{1,4})?$/.test(body);\n\treturn (final === \"s\" || final === \"u\") && body === \"\";\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type { PromptTerminal } from "./actions.ts";
|
|
2
|
+
export type { TerminalCredentials } from "./credentials.ts";
|
|
3
|
+
export { filterOutput } from "./filter.ts";
|
|
4
|
+
export { type RunningTerminal, startTerminal, type TerminalOptions, terminalFile } from "./launcher.ts";
|
|
5
|
+
export { requireSandboxNode } from "./sandbox.ts";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/tui/index.ts"],"names":[],"mappings":"AAGA,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,KAAK,eAAe,EAAE,aAAa,EAAE,KAAK,eAAe,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACxG,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Chord v2's terminal launcher (`@earendil-works/chord/tui/launcher`; slice 11 §4): the trusted Node side of a terminal
|
|
2
|
+
// client, running the app's terminal code in the sandbox.
|
|
3
|
+
export { filterOutput } from "./filter.js";
|
|
4
|
+
export { startTerminal, terminalFile } from "./launcher.js";
|
|
5
|
+
export { requireSandboxNode } from "./sandbox.js";
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node/tui/index.ts"],"names":[],"mappings":"AAAA,wHAAwH;AACxH,0DAA0D;AAI1D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAwB,aAAa,EAAwB,YAAY,EAAE,MAAM,eAAe,CAAC;AACxG,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC","sourcesContent":["// Chord v2's terminal launcher (`@earendil-works/chord/tui/launcher`; slice 11 §4): the trusted Node side of a terminal\n// client, running the app's terminal code in the sandbox.\n\nexport type { PromptTerminal } from \"./actions.ts\";\nexport type { TerminalCredentials } from \"./credentials.ts\";\nexport { filterOutput } from \"./filter.ts\";\nexport { type RunningTerminal, startTerminal, type TerminalOptions, terminalFile } from \"./launcher.ts\";\nexport { requireSandboxNode } from \"./sandbox.ts\";\n"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Readable, Writable } from "node:stream";
|
|
2
|
+
import type { ColorDepth } from "../../surfaces/index.ts";
|
|
3
|
+
import { type TerminalCredentials } from "./credentials.ts";
|
|
4
|
+
/** What `startTerminal` takes. */
|
|
5
|
+
export type TerminalOptions = {
|
|
6
|
+
/** The app's server (`http://127.0.0.1:8788`). */
|
|
7
|
+
readonly url: string;
|
|
8
|
+
readonly credentials: TerminalCredentials;
|
|
9
|
+
/** The terminal's input and output: the process's by default (raw mode while running, when a TTY). */
|
|
10
|
+
readonly input?: Readable & {
|
|
11
|
+
setRawMode?(raw: boolean): unknown;
|
|
12
|
+
readonly isTTY?: boolean;
|
|
13
|
+
};
|
|
14
|
+
readonly output?: Writable & {
|
|
15
|
+
readonly columns?: number;
|
|
16
|
+
readonly rows?: number;
|
|
17
|
+
};
|
|
18
|
+
/** How many colours the terminal shows: true colour when `COLORTERM` says so, else 256. */
|
|
19
|
+
readonly colors?: ColorDepth;
|
|
20
|
+
/** The terminal's background, choosing between the user's dark and light theme: dark by default. */
|
|
21
|
+
readonly mode?: "dark" | "light";
|
|
22
|
+
/** The user's languages, most preferred first, until they choose one: the system's locale by default. */
|
|
23
|
+
readonly locales?: readonly string[];
|
|
24
|
+
/** Opens a URL the user confirmed: the platform's opener by default. */
|
|
25
|
+
readonly opener?: (url: string) => Promise<void>;
|
|
26
|
+
};
|
|
27
|
+
/** A running terminal client: its exit code once it ends, and its stop. */
|
|
28
|
+
export type RunningTerminal = {
|
|
29
|
+
readonly exited: Promise<number>;
|
|
30
|
+
stop(): Promise<void>;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* `path` resolved on the server `server` when it names one of the terminal surface's files (dot segments and encodings
|
|
34
|
+
* resolved first: Opus M2, Fable L1); throws otherwise: the sandbox reaches nothing else of the server through the
|
|
35
|
+
* launcher's token.
|
|
36
|
+
*/
|
|
37
|
+
export declare function terminalFile(path: unknown, server: URL): string;
|
|
38
|
+
/** Starts a terminal client; rejects when it cannot sign in or download, or Node is too old for the sandbox. */
|
|
39
|
+
export declare function startTerminal(options: TerminalOptions): Promise<RunningTerminal>;
|
|
40
|
+
//# sourceMappingURL=launcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../../../src/node/tui/launcher.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAI1D,OAAO,EAAE,KAAK,mBAAmB,EAAW,MAAM,kBAAkB,CAAC;AAIrE,kCAAkC;AAClC,MAAM,MAAM,eAAe,GAAG;IAC7B,kDAAkD;IAClD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,WAAW,EAAE,mBAAmB,CAAC;IAC1C,sGAAsG;IACtG,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,GAAG;QAAE,UAAU,CAAC,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC;QAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAC7F,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,GAAG;QAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnF,2FAA2F;IAC3F,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC;IAC7B,oGAA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