@piagent/platform 1.9.0 → 1.9.2

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 (74) hide show
  1. package/CHANGELOG.md +52 -1
  2. package/README.md +1 -1
  3. package/README.vi.md +1 -1
  4. package/docs/command-reference-vietnamese.md +2 -2
  5. package/docs/distribution-standard.md +6 -6
  6. package/docs/languages.json +2 -2
  7. package/docs/operator-manual-vietnamese.md +7 -7
  8. package/docs/publishing-for-teams.md +2 -0
  9. package/docs/release-install-policy.md +2 -2
  10. package/docs/team-onboarding.md +2 -2
  11. package/docs-site/architecture.html +1 -1
  12. package/docs-site/benchmark.html +1 -1
  13. package/docs-site/commands.html +1 -1
  14. package/docs-site/content/en/index.html +4 -4
  15. package/docs-site/content/en/whats-new.html +26 -0
  16. package/docs-site/content/index.html +4 -4
  17. package/docs-site/content/whats-new.html +26 -0
  18. package/docs-site/context-engine.html +1 -1
  19. package/docs-site/ecosystem.html +1 -1
  20. package/docs-site/en/architecture.html +1 -1
  21. package/docs-site/en/benchmark.html +1 -1
  22. package/docs-site/en/commands.html +1 -1
  23. package/docs-site/en/context-engine.html +1 -1
  24. package/docs-site/en/ecosystem.html +1 -1
  25. package/docs-site/en/index.html +5 -5
  26. package/docs-site/en/mcp-approval.html +1 -1
  27. package/docs-site/en/mcp-auth.html +1 -1
  28. package/docs-site/en/mcp-servers.html +1 -1
  29. package/docs-site/en/mcp.html +1 -1
  30. package/docs-site/en/permissions.html +1 -1
  31. package/docs-site/en/profiles.html +1 -1
  32. package/docs-site/en/quickstart.html +1 -1
  33. package/docs-site/en/runtime.html +1 -1
  34. package/docs-site/en/scope.html +1 -1
  35. package/docs-site/en/security.html +1 -1
  36. package/docs-site/en/team.html +1 -1
  37. package/docs-site/en/whats-new.html +27 -1
  38. package/docs-site/en/workflows.html +1 -1
  39. package/docs-site/index.html +5 -5
  40. package/docs-site/mcp-approval.html +1 -1
  41. package/docs-site/mcp-auth.html +1 -1
  42. package/docs-site/mcp-servers.html +1 -1
  43. package/docs-site/mcp.html +1 -1
  44. package/docs-site/permissions.html +1 -1
  45. package/docs-site/profiles.html +1 -1
  46. package/docs-site/quickstart.html +1 -1
  47. package/docs-site/runtime.html +1 -1
  48. package/docs-site/scope.html +1 -1
  49. package/docs-site/security.html +1 -1
  50. package/docs-site/team.html +1 -1
  51. package/docs-site/whats-new.html +27 -1
  52. package/docs-site/workflows.html +1 -1
  53. package/evals/private-holdout-v1/public-exposure.v2.json +2 -2
  54. package/package.json +1 -1
  55. package/packages/piagent-core/managed/client-agent.mjs +6 -0
  56. package/packages/piagent-core/managed/helper-roles.mjs +65 -0
  57. package/packages/piagent-core/managed/request-stream.mjs +2 -1
  58. package/packages/piagent-core/managed/session.mjs +51 -26
  59. package/packages/piagent-core/managed/tool-boundary.mjs +44 -12
  60. package/packages/piagent-core/managed/web-search.mjs +42 -4
  61. package/packages/piagent-core/managed/workflow.mjs +29 -2
  62. package/packages/piagent-core/package.json +1 -1
  63. package/packages/piagent-core/runtime/managed-failure.d.mts +1 -1
  64. package/packages/piagent-core/runtime/managed-failure.mjs +5 -3
  65. package/packages/piagent-webui/dist/client/assets/{MarkdownMessage-Dd9wPk-v.js → MarkdownMessage-BAeuN-Z9.js} +1 -1
  66. package/packages/piagent-webui/dist/client/assets/{index-7I-50Q2U.js → index-ClXiZwIU.js} +4 -4
  67. package/packages/piagent-webui/dist/client/index.html +1 -1
  68. package/packages/piagent-webui/gateway/managed-projection.ts +4 -1
  69. package/packages/piagent-webui/server/transcript-projection.ts +1 -1
  70. package/schemas/piagent-webui/session-catalog-v1.schema.json +1 -1
  71. package/schemas/piagent-webui/transcript-v1.schema.json +1 -1
  72. package/scripts/init-project.sh +0 -2
  73. package/scripts/install-global.sh +3 -2
  74. package/scripts/setup.sh +10 -6
