@earendil-works/chord 1.4.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +92 -0
- package/README.md +115 -90
- package/dist/context/index.d.ts +1 -1
- package/dist/context/index.d.ts.map +1 -1
- package/dist/context/index.js +1 -1
- package/dist/context/index.js.map +1 -1
- package/dist/contracts/accepts.d.ts +81 -0
- package/dist/contracts/accepts.d.ts.map +1 -0
- package/dist/contracts/accepts.js +123 -0
- package/dist/contracts/accepts.js.map +1 -0
- package/dist/contracts/contract.d.ts +121 -0
- package/dist/contracts/contract.d.ts.map +1 -0
- package/dist/contracts/contract.js +50 -0
- package/dist/contracts/contract.js.map +1 -0
- package/dist/contracts/declare.d.ts +107 -0
- package/dist/contracts/declare.d.ts.map +1 -0
- package/dist/contracts/declare.js +136 -0
- package/dist/contracts/declare.js.map +1 -0
- package/dist/contracts/evolve.d.ts +92 -0
- package/dist/contracts/evolve.d.ts.map +1 -0
- package/dist/contracts/evolve.js +179 -0
- package/dist/contracts/evolve.js.map +1 -0
- package/dist/contracts/fingerprint.d.ts +16 -0
- package/dist/contracts/fingerprint.d.ts.map +1 -0
- package/dist/contracts/fingerprint.js +50 -0
- package/dist/contracts/fingerprint.js.map +1 -0
- package/dist/contracts/history.d.ts +71 -0
- package/dist/contracts/history.d.ts.map +1 -0
- package/dist/contracts/history.js +3 -0
- package/dist/contracts/history.js.map +1 -0
- package/dist/contracts/host-kind.d.ts +40 -0
- package/dist/contracts/host-kind.d.ts.map +1 -0
- package/dist/contracts/host-kind.js +37 -0
- package/dist/contracts/host-kind.js.map +1 -0
- package/dist/contracts/index.d.ts +7 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js +6 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/contracts/internal.d.ts +10 -0
- package/dist/contracts/internal.d.ts.map +1 -0
- package/dist/contracts/internal.js +9 -0
- package/dist/contracts/internal.js.map +1 -0
- package/dist/contracts/names.d.ts +3 -0
- package/dist/contracts/names.d.ts.map +1 -0
- package/dist/contracts/names.js +13 -0
- package/dist/contracts/names.js.map +1 -0
- package/dist/contracts/params.d.ts +28 -0
- package/dist/contracts/params.d.ts.map +1 -0
- package/dist/contracts/params.js +50 -0
- package/dist/contracts/params.js.map +1 -0
- package/dist/contracts/schema.d.ts +102 -0
- package/dist/contracts/schema.d.ts.map +1 -0
- package/dist/contracts/schema.js +103 -0
- package/dist/contracts/schema.js.map +1 -0
- package/dist/contracts/snapshot.d.ts +16 -0
- package/dist/contracts/snapshot.d.ts.map +1 -0
- package/dist/contracts/snapshot.js +167 -0
- package/dist/contracts/snapshot.js.map +1 -0
- package/dist/data/args.d.ts +50 -0
- package/dist/data/args.d.ts.map +1 -0
- package/dist/data/args.js +83 -0
- package/dist/data/args.js.map +1 -0
- package/dist/data/errors.d.ts +80 -0
- package/dist/data/errors.d.ts.map +1 -0
- package/dist/data/errors.js +116 -0
- package/dist/data/errors.js.map +1 -0
- package/dist/data/failure.d.ts +26 -0
- package/dist/data/failure.d.ts.map +1 -0
- package/dist/data/failure.js +77 -0
- package/dist/data/failure.js.map +1 -0
- package/dist/data/index.d.ts +4 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/index.js +5 -0
- package/dist/data/index.js.map +1 -0
- package/dist/data/internal.d.ts +7 -0
- package/dist/data/internal.d.ts.map +1 -0
- package/dist/data/internal.js +8 -0
- package/dist/data/internal.js.map +1 -0
- package/dist/data/params.d.ts +20 -0
- package/dist/data/params.d.ts.map +1 -0
- package/dist/data/params.js +31 -0
- package/dist/data/params.js.map +1 -0
- package/dist/data/principal.d.ts +22 -0
- package/dist/data/principal.d.ts.map +1 -0
- package/dist/data/principal.js +49 -0
- package/dist/data/principal.js.map +1 -0
- package/dist/data/validator.d.ts +12 -0
- package/dist/data/validator.d.ts.map +1 -0
- package/dist/data/validator.js +35 -0
- package/dist/data/validator.js.map +1 -0
- package/dist/delta/apply-immutable-trusted.js +3 -4
- package/dist/delta/apply-immutable-trusted.js.map +1 -1
- package/dist/delta/diff.d.ts.map +1 -1
- package/dist/delta/diff.js +5 -3
- package/dist/delta/diff.js.map +1 -1
- package/dist/delta/index.d.ts +9 -1
- package/dist/delta/index.d.ts.map +1 -1
- package/dist/delta/index.js +15 -11
- package/dist/delta/index.js.map +1 -1
- package/dist/delta/pending.d.ts +36 -0
- package/dist/delta/pending.d.ts.map +1 -0
- package/dist/delta/pending.js +143 -0
- package/dist/delta/pending.js.map +1 -0
- package/dist/delta/tracker.d.ts +12 -0
- package/dist/delta/tracker.d.ts.map +1 -1
- package/dist/delta/tracker.js +109 -39
- package/dist/delta/tracker.js.map +1 -1
- package/dist/documents/address-source.d.ts +20 -0
- package/dist/documents/address-source.d.ts.map +1 -0
- package/dist/documents/address-source.js +44 -0
- package/dist/documents/address-source.js.map +1 -0
- package/dist/documents/definition.d.ts +84 -0
- package/dist/documents/definition.d.ts.map +1 -0
- package/dist/documents/definition.js +74 -0
- package/dist/documents/definition.js.map +1 -0
- package/dist/documents/documents.d.ts +126 -0
- package/dist/documents/documents.d.ts.map +1 -0
- package/dist/documents/documents.js +248 -0
- package/dist/documents/documents.js.map +1 -0
- package/dist/documents/fence.d.ts +9 -0
- package/dist/documents/fence.d.ts.map +1 -0
- package/dist/documents/fence.js +15 -0
- package/dist/documents/fence.js.map +1 -0
- package/dist/documents/handles.d.ts +76 -0
- package/dist/documents/handles.d.ts.map +1 -0
- package/dist/documents/handles.js +66 -0
- package/dist/documents/handles.js.map +1 -0
- package/dist/documents/index.d.ts +4 -0
- package/dist/documents/index.d.ts.map +1 -0
- package/dist/documents/index.js +3 -0
- package/dist/documents/index.js.map +1 -0
- package/dist/documents/internal.d.ts +9 -0
- package/dist/documents/internal.d.ts.map +1 -0
- package/dist/documents/internal.js +9 -0
- package/dist/documents/internal.js.map +1 -0
- package/dist/documents/keyed-slot.d.ts +103 -0
- package/dist/documents/keyed-slot.d.ts.map +1 -0
- package/dist/documents/keyed-slot.js +395 -0
- package/dist/documents/keyed-slot.js.map +1 -0
- package/dist/documents/line.d.ts +7 -0
- package/dist/documents/line.d.ts.map +1 -0
- package/dist/documents/line.js +14 -0
- package/dist/documents/line.js.map +1 -0
- package/dist/documents/persistence.d.ts +104 -0
- package/dist/documents/persistence.d.ts.map +1 -0
- package/dist/documents/persistence.js +129 -0
- package/dist/documents/persistence.js.map +1 -0
- package/dist/documents/residency.d.ts +31 -0
- package/dist/documents/residency.d.ts.map +1 -0
- package/dist/documents/residency.js +93 -0
- package/dist/documents/residency.js.map +1 -0
- package/dist/documents/slot.d.ts +109 -0
- package/dist/documents/slot.d.ts.map +1 -0
- package/dist/documents/slot.js +181 -0
- package/dist/documents/slot.js.map +1 -0
- package/dist/documents/transaction.d.ts +143 -0
- package/dist/documents/transaction.d.ts.map +1 -0
- package/dist/documents/transaction.js +442 -0
- package/dist/documents/transaction.js.map +1 -0
- package/dist/host/activity.d.ts +31 -0
- package/dist/host/activity.d.ts.map +1 -0
- package/dist/host/activity.js +40 -0
- package/dist/host/activity.js.map +1 -0
- package/dist/host/adapted.d.ts +49 -0
- package/dist/host/adapted.d.ts.map +1 -0
- package/dist/host/adapted.js +214 -0
- package/dist/host/adapted.js.map +1 -0
- package/dist/host/attempt.d.ts +308 -0
- package/dist/host/attempt.d.ts.map +1 -0
- package/dist/host/attempt.js +1199 -0
- package/dist/host/attempt.js.map +1 -0
- package/dist/host/backoff.d.ts +29 -0
- package/dist/host/backoff.d.ts.map +1 -0
- package/dist/host/backoff.js +69 -0
- package/dist/host/backoff.js.map +1 -0
- package/dist/host/ctx.d.ts +94 -0
- package/dist/host/ctx.d.ts.map +1 -0
- package/dist/host/ctx.js +200 -0
- package/dist/host/ctx.js.map +1 -0
- package/dist/host/deadline.d.ts +12 -0
- package/dist/host/deadline.d.ts.map +1 -0
- package/dist/host/deadline.js +40 -0
- package/dist/host/deadline.js.map +1 -0
- package/dist/host/dependencies.d.ts +65 -0
- package/dist/host/dependencies.d.ts.map +1 -0
- package/dist/host/dependencies.js +115 -0
- package/dist/host/dependencies.js.map +1 -0
- package/dist/host/destination.d.ts +48 -0
- package/dist/host/destination.d.ts.map +1 -0
- package/dist/host/destination.js +101 -0
- package/dist/host/destination.js.map +1 -0
- package/dist/host/facet.d.ts +84 -0
- package/dist/host/facet.d.ts.map +1 -0
- package/dist/host/facet.js +55 -0
- package/dist/host/facet.js.map +1 -0
- package/dist/host/follow.d.ts +52 -0
- package/dist/host/follow.d.ts.map +1 -0
- package/dist/host/follow.js +207 -0
- package/dist/host/follow.js.map +1 -0
- package/dist/host/host.d.ts +571 -0
- package/dist/host/host.d.ts.map +1 -0
- package/dist/host/host.js +1318 -0
- package/dist/host/host.js.map +1 -0
- package/dist/host/index.d.ts +17 -0
- package/dist/host/index.d.ts.map +1 -0
- package/dist/host/index.js +6 -0
- package/dist/host/index.js.map +1 -0
- package/dist/host/internal.d.ts +11 -0
- package/dist/host/internal.d.ts.map +1 -0
- package/dist/host/internal.js +9 -0
- package/dist/host/internal.js.map +1 -0
- package/dist/host/members.d.ts +50 -0
- package/dist/host/members.d.ts.map +1 -0
- package/dist/host/members.js +107 -0
- package/dist/host/members.js.map +1 -0
- package/dist/host/native.d.ts +64 -0
- package/dist/host/native.d.ts.map +1 -0
- package/dist/host/native.js +126 -0
- package/dist/host/native.js.map +1 -0
- package/dist/host/object.d.ts +331 -0
- package/dist/host/object.d.ts.map +1 -0
- package/dist/host/object.js +1296 -0
- package/dist/host/object.js.map +1 -0
- package/dist/host/old-work.d.ts +34 -0
- package/dist/host/old-work.d.ts.map +1 -0
- package/dist/host/old-work.js +52 -0
- package/dist/host/old-work.js.map +1 -0
- package/dist/host/parked.d.ts +23 -0
- package/dist/host/parked.d.ts.map +1 -0
- package/dist/host/parked.js +79 -0
- package/dist/host/parked.js.map +1 -0
- package/dist/host/presence.d.ts +34 -0
- package/dist/host/presence.d.ts.map +1 -0
- package/dist/host/presence.js +117 -0
- package/dist/host/presence.js.map +1 -0
- package/dist/host/readiness.d.ts +27 -0
- package/dist/host/readiness.d.ts.map +1 -0
- package/dist/host/readiness.js +134 -0
- package/dist/host/readiness.js.map +1 -0
- package/dist/host/ref-state.d.ts +53 -0
- package/dist/host/ref-state.d.ts.map +1 -0
- package/dist/host/ref-state.js +83 -0
- package/dist/host/ref-state.js.map +1 -0
- package/dist/host/reference-keys.d.ts +36 -0
- package/dist/host/reference-keys.d.ts.map +1 -0
- package/dist/host/reference-keys.js +168 -0
- package/dist/host/reference-keys.js.map +1 -0
- package/dist/host/reference-source.d.ts +65 -0
- package/dist/host/reference-source.d.ts.map +1 -0
- package/dist/host/reference-source.js +285 -0
- package/dist/host/reference-source.js.map +1 -0
- package/dist/host/reference.d.ts +321 -0
- package/dist/host/reference.d.ts.map +1 -0
- package/dist/host/reference.js +797 -0
- package/dist/host/reference.js.map +1 -0
- package/dist/host/reload-cycle.d.ts +16 -0
- package/dist/host/reload-cycle.d.ts.map +1 -0
- package/dist/host/reload-cycle.js +81 -0
- package/dist/host/reload-cycle.js.map +1 -0
- package/dist/host/retry-on.d.ts +28 -0
- package/dist/host/retry-on.d.ts.map +1 -0
- package/dist/host/retry-on.js +52 -0
- package/dist/host/retry-on.js.map +1 -0
- package/dist/host/revocation.d.ts +16 -0
- package/dist/host/revocation.d.ts.map +1 -0
- package/dist/host/revocation.js +27 -0
- package/dist/host/revocation.js.map +1 -0
- package/dist/host/root.d.ts +37 -0
- package/dist/host/root.d.ts.map +1 -0
- package/dist/host/root.js +68 -0
- package/dist/host/root.js.map +1 -0
- package/dist/host/route.d.ts +64 -0
- package/dist/host/route.d.ts.map +1 -0
- package/dist/host/route.js +227 -0
- package/dist/host/route.js.map +1 -0
- package/dist/host/routines.d.ts +78 -0
- package/dist/host/routines.d.ts.map +1 -0
- package/dist/host/routines.js +398 -0
- package/dist/host/routines.js.map +1 -0
- package/dist/host/sleep.d.ts +9 -0
- package/dist/host/sleep.d.ts.map +1 -0
- package/dist/host/sleep.js +40 -0
- package/dist/host/sleep.js.map +1 -0
- package/dist/host/staging.d.ts +94 -0
- package/dist/host/staging.d.ts.map +1 -0
- package/dist/host/staging.js +304 -0
- package/dist/host/staging.js.map +1 -0
- package/dist/host/unbound-clock.d.ts +23 -0
- package/dist/host/unbound-clock.d.ts.map +1 -0
- package/dist/host/unbound-clock.js +58 -0
- package/dist/host/unbound-clock.js.map +1 -0
- package/dist/host/unbound.d.ts +37 -0
- package/dist/host/unbound.d.ts.map +1 -0
- package/dist/host/unbound.js +88 -0
- package/dist/host/unbound.js.map +1 -0
- package/dist/host/uuid.d.ts +3 -0
- package/dist/host/uuid.d.ts.map +1 -0
- package/dist/host/uuid.js +38 -0
- package/dist/host/uuid.js.map +1 -0
- package/dist/index.d.ts +29 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -9
- package/dist/index.js.map +1 -1
- package/dist/jobs/definition.d.ts +96 -0
- package/dist/jobs/definition.d.ts.map +1 -0
- package/dist/jobs/definition.js +83 -0
- package/dist/jobs/definition.js.map +1 -0
- package/dist/jobs/index.d.ts +5 -0
- package/dist/jobs/index.d.ts.map +1 -0
- package/dist/jobs/index.js +3 -0
- package/dist/jobs/index.js.map +1 -0
- package/dist/jobs/internal.d.ts +3 -0
- package/dist/jobs/internal.d.ts.map +1 -0
- package/dist/jobs/internal.js +4 -0
- package/dist/jobs/internal.js.map +1 -0
- package/dist/jobs/job.d.ts +149 -0
- package/dist/jobs/job.d.ts.map +1 -0
- package/dist/jobs/job.js +387 -0
- package/dist/jobs/job.js.map +1 -0
- package/dist/jobs/persisted.d.ts +38 -0
- package/dist/jobs/persisted.d.ts.map +1 -0
- package/dist/jobs/persisted.js +95 -0
- package/dist/jobs/persisted.js.map +1 -0
- package/dist/jobs/records.d.ts +231 -0
- package/dist/jobs/records.d.ts.map +1 -0
- package/dist/jobs/records.js +871 -0
- package/dist/jobs/records.js.map +1 -0
- package/dist/jobs/run-states.d.ts +69 -0
- package/dist/jobs/run-states.d.ts.map +1 -0
- package/dist/jobs/run-states.js +228 -0
- package/dist/jobs/run-states.js.map +1 -0
- package/dist/jobs/run.d.ts +117 -0
- package/dist/jobs/run.d.ts.map +1 -0
- package/dist/jobs/run.js +204 -0
- package/dist/jobs/run.js.map +1 -0
- package/dist/jobs/running.d.ts +44 -0
- package/dist/jobs/running.d.ts.map +1 -0
- package/dist/jobs/running.js +117 -0
- package/dist/jobs/running.js.map +1 -0
- package/dist/jobs/stored.d.ts +63 -0
- package/dist/jobs/stored.d.ts.map +1 -0
- package/dist/jobs/stored.js +55 -0
- package/dist/jobs/stored.js.map +1 -0
- package/dist/link/binary.d.ts +4 -0
- package/dist/link/binary.d.ts.map +1 -0
- package/dist/link/binary.js +544 -0
- package/dist/link/binary.js.map +1 -0
- package/dist/link/channel.d.ts +68 -0
- package/dist/link/channel.d.ts.map +1 -0
- package/dist/link/channel.js +215 -0
- package/dist/link/channel.js.map +1 -0
- package/dist/link/errors.d.ts +7 -0
- package/dist/link/errors.d.ts.map +1 -0
- package/dist/link/errors.js +21 -0
- package/dist/link/errors.js.map +1 -0
- package/dist/link/index.d.ts +8 -0
- package/dist/link/index.d.ts.map +1 -0
- package/dist/link/index.js +8 -0
- package/dist/link/index.js.map +1 -0
- package/dist/link/internal.d.ts +9 -0
- package/dist/link/internal.d.ts.map +1 -0
- package/dist/link/internal.js +10 -0
- package/dist/link/internal.js.map +1 -0
- package/dist/link/ipc.d.ts +22 -0
- package/dist/link/ipc.d.ts.map +1 -0
- package/dist/link/ipc.js +64 -0
- package/dist/link/ipc.js.map +1 -0
- package/dist/link/link.d.ts +34 -0
- package/dist/link/link.d.ts.map +1 -0
- package/dist/link/link.js +87 -0
- package/dist/link/link.js.map +1 -0
- package/dist/link/message.d.ts +262 -0
- package/dist/link/message.d.ts.map +1 -0
- package/dist/link/message.js +156 -0
- package/dist/link/message.js.map +1 -0
- package/dist/link/part.d.ts +80 -0
- package/dist/link/part.d.ts.map +1 -0
- package/dist/link/part.js +165 -0
- package/dist/link/part.js.map +1 -0
- package/dist/link/text.d.ts +6 -0
- package/dist/link/text.d.ts.map +1 -0
- package/dist/link/text.js +355 -0
- package/dist/link/text.js.map +1 -0
- package/dist/link/values.d.ts +40 -0
- package/dist/link/values.d.ts.map +1 -0
- package/dist/link/values.js +121 -0
- package/dist/link/values.js.map +1 -0
- package/dist/link/websocket.d.ts +26 -0
- package/dist/link/websocket.d.ts.map +1 -0
- package/dist/link/websocket.js +91 -0
- package/dist/link/websocket.js.map +1 -0
- package/dist/node/app/app.d.ts +269 -0
- package/dist/node/app/app.d.ts.map +1 -0
- package/dist/node/app/app.js +513 -0
- package/dist/node/app/app.js.map +1 -0
- package/dist/node/app/archive.d.ts +37 -0
- package/dist/node/app/archive.d.ts.map +1 -0
- package/dist/node/app/archive.js +204 -0
- package/dist/node/app/archive.js.map +1 -0
- package/dist/node/app/blobs.d.ts +23 -0
- package/dist/node/app/blobs.d.ts.map +1 -0
- package/dist/node/app/blobs.js +64 -0
- package/dist/node/app/blobs.js.map +1 -0
- package/dist/node/app/data.d.ts +35 -0
- package/dist/node/app/data.d.ts.map +1 -0
- package/dist/node/app/data.js +44 -0
- package/dist/node/app/data.js.map +1 -0
- package/dist/node/app/ephemeral-sessions.d.ts +20 -0
- package/dist/node/app/ephemeral-sessions.d.ts.map +1 -0
- package/dist/node/app/ephemeral-sessions.js +69 -0
- package/dist/node/app/ephemeral-sessions.js.map +1 -0
- package/dist/node/app/ephemeral.d.ts +11 -0
- package/dist/node/app/ephemeral.d.ts.map +1 -0
- package/dist/node/app/ephemeral.js +34 -0
- package/dist/node/app/ephemeral.js.map +1 -0
- package/dist/node/app/files-copy.d.ts +13 -0
- package/dist/node/app/files-copy.d.ts.map +1 -0
- package/dist/node/app/files-copy.js +86 -0
- package/dist/node/app/files-copy.js.map +1 -0
- package/dist/node/app/files-entry.d.ts +4 -0
- package/dist/node/app/files-entry.d.ts.map +1 -0
- package/dist/node/app/files-entry.js +7 -0
- package/dist/node/app/files-entry.js.map +1 -0
- package/dist/node/app/files-index.d.ts +180 -0
- package/dist/node/app/files-index.d.ts.map +1 -0
- package/dist/node/app/files-index.js +535 -0
- package/dist/node/app/files-index.js.map +1 -0
- package/dist/node/app/files.d.ts +363 -0
- package/dist/node/app/files.d.ts.map +1 -0
- package/dist/node/app/files.js +368 -0
- package/dist/node/app/files.js.map +1 -0
- package/dist/node/app/folder-views.d.ts +21 -0
- package/dist/node/app/folder-views.d.ts.map +1 -0
- package/dist/node/app/folder-views.js +55 -0
- package/dist/node/app/folder-views.js.map +1 -0
- package/dist/node/app/index.d.ts +12 -0
- package/dist/node/app/index.d.ts.map +1 -0
- package/dist/node/app/index.js +15 -0
- package/dist/node/app/index.js.map +1 -0
- package/dist/node/app/info.d.ts +66 -0
- package/dist/node/app/info.d.ts.map +1 -0
- package/dist/node/app/info.js +37 -0
- package/dist/node/app/info.js.map +1 -0
- package/dist/node/app/invite.d.ts +5 -0
- package/dist/node/app/invite.d.ts.map +1 -0
- package/dist/node/app/invite.js +64 -0
- package/dist/node/app/invite.js.map +1 -0
- package/dist/node/app/layout.d.ts +36 -0
- package/dist/node/app/layout.d.ts.map +1 -0
- package/dist/node/app/layout.js +87 -0
- package/dist/node/app/layout.js.map +1 -0
- package/dist/node/app/owner.d.ts +31 -0
- package/dist/node/app/owner.d.ts.map +1 -0
- package/dist/node/app/owner.js +104 -0
- package/dist/node/app/owner.js.map +1 -0
- package/dist/node/app/pairing.d.ts +55 -0
- package/dist/node/app/pairing.d.ts.map +1 -0
- package/dist/node/app/pairing.js +183 -0
- package/dist/node/app/pairing.js.map +1 -0
- package/dist/node/app/secrets.d.ts +16 -0
- package/dist/node/app/secrets.d.ts.map +1 -0
- package/dist/node/app/secrets.js +72 -0
- package/dist/node/app/secrets.js.map +1 -0
- package/dist/node/app/sessions.d.ts +72 -0
- package/dist/node/app/sessions.d.ts.map +1 -0
- package/dist/node/app/sessions.js +222 -0
- package/dist/node/app/sessions.js.map +1 -0
- package/dist/node/app/tar.d.ts +24 -0
- package/dist/node/app/tar.d.ts.map +1 -0
- package/dist/node/app/tar.js +167 -0
- package/dist/node/app/tar.js.map +1 -0
- package/dist/node/app/uploads.d.ts +37 -0
- package/dist/node/app/uploads.d.ts.map +1 -0
- package/dist/node/app/uploads.js +157 -0
- package/dist/node/app/uploads.js.map +1 -0
- package/dist/node/app/users.d.ts +37 -0
- package/dist/node/app/users.d.ts.map +1 -0
- package/dist/node/app/users.js +62 -0
- package/dist/node/app/users.js.map +1 -0
- package/dist/node/app/worker.d.ts +18 -0
- package/dist/node/app/worker.d.ts.map +1 -0
- package/dist/node/app/worker.js +84 -0
- package/dist/node/app/worker.js.map +1 -0
- package/dist/node/compression.d.ts +7 -0
- package/dist/node/compression.d.ts.map +1 -0
- package/dist/node/compression.js +25 -0
- package/dist/node/compression.js.map +1 -0
- package/dist/node/http/admission.d.ts +63 -0
- package/dist/node/http/admission.d.ts.map +1 -0
- package/dist/node/http/admission.js +134 -0
- package/dist/node/http/admission.js.map +1 -0
- package/dist/node/http/authenticate.d.ts +21 -0
- package/dist/node/http/authenticate.d.ts.map +1 -0
- package/dist/node/http/authenticate.js +34 -0
- package/dist/node/http/authenticate.js.map +1 -0
- package/dist/node/http/cookies.d.ts +32 -0
- package/dist/node/http/cookies.d.ts.map +1 -0
- package/dist/node/http/cookies.js +70 -0
- package/dist/node/http/cookies.js.map +1 -0
- package/dist/node/http/file.d.ts +23 -0
- package/dist/node/http/file.d.ts.map +1 -0
- package/dist/node/http/file.js +94 -0
- package/dist/node/http/file.js.map +1 -0
- package/dist/node/http/headers.d.ts +37 -0
- package/dist/node/http/headers.d.ts.map +1 -0
- package/dist/node/http/headers.js +136 -0
- package/dist/node/http/headers.js.map +1 -0
- package/dist/node/http/http.d.ts +111 -0
- package/dist/node/http/http.d.ts.map +1 -0
- package/dist/node/http/http.js +524 -0
- package/dist/node/http/http.js.map +1 -0
- package/dist/node/http/incoming.d.ts +19 -0
- package/dist/node/http/incoming.d.ts.map +1 -0
- package/dist/node/http/incoming.js +31 -0
- package/dist/node/http/incoming.js.map +1 -0
- package/dist/node/http/index.d.ts +11 -0
- package/dist/node/http/index.d.ts.map +1 -0
- package/dist/node/http/index.js +12 -0
- package/dist/node/http/index.js.map +1 -0
- package/dist/node/http/node.d.ts +78 -0
- package/dist/node/http/node.d.ts.map +1 -0
- package/dist/node/http/node.js +291 -0
- package/dist/node/http/node.js.map +1 -0
- package/dist/node/http/request.d.ts +60 -0
- package/dist/node/http/request.d.ts.map +1 -0
- package/dist/node/http/request.js +118 -0
- package/dist/node/http/request.js.map +1 -0
- package/dist/node/http/response.d.ts +63 -0
- package/dist/node/http/response.d.ts.map +1 -0
- package/dist/node/http/response.js +202 -0
- package/dist/node/http/response.js.map +1 -0
- package/dist/node/http/router.d.ts +132 -0
- package/dist/node/http/router.d.ts.map +1 -0
- package/dist/node/http/router.js +267 -0
- package/dist/node/http/router.js.map +1 -0
- package/dist/node/http/upgrades.d.ts +61 -0
- package/dist/node/http/upgrades.d.ts.map +1 -0
- package/dist/node/http/upgrades.js +192 -0
- package/dist/node/http/upgrades.js.map +1 -0
- package/dist/node/plugins/base-inputs.d.ts +14 -0
- package/dist/node/plugins/base-inputs.d.ts.map +1 -0
- package/dist/node/plugins/base-inputs.js +33 -0
- package/dist/node/plugins/base-inputs.js.map +1 -0
- package/dist/node/plugins/build.d.ts +77 -0
- package/dist/node/plugins/build.d.ts.map +1 -0
- package/dist/node/plugins/build.js +576 -0
- package/dist/node/plugins/build.js.map +1 -0
- package/dist/node/plugins/css-modules.d.ts +13 -0
- package/dist/node/plugins/css-modules.d.ts.map +1 -0
- package/dist/node/plugins/css-modules.js +58 -0
- package/dist/node/plugins/css-modules.js.map +1 -0
- package/dist/node/plugins/discover.d.ts +67 -0
- package/dist/node/plugins/discover.d.ts.map +1 -0
- package/dist/node/plugins/discover.js +369 -0
- package/dist/node/plugins/discover.js.map +1 -0
- package/dist/node/plugins/evaluate.d.ts +33 -0
- package/dist/node/plugins/evaluate.d.ts.map +1 -0
- package/dist/node/plugins/evaluate.js +121 -0
- package/dist/node/plugins/evaluate.js.map +1 -0
- package/dist/node/plugins/index.d.ts +11 -0
- package/dist/node/plugins/index.d.ts.map +1 -0
- package/dist/node/plugins/index.js +13 -0
- package/dist/node/plugins/index.js.map +1 -0
- package/dist/node/plugins/install.d.ts +38 -0
- package/dist/node/plugins/install.d.ts.map +1 -0
- package/dist/node/plugins/install.js +213 -0
- package/dist/node/plugins/install.js.map +1 -0
- package/dist/node/plugins/plugins.d.ts +162 -0
- package/dist/node/plugins/plugins.d.ts.map +1 -0
- package/dist/node/plugins/plugins.js +244 -0
- package/dist/node/plugins/plugins.js.map +1 -0
- package/dist/node/plugins/runtime.d.ts +57 -0
- package/dist/node/plugins/runtime.d.ts.map +1 -0
- package/dist/node/plugins/runtime.js +92 -0
- package/dist/node/plugins/runtime.js.map +1 -0
- package/dist/node/plugins/stack.d.ts +16 -0
- package/dist/node/plugins/stack.d.ts.map +1 -0
- package/dist/node/plugins/stack.js +61 -0
- package/dist/node/plugins/stack.js.map +1 -0
- package/dist/node/plugins/testing.d.ts +58 -0
- package/dist/node/plugins/testing.d.ts.map +1 -0
- package/dist/node/plugins/testing.js +210 -0
- package/dist/node/plugins/testing.js.map +1 -0
- package/dist/node/plugins/watcher.d.ts +69 -0
- package/dist/node/plugins/watcher.d.ts.map +1 -0
- package/dist/node/plugins/watcher.js +622 -0
- package/dist/node/plugins/watcher.js.map +1 -0
- package/dist/node/surfaces/bundle.d.ts +31 -0
- package/dist/node/surfaces/bundle.d.ts.map +1 -0
- package/dist/node/surfaces/bundle.js +118 -0
- package/dist/node/surfaces/bundle.js.map +1 -0
- package/dist/node/surfaces/current.d.ts +17 -0
- package/dist/node/surfaces/current.d.ts.map +1 -0
- package/dist/node/surfaces/current.js +54 -0
- package/dist/node/surfaces/current.js.map +1 -0
- package/dist/node/surfaces/index.d.ts +6 -0
- package/dist/node/surfaces/index.d.ts.map +1 -0
- package/dist/node/surfaces/index.js +6 -0
- package/dist/node/surfaces/index.js.map +1 -0
- package/dist/node/surfaces/published.d.ts +27 -0
- package/dist/node/surfaces/published.d.ts.map +1 -0
- package/dist/node/surfaces/published.js +142 -0
- package/dist/node/surfaces/published.js.map +1 -0
- package/dist/node/surfaces/served.d.ts +15 -0
- package/dist/node/surfaces/served.d.ts.map +1 -0
- package/dist/node/surfaces/served.js +42 -0
- package/dist/node/surfaces/served.js.map +1 -0
- package/dist/node/surfaces/surface-build.d.ts +53 -0
- package/dist/node/surfaces/surface-build.d.ts.map +1 -0
- package/dist/node/surfaces/surface-build.js +105 -0
- package/dist/node/surfaces/surface-build.js.map +1 -0
- package/dist/node/surfaces/tui.d.ts +40 -0
- package/dist/node/surfaces/tui.d.ts.map +1 -0
- package/dist/node/surfaces/tui.js +55 -0
- package/dist/node/surfaces/tui.js.map +1 -0
- package/dist/node/surfaces/web.d.ts +56 -0
- package/dist/node/surfaces/web.d.ts.map +1 -0
- package/dist/node/surfaces/web.js +108 -0
- package/dist/node/surfaces/web.js.map +1 -0
- package/dist/node/tui/actions.d.ts +49 -0
- package/dist/node/tui/actions.d.ts.map +1 -0
- package/dist/node/tui/actions.js +195 -0
- package/dist/node/tui/actions.js.map +1 -0
- package/dist/node/tui/credentials.d.ts +17 -0
- package/dist/node/tui/credentials.d.ts.map +1 -0
- package/dist/node/tui/credentials.js +54 -0
- package/dist/node/tui/credentials.js.map +1 -0
- package/dist/node/tui/filter.d.ts +5 -0
- package/dist/node/tui/filter.d.ts.map +1 -0
- package/dist/node/tui/filter.js +79 -0
- package/dist/node/tui/filter.js.map +1 -0
- package/dist/node/tui/index.d.ts +6 -0
- package/dist/node/tui/index.d.ts.map +1 -0
- package/dist/node/tui/index.js +6 -0
- package/dist/node/tui/index.js.map +1 -0
- package/dist/node/tui/launcher.d.ts +40 -0
- package/dist/node/tui/launcher.d.ts.map +1 -0
- package/dist/node/tui/launcher.js +439 -0
- package/dist/node/tui/launcher.js.map +1 -0
- package/dist/node/tui/pipe.d.ts +18 -0
- package/dist/node/tui/pipe.d.ts.map +1 -0
- package/dist/node/tui/pipe.js +134 -0
- package/dist/node/tui/pipe.js.map +1 -0
- package/dist/node/tui/sandbox.d.ts +54 -0
- package/dist/node/tui/sandbox.d.ts.map +1 -0
- package/dist/node/tui/sandbox.js +431 -0
- package/dist/node/tui/sandbox.js.map +1 -0
- package/dist/node/workers/base.d.ts +30 -0
- package/dist/node/workers/base.d.ts.map +1 -0
- package/dist/node/workers/base.js +255 -0
- package/dist/node/workers/base.js.map +1 -0
- package/dist/node/workers/child.d.ts +4 -0
- package/dist/node/workers/child.d.ts.map +1 -0
- package/dist/node/workers/child.js +6 -0
- package/dist/node/workers/child.js.map +1 -0
- package/dist/node/workers/control.d.ts +83 -0
- package/dist/node/workers/control.d.ts.map +1 -0
- package/dist/node/workers/control.js +77 -0
- package/dist/node/workers/control.js.map +1 -0
- package/dist/node/workers/index.d.ts +4 -0
- package/dist/node/workers/index.d.ts.map +1 -0
- package/dist/node/workers/index.js +7 -0
- package/dist/node/workers/index.js.map +1 -0
- package/dist/node/workers/lock.d.ts +30 -0
- package/dist/node/workers/lock.d.ts.map +1 -0
- package/dist/node/workers/lock.js +180 -0
- package/dist/node/workers/lock.js.map +1 -0
- package/dist/node/workers/main.d.ts +46 -0
- package/dist/node/workers/main.d.ts.map +1 -0
- package/dist/node/workers/main.js +230 -0
- package/dist/node/workers/main.js.map +1 -0
- package/dist/node/workers/process.d.ts +42 -0
- package/dist/node/workers/process.d.ts.map +1 -0
- package/dist/node/workers/process.js +125 -0
- package/dist/node/workers/process.js.map +1 -0
- package/dist/node/workers/workers.d.ts +122 -0
- package/dist/node/workers/workers.d.ts.map +1 -0
- package/dist/node/workers/workers.js +677 -0
- package/dist/node/workers/workers.js.map +1 -0
- package/dist/output.d.ts +1 -1
- package/dist/output.d.ts.map +1 -1
- package/dist/output.js +4 -2
- package/dist/output.js.map +1 -1
- package/dist/react/hooks.d.ts +43 -0
- package/dist/react/hooks.d.ts.map +1 -0
- package/dist/react/hooks.js +82 -0
- package/dist/react/hooks.js.map +1 -0
- package/dist/react/index.d.ts +3 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +4 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/stores.d.ts +9 -0
- package/dist/react/stores.d.ts.map +1 -0
- package/dist/react/stores.js +37 -0
- package/dist/react/stores.js.map +1 -0
- package/dist/registries/contribution.d.ts +50 -0
- package/dist/registries/contribution.d.ts.map +1 -0
- package/dist/registries/contribution.js +129 -0
- package/dist/registries/contribution.js.map +1 -0
- package/dist/registries/entries.d.ts +18 -0
- package/dist/registries/entries.d.ts.map +1 -0
- package/dist/registries/entries.js +42 -0
- package/dist/registries/entries.js.map +1 -0
- package/dist/registries/index.d.ts +3 -0
- package/dist/registries/index.d.ts.map +1 -0
- package/dist/registries/index.js +5 -0
- package/dist/registries/index.js.map +1 -0
- package/dist/registries/internal.d.ts +4 -0
- package/dist/registries/internal.d.ts.map +1 -0
- package/dist/registries/internal.js +5 -0
- package/dist/registries/internal.js.map +1 -0
- package/dist/registries/record.d.ts +115 -0
- package/dist/registries/record.d.ts.map +1 -0
- package/dist/registries/record.js +283 -0
- package/dist/registries/record.js.map +1 -0
- package/dist/registries/registry.d.ts +74 -0
- package/dist/registries/registry.d.ts.map +1 -0
- package/dist/registries/registry.js +14 -0
- package/dist/registries/registry.js.map +1 -0
- package/dist/registries/value.d.ts +48 -0
- package/dist/registries/value.d.ts.map +1 -0
- package/dist/registries/value.js +224 -0
- package/dist/registries/value.js.map +1 -0
- package/dist/remote/calls.d.ts +25 -0
- package/dist/remote/calls.d.ts.map +1 -0
- package/dist/remote/calls.js +62 -0
- package/dist/remote/calls.js.map +1 -0
- package/dist/remote/consumer.d.ts +43 -0
- package/dist/remote/consumer.d.ts.map +1 -0
- package/dist/remote/consumer.js +350 -0
- package/dist/remote/consumer.js.map +1 -0
- package/dist/remote/hold.d.ts +141 -0
- package/dist/remote/hold.d.ts.map +1 -0
- package/dist/remote/hold.js +579 -0
- package/dist/remote/hold.js.map +1 -0
- package/dist/remote/host-link.d.ts +77 -0
- package/dist/remote/host-link.d.ts.map +1 -0
- package/dist/remote/host-link.js +184 -0
- package/dist/remote/host-link.js.map +1 -0
- package/dist/remote/internal.d.ts +6 -0
- package/dist/remote/internal.d.ts.map +1 -0
- package/dist/remote/internal.js +6 -0
- package/dist/remote/internal.js.map +1 -0
- package/dist/remote/path.d.ts +46 -0
- package/dist/remote/path.d.ts.map +1 -0
- package/dist/remote/path.js +73 -0
- package/dist/remote/path.js.map +1 -0
- package/dist/remote/provider.d.ts +89 -0
- package/dist/remote/provider.d.ts.map +1 -0
- package/dist/remote/provider.js +597 -0
- package/dist/remote/provider.js.map +1 -0
- package/dist/remote/relay.d.ts +69 -0
- package/dist/remote/relay.d.ts.map +1 -0
- package/dist/remote/relay.js +219 -0
- package/dist/remote/relay.js.map +1 -0
- package/dist/remote/remote-object.d.ts +138 -0
- package/dist/remote/remote-object.d.ts.map +1 -0
- package/dist/remote/remote-object.js +492 -0
- package/dist/remote/remote-object.js.map +1 -0
- package/dist/remote/replica.d.ts +59 -0
- package/dist/remote/replica.d.ts.map +1 -0
- package/dist/remote/replica.js +125 -0
- package/dist/remote/replica.js.map +1 -0
- package/dist/sqlite/cloudflare.d.ts +2 -0
- package/dist/sqlite/cloudflare.d.ts.map +1 -1
- package/dist/sqlite/cloudflare.js +10 -0
- package/dist/sqlite/cloudflare.js.map +1 -1
- package/dist/sqlite/database.d.ts +5 -2
- package/dist/sqlite/database.d.ts.map +1 -1
- package/dist/sqlite/database.js.map +1 -1
- package/dist/sqlite/node.d.ts +13 -2
- package/dist/sqlite/node.d.ts.map +1 -1
- package/dist/sqlite/node.js +31 -8
- package/dist/sqlite/node.js.map +1 -1
- package/dist/state/batch.d.ts +64 -0
- package/dist/state/batch.d.ts.map +1 -0
- package/dist/state/batch.js +164 -0
- package/dist/state/batch.js.map +1 -0
- package/dist/state/derive.d.ts +52 -0
- package/dist/state/derive.d.ts.map +1 -0
- package/dist/state/derive.js +182 -0
- package/dist/state/derive.js.map +1 -0
- package/dist/state/index.d.ts +6 -0
- package/dist/state/index.d.ts.map +1 -0
- package/dist/state/index.js +4 -0
- package/dist/state/index.js.map +1 -0
- package/dist/state/internal.d.ts +6 -0
- package/dist/state/internal.d.ts.map +1 -0
- package/dist/state/internal.js +8 -0
- package/dist/state/internal.js.map +1 -0
- package/dist/state/native-source.d.ts +106 -0
- package/dist/state/native-source.d.ts.map +1 -0
- package/dist/state/native-source.js +240 -0
- package/dist/state/native-source.js.map +1 -0
- package/dist/state/watchable.d.ts +114 -0
- package/dist/state/watchable.d.ts.map +1 -0
- package/dist/state/watchable.js +156 -0
- package/dist/state/watchable.js.map +1 -0
- package/dist/state/writable.d.ts +32 -0
- package/dist/state/writable.d.ts.map +1 -0
- package/dist/state/writable.js +49 -0
- package/dist/state/writable.js.map +1 -0
- package/dist/store/adapter.d.ts +67 -0
- package/dist/store/adapter.d.ts.map +1 -0
- package/dist/store/adapter.js +118 -0
- package/dist/store/adapter.js.map +1 -0
- package/dist/store/allocator.d.ts +17 -0
- package/dist/store/allocator.d.ts.map +1 -0
- package/dist/store/allocator.js +30 -0
- package/dist/store/allocator.js.map +1 -0
- package/dist/store/applier.d.ts +8 -0
- package/dist/store/applier.d.ts.map +1 -0
- package/dist/store/applier.js +375 -0
- package/dist/store/applier.js.map +1 -0
- package/dist/store/apply-batch.d.ts +12 -0
- package/dist/store/apply-batch.d.ts.map +1 -0
- package/dist/store/apply-batch.js +83 -0
- package/dist/store/apply-batch.js.map +1 -0
- package/dist/store/archive.d.ts +32 -0
- package/dist/store/archive.d.ts.map +1 -0
- package/dist/store/archive.js +130 -0
- package/dist/store/archive.js.map +1 -0
- package/dist/store/backend.d.ts +10 -0
- package/dist/store/backend.d.ts.map +1 -0
- package/dist/store/backend.js +15 -0
- package/dist/store/backend.js.map +1 -0
- package/dist/store/catalog.d.ts +24 -0
- package/dist/store/catalog.d.ts.map +1 -0
- package/dist/store/catalog.js +17 -0
- package/dist/store/catalog.js.map +1 -0
- package/dist/store/claims.d.ts +23 -0
- package/dist/store/claims.d.ts.map +1 -0
- package/dist/store/claims.js +65 -0
- package/dist/store/claims.js.map +1 -0
- package/dist/store/columns.d.ts +77 -0
- package/dist/store/columns.d.ts.map +1 -0
- package/dist/store/columns.js +77 -0
- package/dist/store/columns.js.map +1 -0
- package/dist/store/engine.d.ts +176 -0
- package/dist/store/engine.d.ts.map +1 -0
- package/dist/store/engine.js +283 -0
- package/dist/store/engine.js.map +1 -0
- package/dist/store/evaluate.d.ts +17 -0
- package/dist/store/evaluate.d.ts.map +1 -0
- package/dist/store/evaluate.js +128 -0
- package/dist/store/evaluate.js.map +1 -0
- package/dist/store/export.d.ts +17 -0
- package/dist/store/export.d.ts.map +1 -0
- package/dist/store/export.js +200 -0
- package/dist/store/export.js.map +1 -0
- package/dist/store/expression.d.ts +150 -0
- package/dist/store/expression.d.ts.map +1 -0
- package/dist/store/expression.js +268 -0
- package/dist/store/expression.js.map +1 -0
- package/dist/store/import.d.ts +10 -0
- package/dist/store/import.d.ts.map +1 -0
- package/dist/store/import.js +276 -0
- package/dist/store/import.js.map +1 -0
- package/dist/store/index.d.ts +16 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +13 -0
- package/dist/store/index.js.map +1 -0
- package/dist/store/json-column.d.ts +33 -0
- package/dist/store/json-column.d.ts.map +1 -0
- package/dist/store/json-column.js +62 -0
- package/dist/store/json-column.js.map +1 -0
- package/dist/store/jsonl.d.ts +9 -0
- package/dist/store/jsonl.d.ts.map +1 -0
- package/dist/store/jsonl.js +61 -0
- package/dist/store/jsonl.js.map +1 -0
- package/dist/store/live-query.d.ts +108 -0
- package/dist/store/live-query.d.ts.map +1 -0
- package/dist/store/live-query.js +254 -0
- package/dist/store/live-query.js.map +1 -0
- package/dist/store/outbox.d.ts +26 -0
- package/dist/store/outbox.d.ts.map +1 -0
- package/dist/store/outbox.js +80 -0
- package/dist/store/outbox.js.map +1 -0
- package/dist/store/query.d.ts +39 -0
- package/dist/store/query.d.ts.map +1 -0
- package/dist/store/query.js +97 -0
- package/dist/store/query.js.map +1 -0
- package/dist/store/refusal.d.ts +15 -0
- package/dist/store/refusal.d.ts.map +1 -0
- package/dist/store/refusal.js +36 -0
- package/dist/store/refusal.js.map +1 -0
- package/dist/store/rows.d.ts +80 -0
- package/dist/store/rows.d.ts.map +1 -0
- package/dist/store/rows.js +183 -0
- package/dist/store/rows.js.map +1 -0
- package/dist/store/schema.d.ts +25 -0
- package/dist/store/schema.d.ts.map +1 -0
- package/dist/store/schema.js +115 -0
- package/dist/store/schema.js.map +1 -0
- package/dist/store/sql.d.ts +73 -0
- package/dist/store/sql.d.ts.map +1 -0
- package/dist/store/sql.js +234 -0
- package/dist/store/sql.js.map +1 -0
- package/dist/store/step.d.ts +50 -0
- package/dist/store/step.d.ts.map +1 -0
- package/dist/store/step.js +52 -0
- package/dist/store/step.js.map +1 -0
- package/dist/store/store.d.ts +171 -0
- package/dist/store/store.d.ts.map +1 -0
- package/dist/store/store.js +818 -0
- package/dist/store/store.js.map +1 -0
- package/dist/store/table-changes.d.ts +29 -0
- package/dist/store/table-changes.d.ts.map +1 -0
- package/dist/store/table-changes.js +102 -0
- package/dist/store/table-changes.js.map +1 -0
- package/dist/store/table-evolve.d.ts +74 -0
- package/dist/store/table-evolve.d.ts.map +1 -0
- package/dist/store/table-evolve.js +201 -0
- package/dist/store/table-evolve.js.map +1 -0
- package/dist/store/table-handle.d.ts +73 -0
- package/dist/store/table-handle.d.ts.map +1 -0
- package/dist/store/table-handle.js +101 -0
- package/dist/store/table-handle.js.map +1 -0
- package/dist/store/table-history.d.ts +75 -0
- package/dist/store/table-history.d.ts.map +1 -0
- package/dist/store/table-history.js +42 -0
- package/dist/store/table-history.js.map +1 -0
- package/dist/store/table-migration.d.ts +16 -0
- package/dist/store/table-migration.d.ts.map +1 -0
- package/dist/store/table-migration.js +202 -0
- package/dist/store/table-migration.js.map +1 -0
- package/dist/store/table-writes.d.ts +125 -0
- package/dist/store/table-writes.d.ts.map +1 -0
- package/dist/store/table-writes.js +170 -0
- package/dist/store/table-writes.js.map +1 -0
- package/dist/store/table.d.ts +80 -0
- package/dist/store/table.d.ts.map +1 -0
- package/dist/store/table.js +103 -0
- package/dist/store/table.js.map +1 -0
- package/dist/store/text.d.ts +14 -0
- package/dist/store/text.d.ts.map +1 -0
- package/dist/store/text.js +51 -0
- package/dist/store/text.js.map +1 -0
- package/dist/store/writes.d.ts +5 -0
- package/dist/store/writes.d.ts.map +1 -0
- package/dist/store/writes.js +4 -0
- package/dist/store/writes.js.map +1 -0
- package/dist/surfaces/active-language.d.ts +20 -0
- package/dist/surfaces/active-language.d.ts.map +1 -0
- package/dist/surfaces/active-language.js +78 -0
- package/dist/surfaces/active-language.js.map +1 -0
- package/dist/surfaces/active-theme.d.ts +16 -0
- package/dist/surfaces/active-theme.d.ts.map +1 -0
- package/dist/surfaces/active-theme.js +47 -0
- package/dist/surfaces/active-theme.js.map +1 -0
- package/dist/surfaces/client.d.ts +96 -0
- package/dist/surfaces/client.d.ts.map +1 -0
- package/dist/surfaces/client.js +264 -0
- package/dist/surfaces/client.js.map +1 -0
- package/dist/surfaces/connection.d.ts +49 -0
- package/dist/surfaces/connection.d.ts.map +1 -0
- package/dist/surfaces/connection.js +142 -0
- package/dist/surfaces/connection.js.map +1 -0
- package/dist/surfaces/format.d.ts +5 -0
- package/dist/surfaces/format.d.ts.map +1 -0
- package/dist/surfaces/format.js +37 -0
- package/dist/surfaces/format.js.map +1 -0
- package/dist/surfaces/index.d.ts +15 -0
- package/dist/surfaces/index.d.ts.map +1 -0
- package/dist/surfaces/index.js +18 -0
- package/dist/surfaces/index.js.map +1 -0
- package/dist/surfaces/language.d.ts +53 -0
- package/dist/surfaces/language.d.ts.map +1 -0
- package/dist/surfaces/language.js +74 -0
- package/dist/surfaces/language.js.map +1 -0
- package/dist/surfaces/loaded.d.ts +42 -0
- package/dist/surfaces/loaded.d.ts.map +1 -0
- package/dist/surfaces/loaded.js +116 -0
- package/dist/surfaces/loaded.js.map +1 -0
- package/dist/surfaces/locale-choice.d.ts +25 -0
- package/dist/surfaces/locale-choice.d.ts.map +1 -0
- package/dist/surfaces/locale-choice.js +14 -0
- package/dist/surfaces/locale-choice.js.map +1 -0
- package/dist/surfaces/messages.d.ts +67 -0
- package/dist/surfaces/messages.d.ts.map +1 -0
- package/dist/surfaces/messages.js +112 -0
- package/dist/surfaces/messages.js.map +1 -0
- package/dist/surfaces/page-state.d.ts +14 -0
- package/dist/surfaces/page-state.d.ts.map +1 -0
- package/dist/surfaces/page-state.js +43 -0
- package/dist/surfaces/page-state.js.map +1 -0
- package/dist/surfaces/preference.d.ts +32 -0
- package/dist/surfaces/preference.d.ts.map +1 -0
- package/dist/surfaces/preference.js +72 -0
- package/dist/surfaces/preference.js.map +1 -0
- package/dist/surfaces/registered.d.ts +33 -0
- package/dist/surfaces/registered.d.ts.map +1 -0
- package/dist/surfaces/registered.js +51 -0
- package/dist/surfaces/registered.js.map +1 -0
- package/dist/surfaces/scripts.d.ts +84 -0
- package/dist/surfaces/scripts.d.ts.map +1 -0
- package/dist/surfaces/scripts.js +28 -0
- package/dist/surfaces/scripts.js.map +1 -0
- package/dist/surfaces/theme-choice.d.ts +31 -0
- package/dist/surfaces/theme-choice.d.ts.map +1 -0
- package/dist/surfaces/theme-choice.js +18 -0
- package/dist/surfaces/theme-choice.js.map +1 -0
- package/dist/surfaces/themes.d.ts +43 -0
- package/dist/surfaces/themes.d.ts.map +1 -0
- package/dist/surfaces/themes.js +110 -0
- package/dist/surfaces/themes.js.map +1 -0
- package/dist/surfaces/translations.d.ts +29 -0
- package/dist/surfaces/translations.d.ts.map +1 -0
- package/dist/surfaces/translations.js +57 -0
- package/dist/surfaces/translations.js.map +1 -0
- package/dist/sync/batch.d.ts +18 -0
- package/dist/sync/batch.d.ts.map +1 -0
- package/dist/sync/batch.js +125 -0
- package/dist/sync/batch.js.map +1 -0
- package/dist/sync/client.d.ts +166 -0
- package/dist/sync/client.d.ts.map +1 -0
- package/dist/sync/client.js +438 -0
- package/dist/sync/client.js.map +1 -0
- package/dist/sync/files.d.ts +46 -0
- package/dist/sync/files.d.ts.map +1 -0
- package/dist/sync/files.js +13 -0
- package/dist/sync/files.js.map +1 -0
- package/dist/sync/filesystem.d.ts +37 -0
- package/dist/sync/filesystem.d.ts.map +1 -0
- package/dist/sync/filesystem.js +185 -0
- package/dist/sync/filesystem.js.map +1 -0
- package/dist/sync/index.d.ts +8 -0
- package/dist/sync/index.d.ts.map +1 -0
- package/dist/sync/index.js +9 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/lines.d.ts +18 -0
- package/dist/sync/lines.d.ts.map +1 -0
- package/dist/sync/lines.js +46 -0
- package/dist/sync/lines.js.map +1 -0
- package/dist/sync/remote.d.ts +130 -0
- package/dist/sync/remote.d.ts.map +1 -0
- package/dist/sync/remote.js +46 -0
- package/dist/sync/remote.js.map +1 -0
- package/dist/sync/state.d.ts +17 -0
- package/dist/sync/state.d.ts.map +1 -0
- package/dist/sync/state.js +40 -0
- package/dist/sync/state.js.map +1 -0
- package/dist/telemetry-ingest/batch.d.ts +70 -0
- package/dist/telemetry-ingest/batch.d.ts.map +1 -0
- package/dist/telemetry-ingest/batch.js +110 -0
- package/dist/telemetry-ingest/batch.js.map +1 -0
- package/dist/telemetry-ingest/facet.d.ts +21 -0
- package/dist/telemetry-ingest/facet.d.ts.map +1 -0
- package/dist/telemetry-ingest/facet.js +96 -0
- package/dist/telemetry-ingest/facet.js.map +1 -0
- package/dist/telemetry-ingest/index.d.ts +5 -0
- package/dist/telemetry-ingest/index.d.ts.map +1 -0
- package/dist/telemetry-ingest/index.js +8 -0
- package/dist/telemetry-ingest/index.js.map +1 -0
- package/dist/telemetry-ingest/recorder.d.ts +50 -0
- package/dist/telemetry-ingest/recorder.d.ts.map +1 -0
- package/dist/telemetry-ingest/recorder.js +298 -0
- package/dist/telemetry-ingest/recorder.js.map +1 -0
- package/dist/telemetry-ingest/sender.d.ts +14 -0
- package/dist/telemetry-ingest/sender.d.ts.map +1 -0
- package/dist/telemetry-ingest/sender.js +64 -0
- package/dist/telemetry-ingest/sender.js.map +1 -0
- package/dist/telemetry-sqlite/index.d.ts +13 -4
- package/dist/telemetry-sqlite/index.d.ts.map +1 -1
- package/dist/telemetry-sqlite/index.js +81 -241
- package/dist/telemetry-sqlite/index.js.map +1 -1
- package/dist/telemetry-sqlite/node.d.ts +13 -0
- package/dist/telemetry-sqlite/node.d.ts.map +1 -0
- package/dist/telemetry-sqlite/node.js +27 -0
- package/dist/telemetry-sqlite/node.js.map +1 -0
- package/dist/telemetry-sqlite/schema.d.ts +9 -0
- package/dist/telemetry-sqlite/schema.d.ts.map +1 -0
- package/dist/telemetry-sqlite/schema.js +61 -0
- package/dist/telemetry-sqlite/schema.js.map +1 -0
- package/dist/telemetry-sqlite/store.d.ts +3 -0
- package/dist/telemetry-sqlite/store.d.ts.map +1 -1
- package/dist/telemetry-sqlite/store.js +24 -13
- package/dist/telemetry-sqlite/store.js.map +1 -1
- package/dist/telemetry.d.ts +937 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +470 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/tui/bridge.d.ts +112 -0
- package/dist/tui/bridge.d.ts.map +1 -0
- package/dist/tui/bridge.js +9 -0
- package/dist/tui/bridge.js.map +1 -0
- package/dist/tui/channel.d.ts +44 -0
- package/dist/tui/channel.d.ts.map +1 -0
- package/dist/tui/channel.js +150 -0
- package/dist/tui/channel.js.map +1 -0
- package/dist/tui/frames.d.ts +5 -0
- package/dist/tui/frames.d.ts.map +1 -0
- package/dist/tui/frames.js +52 -0
- package/dist/tui/frames.js.map +1 -0
- package/dist/tui/index.d.ts +7 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js +8 -0
- package/dist/tui/index.js.map +1 -0
- package/dist/tui/runtime.d.ts +46 -0
- package/dist/tui/runtime.d.ts.map +1 -0
- package/dist/tui/runtime.js +101 -0
- package/dist/tui/runtime.js.map +1 -0
- package/dist/tui/scope.d.ts +46 -0
- package/dist/tui/scope.d.ts.map +1 -0
- package/dist/tui/scope.js +141 -0
- package/dist/tui/scope.js.map +1 -0
- package/dist/tui/terminal.d.ts +15 -0
- package/dist/tui/terminal.d.ts.map +1 -0
- package/dist/tui/terminal.js +37 -0
- package/dist/tui/terminal.js.map +1 -0
- package/dist/tui/theme.d.ts +17 -0
- package/dist/tui/theme.d.ts.map +1 -0
- package/dist/tui/theme.js +38 -0
- package/dist/tui/theme.js.map +1 -0
- package/dist/watch.d.ts +194 -0
- package/dist/watch.d.ts.map +1 -0
- package/dist/watch.js +383 -0
- package/dist/watch.js.map +1 -0
- package/dist/web/environment.d.ts +4 -0
- package/dist/web/environment.d.ts.map +1 -0
- package/dist/web/environment.js +37 -0
- package/dist/web/environment.js.map +1 -0
- package/dist/web/index.d.ts +5 -0
- package/dist/web/index.d.ts.map +1 -0
- package/dist/web/index.js +7 -0
- package/dist/web/index.js.map +1 -0
- package/dist/web/language.d.ts +7 -0
- package/dist/web/language.d.ts.map +1 -0
- package/dist/web/language.js +21 -0
- package/dist/web/language.js.map +1 -0
- package/dist/web/page.d.ts +29 -0
- package/dist/web/page.d.ts.map +1 -0
- package/dist/web/page.js +92 -0
- package/dist/web/page.js.map +1 -0
- package/dist/web/scripts.d.ts +23 -0
- package/dist/web/scripts.d.ts.map +1 -0
- package/dist/web/scripts.js +50 -0
- package/dist/web/scripts.js.map +1 -0
- package/dist/web/styles.d.ts +17 -0
- package/dist/web/styles.d.ts.map +1 -0
- package/dist/web/styles.js +218 -0
- package/dist/web/styles.js.map +1 -0
- package/dist/web/themes.d.ts +6 -0
- package/dist/web/themes.d.ts.map +1 -0
- package/dist/web/themes.js +31 -0
- package/dist/web/themes.js.map +1 -0
- package/docs/benchmarks.md +1036 -0
- package/docs/decisions.md +3436 -0
- package/docs/dependencies/book.md +1671 -0
- package/docs/dependencies/index.html +2641 -0
- package/docs/dependencies/model.md +330 -0
- package/docs/design.md +3065 -0
- package/docs/durable-observers/book.md +432 -0
- package/docs/durable-observers/index.html +517 -0
- package/docs/flow-control/book.md +333 -0
- package/docs/flow-control/fold/index.html +265 -0
- package/docs/flow-control/index.html +548 -0
- package/docs/flow-control/window/index.html +228 -0
- package/docs/guide-plugins-hosts/book.md +957 -0
- package/docs/guide-plugins-hosts/index.html +952 -0
- package/docs/http-workers/book.md +378 -0
- package/docs/http-workers/index.html +515 -0
- package/docs/i18n/book.md +217 -0
- package/docs/i18n/index.html +344 -0
- package/docs/layer-1.md +311 -0
- package/docs/layer-2.md +216 -0
- package/docs/p3-features/README.md +6 -0
- package/docs/p3-features/book.md +478 -0
- package/docs/plugin-authoring.md +276 -0
- package/docs/plugin-model/book.md +186 -0
- package/docs/plugin-model/index.html +310 -0
- package/docs/plugin-primer/book.md +273 -0
- package/docs/plugin-primer/index.html +430 -0
- package/docs/slice-1.md +236 -0
- package/docs/slice-10.md +288 -0
- package/docs/slice-11.md +114 -0
- package/docs/slice-12.md +132 -0
- package/docs/slice-13.md +121 -0
- package/docs/slice-2.md +174 -0
- package/docs/slice-3a.md +296 -0
- package/docs/slice-3b.md +197 -0
- package/docs/slice-4.md +146 -0
- package/docs/slice-4a.md +418 -0
- package/docs/slice-4b.md +208 -0
- package/docs/slice-5.md +281 -0
- package/docs/slice-6a.md +676 -0
- package/docs/slice-6b.md +332 -0
- package/docs/slice-7a.md +130 -0
- package/docs/slice-7b/book.md +608 -0
- package/docs/slice-7b/index.html +842 -0
- package/docs/slice-7b.md +255 -0
- package/docs/slice-7c.md +165 -0
- package/docs/slice-8.md +194 -0
- package/docs/slice-9.md +110 -0
- package/docs/slices.md +241 -0
- package/docs/store/book.md +670 -0
- package/docs/store/index.html +861 -0
- package/docs/store/walkthrough.md +193 -0
- package/docs/theming/book.md +223 -0
- package/docs/theming/index.html +371 -0
- package/docs/tutorial/book.md +2169 -0
- package/docs/tutorial/index.html +2112 -0
- package/docs/tutorial/screens/click-after.png +0 -0
- package/docs/tutorial/screens/click-before.png +0 -0
- package/docs/tutorial/screens/edited.png +0 -0
- package/docs/tutorial/screens/french.png +0 -0
- package/docs/tutorial/screens/harbor.png +0 -0
- package/docs/tutorial/screens/page.png +0 -0
- package/docs/tutorial/screens/traces-ada.png +0 -0
- package/docs/tutorial/screens/traces.png +0 -0
- package/package.json +114 -20
- package/src/delta/README.md +69 -0
- package/dist/cell.d.ts +0 -122
- package/dist/cell.d.ts.map +0 -1
- package/dist/cell.js +0 -356
- package/dist/cell.js.map +0 -1
- package/dist/cluster.d.ts +0 -27
- package/dist/cluster.d.ts.map +0 -1
- package/dist/cluster.js +0 -230
- package/dist/cluster.js.map +0 -1
- package/dist/connection.d.ts +0 -270
- package/dist/connection.d.ts.map +0 -1
- package/dist/connection.js +0 -1216
- package/dist/connection.js.map +0 -1
- package/dist/contract.d.ts +0 -208
- package/dist/contract.d.ts.map +0 -1
- package/dist/contract.js +0 -246
- package/dist/contract.js.map +0 -1
- package/dist/declare.d.ts +0 -33
- package/dist/declare.d.ts.map +0 -1
- package/dist/declare.js +0 -2
- package/dist/declare.js.map +0 -1
- package/dist/errors.d.ts +0 -28
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -59
- package/dist/errors.js.map +0 -1
- package/dist/host.d.ts +0 -348
- package/dist/host.d.ts.map +0 -1
- package/dist/host.js +0 -1000
- package/dist/host.js.map +0 -1
- package/dist/link.d.ts +0 -107
- package/dist/link.d.ts.map +0 -1
- package/dist/link.js +0 -355
- package/dist/link.js.map +0 -1
- package/dist/loader.d.ts +0 -4
- package/dist/loader.d.ts.map +0 -1
- package/dist/loader.js +0 -73
- package/dist/loader.js.map +0 -1
- package/dist/manager.d.ts +0 -115
- package/dist/manager.d.ts.map +0 -1
- package/dist/manager.js +0 -345
- package/dist/manager.js.map +0 -1
- package/dist/node.d.ts +0 -4
- package/dist/node.d.ts.map +0 -1
- package/dist/node.js +0 -4
- package/dist/node.js.map +0 -1
- package/dist/object.d.ts +0 -438
- package/dist/object.d.ts.map +0 -1
- package/dist/object.js +0 -1571
- package/dist/object.js.map +0 -1
- package/dist/publish.d.ts +0 -5
- package/dist/publish.d.ts.map +0 -1
- package/dist/publish.js +0 -40
- package/dist/publish.js.map +0 -1
- package/dist/registry.d.ts +0 -25
- package/dist/registry.d.ts.map +0 -1
- package/dist/registry.js +0 -6
- package/dist/registry.js.map +0 -1
- package/dist/reload.d.ts +0 -126
- package/dist/reload.d.ts.map +0 -1
- package/dist/reload.js +0 -653
- package/dist/reload.js.map +0 -1
- package/dist/remote.d.ts +0 -165
- package/dist/remote.d.ts.map +0 -1
- package/dist/remote.js +0 -612
- package/dist/remote.js.map +0 -1
- package/dist/schema.d.ts +0 -21
- package/dist/schema.d.ts.map +0 -1
- package/dist/schema.js +0 -228
- package/dist/schema.js.map +0 -1
- package/dist/state.d.ts +0 -92
- package/dist/state.d.ts.map +0 -1
- package/dist/state.js +0 -287
- package/dist/state.js.map +0 -1
- package/dist/types.d.ts +0 -88
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/websocket.d.ts +0 -15
- package/dist/websocket.d.ts.map +0 -1
- package/dist/websocket.js +0 -16
- package/dist/websocket.js.map +0 -1
- package/dist/wire.d.ts +0 -216
- package/dist/wire.d.ts.map +0 -1
- package/dist/wire.js +0 -165
- package/dist/wire.js.map +0 -1
- package/docs/guide.md +0 -814
- package/docs/spec.md +0 -288
- package/docs/tutorial.md +0 -931
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../src/telemetry.ts"],"names":[],"mappings":"AAKA,OAAO,EAMN,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,kCAAkC,EACvC,KAAK,aAAa,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,CAE3C;AAED,6GAA6G;AAC7G,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAElE;AAED,4FAA4F;AAC5F,eAAO,MAAM,WAAW,MAAM,CAAC;AAE/B,oGAAoG;AACpG,wBAAgB,UAAU,CAAC,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAGtF;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CACpB,IAAI,EAAE,aAAa,EACnB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,WAAW,GAAG,SAAS,GAC7B,SAAS,GAAG,OAAO,CAOrB;AAED,kGAAkG;AAClG,wBAAgB,SAAS,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,GAAG,SAAS,CAE9E;AAED,2GAA2G;AAC3G,wBAAgB,QAAQ,CAAC,OAAO,EAAE,gBAAgB,GAAG,SAAS,EAAE,OAAO,EAAE,gBAAgB,GAAG,gBAAgB,CAG3G;AAQD,6GAA6G;AAC7G,wBAAgB,YAAY,CAAC,OAAO,EAAE,gBAAgB,GAAG,SAAS,GAAG,YAAY,CAQhF"}
|
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
// Chord's telemetry (§29, slice 9): its typed schema (every span, event and metric Chord records, with their
|
|
2
|
+
// attributes), and how its sites record through it: no span and no attribute object under the NOOP context, spans kept
|
|
3
|
+
// open until an event ends them, failures with a fixed category, carriers for links, and the instruments of an
|
|
4
|
+
// adapter's metrics made once.
|
|
5
|
+
import { createTypedMetrics, createTypedSpanStarter, defineTelemetrySchema, NOOP_TELEMETRY_CONTEXT, NOOP_TELEMETRY_METRICS, } from "@earendil-works/pi-telemetry";
|
|
6
|
+
import { isChordError } from "./data/index.js";
|
|
7
|
+
const type = { type: "string", required: true, description: "The object type's name." };
|
|
8
|
+
const host = {
|
|
9
|
+
type: "string",
|
|
10
|
+
required: true,
|
|
11
|
+
description: "The host that recorded the span: its address key (`list|groceries`), `client` without an address.",
|
|
12
|
+
cardinality: "high",
|
|
13
|
+
};
|
|
14
|
+
const principal = {
|
|
15
|
+
type: "string",
|
|
16
|
+
required: false,
|
|
17
|
+
description: "Whom the call was for: its principal key, unless the host's `principalAttributes` hook records other attributes.",
|
|
18
|
+
cardinality: "high",
|
|
19
|
+
};
|
|
20
|
+
const object = {
|
|
21
|
+
type: "string",
|
|
22
|
+
required: true,
|
|
23
|
+
description: "The object: its type, and its params key when it has params.",
|
|
24
|
+
cardinality: "high",
|
|
25
|
+
};
|
|
26
|
+
const member = { type: "string", required: true, description: "The method's name." };
|
|
27
|
+
const outcome = (values) => ({ type: "string", values, description: "How it ended; a cancel is no error (status ok)." });
|
|
28
|
+
const commit = {
|
|
29
|
+
description: "A commit of the span's object (documents and tables) inside the span's work.",
|
|
30
|
+
attributes: {
|
|
31
|
+
documents: { type: "number", required: true, description: "Documents the commit adopted." },
|
|
32
|
+
ops: { type: "number", required: true, description: "Ops of the documents' prepared changes." },
|
|
33
|
+
rows: {
|
|
34
|
+
type: "number",
|
|
35
|
+
required: true,
|
|
36
|
+
description: "Table rows its writes changed: a `put` one, an update or delete the rows its statement changed.",
|
|
37
|
+
},
|
|
38
|
+
duration: {
|
|
39
|
+
type: "number",
|
|
40
|
+
required: true,
|
|
41
|
+
description: "Milliseconds from the commit's start to its adoption.",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
const retry = {
|
|
46
|
+
description: "A transient failure: the next attempt waits for its backoff.",
|
|
47
|
+
attributes: { backoff: { type: "number", required: true, description: "Milliseconds until the next attempt." } },
|
|
48
|
+
};
|
|
49
|
+
const park = {
|
|
50
|
+
description: "The attempt parked on a dependency that is not live.",
|
|
51
|
+
attributes: { cause: { type: "string", required: true, description: "`loading`, or the waiting cause's message." } },
|
|
52
|
+
};
|
|
53
|
+
const fate = {
|
|
54
|
+
description: "One object's fate in a reload.",
|
|
55
|
+
attributes: {
|
|
56
|
+
object,
|
|
57
|
+
fate: {
|
|
58
|
+
type: "string",
|
|
59
|
+
required: true,
|
|
60
|
+
values: ["restarted", "ended", "parked", "retried"],
|
|
61
|
+
description: "What the object did.",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
/** Failed spans: `status: "error"` with one of these categories and the error's message (at most 500 characters). */
|
|
66
|
+
const ERRORS = "The error's category (`call_failed`, `method_failed`, `relay_failed`, `hold_failed`, `activation_failed`, " +
|
|
67
|
+
"`open_failed`, `close_failed`, `load_failed`, `reload_failed`, `resolve_failed`, `routine_failed`, `job_failed`, " +
|
|
68
|
+
"`http_failed`, `trace_failed` for `ctx.trace`) and its message, " +
|
|
69
|
+
"at most 500 characters; a cancel keeps status ok.";
|
|
70
|
+
/** Chord's span, event and metric vocabulary (§29). Ids (objects, holds, calls, address keys) are span attributes only. */
|
|
71
|
+
export const CHORD_TELEMETRY_SCHEMA = defineTelemetrySchema({
|
|
72
|
+
version: 1,
|
|
73
|
+
spans: {
|
|
74
|
+
"chord.call": {
|
|
75
|
+
description: "A consumer's call of a remote object's method, from the call until its reply.",
|
|
76
|
+
parents: { kind: "any" },
|
|
77
|
+
startAttributes: {
|
|
78
|
+
"chord.host": host,
|
|
79
|
+
type,
|
|
80
|
+
member,
|
|
81
|
+
object,
|
|
82
|
+
"address.kind": { type: "string", required: true, description: "The kind of the provider's host." },
|
|
83
|
+
"chord.principal": principal,
|
|
84
|
+
},
|
|
85
|
+
endAttributes: { outcome: outcome(["ok", "error", "aborted"]) },
|
|
86
|
+
status: { default: "ok", errorWhen: ERRORS },
|
|
87
|
+
},
|
|
88
|
+
"chord.method": {
|
|
89
|
+
description: "A provider running a method: under the call's carrier (over a link) or the caller's span (same host).",
|
|
90
|
+
parents: { kind: "any" },
|
|
91
|
+
startAttributes: {
|
|
92
|
+
"chord.host": host,
|
|
93
|
+
type,
|
|
94
|
+
member,
|
|
95
|
+
object,
|
|
96
|
+
"principal.kind": { type: "string", required: true, description: "The ctx's principal kind, or `none`." },
|
|
97
|
+
"chord.principal": principal,
|
|
98
|
+
},
|
|
99
|
+
endAttributes: { outcome: outcome(["ok", "error", "aborted"]) },
|
|
100
|
+
events: { "chord.commit": commit },
|
|
101
|
+
status: { default: "ok", errorWhen: ERRORS },
|
|
102
|
+
},
|
|
103
|
+
"chord.relay": {
|
|
104
|
+
description: "A relay forwarding a hold (until it is held upstream) or a call (until its reply came back), under the arriving carrier.",
|
|
105
|
+
parents: { kind: "root_or_external" },
|
|
106
|
+
startAttributes: {
|
|
107
|
+
"chord.host": host,
|
|
108
|
+
type,
|
|
109
|
+
member: {
|
|
110
|
+
type: "string",
|
|
111
|
+
required: true,
|
|
112
|
+
description: "`hold`, or a call's method as `#<index>` (a relay never knows names).",
|
|
113
|
+
},
|
|
114
|
+
"upstream.kind": { type: "string", required: true, description: "The kind of the upstream host." },
|
|
115
|
+
},
|
|
116
|
+
endAttributes: { outcome: outcome(["ok", "error", "aborted"]) },
|
|
117
|
+
status: { default: "ok", errorWhen: ERRORS },
|
|
118
|
+
},
|
|
119
|
+
"chord.hold": {
|
|
120
|
+
description: "A consumer's hold of a remote object, until its first `bound` or failure.",
|
|
121
|
+
parents: { kind: "any" },
|
|
122
|
+
startAttributes: {
|
|
123
|
+
"chord.host": host,
|
|
124
|
+
type,
|
|
125
|
+
object,
|
|
126
|
+
"address.kind": { type: "string", required: true, description: "The kind of the provider's host." },
|
|
127
|
+
},
|
|
128
|
+
endAttributes: { outcome: outcome(["bound", "failed", "ended"]) },
|
|
129
|
+
status: { default: "ok", errorWhen: ERRORS },
|
|
130
|
+
},
|
|
131
|
+
"chord.activate": {
|
|
132
|
+
description: "One activation attempt until it is live, failed, parked or ended (a parked one resumes in a new span); linked to its object's first trigger.",
|
|
133
|
+
parents: { kind: "root_or_external" },
|
|
134
|
+
startAttributes: {
|
|
135
|
+
"chord.host": host,
|
|
136
|
+
type,
|
|
137
|
+
object,
|
|
138
|
+
attempt: { type: "number", required: true, description: "The object's attempt, from 1." },
|
|
139
|
+
},
|
|
140
|
+
endAttributes: { outcome: outcome(["live", "failed", "parked", "ended"]) },
|
|
141
|
+
events: { "chord.park": park, "chord.retry": retry },
|
|
142
|
+
status: { default: "ok", errorWhen: ERRORS },
|
|
143
|
+
},
|
|
144
|
+
"chord.open": {
|
|
145
|
+
description: "One native's open, under its attempt's span.",
|
|
146
|
+
parents: { kind: "spans", spans: ["chord.activate"] },
|
|
147
|
+
startAttributes: {
|
|
148
|
+
"chord.host": host,
|
|
149
|
+
type,
|
|
150
|
+
native: { type: "number", required: true, description: "The native's position, from 1." },
|
|
151
|
+
},
|
|
152
|
+
endAttributes: {},
|
|
153
|
+
status: { default: "ok", errorWhen: ERRORS },
|
|
154
|
+
},
|
|
155
|
+
"chord.close": {
|
|
156
|
+
description: "One native's close (a root: it runs at its attempt's teardown).",
|
|
157
|
+
parents: { kind: "root_or_external" },
|
|
158
|
+
startAttributes: {
|
|
159
|
+
"chord.host": host,
|
|
160
|
+
type,
|
|
161
|
+
native: { type: "number", required: true, description: "The native's position, from 1." },
|
|
162
|
+
reason: { type: "string", required: true, values: ["end", "close", "reload"], description: "Why." },
|
|
163
|
+
},
|
|
164
|
+
endAttributes: {},
|
|
165
|
+
status: { default: "ok", errorWhen: ERRORS },
|
|
166
|
+
},
|
|
167
|
+
"chord.load": {
|
|
168
|
+
description: "A host's `load`: the setups, the publication and the start barrier.",
|
|
169
|
+
parents: { kind: "any" },
|
|
170
|
+
startAttributes: {
|
|
171
|
+
"chord.host": host,
|
|
172
|
+
plugins: { type: "number", required: true, description: "Plugins given." },
|
|
173
|
+
},
|
|
174
|
+
endAttributes: { failed: { type: "number", description: "Plugins left out." } },
|
|
175
|
+
status: { default: "ok", errorWhen: ERRORS },
|
|
176
|
+
},
|
|
177
|
+
"chord.reload": {
|
|
178
|
+
description: "A host's `reload`: staging, the commit and every object's fate.",
|
|
179
|
+
parents: { kind: "any" },
|
|
180
|
+
startAttributes: {
|
|
181
|
+
"chord.host": host,
|
|
182
|
+
plugins: { type: "number", required: true, description: "Plugins given." },
|
|
183
|
+
},
|
|
184
|
+
endAttributes: {
|
|
185
|
+
added: { type: "number", description: "Plugins added." },
|
|
186
|
+
changed: { type: "number", description: "Plugins changed." },
|
|
187
|
+
removed: { type: "number", description: "Plugins removed." },
|
|
188
|
+
failed: { type: "number", description: "Plugins whose new code failed." },
|
|
189
|
+
fates: { type: "number", description: "Objects that took a fate." },
|
|
190
|
+
},
|
|
191
|
+
events: { "chord.reload.fate": fate },
|
|
192
|
+
status: { default: "ok", errorWhen: ERRORS },
|
|
193
|
+
},
|
|
194
|
+
"chord.resolve": {
|
|
195
|
+
description: "A route resolving an address (a worker start included), linked to its first trigger.",
|
|
196
|
+
parents: { kind: "root_or_external" },
|
|
197
|
+
startAttributes: {
|
|
198
|
+
"chord.host": host,
|
|
199
|
+
kind: { type: "string", required: true, description: "The host kind." },
|
|
200
|
+
address: { type: "string", required: true, description: "The address key.", cardinality: "high" },
|
|
201
|
+
},
|
|
202
|
+
endAttributes: { outcome: outcome(["linked", "failed"]) },
|
|
203
|
+
status: { default: "ok", errorWhen: ERRORS },
|
|
204
|
+
},
|
|
205
|
+
"chord.revoke": {
|
|
206
|
+
description: "A revocation on this host.",
|
|
207
|
+
parents: { kind: "any" },
|
|
208
|
+
startAttributes: { "chord.host": host },
|
|
209
|
+
endAttributes: { count: { type: "number", description: "Objects it ended and child links it closed." } },
|
|
210
|
+
status: { default: "ok", errorWhen: ERRORS },
|
|
211
|
+
},
|
|
212
|
+
"chord.routine": {
|
|
213
|
+
description: "One routine call (`self.on`, `self.onLive`), a root linked to the span of the commit that changed its source (when known); a throw's backoff a `chord.retry` event.",
|
|
214
|
+
parents: { kind: "root_or_external" },
|
|
215
|
+
startAttributes: {
|
|
216
|
+
"chord.host": host,
|
|
217
|
+
type,
|
|
218
|
+
object,
|
|
219
|
+
routine: { type: "string", required: true, values: ["on", "onLive"], description: "Its kind." },
|
|
220
|
+
position: { type: "number", required: true, description: "Its position among its kind, from 1." },
|
|
221
|
+
},
|
|
222
|
+
endAttributes: { outcome: outcome(["ok", "error", "aborted"]) },
|
|
223
|
+
events: { "chord.commit": commit, "chord.retry": retry },
|
|
224
|
+
status: { default: "ok", errorWhen: ERRORS },
|
|
225
|
+
},
|
|
226
|
+
"chord.job": {
|
|
227
|
+
description: "One phase of a job run: the intent (the start's transaction), the run, the finish; under the stored carrier (persisted) or the starter's span.",
|
|
228
|
+
parents: { kind: "any" },
|
|
229
|
+
startAttributes: {
|
|
230
|
+
"chord.host": host,
|
|
231
|
+
job: { type: "string", required: true, description: "The job's name." },
|
|
232
|
+
phase: { type: "string", required: true, values: ["intent", "run", "finish"], description: "The phase." },
|
|
233
|
+
object,
|
|
234
|
+
"job.id": { type: "string", required: false, description: "The run's id.", cardinality: "high" },
|
|
235
|
+
},
|
|
236
|
+
endAttributes: {
|
|
237
|
+
outcome: outcome(["ok", "error", "aborted"]),
|
|
238
|
+
"job.id": { type: "string", description: "The run's id, once the intent made it.", cardinality: "high" },
|
|
239
|
+
},
|
|
240
|
+
events: { "chord.commit": commit, "chord.retry": retry },
|
|
241
|
+
status: { default: "ok", errorWhen: ERRORS },
|
|
242
|
+
},
|
|
243
|
+
"chord.http": {
|
|
244
|
+
description: "An HTTP request routed to a contributed route (`chord/http`); its path is never recorded.",
|
|
245
|
+
parents: { kind: "root_or_external" },
|
|
246
|
+
startAttributes: {
|
|
247
|
+
"chord.host": host,
|
|
248
|
+
method: { type: "string", required: true, description: "The request's method." },
|
|
249
|
+
route: { type: "string", required: true, description: "The route's pattern." },
|
|
250
|
+
},
|
|
251
|
+
endAttributes: { status: { type: "number", description: "The response's status." } },
|
|
252
|
+
events: { "chord.commit": commit },
|
|
253
|
+
status: { default: "ok", errorWhen: ERRORS },
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
metrics: {
|
|
257
|
+
"chord.data.compilations": { kind: "counter", description: "Schemas compiled.", attributes: {} },
|
|
258
|
+
"chord.data.validations": { kind: "counter", description: "Values validated against a schema.", attributes: {} },
|
|
259
|
+
"chord.data.walks": { kind: "counter", description: "Full-value walks.", attributes: {} },
|
|
260
|
+
"chord.link.checks": {
|
|
261
|
+
kind: "counter",
|
|
262
|
+
description: "Messages checked against the message schema.",
|
|
263
|
+
attributes: {},
|
|
264
|
+
},
|
|
265
|
+
"chord.link.deflates": { kind: "counter", description: "Parts deflated.", attributes: {} },
|
|
266
|
+
"chord.link.inflates": { kind: "counter", description: "Parts inflated.", attributes: {} },
|
|
267
|
+
"chord.link.encodes": {
|
|
268
|
+
kind: "counter",
|
|
269
|
+
description: "Member values and ops encoded for a hold.",
|
|
270
|
+
attributes: {},
|
|
271
|
+
},
|
|
272
|
+
"chord.store.loads": { kind: "counter", description: "Persisted documents loaded.", attributes: {} },
|
|
273
|
+
"chord.store.commits": { kind: "counter", description: "Store commits.", attributes: {} },
|
|
274
|
+
"chord.store.statements": { kind: "counter", description: "SQL statements of store commits.", attributes: {} },
|
|
275
|
+
"chord.query.runs": { kind: "counter", description: "Live query runs.", attributes: {} },
|
|
276
|
+
"chord.cycle.visits": { kind: "counter", description: "Objects a cycle check visited.", attributes: {} },
|
|
277
|
+
"chord.derive.computes": { kind: "counter", description: "Derive computations.", attributes: {} },
|
|
278
|
+
"chord.derive.diffs": { kind: "counter", description: "Derive diffs.", attributes: {} },
|
|
279
|
+
"chord.registry.composes": { kind: "counter", description: "Registry compositions.", attributes: {} },
|
|
280
|
+
"chord.registry.adapts": {
|
|
281
|
+
kind: "counter",
|
|
282
|
+
description: "Registry values mapped for an older reader.",
|
|
283
|
+
attributes: {},
|
|
284
|
+
},
|
|
285
|
+
"chord.contract.adapts": { kind: "counter", description: "State mapped for an older consumer.", attributes: {} },
|
|
286
|
+
"chord.link.state_messages": {
|
|
287
|
+
kind: "counter",
|
|
288
|
+
description: "`state` messages this host sent of its own.",
|
|
289
|
+
attributes: {},
|
|
290
|
+
},
|
|
291
|
+
"chord.link.bytes": {
|
|
292
|
+
kind: "counter",
|
|
293
|
+
unit: "By",
|
|
294
|
+
description: "Bytes of encoded messages on this host's links (WebSocket frames, IPC messages).",
|
|
295
|
+
attributes: {
|
|
296
|
+
direction: { type: "string", required: true, values: ["sent", "received"], description: "Which way." },
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
"chord.commit.duration": {
|
|
300
|
+
kind: "histogram",
|
|
301
|
+
unit: "ms",
|
|
302
|
+
description: "Commits of an object's documents and tables, from their start to their adoption.",
|
|
303
|
+
attributes: {},
|
|
304
|
+
},
|
|
305
|
+
"chord.calls.in_flight": {
|
|
306
|
+
kind: "upDownCounter",
|
|
307
|
+
description: "Method calls running on this host.",
|
|
308
|
+
attributes: {},
|
|
309
|
+
},
|
|
310
|
+
"chord.holds.active": {
|
|
311
|
+
kind: "upDownCounter",
|
|
312
|
+
description: "Holds arriving over links and placed on this host.",
|
|
313
|
+
attributes: {},
|
|
314
|
+
},
|
|
315
|
+
"chord.links.open": { kind: "upDownCounter", description: "Open links of this host.", attributes: {} },
|
|
316
|
+
"chord.park.duration": {
|
|
317
|
+
kind: "histogram",
|
|
318
|
+
unit: "ms",
|
|
319
|
+
description: "How long an activation attempt stayed parked on its dependencies.",
|
|
320
|
+
attributes: {},
|
|
321
|
+
},
|
|
322
|
+
"chord.backpressure.wait": {
|
|
323
|
+
kind: "histogram",
|
|
324
|
+
unit: "ms",
|
|
325
|
+
description: "How long a link origin's state waited for a slot of its window.",
|
|
326
|
+
attributes: {},
|
|
327
|
+
},
|
|
328
|
+
},
|
|
329
|
+
});
|
|
330
|
+
/**
|
|
331
|
+
* Whether nothing under `parent` can be recorded: it starts spans as the NOOP context does (a host without an adapter, a
|
|
332
|
+
* context without a span, `countingOnly`'s). Span sites then start no span, build no attributes and inject no carrier
|
|
333
|
+
* (§30's cost: one call).
|
|
334
|
+
*/
|
|
335
|
+
export function untraced(parent) {
|
|
336
|
+
return parent.startSpan === NOOP_TELEMETRY_CONTEXT.startSpan;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* A span recording nothing but carrying `metrics` (a host's adapter's): the telemetry of work a host does under a context
|
|
340
|
+
* without a span (its links' accepted by an app with `BACKGROUND_CONTEXT`), so the cost counters counted through that
|
|
341
|
+
* work's context reach the host's adapter (review L6). It starts no span: span sites treat it as untraced.
|
|
342
|
+
*/
|
|
343
|
+
export function countingOnly(metrics) {
|
|
344
|
+
return { ...NOOP_TELEMETRY_CONTEXT, metrics };
|
|
345
|
+
}
|
|
346
|
+
/** Chord's typed span starter under `parent` (for a recorded parent: it allocates). */
|
|
347
|
+
export function chordSpans(parent) {
|
|
348
|
+
return createTypedSpanStarter(parent, [CHORD_TELEMETRY_SCHEMA]);
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* A span of work whose end is an event, not a return (a hold until bound, an attempt until its outcome, a call until
|
|
352
|
+
* its handler settled): open until `end`. Its `span` is the NOOP span until the adapter started it (Chord's adapters
|
|
353
|
+
* call back at once).
|
|
354
|
+
*/
|
|
355
|
+
export class OpenSpan {
|
|
356
|
+
#span = NOOP_TELEMETRY_CONTEXT;
|
|
357
|
+
#done = Promise.withResolvers();
|
|
358
|
+
#ended = false;
|
|
359
|
+
constructor(parent, name, attributes) {
|
|
360
|
+
void parent.startSpan({ name, attributes }, (span) => {
|
|
361
|
+
this.#span = span;
|
|
362
|
+
return this.#done.promise;
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
/** The span, typed by its schema entry. */
|
|
366
|
+
get span() {
|
|
367
|
+
// The adapter's span, recorded under `N`.
|
|
368
|
+
return this.#span;
|
|
369
|
+
}
|
|
370
|
+
/** Whether `end` ran. */
|
|
371
|
+
get ended() {
|
|
372
|
+
return this.#ended;
|
|
373
|
+
}
|
|
374
|
+
/** Ends the span (once; later calls do nothing). */
|
|
375
|
+
end() {
|
|
376
|
+
if (this.#ended)
|
|
377
|
+
return;
|
|
378
|
+
this.#ended = true;
|
|
379
|
+
this.#done.resolve();
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Ends the span when `work` settles, its `outcome` set: `ok`, `aborted` (a cancel, `signal`'s or `aborted`: status
|
|
383
|
+
* ok) or `error` with `category`.
|
|
384
|
+
*/
|
|
385
|
+
endWhen(work, category, signal) {
|
|
386
|
+
work.then(() => this.#close("ok"), (error) => this.#close(ended(this.#span, category, error, signal)));
|
|
387
|
+
}
|
|
388
|
+
#close(outcome) {
|
|
389
|
+
this.#span.setAttributes({ outcome });
|
|
390
|
+
this.end();
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* The longest string attribute Chord records that a peer chose (an object's label with its params key, an address key, a
|
|
395
|
+
* principal's kind): stores keep it for days (slice 9 review M1).
|
|
396
|
+
*/
|
|
397
|
+
const ATTRIBUTE_LENGTH = 256;
|
|
398
|
+
/** `text` as a span attribute: its first 256 characters. */
|
|
399
|
+
export function capped(text) {
|
|
400
|
+
return text.length > ATTRIBUTE_LENGTH ? text.slice(0, ATTRIBUTE_LENGTH) : text;
|
|
401
|
+
}
|
|
402
|
+
/** The `chord.host` attribute of the spans of a host at `address`: its key, `client` without one; capped. */
|
|
403
|
+
export function hostAttribute(address) {
|
|
404
|
+
return capped(address?.key ?? "client");
|
|
405
|
+
}
|
|
406
|
+
/** The longest message a span's error or event carries (decision "Errors in telemetry"). */
|
|
407
|
+
export const MAX_MESSAGE = 500;
|
|
408
|
+
/** Marks `span` failed with `category` and `error`'s message (at most `MAX_MESSAGE` characters). */
|
|
409
|
+
export function spanFailed(span, category, error) {
|
|
410
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
411
|
+
span.setStatus({ status: "error", error: { name: category, message: message.slice(0, MAX_MESSAGE) } });
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* How work under `span` that threw `error` ended: `aborted` for a cancel (`signal` aborted, or Chord's `aborted`), its
|
|
415
|
+
* status set ok explicitly (an adapter marks a span failed when its callback throws); else `error`, the span failed
|
|
416
|
+
* with `category`. The outcome attribute is the caller's to set.
|
|
417
|
+
*/
|
|
418
|
+
export function ended(span, category, error, signal) {
|
|
419
|
+
if (signal?.aborted === true || isChordError(error, "aborted")) {
|
|
420
|
+
span.setStatus({ status: "ok" });
|
|
421
|
+
return "aborted";
|
|
422
|
+
}
|
|
423
|
+
spanFailed(span, category, error);
|
|
424
|
+
return "error";
|
|
425
|
+
}
|
|
426
|
+
/** The carrier of `span` for a link, when its adapter propagates; none under the NOOP context. */
|
|
427
|
+
export function carrierOf(span) {
|
|
428
|
+
return untraced(span) ? undefined : span.propagation?.inject(span);
|
|
429
|
+
}
|
|
430
|
+
/** The parent `carrier` names on `adapter` (a host's), its root when absent or malformed; never throws. */
|
|
431
|
+
export function parentOf(carrier, adapter) {
|
|
432
|
+
if (untraced(adapter))
|
|
433
|
+
return adapter;
|
|
434
|
+
return adapter.propagation?.extract(carrier) ?? adapter;
|
|
435
|
+
}
|
|
436
|
+
/** Chord's instruments on the NOOP metrics, shared: no adapter, nothing made per use. */
|
|
437
|
+
const NOOP_METRICS = createTypedMetrics(NOOP_TELEMETRY_METRICS, [CHORD_TELEMETRY_SCHEMA]);
|
|
438
|
+
/** Chord's instruments by the metrics object they record to (an adapter's), each made by its first use. */
|
|
439
|
+
const instruments = new WeakMap();
|
|
440
|
+
/** Chord's instruments on `metrics` (an adapter's, or none: NOOP), made once per metrics object and name. */
|
|
441
|
+
export function chordMetrics(metrics) {
|
|
442
|
+
if (metrics === undefined || metrics === NOOP_TELEMETRY_METRICS)
|
|
443
|
+
return NOOP_METRICS;
|
|
444
|
+
let made = instruments.get(metrics);
|
|
445
|
+
if (made === undefined) {
|
|
446
|
+
made = cachedMetrics(createTypedMetrics(metrics, [CHORD_TELEMETRY_SCHEMA]));
|
|
447
|
+
instruments.set(metrics, made);
|
|
448
|
+
}
|
|
449
|
+
return made;
|
|
450
|
+
}
|
|
451
|
+
/** `typed` with each instrument made once per name. */
|
|
452
|
+
function cachedMetrics(typed) {
|
|
453
|
+
const made = new Map();
|
|
454
|
+
const once = (name, make) => {
|
|
455
|
+
// Each name has one kind in the schema, so one instrument per name.
|
|
456
|
+
let instrument = made.get(name);
|
|
457
|
+
if (instrument === undefined) {
|
|
458
|
+
instrument = make();
|
|
459
|
+
made.set(name, instrument);
|
|
460
|
+
}
|
|
461
|
+
return instrument;
|
|
462
|
+
};
|
|
463
|
+
// The instruments `typed` makes, typed by its own signatures.
|
|
464
|
+
return {
|
|
465
|
+
counter: ((name) => once(name, () => typed.counter(name))),
|
|
466
|
+
upDownCounter: ((name) => once(name, () => typed.upDownCounter(name))),
|
|
467
|
+
histogram: ((name) => once(name, () => typed.histogram(name))),
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
//# sourceMappingURL=telemetry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../src/telemetry.ts"],"names":[],"mappings":"AAAA,6GAA6G;AAC7G,uHAAuH;AACvH,+GAA+G;AAC/G,+BAA+B;AAE/B,OAAO,EACN,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,GAWtB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAgB/C,MAAM,IAAI,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,yBAAyB,EAAW,CAAC;AAEjG,MAAM,IAAI,GAAG;IACZ,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,mGAAmG;IAChH,WAAW,EAAE,MAAM;CACV,CAAC;AAEX,MAAM,SAAS,GAAG;IACjB,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,KAAK;IACf,WAAW,EACV,kHAAkH;IACnH,WAAW,EAAE,MAAM;CACV,CAAC;AAEX,MAAM,MAAM,GAAG;IACd,IAAI,EAAE,QAAQ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O,IAAI,CAAC;AACb,CAAC;AAED,uDAAuD;AACvD,SAAS,aAAa,CAAC,KAAmB;IACzC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAmB,CAAC;IACxC,MAAM,IAAI,GAAG,CAAI,IAAY,EAAE,IAAa,EAAK,EAAE;QAClD,oEAAoE;QACpE,IAAI,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAkB,CAAC;QACjD,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YAC9B,UAAU,GAAG,IAAI,EAAE,CAAC;YACpB,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC5B,CAAC;QACD,OAAO,UAAU,CAAC;IACnB,CAAC,CAAC;IACF,8DAA8D;IAC9D,OAAO;QACN,OAAO,EAAE,CAAC,CAAC,IAA4C,EAAE,EAAE,CAC1D,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAA4B;QAClE,aAAa,EAAE,CAAC,CAAC,IAAkD,EAAE,EAAE,CACtE,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAkC;QAC9E,SAAS,EAAE,CAAC,CAAC,IAA8C,EAAE,EAAE,CAC9D,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAA8B;KACtE,CAAC;AACH,CAAC","sourcesContent":["// Chord's telemetry (§29, slice 9): its typed schema (every span, event and metric Chord records, with their\n// attributes), and how its sites record through it: no span and no attribute object under the NOOP context, spans kept\n// open until an event ends them, failures with a fixed category, carriers for links, and the instruments of an\n// adapter's metrics made once.\n\nimport {\n\tcreateTypedMetrics,\n\tcreateTypedSpanStarter,\n\tdefineTelemetrySchema,\n\tNOOP_TELEMETRY_CONTEXT,\n\tNOOP_TELEMETRY_METRICS,\n\ttype SchemaTelemetryCounter,\n\ttype SchemaTelemetrySpan,\n\ttype TelemetryCarrier,\n\ttype TelemetryContext,\n\ttype TelemetryMetrics,\n\ttype TelemetrySchemaSpanName,\n\ttype TelemetrySchemaSpanStartAttributes,\n\ttype TelemetrySpan,\n\ttype TypedSpanStarter,\n\ttype TypedTelemetryMetrics,\n} from \"@earendil-works/pi-telemetry\";\nimport type { Address } from \"./contracts/index.ts\";\nimport { isChordError } from \"./data/index.ts\";\n\n/** A span of Chord's schema, its end attributes and events typed. */\nexport type ChordSpan<N extends ChordSpanName> = SchemaTelemetrySpan<typeof CHORD_TELEMETRY_SCHEMA, N>;\n\n/** The names of Chord's spans. */\nexport type ChordSpanName = TelemetrySchemaSpanName<typeof CHORD_TELEMETRY_SCHEMA>;\n\n/** Chord's instruments on one adapter's metrics, typed by its schema. */\nexport type ChordMetrics = TypedTelemetryMetrics<readonly [typeof CHORD_TELEMETRY_SCHEMA]>;\n\n/** One of Chord's counters (or up/down counters), its attributes typed. */\nexport type ChordCounter<N extends keyof (typeof CHORD_TELEMETRY_SCHEMA)[\"metrics\"]> = SchemaTelemetryCounter<\n\t(typeof CHORD_TELEMETRY_SCHEMA)[\"metrics\"][N]\n>;\n\nconst type = { type: \"string\", required: true, description: \"The object type's name.\" } as const;\n\nconst host = {\n\ttype: \"string\",\n\trequired: true,\n\tdescription: \"The host that recorded the span: its address key (`list|groceries`), `client` without an address.\",\n\tcardinality: \"high\",\n} as const;\n\nconst principal = {\n\ttype: \"string\",\n\trequired: false,\n\tdescription:\n\t\t\"Whom the call was for: its principal key, unless the host's `principalAttributes` hook records other attributes.\",\n\tcardinality: \"high\",\n} as const;\n\nconst object = {\n\ttype: \"string\",\n\trequired: true,\n\tdescription: \"The object: its type, and its params key when it has params.\",\n\tcardinality: \"high\",\n} as const;\n\nconst member = { type: \"string\", required: true, description: \"The method's name.\" } as const;\n\nconst outcome = (values: readonly string[]) =>\n\t({ type: \"string\", values, description: \"How it ended; a cancel is no error (status ok).\" }) as const;\n\nconst commit = {\n\tdescription: \"A commit of the span's object (documents and tables) inside the span's work.\",\n\tattributes: {\n\t\tdocuments: { type: \"number\", required: true, description: \"Documents the commit adopted.\" },\n\t\tops: { type: \"number\", required: true, description: \"Ops of the documents' prepared changes.\" },\n\t\trows: {\n\t\t\ttype: \"number\",\n\t\t\trequired: true,\n\t\t\tdescription: \"Table rows its writes changed: a `put` one, an update or delete the rows its statement changed.\",\n\t\t},\n\t\tduration: {\n\t\t\ttype: \"number\",\n\t\t\trequired: true,\n\t\t\tdescription: \"Milliseconds from the commit's start to its adoption.\",\n\t\t},\n\t},\n} as const;\n\nconst retry = {\n\tdescription: \"A transient failure: the next attempt waits for its backoff.\",\n\tattributes: { backoff: { type: \"number\", required: true, description: \"Milliseconds until the next attempt.\" } },\n} as const;\n\nconst park = {\n\tdescription: \"The attempt parked on a dependency that is not live.\",\n\tattributes: { cause: { type: \"string\", required: true, description: \"`loading`, or the waiting cause's message.\" } },\n} as const;\n\nconst fate = {\n\tdescription: \"One object's fate in a reload.\",\n\tattributes: {\n\t\tobject,\n\t\tfate: {\n\t\t\ttype: \"string\",\n\t\t\trequired: true,\n\t\t\tvalues: [\"restarted\", \"ended\", \"parked\", \"retried\"],\n\t\t\tdescription: \"What the object did.\",\n\t\t},\n\t},\n} as const;\n\n/** Failed spans: `status: \"error\"` with one of these categories and the error's message (at most 500 characters). */\nconst ERRORS =\n\t\"The error's category (`call_failed`, `method_failed`, `relay_failed`, `hold_failed`, `activation_failed`, \" +\n\t\"`open_failed`, `close_failed`, `load_failed`, `reload_failed`, `resolve_failed`, `routine_failed`, `job_failed`, \" +\n\t\"`http_failed`, `trace_failed` for `ctx.trace`) and its message, \" +\n\t\"at most 500 characters; a cancel keeps status ok.\";\n\n/** Chord's span, event and metric vocabulary (§29). Ids (objects, holds, calls, address keys) are span attributes only. */\nexport const CHORD_TELEMETRY_SCHEMA = defineTelemetrySchema({\n\tversion: 1,\n\tspans: {\n\t\t\"chord.call\": {\n\t\t\tdescription: \"A consumer's call of a remote object's method, from the call until its reply.\",\n\t\t\tparents: { kind: \"any\" },\n\t\t\tstartAttributes: {\n\t\t\t\t\"chord.host\": host,\n\t\t\t\ttype,\n\t\t\t\tmember,\n\t\t\t\tobject,\n\t\t\t\t\"address.kind\": { type: \"string\", required: true, description: \"The kind of the provider's host.\" },\n\t\t\t\t\"chord.principal\": principal,\n\t\t\t},\n\t\t\tendAttributes: { outcome: outcome([\"ok\", \"error\", \"aborted\"]) },\n\t\t\tstatus: { default: \"ok\", errorWhen: ERRORS },\n\t\t},\n\t\t\"chord.method\": {\n\t\t\tdescription:\n\t\t\t\t\"A provider running a method: under the call's carrier (over a link) or the caller's span (same host).\",\n\t\t\tparents: { kind: \"any\" },\n\t\t\tstartAttributes: {\n\t\t\t\t\"chord.host\": host,\n\t\t\t\ttype,\n\t\t\t\tmember,\n\t\t\t\tobject,\n\t\t\t\t\"principal.kind\": { type: \"string\", required: true, description: \"The ctx's principal kind, or `none`.\" },\n\t\t\t\t\"chord.principal\": principal,\n\t\t\t},\n\t\t\tendAttributes: { outcome: outcome([\"ok\", \"error\", \"aborted\"]) },\n\t\t\tevents: { \"chord.commit\": commit },\n\t\t\tstatus: { default: \"ok\", errorWhen: ERRORS },\n\t\t},\n\t\t\"chord.relay\": {\n\t\t\tdescription:\n\t\t\t\t\"A relay forwarding a hold (until it is held upstream) or a call (until its reply came back), under the arriving carrier.\",\n\t\t\tparents: { kind: \"root_or_external\" },\n\t\t\tstartAttributes: {\n\t\t\t\t\"chord.host\": host,\n\t\t\t\ttype,\n\t\t\t\tmember: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\trequired: true,\n\t\t\t\t\tdescription: \"`hold`, or a call's method as `#<index>` (a relay never knows names).\",\n\t\t\t\t},\n\t\t\t\t\"upstream.kind\": { type: \"string\", required: true, description: \"The kind of the upstream host.\" },\n\t\t\t},\n\t\t\tendAttributes: { outcome: outcome([\"ok\", \"error\", \"aborted\"]) },\n\t\t\tstatus: { default: \"ok\", errorWhen: ERRORS },\n\t\t},\n\t\t\"chord.hold\": {\n\t\t\tdescription: \"A consumer's hold of a remote object, until its first `bound` or failure.\",\n\t\t\tparents: { kind: \"any\" },\n\t\t\tstartAttributes: {\n\t\t\t\t\"chord.host\": host,\n\t\t\t\ttype,\n\t\t\t\tobject,\n\t\t\t\t\"address.kind\": { type: \"string\", required: true, description: \"The kind of the provider's host.\" },\n\t\t\t},\n\t\t\tendAttributes: { outcome: outcome([\"bound\", \"failed\", \"ended\"]) },\n\t\t\tstatus: { default: \"ok\", errorWhen: ERRORS },\n\t\t},\n\t\t\"chord.activate\": {\n\t\t\tdescription:\n\t\t\t\t\"One activation attempt until it is live, failed, parked or ended (a parked one resumes in a new span); linked to its object's first trigger.\",\n\t\t\tparents: { kind: \"root_or_external\" },\n\t\t\tstartAttributes: {\n\t\t\t\t\"chord.host\": host,\n\t\t\t\ttype,\n\t\t\t\tobject,\n\t\t\t\tattempt: { type: \"number\", required: true, description: \"The object's attempt, from 1.\" },\n\t\t\t},\n\t\t\tendAttributes: { outcome: outcome([\"live\", \"failed\", \"parked\", \"ended\"]) },\n\t\t\tevents: { \"chord.park\": park, \"chord.retry\": retry },\n\t\t\tstatus: { default: \"ok\", errorWhen: ERRORS },\n\t\t},\n\t\t\"chord.open\": {\n\t\t\tdescription: \"One native's open, under its attempt's span.\",\n\t\t\tparents: { kind: \"spans\", spans: [\"chord.activate\"] },\n\t\t\tstartAttributes: {\n\t\t\t\t\"chord.host\": host,\n\t\t\t\ttype,\n\t\t\t\tnative: { type: \"number\", required: true, description: \"The native's position, from 1.\" },\n\t\t\t},\n\t\t\tendAttributes: {},\n\t\t\tstatus: { default: \"ok\", errorWhen: ERRORS },\n\t\t},\n\t\t\"chord.close\": {\n\t\t\tdescription: \"One native's close (a root: it runs at its attempt's teardown).\",\n\t\t\tparents: { kind: \"root_or_external\" },\n\t\t\tstartAttributes: {\n\t\t\t\t\"chord.host\": host,\n\t\t\t\ttype,\n\t\t\t\tnative: { type: \"number\", required: true, description: \"The native's position, from 1.\" },\n\t\t\t\treason: { type: \"string\", required: true, values: [\"end\", \"close\", \"reload\"], description: \"Why.\" },\n\t\t\t},\n\t\t\tendAttributes: {},\n\t\t\tstatus: { default: \"ok\", errorWhen: ERRORS },\n\t\t},\n\t\t\"chord.load\": {\n\t\t\tdescription: \"A host's `load`: the setups, the publication and the start barrier.\",\n\t\t\tparents: { kind: \"any\" },\n\t\t\tstartAttributes: {\n\t\t\t\t\"chord.host\": host,\n\t\t\t\tplugins: { type: \"number\", required: true, description: \"Plugins given.\" },\n\t\t\t},\n\t\t\tendAttributes: { failed: { type: \"number\", description: \"Plugins left out.\" } },\n\t\t\tstatus: { default: \"ok\", errorWhen: ERRORS },\n\t\t},\n\t\t\"chord.reload\": {\n\t\t\tdescription: \"A host's `reload`: staging, the commit and every object's fate.\",\n\t\t\tparents: { kind: \"any\" },\n\t\t\tstartAttributes: {\n\t\t\t\t\"chord.host\": host,\n\t\t\t\tplugins: { type: \"number\", required: true, description: \"Plugins given.\" },\n\t\t\t},\n\t\t\tendAttributes: {\n\t\t\t\tadded: { type: \"number\", description: \"Plugins added.\" },\n\t\t\t\tchanged: { type: \"number\", description: \"Plugins changed.\" },\n\t\t\t\tremoved: { type: \"number\", description: \"Plugins removed.\" },\n\t\t\t\tfailed: { type: \"number\", description: \"Plugins whose new code failed.\" },\n\t\t\t\tfates: { type: \"number\", description: \"Objects that took a fate.\" },\n\t\t\t},\n\t\t\tevents: { \"chord.reload.fate\": fate },\n\t\t\tstatus: { default: \"ok\", errorWhen: ERRORS },\n\t\t},\n\t\t\"chord.resolve\": {\n\t\t\tdescription: \"A route resolving an address (a worker start included), linked to its first trigger.\",\n\t\t\tparents: { kind: \"root_or_external\" },\n\t\t\tstartAttributes: {\n\t\t\t\t\"chord.host\": host,\n\t\t\t\tkind: { type: \"string\", required: true, description: \"The host kind.\" },\n\t\t\t\taddress: { type: \"string\", required: true, description: \"The address key.\", cardinality: \"high\" },\n\t\t\t},\n\t\t\tendAttributes: { outcome: outcome([\"linked\", \"failed\"]) },\n\t\t\tstatus: { default: \"ok\", errorWhen: ERRORS },\n\t\t},\n\t\t\"chord.revoke\": {\n\t\t\tdescription: \"A revocation on this host.\",\n\t\t\tparents: { kind: \"any\" },\n\t\t\tstartAttributes: { \"chord.host\": host },\n\t\t\tendAttributes: { count: { type: \"number\", description: \"Objects it ended and child links it closed.\" } },\n\t\t\tstatus: { default: \"ok\", errorWhen: ERRORS },\n\t\t},\n\t\t\"chord.routine\": {\n\t\t\tdescription:\n\t\t\t\t\"One routine call (`self.on`, `self.onLive`), a root linked to the span of the commit that changed its source (when known); a throw's backoff a `chord.retry` event.\",\n\t\t\tparents: { kind: \"root_or_external\" },\n\t\t\tstartAttributes: {\n\t\t\t\t\"chord.host\": host,\n\t\t\t\ttype,\n\t\t\t\tobject,\n\t\t\t\troutine: { type: \"string\", required: true, values: [\"on\", \"onLive\"], description: \"Its kind.\" },\n\t\t\t\tposition: { type: \"number\", required: true, description: \"Its position among its kind, from 1.\" },\n\t\t\t},\n\t\t\tendAttributes: { outcome: outcome([\"ok\", \"error\", \"aborted\"]) },\n\t\t\tevents: { \"chord.commit\": commit, \"chord.retry\": retry },\n\t\t\tstatus: { default: \"ok\", errorWhen: ERRORS },\n\t\t},\n\t\t\"chord.job\": {\n\t\t\tdescription:\n\t\t\t\t\"One phase of a job run: the intent (the start's transaction), the run, the finish; under the stored carrier (persisted) or the starter's span.\",\n\t\t\tparents: { kind: \"any\" },\n\t\t\tstartAttributes: {\n\t\t\t\t\"chord.host\": host,\n\t\t\t\tjob: { type: \"string\", required: true, description: \"The job's name.\" },\n\t\t\t\tphase: { type: \"string\", required: true, values: [\"intent\", \"run\", \"finish\"], description: \"The phase.\" },\n\t\t\t\tobject,\n\t\t\t\t\"job.id\": { type: \"string\", required: false, description: \"The run's id.\", cardinality: \"high\" },\n\t\t\t},\n\t\t\tendAttributes: {\n\t\t\t\toutcome: outcome([\"ok\", \"error\", \"aborted\"]),\n\t\t\t\t\"job.id\": { type: \"string\", description: \"The run's id, once the intent made it.\", cardinality: \"high\" },\n\t\t\t},\n\t\t\tevents: { \"chord.commit\": commit, \"chord.retry\": retry },\n\t\t\tstatus: { default: \"ok\", errorWhen: ERRORS },\n\t\t},\n\t\t\"chord.http\": {\n\t\t\tdescription: \"An HTTP request routed to a contributed route (`chord/http`); its path is never recorded.\",\n\t\t\tparents: { kind: \"root_or_external\" },\n\t\t\tstartAttributes: {\n\t\t\t\t\"chord.host\": host,\n\t\t\t\tmethod: { type: \"string\", required: true, description: \"The request's method.\" },\n\t\t\t\troute: { type: \"string\", required: true, description: \"The route's pattern.\" },\n\t\t\t},\n\t\t\tendAttributes: { status: { type: \"number\", description: \"The response's status.\" } },\n\t\t\tevents: { \"chord.commit\": commit },\n\t\t\tstatus: { default: \"ok\", errorWhen: ERRORS },\n\t\t},\n\t},\n\tmetrics: {\n\t\t\"chord.data.compilations\": { kind: \"counter\", description: \"Schemas compiled.\", attributes: {} },\n\t\t\"chord.data.validations\": { kind: \"counter\", description: \"Values validated against a schema.\", attributes: {} },\n\t\t\"chord.data.walks\": { kind: \"counter\", description: \"Full-value walks.\", attributes: {} },\n\t\t\"chord.link.checks\": {\n\t\t\tkind: \"counter\",\n\t\t\tdescription: \"Messages checked against the message schema.\",\n\t\t\tattributes: {},\n\t\t},\n\t\t\"chord.link.deflates\": { kind: \"counter\", description: \"Parts deflated.\", attributes: {} },\n\t\t\"chord.link.inflates\": { kind: \"counter\", description: \"Parts inflated.\", attributes: {} },\n\t\t\"chord.link.encodes\": {\n\t\t\tkind: \"counter\",\n\t\t\tdescription: \"Member values and ops encoded for a hold.\",\n\t\t\tattributes: {},\n\t\t},\n\t\t\"chord.store.loads\": { kind: \"counter\", description: \"Persisted documents loaded.\", attributes: {} },\n\t\t\"chord.store.commits\": { kind: \"counter\", description: \"Store commits.\", attributes: {} },\n\t\t\"chord.store.statements\": { kind: \"counter\", description: \"SQL statements of store commits.\", attributes: {} },\n\t\t\"chord.query.runs\": { kind: \"counter\", description: \"Live query runs.\", attributes: {} },\n\t\t\"chord.cycle.visits\": { kind: \"counter\", description: \"Objects a cycle check visited.\", attributes: {} },\n\t\t\"chord.derive.computes\": { kind: \"counter\", description: \"Derive computations.\", attributes: {} },\n\t\t\"chord.derive.diffs\": { kind: \"counter\", description: \"Derive diffs.\", attributes: {} },\n\t\t\"chord.registry.composes\": { kind: \"counter\", description: \"Registry compositions.\", attributes: {} },\n\t\t\"chord.registry.adapts\": {\n\t\t\tkind: \"counter\",\n\t\t\tdescription: \"Registry values mapped for an older reader.\",\n\t\t\tattributes: {},\n\t\t},\n\t\t\"chord.contract.adapts\": { kind: \"counter\", description: \"State mapped for an older consumer.\", attributes: {} },\n\t\t\"chord.link.state_messages\": {\n\t\t\tkind: \"counter\",\n\t\t\tdescription: \"`state` messages this host sent of its own.\",\n\t\t\tattributes: {},\n\t\t},\n\t\t\"chord.link.bytes\": {\n\t\t\tkind: \"counter\",\n\t\t\tunit: \"By\",\n\t\t\tdescription: \"Bytes of encoded messages on this host's links (WebSocket frames, IPC messages).\",\n\t\t\tattributes: {\n\t\t\t\tdirection: { type: \"string\", required: true, values: [\"sent\", \"received\"], description: \"Which way.\" },\n\t\t\t},\n\t\t},\n\t\t\"chord.commit.duration\": {\n\t\t\tkind: \"histogram\",\n\t\t\tunit: \"ms\",\n\t\t\tdescription: \"Commits of an object's documents and tables, from their start to their adoption.\",\n\t\t\tattributes: {},\n\t\t},\n\t\t\"chord.calls.in_flight\": {\n\t\t\tkind: \"upDownCounter\",\n\t\t\tdescription: \"Method calls running on this host.\",\n\t\t\tattributes: {},\n\t\t},\n\t\t\"chord.holds.active\": {\n\t\t\tkind: \"upDownCounter\",\n\t\t\tdescription: \"Holds arriving over links and placed on this host.\",\n\t\t\tattributes: {},\n\t\t},\n\t\t\"chord.links.open\": { kind: \"upDownCounter\", description: \"Open links of this host.\", attributes: {} },\n\t\t\"chord.park.duration\": {\n\t\t\tkind: \"histogram\",\n\t\t\tunit: \"ms\",\n\t\t\tdescription: \"How long an activation attempt stayed parked on its dependencies.\",\n\t\t\tattributes: {},\n\t\t},\n\t\t\"chord.backpressure.wait\": {\n\t\t\tkind: \"histogram\",\n\t\t\tunit: \"ms\",\n\t\t\tdescription: \"How long a link origin's state waited for a slot of its window.\",\n\t\t\tattributes: {},\n\t\t},\n\t},\n});\n\n/**\n * Whether nothing under `parent` can be recorded: it starts spans as the NOOP context does (a host without an adapter, a\n * context without a span, `countingOnly`'s). Span sites then start no span, build no attributes and inject no carrier\n * (§30's cost: one call).\n */\nexport function untraced(parent: TelemetryContext): boolean {\n\treturn parent.startSpan === NOOP_TELEMETRY_CONTEXT.startSpan;\n}\n\n/**\n * A span recording nothing but carrying `metrics` (a host's adapter's): the telemetry of work a host does under a context\n * without a span (its links' accepted by an app with `BACKGROUND_CONTEXT`), so the cost counters counted through that\n * work's context reach the host's adapter (review L6). It starts no span: span sites treat it as untraced.\n */\nexport function countingOnly(metrics: TelemetryMetrics): TelemetrySpan {\n\treturn { ...NOOP_TELEMETRY_CONTEXT, metrics };\n}\n\n/** Chord's typed span starter under `parent` (for a recorded parent: it allocates). */\nexport function chordSpans(parent: TelemetryContext): TypedSpanStarter<readonly [typeof CHORD_TELEMETRY_SCHEMA]> {\n\treturn createTypedSpanStarter(parent, [CHORD_TELEMETRY_SCHEMA]);\n}\n\n/**\n * A span of work whose end is an event, not a return (a hold until bound, an attempt until its outcome, a call until\n * its handler settled): open until `end`. Its `span` is the NOOP span until the adapter started it (Chord's adapters\n * call back at once).\n */\nexport class OpenSpan<N extends ChordSpanName> {\n\t#span: TelemetrySpan = NOOP_TELEMETRY_CONTEXT;\n\treadonly #done = Promise.withResolvers<void>();\n\t#ended = false;\n\n\tconstructor(\n\t\tparent: TelemetryContext,\n\t\tname: N,\n\t\tattributes: TelemetrySchemaSpanStartAttributes<typeof CHORD_TELEMETRY_SCHEMA, N>,\n\t) {\n\t\tvoid parent.startSpan({ name, attributes }, (span) => {\n\t\t\tthis.#span = span;\n\t\t\treturn this.#done.promise;\n\t\t});\n\t}\n\n\t/** The span, typed by its schema entry. */\n\tget span(): ChordSpan<N> {\n\t\t// The adapter's span, recorded under `N`.\n\t\treturn this.#span as unknown as ChordSpan<N>;\n\t}\n\n\t/** Whether `end` ran. */\n\tget ended(): boolean {\n\t\treturn this.#ended;\n\t}\n\n\t/** Ends the span (once; later calls do nothing). */\n\tend(): void {\n\t\tif (this.#ended) return;\n\t\tthis.#ended = true;\n\t\tthis.#done.resolve();\n\t}\n\n\t/**\n\t * Ends the span when `work` settles, its `outcome` set: `ok`, `aborted` (a cancel, `signal`'s or `aborted`: status\n\t * ok) or `error` with `category`.\n\t */\n\tendWhen(work: Promise<unknown>, category: string, signal: AbortSignal | undefined): void {\n\t\twork.then(\n\t\t\t() => this.#close(\"ok\"),\n\t\t\t(error: unknown) => this.#close(ended(this.#span, category, error, signal)),\n\t\t);\n\t}\n\n\t#close(outcome: \"ok\" | \"aborted\" | \"error\"): void {\n\t\tthis.#span.setAttributes({ outcome });\n\t\tthis.end();\n\t}\n}\n\n/**\n * The longest string attribute Chord records that a peer chose (an object's label with its params key, an address key, a\n * principal's kind): stores keep it for days (slice 9 review M1).\n */\nconst ATTRIBUTE_LENGTH = 256;\n\n/** `text` as a span attribute: its first 256 characters. */\nexport function capped(text: string): string {\n\treturn text.length > ATTRIBUTE_LENGTH ? text.slice(0, ATTRIBUTE_LENGTH) : text;\n}\n\n/** The `chord.host` attribute of the spans of a host at `address`: its key, `client` without one; capped. */\nexport function hostAttribute(address: Address | undefined): string {\n\treturn capped(address?.key ?? \"client\");\n}\n\n/** The longest message a span's error or event carries (decision \"Errors in telemetry\"). */\nexport const MAX_MESSAGE = 500;\n\n/** Marks `span` failed with `category` and `error`'s message (at most `MAX_MESSAGE` characters). */\nexport function spanFailed(span: TelemetrySpan, category: string, error: unknown): void {\n\tconst message = error instanceof Error ? error.message : String(error);\n\tspan.setStatus({ status: \"error\", error: { name: category, message: message.slice(0, MAX_MESSAGE) } });\n}\n\n/**\n * How work under `span` that threw `error` ended: `aborted` for a cancel (`signal` aborted, or Chord's `aborted`), its\n * status set ok explicitly (an adapter marks a span failed when its callback throws); else `error`, the span failed\n * with `category`. The outcome attribute is the caller's to set.\n */\nexport function ended(\n\tspan: TelemetrySpan,\n\tcategory: string,\n\terror: unknown,\n\tsignal: AbortSignal | undefined,\n): \"aborted\" | \"error\" {\n\tif (signal?.aborted === true || isChordError(error, \"aborted\")) {\n\t\tspan.setStatus({ status: \"ok\" });\n\t\treturn \"aborted\";\n\t}\n\tspanFailed(span, category, error);\n\treturn \"error\";\n}\n\n/** The carrier of `span` for a link, when its adapter propagates; none under the NOOP context. */\nexport function carrierOf(span: TelemetryContext): TelemetryCarrier | undefined {\n\treturn untraced(span) ? undefined : span.propagation?.inject(span);\n}\n\n/** The parent `carrier` names on `adapter` (a host's), its root when absent or malformed; never throws. */\nexport function parentOf(carrier: TelemetryCarrier | undefined, adapter: TelemetryContext): TelemetryContext {\n\tif (untraced(adapter)) return adapter;\n\treturn adapter.propagation?.extract(carrier) ?? adapter;\n}\n\n/** Chord's instruments on the NOOP metrics, shared: no adapter, nothing made per use. */\nconst NOOP_METRICS = createTypedMetrics(NOOP_TELEMETRY_METRICS, [CHORD_TELEMETRY_SCHEMA]);\n\n/** Chord's instruments by the metrics object they record to (an adapter's), each made by its first use. */\nconst instruments = new WeakMap<TelemetryMetrics, ChordMetrics>();\n\n/** Chord's instruments on `metrics` (an adapter's, or none: NOOP), made once per metrics object and name. */\nexport function chordMetrics(metrics: TelemetryMetrics | undefined): ChordMetrics {\n\tif (metrics === undefined || metrics === NOOP_TELEMETRY_METRICS) return NOOP_METRICS;\n\tlet made = instruments.get(metrics);\n\tif (made === undefined) {\n\t\tmade = cachedMetrics(createTypedMetrics(metrics, [CHORD_TELEMETRY_SCHEMA]));\n\t\tinstruments.set(metrics, made);\n\t}\n\treturn made;\n}\n\n/** `typed` with each instrument made once per name. */\nfunction cachedMetrics(typed: ChordMetrics): ChordMetrics {\n\tconst made = new Map<string, unknown>();\n\tconst once = <T>(name: string, make: () => T): T => {\n\t\t// Each name has one kind in the schema, so one instrument per name.\n\t\tlet instrument = made.get(name) as T | undefined;\n\t\tif (instrument === undefined) {\n\t\t\tinstrument = make();\n\t\t\tmade.set(name, instrument);\n\t\t}\n\t\treturn instrument;\n\t};\n\t// The instruments `typed` makes, typed by its own signatures.\n\treturn {\n\t\tcounter: ((name: Parameters<ChordMetrics[\"counter\"]>[0]) =>\n\t\t\tonce(name, () => typed.counter(name))) as ChordMetrics[\"counter\"],\n\t\tupDownCounter: ((name: Parameters<ChordMetrics[\"upDownCounter\"]>[0]) =>\n\t\t\tonce(name, () => typed.upDownCounter(name))) as ChordMetrics[\"upDownCounter\"],\n\t\thistogram: ((name: Parameters<ChordMetrics[\"histogram\"]>[0]) =>\n\t\t\tonce(name, () => typed.histogram(name))) as ChordMetrics[\"histogram\"],\n\t};\n}\n"]}
|