@resolveworks/fork 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -1
- package/.github/workflows/release.yml +0 -33
- package/.husky/pre-commit +0 -2
- package/AGENTS.md +0 -30
- package/biome.json +0 -36
- package/pnpm-workspace.yaml +0 -3
- package/tsconfig.json +0 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@resolveworks/fork",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Subagents for Pi — spawn pi sessions in tmux windows with task delegation and revision loops",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
"keywords": [
|
|
10
10
|
"pi-package"
|
|
11
11
|
],
|
|
12
|
+
"files": [
|
|
13
|
+
"index.ts"
|
|
14
|
+
],
|
|
12
15
|
"pi": {
|
|
13
16
|
"extensions": [
|
|
14
17
|
"./index.ts"
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
name: release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
release:
|
|
5
|
-
types: [published]
|
|
6
|
-
|
|
7
|
-
permissions:
|
|
8
|
-
contents: read
|
|
9
|
-
id-token: write # OIDC token for npm trusted publishing
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
publish:
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
steps:
|
|
15
|
-
- uses: actions/checkout@v7
|
|
16
|
-
|
|
17
|
-
- uses: pnpm/action-setup@v6 # version comes from packageManager in package.json
|
|
18
|
-
|
|
19
|
-
- uses: actions/setup-node@v7
|
|
20
|
-
with:
|
|
21
|
-
node-version: 24
|
|
22
|
-
registry-url: https://registry.npmjs.org
|
|
23
|
-
|
|
24
|
-
- run: pnpm install --frozen-lockfile
|
|
25
|
-
|
|
26
|
-
- run: pnpm typecheck
|
|
27
|
-
- run: pnpm format:check
|
|
28
|
-
|
|
29
|
-
- name: Check version matches release tag
|
|
30
|
-
run: test "${GITHUB_REF_NAME#v}" = "$(node -p "require('./package.json').version")"
|
|
31
|
-
|
|
32
|
-
# Authenticates via trusted publishing (OIDC); no npm token is used
|
|
33
|
-
- run: pnpm publish --access public --no-git-checks
|
package/.husky/pre-commit
DELETED
package/AGENTS.md
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# AGENTS.md
|
|
2
|
-
|
|
3
|
-
**fork** is a [pi](https://github.com/earendil-works/pi) extension that spawns subagents as pi sessions in separate tmux windows.
|
|
4
|
-
|
|
5
|
-
The extension exposes `spawn_agent`, `message_agent`, and `close_agent` tools to parent sessions. Calling `spawn_agent` opens a new tmux window running pi with the given task and returns immediately. It shares the parent's working tree by default; an optional `branch` creates an isolated Git worktree on a new `agent/<name>` branch. Child sessions get a `report_result` tool; its report payload is sent back over a Unix socket and delivered to the parent as a steering notification: a fresh turn immediately if the parent is idle, or injected into the parent's current run — after its pending tool calls, before the next LLM call — if it is mid-work. An interrupt (escape) clears that queue without delivering queued custom messages — so fork tracks every report until its `message_end` confirms delivery and re-delivers the rest on `agent_settled`; an interrupt can no longer lose a report. Children stay alive after reporting: the parent reviews, requests revisions with `message_agent`, and closes them with `close_agent`. Closing an isolated child removes its worktree and retains its branch.
|
|
6
|
-
|
|
7
|
-
Everything lives in `index.ts` — start at the default export.
|
|
8
|
-
|
|
9
|
-
## Development
|
|
10
|
-
|
|
11
|
-
Requires Node.js 22.18 or newer and pnpm 11.3.0.
|
|
12
|
-
|
|
13
|
-
```sh
|
|
14
|
-
pnpm install --frozen-lockfile
|
|
15
|
-
pnpm typecheck
|
|
16
|
-
pnpm format:check
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Use `pnpm format` to apply formatting. Run the typecheck and formatting check before finishing a change; the pre-commit hook enforces both.
|
|
20
|
-
|
|
21
|
-
## Requirements
|
|
22
|
-
|
|
23
|
-
- **tmux.** The extension silently no-ops outside tmux.
|
|
24
|
-
- **Runtime state** lives under `~/.pi/agent/extensions/fork/`:
|
|
25
|
-
- `sockets/` — per-parent Unix sockets, mode `0o600`
|
|
26
|
-
- `agents/` — per-child Unix sockets (verdict channel), mode `0o600`
|
|
27
|
-
- `tasks/` — per-id task files handed to children at spawn via pi's `@<path>` argument, mode `0o600`; a present task file marks an open agent and persists until `close_agent`
|
|
28
|
-
- **Worktrees** live under `~/.pi/worktrees/<id>`; paths use the child UUID while branches use the requested `agent/<name>`
|
|
29
|
-
- **Repository policy:** fork only creates and removes worktrees. Repository-owned `post-checkout` and commit hooks handle environment setup and validation; fork has no setup runner or checks gate.
|
|
30
|
-
- **Orphan policy:** none. If a parent exits with children alive, their tmux windows and worktrees linger; kill the windows, run `git worktree remove` for isolated children, and remove their task files by hand. Agent branches are always retained for ordinary merge or deletion.
|
package/biome.json
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://biomejs.dev/schemas/2.5.8/schema.json",
|
|
3
|
-
"vcs": {
|
|
4
|
-
"enabled": true,
|
|
5
|
-
"clientKind": "git",
|
|
6
|
-
"useIgnoreFile": true
|
|
7
|
-
},
|
|
8
|
-
"files": {
|
|
9
|
-
"ignoreUnknown": false
|
|
10
|
-
},
|
|
11
|
-
"formatter": {
|
|
12
|
-
"enabled": true,
|
|
13
|
-
"indentStyle": "space",
|
|
14
|
-
"indentWidth": 2,
|
|
15
|
-
"lineWidth": 100
|
|
16
|
-
},
|
|
17
|
-
"linter": {
|
|
18
|
-
"enabled": true,
|
|
19
|
-
"rules": {
|
|
20
|
-
"preset": "recommended"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"javascript": {
|
|
24
|
-
"formatter": {
|
|
25
|
-
"quoteStyle": "double"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"assist": {
|
|
29
|
-
"enabled": true,
|
|
30
|
-
"actions": {
|
|
31
|
-
"source": {
|
|
32
|
-
"organizeImports": "on"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
package/pnpm-workspace.yaml
DELETED