@@ -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.9.0 docs · EN</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.9.2 docs · EN</span>
34
34
  <nav class="language-switch" aria-label="Language">
35
35
  <a class="language-option" href="/runtime" hreflang="vi" lang="vi">VI</a>
36
36
  <a class="language-option current" href="/en/runtime" hreflang="en" lang="en" aria-current="true">EN</a>
@@ -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.9.0 docs · EN</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.9.2 docs · EN</span>
34
34
  <nav class="language-switch" aria-label="Language">
35
35
  <a class="language-option" href="/scope" hreflang="vi" lang="vi">VI</a>
36
36
  <a class="language-option current" href="/en/scope" hreflang="en" lang="en" aria-current="true">EN</a>
@@ -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.9.0 docs · EN</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.9.2 docs · EN</span>
34
34
  <nav class="language-switch" aria-label="Language">
35
35
  <a class="language-option" href="/security" hreflang="vi" lang="vi">VI</a>
36
36
  <a class="language-option current" href="/en/security" hreflang="en" lang="en" aria-current="true">EN</a>
@@ -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.9.0 docs · EN</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.9.2 docs · EN</span>
34
34
  <nav class="language-switch" aria-label="Language">
35
35
  <a class="language-option" href="/team" hreflang="vi" lang="vi">VI</a>
36
36
  <a class="language-option current" href="/en/team" hreflang="en" lang="en" aria-current="true">EN</a>
@@ -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.9.0 docs · EN</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.9.2 docs · EN</span>
34
34
  <nav class="language-switch" aria-label="Language">
35
35
  <a class="language-option" href="/whats-new" hreflang="vi" lang="vi">VI</a>
36
36
  <a class="language-option current" href="/en/whats-new" hreflang="en" lang="en" aria-current="true">EN</a>
@@ -103,6 +103,32 @@
103
103
  <h1>1.9.0: ask in plain language, the team's Harness checks</h1>
104
104
  <p>The task contract and workflow commands are gone. Company mode asks for checks and a review on its own; Stop, network commands on approval and clearer approval cards.</p>
105
105
  </div>
