@agimon-ai/po-git 0.0.0-alpha.28 → 0.0.0-alpha.29

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agimon-ai/po-git",
3
- "version": "0.0.0-alpha.28",
3
+ "version": "0.0.0-alpha.29",
4
4
  "description": "Git worktree sessions for Po: spawn an isolated worktree with its own session and manage it from the parent",
5
5
  "keywords": [
6
6
  "ai",
@@ -65,10 +65,10 @@
65
65
  "access": "public"
66
66
  },
67
67
  "dependencies": {
68
- "@agimon-ai/po-core": "0.0.0-alpha.28",
69
- "@agimon-ai/po-session": "0.0.0-alpha.28",
70
- "@agimon-ai/po-web-components": "0.0.0-alpha.28",
71
- "@agimon-ai/po-web-security": "0.0.0-alpha.28",
68
+ "@agimon-ai/po-core": "0.0.0-alpha.29",
69
+ "@agimon-ai/po-session": "0.0.0-alpha.29",
70
+ "@agimon-ai/po-web-components": "0.0.0-alpha.29",
71
+ "@agimon-ai/po-web-security": "0.0.0-alpha.29",
72
72
  "@deepseek-ai/cordis": "4.0.5",
73
73
  "@tanstack/react-store": "0.11.2",
74
74
  "@tanstack/store": "0.11.2",
@@ -76,9 +76,9 @@
76
76
  "typebox": "1.3.37"
77
77
  },
