Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ Ask AI providers are detected independently from installed/authenticated local C

Per-origin choices are persisted in cookies, so a user can override the automatic match for one agent without changing the default for another.

> **Codex transport note:** the `codex-sdk` provider id is a stable identifier only — it no longer uses `@openai/codex-sdk` / `codex exec`. It drives a long-lived `codex app-server` process over JSON-RPC (`packages/ai/providers/codex-app-server.ts`), which respects the user's/enterprise-managed approval policy and supports interactive Allow/Deny approvals. The id stays `codex-sdk` to preserve saved cookie preferences, the `agents.ts` mapping, and the UI reasoning-effort gate.

## Annotate Flow

```
Expand Down
19 changes: 10 additions & 9 deletions apps/pi-extension/server/ai-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,18 @@ export async function createPiAIRuntime(options: CreatePiAIRuntimeOptions = {}):
}

try {
await import("../generated/ai/providers/codex-sdk.js");
await import("@openai/codex-sdk");
await import("../generated/ai/providers/codex-app-server.js");
const codexPath = whichCmd("codex");
const provider = await ai.createProvider({
type: "codex-sdk",
cwd,
...(codexPath && { codexExecutablePath: codexPath }),
});
registry.register(provider);
if (codexPath) {
const provider = await ai.createProvider({
type: "codex-sdk",
cwd,
...(codexPath ? { codexExecutablePath: codexPath } : {}),
});
registry.register(provider);
}
} catch {
// Codex SDK not available.
// Codex not available.
}

try {
Expand Down
2 changes: 1 addition & 1 deletion apps/pi-extension/vendor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ for f in index types provider session-manager endpoints context base-session; do
printf '// @generated — DO NOT EDIT. Source: packages/ai/%s.ts\n' "$f" | cat - "$src" > "generated/ai/$f.ts"
done

for f in claude-agent-sdk codex-sdk opencode-sdk command-path pi-sdk pi-sdk-node pi-events; do
for f in claude-agent-sdk codex-app-server opencode-sdk command-path pi-sdk pi-sdk-node pi-events; do
src="../../packages/ai/providers/$f.ts"
printf '// @generated — DO NOT EDIT. Source: packages/ai/providers/%s.ts\n' "$f" | cat - "$src" > "generated/ai/providers/$f.ts"
done
17 changes: 0 additions & 17 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
},
"dependencies": {
"@anthropic-ai/claude-agent-sdk": "^0.2.92",
"@openai/codex-sdk": "^0.118.0",
"@opencode-ai/sdk": "^1.3.0",
"@pierre/diffs": "1.2.8",
"diff": "^8.0.4",
Expand Down
Loading