106
+ <section class="section">
107
+ <p class="section-kicker">v1.9.2 · 2026-10-03</p>
108
+ <h2 id="v1-9-2">Web work goes to the research subagent, and the chat stays put</h2>
109
+ <p class="section-lead">In company mode with a research subagent, everything on the web runs on that subagent's cheaper model. The main agent receives its summary with sources. Sending a message in a long conversation no longer pulls the page to the top.</p>
110
+ <div class="grid cols-3">
111
+ <article class="card"><h3 id="research-web">Web work for the research subagent</h3><p>With a research subagent in the Harness, the main agent has no web tools. Searches and pages are read on the research subagent's model.</p></article>
112
+ <article class="card"><h3 id="search-engine">Which engine searched</h3><p>Each search result names the engine that answered: Tavily, Exa or Parallel through the company search pool, or the model provider's own search.</p></article>
113
+ <article class="card"><h3 id="chat-jump">The chat stays still</h3><p>Sending a message no longer makes the history vanish for a moment or pull the page to the top. The header shows the number of subagents the Harness enables.</p></article>
114
+ </div>
115
+ </section>
116
+
117
+ <section class="section">
118
+ <p class="section-kicker">v1.9.1 · 2026-10-03</p>
119
+ <h2 id="v1-9-1">Scout and verify subagents, web search for every role</h2>
120
+ <p class="section-lead">In company mode the team's Harness can enable two more subagents on cheaper models. Scout reads the code before a change. Verify runs the checks again and compares conclusions with evidence. Every role, including roles on API-key models, searches the web through the team's search pool.</p>
121
+ <div class="grid cols-3">
122
+ <article class="card"><h3 id="scout-helper">Scout subagent</h3><p>It reads the project only: no web, no commands. Its answers come with file and line. The main agent hands broad reading to it and keeps its own context for the change.</p></article>
123
+ <article class="card"><h3 id="verify-helper">Verify subagent</h3><p>It runs the repository's checks in a read-only sandbox without network, and compares each requirement with the code and primary sources. Each requirement comes back as pass, fail or unverifiable, with evidence. A check it passes counts toward the turn's process.</p></article>
124
+ <article class="card"><h3 id="search-pool">Web search through the search pool</h3><p><span class="inline-code">web_search</span> asks Studio's search pool first: the team's search keys, then keyless providers. That way roles on API-key models can search too.</p></article>
125
+ <article class="card"><h3 id="enabled-helpers">Only enabled subagents</h3><p>The main agent sees only the subagents its Harness enables. The dashboard shows running subagents against the number enabled.</p></article>
126
+ <article class="card"><h3 id="sandbox-tests">Project tests run in the sandbox</h3><p>The sandbox reads translation files named <span class="inline-code">auth.json</span> and hides <span class="inline-code">.env*</span> files outright (templates excepted), so type checks, Vitest and Next run without exposing secrets. End-to-end tests with Playwright's Chromium run as a network command you approve.</p></article>
127
+ <article class="card"><h3 id="installer-hints">Leaner installer hints</h3><p><span class="inline-code">piagent-install</span> and <span class="inline-code">piagent-setup</span> no longer suggest commands retired in 1.9.0. They mention <span class="inline-code">/mcp</span> and <span class="inline-code">/subagents-doctor</span> only when that run installed them.</p></article>
128
+ </div>
129
+ <p>One company-mode turn ran live through Studio. The scout read the repository before the change, verify reported 6 of 6 requirements passed, review found no blocking issue, and every request was metered.</p>
130
+ </section>
131
+
106
132
  <section class="section">
107
133
  <p class="section-kicker">v1.9.0 · 2026-10-02</p>
108
134
  <h2 id="v1-9-0">Ask in plain language; the team's Harness does the checking</h2>
@@ -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.9.0 docs · EN</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.9.2 docs · EN</span>
34
34
  <nav class="language-switch" aria-label="Language">
35
35
  <a class="language-option" href="/workflows" hreflang="vi" lang="vi">VI</a>
36
36
  <a class="language-option current" href="/en/workflows" hreflang="en" lang="en" aria-current="true">EN</a>
@@ -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.9.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.9.2 docs · VI</span>
34
34
  <nav class="language-switch" aria-label="Ngôn ngữ">
35
35
  <a class="language-option current" href="/" hreflang="vi" lang="vi" aria-current="true">VI</a>
36
36
  <a class="language-option" href="/en/" hreflang="en" lang="en">EN</a>
@@ -93,7 +93,7 @@
93
93
  <main>
94
94
  <div class="content-shell" data-article>
95
95
  <section class="hero">
96
- <p class="eyebrow">Piagent 1.9.0</p>
96
+ <p class="eyebrow">Piagent 1.9.2</p>
97
97
  <h1>Coding agent cho cả team, kiểm tra từng bước.</h1>
98
98
  <p>
99
99
  Một dashboard cho Terminal và trình duyệt. Dùng model bằng tài khoản của bạn, hoặc model của công ty qua Agent Watch và Agent Studio. Guard kiểm tra từng tool call; ở chế độ công ty, Harness của team tự yêu cầu chạy check, cho subagent review và báo kết quả ngay dưới câu trả lời.
