@piagent/platform 1.0.2 → 1.1.1

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.
@@ -14,9 +14,9 @@ Repo này phải chạy được cho nhiều project/domain khác nhau. Vì vậ
14
14
 
15
15
  | Use case | Package source |
16
16
  |---|---|
17
- | Team pinned release | `git:github.com/Vt-mmm/piagent@v1.0.2` |
17
+ | Team pinned release | `git:github.com/Vt-mmm/piagent@v1.1.1` |
18
18
  | Personal/sandbox dev | `git:github.com/Vt-mmm/piagent` |
19
- | Registry distribution | `npm:@piagent/platform@1.0.2` |
19
+ | Registry distribution | `npm:@piagent/platform@1.1.1` |
20
20
  | Enterprise npm (fork under another scope) | `npm:@your-scope/platform@x.y.z` |
21
21
  | Local platform dev | `/path/to/piagent` |
22
22
 
@@ -26,7 +26,7 @@ Latest tiện cho máy cá nhân muốn nhận cập nhật nhanh. Pin tag/commi
26
26
 
27
27
  | Channel | Command | Target | Policy |
28
28
  |---|---|---|---|
29
- | `stable` | `bash scripts/install-global.sh --stable` | Helper release tag resolved to commit SHA, currently `v1.0.2` | Install the Pi package matching the helper. |
29
+ | `stable` | `bash scripts/install-global.sh --stable` | Helper release tag resolved to commit SHA, currently `v1.1.1` | Install the Pi package matching the helper. |
30
30
  | `exact` | `bash scripts/install-global.sh --version vX.Y.Z --resolve-tag` | Requested tag resolved to commit SHA | Pi-package-only rollout, rollback, and incident recovery. |
31
31
  | `dev` | `bash scripts/install-global.sh --dev` | Moving Git source | Personal/sandbox only; do not commit into project settings. |
32
32
  | `local` | `bash scripts/install-global.sh --local` | Current checkout path | Platform development only. |
@@ -53,7 +53,7 @@ Root `package.json` có `pi` manifest trỏ tới:
53
53
  Do đó team có thể:
54
54
 
55
55
  ```bash
56
- pi install git:github.com/Vt-mmm/piagent@v1.0.2
56
+ pi install git:github.com/Vt-mmm/piagent@v1.1.1
57
57
  ```
58
58
 
59
59
  Không cần biết internal folder `packages/piagent-core`. Source không pin chỉ dành cho personal/sandbox như bảng channel ở trên.
@@ -64,13 +64,13 @@ Team nên install global package một lần:
64
64
 
65
65
  ```bash
66
66
  node --version # >= 22.19.0
67
- npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.81.1
68
- npm install -g --ignore-scripts @piagent/platform@1.0.2
67
+ npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.0
68
+ npm install -g --ignore-scripts @piagent/platform@1.1.1
69
69
  piagent-install --stable --dry-run
70
70
  piagent-install --stable
71
71
  ```
72
72
 
73
- `pi install git:github.com/Vt-mmm/piagent@v1.0.2` vẫn hợp lệ nếu chỉ cần cài Pi package. Lệnh đó không tự tạo các binary terminal `piagent-*`; muốn có helper global thì dùng `npm install -g --ignore-scripts @piagent/platform@1.0.2`.
73
+ `pi install git:github.com/Vt-mmm/piagent@v1.1.1` vẫn hợp lệ nếu chỉ cần cài Pi package. Lệnh đó không tự tạo các binary terminal `piagent-*`; muốn có helper global thì dùng `npm install -g --ignore-scripts @piagent/platform@1.1.1`.
74
74
 
75
75
  Support matrix hiện tại: macOS Apple Silicon + Bash và Linux x64 + Bash đã được verify; macOS Intel + Bash và Linux ARM64 + Bash là supported target cần chạy smoke trước rollout; native Windows chưa phải target rollout team; WSL2 experimental. Chi tiết và version runtime nằm trong [release/install policy](release-install-policy.md).
76
76
 
@@ -103,7 +103,7 @@ Nếu muốn commit sẵn `.pi/piagent-profile.json` vào repo hoặc bootstrap
103
103
  ```bash
104
104
  bash scripts/setup.sh /path/to/project \
105
105
  --profile be-readonly-fe \
106
- --package-source git:github.com/Vt-mmm/piagent@v1.0.2 \
106
+ --package-source git:github.com/Vt-mmm/piagent@v1.1.1 \
107
107
  --mcp-preset core \
108
108
  --subagents-preset safe
109
109
  ```
@@ -175,7 +175,7 @@ Files không commit:
175
175
  Full platform update phải đồng bộ Pi host, npm-global helper và Pi package:
176
176
 
