@piagent/platform 1.22.0 → 1.22.1

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 (65) hide show
  1. package/CHANGELOG.md +11 -0
  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 +1 -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 +7 -0
  16. package/docs-site/content/index.html +4 -4
  17. package/docs-site/content/whats-new.html +7 -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 +8 -1
  38. package/docs-site/en/windows.html +1 -1
  39. package/docs-site/en/workflows.html +1 -1
  40. package/docs-site/index.html +5 -5
  41. package/docs-site/mcp-approval.html +1 -1
  42. package/docs-site/mcp-auth.html +1 -1
  43. package/docs-site/mcp-servers.html +1 -1
  44. package/docs-site/mcp.html +1 -1
  45. package/docs-site/permissions.html +1 -1
  46. package/docs-site/profiles.html +1 -1
  47. package/docs-site/quickstart.html +1 -1
  48. package/docs-site/runtime.html +1 -1
  49. package/docs-site/scope.html +1 -1
  50. package/docs-site/security.html +1 -1
  51. package/docs-site/team.html +1 -1
  52. package/docs-site/whats-new.html +8 -1
  53. package/docs-site/windows.html +1 -1
  54. package/docs-site/workflows.html +1 -1
  55. package/evals/private-holdout-v1/public-exposure.v2.json +2 -2
  56. package/package.json +1 -1
  57. package/packages/piagent-core/extensions/task-state.js +10 -10
  58. package/packages/piagent-core/extensions/workspace-evidence-roots.js +21 -1
  59. package/packages/piagent-core/package.json +1 -1
  60. package/packages/piagent-core/runtime/inspection/webui-snapshot.ts +2 -0
  61. package/packages/piagent-webui/dist/client/assets/{MarkdownMessage-BYa-Jveq.js → MarkdownMessage-EmQ_ohQe.js} +1 -1
  62. package/packages/piagent-webui/dist/client/assets/{index-coozlgfe.js → index-Posch2XH.js} +3 -3
  63. package/packages/piagent-webui/dist/client/index.html +1 -1
  64. package/packages/piagent-webui/gateway/company-relay.ts +56 -7
  65. package/packages/piagent-webui/shared/company-copy.ts +2 -1
@@ -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.22.0 docs · EN</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.22.1 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>
@@ -104,6 +104,13 @@
104
104
  <h1>1.9.0: ask in plain language, the team's Harness checks</h1>
105
105
  <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>
106
106
  </div>
107
+ <section class="section">
108
+ <p class="section-kicker">v1.22.1 · 2026-10-12</p>
109
+ <h2 id="v1-22-1">The dashboard no longer keeps loading when a project is on a slow drive</h2>
110
+ <p class="section-lead">Fix on Windows: the dashboard opened and kept showing “Opening Piagent…”. The project was on a Windows drive seen from WSL (<span class="inline-code">/mnt/d/…</span>), where Git walks the tree very slowly. The company runtime ran that scan without a limit and answered nobody meanwhile, and the dashboard waited for it, also without a limit. The dashboard now gives the company runtime 15 seconds per read; past that it still opens with your own conversations, says “The company runtime is running but does not answer” with what to do, and asks again a minute later.</p>
111
+ <p class="section-lead">A conversation's page gives Git 8 seconds per repository to list the changed files. A repository that takes longer shows no changed files yet and is tried again 5 minutes later. On Windows, keep projects in the Ubuntu file system (<span class="inline-code">~/projects</span>): a project under <span class="inline-code">/mnt/c</span> or <span class="inline-code">/mnt/d</span> works but is slow.</p>
112
+ </section>
113
+
107
114
  <section class="section">
108
115
  <p class="section-kicker">v1.22.0 · 2026-10-09</p>
109
116
  <h2 id="v1-22-0">Attach any source or text file, as other coding agents allow</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.22.0 docs · EN</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.22.1 docs · EN</span>
34
34
  <nav class="language-switch" aria-label="Language">
35
35
  <a class="language-option" href="/windows" hreflang="vi" lang="vi">VI</a>
36
36
  <a class="language-option current" href="/en/windows" 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.22.0 docs · EN</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.22.1 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.22.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.22.1 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>
@@ -94,7 +94,7 @@
94
94
  <main>
95
95
  <div class="content-shell" data-article>
96
96
  <section class="hero">
