@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.
Files changed (445) hide show
  1. package/dist/access-database.d.ts +22 -0
  2. package/dist/api/handlers/logs.d.ts +66 -0
  3. package/dist/api/handlers/stats.d.ts +50 -0
  4. package/dist/api/logs.d.ts +145 -0
  5. package/dist/api/types.d.ts +21 -0
  6. package/dist/{chunk-assets-swq50rh3.js → chunk-assets-vsan7gav.js} +11 -11
  7. package/dist/{chunk-body-capture-gtta9q26.js → chunk-body-capture-sbk6cdf9.js} +2 -2
  8. package/dist/{chunk-handler-ehkkxpnq.js → chunk-handler-9k6b95w4.js} +2 -2
  9. package/dist/{chunk-main-rcw37zhd.js → chunk-main-1p15rgq5.js} +1 -1
  10. package/dist/{chunk-main-10pgdbgn.js → chunk-main-2efrk1nt.js} +1 -1
  11. package/dist/{chunk-main-a4eygw79.js → chunk-main-d74e7qxc.js} +1 -1
  12. package/dist/{chunk-main-p5rpfk7t.js → chunk-main-gwaw6pxp.js} +1 -1
  13. package/dist/{chunk-main-25kbhd4n.js → chunk-main-mqgkewnx.js} +1 -1
  14. package/dist/{chunk-main-0w3jk2x4.js → chunk-main-qm1tgaka.js} +2 -2
  15. package/dist/{chunk-master-276v10xm.js → chunk-master-wtcfwd6g.js} +6 -6
  16. package/dist/{chunk-plugin-context-manager-nexyp0jb.js → chunk-plugin-context-manager-kabrbg0s.js} +1 -1
  17. package/dist/{chunk-plugin-manager-dvxc5w6p.js → chunk-plugin-manager-q1bt6xnw.js} +2 -2
  18. package/dist/{chunk-runtime-upgrade-sjxsa2r6.js → chunk-runtime-upgrade-rvm3d096.js} +3 -3
  19. package/dist/{chunk-runtime-qbfd9z3p.js → chunk-runtime-xmp308t7.js} +2 -2
  20. package/dist/{chunk-worker-5mdsmhte.js → chunk-worker-99q8qnj9.js} +9 -9
  21. package/dist/config-publication/admission-handoff.d.ts +13 -0
  22. package/dist/config-publication/coordinator-types.d.ts +176 -0
  23. package/dist/config-publication/current-startup.d.ts +26 -0
  24. package/dist/config-publication/drain-workers.d.ts +15 -0
  25. package/dist/config-publication/index.d.ts +6 -0
  26. package/dist/config-publication/master-coordinator.d.ts +45 -0
  27. package/dist/config-publication/master-messages.d.ts +2 -0
  28. package/dist/config-publication/message-fields.d.ts +20 -0
  29. package/dist/config-publication/messages.d.ts +3 -0
  30. package/dist/config-publication/process-cleanup.d.ts +30 -0
  31. package/dist/config-publication/process-identity.d.ts +14 -0
  32. package/dist/config-publication/process-termination.d.ts +7 -0
  33. package/dist/config-publication/publication-runner.d.ts +50 -0
  34. package/dist/config-publication/recovery-disposition.d.ts +17 -0
  35. package/dist/config-publication/types.d.ts +137 -0
  36. package/dist/config-publication/waiter-safety.d.ts +2 -0
  37. package/dist/config-publication/worker-messages.d.ts +2 -0
  38. package/dist/config-publication/worker-runtime-contract.d.ts +76 -0
  39. package/dist/config-publication/worker-runtime-plugins.d.ts +8 -0
  40. package/dist/config-publication/worker-runtime.d.ts +22 -0
  41. package/dist/config-publication/worker-wait.d.ts +44 -0
  42. package/dist/config-storage/active-publication.d.ts +37 -0
  43. package/dist/config-storage/aggregate.d.ts +4 -0
  44. package/dist/config-storage/async-config-repository.d.ts +125 -0
  45. package/dist/config-storage/commit-transaction.d.ts +13 -0
  46. package/dist/config-storage/compiler.d.ts +4 -0
  47. package/dist/config-storage/config-repository.d.ts +118 -0
  48. package/dist/config-storage/consistent-read.d.ts +2 -0
  49. package/dist/config-storage/content-hash.d.ts +17 -0
  50. package/dist/config-storage/cross-table-audit.d.ts +20 -0
  51. package/dist/config-storage/current-revision.d.ts +2 -0
  52. package/dist/config-storage/domain-validation.d.ts +5 -0
  53. package/dist/config-storage/expression-ast.d.ts +2 -0
  54. package/dist/config-storage/expression-call-policy.d.ts +2 -0
  55. package/dist/config-storage/expression-syntax.d.ts +2 -0
  56. package/dist/config-storage/gateway-target-validation.d.ts +5 -0
  57. package/dist/config-storage/global-scalars.d.ts +6 -0
  58. package/dist/config-storage/global-validation.d.ts +2 -0
  59. package/dist/config-storage/immutable-snapshot.d.ts +4 -0
  60. package/dist/config-storage/index.d.ts +21 -0
  61. package/dist/config-storage/json-preflight.d.ts +15 -0
  62. package/dist/config-storage/management-protection.d.ts +10 -0
  63. package/dist/config-storage/materialize.d.ts +3 -0
  64. package/dist/config-storage/menu-store.d.ts +12 -0
  65. package/dist/config-storage/migrations/baseline.d.ts +8 -0
  66. package/dist/config-storage/migrations/index.d.ts +8 -0
  67. package/dist/config-storage/migrations/management-protection.d.ts +2 -0
  68. package/dist/config-storage/migrations/plan.d.ts +9 -0
  69. package/dist/config-storage/migrations/prepared-worker-allocation.d.ts +2 -0
  70. package/dist/config-storage/migrations/publication-retirement.d.ts +3 -0
  71. package/dist/config-storage/migrations/publication-targets.d.ts +3 -0
  72. package/dist/config-storage/migrations/request-logs-default.d.ts +2 -0
  73. package/dist/config-storage/migrations/runtime-cutover.d.ts +2 -0
  74. package/dist/config-storage/migrations/service-references.d.ts +3 -0
  75. package/dist/config-storage/migrations/ui-menus.d.ts +2 -0
  76. package/dist/config-storage/migrations/websocket-connections.d.ts +2 -0
  77. package/dist/config-storage/migrations/websocket-message-size.d.ts +2 -0
  78. package/dist/config-storage/migrations/worker-launch-capacity.d.ts +2 -0
  79. package/dist/config-storage/modification-validation.d.ts +4 -0
  80. package/dist/config-storage/operation-records.d.ts +42 -0
  81. package/dist/config-storage/operation-relations.d.ts +6 -0
  82. package/dist/config-storage/operation-store.d.ts +12 -0
  83. package/dist/config-storage/persisted-json.d.ts +2 -0
  84. package/dist/config-storage/persisted-validation.d.ts +7 -0
  85. package/dist/config-storage/plugin-name.d.ts +2 -0
  86. package/dist/config-storage/plugin-schema.d.ts +16 -0
  87. package/dist/config-storage/policy-fields.d.ts +15 -0
  88. package/dist/config-storage/prepared-command.d.ts +14 -0
  89. package/dist/config-storage/read-materialization.d.ts +4 -0
  90. package/dist/config-storage/recovery-store.d.ts +21 -0
  91. package/dist/config-storage/relation-materialization.d.ts +30 -0
  92. package/dist/config-storage/repository-snapshot.d.ts +5 -0
  93. package/dist/config-storage/repository-types.d.ts +216 -0
  94. package/dist/config-storage/repository-validation.d.ts +6 -0
  95. package/dist/config-storage/request-logs-default.d.ts +5 -0
  96. package/dist/config-storage/retirement-store.d.ts +78 -0
  97. package/dist/config-storage/route-policy-validation.d.ts +2 -0
  98. package/dist/config-storage/runtime-config.d.ts +14 -0
  99. package/dist/config-storage/runtime-cutover.d.ts +13 -0
  100. package/dist/config-storage/runtime-recovery-budget.d.ts +35 -0
  101. package/dist/config-storage/schema-fingerprint.d.ts +5 -0
  102. package/dist/config-storage/schema.d.ts +2 -0
  103. package/dist/config-storage/service-policy-validation.d.ts +4 -0
  104. package/dist/config-storage/service-reference-upgrade.d.ts +4 -0
  105. package/dist/config-storage/serving-snapshot.d.ts +9 -0
  106. package/dist/config-storage/snapshot-validation.d.ts +3 -0
  107. package/dist/config-storage/sqlite-errors.d.ts +3 -0
  108. package/dist/config-storage/sqlite-query.d.ts +3 -0
  109. package/dist/config-storage/sqlite-version.d.ts +10 -0
  110. package/dist/config-storage/storage-protocol.d.ts +52 -0
  111. package/dist/config-storage/utf16.d.ts +2 -0
  112. package/dist/config-storage/validation.d.ts +31 -0
  113. package/dist/config-storage/worker-launch-store.d.ts +93 -0
  114. package/dist/config-worker/http-provider.d.ts +6 -0
  115. package/dist/config-worker/lifecycle.d.ts +84 -0
  116. package/dist/config-worker/private-transport.d.ts +31 -0
  117. package/dist/config-worker/process-environment.d.ts +38 -0
  118. package/dist/config-worker/rate-limit-provider.d.ts +31 -0
  119. package/dist/config-worker/runtime-dependencies.d.ts +12 -0
  120. package/dist/config-worker/snapshot-compiler.d.ts +5 -0
  121. package/dist/config-worker/supervised-process-entry.d.ts +8 -0
  122. package/dist/core-version.d.ts +1 -0
  123. package/dist/daemon-control/bootstrap.d.ts +41 -0
  124. package/dist/daemon-control/index.d.ts +1 -0
  125. package/dist/daemon-control/launch-identity.d.ts +26 -0
  126. package/dist/daemon-control/shutdown.d.ts +22 -0
  127. package/dist/data-admission/errors.d.ts +16 -0
  128. package/dist/data-admission/host.d.ts +92 -0
  129. package/dist/data-admission/keyed-state.d.ts +21 -0
  130. package/dist/data-admission/rpc.d.ts +40 -0
  131. package/dist/data-admission/worker.d.ts +66 -0
  132. package/dist/database-schema.d.ts +2 -0
  133. package/dist/expression-engine.d.ts +33 -0
  134. package/dist/gateway/admission-plugin.d.ts +7 -0
  135. package/dist/gateway/auxiliary-request.d.ts +7 -0
  136. package/dist/gateway/body-contracts.d.ts +39 -0
  137. package/dist/gateway/body-events.d.ts +58 -0
  138. package/dist/gateway/body-factory.d.ts +4 -0
  139. package/dist/gateway/body-observation-stream.d.ts +6 -0
  140. package/dist/gateway/body-plugin.d.ts +8 -0
  141. package/dist/gateway/body-resources.d.ts +37 -0
  142. package/dist/gateway/body-service.d.ts +116 -0
  143. package/dist/gateway/contracts.d.ts +196 -0
  144. package/dist/gateway/controlled-views.d.ts +5 -0
  145. package/dist/gateway/dispatch-plugin.d.ts +11 -0
  146. package/dist/gateway/dispatch-targets.d.ts +4 -0
  147. package/dist/gateway/forward-plugin.d.ts +136 -0
  148. package/dist/gateway/plugin.d.ts +23 -0
  149. package/dist/gateway/plugin.js +18 -18
  150. package/dist/gateway/request-log-contracts.d.ts +346 -0
  151. package/dist/gateway/request-log.d.ts +105 -0
  152. package/dist/gateway/request-plugin.d.ts +98 -0
  153. package/dist/gateway/request-rules-plugin.d.ts +61 -0
  154. package/dist/gateway/response-plugin.d.ts +34 -0
  155. package/dist/gateway/response-views.d.ts +33 -0
  156. package/dist/gateway/responses-websocket-session.d.ts +24 -0
  157. package/dist/gateway/retry-action.d.ts +7 -0
  158. package/dist/gateway/retry-plugin.d.ts +7 -0
  159. package/dist/gateway/routing-plugin.d.ts +11 -0
  160. package/dist/gateway/runtime.d.ts +15 -0
  161. package/dist/gateway/selection-plugin.d.ts +7 -0
  162. package/dist/gateway/sse-response.d.ts +6 -0
  163. package/dist/gateway/websocket-contracts.d.ts +71 -0
  164. package/dist/gateway/websocket-credential.d.ts +3 -0
  165. package/dist/gateway/websocket-plugin.d.ts +9 -0
  166. package/dist/hooks/impl.d.ts +119 -0
  167. package/dist/hooks/index.d.ts +7 -0
  168. package/dist/hooks/plugin-hooks.d.ts +308 -0
  169. package/dist/hooks/types.d.ts +130 -0
  170. package/dist/ingress/admission-registry.d.ts +56 -0
  171. package/dist/ingress/admission-set.d.ts +29 -0
  172. package/dist/ingress/index.d.ts +4 -0
  173. package/dist/ingress/master-controller.d.ts +278 -0
  174. package/dist/ingress/runtime.d.ts +29 -0
  175. package/dist/ingress/supervision-http.d.ts +118 -0
  176. package/dist/ingress.d.ts +5 -0
  177. package/dist/instance-lock.d.ts +2 -0
  178. package/dist/logger/access-log-writer.d.ts +120 -0
  179. package/dist/logger/body-capture.d.ts +21 -0
  180. package/dist/logger/body-log-redaction.d.ts +6 -0
  181. package/dist/logger/body-storage.d.ts +71 -0
  182. package/dist/logger/content-capture.d.ts +47 -0
  183. package/dist/logger/dated-log-files.d.ts +5 -0
  184. package/dist/logger/header-storage.d.ts +54 -0
  185. package/dist/logger/log-cleanup.d.ts +69 -0
  186. package/dist/logger/log-url.d.ts +2 -0
  187. package/dist/logger/request-logger.d.ts +308 -0
  188. package/dist/logger/transport-outcome.d.ts +25 -0
  189. package/dist/logger/websocket-body-capture.d.ts +26 -0
  190. package/dist/logger.d.ts +16 -0
  191. package/dist/main.d.ts +19 -0
  192. package/dist/main.js +8 -8
  193. package/dist/management-listener/index.d.ts +2 -0
  194. package/dist/management-listener/listener.d.ts +48 -0
  195. package/dist/management-listener/request-source.d.ts +4 -0
  196. package/dist/master-runtime/component-recovery.d.ts +40 -0
  197. package/dist/master-runtime/composition.d.ts +129 -0
  198. package/dist/master-runtime/configuration-recovery.d.ts +80 -0
  199. package/dist/master-runtime/control-api-body.d.ts +9 -0
  200. package/dist/master-runtime/control-api.d.ts +122 -0
  201. package/dist/master-runtime/error-chain.d.ts +9 -0
  202. package/dist/master-runtime/initialize-configuration.d.ts +4 -0
  203. package/dist/master-runtime/instance-lock.d.ts +25 -0
  204. package/dist/master-runtime/kernel-exit-timer.d.ts +7 -0
  205. package/dist/master-runtime/kernel-monotonic-clock.d.ts +15 -0
  206. package/dist/master-runtime/management-auth.d.ts +43 -0
  207. package/dist/master-runtime/master-plugin-catalog-api.d.ts +18 -0
  208. package/dist/master-runtime/master-stats.d.ts +52 -0
  209. package/dist/master-runtime/menu-api.d.ts +19 -0
  210. package/dist/master-runtime/observability-client.d.ts +49 -0
  211. package/dist/master-runtime/offline-recovery.d.ts +9 -0
  212. package/dist/master-runtime/offline-storage-session.d.ts +8 -0
  213. package/dist/master-runtime/plugin-journal-recovery.d.ts +28 -0
  214. package/dist/master-runtime/process-identity.d.ts +48 -0
  215. package/dist/master-runtime/process-options.d.ts +59 -0
  216. package/dist/master-runtime/publication-task-manager.d.ts +47 -0
  217. package/dist/master-runtime/reconcile-plugin-dependencies.d.ts +7 -0
  218. package/dist/master-runtime/recovery-prompt.d.ts +9 -0
  219. package/dist/master-runtime/route-body-plan.d.ts +31 -0
  220. package/dist/master-runtime/runtime-cleanup.d.ts +3 -0
  221. package/dist/master-runtime/runtime-contracts.d.ts +101 -0
  222. package/dist/master-runtime/runtime-evidence.d.ts +8 -0
  223. package/dist/master-runtime/runtime-status.d.ts +36 -0
  224. package/dist/master-runtime/runtime-supervisor.d.ts +30 -0
  225. package/dist/master-runtime/runtime-upgrade.d.ts +11 -0
  226. package/dist/master-runtime/runtime-upstreams.d.ts +14 -0
  227. package/dist/master-runtime/runtime.d.ts +23 -0
  228. package/dist/master-runtime/shutdown-diagnostics.d.ts +28 -0
  229. package/dist/master-runtime/signal-handlers.d.ts +18 -0
  230. package/dist/master-runtime/stopped-instance-lock.d.ts +6 -0
  231. package/dist/master-runtime/stopped-process.d.ts +2 -0
  232. package/dist/master-runtime/supervised-worker-client.d.ts +108 -0
  233. package/dist/master-runtime/supervised-worker-discovery.d.ts +41 -0
  234. package/dist/master-runtime/supervised-worker-factory.d.ts +298 -0
  235. package/dist/master-runtime/supervised-worker-process-adapter.d.ts +146 -0
  236. package/dist/master-runtime/worker-initialization-diagnostics.d.ts +18 -0
  237. package/dist/master.d.ts +2 -0
  238. package/dist/oauth-callback.d.ts +8 -0
  239. package/dist/plugin-artifact-contract.d.ts +4 -0
  240. package/dist/plugin-artifact-negotiation.d.ts +12 -0
  241. package/dist/plugin-artifact-types.d.ts +61 -0
  242. package/dist/plugin-context-manager.d.ts +91 -0
  243. package/dist/plugin-control/artifact-loader.d.ts +3 -0
  244. package/dist/plugin-control/contracts.d.ts +180 -0
  245. package/dist/plugin-control/host.d.ts +90 -0
  246. package/dist/plugin-control/index.d.ts +3 -0
  247. package/dist/plugin-control/master-invocation-projector.d.ts +52 -0
  248. package/dist/plugin-control/request-service-authority.d.ts +33 -0
  249. package/dist/plugin-control/secret-crypto.d.ts +13 -0
  250. package/dist/plugin-control/secret-store.d.ts +15 -0
  251. package/dist/plugin-dependencies.d.ts +30 -0
  252. package/dist/plugin-durable-state.d.ts +62 -0
  253. package/dist/plugin-extensions.d.ts +99 -0
  254. package/dist/plugin-logger.d.ts +17 -0
  255. package/dist/plugin-manifest-catalog/catalog.d.ts +28 -0
  256. package/dist/plugin-manifest-catalog/config-constraint-parser.d.ts +3 -0
  257. package/dist/plugin-manifest-catalog/config-default-validator.d.ts +3 -0
  258. package/dist/plugin-manifest-catalog/config-field-parser.d.ts +3 -0
  259. package/dist/plugin-manifest-catalog/config-field-references.d.ts +2 -0
  260. package/dist/plugin-manifest-catalog/index.d.ts +6 -0
  261. package/dist/plugin-manifest-catalog/manifest-filesystem.d.ts +9 -0
  262. package/dist/plugin-manifest-catalog/manifest-json.d.ts +1 -0
  263. package/dist/plugin-manifest-catalog/manifest-nested-parser.d.ts +11 -0
  264. package/dist/plugin-manifest-catalog/manifest-parser.d.ts +2 -0
  265. package/dist/plugin-manifest-catalog/manifest-semver.d.ts +4 -0
  266. package/dist/plugin-manifest-catalog/manifest-values.d.ts +6 -0
  267. package/dist/plugin-manifest-catalog/parse-utils.d.ts +19 -0
  268. package/dist/plugin-manifest-catalog/plugin-field-value.d.ts +3 -0
  269. package/dist/plugin-manifest-catalog/runtime-identity.d.ts +12 -0
  270. package/dist/plugin-manifest-catalog/types.d.ts +187 -0
  271. package/dist/plugin-path-resolver.d.ts +17 -0
  272. package/dist/plugin-registry.d.ts +165 -0
  273. package/dist/plugin-runtime-config.d.ts +10 -0
  274. package/dist/plugin-runtime-diff.d.ts +15 -0
  275. package/dist/plugin-runtime-orchestrator.d.ts +69 -0
  276. package/dist/plugin-runtime-state-machine.d.ts +78 -0
  277. package/dist/plugin-runtime-status.d.ts +29 -0
  278. package/dist/plugin-services/channels.d.ts +391 -0
  279. package/dist/plugin-services/command-journal.d.ts +234 -0
  280. package/dist/plugin-services/contracts.d.ts +23 -0
  281. package/dist/plugin-services/host-rpc.d.ts +268 -0
  282. package/dist/plugin-services/peer-broker.d.ts +351 -0
  283. package/dist/plugin-services/peer-channel-hub.d.ts +457 -0
  284. package/dist/plugin-services/peer-channel-protocol.d.ts +339 -0
  285. package/dist/plugin-services/peer-directory.d.ts +163 -0
  286. package/dist/plugin-services/peer-executor-proof.d.ts +13 -0
  287. package/dist/plugin-services/peer-frame.d.ts +65 -0
  288. package/dist/plugin-services/peer-journal.d.ts +25 -0
  289. package/dist/plugin-services/peer-protocol.d.ts +128 -0
  290. package/dist/plugin-services/peer-rpc-link.d.ts +218 -0
  291. package/dist/plugin-services/peer-rpc-mapping.d.ts +133 -0
  292. package/dist/plugin-services/peer-websocket.d.ts +146 -0
  293. package/dist/plugin-services/persistence.d.ts +166 -0
  294. package/dist/plugin-services/rpc-runtime.d.ts +227 -0
  295. package/dist/plugin-services/snapshot-store.d.ts +77 -0
  296. package/dist/plugin-services/wire-contract.d.ts +158 -0
  297. package/dist/plugin-services.d.ts +237 -0
  298. package/dist/plugin-state/client.d.ts +160 -0
  299. package/dist/plugin-state/message-size.d.ts +2 -0
  300. package/dist/plugin-state/operations.d.ts +4 -0
  301. package/dist/plugin-state/protocol.d.ts +40 -0
  302. package/dist/plugin-state/storage-rpc.d.ts +7 -0
  303. package/dist/plugin.types.d.ts +999 -0
  304. package/dist/plugins/anthropic-request-sanitizer/index.js +17 -17
  305. package/dist/plugins/anthropic-request-sanitizer/index.js.map +1 -1
  306. package/dist/plugins/anthropic-tool-name-transformer/index.js +17 -17
  307. package/dist/plugins/anthropic-tool-name-transformer/index.js.map +1 -1
  308. package/dist/plugins/chatgpt-oauth/control.js +24 -24
  309. package/dist/plugins/chatgpt-oauth/control.js.map +1 -1
  310. package/dist/plugins/chatgpt-oauth/index.js +23 -23
  311. package/dist/plugins/chatgpt-oauth/index.js.map +1 -1
  312. package/dist/plugins/codex-router/control.js +19 -19
  313. package/dist/plugins/codex-router/control.js.map +1 -1
  314. package/dist/plugins/codex-router/index.js +31 -31
  315. package/dist/plugins/codex-router/index.js.map +1 -1
  316. package/dist/plugins/deepseek-reasoning-fix/index.js +17 -17
  317. package/dist/plugins/deepseek-reasoning-fix/index.js.map +1 -1
  318. package/dist/plugins/key-access/control.js +18 -18
  319. package/dist/plugins/key-access/control.js.map +1 -1
  320. package/dist/plugins/key-access/index.js +19 -19
  321. package/dist/plugins/key-access/index.js.map +1 -1
  322. package/dist/plugins/key-access/ingress.js +18 -18
  323. package/dist/plugins/key-access/ingress.js.map +1 -1
  324. package/dist/plugins/key-rate-limit/control.js +3 -3
  325. package/dist/plugins/key-rate-limit/control.js.map +1 -1
  326. package/dist/plugins/key-rate-limit/index.js +18 -18
  327. package/dist/plugins/key-rate-limit/index.js.map +1 -1
  328. package/dist/plugins/key-rate-limit/ingress.js +2 -2
  329. package/dist/plugins/key-rate-limit/ingress.js.map +1 -1
  330. package/dist/plugins/llm-protocol-adapter/control.js +48 -48
  331. package/dist/plugins/llm-protocol-adapter/control.js.map +1 -1
  332. package/dist/plugins/llm-protocol-adapter/index.js +53 -53
  333. package/dist/plugins/llm-protocol-adapter/index.js.map +1 -1
  334. package/dist/plugins/llm-tps/control.js +5 -5
  335. package/dist/plugins/llm-tps/control.js.map +1 -1
  336. package/dist/plugins/llm-tps/index.js +20 -20
  337. package/dist/plugins/llm-tps/index.js.map +1 -1
  338. package/dist/plugins/model-mapping/control.js +4 -4
  339. package/dist/plugins/model-mapping/control.js.map +1 -1
  340. package/dist/plugins/model-mapping/index.js +19 -19
  341. package/dist/plugins/model-mapping/index.js.map +1 -1
  342. package/dist/plugins/models-dev/control.js +10 -10
  343. package/dist/plugins/models-dev/control.js.map +1 -1
  344. package/dist/plugins/models-dev/index.js +23 -23
  345. package/dist/plugins/models-dev/index.js.map +1 -1
  346. package/dist/plugins/request-body-redaction/control.js +2 -2
  347. package/dist/plugins/request-body-redaction/control.js.map +1 -1
  348. package/dist/plugins/request-body-redaction/index.js +21 -21
  349. package/dist/plugins/request-body-redaction/index.js.map +1 -1
  350. package/dist/plugins/request-logs/index.js +27 -27
  351. package/dist/plugins/request-logs/index.js.map +1 -1
  352. package/dist/plugins/request-logs/ingress.js +2 -2
  353. package/dist/plugins/request-logs/ingress.js.map +1 -1
  354. package/dist/plugins/signature-repair/index.js +17 -17
  355. package/dist/plugins/signature-repair/index.js.map +1 -1
  356. package/dist/plugins/sse-envelope.d.ts +3 -0
  357. package/dist/plugins/token-budget/control.js +19 -19
  358. package/dist/plugins/token-budget/control.js.map +1 -1
  359. package/dist/plugins/token-budget/index.js +19 -19
  360. package/dist/plugins/token-budget/index.js.map +1 -1
  361. package/dist/plugins/token-budget/ingress.js +2 -2
  362. package/dist/plugins/token-budget/ingress.js.map +1 -1
  363. package/dist/plugins/token-metering/index.js +30 -30
  364. package/dist/plugins/token-metering/index.js.map +1 -1
  365. package/dist/plugins/token-stats/control.js +22 -22
  366. package/dist/plugins/token-stats/control.js.map +1 -1
  367. package/dist/plugins/token-stats/index.js +22 -22
  368. package/dist/plugins/token-stats/index.js.map +1 -1
  369. package/dist/plugins/user-auth/control.js +21 -21
  370. package/dist/plugins/user-auth/control.js.map +1 -1
  371. package/dist/plugins/user-auth/index.js +17 -17
  372. package/dist/plugins/user-auth/index.js.map +1 -1
  373. package/dist/public-listener/admission-registry.d.ts +15 -0
  374. package/dist/public-listener/forwarding.d.ts +24 -0
  375. package/dist/public-listener/headers.d.ts +5 -0
  376. package/dist/public-listener/index.d.ts +4 -0
  377. package/dist/public-listener/listener.d.ts +21 -0
  378. package/dist/public-listener/websocket.d.ts +4 -0
  379. package/dist/rate-limit/http.d.ts +80 -0
  380. package/dist/rate-limit/index.d.ts +7 -0
  381. package/dist/rate-limit/json.d.ts +8 -0
  382. package/dist/rate-limit/profile.d.ts +46 -0
  383. package/dist/rate-limit/protocol.d.ts +104 -0
  384. package/dist/rate-limit/store.d.ts +61 -0
  385. package/dist/scoped-plugin-registry.d.ts +645 -0
  386. package/dist/supervision/index.d.ts +12 -0
  387. package/dist/supervision/process-lifetime-guard.d.ts +54 -0
  388. package/dist/supervision/protocol.d.ts +173 -0
  389. package/dist/supervision/state-repository.d.ts +15 -0
  390. package/dist/supervision/strict-json.d.ts +2 -0
  391. package/dist/supervision/worker-descriptor.d.ts +77 -0
  392. package/dist/supervision/worker-http.d.ts +135 -0
  393. package/dist/supervision/worker-runtime-snapshot.d.ts +64 -0
  394. package/dist/token-stats-window.d.ts +23 -0
  395. package/dist/ui/assets.d.ts +8 -0
  396. package/dist/ui/icon-resources.d.ts +28 -0
  397. package/dist/ui/menu-icons.d.ts +15 -0
  398. package/dist/ui/menu-layout.d.ts +10 -0
  399. package/dist/ui/plugin-sandbox-policy.d.ts +11 -0
  400. package/dist/ui/server.d.ts +10 -0
  401. package/dist/updates/archive-installer.d.ts +8 -0
  402. package/dist/updates/controller.d.ts +50 -0
  403. package/dist/updates/download.d.ts +8 -0
  404. package/dist/updates/installation.d.ts +26 -0
  405. package/dist/updates/names.d.ts +3 -0
  406. package/dist/updates/release.d.ts +23 -0
  407. package/dist/updates/restart.d.ts +13 -0
  408. package/dist/utils/config-validator.d.ts +40 -0
  409. package/dist/utils/endpoint-resolver.d.ts +20 -0
  410. package/dist/utils/expression-dependencies.d.ts +10 -0
  411. package/dist/utils/plugin-helpers.d.ts +46 -0
  412. package/dist/websocket/headers.d.ts +9 -0
  413. package/dist/websocket/index.d.ts +3 -0
  414. package/dist/websocket/message.d.ts +3 -0
  415. package/dist/websocket/observation.d.ts +36 -0
  416. package/dist/websocket/transport.d.ts +197 -0
  417. package/dist/worker/health/checker.d.ts +54 -0
  418. package/dist/worker/health/scheduler.d.ts +27 -0
  419. package/dist/worker/request/body-source.d.ts +1 -0
  420. package/dist/worker/request/context-builder.d.ts +78 -0
  421. package/dist/worker/request/context.d.ts +55 -0
  422. package/dist/worker/request/credential.d.ts +10 -0
  423. package/dist/worker/request/handler.d.ts +3 -0
  424. package/dist/worker/request/proxy.d.ts +4 -0
  425. package/dist/worker/request/response-detector.d.ts +9 -0
  426. package/dist/worker/request/snapshot.d.ts +18 -0
  427. package/dist/worker/response/attempt-observation.d.ts +24 -0
  428. package/dist/worker/response/processor.d.ts +4 -0
  429. package/dist/worker/response/streaming-response.d.ts +1 -0
  430. package/dist/worker/rules/deep-merge.d.ts +2 -0
  431. package/dist/worker/rules/modifier.d.ts +3 -0
  432. package/dist/worker/state/plugin-manager.d.ts +95 -0
  433. package/dist/worker/state/runtime-state.d.ts +90 -0
  434. package/dist/worker/types.d.ts +44 -0
  435. package/dist/worker/upstream/condition-filter.d.ts +31 -0
  436. package/dist/worker/upstream/failover-coordinator.d.ts +93 -0
  437. package/dist/worker/upstream/filter.d.ts +37 -0
  438. package/dist/worker/upstream/priority-group.d.ts +66 -0
  439. package/dist/worker/upstream/selector.d.ts +10 -0
  440. package/dist/worker/upstream/service-execution.d.ts +17 -0
  441. package/dist/worker/utils/jitter.d.ts +81 -0
  442. package/dist/worker/utils/slow-start.d.ts +67 -0
  443. package/dist/worker/utils/status-code-matcher.d.ts +10 -0
  444. package/dist/worker.d.ts +1 -0
  445. package/package.json +2 -2
