@usetemi/codex-sdk
v0.133.0
Published
Temi convenience SDK and low-level transport helpers for Codex.
Readme
@usetemi/codex-sdk
TypeScript wrapper around upstream @openai/codex-sdk, plus low-level transport helpers for the Codex app-server JSON-RPC protocol.
Install
npm install @usetemi/[email protected]Package versions track the stable Codex version they target. Version 0.133.0 targets Codex 0.133.0.
Usage
import { AppServerClient } from "@usetemi/codex-sdk";
const client = AppServerClient.start();
try {
const result = await client.request("initialize", {
clientInfo: {
name: "my-client",
title: "My Client",
version: "0.1.0",
},
capabilities: {},
});
console.log(result);
} finally {
await client.close();
}Ephemeral Codex Threads
The Codex export is compatible with upstream @openai/codex-sdk and adds thread-level ephemeral sessions. Use ephemeral for repeated one-shot workloads where persisted session files are not useful.
import { Codex } from "@usetemi/codex-sdk";
const codex = new Codex();
const thread = codex.startThread({
ephemeral: true,
skipGitRepoCheck: true,
});
const turn = await thread.run("Summarize this checkout");
console.log(turn.finalResponse);Ephemeral runs pass --ephemeral to codex exec and do not persist session files. Callers should not depend on resuming those sessions later.
Transport exports are maintained in this package and covered by the shared conformance fixtures in this repository.
