@piagent/platform 1.4.0 → 1.5.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 (132) hide show
  1. package/CHANGELOG.md +151 -0
  2. package/README.md +12 -2
  3. package/README.vi.md +47 -0
  4. package/docs/command-reference-vietnamese.md +2 -2
  5. package/docs/distribution-standard.md +7 -7
  6. package/docs/en/architecture.md +13 -0
  7. package/docs/languages.json +20 -4
  8. package/docs/mcp-and-tools.md +112 -1
  9. package/docs/operator-manual-vietnamese.md +7 -7
  10. package/docs/publishing-for-teams.md +42 -0
  11. package/docs/release-install-policy.md +21 -8
  12. package/docs/runtime-harness-standard.md +1 -1
  13. package/docs/security-threat-model.md +1 -1
  14. package/docs/task-implementation-contract.md +11 -4
  15. package/docs/team-onboarding.md +2 -2
  16. package/docs/usage-observability.md +70 -0
  17. package/docs/vi/architecture.md +13 -0
  18. package/docs-site/architecture.html +5 -1
  19. package/docs-site/benchmark.html +5 -1
  20. package/docs-site/commands.html +5 -1
  21. package/docs-site/content/en/index.html +49 -0
  22. package/docs-site/content/en/runtime.html +13 -0
  23. package/docs-site/content/index.html +49 -0
  24. package/docs-site/content/runtime.html +28 -0
  25. package/docs-site/context-engine.html +5 -1
  26. package/docs-site/en/architecture.html +5 -1
  27. package/docs-site/en/benchmark.html +5 -1
  28. package/docs-site/en/commands.html +5 -1
  29. package/docs-site/en/context-engine.html +5 -1
  30. package/docs-site/en/index.html +54 -1
  31. package/docs-site/en/mcp-approval.html +5 -1
  32. package/docs-site/en/mcp-auth.html +5 -1
  33. package/docs-site/en/mcp-servers.html +5 -1
  34. package/docs-site/en/mcp.html +5 -1
  35. package/docs-site/en/permissions.html +5 -1
  36. package/docs-site/en/profiles.html +5 -1
  37. package/docs-site/en/quickstart.html +5 -1
  38. package/docs-site/en/runtime.html +18 -1
  39. package/docs-site/en/scope.html +5 -1
  40. package/docs-site/en/security.html +5 -1
  41. package/docs-site/en/team.html +5 -1
  42. package/docs-site/en/whats-new.html +5 -1
  43. package/docs-site/en/workflows.html +5 -1
  44. package/docs-site/index.html +54 -1
  45. package/docs-site/mcp-approval.html +5 -1
  46. package/docs-site/mcp-auth.html +5 -1
  47. package/docs-site/mcp-servers.html +5 -1
  48. package/docs-site/mcp.html +5 -1
  49. package/docs-site/permissions.html +5 -1
  50. package/docs-site/profiles.html +5 -1
  51. package/docs-site/quickstart.html +5 -1
  52. package/docs-site/runtime.html +33 -1
  53. package/docs-site/scope.html +5 -1
  54. package/docs-site/security.html +5 -1
  55. package/docs-site/team.html +5 -1
  56. package/docs-site/whats-new.html +5 -1
  57. package/docs-site/workflows.html +5 -1
  58. package/evals/fixtures/piagent-webui/document-workspace-v1.invalid.json +17 -0
  59. package/evals/fixtures/piagent-webui/document-workspace-v1.valid.json +42 -0
  60. package/evals/fixtures/piagent-webui/session-command-v1.valid.json +2 -1
  61. package/package.json +14 -2
  62. package/packages/piagent-core/README.md +3 -2
  63. package/packages/piagent-core/capabilities/capability-verification-cache.js +17 -7
  64. package/packages/piagent-core/capabilities/runtime-integrity.js +51 -4
  65. package/packages/piagent-core/extensions/document-intake.ts +6 -3
  66. package/packages/piagent-core/extensions/piagent-guard.ts +20 -237
  67. package/packages/piagent-core/extensions/runtime-evidence.js +12 -1
  68. package/packages/piagent-core/extensions/shell-reach.ts +250 -0
  69. package/packages/piagent-core/mcp/mcp-command-actions.js +1 -1
  70. package/packages/piagent-core/mcp/mcp-server-catalog.js +135 -5
  71. package/packages/piagent-core/package.json +1 -1
  72. package/packages/piagent-core/runtime/hooks/tool-call-hook.ts +9 -2
  73. package/packages/piagent-core/runtime/input/attachment-document-command.ts +39 -0
  74. package/packages/piagent-core/runtime/input/attachment-reservation.ts +36 -0
  75. package/packages/{piagent-webui/extension → piagent-core/runtime/input}/attachment-store.ts +221 -44
  76. package/packages/piagent-core/runtime/inspection/document-workspace-projection.ts +276 -0
  77. package/packages/piagent-core/runtime/inspection/project-runtime-inspection.ts +20 -5
  78. package/packages/piagent-core/runtime/inspection/session-identity.ts +20 -0
  79. package/packages/piagent-core/runtime/orchestration/owned-work-budget.ts +25 -2
  80. package/packages/piagent-core/runtime/policy/block-remedy.ts +139 -0
  81. package/packages/piagent-core/runtime/registration/task-start-tool.ts +9 -13
  82. package/packages/piagent-core/runtime/registration/workflow-commands.ts +5 -4
  83. package/packages/piagent-core/runtime/session/token-economics.js +34 -0
  84. package/packages/piagent-core/runtime/tools/phase-tool-runtime.ts +2 -1
  85. package/packages/piagent-core/runtime/workflows/input-routing.ts +13 -2
  86. package/packages/piagent-core/runtime/workflows/task-intake.ts +5 -0
  87. package/packages/piagent-core/security/sensitive-data.js +7 -0
  88. package/packages/piagent-webui/dist/client/assets/MarkdownMessage-Uouhx1QO.js +29 -0
  89. package/packages/piagent-webui/dist/client/assets/index-BV-_03yl.css +1 -0
  90. package/packages/piagent-webui/dist/client/assets/index-MBZq8XLV.js +174 -0
  91. package/packages/piagent-webui/dist/client/index.html +2 -2
  92. package/packages/piagent-webui/extension/lifecycle-controller.ts +15 -0
  93. package/packages/piagent-webui/extension/piagent-webui.ts +19 -6
  94. package/packages/piagent-webui/extension/same-session-bridge.ts +12 -12
  95. package/packages/piagent-webui/gateway/ai-capability-inspection.ts +53 -0
  96. package/packages/piagent-webui/gateway/extension-authority.ts +47 -0
  97. package/packages/piagent-webui/gateway/gateway-service.ts +23 -3
  98. package/packages/piagent-webui/gateway/native-project-picker.ts +63 -7
  99. package/packages/piagent-webui/gateway/session-attachment-registry.ts +165 -0
  100. package/packages/piagent-webui/gateway/session-catalog.ts +62 -9
  101. package/packages/piagent-webui/gateway/session-command-controller.ts +47 -14
  102. package/packages/piagent-webui/gateway/session-inspection-registry.ts +67 -12
  103. package/packages/piagent-webui/gateway/session-runtime-supervisor.ts +24 -11
  104. package/packages/piagent-webui/package.json +3 -1
  105. package/packages/piagent-webui/server/core-inspection-provider.ts +52 -15
  106. package/packages/piagent-webui/server/ipc-read-model-client.ts +2 -0
  107. package/packages/piagent-webui/server/loopback-server.ts +63 -25
  108. package/packages/piagent-webui/server/read-model-provider.ts +2 -0
  109. package/packages/piagent-webui/server/read-only-router.ts +6 -0
  110. package/packages/piagent-webui/server/transcript-projection.ts +58 -2
  111. package/schemas/piagent-webui/attachment-v1.schema.json +24 -4
  112. package/schemas/piagent-webui/capabilities-v1.schema.json +2 -2
  113. package/schemas/piagent-webui/catalog-v1.json +9 -0
  114. package/schemas/piagent-webui/document-workspace-v1.schema.json +155 -0
  115. package/schemas/piagent-webui/session-command-v1.schema.json +14 -3
  116. package/schemas/piagent-webui/transcript-v1.schema.json +27 -0
  117. package/scripts/build-docs-site.mjs +21 -1
  118. package/scripts/explain-command.mjs +240 -0
  119. package/scripts/install-global.sh +104 -3
  120. package/scripts/mcp-manage.mjs +17 -4
  121. package/scripts/pi-session-stats.sh +10 -2
  122. package/scripts/piagent-cli.mjs +14 -1
  123. package/scripts/piagent-dashboard.mjs +55 -2
  124. package/scripts/setup.sh +69 -33
  125. package/scripts/traffic-snapshot.mjs +214 -0
  126. package/scripts/typescript-loader.mjs +20 -4
  127. package/scripts/uninstall-global.sh +53 -2
  128. package/scripts/update-global.mjs +33 -1
  129. package/scripts/verify-local.sh +20 -1
  130. package/scripts/verify-translation-pairing.mjs +121 -0
  131. package/packages/piagent-webui/dist/client/assets/index-DjMntaK5.js +0 -172
  132. package/packages/piagent-webui/dist/client/assets/index-DwKCWbwd.css +0 -1
