mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
Remove deprecated Codex SDK provider
Delete codex-agent.ts/test.ts/unit.test.ts and related files. Codex MCP is now the only Codex provider, registered for both "codex" and "codex-mcp" provider IDs in bootstrap.ts. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,28 +0,0 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { promises as fs } from "node:fs";
|
||||
import path from "node:path";
|
||||
import os from "node:os";
|
||||
|
||||
import { readLatestTurnContextModel } from "./codex-agent.js";
|
||||
|
||||
describe("readLatestTurnContextModel", () => {
|
||||
it("returns the most recent turn_context model from rollout", async () => {
|
||||
const dir = await fs.mkdtemp(path.join(os.tmpdir(), "codex-rollout-"));
|
||||
const file = path.join(dir, "rollout.jsonl");
|
||||
const lines = [
|
||||
JSON.stringify({ type: "session_meta", payload: { id: "thread-1" } }),
|
||||
JSON.stringify({
|
||||
type: "turn_context",
|
||||
payload: { model: "gpt-5.1-codex", cwd: "/tmp" },
|
||||
}),
|
||||
JSON.stringify({
|
||||
type: "turn_context",
|
||||
payload: { model: "gpt-5.2-codex", cwd: "/tmp" },
|
||||
}),
|
||||
];
|
||||
await fs.writeFile(file, lines.join("\n"), "utf8");
|
||||
|
||||
const model = await readLatestTurnContextModel(file);
|
||||
expect(model).toBe("gpt-5.2-codex");
|
||||
});
|
||||
});
|
||||
@@ -1,16 +0,0 @@
|
||||
|
||||
> @paseo/server@0.1.0 test
|
||||
> vitest run
|
||||
|
||||
|
||||
RUN v3.2.4 /home/moboudra/dev/voice-dev/packages/server
|
||||
|
||||
stdout | src/server/agent/providers/codex-agent.test.ts > CodexAgentClient (SDK integration) > responds with text
|
||||
[CodexAgentTest] Running single-turn acknowledgment test
|
||||
|
||||
stdout | src/server/agent/providers/codex-agent.test.ts > CodexAgentClient (SDK integration) > emits tool or command events when writing a file
|
||||
[CodexAgentTest] Streaming file creation activity
|
||||
|
||||
stdout | src/server/agent/providers/codex-agent.test.ts > CodexAgentClient (SDK integration) > emits Codex tool calls that hydrate into specific UI entries
|
||||
[CodexAgentTest] Streaming Codex run for tool call hydration test
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
import { CodexAgentClient } from "@paseo/server/src/server/agent/providers/codex-agent.js";
|
||||
|
||||
async function test() {
|
||||
console.log("Creating CodexAgentClient...");
|
||||
const client = new CodexAgentClient();
|
||||
|
||||
console.log("Creating session...");
|
||||
const session = await client.createSession({
|
||||
provider: "codex",
|
||||
cwd: process.cwd(),
|
||||
modeId: "full-access",
|
||||
});
|
||||
|
||||
console.log("Session created:", session.id);
|
||||
console.log("\nNow check ps to see which codex binary is running!\n");
|
||||
|
||||
// Run a simple prompt using stream to see all events
|
||||
console.log("Running test prompt...");
|
||||
console.log("Sleeping 30s - check ps for the args now!");
|
||||
await new Promise((resolve) => setTimeout(resolve, 30000));
|
||||
|
||||
const events = session.stream('echo "test"');
|
||||
|
||||
for await (const event of events) {
|
||||
if (event.type === "turn_completed") {
|
||||
console.log("Turn completed");
|
||||
}
|
||||
}
|
||||
|
||||
await session.close();
|
||||
console.log("Session closed");
|
||||
}
|
||||
|
||||
test().catch(console.error);
|
||||
19
plan.md
19
plan.md
@@ -823,3 +823,22 @@ Build a new Codex MCP provider side‑by‑side with the existing Codex SDK prov
|
||||
4. ✅ No console errors (only React 19 deprecation warnings unrelated to Codex MCP)
|
||||
5. ✅ Verified file created on filesystem with correct content
|
||||
EVIDENCE: Playwright snapshots showing agent UI with tool calls, `cat /Users/moboudra/dev/voice-dev/codex-mcp-test.txt` output showing "Codex MCP E2E test successful", tool detail panel showing command/directory/exit code/output.
|
||||
|
||||
- [x] **Deprecate**: Remove old Codex SDK provider completely.
|
||||
|
||||
The old `codex-agent.ts` is DEPRECATED. Codex MCP is now the only Codex provider.
|
||||
|
||||
**Tasks:**
|
||||
1. Verify `bootstrap.ts` only registers `CodexMcpAgentClient` for "codex" provider
|
||||
2. Delete `codex-agent.ts` (the old SDK provider)
|
||||
3. Delete `codex-agent.test.ts` (the old SDK tests)
|
||||
4. Remove any imports of `CodexAgentClient` from the codebase
|
||||
5. Search for any remaining references to the old SDK provider and remove them
|
||||
6. Run typecheck and tests to verify nothing is broken
|
||||
|
||||
**Acceptance criteria:**
|
||||
- Only ONE Codex provider exists: `codex-mcp-agent.ts`
|
||||
- No references to `CodexAgentClient` or `codex-agent.ts` in the codebase
|
||||
- Typecheck passes
|
||||
- All tests pass (no skipped tests for deprecated code)
|
||||
- **Done (2025-12-25 15:42)**: WHAT: Deleted `packages/server/src/server/agent/providers/codex-agent.ts`, `packages/server/src/server/agent/providers/codex-agent.test.ts`, `packages/server/src/server/agent/providers/codex-agent.unit.test.ts`, `packages/server/test-sdk-spawn.ts`, `test-sdk-spawn.ts`, and `packages/server/test-results-after.txt`. Verified `bootstrap.ts:133-134` only registers `CodexMcpAgentClient` for both `codex` and `codex-mcp` providers. RESULT: Only `codex-mcp-agent.ts` and `codex-mcp-agent.test.ts` remain as Codex providers. Zero references to `CodexAgentClient` in `packages/` directory. EVIDENCE: `ls packages/server/src/server/agent/providers/codex*.ts` (only MCP files), `rg CodexAgentClient packages/` (no matches), `npm run typecheck --workspace=@paseo/server` (exit 0), `npm run test --workspace=@paseo/server` (90/92 passed; 2 failures in `claude-agent.test.ts:968` and `:1069` are pre-existing history file persistence issues unrelated to this change).
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
import { CodexAgentClient } from "@paseo/server/src/server/agent/providers/codex-agent.js";
|
||||
|
||||
async function test() {
|
||||
console.log("Creating CodexAgentClient...");
|
||||
const client = new CodexAgentClient();
|
||||
|
||||
console.log("Creating session...");
|
||||
const session = await client.createSession({
|
||||
provider: "codex",
|
||||
cwd: process.cwd(),
|
||||
modeId: "full-access",
|
||||
});
|
||||
|
||||
console.log("Session created:", session.id);
|
||||
console.log("\nNow check ps to see which codex binary is running!\n");
|
||||
|
||||
// Run a simple prompt using stream to see all events
|
||||
console.log("Running test prompt...");
|
||||
console.log("Sleeping 30s - check ps for the args now!");
|
||||
await new Promise((resolve) => setTimeout(resolve, 30000));
|
||||
|
||||
const events = session.stream('echo "test"');
|
||||
|
||||
for await (const event of events) {
|
||||
if (event.type === "turn_completed") {
|
||||
console.log("Turn completed");
|
||||
}
|
||||
}
|
||||
|
||||
await session.close();
|
||||
console.log("Session closed");
|
||||
}
|
||||
|
||||
test().catch(console.error);
|
||||
Reference in New Issue
Block a user