@@ -107,7 +107,7 @@
107
107
  <div class="hero-actions">
108
108
  <a class="button primary" href="/quickstart">Bắt đầu</a>
109
109
  <a class="button" href="/ecosystem">Hệ sinh thái</a>
110
- <a class="button" href="/whats-new">Có gì mới trong 1.9.0</a>
110
+ <a class="button" href="/whats-new">Có gì mới trong 1.9.2</a>
111
111
  <a class="button" href="/commands">Xem command</a>
112
112
  </div>
113
113
  </section>
@@ -183,9 +183,9 @@ piagent-setup</code></pre>
183
183
  <h2 id="bat-dau-tu-dau">Bắt đầu từ đâu</h2>
184
184
  <div class="card-grid">
185
185
  <a class="doc-card" href="/whats-new">
186
- <span class="card-kicker">Bản 1.9.0</span>
186
+ <span class="card-kicker">Bản 1.9.2</span>
187
187
  <h3>Có gì mới</h3>
188
- <p>Giao việc bằng lời thường, Harness của team, lệnh có mạng theo lần duyệt, nút Dừng suốt lượt và thẻ duyệt dễ đọc.</p>
188
+ <p>Việc trên web do subagent nghiên cứu làm, khung chat không còn giật; ở 1.9.1: subagent khảo sát và xác minh, tìm web qua search pool.</p>
189
189
  </a>
190
190
  <a class="doc-card" href="/ecosystem">
191
191
  <span class="card-kicker">Get started</span>
@@ -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.9.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.9.2 docs · VI</span>
34
34
  <nav class="language-switch" aria-label="Ngôn ngữ">
35
35
  <a class="language-option current" href="/mcp-approval" hreflang="vi" lang="vi" aria-current="true">VI</a>
36
36
  <a class="language-option" href="/en/mcp-approval" hreflang="en" lang="en">EN</a>
@@ -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.9.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.9.2 docs · VI</span>
34
34
  <nav class="language-switch" aria-label="Ngôn ngữ">
35
35
  <a class="language-option current" href="/mcp-auth" hreflang="vi" lang="vi" aria-current="true">VI</a>
36
36
  <a class="language-option" href="/en/mcp-auth" hreflang="en" lang="en">EN</a>
@@ -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.9.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.9.2 docs · VI</span>
34
34
  <nav class="language-switch" aria-label="Ngôn ngữ">
35
35
  <a class="language-option current" href="/mcp-servers" hreflang="vi" lang="vi" aria-current="true">VI</a>
36
36
  <a class="language-option" href="/en/mcp-servers" hreflang="en" lang="en">EN</a>
@@ -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.9.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.9.2 docs · VI</span>
34
34
  <nav class="language-switch" aria-label="Ngôn ngữ">
35
35
  <a class="language-option current" href="/mcp" hreflang="vi" lang="vi" aria-current="true">VI</a>
36
36
  <a class="language-option" href="/en/mcp" hreflang="en" lang="en">EN</a>
@@ -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.9.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.9.2 docs · VI</span>
34
34
  <nav class="language-switch" aria-label="Ngôn ngữ">
35
35
  <a class="language-option current" href="/permissions" hreflang="vi" lang="vi" aria-current="true">VI</a>
36
36
  <a class="language-option" href="/en/permissions" hreflang="en" lang="en">EN</a>
@@ -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.9.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.9.2 docs · VI</span>
34
34
  <nav class="language-switch" aria-label="Ngôn ngữ">
35
35
  <a class="language-option current" href="/profiles" hreflang="vi" lang="vi" aria-current="true">VI</a>
36
36
  <a class="language-option" href="/en/profiles" hreflang="en" lang="en">EN</a>
@@ -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.9.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.9.2 docs · VI</span>
34
34
  <nav class="language-switch" aria-label="Ngôn ngữ">
35
35
  <a class="language-option current" href="/quickstart" hreflang="vi" lang="vi" aria-current="true">VI</a>