@@ -45,6 +45,7 @@ pi install /path/to/piagent
45
45
  - `0.2.x`: có guard ổn định và docs team.
46
46
  - `1.0.2`: đủ security review, MCP registry, adapter schema versioned.
47
47
  - `1.1.0`: đọc document ngoài project qua `additionalReadRoots`, MCP baseline bật mặc định ở cả hai lệnh install, pin Pi host `0.82.0`.
48
+ - `1.1.1`: `piagent-setup --no-mcp` thật sự không cài MCP (opt-out từng bị default mới của `1.1.0` đè); `site:check` không còn treo khi response vượt body cap và không còn `PASS` khi có địa chỉ chưa kiểm được; `piagent_document_read` từ chối byte không phải UTF-8/UTF-16 thay vì decode thành ký tự thay thế.
48
49
  - `1.1.2`: đóng TOCTOU của document reader, hash evidence tính trên text đã redact, publish chờ đủ verify matrix.
49
50
  - `1.1.3`: command mang secret không còn được dùng làm verify evidence, document reader từ chối FIFO thay vì treo, redact secret ngắn, redirect phải về đúng trang được kiểm.
50
51
  - `1.1.4`: nhận diện secret dạng CLI option (`--token`, `--password`, `--api-key`) và Authorization header ở mọi vị trí argument.
@@ -68,6 +69,47 @@ pi install /path/to/piagent
68
69
  progress, Git baseline-aware changed files, scope + all-command final gate,
69
70
  hard completion hook, context pack dedupe, fail-closed verifier và bounded
70
71
  symlink-safe local state dùng được giữa nhiều Pi session/subagent.
72
+ - `1.2.12`: benchmark release `production-v1` 108 session, Wilson quality
73
+ interval, so sánh có kiểm soát với surface baseline `codex-cli` trong
74
+ `CODEX_HOME` riêng, và retry chỉ dành cho lỗi hạ tầng.
75
+ - `1.2.13`: trang benchmark tĩnh với evidence `production-v1` đã verify, chart
76
+ score/token/paired-win, và snapshot đã sanitize trong quality benchmark guide.
77
+ - `1.2.14`: tách runtime theo layer có enforce bằng máy (dependency direction +
78
+ file budget), integrity lock pin mọi module vừa tách, maintainer doc EN/VI, và
79
+ bỏ `/name` custom để không shadow lệnh gốc của Pi.
80
+ - `1.2.15`: update stable chạy được trên máy đang đăng ký Piagent bằng đường dẫn
81
+ local, kèm regression chặn installer đọc nhầm version Pi hiển thị.
82
+ - `1.2.16`: default Codex chuyển sang `openai-codex/gpt-5.5:high`, fallback khi
83
+ thiếu thinking suffix là `high`.
84
+ - `1.2.17`: doc site song ngữ đầy đủ — 17 trang có bản EN, chuyển VI/EN cùng chủ
85
+ đề, và gate kiểm link + locale parity.
86
+ - `1.3.0`: bản stable đầu tiên của Intelligence Engine — Criterion Graph, bounded
87
+ current-source context, tool surface ổn định, trần một continuation, verify
88
+ trên cây hiện tại, resume/handoff bền. Pin Pi host `0.84.1`, install stable
89
+ dùng npm `latest` + tag `v1.3.0`.
90
+ - `1.3.1`: mở rộng integrity inventory sang TypeScript loader/CLI dispatcher và
91
+ các module task-state/verification còn lại; thay full-file hashing mỗi tool
92
+ call bằng metadata cache fail-closed; bỏ shell interpolation trong probe
93
+ `pdftotext`; JSONL state lock publish owner nguyên tử và tự phục hồi khi
94
+ writer bị kill.
95
+ - `1.4.0`: Local Session Hub — Gateway một-instance-mỗi-profile và
96
+ `piagent dashboard` để tạo/mở lại/resume/rename/pin/archive/fork session mà
97
+ không tốn thêm model turn; client MUI conversation-first song ngữ với Agent
98
+ Inspector; projection Task Changes / Working Tree / Staged có bounded diff,
99
+ provenance và enforce protected path; session lease bền, recovery khi restart
100
+ hoặc owner cũ treo, doctor có repair tường minh.
101
+ - `1.5.1`: bản phát hành mang nội dung của `1.5.0` tới registry. `1.5.0` được
102
+ tag nhưng release matrix fail trên macOS nên job publish không chạy; tag cũ
103
+ được giữ nguyên thay vì dời, vì bootstrap dựa trên tính bất biến của tag.
104
+ - `1.5.0`: document workspace, bounded file attachments, deterministic session
105
+ titles và compact live activity timeline trong Session Hub. Không có trên
106
+ registry — dùng `1.5.1`.
107
+ - `1.4.1`: maintenance release cho Session Hub và guard — session tiếp tục được
108
+ qua nhiều Task Contract thay vì bị terminal giữa cuộc trò chuyện, task chỉ
109
+ chạy test/build được cấp đúng execution authority, Gateway/local install luôn
110
+ đồng bộ cùng checkout, context usage của session đã lưu hiển thị trong WebUI,
111
+ và integrity/redaction/docs parity được mở rộng tới shell, browser bundle,
112
+ TypeScript graph, npm token cùng các lệnh remedy có thể thực thi.
71
113
 
