@henryqw/pi-herdr-clone 1.0.0 → 1.0.2

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.
Files changed (2) hide show
  1. package/README.md +11 -13
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,11 +1,6 @@
1
1
  # `@henryqw/pi-herdr-clone`
2
2
 
3
- Continue the current Pi conversation in a new Herdr tab or a fresh Git worktree workspace.
4
-
5
- ## Why
6
-
7
- - **Created for**: Pi users who want to explore or implement from the current conversation in another workspace.
8
- - **Advantage**: Copy only the active conversation path while leaving siblings and the original session untouched.
3
+ Explore or implement from the current Pi conversation in a new Herdr tab or fresh Git worktree workspace. The clone copies only the active path, leaving sibling branches and the original session untouched.
9
4
 
10
5
  ## Install
11
6
 
@@ -15,9 +10,9 @@ pi install npm:@henryqw/pi-herdr-clone
15
10
 
16
11
  Requires the Herdr CLI and a Pi session running inside a Herdr-managed pane.
17
12
 
18
- ## With
13
+ ## Works with
19
14
 
20
- [`@henryqw/pi-herdr-done`](https://pi.henry.wang/extensions/pi-herdr-done) improves worktree clones by cleaning them up when work finishes.
15
+ **Improves.** [`@henryqw/pi-herdr-done`](https://pi.henry.wang/extensions/pi-herdr-done) cleans up worktree clones when work finishes.
21
16
 
22
17
  ## Use
23
18
 
@@ -34,23 +29,26 @@ They copy only the active root-to-leaf path available when invoked into a new pe
34
29
 
35
30
  The original Pi session is not switched. Neither command has configuration.
36
31
 
37
- ### `/clone-tab` behavior
32
+ ## Flow
33
+
34
+ ![Swimlane showing active-path validation, tab and worktree clone routes, launch order, and recovery boundaries.](./docs/clone-flow.svg)
35
+
36
+ ### Clone a tab
38
37
 
39
38
  1. Create an unfocused Herdr tab in the current workspace with the current working directory.
40
39
  2. Start Pi in the tab's root pane with `--session <absolute-clone-file>`.
41
40
  3. Focus the new tab after Pi starts successfully.
42
41
 
43
- ### `/clone-worktree` behavior
42
+ ### Clone a worktree
44
43
 
45
- 1. Create a Git worktree-backed workspace with `herdr worktree create --workspace <current-workspace> --no-focus`.
46
- Herdr creates the branch from `HEAD` unless the name exists, checks out the worktree under its configured `worktrees.directory`, and opens it as a grouped workspace.
44
+ 1. Create a Git worktree-backed workspace with `herdr worktree create --workspace <current-workspace> --no-focus`. Herdr creates the branch from `HEAD` unless the name exists. It checks out the worktree under its configured `worktrees.directory` and opens it as a grouped workspace.
47
45
  2. Wait briefly for a worktree-layout plugin, such as `herdr-plus`, to start its agent in the new workspace's root pane.
48
46
  3. If the root pane is occupied, create an additional unfocused tab in the new workspace with the checkout as its working directory. The plugin's agent and the clone then coexist. Otherwise, use the root pane.
49
47
  4. Copy the active path into a clone session stamped with the fresh checkout path as its working directory.
50
48
  5. Start Pi in the chosen pane with `--session <absolute-clone-file>`.
51
49
  6. Focus the clone's tab after Pi starts successfully.
52
50
 
53
- ### Failure semantics
51
+ ## Limits and recovery
54
52
 
55
53
  - **Target creation failed:** No clone session is kept or created.
56
54
  - **Killed or incomplete creation response:** The result is ambiguous because Herdr may have retained partial state. The error reports every identifier returned so far and suggests inspecting `herdr workspace list`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henryqw/pi-herdr-clone",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Clone the current Pi conversation path into a new Herdr tab.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -25,7 +25,7 @@
25
25
  "pack:check": "npm pack --dry-run"
26
26
  },
27
27
  "peerDependencies": {
28
- "@earendil-works/pi-coding-agent": "^0.85.0"
28
+ "@earendil-works/pi-coding-agent": "^0.85.1"
29
29
  },
30
30
  "dependencies": {
31
31
  "@henryqw/pi-herdr": "^0.4.0"