@piagent/platform 1.2.6 → 1.2.7

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 CHANGED
@@ -2,6 +2,20 @@
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.7 - 2026-07-31
6
+
7
+ ### Security
8
+
9
+ - 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.
10
+
11
+ - 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`.
12
+
13
+ ### Fixed
14
+
15
+ - 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.
16
+
17
+ - 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.
18
+
5
19
  ## v1.2.6 - 2026-07-31
6
20
 
7
21
  ### Added
package/README.md CHANGED
@@ -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.6` or a reviewed commit.
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.7` 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.6` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
469
- | `pi install git:github.com/Vt-mmm/piagent@v1.2.6` | Cài pinned release khi cần reproducible team setup. |
468
+ | `npm install -g --ignore-scripts @piagent/platform@1.2.7` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
469
+ | `pi install git:github.com/Vt-mmm/piagent@v1.2.7` | 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. |
@@ -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.6` |
17
+ | Team pinned release | `git:github.com/Vt-mmm/piagent@v1.2.7` |
18
18
  | Personal/sandbox dev | `git:github.com/Vt-mmm/piagent` |
19
- | Registry distribution | `npm:@piagent/platform@1.2.6` |
19
+ | Registry distribution | `npm:@piagent/platform@1.2.7` |
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.6` | Install the Pi package matching the helper. |
29
+ | `stable` | `bash scripts/install-global.sh --stable` | Helper release tag resolved to commit SHA, currently `v1.2.7` | 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.6
56
+ pi install git:github.com/Vt-mmm/piagent@v1.2.7
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.6
68
+ npm install -g --ignore-scripts @piagent/platform@1.2.7
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.6` 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.6`.
73
+ `pi install git:github.com/Vt-mmm/piagent@v1.2.7` 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.7`.
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.6 \
123
+ --package-source git:github.com/Vt-mmm/piagent@v1.2.7 \
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.6
21
+ npm install -g --ignore-scripts @piagent/platform@1.2.7
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.6`. Máy cá nhân có thể dùng `git:github.com/Vt-mmm/piagent` để theo latest.
26
+ Khi seed `.pi/settings.json` cho team/repo cần audit lặp lại, giữ package source dạng pinned tag như `git:github.com/Vt-mmm/piagent@v1.2.7`. 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.6
102
+ npm install -g --ignore-scripts @piagent/platform@1.2.7
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.6 \
285
+ --package-source git:github.com/Vt-mmm/piagent@v1.2.7 \
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.6` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
898
- | `pi install git:github.com/Vt-mmm/piagent@v1.2.6` | Install pinned release cho reproducible team setup. |
897
+ | `npm install -g --ignore-scripts @piagent/platform@1.2.7` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
898
+ | `pi install git:github.com/Vt-mmm/piagent@v1.2.7` | 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.6
1005
+ npm install -g --ignore-scripts @piagent/platform@1.2.7
1006
1006
  command -v piagent-install
1007
1007
  ```
1008
1008
 
@@ -59,6 +59,7 @@ 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.
62
63
 
63
64
  ## Không publish
64
65
 
