@agentproto/adapter-codex 2.0.1 → 2.0.3
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/CODEX.md +7 -7
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +44 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/CODEX.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: codex
|
|
3
3
|
id: codex
|
|
4
|
-
description: OpenAI's Codex coding agent wrapped as an ACP server by @agentclientprotocol/codex-acp. Spawned via
|
|
4
|
+
description: 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.
|
|
5
5
|
version: 0.1.0
|
|
6
6
|
bin: npx
|
|
7
|
-
bin_args: ["-y", "@agentclientprotocol/codex-acp"]
|
|
7
|
+
bin_args: ["-y", "@agentclientprotocol/codex-acp@1.1.14"]
|
|
8
8
|
install:
|
|
9
9
|
- method: npm
|
|
10
|
-
package: "@agentclientprotocol/codex-acp"
|
|
10
|
+
package: "@agentclientprotocol/codex-acp@1.1.14"
|
|
11
11
|
global: true
|
|
12
12
|
version_check:
|
|
13
|
-
cmd: npm view @agentclientprotocol/codex-acp version
|
|
13
|
+
cmd: npm view @agentclientprotocol/codex-acp@1.1.14 version
|
|
14
14
|
parse: "(\\d+\\.\\d+\\.\\d+)"
|
|
15
|
-
range: "
|
|
15
|
+
range: "=1.1.14"
|
|
16
16
|
timeout_ms: 15000
|
|
17
17
|
auth:
|
|
18
18
|
ref: ./SECRETS.md
|
|
@@ -64,10 +64,10 @@ full-access session modes.
|
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
66
|
# npm (global) — recommended for fast spawn
|
|
67
|
-
npm install -g @agentclientprotocol/codex-acp
|
|
67
|
+
npm install -g @agentclientprotocol/codex-acp@1.1.14
|
|
68
68
|
|
|
69
69
|
# or rely on the npx form (no manual install)
|
|
70
|
-
npx -y @agentclientprotocol/codex-acp
|
|
70
|
+
npx -y @agentclientprotocol/codex-acp@1.1.14
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
The wrapper ships platform-specific native binaries via npm optional
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,8 @@ export { AgentCliHandle, AgentCliRuntime } from '@agentproto/driver-agent-cli';
|
|
|
6
6
|
* maintained ACP wrapper @agentclientprotocol/codex-acp.
|
|
7
7
|
*
|
|
8
8
|
* The wrapper bundles its own Codex runtime (Rust binary delivered via
|
|
9
|
-
* npm dependency) so a single
|
|
9
|
+
* npm dependency) so a single
|
|
10
|
+
* `npx -y @agentclientprotocol/codex-acp@1.1.14`
|
|
10
11
|
* invocation is enough — no separate @openai/codex install needed.
|
|
11
12
|
*
|
|
12
13
|
* import { codex, codexRuntime } from "@agentproto/adapter-codex"
|
package/dist/index.mjs
CHANGED
|
@@ -8,21 +8,24 @@ import { defineAgentCli, createAgentCliRuntime } from '@agentproto/driver-agent-
|
|
|
8
8
|
var codex = defineAgentCli({
|
|
9
9
|
name: "codex",
|
|
10
10
|
id: "codex",
|
|
11
|
-
description: "OpenAI's Codex coding agent wrapped as an ACP server by @agentclientprotocol/codex-acp. Spawned via
|
|
11
|
+
description: "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 \u2014 no separate @openai/codex install required.",
|
|
12
12
|
version: "0.1.0",
|
|
13
13
|
bin: "npx",
|
|
14
|
-
|
|
14
|
+
// Keep spawn deterministic. An unversioned npx target performs registry
|
|
15
|
+
// resolution at session startup and can silently replace both the bridge
|
|
16
|
+
// and its bundled Codex runtime exactly when either publishes an update.
|
|
17
|
+
bin_args: ["-y", "@agentclientprotocol/codex-acp@1.1.14"],
|
|
15
18
|
install: [
|
|
16
19
|
{
|
|
17
20
|
method: "npm",
|
|
18
|
-
package: "@agentclientprotocol/codex-acp",
|
|
21
|
+
package: "@agentclientprotocol/codex-acp@1.1.14",
|
|
19
22
|
global: true
|
|
20
23
|
}
|
|
21
24
|
],
|
|
22
25
|
version_check: {
|
|
23
|
-
cmd: "npm view @agentclientprotocol/codex-acp version",
|
|
26
|
+
cmd: "npm view @agentclientprotocol/codex-acp@1.1.14 version",
|
|
24
27
|
parse: "(\\d+\\.\\d+\\.\\d+)",
|
|
25
|
-
range: "
|
|
28
|
+
range: "=1.1.14",
|
|
26
29
|
timeout_ms: 15e3
|
|
27
30
|
},
|
|
28
31
|
auth: {
|
|
@@ -68,14 +71,49 @@ var codex = defineAgentCli({
|
|
|
68
71
|
// existing CLI discovery contract. It is not a default or an allow-list:
|
|
69
72
|
// explicit model IDs are still validated dynamically by Codex.
|
|
70
73
|
allowed: [
|
|
74
|
+
// Codex-specialized (coding) models.
|
|
71
75
|
"gpt-5-codex",
|
|
72
76
|
"gpt-5.1-codex",
|
|
73
77
|
"gpt-5.1-codex-mini",
|
|
74
78
|
"gpt-5.1-codex-max",
|
|
75
79
|
"gpt-5.2-codex",
|
|
80
|
+
// GPT-5 generalist family.
|
|
76
81
|
"gpt-5",
|
|
77
82
|
"gpt-5-mini",
|
|
78
|
-
"gpt-5-
|
|
83
|
+
"gpt-5-nano",
|
|
84
|
+
"gpt-5-pro",
|
|
85
|
+
"gpt-5.1",
|
|
86
|
+
"gpt-5.2",
|
|
87
|
+
"gpt-5.4",
|
|
88
|
+
"gpt-5.4-mini",
|
|
89
|
+
"gpt-5.4-nano",
|
|
90
|
+
"gpt-5.4-pro",
|
|
91
|
+
"gpt-5.5",
|
|
92
|
+
"gpt-5.5-pro",
|
|
93
|
+
// GPT-5.6 family.
|
|
94
|
+
"gpt-5.6-luna",
|
|
95
|
+
"gpt-5.6-luna-pro",
|
|
96
|
+
"gpt-5.6-sol",
|
|
97
|
+
"gpt-5.6-sol-pro",
|
|
98
|
+
"gpt-5.6-terra",
|
|
99
|
+
"gpt-5.6-terra-pro",
|
|
100
|
+
// GPT-4.1 / 4o generation.
|
|
101
|
+
"gpt-4.1",
|
|
102
|
+
"gpt-4.1-mini",
|
|
103
|
+
"gpt-4.1-nano",
|
|
104
|
+
"gpt-4o",
|
|
105
|
+
"gpt-4o-mini",
|
|
106
|
+
// o-series reasoning models.
|
|
107
|
+
"o3",
|
|
108
|
+
"o3-pro",
|
|
109
|
+
"o3-mini",
|
|
110
|
+
"o3-deep-research",
|
|
111
|
+
"o4-mini",
|
|
112
|
+
"o4-mini-high",
|
|
113
|
+
"o4-mini-deep-research",
|
|
114
|
+
"o1",
|
|
115
|
+
"o1-mini",
|
|
116
|
+
"o1-pro"
|
|
79
117
|
],
|
|
80
118
|
env: { openai: "OPENAI_API_KEY", codex: "CODEX_API_KEY" },
|
|
81
119
|
// The maintained ACP bridge exposes `session/set_config_option`, so the
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;
|
|
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,IACb,GAAA,EAAK,wDAAA;AAAA,IACL,KAAA,EAAO,sBAAA;AAAA,IACP,KAAA,EAAO,SAAA;AAAA,IACP,UAAA,EAAY;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,MACA,SAAA;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.1.14`\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.1.14\"],\n install: [\n {\n method: \"npm\",\n package: \"@agentclientprotocol/codex-acp@1.1.14\",\n global: true,\n },\n ],\n version_check: {\n cmd: \"npm view @agentclientprotocol/codex-acp@1.1.14 version\",\n parse: \"(\\\\d+\\\\.\\\\d+\\\\.\\\\d+)\",\n range: \"=1.1.14\",\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.3",
|
|
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,7 +41,7 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@agentproto/driver-agent-cli": "2.2.
|
|
44
|
+
"@agentproto/driver-agent-cli": "2.2.2"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/node": "^25.6.2",
|