Skip to content

Commit 0da3d7a

Browse files
committed
Merge branch 'main' into fix/keep-config-model-for-custom-providers
2 parents c5b32b5 + b719332 commit 0da3d7a

165 files changed

Lines changed: 8711 additions & 881 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
# Check for updates to GitHub Actions every week
7+
interval: "weekly"
8+
groups:
9+
github-actions:
10+
patterns:
11+
- "*"

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
permissions:
1515
contents: read
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v7
1818
- uses: actions/setup-node@v6
1919
with:
20-
node-version: '24'
21-
- uses: oven-sh/setup-bun@v2
20+
node-version: "24"
21+
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
2222
with:
2323
bun-version: 1.3.11
2424
- name: Install dependencies

.github/workflows/codex-update.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ name: Codex Update
22

33
on:
44
schedule:
5-
- cron: '0 5 * * *'
5+
- cron: "0 5 * * *"
66
workflow_dispatch:
77

88
permissions:
99
contents: read
1010
packages: read
1111

1212
env:
13-
CODEX_PACKAGE: '@openai/codex'
14-
CODEX_UPDATE_LABEL: 'codex-update'
15-
GITHUB_BOT_USERNAME: 'github-actions[bot]'
13+
CODEX_PACKAGE: "@openai/codex"
14+
CODEX_UPDATE_LABEL: "codex-update"
15+
GITHUB_BOT_USERNAME: "github-actions[bot]"
1616

1717
jobs:
1818
check:
@@ -22,7 +22,7 @@ jobs:
2222
version: ${{ steps.check.outputs.version }}
2323
branch: ${{ steps.check.outputs.branch }}
2424
steps:
25-
- uses: actions/checkout@v4
25+
- uses: actions/checkout@v7
2626
with:
2727
fetch-depth: 0
2828

@@ -58,13 +58,13 @@ jobs:
5858
VERSION: ${{ needs.check.outputs.version }}
5959
steps:
6060
- name: Generate GitHub token
61-
uses: actions/create-github-app-token@v2
61+
uses: actions/create-github-app-token@v3
6262
id: generate-token
6363
with:
6464
app-id: ${{ secrets.RELEASE_PLZ_APP_ID }}
6565
private-key: ${{ secrets.RELEASE_PLZ_APP_PRIVATE_KEY }}
6666

67-
- uses: actions/checkout@v4
67+
- uses: actions/checkout@v7
6868
with:
6969
token: ${{ steps.generate-token.outputs.token }}
7070

@@ -83,20 +83,20 @@ jobs:
8383
8484
- name: Finalize update with Codex
8585
id: codex-finalize
86-
uses: openai/codex-action@v1
86+
uses: openai/codex-action@10cb888d2ed3b99867f7e7ccff174a861a75aeb6
8787
with:
8888
openai-api-key: ${{ secrets.OPENAI_API_KEY }}
8989
codex-version: ${{ env.VERSION }}
9090
output-file: pr-body.md
9191
codex-args: >-
9292
-c sandbox_workspace_write.writable_roots=["${{ github.workspace }}/.git"]
9393
prompt: >
94-
Finalize the update using codex-update-compat skill.
95-
Commit the changes, the message should mention that types or/and tests after the update were fixed.
94+
Finalize the update using codex-update-compat skill.
95+
Commit the changes, the message should mention that types or/and tests after the update were fixed.
9696
When creating the final message do not mention:
9797
* Validation run details.
9898
* Commits.
99-
* Hyperlinks.
99+
* Hyperlinks.
100100
Mention only previously failed tests with failure reasons, also what you changed and why.
101101
102102
- name: Push branch updates
@@ -143,4 +143,3 @@ jobs:
143143
gh pr close "$pr_number" \
144144
--comment "Closing obsolete update PR"
145145
done
146-

.github/workflows/e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
permissions:
1414
contents: read
1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v7
1717
- uses: actions/setup-node@v6
1818
with:
1919
node-version: '24'

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
permissions:
1515
contents: read
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v7
1818
- uses: actions/setup-node@v6
1919
with:
2020
node-version: '24'
@@ -42,7 +42,7 @@ jobs:
4242
contents: read
4343
id-token: write
4444
steps:
45-
- uses: actions/checkout@v4
45+
- uses: actions/checkout@v7
4646
- uses: actions/setup-node@v6
4747
with:
4848
node-version: '24'
@@ -56,14 +56,14 @@ jobs:
5656
permissions: {}
5757
steps:
5858
- name: Generate GitHub token
59-
uses: actions/create-github-app-token@v2
59+
uses: actions/create-github-app-token@v3
6060
id: generate-token
6161
with:
6262
app-id: ${{ secrets.RELEASE_PLZ_APP_ID }}
6363
private-key: ${{ secrets.RELEASE_PLZ_APP_PRIVATE_KEY }}
6464

