@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,99 @@
|
|
|
1
|
+
import type { PluginDurableState, DurableJson } from './plugin-durable-state';
|
|
2
|
+
/** Anonymous is an explicit, signed data identity; it carries no key authority. */
|
|
3
|
+
export type DataPrincipal = {
|
|
4
|
+
readonly domain: string;
|
|
5
|
+
readonly keyId: string;
|
|
6
|
+
readonly credentialVersion: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const ANONYMOUS_PRINCIPAL: DataPrincipal;
|
|
9
|
+
export interface AdmissionRequirement {
|
|
10
|
+
readonly plugin: string;
|
|
11
|
+
readonly routeIds: readonly string[];
|
|
12
|
+
}
|
|
13
|
+
/** Public contracts. Business rules belong to the implementing plugin. */
|
|
14
|
+
export interface ManagementSubject {
|
|
15
|
+
readonly id: string;
|
|
16
|
+
readonly provider: string;
|
|
17
|
+
readonly capabilities: readonly string[];
|
|
18
|
+
readonly requiresPasswordChange?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface ManagementProvider {
|
|
21
|
+
setupStatus(): Promise<'uninitialized' | 'ready'>;
|
|
22
|
+
initialize(request: Request): Promise<Response>;
|
|
23
|
+
authenticate(request: Request): Promise<ManagementSubject | null>;
|
|
24
|
+
authorize(subject: ManagementSubject, capability: string): Promise<boolean>;
|
|
25
|
+
login(request: Request): Promise<Response>;
|
|
26
|
+
/** Public login interactions are dispatched only to the selected provider. */
|
|
27
|
+
loginOptions?(request: Request): Promise<Response>;
|
|
28
|
+
beginLogin?(request: Request): Promise<Response>;
|
|
29
|
+
completeLogin?(request: Request): Promise<Response>;
|
|
30
|
+
logout(request: Request): Promise<Response>;
|
|
31
|
+
bootstrap(input: unknown): Promise<void>;
|
|
32
|
+
hasIdentity(): Promise<boolean>;
|
|
33
|
+
revokeSessions(): Promise<void>;
|
|
34
|
+
validateWrite?(request: Request): void;
|
|
35
|
+
csrfToken?(request: Request): string | undefined;
|
|
36
|
+
/** Optional browser cookie renewal after successful session verification. Must not extend the server-side absolute deadline. */
|
|
37
|
+
sessionCookie?(request: Request): Promise<string | undefined>;
|
|
38
|
+
}
|
|
39
|
+
export interface AdmissionTarget {
|
|
40
|
+
/** Host-pinned entry scope for one internal handoff. */
|
|
41
|
+
readonly entryRouteId?: string;
|
|
42
|
+
readonly requestId: string;
|
|
43
|
+
readonly attemptId: string;
|
|
44
|
+
readonly principal: DataPrincipal;
|
|
45
|
+
readonly routeId: string;
|
|
46
|
+
readonly serviceId: string | null;
|
|
47
|
+
readonly upstreamId: string;
|
|
48
|
+
readonly url: string;
|
|
49
|
+
readonly model: string | null;
|
|
50
|
+
readonly now: number;
|
|
51
|
+
}
|
|
52
|
+
export interface AdmissionDenial {
|
|
53
|
+
readonly error: string;
|
|
54
|
+
readonly status: 401 | 403 | 429 | 503 | 422;
|
|
55
|
+
readonly retryAfter?: number;
|
|
56
|
+
}
|
|
57
|
+
export interface AdmissionPlan {
|
|
58
|
+
/** A complete JSON state replacement, staged by Host before the common decision. */
|
|
59
|
+
readonly state?: DurableJson;
|
|
60
|
+
/** Immutable policy snapshot retained by the grant for subsequent attempts. */
|
|
61
|
+
readonly snapshot?: DurableJson;
|
|
62
|
+
readonly denial?: AdmissionDenial;
|
|
63
|
+
}
|
|
64
|
+
export interface IngressPlugin {
|
|
65
|
+
/** Effective policy demand; no policy means no content decoding. */
|
|
66
|
+
bodyRequirements(target: AdmissionTarget, policy: DurableJson): {
|
|
67
|
+
readonly request: 'none' | 'json-read';
|
|
68
|
+
};
|
|
69
|
+
/** Optional per-principal state. Policies are frozen; plans receive only this key's clones.
|
|
70
|
+
* Expiry must mean absence is behaviorally equivalent to retaining the state. */
|
|
71
|
+
keyedState?: {
|
|
72
|
+
readonly capacity: number;
|
|
73
|
+
policyForKey(policy: DurableJson, keyId: string): DurableJson;
|
|
74
|
+
expiresAt(state: DurableJson): number;
|
|
75
|
+
reconcile(state: DurableJson, policy: DurableJson, now: number, transition?: {
|
|
76
|
+
readonly previousActivation: number;
|
|
77
|
+
readonly deferUntilActivation: boolean;
|
|
78
|
+
}): DurableJson;
|
|
79
|
+
};
|
|
80
|
+
authenticate?(request: Request, policy: DurableJson, now: number): DataPrincipal | null;
|
|
81
|
+
resolveIdentity?(target: AdmissionTarget, policy: DurableJson): DataPrincipal;
|
|
82
|
+
/** Pure access decision before preparation/cache reuse; never plans or debits state. */
|
|
83
|
+
authorize?(target: AdmissionTarget, policy: DurableJson): AdmissionDenial | null;
|
|
84
|
+
plan(target: AdmissionTarget, policy: DurableJson, state: DurableJson, policyActivatedAt?: number): AdmissionPlan;
|
|
85
|
+
beforeAttempt?(target: AdmissionTarget, snapshot: DurableJson): AdmissionDenial | null;
|
|
86
|
+
}
|
|
87
|
+
export interface IngressPluginModule {
|
|
88
|
+
createIngress(): IngressPlugin;
|
|
89
|
+
}
|
|
90
|
+
export interface PluginStateRpcContext {
|
|
91
|
+
readonly state: PluginDurableState;
|
|
92
|
+
readonly requestId: string;
|
|
93
|
+
readonly attemptId: string;
|
|
94
|
+
readonly principal: DataPrincipal;
|
|
95
|
+
}
|
|
96
|
+
export interface PluginPolicyPublication {
|
|
97
|
+
readonly version: number;
|
|
98
|
+
readonly value: DurableJson;
|
|
99
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Shared process sink; the public SDK must not bundle file transports into plugins. */
|
|
2
|
+
type Context = Readonly<Record<string, unknown>>;
|
|
3
|
+
type LogMethod = {
|
|
4
|
+
(context: Context, message?: string): void;
|
|
5
|
+
(message: string): void;
|
|
6
|
+
};
|
|
7
|
+
export interface PluginLogSink {
|
|
8
|
+
info: LogMethod;
|
|
9
|
+
warn: LogMethod;
|
|
10
|
+
error: LogMethod;
|
|
11
|
+
debug: LogMethod;
|
|
12
|
+
fatal: LogMethod;
|
|
13
|
+
child(bindings: Context): PluginLogSink;
|
|
14
|
+
}
|
|
15
|
+
export declare function installPluginLogSink(sink: PluginLogSink): void;
|
|
16
|
+
export declare const logger: PluginLogSink;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PluginDependencyGraph } from '../plugin-dependencies';
|
|
2
|
+
import type { Sha256Digest } from '@jeffusion/bungee-types';
|
|
3
|
+
import type { PluginScanRoot } from '../plugin-path-resolver';
|
|
4
|
+
import type { ConfigurationCompileOptions } from '../config-storage/plugin-schema';
|
|
5
|
+
import type { PluginManifestRecord, ReadonlyPluginConfigField } from './types';
|
|
6
|
+
export interface CatalogPathResolver {
|
|
7
|
+
getScanRoots?: () => PluginScanRoot[];
|
|
8
|
+
getScanDirectories?: () => string[];
|
|
9
|
+
}
|
|
10
|
+
export interface PluginManifestCatalogBuildOptions {
|
|
11
|
+
scanDirectories?: readonly string[];
|
|
12
|
+
pathResolver?: CatalogPathResolver;
|
|
13
|
+
}
|
|
14
|
+
export type BuildPluginManifestCatalogOptions = PluginManifestCatalogBuildOptions;
|
|
15
|
+
export declare class PluginManifestCatalog {
|
|
16
|
+
#private;
|
|
17
|
+
readonly hash: Sha256Digest;
|
|
18
|
+
readonly dependencies: PluginDependencyGraph;
|
|
19
|
+
private constructor();
|
|
20
|
+
static build(options: PluginManifestCatalogBuildOptions): Promise<PluginManifestCatalog>;
|
|
21
|
+
get(name: string): PluginManifestRecord | undefined;
|
|
22
|
+
has(name: string): boolean;
|
|
23
|
+
names(): readonly string[];
|
|
24
|
+
records(): readonly PluginManifestRecord[];
|
|
25
|
+
schemaEntries(): ReadonlyMap<string, readonly ReadonlyPluginConfigField[]>;
|
|
26
|
+
toCompileOptions(): ConfigurationCompileOptions;
|
|
27
|
+
}
|
|
28
|
+
export declare function buildPluginManifestCatalog(options: PluginManifestCatalogBuildOptions): Promise<PluginManifestCatalog>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { PluginConfigConstraint, PluginConfigValue } from '@jeffusion/bungee-types';
|
|
2
|
+
import type { ReadonlyPluginConfigField } from './types';
|
|
3
|
+
export declare function parseConfigConstraints(value: PluginConfigValue | undefined, schema: readonly ReadonlyPluginConfigField[]): readonly PluginConfigConstraint[] | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { buildPluginManifestCatalog, PluginManifestCatalog } from './catalog';
|
|
2
|
+
export type { BuildPluginManifestCatalogOptions } from './catalog';
|
|
3
|
+
export type { PluginScanRoot } from '../plugin-path-resolver';
|
|
4
|
+
export { parsePluginManifestText } from './manifest-parser';
|
|
5
|
+
export { PluginManifestCatalogError } from './parse-utils';
|
|
6
|
+
export type { PluginManifestCatalogRecord, PluginManifestRecord, PluginManifestRecordBase, ReadonlyPluginConfigField, ReadonlyPluginShowIfCondition, StrictPluginManifest, } from './types';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { posix } from 'node:path';
|
|
2
|
+
import type { PluginManifestRecord, PluginManifestRecordBase } from './types';
|
|
3
|
+
import type { StrictPluginManifest } from './types';
|
|
4
|
+
type MetafilePathApi = Pick<typeof posix, 'normalize' | 'resolve'>;
|
|
5
|
+
export declare function resolveMetafileInputPath(input: string, absWorkingDirectory: string, pathApi?: MetafilePathApi): string;
|
|
6
|
+
export declare function validatePluginManifestEntries(pluginDirectory: string, manifest: StrictPluginManifest): Promise<string>;
|
|
7
|
+
export declare function loadPluginManifestRecord(pluginDirectory: string, rootPath?: string): Promise<PluginManifestRecordBase>;
|
|
8
|
+
export declare function finalizePluginManifestRecord(record: PluginManifestRecordBase): Promise<PluginManifestRecord>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function parseBoundedJson(content: string, source: string): unknown;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PluginConfigValue } from '@jeffusion/bungee-types';
|
|
2
|
+
import type { PluginContributions, StrictPluginManifest } from './types';
|
|
3
|
+
export declare function parseContributions(value: PluginConfigValue | undefined, path: string): PluginContributions | undefined;
|
|
4
|
+
export declare function parseControl(value: PluginConfigValue | undefined, path: string): StrictPluginManifest['control'];
|
|
5
|
+
export declare function parseMetadata(value: PluginConfigValue | undefined, path: string): StrictPluginManifest['metadata'];
|
|
6
|
+
export declare function parseUi(value: PluginConfigValue | undefined, path: string): StrictPluginManifest['ui'];
|
|
7
|
+
export declare function parseAuthor(value: PluginConfigValue | undefined, path: string): StrictPluginManifest['author'];
|
|
8
|
+
export declare function parseRepository(value: PluginConfigValue | undefined, path: string): StrictPluginManifest['repository'];
|
|
9
|
+
export declare function parseStringRecord(value: PluginConfigValue | undefined, path: string): Readonly<Record<string, string>> | undefined;
|
|
10
|
+
export declare function parseTranslations(value: PluginConfigValue | undefined, path: string): StrictPluginManifest['translations'];
|
|
11
|
+
export declare function parseOptionalStringList(value: PluginConfigValue | undefined, path: string): readonly string[] | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function parseExactSemver(value: string, path: string): string;
|
|
2
|
+
/** Optional dependencies validate syntax without requiring an installed version. */
|
|
3
|
+
export declare function validateVersionRange(value: string, path: string): string;
|
|
4
|
+
export declare function validateEngineRange(value: string, path: string, actualVersion: string): string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const PLUGIN_PERMISSIONS: readonly ["network", "filesystem", "database", "storage", "ui:modals", "ui:popups", "ui:forms", "ui:navigation", "api:routes", "api:plugins", "api:logs"];
|
|
2
|
+
export declare function isDangerousObjectName(value: string): boolean;
|
|
3
|
+
export declare function safeIdentifier(value: string, path: string): string;
|
|
4
|
+
export declare function safeSlug(value: string, path: string): string;
|
|
5
|
+
export declare function relativeEntry(value: string, path: string, kind: 'main' | 'ui'): string;
|
|
6
|
+
export declare function internalRoute(value: string, path: string): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { PluginConfigValue } from '@jeffusion/bungee-types';
|
|
2
|
+
export declare class PluginManifestCatalogError extends Error {
|
|
3
|
+
readonly path: string;
|
|
4
|
+
readonly name = "PluginManifestCatalogError";
|
|
5
|
+
constructor(path: string, message: string, options?: ErrorOptions);
|
|
6
|
+
}
|
|
7
|
+
export type JsonRecord = Record<string, PluginConfigValue>;
|
|
8
|
+
export declare function parseJsonText(content: string, path: string): PluginConfigValue;
|
|
9
|
+
export declare function record(value: PluginConfigValue, path: string): JsonRecord;
|
|
10
|
+
export declare function exact(value: JsonRecord, fields: ReadonlySet<string>, path: string): void;
|
|
11
|
+
export declare function string(value: PluginConfigValue | undefined, path: string): string;
|
|
12
|
+
export declare function optionalString(value: PluginConfigValue | undefined, path: string): string | undefined;
|
|
13
|
+
export declare function boolean(value: PluginConfigValue | undefined, path: string): boolean;
|
|
14
|
+
export declare function array(value: PluginConfigValue | undefined, path: string): readonly PluginConfigValue[];
|
|
15
|
+
export declare function uniqueStrings(value: PluginConfigValue | undefined, path: string, allowEmpty?: boolean): readonly string[];
|
|
16
|
+
export declare function literal<const T extends string>(value: PluginConfigValue | undefined, values: readonly T[], path: string): T;
|
|
17
|
+
export declare function joinPath(parent: string, child: string): string;
|
|
18
|
+
export declare function freezeDeep(value: unknown): void;
|
|
19
|
+
export declare function optionalProperty<T>(key: string, value: T | undefined): Record<string, T>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type RuntimeIdentityInput = Readonly<{
|
|
2
|
+
path: string;
|
|
3
|
+
bytes: Uint8Array;
|
|
4
|
+
}>;
|
|
5
|
+
/** Plugin artifacts share the host's log sink; host file transports are not plugin dependencies. */
|
|
6
|
+
export declare function pluginRuntimeBuildSource(path: string): string | undefined;
|
|
7
|
+
export declare function externalRuntimeDependencyIdentity(imported: Readonly<{
|
|
8
|
+
path: string;
|
|
9
|
+
original?: string;
|
|
10
|
+
}>): string;
|
|
11
|
+
export declare function normalizeRuntimeIdentity(pluginRoot: string, inputPath: string): string;
|
|
12
|
+
export declare function hashRuntimeIdentity(pluginRoot: string, inputs: Iterable<RuntimeIdentityInput>, externalDependencies?: Iterable<string>): `sha256:${string}`;
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import type { PluginConfigConstraint, PluginRuntimeScope } from '@jeffusion/bungee-types';
|
|
2
|
+
import type { PluginConfigValue, Sha256Digest } from '@jeffusion/bungee-types';
|
|
3
|
+
import type { PluginArtifactKind, PluginCapability, PluginUiExtensionMode } from '../plugin-artifact-contract';
|
|
4
|
+
import type { PluginConfigFieldType } from '../plugin.types';
|
|
5
|
+
export type ReadonlyPluginOption = {
|
|
6
|
+
readonly label: string;
|
|
7
|
+
readonly value: string;
|
|
8
|
+
readonly description?: string;
|
|
9
|
+
};
|
|
10
|
+
export type ReadonlyPluginConfigField = {
|
|
11
|
+
readonly name: string;
|
|
12
|
+
readonly type: PluginConfigFieldType;
|
|
13
|
+
readonly label: string;
|
|
14
|
+
readonly required?: boolean;
|
|
15
|
+
readonly default?: PluginConfigValue;
|
|
16
|
+
readonly options?: readonly ReadonlyPluginOption[];
|
|
17
|
+
readonly description?: string;
|
|
18
|
+
readonly placeholder?: string;
|
|
19
|
+
readonly catalogPlugin?: string;
|
|
20
|
+
readonly sourceCatalogProviderField?: string;
|
|
21
|
+
readonly targetCatalogProviderField?: string;
|
|
22
|
+
readonly validation?: Readonly<{
|
|
23
|
+
pattern?: string;
|
|
24
|
+
trimmed?: boolean;
|
|
25
|
+
min?: number;
|
|
26
|
+
max?: number;
|
|
27
|
+
message?: string;
|
|
28
|
+
}>;
|
|
29
|
+
readonly showIf?: ReadonlyPluginShowIfCondition;
|
|
30
|
+
readonly properties?: readonly ReadonlyPluginConfigField[];
|
|
31
|
+
readonly items?: ReadonlyPluginConfigField;
|
|
32
|
+
readonly fieldTransform?: Readonly<{
|
|
33
|
+
type: 'split' | 'concat' | 'compute';
|
|
34
|
+
separator?: string;
|
|
35
|
+
fields?: readonly string[];
|
|
36
|
+
}>;
|
|
37
|
+
};
|
|
38
|
+
export type ReadonlyPluginShowIfCondition = Readonly<{
|
|
39
|
+
field: string;
|
|
40
|
+
value: PluginConfigValue;
|
|
41
|
+
}> | Readonly<{
|
|
42
|
+
all: readonly ReadonlyPluginShowIfCondition[];
|
|
43
|
+
}> | Readonly<{
|
|
44
|
+
any: readonly ReadonlyPluginShowIfCondition[];
|
|
45
|
+
}>;
|
|
46
|
+
export type CredentialOutboundHeaderProfile = Readonly<{
|
|
47
|
+
passthrough: readonly string[];
|
|
48
|
+
set: Readonly<Record<string, string>>;
|
|
49
|
+
}>;
|
|
50
|
+
export type CredentialRequestPolicy = Readonly<{
|
|
51
|
+
pathname: string;
|
|
52
|
+
methods: readonly string[];
|
|
53
|
+
outboundHeaders?: CredentialOutboundHeaderProfile;
|
|
54
|
+
}>;
|
|
55
|
+
export type PluginContributions = Readonly<{
|
|
56
|
+
resourceExtensions?: readonly Readonly<{
|
|
57
|
+
resource: 'api-key';
|
|
58
|
+
component: string;
|
|
59
|
+
path: '/keys/:keyId';
|
|
60
|
+
}>[];
|
|
61
|
+
nativeWidgets?: readonly Readonly<{
|
|
62
|
+
id: string;
|
|
63
|
+
title: string;
|
|
64
|
+
size: 'small' | 'medium' | 'large' | 'full';
|
|
65
|
+
component: string;
|
|
66
|
+
presentation?: 'kpi';
|
|
67
|
+
props?: Readonly<Record<string, PluginConfigValue>>;
|
|
68
|
+
}>[];
|
|
69
|
+
api?: readonly Readonly<{
|
|
70
|
+
path: string;
|
|
71
|
+
methods: readonly ('GET' | 'POST' | 'PUT' | 'DELETE')[];
|
|
72
|
+
handler: string;
|
|
73
|
+
execution: 'control';
|
|
74
|
+
capability?: string;
|
|
75
|
+
methodCapabilities?: Readonly<Record<string, string>>;
|
|
76
|
+
}>[];
|
|
77
|
+
upstreamSources?: readonly Readonly<{
|
|
78
|
+
id: string;
|
|
79
|
+
label: string;
|
|
80
|
+
listAccounts: string;
|
|
81
|
+
createDraft: string;
|
|
82
|
+
credentialPolicy: Readonly<{
|
|
83
|
+
allowedOrigins: readonly string[];
|
|
84
|
+
allowedRequests: readonly CredentialRequestPolicy[];
|
|
85
|
+
allowedHeaderNames: readonly string[];
|
|
86
|
+
}>;
|
|
87
|
+
}>[];
|
|
88
|
+
widgets?: readonly Readonly<{
|
|
89
|
+
title: string;
|
|
90
|
+
path: string;
|
|
91
|
+
size?: 'small' | 'medium' | 'large' | 'full';
|
|
92
|
+
}>[];
|
|
93
|
+
navigation?: readonly Readonly<{
|
|
94
|
+
label: string;
|
|
95
|
+
path: string;
|
|
96
|
+
icon?: string;
|
|
97
|
+
target?: 'sidebar' | 'header';
|
|
98
|
+
component?: string;
|
|
99
|
+
layout?: 'standalone';
|
|
100
|
+
}>[];
|
|
101
|
+
settings?: string;
|
|
102
|
+
nativeSettingsComponent?: string;
|
|
103
|
+
commands?: readonly Readonly<{
|
|
104
|
+
command: string;
|
|
105
|
+
title: string;
|
|
106
|
+
category?: string;
|
|
107
|
+
icon?: string;
|
|
108
|
+
}>[];
|
|
109
|
+
}>;
|
|
110
|
+
export type StrictPluginManifest = Readonly<{
|
|
111
|
+
name: string;
|
|
112
|
+
version: string;
|
|
113
|
+
builtin?: boolean;
|
|
114
|
+
schemaVersion: 3;
|
|
115
|
+
artifactKind: PluginArtifactKind;
|
|
116
|
+
main: string;
|
|
117
|
+
capabilities: readonly PluginCapability[];
|
|
118
|
+
runtimeScope?: PluginRuntimeScope;
|
|
119
|
+
uiExtensionMode: PluginUiExtensionMode;
|
|
120
|
+
engines: Readonly<{
|
|
121
|
+
bungee: string;
|
|
122
|
+
node?: string;
|
|
123
|
+
}>;
|
|
124
|
+
ingress?: Readonly<{
|
|
125
|
+
entry: string;
|
|
126
|
+
}>;
|
|
127
|
+
management?: Readonly<{
|
|
128
|
+
loginComponent?: string;
|
|
129
|
+
setupComponent?: string;
|
|
130
|
+
}>;
|
|
131
|
+
control?: Readonly<{
|
|
132
|
+
entry: string;
|
|
133
|
+
rpc: readonly Readonly<{
|
|
134
|
+
name: string;
|
|
135
|
+
access: 'bound-attempt';
|
|
136
|
+
}>[];
|
|
137
|
+
}>;
|
|
138
|
+
description?: string;
|
|
139
|
+
icon?: string;
|
|
140
|
+
author?: string | Readonly<{
|
|
141
|
+
name: string;
|
|
142
|
+
email?: string;
|
|
143
|
+
url?: string;
|
|
144
|
+
}>;
|
|
145
|
+
license?: string;
|
|
146
|
+
homepage?: string;
|
|
147
|
+
repository?: string | Readonly<{
|
|
148
|
+
type: string;
|
|
149
|
+
url: string;
|
|
150
|
+
}>;
|
|
151
|
+
keywords?: readonly string[];
|
|
152
|
+
ui?: Readonly<{
|
|
153
|
+
components?: readonly Readonly<{
|
|
154
|
+
name: string;
|
|
155
|
+
entry: string;
|
|
156
|
+
}>[];
|
|
157
|
+
}>;
|
|
158
|
+
permissions?: readonly string[];
|
|
159
|
+
dependencies?: Readonly<Record<string, string>>;
|
|
160
|
+
services?: import('../plugin-services').PluginServiceDeclarations;
|
|
161
|
+
contributes?: PluginContributions;
|
|
162
|
+
metadata?: Readonly<{
|
|
163
|
+
name?: string;
|
|
164
|
+
description?: string;
|
|
165
|
+
icon?: string;
|
|
166
|
+
}>;
|
|
167
|
+
configSchema: readonly ReadonlyPluginConfigField[];
|
|
168
|
+
configConstraints?: readonly PluginConfigConstraint[];
|
|
169
|
+
translations?: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
170
|
+
}>;
|
|
171
|
+
export type PluginManifestRecord = Readonly<{
|
|
172
|
+
name: string;
|
|
173
|
+
rootPath: string;
|
|
174
|
+
manifest: StrictPluginManifest;
|
|
175
|
+
pluginPath: string;
|
|
176
|
+
pluginDir: string;
|
|
177
|
+
/** Canonical real UI directory captured while building the catalog. */
|
|
178
|
+
uiRoot?: string;
|
|
179
|
+
manifestPath: string;
|
|
180
|
+
mainPath: string;
|
|
181
|
+
controlPath?: string;
|
|
182
|
+
ingressPath?: string;
|
|
183
|
+
runtimeHash: Sha256Digest;
|
|
184
|
+
configSchema: readonly ReadonlyPluginConfigField[];
|
|
185
|
+
}>;
|
|
186
|
+
export type PluginManifestRecordBase = Readonly<Omit<PluginManifestRecord, 'runtimeHash'>>;
|
|
187
|
+
export type PluginManifestCatalogRecord = PluginManifestRecord;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface PluginSearchPathOptions {
|
|
2
|
+
category?: string;
|
|
3
|
+
includeServerEntry?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface PluginScanRoot {
|
|
6
|
+
path: string;
|
|
7
|
+
required: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare class PluginPathResolver {
|
|
10
|
+
private readonly systemPluginsDir;
|
|
11
|
+
private readonly customPluginsDir;
|
|
12
|
+
private readonly includeSystemPlugins;
|
|
13
|
+
constructor(baseDir: string, configBasePath: string, executablePath?: string);
|
|
14
|
+
getSearchPaths(pluginName: string, options?: PluginSearchPathOptions): string[];
|
|
15
|
+
getScanDirectories(): string[];
|
|
16
|
+
getScanRoots(): PluginScanRoot[];
|
|
17
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import type { Plugin } from './plugin.types';
|
|
2
|
+
import type { PluginConfig, PluginConfigConstraint, PluginRuntimeScope } from '@jeffusion/bungee-types';
|
|
3
|
+
import { type LoadedPluginArtifactManifest } from './plugin-artifact-contract';
|
|
4
|
+
import type { PluginRegistryStateSnapshot } from './plugin-runtime-state-machine';
|
|
5
|
+
/**
|
|
6
|
+
* Plugin 工厂函数类型
|
|
7
|
+
*/
|
|
8
|
+
type PluginFactory = new (options: any) => Plugin;
|
|
9
|
+
/**
|
|
10
|
+
* Plugin 注册表
|
|
11
|
+
* 负责加载和管理 plugins 的元数据
|
|
12
|
+
*
|
|
13
|
+
* 注意:实际的插件执行由 ScopedPluginRegistry 处理
|
|
14
|
+
* 此类主要用于:
|
|
15
|
+
* - 插件发现和加载
|
|
16
|
+
* - 插件元数据管理
|
|
17
|
+
* - 插件启用/禁用状态管理(UI)
|
|
18
|
+
*/
|
|
19
|
+
export declare class PluginRegistry {
|
|
20
|
+
private readonly activatedPluginNames;
|
|
21
|
+
private pluginFactories;
|
|
22
|
+
private pluginTranslations;
|
|
23
|
+
private pluginManifests;
|
|
24
|
+
private pluginStateSnapshots;
|
|
25
|
+
private configBasePath;
|
|
26
|
+
private pathResolver;
|
|
27
|
+
constructor(configBasePath?: string, activatedPluginNames?: ReadonlySet<string>);
|
|
28
|
+
/**
|
|
29
|
+
* 读取并解析插件的 manifest.json
|
|
30
|
+
* @param pluginDir 插件目录路径
|
|
31
|
+
* @returns 解析后的 manifest,如果不存在或解析失败则返回 null
|
|
32
|
+
*/
|
|
33
|
+
private peekManifestName;
|
|
34
|
+
private setPluginStateSnapshot;
|
|
35
|
+
private renamePluginStateSnapshot;
|
|
36
|
+
private loadManifest;
|
|
37
|
+
private inferPluginDirFromEntryPath;
|
|
38
|
+
/**
|
|
39
|
+
* 扫描指定目录并加载所有插件
|
|
40
|
+
*
|
|
41
|
+
* 支持三种插件发现模式(按优先级):
|
|
42
|
+
* 1. manifest-first:检测到 manifest.json 时,从中读取元数据
|
|
43
|
+
* 2. 目录插件:${pluginName}/index.ts/js(无 manifest 时回退)
|
|
44
|
+
* 3. 单文件插件:${pluginName}.ts/js(直接在根目录)
|
|
45
|
+
*
|
|
46
|
+
* @param directory 要扫描的目录
|
|
47
|
+
* @param enabledByDefault 默认是否启用插件
|
|
48
|
+
* @returns 加载的插件名称列表
|
|
49
|
+
*/
|
|
50
|
+
scanAndLoadPlugins(directory: string, enabledByDefault: boolean): Promise<string[]>;
|
|
51
|
+
/**
|
|
52
|
+
* 扫描所有插件目录并加载插件
|
|
53
|
+
* 所有插件默认为禁用状态,需要通过配置文件显式启用
|
|
54
|
+
*/
|
|
55
|
+
scanAndLoadAllPlugins(): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* 从配置加载 plugins
|
|
58
|
+
* 支持两种格式:
|
|
59
|
+
* 1. 字符串简写: "plugin-name" → { name: "plugin-name" }
|
|
60
|
+
* 2. 完整配置对象: { name: "plugin-name", options: {...} }
|
|
61
|
+
*/
|
|
62
|
+
loadPlugins(configs: Array<PluginConfig | string>): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* 加载单个 plugin(存储工厂信息而不是实例)
|
|
65
|
+
*
|
|
66
|
+
* 元数据获取优先级:
|
|
67
|
+
* 1. 已缓存的 manifest(来自 scanAndLoadPlugins)
|
|
68
|
+
* 2. 从插件目录加载 manifest.json
|
|
69
|
+
* 3. 回退到类的静态属性(向后兼容)
|
|
70
|
+
*
|
|
71
|
+
* @returns 插件名称
|
|
72
|
+
*/
|
|
73
|
+
loadPlugin(config: PluginConfig): Promise<string>;
|
|
74
|
+
/**
|
|
75
|
+
* 确保插件已加载到 registry 并返回插件名称
|
|
76
|
+
*/
|
|
77
|
+
ensurePluginLoaded(config: PluginConfig | string): Promise<string>;
|
|
78
|
+
/**
|
|
79
|
+
* 获取所有已扫描插件的元数据
|
|
80
|
+
* 包括已启用和未启用的插件
|
|
81
|
+
*
|
|
82
|
+
* 元数据来源优先级:manifest > 静态属性
|
|
83
|
+
*/
|
|
84
|
+
getAllPluginsMetadata(): Array<{
|
|
85
|
+
name: string;
|
|
86
|
+
version: string;
|
|
87
|
+
description: string;
|
|
88
|
+
metadata: any;
|
|
89
|
+
hasManifest: boolean;
|
|
90
|
+
}>;
|
|
91
|
+
/**
|
|
92
|
+
* 获取所有插件的配置 Schema
|
|
93
|
+
* 用于 UI 动态生成插件配置表单
|
|
94
|
+
*
|
|
95
|
+
* Schema 来源优先级:manifest.configSchema > 静态属性 configSchema
|
|
96
|
+
*
|
|
97
|
+
* @returns 插件 Schema Map,key 为插件名,value 为插件的 schema 信息
|
|
98
|
+
*/
|
|
99
|
+
getAllPluginSchemas(): Record<string, {
|
|
100
|
+
name: string;
|
|
101
|
+
runtimeScope?: PluginRuntimeScope;
|
|
102
|
+
configConstraints?: readonly PluginConfigConstraint[];
|
|
103
|
+
version: string;
|
|
104
|
+
description: string;
|
|
105
|
+
metadata: any;
|
|
106
|
+
configSchema: any[];
|
|
107
|
+
}>;
|
|
108
|
+
/**
|
|
109
|
+
* 卸载所有 plugins(清理 context)
|
|
110
|
+
*
|
|
111
|
+
* 真实实例由 ScopedPluginRegistry 持有,这里不能再构造临时实例调用 onDestroy:
|
|
112
|
+
* 那既没有所有权,也会对未初始化的实例重复清理。只清理真正的全局 context,
|
|
113
|
+
* 尝试全部 context 后再传播失败。
|
|
114
|
+
*/
|
|
115
|
+
unloadAll(): Promise<void>;
|
|
116
|
+
/**
|
|
117
|
+
* 获取所有插件的翻译内容,格式化为前端 i18n 可用的结构
|
|
118
|
+
*
|
|
119
|
+
* 翻译键会自动添加 `plugins.{pluginName}` 前缀
|
|
120
|
+
*
|
|
121
|
+
* @returns 按语言组织的翻译数据
|
|
122
|
+
* @example
|
|
123
|
+
* ```json
|
|
124
|
+
* {
|
|
125
|
+
* "en": {
|
|
126
|
+
* "plugins": {
|
|
127
|
+
* "llm-protocol-adapter": {
|
|
128
|
+
* "transformation.label": "Transformation Direction",
|
|
129
|
+
* "options.anthropic_openai.label": "Anthropic → OpenAI"
|
|
130
|
+
* }
|
|
131
|
+
* }
|
|
132
|
+
* },
|
|
133
|
+
* "zh-CN": {
|
|
134
|
+
* "plugins": {
|
|
135
|
+
* "llm-protocol-adapter": {
|
|
136
|
+
* "transformation.label": "转换方向",
|
|
137
|
+
* "options.anthropic_openai.label": "Anthropic → OpenAI"
|
|
138
|
+
* }
|
|
139
|
+
* }
|
|
140
|
+
* }
|
|
141
|
+
* }
|
|
142
|
+
* ```
|
|
143
|
+
*/
|
|
144
|
+
getAllPluginTranslations(): Record<string, any>;
|
|
145
|
+
/**
|
|
146
|
+
* 获取指定插件的 manifest
|
|
147
|
+
* @param pluginName 插件名称
|
|
148
|
+
* @returns manifest 对象,如果不存在则返回 undefined
|
|
149
|
+
*/
|
|
150
|
+
getPluginManifest(pluginName: string): LoadedPluginArtifactManifest | undefined;
|
|
151
|
+
/**
|
|
152
|
+
* 获取所有已加载的 manifest
|
|
153
|
+
* @returns manifest Map
|
|
154
|
+
*/
|
|
155
|
+
getAllPluginManifests(): Map<string, LoadedPluginArtifactManifest>;
|
|
156
|
+
getPluginAssetDescriptor(pluginName: string): {
|
|
157
|
+
entryPath: string;
|
|
158
|
+
pluginDir: string;
|
|
159
|
+
manifest?: LoadedPluginArtifactManifest;
|
|
160
|
+
} | undefined;
|
|
161
|
+
getPluginClass(pluginName: string): (PluginFactory & import('./plugin.types').PluginConstructor) | undefined;
|
|
162
|
+
getPluginStateSnapshot(pluginName: string): PluginRegistryStateSnapshot | undefined;
|
|
163
|
+
getAllPluginStateSnapshots(): Map<string, PluginRegistryStateSnapshot>;
|
|
164
|
+
}
|
|
165
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type PluginDependencyManifest } from './plugin-dependencies';
|
|
2
|
+
import type { AppConfig, PluginConfig } from '@jeffusion/bungee-types';
|
|
3
|
+
import type { PluginRegistry } from './plugin-registry';
|
|
4
|
+
export declare function isAutomaticGlobalProvider(config: PluginConfig): boolean;
|
|
5
|
+
export declare function createRuntimeEligibleConfig(config: AppConfig, registry: Pick<PluginRegistry, 'getPluginStateSnapshot'> & {
|
|
6
|
+
getAllPluginManifests(): ReadonlyMap<string, PluginDependencyManifest & {
|
|
7
|
+
readonly mainPath?: string;
|
|
8
|
+
}>;
|
|
9
|
+
}, activatedPluginNames: ReadonlySet<string>): AppConfig;
|
|
10
|
+
export declare function collectDeclaredPluginConfigs(config: AppConfig): PluginConfig[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PluginRuntimeOrchestratorStatusReport } from './plugin-runtime-status';
|
|
2
|
+
export interface PluginRuntimeOrchestratorDiff {
|
|
3
|
+
added: string[];
|
|
4
|
+
removed: string[];
|
|
5
|
+
changed: string[];
|
|
6
|
+
}
|
|
7
|
+
export declare function diffStatusReports(previous: PluginRuntimeOrchestratorStatusReport, next: PluginRuntimeOrchestratorStatusReport): PluginRuntimeOrchestratorDiff;
|
|
8
|
+
export declare function summarizePluginFailures(status: PluginRuntimeOrchestratorStatusReport): {
|
|
9
|
+
pluginName: string;
|
|
10
|
+
currentGeneration: number | null;
|
|
11
|
+
servingGeneration: number | null;
|
|
12
|
+
drainingGenerations: number[];
|
|
13
|
+
validationFailure: import("./plugin-runtime-state-machine").PluginFailureSnapshot | undefined;
|
|
14
|
+
runtimeFailure: import("./plugin-runtime-state-machine").PluginFailureSnapshot | undefined;
|
|
15
|
+
}[];
|