36
36
  <a class="language-option" href="/en/quickstart" hreflang="en" lang="en">EN</a>
@@ -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.9.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.9.2 docs · VI</span>
34
34
  <nav class="language-switch" aria-label="Ngôn ngữ">
35
35
  <a class="language-option current" href="/runtime" hreflang="vi" lang="vi" aria-current="true">VI</a>
36
36
  <a class="language-option" href="/en/runtime" hreflang="en" lang="en">EN</a>
@@ -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.9.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.9.2 docs · VI</span>
34
34
  <nav class="language-switch" aria-label="Ngôn ngữ">
35
35
  <a class="language-option current" href="/scope" hreflang="vi" lang="vi" aria-current="true">VI</a>
36
36
  <a class="language-option" href="/en/scope" hreflang="en" lang="en">EN</a>
@@ -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.9.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.9.2 docs · VI</span>
34
34
  <nav class="language-switch" aria-label="Ngôn ngữ">
35
35
  <a class="language-option current" href="/security" hreflang="vi" lang="vi" aria-current="true">VI</a>
36
36
  <a class="language-option" href="/en/security" hreflang="en" lang="en">EN</a>
@@ -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.9.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.9.2 docs · VI</span>
34
34
  <nav class="language-switch" aria-label="Ngôn ngữ">
35
35
  <a class="language-option current" href="/team" hreflang="vi" lang="vi" aria-current="true">VI</a>
36
36
  <a class="language-option" href="/en/team" hreflang="en" lang="en">EN</a>
@@ -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.9.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.9.2 docs · VI</span>
34
34
  <nav class="language-switch" aria-label="Ngôn ngữ">
35
35
  <a class="language-option current" href="/whats-new" hreflang="vi" lang="vi" aria-current="true">VI</a>
36
36
  <a class="language-option" href="/en/whats-new" hreflang="en" lang="en">EN</a>
@@ -103,6 +103,32 @@
103
103
  <h1>Bản 1.9.0: nói việc bằng lời, Harness của team kiểm tra</h1>
104
104
  <p>Bỏ task contract và lệnh workflow. Chế độ công ty tự yêu cầu check và review; nút Dừng, lệnh có mạng theo lần duyệt và thẻ duyệt dễ đọc hơn.</p>
105
105
  </div>
