@piagent/platform 1.2.16 → 1.2.17

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 (69) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +3 -3
  3. package/docs/README.md +1 -1
  4. package/docs/command-reference-vietnamese.md +2 -2
  5. package/docs/distribution-standard.md +7 -7
  6. package/docs/operator-manual-vietnamese.md +7 -7
  7. package/docs/release-install-policy.md +6 -6
  8. package/docs/security-threat-model.md +1 -1
  9. package/docs/team-onboarding.md +2 -2
  10. package/docs/vercel-docs-site.md +7 -5
  11. package/docs-site/architecture.html +12 -6
  12. package/docs-site/assets/docs.css +52 -1
  13. package/docs-site/assets/docs.js +4 -2
  14. package/docs-site/benchmark.html +12 -6
  15. package/docs-site/commands.html +12 -6
  16. package/docs-site/content/en/architecture.html +33 -0
  17. package/docs-site/content/en/benchmark.html +164 -0
  18. package/docs-site/content/en/commands.html +39 -0
  19. package/docs-site/content/en/context-engine.html +30 -0
  20. package/docs-site/content/en/index.html +85 -0
  21. package/docs-site/content/en/mcp-approval.html +74 -0
  22. package/docs-site/content/en/mcp-auth.html +57 -0
  23. package/docs-site/content/en/mcp-servers.html +91 -0
  24. package/docs-site/content/en/mcp.html +90 -0
  25. package/docs-site/content/en/permissions.html +19 -0
  26. package/docs-site/content/en/profiles.html +27 -0
  27. package/docs-site/content/en/quickstart.html +126 -0
  28. package/docs-site/content/en/runtime.html +27 -0
  29. package/docs-site/content/en/scope.html +45 -0
  30. package/docs-site/content/en/security.html +33 -0
  31. package/docs-site/content/en/team.html +14 -0
  32. package/docs-site/content/en/workflows.html +21 -0
  33. package/docs-site/content/quickstart.html +1 -1
  34. package/docs-site/context-engine.html +12 -6
  35. package/docs-site/en/architecture.html +166 -0
  36. package/docs-site/en/benchmark.html +297 -0
  37. package/docs-site/en/commands.html +172 -0
  38. package/docs-site/en/context-engine.html +163 -0
  39. package/docs-site/en/index.html +203 -0
  40. package/docs-site/en/mcp-approval.html +207 -0
  41. package/docs-site/en/mcp-auth.html +190 -0
  42. package/docs-site/en/mcp-servers.html +224 -0
  43. package/docs-site/en/mcp.html +223 -0
  44. package/docs-site/en/permissions.html +152 -0
  45. package/docs-site/en/profiles.html +160 -0
  46. package/docs-site/en/quickstart.html +259 -0
  47. package/docs-site/en/runtime.html +160 -0
  48. package/docs-site/en/scope.html +178 -0
  49. package/docs-site/en/security.html +166 -0
  50. package/docs-site/en/team.html +143 -0
  51. package/docs-site/en/workflows.html +154 -0
  52. package/docs-site/index.html +12 -6
  53. package/docs-site/mcp-approval.html +12 -6
  54. package/docs-site/mcp-auth.html +12 -6
  55. package/docs-site/mcp-servers.html +12 -6
  56. package/docs-site/mcp.html +12 -6
  57. package/docs-site/permissions.html +12 -6
  58. package/docs-site/profiles.html +12 -6
  59. package/docs-site/quickstart.html +13 -7
  60. package/docs-site/runtime.html +12 -6
  61. package/docs-site/scope.html +12 -6
  62. package/docs-site/security.html +12 -6
  63. package/docs-site/team.html +12 -6
  64. package/docs-site/workflows.html +12 -6
  65. package/package.json +1 -1
  66. package/packages/piagent-core/package.json +1 -1
  67. package/scripts/build-docs-site.mjs +224 -50
  68. package/scripts/verify-local.sh +6 -0
  69. package/scripts/verify-release-identity.mjs +15 -6
package/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  This file records release-facing changes for Pi Agent Platform. Copy the relevant version block into GitHub Releases when publishing a tag.
4
4
 
5
+ ## v1.2.17 - 2026-08-03
6
+
7
+ ### Bilingual public documentation
8
+
9
+ - Added a complete English peer for all 17 public documentation pages under
10
+ `/en`, while preserving existing Vietnamese URLs at the site root.
11
+ - Added same-topic VI/EN switching, localized navigation and copy feedback,
12
+ canonical URLs, and `hreflang` metadata without adding a client-side i18n
13
+ framework or language bundle.
14
+ - Extended build, release-identity, scaffold, link-integrity, and locale-parity
15
+ gates to cover all 34 generated pages.
16
+ - Fixed the multi-page grid breakpoint that kept desktop sidebar and TOC
17
+ columns active on mobile, restoring a single-column content layout.
18
+
5
19
  ## v1.2.16 - 2026-08-03
6
20
 
7
21
  ### Codex default
package/README.md CHANGED
@@ -293,8 +293,8 @@ This repository intentionally excludes:
293
293
  - [Architecture (Tiếng Việt)](docs/vi/architecture.md)
294
294
  - [Maintainer guide (English)](docs/en/maintainer-guide.md)
295
295
  - [Maintainer guide (Tiếng Việt)](docs/vi/maintainer-guide.md)
