@piagent/platform 1.13.1 → 1.14.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.
Files changed (67) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +2 -2
  3. package/README.vi.md +2 -2
  4. package/docs/command-reference-vietnamese.md +2 -2
  5. package/docs/distribution-standard.md +6 -6
  6. package/docs/en/windows.md +20 -1
  7. package/docs/languages.json +4 -4
  8. package/docs/model-options.md +16 -0
  9. package/docs/operator-manual-vietnamese.md +7 -7
  10. package/docs/publishing-for-teams.md +1 -0
  11. package/docs/release-install-policy.md +2 -2
  12. package/docs/team-onboarding.md +2 -2
  13. package/docs/vi/windows.md +20 -1
  14. package/docs-site/architecture.html +2 -1
  15. package/docs-site/benchmark.html +2 -1
  16. package/docs-site/commands.html +2 -1
  17. package/docs-site/content/en/index.html +4 -4
  18. package/docs-site/content/en/quickstart.html +1 -1
  19. package/docs-site/content/en/whats-new.html +11 -0
  20. package/docs-site/content/en/windows.html +76 -0
  21. package/docs-site/content/index.html +4 -4
  22. package/docs-site/content/quickstart.html +2 -2
  23. package/docs-site/content/whats-new.html +11 -0
  24. package/docs-site/content/windows.html +76 -0
  25. package/docs-site/context-engine.html +2 -1
  26. package/docs-site/ecosystem.html +2 -1
  27. package/docs-site/en/architecture.html +2 -1
  28. package/docs-site/en/benchmark.html +2 -1
  29. package/docs-site/en/commands.html +2 -1
  30. package/docs-site/en/context-engine.html +2 -1
  31. package/docs-site/en/ecosystem.html +2 -1
  32. package/docs-site/en/index.html +6 -5
  33. package/docs-site/en/mcp-approval.html +2 -1
  34. package/docs-site/en/mcp-auth.html +2 -1
  35. package/docs-site/en/mcp-servers.html +2 -1
  36. package/docs-site/en/mcp.html +2 -1
  37. package/docs-site/en/permissions.html +2 -1
  38. package/docs-site/en/profiles.html +2 -1
  39. package/docs-site/en/quickstart.html +5 -4
  40. package/docs-site/en/runtime.html +2 -1
  41. package/docs-site/en/scope.html +2 -1
  42. package/docs-site/en/security.html +2 -1
  43. package/docs-site/en/team.html +2 -1
  44. package/docs-site/en/whats-new.html +15 -3
  45. package/docs-site/en/windows.html +216 -0
  46. package/docs-site/en/workflows.html +2 -1
  47. package/docs-site/index.html +6 -5
  48. package/docs-site/mcp-approval.html +2 -1
  49. package/docs-site/mcp-auth.html +2 -1
  50. package/docs-site/mcp-servers.html +2 -1
  51. package/docs-site/mcp.html +2 -1
  52. package/docs-site/permissions.html +2 -1
  53. package/docs-site/profiles.html +2 -1
  54. package/docs-site/quickstart.html +6 -5
  55. package/docs-site/runtime.html +2 -1
  56. package/docs-site/scope.html +2 -1
  57. package/docs-site/security.html +2 -1
  58. package/docs-site/team.html +2 -1
  59. package/docs-site/whats-new.html +15 -3
  60. package/docs-site/windows.html +216 -0
  61. package/docs-site/workflows.html +2 -1
  62. package/evals/private-holdout-v1/public-exposure.v2.json +1 -1
  63. package/package.json +1 -1
  64. package/packages/piagent-core/package.json +1 -1
  65. package/scripts/build-docs-site.mjs +11 -0
  66. package/scripts/configure-model-scope.sh +37 -8
  67. package/scripts/install-global.sh +22 -4