177
177
  ```bash
178
- npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.81.1
178
+ npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.0
179
179
  npm install -g --ignore-scripts @piagent/platform@X.Y.Z
180
180
  piagent-install --stable --dry-run
181
181
  piagent-install --stable
@@ -4,11 +4,32 @@
4
4
 
5
5
  Herdr dùng để quản lý nhiều session/pane agent. Pi core không cần tự làm subagent ngay từ đầu.
6
6
 
7
+ ## Cài Herdr
8
+
9
+ ```bash
10
+ brew install herdr # macOS
11
+ curl -fsSL https://herdr.dev/install.sh | sh # macOS hoặc Linux
12
+ ```
13
+
14
+ Bản `curl` là cách herdr.dev đặt làm mặc định, nhưng nó chạy script tải về ngay lúc cài. Muốn xem được thứ mình chạy thì dùng `brew`, hoặc tải binary từ [GitHub releases](https://github.com/ogulcancelik/herdr/releases) rồi `chmod +x` và đưa vào `PATH`.
15
+
16
+ Stable chỉ hỗ trợ macOS và Linux. Windows mới có bản preview, và cũng nằm ngoài runtime matrix của platform này.
17
+
7
18
  ## Setup integration
8
19
 
20
+ `piagent-setup` đã chạy `herdr integration install pi` giùm, với điều kiện `herdr` có sẵn trên `PATH` lúc đó. Không có thì nó bỏ qua kèm cảnh báo ra stderr — nên thứ tự đúng là cài Herdr trước, rồi mới `piagent-setup`.
21
+
22
+ Cài Herdr sau khi đã setup thì chạy lại:
23
+
24
+ ```bash
25
+ piagent-setup --global-only
26
+ ```
27
+
28
+ Kiểm tra hoặc cài tay:
29
+
9
30
  ```bash
10
- herdr integration install pi
11
31
  herdr integration status
32
+ herdr integration install pi
12
33
  ```
13
34
 
14
35
  Nếu dùng custom Pi agent dir:
@@ -2,7 +2,19 @@
2
2
 
3
3
  ## Kết luận hiện tại
4
4
 
5
- Pi core không hard-code MCP. Platform của mình cài `pi-mcp-adapter` để Pi dùng MCP theo kiểu token-efficient: một proxy tool `mcp(...)`, server lazy-connect, metadata cache, output guard. Project profile chỉ khai báo capability được phép; MCP config mới khai báo server thật.
5
+ Pi core không hard-code MCP. Platform của mình cài `pi-mcp-adapter` để Pi dùng MCP theo kiểu token-efficient: một proxy tool tên `mcp`, server lazy-connect, metadata cache, output guard. Project profile chỉ khai báo capability được phép; MCP config mới khai báo server thật.
6
+
7
+ **Ba thứ tên giống nhau nhưng không liên quan nhau** — chỗ này gây nhầm nhiều nhất:
8
+
9
+ | Thứ | Ở đâu | Là gì |
10
+ |---|---|---|
11
+ | `mcpCapabilities: ["github", ...]` | `.pi/piagent-profile.json` | Nhãn capability dùng cho tool registry |
12
+ | `toolCapabilities: { "github": ["github"] }` | `base-policy.json` | Map một tool **tên là `github`** sang capability |
13
+ | server `github` | `~/.config/mcp/mcp.json` | Server MCP thật, chạy qua Docker |
14
+
15
+ Không có dòng code nào map capability name sang MCP server id. Khai `"github"` trong `mcpCapabilities` **không** bật server MCP `github`, và ngược lại.
16
+
17
+ `toolPrefix` trong MCP config (`"server" | "none" | "short"`) chỉ đặt tên cho **direct tools** khi bật `directTools: true`. Nó không đổi tên proxy tool — proxy luôn là `mcp`.
6
18
 
7
19
  Từ `v0.3.7`, repo có thêm:
8
20
 
@@ -13,7 +25,17 @@ Từ `v0.3.7`, repo có thêm:
13
25
 
14
26
  ## Cấu hình một lần cho máy cá nhân/team
15
27
 
16
- Global install mặc định sẽ cài adapter và seed preset `core` nếu dùng `scripts/setup.sh` hoặc `scripts/install-global.sh --with-mcp`:
28
+ Cả `piagent-setup` và `piagent-install` đều cài adapter và seed preset `core` **mặc định**. Muốn bỏ qua thì thêm `--no-mcp`.
29
+
30
+ Ghi config **không** bằng dùng được ngay. Server connect lazy, nên mỗi server còn cần thứ của nó trước lần gọi đầu:
31
+
32
+ | Server (preset `core`) | Còn cần gì |
33
+ |---|---|
34
+ | `context7` | Không bắt buộc. `CONTEXT7_API_KEY` chỉ để tăng quota |
35
+ | `chrome-devtools` | Chrome cài sẵn trên máy |
36
+ | `github` | **Docker đang chạy** + `export GITHUB_PERSONAL_ACCESS_TOKEN` |
37
+
38
+ `piagent-mcp --list` in ra yêu cầu của từng server; lệnh apply cũng in danh sách này ra stderr ngay sau khi ghi config.
17
39
 
18
40
  ```bash
19
41
  bash /path/to/piagent/scripts/setup.sh . \
@@ -237,7 +259,9 @@ Tool:
237
259
  piagent_tool_policy_check