72
114
  ## Không publish
73
115
 
@@ -11,7 +11,7 @@ This file is the canonical install, update, rollback, and release checklist. Oth
11
11
 
12
12
  All supported environments require Node.js `>=22.19.0` and Pi Coding Agent `0.84.1`. 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.
13
13
 
14
- | Surface | Status for v1.4.0 | Rollout guidance |
14
+ | Surface | Status for v1.5.0 | Rollout guidance |
15
15
  |---|---|---|
16
16
  | macOS Apple Silicon (`darwin/arm64`) + Bash | Verified for this release. | Safe default for team rollout after normal project smoke tests. |
17
17
  | Linux x64 + Bash | Verified in GitHub Actions. | Safe default for CI/server usage after normal project smoke tests. |
@@ -100,13 +100,13 @@ token/generalization claim.
100
100
  | Terminal helper | `npm install -g --ignore-scripts @piagent/platform@X.Y.Z` | `piagent-*` commands on `PATH`. |
101
101
  | Pi package | `piagent-install`, or `pi install ...` | Extensions, prompts, skills, and subagents loaded by Pi. |
102
102
 
103
- These three components are versioned independently. A full install, update, or rollback must use the exact Pi host declared by the target release, then install the target terminal helper, then let that helper install its matching Pi package. `piagent-install` changes only the Pi package; it does not replace the Pi host or the npm-global terminal helper currently executing. In installer output, `currentRelease` is the terminal helper package version.
103
+ These three components are versioned independently. A full install, update, or rollback must use the exact Pi host declared by the target release, then install the target terminal helper, then let that helper install its matching Pi package. Stable, exact, dev, and custom `piagent-install` channels change only the Pi package; they do not replace the Pi host or the npm-global terminal helper currently executing. The local channel is the deliberate development exception: `install-global.sh --local` synchronizes the active terminal helper and Gateway runtime from the same checkout before registering that checkout as the Pi package. This prevents the terminal and WebUI Gateway from running different source bytes under the same version number. In installer output, `currentRelease` is the terminal helper package version before any local synchronization.
104
104
 
105
105
  ## Release channels
106
106
 
107
107
  | Channel | Source shape | Mutability | Use when |
108
108
  |---|---|---:|---|
109
- | `stable` | `git:github.com/Vt-mmm/piagent@<resolved-commit-sha>` from `v1.4.0` | Fixed after resolution | Default for team rollout. |
109
+ | `stable` | `git:github.com/Vt-mmm/piagent@<resolved-commit-sha>` from `v1.5.0` | Fixed after resolution | Default for team rollout. |
110
110
  | `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. |
111
111
  | `dev` | `git:github.com/Vt-mmm/piagent` | Moving | Personal machine or sandbox only. |
112
112
  | `local` | `/path/to/piagent` | Local workspace | Platform development and dry-run validation. |
@@ -126,7 +126,7 @@ Use this flow when the team needs both terminal commands and the Pi package:
126
126
  ```bash
127
127
  node --version # >= 22.19.0
128
128
  npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.84.1
129
- npm install -g --ignore-scripts @piagent/platform@1.4.0
129
+ npm install -g --ignore-scripts @piagent/platform@1.5.1
130
130
  piagent-install --stable --dry-run
131
131
  piagent-install --stable
132
132
  ```
@@ -134,8 +134,8 @@ piagent-install --stable
134
134
  The stable preview and apply output includes:
135
135
 
136
136
  ```text
137
- currentRelease: v1.4.0 (helper package version)
138
- tag: v1.4.0
137
+ currentRelease: v1.5.0 (helper package version)
138
+ tag: v1.5.0
139
139
  resolvedCommit: <40-char-sha>
140
140
  source: git:github.com/Vt-mmm/piagent@<40-char-sha>
141
141
  ```
@@ -152,7 +152,7 @@ bash scripts/install-global.sh --stable
152
152
  Use this only when terminal commands are not needed:
153
153
 
154
154
  ```bash
155
- pi install git:github.com/Vt-mmm/piagent@v1.4.0
155
+ pi install git:github.com/Vt-mmm/piagent@v1.5.1
156
156
  ```
157
157
 
158
158
  Direct `pi install` does not create `piagent-*` commands on `PATH`.
@@ -212,7 +212,7 @@ For a fresh machine that does not have `piagent-update` yet, bootstrap the same
212
212
  npm exec -y --package @piagent/platform@X.Y.Z -- piagent-update --version X.Y.Z --force
213
213
  ```
214
214
 