106
+ <section class="section">
107
+ <p class="section-kicker">v1.9.2 · 2026-10-03</p>
108
+ <h2 id="v1-9-2">Việc trên web để subagent nghiên cứu làm, khung chat không giật</h2>
109
+ <p class="section-lead">Ở chế độ công ty có subagent nghiên cứu, mọi việc trên web do subagent này làm trên model rẻ hơn. Main agent chỉ nhận bản tóm tắt kèm nguồn. Gửi tin nhắn trong cuộc trò chuyện dài không còn kéo trang lên đầu.</p>
110
+ <div class="grid cols-3">
111
+ <article class="card"><h3 id="research-web">Web cho subagent nghiên cứu</h3><p>Khi Harness có subagent nghiên cứu, main agent không còn công cụ web. Search và đọc trang chạy trên model của subagent nghiên cứu.</p></article>
112
+ <article class="card"><h3 id="search-engine">Biết engine nào đã search</h3><p>Mỗi kết quả search ghi rõ engine đã trả lời: Tavily, Exa hay Parallel qua search pool của công ty, hoặc search riêng của nhà cung cấp model.</p></article>
113
+ <article class="card"><h3 id="chat-jump">Khung chat đứng yên</h3><p>Gửi tin nhắn không còn làm lịch sử biến mất trong chốc lát và kéo trang lên đầu. Thanh trên hiện đúng số subagent mà Harness bật.</p></article>
114
+ </div>
115
+ </section>
116
+
117
+ <section class="section">
118
+ <p class="section-kicker">v1.9.1 · 2026-10-03</p>
119
+ <h2 id="v1-9-1">Subagent khảo sát và xác minh, tìm web cho mọi vai</h2>
120
+ <p class="section-lead">Ở chế độ công ty, Harness của team bật thêm được hai subagent chạy model rẻ. Subagent khảo sát đọc code trước khi sửa. Subagent xác minh chạy lại check và đối chiếu kết luận với bằng chứng. Mọi vai, kể cả vai chạy model API key, tìm web qua search pool của team.</p>
121
+ <div class="grid cols-3">
122
+ <article class="card"><h3 id="scout-helper">Subagent khảo sát</h3><p>Chỉ đọc project, không lên web và không chạy lệnh. Kết quả trả về kèm file và dòng. Agent chính giao phần đọc rộng cho nó để giữ context cho việc sửa.</p></article>
123
+ <article class="card"><h3 id="verify-helper">Subagent xác minh</h3><p>Chạy check của repo trong sandbox chỉ-đọc, không có mạng, và đối chiếu từng yêu cầu với code và nguồn gốc. Mỗi yêu cầu được trả lời là đạt, không đạt hoặc không kiểm được, kèm bằng chứng. Check nó chạy qua được tính vào quy trình của lượt.</p></article>
124
+ <article class="card"><h3 id="search-pool">Tìm web qua search pool</h3><p><span class="inline-code">web_search</span> hỏi search pool của Studio trước: key tìm kiếm của team, rồi tới nguồn không cần key. Nhờ vậy vai chạy model API key cũng tìm được web.</p></article>
125
+ <article class="card"><h3 id="enabled-helpers">Chỉ subagent được bật</h3><p>Agent chính chỉ thấy các subagent mà Harness bật. Dashboard hiện số subagent đang chạy trên số được bật.</p></article>
126
+ <article class="card"><h3 id="sandbox-tests">Sandbox chạy được test của project</h3><p>Sandbox đọc được file dịch tên <span class="inline-code">auth.json</span> và giấu hẳn file <span class="inline-code">.env*</span> (trừ file mẫu), nên type-check, Vitest và Next chạy được mà không lộ secret. E2E bằng Chromium của Playwright chạy qua lệnh có mạng mà bạn duyệt.</p></article>
127
+ <article class="card"><h3 id="installer-hints">Bộ cài gọn hơn</h3><p><span class="inline-code">piagent-install</span> và <span class="inline-code">piagent-setup</span> không còn gợi ý lệnh đã bỏ ở 1.9.0. Chúng chỉ nhắc <span class="inline-code">/mcp</span> và <span class="inline-code">/subagents-doctor</span> khi lần cài đó có cài chúng.</p></article>
128
+ </div>
129
+ <p>Đã chạy thật một lượt ở chế độ công ty qua Studio. Subagent khảo sát đọc repo trước khi sửa, subagent xác minh báo 6/6 yêu cầu đạt, review không có lỗi chặn, và mọi request đều được tính usage.</p>
130
+ </section>
131
+
106
132
  <section class="section">
107
133
  <p class="section-kicker">v1.9.0 · 2026-10-02</p>
108
134
  <h2 id="v1-9-0">Nói việc bằng lời, Harness của team lo phần kiểm tra</h2>
@@ -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.9.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.9.2 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>
@@ -256,8 +256,8 @@
256
256
  },
