@finalai/acp-adapter-codex 0.1.1 → 0.1.2
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.
|
@@ -2,7 +2,7 @@ import type { AdapterProgramIface } from '@finalai/acp-session/agent';
|
|
|
2
2
|
import { type SpawnAppServer } from "./app-server.mjs";
|
|
3
3
|
import { CodexApprovalPolicy } from "./config.mjs";
|
|
4
4
|
export declare const ADAPTER_NAME = "acp-adapter-codex";
|
|
5
|
-
export declare const ADAPTER_VERSION = "0.1.
|
|
5
|
+
export declare const ADAPTER_VERSION = "0.1.2";
|
|
6
6
|
export interface CodexProgramOptionsIface {
|
|
7
7
|
command?: {
|
|
8
8
|
command: string;
|
package/dist/modules/program.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./config.mjs";
|
|
10
10
|
import { assertDistinctMcpNames, forkCodexThread, openCodexSession } from "./session.mjs";
|
|
11
11
|
const ADAPTER_NAME = "acp-adapter-codex";
|
|
12
|
-
const ADAPTER_VERSION = "0.1.
|
|
12
|
+
const ADAPTER_VERSION = "0.1.2";
|
|
13
13
|
const bundledCodex = () => {
|
|
14
14
|
const manifest = createRequire(import.meta.url).resolve("@openai/codex/package.json");
|
|
15
15
|
return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/program.ts"],
|
|
4
|
-
"sourcesContent": ["import { createRequire } from 'node:module';\nimport { dirname, join } from 'node:path';\n\nimport type { AdapterProgramIface } from '@finalai/acp-session/agent';\n\nimport { spawnCodexAppServer, type SpawnAppServer } from \"./app-server.mjs\";\nimport {\n CodexApprovalPolicy,\n codexConfigOptions,\n codexConfigValue,\n defaultCodexConfig,\n} from \"./config.mjs\";\nimport { assertDistinctMcpNames, forkCodexThread, openCodexSession } from \"./session.mjs\";\n\nexport const ADAPTER_NAME = 'acp-adapter-codex';\nexport const ADAPTER_VERSION = '0.1.
|
|
4
|
+
"sourcesContent": ["import { createRequire } from 'node:module';\nimport { dirname, join } from 'node:path';\n\nimport type { AdapterProgramIface } from '@finalai/acp-session/agent';\n\nimport { spawnCodexAppServer, type SpawnAppServer } from \"./app-server.mjs\";\nimport {\n CodexApprovalPolicy,\n codexConfigOptions,\n codexConfigValue,\n defaultCodexConfig,\n} from \"./config.mjs\";\nimport { assertDistinctMcpNames, forkCodexThread, openCodexSession } from \"./session.mjs\";\n\nexport const ADAPTER_NAME = 'acp-adapter-codex';\nexport const ADAPTER_VERSION = '0.1.2';\n\nexport interface CodexProgramOptionsIface {\n // The app-server's command line (`codex app-server ...`); by default the Codex the\n // `@openai/codex` dependency installs.\n command?: { command: string; args: string[] } | null;\n // The approval policy a new session starts with.\n approvalPolicy?: CodexApprovalPolicy;\n // Environment of the app-server, inference credentials included (OPENAI_API_KEY and\n // OPENAI_BASE_URL, or CODEX_HOME for Codex's own login).\n env?: Record<string, string | undefined>;\n spawnAppServer?: SpawnAppServer;\n closeGraceMs?: number;\n}\n\n// The Codex CLI the dependency installs, run with this Node.\nconst bundledCodex = (): { command: string; args: string[] } => {\n const manifest = createRequire(import.meta.url).resolve('@openai/codex/package.json');\n return {\n command: process.execPath,\n args: [join(dirname(manifest), 'bin', 'codex.js'), 'app-server'],\n };\n};\n\n// The Codex app-server as the native program of an ACP adapter.\nexport const createCodexProgram = (options: CodexProgramOptionsIface = {}): AdapterProgramIface => {\n const command = options.command ?? bundledCodex();\n const deps = {\n spawnAppServer: options.spawnAppServer ?? spawnCodexAppServer,\n command: command.command,\n args: command.args,\n env: options.env ?? process.env,\n version: ADAPTER_VERSION,\n closeGraceMs: options.closeGraceMs ?? 10_000,\n };\n return {\n info: { name: ADAPTER_NAME, version: ADAPTER_VERSION },\n program: 'codex',\n runtime: { name: ADAPTER_NAME, version: ADAPTER_VERSION },\n fork: true,\n mcp: { http: true, stdio: true, acp: true },\n images: true,\n defaultConfig: () => defaultCodexConfig(options.approvalPolicy),\n configOptions: codexConfigOptions,\n configValue: codexConfigValue,\n checkMcpServers: (servers) =>\n assertDistinctMcpNames(servers.map((server) => String(server.name))),\n forkNative: (args) => forkCodexThread(args, deps),\n open: (args) => openCodexSession(args, deps),\n };\n};\n"],
|
|
5
5
|
"mappings": "AAAA,SAAS,qBAAqB;AAC9B,SAAS,SAAS,YAAY;AAI9B,SAAS,2BAAgD;AACzD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,wBAAwB,iBAAiB,wBAAwB;AAEnE,MAAM,eAAe;AACrB,MAAM,kBAAkB;AAgB/B,MAAM,eAAe,MAA2C;AAC9D,QAAM,WAAW,cAAc,YAAY,GAAG,EAAE,QAAQ,4BAA4B;AACpF,SAAO;AAAA,IACL,SAAS,QAAQ;AAAA,IACjB,MAAM,CAAC,KAAK,QAAQ,QAAQ,GAAG,OAAO,UAAU,GAAG,YAAY;AAAA,EACjE;AACF;AAGO,MAAM,qBAAqB,CAAC,UAAoC,CAAC,MAA2B;AACjG,QAAM,UAAU,QAAQ,WAAW,aAAa;AAChD,QAAM,OAAO;AAAA,IACX,gBAAgB,QAAQ,kBAAkB;AAAA,IAC1C,SAAS,QAAQ;AAAA,IACjB,MAAM,QAAQ;AAAA,IACd,KAAK,QAAQ,OAAO,QAAQ;AAAA,IAC5B,SAAS;AAAA,IACT,cAAc,QAAQ,gBAAgB;AAAA,EACxC;AACA,SAAO;AAAA,IACL,MAAM,EAAE,MAAM,cAAc,SAAS,gBAAgB;AAAA,IACrD,SAAS;AAAA,IACT,SAAS,EAAE,MAAM,cAAc,SAAS,gBAAgB;AAAA,IACxD,MAAM;AAAA,IACN,KAAK,EAAE,MAAM,MAAM,OAAO,MAAM,KAAK,KAAK;AAAA,IAC1C,QAAQ;AAAA,IACR,eAAe,MAAM,mBAAmB,QAAQ,cAAc;AAAA,IAC9D,eAAe;AAAA,IACf,aAAa;AAAA,IACb,iBAAiB,CAAC,YAChB,uBAAuB,QAAQ,IAAI,CAAC,WAAW,OAAO,OAAO,IAAI,CAAC,CAAC;AAAA,IACrE,YAAY,CAAC,SAAS,gBAAgB,MAAM,IAAI;AAAA,IAChD,MAAM,CAAC,SAAS,iBAAiB,MAAM,IAAI;AAAA,EAC7C;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finalai/acp-adapter-codex",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Codex as an ACP v2 agent with Final's ACP extensions, over stdio, on the Codex app-server.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@agentclientprotocol/sdk": "1.8.0",
|
|
35
|
-
"@finalai/acp-session": "0.
|
|
35
|
+
"@finalai/acp-session": "0.4.0",
|
|
36
36
|
"@openai/codex": "0.167.0",
|
|
37
37
|
"zod": "4.6.6"
|
|
38
38
|
},
|