@@ -3,11 +3,11 @@ import {
3
3
  trackBodyLogTask2,
4
4
  captureBody2,
5
5
  flushBodyCaptures2
6
- } from "./chunk-main-a4eygw79.js";
6
+ } from "./chunk-main-d74e7qxc.js";
7
7
  import"./chunk-main-aemwf4tr.js";
8
8
  import"./chunk-main-wcfhwh78.js";
9
9
  import"./chunk-main-yqaskz50.js";
10
- import"./chunk-main-rcw37zhd.js";
10
+ import"./chunk-main-1p15rgq5.js";
11
11
  import"./chunk-main-zvyp24je.js";
12
12
  import"./chunk-main-djevb9tg.js";
13
13
  import"./chunk-main-87tgknq7.js";
@@ -2,12 +2,12 @@
2
2
  import"./chunk-main-a6agb3ap.js";
3
3
  import {
4
4
  runGatewayRequest2
5
- } from "./chunk-main-a4eygw79.js";
5
+ } from "./chunk-main-d74e7qxc.js";
6
6
  import"./chunk-main-58sd6pyr.js";
7
7
  import"./chunk-main-djevb9tg.js";
8
8
  import"./chunk-main-ne6pnf8c.js";
9
9
  import"./chunk-main-zvyp24je.js";
