@wengine-ai/ccr-provider-codex 1.0.9 → 1.0.11
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/card.js +23 -14
- package/dist/plugin.js +8 -5
- package/dist/plugin.json +1 -1
- package/package.json +1 -1
package/dist/card.js
CHANGED
|
@@ -957,7 +957,8 @@ function mount(el, props) {
|
|
|
957
957
|
t("managed_provider", { name: status?.providerName || CODEX_PROVIDER_NAME })
|
|
958
958
|
));
|
|
959
959
|
body.append(styled("p", "max-w-md text-xs text-muted-foreground", t("description")));
|
|
960
|
-
|
|
960
|
+
const showAccountSurface = !loading && !!status && (connected || state === "cooldown");
|
|
961
|
+
if (showAccountSurface && status) {
|
|
961
962
|
const rows = styled("dl", "grid max-w-md grid-cols-[auto_minmax(0,1fr)] gap-x-3 gap-y-1 text-xs");
|
|
962
963
|
const account = maskCodexAccountId(status.accountId) ?? t("unknown");
|
|
963
964
|
for (const [label, value, mono] of [
|
|
@@ -1164,23 +1165,31 @@ function mount(el, props) {
|
|
|
1164
1165
|
if (alive) render();
|
|
1165
1166
|
}) ?? null;
|
|
1166
1167
|
render();
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1168
|
+
const mountRead = (retried) => {
|
|
1169
|
+
readStatus().then((value) => {
|
|
1170
|
+
if (alive) {
|
|
1171
|
+
status = value;
|
|
1172
|
+
loadFailed = false;
|
|
1173
|
+
}
|
|
1174
|
+
}).catch(() => {
|
|
1175
|
+
if (!alive) return;
|
|
1176
|
+
if (!retried) {
|
|
1177
|
+
setTimeout(() => {
|
|
1178
|
+
if (alive) mountRead(true);
|
|
1179
|
+
}, 2500);
|
|
1180
|
+
return;
|
|
1181
|
+
}
|
|
1174
1182
|
loadFailed = true;
|
|
1175
1183
|
errorKey = "request_failed";
|
|
1176
|
-
}
|
|
1177
|
-
|
|
1178
|
-
if (alive) {
|
|
1184
|
+
}).finally(() => {
|
|
1185
|
+
if (!alive) return;
|
|
1179
1186
|
loading = false;
|
|
1180
1187
|
render();
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1188
|
+
const mountState = codexStateKey(status);
|
|
1189
|
+
if (mountState === "connected" || mountState === "cooldown") void autoReadUsage();
|
|
1190
|
+
});
|
|
1191
|
+
};
|
|
1192
|
+
mountRead(false);
|
|
1184
1193
|
}
|
|
1185
1194
|
function unmount(el) {
|
|
1186
1195
|
mounted.get(el)?.();
|
package/dist/plugin.js
CHANGED
|
@@ -1570,8 +1570,10 @@ function conversationKey(instructions, input, sessionId) {
|
|
|
1570
1570
|
const parts = [];
|
|
1571
1571
|
if (instructions) parts.push(instructions);
|
|
1572
1572
|
for (const item of input) {
|
|
1573
|
-
|
|
1574
|
-
|
|
1573
|
+
if (item?.role === "user") {
|
|
1574
|
+
parts.push(JSON.stringify(item));
|
|
1575
|
+
break;
|
|
1576
|
+
}
|
|
1575
1577
|
}
|
|
1576
1578
|
const digest = sha256Hex(sessionId + "\0" + parts.join("\0"));
|
|
1577
1579
|
return [
|
|
@@ -1694,10 +1696,11 @@ function codexFinalizeBody(body, options = {}) {
|
|
|
1694
1696
|
let { input } = finalizeInput(out.input);
|
|
1695
1697
|
input = finalizeInstructions(out, input, options.modelInstructions);
|
|
1696
1698
|
out.input = input;
|
|
1699
|
+
const stableInstructions = typeof options.modelInstructions === "string" && options.modelInstructions.trim() !== "" && out.instructions === options.modelInstructions ? out.instructions : "";
|
|
1697
1700
|
if (typeof out.prompt_cache_key !== "string" || out.prompt_cache_key.trim() === "") {
|
|
1698
|
-
const seed = typeof options.sessionId === "string" && options.sessionId ? options.sessionId :
|
|
1701
|
+
const seed = typeof options.sessionId === "string" && options.sessionId ? options.sessionId : "";
|
|
1699
1702
|
out.prompt_cache_key = conversationKey(
|
|
1700
|
-
|
|
1703
|
+
stableInstructions,
|
|
1701
1704
|
input,
|
|
1702
1705
|
seed
|
|
1703
1706
|
);
|
|
@@ -2585,7 +2588,7 @@ var codexLocales = {
|
|
|
2585
2588
|
// src/plugin.ts
|
|
2586
2589
|
var manifest = {
|
|
2587
2590
|
name: "codex",
|
|
2588
|
-
version: "1.0.
|
|
2591
|
+
version: "1.0.11",
|
|
2589
2592
|
coreApi: "1",
|
|
2590
2593
|
description: "Codex subscription managed provider: chatgpt.com backend-api/codex data plane, browser OAuth login (PKCE, loopback 1455/1457 + paste), model sync, usage and admin routes."
|
|
2591
2594
|
};
|
package/dist/plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codex",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"coreApi": "1",
|
|
5
5
|
"description": "Codex subscription managed provider: chatgpt.com backend-api/codex data plane, browser OAuth login (PKCE, loopback 1455/1457 + paste), model sync, usage and admin routes."
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wengine-ai/ccr-provider-codex",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "Codex subscription provider plugin for claude-code-router: browser OAuth login, fixed-origin responses data plane, transformer, managed runtime, admin routes, config protector and UI card.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/plugin.js",
|