@jeffusion/bungee-core 6.19.3 → 6.19.4
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/dist/access-database.d.ts +22 -0
- package/dist/api/handlers/logs.d.ts +66 -0
- package/dist/api/handlers/stats.d.ts +50 -0
- package/dist/api/logs.d.ts +145 -0
- package/dist/api/types.d.ts +21 -0
- package/dist/{chunk-assets-swq50rh3.js → chunk-assets-vsan7gav.js} +11 -11
- package/dist/{chunk-body-capture-gtta9q26.js → chunk-body-capture-sbk6cdf9.js} +2 -2
- package/dist/{chunk-handler-ehkkxpnq.js → chunk-handler-9k6b95w4.js} +2 -2
- package/dist/{chunk-main-rcw37zhd.js → chunk-main-1p15rgq5.js} +1 -1
- package/dist/{chunk-main-10pgdbgn.js → chunk-main-2efrk1nt.js} +1 -1
- package/dist/{chunk-main-a4eygw79.js → chunk-main-d74e7qxc.js} +1 -1
- package/dist/{chunk-main-p5rpfk7t.js → chunk-main-gwaw6pxp.js} +1 -1
- package/dist/{chunk-main-25kbhd4n.js → chunk-main-mqgkewnx.js} +1 -1
- package/dist/{chunk-main-0w3jk2x4.js → chunk-main-qm1tgaka.js} +2 -2
- package/dist/{chunk-master-276v10xm.js → chunk-master-wtcfwd6g.js} +6 -6
- package/dist/{chunk-plugin-context-manager-nexyp0jb.js → chunk-plugin-context-manager-kabrbg0s.js} +1 -1
- package/dist/{chunk-plugin-manager-dvxc5w6p.js → chunk-plugin-manager-q1bt6xnw.js} +2 -2
- package/dist/{chunk-runtime-upgrade-sjxsa2r6.js → chunk-runtime-upgrade-rvm3d096.js} +3 -3
- package/dist/{chunk-runtime-qbfd9z3p.js → chunk-runtime-xmp308t7.js} +2 -2
- package/dist/{chunk-worker-5mdsmhte.js → chunk-worker-99q8qnj9.js} +9 -9
- package/dist/config-publication/admission-handoff.d.ts +13 -0
- package/dist/config-publication/coordinator-types.d.ts +176 -0
- package/dist/config-publication/current-startup.d.ts +26 -0
- package/dist/config-publication/drain-workers.d.ts +15 -0
- package/dist/config-publication/index.d.ts +6 -0
- package/dist/config-publication/master-coordinator.d.ts +45 -0
- package/dist/config-publication/master-messages.d.ts +2 -0
- package/dist/config-publication/message-fields.d.ts +20 -0
- package/dist/config-publication/messages.d.ts +3 -0
- package/dist/config-publication/process-cleanup.d.ts +30 -0
- package/dist/config-publication/process-identity.d.ts +14 -0
- package/dist/config-publication/process-termination.d.ts +7 -0
- package/dist/config-publication/publication-runner.d.ts +50 -0
- package/dist/config-publication/recovery-disposition.d.ts +17 -0
- package/dist/config-publication/types.d.ts +137 -0
- package/dist/config-publication/waiter-safety.d.ts +2 -0
- package/dist/config-publication/worker-messages.d.ts +2 -0
- package/dist/config-publication/worker-runtime-contract.d.ts +76 -0
- package/dist/config-publication/worker-runtime-plugins.d.ts +8 -0
- package/dist/config-publication/worker-runtime.d.ts +22 -0
- package/dist/config-publication/worker-wait.d.ts +44 -0
- package/dist/config-storage/active-publication.d.ts +37 -0
- package/dist/config-storage/aggregate.d.ts +4 -0
- package/dist/config-storage/async-config-repository.d.ts +125 -0
- package/dist/config-storage/commit-transaction.d.ts +13 -0
- package/dist/config-storage/compiler.d.ts +4 -0
- package/dist/config-storage/config-repository.d.ts +118 -0
- package/dist/config-storage/consistent-read.d.ts +2 -0
- package/dist/config-storage/content-hash.d.ts +17 -0
- package/dist/config-storage/cross-table-audit.d.ts +20 -0
- package/dist/config-storage/current-revision.d.ts +2 -0
- package/dist/config-storage/domain-validation.d.ts +5 -0
- package/dist/config-storage/expression-ast.d.ts +2 -0
- package/dist/config-storage/expression-call-policy.d.ts +2 -0
- package/dist/config-storage/expression-syntax.d.ts +2 -0
- package/dist/config-storage/gateway-target-validation.d.ts +5 -0
- package/dist/config-storage/global-scalars.d.ts +6 -0
- package/dist/config-storage/global-validation.d.ts +2 -0
- package/dist/config-storage/immutable-snapshot.d.ts +4 -0
- package/dist/config-storage/index.d.ts +21 -0
- package/dist/config-storage/json-preflight.d.ts +15 -0
- package/dist/config-storage/management-protection.d.ts +10 -0
- package/dist/config-storage/materialize.d.ts +3 -0
- package/dist/config-storage/menu-store.d.ts +12 -0
- package/dist/config-storage/migrations/baseline.d.ts +8 -0
- package/dist/config-storage/migrations/index.d.ts +8 -0
- package/dist/config-storage/migrations/management-protection.d.ts +2 -0
- package/dist/config-storage/migrations/plan.d.ts +9 -0
- package/dist/config-storage/migrations/prepared-worker-allocation.d.ts +2 -0
- package/dist/config-storage/migrations/publication-retirement.d.ts +3 -0
- package/dist/config-storage/migrations/publication-targets.d.ts +3 -0
- package/dist/config-storage/migrations/request-logs-default.d.ts +2 -0
- package/dist/config-storage/migrations/runtime-cutover.d.ts +2 -0
- package/dist/config-storage/migrations/service-references.d.ts +3 -0
- package/dist/config-storage/migrations/ui-menus.d.ts +2 -0
- package/dist/config-storage/migrations/websocket-connections.d.ts +2 -0
- package/dist/config-storage/migrations/websocket-message-size.d.ts +2 -0
- package/dist/config-storage/migrations/worker-launch-capacity.d.ts +2 -0
- package/dist/config-storage/modification-validation.d.ts +4 -0
- package/dist/config-storage/operation-records.d.ts +42 -0
- package/dist/config-storage/operation-relations.d.ts +6 -0
- package/dist/config-storage/operation-store.d.ts +12 -0
- package/dist/config-storage/persisted-json.d.ts +2 -0
- package/dist/config-storage/persisted-validation.d.ts +7 -0
- package/dist/config-storage/plugin-name.d.ts +2 -0
- package/dist/config-storage/plugin-schema.d.ts +16 -0
- package/dist/config-storage/policy-fields.d.ts +15 -0
- package/dist/config-storage/prepared-command.d.ts +14 -0
- package/dist/config-storage/read-materialization.d.ts +4 -0
- package/dist/config-storage/recovery-store.d.ts +21 -0
- package/dist/config-storage/relation-materialization.d.ts +30 -0
- package/dist/config-storage/repository-snapshot.d.ts +5 -0
- package/dist/config-storage/repository-types.d.ts +216 -0
- package/dist/config-storage/repository-validation.d.ts +6 -0
- package/dist/config-storage/request-logs-default.d.ts +5 -0
- package/dist/config-storage/retirement-store.d.ts +78 -0
- package/dist/config-storage/route-policy-validation.d.ts +2 -0
- package/dist/config-storage/runtime-config.d.ts +14 -0
- package/dist/config-storage/runtime-cutover.d.ts +13 -0
- package/dist/config-storage/runtime-recovery-budget.d.ts +35 -0
- package/dist/config-storage/schema-fingerprint.d.ts +5 -0
- package/dist/config-storage/schema.d.ts +2 -0
- package/dist/config-storage/service-policy-validation.d.ts +4 -0
- package/dist/config-storage/service-reference-upgrade.d.ts +4 -0
- package/dist/config-storage/serving-snapshot.d.ts +9 -0
- package/dist/config-storage/snapshot-validation.d.ts +3 -0
- package/dist/config-storage/sqlite-errors.d.ts +3 -0
- package/dist/config-storage/sqlite-query.d.ts +3 -0
- package/dist/config-storage/sqlite-version.d.ts +10 -0
- package/dist/config-storage/storage-protocol.d.ts +52 -0
- package/dist/config-storage/utf16.d.ts +2 -0
- package/dist/config-storage/validation.d.ts +31 -0
- package/dist/config-storage/worker-launch-store.d.ts +93 -0
- package/dist/config-worker/http-provider.d.ts +6 -0
- package/dist/config-worker/lifecycle.d.ts +84 -0
- package/dist/config-worker/private-transport.d.ts +31 -0
- package/dist/config-worker/process-environment.d.ts +38 -0
- package/dist/config-worker/rate-limit-provider.d.ts +31 -0
- package/dist/config-worker/runtime-dependencies.d.ts +12 -0
- package/dist/config-worker/snapshot-compiler.d.ts +5 -0
- package/dist/config-worker/supervised-process-entry.d.ts +8 -0
- package/dist/core-version.d.ts +1 -0
- package/dist/daemon-control/bootstrap.d.ts +41 -0
- package/dist/daemon-control/index.d.ts +1 -0
- package/dist/daemon-control/launch-identity.d.ts +26 -0
- package/dist/daemon-control/shutdown.d.ts +22 -0
- package/dist/data-admission/errors.d.ts +16 -0
- package/dist/data-admission/host.d.ts +92 -0
- package/dist/data-admission/keyed-state.d.ts +21 -0
- package/dist/data-admission/rpc.d.ts +40 -0
- package/dist/data-admission/worker.d.ts +66 -0
- package/dist/database-schema.d.ts +2 -0
- package/dist/expression-engine.d.ts +33 -0
- package/dist/gateway/admission-plugin.d.ts +7 -0
- package/dist/gateway/auxiliary-request.d.ts +7 -0
- package/dist/gateway/body-contracts.d.ts +39 -0
- package/dist/gateway/body-events.d.ts +58 -0
- package/dist/gateway/body-factory.d.ts +4 -0
- package/dist/gateway/body-observation-stream.d.ts +6 -0
- package/dist/gateway/body-plugin.d.ts +8 -0
- package/dist/gateway/body-resources.d.ts +37 -0
- package/dist/gateway/body-service.d.ts +116 -0
- package/dist/gateway/contracts.d.ts +196 -0
- package/dist/gateway/controlled-views.d.ts +5 -0
- package/dist/gateway/dispatch-plugin.d.ts +11 -0
- package/dist/gateway/dispatch-targets.d.ts +4 -0
- package/dist/gateway/forward-plugin.d.ts +136 -0
- package/dist/gateway/plugin.d.ts +23 -0
- package/dist/gateway/plugin.js +18 -18
- package/dist/gateway/request-log-contracts.d.ts +346 -0
- package/dist/gateway/request-log.d.ts +105 -0
- package/dist/gateway/request-plugin.d.ts +98 -0
- package/dist/gateway/request-rules-plugin.d.ts +61 -0
- package/dist/gateway/response-plugin.d.ts +34 -0
- package/dist/gateway/response-views.d.ts +33 -0
- package/dist/gateway/responses-websocket-session.d.ts +24 -0
- package/dist/gateway/retry-action.d.ts +7 -0
- package/dist/gateway/retry-plugin.d.ts +7 -0
- package/dist/gateway/routing-plugin.d.ts +11 -0
- package/dist/gateway/runtime.d.ts +15 -0
- package/dist/gateway/selection-plugin.d.ts +7 -0
- package/dist/gateway/sse-response.d.ts +6 -0
- package/dist/gateway/websocket-contracts.d.ts +71 -0
- package/dist/gateway/websocket-credential.d.ts +3 -0
- package/dist/gateway/websocket-plugin.d.ts +9 -0
- package/dist/hooks/impl.d.ts +119 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/plugin-hooks.d.ts +308 -0
- package/dist/hooks/types.d.ts +130 -0
- package/dist/ingress/admission-registry.d.ts +56 -0
- package/dist/ingress/admission-set.d.ts +29 -0
- package/dist/ingress/index.d.ts +4 -0
- package/dist/ingress/master-controller.d.ts +278 -0
- package/dist/ingress/runtime.d.ts +29 -0
- package/dist/ingress/supervision-http.d.ts +118 -0
- package/dist/ingress.d.ts +5 -0
- package/dist/instance-lock.d.ts +2 -0
- package/dist/logger/access-log-writer.d.ts +120 -0
- package/dist/logger/body-capture.d.ts +21 -0
- package/dist/logger/body-log-redaction.d.ts +6 -0
- package/dist/logger/body-storage.d.ts +71 -0
- package/dist/logger/content-capture.d.ts +47 -0
- package/dist/logger/dated-log-files.d.ts +5 -0
- package/dist/logger/header-storage.d.ts +54 -0
- package/dist/logger/log-cleanup.d.ts +69 -0
- package/dist/logger/log-url.d.ts +2 -0
- package/dist/logger/request-logger.d.ts +308 -0
- package/dist/logger/transport-outcome.d.ts +25 -0
- package/dist/logger/websocket-body-capture.d.ts +26 -0
- package/dist/logger.d.ts +16 -0
- package/dist/main.d.ts +19 -0
- package/dist/main.js +8 -8
- package/dist/management-listener/index.d.ts +2 -0
- package/dist/management-listener/listener.d.ts +48 -0
- package/dist/management-listener/request-source.d.ts +4 -0
- package/dist/master-runtime/component-recovery.d.ts +40 -0
- package/dist/master-runtime/composition.d.ts +129 -0
- package/dist/master-runtime/configuration-recovery.d.ts +80 -0
- package/dist/master-runtime/control-api-body.d.ts +9 -0
- package/dist/master-runtime/control-api.d.ts +122 -0
- package/dist/master-runtime/error-chain.d.ts +9 -0
- package/dist/master-runtime/initialize-configuration.d.ts +4 -0
- package/dist/master-runtime/instance-lock.d.ts +25 -0
- package/dist/master-runtime/kernel-exit-timer.d.ts +7 -0
- package/dist/master-runtime/kernel-monotonic-clock.d.ts +15 -0
- package/dist/master-runtime/management-auth.d.ts +43 -0
- package/dist/master-runtime/master-plugin-catalog-api.d.ts +18 -0
- package/dist/master-runtime/master-stats.d.ts +52 -0
- package/dist/master-runtime/menu-api.d.ts +19 -0
- package/dist/master-runtime/observability-client.d.ts +49 -0
- package/dist/master-runtime/offline-recovery.d.ts +9 -0
- package/dist/master-runtime/offline-storage-session.d.ts +8 -0
- package/dist/master-runtime/plugin-journal-recovery.d.ts +28 -0
- package/dist/master-runtime/process-identity.d.ts +48 -0
- package/dist/master-runtime/process-options.d.ts +59 -0
- package/dist/master-runtime/publication-task-manager.d.ts +47 -0
- package/dist/master-runtime/reconcile-plugin-dependencies.d.ts +7 -0
- package/dist/master-runtime/recovery-prompt.d.ts +9 -0
- package/dist/master-runtime/route-body-plan.d.ts +31 -0
- package/dist/master-runtime/runtime-cleanup.d.ts +3 -0
- package/dist/master-runtime/runtime-contracts.d.ts +101 -0
- package/dist/master-runtime/runtime-evidence.d.ts +8 -0
- package/dist/master-runtime/runtime-status.d.ts +36 -0
- package/dist/master-runtime/runtime-supervisor.d.ts +30 -0
- package/dist/master-runtime/runtime-upgrade.d.ts +11 -0
- package/dist/master-runtime/runtime-upstreams.d.ts +14 -0
- package/dist/master-runtime/runtime.d.ts +23 -0
- package/dist/master-runtime/shutdown-diagnostics.d.ts +28 -0
- package/dist/master-runtime/signal-handlers.d.ts +18 -0
- package/dist/master-runtime/stopped-instance-lock.d.ts +6 -0
- package/dist/master-runtime/stopped-process.d.ts +2 -0
- package/dist/master-runtime/supervised-worker-client.d.ts +108 -0
- package/dist/master-runtime/supervised-worker-discovery.d.ts +41 -0
- package/dist/master-runtime/supervised-worker-factory.d.ts +298 -0
- package/dist/master-runtime/supervised-worker-process-adapter.d.ts +146 -0
- package/dist/master-runtime/worker-initialization-diagnostics.d.ts +18 -0
- package/dist/master.d.ts +2 -0
- package/dist/oauth-callback.d.ts +8 -0
- package/dist/plugin-artifact-contract.d.ts +4 -0
- package/dist/plugin-artifact-negotiation.d.ts +12 -0
- package/dist/plugin-artifact-types.d.ts +61 -0
- package/dist/plugin-context-manager.d.ts +91 -0
- package/dist/plugin-control/artifact-loader.d.ts +3 -0
- package/dist/plugin-control/contracts.d.ts +180 -0
- package/dist/plugin-control/host.d.ts +90 -0
- package/dist/plugin-control/index.d.ts +3 -0
- package/dist/plugin-control/master-invocation-projector.d.ts +52 -0
- package/dist/plugin-control/request-service-authority.d.ts +33 -0
- package/dist/plugin-control/secret-crypto.d.ts +13 -0
- package/dist/plugin-control/secret-store.d.ts +15 -0
- package/dist/plugin-dependencies.d.ts +30 -0
- package/dist/plugin-durable-state.d.ts +62 -0
- package/dist/plugin-extensions.d.ts +99 -0
- package/dist/plugin-logger.d.ts +17 -0
- package/dist/plugin-manifest-catalog/catalog.d.ts +28 -0
- package/dist/plugin-manifest-catalog/config-constraint-parser.d.ts +3 -0
- package/dist/plugin-manifest-catalog/config-default-validator.d.ts +3 -0
- package/dist/plugin-manifest-catalog/config-field-parser.d.ts +3 -0
- package/dist/plugin-manifest-catalog/config-field-references.d.ts +2 -0
- package/dist/plugin-manifest-catalog/index.d.ts +6 -0
- package/dist/plugin-manifest-catalog/manifest-filesystem.d.ts +9 -0
- package/dist/plugin-manifest-catalog/manifest-json.d.ts +1 -0
- package/dist/plugin-manifest-catalog/manifest-nested-parser.d.ts +11 -0
- package/dist/plugin-manifest-catalog/manifest-parser.d.ts +2 -0
- package/dist/plugin-manifest-catalog/manifest-semver.d.ts +4 -0
- package/dist/plugin-manifest-catalog/manifest-values.d.ts +6 -0
- package/dist/plugin-manifest-catalog/parse-utils.d.ts +19 -0
- package/dist/plugin-manifest-catalog/plugin-field-value.d.ts +3 -0
- package/dist/plugin-manifest-catalog/runtime-identity.d.ts +12 -0
- package/dist/plugin-manifest-catalog/types.d.ts +187 -0
- package/dist/plugin-path-resolver.d.ts +17 -0
- package/dist/plugin-registry.d.ts +165 -0
- package/dist/plugin-runtime-config.d.ts +10 -0
- package/dist/plugin-runtime-diff.d.ts +15 -0
- package/dist/plugin-runtime-orchestrator.d.ts +69 -0
- package/dist/plugin-runtime-state-machine.d.ts +78 -0
- package/dist/plugin-runtime-status.d.ts +29 -0
- package/dist/plugin-services/channels.d.ts +391 -0
- package/dist/plugin-services/command-journal.d.ts +234 -0
- package/dist/plugin-services/contracts.d.ts +23 -0
- package/dist/plugin-services/host-rpc.d.ts +268 -0
- package/dist/plugin-services/peer-broker.d.ts +351 -0
- package/dist/plugin-services/peer-channel-hub.d.ts +457 -0
- package/dist/plugin-services/peer-channel-protocol.d.ts +339 -0
- package/dist/plugin-services/peer-directory.d.ts +163 -0
- package/dist/plugin-services/peer-executor-proof.d.ts +13 -0
- package/dist/plugin-services/peer-frame.d.ts +65 -0
- package/dist/plugin-services/peer-journal.d.ts +25 -0
- package/dist/plugin-services/peer-protocol.d.ts +128 -0
- package/dist/plugin-services/peer-rpc-link.d.ts +218 -0
- package/dist/plugin-services/peer-rpc-mapping.d.ts +133 -0
- package/dist/plugin-services/peer-websocket.d.ts +146 -0
- package/dist/plugin-services/persistence.d.ts +166 -0
- package/dist/plugin-services/rpc-runtime.d.ts +227 -0
- package/dist/plugin-services/snapshot-store.d.ts +77 -0
- package/dist/plugin-services/wire-contract.d.ts +158 -0
- package/dist/plugin-services.d.ts +237 -0
- package/dist/plugin-state/client.d.ts +160 -0
- package/dist/plugin-state/message-size.d.ts +2 -0
- package/dist/plugin-state/operations.d.ts +4 -0
- package/dist/plugin-state/protocol.d.ts +40 -0
- package/dist/plugin-state/storage-rpc.d.ts +7 -0
- package/dist/plugin.types.d.ts +999 -0
- package/dist/plugins/anthropic-request-sanitizer/index.js +17 -17
- package/dist/plugins/anthropic-request-sanitizer/index.js.map +1 -1
- package/dist/plugins/anthropic-tool-name-transformer/index.js +17 -17
- package/dist/plugins/anthropic-tool-name-transformer/index.js.map +1 -1
- package/dist/plugins/chatgpt-oauth/control.js +24 -24
- package/dist/plugins/chatgpt-oauth/control.js.map +1 -1
- package/dist/plugins/chatgpt-oauth/index.js +23 -23
- package/dist/plugins/chatgpt-oauth/index.js.map +1 -1
- package/dist/plugins/codex-router/control.js +19 -19
- package/dist/plugins/codex-router/control.js.map +1 -1
- package/dist/plugins/codex-router/index.js +31 -31
- package/dist/plugins/codex-router/index.js.map +1 -1
- package/dist/plugins/deepseek-reasoning-fix/index.js +17 -17
- package/dist/plugins/deepseek-reasoning-fix/index.js.map +1 -1
- package/dist/plugins/key-access/control.js +18 -18
- package/dist/plugins/key-access/control.js.map +1 -1
- package/dist/plugins/key-access/index.js +19 -19
- package/dist/plugins/key-access/index.js.map +1 -1
- package/dist/plugins/key-access/ingress.js +18 -18
- package/dist/plugins/key-access/ingress.js.map +1 -1
- package/dist/plugins/key-rate-limit/control.js +3 -3
- package/dist/plugins/key-rate-limit/control.js.map +1 -1
- package/dist/plugins/key-rate-limit/index.js +18 -18
- package/dist/plugins/key-rate-limit/index.js.map +1 -1
- package/dist/plugins/key-rate-limit/ingress.js +2 -2
- package/dist/plugins/key-rate-limit/ingress.js.map +1 -1
- package/dist/plugins/llm-protocol-adapter/control.js +48 -48
- package/dist/plugins/llm-protocol-adapter/control.js.map +1 -1
- package/dist/plugins/llm-protocol-adapter/index.js +53 -53
- package/dist/plugins/llm-protocol-adapter/index.js.map +1 -1
- package/dist/plugins/llm-tps/control.js +5 -5
- package/dist/plugins/llm-tps/control.js.map +1 -1
- package/dist/plugins/llm-tps/index.js +20 -20
- package/dist/plugins/llm-tps/index.js.map +1 -1
- package/dist/plugins/model-mapping/control.js +4 -4
- package/dist/plugins/model-mapping/control.js.map +1 -1
- package/dist/plugins/model-mapping/index.js +19 -19
- package/dist/plugins/model-mapping/index.js.map +1 -1
- package/dist/plugins/models-dev/control.js +10 -10
- package/dist/plugins/models-dev/control.js.map +1 -1
- package/dist/plugins/models-dev/index.js +23 -23
- package/dist/plugins/models-dev/index.js.map +1 -1
- package/dist/plugins/request-body-redaction/control.js +2 -2
- package/dist/plugins/request-body-redaction/control.js.map +1 -1
- package/dist/plugins/request-body-redaction/index.js +21 -21
- package/dist/plugins/request-body-redaction/index.js.map +1 -1
- package/dist/plugins/request-logs/index.js +27 -27
- package/dist/plugins/request-logs/index.js.map +1 -1
- package/dist/plugins/request-logs/ingress.js +2 -2
- package/dist/plugins/request-logs/ingress.js.map +1 -1
- package/dist/plugins/signature-repair/index.js +17 -17
- package/dist/plugins/signature-repair/index.js.map +1 -1
- package/dist/plugins/sse-envelope.d.ts +3 -0
- package/dist/plugins/token-budget/control.js +19 -19
- package/dist/plugins/token-budget/control.js.map +1 -1
- package/dist/plugins/token-budget/index.js +19 -19
- package/dist/plugins/token-budget/index.js.map +1 -1
- package/dist/plugins/token-budget/ingress.js +2 -2
- package/dist/plugins/token-budget/ingress.js.map +1 -1
- package/dist/plugins/token-metering/index.js +30 -30
- package/dist/plugins/token-metering/index.js.map +1 -1
- package/dist/plugins/token-stats/control.js +22 -22
- package/dist/plugins/token-stats/control.js.map +1 -1
- package/dist/plugins/token-stats/index.js +22 -22
- package/dist/plugins/token-stats/index.js.map +1 -1
- package/dist/plugins/user-auth/control.js +21 -21
- package/dist/plugins/user-auth/control.js.map +1 -1
- package/dist/plugins/user-auth/index.js +17 -17
- package/dist/plugins/user-auth/index.js.map +1 -1
- package/dist/public-listener/admission-registry.d.ts +15 -0
- package/dist/public-listener/forwarding.d.ts +24 -0
- package/dist/public-listener/headers.d.ts +5 -0
- package/dist/public-listener/index.d.ts +4 -0
- package/dist/public-listener/listener.d.ts +21 -0
- package/dist/public-listener/websocket.d.ts +4 -0
- package/dist/rate-limit/http.d.ts +80 -0
- package/dist/rate-limit/index.d.ts +7 -0
- package/dist/rate-limit/json.d.ts +8 -0
- package/dist/rate-limit/profile.d.ts +46 -0
- package/dist/rate-limit/protocol.d.ts +104 -0
- package/dist/rate-limit/store.d.ts +61 -0
- package/dist/scoped-plugin-registry.d.ts +645 -0
- package/dist/supervision/index.d.ts +12 -0
- package/dist/supervision/process-lifetime-guard.d.ts +54 -0
- package/dist/supervision/protocol.d.ts +173 -0
- package/dist/supervision/state-repository.d.ts +15 -0
- package/dist/supervision/strict-json.d.ts +2 -0
- package/dist/supervision/worker-descriptor.d.ts +77 -0
- package/dist/supervision/worker-http.d.ts +135 -0
- package/dist/supervision/worker-runtime-snapshot.d.ts +64 -0
- package/dist/token-stats-window.d.ts +23 -0
- package/dist/ui/assets.d.ts +8 -0
- package/dist/ui/icon-resources.d.ts +28 -0
- package/dist/ui/menu-icons.d.ts +15 -0
- package/dist/ui/menu-layout.d.ts +10 -0
- package/dist/ui/plugin-sandbox-policy.d.ts +11 -0
- package/dist/ui/server.d.ts +10 -0
- package/dist/updates/archive-installer.d.ts +8 -0
- package/dist/updates/controller.d.ts +50 -0
- package/dist/updates/download.d.ts +8 -0
- package/dist/updates/installation.d.ts +26 -0
- package/dist/updates/names.d.ts +3 -0
- package/dist/updates/release.d.ts +23 -0
- package/dist/updates/restart.d.ts +13 -0
- package/dist/utils/config-validator.d.ts +40 -0
- package/dist/utils/endpoint-resolver.d.ts +20 -0
- package/dist/utils/expression-dependencies.d.ts +10 -0
- package/dist/utils/plugin-helpers.d.ts +46 -0
- package/dist/websocket/headers.d.ts +9 -0
- package/dist/websocket/index.d.ts +3 -0
- package/dist/websocket/message.d.ts +3 -0
- package/dist/websocket/observation.d.ts +36 -0
- package/dist/websocket/transport.d.ts +197 -0
- package/dist/worker/health/checker.d.ts +54 -0
- package/dist/worker/health/scheduler.d.ts +27 -0
- package/dist/worker/request/body-source.d.ts +1 -0
- package/dist/worker/request/context-builder.d.ts +78 -0
- package/dist/worker/request/context.d.ts +55 -0
- package/dist/worker/request/credential.d.ts +10 -0
- package/dist/worker/request/handler.d.ts +3 -0
- package/dist/worker/request/proxy.d.ts +4 -0
- package/dist/worker/request/response-detector.d.ts +9 -0
- package/dist/worker/request/snapshot.d.ts +18 -0
- package/dist/worker/response/attempt-observation.d.ts +24 -0
- package/dist/worker/response/processor.d.ts +4 -0
- package/dist/worker/response/streaming-response.d.ts +1 -0
- package/dist/worker/rules/deep-merge.d.ts +2 -0
- package/dist/worker/rules/modifier.d.ts +3 -0
- package/dist/worker/state/plugin-manager.d.ts +95 -0
- package/dist/worker/state/runtime-state.d.ts +90 -0
- package/dist/worker/types.d.ts +44 -0
- package/dist/worker/upstream/condition-filter.d.ts +31 -0
- package/dist/worker/upstream/failover-coordinator.d.ts +93 -0
- package/dist/worker/upstream/filter.d.ts +37 -0
- package/dist/worker/upstream/priority-group.d.ts +66 -0
- package/dist/worker/upstream/selector.d.ts +10 -0
- package/dist/worker/upstream/service-execution.d.ts +17 -0
- package/dist/worker/utils/jitter.d.ts +81 -0
- package/dist/worker/utils/slow-start.d.ts +67 -0
- package/dist/worker/utils/status-code-matcher.d.ts +10 -0
- package/dist/worker.d.ts +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host communication lane engines (P5): stream (read + write) / event / snapshot
|
|
3
|
+
* over one authenticated peer link, or in-process for a same-process provider.
|
|
4
|
+
*
|
|
5
|
+
* This module is the transport-and-semantics layer only. It never decides which
|
|
6
|
+
* plugin may speak: every inbound lane frame is authorized by the host adapter
|
|
7
|
+
* (`channels.ts`) through {@link PluginPeerChannelHubOptions.authorizeInbound},
|
|
8
|
+
* and every provider registration is created by that adapter. The hub owns:
|
|
9
|
+
*
|
|
10
|
+
* - bounded state machines for each lane, always failing closed with a fixed
|
|
11
|
+
* {@link PluginChannelErrorCode};
|
|
12
|
+
* - real backpressure (credit windows for read and write streams, bounded
|
|
13
|
+
* per-consumer windows for events, bounded chunk call sizes for snapshots);
|
|
14
|
+
* - honest terminal states: `complete | failed | cancelled | truncated` — a
|
|
15
|
+
* written buffer, a resolved result producer, or a resolved terminal is never
|
|
16
|
+
* treated as proof that the peer consumed the bytes;
|
|
17
|
+
* - provider-side Host leases: admitting a lane request takes the exact providing
|
|
18
|
+
* plugin's Host lease and holds it until the real source/sink task settles, so
|
|
19
|
+
* owner disposal can never race a live provider task.
|
|
20
|
+
*
|
|
21
|
+
* Reuse, not a second framework: requests ride the link's existing
|
|
22
|
+
* authentication/correlation/deadline/cancellation/ACK machinery
|
|
23
|
+
* (`requestOnLane`), and bulk bytes ride `emitLane` frames or bounded chunk
|
|
24
|
+
* responses. A same-process route uses the in-process loopback port, so local and
|
|
25
|
+
* remote transfers share exactly one implementation and one set of limits.
|
|
26
|
+
*/
|
|
27
|
+
import type { DurableMutation } from '../plugin-durable-state';
|
|
28
|
+
import type { PluginServiceProcess } from './contracts';
|
|
29
|
+
import type { PluginPeerLaneHandler } from './peer-rpc-link';
|
|
30
|
+
import type { RpcCallPurpose } from './wire-contract';
|
|
31
|
+
import { type ChannelSnapshotDescriptor, type PluginChannelErrorCode, type PluginChannelLane, type PluginChannelLinkPort, type PluginChannelTarget } from './peer-channel-protocol';
|
|
32
|
+
export declare const CHANNEL_MAX_ACTIVE_TRANSFERS = 32;
|
|
33
|
+
export declare const CHANNEL_MAX_SUBSCRIPTIONS = 64;
|
|
34
|
+
/** Per-transfer buffered bytes a consumer may hold before it must consume. */
|
|
35
|
+
export declare const CHANNEL_MAX_TRANSFER_BUFFER_BYTES: number;
|
|
36
|
+
/** Process-wide buffered bytes across every outbound transfer. */
|
|
37
|
+
export declare const CHANNEL_MAX_TOTAL_BUFFER_BYTES: number;
|
|
38
|
+
/** Absolute byte ceiling for one stream object / snapshot body. */
|
|
39
|
+
export declare const CHANNEL_STREAM_MAX_TOTAL_BYTES: number;
|
|
40
|
+
/** Outstanding credit a receiver may grant for one transfer. */
|
|
41
|
+
export declare const CHANNEL_STREAM_MAX_CREDIT_BYTES: number;
|
|
42
|
+
/** A lost credit window heals: its owner re-announces it this often. */
|
|
43
|
+
export declare const CHANNEL_CREDIT_HEARTBEAT_MS = 1000;
|
|
44
|
+
export declare const CHANNEL_STREAM_DEFAULT_CREDIT_BYTES: number;
|
|
45
|
+
export declare const CHANNEL_STREAM_DEFAULT_IDLE_MS = 30000;
|
|
46
|
+
export declare const CHANNEL_STREAM_DEFAULT_DEADLINE_MS = 120000;
|
|
47
|
+
export declare const CHANNEL_STREAM_EMIT_RETRIES = 256;
|
|
48
|
+
/** Bounded wait for an in-flight sink write to settle after cancellation. */
|
|
49
|
+
export declare const CHANNEL_STREAM_ABORT_DRAIN_MS = 30000;
|
|
50
|
+
/**
|
|
51
|
+
* Grace for already-in-flight duplex read frames after the peer session ends.
|
|
52
|
+
* Frames are delivered in order within milliseconds of being emitted, so this
|
|
53
|
+
* only has to cover a queue that is already on the wire — never a long wait.
|
|
54
|
+
*/
|
|
55
|
+
export declare const CHANNEL_DUPLEX_TERMINAL_GRACE_MS = 1000;
|
|
56
|
+
/** Credit frames must never be dropped: a much longer bounded retry window. */
|
|
57
|
+
export declare const CHANNEL_STREAM_CREDIT_RETRIES = 512;
|
|
58
|
+
export declare const CHANNEL_SNAPSHOT_MAX_BYTES: number;
|
|
59
|
+
export declare const CHANNEL_SNAPSHOT_CHUNK_CONCURRENCY = 4;
|
|
60
|
+
/** A pinned snapshot read session is released after this idle bound. */
|
|
61
|
+
export declare const CHANNEL_SNAPSHOT_SESSION_IDLE_MS = 60000;
|
|
62
|
+
/** Concurrent pinned snapshot read sessions per hub. */
|
|
63
|
+
export declare const CHANNEL_SNAPSHOT_MAX_SESSIONS = 32;
|
|
64
|
+
export declare const CHANNEL_EVENT_QUEUE_MAX = 256;
|
|
65
|
+
export declare const CHANNEL_EVENT_REPLAY_BATCH = 64;
|
|
66
|
+
export declare const CHANNEL_EVENT_MAX_PAYLOAD_BYTES: number;
|
|
67
|
+
export declare const CHANNEL_SNAPSHOT_CHUNK_BYTES: number;
|
|
68
|
+
export interface PluginChannelStreamSource {
|
|
69
|
+
readonly size: number;
|
|
70
|
+
readonly digest: `sha256:${string}`;
|
|
71
|
+
/** Reads `length` bytes at `offset` of this immutable version. */
|
|
72
|
+
read(offset: number, length: number): Promise<Uint8Array>;
|
|
73
|
+
}
|
|
74
|
+
export interface PluginChannelStreamSink {
|
|
75
|
+
/** Consumes one chunk at `offset`; resolves once the sink accepted it. */
|
|
76
|
+
write(offset: number, bytes: Uint8Array): Promise<void>;
|
|
77
|
+
/** Final commit of the complete body; must verify the size/digest contract. */
|
|
78
|
+
finish(size: number, digest: `sha256:${string}`): Promise<void>;
|
|
79
|
+
/** Reclaims an unfinished transfer; never called after `finish` resolved. */
|
|
80
|
+
abort?(reason: 'cancelled' | 'failed' | 'closed'): void;
|
|
81
|
+
}
|
|
82
|
+
export interface PluginChannelStreamProvider {
|
|
83
|
+
/** Read side: the immutable version to serve, or `null` when unavailable. */
|
|
84
|
+
open?(input: {
|
|
85
|
+
readonly caller: string;
|
|
86
|
+
readonly callerScope: string;
|
|
87
|
+
readonly objectId: string;
|
|
88
|
+
readonly version: number;
|
|
89
|
+
}): PluginChannelStreamSource | null;
|
|
90
|
+
/** Write side: the sink that will receive the consumer's bytes, or `null`. */
|
|
91
|
+
accept?(input: {
|
|
92
|
+
readonly caller: string;
|
|
93
|
+
readonly callerScope: string;
|
|
94
|
+
readonly objectId: string;
|
|
95
|
+
readonly version: number;
|
|
96
|
+
}): PluginChannelStreamSink | null;
|
|
97
|
+
/**
|
|
98
|
+
* Duplex session: ONE negotiation for both directions over one transfer id and
|
|
99
|
+
* one shared terminal. A read-only or write-only side is expressed by omitting
|
|
100
|
+
* the other half; returning `null` refuses the whole session.
|
|
101
|
+
*/
|
|
102
|
+
duplex?(input: {
|
|
103
|
+
readonly caller: string;
|
|
104
|
+
readonly callerScope: string;
|
|
105
|
+
readonly objectId: string;
|
|
106
|
+
readonly version: number;
|
|
107
|
+
}): {
|
|
108
|
+
readonly source?: PluginChannelStreamSource;
|
|
109
|
+
readonly sink?: PluginChannelStreamSink;
|
|
110
|
+
} | null;
|
|
111
|
+
}
|
|
112
|
+
export interface PluginChannelSnapshotSource {
|
|
113
|
+
readonly descriptor: ChannelSnapshotDescriptor;
|
|
114
|
+
read(offset: number, length: number): Promise<Uint8Array>;
|
|
115
|
+
/**
|
|
116
|
+
* Retains exactly this immutable version for one whole-body read. Called by the
|
|
117
|
+
* hub when it pins the source for a session, before any chunk is read.
|
|
118
|
+
*/
|
|
119
|
+
retain?(): void | Promise<void>;
|
|
120
|
+
/**
|
|
121
|
+
* Releases the provider-side retention of exactly this immutable version. The
|
|
122
|
+
* hub calls it once when the read session (which pinned this source for the
|
|
123
|
+
* WHOLE body) ends; a bound store uses it to keep an in-use version alive.
|
|
124
|
+
*/
|
|
125
|
+
release?(): void | Promise<void>;
|
|
126
|
+
}
|
|
127
|
+
export interface PluginChannelSnapshotProvider {
|
|
128
|
+
/** Current immutable descriptor + reader, or `null` when no valid snapshot exists. */
|
|
129
|
+
current(): PluginChannelSnapshotSource | null | Promise<PluginChannelSnapshotSource | null>;
|
|
130
|
+
/** One explicitly named still-retained version, or `null` once it was evicted. */
|
|
131
|
+
version(version: number): PluginChannelSnapshotSource | null | Promise<PluginChannelSnapshotSource | null>;
|
|
132
|
+
}
|
|
133
|
+
export interface PluginChannelEventEntry {
|
|
134
|
+
readonly sequence: number;
|
|
135
|
+
readonly eventId: string;
|
|
136
|
+
readonly payload: Uint8Array;
|
|
137
|
+
}
|
|
138
|
+
export interface PluginChannelEventAck {
|
|
139
|
+
/** The consumer's durable checkpoint after this ack (never lower than before). */
|
|
140
|
+
readonly acked: number;
|
|
141
|
+
}
|
|
142
|
+
export interface PluginChannelReliableEventLog {
|
|
143
|
+
/** Oldest still-replayable sequence, or `null` when the log holds no events. */
|
|
144
|
+
oldestSequence(): number | null | Promise<number | null>;
|
|
145
|
+
latestSequence(): number | Promise<number>;
|
|
146
|
+
/** Highest sequence already pruned; a `from` at or below it is an explicit gap. */
|
|
147
|
+
prunedThrough(): number | Promise<number>;
|
|
148
|
+
/** Bounded replay from `from`; a contiguous run, never sparse. */
|
|
149
|
+
list(fromSequence: number, limit: number): Promise<readonly PluginChannelEventEntry[]>;
|
|
150
|
+
/** Highest durable checkpoint for this consumer (0 when none). */
|
|
151
|
+
checkpoint(consumerId: string): number | Promise<number>;
|
|
152
|
+
/** Monotonic durable ack: an older sequence never lowers the stored checkpoint. */
|
|
153
|
+
ack(consumerId: string, sequence: number): PluginChannelEventAck | Promise<PluginChannelEventAck>;
|
|
154
|
+
/** Durable append; the returned sequence and event id are stable and unique. */
|
|
155
|
+
append(payload: Uint8Array): {
|
|
156
|
+
readonly sequence: number;
|
|
157
|
+
readonly eventId: string;
|
|
158
|
+
} | Promise<{
|
|
159
|
+
readonly sequence: number;
|
|
160
|
+
readonly eventId: string;
|
|
161
|
+
}>;
|
|
162
|
+
appendWithState?(payload: Uint8Array, mutations: readonly DurableMutation[]): Promise<{
|
|
163
|
+
readonly sequence: number;
|
|
164
|
+
readonly eventId: string;
|
|
165
|
+
}>;
|
|
166
|
+
}
|
|
167
|
+
export interface PluginChannelEventProvider {
|
|
168
|
+
readonly delivery: 'transient' | 'reliable';
|
|
169
|
+
/** Present exactly for a reliable topic; absence is refused, never guessed. */
|
|
170
|
+
readonly log?: PluginChannelReliableEventLog;
|
|
171
|
+
}
|
|
172
|
+
export interface PluginChannelEventDelivery {
|
|
173
|
+
readonly sequence: number;
|
|
174
|
+
readonly eventId: string;
|
|
175
|
+
readonly payload: Uint8Array;
|
|
176
|
+
readonly delivery: 'transient' | 'reliable';
|
|
177
|
+
}
|
|
178
|
+
export interface PluginChannelRegistrationInput {
|
|
179
|
+
readonly lane: PluginChannelLane;
|
|
180
|
+
readonly provider: string;
|
|
181
|
+
readonly service: string;
|
|
182
|
+
readonly major: number;
|
|
183
|
+
readonly process: PluginServiceProcess;
|
|
184
|
+
/** Canonical hash of the provider's declared lane contract. */
|
|
185
|
+
readonly contract: string;
|
|
186
|
+
}
|
|
187
|
+
export interface PluginChannelProviderHandle {
|
|
188
|
+
markReady(): void;
|
|
189
|
+
retire(): void;
|
|
190
|
+
dispose(): void;
|
|
191
|
+
}
|
|
192
|
+
export type PluginChannelRouteResolution = {
|
|
193
|
+
readonly kind: 'local';
|
|
194
|
+
} | {
|
|
195
|
+
readonly kind: 'remote';
|
|
196
|
+
readonly link: PluginChannelLinkPort;
|
|
197
|
+
} | {
|
|
198
|
+
readonly kind: 'ambiguous';
|
|
199
|
+
} | {
|
|
200
|
+
readonly kind: 'unavailable';
|
|
201
|
+
};
|
|
202
|
+
/** Host-minted invocation context for one provider-side lane task. */
|
|
203
|
+
export interface PluginChannelProviderContext {
|
|
204
|
+
readonly purpose: RpcCallPurpose;
|
|
205
|
+
readonly deadlineAt?: number;
|
|
206
|
+
readonly signal?: AbortSignal;
|
|
207
|
+
}
|
|
208
|
+
export interface PluginPeerChannelHubOptions {
|
|
209
|
+
readonly process: PluginServiceProcess;
|
|
210
|
+
/** The only peer process this hub can reach over a link. */
|
|
211
|
+
readonly peerProcess: PluginServiceProcess;
|
|
212
|
+
/**
|
|
213
|
+
* Host-owned route resolution for one target. The hub prefers a local
|
|
214
|
+
* registration when the host says so, otherwise exactly one remote link, and
|
|
215
|
+
* reports `ambiguous`/`unavailable` instead of guessing.
|
|
216
|
+
*/
|
|
217
|
+
readonly resolveRoute: (target: PluginChannelTarget, lane: PluginChannelLane) => PluginChannelRouteResolution;
|
|
218
|
+
/** Trusted host decision for one inbound lane request. */
|
|
219
|
+
readonly authorizeInbound: (request: {
|
|
220
|
+
readonly lane: PluginChannelLane;
|
|
221
|
+
readonly target: PluginChannelTarget;
|
|
222
|
+
readonly caller: string;
|
|
223
|
+
readonly callerScope: string;
|
|
224
|
+
readonly providerProcess: PluginServiceProcess;
|
|
225
|
+
readonly local: boolean;
|
|
226
|
+
readonly link: PluginChannelLinkPort | null;
|
|
227
|
+
/**
|
|
228
|
+
* `true` for a frame that belongs to an ALREADY-accepted transfer,
|
|
229
|
+
* subscription or snapshot session (finish/ACK/chunk/release), `false` for a
|
|
230
|
+
* NEW open/subscribe/describe. A draining peer may still admit continuations
|
|
231
|
+
* by exact identity while it refuses every new lane request.
|
|
232
|
+
*/
|
|
233
|
+
readonly continuation: boolean;
|
|
234
|
+
}) => boolean;
|
|
235
|
+
/**
|
|
236
|
+
* Host-only provider lease for the exact providing plugin; the hub holds it
|
|
237
|
+
* from admission until the real provider task settles. `null` refuses the work.
|
|
238
|
+
* The host-minted invocation context (purpose + absolute deadline + signal)
|
|
239
|
+
* rides along, so a peer-originated lane task keeps the caller's real purpose
|
|
240
|
+
* and cancellation instead of being downgraded to a background task.
|
|
241
|
+
*/
|
|
242
|
+
readonly beginProviderOperation?: (plugin: string, context: PluginChannelProviderContext) => (() => void) | null;
|
|
243
|
+
readonly onDiagnostic?: (event: {
|
|
244
|
+
readonly kind: string;
|
|
245
|
+
readonly lane: PluginChannelLane;
|
|
246
|
+
readonly code: PluginChannelErrorCode | 'invalid';
|
|
247
|
+
}) => void;
|
|
248
|
+
}
|
|
249
|
+
/** One consumer-visible live read stream. */
|
|
250
|
+
export interface PluginChannelStream {
|
|
251
|
+
readonly transferId: string;
|
|
252
|
+
readonly size: number | null;
|
|
253
|
+
readonly digest: `sha256:${string}` | null;
|
|
254
|
+
/** Resolves only after the consumer fully consumed and verified the body. */
|
|
255
|
+
readonly completed: Promise<{
|
|
256
|
+
readonly bytes: number;
|
|
257
|
+
readonly digest: `sha256:${string}`;
|
|
258
|
+
}>;
|
|
259
|
+
chunks(): AsyncGenerator<Uint8Array, void, void>;
|
|
260
|
+
/** Drains the whole body and resolves the verified result. */
|
|
261
|
+
collect(): Promise<{
|
|
262
|
+
readonly bytes: number;
|
|
263
|
+
readonly digest: `sha256:${string}`;
|
|
264
|
+
readonly body: Uint8Array;
|
|
265
|
+
}>;
|
|
266
|
+
cancel(): void;
|
|
267
|
+
}
|
|
268
|
+
/** Combined result of one duplex session; a half-closed direction is `null`. */
|
|
269
|
+
export interface PluginChannelDuplexResult {
|
|
270
|
+
readonly read: {
|
|
271
|
+
readonly bytes: number;
|
|
272
|
+
readonly digest: `sha256:${string}`;
|
|
273
|
+
} | null;
|
|
274
|
+
readonly write: {
|
|
275
|
+
readonly bytes: number;
|
|
276
|
+
readonly digest: `sha256:${string}`;
|
|
277
|
+
} | null;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* One consumer-visible duplex session: a single transfer id with an independent
|
|
281
|
+
* read flow and write flow (each with its own credit window), a shared terminal,
|
|
282
|
+
* and per-direction half-close. The session drains only when BOTH real halves
|
|
283
|
+
* have settled.
|
|
284
|
+
*/
|
|
285
|
+
export interface PluginChannelDuplexSession {
|
|
286
|
+
readonly transferId: string;
|
|
287
|
+
readonly readSize: number | null;
|
|
288
|
+
readonly readDigest: `sha256:${string}` | null;
|
|
289
|
+
readonly completed: Promise<PluginChannelDuplexResult>;
|
|
290
|
+
chunks(): AsyncGenerator<Uint8Array, void, void>;
|
|
291
|
+
collect(): Promise<{
|
|
292
|
+
readonly bytes: number;
|
|
293
|
+
readonly digest: `sha256:${string}`;
|
|
294
|
+
readonly body: Uint8Array;
|
|
295
|
+
}>;
|
|
296
|
+
write(chunk: Uint8Array): Promise<void>;
|
|
297
|
+
/** Commits the write direction; the read direction keeps running. */
|
|
298
|
+
finishWrite(): Promise<{
|
|
299
|
+
readonly bytes: number;
|
|
300
|
+
readonly digest: `sha256:${string}`;
|
|
301
|
+
}>;
|
|
302
|
+
/** Half-closes the read direction; the write direction keeps running. */
|
|
303
|
+
endRead(): void;
|
|
304
|
+
abort(): void;
|
|
305
|
+
}
|
|
306
|
+
/** One consumer-visible write stream. */
|
|
307
|
+
export interface PluginChannelWriteStream {
|
|
308
|
+
readonly transferId: string;
|
|
309
|
+
/** Resolves after the provider durably accepted and verified the whole body. */
|
|
310
|
+
readonly completed: Promise<{
|
|
311
|
+
readonly bytes: number;
|
|
312
|
+
readonly digest: `sha256:${string}`;
|
|
313
|
+
}>;
|
|
314
|
+
write(chunk: Uint8Array): Promise<void>;
|
|
315
|
+
finish(): Promise<{
|
|
316
|
+
readonly bytes: number;
|
|
317
|
+
readonly digest: `sha256:${string}`;
|
|
318
|
+
}>;
|
|
319
|
+
abort(): void;
|
|
320
|
+
}
|
|
321
|
+
/** One consumer-visible event subscription. */
|
|
322
|
+
export interface PluginChannelEventSubscription {
|
|
323
|
+
readonly subscriptionId: string;
|
|
324
|
+
readonly delivery: 'transient' | 'reliable';
|
|
325
|
+
readonly fromSequence: number;
|
|
326
|
+
readonly oldestSequence: number | null;
|
|
327
|
+
readonly prunedThrough: number;
|
|
328
|
+
readonly dropped: () => number;
|
|
329
|
+
/**
|
|
330
|
+
* Settles exactly once: `'closed'` on an orderly close, `'failed'` when the
|
|
331
|
+
* ordered reliable delivery can no longer continue (a real gap/overflow/
|
|
332
|
+
* refusal). It never resolves silently as a success, so a consumer can
|
|
333
|
+
* re-subscribe from its durable checkpoint instead of waiting forever.
|
|
334
|
+
*/
|
|
335
|
+
readonly terminal: Promise<'closed' | 'failed'>;
|
|
336
|
+
ack(sequence: number): Promise<number>;
|
|
337
|
+
close(): void;
|
|
338
|
+
}
|
|
339
|
+
export interface PluginChannelSnapshotRead {
|
|
340
|
+
readonly descriptor: ChannelSnapshotDescriptor;
|
|
341
|
+
readonly bytes: Uint8Array;
|
|
342
|
+
}
|
|
343
|
+
export declare class PluginPeerChannelHub {
|
|
344
|
+
#private;
|
|
345
|
+
constructor(options: PluginPeerChannelHubOptions);
|
|
346
|
+
get process(): PluginServiceProcess;
|
|
347
|
+
/** A lane handler bound to one concrete link (or to the in-process loopback). */
|
|
348
|
+
handlerFor(link: PluginChannelLinkPort): PluginPeerLaneHandler;
|
|
349
|
+
/** Host-only directory view of this hub's real registrations (for the peer directory). */
|
|
350
|
+
publicationView(): readonly {
|
|
351
|
+
readonly provider: string;
|
|
352
|
+
readonly service: string;
|
|
353
|
+
readonly major: number;
|
|
354
|
+
readonly scope: 'global';
|
|
355
|
+
readonly scopeKey: 'global';
|
|
356
|
+
readonly ready: boolean;
|
|
357
|
+
readonly lane: PluginChannelLane;
|
|
358
|
+
}[];
|
|
359
|
+
/** In-process port for a same-process route; one instance per hub. */
|
|
360
|
+
loopbackPort(): PluginChannelLinkPort;
|
|
361
|
+
registerStream(input: PluginChannelRegistrationInput, provider: PluginChannelStreamProvider): PluginChannelProviderHandle;
|
|
362
|
+
registerSnapshot(input: PluginChannelRegistrationInput, provider: PluginChannelSnapshotProvider): PluginChannelProviderHandle;
|
|
363
|
+
registerEvent(input: PluginChannelRegistrationInput, provider: PluginChannelEventProvider): PluginChannelProviderHandle;
|
|
364
|
+
/**
|
|
365
|
+
* Appends one reliable event and fans it out to every current subscriber.
|
|
366
|
+
* Capacity/quota failure propagates so the publishing plugin sees an explicit
|
|
367
|
+
* refusal instead of a silent drop. `extend` (when given) commits the provider's
|
|
368
|
+
* business state in the same durable transaction as the event.
|
|
369
|
+
*/
|
|
370
|
+
publishReliable(handle: PluginChannelProviderHandle, payload: Uint8Array, appendPlan?: (payload: Uint8Array) => {
|
|
371
|
+
readonly sequence: number;
|
|
372
|
+
readonly eventId: string;
|
|
373
|
+
} | Promise<{
|
|
374
|
+
readonly sequence: number;
|
|
375
|
+
readonly eventId: string;
|
|
376
|
+
}>): Promise<number>;
|
|
377
|
+
/** Fans one transient notification out to every current subscriber. */
|
|
378
|
+
publishTransient(handle: PluginChannelProviderHandle, payload: Uint8Array): void;
|
|
379
|
+
openStream(target: PluginChannelTarget, caller: string, callerScope: string, contract: string, request: {
|
|
380
|
+
readonly objectId: string;
|
|
381
|
+
readonly version: number;
|
|
382
|
+
readonly offset: number;
|
|
383
|
+
readonly size: number | null;
|
|
384
|
+
readonly digest: `sha256:${string}` | null;
|
|
385
|
+
readonly creditBytes?: number;
|
|
386
|
+
readonly idleMs?: number;
|
|
387
|
+
readonly deadlineAt?: number;
|
|
388
|
+
readonly signal?: AbortSignal;
|
|
389
|
+
readonly purpose?: RpcCallPurpose;
|
|
390
|
+
readonly release?: () => void;
|
|
391
|
+
}): PluginChannelStream;
|
|
392
|
+
/** Opens a write stream: the consumer sends the bytes, the provider commits them. */
|
|
393
|
+
openWriteStream(target: PluginChannelTarget, caller: string, callerScope: string, contract: string, request: {
|
|
394
|
+
readonly objectId: string;
|
|
395
|
+
readonly version: number;
|
|
396
|
+
readonly size: number | null;
|
|
397
|
+
readonly digest: `sha256:${string}` | null;
|
|
398
|
+
readonly creditBytes?: number;
|
|
399
|
+
readonly idleMs?: number;
|
|
400
|
+
readonly deadlineAt?: number;
|
|
401
|
+
readonly signal?: AbortSignal;
|
|
402
|
+
readonly purpose?: RpcCallPurpose;
|
|
403
|
+
readonly release?: () => void;
|
|
404
|
+
}): PluginChannelWriteStream;
|
|
405
|
+
/**
|
|
406
|
+
* Opens a true duplex session: ONE negotiation creates a single transfer id
|
|
407
|
+
* carrying an independent read flow and write flow with one shared terminal.
|
|
408
|
+
*/
|
|
409
|
+
openDuplex(target: PluginChannelTarget, caller: string, callerScope: string, contract: string, request: {
|
|
410
|
+
readonly objectId: string;
|
|
411
|
+
readonly version: number;
|
|
412
|
+
readonly readOffset?: number;
|
|
413
|
+
readonly readSize?: number | null;
|
|
414
|
+
readonly readDigest?: `sha256:${string}` | null;
|
|
415
|
+
readonly writeSize?: number | null;
|
|
416
|
+
readonly writeDigest?: `sha256:${string}` | null;
|
|
417
|
+
readonly readCreditBytes?: number;
|
|
418
|
+
readonly writeCreditBytes?: number;
|
|
419
|
+
readonly idleMs?: number;
|
|
420
|
+
readonly deadlineAt?: number;
|
|
421
|
+
readonly signal?: AbortSignal;
|
|
422
|
+
readonly purpose?: RpcCallPurpose;
|
|
423
|
+
readonly release?: () => void;
|
|
424
|
+
}): PluginChannelDuplexSession;
|
|
425
|
+
/** Describes the peer's snapshot without transferring the body (reconciliation). */
|
|
426
|
+
describeSnapshot(target: PluginChannelTarget, caller: string, callerScope: string, contract: string, options?: {
|
|
427
|
+
readonly version?: number | null;
|
|
428
|
+
readonly deadlineAt?: number;
|
|
429
|
+
readonly signal?: AbortSignal;
|
|
430
|
+
readonly purpose?: RpcCallPurpose;
|
|
431
|
+
}): Promise<ChannelSnapshotDescriptor>;
|
|
432
|
+
readSnapshot(target: PluginChannelTarget, caller: string, callerScope: string, contract: string, options?: {
|
|
433
|
+
readonly version?: number | null;
|
|
434
|
+
readonly deadlineAt?: number;
|
|
435
|
+
readonly signal?: AbortSignal;
|
|
436
|
+
readonly purpose?: RpcCallPurpose;
|
|
437
|
+
}): Promise<PluginChannelSnapshotRead>;
|
|
438
|
+
subscribeEvents(target: PluginChannelTarget, caller: string, callerScope: string, contract: string, request: {
|
|
439
|
+
readonly delivery: 'transient' | 'reliable';
|
|
440
|
+
readonly consumerId: string;
|
|
441
|
+
readonly from?: number | null;
|
|
442
|
+
readonly deadlineAt?: number;
|
|
443
|
+
readonly signal?: AbortSignal;
|
|
444
|
+
readonly purpose?: RpcCallPurpose;
|
|
445
|
+
readonly release?: () => void;
|
|
446
|
+
readonly onEvent: (event: PluginChannelEventDelivery) => void;
|
|
447
|
+
}): Promise<PluginChannelEventSubscription>;
|
|
448
|
+
dispose(): void;
|
|
449
|
+
status(): {
|
|
450
|
+
readonly registrations: number;
|
|
451
|
+
readonly activeInboundTransfers: number;
|
|
452
|
+
readonly activeOutboundTransfers: number;
|
|
453
|
+
readonly subscriptions: number;
|
|
454
|
+
readonly subscribers: number;
|
|
455
|
+
readonly bufferedBytes: number;
|
|
456
|
+
};
|
|
457
|
+
}
|