@piagent/platform 1.1.8 → 1.2.0
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/CHANGELOG.md +51 -1
- package/README.md +2 -2
- package/docs/command-reference-vietnamese.md +13 -4
- package/docs/distribution-standard.md +7 -7
- package/docs/mcp-and-tools.md +108 -2
- package/docs/model-options.md +10 -8
- package/docs/operator-manual-vietnamese.md +12 -12
- package/docs/publishing-for-teams.md +2 -0
- package/docs/quickstart-vietnamese.md +2 -2
- package/docs/release-install-policy.md +6 -6
- package/docs/security-threat-model.md +1 -1
- package/docs/team-onboarding.md +4 -4
- package/docs/vercel-docs-site.md +34 -4
- package/docs-site/architecture.html +152 -0
- package/docs-site/assets/docs.css +1001 -0
- package/docs-site/assets/docs.js +84 -0
- package/docs-site/commands.html +203 -0
- package/docs-site/content/architecture.html +29 -0
- package/docs-site/content/commands.html +80 -0
- package/docs-site/content/index.html +80 -0
- package/docs-site/content/mcp-approval.html +81 -0
- package/docs-site/content/mcp-auth.html +76 -0
- package/docs-site/content/mcp-servers.html +111 -0
- package/docs-site/content/mcp.html +120 -0
- package/docs-site/content/permissions.html +54 -0
- package/docs-site/content/profiles.html +68 -0
- package/docs-site/content/quickstart.html +144 -0
- package/docs-site/content/runtime.html +45 -0
- package/docs-site/content/scope.html +71 -0
- package/docs-site/content/security.html +51 -0
- package/docs-site/content/team.html +23 -0
- package/docs-site/content/workflows.html +47 -0
- package/docs-site/index.html +131 -1534
- package/docs-site/mcp-approval.html +204 -0
- package/docs-site/mcp-auth.html +199 -0
- package/docs-site/mcp-servers.html +234 -0
- package/docs-site/mcp.html +243 -0
- package/docs-site/permissions.html +177 -0
- package/docs-site/profiles.html +191 -0
- package/docs-site/quickstart.html +267 -0
- package/docs-site/runtime.html +168 -0
- package/docs-site/scope.html +194 -0
- package/docs-site/security.html +174 -0
- package/docs-site/team.html +142 -0
- package/docs-site/workflows.html +170 -0
- package/package.json +4 -2
- package/packages/piagent-core/capabilities/capability-core.js +17 -1
- package/packages/piagent-core/extensions/document-intake.ts +5 -5
- package/packages/piagent-core/extensions/piagent-guard.ts +319 -4
- package/packages/piagent-core/extensions/update-check.js +41 -0
- package/packages/piagent-core/mcp/mcp-approval-store.js +175 -0
- package/packages/piagent-core/mcp/mcp-auth-readiness.js +197 -0
- package/packages/piagent-core/mcp/mcp-command-actions.js +291 -0
- package/packages/piagent-core/mcp/mcp-config-layers.js +133 -0
- package/packages/piagent-core/mcp/mcp-server-catalog.js +150 -0
- package/packages/piagent-core/mcp/mcp-server-entry.js +242 -0
- package/packages/piagent-core/mcp/mcp-session-view.js +185 -0
- package/packages/piagent-core/package.json +7 -3
- package/packages/piagent-core/prompts/model-options.md +8 -8
- package/scripts/build-docs-site.mjs +421 -0
- package/scripts/configure-model-scope.sh +2 -2
- package/scripts/configure-subagents.sh +1 -1
- package/scripts/install-global.sh +5 -5
- package/scripts/mcp-manage.mjs +567 -0
- package/scripts/piagent-cli.mjs +1 -1
- package/scripts/preview-docs-site.mjs +88 -0
- package/scripts/setup.sh +2 -2
- package/scripts/team-doctor.sh +18 -2
- package/scripts/verify-local.sh +46 -19
- package/scripts/verify-release-identity.mjs +8 -2
- package/scripts/configure-mcp.sh +0 -349
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
This file records release-facing changes for Pi Agent Platform. Copy the relevant version block into GitHub Releases when publishing a tag.
|
|
4
4
|
|
|
5
|
+
## v1.2.0 - 2026-07-28
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- `piagent-mcp` manages servers instead of only seeding presets: `add`, `remove`, `get`, `list`, `enable`, `disable` and `doctor`, across the four config layers via `--scope`. `add` reports which scope it wrote and the exact file it changed, so nobody has to guess which layer is in effect. A server added by hand keeps surviving `piagent-update`, because a preset only rewrites the server IDs it owns.
|
|
10
|
+
|
|
11
|
+
- A server a repository defines is not usable until somebody on this machine approves it. `.mcp.json` and `.pi/mcp.json` travel with a clone, and opening a session in one should not hand its author a process here with this operator's credentials. `piagent-mcp approve` prints the definition before recording the decision, `reject` and `reset` are the other two answers, and the decision is stored in `~/.pi/piagent-mcp-approvals.json` rather than in the repository — a repository that can approve its own servers has not been gated.
|
|
12
|
+
|
|
13
|
+
The record pins the digest of what was approved. Approval is consent to what the server runs, so changing its command, URL or arguments returns it to pending, which is the same split the capability lock draws between consent and build.
|
|
14
|
+
|
|
15
|
+
Enforcement is in the guard's `tool_call` hook, covering both the `mcp` proxy and the `mcp__<server>__<tool>` form that `directTools` produces. The adapter owns the connection and the extension cannot prevent one being opened, so what is stopped is every tool call, not the connection itself. Servers in the global layers are not gated: nothing a repository contains can put a server there.
|
|
16
|
+
|
|
17
|
+
- MCP is a command inside a session, not a request to the model. `/piagent-mcp` on its own opens a menu, because a surface only helps if it can be found without already knowing the subcommand. The menu is built from what the project has: approving is not offered when nothing is waiting on a decision, and each entry carries its own count. Picking an action that needs a server asks which one, unless there is only one it could be.
|
|
18
|
+
|
|
19
|
+
Every entry is also typeable — `status`, `get`, `doctor`, `approve`, `reject`, `reset`, `enable`, `disable` — and both paths run the same code, so the menu teaches the direct form instead of replacing it. Subcommands and server names autocomplete. Where no prompt can be answered, in print and JSON mode, the report and the subcommand list are printed rather than blocking on a question nobody can answer.
|
|
20
|
+
|
|
21
|
+
Typing the shell command mid-session asked the model to run bash, read the output and report back — three model turns for a question this process answers from files it has already read, and a different summary each time. Pi dispatches a registered command straight to its handler, so the model is not involved at all.
|
|
22
|
+
|
|
23
|
+
Adding and removing a server stay in the terminal: `add` carries shell quoting, `${VAR}` references and a `--` command line. Those already have one correct parser, and it is the shell; a slash command that re-implemented it would be a second, worse one. `/piagent-mcp add` prints the terminal command rather than guessing at one.
|
|
24
|
+
|
|
25
|
+
Both surfaces read the same module, so the two cannot disagree about whether a server is usable. Remedies name the form that works where they are read: the session prints `/piagent-mcp approve <name>`, the terminal prints `piagent-mcp approve <name>`.
|
|
26
|
+
|
|
27
|
+
- `piagent-mcp doctor` and `piagent-doctor` say what each configured server still needs — a referenced variable that is not exported, an executable that is not on PATH, a decision that has not been made, the Docker daemon not answering. Counting configured servers, which is what the doctor did before, says nothing about whether any of them can answer. A session start names the ones that are definitely stuck; `PIAGENT_NO_MCP_NOTICE=1` switches that off.
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- `piagent-mcp add` refuses to write a credential into MCP config and prints the reference form to use instead. The check reads both the field name and the value, so `--env CONFIG=ghp_...` is caught as well as `--env GITHUB_TOKEN=...`, and it covers `--header` too. `--url` accepts https, or http only on loopback. `list` and `get` mask values while leaving `${VAR}` readable, because that is a variable name rather than its contents.
|
|
32
|
+
|
|
33
|
+
OAuth is not automated and no token is stored by this platform. Pi already owns that flow — `/mcp-auth <server>` — and a third credential store holding other people's credentials would be worse than either of the two that already exist.
|
|
34
|
+
|
|
35
|
+
- `scripts/configure-mcp.sh` is replaced by `scripts/mcp-manage.mjs`; the pinned server catalog moved into `packages/piagent-core/mcp/`, where the capability lock pins it. The `piagent-mcp` command is unchanged. The three MCP files that decide which servers a session may call are now part of the locked runtime set.
|
|
36
|
+
|
|
37
|
+
- The docs site is one page per topic instead of a single file, grouped in the sidebar as Get started, Build, MCP and Operate. MCP has four pages of its own, since it now has a command surface, an approval decision and an auth story to explain. Each page carries a table of contents and previous/next links.
|
|
38
|
+
|
|
39
|
+
Pages are generated by `scripts/build-docs-site.mjs` from a content fragment each, plus shared `docs-site/assets/docs.css` and `docs-site/assets/docs.js`. The generated HTML is committed, because the site is served as static files with no build step, and `npm run verify` fails when the committed output no longer matches its source. `npm run site:preview` serves the result the way the deployment does — the site relies on clean URLs, so an ordinary static server answers 404 for every internal link.
|
|
40
|
+
|
|
41
|
+
- Public text describes this platform on its own terms rather than against named competing products. The page that compared feature tables now states what the platform takes on and what it leaves to the host, and is called Phạm vi platform rather than carrying two other products' names in the sidebar of every page. The same wording pass covers the MCP pages, `docs/mcp-and-tools.md` and a design-rationale comment in `document-intake.ts`.
|
|
42
|
+
|
|
43
|
+
Where "Codex" and "Claude" mean model families they are now labelled as such, with their provider ids, so a reader cannot mistake a model choice for a different tool. `--model-scope` and `--preset` say "model families" in their help text for the same reason.
|
|
44
|
+
|
|
45
|
+
The wording gate in `npm run verify` only read `README.md`, `docs/`, the prompts and the project template, which is why the site and the runtime strings were never checked. It now also reads `docs-site/content`, the site builder — navigation labels live there, not in a fragment — and the `mcp` and `extensions` directories that print to an operator.
|
|
46
|
+
|
|
47
|
+
## v1.1.9 - 2026-07-28
|
|
48
|
+
|
|
49
|
+
### Fixed
|
|
50
|
+
|
|
51
|
+
- The update notice reaches the install path people actually use. v1.1.8 decided a platform tree was a maintainer's working copy when it found a `.git` directory in it — but `pi install git:...` clones the repository, so an ordinary install carries a `.git` and every other file a working copy carries. There is no mark inside the tree that separates them, which meant the notice never appeared for anyone who installed the documented way.
|
|
52
|
+
|
|
53
|
+
What separates them is where they sit: Pi puts packages it installed under its own agent directory, and npm puts the global helper under `node_modules`. A tree anywhere else is a working copy and is still told nothing. `PI_CODING_AGENT_DIR` is honoured, and both paths are resolved before comparison, because a home reached through a symlink is ordinary — macOS reaches `/var` that way — and comparing a real path against a symlinked one made an install look like it was somewhere else.
|
|
54
|
+
|
|
5
55
|
## v1.1.8 - 2026-07-28
|
|
6
56
|
|
|
7
57
|
### Added
|
|
@@ -233,7 +283,7 @@ Breaking release. The `company` namespace is replaced by `piagent` with no alias
|
|
|
233
283
|
|
|
234
284
|
### Changed
|
|
235
285
|
|
|
236
|
-
- Clarified public docs
|
|
286
|
+
- Clarified in the public docs where this platform sits relative to a general agent coding CLI: Pi Company Platform brings similar governance concepts into Pi and packages them for team workflows.
|
|
237
287
|
- Reworded security docs to describe the guard as an application-level policy enforcement layer, not a complete security boundary or OS sandbox.
|
|
238
288
|
- Split install guidance so production/team setup uses pinned `v0.4.8` or resolved commit sources, while latest is reserved for personal/sandbox use.
|
|
239
289
|
- Clarified that redaction benchmarks and internal review are not equivalent to an external security audit.
|
package/README.md
CHANGED
|
@@ -248,7 +248,7 @@ This repository intentionally excludes:
|
|
|
248
248
|
## Documentation
|
|
249
249
|
|
|
250
250
|
- [Public docs site](https://piagent.io.vn)
|
|
251
|
-
- [Static team docs site](docs-site/index.html)
|
|
251
|
+
- [Static team docs site](docs-site/index.html) — generated from `docs-site/content/`, preview with `npm run site:preview`
|
|
252
252
|
- [Changelog](CHANGELOG.md)
|
|
253
253
|
- [Vercel docs site deploy](docs/vercel-docs-site.md)
|
|
254
254
|
- [Operator manual tiếng Việt](docs/operator-manual-vietnamese.md)
|
|
@@ -283,7 +283,7 @@ This repository intentionally excludes:
|
|
|
283
283
|
|
|
284
284
|
## Maturity
|
|
285
285
|
|
|
286
|
-
The current package version is read from package metadata and release tags. Personal machines may follow the unpinned package source when accepting ongoing updates; production/team quickstarts and committed project settings should pin an explicit tag such as `v1.
|
|
286
|
+
The current package version is read from package metadata and release tags. Personal machines may follow the unpinned package source when accepting ongoing updates; production/team quickstarts and committed project settings should pin an explicit tag such as `v1.2.0` or a reviewed commit.
|
|
287
287
|
|
|
288
288
|
Ready for:
|
|
289
289
|
|
|
@@ -222,7 +222,7 @@ Các command này thuộc Pi core hoặc package Pi chính. Tên/availability c
|
|
|
222
222
|
|
|
223
223
|
| Command/hotkey | Dịch nghĩa | Dùng khi nào | Ghi chú |
|
|
224
224
|
|---|---|---|---|
|
|
225
|
-
| `/login` | Đăng nhập provider | Lần đầu dùng OpenAI
|
|
225
|
+
| `/login` | Đăng nhập provider | Lần đầu dùng model OpenAI Codex hoặc model Anthropic Claude. | OAuth/session lưu local trong Pi, không commit repo. |
|
|
226
226
|
| `/model` | Chọn model | Muốn chọn OpenAI provider bằng native selector. | Đây là flow chính, không phải hỏi agent tự chọn thay. |
|
|
227
227
|
| `Ctrl+L` | Mở model selector | Đổi model nhanh. | Tương đương UI selector của Pi. |
|
|
228
228
|
| `/scoped-models` | Chỉnh danh sách model cycle | Muốn `Ctrl+P` chỉ xoay quanh vài model hay dùng. | Global setup seed sẵn provider model families. |
|
|
@@ -237,6 +237,15 @@ Các command này thuộc Pi core hoặc package Pi chính. Tên/availability c
|
|
|
237
237
|
| `/mcp tools` | List MCP tools | Muốn biết server expose tool nào. | Dùng trước khi bảo agent gọi tool ngoài. |
|
|
238
238
|
| `/mcp reconnect` | Kết nối lại MCP | Khi server lỗi, token mới, hoặc config đổi. | Không thay thế việc export secret env. |
|
|
239
239
|
| `/mcp-auth figma` | OAuth Figma MCP | Khi dùng Figma remote MCP. | Có thể khác theo Figma/Pi MCP package version. |
|
|
240
|
+
| `/piagent-mcp` | Menu MCP | Không nhớ subcommand, hoặc muốn xem có việc gì cần làm. | Menu dựng theo project; không có select UI thì in thẳng bảng trạng thái. |
|
|
241
|
+
| `/piagent-mcp status` | Danh sách MCP server + state | Muốn biết server nào đang có, ở scope nào, sẵn sàng chưa. | Đọc config, không kiểm tra kết nối live — cái đó là `/mcp`. |
|
|
242
|
+
| `/piagent-mcp get <name>` | Chi tiết một server | Trước khi duyệt, hoặc khi không rõ scope nào đang có hiệu lực. | Giá trị credential bị mask; `${VAR}` in nguyên vì là tên biến. |
|
|
243
|
+
| `/piagent-mcp doctor` | Server nào chưa chạy được và thiếu gì | Sau khi cài, hoặc khi tool call MCP bị chặn. | Không probe Docker daemon; chạy `piagent-mcp doctor` ở terminal cho việc đó. |
|
|
244
|
+
| `/piagent-mcp approve <name>` | Duyệt server repo khai | Khi mở một repo có `.mcp.json`. | In định nghĩa ra trước khi ghi quyết định. Pin theo digest. |
|
|
245
|
+
| `/piagent-mcp reject <name>` | Từ chối | Không tin server repo khai. | `reset` để quên quyết định. |
|
|
246
|
+
| `/piagent-mcp enable\|disable <name>` | Bật/tắt server | Tắt tạm mà không mất định nghĩa. | Cần `/reload` để adapter nhận thay đổi. |
|
|
247
|
+
|
|
248
|
+
`/piagent-mcp` chạy thẳng trong session, không qua model. Thêm/xoá server và preset ở terminal: `piagent-mcp add|remove|--preset`.
|
|
240
249
|
|
|
241
250
|
## Command subagent
|
|
242
251
|
|
|
@@ -419,8 +428,8 @@ Các lệnh này chạy ngoài Pi.
|
|
|
419
428
|
| Command | Dùng khi nào |
|
|
420
429
|
|---|---|
|
|
421
430
|
| `npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.0` | Cài Pi CLI tương thích với release hiện tại. |
|
|
422
|
-
| `npm install -g --ignore-scripts @piagent/platform@1.
|
|
423
|
-
| `pi install git:github.com/Vt-mmm/piagent@v1.
|
|
431
|
+
| `npm install -g --ignore-scripts @piagent/platform@1.2.0` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
|
|
432
|
+
| `pi install git:github.com/Vt-mmm/piagent@v1.2.0` | Cài pinned release khi cần reproducible team setup. |
|
|
424
433
|
| `pi install git:github.com/Vt-mmm/piagent` | Cài latest package platform cho máy cá nhân/sandbox. |
|
|
425
434
|
| `piagent-update --check` | Báo version hiện tại vs version sẽ lên cho cả ba thành phần; không cài gì. |
|
|
426
435
|
| `piagent-update` | Full update một lệnh: Pi host → npm-global helper → Pi package, đúng thứ tự release yêu cầu. Thêm `--project <path>` để chạy doctor sau. |
|
|
@@ -478,7 +487,7 @@ Khi đang develop chính repo `piagent`, có thể dùng npm scripts tương ứ
|
|
|
478
487
|
| `npm run usage -- <project>` | `bash scripts/pi-session-stats.sh <project>` |
|
|
479
488
|
| `npm run models` | `bash scripts/pi-model-catalog.sh` |
|
|
480
489
|
| `npm run model-scope -- --preset full` | `bash scripts/configure-model-scope.sh --preset full` |
|
|
481
|
-
| `npm run mcp -- --preset core --scope global --replace` | `
|
|
490
|
+
| `npm run mcp -- --preset core --scope global --replace` | `node scripts/mcp-manage.mjs --preset core --scope global --replace` |
|
|
482
491
|
| `npm run subagents -- --preset safe` | `bash scripts/configure-subagents.sh --preset safe` |
|
|
483
492
|
|
|
484
493
|
## MCP command quick map
|
|
@@ -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.
|
|
17
|
+
| Team pinned release | `git:github.com/Vt-mmm/piagent@v1.2.0` |
|
|
18
18
|
| Personal/sandbox dev | `git:github.com/Vt-mmm/piagent` |
|
|
19
|
-
| Registry distribution | `npm:@piagent/platform@1.
|
|
19
|
+
| Registry distribution | `npm:@piagent/platform@1.2.0` |
|
|
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.
|
|
29
|
+
| `stable` | `bash scripts/install-global.sh --stable` | Helper release tag resolved to commit SHA, currently `v1.2.0` | 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.
|
|
56
|
+
pi install git:github.com/Vt-mmm/piagent@v1.2.0
|
|
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.
|
|
@@ -65,12 +65,12 @@ Team nên install global package một lần:
|
|
|
65
65
|
```bash
|
|
66
66
|
node --version # >= 22.19.0
|
|
67
67
|
npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.0
|
|
68
|
-
npm install -g --ignore-scripts @piagent/platform@1.
|
|
68
|
+
npm install -g --ignore-scripts @piagent/platform@1.2.0
|
|
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.
|
|
73
|
+
`pi install git:github.com/Vt-mmm/piagent@v1.2.0` 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.2.0`.
|
|
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.
|
|
106
|
+
--package-source git:github.com/Vt-mmm/piagent@v1.2.0 \
|
|
107
107
|
--mcp-preset core \
|
|
108
108
|
--subagents-preset safe
|
|
109
109
|
```
|
package/docs/mcp-and-tools.md
CHANGED
|
@@ -18,11 +18,117 @@ Không có dòng code nào map capability name sang MCP server id. Khai `"github
|
|
|
18
18
|
|
|
19
19
|
Từ `v0.3.7`, repo có thêm:
|
|
20
20
|
|
|
21
|
-
- `piagent-mcp` / `scripts/
|
|
21
|
+
- `piagent-mcp` / `scripts/mcp-manage.mjs`;
|
|
22
22
|
- MCP preset `core`, `popular`, `all`, `design`, `design-local`, `browser`, `docs`, `github`;
|
|
23
23
|
- template `.mcp.json` project-shared;
|
|
24
24
|
- doctor warning khi adapter có nhưng không có MCP server nào.
|
|
25
25
|
|
|
26
|
+
## Hai bề mặt
|
|
27
|
+
|
|
28
|
+
Trong session Pi thì dùng slash command, ngoài terminal thì dùng CLI. Cùng module đọc config, cùng cách phân loại trạng thái.
|
|
29
|
+
|
|
30
|
+
| Việc | Trong session | Trong terminal |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| Mở menu | `/piagent-mcp` | — |
|
|
33
|
+
| Danh sách + state | `/piagent-mcp status` | `piagent-mcp list` |
|
|
34
|
+
| Chi tiết một server | `/piagent-mcp get <name>` | `piagent-mcp get <name>` |
|
|
35
|
+
| Thiếu gì để chạy | `/piagent-mcp doctor` | `piagent-mcp doctor` |
|
|
36
|
+
| Duyệt server của repo | `/piagent-mcp approve <name>` | `piagent-mcp approve <name>` |
|
|
37
|
+
| Bật/tắt | `/piagent-mcp enable\|disable <name>` | `piagent-mcp enable\|disable <name>` |
|
|
38
|
+
| Thêm/xoá/preset | — | `piagent-mcp add\|remove\|--preset` |
|
|
39
|
+
| Kết nối live, OAuth | `/mcp`, `/mcp-auth <name>` | — |
|
|
40
|
+
|
|
41
|
+
Slash command do Pi dispatch thẳng tới handler và **không đi qua model**: gõ `piagent-mcp list` giữa session là nhờ model chạy bash, đọc output rồi thuật lại — ba lượt model cho một câu hỏi process này trả lời được từ file nó đã đọc.
|
|
42
|
+
|
|
43
|
+
Thêm và xoá server ở lại terminal: `add` mang shell quoting, tham chiếu `${VAR}` và một command line sau `--` — ba thứ đã có sẵn một bộ parse đúng là chính shell, viết lại bên trong slash command chỉ tạo ra bộ parse thứ hai tệ hơn. Gọi `/piagent-mcp add` sẽ in ra lệnh terminal tương ứng chứ không đoán.
|
|
44
|
+
|
|
45
|
+
Gõ `/piagent-mcp` không tham số sẽ mở menu dựng theo đúng thứ project đang có — chưa server nào bị tắt thì không hiện "bật lại", không server nào chờ duyệt thì không hiện "approve". Chọn một việc cần server thì nó hỏi tiếp server nào, trừ khi chỉ có đúng một lựa chọn. Mọi mục trong menu đều gõ thẳng được, nên menu dạy dạng trực tiếp chứ không thay thế.
|
|
46
|
+
|
|
47
|
+
Không có select UI (print mode `-p`, JSON mode) thì in thẳng bảng trạng thái + danh sách subcommand, không treo chờ trả lời.
|
|
48
|
+
|
|
49
|
+
`/piagent-mcp` có auto-complete cho subcommand và tên server.
|
|
50
|
+
|
|
51
|
+
## Quản lý server
|
|
52
|
+
|
|
53
|
+
`piagent-mcp` có subcommand đầy đủ, không chỉ preset:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
piagent-mcp add sentry --url https://mcp.sentry.dev/mcp --scope global
|
|
57
|
+
piagent-mcp add internal --scope project -- npx -y @acme/internal-mcp
|
|
58
|
+
piagent-mcp list
|
|
59
|
+
piagent-mcp get sentry
|
|
60
|
+
piagent-mcp disable sentry # giữ định nghĩa, chỉ tắt
|
|
61
|
+
piagent-mcp remove sentry --scope global
|
|
62
|
+
piagent-mcp doctor
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
`--scope` nhận `global`, `pi-global`, `project`, `pi-project` — ứng với 4 file ở bảng bên dưới. Mặc định `global`. `add` in ra scope và **đường dẫn file vừa sửa**, để không phải đoán config nào đang có hiệu lực.
|
|
66
|
+
|
|
67
|
+
Server tự thêm sống sót qua mọi lần `piagent-update`: preset chỉ ghi đè đúng những server ID nó sở hữu. Ngược lại, sửa tay một server thuộc preset (`github`, `context7`…) sẽ bị `--replace` đưa về baseline ở lần update kế tiếp — muốn giữ bản riêng thì đặt tên khác.
|
|
68
|
+
|
|
69
|
+
## Secret không bao giờ nằm trong config
|
|
70
|
+
|
|
71
|
+
`add` **từ chối** giá trị trông giống credential và in ra dạng cần dùng:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
$ piagent-mcp add gh --env GITHUB_PERSONAL_ACCESS_TOKEN=ghp_xxx -- npx -y @acme/gh-mcp
|
|
75
|
+
FAIL: GITHUB_PERSONAL_ACCESS_TOKEN names a credential, so its value cannot be
|
|
76
|
+
written into MCP config. Export it in your shell and reference it instead:
|
|
77
|
+
--env 'GITHUB_PERSONAL_ACCESS_TOKEN=${GITHUB_PERSONAL_ACCESS_TOKEN}'
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Chặn theo hai lớp: tên field nghe như credential, và giá trị tự nó trông như secret (bắt được cả `--env CONFIG=ghp_...`). Áp dụng cho cả `--env` lẫn `--header`.
|
|
81
|
+
|
|
82
|
+
`--url` chỉ nhận `https`, hoặc `http` khi host là loopback — Figma desktop MCP là đúng trường hợp đó.
|
|
83
|
+
|
|
84
|
+
`list` và `get` mask giá trị; riêng `${VAR}` được in nguyên vì đó là **tên biến**, không phải nội dung.
|
|
85
|
+
|
|
86
|
+
## Login vào account MCP
|
|
87
|
+
|
|
88
|
+
Platform **không tự chạy OAuth và không giữ token**. `pi-mcp-adapter` đã sở hữu luồng đó — nó đăng ký `/mcp` và `/mcp-auth`, giữ callback server và OAuth provider — và dựng kho credential thứ ba cho credential của bên khác là lựa chọn tệ hơn. Việc của platform là phát hiện và chỉ đường:
|
|
89
|
+
|
|
90
|
+
```text
|
|
91
|
+
/mcp-auth figma
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
`/piagent-mcp doctor` (hoặc `piagent-mcp doctor` ngoài terminal) phân loại từng server:
|
|
95
|
+
|
|
96
|
+
| State | Nghĩa |
|
|
97
|
+
|---|---|
|
|
98
|
+
| `ready` | đủ điều kiện, gọi được |
|
|
99
|
+
| `needs-env` | config tham chiếu `${VAR}` mà biến chưa export (chỉ in **tên biến**) |
|
|
100
|
+
| `needs-command` | executable không có trên PATH |
|
|
101
|
+
| `pending-approval` | repo khai server này, chưa ai duyệt trên máy này |
|
|
102
|
+
| `approval-changed` | đã duyệt nhưng định nghĩa đã đổi |
|
|
103
|
+
| `rejected` | đã từ chối cho project này |
|
|
104
|
+
| `disabled` | tắt bằng `/piagent-mcp disable` |
|
|
105
|
+
| `oauth` | đăng nhập do Pi giữ; platform không biết còn hạn hay không |
|
|
106
|
+
|
|
107
|
+
`oauth` **không** bị coi là lỗi, và không xuất hiện trong notice đầu session — platform không phân biệt được đã login hay chưa, nên báo mỗi session sẽ thành nhiễu.
|
|
108
|
+
|
|
109
|
+
`doctor` chạy thêm `docker info` (chậm, nên chỉ ở doctor chứ không ở session start). `piagent-doctor` cũng đưa các state chặn vào `warnings`.
|
|
110
|
+
|
|
111
|
+
## Approval gate cho server đến từ repo
|
|
112
|
+
|
|
113
|
+
Repo mang theo được `.mcp.json` và `.pi/mcp.json`. Clone một repo lạ rồi mở session **không** được phép cho tác giả repo đó một process trên máy mình với credential của mình. Nên server ở hai scope này không dùng được cho tới khi có người trên máy này duyệt.
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
piagent-mcp get internal # đọc trước
|
|
117
|
+
piagent-mcp approve internal # hoặc reject / remove
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Ba tính chất quan trọng:
|
|
121
|
+
|
|
122
|
+
- **Quyết định nằm ngoài repo** — `~/.pi/piagent-mcp-approvals.json`. Repo tự duyệt được cho mình thì gate coi như không có. Fork, đổi tên, checkout thứ hai đều bắt đầu lại từ `pending`.
|
|
123
|
+
- **Pin theo digest của định nghĩa.** Duyệt là đồng ý với *thứ server đó chạy*; đổi command, URL hay args là câu hỏi mới, state quay về `approval-changed`. Cùng cách tách consent/build mà capability lock đang dùng.
|
|
124
|
+
- **Enforce ở `tool_call`**, không phải ở config. Guard chặn cả proxy (`mcp` với `input.server`) lẫn dạng direct tool (`mcp__<server>__<tool>`) — gate chỉ đọc proxy sẽ bị đi vòng bằng cách bật `directTools`.
|
|
125
|
+
|
|
126
|
+
Giới hạn cần nói thẳng: extension **không chặn được adapter mở connection**, chỉ chặn tool call. Phần còn lại là bản thân kết nối, và việc server phía kia ghi log rằng có người kết nối.
|
|
127
|
+
|
|
128
|
+
Server ở `global` / `pi-global` không qua gate — hai layer đó nằm ngoài mọi repo, không repo nào đặt được server vào đó, và bắt duyệt config của chính mình trên từng máy là vô nghĩa.
|
|
129
|
+
|
|
130
|
+
Notice đầu session nêu tên server đang chờ quyết định hoặc thiếu setup. Tắt bằng `PIAGENT_NO_MCP_NOTICE=1`.
|
|
131
|
+
|
|
26
132
|
## Cấu hình một lần cho máy cá nhân/team
|
|
27
133
|
|
|
28
134
|
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`.
|
|
@@ -56,7 +162,7 @@ piagent-mcp --list
|
|
|
56
162
|
Nếu clone repo GitHub và chưa link npm bin:
|
|
57
163
|
|
|
58
164
|
```bash
|
|
59
|
-
|
|
165
|
+
node /path/to/piagent/scripts/mcp-manage.mjs --preset popular --scope global --replace
|
|
60
166
|
```
|
|
61
167
|
|
|
62
168
|
`--replace` cập nhật các server ID thuộc preset về baseline đã pin và vẫn giữ nguyên server ID khác. Luồng install/upgrade toàn cục luôn dùng chế độ này để không duy trì dependency động từ cấu hình cũ.
|
package/docs/model-options.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Model selector and scope
|
|
2
2
|
|
|
3
|
-
Pi Agent Platform không khóa vào một provider.
|
|
3
|
+
Pi Agent Platform không khóa vào một provider. Hai họ model dưới đây đều là first-class option: **model OpenAI Codex** (provider id `openai-codex`) và **model Claude của Anthropic** (provider id `anthropic`).
|
|
4
|
+
|
|
5
|
+
Lưu ý cách đọc: trong toàn bộ tài liệu này, "Codex" và "Claude" là **tên họ model** đứng sau các provider id ở trên. Chúng không phải tên CLI, và cũng không phải một agent nào khác — mọi thứ ở đây đều chạy trong Pi.
|
|
4
6
|
|
|
5
7
|
Quan trọng: flow chính là user chọn model bằng native Pi selector, không phải hỏi agent recommend.
|
|
6
8
|
|
|
@@ -48,7 +50,7 @@ piagent-models --provider openai-codex
|
|
|
48
50
|
piagent-models --provider anthropic
|
|
49
51
|
```
|
|
50
52
|
|
|
51
|
-
Lưu ý: `--list-models` chỉ hiện model mà Pi xem là available với credential/provider hiện tại. Nếu chưa login Anthropic, Claude có thể chưa hiện dù model catalog local có metadata.
|
|
53
|
+
Lưu ý: `--list-models` chỉ hiện model mà Pi xem là available với credential/provider hiện tại. Nếu chưa login Anthropic, các model Claude có thể chưa hiện dù model catalog local có metadata.
|
|
52
54
|
|
|
53
55
|
## Thinking levels
|
|
54
56
|
|
|
@@ -70,7 +72,7 @@ pi --thinking medium
|
|
|
70
72
|
|
|
71
73
|
Đừng giới hạn vào vài ví dụ. Sau `pi update --models`, kiểm tra catalog local bằng `piagent-models`. Ở release hiện tại, các family/presets chính cần nhớ:
|
|
72
74
|
|
|
73
|
-
### OpenAI Codex
|
|
75
|
+
### Họ model OpenAI Codex
|
|
74
76
|
|
|
75
77
|
| Model | Role gợi ý | Khi dùng |
|
|
76
78
|
|---|---|---|
|
|
@@ -82,14 +84,14 @@ pi --thinking medium
|
|
|
82
84
|
| `openai-codex/gpt-5.6-sol` | strategic/deep | architecture, large refactor, planning lớn |
|
|
83
85
|
| `openai-codex/gpt-5.6-terra` | huge-context scout | đọc nhiều docs/source, tổng hợp repo lớn |
|
|
84
86
|
|
|
85
|
-
### Claude
|
|
87
|
+
### Họ model Claude (Anthropic)
|
|
86
88
|
|
|
87
89
|
| Model | Role gợi ý | Khi dùng |
|
|
88
90
|
|---|---|---|
|
|
89
91
|
| `anthropic/claude-haiku-4-5` | fast/cheap | hỏi nhanh, docs/scout nhẹ |
|
|
90
92
|
| `anthropic/claude-sonnet-4-5` | balanced | task source bình thường |
|
|
91
93
|
| `anthropic/claude-sonnet-4-6` | balanced/deep | source task lớn hơn, max-capable |
|
|
92
|
-
| `anthropic/claude-sonnet-5` | balanced/hard default |
|
|
94
|
+
| `anthropic/claude-sonnet-5` | balanced/hard default | model default mạnh cho implement |
|
|
93
95
|
| `anthropic/claude-opus-4-5` | deep | review/refactor lớn |
|
|
94
96
|
| `anthropic/claude-opus-4-6` | deep/max | architecture/reasoning nặng |
|
|
95
97
|
| `anthropic/claude-opus-4-7` | deep/xhigh/max | high-risk/debug/architecture |
|
|
@@ -102,7 +104,7 @@ Pi catalog có thể có thêm dated variants như `*-2025xxxx`. Dùng alias lat
|
|
|
102
104
|
|
|
103
105
|
Preset dưới đây là cách mình seed `enabledModels`, không phải giới hạn hard. User vẫn có thể mở `/model` để chọn bất kỳ model available nào trong provider catalog.
|
|
104
106
|
|
|
105
|
-
| Preset | OpenAI Codex
|
|
107
|
+
| Preset | Model OpenAI Codex | Model Claude (Anthropic) | Khi dùng |
|
|
106
108
|
|---|---|---|---|
|
|
107
109
|
| Fast scout | `openai-codex/gpt-5.4-mini:low` | `anthropic/claude-haiku-4-5:low` | đọc nhanh, hỏi đáp, grep/scout nhẹ |
|
|
108
110
|
| Balanced implement | `openai-codex/gpt-5.5:medium` | `anthropic/claude-sonnet-5:medium` | task source bình thường |
|
|
@@ -160,6 +162,6 @@ bash scripts/quality-benchmark.sh /path/to/project --record \
|
|
|
160
162
|
|
|
161
163
|
So sánh tối thiểu:
|
|
162
164
|
|
|
163
|
-
- Pi + Codex fast/balanced/deep;
|
|
164
|
-
- Pi + Claude fast/balanced/deep;
|
|
165
|
+
- Pi + model Codex ở fast/balanced/deep;
|
|
166
|
+
- Pi + model Claude ở fast/balanced/deep;
|
|
165
167
|
- any other approved setup nếu team muốn so sánh bằng số liệu.
|
|
@@ -18,12 +18,12 @@ Support matrix release hiện tại: macOS Apple Silicon + Bash và Linux x64 +
|
|
|
18
18
|
```bash
|
|
19
19
|
node --version # >= 22.19.0
|
|
20
20
|
npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.0
|
|
21
|
-
npm install -g --ignore-scripts @piagent/platform@1.
|
|
21
|
+
npm install -g --ignore-scripts @piagent/platform@1.2.0
|
|
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.
|
|
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.2.0`. 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
|
|
|
@@ -99,7 +99,7 @@ install package once
|
|
|
99
99
|
|
|
100
100
|
```bash
|
|
101
101
|
npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.0
|
|
102
|
-
npm install -g --ignore-scripts @piagent/platform@1.
|
|
102
|
+
npm install -g --ignore-scripts @piagent/platform@1.2.0
|
|
103
103
|
piagent-install --stable --dry-run
|
|
104
104
|
piagent-install --stable
|
|
105
105
|
```
|
|
@@ -154,7 +154,7 @@ Trong Pi:
|
|
|
154
154
|
/login
|
|
155
155
|
```
|
|
156
156
|
|
|
157
|
-
Chọn provider/account
|
|
157
|
+
Chọn provider/account cho họ model muốn dùng: OpenAI (model Codex) hoặc Anthropic (model Claude). Credential nằm trong Pi user dir, không nằm trong repo và không được commit.
|
|
158
158
|
|
|
159
159
|
Browser login của OpenAI có hai chỗ trông như treo. Cả hai là lỗi Pi host, không phải platform, và còn nguyên ở `0.82.0` lẫn `0.82.1`.
|
|
160
160
|
|
|
@@ -281,7 +281,7 @@ Không phải daily default. Dùng khi muốn tạo sẵn `.pi` files cho projec
|
|
|
281
281
|
bash /path/to/piagent/scripts/setup.sh /path/to/project \
|
|
282
282
|
--project-only \
|
|
283
283
|
--profile auto \
|
|
284
|
-
--package-source git:github.com/Vt-mmm/piagent@v1.
|
|
284
|
+
--package-source git:github.com/Vt-mmm/piagent@v1.2.0 \
|
|
285
285
|
--mcp-preset core \
|
|
286
286
|
--subagents-preset safe
|
|
287
287
|
```
|
|
@@ -298,7 +298,7 @@ Khi command không có trên PATH, dùng script trực tiếp:
|
|
|
298
298
|
|
|
299
299
|
```bash
|
|
300
300
|
bash /path/to/piagent/scripts/init-project.sh /path/to/project --profile auto
|
|
301
|
-
|
|
301
|
+
node /path/to/piagent/scripts/mcp-manage.mjs --preset core --scope global --replace
|
|
302
302
|
bash /path/to/piagent/scripts/configure-subagents.sh --preset safe
|
|
303
303
|
```
|
|
304
304
|
|
|
@@ -654,7 +654,7 @@ piagent-mcp --list
|
|
|
654
654
|
Fallback:
|
|
655
655
|
|
|
656
656
|
```bash
|
|
657
|
-
|
|
657
|
+
node /path/to/piagent/scripts/mcp-manage.mjs --preset core --scope global --replace
|
|
658
658
|
```
|
|
659
659
|
|
|
660
660
|
### Cấu hình project
|
|
@@ -666,7 +666,7 @@ piagent-mcp --preset design --scope project --project /path/to/project
|
|
|
666
666
|
Fallback:
|
|
667
667
|
|
|
668
668
|
```bash
|
|
669
|
-
|
|
669
|
+
node /path/to/piagent/scripts/mcp-manage.mjs \
|
|
670
670
|
--preset design \
|
|
671
671
|
--scope project \
|
|
672
672
|
--project /path/to/project
|
|
@@ -854,8 +854,8 @@ Watchdog là optional adversarial reviewer ở cuối turn, không bật mặc
|
|
|
854
854
|
|
|
855
855
|
| Command | Dùng để |
|
|
856
856
|
|---|---|
|
|
857
|
-
| `npm install -g --ignore-scripts @piagent/platform@1.
|
|
858
|
-
| `pi install git:github.com/Vt-mmm/piagent@v1.
|
|
857
|
+
| `npm install -g --ignore-scripts @piagent/platform@1.2.0` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
|
|
858
|
+
| `pi install git:github.com/Vt-mmm/piagent@v1.2.0` | Install pinned release cho reproducible team setup. |
|
|
859
859
|
| `pi install git:github.com/Vt-mmm/piagent` | Install latest platform package cho máy cá nhân/sandbox. |
|
|
860
860
|
| 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). |
|
|
861
861
|
| 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. |
|
|
@@ -952,7 +952,7 @@ Mở lại Pi session sau khi install.
|
|
|
952
952
|
Cài lại terminal helper đúng release rồi kiểm tra `PATH`:
|
|
953
953
|
|
|
954
954
|
```bash
|
|
955
|
-
npm install -g --ignore-scripts @piagent/platform@1.
|
|
955
|
+
npm install -g --ignore-scripts @piagent/platform@1.2.0
|
|
956
956
|
command -v piagent-install
|
|
957
957
|
```
|
|
958
958
|
|
|
@@ -960,7 +960,7 @@ Nếu đang làm việc từ source checkout, có thể dùng script trực ti
|
|
|
960
960
|
|
|
961
961
|
```bash
|
|
962
962
|
bash /path/to/piagent/scripts/pi-session-stats.sh /path/to/project
|
|
963
|
-
|
|
963
|
+
node /path/to/piagent/scripts/mcp-manage.mjs --preset core --scope global --replace
|
|
964
964
|
bash /path/to/piagent/scripts/configure-subagents.sh --preset safe
|
|
965
965
|
```
|
|
966
966
|
|
|
@@ -51,6 +51,8 @@ pi install /path/to/piagent
|
|
|
51
51
|
- `1.1.6`: `be-readonly-fe` giữ được backend read-only trong monorepo, detect FE/BE đọc cả workspace, và rule detect gộp về một chỗ.
|
|
52
52
|
- `1.1.7`: update global không còn chặn project đang chạy — lock chỉ block khi grant thật sự đổi, và profile dạng `extends` nhận policy từ platform đang cài thay vì giữ bản copy lúc onboard.
|
|
53
53
|
- `1.1.8`: Pi báo ngay ở đầu session khi có release mới, kèm lệnh chạy update.
|
|
54
|
+
- `1.1.9`: notice update hiện đúng trên bản cài bằng `pi install git:` — bản cài nhận diện theo vị trí thư mục, không theo `.git`.
|
|
55
|
+
- `1.2.0`: `piagent-mcp` quản lý server đầy đủ, server do repo mang theo phải được duyệt mới dùng được, và `/piagent-mcp` là command trong session chứ không phải nhờ model chạy bash.
|
|
54
56
|
|
|
55
57
|
## Không publish
|
|
56
58
|
|
|
@@ -50,14 +50,14 @@ Xong. Từ đây project nào cũng chỉ cần `cd` vào rồi gõ `pi`.
|
|
|
50
50
|
|
|
51
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).
|
|
52
52
|
|
|
53
|
-
## Bước 2 — login OAuth OpenAI
|
|
53
|
+
## Bước 2 — login OAuth provider model (OpenAI/ChatGPT hoặc Anthropic)
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
56
|
pi
|
|
57
57
|
/login
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
Chọn provider OpenAI/
|
|
60
|
+
Chọn provider cho họ model muốn dùng trong danh sách Pi: OpenAI/ChatGPT cho model Codex, hoặc Anthropic cho model Claude. Token được lưu local trong Pi agent dir, không nằm trong repo.
|
|
61
61
|
|
|
62
62
|
## Bước 3 — chọn model và chạy project onboarding
|
|
63
63
|
|
|
@@ -10,7 +10,7 @@ This file is the canonical install, update, rollback, and release checklist. Oth
|
|
|
10
10
|
|
|
11
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.
|
|
13
|
+
| Surface | Status for v1.2.0 | 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.
|
|
36
|
+
| `stable` | `git:github.com/Vt-mmm/piagent@<resolved-commit-sha>` from `v1.2.0` | 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. |
|
|
@@ -53,7 +53,7 @@ Use this flow when the team needs both terminal commands and the Pi package:
|
|
|
53
53
|
```bash
|
|
54
54
|
node --version # >= 22.19.0
|
|
55
55
|
npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.0
|
|
56
|
-
npm install -g --ignore-scripts @piagent/platform@1.
|
|
56
|
+
npm install -g --ignore-scripts @piagent/platform@1.2.0
|
|
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.
|
|
65
|
-
tag: v1.
|
|
64
|
+
currentRelease: v1.2.0 (helper package version)
|
|
65
|
+
tag: v1.2.0
|
|
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.
|
|
82
|
+
pi install git:github.com/Vt-mmm/piagent@v1.2.0
|
|
83
83
|
```
|
|
84
84
|
|
|
85
85
|
Direct `pi install` does not create `piagent-*` commands on `PATH`.
|
|
@@ -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.
|
|
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.2.0, 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
|
package/docs/team-onboarding.md
CHANGED
|
@@ -9,7 +9,7 @@ Một thành viên mới không cần biết local path của maintainer. Luồn
|
|
|
9
9
|
```bash
|
|
10
10
|
node --version # >= 22.19.0
|
|
11
11
|
npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.0
|
|
12
|
-
npm install -g --ignore-scripts @piagent/platform@1.
|
|
12
|
+
npm install -g --ignore-scripts @piagent/platform@1.2.0
|
|
13
13
|
piagent-install --stable
|
|
14
14
|
cd /path/to/project
|
|
15
15
|
pi
|
|
@@ -42,7 +42,7 @@ Mặc định team dùng stable helper:
|
|
|
42
42
|
```bash
|
|
43
43
|
node --version # >= 22.19.0
|
|
44
44
|
npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.0
|
|
45
|
-
npm install -g --ignore-scripts @piagent/platform@1.
|
|
45
|
+
npm install -g --ignore-scripts @piagent/platform@1.2.0
|
|
46
46
|
piagent-install --stable --dry-run
|
|
47
47
|
piagent-install --stable
|
|
48
48
|
```
|
|
@@ -70,7 +70,7 @@ piagent-update --check
|
|
|
70
70
|
piagent-update --project /path/to/project
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
`--check` chỉ báo version, không đụng gì. Lên đúng một bản cụ thể thì `piagent-update --version 1.
|
|
73
|
+
`--check` chỉ báo version, không đụng gì. Lên đúng một bản cụ thể thì `piagent-update --version 1.2.0`.
|
|
74
74
|
|
|
75
75
|
Không cần ai nhớ đi kiểm tra: khi có release mới, Pi tự báo ngay ở dòng notice lúc mở session, kèm luôn lệnh chạy.
|
|
76
76
|
|
|
@@ -129,7 +129,7 @@ Nếu browser login của OpenAI trông như treo, xem [login provider](operator
|
|
|
129
129
|
|
|
130
130
|
## Bước 3 — chọn model và onboard project
|
|
131
131
|
|
|
132
|
-
Sau login, chọn provider/model intended cho project understanding bằng native Pi selector.
|
|
132
|
+
Sau login, chọn provider/model intended cho project understanding bằng native Pi selector. Cả hai họ model đều là supported option: model OpenAI Codex và model Anthropic Claude.
|
|
133
133
|
|
|
134
134
|
```text
|
|
135
135
|
/model # hoặc Ctrl+L
|