@bitkyc08/opencodex 2.17.1-preview.20260814 → 2.19.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.
Files changed (50) hide show
  1. package/gui/dist/assets/{index-DUCH59lJ.css → index-CQ7bIKee.css} +1 -1
  2. package/gui/dist/assets/{index-ta3-_hgj.js → index-D_JUZLEC.js} +16 -16
  3. package/gui/dist/index.html +2 -2
  4. package/package.json +1 -1
  5. package/src/adapters/client-fingerprint.ts +14 -10
  6. package/src/adapters/cursor/live-transport.ts +17 -5
  7. package/src/adapters/cursor/protobuf-events.ts +662 -20
  8. package/src/adapters/cursor/tool-definitions.ts +12 -6
  9. package/src/adapters/google-antigravity-wire.ts +4 -3
  10. package/src/adapters/google.ts +22 -3
  11. package/src/bridge.ts +12 -2
  12. package/src/chat/inbound.ts +24 -1
  13. package/src/cli/index.ts +11 -0
  14. package/src/codex/app-server-processes.ts +3 -3
  15. package/src/codex/shim.ts +100 -5
  16. package/src/codex/user-identity.ts +36 -6
  17. package/src/config.ts +0 -2
  18. package/src/generated/compatibility-version.json +52 -44
  19. package/src/lib/errors.ts +27 -0
  20. package/src/lib/token-estimate.ts +19 -2
  21. package/src/lib/windows-elevation.ts +37 -0
  22. package/src/lib/windows-secret-acl.ts +7 -0
  23. package/src/lib/windows-text.ts +106 -0
  24. package/src/lib/windows-user-principal.ts +0 -2
  25. package/src/oauth/index.ts +1 -1
  26. package/src/oauth/store.ts +32 -18
  27. package/src/providers/antigravity-models.ts +25 -5
  28. package/src/providers/free-directory.ts +1 -1
  29. package/src/providers/registry.ts +6 -3
  30. package/src/responses/spill-store.ts +20 -1
  31. package/src/responses/state.ts +159 -3
  32. package/src/server/chat-completions.ts +4 -2
  33. package/src/server/effort-policy.ts +18 -0
  34. package/src/server/index.ts +5 -1
  35. package/src/server/management/logs-usage-routes.ts +7 -22
  36. package/src/server/request-log.ts +48 -3
  37. package/src/server/responses/core.ts +59 -15
  38. package/src/server/responses/encrypted-payload.ts +58 -38
  39. package/src/server/responses/fetch-helpers.ts +12 -4
  40. package/src/server/responses/input-admission.ts +169 -0
  41. package/src/server/responses/policy-fallback.ts +13 -2
  42. package/src/server/responses/ws-upstream.ts +115 -6
  43. package/src/service-manager-probe.ts +23 -37
  44. package/src/service.ts +233 -25
  45. package/src/tray/windows.ts +0 -2
  46. package/src/types.ts +10 -2
  47. package/src/update/job.ts +2 -2
  48. package/src/usage/summary.ts +21 -4
  49. package/src/vision/index.ts +21 -4
  50. package/src/web-search/index.ts +2 -1
@@ -16,8 +16,8 @@
16
16
  } catch (e) {}
17
17
  })();
18
18
  </script>
19
- <script type="module" crossorigin src="/assets/index-ta3-_hgj.js"></script>
20
- <link rel="stylesheet" crossorigin href="/assets/index-DUCH59lJ.css">
19
+ <script type="module" crossorigin src="/assets/index-D_JUZLEC.js"></script>
20
+ <link rel="stylesheet" crossorigin href="/assets/index-CQ7bIKee.css">
21
21
  </head>
22
22
  <body>
23
23
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitkyc08/opencodex",
3
- "version": "2.17.1-preview.20260814",
3
+ "version": "2.19.0",
4
4
  "description": "Universal provider proxy for OpenAI Codex & Claude Code — use any LLM with Codex CLI/App/SDK and Claude Code",
5
5
  "type": "module",
6
6
  "main": "./bin/package-main.mjs",
@@ -40,20 +40,24 @@ export function claudeCodeSessionId(token: string | undefined): string {
40
40
  return `${h.slice(0, 8)}-${h.slice(8, 12)}-4${h.slice(13, 16)}-${variant}${h.slice(17, 20)}-${h.slice(20, 32)}`;
41
41
  }
42
42
 
43
- // ── Antigravity CLI ──
44
- /** Pinned fallback Antigravity CLI version (real client fetches a manifest; we pin to avoid the network dependency). */
45
- export const ANTIGRAVITY_CLI_VERSION = "1.0.13";
46
- const ANTIGRAVITY_CLI_CLIENT_NAME = "aidev_client";
47
- const ANTIGRAVITY_CLI_PLATFORM = "darwin/arm64";
43
+ // ── Antigravity IDE ──
44
+ /** Pinned fallback Antigravity IDE language-server version (matches the bundled LS 2.5.5). */
45
+ export const ANTIGRAVITY_IDE_VERSION = "2.5.5";
46
+ const ANTIGRAVITY_IDE_CLIENT_NAME = "aidev_client";
47
+ const ANTIGRAVITY_IDE_PLATFORM = "windows/amd64";
48
48
  /** Secondary Google API client UA the Antigravity client library reports. */
49
49
  export const ANTIGRAVITY_GOOG_API_CLIENT_UA = "google-api-nodejs-client/10.3.0";
