pier-setup 0.2.5 → 0.2.6
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 +32 -5
- package/install.mjs +12 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -90,12 +90,39 @@ herdr plugin link ./packages/pier-workbench # development
|
|
|
90
90
|
|
|
91
91
|
The extension degrades gracefully outside a herdr environment (see Scope below).
|
|
92
92
|
|
|
93
|
-
### Scope (
|
|
93
|
+
### Scope (what the pi extension mutates)
|
|
94
|
+
|
|
95
|
+
`pi-pier` is not dormant outside herdr. After install it is live in every pi session:
|
|
96
|
+
|
|
97
|
+
| Surface | Bare `pi` | Inside herdr |
|
|
98
|
+
|---|---|---|
|
|
99
|
+
| `todo_write`, `/todos`, widget, anti-freeze, stop reminder | live | live |
|
|
100
|
+
| `ask_user_question` | live | live + blocked marker |
|
|
101
|
+
| Hidden inject (`before_agent_start` todo-read; settle reminder) | live | live |
|
|
102
|
+
| `subagent`, `terminal` | **not registered** | live |
|
|
103
|
+
| `/locks`, write-lock, slim-frame, pane title, pipe | off | live |
|
|
104
|
+
| `setActiveTools` role visible layer | off | on (herdr master) |
|
|
105
|
+
|
|
106
|
+
Session JSONL custom types (`pi-herdr.todo-edit`, `.subs`, `.terminals`, `.todo-read`, `.todo-reminder`, …) persist across `/resume` even without herdr.
|
|
107
|
+
|
|
108
|
+
### Plugin conflicts
|
|
109
|
+
|
|
110
|
+
pi overwrites tools/commands by name; event listeners stack. Two todo or subagent plugins will silently replace each other.
|
|
111
|
+
|
|
112
|
+
**Do not install alongside** (same-name overwrite → wrong handler, split JSONL):
|
|
113
|
+
|
|
114
|
+
- [`@nguyenquangthai/pi-todo`](https://pi.dev/packages/@nguyenquangthai/pi-todo) — `todo_write` + overlay
|
|
115
|
+
- [`@josephyoung/pi-ask-user-question`](https://pi.dev/packages/@josephyoung/pi-ask-user-question) — `ask_user_question`
|
|
116
|
+
- [`pi-herdr-subagents`](https://pi.dev/packages/pi-herdr-subagents) — `subagent` + herdr panes
|
|
117
|
+
|
|
118
|
+
**Soft conflict** (two orchestrators / two injectors — the agent “talks to itself”):
|
|
119
|
+
|
|
120
|
+
- [`@tintinweb/pi-subagents`](https://pi.dev/packages/@tintinweb/pi-subagents) (`Agent`)
|
|
121
|
+
- [`@minhduydev/pi-subagents`](https://pi.dev/packages/@minhduydev/pi-subagents) (`task`)
|
|
122
|
+
- any other extension that calls `setActiveTools`, `ui.custom` overlay, `before_agent_start`, or `sendUserMessage`/`sendMessage` followUp
|
|
123
|
+
|
|
124
|
+
**Designed coexistence:** herdr’s official `herdr:pi` reporter. Keep it. pier emits `herdr:blocked` so that plugin remains lifecycle authority.
|
|
94
125
|
|
|
95
|
-
- **pi outside herdr**: the extension degrades — reporting is free, workbench tools
|
|
96
|
-
(`subagent`, terminal family) return a clear "requires a herdr-managed pane" error;
|
|
97
|
-
`todo_write` / `ask_user_question` stay available (session JSONL is the authority,
|
|
98
|
-
no herdr dependency).
|
|
99
126
|
- **other agents inside herdr (claude code / codex etc.)**: tabs without a pi pane
|
|
100
127
|
are excluded from heat reflow; blocked notifications are pi-only; master-tab
|
|
101
128
|
auto-bootstrap can be disabled with `autoBootstrap: false` in boot-config.
|
package/install.mjs
CHANGED
|
@@ -86,8 +86,17 @@ function which(bin) {
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
function run(cmd, args) {
|
|
90
|
-
|
|
89
|
+
function run(cmd, args, opts = {}) {
|
|
90
|
+
// win32: npm 全局 bin 是 .cmd shim,无 shell 直接 spawn 会 ENOENT/EINVAL,须走 cmd.exe;
|
|
91
|
+
// 且 shell:true 时 Node 把 args 按空格裸拼接(不加引号),含空格的路径参数会被拆碎,故预拼接并加引号。
|
|
92
|
+
// POSIX 走原生分支,保持 execFileSync(cmd, args) 原语义。
|
|
93
|
+
if (IS_WIN) {
|
|
94
|
+
const cmdline = [cmd, ...args]
|
|
95
|
+
.map((a) => (/[\s"]/.test(a) ? `"${a.replace(/"/g, '\\"')}"` : a))
|
|
96
|
+
.join(' ');
|
|
97
|
+
return execFileSync(cmdline, { encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'], shell: true, ...opts }).trim();
|
|
98
|
+
}
|
|
99
|
+
return execFileSync(cmd, args, { encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'], ...opts }).trim();
|
|
91
100
|
}
|
|
92
101
|
|
|
93
102
|
function tryRun(cmd, args) {
|
|
@@ -126,9 +135,7 @@ function readPkgVersion(dir) {
|
|
|
126
135
|
|
|
127
136
|
function npmLatest(name) {
|
|
128
137
|
try {
|
|
129
|
-
return
|
|
130
|
-
encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'], timeout: 15000,
|
|
131
|
-
}).trim();
|
|
138
|
+
return run('npm', ['view', name, 'version'], { timeout: 15000 });
|
|
132
139
|
} catch {
|
|
133
140
|
return null;
|
|
134
141
|
}
|