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
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

## Verification

- [ ] `npm run check` (typecheck + biome)
- [ ] `npm test` (unit tests)
- [ ] `bun run check` (typecheck + biome)
- [ ] `bun run test` (unit tests)
- [ ] `npm pack --dry-run` (release sanity)
- [ ] `pi -e ./src/index.ts` smoke-tested locally, if behavior changed

Expand Down
38 changes: 31 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,49 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
node: ["22"]
node: ["22", "24"]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Setup Node ${{ matrix.node }}
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node }}
cache: npm

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.4.2

- name: Install dependencies
run: npm ci
run: bun install --frozen-lockfile

- name: Check (tsgo + biome)
run: npm run check
run: bun run check

- name: Unit tests
run: npm test
run: bun run test

- name: Package smoke
run: npm pack --dry-run

npm-consumer:
name: npm consumer (ubuntu-latest · node 22)
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v7

- name: Setup Node 22
uses: actions/setup-node@v7
with:
node-version: "22"
cache: npm

- name: Install dependencies
run: npm ci

- name: Unit tests
run: npm test
21 changes: 11 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,27 @@ jobs:
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Setup Node 22
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: "22"
registry-url: https://registry.npmjs.org
cache: npm

- name: Install dependencies
run: npm ci
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.4.2

- name: Type check
run: npm run typecheck
- name: Install dependencies
run: bun install --frozen-lockfile

- name: Lint
run: npm run lint
- name: Check (tsgo + biome)
run: bun run check

- name: Unit tests
run: npm test
run: bun run test

- name: Package smoke
run: npm pack --dry-run
Expand Down
13 changes: 7 additions & 6 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@ Conventions for human contributors and AI agents working on this repository.

## Commands

- `npm install` — install dependencies.
- `npm test` — run vitest once.
- `npm run typecheck` — strict TypeScript check.
- `npm run check` — type check + biome.
- `bun install` — install dependencies (Bun 1.4.2; `bun.lock` and `package-lock.json` are both committed).
- `bun run test` — run vitest once.
- `bun run typecheck` — strict TypeScript check.
- `bun run check` — type check + biome.
- `npm ci && npm test` — npm consumer smoke (CI runs this too; keep `package-lock.json` in sync with `npm install --package-lock-only --ignore-scripts`).
- `pi -e ./src/index.ts` — load the extension into a local pi session for manual smoke testing.

## Constraints

- No Bun APIs. Runtime is Node only.
- No Bun APIs in `src/`. Runtime is Node only; Bun is the dev and CI toolchain.
- This extension registers the `apply_patch` tool and only activates it for OpenAI GPT-family models.
- Keep the tool schema, grammar, and descriptions byte-for-byte compatible with Codex unless intentionally updating the golden source.
- No dependency on pi-coding-agent internal modules outside the documented public extension API in `@mariozechner/pi-coding-agent`.
- No dependency on pi-coding-agent internal modules outside the documented public extension API in `@earendil-works/pi-coding-agent`.

## Don'ts

Expand Down
21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,26 @@

## [Unreleased]

## [0.1.3] - 2026-09-24

First tagged release from this repository.

### Added

- Initial standalone `apply_patch` pi extension.
- Support GPT models exposed through custom `openai-responses` and `openai-codex-responses` providers.
- Support GPT models exposed through custom `openai-responses` and `openai-codex-responses` providers (#33, thanks @zidou-kiyn).

### Fixed

- Keep the final diff preview on completed results so the diff no longer disappears after the patch applies, and accept absolute and outside-cwd paths (#22, thanks @bstncartwright; fixes #16, #21, #23).
- Serialize file mutations per canonical path (#28, thanks @alexei-ciobanu).
- Disclose `apply_patch` failure reasons and classify recovery advice (#34).

### Changed

- Dependencies (#40, fixes #39): `@biomejs/biome` 2.5.5 -> 2.5.14, `vitest` ^4.1.10 -> 5.0.1, `@types/node` ^26.1.1 -> 26.6.2, `@typescript/native-preview` pinned to 7.0.0-dev.20260707.2, `typescript` stays 7.0.2. `@earendil-works/pi-agent-core`, `pi-ai`, `pi-coding-agent` and `pi-tui` are now exact 0.87.1 devDependencies so tests run against the current upstream runtime.
- `typebox` moved from `peerDependencies` to `dependencies` (^1.3.34). Peer dependencies now list only `@earendil-works/pi-*` (range `*`). The pi extension loader still aliases `typebox` to the host copy.
- `engines.node` raised to `>=22.19.0`, matching `@earendil-works/pi-coding-agent` 0.87.1.
- Biome config migrated (`linter.rules.recommended` -> `linter.rules.preset`).
- The published tarball is limited to `src/`, README, CHANGELOG, LICENSE and NOTICE through a `files` allowlist.
- CI now runs on Bun 1.4.2 (#40) (`oven-sh/setup-bun@v2`) across ubuntu/macos x Node 22/24 with `actions/checkout@v7` and `actions/setup-node@v7`, plus an `npm ci && npm test` consumer job. The publish workflow verifies with Bun and still publishes with `npm publish --provenance`. `bun.lock` is committed alongside `package-lock.json`.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,16 @@ After installation, restart pi or run `/reload` inside an interactive session.
## Development

```bash
npm install
npm test
npm run typecheck
npm run check
bun install
bun run test
bun run typecheck
bun run check
npm pack --dry-run
pi -e ./src/index.ts
```

Development and CI use Bun 1.4.2. `package-lock.json` is kept alongside `bun.lock` so `npm ci && npm test` keeps working for npm consumers.

The test suite uses vitest. TypeScript is strict, Node-only, and uses ESM imports with `.js` suffixes.

## Origin
Expand Down
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"preset": "recommended",
"style": {
"noNonNullAssertion": "error",
"useImportType": "error",
Expand Down
Loading
Loading