Phase 4: TypeScript/Node.js Components

Updated all TypeScript and JavaScript source files:

- Renamed sdk/typescript/src/codex.ts → llmx.ts
- Renamed sdk/typescript/src/codexOptions.ts → llmxOptions.ts
- Updated class names: Codex → LLMX, CodexExec → LLMXExec, CodexOptions → LLMXOptions
- Updated property names: codexPathOverride → llmxPathOverride
- Updated package imports: @openai/codex-sdk → @llmx/llmx-sdk
- Updated all references in sample files and tests
- Renamed responses-api-proxy binary: codex-responses-api-proxy.js → llmx-responses-api-proxy.js
- Updated comments referencing Codex → LLMX
- Updated session path references: ~/.codex → ~/.llmx

Files changed: 16 TypeScript/JavaScript files across SDK, samples, and tests.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Sebastian Krüger
2025-11-11 14:43:58 +01:00
parent a6c537ac50
commit 0c2c36e14e
16 changed files with 81 additions and 81 deletions

View File

@@ -5,7 +5,7 @@ import path from "node:path";
import { codexExecSpy } from "./codexExecSpy";
import { describe, expect, it } from "@jest/globals";
import { Codex } from "../src/codex";
import { LLMX } from "../src/llmx";
import {
assistantMessage,
@@ -16,9 +16,9 @@ import {
startResponsesTestProxy,
} from "./responsesProxy";
const codexExecPath = path.join(process.cwd(), "..", "..", "codex-rs", "target", "debug", "codex");
const codexExecPath = path.join(process.cwd(), "..", "..", "llmx-rs", "target", "debug", "llmx");
describe("Codex", () => {
describe("LLMX", () => {
it("returns thread events", async () => {
const { url, close } = await startResponsesTestProxy({
statusCode: 200,
@@ -26,7 +26,7 @@ describe("Codex", () => {
});
try {
const client = new Codex({ codexPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const client = new LLMX({ llmxPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const thread = client.startThread();
const result = await thread.run("Hello, world!");
@@ -68,7 +68,7 @@ describe("Codex", () => {
});
try {
const client = new Codex({ codexPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const client = new LLMX({ llmxPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const thread = client.startThread();
await thread.run("first input");
@@ -111,7 +111,7 @@ describe("Codex", () => {
});
try {
const client = new Codex({ codexPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const client = new LLMX({ llmxPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const thread = client.startThread();
await thread.run("first input");
@@ -155,7 +155,7 @@ describe("Codex", () => {
});
try {
const client = new Codex({ codexPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const client = new LLMX({ llmxPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const originalThread = client.startThread();
await originalThread.run("first input");
@@ -199,7 +199,7 @@ describe("Codex", () => {
const { args: spawnArgs, restore } = codexExecSpy();
try {
const client = new Codex({ codexPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const client = new LLMX({ llmxPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const thread = client.startThread({
model: "gpt-test-1",
@@ -238,7 +238,7 @@ describe("Codex", () => {
const { args: spawnArgs, restore } = codexExecSpy();
try {
const client = new Codex({ codexPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const client = new LLMX({ llmxPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const thread = client.startThread({
modelReasoningEffort: "high",
@@ -269,7 +269,7 @@ describe("Codex", () => {
const { args: spawnArgs, restore } = codexExecSpy();
try {
const client = new Codex({ codexPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const client = new LLMX({ llmxPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const thread = client.startThread({
networkAccessEnabled: true,
@@ -300,7 +300,7 @@ describe("Codex", () => {
const { args: spawnArgs, restore } = codexExecSpy();
try {
const client = new Codex({ codexPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const client = new LLMX({ llmxPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const thread = client.startThread({
webSearchEnabled: true,
@@ -331,7 +331,7 @@ describe("Codex", () => {
const { args: spawnArgs, restore } = codexExecSpy();
try {
const client = new Codex({ codexPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const client = new LLMX({ llmxPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const thread = client.startThread({
approvalPolicy: "on-request",
@@ -371,7 +371,7 @@ describe("Codex", () => {
} as const;
try {
const client = new Codex({ codexPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const client = new LLMX({ llmxPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const thread = client.startThread();
await thread.run("structured", { outputSchema: schema });
@@ -416,7 +416,7 @@ describe("Codex", () => {
});
try {
const client = new Codex({ codexPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const client = new LLMX({ llmxPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const thread = client.startThread();
await thread.run([
@@ -445,7 +445,7 @@ describe("Codex", () => {
});
const { args: spawnArgs, restore } = codexExecSpy();
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "codex-images-"));
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "llmx-images-"));
const imagesDirectoryEntries: [string, string] = [
path.join(tempDir, "first.png"),
path.join(tempDir, "second.jpg"),
@@ -455,7 +455,7 @@ describe("Codex", () => {
});
try {
const client = new Codex({ codexPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const client = new LLMX({ llmxPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const thread = client.startThread();
await thread.run([
@@ -494,9 +494,9 @@ describe("Codex", () => {
const { args: spawnArgs, restore } = codexExecSpy();
try {
const workingDirectory = fs.mkdtempSync(path.join(os.tmpdir(), "codex-working-dir-"));
const client = new Codex({
codexPathOverride: codexExecPath,
const workingDirectory = fs.mkdtempSync(path.join(os.tmpdir(), "llmx-working-dir-"));
const client = new LLMX({
llmxPathOverride: codexExecPath,
baseUrl: url,
apiKey: "test",
});
@@ -528,9 +528,9 @@ describe("Codex", () => {
});
try {
const workingDirectory = fs.mkdtempSync(path.join(os.tmpdir(), "codex-working-dir-"));
const client = new Codex({
codexPathOverride: codexExecPath,
const workingDirectory = fs.mkdtempSync(path.join(os.tmpdir(), "llmx-working-dir-"));
const client = new LLMX({
llmxPathOverride: codexExecPath,
baseUrl: url,
apiKey: "test",
});
@@ -546,14 +546,14 @@ describe("Codex", () => {
}
});
it("sets the codex sdk originator header", async () => {
it("sets the llmx sdk originator header", async () => {
const { url, close, requests } = await startResponsesTestProxy({
statusCode: 200,
responseBodies: [sse(responseStarted(), assistantMessage("Hi!"), responseCompleted())],
});
try {
const client = new Codex({ codexPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const client = new LLMX({ llmxPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const thread = client.startThread();
await thread.run("Hello, originator!");
@@ -579,7 +579,7 @@ describe("Codex", () => {
});
try {
const client = new Codex({ codexPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const client = new LLMX({ llmxPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const thread = client.startThread();
await expect(thread.run("fail")).rejects.toThrow("stream disconnected before completion:");
} finally {

View File

@@ -2,7 +2,7 @@ import path from "node:path";
import { describe, expect, it } from "@jest/globals";
import { Codex } from "../src/codex";
import { LLMX } from "../src/llmx";
import { ThreadEvent } from "../src/index";
import {
@@ -13,9 +13,9 @@ import {
startResponsesTestProxy,
} from "./responsesProxy";
const codexExecPath = path.join(process.cwd(), "..", "..", "codex-rs", "target", "debug", "codex");
const codexExecPath = path.join(process.cwd(), "..", "..", "llmx-rs", "target", "debug", "llmx");
describe("Codex", () => {
describe("LLMX", () => {
it("returns thread events", async () => {
const { url, close } = await startResponsesTestProxy({
statusCode: 200,
@@ -23,7 +23,7 @@ describe("Codex", () => {
});
try {
const client = new Codex({ codexPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const client = new LLMX({ llmxPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const thread = client.startThread();
const result = await thread.runStreamed("Hello, world!");
@@ -82,7 +82,7 @@ describe("Codex", () => {
});
try {
const client = new Codex({ codexPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const client = new LLMX({ llmxPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const thread = client.startThread();
const first = await thread.runStreamed("first input");
@@ -128,7 +128,7 @@ describe("Codex", () => {
});
try {
const client = new Codex({ codexPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const client = new LLMX({ llmxPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const originalThread = client.startThread();
const first = await originalThread.runStreamed("first input");
@@ -180,7 +180,7 @@ describe("Codex", () => {
} as const;
try {
const client = new Codex({ codexPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const client = new LLMX({ llmxPathOverride: codexExecPath, baseUrl: url, apiKey: "test" });
const thread = client.startThread();
const streamed = await thread.runStreamed("structured", { outputSchema: schema });