10
- import"./chunk-main-rcw37zhd.js";
10
+ import"./chunk-main-1p15rgq5.js";
11
11
  import"./chunk-main-wcfhwh78.js";
12
12
  import"./chunk-main-87tgknq7.js";
13
13
  import"./chunk-main-yqaskz50.js";
@@ -37,7 +37,7 @@ import {
37
37
  // package.json
38
38
  var package_default = {
39
39
  name: "@jeffusion/bungee-core",
40
- version: "6.19.3",
40
+ version: "6.19.4",
41
41
  description: "Bungee reverse proxy core engine",
42
42
  main: "./dist/main.js",
43
43
  types: "./dist/main.d.ts",
@@ -30,7 +30,7 @@ import {
30
30
  CHANNEL_SNAPSHOT_MAX_BYTES,
31
31
  CHANNEL_EVENT_MAX_PAYLOAD_BYTES,
32
32
  PluginPeerChannelHub
33
- } from "./chunk-main-rcw37zhd.js";
33
+ } from "./chunk-main-1p15rgq5.js";
34
34
  import {
35
35
  PEER_HEADER_MAX_BYTES,
36
36
  PEER_BODY_MAX_BYTES,
@@ -25,7 +25,7 @@ import {
25
25
  PluginManifestValidationError,
26
26
  toPluginManifestContractSnapshot,
27
27
  loadPluginArtifactManifest
28
- } from "./chunk-main-rcw37zhd.js";
28
+ } from "./chunk-main-1p15rgq5.js";
29
29
  import {
30
30
  forEach_default,
31
31
  _arrayPush_default,
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  loadPluginManifestRecord,
10
10
  finalizePluginManifestRecord
11
- } from "./chunk-main-25kbhd4n.js";
11
+ } from "./chunk-main-mqgkewnx.js";
12
12
  import {
13
13
  hashConfigurationContent
14
14
  } from "./chunk-main-87tgknq7.js";