@@ -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.6 | Rollout guidance |
13
+ | Surface | Status for v1.2.7 | 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.6` | Fixed after resolution | Default for team rollout. |
36
+ | `stable` | `git:github.com/Vt-mmm/piagent@<resolved-commit-sha>` from `v1.2.7` | 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.6
56
+ npm install -g --ignore-scripts @piagent/platform@1.2.7
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.6 (helper package version)
65
- tag: v1.2.6
64
+ currentRelease: v1.2.7 (helper package version)
65
+ tag: v1.2.7
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.6
82
+ pi install git:github.com/Vt-mmm/piagent@v1.2.7
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 and audits the exact optional Pi host and pinned add-on dependency tree so `--legacy-peer-deps` cannot hide deployed runtime findings.
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.6, and WSL2 is experimental/unverified.
24
+ - Supported release verification covers macOS Apple Silicon + Bash, Linux x64 + Bash, Node.js `>=22.19.0`, and the exact Pi host version declared by the release. macOS Intel + Bash and Linux ARM64 + Bash are supported targets that need local smoke verification before broad rollout. Native Windows is not a team-rollout target for v1.2.7, 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
@@ -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.35.1
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
 
@@ -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.6
12
+ npm install -g --ignore-scripts @piagent/platform@1.2.7
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.6
46
+ npm install -g --ignore-scripts @piagent/platform@1.2.7
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.6 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 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.6 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 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.6 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 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.6 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 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.6 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 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.6 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 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.6 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 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.6 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 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.6 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 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.6 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 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.6 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 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.6 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 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.6 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 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.6 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 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.6 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 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.6 docs</span>
30
+ <span class="pill"><span class="pill-dot"></span>v1.2.7 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@piagent/platform",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@piagent/core",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "type": "module",
5
5
  "private": true,
6
6
  "license": "MIT",
@@ -27,8 +27,8 @@ 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.11.0"
31
- PI_SUBAGENTS_VERSION="0.35.1"
30
+ PI_MCP_ADAPTER_VERSION="2.15.0"
31
+ PI_SUBAGENTS_VERSION="0.38.0"
32
32
  PI_WEB_ACCESS_VERSION="0.13.0"
33
33
 
34
34
  if [[ "$PI_CODING_VERSION" != "$PI_AI_VERSION" ]]; then
@@ -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 high and above..."
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 still "no high or critical advisory in the pinned Pi host tree".
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] [--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,6 +39,8 @@ 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
45
  - Web access is optional. Install it only when you want the builtin `researcher` subagent to browse/fetch web sources inside Pi.
44
46
  USAGE
@@ -57,6 +59,7 @@ 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
65
  WITH_WEB_ACCESS=false
@@ -71,11 +74,11 @@ 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.11.0"
75
- PI_SUBAGENTS_SOURCE="npm:pi-subagents@0.35.1"
77
+ PI_MCP_ADAPTER_SOURCE="npm:pi-mcp-adapter@2.15.0"
78
+ PI_SUBAGENTS_SOURCE="npm:pi-subagents@0.38.0"
76
79
  PI_WEB_ACCESS_SOURCE="npm:pi-web-access@0.13.0"
77
- PI_MCP_ADAPTER_INTEGRITY="sha512-4Y/eLbhbxnRih519dJUxMyQ5QASvPcdWyBlS8+dDXteAzaMuLnd4nMTWgoZw3JRIW+0r93KAQcz1Rbli4xCwEQ=="
78
- PI_SUBAGENTS_INTEGRITY="sha512-nIH6liO541FZ1RoeEu58Ligd59tiNw0/ODPgHh7uvx9Dk4UpWH08F84/l1+hXCzUgC85OCmyVtngWkZjcK94Cg=="
80
+ PI_MCP_ADAPTER_INTEGRITY="sha512-HJAVt2I5IB52pKpSUYbVJnzOmuXYBCc/ZrI9ylHxYQWmE7p75j7aWzsHe734EFN+gL7WaM23CTX3eYHz2THKBA=="
81
+ PI_SUBAGENTS_INTEGRITY="sha512-8wGQiX6rkR5J4V+AnWtQg3+LmC+cHnZIM1f/VWTjCTkVmcoKdeLsTAYG6BS2yKAugyEUjNUGj3vE5d9nj9m61A=="
79
82
  PI_WEB_ACCESS_INTEGRITY="sha512-ny0bHisMWdobmu1hcMp/jqjaRh6pYrH7dctBK2CVyRF4ia7bP47RnOPYdG1yiks9ohtcanWir5Hl9EFap8h0zQ=="
80
83
 
81
84
  require_value() {
@@ -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
- pi list --approve 2>/dev/null | awk '
231
- $0 == "User packages:" { in_user = 1; next }
232
- $0 == "Project packages:" { in_user = 0; next }
233
- in_user && $0 ~ /^ [^ ]/ { sub(/^ /, ""); print }
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)
@@ -542,6 +578,10 @@ else
542
578
  fi
543
579
  fi
544
580
 
581
+ if [[ "$SUBAGENTS_EXPLICIT" == false ]] && command -v pi >/dev/null 2>&1 && has_user_npm_package_source "pi-subagents"; then
582
+ WITH_SUBAGENTS=true
583
+ fi
584
+
545
585
  echo "Installing Pi Agent Platform package:"
546
586
  echo " channel: $RESOLVED_CHANNEL_LABEL"
547
587
  echo " currentRelease: $CURRENT_RELEASE_TAG (helper package version)"
@@ -562,6 +602,7 @@ if [[ "$WITH_MCP" == true ]]; then
562
602
  if [[ "$DRY_RUN" == false ]]; then
563
603
  verify_npm_integrity "$PI_MCP_ADAPTER_SOURCE" "$PI_MCP_ADAPTER_INTEGRITY"
564
604
  fi
605
+ remove_existing_npm_package_sources "pi-mcp-adapter"
565
606
  run_cmd pi install "$PI_MCP_ADAPTER_SOURCE"
566
607
  if [[ "$DRY_RUN" == false ]] && command -v pi-mcp-adapter >/dev/null 2>&1; then
567
608
  pi-mcp-adapter init || true
@@ -575,6 +616,7 @@ if [[ "$WITH_SUBAGENTS" == true ]]; then
575
616
  if [[ "$DRY_RUN" == false ]]; then
576
617
  verify_npm_integrity "$PI_SUBAGENTS_SOURCE" "$PI_SUBAGENTS_INTEGRITY"
577
618
  fi
619
+ remove_existing_npm_package_sources "pi-subagents"
578
620
  run_cmd pi install "$PI_SUBAGENTS_SOURCE"
579
621
  echo "Configuring Pi subagents baseline:"
580
622
  run_cmd bash "$PLATFORM_ROOT/scripts/configure-subagents.sh" --preset "$SUBAGENTS_PRESET" --model-scope "$SUBAGENTS_MODEL_SCOPE"
package/scripts/setup.sh CHANGED
@@ -397,9 +397,9 @@ if [[ "$DO_GLOBAL" == true ]]; then
397
397
  ensure_pi_cli
398
398
  install_args=("$PLATFORM_ROOT/scripts/install-global.sh" "--package-source" "$PACKAGE_SOURCE")
399
399
  # 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; the
401
- # flags below can stay one-sided only because the installer defaults them off.
402
- #
400
+ # saying nothing here would install it against the operator's choice.
401
+ # Subagents also needs an explicit opt-out because the installer now preserves
402
+ # an existing install during updates.
403
403
  if [[ "$WITH_MCP" == true ]]; then
404
404
  install_args+=("--with-mcp" "--mcp-preset" "$MCP_PRESET")
405
405
  else
@@ -407,6 +407,8 @@ if [[ "$DO_GLOBAL" == true ]]; then
407
407
  fi
408
408
  if [[ "$WITH_SUBAGENTS" == true ]]; then
409
409
  install_args+=("--with-subagents" "--subagents-preset" "$SUBAGENTS_PRESET" "--subagents-model-scope" "$SUBAGENTS_MODEL_SCOPE")
410
+ else
411
+ install_args+=("--no-subagents")
410
412
  fi
411
413
  if [[ "$WITH_WEB_ACCESS" == true ]]; then
412
414
  install_args+=("--with-web-access")
@@ -229,8 +229,8 @@ if (commandExists("pi")) {
229
229
  const combined = `${piList.stdout ?? ""}\n${piList.stderr ?? ""}`;
230
230
  piHasMcpAdapter = combined.includes("pi-mcp-adapter");
231
231
  piHasSubagents = combined.includes("pi-subagents");
232
- 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.11.0`");
233
- if (!piHasSubagents) warnings.push("Pi subagents package not found in `pi list`; run setup with --with-subagents or `pi install npm:pi-subagents@0.35.1`");
232
+ 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`");
233
+ 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`");
234
234
  }
235
235
 
236
236
  const mcpFiles = [
@@ -344,11 +344,11 @@ 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.11.0"' "$ROOT/scripts/install-global.sh" >/dev/null
348
- grep -F 'PI_SUBAGENTS_SOURCE="npm:pi-subagents@0.35.1"' "$ROOT/scripts/install-global.sh" >/dev/null
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
349
  grep -F 'PI_WEB_ACCESS_SOURCE="npm:pi-web-access@0.13.0"' "$ROOT/scripts/install-global.sh" >/dev/null
350
- grep -F 'PI_MCP_ADAPTER_VERSION="2.11.0"' "$ROOT/scripts/audit-runtime-host.sh" >/dev/null
351
- grep -F 'PI_SUBAGENTS_VERSION="0.35.1"' "$ROOT/scripts/audit-runtime-host.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
352
  grep -F 'PI_WEB_ACCESS_VERSION="0.13.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";