50
50
 
51
51
  /**
52
- * The real Antigravity CLI User-Agent, e.g.
53
- * `antigravity/cli/1.0.13 (aidev_client; os_type=darwin; arch=arm64)`.
52
+ * The real Antigravity IDE User-Agent, e.g.
53
+ * `antigravity/ide/2.5.5 (aidev_client; os_type=windows; arch=amd64)`.
54
+ *
55
+ * Must be the IDE client family, NOT `antigravity/cli/...`: the Cloud Code Assist backend gates
56
+ * newer agent models (e.g. `gemini-3.7-flash`) by User-Agent and answers 404 NOT_FOUND to
57
+ * CLI-shaped UAs even with a valid OAuth token. Only `antigravity/ide/<ver>` unlocks them.
54
58
  * A `GOOGLE_ANTIGRAVITY_USER_AGENT` override (set by the caller) takes precedence upstream.
55
59
  */
56
- export function antigravityUserAgent(version = ANTIGRAVITY_CLI_VERSION): string {
57
- const [osType, arch] = ANTIGRAVITY_CLI_PLATFORM.split("/");
58
- return `antigravity/cli/${version} (${ANTIGRAVITY_CLI_CLIENT_NAME}; os_type=${osType}; arch=${arch})`;
60
+ export function antigravityUserAgent(version = ANTIGRAVITY_IDE_VERSION): string {
61
+ const [osType, arch] = ANTIGRAVITY_IDE_PLATFORM.split("/");
62
+ return `antigravity/ide/${version} (${ANTIGRAVITY_IDE_CLIENT_NAME}; os_type=${osType}; arch=${arch})`;
59
63
  }
@@ -549,6 +549,11 @@ class LiveCursorTransport implements CursorTransport {
549
549
  .filter(isCursorSyntheticStructuredEditTool)
550
550
  .map(cursorToolWireName),
551
551
  );
552
+ const freeformToolNames = new Set(
553
+ (cursorVisibleTools ?? [])
554
+ .filter(tool => tool.freeform)
555
+ .map(tool => namespacedToolName(tool.namespace, tool.name)),
556
+ );
552
557
  this.execContext = {
553
558
  ...this.execContext,
554
559
  clientToolDefs,
@@ -578,6 +583,7 @@ class LiveCursorTransport implements CursorTransport {
578
583
  try {
579
584
  state = createCursorProtobufEventState({
580
585
  clientToolNames: clientToolDefs.map(tool => tool.toolName || tool.name),
586
+ freeformToolNames,
581
587
  parallelToolCalls: request.parallelToolCalls,
582
588
  toolSchemas,
583
589
  cursorToolNameMap,
@@ -1091,7 +1097,12 @@ class LiveCursorTransport implements CursorTransport {
1091
1097
  const update = message.message.case === "interactionUpdate" ? message.message.value.message : undefined;
1092
1098
  const completesOpenClientTool = update?.case === "toolCallCompleted"
1093
1099
  && state.openToolCalls.has(update.value.callId);
1100
+ const awaitedNativeArgsBeforeMapping = update?.case === "toolCallCompleted"
1101
+ && state.openToolCalls.get(update.value.callId)?.awaitingNativeArgs === true;
1094
1102
  const mapped = mapCursorProtobufServerMessage(message, state);
1103
+ const beganAwaitingNativeClientToolArgs = update?.case === "toolCallCompleted"
1104
+ && !awaitedNativeArgsBeforeMapping
1105
+ && state.openToolCalls.get(update.value.callId)?.awaitingNativeArgs === true;
1095
1106
  if (mapped.length > 0) {
1096
1107
  // A client tool call announced/committed via interactionUpdate (toolCallStarted/partialToolCall/
1097
1108
  // toolCallCompleted) changes the call set, so revoke any finalize armed by an earlier drain.
@@ -1108,13 +1119,14 @@ class LiveCursorTransport implements CursorTransport {
1108
1119
  return;
1109
1120
  }
1110
1121
  // The frame produced no outward Responses event (e.g. toolCallStarted / partialToolCall args
1111
- // buffering, toolCallDelta, tokenDelta, or a checkpoint update). Tool-call protocol events are
1112
- // deferred to completion for atomic, parallel-safe emission, so a turn that silently assembles
1113
- // several tool calls can otherwise exceed the bridge's stall watchdog (upstream_stall_timeout).
1122
+ // buffering, a completion waiting for native args, toolCallDelta, tokenDelta, or a checkpoint
1123
+ // update). Tool-call protocol events are deferred to completion for atomic, parallel-safe
1124
+ // emission, so a turn that silently assembles several tool calls can otherwise exceed the
1125
+ // bridge's stall watchdog (upstream_stall_timeout).
1114
1126
  // Emit a liveness heartbeat for these progress frames so the watchdog sees the upstream is alive.
1115
1127
  // Never after a terminal (done/truncation): a stray post-terminal frame must stay fully inert.
1116
- if (!state.terminated && isCursorProgressFrame(message)) {
1117
- if (isClientToolFrame(message)) this.noteClientToolActivity();
1128
+ if (!state.terminated && (isCursorProgressFrame(message) || beganAwaitingNativeClientToolArgs)) {
1129
+ if (isClientToolFrame(message) || beganAwaitingNativeClientToolArgs) this.noteClientToolActivity();
1118
1130
  push({ type: "heartbeat" });
1119
1131
  }
1120
1132
  }