257
257
  {
258
258
  "path": "tests",
259
- "fileCount": 508,
260
- "sha256": "00d23ae7bb904883ba1a6140f2fe1f639a4718c0fc22e5da2c46db3208a04656"
259
+ "fileCount": 510,
260
+ "sha256": "154b2c85059d0d5b5301fdabf4685e4f78b31585725604a6feb9ae8d70baac79"
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.9.0",
3
+ "version": "1.9.2",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -0,0 +1,6 @@
1
+ import fs from 'node:fs';
2
+
3
+ // How Piagent names itself to Studio on every company request, so Studio's
4
+ // reports show the tool and its version ("piagent/1.9.1").
5
+ const version = JSON.parse(fs.readFileSync(new URL('../../../package.json', import.meta.url), 'utf8')).version;
6
+ export const CLIENT_AGENT = `piagent/${version}`;
@@ -0,0 +1,65 @@
1
+ import { REVIEW_PROMPT, VERIFY_PROMPT, isCheckCommand } from './workflow.mjs';
2
+
3
+ // Each helper role runs at most this often per user message (Studio's MaxHelperCalls).
4
+ export const HELPER_CALLS = 8;
5
+
6
+ // The helpers a main agent may delegate to, in the Harness's order. Each is
7
+ // optional: only those the company Harness enables (and Agent Watch passes
8
+ // on) are offered. Scout reads the code, research also reads the web, verify
9
+ // re-checks a result with the repository's checks and primary sources,
10
+ // review judges the patch. None of them changes files.
11
+ export const HELPER_ROLES = Object.freeze(['scout', 'research', 'verify', 'review']);
12
+ export const helperRoles = manifest => HELPER_ROLES.filter(role => manifest?.harness?.configuration?.[role]);
13
+ const WIDE_READING = 'when understanding the task needs more reading than a few batches of files, such as a flow across many modules of an unfamiliar codebase';
14
+ const NETWORK_COMMANDS = 'run_with_network only when a command itself needs the internet or starts a local server or browser, such as end-to-end tests (the user approves each one)';
15
+ // How the main agent reaches the web. With a research helper it has no web
16
+ // tools: searching and reading pages happen on the helper's model.
17
+ export function webPrompt(roles) {
18
+ return roles.includes('research')
19
+ ? ` Shell commands run without network and you have no web tools: hand anything on the web (current information, news, documentation, releases, error messages) to the research helper, and use ${NETWORK_COMMANDS}.`
20
+ : ` Shell commands run without network: use web_search for current information or documentation, web_fetch to read a public https page, and ${NETWORK_COMMANDS}.`;
21
+ }
22
+ export function helperPrompt(roles) {
23
+ const lines = [];
24
+ if (roles.includes('scout')) lines.push(`Use the scout helper (delegate role "scout") ${WIDE_READING}, and work from its file:line findings; do small lookups yourself.`);
25
+ if (roles.includes('research')) lines.push(roles.includes('scout') ? 'Use the research helper (delegate role "research") for anything on the web (current information, news, library and API docs, releases, error messages), together with the code when needed; give it the question and the answer you need, and work from its summary.'
26
+ : `Use the research helper (delegate role "research") for anything on the web (current information, news, documentation) and ${WIDE_READING}; work from its findings and do small code lookups yourself.`);
27
+ if (roles.includes('verify')) lines.push('Before you report a non-trivial result as done, you may have the verify helper (delegate role "verify") confirm it independently: it runs the repository checks on the current code and checks claims against the code and primary sources, answering pass, fail or unverifiable with evidence.');
28
+ return lines.length ? ' ' + lines.join(' ') : '';
29
+ }
30
+ const HELPER_USES = {
31
+ scout: () => 'scout: before changing an area you do not know that spans more files than you can read in a few batches (where something is computed and every caller, how a flow crosses modules). It reads only the project, no web, and answers with file:line facts; your own context stays free for the change.',
32
+ research: roles => roles.includes('scout') ? 'research: anything on the web (current information, news, library or API documentation, releases, error messages), with the code when needed. It searches and reads the pages; you get its summary with sources.'
33
+ : 'research: anything on the web (current information, news, documentation; it searches and reads the pages, you get its summary with sources), and before changing an area you do not know that spans more files than you can read in a few batches (where something is computed and every caller, how a flow crosses modules); your own context stays free for the change.',
34
+ verify: () => 'verify: an independent check of a result: it runs the repository checks on the current code (offline, and the project is read-only for its commands) and confirms claims, yours or a helper\'s, against the code and primary sources. It answers pass, fail or unverifiable per claim, with evidence.',
35
+ review: () => 'review: an independent review of the current patch.',
36
+ };
37
+ export function delegateDescription(roles) {
38
+ return `Hand work to a helper with its own context. Helpers read the project but cannot change files or call helpers. ${roles.map(role => HELPER_USES[role](roles)).join(' ')} A lookup that one grep or read answers stays with you. Write the task as a brief the helper can act on alone: the goal, what to find or check, where to start and what you already know or ruled out, and the answer you need (file:line facts). One call per helper runs at a time; each can be called again, up to ${HELPER_CALLS} times per user message, for example a second review after fixing what the first one found.`;
39
+ }
40
+ const RESEARCH_PROMPT = 'Research the assigned question. Read only the needed source; use web_search or web_fetch for external documentation. Answer with facts the main agent can act on: file:line, short quotes, what calls what, and what you checked and found nothing in. You cannot change files or delegate.';
41
+ const SCOUT_PROMPT = 'Scout the codebase for the assigned question. Search first (grep, find), then read only the parts that matter. Answer with facts the main agent can act on: file:line, short quotes, what calls what, and where you looked and found nothing. You have no web access: when the answer needs external documentation, say so. You cannot change files or delegate.';
42
+ export const READ_TOOLS = ['read', 'grep', 'find', 'ls'];
43
+ // What each helper may use. Every helper's project is read-only; verify also
44
+ // runs commands there (offline, writes only to its temporary directory).
45
+ export const HELPER_SETUP = {
46
+ scout: { web: false, commands: false, prompt: SCOUT_PROMPT, label: 'Scout' },
47
+ research: { web: true, commands: false, prompt: RESEARCH_PROMPT, label: 'Research' },
48
+ verify: { web: true, commands: true, prompt: VERIFY_PROMPT, label: 'Verify' },
49
+ review: { web: false, commands: false, prompt: REVIEW_PROMPT, label: 'Review' },
50
+ };
51
+ // A repository check a helper ran counts for the run like one the main
52
+ // agent ran, when the code was the same before and after it: the helper
53
+ // cannot write, but the main agent may edit beside it in the same answer.
54
+ export function countedCheck(managed, tool) {
55
+ if (tool.name !== 'bash') return tool;
56
+ return { ...tool, execute: async (...args) => {
57
+ const counted = managed.run && isCheckCommand(args[1]?.command, managed.checks.commands), before = counted ? await managed.digest() : null;
58
+ let ok = false;
59
+ try { const result = await tool.execute(...args); ok = true; return result; }
60
+ finally {
61
+ const after = counted && before !== null ? await managed.digest() : null;
62
+ if (after !== null && after === before) await managed.run.afterTool('bash', args[1], ok, async () => after);
63
+ }
64
+ } };
65
+ }
@@ -7,6 +7,7 @@
7
7
  import { randomUUID } from 'node:crypto';
8
8
  import { setTimeout as sleep } from 'node:timers/promises';
9
9
  import { describeFailure, failureCode, failureIsAdmissionRefusal, failureIsBriefRefusal, failureReason, unnamedFailureText } from '../runtime/managed-failure.mjs';
10
+ import { CLIENT_AGENT } from './client-agent.mjs';
10
11
 
11
12
  // How long one request waits in line for a free company model account.
12
13
  const CAPACITY_WAIT_MS = 20 * 60_000;
@@ -45,7 +46,7 @@ export function wrapRoleStreams(owner, runtime, role, { provider, verifyGrant })
45
46
  if (!route || grant.provider_model_id !== route.native || grant.provider !== route.provider || grant.model_id !== route.model_id || model.id !== 'agent-watch-auto') throw Error('managed-route-changed');
46
47
  const asked = Date.now();
47
48
  const stream = original({ ...model, id: route.native }, context, { ...options, apiKey: grant.token, sessionId: grant.role_id, maxRetries: 0,
48
- headers: { ...options?.headers, 'X-Session-Id': grant.role_id } });
49
+ headers: { ...options?.headers, 'User-Agent': CLIENT_AGENT, 'X-Session-Id': grant.role_id } });
49
50
  // Whether Studio admitted the request is known at its first event
50
51
  // after "start": until then nothing is passed on, so a refused
51
52
  // request leaves no trace in the conversation.