97
- <p class="eyebrow">Piagent 1.22.0</p>
97
+ <p class="eyebrow">Piagent 1.22.1</p>
98
98
  <h1>Coding agent cho cả team, kiểm tra từng bước.</h1>
99
99
  <p>
100
100
  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.
@@ -108,7 +108,7 @@
108
108
  <div class="hero-actions">
109
109
  <a class="button primary" href="/quickstart">Bắt đầu</a>
110
110
  <a class="button" href="/ecosystem">Hệ sinh thái</a>
111
- <a class="button" href="/whats-new">Có gì mới trong 1.22.0</a>
111
+ <a class="button" href="/whats-new">Có gì mới trong 1.22.1</a>
112
112
  <a class="button" href="/commands">Xem command</a>
113
113
  </div>
114
114
  </section>
@@ -184,9 +184,9 @@ piagent-setup</code></pre>
184
184
  <h2 id="bat-dau-tu-dau">Bắt đầu từ đâu</h2>
185
185
  <div class="card-grid">
186
186
  <a class="doc-card" href="/whats-new">
187
- <span class="card-kicker">Bản 1.22.0</span>
187
+ <span class="card-kicker">Bản 1.22.1</span>
188
188
  <h3>Có gì mới</h3>
189
- <p>Đính kèm được mọi file code và văn bản (.html, .css, .ts, .py, Dockerfile…); ở 1.21.1: bật Bypass được cả khi lượt đang chạy và được giữ sau khi tải lại; ở 1.21.0: câu hỏi và yêu cầu duyệt hiện từng cái một (main agent trước), thông báo góc phải khi cuộc trò chuyện khác xong hay đang chờ bạn, Studio ghi lại mỗi lần compact; ở 1.20.0: cài package trong sandbox công ty không phải duyệt (npm, PyPI, Go, Maven, Gradle… qua proxy chỉ cho registry); ở 1.19.0: task công ty có checklist được làm đến hết, cuối mỗi lượt báo rõ xong, dừng giữa chừng hay lỗi, Docker trong sandbox công ty, folder chứa nhiều repo; ở 1.18.0: đổi nhánh Git trên dashboard, tự thử lại khi lỗi tạm thời, Claude Haiku 5.5; ở 1.17.0: dashboard hiện nhánh Git của project; ở 1.16.3: dashboard cập nhật xong vẫn tự kiểm tra bản mới; ở 1.16.2: Terminal nói giống dashboard: hỏi cập nhật, /bypass, lỗi và ghi chú Harness bằng tiếng Việt; ở 1.16.1: bản mới được báo bằng dialog và kiểm tra mỗi giờ, tab dashboard không còn mất đăng nhập; ở 1.16.0: Bypass cho cuộc trò chuyện công ty, đổi Harness không làm gián đoạn; ở 1.15.2: cuộc trò chuyện dài tự thu gọn trở lại; ở 1.15.1: Studio thấy mỗi call của model dùng để làm gì, nhiều cuộc trò chuyện trong một folder không nhận nhầm thay đổi của nhau; ở 1.15.0: subagent bị từ chối nói đúng lý do; ở 1.14: cập nhật giữ model bạn đã chọn; ở 1.13: cuộc trò chuyện giữ chỗ đang đọc, chữ của agent có định dạng, Piagent trên Windows qua WSL2: sandbox công ty bằng bubblewrap và Agent Watch cho Windows; ở 1.12: @ chọn file và folder trên máy, skill và command dùng bằng /, nhánh cuộc trò chuyện công ty gửi được tin nhắn.</p>
189
+ <p>Dashboard không còn quay mãi khi project nằm trên ổ Windows nhìn từ WSL (/mnt/d…) hoặc phiên công ty không trả lời; ở 1.22.0: đính kèm được mọi file code và văn bản (.html, .css, .ts, .py, Dockerfile…); ở 1.21.1: bật Bypass được cả khi lượt đang chạy và được giữ sau khi tải lại; ở 1.21.0: câu hỏi và yêu cầu duyệt hiện từng cái một (main agent trước), thông báo góc phải khi cuộc trò chuyện khác xong hay đang chờ bạn, Studio ghi lại mỗi lần compact; ở 1.20.0: cài package trong sandbox công ty không phải duyệt (npm, PyPI, Go, Maven, Gradle… qua proxy chỉ cho registry); ở 1.19.0: task công ty có checklist được làm đến hết, cuối mỗi lượt báo rõ xong, dừng giữa chừng hay lỗi, Docker trong sandbox công ty, folder chứa nhiều repo; ở 1.18.0: đổi nhánh Git trên dashboard, tự thử lại khi lỗi tạm thời, Claude Haiku 5.5; ở 1.17.0: dashboard hiện nhánh Git của project; ở 1.16.3: dashboard cập nhật xong vẫn tự kiểm tra bản mới; ở 1.16.2: Terminal nói giống dashboard: hỏi cập nhật, /bypass, lỗi và ghi chú Harness bằng tiếng Việt; ở 1.16.1: bản mới được báo bằng dialog và kiểm tra mỗi giờ, tab dashboard không còn mất đăng nhập; ở 1.16.0: Bypass cho cuộc trò chuyện công ty, đổi Harness không làm gián đoạn; ở 1.15.2: cuộc trò chuyện dài tự thu gọn trở lại; ở 1.15.1: Studio thấy mỗi call của model dùng để làm gì, nhiều cuộc trò chuyện trong một folder không nhận nhầm thay đổi của nhau; ở 1.15.0: subagent bị từ chối nói đúng lý do; ở 1.14: cập nhật giữ model bạn đã chọn; ở 1.13: cuộc trò chuyện giữ chỗ đang đọc, chữ của agent có định dạng, Piagent trên Windows qua WSL2: sandbox công ty bằng bubblewrap và Agent Watch cho Windows; ở 1.12: @ chọn file và folder trên máy, skill và command dùng bằng /, nhánh cuộc trò chuyện công ty gửi được tin nhắn.</p>
190
190
  </a>