238
260
  ```
239
261
 
240
- Default `toolRegistry=advisory`: agent nhận warning khi tool chưa map capability. Project ổn định có thể bật `toolRegistry=enforce` trong `.pi/piagent-profile.json`.
262
+ Default `toolRegistry=advisory`: tool chưa map capability vẫn chạy, nhưng guard phát một notice mức `warning` — **một lần cho mỗi tool trong mỗi session**, không phải mỗi lần gọi.
263
+
264
+ `toolRegistry=enforce` thì đổi notice đó thành block. Cân nhắc trước khi bật: proxy tool của MCP tên là `mcp`, không nằm trong `alwaysAllowedTools` cũng không có trong `toolCapabilities`, nên **enforce sẽ chặn toàn bộ MCP**. Khai thêm `mcpCapabilities` không gỡ được, vì không có mapping nào từ capability name sang MCP server. Ngoại lệ duy nhất là permission profile `trusted-full-access`.
241
265
 
242
266
  Protected-path gate độc lập với registry mode. Dù tool registry đang `advisory`, mọi raw tool call có path-like string trỏ vào protected path sẽ bị block trước khi tool chạy. Cơ chế này áp dụng cho Pi built-ins (`read`, `write`, `edit`, `grep`, `find`, `ls`) và custom/MCP tools nếu tool call đi qua Pi `tool_call` hook.
243
267
 
@@ -13,17 +13,17 @@ Từ đó Pi có thể login provider, chọn model, onboard project, chạy tas
13
13
 
14
14
  Runtime team nên pin release tag hoặc commit đã review. Latest chỉ dùng cho máy cá nhân/sandbox khi chấp nhận cập nhật nhanh.
15
15
 
16
- Support matrix release hiện tại: macOS Apple Silicon + Bash và Linux x64 + Bash đã được verify; macOS Intel + Bash và Linux ARM64 + Bash là supported target cần chạy `piagent-doctor` + smoke test trước khi rollout rộng; native Windows chưa phải target rollout team; WSL2 experimental/chưa release-gate. Node.js tối thiểu là `22.19.0`, Pi Coding Agent là `0.81.1`.
16
+ Support matrix release hiện tại: macOS Apple Silicon + Bash và Linux x64 + Bash đã được verify; macOS Intel + Bash và Linux ARM64 + Bash là supported target cần chạy `piagent-doctor` + smoke test trước khi rollout rộng; native Windows chưa phải target rollout team; WSL2 experimental/chưa release-gate. Node.js tối thiểu là `22.19.0`, Pi Coding Agent là `0.82.0`.
17
17
 
18
18
  ```bash
19
19
  node --version # >= 22.19.0
20
- npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.81.1
21
- npm install -g --ignore-scripts @piagent/platform@1.0.2
20
+ npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.0
21
+ npm install -g --ignore-scripts @piagent/platform@1.1.1
22
22
  piagent-install --stable --dry-run
23
23
  piagent-install --stable
24
24
  ```
25
25
 
26
- Khi seed `.pi/settings.json` cho team/repo cần audit lặp lại, giữ package source dạng pinned tag như `git:github.com/Vt-mmm/piagent@v1.0.2`. Máy cá nhân có thể dùng `git:github.com/Vt-mmm/piagent` để theo latest.
26
+ Khi seed `.pi/settings.json` cho team/repo cần audit lặp lại, giữ package source dạng pinned tag như `git:github.com/Vt-mmm/piagent@v1.1.1`. Máy cá nhân có thể dùng `git:github.com/Vt-mmm/piagent` để theo latest.
27
27
 
28
28
  Nếu đang ở source checkout của platform, dùng helper theo channel để preview trước khi đổi:
29
29
 
@@ -37,7 +37,7 @@ bash scripts/install-global.sh --stable
37
37
  Full update phải đồng bộ exact Pi host trước, rồi npm-global helper và Pi package matching:
38
38
 
39
39
  ```bash
40
- npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.81.1
40
+ npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.0
41
41
  npm install -g --ignore-scripts @piagent/platform@X.Y.Z
42
42
  piagent-install --stable --dry-run
43
43
  piagent-install --stable
@@ -98,8 +98,8 @@ install package once
98
98
  ### Cài Pi và package platform
99
99
 
100
100
  ```bash
101
- npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.81.1
102
- npm install -g --ignore-scripts @piagent/platform@1.0.2
101
+ npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.0
102
+ npm install -g --ignore-scripts @piagent/platform@1.1.1
103
103
  piagent-install --stable --dry-run
104
104
  piagent-install --stable
105
105
  ```
@@ -269,7 +269,7 @@ Không phải daily default. Dùng khi muốn tạo sẵn `.pi` files cho projec
269
269
  bash /path/to/piagent/scripts/setup.sh /path/to/project \
270
270
  --project-only \
271
271
  --profile auto \
272
- --package-source git:github.com/Vt-mmm/piagent@v1.0.2 \
272
+ --package-source git:github.com/Vt-mmm/piagent@v1.1.1 \
273
273
  --mcp-preset core \
274
274
  --subagents-preset safe
275
275
  ```
@@ -842,10 +842,10 @@ Watchdog là optional adversarial reviewer ở cuối turn, không bật mặc
842
842
 
843
843
  | Command | Dùng để |
844
844
  |---|---|
845
- | `npm install -g --ignore-scripts @piagent/platform@1.0.2` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
846
- | `pi install git:github.com/Vt-mmm/piagent@v1.0.2` | Install pinned release cho reproducible team setup. |
845
+ | `npm install -g --ignore-scripts @piagent/platform@1.1.1` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
846
+ | `pi install git:github.com/Vt-mmm/piagent@v1.1.1` | Install pinned release cho reproducible team setup. |
847
847
  | `pi install git:github.com/Vt-mmm/piagent` | Install latest platform package cho máy cá nhân/sandbox. |
848
- | Cài exact Pi host của release, rồi `npm install -g --ignore-scripts @piagent/platform@X.Y.Z` và `piagent-install --stable` | Full update: đồng bộ host, terminal helper và Pi package. v1.0.2 yêu cầu Pi `0.81.1`. |
848
+ | Cài exact Pi host của release, rồi `npm install -g --ignore-scripts @piagent/platform@X.Y.Z` và `piagent-install --stable` | Full update: đồng bộ host, terminal helper và Pi package. Mỗi release pin một Pi host chính xác; lấy đúng version của release đang cài trong [release/install policy](release-install-policy.md). |
849
849
  | Cài exact Pi host ghi trong release cũ, rồi helper `vPREVIOUS` và `piagent-install --stable` | Full rollback; đánh giá lại dependency findings của host cũ trước khi hạ version. |
850
850
  | `piagent-uninstall` | Báo cáo sẽ gỡ những gì. Dry run, không đụng gì. |
851
851
  | `piagent-uninstall --apply` | Gỡ Pi package của platform khỏi Pi settings global. |
@@ -940,7 +940,7 @@ Mở lại Pi session sau khi install.
940
940
  Cài lại terminal helper đúng release rồi kiểm tra `PATH`:
941
941
 
942
942
  ```bash