215
- Running it from a git checkout is refused rather than replacing that checkout's commands with a published build; update a checkout with `git pull` and `install-global.sh --local`.
215
+ Running it from a git checkout is refused rather than replacing that checkout's commands with a published build; update a checkout with `git pull` and `install-global.sh --local`. The local installer keeps the active npm prefix, synchronizes the helper/Gateway from the checkout, and then registers the same checkout with Pi. Restart an already-running Dashboard after the update so its existing process releases the old loaded modules.
216
216
 
217
217
  The same sequence by hand, which must keep this order because `piagent-install` fails against a host that does not match the version it pins and does not install one itself:
218
218
 
@@ -291,6 +291,19 @@ npm uninstall -g @piagent/platform # the npm-global helper, r
291
291
 
292
292
  Removal reads the package entries registered in Pi's settings rather than assuming what the running version installs. A machine that first installed the platform before the namespace rename still has that older entry removed.
293
293
 
294
+ ### Which package source each scope gets
295
+
296
+ `setup.sh` writes two different scopes and they do not take the same answer. A project's `.pi/settings.json` pin is authority over that project; the global install is what every project on the machine gets, so one project may not decide it.
297
+
298
+ | Scope | Order |
299
+ |---|---|
300
+ | Global install | `--package-source` → the running helper's own `name@version` → local path (with a warning) |
301
+ | Project init | `--package-source` → the project's committed pin → the running helper → local path (with a warning) |
302
+
303
+ When both scopes run and the two answers differ, setup prints the divergence and keeps both: the project keeps its pin, the machine keeps the running helper. Pass `--package-source <source>` to make them the same deliberately.
304
+
305
+ On a machine whose helper lives under a non-default npm prefix — because the configured global root was not writable at install time, or because `piagent-update --npm-prefix` chose one — a bare `npm uninstall -g` resolves against the *configured* prefix and removes nothing while still exiting `0`. Uninstall therefore derives the prefix from where the running helper actually sits and passes `--prefix` when the two differ; the final line it prints already carries the right prefix, so copy that command rather than the generic one above. Run `npm prefix -g` and compare against `dirname $(dirname $(which piagent-uninstall))` if you want to confirm which case you are in.
306
+
294
307
  ### What uninstall will not remove
295
308
 
296
309
  These are operator data, not platform state, and no flag combination deletes them:
@@ -87,7 +87,7 @@ tool context mang tính advisory chỉ được nạp khi task thực sự cần
87
87
 
88
88
  ```text
89
89
  1. Intake
90
- - one Pi session per task
90
+ - one pending task per Pi session; terminal tasks remain immutable while the conversation may continue with a successor task
91
91
  - runtime auto-start for bounded source changes; manual fallback for broad/high-risk/ambiguous scope
92
92
  - source-change or read-only
93
93
  - risk lane
@@ -25,7 +25,7 @@ This document covers the packaged guard, project profiles, capability locks, ins
25
25
  - The operator, operating-system account, Pi host, and explicitly trusted project repository are trusted to execute code.
26
26
  - Project-local Pi resources are loaded only after Pi project trust or an explicit operator override.
27
27
  - A human remains available to approve destructive and external-provider actions.
28
- - 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.4.0, and WSL2 is experimental/unverified.
28
+ - 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.5.0, and WSL2 is experimental/unverified.
29
29
  - Registry, GitHub, model-provider, MCP-provider, and Vercel controls are external dependencies. Their account security and platform guarantees are not replaced by this repository.
30
30
 
31
31
  ## Threat actors and failure modes
@@ -20,7 +20,7 @@ Agent Watch/report hien ten task ma operator da dat.
20
20
  | Nhom | Field | Quy tac |
21
21
  |---|---|---|
22
22
  | Schema | `schemaVersion` | Luon la `2`. |
23
- | Identity | `taskRunId`, `taskId`, `sessionId`, `sessionName`, `intakeMode` | Run ID/Task ID normalized; mot session chi co mot task; intake la `runtime` hoac `model`. |
23
+ | Identity | `taskRunId`, `taskId`, `sessionId`, `sessionName`, `intakeMode` | Run ID/Task ID normalized; mot session chi co mot task pending, nhung co the chua nhieu task terminal tuan tu; intake la `runtime` hoac `model`. |
24
24
  | Mode | `changeMode` | `source-change` hoac `read-only`. |
25
25
  | Retry | `attempt`, `maxAttempts`, `previousAttempts` | Tran lay tu attempt dau, khong duoc nang o retry sau. |
26
26
  | Intent | `summary`, `riskLane`, `expectedOutput`, `acceptanceCriteria` | Chot truoc khi implementation. |
@@ -32,6 +32,11 @@ Agent Watch/report hien ten task ma operator da dat.
32
32
  | Outcome | `trace`, `failedAt`, `failureReason`, `ruledOut` | Terminal contract immutable. |
33
33
  | Time | `createdAt`, `updatedAt` | Timestamp parseable, dung de sap xep/migration/report. |
34
34
 
35
+ `source-change` la mode co quyen thuc thi command cua project, khong phai loi
36
+ khai rang task bat buoc sua source. Yeu cau chi chay test/build/lint/typecheck
37
+ hoac package dry-run van dung mode nay va co the hoan tat voi working tree khong
38
+ doi. `read-only` danh cho inspection khong can shell execution.
39
+
35
40
  Template day du nam tai
36
41
  [`templates/project/.pi/task-contract.template.json`](../templates/project/.pi/task-contract.template.json).
37
42
  Schema chinh thuc nam tai
@@ -56,7 +61,7 @@ context/verify/trace/gate tools are recovery surfaces for custom/high-risk work.
56
61
 
57
62
  Task start tu choi khi:
58
63
 
59
- - session da thuoc task khac hoac task terminal;
64
+ - session dang co mot task pending khac;
60
65
  - cung `taskId` dang pending o session khac;
61
66
  - task da completed;
62
67
  - retry vuot `maxAttempts`;
@@ -111,8 +116,10 @@ failed step can note moi; step done/skipped khong duoc mo lai. Khi trace da
111
116
  terminal, cac tool progress/context/memory/verify/trace va project mutations deu
112
117
  bi chan cho session do.
113
118
 
114
- Retry chay o session moi. `previousAttempts` giu outcome, phase failure, reason,
115
- ruled-out hypothesis va timestamp de agent khong lap lai cach da that bai.
119
+ Retry co the chay tiep trong cung session sau khi attempt truoc da terminal.
120
+ `previousAttempts` giu outcome, phase failure, reason, ruled-out hypothesis va
121
+ timestamp de agent khong lap lai cach da that bai. Session binding luon tro den
122
+ task moi nhat; task terminal cu van immutable va con nguyen evidence.
116
123
 
117
124
  ## Migration v1 -> v2
118
125
 
@@ -10,7 +10,7 @@ Một thành viên mới không cần biết local path của maintainer. Luồn
10
10
  ```bash
