@jeffusion/bungee-core 6.11.2 → 6.12.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/config-storage-worker.js +1442 -524
- package/dist/main.js +1832 -390
- package/dist/plugin-state-worker.js +1 -0
- package/dist/plugins/chatgpt-oauth/manifest.json +0 -8
- package/dist/plugins/codex-router/index.js +4 -4
- package/dist/plugins/codex-router/index.js.map +4 -4
- package/dist/plugins/llm-protocol-adapter/control.js +53 -28
- package/dist/plugins/llm-protocol-adapter/control.js.map +8 -8
- package/dist/plugins/llm-protocol-adapter/index.js +58 -33
- package/dist/plugins/llm-protocol-adapter/index.js.map +10 -10
- package/dist/plugins/models-dev/index.js +6 -2
- package/dist/plugins/models-dev/index.js.map +3 -3
- package/dist/plugins/token-metering/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -18954,6 +18954,7 @@ function positiveInteger(value, fallback) {
|
|
|
18954
18954
|
|
|
18955
18955
|
// src/plugin-state/storage-rpc.ts
|
|
18956
18956
|
var PLUGIN_STORAGE_OPERATIONS = ["get", "readStrict", "set", "delete", "keys", "clear", "increment", "compareAndSet", "flush"];
|
|
18957
|
+
var WRITE_OPERATIONS = new Set(["set", "delete", "clear", "increment", "compareAndSet"]);
|
|
18957
18958
|
|
|
18958
18959
|
// src/plugin-state/schema.ts
|
|
18959
18960
|
import { Database } from "bun:sqlite";
|
|
@@ -489,10 +489,6 @@
|
|
|
489
489
|
"ui.routeHandoffSourceUnavailable": "The account source is unavailable. Check that its plugin is enabled, then try again.",
|
|
490
490
|
"ui.routeHandoffAccountUnavailable": "This account is no longer available. Refresh Accounts and choose an available account.",
|
|
491
491
|
"ui.routeSaveError": "The route could not be saved. Your draft remains here; try again.",
|
|
492
|
-
"ui.routeStale": "This route changed elsewhere. No changes were published. Your draft remains here; reload the latest route before saving again.",
|
|
493
|
-
"ui.routeReload": "Reload route",
|
|
494
|
-
"ui.routeReloadTitle": "Reload latest route?",
|
|
495
|
-
"ui.routeReloadConfirm": "This will discard your unsaved route draft. Continue?",
|
|
496
492
|
"ui.usageLabel": "Usage",
|
|
497
493
|
"ui.refreshUsage": "Refresh quota usage",
|
|
498
494
|
"ui.refreshUsageAndCards": "Refresh usage + reset-card data",
|
|
@@ -739,10 +735,6 @@
|
|
|
739
735
|
"ui.routeHandoffSourceUnavailable": "账号来源不可用,请确认插件已启用后重试。",
|
|
740
736
|
"ui.routeHandoffAccountUnavailable": "此账号目前不可用,请刷新账号页面后选择可用账号。",
|
|
741
737
|
"ui.routeSaveError": "路由保存失败,当前草稿仍保留,请重试。",
|
|
742
|
-
"ui.routeStale": "路由已被其他操作修改,未发布任何更改。当前草稿仍保留;需重新加载最新路由后才能再次保存。",
|
|
743
|
-
"ui.routeReload": "重新加载路由",
|
|
744
|
-
"ui.routeReloadTitle": "重新加载最新路由?",
|
|
745
|
-
"ui.routeReloadConfirm": "这会丢弃当前未保存的路由草稿,是否继续?",
|
|
746
738
|
"ui.usageLabel": "用量",
|
|
747
739
|
"ui.refreshUsage": "刷新额度用量",
|
|
748
740
|
"ui.refreshUsageAndCards": "刷新用量和重置卡数据",
|
|
@@ -2918,13 +2918,13 @@ function protocolAdapter(input) {
|
|
|
2918
2918
|
input.signal.removeEventListener("abort", dispose);
|
|
2919
2919
|
dispose();
|
|
2920
2920
|
};
|
|
2921
|
-
const convert = (run) => {
|
|
2921
|
+
const convert = (run, status = 502) => {
|
|
2922
2922
|
try {
|
|
2923
2923
|
return run();
|
|
2924
2924
|
} catch (error) {
|
|
2925
2925
|
const e = error;
|
|
2926
2926
|
if (typeof e.code === "string")
|
|
2927
|
-
throw new DataAdmissionError(
|
|
2927
|
+
throw new DataAdmissionError(status, `llm_adapter_${e.code}`, undefined, { message: e.message, param: e.param });
|
|
2928
2928
|
throw error;
|
|
2929
2929
|
}
|
|
2930
2930
|
};
|
|
@@ -2938,7 +2938,7 @@ function protocolAdapter(input) {
|
|
|
2938
2938
|
}, register(hooks) {
|
|
2939
2939
|
hooks.onValidateOutbound.tapPromise("codex-router.target", async (context) => {
|
|
2940
2940
|
input.signal.throwIfAborted();
|
|
2941
|
-
const result = convert(() => input.session.validateAttempt({ model: protocolRequestModel(input.protocol, context.body, context.url), modelIdentity: readModelIdentity(context.annotations), protocol: input.protocol, body: context.body, url: context.url }));
|
|
2941
|
+
const result = convert(() => input.session.validateAttempt({ model: protocolRequestModel(input.protocol, context.body, context.url), modelIdentity: readModelIdentity(context.annotations), protocol: input.protocol, body: context.body, url: context.url }), 422);
|
|
2942
2942
|
logger.info({ requestId: context.requestId, attemptId: context.attemptId, ...result }, "llm_adapter_target_validated");
|
|
2943
2943
|
return context;
|
|
2944
2944
|
});
|
|
@@ -3839,4 +3839,4 @@ export {
|
|
|
3839
3839
|
server_default as default
|
|
3840
3840
|
};
|
|
3841
3841
|
|
|
3842
|
-
//# debugId=
|
|
3842
|
+
//# debugId=5A106368FE1271BA64756E2164756E21
|