pi-pier 0.1.2 → 0.1.4

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 CHANGED
@@ -1,22 +1,40 @@
1
1
  # pi-pier
2
2
 
3
+ > [!IMPORTANT]
4
+ > **This npm package is only the pi-extension half of pier.** pier is a two-half system — this extension plus a **herdr plugin** (`pier.workbench`). Without the herdr side you still get `todo_write` / `ask_user_question`, but subagents, pane integration, notifications, and the workspace bootstrap all require herdr. See [Install the herdr half](#install-the-herdr-half-companion-plugin) below.
5
+
3
6
  **pier** = **pi** × h**erdr** — a [pi](https://pi.dev/) extension that fuses coding agent sessions with the [herdr](https://herdr.dev/) pane/tab orchestrator.
4
7
 
5
- `pi-pier` is the **pi extension half** of the [pier monorepo](https://github.com/July24/pier). It fills two gaps pi deliberately leaves open — the **todo list loop** and **interactive subagents** — using herdr panes/tabs as the visual and interaction substrate. It degrades gracefully outside herdr.
8
+ `pi-pier` fills two gaps pi deliberately leaves open — the **todo list loop** and **interactive subagents** — using herdr panes/tabs as the visual and interaction substrate. It degrades gracefully outside herdr.
6
9
 
7
- ## Install
10
+ ## Install (this pi half)
8
11
 
9
12
  ```sh
10
13
  pi install npm:pi-pier
11
14
  ```
12
15
 
13
- Or from git:
16
+ Or from git (monorepo root, same content):
14
17
 
15
18
  ```sh
16
19
  pi install git:github.com/July24/pier
17
20
  ```
18
21
 
19
- > The companion **herdr plugin half** (`pier.workbench`: main-tab bootstrap, blocked-gate notifications, focus-heat layout) is installed separately via `herdr plugin install July24/pier/packages/pier-workbench`, or all at once with the one-shot installer in the [repo](https://github.com/July24/pier): `node install.mjs`.
22
+ ## Install the herdr half (companion plugin)
23
+
24
+ The herdr plugin `pier.workbench` provides the other half: main-tab bootstrap (auto-start a pi master session per workspace), blocked-gate notifications (system notifications when a subagent waits for a human), and the focus-heat layout (focused pane grows in place). Install it from the same repo:
25
+
26
+ ```sh
27
+ herdr plugin install July24/pier/packages/pier-workbench --yes
28
+ ```
29
+
30
+ Or install **both halves at once** with the one-shot installer from the monorepo:
31
+
32
+ ```sh
33
+ git clone https://github.com/July24/pier && cd pier
34
+ node install.mjs # user mode: installs both halves + generates local bootstrap config
35
+ ```
36
+
37
+ The installer also verifies node / pi / herdr versions, probes local paths, and writes the workbench bootstrap config (`boot-config.json`) into herdr's plugin config dir.
20
38
 
21
39
  ## What you get
22
40
 
@@ -45,7 +63,7 @@ Outside a herdr environment the extension auto-degrades: herdr reporting costs n
45
63
 
46
64
  - Node ≥ 22
47
65
  - pi ≥ 0.84 (`@earendil-works/pi-coding-agent`)
48
- - herdr ≥ 0.8.0 for the full pane experience (optional)
66
+ - **herdr ≥ 0.8.0** — required for subagents / pane integration / notifications (see the IMPORTANT note above); without it only `todo_write` / `ask_user_question` work
49
67
 
50
68
  ## Development
51
69
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-pier",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "pier: pi extension that fuses pi agent sessions with the herdr pane/tab orchestrator — todo_write loop closure + interactive subagents in isolated panes",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,6 +1,10 @@
1
1
  /**
2
- * D91 网格形态:spawn 时挑「最大格子沿长轴分裂」,让 pane 自然铺成方格
3
- * (用户愿景:股票热力图式方格;横向格更易读最新输出)。
2
+ * D97 网格形态:spawn 时挑「最大格子」一律 down(上下拆),让 pane 长成全宽横条。
3
+ *
4
+ * 动因(用户实证):热力把非焦点格压窄后,横条仍保全宽——pane title 静帧
5
+ * (slim-frame.ts 同源投影)一行横读;旧「方格」拓扑的非焦点格是竖窄条,
6
+ * title 折成一竖列不可读。静帧 overlay 的可见性谓词(长宽 < TUI 下限)与
7
+ * 本拓扑配套:横条命中行数下限、存量竖条命中列数下限,两代布局都被接住。
4
8
  *
5
9
  * 依据 herdr 0.8.2 源码:ratio = split 节点 first child 份额(split_rect:
6
10
  * first_w = width*ratio);layout.apply 不能挂接既有 pane(只建新 shell),
@@ -67,8 +71,9 @@ export function paneCells(root: ShapeNode, width = 200, height = 50): PaneCell[]
67
71
  }
68
72
 
69
73
  /**
70
- * 挑分裂目标:面积最大的格子(并列取先序第一,稳定),沿长轴分裂——
71
- * 宽 ≥ 1.3×高 → right(左右分,保格子横向可读),否则 down。
74
+ * 挑分裂目标:面积最大的格子(并列取先序第一,稳定),一律 down(上下拆)。
75
+ * 模型 200×50 下 pane 数上限(热力 MAX_AUTO_LAYOUT_PANES=10)内条高最低 5 行
76
+ * ——低于 TUI 可用下限即静帧,正是设计语义(条 = title 帧,点击放大看真身)。
72
77
  * exclude = 不许动的格子(board 等无 agent 常驻 shell)。
73
78
  */
74
79
  export function pickGridSplit(
@@ -82,5 +87,5 @@ export function pickGridSplit(
82
87
  for (const c of cells) {
83
88
  if (c.w * c.h > best.w * best.h + 1e-9) best = c;
84
89
  }
85
- return { targetPaneId: best.id, direction: best.w > best.h * 1.3 ? 'right' : 'down' };
90
+ return { targetPaneId: best.id, direction: 'down' };
86
91
  }