11
11
  node --version # >= 22.19.0
12
12
  npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.84.1
13
- npm install -g --ignore-scripts @piagent/platform@1.4.0
13
+ npm install -g --ignore-scripts @piagent/platform@1.5.1
14
14
  piagent-install --stable
15
15
  cd /path/to/project
16
16
  pi
@@ -44,7 +44,7 @@ Mặc định team dùng stable helper:
44
44
  ```bash
45
45
  node --version # >= 22.19.0
46
46
  npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.84.1
47
- npm install -g --ignore-scripts @piagent/platform@1.4.0
47
+ npm install -g --ignore-scripts @piagent/platform@1.5.1
48
48
  piagent-install --stable --dry-run
49
49
  piagent-install --stable
50
50
  ```
@@ -183,6 +183,76 @@ Format hỗ trợ:
183
183
  | CSV | `piagent-usage --history <project> --csv` |
184
184
  | Markdown | `piagent-usage --history <project> --markdown` |
185
185
 
186
+ ### Shape của `--json`
187
+
188
+ Table/CSV/Markdown chỉ in một phần report. `--json` trả nguyên object, gồm **6 key top-level**:
189
+
190
+ | Key | Nội dung |
191
+ |---|---|
192
+ | `generatedAt` | ISO timestamp lúc chạy lệnh. Dùng để so hai report với nhau. |
193
+ | `scope` | `projectPath` (null khi `--all-projects`), `allProjects`, `includeSubagents`, `sessionsDir`, `since`, `until`. Đây là bản ghi chính xác của filter đã áp — report không tự giải thích được nếu thiếu key này. |
194
+ | `totals` | `sessions` / `mainSessions` / `subagentSessions`, `messages` (`user`, `assistant`, `toolCalls`, `toolResults`, `total`), `promptChars`, và `tokens` (xem bảng "Cách đọc số"). |
195
+ | `projects` | Một dòng cho mỗi `cwd`, sort giảm dần theo `tokens.total`: `cwd`, `sessions`, `mainSessions`, `subagentSessions`, `tokens`, `cost`. |
196
+ | `tools` | `{ name, count }` cho mỗi tool đã gọi, sort giảm dần theo `count`. Đây là chỗ nhìn ra tool nào đang đốt tool-call budget. |
197
+ | `sessions` | Một dòng cho mỗi session, mới nhất trước: `id`, `name`, `cwd`, `file`, `isSubagent`, `provider`, `modelId`, `thinkingLevel`, `firstTimestamp`, `lastTimestamp`, `messages`, `tokens`. |
198
+
199
+ Mọi `Date` đều được serialize thành ISO string, nên output an toàn để `jq` hoặc
200
+ đẩy thẳng vào báo cáo.
201
+
202
+ ```bash
203
+ # Top 10 tool tốn nhiều call nhất trong 7 ngày, toàn máy
204
+ piagent-usage --history --all-projects --days 7 --json | jq '.tools[:10]'
205
+
206
+ # Cost theo từng project
207
+ piagent-usage --history --all-projects --days 7 --json | jq '.projects[] | {cwd, cost}'
208
+ ```
209
+
210
+ ## Đo lượt dùng từ bên ngoài
211
+
212
+ Ba kênh khác nhau, ba bộ đếm khác nhau — **không cộng vào nhau**:
213
+
214
+ | Kênh | Đếm gì | Lấy ở đâu |
215
+ |---|---|---|
216
+ | npm downloads | cài qua `npm install` | `api.npmjs.org/downloads/point/last-week/@piagent/platform` |
217
+ | GitHub clones | cài qua `pi install git:…` (mỗi lần là một `git clone`) | `gh api repos/<owner>/<repo>/traffic/clones` |
218
+ | Docs site | người đọc tài liệu | Vercel Web Analytics |
219
+
220
+ Đọc số npm cẩn thận: với package còn mới, mirror và scanner chiếm phần lớn.
221
+ Dấu hiệu nhận ra là **phân bổ đều giữa nhiều version**, kể cả prerelease cũ —
222
+ người thật dồn vào bản mới nhất, bot thì kéo tất.
223
+
224
+ ### Traffic GitHub chỉ sống 14 ngày
225
+
226
+ API traffic chỉ trả cửa sổ trượt 14 ngày và **xoá hẳn** phần cũ hơn: không có
227
+ endpoint nào lấy lại được. Workflow `traffic-snapshot` chạy hằng ngày và gộp
228
+ vào CSV cộng dồn trên nhánh `traffic-data`, nên lịch sử không mất. Khoảng trống
229
+ dài hơn 14 ngày là vĩnh viễn.
230
+
231
+ ```bash
232
+ # chạy tay, ghi vào ./traffic
233
+ TRAFFIC_TOKEN="$(gh auth token)" node scripts/traffic-snapshot.mjs --repository Vt-mmm/piagent
234
+ ```
235
+
236
+ Traffic endpoint đòi quyền **push** trên repo. Nếu `GITHUB_TOKEN` mặc định của
237
+ Actions không đủ, script sẽ báo `HTTP 403` kèm đúng cách sửa: tạo fine-grained
238
+ PAT có quyền `Administration: read` rồi lưu thành secret `TRAFFIC_TOKEN`.
239
+
240
+ ### Docs site
241
+
242
+ Site dùng **Vercel Web Analytics** — cookieless, không lưu định danh trên
243
+ trình duyệt, nên không cần banner đồng ý. Snippet nằm trong shell của
244
+ `build-docs-site.mjs` nên mọi trang và cả hai ngôn ngữ đều có; test chặn
245
+ trường hợp thêm trang mới mà quên.
246
+
247
+ Phải bật trong Vercel dashboard (**Analytics → Enable**) rồi deploy lại thì
248
+ route `/_vercel/insights/*` mới tồn tại. Trước đó request 404 và trang vẫn chạy
249
+ bình thường.
250
+
251
+ Runtime của piagent **không gửi gì ra ngoài**: `telemetry()` ghi local qua
252
+ `appendContextTelemetry(cwd, …)`, package không có `postinstall`. Đó là chủ ý —
253
+ một sản phẩm bán bằng lời hứa owner-only local state thì không nên có lệnh gọi
254
+ mạng ngầm.
255
+
186
256
  ## Cách đọc số