6565
- name: Create Release
66-
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2.6.2
66+
uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3.0.1
6767
with:
6868
token: ${{ steps.generate-token.outputs.token }}
6969
generate_release_notes: true

.github/workflows/version-bump.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Generate GitHub token
22-
uses: actions/create-github-app-token@v2
22+
uses: actions/create-github-app-token@v3
2323
id: generate-token
2424
with:
2525
app-id: ${{ secrets.RELEASE_PLZ_APP_ID }}
2626
private-key: ${{ secrets.RELEASE_PLZ_APP_PRIVATE_KEY }}
2727

28-
- uses: actions/checkout@v4
28+
- uses: actions/checkout@v7
2929
with:
3030
token: ${{ steps.generate-token.outputs.token }}
3131

README.md

Lines changed: 73 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,78 @@
11
# ACP adapter for Codex CLI
2+
23
[![npm version](https://img.shields.io/npm/v/%40agentclientprotocol%2Fcodex-acp)](https://www.npmjs.com/package/@agentclientprotocol/codex-acp)
34

5+
Use [OpenAI Codex](https://github.com/openai/codex) from [Agent Client Protocol](https://agentclientprotocol.com/) clients.
6+
7+
`codex-acp` is a stdio ACP agent server. It starts the Codex App Server, translates ACP requests into Codex operations, and maps Codex events back into the client.
8+
9+
## Features
10+
11+
- ChatGPT, API key, and client-provided custom gateway authentication.
12+
- Model, reasoning effort, fast mode, approval, and sandbox mode configuration.
13+
- Text prompts, embedded context, images, resource links, and additional workspace directories.
14+
- Shell command, file change, permission request, MCP tool call, terminal output, reasoning, plan, web search, image generation, image view, token usage, and review events.
15+
- Client-provided MCP servers over command-based stdio config and HTTP transport.
16+
- Slash commands: `/status`, `/mcp`, `/skills`, `/review`, `/review-branch`, `/review-commit`, `/compact`, and `/logout`, as well as configured skills.
17+
18+
## Installation
19+
20+
Run the published package directly:
21+
22+
```bash
23+
npx -y @agentclientprotocol/codex-acp
24+
```
25+
26+
Or install it globally:
27+
28+
```bash
29+
npm install -g @agentclientprotocol/codex-acp
30+
codex-acp --version
31+
```
32+
33+
The npm package includes a compatible `@openai/codex` dependency. Set `CODEX_PATH` only when you want the adapter to run a different Codex binary:
34+
35+
```bash
36+
CODEX_PATH=/path/to/codex npx -y @agentclientprotocol/codex-acp
37+
```
38+
39+
## Authentication
40+
41+
The adapter advertises ACP auth methods during initialization. Clients can authenticate with:
42+
43+
- ChatGPT login. Set `NO_BROWSER=1` to hide this method in remote or browserless environments.
44+
- API key via `CODEX_API_KEY` or `OPENAI_API_KEY`.
45+
- A custom OpenAI-compatible gateway, when the client opts in to the gateway auth capability.
46+
47+
## Runtime options
48+
49+
- `CODEX_API_KEY` - API key used when the API-key auth method is selected. Takes precedence over `OPENAI_API_KEY`.
50+
- `OPENAI_API_KEY` - fallback API key used when the API-key auth method is selected.
51+
- `CODEX_PATH` - run a specific Codex executable instead of the bundled package dependency.
52+
- `CODEX_CONFIG` - JSON object merged into the Codex session config.
53+
- `MODEL_PROVIDER` - model provider to pass to Codex for new sessions.
54+
- `DEFAULT_AUTH_REQUEST` - ACP auth request JSON used when Codex requires authentication.
55+
- `INITIAL_AGENT_MODE` - initial mode id: `read-only`, `agent`, or `agent-full-access`.
56+
- `NO_BROWSER` - hide browser-based ChatGPT auth when set.
57+
- `APP_SERVER_LOGS` - directory for adapter logs.
58+
59+
## Development
60+
61+
```bash
62+
npm install
63+
npm run start
64+
npm run typecheck
65+
npm test
66+
```
67+
68+
Build standalone binaries in `dist/bin` with:
69+
70+
```bash
71+
npm run bundle:all
72+
```
73+
74+
See [readme-dev.md](readme-dev.md) for local client configuration, binary packaging, and Codex type regeneration.
475

5-
## Documentation
76+
## License
677

7-
- **[Development Guide](readme-dev.md)** - Setup, configuration, and building binaries
78+
By contributing, you agree that your contributions will be licensed under the Apache 2.0 License.

0 commit comments

Comments
 (0)