@piagent/platform 1.2.6 → 1.2.8
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 +24 -0
- package/README.md +2 -2
- package/docs/command-reference-vietnamese.md +4 -4
- package/docs/distribution-standard.md +7 -7
- package/docs/operator-manual-vietnamese.md +7 -7
- package/docs/publishing-for-teams.md +2 -0
- package/docs/release-install-policy.md +7 -7
- package/docs/security-threat-model.md +1 -1
- package/docs/subagent-orchestration-capabilities.md +2 -2
- package/docs/subagents-and-multiagent.md +6 -6
- package/docs/team-onboarding.md +2 -2
- package/docs-site/architecture.html +1 -1
- package/docs-site/commands.html +1 -1
- package/docs-site/context-engine.html +1 -1
- package/docs-site/index.html +1 -1
- package/docs-site/mcp-approval.html +1 -1
- package/docs-site/mcp-auth.html +1 -1
- package/docs-site/mcp-servers.html +1 -1
- package/docs-site/mcp.html +1 -1
- package/docs-site/permissions.html +1 -1
- package/docs-site/profiles.html +1 -1
- package/docs-site/quickstart.html +1 -1
- package/docs-site/runtime.html +1 -1
- package/docs-site/scope.html +1 -1
- package/docs-site/security.html +1 -1
- package/docs-site/team.html +1 -1
- package/docs-site/workflows.html +1 -1
- package/package.json +1 -1
- package/packages/piagent-core/package.json +1 -1
- package/scripts/audit-runtime-host.sh +4 -4
- package/scripts/check-runtime-advisories.mjs +4 -3
- package/scripts/install-global.sh +63 -16
- package/scripts/setup.sh +14 -5
- package/scripts/team-doctor.sh +5 -2
- package/scripts/verify-local.sh +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
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.8 - 2026-07-31
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Global setup/update now installs `pi-web-access@0.17.0` by default so builtin researcher subagents can browse/search/fetch external sources instead of being limited to local repo/docs. Machines that cannot use web research can opt out with `--no-web-access`.
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Global install/update now removes older platform-owned `pi-web-access` registrations before installing the reviewed exact version, forcing Pi's shared npm package tree to refresh stale transitive dependencies.
|
|
14
|
+
|
|
15
|
+
## v1.2.7 - 2026-07-31
|
|
16
|
+
|
|
17
|
+
### Security
|
|
18
|
+
|
|
19
|
+
- Updated the pinned MCP and subagent add-ons to `pi-mcp-adapter@2.15.0` and `pi-subagents@0.38.0`. Their resolved runtime tree uses patched `fast-uri@3.1.4`, `@hono/node-server@2.0.12`, and MCP SDK `1.30.0`; a clean resolution reports no add-on advisories.
|
|
20
|
+
|
|
21
|
+
- Raised the runtime release gate from high/critical to moderate/high/critical. The only remaining accepted finding is the separately documented `brace-expansion` denial of service pinned inside Pi host `0.82.0`.
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- Global install/update now removes older registrations for platform-owned MCP and subagent add-ons before installing their reviewed exact versions. This forces npm to refresh stale transitive dependencies instead of retaining a vulnerable version from an older shared Pi package lock.
|
|
26
|
+
|
|
27
|
+
- An existing `pi-subagents` installation is detected and upgraded during a normal platform update. Clean machines still require `--with-subagents`, and `--no-subagents` remains an explicit opt-out.
|
|
28
|
+
|
|
5
29
|
## v1.2.6 - 2026-07-31
|
|
6
30
|
|
|
7
31
|
### Added
|
package/README.md
CHANGED
|
@@ -211,7 +211,7 @@ Keep provider keys in environment variables, never in committed config. Switchin
|
|
|
211
211
|
|
|
212
212
|
## Subagents
|
|
213
213
|
|
|
214
|
-
`piagent-setup` installs `pi-subagents` with the `safe` preset unless disabled. Daily task prompts stay solo-first: they delegate bounded scout, planning, and review work only when it is independent enough to be worth the cost, and the final handoff states whether subagents were used and why.
|
|
214
|
+
`piagent-setup` installs `pi-subagents` with the `safe` preset and `pi-web-access` for web-backed researcher runs unless disabled. Daily task prompts stay solo-first: they delegate bounded scout, planning, research, and review work only when it is independent enough to be worth the cost, and the final handoff states whether subagents were used and why.
|
|
215
215
|
|
|
216
216
|
`/subagents-doctor` runs a health check; `/run piagent-scout "…"` and its planner, worker, and reviewer counterparts dispatch work. See [Subagents and multi-agent](docs/subagents-and-multiagent.md).
|
|
217
217
|
|
|
@@ -291,7 +291,7 @@ This repository intentionally excludes:
|
|
|
291
291
|
|
|
292
292
|
## Maturity
|
|
293
293
|
|
|
294
|
-
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.
|
|
294
|
+
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.8` or a reviewed commit.
|
|
295
295
|
|
|
296
296
|
Ready for:
|
|
297
297
|
|
|
@@ -465,8 +465,8 @@ Các lệnh này chạy ngoài Pi.
|
|
|
465
465
|
| Command | Dùng khi nào |
|
|
466
466
|
|---|---|
|
|
467
467
|
| `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. |
|
|
468
|
-
| `npm install -g --ignore-scripts @piagent/platform@1.2.
|
|
469
|
-
| `pi install git:github.com/Vt-mmm/piagent@v1.2.
|
|
468
|
+
| `npm install -g --ignore-scripts @piagent/platform@1.2.8` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
|
|
469
|
+
| `pi install git:github.com/Vt-mmm/piagent@v1.2.8` | Cài pinned release khi cần reproducible team setup. |
|
|
470
470
|
| `pi install git:github.com/Vt-mmm/piagent` | Cài latest package platform cho máy cá nhân/sandbox. |
|
|
471
471
|
| `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ì. |
|
|
472
472
|
| `piagent-update` | Full update global một lệnh cho cả máy: Pi host → npm-global helper → Pi package, đúng thứ tự release yêu cầu. |
|
|
@@ -498,8 +498,8 @@ Các lệnh này chạy ngoài Pi.
|
|
|
498
498
|
| `piagent-mcp --preset popular --scope global --replace` | Apply the governed MCP popular baseline: core + Playwright + Figma remote. |
|
|
499
499
|
| `piagent-mcp --list` | List MCP presets. |
|
|
500
500
|
| `piagent-subagents --preset safe` | Re-apply subagent safe config. |
|
|
501
|
-
| `pi install npm:pi-web-access@0.
|
|
502
|
-
| `piagent-setup <project> --
|
|
501
|
+
| `pi install npm:pi-web-access@0.17.0` | Cấp web/search/fetch tools cho builtin `researcher`; platform setup/update cài mặc định từ `v1.2.8`. |
|
|
502
|
+
| `piagent-setup <project> --no-web-access` | Setup project nhưng bỏ web access khi máy không được phép browse/fetch external source. |
|
|
503
503
|
| `piagent-usage /path/to/project` | Lấy exact usage của session mới nhất từ terminal khác. |
|
|
504
504
|
| `piagent-usage --history /path/to/project --days 7` | Tổng usage lịch sử của project, gồm session đã end. |
|
|
505
505
|
| `piagent-usage --history --all-projects --days 7 --csv` | Xuất usage tuần toàn máy để đưa vào report. |
|
|
@@ -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.2.
|
|
17
|
+
| Team pinned release | `git:github.com/Vt-mmm/piagent@v1.2.8` |
|
|
18
18
|
| Personal/sandbox dev | `git:github.com/Vt-mmm/piagent` |
|
|
19
|
-
| Registry distribution | `npm:@piagent/platform@1.2.
|
|
19
|
+
| Registry distribution | `npm:@piagent/platform@1.2.8` |
|
|
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.2.
|
|
29
|
+
| `stable` | `bash scripts/install-global.sh --stable` | Helper release tag resolved to commit SHA, currently `v1.2.8` | 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.2.
|
|
56
|
+
pi install git:github.com/Vt-mmm/piagent@v1.2.8
|
|
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.2.
|
|
68
|
+
npm install -g --ignore-scripts @piagent/platform@1.2.8
|
|
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.2.
|
|
73
|
+
`pi install git:github.com/Vt-mmm/piagent@v1.2.8` 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.8`.
|
|
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
|
|
|
@@ -120,7 +120,7 @@ Nếu muốn commit sẵn `.pi/piagent-profile.json` vào repo hoặc bootstrap
|
|
|
120
120
|
```bash
|
|
121
121
|
bash scripts/setup.sh /path/to/project \
|
|
122
122
|
--profile be-readonly-fe \
|
|
123
|
-
--package-source git:github.com/Vt-mmm/piagent@v1.2.
|
|
123
|
+
--package-source git:github.com/Vt-mmm/piagent@v1.2.8 \
|
|
124
124
|
--mcp-preset core \
|
|
125
125
|
--subagents-preset safe
|
|
126
126
|
```
|
|
@@ -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.2.
|
|
21
|
+
npm install -g --ignore-scripts @piagent/platform@1.2.8
|
|
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.2.
|
|
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.8`. 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.2.
|
|
102
|
+
npm install -g --ignore-scripts @piagent/platform@1.2.8
|
|
103
103
|
piagent-install --stable --dry-run
|
|
104
104
|
piagent-install --stable
|
|
105
105
|
```
|
|
@@ -282,7 +282,7 @@ Không phải daily default. Dùng khi muốn tạo sẵn `.pi` files cho projec
|
|
|
282
282
|
bash /path/to/piagent/scripts/setup.sh /path/to/project \
|
|
283
283
|
--project-only \
|
|
284
284
|
--profile auto \
|
|
285
|
-
--package-source git:github.com/Vt-mmm/piagent@v1.2.
|
|
285
|
+
--package-source git:github.com/Vt-mmm/piagent@v1.2.8 \
|
|
286
286
|
--mcp-preset core \
|
|
287
287
|
--subagents-preset safe
|
|
288
288
|
```
|
|
@@ -894,8 +894,8 @@ Watchdog là optional adversarial reviewer ở cuối turn, không bật mặc
|
|
|
894
894
|
|
|
895
895
|
| Command | Dùng để |
|
|
896
896
|
|---|---|
|
|
897
|
-
| `npm install -g --ignore-scripts @piagent/platform@1.2.
|
|
898
|
-
| `pi install git:github.com/Vt-mmm/piagent@v1.2.
|
|
897
|
+
| `npm install -g --ignore-scripts @piagent/platform@1.2.8` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
|
|
898
|
+
| `pi install git:github.com/Vt-mmm/piagent@v1.2.8` | Install pinned release cho reproducible team setup. |
|
|
899
899
|
| `pi install git:github.com/Vt-mmm/piagent` | Install latest platform package cho máy cá nhân/sandbox. |
|
|
900
900
|
| 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). |
|
|
901
901
|
| 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. |
|
|
@@ -1002,7 +1002,7 @@ Mở lại Pi session sau khi install.
|
|
|
1002
1002
|
Cài lại terminal helper đúng release rồi kiểm tra `PATH`:
|
|
1003
1003
|
|
|
1004
1004
|
```bash
|
|
1005
|
-
npm install -g --ignore-scripts @piagent/platform@1.2.
|
|
1005
|
+
npm install -g --ignore-scripts @piagent/platform@1.2.8
|
|
1006
1006
|
command -v piagent-install
|
|
1007
1007
|
```
|
|
1008
1008
|
|
|
@@ -59,6 +59,8 @@ pi install /path/to/piagent
|
|
|
59
59
|
- `1.2.4`: update global có fallback về user-writable npm prefix và project migration/doctor là bước hậu kiểm tùy chọn.
|
|
60
60
|
- `1.2.5`: updater đọc đúng metadata singleton-array của npm 12.
|
|
61
61
|
- `1.2.6`: Context Engine v2, dynamic tool loading, hard-budget retrieval, semantic compaction, Agent Watch telemetry/feedback và quality benchmark theo context efficiency.
|
|
62
|
+
- `1.2.7`: refresh exact MCP/subagent add-on pins, loại dependency URL/static-server có advisory và chặn cả moderate advisory trong runtime release gate.
|
|
63
|
+
- `1.2.8`: cài `pi-web-access@0.17.0` mặc định trong setup/update để researcher subagents có web/search/fetch thật; thêm `--no-web-access` cho máy không được phép browse.
|
|
62
64
|
|
|
63
65
|
## Không publish
|
|
64
66
|
|
|
@@ -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.2.
|
|
13
|
+
| Surface | Status for v1.2.8 | 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.2.
|
|
36
|
+
| `stable` | `git:github.com/Vt-mmm/piagent@<resolved-commit-sha>` from `v1.2.8` | 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.2.
|
|
56
|
+
npm install -g --ignore-scripts @piagent/platform@1.2.8
|
|
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.2.
|
|
65
|
-
tag: v1.2.
|
|
64
|
+
currentRelease: v1.2.8 (helper package version)
|
|
65
|
+
tag: v1.2.8
|
|
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.2.
|
|
82
|
+
pi install git:github.com/Vt-mmm/piagent@v1.2.8
|
|
83
83
|
```
|
|
84
84
|
|
|
85
85
|
Direct `pi install` does not create `piagent-*` commands on `PATH`.
|
|
@@ -317,5 +317,5 @@ Re-running the workflow from a branch instead skips publishing, because the publ
|
|
|
317
317
|
- Do not use a moving source in committed project settings.
|
|
318
318
|
- Do not publish local trust files, OAuth tokens, `auth.json`, sessions, caches, or `.env` files.
|
|
319
319
|
- Review the resolved commit SHA before rollout; tag resolution improves reproducibility but is not signed package provenance by itself.
|
|
320
|
-
- `npm audit --audit-level=high` covers this repository's helper dependency tree. `npm run audit:runtime` separately builds
|
|
320
|
+
- `npm audit --audit-level=high` covers this repository's helper dependency tree. `npm run audit:runtime` separately builds the exact optional Pi host and pinned add-on dependency tree and blocks unaccepted moderate, high, or critical findings so stale or permissive peer resolution cannot hide deployed runtime risk.
|
|
321
321
|
- Run doctor after install, update, or rollback so package source, project profile, protected paths, and share policy are checked together.
|
|
@@ -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.2.
|
|
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.8, 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
|
|
@@ -42,7 +42,7 @@ Core decisions:
|
|
|
42
42
|
- `scheduledRuns.enabled: false`
|
|
43
43
|
- bounded `maxSubagentDepth`, spawn cap, and parallel concurrency
|
|
44
44
|
- `scripts/setup.sh` / `scripts/install-global.sh`
|
|
45
|
-
-
|
|
45
|
+
- install `npm:pi-web-access@0.17.0` by default for web/docs research; `--no-web-access` opts out
|
|
46
46
|
- Workflow prompts
|
|
47
47
|
- `/workflow task`, `/workflow plan`, `/workflow review`, `/workflow be-to-fe`, `/workflow platform-improve` instruct the parent to auto-delegate when work is independent and bounded
|
|
48
48
|
- Docs
|
|
@@ -81,7 +81,7 @@ Parallel review:
|
|
|
81
81
|
Research-heavy task:
|
|
82
82
|
|
|
83
83
|
```bash
|
|
84
|
-
pi install npm:pi-web-access@0.
|
|
84
|
+
pi install npm:pi-web-access@0.17.0
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
```text
|
|
@@ -48,7 +48,7 @@ Nếu chỉ cài global:
|
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
50
|
pi install git:github.com/Vt-mmm/piagent
|
|
51
|
-
pi install npm:pi-subagents@0.
|
|
51
|
+
pi install npm:pi-subagents@0.38.0
|
|
52
52
|
bash /path/to/piagent/scripts/configure-subagents.sh --preset safe
|
|
53
53
|
```
|
|
54
54
|
|
|
@@ -103,15 +103,15 @@ Sau khi mở session mới hoặc `/reload`:
|
|
|
103
103
|
|
|
104
104
|
`/subagents-doctor` là lệnh đầu tiên nên chạy nếu không thấy tool/agent.
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
Web research support is installed by default in team setup/update:
|
|
107
107
|
|
|
108
108
|
```bash
|
|
109
|
-
pi install npm:pi-web-access@0.
|
|
110
|
-
# hoặc
|
|
111
|
-
bash /path/to/piagent/scripts/setup.sh .
|
|
109
|
+
pi install npm:pi-web-access@0.17.0
|
|
110
|
+
# hoặc full setup/update:
|
|
111
|
+
bash /path/to/piagent/scripts/setup.sh .
|
|
112
112
|
```
|
|
113
113
|
|
|
114
|
-
`researcher` builtin cần web/search/fetch tools từ package này.
|
|
114
|
+
`researcher` builtin cần web/search/fetch tools từ package này. Từ `v1.2.8`, platform cài package này mặc định để `/parallel-research` không bị giới hạn ở local repo/docs. Nếu một máy thật sự không được phép browse/fetch web, dùng `--no-web-access`.
|
|
115
115
|
|
|
116
116
|
Giải nghĩa nhanh:
|
|
117
117
|
|
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.2.
|
|
12
|
+
npm install -g --ignore-scripts @piagent/platform@1.2.8
|
|
13
13
|
piagent-install --stable
|
|
14
14
|
cd /path/to/project
|
|
15
15
|
pi
|
|
@@ -43,7 +43,7 @@ Mặc định team dùng stable helper:
|
|
|
43
43
|
```bash
|
|
44
44
|
node --version # >= 22.19.0
|
|
45
45
|
npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.0
|
|
46
|
-
npm install -g --ignore-scripts @piagent/platform@1.2.
|
|
46
|
+
npm install -g --ignore-scripts @piagent/platform@1.2.8
|
|
47
47
|
piagent-install --stable --dry-run
|
|
48
48
|
piagent-install --stable
|
|
49
49
|
```
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<span>Pi Agent Platform</span>
|
|
28
28
|
</a>
|
|
29
29
|
<div class="top-actions">
|
|
30
|
-
<span class="pill"><span class="pill-dot"></span>v1.2.
|
|
30
|
+
<span class="pill"><span class="pill-dot"></span>v1.2.8 docs</span>
|
|
31
31
|
<a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
|
|
32
32
|
<svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
33
33
|
<path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
package/docs-site/commands.html
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<span>Pi Agent Platform</span>
|
|
28
28
|
</a>
|
|
29
29
|
<div class="top-actions">
|
|
30
|
-
<span class="pill"><span class="pill-dot"></span>v1.2.
|
|
30
|
+
<span class="pill"><span class="pill-dot"></span>v1.2.8 docs</span>
|
|
31
31
|
<a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
|
|
32
32
|
<svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
33
33
|
<path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<span>Pi Agent Platform</span>
|
|
28
28
|
</a>
|
|
29
29
|
<div class="top-actions">
|
|
30
|
-
<span class="pill"><span class="pill-dot"></span>v1.2.
|
|
30
|
+
<span class="pill"><span class="pill-dot"></span>v1.2.8 docs</span>
|
|
31
31
|
<a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
|
|
32
32
|
<svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
33
33
|
<path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
package/docs-site/index.html
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<span>Pi Agent Platform</span>
|
|
28
28
|
</a>
|
|
29
29
|
<div class="top-actions">
|
|
30
|
-
<span class="pill"><span class="pill-dot"></span>v1.2.
|
|
30
|
+
<span class="pill"><span class="pill-dot"></span>v1.2.8 docs</span>
|
|
31
31
|
<a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
|
|
32
32
|
<svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
33
33
|
<path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<span>Pi Agent Platform</span>
|
|
28
28
|
</a>
|
|
29
29
|
<div class="top-actions">
|
|
30
|
-
<span class="pill"><span class="pill-dot"></span>v1.2.
|
|
30
|
+
<span class="pill"><span class="pill-dot"></span>v1.2.8 docs</span>
|
|
31
31
|
<a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
|
|
32
32
|
<svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
33
33
|
<path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
package/docs-site/mcp-auth.html
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<span>Pi Agent Platform</span>
|
|
28
28
|
</a>
|
|
29
29
|
<div class="top-actions">
|
|
30
|
-
<span class="pill"><span class="pill-dot"></span>v1.2.
|
|
30
|
+
<span class="pill"><span class="pill-dot"></span>v1.2.8 docs</span>
|
|
31
31
|
<a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
|
|
32
32
|
<svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
33
33
|
<path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<span>Pi Agent Platform</span>
|
|
28
28
|
</a>
|
|
29
29
|
<div class="top-actions">
|
|
30
|
-
<span class="pill"><span class="pill-dot"></span>v1.2.
|
|
30
|
+
<span class="pill"><span class="pill-dot"></span>v1.2.8 docs</span>
|
|
31
31
|
<a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
|
|
32
32
|
<svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
33
33
|
<path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
package/docs-site/mcp.html
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<span>Pi Agent Platform</span>
|
|
28
28
|
</a>
|
|
29
29
|
<div class="top-actions">
|
|
30
|
-
<span class="pill"><span class="pill-dot"></span>v1.2.
|
|
30
|
+
<span class="pill"><span class="pill-dot"></span>v1.2.8 docs</span>
|
|
31
31
|
<a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
|
|
32
32
|
<svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
33
33
|
<path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<span>Pi Agent Platform</span>
|
|
28
28
|
</a>
|
|
29
29
|
<div class="top-actions">
|
|
30
|
-
<span class="pill"><span class="pill-dot"></span>v1.2.
|
|
30
|
+
<span class="pill"><span class="pill-dot"></span>v1.2.8 docs</span>
|
|
31
31
|
<a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
|
|
32
32
|
<svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
33
33
|
<path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
package/docs-site/profiles.html
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<span>Pi Agent Platform</span>
|
|
28
28
|
</a>
|
|
29
29
|
<div class="top-actions">
|
|
30
|
-
<span class="pill"><span class="pill-dot"></span>v1.2.
|
|
30
|
+
<span class="pill"><span class="pill-dot"></span>v1.2.8 docs</span>
|
|
31
31
|
<a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
|
|
32
32
|
<svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
33
33
|
<path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<span>Pi Agent Platform</span>
|
|
28
28
|
</a>
|
|
29
29
|
<div class="top-actions">
|
|
30
|
-
<span class="pill"><span class="pill-dot"></span>v1.2.
|
|
30
|
+
<span class="pill"><span class="pill-dot"></span>v1.2.8 docs</span>
|
|
31
31
|
<a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
|
|
32
32
|
<svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
33
33
|
<path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
package/docs-site/runtime.html
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<span>Pi Agent Platform</span>
|
|
28
28
|
</a>
|
|
29
29
|
<div class="top-actions">
|
|
30
|
-
<span class="pill"><span class="pill-dot"></span>v1.2.
|
|
30
|
+
<span class="pill"><span class="pill-dot"></span>v1.2.8 docs</span>
|
|
31
31
|
<a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
|
|
32
32
|
<svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
33
33
|
<path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
package/docs-site/scope.html
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<span>Pi Agent Platform</span>
|
|
28
28
|
</a>
|
|
29
29
|
<div class="top-actions">
|
|
30
|
-
<span class="pill"><span class="pill-dot"></span>v1.2.
|
|
30
|
+
<span class="pill"><span class="pill-dot"></span>v1.2.8 docs</span>
|
|
31
31
|
<a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
|
|
32
32
|
<svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
33
33
|
<path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
package/docs-site/security.html
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<span>Pi Agent Platform</span>
|
|
28
28
|
</a>
|
|
29
29
|
<div class="top-actions">
|
|
30
|
-
<span class="pill"><span class="pill-dot"></span>v1.2.
|
|
30
|
+
<span class="pill"><span class="pill-dot"></span>v1.2.8 docs</span>
|
|
31
31
|
<a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
|
|
32
32
|
<svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
33
33
|
<path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
package/docs-site/team.html
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<span>Pi Agent Platform</span>
|
|
28
28
|
</a>
|
|
29
29
|
<div class="top-actions">
|
|
30
|
-
<span class="pill"><span class="pill-dot"></span>v1.2.
|
|
30
|
+
<span class="pill"><span class="pill-dot"></span>v1.2.8 docs</span>
|
|
31
31
|
<a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
|
|
32
32
|
<svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
33
33
|
<path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
package/docs-site/workflows.html
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<span>Pi Agent Platform</span>
|
|
28
28
|
</a>
|
|
29
29
|
<div class="top-actions">
|
|
30
|
-
<span class="pill"><span class="pill-dot"></span>v1.2.
|
|
30
|
+
<span class="pill"><span class="pill-dot"></span>v1.2.8 docs</span>
|
|
31
31
|
<a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
|
|
32
32
|
<svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
33
33
|
<path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
package/package.json
CHANGED
|
@@ -27,9 +27,9 @@ require_exact_peer() {
|
|
|
27
27
|
PI_CODING_VERSION="$(require_exact_peer "@earendil-works/pi-coding-agent")"
|
|
28
28
|
PI_AI_VERSION="$(require_exact_peer "@earendil-works/pi-ai")"
|
|
29
29
|
TYPEBOX_VERSION="$(require_exact_peer "typebox")"
|
|
30
|
-
PI_MCP_ADAPTER_VERSION="2.
|
|
31
|
-
PI_SUBAGENTS_VERSION="0.
|
|
32
|
-
PI_WEB_ACCESS_VERSION="0.
|
|
30
|
+
PI_MCP_ADAPTER_VERSION="2.15.0"
|
|
31
|
+
PI_SUBAGENTS_VERSION="0.38.0"
|
|
32
|
+
PI_WEB_ACCESS_VERSION="0.17.0"
|
|
33
33
|
|
|
34
34
|
if [[ "$PI_CODING_VERSION" != "$PI_AI_VERSION" ]]; then
|
|
35
35
|
echo "FAIL: Pi Coding Agent and Pi AI host versions must match." >&2
|
|
@@ -60,7 +60,7 @@ const target = process.argv[2];
|
|
|
60
60
|
fs.writeFileSync(target, `${JSON.stringify({ name: "piagent-runtime-audit", version: "0.0.0", private: true }, null, 2)}\n`);
|
|
61
61
|
NODE
|
|
62
62
|
|
|
63
|
-
echo "Auditing Pi host ${PI_CODING_VERSION} and pinned add-ons at severity
|
|
63
|
+
echo "Auditing Pi host ${PI_CODING_VERSION} and pinned add-ons at severity moderate and above..."
|
|
64
64
|
(
|
|
65
65
|
cd "$AUDIT_ROOT"
|
|
66
66
|
npm install --package-lock-only --ignore-scripts --no-audit --no-fund \
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
// Applies the runtime advisory policy to `npm audit --json` read from stdin.
|
|
4
4
|
//
|
|
5
|
-
// The rule is
|
|
5
|
+
// The rule is "no moderate, high, or critical advisory in the pinned Pi host
|
|
6
|
+
// and add-on tree".
|
|
6
7
|
// What this adds is a way to accept one named advisory when there is provably
|
|
7
8
|
// nothing to do about it, without lowering the bar for everything else.
|
|
8
9
|
//
|
|
@@ -77,7 +78,7 @@ if (report.auditReportVersion !== 2) {
|
|
|
77
78
|
const blocking = [];
|
|
78
79
|
const seen = new Set();
|
|
79
80
|
for (const [name, vulnerability] of Object.entries(report.vulnerabilities ?? {})) {
|
|
80
|
-
if (!["high", "critical"].includes(vulnerability.severity)) continue;
|
|
81
|
+
if (!["moderate", "high", "critical"].includes(vulnerability.severity)) continue;
|
|
81
82
|
const ids = advisoryIdsFor(vulnerability);
|
|
82
83
|
if (ids.length === 0) {
|
|
83
84
|
blocking.push({ name, severity: vulnerability.severity, id: "(no advisory id)" });
|
|
@@ -110,5 +111,5 @@ if (failures.length > 0) {
|
|
|
110
111
|
|
|
111
112
|
const counts = report.metadata?.vulnerabilities ?? {};
|
|
112
113
|
const acceptedList = ACCEPTED.map((entry) => `${entry.id} (review by ${entry.reviewBy})`).join(", ");
|
|
113
|
-
console.log(`PASS: no unaccepted high or critical advisory (${counts.high ?? 0} high, ${counts.critical ?? 0} critical)`);
|
|
114
|
+
console.log(`PASS: no unaccepted moderate, high, or critical advisory (${counts.moderate ?? 0} moderate, ${counts.high ?? 0} high, ${counts.critical ?? 0} critical)`);
|
|
114
115
|
if (acceptedList) console.log(`Accepted, with reasons recorded in scripts/check-runtime-advisories.mjs: ${acceptedList}`);
|
|
@@ -4,7 +4,7 @@ set -euo pipefail
|
|
|
4
4
|
usage() {
|
|
5
5
|
cat <<'USAGE'
|
|
6
6
|
Usage:
|
|
7
|
-
scripts/install-global.sh [--stable|--dev|--local|--channel <stable|dev|local>] [--version <tag>] [--resolve-tag] [--package-source <source>] [--dry-run] [--with-mcp|--no-mcp] [--mcp-preset <preset>] [--with-subagents] [--subagents-preset <preset>] [--with-web-access] [--with-herdr] [--model-scope <preset>]
|
|
7
|
+
scripts/install-global.sh [--stable|--dev|--local|--channel <stable|dev|local>] [--version <tag>] [--resolve-tag] [--package-source <source>] [--dry-run] [--with-mcp|--no-mcp] [--mcp-preset <preset>] [--with-subagents|--no-subagents] [--subagents-preset <preset>] [--with-web-access|--no-web-access] [--with-herdr] [--model-scope <preset>]
|
|
8
8
|
|
|
9
9
|
Purpose:
|
|
10
10
|
Install the piagent Pi package into the current user's global Pi settings.
|
|
@@ -39,8 +39,10 @@ Notes:
|
|
|
39
39
|
Skip it with --no-mcp. Writing the config does not start or authenticate anything:
|
|
40
40
|
the GitHub server additionally needs Docker running and GITHUB_PERSONAL_ACCESS_TOKEN
|
|
41
41
|
exported, and Chrome DevTools needs a local Chrome.
|
|
42
|
+
- An existing pi-subagents install is preserved and upgraded automatically.
|
|
43
|
+
New installs remain opt-in with --with-subagents; use --no-subagents to skip an existing install.
|
|
42
44
|
- Subagents preset defaults to safe: compact tool description, bounded concurrency/depth.
|
|
43
|
-
- Web access is
|
|
45
|
+
- Web access is installed by default so the builtin `researcher` subagent can browse/fetch web sources inside Pi. Skip it with --no-web-access.
|
|
44
46
|
USAGE
|
|
45
47
|
}
|
|
46
48
|
|
|
@@ -57,9 +59,10 @@ WITH_MCP=true
|
|
|
57
59
|
MCP_PRESET="core"
|
|
58
60
|
MCP_PRESET_EXPLICIT=false
|
|
59
61
|
WITH_SUBAGENTS=false
|
|
62
|
+
SUBAGENTS_EXPLICIT=false
|
|
60
63
|
SUBAGENTS_PRESET="safe"
|
|
61
64
|
SUBAGENTS_MODEL_SCOPE="none"
|
|
62
|
-
WITH_WEB_ACCESS=
|
|
65
|
+
WITH_WEB_ACCESS=true
|
|
63
66
|
WITH_HERDR=false
|
|
64
67
|
CONFIGURE_MODEL_SCOPE=true
|
|
65
68
|
MODEL_SCOPE_PRESET="full"
|
|
@@ -71,12 +74,12 @@ RESOLVE_TAG=false
|
|
|
71
74
|
RESOLVED_PACKAGE_TAG=""
|
|
72
75
|
RESOLVED_PACKAGE_COMMIT=""
|
|
73
76
|
CLI_PACKAGE_SELECTOR=""
|
|
74
|
-
PI_MCP_ADAPTER_SOURCE="npm:pi-mcp-adapter@2.
|
|
75
|
-
PI_SUBAGENTS_SOURCE="npm:pi-subagents@0.
|
|
76
|
-
PI_WEB_ACCESS_SOURCE="npm:pi-web-access@0.
|
|
77
|
-
PI_MCP_ADAPTER_INTEGRITY="sha512-
|
|
78
|
-
PI_SUBAGENTS_INTEGRITY="sha512-
|
|
79
|
-
PI_WEB_ACCESS_INTEGRITY="sha512-
|
|
77
|
+
PI_MCP_ADAPTER_SOURCE="npm:pi-mcp-adapter@2.15.0"
|
|
78
|
+
PI_SUBAGENTS_SOURCE="npm:pi-subagents@0.38.0"
|
|
79
|
+
PI_WEB_ACCESS_SOURCE="npm:pi-web-access@0.17.0"
|
|
80
|
+
PI_MCP_ADAPTER_INTEGRITY="sha512-HJAVt2I5IB52pKpSUYbVJnzOmuXYBCc/ZrI9ylHxYQWmE7p75j7aWzsHe734EFN+gL7WaM23CTX3eYHz2THKBA=="
|
|
81
|
+
PI_SUBAGENTS_INTEGRITY="sha512-8wGQiX6rkR5J4V+AnWtQg3+LmC+cHnZIM1f/VWTjCTkVmcoKdeLsTAYG6BS2yKAugyEUjNUGj3vE5d9nj9m61A=="
|
|
82
|
+
PI_WEB_ACCESS_INTEGRITY="sha512-rDAhkIzYtBmCCNgstTJ/zFnw91V64TQqhqLOeGXFxmnJaxE45nj+L4BkUPMYSUb3WFexDDYdGlONyBLLKE4eVw=="
|
|
80
83
|
|
|
81
84
|
require_value() {
|
|
82
85
|
local option="$1"
|
|
@@ -226,13 +229,40 @@ remove_existing_piagent_platform_sources() {
|
|
|
226
229
|
if is_piagent_platform_source "$source"; then
|
|
227
230
|
run_cmd pi remove "$source"
|
|
228
231
|
fi
|
|
229
|
-
done < <(
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
232
|
+
done < <(list_user_pi_sources)
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
list_user_pi_sources() {
|
|
236
|
+
pi list --approve 2>/dev/null | awk '
|
|
237
|
+
$0 == "User packages:" { in_user = 1; next }
|
|
238
|
+
$0 == "Project packages:" { in_user = 0; next }
|
|
239
|
+
in_user && $0 ~ /^ [^ ]/ { sub(/^ /, ""); print }
|
|
240
|
+
'
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
has_user_npm_package_source() {
|
|
244
|
+
local package_name="$1"
|
|
245
|
+
local source
|
|
246
|
+
while IFS= read -r source; do
|
|
247
|
+
case "$source" in
|
|
248
|
+
"npm:${package_name}"|"npm:${package_name}@"*)
|
|
249
|
+
return 0
|
|
250
|
+
;;
|
|
251
|
+
esac
|
|
252
|
+
done < <(list_user_pi_sources)
|
|
253
|
+
return 1
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
remove_existing_npm_package_sources() {
|
|
257
|
+
local package_name="$1"
|
|
258
|
+
local source
|
|
259
|
+
while IFS= read -r source; do
|
|
260
|
+
case "$source" in
|
|
261
|
+
"npm:${package_name}"|"npm:${package_name}@"*)
|
|
262
|
+
run_cmd pi remove "$source"
|
|
263
|
+
;;
|
|
264
|
+
esac
|
|
265
|
+
done < <(list_user_pi_sources)
|
|
236
266
|
}
|
|
237
267
|
|
|
238
268
|
verify_npm_integrity() {
|
|
@@ -348,6 +378,12 @@ while [[ $# -gt 0 ]]; do
|
|
|
348
378
|
;;
|
|
349
379
|
--with-subagents)
|
|
350
380
|
WITH_SUBAGENTS=true
|
|
381
|
+
SUBAGENTS_EXPLICIT=true
|
|
382
|
+
shift
|
|
383
|
+
;;
|
|
384
|
+
--no-subagents)
|
|
385
|
+
WITH_SUBAGENTS=false
|
|
386
|
+
SUBAGENTS_EXPLICIT=true
|
|
351
387
|
shift
|
|
352
388
|
;;
|
|
353
389
|
--subagents-preset)
|
|
@@ -364,6 +400,10 @@ while [[ $# -gt 0 ]]; do
|
|
|
364
400
|
WITH_WEB_ACCESS=true
|
|
365
401
|
shift
|
|
366
402
|
;;
|
|
403
|
+
--no-web-access)
|
|
404
|
+
WITH_WEB_ACCESS=false
|
|
405
|
+
shift
|
|
406
|
+
;;
|
|
367
407
|
--with-herdr)
|
|
368
408
|
WITH_HERDR=true
|
|
369
409
|
shift
|
|
@@ -542,6 +582,10 @@ else
|
|
|
542
582
|
fi
|
|
543
583
|
fi
|
|
544
584
|
|
|
585
|
+
if [[ "$SUBAGENTS_EXPLICIT" == false ]] && command -v pi >/dev/null 2>&1 && has_user_npm_package_source "pi-subagents"; then
|
|
586
|
+
WITH_SUBAGENTS=true
|
|
587
|
+
fi
|
|
588
|
+
|
|
545
589
|
echo "Installing Pi Agent Platform package:"
|
|
546
590
|
echo " channel: $RESOLVED_CHANNEL_LABEL"
|
|
547
591
|
echo " currentRelease: $CURRENT_RELEASE_TAG (helper package version)"
|
|
@@ -562,6 +606,7 @@ if [[ "$WITH_MCP" == true ]]; then
|
|
|
562
606
|
if [[ "$DRY_RUN" == false ]]; then
|
|
563
607
|
verify_npm_integrity "$PI_MCP_ADAPTER_SOURCE" "$PI_MCP_ADAPTER_INTEGRITY"
|
|
564
608
|
fi
|
|
609
|
+
remove_existing_npm_package_sources "pi-mcp-adapter"
|
|
565
610
|
run_cmd pi install "$PI_MCP_ADAPTER_SOURCE"
|
|
566
611
|
if [[ "$DRY_RUN" == false ]] && command -v pi-mcp-adapter >/dev/null 2>&1; then
|
|
567
612
|
pi-mcp-adapter init || true
|
|
@@ -575,6 +620,7 @@ if [[ "$WITH_SUBAGENTS" == true ]]; then
|
|
|
575
620
|
if [[ "$DRY_RUN" == false ]]; then
|
|
576
621
|
verify_npm_integrity "$PI_SUBAGENTS_SOURCE" "$PI_SUBAGENTS_INTEGRITY"
|
|
577
622
|
fi
|
|
623
|
+
remove_existing_npm_package_sources "pi-subagents"
|
|
578
624
|
run_cmd pi install "$PI_SUBAGENTS_SOURCE"
|
|
579
625
|
echo "Configuring Pi subagents baseline:"
|
|
580
626
|
run_cmd bash "$PLATFORM_ROOT/scripts/configure-subagents.sh" --preset "$SUBAGENTS_PRESET" --model-scope "$SUBAGENTS_MODEL_SCOPE"
|
|
@@ -585,6 +631,7 @@ if [[ "$WITH_WEB_ACCESS" == true ]]; then
|
|
|
585
631
|
if [[ "$DRY_RUN" == false ]]; then
|
|
586
632
|
verify_npm_integrity "$PI_WEB_ACCESS_SOURCE" "$PI_WEB_ACCESS_INTEGRITY"
|
|
587
633
|
fi
|
|
634
|
+
remove_existing_npm_package_sources "pi-web-access"
|
|
588
635
|
run_cmd pi install "$PI_WEB_ACCESS_SOURCE"
|
|
589
636
|
fi
|
|
590
637
|
|
package/scripts/setup.sh
CHANGED
|
@@ -30,7 +30,8 @@ Options:
|
|
|
30
30
|
Configure pi-subagents runtime baseline (default: safe)
|
|
31
31
|
--subagents-model-scope <none|piagent|codex|claude> model family for subagents
|
|
32
32
|
Optional subagent model allowlist (default: none)
|
|
33
|
-
--with-web-access
|
|
33
|
+
--with-web-access / --no-web-access
|
|
34
|
+
Install/skip pi-web-access for builtin `researcher` subagent (default: install)
|
|
34
35
|
--with-herdr / --no-herdr Install/skip Herdr Pi integration if herdr exists (default: install)
|
|
35
36
|
--model-scope <full|codex|claude> model families to enable
|
|
36
37
|
Configure Pi enabledModels for selector/cycling (default: full)
|
|
@@ -73,7 +74,7 @@ MCP_PRESET_EXPLICIT=false
|
|
|
73
74
|
WITH_SUBAGENTS=true
|
|
74
75
|
SUBAGENTS_PRESET="safe"
|
|
75
76
|
SUBAGENTS_MODEL_SCOPE="none"
|
|
76
|
-
WITH_WEB_ACCESS=
|
|
77
|
+
WITH_WEB_ACCESS=true
|
|
77
78
|
WITH_HERDR=true
|
|
78
79
|
CONFIGURE_MODEL_SCOPE=true
|
|
79
80
|
MODEL_SCOPE_PRESET="full"
|
|
@@ -154,6 +155,10 @@ while [[ $# -gt 0 ]]; do
|
|
|
154
155
|
WITH_WEB_ACCESS=true
|
|
155
156
|
shift
|
|
156
157
|
;;
|
|
158
|
+
--no-web-access)
|
|
159
|
+
WITH_WEB_ACCESS=false
|
|
160
|
+
shift
|
|
161
|
+
;;
|
|
157
162
|
--with-herdr)
|
|
158
163
|
WITH_HERDR=true
|
|
159
164
|
shift
|
|
@@ -397,9 +402,9 @@ if [[ "$DO_GLOBAL" == true ]]; then
|
|
|
397
402
|
ensure_pi_cli
|
|
398
403
|
install_args=("$PLATFORM_ROOT/scripts/install-global.sh" "--package-source" "$PACKAGE_SOURCE")
|
|
399
404
|
# The opt-out has to be passed explicitly. The installer defaults MCP on, so
|
|
400
|
-
# saying nothing here would install it against the operator's choice
|
|
401
|
-
#
|
|
402
|
-
#
|
|
405
|
+
# saying nothing here would install it against the operator's choice.
|
|
406
|
+
# Subagents also needs an explicit opt-out because the installer now preserves
|
|
407
|
+
# an existing install during updates.
|
|
403
408
|
if [[ "$WITH_MCP" == true ]]; then
|
|
404
409
|
install_args+=("--with-mcp" "--mcp-preset" "$MCP_PRESET")
|
|
405
410
|
else
|
|
@@ -407,9 +412,13 @@ if [[ "$DO_GLOBAL" == true ]]; then
|
|
|
407
412
|
fi
|
|
408
413
|
if [[ "$WITH_SUBAGENTS" == true ]]; then
|
|
409
414
|
install_args+=("--with-subagents" "--subagents-preset" "$SUBAGENTS_PRESET" "--subagents-model-scope" "$SUBAGENTS_MODEL_SCOPE")
|
|
415
|
+
else
|
|
416
|
+
install_args+=("--no-subagents")
|
|
410
417
|
fi
|
|
411
418
|
if [[ "$WITH_WEB_ACCESS" == true ]]; then
|
|
412
419
|
install_args+=("--with-web-access")
|
|
420
|
+
else
|
|
421
|
+
install_args+=("--no-web-access")
|
|
413
422
|
fi
|
|
414
423
|
if [[ "$WITH_HERDR" == true ]]; then
|
|
415
424
|
install_args+=("--with-herdr")
|
package/scripts/team-doctor.sh
CHANGED
|
@@ -224,13 +224,16 @@ function mcpSummary(file) {
|
|
|
224
224
|
|
|
225
225
|
let piHasMcpAdapter = false;
|
|
226
226
|
let piHasSubagents = false;
|
|
227
|
+
let piHasWebAccess = false;
|
|
227
228
|
if (commandExists("pi")) {
|
|
228
229
|
const piList = spawnSync("pi", ["list"], { encoding: "utf8" });
|
|
229
230
|
const combined = `${piList.stdout ?? ""}\n${piList.stderr ?? ""}`;
|
|
230
231
|
piHasMcpAdapter = combined.includes("pi-mcp-adapter");
|
|
231
232
|
piHasSubagents = combined.includes("pi-subagents");
|
|
232
|
-
|
|
233
|
-
if (!
|
|
233
|
+
piHasWebAccess = combined.includes("pi-web-access");
|
|
234
|
+
if (!piHasMcpAdapter) warnings.push("Pi MCP adapter not found in `pi list`; run setup with --with-mcp or `pi install npm:pi-mcp-adapter@2.15.0`");
|
|
235
|
+
if (!piHasSubagents) warnings.push("Pi subagents package not found in `pi list`; run setup with --with-subagents or `pi install npm:pi-subagents@0.38.0`");
|
|
236
|
+
if (!piHasWebAccess) warnings.push("Pi web access package not found in `pi list`; run `piagent-update --force` or `pi install npm:pi-web-access@0.17.0` so researcher subagents can browse/fetch external sources");
|
|
234
237
|
}
|
|
235
238
|
|
|
236
239
|
const mcpFiles = [
|
package/scripts/verify-local.sh
CHANGED
|
@@ -344,12 +344,12 @@ require_documented "auto-delegation" "$ROOT/README.md" "$ROOT/docs" "$ROOT/packa
|
|
|
344
344
|
require_documented "Subagents used/not used" "$ROOT/packages/piagent-core/prompts" "$ROOT/docs/auto-delegation-policy.md"
|
|
345
345
|
require_documented "Subagent orchestration capabilities" "$ROOT/README.md" "$ROOT/docs/subagent-orchestration-capabilities.md"
|
|
346
346
|
require_documented "pi-web-access" "$ROOT/README.md" "$ROOT/docs" "$ROOT/scripts/install-global.sh" "$ROOT/scripts/setup.sh"
|
|
347
|
-
grep -F 'PI_MCP_ADAPTER_SOURCE="npm:pi-mcp-adapter@2.
|
|
348
|
-
grep -F 'PI_SUBAGENTS_SOURCE="npm:pi-subagents@0.
|
|
349
|
-
grep -F 'PI_WEB_ACCESS_SOURCE="npm:pi-web-access@0.
|
|
350
|
-
grep -F 'PI_MCP_ADAPTER_VERSION="2.
|
|
351
|
-
grep -F 'PI_SUBAGENTS_VERSION="0.
|
|
352
|
-
grep -F 'PI_WEB_ACCESS_VERSION="0.
|
|
347
|
+
grep -F 'PI_MCP_ADAPTER_SOURCE="npm:pi-mcp-adapter@2.15.0"' "$ROOT/scripts/install-global.sh" >/dev/null
|
|
348
|
+
grep -F 'PI_SUBAGENTS_SOURCE="npm:pi-subagents@0.38.0"' "$ROOT/scripts/install-global.sh" >/dev/null
|
|
349
|
+
grep -F 'PI_WEB_ACCESS_SOURCE="npm:pi-web-access@0.17.0"' "$ROOT/scripts/install-global.sh" >/dev/null
|
|
350
|
+
grep -F 'PI_MCP_ADAPTER_VERSION="2.15.0"' "$ROOT/scripts/audit-runtime-host.sh" >/dev/null
|
|
351
|
+
grep -F 'PI_SUBAGENTS_VERSION="0.38.0"' "$ROOT/scripts/audit-runtime-host.sh" >/dev/null
|
|
352
|
+
grep -F 'PI_WEB_ACCESS_VERSION="0.17.0"' "$ROOT/scripts/audit-runtime-host.sh" >/dev/null
|
|
353
353
|
node --input-type=module - "$ROOT/scripts/install-global.sh" "$ROOT/scripts/audit-runtime-host.sh" <<'NODE'
|
|
354
354
|
import fs from "node:fs";
|
|
355
355
|
|