pi-farm 0.2.1 → 0.2.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 +20 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -45,6 +45,9 @@ cd pi-plus && ./install.sh
45
45
 
46
46
  依赖:Node.js ≥ 18、tmux、pi(非 pi 的 agent 也可以,见 `agent` 字段)。
47
47
 
48
+ > 若你的 `npm config get registry` 指向内网镜像(例如 Nexus),装不到这个包时显式指定公共源:
49
+ > `npm i -g pi-farm --registry https://registry.npmjs.org/`
50
+
48
51
  Shell 补全(可选):
49
52
 
50
53
  ```bash
@@ -94,8 +97,18 @@ pp n api --save # 同时写进配置文件,重启后自动拉起
94
97
  - 常用选项:`-C/--dir`、`--agent`、`--log`、`--save`、`-a/--attach`、`--no-remote-pi`、`--force`、`--dry-run`
95
98
  - `pp new` 不依赖任何配置文件;`--save` 会在**没有配置时新建** `~/.pi/plus.yml`(或 `-c` / `$PI_PLUS_CONFIG` 指向的路径)并追加这一条
96
99
 
97
- ## 配置参考
100
+ ## 文档
101
+
102
+ | 文档 | 内容 |
103
+ | --- | --- |
104
+ | [docs/configuration.md](docs/configuration.md) | 配置参考:**全部字段**、restart 策略矩阵、remote-pi 三种模式、完整示例、校验规则 |
105
+ | [docs/cli.md](docs/cli.md) | 命令行参考:全局选项、退出码、每个命令的用法/JSON/env |
106
+ | [docs/autostart.md](docs/autostart.md) | 开机自启:systemd 单元为什么必须有 `KillMode=none`、linger、timer、launchd、WSL 两侧配置、冷启动验证 |
107
+ | [docs/architecture.md](docs/architecture.md) | 内部实现:模块职责、`up` 数据流、名字解析、restart 状态机、tmux 目标规则 |
108
+ | [docs/troubleshooting.md](docs/troubleshooting.md) | 排障手册:按报错原文查(起不来、`can't find pane`、名字不对、自启没生效、attach 乱码…) |
109
+ | [docs/development.md](docs/development.md) | 开发指南:跑测试、改代码的规矩、测试分层、发布流程(含 npm staged publishing 的坑) |
98
110
 
111
+ ## 配置参考
99
112
  ```yaml
100
113
  version: 1
101
114
 
@@ -266,6 +279,8 @@ pp version 打印版本
266
279
 
267
280
  ## 开机自启
268
281
 
282
+ 完整说明(`KillMode=none` 的原因、linger、timer、launchd、WSL 两侧、冷启动验证)见 [docs/autostart.md](docs/autostart.md)。
283
+
269
284
  ```bash
270
285
  pp install # 开机/登录时按 restart 策略 up 一次
271
286
  pp install --watch 300 # 另外每 5 分钟巡检,挂了自动补
@@ -330,6 +345,8 @@ sessions:
330
345
 
331
346
  ## 排障
332
347
 
348
+ 完整版见 [docs/troubleshooting.md](docs/troubleshooting.md),这里是最常见的几行:
349
+
333
350
  | 现象 | 处理 |
334
351
  | --- | --- |
335
352
  | `session "x" exited immediately` | `-v` 看实际命令;先用 `check` 确认 cwd/agent;临时加 `remain_on_exit: true` 看报错 |
@@ -340,6 +357,8 @@ sessions:
340
357
 
341
358
  ## 开发
342
359
 
360
+ 详见 [docs/development.md](docs/development.md)。
361
+
343
362
  ```bash
344
363
  npm test # node --test,纯单元测试,不需要 tmux
345
364
  ./test/e2e.sh # 端到端冒烟测试(需 tmux/pi,约 3 分钟,会临时装一个 systemd unit 再删掉)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-farm",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Declarative tmux sessions for pi coding agents (CLI: pp). One YAML drives the tmux session, pi session id/name and remote-pi mesh name, and survives reboots.",
5
5
  "type": "module",
6
6
  "bin": {