@@ -0,0 +1,216 @@
1
+ <!doctype html>
2
+ <html lang="vi" data-copy-success="Đã lấy" data-copy-fallback="Chọn lệnh">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>Piagent trên Windows bằng một lệnh · Pi Agent Platform Docs</title>
7
+ <meta name="description" content="Một lệnh PowerShell cài WSL2, Ubuntu, Piagent và Agent Watch, nối key công ty và thêm Piagent vào Start menu; chạy lại để cập nhật." />
8
+ <meta name="theme-color" content="#050505" />
9
+ <link rel="canonical" href="https://piagent.io.vn/windows" />
10
+ <link rel="alternate" hreflang="vi" href="https://piagent.io.vn/windows" />
11
+ <link rel="alternate" hreflang="en" href="https://piagent.io.vn/en/windows" />
12
+ <link rel="alternate" hreflang="x-default" href="https://piagent.io.vn/windows" />
13
+ <link rel="icon" href="/favicon.svg" type="image/svg+xml" />
14
+ <meta property="og:title" content="Piagent trên Windows bằng một lệnh · Pi Agent Platform Docs" />
15
+ <meta property="og:description" content="Một lệnh PowerShell cài WSL2, Ubuntu, Piagent và Agent Watch, nối key công ty và thêm Piagent vào Start menu; chạy lại để cập nhật." />
16
+ <meta property="og:url" content="https://piagent.io.vn/windows" />
17
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
18
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
19
+ <link
20
+ href="https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap"
21
+ rel="stylesheet"
22
+ />
23
+ <link rel="stylesheet" href="/assets/docs.css" />
24
+ <script src="/assets/docs.js" defer></script>
25
+ </head>
26
+ <body>
27
+ <header class="topbar">
28
+ <a class="brand" href="/" aria-label="Pi Agent Platform">
29
+ <span class="brand-mark"><img src="/assets/piagent-logo.svg" alt="" /></span>
30
+ <span>Pi Agent Platform</span>
31
+ </a>
32
+ <div class="top-actions">
33
+ <span class="pill"><span class="pill-dot"></span>v1.14.0 docs · VI</span>
34
+ <nav class="language-switch" aria-label="Ngôn ngữ">
35
+ <a class="language-option current" href="/windows" hreflang="vi" lang="vi" aria-current="true">VI</a>
36
+ <a class="language-option" href="/en/windows" hreflang="en" lang="en">EN</a>
37
+ </nav>
38
+ <a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
39
+ <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
40
+ <path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
41
+ </svg>
42
+ GitHub
43
+ </a>
44
+ <button class="button mobile-menu" type="button" data-menu>Lộ trình</button>
45
+ <a class="button top-command-link" href="/commands">Commands</a>
46
+ </div>
47
+ </header>
48
+
49
+ <div class="layout with-toc">
50
+ <aside class="sidebar" data-sidebar>
51
+ <div class="sidebar-search" aria-label="Tìm trong tài liệu">
52
+ <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
53
+ <path d="M10.8 18.1a7.3 7.3 0 1 1 0-14.6 7.3 7.3 0 0 1 0 14.6Zm5.3-1.7 4.4 4.4" stroke="currentColor" stroke-width="2" stroke-linecap="round" />
54
+ </svg>
55
+ <input type="search" placeholder="Tìm trang" data-filter />
56
+ </div>
57
+
58
+ <nav aria-label="Tài liệu">
59
+ <div class="nav-group">
60
+ <p class="nav-title">Get started</p>
61
+ <a class="nav-link" href="/">Overview</a>
62
+ <a class="nav-link" href="/ecosystem">Hệ sinh thái</a>
63
+ <a class="nav-link" href="/quickstart">Quickstart</a>
64
+ <a class="nav-link current" href="/windows" aria-current="page">Cài trên Windows</a>
65
+ <a class="nav-link" href="/whats-new">Có gì mới</a>
66
+ <a class="nav-link" href="/scope">Phạm vi platform</a>
67
+ </div>
68
+ <div class="nav-group">
69
+ <p class="nav-title">Build</p>
70
+ <a class="nav-link" href="/profiles">Project profile</a>
71
+ <a class="nav-link" href="/permissions">Permission modes</a>
72
+ <a class="nav-link" href="/commands">Command catalog</a>
73
+ <a class="nav-link" href="/workflows">Workflows</a>
74
+ </div>
75
+ <div class="nav-group">
76
+ <p class="nav-title">MCP</p>
77
+ <a class="nav-link" href="/mcp">MCP overview</a>
78
+ <a class="nav-link" href="/mcp-servers">Quản lý server</a>
79
+ <a class="nav-link" href="/mcp-auth">Auth và readiness</a>
80
+ <a class="nav-link" href="/mcp-approval">Approval gate</a>
81
+ </div>
82
+ <div class="nav-group">
83
+ <p class="nav-title">Operate</p>
84
+ <a class="nav-link" href="/security">Security model</a>
85
+ <a class="nav-link" href="/architecture">Architecture</a>
86
+ <a class="nav-link" href="/context-engine">Context Engine</a>
87
+ <a class="nav-link" href="/benchmark">Benchmark</a>
88
+ <a class="nav-link" href="/runtime">Runtime tools</a>
89
+ <a class="nav-link" href="/team">Team usage</a>
90
+ </div>
91
+ </nav>
92
+ </aside>
93
+
94
+ <main>
95
+ <div class="content-shell" data-article>
96
+ <nav class="breadcrumb" aria-label="Breadcrumb">
97
+ <a href="/">Docs</a>
98
+ <span aria-hidden="true">/</span>
99
+ <span>Get started</span>
100
+ <span aria-hidden="true">/</span>
101
+ <span>Cài trên Windows</span>
102
+ </nav>
103
+ <div class="page-head">
104
+ <h1>Piagent trên Windows bằng một lệnh</h1>
105
+ <p>Một lệnh PowerShell cài WSL2, Ubuntu, Piagent và Agent Watch, nối key công ty và thêm Piagent vào Start menu; chạy lại để cập nhật.</p>
106
+ </div>
107
+ <section class="section">
108
+
109
+ <div class="steps">
110
+ <article class="step">
111
+ <div>
112
+ <h3 id="cai-mot-lenh">Cài bằng một lệnh</h3>
113
+ <p>Mở <strong>PowerShell</strong> (Start → gõ PowerShell) và chạy:</p>
114
+ <div class="command-card">
115
+ <header><span>Một lệnh</span><button class="clip-btn" data-clip="irm https://raw.githubusercontent.com/Vt-mmm/agentwatch/main/windows/setup.ps1 | iex">Lấy lệnh</button></header>
116
+ <pre><code>irm https://raw.githubusercontent.com/Vt-mmm/agentwatch/main/windows/setup.ps1 | iex</code></pre>
117
+ </div>
118
+ <p>Lệnh này lần lượt:</p>
119
+ <ol>
120
+ <li>Cài <strong>WSL2</strong> nếu máy chưa có. Windows hỏi quyền quản trị; lần đầu cần khởi động lại, và cài đặt tự chạy tiếp khi bạn đăng nhập lại.</li>
121
+ <li>Cài <strong>Ubuntu</strong>, tạo user Ubuntu theo tên Windows của bạn và hỏi mật khẩu cho user đó (dùng khi chạy <span class="inline-code">sudo</span>).</li>
122
+ <li>Cài <strong>Piagent trong Ubuntu</strong>: gói hệ thống, sandbox bubblewrap, Node 24, Piagent và đúng bản Pi mà release đang pin.</li>
123
+ <li>Hỏi <strong>mã kết nối</strong> admin gửi. Dán vào thì lệnh cài Agent Watch, kết nối key công ty và nối Piagent trong Ubuntu với key đó. Bấm Enter để bỏ qua nếu bạn chỉ dùng tài khoản AI của riêng mình.</li>
124
+ <li>Thêm mục <strong>Piagent</strong> vào Start menu và mở dashboard trong trình duyệt.</li>
125
+ </ol>
126
+ <p><strong>Cập nhật:</strong> chạy lại đúng lệnh trên. Những bước đã xong được bỏ qua; Piagent và Agent Watch được cập nhật và nối lại key công ty.</p>
127
+ <p>Agent Watch là bản nội bộ chưa ký số: nếu Windows SmartScreen cảnh báo, chọn <em>More info → Run anyway</em>.</p>
128
+ </div>
129
+ </article>
130
+
131
+ <article class="step">
132
+ <div>
133
+ <h3 id="dung-hang-ngay">Dùng hằng ngày</h3>
134
+ <p>Mở <strong>Piagent</strong> từ Start menu: một cửa sổ Ubuntu mở dashboard trong trình duyệt Windows. Giữ cửa sổ đó mở khi đang dùng.</p>
135
+ <p>Để project trong ổ của Ubuntu (ví dụ <span class="inline-code">~/projects</span>) cho nhanh; folder Windows (<span class="inline-code">/mnt/c/...</span>) vẫn dùng được nhưng chậm hơn rõ với npm và git. VS Code trên Windows mở thẳng folder trong Ubuntu qua extension WSL.</p>
136
+ </div>
137
+ </article>
138
+
139
+ <article class="step">
140
+ <div>
141
+ <h3 id="khi-cai-bi-loi">Khi cài bị lỗi</h3>
142
+ <div class="table-wrap compact-table">
143
+ <table>
144
+ <thead>
145
+ <tr>
146
+ <th>Dấu hiệu</th>
147
+ <th>Cách xử lý</th>
148
+ </tr>
149
+ </thead>
150
+ <tbody>
151
+ <tr>
152
+ <td>Lệnh đòi khởi động lại mãi, hoặc Ubuntu báo <span class="inline-code">0x80370114</span></td>
153
+ <td>Windows ghi đã bật <em>Virtual Machine Platform</em> nhưng thiếu dịch vụ máy ảo. Nếu <span class="inline-code">Test-Path C:\Windows\System32\vmcompute.exe</span> ra <span class="inline-code">False</span>: trong PowerShell <em>Run as administrator</em> chạy <span class="inline-code">DISM /Online /Cleanup-Image /RestoreHealth</span> và <span class="inline-code">sfc /scannow</span>, rồi tắt và bật lại <em>VirtualMachinePlatform</em> bằng <span class="inline-code">dism.exe</span> (mỗi lần Restart). Vẫn thiếu: cài đè Windows 11 bằng Installation Assistant, chọn giữ file và ứng dụng.</td>
154
+ </tr>
155
+ <tr>
156
+ <td><span class="inline-code">0x80370102</span> hoặc lỗi ảo hoá</td>
157
+ <td>Bật Virtualization (Intel VT-x / AMD SVM) trong BIOS.</td>
158
+ </tr>
159
+ <tr>
160
+ <td>Tải Ubuntu lỗi mạng</td>
161
+ <td><span class="inline-code">wsl --install -d Ubuntu --web-download</span>, rồi chạy lại lệnh cài.</td>
162
+ </tr>
163
+ <tr>
164
+ <td>Dashboard báo Agent Watch hoặc Piagent vừa cập nhật</td>
165
+ <td>Chạy lại lệnh cài, hoặc trong Agent Watch bấm <strong>Kết nối Piagent trong WSL</strong>.</td>
166
+ </tr>
167
+ </tbody>
168
+ </table>
169
+ </div>
170
+ <p>Kiểm tra máy: trong Ubuntu chạy <span class="inline-code">piagent studio --doctor</span>. Khi máy đã khởi động lại mà Windows vẫn thiếu dịch vụ máy ảo, lệnh cài in đúng các bước sửa ở trên thay vì đòi khởi động lại tiếp.</p>
171
+ </div>
172
+ </article>
173
+
174
+ <article class="step">
175
+ <div>
176
+ <h3 id="vi-sao-wsl2">Vì sao là WSL2</h3>
177
+ <p>Ubuntu trong WSL2 chạy ngay bên trong Windows như một máy ảo nhẹ do Windows quản lý, không phải cài song song. Chế độ công ty cần sandbox của hệ điều hành cho mọi lệnh agent chạy: Seatbelt trên macOS, bubblewrap trên Linux và WSL2. Windows chưa có sandbox tương đương, nên Piagent chạy trong WSL2.</p>
178
+ <p>Chạy thẳng trên Windows (không qua WSL) mới là bản xem trước cho chế độ cá nhân. Cài từng bước bằng tay và chi tiết sandbox: <a href="https://github.com/Vt-mmm/piagent/blob/main/docs/vi/windows.md">Piagent trên Windows</a>.</p>
179
+ </div>
180
+ </article>
181
+ </div>
182
+ </section>
183
+ <nav class="pager" aria-label="Trang kế tiếp">
184
+ <a class="pager-prev" href="/quickstart">
185
+ <span class="pager-label">Trước</span>
186
+ <span class="pager-title">Quickstart</span>
187
+ </a>
188
+ <a class="pager-next" href="/whats-new">
189
+ <span class="pager-label">Tiếp</span>
190
+ <span class="pager-title">Có gì mới</span>
191
+ </a>
192
+ </nav>
193
+
194
+ <footer class="footer">
195
+ <p>Pi Agent Platform docs · static HTML · governed agent workflow</p>
196
+ <div class="footer-links" aria-label="Liên kết ngoài">
197
+ <a href="https://piagent.io.vn" target="_blank" rel="noopener noreferrer">piagent.io.vn</a>
198
+ <a href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer">GitHub repository</a>
199
+ <a href="/en/windows" hreflang="en">English</a>
200
+ <a href="https://www.facebook.com/vinhtam0544/" target="_blank" rel="noopener noreferrer">Facebook profile</a>
201
+ </div>
202
+ </footer>
203
+ </div>
204
+ </main>
205
+
206
+ <aside class="toc" aria-label="Mục lục trang">
207
+ <p class="toc-title">Trên trang này</p>
208
+ <nav data-toc></nav>
209
+ </aside>
210
+ </div>
211
+ <script>
212
+ window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); };
213
+ </script>
214
+ <script defer src="/_vercel/insights/script.js"></script>
215
+ </body>
216
+ </html>
@@ -30,7 +30,7 @@
30
30
  <span>Pi Agent Platform</span>
