@bitkyc08/opencodex 2.91.0 → 2.92.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/bin/ocx.mjs +37 -3
- package/gui/dist/assets/{App-nZ34cR5G.js → App-sUf_8afJ.js} +18 -18
- package/gui/dist/assets/{Tray-BuLy7hL1.js → Tray-BSsxznDm.js} +1 -1
- package/gui/dist/assets/index-BlFE_VB_.js +94 -0
- package/gui/dist/assets/quota-summary-BRlbXgw0.js +1 -0
- package/gui/dist/index.html +1 -1
- package/gui/dist/provider-icons/workbuddy-color.svg +29 -0
- package/package.json +4 -3
- package/src/adapters/google-vertex-endpoint.ts +9 -1
- package/src/adapters/google-vertex-key-project.ts +223 -0
- package/src/adapters/google.ts +13 -3
- package/src/adapters/openai-chat/tool-name-registry.ts +3 -1
- package/src/adapters/openai-chat.ts +2 -2
- package/src/adapters/openai-responses/request-strips.ts +60 -0
- package/src/adapters/registry.ts +5 -0
- package/src/adapters/workbuddy-schema.ts +61 -0
- package/src/adapters/workbuddy.ts +68 -0
- package/src/bridge/response-json.ts +1 -1
- package/src/bridge/sse.ts +1 -1
- package/src/chat/outbound.ts +11 -4
- package/src/cli/capabilities-agents-routing.ts +3 -3
- package/src/cli/codex-cli-update.ts +8 -0
- package/src/cli/combo-result.ts +6 -0
- package/src/cli/combo-stats.ts +3 -0
- package/src/cli/combo.ts +66 -42
- package/src/cli/launcher-context.ts +49 -2
- package/src/cli/link.ts +45 -32
- package/src/cli/provider.ts +2 -1
- package/src/cli/usage-compare.ts +68 -12
- package/src/client/link-ingress.ts +1 -1
- package/src/client/link-readiness.ts +97 -0
- package/src/client/link-relay-transport.ts +79 -11
- package/src/client/link-relay.ts +74 -15
- package/src/client/link-tunnel.ts +45 -18
- package/src/client/machine-listener.ts +20 -2
- package/src/client/runtime.ts +20 -2
- package/src/codex/account-store.ts +17 -3
- package/src/codex/app-server-restart-service.ts +6 -5
- package/src/codex/catalog/effort.ts +9 -2
- package/src/codex/catalog/gather-capture.ts +4 -2
- package/src/codex/catalog/provider-models.ts +14 -8
- package/src/codex/chatgpt-refresh-failure.ts +6 -2
- package/src/codex/cli-install-provenance.ts +418 -0
- package/src/codex/cli-installation-targets.ts +5 -1
- package/src/codex/cli-update-plan.ts +43 -16
- package/src/codex/desktop-app/picker-freshness.ts +10 -8
- package/src/codex/desktop-compatibility/usage-activation.ts +2 -1
- package/src/codex/desktop-compatibility/usage-controller.ts +7 -1
- package/src/codex/pool-refresh-backoff.ts +3 -1
- package/src/codex/user-identity.ts +35 -6
- package/src/codex/windows-current-sid.ts +162 -0
- package/src/combos/jev-quota-activation.ts +5 -1
- package/src/combos/jev-quota-route.ts +1 -1
- package/src/combos/jev-quota.ts +9 -1
- package/src/combos/jev-session-pin-config.ts +51 -0
- package/src/combos/jev.ts +6 -0
- package/src/combos/types.ts +19 -0
- package/src/config/provider-validation.ts +7 -0
- package/src/config/schema/leaf-validators.ts +1 -0
- package/src/generated/compatibility-version.json +194 -122
- package/src/lib/decision-quota-sink.ts +10 -0
- package/src/lib/translator-budget.ts +4 -4
- package/src/lib/upstream-retry.ts +4 -1
- package/src/link/diagnostics.ts +193 -0
- package/src/link/relay-auth.ts +6 -0
- package/src/link/status-projection.ts +39 -0
- package/src/link/supervisor.ts +45 -12
- package/src/link/tunnel-history.ts +109 -0
- package/src/link/tunnel-state.ts +80 -17
- package/src/messaging/remote-files.ts +24 -1
- package/src/oauth/generic-account-failover.ts +91 -7
- package/src/oauth/index.ts +15 -0
- package/src/oauth/model-discovery-auth.ts +5 -0
- package/src/oauth/store.ts +4 -1
- package/src/oauth/token-guardian.ts +7 -0
- package/src/oauth/types.ts +9 -0
- package/src/oauth/workbuddy.ts +139 -0
- package/src/providers/antigravity-quota-identity.ts +37 -0
- package/src/providers/base-url-choices.ts +8 -5
- package/src/providers/derive.ts +23 -3
- package/src/providers/model-discovery.ts +2 -0
- package/src/providers/model-rename-fields.ts +1 -0
- package/src/providers/quota/account-cache.ts +3 -2
- package/src/providers/quota/antigravity.ts +25 -14
- package/src/providers/quota/report-cache.ts +13 -4
- package/src/providers/quota/vendor-probes-key.ts +60 -0
- package/src/providers/quota/workbuddy.ts +83 -0
- package/src/providers/quota-decision-antigravity.ts +64 -0
- package/src/providers/quota-decision-publication.ts +11 -0
- package/src/providers/quota-decision-snapshot.ts +21 -4
- package/src/providers/quota-types.ts +2 -0
- package/src/providers/quota.ts +3 -1
- package/src/providers/registry/entries-core.ts +9 -0
- package/src/providers/registry/entries-extended.ts +20 -7
- package/src/providers/registry/model-ids.ts +3 -0
- package/src/providers/registry/model-seeds.ts +27 -28
- package/src/providers/registry/types.ts +19 -1
- package/src/providers/resolved-model-policy.ts +4 -4
- package/src/providers/routed-config.ts +15 -0
- package/src/providers/stale-model-roster-migration.ts +83 -15
- package/src/providers/workbuddy-credit-balance.ts +81 -0
- package/src/providers/workbuddy-models.ts +37 -0
- package/src/providers/workbuddy.ts +60 -0
- package/src/responses/reasoning-replay-cache.ts +18 -14
- package/src/router.ts +2 -0
- package/src/routing/analytics.ts +2 -3
- package/src/routing/fallback-policy.ts +3 -3
- package/src/server/auth-cors.ts +1 -0
- package/src/server/chat-completions.ts +14 -1
- package/src/server/chat-native-reasoning.ts +10 -3
- package/src/server/chat-native.ts +13 -2
- package/src/server/claude-messages.ts +3 -0
- package/src/server/index/link-relay-sessions.ts +9 -5
- package/src/server/index/optional-listeners.ts +4 -0
- package/src/server/local-management-read-client.ts +3 -1
- package/src/server/management/combo-routes.ts +10 -4
- package/src/server/management/link-routes.ts +5 -2
- package/src/server/management/provider-routes.ts +1 -1
- package/src/server/port-reclaim.ts +51 -9
- package/src/server/request-log-conversation.ts +49 -0
- package/src/server/request-log.ts +2 -0
- package/src/server/responses/anthropic-thinking-recovery.ts +1 -0
- package/src/server/responses/compact.ts +10 -2
- package/src/server/responses/core-combo.ts +53 -31
- package/src/server/responses/core-lifetime.ts +2 -2
- package/src/server/responses/core-normalize.ts +6 -3
- package/src/server/responses/core-opaque-recovery.ts +1 -0
- package/src/server/responses/core-options.ts +5 -0
- package/src/server/responses/core-replay.ts +2 -1
- package/src/server/responses/jev-combo-choice.ts +39 -0
- package/src/server/responses/jev-session-pin.ts +203 -0
- package/src/server/responses/passthrough-delivery.ts +4 -0
- package/src/server/responses/request-prepare.ts +10 -5
- package/src/server/responses/request-transport.ts +25 -6
- package/src/server/responses/run-turn-execution.ts +2 -4
- package/src/server/responses/sidecar-execution.ts +2 -4
- package/src/server/responses-phase-inference.ts +267 -0
- package/src/server/sse-payload-rewrite.ts +14 -1
- package/src/service/definition.ts +20 -8
- package/src/types/config.ts +6 -0
- package/src/types/provider.ts +9 -1
- package/src/types/request.ts +1 -0
- package/src/types/wire.ts +1 -0
- package/src/update/codex-cli-update-launch-policy.d.mts +9 -0
- package/src/update/codex-cli-update-launch-policy.mjs +30 -0
- package/src/usage/jev-stats.ts +54 -14
- package/gui/dist/assets/index-DGXS51sp.js +0 -94
- package/gui/dist/assets/quota-summary-DO1Sx5TM.js +0 -1
package/bin/ocx.mjs
CHANGED
|
@@ -59,7 +59,10 @@ import { handoffWindowsTrayForUpdate, planWindowsTrayUpdate } from "../src/updat
|
|
|
59
59
|
import { bootRestoreProbe, launcherUsableAfterNpmUpdate, transactionalNpmUpdate } from "../src/update/transactional-install.mjs";
|
|
60
60
|
import { manualUpdateFailureGuidance, npmUpdateFailureGuidance } from "../src/update/update-failure-guidance.mjs";
|
|
61
61
|
import {
|
|
62
|
+
captureCodexCliTransportEnv,
|
|
63
|
+
CODEX_CLI_TRANSPORT_ENV_KEYS,
|
|
62
64
|
CODEX_CLI_VERSION_MANAGER_ROOT_ENV_SLOTS,
|
|
65
|
+
codexCliInspectionLookupSeeds,
|
|
63
66
|
isCodexCliUpdateInspectionArgv,
|
|
64
67
|
} from "../src/update/codex-cli-update-launch-policy.mjs";
|
|
65
68
|
import {
|
|
@@ -1192,14 +1195,25 @@ function createNodeLaunchContext() {
|
|
|
1192
1195
|
: configuredCodexCliPath;
|
|
1193
1196
|
const preBunPath = typeof process.env.PATH === "string" ? process.env.PATH : null;
|
|
1194
1197
|
const preBunPathExt = typeof process.env.PATHEXT === "string" ? process.env.PATHEXT : null;
|
|
1198
|
+
// HOME and NODE_PATH seed the candidate Node module lookup the update
|
|
1199
|
+
// inspection models, so they are proof-bound here for the same reason as
|
|
1200
|
+
// PATH: the live environment could have been rewritten after selection. They
|
|
1201
|
+
// stay in the inherited environment regardless — the child may need them for
|
|
1202
|
+
// its own work; only the snapshot copy is optional.
|
|
1203
|
+
const preBunHome = typeof process.env.HOME === "string" ? process.env.HOME : null;
|
|
1204
|
+
const preBunNodePath = typeof process.env.NODE_PATH === "string" ? process.env.NODE_PATH : null;
|
|
1195
1205
|
const preBunCodexCliManagerRoots = Object.fromEntries(
|
|
1196
1206
|
CODEX_CLI_VERSION_MANAGER_ROOT_ENV_SLOTS.flatMap(name => {
|
|
1197
1207
|
const value = process.env[name];
|
|
1198
1208
|
return typeof value === "string" && value !== "" ? [[name, value]] : [];
|
|
1199
1209
|
}),
|
|
1200
1210
|
);
|
|
1211
|
+
// Proxy/CA settings are captured once, here, before Bun can add project dotenv
|
|
1212
|
+
// values. They are part of the required selection snapshot, so they count
|
|
1213
|
+
// against the context budget below before any optional lookup seed does.
|
|
1214
|
+
const preBunTransportEnv = captureCodexCliTransportEnv(process.env);
|
|
1201
1215
|
const launchProof = randomBytes(32).toString("base64url");
|
|
1202
|
-
const
|
|
1216
|
+
const serializeContext = lookupSeeds => JSON.stringify({
|
|
1203
1217
|
version: 1,
|
|
1204
1218
|
proof: launchProof,
|
|
1205
1219
|
anthropicEnvSlots: preBunAnthropicSlots,
|
|
@@ -1207,11 +1221,30 @@ function createNodeLaunchContext() {
|
|
|
1207
1221
|
codexCliPath: preBunCodexCliPath,
|
|
1208
1222
|
path: preBunPath,
|
|
1209
1223
|
pathExt: preBunPathExt,
|
|
1224
|
+
home: lookupSeeds.home,
|
|
1225
|
+
nodePath: lookupSeeds.nodePath,
|
|
1210
1226
|
managerRoots: preBunCodexCliManagerRoots,
|
|
1227
|
+
transportEnv: preBunTransportEnv,
|
|
1228
|
+
// The published Codex entrypoint selects its native backing by the arch of
|
|
1229
|
+
// the Node that runs it; a Bun override or PATH fallback can run another
|
|
1230
|
+
// arch under Rosetta, so this Node launcher's arch is the bound value.
|
|
1231
|
+
arch: process.arch,
|
|
1211
1232
|
configDir: configDir(),
|
|
1212
1233
|
} : null,
|
|
1213
1234
|
});
|
|
1214
|
-
|
|
1235
|
+
let launchContext = serializeContext({ home: preBunHome, nodePath: preBunNodePath });
|
|
1236
|
+
// The lookup seeds are optional: a Windows inspection never models the global
|
|
1237
|
+
// Node lookup, and an oversized NODE_PATH must not push the serialized
|
|
1238
|
+
// context past the reader's limit — that would discard the whole selection
|
|
1239
|
+
// snapshot, while dropped seeds merely leave the fallback lane unverifiable
|
|
1240
|
+
// and fail only the content observation closed.
|
|
1241
|
+
const lookupSeeds = codexCliInspectionLookupSeeds(
|
|
1242
|
+
process.platform, preBunHome, preBunNodePath, launchContext.length,
|
|
1243
|
+
);
|
|
1244
|
+
if (lookupSeeds.home !== preBunHome || lookupSeeds.nodePath !== preBunNodePath) {
|
|
1245
|
+
launchContext = serializeContext(lookupSeeds);
|
|
1246
|
+
}
|
|
1247
|
+
// The inspection snapshot above already carries PATH, PATHEXT, manager roots and proxy/CA settings as
|
|
1215
1248
|
// proof-bound values, and `inspectCodexCliInstall` reads them from that snapshot rather than
|
|
1216
1249
|
// from the live environment. Inheriting them again would spend the 32,767-character Windows
|
|
1217
1250
|
// environment block twice, so a large-but-valid shell environment could stop the Bun child
|
|
@@ -1224,7 +1257,8 @@ function createNodeLaunchContext() {
|
|
|
1224
1257
|
const inheritedEnv = { ...process.env };
|
|
1225
1258
|
if (codexCliUpdateInspection) {
|
|
1226
1259
|
const snapshotted = new Set(
|
|
1227
|
-
["PATH", "PATHEXT", ...CODEX_CLI_VERSION_MANAGER_ROOT_ENV_SLOTS
|
|
1260
|
+
["PATH", "PATHEXT", ...CODEX_CLI_VERSION_MANAGER_ROOT_ENV_SLOTS,
|
|
1261
|
+
...CODEX_CLI_TRANSPORT_ENV_KEYS].map(name => name.toLowerCase()),
|
|
1228
1262
|
);
|
|
1229
1263
|
for (const name of Object.keys(inheritedEnv)) {
|
|
1230
1264
|
if (snapshotted.has(name.toLowerCase())) delete inheritedEnv[name];
|