@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/README.md +1 -1
- package/dist/extensions/server.cjs +201 -43
- package/dist/extensions/server.cjs.map +1 -1
- package/dist/extensions/server.d.mts.map +1 -1
- package/dist/extensions/server.mjs +201 -43
- package/dist/extensions/server.mjs.map +1 -1
- package/package.json +8 -8
- package/src/prompts/po-use-git/SKILL.md +33 -30
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agimon-ai/po-git",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
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.
|
|
69
|
-
"@agimon-ai/po-session": "0.0.0-alpha.
|
|
70
|
-
"@agimon-ai/po-web-components": "0.0.0-alpha.
|
|
71
|
-
"@agimon-ai/po-web-security": "0.0.0-alpha.
|
|
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.
|
|
80
|
-
"@agimon-ai/po-native-components": "0.0.0-alpha.
|
|
81
|
-
"@agimon-ai/vibe-lint-plugin-po-extension": "0.0.0-alpha.
|
|
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
|
-
`
|
|
9
|
-
|
|
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: `
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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
|
-
- **`
|
|
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
|
-
- **`
|
|
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
|
-
- `
|
|
87
|
-
lifecycle. Without it the
|
|
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.
|