31
31
  </a>
32
32
  <div class="top-actions">
33
- <span class="pill"><span class="pill-dot"></span>v1.13.1 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.14.0 docs · VI</span>
34
34
  <nav class="language-switch" aria-label="Ngôn ngữ">
35
35
  <a class="language-option current" href="/workflows" hreflang="vi" lang="vi" aria-current="true">VI</a>
36
36
  <a class="language-option" href="/en/workflows" hreflang="en" lang="en">EN</a>
@@ -61,6 +61,7 @@
61
61
  <a class="nav-link" href="/">Overview</a>
62
62
  <a class="nav-link" href="/ecosystem">Hệ sinh thái</a>
63
63
  <a class="nav-link" href="/quickstart">Quickstart</a>
64
+ <a class="nav-link" href="/windows">Cài trên Windows</a>
64
65
  <a class="nav-link" href="/whats-new">Có gì mới</a>
65
66
  <a class="nav-link" href="/scope">Phạm vi platform</a>
66
67
  </div>
@@ -257,7 +257,7 @@
257
257
  {
258
258
  "path": "tests",
259
259
  "fileCount": 522,
260
- "sha256": "e1bb15fcf648cda877d9259767409cb55b3ad1c01eed0cfaade4f1d1c748efa8"
260
+ "sha256": "8fc4dfb3f75d7270c03298afec804cba5f1a849cbf06f8dd352480ee50e558b7"
261
261
  }