296
- - [Public docs site](https://piagent.io.vn)
297
- - [Static team docs site](docs-site/index.html) — generated from `docs-site/content/`, preview with `npm run site:preview`
296
+ - [Public docs site (VI/EN)](https://piagent.io.vn)
297
+ - [Static team docs site](docs-site/index.html) — bilingual output generated from `docs-site/content/`, preview with `npm run site:preview`
298
298
  - [Changelog](CHANGELOG.md)
299
299
  - [Vercel docs site deploy](docs/vercel-docs-site.md)
300
300
  - [Operator manual tiếng Việt](docs/operator-manual-vietnamese.md)
@@ -330,7 +330,7 @@ This repository intentionally excludes:
330
330
 
331
331
  ## Maturity
332
332
 
333
- The current package version is read from package metadata and release tags. Personal machines may follow the unpinned package source when accepting ongoing updates; production/team quickstarts and committed project settings should pin an explicit tag such as `v1.2.16` or a reviewed commit.
333
+ The current package version is read from package metadata and release tags. Personal machines may follow the unpinned package source when accepting ongoing updates; production/team quickstarts and committed project settings should pin an explicit tag such as `v1.2.17` or a reviewed commit.
334
334
 
335
335
  Ready for:
336
336
 
package/docs/README.md CHANGED
@@ -20,4 +20,4 @@ Every normative architecture document must be listed in `docs/languages.json`. T
20
20
 
21
21
  ## Existing operating guides
22
22
 
23
- The public static site is Vietnamese and lives under `docs-site/`. Long-form operator documents keep their existing stable paths until they receive a reviewed language pair. Their language must remain explicit in the title or filename during that migration.
23
+ The public static site is bilingual and lives under `docs-site/`. Existing root URLs remain Vietnamese for compatibility; matching English pages live under `/en/`, and every page links to its language peer. Long-form operator documents keep their existing stable paths until they receive a reviewed language pair. Their language must remain explicit in the title or filename during that migration.
@@ -468,8 +468,8 @@ Các lệnh này chạy ngoài Pi.
468
468
  | Command | Dùng khi nào |
469
469
  |---|---|
470
470
  | `npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.0` | Cài Pi CLI tương thích với release hiện tại. |
471
- | `npm install -g --ignore-scripts @piagent/platform@1.2.16` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
472
- | `pi install git:github.com/Vt-mmm/piagent@v1.2.16` | Cài pinned release khi cần reproducible team setup. |
471
+ | `npm install -g --ignore-scripts @piagent/platform@1.2.17` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
472
+ | `pi install git:github.com/Vt-mmm/piagent@v1.2.17` | Cài pinned release khi cần reproducible team setup. |
473
473
  | `pi install git:github.com/Vt-mmm/piagent` | Cài latest package platform cho máy cá nhân/sandbox. |
474
474
  | `piagent-update --check` | Báo version hiện tại vs version sẽ lên cho cả ba thành phần; không cài gì. |
475
475
  | `piagent-update` | Full update global một lệnh cho cả máy: Pi host → npm-global helper → Pi package, đúng thứ tự release yêu cầu. |
@@ -14,9 +14,9 @@ Repo này phải chạy được cho nhiều project/domain khác nhau. Vì vậ
14
14
 
15
15
  | Use case | Package source |
16
16
  |---|---|
17
- | Team pinned release | `git:github.com/Vt-mmm/piagent@v1.2.16` |
17
+ | Team pinned release | `git:github.com/Vt-mmm/piagent@v1.2.17` |
18
18
  | Personal/sandbox dev | `git:github.com/Vt-mmm/piagent` |
19
- | Registry distribution | `npm:@piagent/platform@1.2.16` |
19
+ | Registry distribution | `npm:@piagent/platform@1.2.17` |
20
20
  | Enterprise npm (fork under another scope) | `npm:@your-scope/platform@x.y.z` |
21
21
  | Local platform dev | `/path/to/piagent` |
22
22
 
@@ -26,7 +26,7 @@ Latest tiện cho máy cá nhân muốn nhận cập nhật nhanh. Pin tag/commi
26
26
 
27
27
  | Channel | Command | Target | Policy |
28
28
  |---|---|---|---|
29
- | `stable` | `bash scripts/install-global.sh --stable` | Helper release tag resolved to commit SHA, currently `v1.2.16` | Install the Pi package matching the helper. |
29
+ | `stable` | `bash scripts/install-global.sh --stable` | Helper release tag resolved to commit SHA, currently `v1.2.17` | Install the Pi package matching the helper. |
30
30
  | `exact` | `bash scripts/install-global.sh --version vX.Y.Z --resolve-tag` | Requested tag resolved to commit SHA | Pi-package-only rollout, rollback, and incident recovery. |
31
31
  | `dev` | `bash scripts/install-global.sh --dev` | Moving Git source | Personal/sandbox only; do not commit into project settings. |
32
32
  | `local` | `bash scripts/install-global.sh --local` | Current checkout path | Platform development only. |
@@ -53,7 +53,7 @@ Root `package.json` có `pi` manifest trỏ tới:
53
53
  Do đó team có thể:
54
54
 
55
55
  ```bash
56
- pi install git:github.com/Vt-mmm/piagent@v1.2.16
56
+ pi install git:github.com/Vt-mmm/piagent@v1.2.17
57
57
  ```
58
58
 
59
59
  Không cần biết internal folder `packages/piagent-core`. Source không pin chỉ dành cho personal/sandbox như bảng channel ở trên.
@@ -65,12 +65,12 @@ Team nên install global package một lần:
65
65
  ```bash
66
66
  node --version # >= 22.19.0
67
67
  npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.0
68
- npm install -g --ignore-scripts @piagent/platform@1.2.16
68
+ npm install -g --ignore-scripts @piagent/platform@1.2.17
69
69
  piagent-install --stable --dry-run
70
70
  piagent-install --stable
71
71
  ```
72
72
 
73
- `pi install git:github.com/Vt-mmm/piagent@v1.2.16` vẫn hợp lệ nếu chỉ cần cài Pi package. Lệnh đó không tự tạo các binary terminal `piagent-*`; muốn có helper global thì dùng `npm install -g --ignore-scripts @piagent/platform@1.2.16`.
73
+ `pi install git:github.com/Vt-mmm/piagent@v1.2.17` vẫn hợp lệ nếu chỉ cần cài Pi package. Lệnh đó không tự tạo các binary terminal `piagent-*`; muốn có helper global thì dùng `npm install -g --ignore-scripts @piagent/platform@1.2.17`.
74
74
 
75
75
  Support matrix hiện tại: macOS Apple Silicon + Bash và Linux x64 + Bash đã được verify; macOS Intel + Bash và Linux ARM64 + Bash là supported target cần chạy smoke trước rollout; native Windows chưa phải target rollout team; WSL2 experimental. Chi tiết và version runtime nằm trong [release/install policy](release-install-policy.md).
76
76
 
@@ -120,7 +120,7 @@ Nếu muốn commit sẵn `.pi/piagent-profile.json` vào repo hoặc bootstrap
120
120
  ```bash
121
121
  bash scripts/setup.sh /path/to/project \
122
122
  --profile be-readonly-fe \
123
- --package-source git:github.com/Vt-mmm/piagent@v1.2.16 \
123
+ --package-source git:github.com/Vt-mmm/piagent@v1.2.17 \
124
124
  --mcp-preset core \
125
125
  --subagents-preset safe
126
126
  ```
@@ -18,12 +18,12 @@ Support matrix release hiện tại: macOS Apple Silicon + Bash và Linux x64 +
18
18
  ```bash
19
19
  node --version # >= 22.19.0
20
20
  npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.0
21
- npm install -g --ignore-scripts @piagent/platform@1.2.16
21
+ npm install -g --ignore-scripts @piagent/platform@1.2.17
22
22
  piagent-install --stable --dry-run
23
23
  piagent-install --stable
24
24
  ```
25
25
 
26
- Khi seed `.pi/settings.json` cho team/repo cần audit lặp lại, giữ package source dạng pinned tag như `git:github.com/Vt-mmm/piagent@v1.2.16`. Máy cá nhân có thể dùng `git:github.com/Vt-mmm/piagent` để theo latest.
26
+ Khi seed `.pi/settings.json` cho team/repo cần audit lặp lại, giữ package source dạng pinned tag như `git:github.com/Vt-mmm/piagent@v1.2.17`. Máy cá nhân có thể dùng `git:github.com/Vt-mmm/piagent` để theo latest.
27
27
 
28
28
  Nếu đang ở source checkout của platform, dùng helper theo channel để preview trước khi đổi:
29
29
 
@@ -99,7 +99,7 @@ install package once
99
99
 
100
100
  ```bash
101
101
  npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.0
102
- npm install -g --ignore-scripts @piagent/platform@1.2.16
102
+ npm install -g --ignore-scripts @piagent/platform@1.2.17
103
103
  piagent-install --stable --dry-run
104
104
  piagent-install --stable
105
105
  ```
@@ -282,7 +282,7 @@ Không phải daily default. Dùng khi muốn tạo sẵn `.pi` files cho projec
282
282
  bash /path/to/piagent/scripts/setup.sh /path/to/project \
283
283
  --project-only \
284
284
  --profile auto \
285
- --package-source git:github.com/Vt-mmm/piagent@v1.2.16 \
285
+ --package-source git:github.com/Vt-mmm/piagent@v1.2.17 \
286
286
  --mcp-preset core \
287
287
  --subagents-preset safe
288
288
  ```
@@ -971,8 +971,8 @@ Watchdog là optional adversarial reviewer ở cuối turn, không bật mặc
971
971
 
972
972
  | Command | Dùng để |
973
973
  |---|---|
974
- | `npm install -g --ignore-scripts @piagent/platform@1.2.16` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
975
- | `pi install git:github.com/Vt-mmm/piagent@v1.2.16` | Install pinned release cho reproducible team setup. |
974
+ | `npm install -g --ignore-scripts @piagent/platform@1.2.17` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
975
+ | `pi install git:github.com/Vt-mmm/piagent@v1.2.17` | Install pinned release cho reproducible team setup. |
976
976
  | `pi install git:github.com/Vt-mmm/piagent` | Install latest platform package cho máy cá nhân/sandbox. |
977
977
  | Cài exact Pi host của release, rồi `npm install -g --ignore-scripts @piagent/platform@X.Y.Z` và `piagent-install --stable` | Full update: đồng bộ host, terminal helper và Pi package. Mỗi release pin một Pi host chính xác; lấy đúng version của release đang cài trong [release/install policy](release-install-policy.md). |
978
978
  | Cài exact Pi host ghi trong release cũ, rồi helper `vPREVIOUS` và `piagent-install --stable` | Full rollback; đánh giá lại dependency findings của host cũ trước khi hạ version. |
@@ -1083,7 +1083,7 @@ Mở lại Pi session sau khi install.
1083
1083
  Cài lại terminal helper đúng release rồi kiểm tra `PATH`:
1084
1084
 
1085
1085
  ```bash
1086
- npm install -g --ignore-scripts @piagent/platform@1.2.16
1086
+ npm install -g --ignore-scripts @piagent/platform@1.2.17
1087
1087
  command -v piagent-install
1088
1088
  ```
1089
1089
 
@@ -10,7 +10,7 @@ This file is the canonical install, update, rollback, and release checklist. Oth
10
10
 
11
11
  All supported environments require Node.js `>=22.19.0` and Pi Coding Agent `0.82.0`. The Pi host is installed as a Node CLI; Pi Agent Platform still defines its own release matrix because the terminal helpers and shell policy rely on Bash/POSIX behavior.
12
12
 
13
- | Surface | Status for v1.2.16 | Rollout guidance |
13
+ | Surface | Status for v1.2.17 | Rollout guidance |
14
14
  |---|---|---|
15
15
  | macOS Apple Silicon (`darwin/arm64`) + Bash | Verified for this release. | Safe default for team rollout after normal project smoke tests. |
16
16
  | Linux x64 + Bash | Verified in GitHub Actions. | Safe default for CI/server usage after normal project smoke tests. |
@@ -33,7 +33,7 @@ These three components are versioned independently. A full install, update, or r
33
33
 
34
34
  | Channel | Source shape | Mutability | Use when |
35
35
  |---|---|---:|---|
36
- | `stable` | `git:github.com/Vt-mmm/piagent@<resolved-commit-sha>` from `v1.2.16` | Fixed after resolution | Default for team rollout. |
36
+ | `stable` | `git:github.com/Vt-mmm/piagent@<resolved-commit-sha>` from `v1.2.17` | Fixed after resolution | Default for team rollout. |
37
37
  | `exact` | Tag, reviewed commit, or a tag resolved with `--resolve-tag` | Fixed when using a commit SHA | Pi-package-only roll forward, rollback, or reproduction. |
38
38
  | `dev` | `git:github.com/Vt-mmm/piagent` | Moving | Personal machine or sandbox only. |
39
39
  | `local` | `/path/to/piagent` | Local workspace | Platform development and dry-run validation. |
@@ -53,7 +53,7 @@ Use this flow when the team needs both terminal commands and the Pi package:
53
53
  ```bash
54
54
  node --version # >= 22.19.0
55
55
  npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.0
56
- npm install -g --ignore-scripts @piagent/platform@1.2.16
56
+ npm install -g --ignore-scripts @piagent/platform@1.2.17
57
57
  piagent-install --stable --dry-run
58
58
  piagent-install --stable
59
59
  ```
@@ -61,8 +61,8 @@ piagent-install --stable
61
61
  The stable preview and apply output includes:
62
62
 
63
63
  ```text
64
- currentRelease: v1.2.16 (helper package version)
65
- tag: v1.2.16
64
+ currentRelease: v1.2.17 (helper package version)
65
+ tag: v1.2.17
66
66
  resolvedCommit: <40-char-sha>
67
67
  source: git:github.com/Vt-mmm/piagent@<40-char-sha>
68
68
  ```
@@ -79,7 +79,7 @@ bash scripts/install-global.sh --stable
79
79
  Use this only when terminal commands are not needed:
80
80
 
81
81
  ```bash
82
- pi install git:github.com/Vt-mmm/piagent@v1.2.16
82
+ pi install git:github.com/Vt-mmm/piagent@v1.2.17
83
83
  ```
84
84
 
85
85
  Direct `pi install` does not create `piagent-*` commands on `PATH`.
@@ -22,7 +22,7 @@ This document covers the packaged guard, project profiles, capability locks, ins
22
22
  - The operator, operating-system account, Pi host, and explicitly trusted project repository are trusted to execute code.
23
23
  - Project-local Pi resources are loaded only after Pi project trust or an explicit operator override.
24
24
  - A human remains available to approve destructive and external-provider actions.
25
- - Supported release verification covers macOS Apple Silicon + Bash, Linux x64 + Bash, Node.js `>=22.19.0`, and the exact Pi host version declared by the release. macOS Intel + Bash and Linux ARM64 + Bash are supported targets that need local smoke verification before broad rollout. Native Windows is not a team-rollout target for v1.2.16, and WSL2 is experimental/unverified.
25
+ - Supported release verification covers macOS Apple Silicon + Bash, Linux x64 + Bash, Node.js `>=22.19.0`, and the exact Pi host version declared by the release. macOS Intel + Bash and Linux ARM64 + Bash are supported targets that need local smoke verification before broad rollout. Native Windows is not a team-rollout target for v1.2.17, and WSL2 is experimental/unverified.
26
26
  - Registry, GitHub, model-provider, MCP-provider, and Vercel controls are external dependencies. Their account security and platform guarantees are not replaced by this repository.
27
27
 
28
28
  ## Threat actors and failure modes
@@ -9,7 +9,7 @@ Một thành viên mới không cần biết local path của maintainer. Luồn
9
9
  ```bash
10
10
  node --version # >= 22.19.0
11
11
  npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.0
12
- npm install -g --ignore-scripts @piagent/platform@1.2.16
12
+ npm install -g --ignore-scripts @piagent/platform@1.2.17
13
13
  piagent-install --stable
14
14
  cd /path/to/project
15
15
  pi
@@ -43,7 +43,7 @@ Mặc định team dùng stable helper:
43
43
  ```bash
44
44
  node --version # >= 22.19.0
45
45
  npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.82.0
46
- npm install -g --ignore-scripts @piagent/platform@1.2.16
46
+ npm install -g --ignore-scripts @piagent/platform@1.2.17
47
47
  piagent-install --stable --dry-run
48
48
  piagent-install --stable
49
49
  ```
@@ -25,23 +25,25 @@ Site là nhiều trang tĩnh, mỗi topic một trang, sinh ra từ một shell
25
25
 
26
26
  ```text
27
27
  docs-site/
28
- content/<slug>.html # nội dung riêng của từng trang, không có header/sidebar/footer
28
+ content/<slug>.html # source tiếng Việt; URL giữ ở /<slug>
29
+ content/en/<slug>.html # source English; URL ở /en/<slug>
29
30
  assets/docs.css # style dùng chung
30
31
  assets/docs.js # sidebar filter, TOC, active-section, copy button
31
- <slug>.html # output đã generate, được commit
32
+ <slug>.html # output VI đã generate, được commit
33
+ en/<slug>.html # output EN đã generate, được commit
32
34
  vercel.json
33
35
  scripts/build-docs-site.mjs
34
36
  ```
35
37
 
36
- Sidebar chia theo bốn nhóm — Get started, Build, MCP, Operate. Thứ tự nhóm và thứ tự trang nằm trong hằng `NAV` của `scripts/build-docs-site.mjs`; đó cũng là thứ tự của link prev/next ở cuối mỗi trang. Thêm một trang = thêm `docs-site/content/<slug>.html` + một entry trong `NAV`, rồi build lại.
38
+ Sidebar chia theo bốn nhóm — Get started, Build, MCP, Operate. Thứ tự nhóm và thứ tự trang nằm trong hằng `NAV` của `scripts/build-docs-site.mjs`; metadata English nằm trong `EN_PAGE_COPY`. Đây cũng là thứ tự của link prev/next ở cuối mỗi trang. Thêm một trang = thêm đủ fragment VI/EN, thêm metadata vào `NAV` và `EN_PAGE_COPY`, rồi build lại. Root URL giữ VI để không gãy link cũ; EN dùng prefix `/en`. Mỗi cặp có canonical, `hreflang` và language switch giữ nguyên topic.
37
39
 
38
40
  ```bash
39
41
  npm run site:build
40
42
  ```
41
43
 
42
- Output HTML được commit, vì Vercel serve file tĩnh và không có build step. `npm run verify` chạy `build-docs-site.mjs --check`, fail khi output đã commit không còn khớp source — cùng cách `catalog/capabilities.json` đang dùng. Không sửa tay `docs-site/<slug>.html`; sửa fragment trong `content/` hoặc sửa shell trong script.
44
+ Output HTML được commit, vì Vercel serve file tĩnh và không có build step. `npm run verify` chạy `build-docs-site.mjs --check`, fail khi output đã commit không còn khớp source — cùng cách `catalog/capabilities.json` đang dùng. Không sửa tay `docs-site/<slug>.html` hoặc `docs-site/en/<slug>.html`; sửa fragment trong `content/` hoặc sửa shell trong script.
43
45
 
44
- Version badge xuất hiện trên mọi trang, nên `npm run release:identity` kiểm tra tất cả `docs-site/*.html` chứ không riêng `index.html`.
46
+ Version badge xuất hiện trên mọi trang, nên `npm run release:identity` kiểm tra recursive toàn bộ generated VI/EN pages chứ không riêng `index.html`.
45
47
 
46
48
  ## Production promotion policy
47
49
 
@@ -1,5 +1,5 @@
1
1
  <!doctype html>
2
- <html lang="vi">
2
+ <html lang="vi" data-copy-success="Đã lấy" data-copy-fallback="Chọn lệnh">
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
@@ -7,6 +7,9 @@
7
7
  <meta name="description" content="Repo này không nhét business logic vào core. Core chỉ giữ policy, prompts, guard, skills và scripts dùng lại được." />
8
8
  <meta name="theme-color" content="#050505" />
9
9
  <link rel="canonical" href="https://piagent.io.vn/architecture" />
10
+ <link rel="alternate" hreflang="vi" href="https://piagent.io.vn/architecture" />
11
+ <link rel="alternate" hreflang="en" href="https://piagent.io.vn/en/architecture" />
12
+ <link rel="alternate" hreflang="x-default" href="https://piagent.io.vn/architecture" />
10
13
  <link rel="icon" href="/favicon.svg" type="image/svg+xml" />
11
14
  <meta property="og:title" content="Kiến trúc repo · Pi Agent Platform Docs" />
12
15
  <meta property="og:description" content="Repo này không nhét business logic vào core. Core chỉ giữ policy, prompts, guard, skills và scripts dùng lại được." />
@@ -27,8 +30,11 @@
27
30
  <span>Pi Agent Platform</span>
28
31
  </a>
29
32
  <div class="top-actions">
30
- <span class="pill"><span class="pill-dot"></span>v1.2.16 docs · VI</span>
31
- <a class="button" href="https://github.com/Vt-mmm/piagent/blob/main/docs/en/README.md" lang="en" target="_blank" rel="noopener noreferrer">English docs</a>
33
+ <span class="pill"><span class="pill-dot"></span>v1.2.17 docs · VI</span>
34
+ <nav class="language-switch" aria-label="Ngôn ngữ">
35
+ <a class="language-option current" href="/architecture" hreflang="vi" lang="vi" aria-current="true">VI</a>
36
+ <a class="language-option" href="/en/architecture" hreflang="en" lang="en">EN</a>
37
+ </nav>
32
38
  <a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
33
39
  <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
34
40
  <path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
@@ -36,7 +42,7 @@
36
42
  GitHub
37
43
  </a>
38
44
  <button class="button mobile-menu" type="button" data-menu>Lộ trình</button>
39
- <a class="button" href="/commands">Commands</a>
45
+ <a class="button top-command-link" href="/commands">Commands</a>
40
46
  </div>
41
47
  </header>
42
48
 
@@ -159,10 +165,10 @@
159
165
 
160
166
  <footer class="footer">
161
167
  <p>Pi Agent Platform docs · static HTML · governed agent workflow</p>
162
- <div class="footer-links" aria-label="External links">
168
+ <div class="footer-links" aria-label="Liên kết ngoài">
163
169
  <a href="https://piagent.io.vn" target="_blank" rel="noopener noreferrer">piagent.io.vn</a>
164
170
  <a href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer">GitHub repository</a>
165
- <a href="https://github.com/Vt-mmm/piagent/blob/main/docs/en/README.md" lang="en" target="_blank" rel="noopener noreferrer">English docs</a>
171
+ <a href="/en/architecture" hreflang="en">English</a>
166
172
  <a href="https://www.facebook.com/vinhtam0544/" target="_blank" rel="noopener noreferrer">Facebook profile</a>
167
173
  </div>
168
174
  </footer>
@@ -114,6 +114,37 @@ pre {
114
114
  gap: 10px;
115
115
  }
116
116
 
117
+ .language-switch {
118
+ display: grid;
119
+ grid-template-columns: repeat(2, 34px);
120
+ height: 34px;
121
+ padding: 3px;
122
+ border: 1px solid rgba(255, 255, 255, 0.12);
123
+ border-radius: 6px;
124
+ background: rgba(255, 255, 255, 0.035);
125
+ }
126
+
127
+ .language-option {
128
+ display: grid;
129
+ place-items: center;
130
+ min-width: 0;
131
+ border-radius: 3px;
132
+ color: var(--muted);
133
+ font-family: "JetBrains Mono", ui-monospace, monospace;
134
+ font-size: 11px;
135
+ font-weight: 700;
136
+ }
137
+
138
+ .language-option:hover,
139
+ .language-option:focus-visible {
140
+ color: var(--text);
141
+ }
142
+
143
+ .language-option.current {
144
+ background: var(--accent);
145
+ color: #111300;
146
+ }
147
+
117
148
  .pill {
118
149
  display: inline-flex;
119
150
  align-items: center;
@@ -762,6 +793,10 @@ tr:last-child td {
762
793
  display: none;
763
794
  }
764
795
 
796
+ .top-command-link {
797
+ display: none;
798
+ }
799
+
765
800
  .grid.cols-2,
766
801
  .grid.cols-3,
767
802
  .split {
@@ -784,6 +819,12 @@ tr:last-child td {
784
819
  }
785
820
  }
786
821
 
822
+ @media (max-width: 520px) {
823
+ .brand span:last-child {
824
+ display: none;
825
+ }
826
+ }
827
+
787
828
  @media (prefers-reduced-motion: reduce) {
788
829
  html {
789
830
  scroll-behavior: auto;
@@ -1397,7 +1438,7 @@ h3[id] {
1397
1438
  background: var(--panel-strong);
1398
1439
  }
1399
1440
 
1400
- @media (max-width: 1180px) {
1441
+ @media (min-width: 1021px) and (max-width: 1180px) {
1401
1442
  .layout.with-toc {
1402
1443
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
1403
1444
  }
@@ -1406,3 +1447,13 @@ h3[id] {
1406
1447
  display: none;
1407
1448
  }
1408
1449
  }
1450
+
1451
+ @media (max-width: 1020px) {
1452
+ .layout.with-toc {
1453
+ grid-template-columns: minmax(0, 1fr);
1454
+ }
1455
+
1456
+ .toc {
1457
+ display: none;
1458
+ }
1459
+ }
@@ -71,11 +71,13 @@ document.querySelectorAll("[data-clip]").forEach((button) => {
71
71
  button.addEventListener("click", async () => {
72
72
  const text = button.getAttribute("data-clip") || "";
73
73
  const original = button.textContent;
74
+ const copySuccess = document.documentElement.dataset.copySuccess || "Copied";
75
+ const copyFallback = document.documentElement.dataset.copyFallback || "Select command";
74
76
  try {
75
77
  await navigator.clipboard.writeText(text);
76
- button.textContent = "Đã lấy";
78
+ button.textContent = copySuccess;
77
79
  } catch {
78
- button.textContent = "Chọn lệnh";
80
+ button.textContent = copyFallback;
79
81
  }
80
82
  setTimeout(() => {
81
83
  button.textContent = original;
@@ -1,5 +1,5 @@
1
1
  <!doctype html>
2
- <html lang="vi">
2
+ <html lang="vi" data-copy-success="Đã lấy" data-copy-fallback="Chọn lệnh">
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
@@ -7,6 +7,9 @@
7
7
  <meta name="description" content="Production benchmark so sánh Piagent với surface codex-cli trên cùng model, cùng thinking level, 18 nhóm bài và 108 session được chấm tự động." />
8
8
  <meta name="theme-color" content="#050505" />
9
9
  <link rel="canonical" href="https://piagent.io.vn/benchmark" />
10
+ <link rel="alternate" hreflang="vi" href="https://piagent.io.vn/benchmark" />
11
+ <link rel="alternate" hreflang="en" href="https://piagent.io.vn/en/benchmark" />
12
+ <link rel="alternate" hreflang="x-default" href="https://piagent.io.vn/benchmark" />
10
13
  <link rel="icon" href="/favicon.svg" type="image/svg+xml" />
11
14
  <meta property="og:title" content="Bằng chứng chất lượng và hiệu suất · Pi Agent Platform Docs" />
12
15
  <meta property="og:description" content="Production benchmark so sánh Piagent với surface codex-cli trên cùng model, cùng thinking level, 18 nhóm bài và 108 session được chấm tự động." />
@@ -27,8 +30,11 @@
27
30
  <span>Pi Agent Platform</span>
28
31
  </a>
29
32
  <div class="top-actions">
30
- <span class="pill"><span class="pill-dot"></span>v1.2.16 docs · VI</span>
31
- <a class="button" href="https://github.com/Vt-mmm/piagent/blob/main/docs/en/README.md" lang="en" target="_blank" rel="noopener noreferrer">English docs</a>
33
+ <span class="pill"><span class="pill-dot"></span>v1.2.17 docs · VI</span>
34
+ <nav class="language-switch" aria-label="Ngôn ngữ">
35
+ <a class="language-option current" href="/benchmark" hreflang="vi" lang="vi" aria-current="true">VI</a>
36
+ <a class="language-option" href="/en/benchmark" hreflang="en" lang="en">EN</a>
37
+ </nav>
32
38
  <a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
33
39
  <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
34
40
  <path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
@@ -36,7 +42,7 @@
36
42
  GitHub
37
43
  </a>
38
44
  <button class="button mobile-menu" type="button" data-menu>Lộ trình</button>
39
- <a class="button" href="/commands">Commands</a>
45
+ <a class="button top-command-link" href="/commands">Commands</a>
40
46
  </div>
41
47
  </header>
42
48
 
@@ -322,10 +328,10 @@
322
328
 
323
329
  <footer class="footer">
324
330
  <p>Pi Agent Platform docs · static HTML · governed agent workflow</p>
325
- <div class="footer-links" aria-label="External links">
331
+ <div class="footer-links" aria-label="Liên kết ngoài">
326
332
  <a href="https://piagent.io.vn" target="_blank" rel="noopener noreferrer">piagent.io.vn</a>
327
333
  <a href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer">GitHub repository</a>
328
- <a href="https://github.com/Vt-mmm/piagent/blob/main/docs/en/README.md" lang="en" target="_blank" rel="noopener noreferrer">English docs</a>
334
+ <a href="/en/benchmark" hreflang="en">English</a>
329
335
  <a href="https://www.facebook.com/vinhtam0544/" target="_blank" rel="noopener noreferrer">Facebook profile</a>
330
336
  </div>
331
337
  </footer>
@@ -1,5 +1,5 @@
1
1
  <!doctype html>
2
- <html lang="vi">
2
+ <html lang="vi" data-copy-success="Đã lấy" data-copy-fallback="Chọn lệnh">
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
@@ -7,6 +7,9 @@
7
7
  <meta name="description" content="Ưu tiên dùng slash command vì mỗi command đã gói sẵn policy và flow. Thành viên không cần nhớ lại quy trình trong prompt." />
8
8
  <meta name="theme-color" content="#050505" />
9
9
  <link rel="canonical" href="https://piagent.io.vn/commands" />
10
+ <link rel="alternate" hreflang="vi" href="https://piagent.io.vn/commands" />
11
+ <link rel="alternate" hreflang="en" href="https://piagent.io.vn/en/commands" />
12
+ <link rel="alternate" hreflang="x-default" href="https://piagent.io.vn/commands" />
10
13
  <link rel="icon" href="/favicon.svg" type="image/svg+xml" />
11
14
  <meta property="og:title" content="Command ngắn, rõ, ít token burn · Pi Agent Platform Docs" />
12
15
  <meta property="og:description" content="Ưu tiên dùng slash command vì mỗi command đã gói sẵn policy và flow. Thành viên không cần nhớ lại quy trình trong prompt." />
@@ -27,8 +30,11 @@
27
30
  <span>Pi Agent Platform</span>
28
31
  </a>
29
32
  <div class="top-actions">
30
- <span class="pill"><span class="pill-dot"></span>v1.2.16 docs · VI</span>
31
- <a class="button" href="https://github.com/Vt-mmm/piagent/blob/main/docs/en/README.md" lang="en" target="_blank" rel="noopener noreferrer">English docs</a>
33
+ <span class="pill"><span class="pill-dot"></span>v1.2.17 docs · VI</span>
34
+ <nav class="language-switch" aria-label="Ngôn ngữ">
35
+ <a class="language-option current" href="/commands" hreflang="vi" lang="vi" aria-current="true">VI</a>
36
+ <a class="language-option" href="/en/commands" hreflang="en" lang="en">EN</a>
37
+ </nav>
32
38
  <a class="button social" href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer" aria-label="Mở GitHub repository">
33
39
  <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
34
40
  <path d="M7 17 17 7M9 7h8v8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
@@ -36,7 +42,7 @@
36
42
  GitHub
37
43
  </a>
38
44
  <button class="button mobile-menu" type="button" data-menu>Lộ trình</button>
39
- <a class="button" href="/commands">Commands</a>
45
+ <a class="button top-command-link" href="/commands">Commands</a>
40
46
  </div>
41
47
  </header>
42
48
 
@@ -192,10 +198,10 @@
192
198
 
193
199
  <footer class="footer">
194
200
  <p>Pi Agent Platform docs · static HTML · governed agent workflow</p>
195
- <div class="footer-links" aria-label="External links">
201
+ <div class="footer-links" aria-label="Liên kết ngoài">
196
202
  <a href="https://piagent.io.vn" target="_blank" rel="noopener noreferrer">piagent.io.vn</a>
197
203
  <a href="https://github.com/Vt-mmm/piagent" target="_blank" rel="noopener noreferrer">GitHub repository</a>
198
- <a href="https://github.com/Vt-mmm/piagent/blob/main/docs/en/README.md" lang="en" target="_blank" rel="noopener noreferrer">English docs</a>
204
+ <a href="/en/commands" hreflang="en">English</a>
199
205
  <a href="https://www.facebook.com/vinhtam0544/" target="_blank" rel="noopener noreferrer">Facebook profile</a>
200
206
  </div>
201
207
  </footer>
@@ -0,0 +1,33 @@
1
+ <section class="section">
2
+ <div class="callout">
3
+ <strong>Dependency direction is enforced by code.</strong>
4
+ <p><span class="inline-code">architecture/layers.json</span> is machine-readable policy. <span class="inline-code">npm run architecture:check</span> blocks reverse dependencies and files that exceed their size budget.</p>
5
+ </div>
6
+ <div class="grid cols-3">
7
+ <article class="card"><h3 id="composition">Composition</h3><p><span class="inline-code">piagent-guard.ts</span> owns wiring, registration order, and shared runtime state. Feature algorithms do not belong in this file.</p></article>
8
+ <article class="card"><h3 id="runtime-adapters">Runtime adapters</h3><p><span class="inline-code">packages/piagent-core/runtime</span> owns Pi hooks, commands, tools, session UI, usage, log compaction, and workflow input routing.</p></article>
9
+ <article class="card"><h3 id="core-services">Core services</h3><p>Policy, task, context, and state modules return structured decisions. Core services do not import runtime adapters or the Pi composition root.</p></article>
10
+ <article class="card"><h3 id="integrations">Integrations</h3><p><span class="inline-code">mcp/</span>, <span class="inline-code">capabilities/</span>, and <span class="inline-code">security/</span> have explicit ownership and do not embed task workflow logic.</p></article>
11
+ <article class="card"><h3 id="entrypoints">Entrypoints</h3><p><span class="inline-code">scripts/</span> parses CLI arguments and calls use cases. Metrics, policy, and state transitions are not duplicated in CLI code.</p></article>
12
+ <article class="card"><h3 id="product-assets">Product assets</h3><p><span class="inline-code">prompts/</span>, <span class="inline-code">skills/</span>, <span class="inline-code">subagents/</span>, <span class="inline-code">adapters/</span>, <span class="inline-code">packs/</span>, and <span class="inline-code">schemas/</span> are declarative assets.</p></article>
13
+ </div>
14
+ </section>
15
+
16
+ <section class="section">
17
+ <div class="section-head">
18
+ <p class="eyebrow">Ownership</p>
19
+ <h2 id="state-ownership">Each state has one source of truth</h2>
20
+ <p>Project profiles and locks may be committed. Task evidence, telemetry, traces, captures, and session history are local state. Derived indexes carry a policy digest and remain rebuildable.</p>
21
+ </div>
22
+ <div class="table-wrap">
23
+ <table>
24
+ <thead><tr><th>State</th><th>Owner</th><th>Location</th><th>Committed</th></tr></thead>
25
+ <tbody>
26
+ <tr><td>Project profile and lock</td><td>Project</td><td><span class="inline-code">.pi/piagent-profile*.json</span></td><td>Yes</td></tr>
27
+ <tr><td>Task, trace, telemetry, capture</td><td>Runtime</td><td><span class="inline-code">.pi/piagent-state/</span></td><td>No</td></tr>
28
+ <tr><td>Session history</td><td>Pi</td><td>Pi session store</td><td>No</td></tr>
29
+ <tr><td>Shared instructions</td><td>Project</td><td><span class="inline-code">AGENTS.md</span>, project docs</td><td>Yes</td></tr>
30
+ </tbody>
31
+ </table>
32
+ </div>
33
+ </section>