Skip to content
Merged
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
17 changes: 10 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,33 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- uses: actions/setup-node@v6
with:
bun-version: 1.3.11
- run: bun install
node-version: '24'
- run: npm ci
- run: npm run typecheck

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- uses: actions/setup-node@v6
with:
bun-version: 1.3.11
- run: bun install
node-version: '24'
- run: npm ci
- run: npm test

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v6
with:
node-version: '24'
- run: npm ci
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.11
- run: bun install
- run: npm run bundle:all
- uses: actions/upload-artifact@v4
with:
Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/publish-npm.yml

This file was deleted.

38 changes: 31 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,23 @@ jobs:
contents: write
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- uses: actions/setup-node@v6
with:
bun-version: 1.3.11
node-version: '24'
- name: Install zip
run: |
for i in 1 2 3; do
sudo apt-get install -y zip && break
echo "Attempt $i failed, retrying in 5s..."
sleep 5
done
- run: bun install
- run: bun run typecheck
- run: bun run test
- run: bun run bundle:all
- run: npm ci
- run: npm run typecheck
- run: npm run test
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.11
- run: npm run bundle:all

- name: Download Codesign Client and signatures
run: |
Expand Down Expand Up @@ -137,7 +140,7 @@ jobs:
unzip -o dist/bin/codex-acp-arm64-darwin.zip -d dist/bin/
rm dist/bin/codex-acp-x64-darwin.zip dist/bin/codex-acp-arm64-darwin.zip

- run: bun run package:all
- run: npm run package:all

- name: Create Release
uses: softprops/action-gh-release@v2
Expand Down Expand Up @@ -225,3 +228,24 @@ jobs:
filename=$(basename "$file")
echo " ${BASE_URL}/latest/${filename}"
done

publish-to-npm:
name: Publish to NPM
needs: build-and-release
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci

- name: Publish to NPM
run: npm publish --access public --tag beta
File renamed without changes.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# codex-acp
# ACP adapter for Codex CLI
[![npm version](https://img.shields.io/npm/v/%40jetbrains%2Fcodex-acp)](https://www.npmjs.com/package/@jetbrains/codex-acp)

ACP server implementation that exposes Codex CLI functionality for smoother client and IDE integration.

## Documentation

Expand Down
217 changes: 0 additions & 217 deletions bun.lock

This file was deleted.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"codex-acp": "dist/index.js"
},
"files": [
"dist/",
"dist/index.js",
"README.md",
"LICENSE",
"package.json"
Expand All @@ -29,7 +29,7 @@
"package:darwin-arm64": "cd dist/bin && zip codex-acp-arm64-darwin.zip codex-acp-arm64-darwin",
"package:win-x64": "cd dist/bin && zip codex-acp-x64-windows.zip codex-acp-x64-windows.exe",
"package:win-arm64": "cd dist/bin && zip codex-acp-arm64-windows.zip codex-acp-arm64-windows.exe",
"start": "bun run src/index.ts",
"start": "node --import tsx src/index.ts",
"generate-types": "./node_modules/.bin/codex app-server generate-ts --out src/app-server",
"test": "vitest run",
"test:watch": "vitest",
Expand All @@ -38,7 +38,7 @@
},
"keywords": [],
"author": "",
"license": "ISC",
"license": "Apache-2.0",
"type": "module",
"devDependencies": {
"@types/node": "^24.10.1",
Expand Down
5 changes: 3 additions & 2 deletions readme-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ It may not work with versions other than the one specified in package.json.
### Quick start

#### Develop on Windows?
- Download and install [bun](https://bun.com/docs/installation#windows)
- Download and install [C++ redistributable package](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#latest-supported-redistributable-version)

#### Adjust acp config for IDE
Expand Down Expand Up @@ -55,6 +54,8 @@ Run from binaries

### Build binaries

Building standalone binaries requires [bun](https://bun.com/docs/installation).

Build single-file executables in `dist/bin` directory:

```bash
Expand All @@ -71,4 +72,4 @@ npm run package:all

1. Update Codex dependency: `package.json`
2. Regenerate Codex types in `src/app-server/`: `npm run generate-types`
3. Ensure there are no type errors or failed tests: `npm run typecheck` and `npm run test`
3. Ensure there are no type errors or failed tests: `npm run typecheck` and `npm run test`
7 changes: 4 additions & 3 deletions src/CodexJsonRpcConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ export interface CodexConnection {
readonly process: ChildProcessWithoutNullStreams;
}

export function startCodexConnection(codexPath: string): CodexConnection {
export function startCodexConnection(codexPath: string, env?: NodeJS.ProcessEnv): CodexConnection {
const spawnEnv = env ?? process.env;
const codex: ChildProcessWithoutNullStreams = process.platform === 'win32'
? spawn(`"${codexPath}" app-server`, { shell: true })
: spawn(codexPath, ['app-server']);
? spawn(`"${codexPath}" app-server`, { shell: true, env: spawnEnv })
: spawn(codexPath, ['app-server'], { env: spawnEnv });

attachLogs(codex);

Expand Down
Loading
Loading