@jeffusion/bungee-core 6.11.0 → 6.11.2
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/config-storage-worker.js +26 -5
- package/dist/main.js +234 -81
- package/dist/plugins/anthropic-request-sanitizer/index.js.map +1 -1
- package/dist/plugins/anthropic-tool-name-transformer/index.js.map +1 -1
- package/dist/plugins/chatgpt-oauth/control.js.map +1 -1
- package/dist/plugins/chatgpt-oauth/index.js.map +1 -1
- package/dist/plugins/codex-router/control.js.map +1 -1
- package/dist/plugins/codex-router/index.js.map +1 -1
- package/dist/plugins/deepseek-reasoning-fix/index.js.map +1 -1
- package/dist/plugins/key-access/control.js.map +1 -1
- package/dist/plugins/key-access/index.js.map +1 -1
- package/dist/plugins/key-access/ingress.js.map +1 -1
- package/dist/plugins/key-rate-limit/index.js.map +1 -1
- package/dist/plugins/llm-protocol-adapter/control.js.map +1 -1
- package/dist/plugins/llm-protocol-adapter/index.js.map +1 -1
- package/dist/plugins/llm-tps/index.js.map +1 -1
- package/dist/plugins/model-mapping/index.js.map +1 -1
- package/dist/plugins/models-dev/index.js.map +1 -1
- package/dist/plugins/signature-repair/index.js.map +1 -1
- package/dist/plugins/token-budget/control.js.map +1 -1
- package/dist/plugins/token-budget/index.js.map +1 -1
- package/dist/plugins/token-metering/index.js.map +1 -1
- package/dist/plugins/token-stats/control.js.map +1 -1
- package/dist/plugins/token-stats/index.js.map +1 -1
- package/dist/plugins/user-auth/control.js.map +1 -1
- package/dist/plugins/user-auth/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -481,6 +481,9 @@ function hashConfigurationRequest(identity) {
|
|
|
481
481
|
|
|
482
482
|
// ../types/src/daemon-control.ts
|
|
483
483
|
var DAEMON_METADATA_MAX_BYTES = 4 * 1024;
|
|
484
|
+
// ../types/src/types.ts
|
|
485
|
+
var DEFAULT_WEBSOCKET_MAX_MESSAGE_BYTES = 16 * 1024 * 1024;
|
|
486
|
+
var MAX_WEBSOCKET_MAX_MESSAGE_BYTES = 2147483647;
|
|
484
487
|
// ../types/src/rate-limit.ts
|
|
485
488
|
var RATE_LIMIT_MAX_RPS = 1e6;
|
|
486
489
|
var RATE_LIMIT_MAX_BURST = 1e6;
|
|
@@ -6878,6 +6881,10 @@ function validateGlobalPolicies(object, context) {
|
|
|
6878
6881
|
if (maxConnections !== undefined && maxConnections !== null && (!Number.isSafeInteger(maxConnections) || maxConnections < 1 || maxConnections > 2147483647)) {
|
|
6879
6882
|
context.add("invalid_value", "websocket_max_connections", "Expected null or an integer between 1 and 2147483647");
|
|
6880
6883
|
}
|
|
6884
|
+
const maxMessageBytes = object.websocket_max_message_bytes;
|
|
6885
|
+
if (maxMessageBytes !== undefined && (!Number.isSafeInteger(maxMessageBytes) || maxMessageBytes < 1 || maxMessageBytes > MAX_WEBSOCKET_MAX_MESSAGE_BYTES)) {
|
|
6886
|
+
context.add("invalid_value", "websocket_max_message_bytes", `Expected an integer between 1 and ${MAX_WEBSOCKET_MAX_MESSAGE_BYTES}`);
|
|
6887
|
+
}
|
|
6881
6888
|
validateAuth(object.auth, "auth", context);
|
|
6882
6889
|
if (object.publication !== undefined) {
|
|
6883
6890
|
for (const error of validatePublicationPolicy(object.publication)) {
|
|
@@ -7247,7 +7254,7 @@ function validatePluginOptions(name, options, path, catalog, context) {
|
|
|
7247
7254
|
}
|
|
7248
7255
|
|
|
7249
7256
|
// src/config-storage/compiler.ts
|
|
7250
|
-
var GLOBAL_KEYS = ["log_level", "body_parser_limit", "auth", "logging", "publication", "websocket_max_connections"];
|
|
7257
|
+
var GLOBAL_KEYS = ["log_level", "body_parser_limit", "auth", "logging", "publication", "websocket_max_connections", "websocket_max_message_bytes"];
|
|
7251
7258
|
var SERVICE_KEYS = ["health_check", "failover", "load_balancing"];
|
|
7252
7259
|
var ROUTE_KEYS = [
|
|
7253
7260
|
"request",
|
|
@@ -8781,14 +8788,16 @@ function replaceActiveMaterialization(db, aggregate) {
|
|
|
8781
8788
|
const publicationColumn = settingsColumns.has("publication_json") ? ",publication_json" : "";
|
|
8782
8789
|
const publicationValue = settingsColumns.has("publication_json") ? ",?" : "";
|
|
8783
8790
|
const hasWebSocketLimit = settingsColumns.has("websocket_max_connections_json");
|
|
8791
|
+
const hasWebSocketMessageSize = settingsColumns.has("websocket_max_message_bytes");
|
|
8784
8792
|
db.run(`INSERT INTO settings
|
|
8785
|
-
(id,log_level,body_parser_limit,auth_json,logging_json${publicationColumn}${hasWebSocketLimit ? ",websocket_max_connections_json" : ""}) VALUES (1,?,?,?,?${publicationValue}${hasWebSocketLimit ? ",?" : ""})`, [
|
|
8793
|
+
(id,log_level,body_parser_limit,auth_json,logging_json${publicationColumn}${hasWebSocketLimit ? ",websocket_max_connections_json" : ""}${hasWebSocketMessageSize ? ",websocket_max_message_bytes" : ""}) VALUES (1,?,?,?,?${publicationValue}${hasWebSocketLimit ? ",?" : ""}${hasWebSocketMessageSize ? ",?" : ""})`, [
|
|
8786
8794
|
logical.log_level ?? null,
|
|
8787
8795
|
logical.body_parser_limit ?? null,
|
|
8788
8796
|
logical.auth === undefined ? null : canonicalJson(logical.auth),
|
|
8789
8797
|
logical.logging === undefined ? null : canonicalJson(logical.logging),
|
|
8790
8798
|
...settingsColumns.has("publication_json") ? [logical.publication === undefined ? null : canonicalJson(logical.publication)] : [],
|
|
8791
|
-
...hasWebSocketLimit ? [logical.websocket_max_connections === undefined ? null : canonicalJson(logical.websocket_max_connections)] : []
|
|
8799
|
+
...hasWebSocketLimit ? [logical.websocket_max_connections === undefined ? null : canonicalJson(logical.websocket_max_connections)] : [],
|
|
8800
|
+
...hasWebSocketMessageSize ? [logical.websocket_max_message_bytes ?? null] : []
|
|
8792
8801
|
]);
|
|
8793
8802
|
writeServices(db, logical.services);
|
|
8794
8803
|
writeRoutes(db, logical.routes);
|
|
@@ -9443,7 +9452,7 @@ var SERVICE_RESERVED = new Set(["id", "position", "name", "endpoints", "service_
|
|
|
9443
9452
|
var ROUTE_RESERVED = new Set(["id", "position", "path", "service_id", "service", "service_references", "endpoints", "plugins"]);
|
|
9444
9453
|
function readSettings(db) {
|
|
9445
9454
|
const hasPublication = sqliteAll(db, "PRAGMA table_info(settings)").some(({ name }) => name === "publication_json");
|
|
9446
|
-
const rows = sqliteAll(db, `SELECT log_level,body_parser_limit,auth_json,logging_json${hasPublication ? ",publication_json" : ",NULL AS publication_json"},websocket_max_connections_json FROM settings`);
|
|
9455
|
+
const rows = sqliteAll(db, `SELECT log_level,body_parser_limit,auth_json,logging_json${hasPublication ? ",publication_json" : ",NULL AS publication_json"},websocket_max_connections_json,websocket_max_message_bytes FROM settings`);
|
|
9447
9456
|
const row = rows[0];
|
|
9448
9457
|
if (rows.length !== 1 || row === undefined)
|
|
9449
9458
|
throw new ConfigRepositoryError("schema_corrupt", "settings singleton is broken");
|
|
@@ -9460,6 +9469,7 @@ function readSettings(db) {
|
|
|
9460
9469
|
}
|
|
9461
9470
|
return {
|
|
9462
9471
|
...row.websocket_max_connections_json === null ? {} : { websocket_max_connections: websocketLimit },
|
|
9472
|
+
...row.websocket_max_message_bytes === null ? {} : { websocket_max_message_bytes: requireSafeInteger(row.websocket_max_message_bytes, "websocket_max_message_bytes", 1) },
|
|
9463
9473
|
...row.log_level === null ? {} : { log_level: requireOptionalGlobalScalar(row.log_level, "log_level") },
|
|
9464
9474
|
...row.body_parser_limit === null ? {} : {
|
|
9465
9475
|
body_parser_limit: requireOptionalGlobalScalar(row.body_parser_limit, "body_parser_limit")
|
|
@@ -9862,6 +9872,17 @@ function databaseSchemaDescriptor(db) {
|
|
|
9862
9872
|
});
|
|
9863
9873
|
}
|
|
9864
9874
|
|
|
9875
|
+
// src/config-storage/migrations/websocket-message-size.ts
|
|
9876
|
+
var WEBSOCKET_MESSAGE_SIZE_MIGRATION = {
|
|
9877
|
+
version: 7,
|
|
9878
|
+
name: "websocket_message_size",
|
|
9879
|
+
up(db) {
|
|
9880
|
+
db.run(`ALTER TABLE settings ADD COLUMN websocket_max_message_bytes INTEGER
|
|
9881
|
+
CHECK(websocket_max_message_bytes IS NULL OR (typeof(websocket_max_message_bytes)='integer'
|
|
9882
|
+
AND websocket_max_message_bytes BETWEEN 1 AND 2147483647))`);
|
|
9883
|
+
}
|
|
9884
|
+
};
|
|
9885
|
+
|
|
9865
9886
|
// src/config-storage/migrations/websocket-connections.ts
|
|
9866
9887
|
var WEBSOCKET_CONNECTIONS_MIGRATION = {
|
|
9867
9888
|
version: 6,
|
|
@@ -10297,7 +10318,7 @@ var PUBLICATION_RETIREMENT_MIGRATION = {
|
|
|
10297
10318
|
};
|
|
10298
10319
|
|
|
10299
10320
|
// src/config-storage/migrations/plan.ts
|
|
10300
|
-
var CONFIG_MIGRATIONS = [CONFIG_BASELINE, PUBLICATION_RETIREMENT_MIGRATION, UI_MENUS_MIGRATION, MANAGEMENT_PROTECTION_MIGRATION, SERVICE_REFERENCES_MIGRATION, WEBSOCKET_CONNECTIONS_MIGRATION];
|
|
10321
|
+
var CONFIG_MIGRATIONS = [CONFIG_BASELINE, PUBLICATION_RETIREMENT_MIGRATION, UI_MENUS_MIGRATION, MANAGEMENT_PROTECTION_MIGRATION, SERVICE_REFERENCES_MIGRATION, WEBSOCKET_CONNECTIONS_MIGRATION, WEBSOCKET_MESSAGE_SIZE_MIGRATION];
|
|
10301
10322
|
var CONFIG_SCHEMA_VERSION = CONFIG_MIGRATIONS.at(-1).version;
|
|
10302
10323
|
|
|
10303
10324
|
// src/config-storage/schema-fingerprint.ts
|