@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.
- package/gui/dist/assets/{index-DUCH59lJ.css → index-CQ7bIKee.css} +1 -1
- package/gui/dist/assets/{index-ta3-_hgj.js → index-D_JUZLEC.js} +16 -16
- package/gui/dist/index.html +2 -2
- package/package.json +1 -1
- package/src/adapters/client-fingerprint.ts +14 -10
- package/src/adapters/cursor/live-transport.ts +17 -5
- package/src/adapters/cursor/protobuf-events.ts +662 -20
- package/src/adapters/cursor/tool-definitions.ts +12 -6
- package/src/adapters/google-antigravity-wire.ts +4 -3
- package/src/adapters/google.ts +22 -3
- package/src/bridge.ts +12 -2
- package/src/chat/inbound.ts +24 -1
- package/src/cli/index.ts +11 -0
- package/src/codex/app-server-processes.ts +3 -3
- package/src/codex/shim.ts +100 -5
- package/src/codex/user-identity.ts +36 -6
- package/src/config.ts +0 -2
- package/src/generated/compatibility-version.json +52 -44
- package/src/lib/errors.ts +27 -0
- package/src/lib/token-estimate.ts +19 -2
- package/src/lib/windows-elevation.ts +37 -0
- package/src/lib/windows-secret-acl.ts +7 -0
- package/src/lib/windows-text.ts +106 -0
- package/src/lib/windows-user-principal.ts +0 -2
- package/src/oauth/index.ts +1 -1
- package/src/oauth/store.ts +32 -18
- package/src/providers/antigravity-models.ts +25 -5
- package/src/providers/free-directory.ts +1 -1
- package/src/providers/registry.ts +6 -3
- package/src/responses/spill-store.ts +20 -1
- package/src/responses/state.ts +159 -3
- package/src/server/chat-completions.ts +4 -2
- package/src/server/effort-policy.ts +18 -0
- package/src/server/index.ts +5 -1
- package/src/server/management/logs-usage-routes.ts +7 -22
- package/src/server/request-log.ts +48 -3
- package/src/server/responses/core.ts +59 -15
- package/src/server/responses/encrypted-payload.ts +58 -38
- package/src/server/responses/fetch-helpers.ts +12 -4
- package/src/server/responses/input-admission.ts +169 -0
- package/src/server/responses/policy-fallback.ts +13 -2
- package/src/server/responses/ws-upstream.ts +115 -6
- package/src/service-manager-probe.ts +23 -37
- package/src/service.ts +233 -25
- package/src/tray/windows.ts +0 -2
- package/src/types.ts +10 -2
- package/src/update/job.ts +2 -2
- package/src/usage/summary.ts +21 -4
- package/src/vision/index.ts +21 -4
- package/src/web-search/index.ts +2 -1
package/gui/dist/index.html
CHANGED
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
} catch (e) {}
|
|
17
17
|
})();
|
|
18
18
|
</script>
|
|
19
|
-
<script type="module" crossorigin src="/assets/index-
|
|
20
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
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.
|
|
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
|
|
44
|
-
/** Pinned fallback Antigravity
|
|
45
|
-
export const
|
|
46
|
-
const
|
|
47
|
-
const
|
|
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
|
|
53
|
-
* `antigravity/
|
|
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 =
|
|
57
|
-
const [osType, arch] =
|
|
58
|
-
return `antigravity/
|
|
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
|
|
1112
|
-
// deferred to completion for atomic, parallel-safe
|
|
1113
|
-
// several tool calls can otherwise exceed the
|
|
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
|
}
|