@jeffusion/bungee-core 5.10.0 → 5.11.0
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/main.js +31344 -17334
- package/dist/plugins/ai-transformer/index.js.map +2 -2
- package/dist/plugins/anthropic-request-sanitizer/index.js.map +2 -2
- package/dist/plugins/anthropic-tool-name-transformer/index.js.map +2 -2
- package/dist/plugins/chatgpt-oauth/control.js +513 -1
- package/dist/plugins/chatgpt-oauth/control.js.map +12 -4
- package/dist/plugins/chatgpt-oauth/index.js +511 -4
- package/dist/plugins/chatgpt-oauth/index.js.map +13 -5
- package/dist/plugins/chatgpt-oauth/manifest.json +19 -0
- package/dist/plugins/deepseek-reasoning-fix/index.js.map +2 -2
- package/dist/plugins/key-access/index.js.map +2 -2
- package/dist/plugins/key-rate-limit/index.js.map +2 -2
- package/dist/plugins/local-accounts/control.js.map +2 -2
- package/dist/plugins/local-accounts/index.js.map +2 -2
- package/dist/plugins/model-mapping/control.js +72 -17741
- package/dist/plugins/model-mapping/control.js.map +6 -58
- package/dist/plugins/model-mapping/index.js +32 -17433
- package/dist/plugins/model-mapping/index.js.map +6 -58
- package/dist/plugins/model-mapping/manifest.json +30 -14
- package/dist/plugins/models-dev/control.js +1042 -0
- package/dist/plugins/models-dev/control.js.map +16 -0
- package/dist/plugins/models-dev/index.js +15418 -0
- package/dist/plugins/models-dev/index.js.map +134 -0
- package/dist/plugins/models-dev/manifest.json +199 -0
- package/dist/plugins/models-dev/ui/ModelsDevSettings.svelte +120 -0
- package/dist/plugins/openai-messages-to-chat/index.js.map +2 -2
- package/dist/plugins/signature-repair/index.js.map +2 -2
- package/dist/plugins/token-budget/control.js +524 -9
- package/dist/plugins/token-budget/control.js.map +12 -4
- package/dist/plugins/token-budget/index.js +519 -12
- package/dist/plugins/token-budget/index.js.map +13 -6
- package/dist/plugins/token-budget/manifest.json +16 -2
- package/dist/plugins/token-metering/index.js +93 -2
- package/dist/plugins/token-metering/index.js.map +12 -6
- package/dist/plugins/token-stats/control.js +174 -312
- package/dist/plugins/token-stats/control.js.map +7 -7
- package/dist/plugins/token-stats/index.js +283 -486
- package/dist/plugins/token-stats/index.js.map +16 -12
- package/dist/plugins/token-stats/manifest.json +99 -12
- package/dist/plugins/token-stats/ui/ClientModelPicker.svelte +76 -0
- package/dist/plugins/token-stats/ui/PriceModelPicker.svelte +87 -0
- package/dist/plugins/token-stats/ui/TokenStatsSettings.svelte +136 -80
- package/dist/plugins/token-stats/ui/client-model-search.test.ts +58 -0
- package/dist/plugins/token-stats/ui/client-model-search.ts +16 -0
- package/dist/plugins/token-stats/ui/model-search.ts +45 -0
- package/dist/plugins/token-stats/ui/pricing-catalog.test.ts +114 -0
- package/dist/plugins/token-stats/ui/pricing-catalog.ts +17 -0
- package/package.json +2 -2
|
@@ -35,11 +35,25 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"token-metering": "^1.0.0",
|
|
37
37
|
"key-access": "^1.0.0",
|
|
38
|
-
"token-stats": "^
|
|
38
|
+
"token-stats": "^4.0.0"
|
|
39
39
|
},
|
|
40
40
|
"services": {
|
|
41
|
-
"provides": [
|
|
41
|
+
"provides": [
|
|
42
|
+
{
|
|
43
|
+
"id": "token-budget.admission.v1",
|
|
44
|
+
"version": 1,
|
|
45
|
+
"process": "control",
|
|
46
|
+
"kind": "rpc"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
42
49
|
"consumes": [
|
|
50
|
+
{
|
|
51
|
+
"id": "token-budget.admission.v1",
|
|
52
|
+
"version": 1,
|
|
53
|
+
"process": "worker",
|
|
54
|
+
"plugin": "token-budget",
|
|
55
|
+
"kind": "rpc"
|
|
56
|
+
},
|
|
43
57
|
{
|
|
44
58
|
"id": "token-metering.v1",
|
|
45
59
|
"version": 1,
|
|
@@ -16612,7 +16612,98 @@ function createTokenAccountingSession(input, options = {}) {
|
|
|
16612
16612
|
}
|
|
16613
16613
|
};
|
|
16614
16614
|
}
|
|
16615
|
+
// packages/core/src/plugin-services/host-rpc.ts
|
|
16616
|
+
import { AsyncLocalStorage } from "async_hooks";
|
|
16617
|
+
|
|
16618
|
+
// packages/core/src/plugin-services/wire-contract.ts
|
|
16619
|
+
var RPC_JSON_MAX_BYTES = 64 * 1024;
|
|
16620
|
+
var RPC_CONTRACT_MAX_BYTES = 256 * 1024;
|
|
16621
|
+
var RPC_CALL_PURPOSES = new Set(["bootstrap", "background", "management", "request", "attempt"]);
|
|
16622
|
+
var RPC_COMMAND_DEDUPLICATION = new Set(["local-transaction", "external-contract", "none"]);
|
|
16623
|
+
var RPC_COMMAND_POLICY_KEYS = new Set(["deduplication", "resultRetentionMs", "quotaBytes", "maxResultBytes"]);
|
|
16624
|
+
|
|
16625
|
+
// packages/core/src/plugin-services/rpc-runtime.ts
|
|
16626
|
+
var PROCESSES = new Set(["control", "worker", "ingress"]);
|
|
16627
|
+
var SCOPES = new Set(["global", "binding"]);
|
|
16628
|
+
var PURPOSES = new Set(["bootstrap", "background", "management", "request", "attempt"]);
|
|
16629
|
+
var ENDPOINTS = new WeakMap;
|
|
16630
|
+
var REVOKED = new WeakMap;
|
|
16631
|
+
|
|
16632
|
+
// packages/core/src/plugin-services/host-rpc.ts
|
|
16633
|
+
var SERVICE_ERROR_MESSAGES = {
|
|
16634
|
+
unauthorized: "RPC call is not authorized",
|
|
16635
|
+
not_ready: "RPC endpoint is not ready",
|
|
16636
|
+
retired: "RPC endpoint is retiring",
|
|
16637
|
+
revoked: "RPC endpoint generation was revoked",
|
|
16638
|
+
unsupported_method: "RPC method is not published",
|
|
16639
|
+
wrong_purpose: "RPC method is not published for this purpose",
|
|
16640
|
+
invalid_input: "RPC input is not valid",
|
|
16641
|
+
invalid_output: "RPC output is not valid",
|
|
16642
|
+
invalid_operation_id: "RPC command operation id is invalid",
|
|
16643
|
+
overloaded: "RPC runtime is at capacity",
|
|
16644
|
+
cancelled: "RPC call was cancelled",
|
|
16645
|
+
timeout: "RPC call deadline exceeded",
|
|
16646
|
+
unknown: "RPC command outcome is unknown",
|
|
16647
|
+
capability_unavailable: "RPC command execution is unavailable",
|
|
16648
|
+
closed: "RPC runtime is closed",
|
|
16649
|
+
failed: "RPC call failed",
|
|
16650
|
+
conflict: "RPC command identity conflicts with an existing record",
|
|
16651
|
+
expired: "RPC command result has expired",
|
|
16652
|
+
pending: "RPC command is still pending",
|
|
16653
|
+
rejected: "RPC command was rejected",
|
|
16654
|
+
missing: "RPC command has no stored result",
|
|
16655
|
+
storage_failure: "RPC command storage failed",
|
|
16656
|
+
deadlock: "RPC call chain would deadlock",
|
|
16657
|
+
call_depth_exceeded: "RPC call depth exceeded",
|
|
16658
|
+
undeclared: "RPC service is not declared by the manifest",
|
|
16659
|
+
unavailable: "RPC service is unavailable",
|
|
16660
|
+
ambiguous_placement: "RPC service placement is ambiguous",
|
|
16661
|
+
invalid_registration: "RPC registration is invalid"
|
|
16662
|
+
};
|
|
16663
|
+
var SERVICE_ERROR_CODES = new Set(Object.keys(SERVICE_ERROR_MESSAGES));
|
|
16664
|
+
var EMPTY_OPTIONS = Object.freeze({});
|
|
16665
|
+
var FRAME_STORE = new AsyncLocalStorage;
|
|
16666
|
+
var CALLEE_INFO = new WeakMap;
|
|
16667
|
+
// packages/core/src/plugin-services/peer-channel-protocol.ts
|
|
16668
|
+
var CHANNEL_REQUEST_MAX_BYTES = 4 * 1024;
|
|
16669
|
+
var CHANNEL_RESULT_MAX_BYTES = 60 * 1024;
|
|
16670
|
+
var CHANNEL_MAX_CHUNK_BYTES = 60 * 1024;
|
|
16671
|
+
var PLUGIN_CHANNEL_LANES = Object.freeze(["event", "snapshot", "stream"]);
|
|
16672
|
+
var ERROR_CODES = new Set([
|
|
16673
|
+
"unavailable",
|
|
16674
|
+
"ambiguous",
|
|
16675
|
+
"unauthorized",
|
|
16676
|
+
"invalid",
|
|
16677
|
+
"overloaded",
|
|
16678
|
+
"expired",
|
|
16679
|
+
"conflict",
|
|
16680
|
+
"gap",
|
|
16681
|
+
"truncated",
|
|
16682
|
+
"rejected",
|
|
16683
|
+
"cancelled",
|
|
16684
|
+
"closed",
|
|
16685
|
+
"unknown",
|
|
16686
|
+
"failed"
|
|
16687
|
+
]);
|
|
16688
|
+
var RPC_CALL_PURPOSES2 = new Set(["bootstrap", "background", "management", "request", "attempt"]);
|
|
16689
|
+
|
|
16690
|
+
// packages/core/src/plugin-services/peer-channel-hub.ts
|
|
16691
|
+
var CHANNEL_MAX_TRANSFER_BUFFER_BYTES = 4 * CHANNEL_MAX_CHUNK_BYTES;
|
|
16692
|
+
var CHANNEL_MAX_TOTAL_BUFFER_BYTES = 16 * CHANNEL_MAX_CHUNK_BYTES;
|
|
16693
|
+
var CHANNEL_STREAM_MAX_TOTAL_BYTES = 64 * 1024 * 1024;
|
|
16694
|
+
var CHANNEL_STREAM_MAX_CREDIT_BYTES = 8 * CHANNEL_MAX_CHUNK_BYTES;
|
|
16695
|
+
var CHANNEL_STREAM_DEFAULT_CREDIT_BYTES = 4 * CHANNEL_MAX_CHUNK_BYTES;
|
|
16696
|
+
var CHANNEL_SNAPSHOT_MAX_BYTES = 64 * 1024 * 1024;
|
|
16697
|
+
var CHANNEL_EVENT_MAX_PAYLOAD_BYTES = 60 * 1024;
|
|
16698
|
+
var EMPTY = new Uint8Array(0);
|
|
16699
|
+
var HANDLE_REGISTRATIONS = new WeakMap;
|
|
16700
|
+
|
|
16701
|
+
// packages/core/src/plugin-services/snapshot-store.ts
|
|
16702
|
+
var DEFAULT_CHUNK_BYTES = 60 * 1024;
|
|
16703
|
+
var SNAPSHOT_FAMILY_REFS = new Map;
|
|
16704
|
+
|
|
16615
16705
|
// packages/core/src/plugin-services.ts
|
|
16706
|
+
var CHANNEL_KINDS = new Set(["events", "snapshot", "stream"]);
|
|
16616
16707
|
var TOKEN_METERING_SERVICE_ID = "token-metering.v1";
|
|
16617
16708
|
var TOKEN_METERING_CONTRACT_VERSION = 1;
|
|
16618
16709
|
|
|
@@ -16711,7 +16802,7 @@ function detectModel(body, url) {
|
|
|
16711
16802
|
}
|
|
16712
16803
|
}
|
|
16713
16804
|
function pricingProviderFromUrl(url) {
|
|
16714
|
-
return
|
|
16805
|
+
return url.origin === "http://token-metering-observation.invalid" ? undefined : url.href;
|
|
16715
16806
|
}
|
|
16716
16807
|
function createAttempt(event) {
|
|
16717
16808
|
return {
|
|
@@ -17140,4 +17231,4 @@ export {
|
|
|
17140
17231
|
server_default as default
|
|
17141
17232
|
};
|
|
17142
17233
|
|
|
17143
|
-
//# debugId=
|
|
17234
|
+
//# debugId=094C267F1DA14B0B64756E2164756E21
|