Skip to content

Commit b38e0e7

Browse files
committed
chore: release 0.21.0
1 parent 13f5fe4 commit b38e0e7

File tree

18 files changed

+261
-755
lines changed

18 files changed

+261
-755
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## [0.21.0] - 2025-11-20
4+
### ⚡ Codex Adapter Direct Execution
5+
- `@headless-coder-sdk/codex-adapter` now targets `@openai/codex-sdk@0.59.0` and calls the SDK directly instead of spawning worker processes. Cancellation flows through the SDK’s native `AbortSignal` support, so both `RunOpts.signal` and `thread.interrupt()` stop Codex turns immediately with no worker fallback.
6+
- Removed the worker entry/export, simplified the tsup build, and refreshed smoke tests to reflect the single-entry bundle layout.
7+
8+
### 📚 Documentation
9+
- Root and core READMEs now describe the server-only Codex requirement without mentioning worker placement, since bundlers no longer need to keep extra assets adjacent to the entry point.
10+
- Core README is synced with the repository README for every release.
11+
312
## [0.20.0] - 2025-11-19
413
### ♻️ Gemini Resume Support
514
- `@headless-coder-sdk/gemini-adapter` now captures CLI session ids/indexes and forwards `--resume` for every subsequent run, so both repeated thread runs and explicit `resumeThread()` flows continue the same workspace.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ In this workflow two reviewers (Claude, Codex) analyze the same commit in parall
237237

238238
## ⚠️ Codex Adapter Runtime
239239

240-
- The Codex adapter forks worker processes via Node’s `child_process` API and **must run on the server**. It is safe to import in build tooling, but gate runtime usage to environments where `process.versions.node` exists.
240+
- The Codex adapter talks directly to the Codex CLI through Node APIs and **must run on the server**. It is safe to import in build tooling, but gate runtime usage to environments where `process.versions.node` exists.
241241
- A convenience helper, `createHeadlessCodex`, registers the adapter and returns a coder in one call:
242242

243243
```ts
@@ -330,7 +330,7 @@ Open an [issue](https://github.com/OhadAssulin/headless-coder-sdk/issues) or sub
330330
- You can import `createCoder` or helper utilities directly from `@headless-coder-sdk/core` and `@headless-coder-sdk/codex-adapter` without deep `dist/*/src` paths—the `main`/`module` fields now point at those root files.
331331
- Helper factories (`createHeadlessCodex/Claude/Gemini`) register adapters and return coders in one call, making server-only integrations simpler.
332332
- `package.json` is exposed via the exports map (`import '@headless-coder-sdk/core/package.json'`) for tooling that needs to inspect versions at runtime.
333-
- `@headless-coder-sdk/codex-adapter` forks a worker via `fileURLToPath(new URL('./worker.js', import.meta.url))`; keep `dist/worker.js` adjacent when rebundling so that child processes can spawn correctly.
333+
- `@headless-coder-sdk/codex-adapter` now calls the Codex SDK directly with AbortSignal-based cancellation, so bundlers no longer need to juggle extra worker assets—ensuring the adapter stays server-only is sufficient.
334334

335335
---
336336

examples/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@headless-coder-sdk/examples-tests",
33
"private": true,
4-
"version": "0.20.0",
4+
"version": "0.21.0",
55
"type": "module",
66
"main": "src/codex-web-calculator.test.ts",
77
"files": [

package-lock.json

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "headless-coder-sdk",
33
"private": true,
4-
"version": "0.20.0",
4+
"version": "0.21.0",
55
"type": "module",
66
"workspaces": [
77
"packages/*",
@@ -20,5 +20,6 @@
2020
"tsup": "^8.5.0",
2121
"tsx": "^4.19.1",
2222
"typescript": "^5.4.0"
23-
}
23+
},
24+
"packageManager": "pnpm@10.20.0+sha512.cf9998222162dd85864d0a8102e7892e7ba4ceadebbf5a31f9c2fce48dfce317a9c53b9f6464d1ef9042cba2e02ae02a9f7c143a2b438cd93c91840f0192b9dd"
2425
}

packages/acp-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@headless-coder-sdk/acp-server",
3-
"version": "0.20.0",
3+
"version": "0.21.0",
44
"type": "module",
55
"scripts": {
66
"dev": "next dev -p 8000",

packages/claude-adapter/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@headless-coder-sdk/claude-adapter",
3-
"version": "0.20.0",
3+
"version": "0.21.0",
44
"type": "module",
55
"main": "./dist/index.cjs",
66
"module": "./dist/index.js",
@@ -19,7 +19,7 @@
1919
},
2020
"peerDependencies": {
2121
"@anthropic-ai/claude-agent-sdk": ">=0.1.46",
22-
"@headless-coder-sdk/core": "^0.20.0"
22+
"@headless-coder-sdk/core": "^0.21.0"
2323
},
2424
"devDependencies": {
2525
"typescript": "^5.4.0",

packages/codex-adapter/README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ console.log(turn.text);
2727

2828
## Next.js / server frameworks
2929

30-
The adapter forks worker processes via Node’s `child_process`, so keep it on the server:
30+
The adapter interacts with the Codex CLI via Node APIs, so keep it on the server:
3131

3232
```ts
3333
export async function POST() {
@@ -42,10 +42,4 @@ export async function POST() {
4242
}
4343
```
4444

45-
## Worker placement
46-
47-
- The adapter forks a worker via `fileURLToPath(new URL('./worker.js', import.meta.url))`.
48-
- A transpiled `dist/worker.js` **must remain adjacent** to the published entry file. If you bundle the adapter, copy the worker into the final output directory or configure your bundler to emit it as an asset.
49-
- When packaging custom builds (Electron, webpack, etc.), keep the relative path stable or provide your own thin wrapper that adjusts `WORKER_PATH` before registering the adapter.
50-
51-
The published package already includes the worker alongside the JS/typings outputs; the guidance above is to prevent third-party bundlers from tree-shaking or relocating it.
45+
The adapter is server-only because it shells out to the Codex executable and depends on the Node.js runtime.
Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@headless-coder-sdk/codex-adapter",
3-
"version": "0.20.0",
3+
"version": "0.21.0",
44
"type": "module",
55
"main": "./dist/index.cjs",
66
"module": "./dist/index.js",
@@ -11,11 +11,6 @@
1111
"import": "./dist/index.js",
1212
"require": "./dist/index.cjs"
1313
},
14-
"./worker": {
15-
"types": "./dist/worker.d.ts",
16-
"import": "./dist/worker.js",
17-
"require": "./dist/worker.cjs"
18-
},
1914
"./package.json": "./package.json"
2015
},
2116
"files": [
@@ -27,12 +22,12 @@
2722
"build": "tsup --config tsup.config.ts"
2823
},
2924
"peerDependencies": {
30-
"@headless-coder-sdk/core": "^0.20.0",
31-
"@openai/codex-sdk": "^0.58.0"
25+
"@headless-coder-sdk/core": "^0.21.0",
26+
"@openai/codex-sdk": "^0.59.0"
3227
},
3328
"devDependencies": {
3429
"typescript": "^5.4.0",
3530
"@headless-coder-sdk/core": "workspace:*",
36-
"@openai/codex-sdk": "^0.58.0"
31+
"@openai/codex-sdk": "^0.59.0"
3732
}
3833
}

0 commit comments

Comments
 (0)