191
191
  <a class="doc-card" href="/ecosystem">
192
192
  <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.22.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.22.1 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.22.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.22.1 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.22.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.22.1 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.22.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.22.1 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.22.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.22.1 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.22.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.22.1 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.22.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.22.1 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.22.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.22.1 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.22.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.22.1 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.22.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.22.1 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.22.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.22.1 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.22.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.22.1 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>
@@ -104,6 +104,13 @@
104
104
  <h1>Bản 1.9.0: nói việc bằng lời, Harness của team kiểm tra</h1>
105
105
  <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>
106
106
  </div>
107
+ <section class="section">
108
+ <p class="section-kicker">v1.22.1 · 2026-10-12</p>
109
+ <h2 id="v1-22-1">Dashboard không còn quay mãi khi project nằm trên ổ chậm</h2>
110
+ <p class="section-lead">Sửa lỗi trên Windows: dashboard mở ra nhưng cứ hiện “Đang mở Piagent…”. Project nằm trên ổ Windows nhìn từ WSL (<span class="inline-code">/mnt/d/…</span>), nơi Git duyệt cây thư mục rất chậm. Phiên công ty chạy lượt quét đó mà không có giới hạn nên không trả lời ai trong lúc ấy, và dashboard chờ nó, cũng không có giới hạn. Giờ dashboard chờ phiên công ty tối đa 15 giây cho mỗi lượt đọc; quá hạn thì vẫn mở với các cuộc trò chuyện cá nhân, ghi rõ “Phiên công ty đang chạy nhưng không trả lời” kèm cách xử lý, và một phút sau hỏi lại.</p>
111
+ <p class="section-lead">Trang của một cuộc trò chuyện cho Git 8 giây mỗi repository để liệt kê file thay đổi. Repository nào lâu hơn thì hiện chưa có danh sách file thay đổi và được thử lại sau 5 phút. Trên Windows, nên để project trong ổ của Ubuntu (<span class="inline-code">~/projects</span>): project ở <span class="inline-code">/mnt/c</span> hay <span class="inline-code">/mnt/d</span> vẫn dùng được nhưng chậm.</p>
112
+ </section>
113
+
107
114
  <section class="section">
108
115
  <p class="section-kicker">v1.22.0 · 2026-10-09</p>
109
116
  <h2 id="v1-22-0">Đính kèm được mọi file code và văn bản, như các coding agent khác</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.22.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.22.1 docs · VI</span>
34
34
  <nav class="language-switch" aria-label="Ngôn ngữ">
35
35
  <a class="language-option current" href="/windows" hreflang="vi" lang="vi" aria-current="true">VI</a>