943
- npm install -g --ignore-scripts @piagent/platform@1.0.2
943
+ npm install -g --ignore-scripts @piagent/platform@1.1.1
944
944
  command -v piagent-install
945
945
  ```
946
946
 
@@ -43,6 +43,7 @@ pi install /path/to/piagent
43
43
  - `0.1.x`: local/internal pilot.
44
44
  - `0.2.x`: có guard ổn định và docs team.
45
45
  - `1.0.2`: đủ security review, MCP registry, adapter schema versioned.
46
+ - `1.1.0`: đọc document ngoài project qua `additionalReadRoots`, MCP baseline bật mặc định ở cả hai lệnh install, pin Pi host `0.82.0`.
46
47
 
47
48
  ## Không publish
48
49
 
@@ -33,105 +33,22 @@ npm install -g @piagent/platform
33
33
  piagent-setup
34
34
  ```
35
35
 
36
- Chạy `piagent-setup` ngay trong thư mục project. Nó tự cài đúng Pi Coding Agent `0.81.1` mà release này pin, cài Pi package, khởi tạo `.pi/`, rồi chạy doctor. Nó cũng cài MCP baseline và subagents; thêm `--no-mcp`, `--no-subagents` nếu không cần, hoặc `--global-only` nếu chưa muốn đụng project nào.
36
+ Chạy `piagent-setup` ngay trong thư mục project. Nó tự cài đúng Pi Coding Agent `0.82.0` mà release này pin, cài Pi package, khởi tạo `.pi/`, rồi chạy doctor. Nó cũng cài MCP baseline, subagents, và Herdr Pi integration nếu `herdr` đã có sẵn trên `PATH`; thêm `--no-mcp`, `--no-subagents`, `--no-herdr` nếu không cần, hoặc `--global-only` nếu chưa muốn đụng project nào.
37
37
 