78
78
  "devDependencies": {
79
- "@agimon-ai/po-build": "0.0.0-alpha.28",
80
- "@agimon-ai/po-native-components": "0.0.0-alpha.28",
81
- "@agimon-ai/vibe-lint-plugin-po-extension": "0.0.0-alpha.28",
79
+ "@agimon-ai/po-build": "0.0.0-alpha.29",
80
+ "@agimon-ai/po-native-components": "0.0.0-alpha.29",
81
+ "@agimon-ai/vibe-lint-plugin-po-extension": "0.0.0-alpha.29",
82
82
  "@babel/core": "7.29.7",
83
83
  "@earendil-works/pi-agent-core": "1.3.0",
84
84
  "@earendil-works/pi-coding-agent": "1.3.0",
@@ -5,8 +5,10 @@ description: 'Use @agimon-ai/po-git: Git worktree sessions for Po: spawn an isol
5
5
 
6
6
  # Worktree sessions
7
7
 
8
- `run_worktree` creates a git worktree and starts a Po session inside it. The
9
- new session appears nested under the current one in the SESSIONS rail, so a
8
+ In code mode the `worktrees` namespace creates a git worktree and starts a Po
9
+ session inside it: call `discover({ namespace: 'worktrees' })` for the types,
10
+ then `exec`. Without code mode the same actions are the `run_worktree` tool.
11
+ The new session appears nested under the current one in the SESSIONS rail, so a
10
12
  parent can hand off a branch of work and keep its own checkout untouched.
11
13
 
12
14
  Worktrees live outside the repository, under `~/.po/git/worktrees`. That
@@ -22,35 +24,36 @@ or two features that touch the same files.
22
24
  Do not reach for it to parallelise work that shares a branch. Two sessions on
23
25
  one branch in two checkouts will fight, and git refuses the second worktree.
24
26
 
25
- The new checkout has no dependencies installed: `spawn_worktree` runs git and
27
+ The new checkout has no dependencies installed: `spawn` runs git and
26
28
  nothing else, whatever language the repository is in. Install them in the
27
29
  worktree before building or testing there.
28
30
 
29
31
  ## Actions
30
32
 
31
- ```
32
- run_worktree { action: 'spawn_worktree', branch: 'wt/fix-auth' }
33
- run_worktree { action: 'list' }
34
- run_worktree { action: 'status', id: 'a1b2c3d4' }
35
- run_worktree { action: 'merge', id: 'a1b2c3d4' }
36
- run_worktree { action: 'close_worktree', id: 'a1b2c3d4' }
37
- run_worktree { action: 'prune', dryRun: true }
38
- run_worktree { action: 'send', id: 'a1b2c3d4', message: 'Please report progress' }
39
- run_worktree { action: 'messages', id: 'a1b2c3d4' }
33
+ ```ts
34
+ await worktrees.spawn({ branch: 'wt/fix-auth' });
35
+ await worktrees.list();
36
+ await worktrees.status('a1b2c3d4');
37
+ await worktrees.merge('a1b2c3d4');
38
+ await worktrees.close('a1b2c3d4');
39
+ await worktrees.prune({ dryRun: true });
40
+ await worktrees.send('a1b2c3d4', 'Please report progress');
41
+ await worktrees.messages('a1b2c3d4');
40
42
  ```
41
43
 
42
- `spawn_worktree` takes `branch`, and optionally `baseRef` (defaults to the
43
- current branch), `name` for the rail, and `task` as the session's first message.
44
- Every other action identifies a worktree by the short `id` that `list` prints,
45
- never by path or branch. `list` and `status` label each record relative to the
46
- calling session: `parent` means you created the worktree, `child` means you are
47
- its worktree session, and `other session` means neither. To report to your
48
- parent from a nested worktree, use your own record labelled `child`, not the
49
- record for your parent's worktree. Use `parent` records to contact your own
50
- children. These labels do not grant permission to send, merge, or close another
51
- session's worktree.
52
-
53
- `send` delivers between a worktree session and its parent. A `spawn_worktree`
44
+ Records come back as objects, so filter them in the script rather than reading
45
+ printed text. `spawn` can be slow: pass a larger `timeoutMs` to `exec`. It takes
46
+ `branch`, and optionally `baseRef` (defaults to the current branch), `name` for
47
+ the rail, and `task` as the session's first message. Every other method
48
+ identifies a worktree by its short `id`, never by path or branch. Each record
49
+ carries a `relationship` relative to the calling session: `parent` means you
50
+ created the worktree, `child` means you are its worktree session, and `other`
51
+ means neither. To report to your parent from a nested worktree, use your own
52
+ record with relationship `child`, not the record for your parent's worktree. Use
53
+ `parent` records to contact your own children. These labels do not grant
54
+ permission to send, merge, or close another session's worktree.
55
+
56
+ `send` delivers between a worktree session and its parent. A `spawn`
54
57
  `task` is the first message to the new session. Both use durable Session delivery
55
58
  when available. A delivery error after the worktree is created does not remove
56
59
  the worktree. Do not spawn it again to retry the task.
@@ -64,17 +67,17 @@ itself failed, inspect the worktree and sender outbox before using `send` again.
64
67
 
65
68
  ## What it refuses, and why
66
69
 
67
- - **`close_worktree` on a dirty tree.** It names the uncommitted files and stops.
68
- Pass `force: true` only after reading that list. The files are gone after.
70
+ - **`close` on a dirty tree.** It names the uncommitted files and stops.
71
+ Pass `{ force: true }` only after reading that list. The files are gone after.
69
72
  - **`merge` when the parent checkout is dirty.** The merge lands in the parent,
70
73
  so uncommitted edits there would be folded into a merge commit nobody meant to
71
74
  make. Commit or stash first.
72
- - **`spawn_worktree` on a branch that already has a worktree.** Close the
75
+ - **`spawn` on a branch that already has a worktree.** Close the
73
76
  existing one or pick another branch.
74
77
  - **`prune` never deletes a worktree holding uncommitted work**, and never
75
78
  touches a directory this tool did not create. It reports those instead.
76
79
 
77
- Run `prune` with `dryRun: true` first. The plan tells you exactly what would be
80
+ Run `prune` with `{ dryRun: true }` first. The plan tells you exactly what would be
78
81
  removed, forgotten, and left alone.
79
82
 
80
83
  ## Notes
@@ -83,5 +86,5 @@ removed, forgotten, and left alone.
83
86
  own turn loop, and it does not report back when it finishes.
84
87
  - Closing the parent does not close its worktree sessions. They keep running and
85
88
  stay in the rail.
86
- - `spawn_worktree` needs the cockpit running, because the cockpit owns session
87
- lifecycle. Without it the tool says so rather than half-creating anything.
89
+ - `spawn` needs the cockpit running, because the cockpit owns session
90
+ lifecycle. Without it the call rejects with a message rather than half-creating anything.