@@ -31,7 +31,7 @@ import {
31
31
  VALID_PLUGIN_UI_EXTENSION_MODES,
32
32
  VALID_PLUGIN_ARTIFACT_KINDS,
33
33
  SUPPORTED_PLUGIN_CAPABILITIES
34
- } from "./chunk-main-rcw37zhd.js";
34
+ } from "./chunk-main-1p15rgq5.js";
35
35
  import {
36
36
  parseExactSemver,
37
37
  validateEngineRange
@@ -8,7 +8,7 @@ import {
8
8
  externalRuntimeDependencyIdentity,
9
9
  hashRuntimeIdentity,
10
10
  resolveMetafileInputPath
11
- } from "./chunk-main-25kbhd4n.js";
11
+ } from "./chunk-main-mqgkewnx.js";
12
12
  import {
13
13
  storageMessageBytes
14
14
  } from "./chunk-main-7t1ctxcy.js";
@@ -16,7 +16,7 @@ import {
16
16
  readHostRpcCalleeFrame,
17
17
  PluginServiceCleanupError,
18
18
  PluginServiceHost
19
- } from "./chunk-main-rcw37zhd.js";
19
+ } from "./chunk-main-1p15rgq5.js";
20
20
  import {
21
21
  PluginDependencyGraph2
22
22
  } from "./chunk-main-djevb9tg.js";