38
- Vì chạy từ package đã cài, source ghi vào `.pi/settings.json` là `npm:@piagent/platform@<version>` — portable, commit được.
39
-
40
- Muốn cài tay từng lớp để kiểm soát chặt hơn:
41
-
42
- ```bash
43
- node --version # >= 22.19.0
44
- npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.81.1
45
- npm install -g --ignore-scripts @piagent/platform@1.0.2
46
- piagent-install --stable --dry-run
47
- piagent-install --stable
48
- ```
49
-
50
- Lệnh trên cài Pi CLI, cài terminal command `piagent-*`, rồi install Pi Agent Platform bằng stable release đã resolve tag thành commit SHA. Trong output installer, `currentRelease` là version của terminal helper đang chạy. `v1.0.2` là release hiện tại của docs này.
51
-
52
- Nếu chỉ cần cài package vào Pi và không cần terminal command helper:
53
-
54
- ```bash
55
- pi install git:github.com/Vt-mmm/piagent@v1.0.2
56
- ```
57
-
58
- Nếu đang ở source checkout của platform, có thể preview và áp stable bằng helper:
59
-
60
- ```bash
61
- bash scripts/install-global.sh --stable --dry-run
62
- bash scripts/install-global.sh --stable
63
- ```
64
-
65
- Helper stable sẽ resolve tag release hiện tại thành commit SHA trước khi install, nên user vẫn dùng lệnh ngắn nhưng team nhận source bất biến hơn.
66
-
67
- Khi update toàn bộ platform, cập nhật exact Pi host trước rồi dùng helper target để cài Pi package tương ứng:
68
-
69
- ```bash
70
- npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.81.1
71
- npm install -g --ignore-scripts @piagent/platform@X.Y.Z
72
- piagent-install --stable --dry-run
73
- piagent-install --stable
74
- ```
75
-
76
- Rollback toàn bộ dùng cùng flow với `vPREVIOUS`, nhưng phải lấy exact host version từ release policy của target và đánh giá lại dependency risk trước khi hạ host. Nếu chủ ý chỉ đổi Pi package và giữ host/helper hiện tại:
38
+ Nếu dùng [Herdr](https://herdr.dev/docs/install/) thì cài Herdr **trước** `piagent-setup`:
77
39
 
78
40
  ```bash
79
- piagent-install --version vX.Y.Z --resolve-tag --dry-run
80
- piagent-install --version vX.Y.Z --resolve-tag
41
+ brew install herdr # macOS
42
+ curl -fsSL https://herdr.dev/install.sh | sh # macOS hoặc Linux
81
43
  ```
82
44
 
83
- Checklist release canonical nằm tại [release-install-policy.md](release-install-policy.md).
84
-
85
- Máy cá nhân hoặc sandbox có thể dùng latest nếu chấp nhận cập nhật nhanh:
86
-
87
- ```bash
88
- bash scripts/install-global.sh --dev --dry-run
89
- bash scripts/install-global.sh --dev
90
- ```
91
-
92
- Sau bước này, project mới không cần chạy bash init profile. Chỉ cần:
93
-
94
- ```bash
95
- cd /path/to/project
96
- pi
97
- ```
45
+ Không có `herdr` trên `PATH` thì bước integration bị bỏ qua kèm cảnh báo, cài Herdr sau phải chạy lại `piagent-setup --global-only`. Bản `curl` chạy script tải về lúc cài; muốn kiểm tra được thì dùng `brew` hoặc tải từ [GitHub releases](https://github.com/ogulcancelik/herdr/releases). Herdr bản stable hỗ trợ macOS và Linux; Windows mới ở mức preview, mà cũng nằm ngoài runtime matrix của platform này.
98
46
 
99
- Với project đã tin cậy, có thể dùng wrapper để Pi tự approve project-local resources cho lần chạy đó:
100
-
101
- ```bash
102
- piagent-auto
103
- ```
104
-
105
- Read-only auto-run:
106
-
107
- ```bash
108
- piagent-auto --read-only -p "Scout payment mapping. Do not edit source."
109
- ```
110
-
111
- Trusted full-access style run cho repo đã kiểm soát:
112
-
113
- ```bash
114
- piagent-auto --full-access -p "Run the trusted local benchmark suite."
115
- ```
116
-
117
- Wrapper này không bypass piagent guard; nó wrap `pi --approve` và set permission profile cho lần chạy. Dù dùng `--full-access`, protected paths, redaction, destructive shell checks, task gate, và verify evidence vẫn chạy.
118
-
119
- Nếu đã ở trong Pi session, dùng slash command cho nhanh:
120
-
121
- ```text
122
- /permission-status
123
- /full-access Implement/refactor task trong repo trusted này.
124
- ```
47
+ Vì chạy từ package đã cài, source ghi vào `.pi/settings.json` là `npm:@piagent/platform@<version>` — portable, commit được.
125
48
 
126
- `/full-access <task>` chỉ bật full-access cho session hiện tại, không tự ghi `.pi/piagent-profile.json`.
49
+ Xong. Từ đây project nào cũng chỉ cần `cd` vào rồi gõ `pi`.
127
50
 
128
- Nếu chat box/ảnh chụp trả về local path thay vì attachment ảnh, dán path đó trực tiếp vào prompt:
129
-
130
- ```text
131
- /scout Check UI issue from screenshot /var/folders/.../screenshot.png
132
- ```
133
-
134
- Platform sẽ tự attach ảnh và rewrite prompt thành `[image1]` trước khi model xử lý. Hỗ trợ `.png/.jpg/.jpeg/.gif/.webp/.bmp`, tối đa 4 ảnh, 8 MB mỗi ảnh.
51
+ Rollout team pin từng bước, update, rollback, và channel `--dev` cho máy cá nhân: [release-install-policy.md](release-install-policy.md).
135
52
 
136
53
  ## Bước 2 — login OAuth OpenAI Codex/ChatGPT hoặc Claude/Anthropic
137
54
 
@@ -157,47 +74,9 @@ Sau khi login và chọn model intended cho project understanding:
157
74
  /memory-policy
158
75
  ```
159
76
 
160
- Global setup đã config sẵn `enabledModels` cho các provider model families. Anh đổi model bằng selector/hotkey:
161
-
162
- ```text
163
- Ctrl+L # model selector
164
- Ctrl+P # đổi model trong scope
165
- Shift+Tab # đổi thinking
166
- ```
167
-
168
- Nếu muốn xem/re-apply model scope từ terminal: `piagent-models` và `piagent-model-scope --preset full`.
169
-
170
- Nếu muốn xem/re-apply MCP baseline từ terminal:
171
-
172
- ```bash
173
- piagent-mcp --preset core --scope global --replace
174
- piagent-mcp --preset popular --scope global --replace
175
- piagent-mcp --list
176
- ```
177
-
178
- Nếu clone repo GitHub và chưa link npm bin, dùng fallback:
179
-
180
- ```bash
181
- bash /path/to/piagent/scripts/configure-mcp.sh --preset core --scope global --replace
182
- ```
183
-
184
- Nếu muốn xem/re-apply subagents baseline từ terminal:
185
-
186
- ```bash
187
- piagent-subagents --preset safe
188
- # fallback:
189
- bash /path/to/piagent/scripts/configure-subagents.sh --preset safe
190
- ```
77
+ `Ctrl+L` mở model selector, `Ctrl+P` đổi model trong scope, `Shift+Tab` đổi mức thinking. `piagent-setup` đã config sẵn `enabledModels`, MCP baseline preset `core`, và subagents preset `safe` — muốn xem hoặc đổi thì có [model-options.md](model-options.md), [mcp-and-tools.md](mcp-and-tools.md), [subagents-and-multiagent.md](subagents-and-multiagent.md).
191
78
 
192
- Nếu muốn dùng builtin `researcher` cho web/docs research trong Pi:
193
-
194
- ```bash
195
- pi install npm:pi-web-access@0.13.0
196
- # hoặc setup từ đầu:
197
- bash /path/to/piagent/scripts/setup.sh . --with-web-access
198
- ```
199
-
200
- Lệnh này yêu cầu model đọc qua project theo phạm vi có kiểm soát, rồi ghi:
79
+ `/onboard-project` yêu cầu model đọc qua project theo phạm vi có kiểm soát, rồi ghi:
201
80
 
202
81
  ```text
203
82
  .pi/piagent-profile.json
@@ -225,120 +104,41 @@ Nếu chưa có profile/tech stack, dùng select-style flow để tránh agent t
225
104
 
226
105
  ## Bước 4 — init thêm project khác
227
106
 
228
- ```bash
229
- bash /path/to/piagent/scripts/setup.sh /path/to/project \
230
- --project-only \
231
- --profile auto \
232
- --package-source git:github.com/Vt-mmm/piagent@v1.0.2 \
233
- --mcp-preset core \
234
- --subagents-preset safe
235
- ```
236
-
237
- Đổi profile sau này trong Pi:
107
+ Global đã cài rồi nên project sau chỉ cần init:
238
108
 
239
- ```text
240
- /profile list
241
- /profile setup
242
- /profile tech setup
243
- /profile be-readonly-fe
109
+ ```bash
110
+ cd /path/to/project
111
+ piagent-setup --project-only
244
112
  ```
245
113
 
246
- Profile built-in: `generic`, `web-frontend`, `backend-api`, `be-readonly-fe`, `fullstack`, `node-typescript`, `python`, `data`, `devops`, `mobile`, `docs`.
114
+ Nó ghi `npm:@piagent/platform@<version>` vào `.pi/settings.json` — portable, commit được cho cả team.
247
115
 
248
- ## Bước 5 — setup split/preseed nếu cần
249
-
250
- Script bash chỉ dùng khi muốn preseed config vào repo:
251
-
252
- ```bash
253
- bash /path/to/piagent/scripts/setup.sh /path/to/project \
254
- --profile be-readonly-fe \
255
- --package-source git:github.com/Vt-mmm/piagent@v1.0.2 \
256
- --mcp-preset core \
257
- --subagents-preset safe
258
- ```
116
+ Đổi profile sau này thì gõ `/profile setup` trong Pi. Profile built-in: `generic`, `web-frontend`, `backend-api`, `be-readonly-fe`, `fullstack`, `node-typescript`, `python`, `data`, `devops`, `mobile`, `docs`.
259
117
 
260
- ## Bước 6 — chạy hằng ngày
118
+ ## Bước 5 — chạy hằng ngày
261
119
 
262
120
  ```bash
263
- herdr
264
121
  cd <project>
265
122
  pi
266
123
  ```
267
124
 
268
- Prompt mẫu khi requirement chưa rõ:
269
-
270
- ```text
271
- /discuss Cải tiến workflow onboarding cho team mới. Chưa implement, chỉ hỏi lại phần còn thiếu và đề xuất plan.
272
- ```
273
-
274
- Prompt mẫu khi đã rõ task:
275
-
276
- ```text
277
- /task Implement this request. Use piagent_context, piagent_task_start, piagent_context_budget, piagent_exec_policy_check when shell is needed, piagent_verify_record, piagent_trace_record, and piagent_task_gate_check before done.
278
- ```
125
+ Rồi mô tả việc cần làm bằng tiếng Việt hoặc tiếng Anh. Không cần paste checklist — input guard tự collapse boilerplate, và `/task` tự cân nhắc gọi scout/planner/reviewer khi task đủ lớn.
279
126
 
280
- Prompt mẫu khi chỉ cần scout/read-only:
127
+ Muốn chạy nhiều agent song song thì gõ `herdr` thay vì `pi`, rồi mở mỗi pane một vai: implement, review read-only, verify, notes. Herdr chỉ điều phối terminal/session, không phải security boundary — gate vẫn nằm ở Pi extension và OAuth vẫn `/login` trong Pi. Chi tiết: [herdr-workflow.md](herdr-workflow.md).
281
128
 
282
- ```text
283
- /scout Scout payment FE mapping vs BE contract. Backend read-only. Do not edit source.
284
- ```
285
-
286
- Nếu session đang nặng hoặc gặp context overflow:
287
-
288
- ```text
289
- /fresh-scout Scout payment FE mapping vs BE contract. Backend read-only. Do not edit source.
290
- /fresh-task Implement <bounded task>.
291
- /fresh-be-to-fe Implement FE support from <BE contract>. Backend read-only.
292
- ```
293
-
294
- Không paste full mandatory flow hằng ngày. Từ `v0.3.21`, input guard tự collapse mandatory-flow boilerplate và fresh workflow tự mở session mới khi cần.
295
-
296
- Từ `v0.3.21`, `/task` có auto-delegation policy. Với task đủ lớn, parent agent phải tự cân nhắc dùng `piagent-scout`, `piagent-planner`, hoặc `piagent-reviewer`; anh không cần tự gọi `/run` nếu không muốn ép orchestration.
297
-
298
- Các workflow package đáng dùng khi muốn ép rõ shape:
299
-
300
- ```text
301
- /parallel-review current diff
302
- /review-loop current diff max 3 rounds
303
- /parallel-research <question cần external evidence + local code context>
304
- /parallel-context-build <task lớn cần context handoff>
305
- ```
306
-
307
- Prompt mẫu cho 2 recipe hay gặp:
308
-
309
- ```text
310
- /piagent-commands subagents
311
- /platform-improve Improve model selection, MCP setup, and onboarding docs for a public team package.
312
- /be-to-fe Implement FE from BE spec <endpoint/spec>. Backend read-only.
313
- /context-index search auth
314
- /memory-policy Show project memory policy and safe remember workflow.
315
- /run piagent-scout "Map target area read-only before planning."
316
- /run piagent-reviewer "Review current diff before final handoff."
317
- ```
318
-
319
- Cache external source repo để đọc targeted trong Pi:
320
-
321
- ```text
322
- Use piagent_source_checkout for github.com/org/repo, inspect only relevant files, then summarize applicable patterns.
323
- ```
324
-
325
- Runtime gate tools có sẵn:
326
-
327
- ```text
328
- piagent_exec_policy_check # check shell command
329
- piagent_context_budget # check context size/hard cap
330
- piagent_tool_policy_check # check tool capability
331
- piagent_task_gate_check # check before final DONE
332
- ```
333
-
334
- Fallback bằng shell nếu cần:
335
-
336
- ```bash
337
- PIAGENT_PLATFORM_HOME=/path/to/piagent
338
- bash "$PIAGENT_PLATFORM_HOME/packages/piagent-core/skills/piagent-source-cache/checkout-source-repo.sh" \
339
- github.com/org/repo \
340
- --path-only
341
- ```
129
+ | Gõ | Khi nào |
130
+ |---|---|
131
+ | `/discuss <ý tưởng>` | Requirement chưa rõ, muốn hỏi lại trước. |
132
+ | `/task <việc>` | Đã rõ, làm luôn. |
133
+ | `/scout <việc>` | Chỉ đọc, không sửa — map payment/auth/BE contract. |
134
+ | `/plan <mục tiêu>` | Muốn có plan trước khi đụng code. |
135
+ | `/review current diff` | Review việc vừa làm. |
136
+ | `/be-to-fe <việc>` | Backend read-only, làm FE. |
137
+ | `/commit <message>` | Commit local có kiểm soát, không push. |
138
+ | `/pr <title>` | Tạo PR, hỏi xác nhận trước khi push. |
139
+ | `/fresh-task`, `/fresh-scout`, `/fresh-be-to-fe` | Session đang nặng hoặc tràn context. |
140
+
141
+ `/piagent-commands` liệt kê hết. Giải thích từng lệnh: [command-reference-vietnamese.md](command-reference-vietnamese.md). Các workflow ép shape rõ (`/parallel-review`, `/review-loop`, `/parallel-research`, `/parallel-context-build`): [subagents-and-multiagent.md](subagents-and-multiagent.md). Runtime gate tools và cách agent tự dùng chúng: [operator-manual-vietnamese.md](operator-manual-vietnamese.md).
342
142
 
343
143
  ## Việc user vẫn phải làm thủ công
344
144
 
@@ -8,9 +8,9 @@ This file is the canonical install, update, rollback, and release checklist. Oth
8
8
 
9
9
  ## Supported runtime matrix
10
10
 
11
- All supported environments require Node.js `>=22.19.0` and Pi Coding Agent `0.81.1`. The Pi host is installed as a Node CLI; Pi Agent Platform still defines its own release matrix because the terminal helpers and shell policy rely on Bash/POSIX behavior.
11
+ All supported environments require Node.js `>=22.19.0` and Pi Coding Agent `0.82.0`. The Pi host is installed as a Node CLI; Pi Agent Platform still defines its own release matrix because the terminal helpers and shell policy rely on Bash/POSIX behavior.
12
12
 
13
- | Surface | Status for v1.0.2 | Rollout guidance |
13
+ | Surface | Status for v1.1.1 | Rollout guidance |
14
14
  |---|---|---|
15
15
  | macOS Apple Silicon (`darwin/arm64`) + Bash | Verified for this release. | Safe default for team rollout after normal project smoke tests. |
16
16
  | Linux x64 + Bash | Verified in GitHub Actions. | Safe default for CI/server usage after normal project smoke tests. |
@@ -33,7 +33,7 @@ These three components are versioned independently. A full install, update, or r
33
33
 
34
34
  | Channel | Source shape | Mutability | Use when |
35
35
  |---|---|---:|---|
36
- | `stable` | `git:github.com/Vt-mmm/piagent@<resolved-commit-sha>` from `v1.0.2` | Fixed after resolution | Default for team rollout. |
36
+ | `stable` | `git:github.com/Vt-mmm/piagent@<resolved-commit-sha>` from `v1.1.1` | Fixed after resolution | Default for team rollout. |
37
37
  | `exact` | Tag, reviewed commit, or a tag resolved with `--resolve-tag` | Fixed when using a commit SHA | Pi-package-only roll forward, rollback, or reproduction. |
38
38
  | `dev` | `git:github.com/Vt-mmm/piagent` | Moving | Personal machine or sandbox only. |
39
39
  | `local` | `/path/to/piagent` | Local workspace | Platform development and dry-run validation. |
@@ -52,8 +52,8 @@ Use this flow when the team needs both terminal commands and the Pi package:
52
52
 
53
53
  ```bash
54
54
  node --version # >= 22.19.0
55
- npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.81.1
56
- npm install -g --ignore-scripts @piagent/platform@1.0.2
55
+ npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.0
56
+ npm install -g --ignore-scripts @piagent/platform@1.1.1
57
57
  piagent-install --stable --dry-run
58
58
  piagent-install --stable
59
59
  ```
@@ -61,8 +61,8 @@ piagent-install --stable
61
61
  The stable preview and apply output includes:
62
62
 
63
63
  ```text
64
- currentRelease: v1.0.2 (helper package version)
65
- tag: v1.0.2
64
+ currentRelease: v1.1.1 (helper package version)
65
+ tag: v1.1.1
66
66
  resolvedCommit: <40-char-sha>
67
67
  source: git:github.com/Vt-mmm/piagent@<40-char-sha>
68
68
  ```
@@ -79,7 +79,7 @@ bash scripts/install-global.sh --stable
79
79
  Use this only when terminal commands are not needed:
80
80
 
81
81
  ```bash
82
- pi install git:github.com/Vt-mmm/piagent@v1.0.2
82
+ pi install git:github.com/Vt-mmm/piagent@v1.1.1
83
83
  ```
84
84
 
85
85
  Direct `pi install` does not create `piagent-*` commands on `PATH`.
@@ -89,7 +89,7 @@ Direct `pi install` does not create `piagent-*` commands on `PATH`.
89
89
  Update the exact supported Pi host first, then the npm-global helper, then let that target helper resolve and install its matching stable Pi package:
90
90
 
91
91
  ```bash
92
- npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.81.1
92
+ npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.0
93
93
  npm install -g --ignore-scripts @piagent/platform@X.Y.Z
94
94
  piagent-install --stable --dry-run
95
95
  piagent-install --stable
@@ -192,9 +192,12 @@ Before broad team access, a repository administrator must enable these external
192
192
  3. Enable Dependency graph, Dependabot alerts, and Dependabot security updates. Keep `.github/dependabot.yml` enabled for scheduled npm and GitHub Actions update pull requests.
193
193
  4. Enable GitHub private vulnerability reporting so the form linked by `SECURITY.md` works before public rollout.
194
194
  5. Keep secret scanning and push protection enabled. Review CodeQL results after the workflow's first successful run.
195
+ 6. Add the **Code scanning results** check to the `main` branch ruleset and set its alert threshold so that a new high-severity CodeQL alert blocks the merge. The `analyze (...)` jobs required above only prove the analysis ran and uploaded its SARIF; they succeed just as well when the analysis found new high-severity alerts. Without this separate check, a pull request merges green with open high alerts, which is what happened on `v1.1.1`. Requiring the `analyze` jobs is still necessary — it catches an analysis that failed to run — but it is not the results gate and must not be mistaken for one.
195
196
 
196
197
  Verify these settings in GitHub **Settings → Rules** and **Settings → Code security and analysis**. Treat any missing control as an explicit rollout blocker, not as a passing source-code gate. Repository rules also close the remaining mutability risk of bootstrap-by-tag; tag-to-SHA resolution inside `piagent-install` alone cannot protect the helper package before it starts.
197
198
 
199
+ Alerts dismissed as false positives carry their reason in the dismissal comment, and the reason belongs in the source as well when the flagged shape is deliberate. An alert dismissed without a written reason is indistinguishable from an alert nobody read.
200
+
198
201
  ### Required npm publishing controls
199
202
 
200
203
  The publish workflow authenticates with the `NPM_TOKEN` repository secret. That token needs three things, and read-and-write access alone is not enough:
@@ -264,7 +267,15 @@ Re-running the workflow from a branch instead skips publishing, because the publ
264
267
  ```
265
268
 
266
269
  The open release pull request should then resolve against the same commit history. This bypass exists only to reconcile reviewed PR checks with tag-first Vercel promotion; it must never be used for an unreviewed commit or a force-push. If Vercel auto-deploys `main`, this exact fast-forward is the production promotion. For an explicit CLI deploy instead, check out the exact tag, run `vercel link --cwd docs-site --project pi-agent`, require `npm run vercel:preflight` to pass, then deploy with `vercel --cwd docs-site --prod`.
267
- 8. Verify the live docs version, links, canonical domain, and install commands.
270
+ 8. Verify the live docs site at every address it resolves to, then read the page for links and install commands.
271
+
272
+ ```bash
273
+ npm run site:check
274
+ ```
275
+
276
+ Opening the site in a browser does not answer this. The domain has several address records, so one can be dead or looping while every manual look lands on a healthy one. This resolves both hosts, asks each address directly with the right `Host` header and SNI, and requires each to return the released version. A redirect from an address back to its own host is reported as a loop rather than followed.
277
+
278
+ An address the machine has no route to ends the run. It is reported separately from a site failure, because the machine is what is missing rather than the site, but it is not a pass either — the release gate must not report that it verified every address in a run where it verified fewer. Run the check from a machine with routes to every address family the domain publishes. `--allow-unverified` accepts the gap deliberately and names it in the summary; use it only when the missing route is understood and the remaining addresses were verified.
268
279
  9. Publish the already-reviewed draft only after production verification passes:
269
280
 
270
281
  ```bash
@@ -21,7 +21,7 @@ This document covers the packaged guard, project profiles, capability locks, ins
21
21
  - The operator, operating-system account, Pi host, and explicitly trusted project repository are trusted to execute code.
22
22
  - Project-local Pi resources are loaded only after Pi project trust or an explicit operator override.
23
23
  - A human remains available to approve destructive and external-provider actions.
24
- - Supported release verification covers macOS Apple Silicon + Bash, Linux x64 + Bash, Node.js `>=22.19.0`, and the exact Pi host version declared by the release. macOS Intel + Bash and Linux ARM64 + Bash are supported targets that need local smoke verification before broad rollout. Native Windows is not a team-rollout target for v1.0.2, and WSL2 is experimental/unverified.
24
+ - Supported release verification covers macOS Apple Silicon + Bash, Linux x64 + Bash, Node.js `>=22.19.0`, and the exact Pi host version declared by the release. macOS Intel + Bash and Linux ARM64 + Bash are supported targets that need local smoke verification before broad rollout. Native Windows is not a team-rollout target for v1.1.1, and WSL2 is experimental/unverified.
25
25
  - Registry, GitHub, model-provider, MCP-provider, and Vercel controls are external dependencies. Their account security and platform guarantees are not replaced by this repository.
26
26
 
27
27
  ## Threat actors and failure modes