36
36
  <a class="language-option" href="/en/windows" 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.22.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.22.1 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": 533,
260
- "sha256": "a6bfbb622272666cbf9f50e03ddf3c47631038fcf4eacd8a0934b504e66d9efb"
259
+ "fileCount": 535,
260
+ "sha256": "8d011f26fdad87d00c8b744c8466cdd1ed80afdd994eec8b34519c9db76e0729"
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.22.0",
3
+ "version": "1.22.1",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -31,7 +31,7 @@ import { WORKING_TREE_DIGEST_ALGORITHM,
31
31
  import { directChildGitEvidenceRoots,
32
32
  gitEvidenceRootDetails,
33
33
  gitEvidenceRoots,
34
- gitOutput,
34
+ gitOutput, isSlowGitRoot, noteSlowGitRoot,
35
35
  isGitWorkingTree,
36
36
  nonGitWorkspaceFileDetails,
37
37
  nonGitWorkspaceFiles,
@@ -655,12 +655,12 @@ function gitHasHead(cwd) {
655
655
  }
656
656
  }
657
657
 
658
- function workingTreeFilesForGitRoot(cwd, observeRename, knownHead = null) {
658
+ function workingTreeFilesForGitRoot(cwd, observeRename, knownHead = null, git = {}) {
659
659
  if (knownHead === null && !isGitWorkingTree(cwd)) return [];
660
660
  const changed = (knownHead ?? gitHasHead(cwd))
661
- ? changedPathsFromNameStatus(gitOutput(cwd, ["diff", "--name-status", "-z", "--find-renames", "--diff-filter=ACMRD", "HEAD", "--"]), observeRename)
662
- : gitOutput(cwd, ["ls-files", "-z"]).split("\0").filter(Boolean);
663
- const untracked = gitOutput(cwd, ["ls-files", "--others", "--exclude-standard", "-z"]).split("\0").filter(Boolean);
661
+ ? changedPathsFromNameStatus(gitOutput(cwd, ["diff", "--name-status", "-z", "--find-renames", "--diff-filter=ACMRD", "HEAD", "--"], git), observeRename)
662
+ : gitOutput(cwd, ["ls-files", "-z"], git).split("\0").filter(Boolean);
663
+ const untracked = gitOutput(cwd, ["ls-files", "--others", "--exclude-standard", "-z"], git).split("\0").filter(Boolean);
664
664
  return [...new Set([...changed, ...untracked].map(normalizedGitPath).filter((item) => item && !item.startsWith(".pi/piagent-state/")))].sort();
665
665
  }
666
666
 
@@ -834,7 +834,7 @@ function streamedWorkingTreeFileDigest(root, file, hasHead, protectedProjectPath
834
834
  }
835
835
 
836
836
  export function workingTreeSnapshot(cwd, options = {}) {
837
- const snapshot = {};
837
+ const snapshot = {}, gitTimeoutMs = options.gitTimeoutMs > 0 ? options.gitTimeoutMs : 0; // workspace-evidence-roots.js: slow roots
838
838
  const isProtectedProjectPath = typeof options.isProtectedProjectPath === "function" ? options.isProtectedProjectPath : () => false;
839
839
  let rootDetails;
840
840
  try {
@@ -855,14 +855,14 @@ export function workingTreeSnapshot(cwd, options = {}) {
855
855
  if (paths.some((file) => file === ".pi/piagent-state" || file.startsWith(".pi/piagent-state/") || isProtectedProjectPath(prefixedGitPath(root.prefix, file))))
856
856
  paths.forEach((file) => protectedAliases.add(file));
857
857
  };
858
+ const deadline = gitTimeoutMs ? Date.now() + gitTimeoutMs : Infinity; if (gitTimeoutMs && isSlowGitRoot(root.cwd)) { incompleteReasons.push(`git-root-slow:${root.prefix || "."}`); continue; }
858
859
  try {
859
- const hasHead = gitHasHead(root.cwd); for (const file of workingTreeFilesForGitRoot(root.cwd, observeRename, hasHead)) {
860
+ const hasHead = gitHasHead(root.cwd); for (const file of workingTreeFilesForGitRoot(root.cwd, observeRename, hasHead, { timeoutMs: gitTimeoutMs })) {
861
+ if (Date.now() > deadline) throw Object.assign(new Error("working-tree-scan-timeout"), { code: "ETIMEDOUT" });
860
862
  const projectPath = prefixedGitPath(root.prefix, file);
861
863
  snapshot[projectPath] = streamedWorkingTreeFileDigest(root.cwd, file, hasHead, isProtectedProjectPath(projectPath) || protectedAliases.has(file) ? projectPath : null);
862
864
  }
863
- } catch {
864
- incompleteReasons.push(`git-root-enumeration-incomplete:${root.prefix || "."}`);
865
- }
865
+ } catch (error) { incompleteReasons.push(`${gitTimeoutMs && noteSlowGitRoot(root.cwd, error) ? "git-root-slow" : "git-root-enumeration-incomplete"}:${root.prefix || "."}`); }
866
866
  }
867
867
  if (!roots.some((root) => root.prefix === "") && roots.length > 0) {
868
868
  const looseDetails = nonGitWorkspaceFileDetails(
@@ -37,10 +37,30 @@ export function gitOutput(cwd, args, options = {}) {
37
37
  return execFileSync("git", ["-C", cwd, ...args], {
38
38
  encoding: options.encoding ?? "utf8",
39
39
  maxBuffer: options.maxBuffer ?? 16 * 1024 * 1024,
40
- stdio: ["ignore", "pipe", "ignore"]
40
+ stdio: ["ignore", "pipe", "ignore"],
41
+ // The call blocks the whole process: a caller that serves other requests
42
+ // meanwhile (the Gateway's inspection) gives it a limit.
43
+ ...(options.timeoutMs > 0 ? { timeout: options.timeoutMs, killSignal: "SIGKILL" } : {})
41
44
  });
42
45
  }
43
46
 
47
+ // Found live on Windows: a project on a Windows drive seen from WSL
48
+ // (/mnt/d/…), where Git walks the tree through a slow file system. The
49
+ // working-tree scan is synchronous, so the company Gateway answered nobody
50
+ // while it ran, each inspection of the page started it again, and the
51
+ // dashboard waiting for that Gateway kept loading. With `gitTimeoutMs` (the
52
+ // inspection passes it; completion evidence does not) a root whose scan runs
53
+ // past the limit is recorded as unavailable and left alone for a while.
54
+ const SLOW_GIT_ROOT_MS = 5 * 60_000;
55
+ const slowGitRoots = new Map();
56
+ export function isSlowGitRoot(cwd) { return (slowGitRoots.get(cwd) ?? 0) > Date.now(); }
57
+ // True when `error` is a scan stopped at its limit; the root is then remembered as slow.
58
+ export function noteSlowGitRoot(cwd, error) {
59
+ if (error?.code !== "ETIMEDOUT" && error?.signal !== "SIGKILL") return false;
60
+ slowGitRoots.set(cwd, Date.now() + SLOW_GIT_ROOT_MS);
61
+ return true;
62
+ }
63
+
44
64
  export function isGitWorkingTree(cwd) {
45
65
  try {
46
66
  return gitOutput(cwd, ["rev-parse", "--is-inside-work-tree"]).trim() === "true";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@piagent/core",
3
- "version": "1.22.0",
3
+ "version": "1.22.1",
4
4
  "type": "module",
5
5
  "private": true,
6
6
  "license": "MIT",
@@ -365,7 +365,9 @@ export async function buildWebUiInspectionProjection(input: {
365
365
  const identity: WebUiIdentity = { projectRef: webUiProjectRef(input.cwd), runtimeInstanceId: input.runtimeInstanceId ?? WEBUI_RUNTIME_INSTANCE_REF,
366
366
  sessionRef: webUiSessionRef(input.sessionId), taskId: input.task?.taskId ?? null, taskRunId: input.task?.taskRunId ?? null, agentOperationId: null, toolCallId: null };
367
367
  const effectiveProtectedPaths = input.protectedPaths ?? input.task?.protectedPaths ?? [];
368
+ // Synchronous: the Gateway answers nobody while it runs (task-state.js).
368
369
  const currentSnapshot = workingTreeSnapshot(input.cwd, {
370
+ gitTimeoutMs: 8_000,
369
371
  isProtectedProjectPath: (projectPath: string) => Boolean(matchesProtectedPath(projectPath, effectiveProtectedPaths))
370
372
  }) as Record<string, string>;
371
373
  const taskRevision = input.task ? webUiTaskRevision(input.task) : null;