@bitkyc08/opencodex 2.47.0-preview.20260908 → 2.48.0-preview.20260908
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-B6EFoatP.js +115 -0
- package/gui/dist/assets/index-D5SiRo8X.css +1 -0
- package/gui/dist/index.html +2 -2
- package/package.json +1 -1
- package/src/adapters/openai-responses.ts +16 -2
- package/src/adapters/opencode-go-additional-tools.ts +35 -0
- package/src/adapters/routed-agent-messages.ts +46 -0
- package/src/claude/inbound-content-options.ts +6 -0
- package/src/codex/auth-api.ts +211 -67
- package/src/codex/features.ts +3 -1
- package/src/codex/multi-agent-mode-policy.ts +24 -0
- package/src/codex/reset-credit-auto-redeem.ts +54 -13
- package/src/codex/routing.ts +85 -4
- package/src/codex/shim.ts +10 -1
- package/src/config/atomic-write.ts +2 -3
- package/src/config/initialize.ts +11 -6
- package/src/generated/compatibility-version.json +35 -23
- package/src/lib/state-store-registrations.ts +2 -0
- package/src/providers/default-aliases.ts +4 -1
- package/src/providers/registry.ts +6 -1
- package/src/router.ts +5 -2
- package/src/server/claude-messages.ts +21 -4
- package/src/server/live.ts +8 -19
- package/src/server/management/agent-settings-routes.ts +3 -0
- package/src/server/responses/collaboration.ts +23 -12
- package/src/server/responses/combo-session-recall.ts +89 -0
- package/src/server/responses/compact.ts +19 -1
- package/src/server/responses/core.ts +189 -51
- package/src/types/config.ts +3 -3
- package/gui/dist/assets/index-B8ZZ0ivI.css +0 -1
- package/gui/dist/assets/index-CNTWhC5F.js +0 -115
- package/src/adapters/opencode-go.ts +0 -35
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/** Match the Go destination, including user-renamed provider entries. */
|
|
2
|
-
export function isOpenCodeGo(baseUrl: string): boolean {
|
|
3
|
-
try {
|
|
4
|
-
const url = new URL(baseUrl);
|
|
5
|
-
return url.origin === "https://opencode.ai" && url.pathname.replace(/\/+$/, "") === "/zen/go/v1";
|
|
6
|
-
} catch { return false; }
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/** Public Responses rejects Codex's private agent_message variant, even with plaintext content. */
|
|
10
|
-
export function normalizeOpenCodeGoAgentMessages(body: unknown): unknown {
|
|
11
|
-
if (!body || typeof body !== "object" || Array.isArray(body)) return body;
|
|
12
|
-
const record = body as Record<string, unknown>;
|
|
13
|
-
if (!Array.isArray(record.input)) return body;
|
|
14
|
-
let changed = false;
|
|
15
|
-
const input = record.input.map((item: unknown) => {
|
|
16
|
-
if (!item || typeof item !== "object" || Array.isArray(item)) return item;
|
|
17
|
-
const message = item as Record<string, unknown>;
|
|
18
|
-
if (message.type !== "agent_message" || !Array.isArray(message.content) || message.content.length === 0) return item;
|
|
19
|
-
// Genuine ciphertext and unknown part types must retain their existing fail-closed path.
|
|
20
|
-
if (!message.content.every(part => part && typeof part === "object"
|
|
21
|
-
&& ["input_text", "input_image", "input_file"].includes(part.type))) return item;
|
|
22
|
-
const identities = Object.fromEntries(["author", "recipient"]
|
|
23
|
-
.filter(key => typeof message[key] === "string")
|
|
24
|
-
.map(key => [key, message[key]]));
|
|
25
|
-
changed = true;
|
|
26
|
-
return {
|
|
27
|
-
type: "message", role: "user",
|
|
28
|
-
content: [
|
|
29
|
-
...(Object.keys(identities).length ? [{ type: "input_text", text: `Agent message ${JSON.stringify(identities)}` }] : []),
|
|
30
|
-
...message.content,
|
|
31
|
-
],
|
|
32
|
-
};
|
|
33
|
-
});
|
|
34
|
-
return changed ? { ...record, input } : body;
|
|
35
|
-
}
|