@henryqw/pi-herdr-btw 1.0.1 → 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 +31 -42
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,21 +1,6 @@
1
1
  # `@henryqw/pi-herdr-btw`
2
2
 
3
- Pi extension inspired by Claude Code `/btw`, based on [oscabriel/pi-herdr-btw](https://github.com/oscabriel/pi-herdr-btw). Opens a tool-enabled side conversation in a focused Herdr pane without changing parent transcript.
4
-
5
- ## Behavior
6
-
7
- - snapshots parent's current, compaction-aware context
8
- - inherits cwd and uses shared task-model routing
9
- - prefills question for review by default
10
- - leaves parent session unchanged
11
- - supports `/btw merge` to return side-thread transcript and follow-up prompt
12
- - routes Herdr commands through `@henryqw/pi-herdr`
13
-
14
- ## Requirements
15
-
16
- - Pi v0.84.2+
17
- - Herdr v0.7.4+
18
- - Pi running in Herdr-managed pane
3
+ Open a focused Pi side thread in a Herdr pane, then merge its transcript and follow-up prompt into Main.
19
4
 
20
5
  ## Install
21
6
 
@@ -24,48 +9,54 @@ pi install npm:@henryqw/pi-task-models
24
9
  pi install npm:@henryqw/pi-herdr-btw
25
10
  ```
26
11
 
27
- `pi-task-models` loads `/task-models`, which configures shared model profiles used by side-thread launch.
12
+ Requires Pi Coding Agent 0.84.2+, Herdr 0.7.4+, and a Herdr-managed pane.
13
+
14
+ ## With
15
+
16
+ | Package | Why |
17
+ | --- | --- |
18
+ | `@henryqw/pi-task-models` | Required. Shared model profiles for side-thread routes. |
19
+
20
+ ## Use
28
21
 
29
- ## Usage
22
+ | Surface | Type | Purpose |
23
+ | --- | --- | --- |
24
+ | `/btw` | command | Open a side thread, configure its defaults, or recover a pending merge. |
30
25
 
31
26
  ```text
32
- /btw open empty side pane
27
+ /btw open an empty side pane
33
28
  /btw <question...> open side pane with draft question
34
- /btw ask <question...> escape hatch for reserved first words
29
+ /btw ask <question...> escape reserved first words
35
30
  /btw config [...] show or change launch defaults
36
- /btw merge <prompt...> merge side thread into parent and continue
31
+ /btw merge <prompt...> merge side thread into Main and continue
37
32
  /btw help show grammar
38
33
  ```
39
34
 
40
- `ask`, `config`, `merge`, and `help` route only when they are exact first words. Other input is a question.
35
+ `ask`, `config`, `merge`, and `help` route only when exact first words. Other input is a question. A provided question is an editable draft by default. `/btw` snapshots Main's compaction-aware context, inherits its working directory, and uses shared task `pi-herdr-btw/btw`, which defaults to `fast`. It selects first authenticated viable profile route before pane launch.
41
36
 
42
- Model and thinking level come from `@henryqw/pi-task-models`. Task `pi-herdr-btw/btw` defaults to profile `fast`. Run `/task-models` to configure its profile, primary route, and optional fallback. Routes follow Pi's current model scope; first authenticated viable route is selected before pane launch.
37
+ In side pane, `/btw merge <prompt>` sends user/assistant text transcript to Main, refocuses Main, and closes side pane. Main appends transcript without starting a turn, then submits prompt. Bare `/btw merge` opens prompt editor. Pending delivery waits for Main to settle and current model authentication; it survives side-pane shutdown until consumed or 24-hour stale cleanup.
43
38
 
44
- ## Merge
45
-
46
- In side pane, `/btw merge <prompt>` packages user/assistant turns, sends transcript to parent, refocuses parent pane, and closes side pane. Parent appends transcript without triggering a turn, then submits prompt. Bare `/btw merge` opens editor for prompt.
47
-
48
- Pending delivery waits for parent to settle and for current model authentication to be ready. Requests survive child shutdown until parent consumes them or 24-hour stale cleanup expires them.
39
+ Side pane gets static parent context and shares Main's working directory, so enabled tools can change parent-visible files. Large parent contexts can exceed child context limits. Launch data stays in private temporary directory.
49
40
 
50
41
  ## Config
51
42
 
52
- `/btw config` persists launch behavior in `~/.pi/agent/config/pi-herdr-btw.json`. Model routing stays in shared `pi-task-models.json` config.
43
+ `~/.pi/agent/config/pi-herdr-btw.json`
53
44
 
54
- Settings:
55
-
56
- ```text
57
- /btw config
58
- /btw config auto-submit on|off
59
- /btw config tools inherit|all|read-only|none
60
- /btw config split right|down
61
- /btw config reset
45
+ ```json
46
+ {
47
+ "autoSubmit": false,
48
+ "tools": "inherit",
49
+ "split": "right"
50
+ }
62
51
  ```
63
52
 
64
- ## Caveats
53
+ `/btw config` shows defaults. Set `auto-submit on|off`, `tools inherit|all|read-only|none`, or `split right|down`; `reset` removes config. Missing config uses defaults. Malformed config fails visibly and remains unchanged. Model routes live in `~/.pi/agent/config/pi-task-models.json`.
65
54
 
66
- Child gets static parent context. It shares working directory, so enabled tools can change parent-visible files. Large parent contexts can exceed child context limits.
55
+ ## Remove
67
56
 
68
- Launch data uses a private temporary directory and stale entries expire after 24 hours.
57
+ ```bash
58
+ pi remove npm:@henryqw/pi-herdr-btw
59
+ ```
69
60
 
70
61
  ## Development
71
62
 
@@ -74,5 +65,3 @@ npm test --workspace @henryqw/pi-herdr-btw
74
65
  npm run typecheck --workspace @henryqw/pi-herdr-btw
75
66
  npm run pack:check --workspace @henryqw/pi-herdr-btw
76
67
  ```
77
-
78
- MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henryqw/pi-herdr-btw",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Open and merge tool-enabled Pi side threads in Herdr panes.",
5
5
  "keywords": [
6
6
  "pi-package",