pi-branch-out 0.1.2 → 0.1.5
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 +12 -8
- package/extensions/branch-out/index.ts +3 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# branch-out for Pi (`pi-branch-out`)
|
|
2
2
|
|
|
3
|
-
Fork the current Pi session into a split terminal pane or new tab with rotating layout policies, and with optional model and message queuing. Routing, split geometry, and focus behavior are
|
|
3
|
+
Fork the current Pi session into a split terminal pane or new tab with rotating layout policies, and with optional model and message queuing. Routing, split geometry, and focus behavior are config-driven. Inside Orca, the fork opens as a new pane in the current terminal tab and worktree.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -102,24 +102,28 @@ rm /tmp/pi-branch-out-layout-state.json
|
|
|
102
102
|
Routing is automatic and tried in this order:
|
|
103
103
|
|
|
104
104
|
1. `--branch-out-terminal` flag override (always wins)
|
|
105
|
-
2.
|
|
106
|
-
3.
|
|
107
|
-
4.
|
|
108
|
-
5.
|
|
109
|
-
6.
|
|
110
|
-
7.
|
|
105
|
+
2. Orca — detected via `ORCA_WORKTREE_ID` and `ORCA_PANE_KEY`
|
|
106
|
+
3. cmux — detected via `CMUX_SOCKET_PATH`
|
|
107
|
+
4. tmux — detected via `TMUX`
|
|
108
|
+
5. iTerm2 — detected via `TERM_PROGRAM=iTerm.app`
|
|
109
|
+
6. Terminal.app — detected via `TERM_PROGRAM=Apple_Terminal`
|
|
110
|
+
7. Ghostty — detected via `GHOSTTY_RESOURCES_DIR` or `TERM_PROGRAM` containing `ghostty`
|
|
111
|
+
8. Alacritty window
|
|
112
|
+
|
|
113
|
+
The Orca backend matches `ORCA_PANE_KEY` to the exact tab and leaf returned by `orca terminal list`, then runs `orca terminal split` against that terminal handle. Orca defaults to a horizontal split that opens the new pane to the right; an explicit `down` preference creates a vertical split. `launchMode` must be `"split"` for Orca.
|
|
111
114
|
|
|
112
115
|
### Backend capability matrix
|
|
113
116
|
|
|
114
117
|
| Backend | `tab` | `split` — static directions | `split` — rotating policies |
|
|
115
118
|
|---------|-------|------------------------------|--------------------------|
|
|
119
|
+
| Orca | — | `right` `down` | Defaults to `right` |
|
|
116
120
|
| cmux | ✓ | `left` `right` `up` `down` | `clockwise` `counterclockwise` |
|
|
117
121
|
| tmux | ✓ | `left` `right` `up` `down` | `clockwise` `counterclockwise` |
|
|
118
122
|
| iTerm2 | ✓ | `right` `down` | — (use fallback list) |
|
|
119
123
|
| Terminal.app | ✓ | — (error) | — (error) |
|
|
120
124
|
| Ghostty | — (new window) | — (error) | — (error) |
|
|
121
125
|
|
|
122
|
-
Backends
|
|
126
|
+
Backends without a default for the requested `splitDirection` fail fast with an explicit error. Use a comma-separated preference list to select a supported direction across backends (e.g. `"counterclockwise,right"`).
|
|
123
127
|
|
|
124
128
|
## Examples
|
|
125
129
|
|
|
@@ -9,9 +9,9 @@ import type {
|
|
|
9
9
|
ExtensionCommandContext,
|
|
10
10
|
ExtensionContext,
|
|
11
11
|
SessionEntry,
|
|
12
|
-
} from "@
|
|
13
|
-
import { SessionManager } from "@
|
|
14
|
-
import { Key, matchesKey } from "@
|
|
12
|
+
} from "@earendil-works/pi-coding-agent"
|
|
13
|
+
import { SessionManager } from "@earendil-works/pi-coding-agent"
|
|
14
|
+
import { Key, matchesKey } from "@earendil-works/pi-tui"
|
|
15
15
|
|
|
16
16
|
const TERMINAL_FLAG = "branch-out-terminal"
|
|
17
17
|
const STATUS_KEY = "branch-out-terminal"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-branch-out",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Fork the current Pi session into a split terminal pane or new tab with rotating layout policies, and with optional model and message queuing",
|
|
3
|
+
"version": "0.1.5",
|
|
4
|
+
"description": "Fork the current Pi session into a split terminal pane or new tab with rotating layout policies, and with optional model and message queuing, and support for cmux, tmux, iTerm2, Terminal.app, Ghostty, and Orca.",
|
|
5
5
|
"keywords": ["pi-package", "pi", "pi-coding-agent"],
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"extensions": ["extensions/branch-out/index.ts"]
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@
|
|
20
|
+
"@earendil-works/pi-coding-agent": ">=0.74.0"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"prepack": "node ../../scripts/pi-package-prepack.mjs"
|