Skip to content

Commit 6442f07

Browse files
committed
feat: add Pi package workspace
1 parent 5efbdff commit 6442f07

11 files changed

Lines changed: 2468 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version: 22
15+
cache: npm
16+
- run: npm ci
17+
- run: npm test
18+
- run: npm run typecheck
19+
- run: npm run pack:check

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules/
2+
coverage/
3+
.npm/
4+
*.tgz
5+
npm-debug.log*
6+
.env
7+
.env.*
8+
.DS_Store

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# HenryQW Pi packages
2+
3+
Public Pi packages under `@henryqw` scope.
4+
5+
## Packages
6+
7+
| Package | Install | Purpose |
8+
| --- | --- | --- |
9+
| [`@henryqw/pi-auto-compact`](./packages/pi-auto-compact) | `pi install npm:@henryqw/pi-auto-compact` | Compact context at 50% and resume current task. |
10+
11+
## Development
12+
13+
Requires Node.js `>=22.19.0`.
14+
15+
```bash
16+
npm ci
17+
npm test
18+
npm run typecheck
19+
npm run pack:check
20+
```
21+
22+
Run live Pi integration tests only when authenticated model access is available:
23+
24+
```bash
25+
npm run test:live
26+
```
27+
28+
Live tests use real model requests and can incur provider cost. They set a temporary small context window so compaction completes quickly.
29+
30+
## Release
31+
32+
See [`docs/releasing.md`](./docs/releasing.md). Each package publishes independently; package names use `@henryqw` scope.
33+
34+
## Install a package
35+
36+
```bash
37+
pi install npm:@henryqw/pi-auto-compact
38+
```

docs/releasing.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Release packages
2+
3+
Run from repository root.
4+
5+
1. Update package version:
6+
7+
```bash
8+
npm version patch --workspace packages/pi-auto-compact
9+
```
10+
11+
2. Run checks:
12+
13+
```bash
14+
npm test
15+
npm run typecheck
16+
npm run pack:check
17+
npm run test:live
18+
```
19+
20+
3. Publish package:
21+
22+
```bash
23+
npm publish --workspace @henryqw/pi-auto-compact --access public
24+
```
25+
26+
4. Push commit and tag created by `npm version`:
27+
28+
```bash
29+
git push --follow-tags origin main
30+
```
31+
32+
Do not publish without a version change. Keep package scope `@henryqw` for every future Pi package.

0 commit comments

Comments
 (0)