@@ -20,7 +20,7 @@ import {
20
20
  ControlPeerBroker,
21
21
  HostChannelAdapter,
22
22
  CONFIG_WORKER_ENV_NAMES
23
- } from "./chunk-main-10pgdbgn.js";
23
+ } from "./chunk-main-2efrk1nt.js";
24
24
  import {
25
25
  isPluginName,
26
26
  canonicalJson,
@@ -121,11 +121,11 @@ import {
121
121
  PluginStateClient,
122
122
  parsePluginSecretsKey,
123
123
  createPluginControlHost
124
- } from "./chunk-main-0w3jk2x4.js";
124
+ } from "./chunk-main-qm1tgaka.js";
125
125
  import"./chunk-main-zvyp24je.js";
126
126
  import {
127
127
  PLUGIN_STORAGE_OPERATIONS
128
- } from "./chunk-main-25kbhd4n.js";
128
+ } from "./chunk-main-mqgkewnx.js";
129
129
  import"./chunk-main-7t1ctxcy.js";
130
130
  import {
131
131
  PLUGIN_STORAGE_RPC_PATH,
@@ -180,7 +180,7 @@ import"./chunk-main-49gpece5.js";
180
180
  import {
181
181
  PluginServiceHost,
182
182
  CORE_HOST_VERSION
183
- } from "./chunk-main-rcw37zhd.js";
183
+ } from "./chunk-main-1p15rgq5.js";
184
184
  import"./chunk-main-n7gtrx16.js";
185
185
  import {
186
186
  resolveObservabilityWorkerUrl2,
@@ -189,7 +189,7 @@ import {
189
189
  } from "./chunk-main-389sfp94.js";
190
190
  import {
191
191
  PluginManifestCatalog
192
- } from "./chunk-main-p5rpfk7t.js";
192
+ } from "./chunk-main-gwaw6pxp.js";
193
193
  import {
194
194
  createPluginControlInvocationProjector
195
195
  } from "./chunk-main-b6ebweae.js";
@@ -6338,7 +6338,7 @@ import { lstat, realpath } from "fs/promises";
6338
6338
  import { extname, isAbsolute, join as join2, relative } from "path";
6339
6339
  var assetsPromise;
6340
6340
  function loadAssets() {
6341
- return assetsPromise ??= import("./chunk-assets-swq50rh3.js");
6341
+ return assetsPromise ??= import("./chunk-assets-vsan7gav.js");
6342
6342
  }
6343
6343
  var ALLOWED_FILE_EXTENSIONS = new Set([
6344
6344
  ".html",
@@ -3,7 +3,7 @@ import {
3
3
  initializePluginContextManager2,
4
4
  isPluginContextManagerInitialized2,
5
5
  getPluginContextManager2
6
- } from "./chunk-main-a4eygw79.js";
6
+ } from "./chunk-main-d74e7qxc.js";
7
7
  import"./chunk-main-a6agb3ap.js";
8
8
  export {
9
9
  getPluginContextManager2 as getPluginContextManager,
@@ -3,11 +3,11 @@ import {
3
3
  getPluginRegistry2,
4
4
  initializePluginRuntime2,
5
5
  cleanupPluginRegistry2
6
- } from "./chunk-main-a4eygw79.js";
6
+ } from "./chunk-main-d74e7qxc.js";
7
7
  import"./chunk-main-aemwf4tr.js";
8
8
  import"./chunk-main-wcfhwh78.js";
9
9
  import"./chunk-main-yqaskz50.js";
10
- import"./chunk-main-rcw37zhd.js";
10
+ import"./chunk-main-1p15rgq5.js";
11
11
  import"./chunk-main-zvyp24je.js";
12
12
  import"./chunk-main-djevb9tg.js";
13
13
  import"./chunk-main-87tgknq7.js";
@@ -14,12 +14,12 @@ import"./chunk-main-1cwqgk3y.js";
14
14
  import {
15
15
  PluginStateClient,
16
16
  parsePluginSecretsKey
17
- } from "./chunk-main-0w3jk2x4.js";
17
+ } from "./chunk-main-qm1tgaka.js";
18
18
  import"./chunk-main-zvyp24je.js";
19
- import"./chunk-main-25kbhd4n.js";
19
+ import"./chunk-main-mqgkewnx.js";
20
20
  import"./chunk-main-7t1ctxcy.js";
21
21
  import"./chunk-main-a6agb3ap.js";
22
- import"./chunk-main-rcw37zhd.js";
22
+ import"./chunk-main-1p15rgq5.js";
23
23
  import"./chunk-main-djevb9tg.js";
24
24
  import"./chunk-main-9k6dyksr.js";
25
25
  import {
@@ -8,11 +8,11 @@ import {
8
8
  requireGatewayResult2,
9
9
  runGatewayRequest2,
10
10
  runGatewayWebSocket2
11
- } from "./chunk-main-a4eygw79.js";
11
+ } from "./chunk-main-d74e7qxc.js";
12
12
  import"./chunk-main-aemwf4tr.js";
13
13
  import"./chunk-main-wcfhwh78.js";
14
14
  import"./chunk-main-yqaskz50.js";
15
- import"./chunk-main-rcw37zhd.js";
15
+ import"./chunk-main-1p15rgq5.js";
16
16
  import"./chunk-main-zvyp24je.js";
17
17
  import"./chunk-main-djevb9tg.js";
18
18
  import"./chunk-main-87tgknq7.js";
@@ -18,7 +18,7 @@ import {
18
18
  WorkerPeerBroker,
19
19
  HostChannelAdapter,
20
20
  parseSupervisedWorkerEnvironment
21
- } from "./chunk-main-10pgdbgn.js";
21
+ } from "./chunk-main-2efrk1nt.js";
22
22
  import {
23
23
  hashConfigurationContent
24
24
  } from "./chunk-main-87tgknq7.js";
@@ -33,13 +33,13 @@ import {
33
33
  import"./chunk-main-djevb9tg.js";
34
34
  import {
35
35
  PluginServiceHost
36
- } from "./chunk-main-rcw37zhd.js";
36
+ } from "./chunk-main-1p15rgq5.js";
37
37
  import {
38
38
  createRemotePluginStorageFactory
39
- } from "./chunk-main-25kbhd4n.js";
39
+ } from "./chunk-main-mqgkewnx.js";
40
40
  import {
41
41
  PluginManifestCatalog
42
- } from "./chunk-main-p5rpfk7t.js";
42
+ } from "./chunk-main-gwaw6pxp.js";
43
43
  import"./chunk-main-zvyp24je.js";
44
44
  import"./chunk-main-n7gtrx16.js";
45
45
  import {
@@ -62,7 +62,7 @@ import {
62
62
  createWorkerRateLimitHttpProvider,
63
63
  gatewayHooks2,
64
64
  runGatewayWebSocket2
65
- } from "./chunk-main-a4eygw79.js";
65
+ } from "./chunk-main-d74e7qxc.js";
66
66
  import"./chunk-main-ne6pnf8c.js";
