@wengine-ai/ccr-provider-codex 1.0.10 → 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 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
- if (connected && status) {
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
- readStatus().then((value) => {
1168
- if (alive) {
1169
- status = value;
1170
- loadFailed = false;
1171
- }
1172
- }).catch(() => {
1173
- if (alive) {
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
- }).finally(() => {
1178
- if (alive) {
1184
+ }).finally(() => {
1185
+ if (!alive) return;
1179
1186
  loading = false;
1180
1187
  render();
1181
- if (codexConnected(status)) void autoReadUsage();
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
@@ -2588,7 +2588,7 @@ var codexLocales = {
2588
2588
  // src/plugin.ts
2589
2589
  var manifest = {
2590
2590
  name: "codex",
2591
- version: "1.0.10",
2591
+ version: "1.0.11",
2592
2592
  coreApi: "1",
2593
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."
2594
2594
  };
package/dist/plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex",
3
- "version": "1.0.10",
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.10",
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",