mirror of
https://github.com/zhukunpenglinyutong/jetbrains-cc-gui.git
synced 2026-10-31 02:41:28 +08:00
Replace the per-turn `codex exec` TypeScript SDK path with a persistent `codex app-server --listen stdio://` JSON-RPC connection managed by the Node daemon: Java -> DaemonBridge -> persistent CodexAppServerService -> native app-server, one initialized child per chat host with native thread/turn lifecycle. Node (ai-bridge): - Add app-server stdio client (handshake, request/reply registries, classified errors, uncertainty budget) and the operation service (session FIFO, frozen settings revisions, reverse interactions, item/plan/compaction projections, launch-config rebuild at idle). - Add persistent per-session service wrapper, CLI resolver with legacy dependency fallback, sanitized runtime environments, native history/ subagents/catalog readers, privacy journal, and ephemeral text requests for prompt enhancement, commit generation and session titles. - Remove the TypeScript SDK load path and JSONL re-read from live turns. Java: - Rewrite CodexSDKBridge on the provider facade: structured daemon routing with channel/epoch/runtime-generation gates, thread ownership registry, interaction registry with page tokens, native history reader with offline-only legacy fallback, and daemon lifecycle coordination. - Add interaction/data/workspace-diff handlers, file navigation helper, native file-change undo plan (patch reversal, rename baselines), and Codex history merger for restored sessions. - Route Codex runtime management to the shared CLI detection page; drop the Codex SDK dependency definition and install entries. - Wire send identity (clientMessageId), stream-end release on startup errors, and per-origin diff/undo receipt routing. Webview: - Add native plan state, compaction status, turn activity, session edit ledger, workspace diff dialog, patch/file-change cards, command presentation, desktop attachment envelope handling, and Codex command dispatch (/compact, /diff, /approvals, execute plan). - Align skill filtering with the native `enabled` field, complete the codexQuota locale block for all 10 languages, and keep cached normalization for high-volume message rendering. BREAKING CHANGE (internal): Codex approvals switch from boolean file IPC to structured bidirectional events carrying runtime/thread/turn/ item/RPC identity. Other providers keep their existing protocols. Approval requests now follow Codex native policy instead of treating every started tool as pending. Verified: Node 1142 tests (1139 passed / 3 platform skips), Java 1655 tests across 204 suites plus Checkstyle/JaCoCo, webview 2178 vitest tests and tsc, four-viewport Playwright suites, openspec strict validation (71 requirements / 392 scenarios), JDK21 buildPlugin.