67
67
  import {
68
68
  WORKER_RPC_ATTEMPT_TIMEOUT_MS,
@@ -299,9 +299,9 @@ async function loadProductionResources(ownerId) {
299
299
  const { HeaderStorageManager } = await import("./chunk-header-storage-x1dmw1vr.js");
300
300
  const { createAsyncAccessLog } = await import("./chunk-observability-client-ccz5crb3.js");
301
301
  const runtimeState = await import("./chunk-runtime-state-v7xc2246.js");
302
- const pluginContexts = await import("./chunk-plugin-context-manager-nexyp0jb.js");
303
- const pluginRuntime = await import("./chunk-plugin-manager-dvxc5w6p.js");
304
- const requestHandler = await import("./chunk-handler-ehkkxpnq.js");
302
+ const pluginContexts = await import("./chunk-plugin-context-manager-kabrbg0s.js");
303
+ const pluginRuntime = await import("./chunk-plugin-manager-q1bt6xnw.js");
304
+ const requestHandler = await import("./chunk-handler-9k6b95w4.js");
305
305
  let accessLog;
306
306
  let openingLog;
307
307
  const accessLogPath = process.env.BUNGEE_ACCESS_DB_PATH ?? join(process.cwd(), "logs", "access.db");
@@ -376,7 +376,7 @@ async function loadProductionResources(ownerId) {
376
376
  return Bun.serve({ hostname: "127.0.0.1", port: 0, reusePort: false, idleTimeout: 0, maxRequestBodySize: Number.MAX_SAFE_INTEGER, fetch });
377
377
  },
378
378
  closeAccessLog: async (observationEnded) => {
379
- const { flushBodyCaptures } = await import("./chunk-body-capture-gtta9q26.js");
379
+ const { flushBodyCaptures } = await import("./chunk-body-capture-sbk6cdf9.js");
380
380
  const errors = [];
381
381
  try {
382
382
  await flushBodyCaptures();
@@ -0,0 +1,13 @@
1
+ import type { PreparedWorkerAdmission, PublicationScheduler } from './coordinator-types';
2
+ export type AdmissionHandoffResult = {
3
+ readonly kind: 'complete';
4
+ } | {
5
+ readonly kind: 'unknown';
6
+ readonly reason: 'cancelled' | 'missing' | 'expired' | 'invalid' | 'unavailable';
7
+ };
8
+ /**
9
+ * Wait for the ingress-owned pre-drain handoff barrier. At expiry, allow one more
10
+ * poll for cancellation to settle. Retry at most two unavailable status reads.
11
+ * Worker drain requires signed completion for the same retired admission.
12
+ */
13
+ export declare function waitForAdmissionHandoff(prepared: PreparedWorkerAdmission, scheduler: PublicationScheduler, hasRetiredWorkers: boolean, signal?: AbortSignal): Promise<AdmissionHandoffResult>;
@@ -0,0 +1,176 @@
1
+ import type { ConfigRepository } from '../config-storage/config-repository';
2
+ import type { HeldProcessLifetimeGuardFacts } from '../supervision/process-lifetime-guard';
3
+ import type { Sha256Digest } from '@jeffusion/bungee-types';
4
+ import type { ActiveConfigurationPublication, ConfigurationOperation, ConfigurationOperationWorker, ConfigurationRecoveryDisposition, FinalizePublicationOutcome, PublicationCandidateExitEvidence, PublicationPrepareDecision, RepositorySnapshot, WorkerAttemptReason, WorkerPublicationResult } from '../config-storage/repository-types';
5
+ import type { ConfigMasterMessage, ConfigProcessIdentity, ConfigPublicationIdentity, WorkerDrainedMessage, WorkerDrainFailedMessage, WorkerDrainStartedMessage, WorkerExitDeadlineEvidence } from './types';
6
+ export type WorkerExitEvidence = {
7
+ readonly exited: true;
8
+ readonly pid: number;
9
+ readonly terminalDrain?: WorkerDrainedMessage | WorkerDrainFailedMessage;
10
+ readonly cleanup_state?: 'success' | 'failed';
11
+ };
12
+ export type WorkerHandoffStatus = Readonly<{
13
+ retired_id: string;
14
+ pending: number;
15
+ complete: boolean;
16
+ remaining_ms: number;
17
+ }>;
18
+ export interface ConfigPublicationWorkerProcess {
19
+ readonly slot: number;
20
+ readonly identity: ConfigProcessIdentity;
21
+ readonly pid: number;
22
+ readonly kernelBootId?: string;
23
+ readonly lifetimeGuardFacts?: HeldProcessLifetimeGuardFacts | null;
24
+ releaseLifetimeRetirementFence?(): void;
25
+ send(message: ConfigMasterMessage): Promise<void>;
26
+ drainStatus?(timeoutMs?: number): Promise<WorkerDrainStartedMessage | WorkerDrainedMessage | WorkerDrainFailedMessage | null>;
27
+ subscribeMessage(listener: (message: unknown) => void): () => void;
28
+ subscribeExit(listener: (evidence: WorkerExitEvidence) => void): () => void;
29
+ terminate(mode: 'graceful' | 'force', timeoutMs?: number, exitDeadline?: WorkerExitDeadlineEvidence): Promise<void>;
30
+ /**
31
+ * OS-level exact exit proof for processes that never emit a child exit event
32
+ * (adopted workers). Optional so bare coordinator fakes need no change; evidence
33
+ * is per process object and must never be shared across processes by PID.
34
+ */
35
+ verifyExactExit?(): Promise<WorkerExitEvidence | null>;
36
+ }
37
+ /** A durable, freshly-read decision made immediately before any worker is created. */
38
+ export type CreationPermit = {
39
+ readonly allowed: true;
40
+ } | {
41
+ readonly allowed: false;
42
+ readonly error: unknown;
43
+ };
44
+ export interface ConfigPublicationWorkerFactory {
45
+ confirmActivePublicationExited?(active: ActiveConfigurationPublication): Promise<boolean>;
46
+ spawn(identity: ConfigProcessIdentity, allocation?: {
47
+ readonly mutation_id: string;
48
+ readonly committed_revision: number;
49
+ readonly attempt_no: number;
50
+ }): ConfigPublicationWorkerProcess | Promise<ConfigPublicationWorkerProcess>;
51
+ markCommitted(processes: readonly ConfigPublicationWorkerProcess[]): void | Promise<void>;
52
+ disconnectProcesses(processes: readonly ConfigPublicationWorkerProcess[]): void;
53
+ discardConfirmedUncommitted(target: import('../ingress/admission-set').AdmissionSet): Promise<void>;
54
+ }
55
+ export type PendingConfigWorker = {
56
+ readonly process: ConfigPublicationWorkerProcess;
57
+ readonly boot_nonce?: string | null;
58
+ readonly revision: number;
59
+ readonly content_hash: Sha256Digest;
60
+ readonly plugin_catalog_hash: Sha256Digest;
61
+ readonly publication: ConfigPublicationIdentity | null;
62
+ };
63
+ export type ServingConfigWorker = PendingConfigWorker & {
64
+ readonly boot_nonce?: string;
65
+ readonly private_port: number;
66
+ };
67
+ export interface PreparedWorkerAdmission {
68
+ commit(): Promise<void>;
69
+ abort(): Promise<void>;
70
+ releaseRetiredAfterExitProof(): Promise<void>;
71
+ handoffStatus?(): Promise<WorkerHandoffStatus | null>;
72
+ }
73
+ export interface WorkerAdmissionController {
74
+ prepare(workers: readonly ServingConfigWorker[], signal?: AbortSignal, handoffTimeoutMs?: number, websocketMaxConnections?: number | null, websocketMaxMessageBytes?: number): Promise<PreparedWorkerAdmission>;
75
+ }
76
+ export interface ConfigPublicationRepository {
77
+ freezePublicationRetirementDrainStart?: (...args: Parameters<ConfigRepository['freezePublicationRetirementDrainStart']>) => Promise<ReturnType<ConfigRepository['freezePublicationRetirementDrainStart']>>;
78
+ getPublicationServingSet?: (...args: Parameters<ConfigRepository['getPublicationServingSet']>) => Promise<ReturnType<ConfigRepository['getPublicationServingSet']>>;
79
+ freezePublicationServingSet?: (...args: Parameters<ConfigRepository['freezePublicationServingSet']>) => Promise<ReturnType<ConfigRepository['freezePublicationServingSet']>>;
80
+ getPublicationRetirement?: (...args: Parameters<ConfigRepository['getPublicationRetirement']>) => Promise<ReturnType<ConfigRepository['getPublicationRetirement']>>;
81
+ freezePublicationRetirement?: (...args: Parameters<ConfigRepository['freezePublicationRetirement']>) => Promise<ReturnType<ConfigRepository['freezePublicationRetirement']>>;
82
+ recordPublicationRetirementEvidence?: (...args: Parameters<ConfigRepository['recordPublicationRetirementEvidence']>) => Promise<ReturnType<ConfigRepository['recordPublicationRetirementEvidence']>>;
83
+ stopPublicationRetirement?: (...args: Parameters<ConfigRepository['stopPublicationRetirement']>) => Promise<ReturnType<ConfigRepository['stopPublicationRetirement']>>;
84
+ retryPublicationRetirement?: (...args: Parameters<ConfigRepository['retryPublicationRetirement']>) => Promise<ReturnType<ConfigRepository['retryPublicationRetirement']>>;
85
+ markPublicationRetirementReleased?: (...args: Parameters<ConfigRepository['markPublicationRetirementReleased']>) => Promise<ReturnType<ConfigRepository['markPublicationRetirementReleased']>>;
86
+ getSnapshot(): RepositorySnapshot;
87
+ getActivePublication(): Promise<ActiveConfigurationPublication | null>;
88
+ claimPublicationTarget?(pluginCatalogHash: Sha256Digest, updatedAt: number): Promise<ActiveConfigurationPublication | null>;
89
+ requestPublicationCancellation?(mutationId: string, committedRevision: number, updatedAt: number): Promise<ConfigurationOperation>;
90
+ enterPublicationPrepare?(mutationId: string, committedRevision: number, updatedAt: number): Promise<PublicationPrepareDecision>;
91
+ confirmPublicationCandidateExited?(mutationId: string, committedRevision: number, updatedAt: number): Promise<ConfigurationOperation>;
92
+ recordPublicationCandidateExit?(mutationId: string, committedRevision: number, workerSlot: number, attemptNo: number, evidence: PublicationCandidateExitEvidence, updatedAt: number): Promise<void>;
93
+ beginPublication(mutationId: string, updatedAt: number): Promise<ConfigurationOperation>;
94
+ beginWorkerAttempt(mutationId: string, workerSlot: number, previousAttemptNo: number, reason: WorkerAttemptReason, updatedAt: number): Promise<ConfigurationOperationWorker>;
95
+ beginDrainingRecovery(mutationId: string, previousGeneration: number, updatedAt: number): Promise<ConfigurationOperation>;
96
+ recordWorkerResult(mutationId: string, workerSlot: number, result: WorkerPublicationResult, updatedAt: number): Promise<ConfigurationOperationWorker>;
97
+ markDraining(mutationId: string, updatedAt: number): Promise<ConfigurationOperation>;
98
+ finalizePublication(mutationId: string, outcome: FinalizePublicationOutcome, updatedAt: number): Promise<ConfigurationOperation>;
99
+ }
100
+ export interface PublicationClock {
101
+ now(): number;
102
+ }
103
+ export interface ScheduledTimeout {
104
+ cancel(): void;
105
+ }
106
+ export interface PublicationScheduler {
107
+ schedule(delayMs: number, callback: () => void): ScheduledTimeout;
108
+ }
109
+ export type PublicationRecoveryDisposition = ConfigurationRecoveryDisposition;
110
+ export type PublicationFailure = {
111
+ readonly slot: number;
112
+ readonly code: 'apply_failed' | 'early_exit' | 'invalid_message' | 'mismatched_message' | 'timeout';
113
+ readonly detail: string;
114
+ readonly recovery_disposition: PublicationRecoveryDisposition;
115
+ };
116
+ export type StartupPublicationOutcome = {
117
+ readonly kind: 'startup_ready';
118
+ readonly serving: readonly ServingConfigWorker[];
119
+ } | {
120
+ readonly kind: 'startup_degraded';
121
+ readonly http_status: 202;
122
+ readonly error_code: 'old_worker_drain_failed' | 'control_readiness_failed' | 'admission_outcome_unknown';
123
+ readonly recovery_disposition: PublicationRecoveryDisposition;
124
+ readonly failures: readonly PublicationFailure[];
125
+ readonly serving: readonly ServingConfigWorker[];
126
+ } | {
127
+ readonly kind: 'startup_failed';
128
+ readonly failures: readonly PublicationFailure[];
129
+ readonly serving: readonly ServingConfigWorker[];
130
+ } | {
131
+ readonly kind: 'startup_outcome_unknown';
132
+ readonly fatal: true;
133
+ readonly code: 'worker_exit_unconfirmed' | 'startup_failure' | 'outcome_unknown';
134
+ readonly error: unknown;
135
+ readonly failures: readonly PublicationFailure[];
136
+ readonly serving: readonly ServingConfigWorker[];
137
+ readonly pending: readonly PendingConfigWorker[];
138
+ };
139
+ export type MasterPublicationOutcome = {
140
+ readonly kind: 'superseded';
141
+ readonly operation: ConfigurationOperation;
142
+ readonly serving: readonly ServingConfigWorker[];
143
+ } | {
144
+ readonly kind: 'converged';
145
+ readonly http_status: 200;
146
+ readonly operation: ConfigurationOperation;
147
+ readonly serving: readonly ServingConfigWorker[];
148
+ } | {
149
+ readonly kind: 'degraded';
150
+ readonly http_status: 202;
151
+ readonly error_code: 'replacement_convergence_failed' | 'old_worker_drain_failed' | 'control_readiness_failed';
152
+ readonly recovery_disposition: PublicationRecoveryDisposition;
153
+ readonly failures: readonly PublicationFailure[];
154
+ readonly operation: ConfigurationOperation;
155
+ readonly serving: readonly ServingConfigWorker[];
156
+ } | {
157
+ readonly kind: 'outcome_unknown';
158
+ readonly fatal: true;
159
+ readonly code: 'admission_outcome_unknown' | 'repository_failure' | 'worker_exit_unconfirmed';
160
+ readonly error: unknown;
161
+ readonly serving: readonly ServingConfigWorker[];
162
+ readonly pending: readonly PendingConfigWorker[];
163
+ } | {
164
+ readonly kind: 'outcome_unknown';
165
+ readonly fatal: false;
166
+ readonly code: 'recovery_replacements_failed' | 'control_recovering' | 'worker_exit_unconfirmed';
167
+ readonly error: unknown;
168
+ readonly serving: readonly ServingConfigWorker[];
169
+ readonly pending: readonly PendingConfigWorker[];
170
+ };
171
+ export type MasterCoordinatorErrorCode = 'concurrent_publication' | 'invalid_options' | 'target_set_mismatch';
172
+ export declare class MasterConfigPublicationError extends Error {
173
+ readonly code: MasterCoordinatorErrorCode;
174
+ readonly name = "MasterConfigPublicationError";
175
+ constructor(code: MasterCoordinatorErrorCode, message: string);
176
+ }
@@ -0,0 +1,26 @@
1
+ import { type Sha256Digest } from '@jeffusion/bungee-types';
2
+ import type { RepositorySnapshot } from '../config-storage/repository-types';
3
+ import type { ConfigPublicationIdentity } from './types';
4
+ import { type ConfigPublicationWorkerFactory, type PublicationScheduler, type ServingConfigWorker, type StartupPublicationOutcome, type WorkerAdmissionController, type PreparedWorkerAdmission, type CreationPermit } from './coordinator-types';
5
+ import { ProcessIdentityAllocator } from './process-identity';
6
+ import { type PublicationCancellationSignal } from './publication-runner';
7
+ type CurrentStartupOptions = {
8
+ readonly workerFactory: ConfigPublicationWorkerFactory;
9
+ readonly workerCount: number;
10
+ readonly scheduler: PublicationScheduler;
11
+ readonly applyTimeoutMs: number;
12
+ readonly drainTimeoutMs: number;
13
+ readonly identities: ProcessIdentityAllocator;
14
+ readonly pluginCatalogHash: Sha256Digest;
15
+ readonly admission: WorkerAdmissionController;
16
+ readonly retireWorkers: readonly ServingConfigWorker[];
17
+ readonly signal?: PublicationCancellationSignal;
18
+ /** Shared creation gate; called immediately before any missing slot is forked. */
19
+ readonly ensureCreationPermitted: () => Promise<CreationPermit>;
20
+ readonly prospective?: {
21
+ readonly publication: ConfigPublicationIdentity;
22
+ publish(workers: readonly ServingConfigWorker[], admission: PreparedWorkerAdmission): Promise<boolean>;
23
+ };
24
+ };
25
+ export declare function runCurrentStartup(options: CurrentStartupOptions, snapshot: RepositorySnapshot, existingWorkers: readonly ServingConfigWorker[]): Promise<StartupPublicationOutcome>;
26
+ export {};
@@ -0,0 +1,15 @@
1
+ import { type PublicationPolicy } from '@jeffusion/bungee-types';
2
+ import type { PublicationFailure, PublicationScheduler, ServingConfigWorker, WorkerExitEvidence } from './coordinator-types';
3
+ export type WorkerDrainEvidence = {
4
+ readonly worker: ServingConfigWorker;
5
+ readonly acknowledgementFailure: PublicationFailure | null;
6
+ readonly unknownStage?: 'start' | 'drain' | 'exit' | 'rejected';
7
+ readonly terminationError?: unknown;
8
+ readonly waitError?: unknown;
9
+ readonly exitEvidence: WorkerExitEvidence | null;
10
+ };
11
+ export declare function freezeWorkerDrainTask(process: ServingConfigWorker['process'], drainId: string, policy: PublicationPolicy, startBootId: string, startDeadlineNs: string): void;
12
+ export declare function drainWorkers(workers: readonly ServingConfigWorker[], scheduler: PublicationScheduler, publicationPolicy?: PublicationPolicy, beforePoll?: () => void): Promise<readonly WorkerDrainEvidence[]>;
13
+ export declare function drainWorkersUntilKnown(workers: readonly ServingConfigWorker[], scheduler: PublicationScheduler, policy: PublicationPolicy, beforePoll?: () => void): Promise<readonly WorkerDrainEvidence[]>;
14
+ export declare function drainFailures(evidence: readonly WorkerDrainEvidence[]): readonly PublicationFailure[];
15
+ export declare function allDrainExitsConfirmed(evidence: readonly WorkerDrainEvidence[]): boolean;
@@ -0,0 +1,6 @@
1
+ export { ConfigWorkerRuntimeError, createConfigWorkerRuntimeController, type ConfigWorkerLifecycle, type ConfigWorkerRuntimeController, type ConfigWorkerRuntimeErrorCode, type ConfigWorkerRuntimeMessage, type ConfigWorkerRuntimeResult, } from './worker-runtime';
2
+ export { ConfigPublicationMessageError, parseConfigMasterMessage, parseConfigWorkerMessage, type ConfigApplyFailedMessage, type ConfigMasterMessage, type ConfigPublicationIdentity, type ConfigProcessIdentity, type ConfigPublicationMessageErrorCode, type ConfigReadyMessage, type ConfigWorkerMessage, type DrainWorkerCommand, type StartConfigWorkerCommand, type StartCurrentConfigWorkerCommand, type StartWorkerCommand, type WorkerDrainedMessage, } from './messages';
3
+ export { MasterConfigPublicationCoordinator, type MasterConfigPublicationCoordinatorOptions, } from './master-coordinator';
4
+ export { MasterConfigPublicationError, type ConfigPublicationRepository, type ConfigPublicationWorkerFactory, type ConfigPublicationWorkerProcess, type CreationPermit, type MasterPublicationOutcome, type PendingConfigWorker, type PublicationClock, type PublicationFailure, type PublicationRecoveryDisposition, type PublicationScheduler, type PreparedWorkerAdmission, type ScheduledTimeout, type ServingConfigWorker, type StartupPublicationOutcome, type WorkerAdmissionController, type WorkerExitEvidence, } from './coordinator-types';
5
+ export { WorkerAdmissionRegistry } from '../public-listener/admission-registry';
6
+ export type { ProcessCleanupResult } from './process-cleanup';
@@ -0,0 +1,45 @@
1
+ import type { ActiveConfigurationPublication, RepositorySnapshot } from '../config-storage/repository-types';
2
+ import type { Sha256Digest } from '@jeffusion/bungee-types';
3
+ import { type ConfigPublicationRepository, type ConfigPublicationWorkerFactory, type MasterPublicationOutcome, type PublicationClock, type PublicationScheduler, type ServingConfigWorker, type StartupPublicationOutcome, type WorkerAdmissionController } from './coordinator-types';
4
+ import type { PublicationCancellationSignal } from './publication-runner';
5
+ export type MasterConfigPublicationCoordinatorOptions = {
6
+ readonly repository: ConfigPublicationRepository;
7
+ readonly workerFactory: ConfigPublicationWorkerFactory;
8
+ readonly workerCount: number;
9
+ readonly clock: PublicationClock;
10
+ readonly scheduler?: PublicationScheduler;
11
+ readonly startupApplyTimeoutMs: number;
12
+ readonly drainTimeoutMs: number;
13
+ readonly pluginCatalogHash: Sha256Digest;
14
+ readonly admission: WorkerAdmissionController;
15
+ readonly masterGeneration?: string;
16
+ readonly createWorkerInstanceId?: () => string;
17
+ readonly recoverPreviousServingWorkers?: (active: ActiveConfigurationPublication) => Promise<readonly ServingConfigWorker[]>;
18
+ readonly recoverRetiredWorkers?: (active: ActiveConfigurationPublication) => Promise<readonly ServingConfigWorker[]>;
19
+ readonly recoverActiveServingWorkers?: (active: ActiveConfigurationPublication) => Promise<{
20
+ readonly workers: readonly ServingConfigWorker[];
21
+ readonly admission: import('./coordinator-types').PreparedWorkerAdmission;
22
+ } | null>;
23
+ readonly confirmPreviousWorkersExited?: (replacements: readonly ServingConfigWorker[]) => Promise<boolean>;
24
+ /**
25
+ * Shared creation gate for every real fork. It runs inside the serialized
26
+ * publication/recovery queue, settles debt-only, re-reads fresh authority and
27
+ * returns false without creating anything when capacity or proof is unknown.
28
+ */
29
+ readonly ensureCreationPermitted: () => Promise<import('./coordinator-types').CreationPermit>;
30
+ };
31
+ export declare class MasterConfigPublicationCoordinator {
32
+ private readonly options;
33
+ private readonly scheduler;
34
+ private readonly identities;
35
+ private leased;
36
+ constructor(options: MasterConfigPublicationCoordinatorOptions);
37
+ private acquire;
38
+ private release;
39
+ private validateServingWorkers;
40
+ startCurrent(snapshot: RepositorySnapshot, existingWorkers?: readonly ServingConfigWorker[], retireWorkers?: readonly ServingConfigWorker[], signal?: PublicationCancellationSignal): Promise<StartupPublicationOutcome>;
41
+ publish(active: ActiveConfigurationPublication, oldWorkers: readonly ServingConfigWorker[], signal?: PublicationCancellationSignal, updateSignal?: AbortSignal): Promise<MasterPublicationOutcome>;
42
+ publishPrepared(snapshot: RepositorySnapshot, mutationId: string, oldWorkers: readonly ServingConfigWorker[], commit: (workers: readonly ServingConfigWorker[]) => Promise<ActiveConfigurationPublication | null>, signal?: PublicationCancellationSignal): Promise<StartupPublicationOutcome | MasterPublicationOutcome>;
43
+ private runPublish;
44
+ recoverAndPublish(signal?: PublicationCancellationSignal): Promise<MasterPublicationOutcome | null>;
45
+ }
@@ -0,0 +1,2 @@
1
+ import type { ConfigMasterMessage } from './types';
2
+ export declare function parseConfigMasterMessage(input: unknown): ConfigMasterMessage;
@@ -0,0 +1,20 @@
1
+ import type { PluginConfigValue, Sha256Digest } from '@jeffusion/bungee-types';
2
+ import { type JsonObject } from '../config-storage/validation';
3
+ import type { ConfigProcessIdentity, ConfigPublicationIdentity } from './types';
4
+ export declare const PROCESS_IDENTITY_FIELDS: readonly ["master_generation", "worker_instance_id", "worker_slot"];
5
+ export declare function snapshotMessage(input: unknown): JsonObject;
6
+ export declare function invalid(path: string): never;
7
+ export declare function exactObject(value: PluginConfigValue | undefined, fields: ReadonlySet<string>, path: string): JsonObject;
8
+ export declare function exactRoot(root: JsonObject, fields: ReadonlySet<string>): void;
9
+ export declare function literal<T extends string>(value: PluginConfigValue | undefined, expected: T, path: string): T;
10
+ export declare function nonnegativeInteger(value: PluginConfigValue | undefined, path: string): number;
11
+ export declare function positiveInteger(value: PluginConfigValue | undefined, path: string): number;
12
+ export declare function privatePort(value: PluginConfigValue | undefined, path: string): number;
13
+ export declare function digest(value: PluginConfigValue | undefined, path: string): Sha256Digest;
14
+ export declare function identifier(value: PluginConfigValue | undefined, path: string): string;
15
+ export declare function processIdentity(value: JsonObject, path?: string): ConfigProcessIdentity;
16
+ export declare function sameProcessIdentity(left: ConfigProcessIdentity, right: ConfigProcessIdentity): boolean;
17
+ export declare function samePublicationIdentity(left: ConfigPublicationIdentity | null, right: ConfigPublicationIdentity | null): boolean;
18
+ export declare function publicationIdentity(value: PluginConfigValue | undefined, path: string): ConfigPublicationIdentity;
19
+ export declare function canonicalPlugins(value: PluginConfigValue | undefined, path: string): readonly string[];
20
+ export declare function boundedError(value: PluginConfigValue | undefined, path: string): string;
@@ -0,0 +1,3 @@
1
+ export { parseConfigMasterMessage } from './master-messages';
2
+ export { parseConfigWorkerMessage } from './worker-messages';
3
+ export { assertNeverConfigPublicationMessage, ConfigPublicationMessageError, type ConfigApplyFailedMessage, type ConfigMasterMessage, type ConfigMutationEnvelope, type ConfigPublicationIdentity, type ConfigProcessIdentity, type ConfigPublicationMessageErrorCode, type ConfigReadyMessage, type ConfigWorkerMessage, type CommitConfigRequest, type DrainWorkerCommand, type GetConfigOperationRequest, type StartConfigWorkerCommand, type StartCurrentConfigWorkerCommand, type StartWorkerCommand, type WorkerDrainedMessage, } from './types';
@@ -0,0 +1,30 @@
1
+ import type { ConfigPublicationWorkerProcess, PendingConfigWorker, PublicationScheduler, ServingConfigWorker, WorkerExitEvidence } from './coordinator-types';
2
+ export type OwnedProcess = {
3
+ readonly process: ConfigPublicationWorkerProcess;
4
+ readonly evidence: PendingConfigWorker | ServingConfigWorker;
5
+ };
6
+ export type ProcessCleanupResult = {
7
+ readonly process: ConfigPublicationWorkerProcess;
8
+ readonly exitEvidence: WorkerExitEvidence | null;
9
+ readonly terminationError?: unknown;
10
+ readonly waitError?: unknown;
11
+ };
12
+ export declare class OwnedProcessCollection {
13
+ private readonly owned;
14
+ add(process: ConfigPublicationWorkerProcess, pending: PendingConfigWorker): void;
15
+ promote(process: ConfigPublicationWorkerProcess, privatePort: number, bootNonce: string): ServingConfigWorker;
16
+ adoptServing(worker: ServingConfigWorker): void;
17
+ remove(process: ConfigPublicationWorkerProcess): void;
18
+ processes(): readonly ConfigPublicationWorkerProcess[];
19
+ serving(): readonly ServingConfigWorker[];
20
+ pending(): readonly PendingConfigWorker[];
21
+ cleanup(scheduler: PublicationScheduler, timeoutMs: number): Promise<readonly ProcessCleanupResult[]>;
22
+ }
23
+ export declare function cleanupConfirmed(results: readonly ProcessCleanupResult[]): boolean;
24
+ /**
25
+ * Physical exit alone is not release proof: the worker must also report successful
26
+ * cleanup. A drained worker proves it through its terminal drain message; a candidate
27
+ * cancelled before `config-ready` never has one and proves it through the signed
28
+ * shutdown cleanup record instead.
29
+ */
30
+ export declare function candidateResourcesReleased(results: readonly ProcessCleanupResult[]): boolean;
@@ -0,0 +1,14 @@
1
+ import type { ConfigProcessIdentity } from './types';
2
+ import { type ConfigPublicationWorkerProcess, type ServingConfigWorker } from './coordinator-types';
3
+ export declare function validateProcessSet(workers: readonly ServingConfigWorker[], masterGeneration: string, workerCount: number): void;
4
+ export declare function validateReplacementProcess(process: ConfigPublicationWorkerProcess, expected: ConfigProcessIdentity, occupied: readonly ServingConfigWorker[], replacements: readonly ConfigPublicationWorkerProcess[], workerCount: number): void;
5
+ export declare class ProcessIdentityAllocator {
6
+ readonly masterGeneration: string;
7
+ private readonly workerCount;
8
+ private readonly createWorkerInstanceId;
9
+ private readonly issued;
10
+ constructor(masterGeneration: string, workerCount: number, createWorkerInstanceId: () => string);
11
+ allocate(slots: readonly number[]): readonly ConfigProcessIdentity[];
12
+ register(workers: readonly ServingConfigWorker[]): void;
13
+ bind(identity: ConfigProcessIdentity, process: ConfigPublicationWorkerProcess): void;
14
+ }