262
262
  ],
263
263
  "custodianComparisonRules": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@piagent/platform",
3
- "version": "1.13.1",
3
+ "version": "1.14.0",
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.13.1",
3
+ "version": "1.14.0",
4
4
  "type": "module",
5
5
  "private": true,
6
6
  "license": "MIT",
@@ -69,6 +69,12 @@ const NAV = [
69
69
  title: "Step by step cho thành viên mới",
70
70
  lead: "Hai lệnh để cài, mở repo, chọn profile và quyền, rồi giao việc bằng lời thường; guard kiểm tra từng tool call."
71
71
  },
72
+ {
73
+ slug: "windows",
74
+ nav: "Cài trên Windows",
75
+ title: "Piagent trên Windows bằng một lệnh",
76
+ lead: "Một lệnh PowerShell cài WSL2, Ubuntu, Piagent và Agent Watch, nối key công ty và thêm Piagent vào Start menu; chạy lại để cập nhật."
77
+ },
72
78
  {
73
79
  slug: "whats-new",
74
80
  nav: "Có gì mới",
@@ -200,6 +206,11 @@ const EN_PAGE_COPY = {
200
206
  title: "Step by step for new team members",
201
207
  lead: "Install with two commands, open a repository, choose its profile and permissions, then ask in plain language; the guard checks every tool call."
202
208
  },
209
+ windows: {
210
+ nav: "Windows",
211
+ title: "Piagent on Windows with one command",
212
+ lead: "One PowerShell command installs WSL2, Ubuntu, Piagent and Agent Watch, binds the company key and adds Piagent to the Start menu; run it again to update."
213
+ },
203
214
  "whats-new": {
204
215
  nav: "What’s new",
205
216
  title: "1.9.0: ask in plain language, the team's Harness checks",
@@ -14,6 +14,9 @@ Options:
14
14
  --dry-run Print resulting settings JSON without writing
15
15
  --prune Only remove enabledModels patterns that match no model
16
16
  Pi knows (Pi warns about each on every start); keep the rest
17
+ --keep-member-choices Install/update mode: set the default model and model list
18
+ only where Pi has none yet; otherwise keep the member's and
19
+ add only models this release offers for the first time
17
20
  -h, --help
18
21
 
19
22
  Purpose:
@@ -36,6 +39,7 @@ DEFAULT_MODEL="openai-codex/gpt-6-sol:high"
36
39
  SETTINGS_PATH="${PI_CODING_AGENT_DIR:-"${HOME}/.pi/agent"}/settings.json"
37
40
  DRY_RUN=false
38
41
  PRUNE=false
42
+ KEEP=false
39
43
 
40
44
  # A flag whose value is missing swallows the next flag instead. `--settings
41
45
  # --dry-run` used to set the settings path to the string "--dry-run", leave
@@ -75,6 +79,10 @@ while [[ $# -gt 0 ]]; do
75
79
  PRUNE=true
76
80
  shift
77
81
  ;;
82
+ --keep-member-choices)
83
+ KEEP=true
84
+ shift
85
+ ;;
78
86
  -h|--help)
79
87
  usage
80
88
  exit 0
@@ -102,14 +110,15 @@ case "$PRESET" in
102
110
  ;;
103
111
  esac
104
112
 
105
- PIAGENT_SCOPE_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" node --input-type=module - "$SETTINGS_PATH" "$PRESET" "$DEFAULT_MODEL" "$DRY_RUN" <<'NODE'
113
+ PIAGENT_SCOPE_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" node --input-type=module - "$SETTINGS_PATH" "$PRESET" "$DEFAULT_MODEL" "$DRY_RUN" "$KEEP" <<'NODE'
106
114
  import fs from "node:fs";
107
115
  import path from "node:path";
108
116
  import { pathToFileURL } from "node:url";
109
117
  const { prepareClaudeModelAdditions } = await import(pathToFileURL(process.env.PIAGENT_SCOPE_ROOT + "/scripts/claude-model-additions.mjs"));
110
118
 
111
- const [settingsPath, preset, defaultModelInput, dryRunRaw] = process.argv.slice(2);
119
+ const [settingsPath, preset, defaultModelInput, dryRunRaw, keepRaw] = process.argv.slice(2);
112
120
  const dryRun = dryRunRaw === "true";
121
+ const keep = keepRaw === "true";
113
122
 
114
123
  const codexModels = [
115
124
  "openai-codex/gpt-5.3-codex-spark:minimal",
@@ -160,10 +169,28 @@ const parsedDefault = parseDefaultModel(defaultModelInput);
160
169
  const settingsBefore = fs.existsSync(settingsPath) ? fs.readFileSync(settingsPath, "utf8") : null;
161
170
  const settings = settingsBefore === null ? {} : JSON.parse(settingsBefore);
162
171
 
163
- settings.defaultProvider = parsedDefault.provider;
164
- settings.defaultModel = parsedDefault.model;
165
- settings.defaultThinkingLevel = parsedDefault.thinking;
166
- settings.enabledModels = enabledModels;
172
+ // What Piagent last offered, so an update adds only models new to this
173
+ // release and never puts back one the member removed.
174
+ const recordPath = path.join(path.dirname(settingsPath), "piagent-model-scope.json");
175
+ let offered = null;
176
+ try { const record = JSON.parse(fs.readFileSync(recordPath, "utf8")); if (Array.isArray(record.offered)) offered = record.offered; } catch { /* none yet */ }
177
+ const notes = [];
178
+ if (!keep || !settings.defaultModel) {
179
+ settings.defaultProvider = parsedDefault.provider;
180
+ settings.defaultModel = parsedDefault.model;
181
+ settings.defaultThinkingLevel = parsedDefault.thinking;
182
+ } else {
183
+ notes.push(`kept the member's default: ${settings.defaultProvider ?? "?"}/${settings.defaultModel}${settings.defaultThinkingLevel ? `:${settings.defaultThinkingLevel}` : ""}`);
184
+ }
185
+ if (!keep || !Array.isArray(settings.enabledModels) || settings.enabledModels.length === 0) {
186
+ settings.enabledModels = enabledModels;
187
+ } else {
188
+ // Installed before this record existed: the member's list stays, and the
189
+ // record starts now.
190
+ const fresh = offered ? enabledModels.filter((model) => !offered.includes(model) && !settings.enabledModels.includes(model)) : [];
191
+ settings.enabledModels = [...settings.enabledModels, ...fresh];
192
+ notes.push(fresh.length ? `kept the member's model list, added ${fresh.join(", ")}` : "kept the member's model list");
193
+ }
167
194
 
168
195
  const catalogEdit = preset === "codex" ? null : prepareClaudeModelAdditions(path.join(path.dirname(settingsPath), "models.json"));
169
196
  const output = `${JSON.stringify(settings, null, 2)}\n`;
@@ -180,9 +207,11 @@ if (dryRun) {
180
207
  }
181
208
  throw error;
182
209
  }
210
+ fs.writeFileSync(recordPath, `${JSON.stringify({ version: 1, preset, offered: enabledModels }, null, 2)}\n`);
183
211
  console.log(`Configured Pi model scope: ${settingsPath}`);
184
212
  console.log(` preset: ${preset}`);
185
- console.log(` default: ${parsedDefault.provider}/${parsedDefault.model}:${parsedDefault.thinking}`);
186
- console.log(` enabledModels: ${enabledModels.length}`);
213
+ console.log(` default: ${settings.defaultProvider}/${settings.defaultModel}:${settings.defaultThinkingLevel}`);
214
+ console.log(` enabledModels: ${settings.enabledModels.length}`);
215
+ for (const note of notes) console.log(` ${note}`);
187
216
  }
188
217
  NODE
@@ -24,7 +24,11 @@ Options:
24
24
  Install pi-web-access for the researcher subagent (default: install).
25
25
  --with-herdr Also configure Herdr integration.
26
26
  --model-scope <full|codex|claude>
27
- Model families to enable in Pi (default: full).
27
+ Model families to enable in Pi (default: full). A member who
28
+ already has a default model and model list keeps them; an
29
+ update only adds models new to this release.
30
+ --reset-model-scope Replace the member's default model and model list with the
31
+ preset (what every update did before 1.14.0).
28
32
  --no-model-scope Leave the user's enabledModels untouched.
29
33
  --default-model <provider/model[:thinking]>
30
34
  Default model written to Pi settings
@@ -90,6 +94,7 @@ SUBAGENTS_MODEL_SCOPE="none"
90
94
  WITH_WEB_ACCESS=true
91
95
  WITH_HERDR=false
92
96
  CONFIGURE_MODEL_SCOPE=true
97
+ RESET_MODEL_SCOPE=false
93
98
  MODEL_SCOPE_PRESET="full"
94
99
  DEFAULT_MODEL="openai-codex/gpt-6-sol:high"
95
100
  DRY_RUN=false
@@ -135,7 +140,12 @@ detect_runtime_surface() {
135
140
  arch_name="$(uname -m 2>/dev/null || echo unknown)"
136
141
 
137
142
  if [[ "$os_name" == "Linux" && -r /proc/version ]] && grep -qiE "microsoft|wsl" /proc/version 2>/dev/null; then
138
- printf 'wsl2/%s (experimental; not release-gated)' "$arch_name"
143
+ # WSL2 is how Windows runs Piagent (since 1.13.0): the Windows setup and
144
+ # the bubblewrap sandbox run in CI on x86_64.
145
+ case "$arch_name" in
146
+ x86_64|amd64) printf 'wsl2/%s (verified in CI: Windows setup and the bubblewrap sandbox)' "$arch_name" ;;
147
+ *) printf 'wsl2/%s (supported target; run smoke before team rollout)' "$arch_name" ;;
148
+ esac
139
149
  return
