@agentproto/adapter-codex 2.0.7 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export { AgentCliHandle, AgentCliRuntime } from '@agentproto/driver-agent-cli';
|
|
|
7
7
|
*
|
|
8
8
|
* The wrapper bundles its own Codex runtime (Rust binary delivered via
|
|
9
9
|
* npm dependency) so a single
|
|
10
|
-
* `npx -y @agentclientprotocol/codex-acp@1.
|
|
10
|
+
* `npx -y @agentclientprotocol/codex-acp@1.10.0`
|
|
11
11
|
* invocation is enough — no separate @openai/codex install needed.
|
|
12
12
|
*
|
|
13
13
|
* import { codex, codexRuntime } from "@agentproto/adapter-codex"
|
package/dist/index.mjs
CHANGED
|
@@ -14,18 +14,20 @@ var codex = defineAgentCli({
|
|
|
14
14
|
// Keep spawn deterministic. An unversioned npx target performs registry
|
|
15
15
|
// resolution at session startup and can silently replace both the bridge
|
|
16
16
|
// and its bundled Codex runtime exactly when either publishes an update.
|
|
17
|
-
bin_args: ["-y", "@agentclientprotocol/codex-acp@1.
|
|
17
|
+
bin_args: ["-y", "@agentclientprotocol/codex-acp@1.10.0"],
|
|
18
18
|
install: [
|
|
19
19
|
{
|
|
20
20
|
method: "npm",
|
|
21
|
-
package: "@agentclientprotocol/codex-acp@1.
|
|
21
|
+
package: "@agentclientprotocol/codex-acp@1.10.0",
|
|
22
22
|
global: true
|
|
23
23
|
}
|
|
24
24
|
],
|
|
25
25
|
version_check: {
|
|
26
|
-
|
|
26
|
+
// PRESENCE probe — local (global npm tree), not a registry query. See
|
|
27
|
+
// claude-code's version_check note for the npm-view trap this replaces.
|
|
28
|
+
cmd: "npm ls -g @agentclientprotocol/codex-acp --depth=0",
|
|
27
29
|
parse: "(\\d+\\.\\d+\\.\\d+)",
|
|
28
|
-
range: "=1.
|
|
30
|
+
range: "=1.10.0",
|
|
29
31
|
timeout_ms: 15e3
|
|
30
32
|
},
|
|
31
33
|
auth: {
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;AA0BO,IAAM,QAAwB,cAAA,CAAe;AAAA,EAClD,IAAA,EAAM,OAAA;AAAA,EACN,EAAA,EAAI,OAAA;AAAA,EACJ,WAAA,EACE,oQAAA;AAAA,EACF,OAAA,EAAS,OAAA;AAAA,EACT,GAAA,EAAK,KAAA;AAAA;AAAA;AAAA;AAAA,EAIL,QAAA,EAAU,CAAC,IAAA,EAAM,uCAAuC,CAAA;AAAA,EACxD,OAAA,EAAS;AAAA,IACP;AAAA,MACE,MAAA,EAAQ,KAAA;AAAA,MACR,OAAA,EAAS,uCAAA;AAAA,MACT,MAAA,EAAQ;AAAA;AACV,GACF;AAAA,EACA,aAAA,EAAe;AAAA,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;AA0BO,IAAM,QAAwB,cAAA,CAAe;AAAA,EAClD,IAAA,EAAM,OAAA;AAAA,EACN,EAAA,EAAI,OAAA;AAAA,EACJ,WAAA,EACE,oQAAA;AAAA,EACF,OAAA,EAAS,OAAA;AAAA,EACT,GAAA,EAAK,KAAA;AAAA;AAAA;AAAA;AAAA,EAIL,QAAA,EAAU,CAAC,IAAA,EAAM,uCAAuC,CAAA;AAAA,EACxD,OAAA,EAAS;AAAA,IACP;AAAA,MACE,MAAA,EAAQ,KAAA;AAAA,MACR,OAAA,EAAS,uCAAA;AAAA,MACT,MAAA,EAAQ;AAAA;AACV,GACF;AAAA,EACA,aAAA,EAAe;AAAA;AAAA;AAAA,IAGb,GAAA,EAAK,oDAAA;AAAA,IACL,KAAA,EAAO,sBAAA;AAAA,IACP,KAAA,EAAO,SAAA;AAAA,IACP,UAAA,EAAY;AAAA,GACd;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;AAAA,MACA,kBAAA;AAAA,MACA,SAAA;AAAA,MACA,cAAA;AAAA,MACA,uBAAA;AAAA,MACA,IAAA;AAAA,MACA,SAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,GAAA,EAAK,EAAE,MAAA,EAAQ,gBAAA,EAAkB,OAAO,eAAA,EAAgB;AAAA;AAAA;AAAA,IAGxD,KAAA,EAAO;AAAA,GACT;AAAA,EACA,YAAA,EAAc;AAAA,IACZ,SAAA,EAAW,IAAA;AAAA,IACX,UAAA,EAAY,IAAA;AAAA,IACZ,UAAA,EAAY,KAAA;AAAA,IACZ,OAAA,EAAS,IAAA;AAAA;AAAA;AAAA,IAGT,UAAA,EAAY,IAAA;AAAA;AAAA;AAAA;AAAA,IAIZ,SAAA,EAAW,IAAA;AAAA,IACX,aAAA,EAAe;AAAA,GACjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,OAAA,EAAS;AAAA,IACP;AAAA,MACE,EAAA,EAAI,OAAA;AAAA,MACJ,IAAA,EAAM,QAAA;AAAA,MACN,WAAA,EACE;AAAA;AACJ,GACF;AAAA,EACA,YAAA,EAAc;AAAA,IACZ,OAAA,EAAS,eAAA;AAAA,IACT,SAAA,EAAW,CAAC,eAAA,EAAiB,gBAAA,EAAkB,cAAc,MAAM,CAAA;AAAA,IACnE,cAAA,EAAgB;AAAA,MACd,eAAA,EAAiB,IAAA;AAAA,MACjB,SAAA,EAAW,CAAC,cAAA,EAAgB,UAAU;AAAA;AACxC,GACF;AAAA,EACA,MAAM,CAAC,OAAA,EAAS,QAAA,EAAU,KAAA,EAAO,iBAAiB,QAAQ;AAC5D,CAAC;AAEM,SAAS,YAAA,GAAgC;AAC9C,EAAA,OAAO,sBAAsB,KAAK,CAAA;AACpC","file":"index.mjs","sourcesContent":["/**\n * @agentproto/adapter-codex — AIP-45 adapter for OpenAI Codex via the\n * maintained ACP wrapper @agentclientprotocol/codex-acp.\n *\n * The wrapper bundles its own Codex runtime (Rust binary delivered via\n * npm dependency) so a single\n * `npx -y @agentclientprotocol/codex-acp@1.10.0`\n * invocation is enough — no separate @openai/codex install needed.\n *\n * import { codex, codexRuntime } from \"@agentproto/adapter-codex\"\n * const session = await codexRuntime().start({\n * env: { OPENAI_API_KEY: \"sk-...\" },\n * })\n * for await (const evt of session.send({ role: \"user\", content: \"...\" })) {\n * console.log(evt)\n * }\n * await session.close()\n */\n\nimport {\n createAgentCliRuntime,\n defineAgentCli,\n type AgentCliHandle,\n type AgentCliRuntime,\n} from \"@agentproto/driver-agent-cli\"\n\nexport const codex: AgentCliHandle = defineAgentCli({\n name: \"codex\",\n id: \"codex\",\n description:\n \"OpenAI's Codex coding agent wrapped as an ACP server by @agentclientprotocol/codex-acp. Spawned via a version-pinned npx package and driven over stdio JSON-RPC. The wrapper bundles a compatible Codex runtime — no separate @openai/codex install required.\",\n version: \"0.1.0\",\n bin: \"npx\",\n // Keep spawn deterministic. An unversioned npx target performs registry\n // resolution at session startup and can silently replace both the bridge\n // and its bundled Codex runtime exactly when either publishes an update.\n bin_args: [\"-y\", \"@agentclientprotocol/codex-acp@1.10.0\"],\n install: [\n {\n method: \"npm\",\n package: \"@agentclientprotocol/codex-acp@1.10.0\",\n global: true,\n },\n ],\n version_check: {\n // PRESENCE probe — local (global npm tree), not a registry query. See\n // claude-code's version_check note for the npm-view trap this replaces.\n cmd: \"npm ls -g @agentclientprotocol/codex-acp --depth=0\",\n parse: \"(\\\\d+\\\\.\\\\d+\\\\.\\\\d+)\",\n range: \"=1.10.0\",\n timeout_ms: 15_000,\n },\n auth: {\n ref: \"./SECRETS.md\",\n state: { env: [\"OPENAI_API_KEY\", \"CODEX_API_KEY\"] },\n },\n // Billing-auth (opt-in — no authEnforce, so unconfigured spawns stay\n // ambient). Single-provider adapter: api-key mode SETS providerEnvVar\n // (\"openai\") = OPENAI_API_KEY, derived from the catalog.\n provider: \"openai\",\n // \"Use my existing Codex login\" — a FILE-BASED (external) subscription. The\n // Codex CLI's ChatGPT/subscription login lives in `~/.codex/auth.json`\n // (`tokens.access_token`), which the bundled codex runtime reads ITSELF; it\n // has no env-bearer channel like claude-code's CLAUDE_CODE_OAUTH_TOKEN. So\n // `external: true`: subscription mode injects NOTHING (no setEnv) — the host\n // verifies the login is present (fail-loud, via the `codex` provision recipe)\n // and the driver only SCRUBS the api-key vars so a leftover OPENAI_API_KEY /\n // CODEX_API_KEY can't silently flip the spawn to per-token API billing under\n // a \"subscription\" label. OPENAI_API_KEY is scrubbed automatically (it's the\n // provider's api-key var); CODEX_API_KEY is the sibling the codex runtime\n // also honors, so it's listed as a conflictEnv. Money-safe by construction:\n // no OAuth bearer is ever written into an api-key env var, because no bearer\n // is injected at all. An unconfigured codex spawn stays ambient — codex uses\n // its own auth.json precedence (a ChatGPT login already outranks an ambient\n // OPENAI_API_KEY), so this only ADDS an explicit, verified, billing-guaranteed\n // opt-in on top of that.\n authSubscription: {\n external: true,\n conflictEnv: [\"CODEX_API_KEY\"],\n },\n sandbox: \"./SANDBOX.md\",\n protocol: \"acp\",\n acp: \"./codex-acp.ACP.md\",\n session: {\n mode: \"persistent\",\n idle_timeout_ms: 1_800_000,\n context_carryover: true,\n },\n models: {\n // Do not declare a fixed default: a ChatGPT subscription exposes valid\n // models dynamically, and forcing a historic ID can make a session fail.\n // Keep this curated menu for catalog consumers and compatibility with the\n // existing CLI discovery contract. It is not a default or an allow-list:\n // explicit model IDs are still validated dynamically by Codex.\n allowed: [\n // Codex-specialized (coding) models.\n \"gpt-5-codex\",\n \"gpt-5.1-codex\",\n \"gpt-5.1-codex-mini\",\n \"gpt-5.1-codex-max\",\n \"gpt-5.2-codex\",\n // GPT-5 generalist family.\n \"gpt-5\",\n \"gpt-5-mini\",\n \"gpt-5-nano\",\n \"gpt-5-pro\",\n \"gpt-5.1\",\n \"gpt-5.2\",\n \"gpt-5.4\",\n \"gpt-5.4-mini\",\n \"gpt-5.4-nano\",\n \"gpt-5.4-pro\",\n \"gpt-5.5\",\n \"gpt-5.5-pro\",\n // GPT-5.6 family.\n \"gpt-5.6-luna\",\n \"gpt-5.6-luna-pro\",\n \"gpt-5.6-sol\",\n \"gpt-5.6-sol-pro\",\n \"gpt-5.6-terra\",\n \"gpt-5.6-terra-pro\",\n // GPT-4.1 / 4o generation.\n \"gpt-4.1\",\n \"gpt-4.1-mini\",\n \"gpt-4.1-nano\",\n \"gpt-4o\",\n \"gpt-4o-mini\",\n // o-series reasoning models.\n \"o3\",\n \"o3-pro\",\n \"o3-mini\",\n \"o3-deep-research\",\n \"o4-mini\",\n \"o4-mini-high\",\n \"o4-mini-deep-research\",\n \"o1\",\n \"o1-mini\",\n \"o1-pro\",\n ],\n env: { openai: \"OPENAI_API_KEY\", codex: \"CODEX_API_KEY\" },\n // The maintained ACP bridge exposes `session/set_config_option`, so the\n // model is selected after session creation rather than through argv.\n apply: \"config\",\n },\n capabilities: {\n streaming: true,\n tool_calls: true,\n sub_agents: false,\n file_io: true,\n // The maintained wrapper forwards ACP image content blocks to Codex which\n // runs them through the underlying GPT-5 vision pipeline.\n multimodal: true,\n // codex-acp implements full ACP session lifecycle (newSession /\n // loadSession / resumeSession). Pair with the `native-resume`\n // continuation strategy for cold-start reattach.\n resumable: true,\n bidirectional: true,\n },\n // No manifest `modes[]`: codex's operation profiles (default / read-only /\n // full-access) are POSTURE, which no longer lives in the manifest (SPEC\n // §3.4a) — it is sourced from the harness's own ACP mode registry\n // (`SessionModeState.availableModes`) plus the daemon's canonical-posture\n // layer. codex has no context (`kind:\"context\"`) mode to declare, and route\n // comes from the model catalog, so the array would be empty — omit it.\n options: [\n {\n id: \"model\",\n type: \"string\",\n description:\n \"Optional Codex model ID. Omit it to use the model selected by the current ChatGPT or API-key account; the ACP bridge validates explicit IDs against that account.\",\n },\n ],\n continuation: {\n default: \"native-resume\",\n supported: [\"native-resume\", \"pinned-session\", \"transcript\", \"none\"],\n pinned_session: {\n idle_timeout_ms: 1_800_000,\n key_scope: [\"conversation\", \"operator\"],\n },\n },\n tags: [\"codex\", \"openai\", \"acp\", \"agent-runtime\", \"coding\"],\n})\n\nexport function codexRuntime(): AgentCliRuntime {\n return createAgentCliRuntime(codex)\n}\n\nexport type { AgentCliHandle, AgentCliRuntime }\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentproto/adapter-codex",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"description": "@agentproto/adapter-codex — AIP-45 AGENT-CLI adapter for OpenAI's Codex CLI via @agentclientprotocol/codex-acp. Spawns the ACP wrapper over stdio JSON-RPC.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentproto",
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@agentproto/driver-agent-cli": "2.4.
|
|
44
|
+
"@agentproto/driver-agent-cli": "2.4.2"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@types/node": "^25.
|
|
47
|
+
"@types/node": "^25.9.5",
|
|
48
48
|
"tsup": "^8.5.1",
|
|
49
49
|
"typescript": "^5.9.3",
|
|
50
|
-
"vitest": "^3.2.
|
|
50
|
+
"vitest": "^3.2.7",
|
|
51
51
|
"@agentproto/tooling": "0.1.0"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|