187
257
 
188
258
  | Field | Ý nghĩa |
@@ -43,9 +43,22 @@ Rule máy đọc nằm tại `architecture/layers.json`; chạy `npm run archite
43
43
  | Capabilities | `packages/piagent-core/capabilities/` | Profile resolution, pack validation, lock, source root | Pi session lifecycle |
44
44
  | Security foundation | `packages/piagent-core/security/` | Sensitive-data primitive | Workflow behavior |
45
45
  | Benchmark | `packages/piagent-core/benchmark/`, `benchmarks/` | Suite validation, scoring, evidence | Runtime enforcement |
46
+ | WebUI contracts | `packages/piagent-webui/contracts/` | Wire type dùng chung giữa browser và server | Mọi hành vi runtime; layer này không phụ thuộc gì |
47
+ | WebUI client | `packages/piagent-webui/client/` | View trên browser, view model, UI preference | Server state, filesystem, Pi API |
48
+ | WebUI server | `packages/piagent-webui/server/` | HTTP/WS endpoint, đọc session, dựng diff | Render phía browser; không được import client |
49
+ | WebUI extension | `packages/piagent-webui/extension/` | Lệnh `/piagent-webui` chạy trong Pi | Wire type mà client cũng cần |
50
+ | WebUI gateway | `packages/piagent-webui/gateway/` | Tiến trình `piagent dashboard` độc lập, port và lifecycle | Feature logic thuộc về server |
51
+ | WebUI ownership | `packages/piagent-webui/ownership/` | Claim single-owner trên một session directory | Transport và render; layer này không phụ thuộc gì |
52
+ | WebUI build | `packages/piagent-webui/` (gốc package) | Bundle client và đóng gói asset được serve | Source của bất kỳ WebUI layer nào |
46
53
  | Entrypoints | `scripts/` | CLI argument và gọi use case | Domain logic trùng lặp |
47
54
  | Product assets | `prompts/`, `skills/`, `subagents/`, `adapters/`, `packs/`, `schemas/` | Declarative behavior và contract | Hidden runtime state |
48
55
 
56
+ Các layer WebUI là một trục dependency thứ hai, không phải nhánh của trục đầu. `contracts` và
57
+ `ownership` nằm dưới cùng và không import gì; `client` chỉ được với tới `contracts`, nên bundle
58
+ browser không bao giờ kéo theo code server hay Pi. `server`, `extension`, `gateway` với xuống
59
+ `runtime`/`core`/`security` — không bao giờ ngược lại, nên platform vẫn chạy headless khi không
60
+ có WebUI. `npm run architecture:check` enforce toàn bộ edge trên.
61
+
49
62
  Folder `extensions/` vẫn chứa một số service module do lịch sử. Tên folder này là legacy; chỉ `piagent-guard.ts` được Pi load như extension. Mỗi lần migrate phải tách theo một feature trọn vẹn và giữ compatibility cho đến khi migration hoàn tất.
50
63
 
51
64
  ## Luồng runtime
@@ -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.4.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.5.1 docs · VI</span>
34
34
  <nav class="language-switch" aria-label="Ngôn ngữ">
35
35
  <a class="language-option current" href="/architecture" hreflang="vi" lang="vi" aria-current="true">VI</a>
36
36
  <a class="language-option" href="/en/architecture" hreflang="en" lang="en">EN</a>
@@ -217,5 +217,9 @@
217
217
  <nav data-toc></nav>
218
218
  </aside>
219
219
  </div>
220
+ <script>
221
+ window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); };
222
+ </script>
223
+ <script defer src="/_vercel/insights/script.js"></script>
220
224
  </body>
221
225
  </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.4.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.5.1 docs · VI</span>
34
34
  <nav class="language-switch" aria-label="Ngôn ngữ">
35
35
  <a class="language-option current" href="/benchmark" hreflang="vi" lang="vi" aria-current="true">VI</a>
36
36
  <a class="language-option" href="/en/benchmark" hreflang="en" lang="en">EN</a>
@@ -364,5 +364,9 @@
364
364
  <nav data-toc></nav>
365
365
  </aside>
366
366
  </div>
367
+ <script>
368
+ window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); };
369
+ </script>
370
+ <script defer src="/_vercel/insights/script.js"></script>
367
371
  </body>
368
372
  </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.4.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.5.1 docs · VI</span>
34
34
  <nav class="language-switch" aria-label="Ngôn ngữ">
35
35
  <a class="language-option current" href="/commands" hreflang="vi" lang="vi" aria-current="true">VI</a>
36
36
  <a class="language-option" href="/en/commands" hreflang="en" lang="en">EN</a>
@@ -254,5 +254,9 @@
254
254
  <nav data-toc></nav>
255
255
  </aside>
256
256
  </div>
257
+ <script>
258
+ window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); };
259
+ </script>
260
+ <script defer src="/_vercel/insights/script.js"></script>
257
261
  </body>
258
262
  </html>
@@ -18,6 +18,55 @@
18
18
  </div>
19
19
  </section>
20
20
 
21
+ <section class="section">
22
+ <p class="section-kicker">Production V1 · historical public regression evidence</p>
23
+ <h2 id="evidence">Measured, not asserted</h2>
24
+ <p class="section-lead">108 sessions on the same model and thinking level, graded automatically, against an isolated <code>codex-cli</code> surface. This is the production-v1 measurement; it is not a re-measurement of v1.4.0.</p>
25
+
26
+ <div class="benchmark-metrics" aria-label="Headline benchmark numbers">
27
+ <div class="benchmark-metric">
28
+ <span>Overall</span>
29
+ <strong>9.92 / 10</strong>
30
+ <small>Quality, Safety, Reliability all 10/10</small>
31
+ </div>
32
+ <div class="benchmark-metric">
33
+ <span>Tasks resolved</span>
34
+ <strong>54/54</strong>
35
+ <small>100% on both surfaces</small>
36
+ </div>
37
+ <div class="benchmark-metric">
38
+ <span>Fresh tokens</span>
39
+ <strong>-51.11%</strong>
40
+ <small>paired geometric mean, 47/54 pair wins</small>
41
+ </div>
42
+ <div class="benchmark-metric">
43
+ <span>Infrastructure</span>
44
+ <strong>0 retries</strong>
45
+ <small>108 valid runs</small>
46
+ </div>
47
+ </div>
48
+
49
+ <div class="benchmark-legend" aria-label="Chart legend">
50
+ <span><i class="piagent-swatch"></i>Piagent</span>
51
+ <span><i class="codex-swatch"></i>codex-cli</span>
52
+ </div>
53
+
54
+ <div class="benchmark-usage-chart" aria-label="Median fresh tokens per run: Piagent 7,368, codex-cli 18,476">
55
+ <div class="benchmark-usage-group">
56
+ <h3>Fresh tokens, median per run</h3>
57
+ <div class="benchmark-usage-row"><span>Piagent</span><div class="benchmark-track"><i class="piagent-bar" style="--bar-size: 39.88%"></i></div><strong>7,368</strong></div>
58
+ <div class="benchmark-usage-row"><span>codex-cli</span><div class="benchmark-track"><i class="codex-bar" style="--bar-size: 100%"></i></div><strong>18,476</strong></div>
59
+ </div>
60
+ <div class="benchmark-usage-group">
61
+ <h3>Tool calls, median per run</h3>
62
+ <div class="benchmark-usage-row"><span>Piagent</span><div class="benchmark-track"><i class="piagent-bar" style="--bar-size: 62.5%"></i></div><strong>5</strong></div>
63
+ <div class="benchmark-usage-row"><span>codex-cli</span><div class="benchmark-track"><i class="codex-bar" style="--bar-size: 100%"></i></div><strong>8</strong></div>
64
+ </div>
65
+ </div>
66
+
67
+ <p>The 95% confidence interval on the paired ratio is <strong>0.3809–0.6276</strong>; the upper bound stays below 1.0, so the token-saving claim holds. <a href="/en/benchmark">See the full configuration, every band score, and the raw tables</a>.</p>
68
+ </section>
69
+
21
70
  <section class="section">
22
71
  <h2 id="install">Install with two commands</h2>
23
72
  <p>Requires Node.js <span class="inline-code">&gt;=22.19.0</span>. Run these commands from the project you want to configure.</p>
@@ -20,6 +20,19 @@ piagent-benchmark --production --surfaces piagent,codex-cli \
20
20
  piagent-auto --full-access -p "Run the trusted local benchmark suite."</code></pre></article>
21
21
  <article class="command-card"><header><span>Capabilities</span><button class="clip-btn" data-clip="piagent-capabilities catalog --check&#10;piagent-capabilities doctor --profile .pi/piagent-profile.json">Copy</button></header><pre><code>piagent-capabilities catalog --check
22
22
  piagent-capabilities doctor --profile .pi/piagent-profile.json</code></pre></article>
23
+ <article class="command-card"><header><span>Session Hub</span><button class="clip-btn" data-clip="piagent dashboard&#10;piagent-webui --no-open">Copy</button></header><pre><code>piagent dashboard
24
+ piagent-webui --no-open</code></pre>
25
+ <p class="command-note">Aliases: <code>piagent-dashboard</code>, <code>piagent-webui</code> and <code>piagent-explain</code> also work as standalone binaries.</p></article>
26
+ <article class="command-card"><header><span>Explain a decision</span><button class="clip-btn" data-clip="piagent explain &#39;cat .env*&#39;&#10;piagent explain --scope">Copy</button></header><pre><code>piagent explain 'cat .env*'
27
+ piagent explain --scope</code></pre></article>
28
+ <article class="command-card"><header><span>Usage and tokens</span><button class="clip-btn" data-clip="piagent-usage .&#10;piagent-usage --history . --days 7">Copy</button></header><pre><code>piagent-usage .
29
+ piagent-usage --history . --days 7</code></pre></article>
30
+ <article class="command-card"><header><span>Models and routing</span><button class="clip-btn" data-clip="piagent-models&#10;piagent-model-scope&#10;piagent-route">Copy</button></header><pre><code>piagent-models
31
+ piagent-model-scope
32
+ piagent-route</code></pre></article>
33
+ <article class="command-card"><header><span>Subagents and migration</span><button class="clip-btn" data-clip="piagent-subagents --preset safe&#10;piagent-migrate . --apply&#10;piagent-import-instructions">Copy</button></header><pre><code>piagent-subagents --preset safe
34
+ piagent-migrate . --apply
35
+ piagent-import-instructions</code></pre></article>
23
36
  <article class="command-card"><header><span>Verification</span><button class="clip-btn" data-clip="npm run verify&#10;npm test&#10;npm run typecheck">Copy</button></header><pre><code>npm run verify
24
37
  npm test
25
38
  npm run typecheck</code></pre></article>
@@ -18,6 +18,55 @@
18
18
  </div>
19
19
  </section>
20
20
 
21
+ <section class="section">
22
+ <p class="section-kicker">Production V1 · historical public regression evidence</p>
23
+ <h2 id="bang-chung">Đo được, không phải nói suông</h2>
24
+ <p class="section-lead">108 session, cùng model và cùng thinking level, chấm tự động, so với surface <code>codex-cli</code> chạy cách ly. Đây là bằng chứng của bản đo production-v1, không phải phép đo lại của v1.4.0.</p>
25
+
26
+ <div class="benchmark-metrics" aria-label="Số liệu benchmark nổi bật">
27
+ <div class="benchmark-metric">
28
+ <span>Overall</span>
29
+ <strong>9,92 / 10</strong>
30
+ <small>Quality, Safety, Reliability đều 10/10</small>
31
+ </div>
32
+ <div class="benchmark-metric">
33
+ <span>Task resolved</span>
34
+ <strong>54/54</strong>
35
+ <small>100% cho cả hai surface</small>
36
+ </div>
37
+ <div class="benchmark-metric">
38
+ <span>Fresh token</span>
39
+ <strong>-51,11%</strong>
40
+ <small>paired geometric mean, 47/54 cặp thắng</small>
41
+ </div>
42
+ <div class="benchmark-metric">
43
+ <span>Infrastructure</span>
44
+ <strong>0 retry</strong>
45
+ <small>108 lần chạy hợp lệ</small>
46
+ </div>
47
+ </div>
48
+
49
+ <div class="benchmark-legend" aria-label="Chú thích biểu đồ">
50
+ <span><i class="piagent-swatch"></i>Piagent</span>
51
+ <span><i class="codex-swatch"></i>codex-cli</span>
52
+ </div>
53
+
54
+ <div class="benchmark-usage-chart" aria-label="Fresh token median mỗi run: Piagent 7.368, codex-cli 18.476">
55
+ <div class="benchmark-usage-group">
56
+ <h3>Fresh token, median mỗi run</h3>
57
+ <div class="benchmark-usage-row"><span>Piagent</span><div class="benchmark-track"><i class="piagent-bar" style="--bar-size: 39.88%"></i></div><strong>7.368</strong></div>
58
+ <div class="benchmark-usage-row"><span>codex-cli</span><div class="benchmark-track"><i class="codex-bar" style="--bar-size: 100%"></i></div><strong>18.476</strong></div>
59
+ </div>
60
+ <div class="benchmark-usage-group">
61
+ <h3>Tool calls, median mỗi run</h3>
62
+ <div class="benchmark-usage-row"><span>Piagent</span><div class="benchmark-track"><i class="piagent-bar" style="--bar-size: 62.5%"></i></div><strong>5</strong></div>
63
+ <div class="benchmark-usage-row"><span>codex-cli</span><div class="benchmark-track"><i class="codex-bar" style="--bar-size: 100%"></i></div><strong>8</strong></div>
64
+ </div>
65
+ </div>
66
+
67
+ <p>Khoảng tin cậy 95% của tỷ lệ ghép cặp là <strong>0,3809–0,6276</strong>; cận trên vẫn dưới 1,0 nên claim tiết kiệm token đứng vững. <a href="/benchmark">Xem đầy đủ cấu hình, từng band điểm và bảng số</a>.</p>
68
+ </section>
69
+
21
70
  <section class="section">
22
71
  <h2 id="cai-dat">Cài trong hai lệnh</h2>
23
72
  <p>Node.js <span class="inline-code">&gt;=22.19.0</span>. Chạy từ đúng project muốn set up.</p>
@@ -50,6 +50,34 @@ piagent-auto --full-access -p "Run the trusted local benchmark suite."</code></p
50
50
  <header><span>Capabilities</span><button class="clip-btn" data-clip="piagent-capabilities catalog --check&#10;piagent-capabilities doctor --profile .pi/piagent-profile.json">Lấy lệnh</button></header>
51
51
  <pre><code>piagent-capabilities catalog --check
52
52
  piagent-capabilities doctor --profile .pi/piagent-profile.json</code></pre>
53
+ </article>
54
+ <article class="command-card">
55
+ <header><span>Session Hub</span><button class="clip-btn" data-clip="piagent dashboard&#10;piagent-webui --no-open">Lấy lệnh</button></header>
56
+ <pre><code>piagent dashboard
57
+ piagent-webui --no-open</code></pre>
58
+ <p class="command-note">Bí danh: <code>piagent-dashboard</code>, <code>piagent-webui</code>, <code>piagent-explain</code> cũng chạy được như binary riêng.</p>
59
+ </article>
60
+ <article class="command-card">
61
+ <header><span>Giải thích quyết định</span><button class="clip-btn" data-clip="piagent explain &#39;cat .env*&#39;&#10;piagent explain --scope">Lấy lệnh</button></header>
62
+ <pre><code>piagent explain 'cat .env*'
63
+ piagent explain --scope</code></pre>
64
+ </article>
65
+ <article class="command-card">
66
+ <header><span>Usage và token</span><button class="clip-btn" data-clip="piagent-usage .&#10;piagent-usage --history . --days 7">Lấy lệnh</button></header>
67
+ <pre><code>piagent-usage .
68
+ piagent-usage --history . --days 7</code></pre>
69
+ </article>
70
+ <article class="command-card">
71
+ <header><span>Model và routing</span><button class="clip-btn" data-clip="piagent-models&#10;piagent-model-scope&#10;piagent-route">Lấy lệnh</button></header>
72
+ <pre><code>piagent-models
73
+ piagent-model-scope
74
+ piagent-route</code></pre>
75
+ </article>
76
+ <article class="command-card">
77
+ <header><span>Subagents và migration</span><button class="clip-btn" data-clip="piagent-subagents --preset safe&#10;piagent-migrate . --apply&#10;piagent-import-instructions">Lấy lệnh</button></header>
78
+ <pre><code>piagent-subagents --preset safe
79
+ piagent-migrate . --apply
80
+ piagent-import-instructions</code></pre>
53
81
  </article>
54
82
  <article class="command-card">
55
83
  <header><span>Verification</span><button class="clip-btn" data-clip="npm run verify&#10;npm test&#10;npm run typecheck">Lấy lệnh</button></header>
@@ -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.4.0 docs · VI</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.5.1 docs · VI</span>
34
34
  <nav class="language-switch" aria-label="Ngôn ngữ">
35
35
  <a class="language-option current" href="/context-engine" hreflang="vi" lang="vi" aria-current="true">VI</a>
36
36
  <a class="language-option" href="/en/context-engine" hreflang="en" lang="en">EN</a>
@@ -184,5 +184,9 @@ piagent-context efficiency</code></pre>
184
184
  <nav data-toc></nav>
185
185
  </aside>
186
186
  </div>
187
+ <script>
188
+ window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); };
189
+ </script>
190
+ <script defer src="/_vercel/insights/script.js"></script>
187
191
  </body>
188
192
  </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.4.0 docs · EN</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.5.1 docs · EN</span>
34
34
  <nav class="language-switch" aria-label="Language">
35
35
  <a class="language-option" href="/architecture" hreflang="vi" lang="vi">VI</a>
36
36
  <a class="language-option current" href="/en/architecture" hreflang="en" lang="en" aria-current="true">EN</a>
@@ -181,5 +181,9 @@
181
181
  <nav data-toc></nav>
182
182
  </aside>
183
183
  </div>
184
+ <script>
185
+ window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); };
186
+ </script>
187
+ <script defer src="/_vercel/insights/script.js"></script>
184
188
  </body>
185
189
  </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.4.0 docs · EN</span>
33
+ <span class="pill"><span class="pill-dot"></span>v1.5.1 docs · EN</span>
34
34
  <nav class="language-switch" aria-label="Language">
35
35
  <a class="language-option" href="/benchmark" hreflang="vi" lang="vi">VI</a>
36
36
  <a class="language-option current" href="/en/benchmark" hreflang="en" lang="en" aria-current="true">EN</a>
@@ -314,5 +314,9 @@
314
314
  <nav data-toc></nav>
315
315
  </aside>
316
316
  </div>
317
+ <script>
318
+ window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); };
319
+ </script>
320
+ <script defer src="/_vercel/insights/script.js"></script>
317
321
  </body>
318
322
  </html>