140
150
  fi
141
151
 
@@ -153,7 +163,7 @@ detect_runtime_surface() {
153
163
  printf 'linux-arm64 (supported target; run smoke before team rollout)'
154
164
  ;;
155
165
  MINGW*|MSYS*|CYGWIN*)
156
- printf 'native-windows/%s (not release-gated; terminal helpers require Bash semantics)' "$arch_name"
166
+ printf 'native-windows/%s (personal-mode preview, not release-gated; teams use WSL2)' "$arch_name"
157
167
  ;;
158
168
  *)
159
169
  printf '%s/%s (outside v1.2.0 release matrix)' "$os_name" "$arch_name"
@@ -530,6 +540,10 @@ while [[ $# -gt 0 ]]; do
530
540
  DEFAULT_MODEL="$2"
531
541
  shift 2
532
542
  ;;
543
+ --reset-model-scope)
544
+ RESET_MODEL_SCOPE=true
545
+ shift
546
+ ;;
533
547
  --no-model-scope)
534
548
  CONFIGURE_MODEL_SCOPE=false
535
549
  shift
@@ -750,7 +764,11 @@ fi
750
764
 
751
765
  if [[ "$CONFIGURE_MODEL_SCOPE" == true ]]; then
752
766
  echo "Configuring Pi model selector scope:"
753
- run_cmd bash "$PLATFORM_ROOT/scripts/configure-model-scope.sh" --preset "$MODEL_SCOPE_PRESET" --default-model "$DEFAULT_MODEL"
767
+ if [[ "$RESET_MODEL_SCOPE" == true ]]; then
768
+ run_cmd bash "$PLATFORM_ROOT/scripts/configure-model-scope.sh" --preset "$MODEL_SCOPE_PRESET" --default-model "$DEFAULT_MODEL"
769
+ else
770
+ run_cmd bash "$PLATFORM_ROOT/scripts/configure-model-scope.sh" --preset "$MODEL_SCOPE_PRESET" --default-model "$DEFAULT_MODEL" --keep-member-choices
771
+ fi
754
772
  fi
755
773
 
756
774
  if [[ "$WITH_HERDR" == true ]]; then