@piagent/platform 1.41.0 → 1.42.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 (125) hide show
  1. package/CHANGELOG.md +1020 -2038
  2. package/CONTRIBUTING.md +2 -0
  3. package/README.md +128 -325
  4. package/README.vi.md +149 -143
  5. package/docs/command-reference-vietnamese.md +2 -2
  6. package/docs/distribution-standard.md +6 -6
  7. package/docs/languages.json +2 -2
  8. package/docs/operator-manual-vietnamese.md +7 -7
  9. package/docs/publishing-for-teams.md +2 -0
  10. package/docs/release-install-policy.md +3 -3
  11. package/docs/team-onboarding.md +2 -2
  12. package/docs-site/architecture.html +71 -63
  13. package/docs-site/assets/docs.css +2736 -1030
  14. package/docs-site/assets/docs.js +451 -43
  15. package/docs-site/assets/og.png +0 -0
  16. package/docs-site/assets/piagent-logo.svg +9 -31
  17. package/docs-site/assets/search-en.json +1 -0
  18. package/docs-site/assets/search-vi.json +1 -0
  19. package/docs-site/benchmark.html +71 -63
  20. package/docs-site/commands.html +72 -64
  21. package/docs-site/content/en/index.html +220 -131
  22. package/docs-site/content/en/quickstart.html +74 -90
  23. package/docs-site/content/en/update.html +80 -0
  24. package/docs-site/content/en/whats-new.html +1 -684
  25. package/docs-site/content/index.html +220 -131
  26. package/docs-site/content/quickstart.html +73 -108
  27. package/docs-site/content/update.html +80 -0
  28. package/docs-site/content/whats-new.html +1 -684
  29. package/docs-site/context-engine.html +73 -65
  30. package/docs-site/ecosystem.html +73 -65
  31. package/docs-site/en/architecture.html +67 -59
  32. package/docs-site/en/benchmark.html +67 -59
  33. package/docs-site/en/commands.html +68 -60
  34. package/docs-site/en/context-engine.html +68 -60
  35. package/docs-site/en/ecosystem.html +68 -60
  36. package/docs-site/en/index.html +281 -220
  37. package/docs-site/en/mcp-approval.html +67 -59
  38. package/docs-site/en/mcp-auth.html +67 -59
  39. package/docs-site/en/mcp-servers.html +68 -60
  40. package/docs-site/en/mcp.html +64 -56
  41. package/docs-site/en/permissions.html +68 -60
  42. package/docs-site/en/profiles.html +68 -60
  43. package/docs-site/en/quickstart.html +142 -150
  44. package/docs-site/en/runtime.html +67 -59
  45. package/docs-site/en/scope.html +68 -60
  46. package/docs-site/en/security.html +64 -56
  47. package/docs-site/en/team.html +67 -59
  48. package/docs-site/en/update.html +228 -0
  49. package/docs-site/en/whats-new.html +1612 -725
  50. package/docs-site/en/windows.html +71 -63
  51. package/docs-site/en/workflows.html +68 -60
  52. package/docs-site/favicon.svg +9 -14
  53. package/docs-site/index.html +281 -220
  54. package/docs-site/mcp-approval.html +70 -62
  55. package/docs-site/mcp-auth.html +70 -62
  56. package/docs-site/mcp-servers.html +71 -63
  57. package/docs-site/mcp.html +70 -62
  58. package/docs-site/permissions.html +72 -64
  59. package/docs-site/profiles.html +72 -64
  60. package/docs-site/quickstart.html +145 -172
  61. package/docs-site/releases.json +4485 -0
  62. package/docs-site/runtime.html +73 -65
  63. package/docs-site/scope.html +73 -65
  64. package/docs-site/security.html +73 -65
  65. package/docs-site/team.html +71 -63
  66. package/docs-site/update.html +228 -0
  67. package/docs-site/whats-new.html +1616 -729
  68. package/docs-site/windows.html +75 -67
  69. package/docs-site/workflows.html +73 -65
  70. package/evals/private-holdout-v1/public-exposure.v2.json +1 -1
  71. package/package.json +1 -1
  72. package/packages/piagent-core/managed/dist/workspace/manifest.json +1 -1
  73. package/packages/piagent-core/managed/dist/workspace/worker.mjs +1 -1
  74. package/packages/piagent-core/package.json +1 -1
  75. package/packages/piagent-core/security/workspace-file-reader.ts +3 -1
  76. package/packages/piagent-webui/dist/client/assets/ActivityPanel-DRAiHliI.js +1 -0
  77. package/packages/piagent-webui/dist/client/assets/App-JMuP_9-r.js +5 -0
  78. package/packages/piagent-webui/dist/client/assets/GatewayApp-awcOLVTi.js +93 -0
  79. package/packages/piagent-webui/dist/client/assets/InspectionApp-DtDc9NxN.js +1 -0
  80. package/packages/piagent-webui/dist/client/assets/LineReview-DZ9ez8kO.js +3 -0
  81. package/packages/piagent-webui/dist/client/assets/{MarkdownMessage-DeLo-xiz.js → MarkdownMessage-D7bbIWJe.js} +2 -2
  82. package/packages/piagent-webui/dist/client/assets/SessionAgentWorkspace-DLwK12hX.js +1 -0
  83. package/packages/piagent-webui/dist/client/assets/SessionInspectorDrawer-CsPNI6aU.js +2 -0
  84. package/packages/piagent-webui/dist/client/assets/SettingsNavigation-CM0s3QUC.js +3 -0
  85. package/packages/piagent-webui/dist/client/assets/SettingsPage-Cr6M2FVg.js +1 -0
  86. package/packages/piagent-webui/dist/client/assets/TerminalPanel-A78JVp4e.js +2 -0
  87. package/packages/piagent-webui/dist/client/assets/{TerminalView-r9rG24IO.js → TerminalView-CR4TO5f1.js} +3 -3
  88. package/packages/piagent-webui/dist/client/assets/WorkspaceCodeEditor-DPOp-ZoD.js +2 -0
  89. package/packages/piagent-webui/dist/client/assets/WorkspaceExplorer-H8Ogln3d.js +5 -0
  90. package/packages/piagent-webui/dist/client/assets/WorkspaceQuickOpen-vQ5DqfJl.js +1 -0
  91. package/packages/piagent-webui/dist/client/assets/api-BUjrtT1B.js +1 -0
  92. package/packages/piagent-webui/dist/client/assets/composer-drafts-BtMaVw8W.js +1 -0
  93. package/packages/piagent-webui/dist/client/assets/index-Dqb2hNan.css +1 -0
  94. package/packages/piagent-webui/dist/client/assets/index-qi6mjvTy.js +37 -0
  95. package/packages/piagent-webui/dist/client/assets/latest-request-DXcYQW86.js +1 -0
  96. package/packages/piagent-webui/dist/client/assets/tab-close-DHDqCxTL.js +1 -0
  97. package/packages/piagent-webui/dist/client/assets/terminal-transport-Dk5pYNX5.js +1 -0
  98. package/packages/piagent-webui/dist/client/assets/transcript-view-model-BNGQCkzY.js +3 -0
  99. package/packages/piagent-webui/dist/client/assets/ui-preferences-Dy4qeODT.js +1 -0
  100. package/packages/piagent-webui/dist/client/assets/vendor-CA5pzJiI.js +136 -0
  101. package/packages/piagent-webui/dist/client/assets/view-model-CWNiS4JN.js +1 -0
  102. package/packages/piagent-webui/dist/client/assets/workspace-navigation-C8GtShbg.js +1 -0
  103. package/packages/piagent-webui/dist/client/index.html +4 -9
  104. package/packages/piagent-webui/gateway/signed-session-journal.ts +16 -6
  105. package/packages/piagent-webui/server/loopback-server.ts +19 -5
  106. package/packages/piagent-webui/server/static-bundle.ts +10 -2
  107. package/scripts/build-docs-site.mjs +205 -348
  108. package/scripts/check-public-wording.mjs +2 -1
  109. package/scripts/docs-site-icons.mjs +84 -0
  110. package/scripts/docs-site-nav.mjs +302 -0
  111. package/scripts/docs-site-releases.mjs +227 -0
  112. package/scripts/verify-local.sh +17 -1
  113. package/packages/piagent-webui/dist/client/assets/Alert-DGWhP2MM.js +0 -1
  114. package/packages/piagent-webui/dist/client/assets/Button-QItfZUNj.js +0 -1
  115. package/packages/piagent-webui/dist/client/assets/DialogTitle-CyaFPaiW.js +0 -3
  116. package/packages/piagent-webui/dist/client/assets/TerminalPanel-BG-DP_qm.js +0 -2
  117. package/packages/piagent-webui/dist/client/assets/Typography-B9om7Evq.js +0 -1
  118. package/packages/piagent-webui/dist/client/assets/WorkspaceCodeEditor-BnqaR3pK.js +0 -2
  119. package/packages/piagent-webui/dist/client/assets/WorkspaceExplorer-BIxwiGtl.js +0 -5
  120. package/packages/piagent-webui/dist/client/assets/WorkspaceQuickOpen-CK3dILhQ.js +0 -1
  121. package/packages/piagent-webui/dist/client/assets/index-DBUTrEXi.css +0 -1
  122. package/packages/piagent-webui/dist/client/assets/index-rlyRccut.js +0 -102
  123. package/packages/piagent-webui/dist/client/assets/tab-close-BoJRyBO_.js +0 -1
  124. package/packages/piagent-webui/dist/client/assets/ui-preferences-BO3AV7QE.js +0 -10
  125. package/packages/piagent-webui/dist/client/assets/useId-DEefKUAT.js +0 -124
package/CONTRIBUTING.md CHANGED
@@ -54,6 +54,8 @@ Do not weaken an existing test to make a change pass. If a test encodes the wron
54
54
 
55
55
  Update `docs/` only when behavior, setup, commands, architecture, or security posture actually changed. Internal refactors do not need a docs entry.
56
56
 
57
+ The public site at piagent.io.vn is generated. Page bodies live in `docs-site/content/` (Vietnamese) and `docs-site/content/en/` (English); navigation, titles and leads live in `scripts/docs-site-nav.mjs`. Release notes have one source, `docs-site/releases.json`, which renders the Changelog page, the landing page's latest releases and `CHANGELOG.md`. After editing any of them, run `node scripts/build-docs-site.mjs` and preview with `npm run site:preview`.
58
+
57
59
  ## Commits and pull requests
58
60
 
59
61
  - Conventional commit format: `feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `chore:`.
package/README.md CHANGED
@@ -1,396 +1,199 @@
1
- # Pi Agent Platform
1
+ <p align="center">
2
+ <a href="https://piagent.io.vn"><img src="https://piagent.io.vn/assets/piagent-logo.svg" alt="Piagent" width="72" height="72"></a>
3
+ </p>
2
4
 
3
- [Tiếng Việt](README.vi.md)
5
+ <h1 align="center">Pi Agent Platform</h1>
4
6
 
5
- Reusable Pi package for freeform coding chat, guarded tools, project context and a managed main/research/review harness.
7
+ <p align="center"><strong>A coding agent for the whole team, checked at every step.</strong></p>
6
8
 
7
- Public docs: [piagent.io.vn](https://piagent.io.vn)
9
+ <p align="center">
10
+ <a href="https://www.npmjs.com/package/@piagent/platform"><img alt="npm" src="https://img.shields.io/npm/v/@piagent/platform?color=c6f432&labelColor=111114"></a>
11
+ <a href="https://github.com/Vt-mmm/piagent/actions/workflows/verify.yml"><img alt="verify" src="https://github.com/Vt-mmm/piagent/actions/workflows/verify.yml/badge.svg"></a>
12
+ <img alt="node" src="https://img.shields.io/badge/node-%E2%89%A522.19-111114?labelColor=111114">
13
+ <a href="LICENSE"><img alt="license" src="https://img.shields.io/badge/license-MIT-111114?labelColor=111114"></a>
14
+ </p>
15
+
16
+ <p align="center">
17
+ <a href="https://piagent.io.vn/en/">Website</a> ·
18
+ <a href="https://piagent.io.vn/en/quickstart">Install</a> ·
19
+ <a href="https://piagent.io.vn/en/whats-new">Changelog</a> ·
20
+ <a href="https://piagent.io.vn/en/benchmark">Benchmark</a> ·
21
+ <a href="README.vi.md">Tiếng Việt</a>
22
+ </p>
23
+
24
+ <p align="center">
25
+ <img src="https://piagent.io.vn/assets/shots/company-run-done.jpg" alt="Piagent dashboard: a company-mode turn that read, edited and tested the code, with the closing line reporting the check and the review" width="900">
26
+ </p>
27
+
28
+ Piagent is a Pi package that turns a coding agent into something a team can rely on. A **guard** checks every tool call before it runs. In company mode, the team's **Harness** runs the project's checks and has a subagent review the change before a turn is reported done. One **dashboard** serves Terminal and the browser, with your own model account or the company's models through Agent Watch and Agent Studio.
29
+
30
+ ## Why Piagent
31
+
32
+ - **Fails closed.** Protected files (`.env`, keys), permission profiles, oversized files and edits on a stale read are blocked before execution, not explained afterwards.
33
+ - **One approval at a time.** Push, publish, GitHub writes and network commands wait for **Allow once**. Broad staging such as `git add .` asks first too.
34
+ - **Verified turns.** In company mode a turn ends with one line: the check passed on the final code, and the review found or did not find a blocking issue.
35
+ - **Built for long work.** Passing provider errors are retried, Studio updates are waited out, and one turn can run for 24 hours.
36
+ - **Measured.** On the [production benchmark](https://piagent.io.vn/en/benchmark) (v1.6.0, 108 sessions, same model and thinking level) Piagent resolved 54/54 tasks against 48/54 for `codex-cli`, with 61.43% fewer fresh tokens (95% interval: at least 51.60% fewer).
8
37
 
9
38
  ## Install
10
39
 
11
- Node.js `>=22.19.0`. Two commands, run from the project you want to set up:
40
+ Node.js `>=22.19.0`. Run in the project you want to set up:
12
41
 
13
42
  ```bash
14
43
  npm install -g @piagent/platform
15
44
  piagent-setup
16
45
  ```
17
46
 
18
- `piagent-setup` installs the exact Pi Coding Agent host this release pins, installs the Pi package, initializes the current directory, and runs the doctor. It also installs the MCP baseline, the subagents, and — when `herdr` is already on `PATH` — the Herdr Pi integration; pass `--no-mcp`, `--no-subagents`, `--no-herdr`, or `--global-only` to skip those.
47
+ `piagent-setup` installs the exact Pi host this release pins, installs the package, initializes `.pi/`, adds the MCP baseline and subagents, then runs the doctor. Skip extras with `--no-mcp`, `--no-subagents`, `--no-herdr` or `--global-only`. Install [Herdr](https://herdr.dev/docs/install/) first if you want its Pi integration.
19
48
 
20
- If you want [Herdr](https://herdr.dev/docs/install/), install it *before* `piagent-setup`:
49
+ **Windows** — one PowerShell command installs WSL2, Ubuntu, Piagent and Agent Watch; run it again to update:
21
50
 
22
- ```bash
23
- brew install herdr # macOS
24
- curl -fsSL https://herdr.dev/install.sh | sh # macOS or Linux
51
+ ```powershell
52
+ irm https://raw.githubusercontent.com/Vt-mmm/agentwatch/main/windows/setup.ps1 | iex
25
53
  ```
26
54
 
27
- The integration step is skipped with a warning when `herdr` is not on `PATH`, so installing Herdr afterwards means running `piagent-setup --global-only` again. The `curl` form runs a script fetched at install time; `brew` and the [GitHub releases](https://github.com/ogulcancelik/herdr/releases) are the reviewable alternatives. Stable Herdr covers macOS and Linux — Windows builds are preview only, which is outside this platform's rollout matrix either way.
28
-
29
- Because it runs from an installed package, the source it writes into `.pi/settings.json` is `npm:@piagent/platform@<version>` — which means the same thing on a teammate's machine, so the file can be committed.
30
-
31
- | Runtime surface | Team rollout status |
55
+ | Runtime | Status |
32
56
  |---|---|
33
- | macOS Apple Silicon (`darwin/arm64`) + Bash | Verified for this release. |
34
- | Linux x64 + Bash | Verified in CI for this release. |
35
- | macOS Intel (`darwin/x64`) + Bash | Supported target, but run `piagent-doctor` and project smoke tests before wide rollout. |
36
- | Linux ARM64 + Bash | Supported target, but run `piagent-doctor` and project smoke tests before wide rollout. |
37
- | WSL2 (Windows) | The way to run Piagent on Windows: company mode with the bubblewrap sandbox and Agent Watch for Windows, and personal mode. One PowerShell command installs everything; the Linux sandbox is checked in CI. See [Windows](docs/en/windows.md). |
38
- | Native Windows | Preview of personal mode: the guard, path and dashboard tests run in CI on Windows; `piagent-update` does not run there yet. See [Windows](docs/en/windows.md). |
39
-
40
- Pinned step-by-step rollouts, updates, rollback, and the fast-moving `--dev` channel are in [Release and install policy](docs/release-install-policy.md).
57
+ | macOS Apple Silicon | Verified for this release |
58
+ | Linux x64 | Verified in CI |
59
+ | macOS Intel, Linux ARM64 | Supported; run `piagent-doctor` and smoke tests before a wide rollout |
60
+ | Windows (WSL2) | Personal and company mode, bubblewrap sandbox, Agent Watch for Windows ([guide](docs/en/windows.md)) |
61
+ | Native Windows | Preview of personal mode; `piagent-update` does not run there yet |
41
62
 
42
- ## Daily use
63
+ ## Use
43
64
 
44
65
  ```bash
45
- cd /path/to/project
46
- pi
66
+ piagent dashboard # browser, personal mode
67
+ pi # Terminal, personal mode
68
+ piagent studio --web # company mode, after importing the key in Agent Watch
47
69
  ```
48
70
 
49
- Send the request directly in plain language. Since 1.9.0 there is no `/task` or `/workflow` step, no task contract and no projected token-saving threshold.
71
+ Ask in plain language — "fix the pagination bug in /orders and run the tests", "review the current diff, read-only". There is no task contract and no workflow command to learn. Since 1.9.0 the `/workflow`, `/task`, `/fresh`, `/onboard` and `/commands` launchers are retired; start a new session with Pi's `/new`.
50
72
 
51
- For the local macOS team harness, import a managed key through Agent Watch and run `piagent studio` or `piagent studio --web`. Studio chooses the main/research/review routes; the member chooses thinking. Managed sessions have isolated tools and per-run authority. Personal sessions keep their own OAuth and model picker under `pi`.
73
+ ## Update
52
74
 
53
- See [local acceptance and remaining release gates](docs/managed-local-acceptance.md). Existing direct CLI keys remain compatible and do not gain managed harness enforcement.
54
-
55
- ## Uninstall
56
-
57
- `piagent-uninstall` reports what it would remove and exits. It only acts with `--apply`, because it edits Pi settings that other tools also write to.
75
+ The dashboard and Terminal check for a new release every hour and offer **Update now** or **Later**. To update yourself:
58
76
 
59
77
  ```bash
60
- piagent-uninstall
61
- piagent-uninstall --apply
62
- ```
63
-
64
- That removes the Pi package this platform registered. Add-ons, the Pi host, a project's state, and the npm-global helper are each opt-in and separate — `piagent-uninstall --help` lists them.
65
-
66
- Removal targets what is registered in Pi's settings rather than what the current version installs, so a package registered by an older release still comes out. Credentials, trust decisions, sessions, todos, and project memory are never removed, at any flag combination. Files written from a template and then edited — `AGENTS.md`, `.pi/settings.json`, `.pi/project-context.md` and the like — are listed for review rather than deleted.
67
-
68
- ## What it provides
69
-
70
- - Global Pi package with runtime commands, skills, guard extensions, and piagent subagents.
71
- - Freeform turns: a request in plain language is the whole interface. Scouting, planning, review, commits and pull requests are ordinary requests.
72
- - Project onboarding on request: ask the agent to inspect the project read-only and record its context, and it writes `.pi/project-context.md`.
73
- - Runtime profile selection via `/profile`, plus select-style tech stack setup via `/profile setup` and `/profile tech`.
74
- - Runtime usage controls via `/usage`, plus Pi native `/name`, `/new` and `/session`.
75
- - Explicit project memory via `/memory` or `/memory-policy` and `piagent_memory_*` tools.
76
- - Local Context Engine controls via `/context`: incremental code index, hybrid search, token-budgeted packs, bounded current-turn source/test snapshots for automatic tasks, test impact, efficiency telemetry, and semantic compaction. Index storage is owner-only and securely purged when exclusion policy changes; manual packs remain advisory, while current-turn snapshots are freshness-checked and exact edits fail closed on a later mismatch.
77
- - MCP setup helpers for Context7, Chrome DevTools, GitHub, Playwright, and Figma.
78
- - Subagent setup helpers for read-only scouting, planning, implementation, review, and risk challenge.
79
- - Chat image-path intake: paste a screenshot path from the project or a granted `additionalReadRoots` directory and the guard attaches it as `[image1]` before the model sees the prompt.
80
- - Trusted-run wrapper: `piagent-auto` launches Pi with `--approve` for the current run while keeping piagent guardrails active.
81
- - Fresh-task capability routing: `piagent-route` explains a catalog-verified low/medium/high/ultra recommendation; provider execution requires explicit `--execute --yes`, while in-extension auto routing remains fail-closed.
82
- - Runtime policy tools:
83
- - `piagent_permission_status`
84
- - `piagent_exec_policy_check`
85
- - `piagent_context_budget`
86
- - `piagent_tool_policy_check`
87
- - `piagent_usage_snapshot`
88
- - `piagent_context_preflight`
89
- - `piagent_orchestration_policy`
90
- - Context7-ready tech stack manifest and concise `.pi/tech-context/*` snapshots for selected profile roles.
91
- - Accident-brake guardrails for protected and read-only paths, destructive shell commands, external-provider actions, large-file edits, and edits made against a stale read.
92
- - Task contracts and workflow commands were retired in 1.9.0: a session no longer
93
- creates a contract, scope, acceptance receipt or final gate. Task records left
94
- under `.pi/piagent-state/tasks` by earlier releases stay readable as history.
95
- - Adaptive context planning uses Pi-reported model/thinking/context facts to set
96
- a bounded context budget; cited repository-memory hints never replace current
97
- source reads. The parent model stays operator-pinned—there is no automatic
98
- parent routing or solver in this stabilization baseline.
99
- - Execution backends are explicit and fail closed: host execution is the
100
- default, while a requested isolation backend without an installed adapter
101
- blocks mutation instead of silently using the host.
102
- - Bounded owner-only local state with cross-process JSONL rotation and a shared
103
- symlink-safe boundary for task evidence, telemetry, traces, and captures.
104
- - Two-tier one-command benchmark: `core-v1` is a fast paired smoke gate, while
105
- `production-v1` runs 18 generated scenario families across backend, frontend,
106
- data, platform, reliability, and security. It compares Piagent with Raw Pi or
107
- controlled `codex-cli`, grades hidden acceptance/safety/workflow evidence,
108
- reports category/lifecycle/profile bands and 95% token-ratio confidence, and
109
- reads exact JSONL usage plus privacy-safe tool histograms. Production claims
110
- require zero retries; diagnostic retry overrides remain visible and fail the gate.
111
- - `deep-logic-v1` adds seven large, generated-variant families for interacting
112
- state, orchestration, policy, context-graph, stream-recovery,
113
- transactional-config, and exact temporal-billing invariants. It locks
114
- Piagent/`codex-cli` to Luna/medium and uses three repeats (42 paired sessions) with token, duration,
115
- full-suite, and zero-retry gates. A separate provider-free WebUI
116
- parity gate proves the 31 runtime-control paths before any model quota is
117
- used (workflow ingress was retired in 1.9.0).
118
- - The public `v1.6.0` production-v1 run
119
- `production-v1-20260824T040017Z-05b7cf`, on exact commit
120
- `3bba8f0b3ff521bc2a355e1f6bef6d1bbdc09511` with GPT-5.6 Luna Medium,
121
- measured 108 sessions. Piagent resolved 54/54 tasks versus 48/54 for
122
- `codex-cli`. Its primary fixed-workload family fresh-token ratio was `0.3857`
123
- (61.43% lower), with a 95% interval of `0.3073..0.4840`; the upper bound
124
- supports the conservative statement of at least 51.60% fewer fresh tokens on
125
- this predeclared workload and exact release. Usage was exact for all 108
126
- sessions and no retry occurred. See the
127
- [benchmark evidence](https://piagent.io.vn/benchmark) and
128
- [methodology](docs/quality-benchmark.md).
129
- - Built-in profiles for frontend, backend, fullstack, BE-readonly/FE-write, data, DevOps, mobile, docs, Python, and Node TypeScript.
130
- - Versioned capability packs with deterministic catalog, profile resolution, integrity lock, and permission checks.
131
-
132
- ## Permission profiles
133
-
134
- Project profiles can declare a runtime `permissionProfile`:
135
-
136
- | Profile | Use when | Guard behavior |
137
- |---|---|---|
138
- | `read-only` | Scout, audit, review | Allows `read`, `grep`, `find`, `ls`, and piagent state tools; blocks shell, `write`/`edit`/`apply_patch`, and unknown tools. |
139
- | `workspace-write` | Normal implementation | Default profile. Keeps protected-path, read-only-path, shell and capability checks, and asks before destructive or external actions. |
140
- | `trusted-full-access` | Trusted local automation | Expands workspace tool/scope autonomy, but still enforces protected paths, secret redaction, capability lock integrity, and destructive/external confirmation. |
141
- | `bypass` | You accept every risk, as with Codex's `--dangerously-bypass-approvals-and-sandbox` | No Piagent gate asks or blocks: deletes, pushes, migrations, external sends, protected and read-only paths all run. Tool output is still redacted and each turn still gets its `/undo` checkpoint. Remove `bypass` from `permissionProfiles.allowedModes` to forbid it in personal sessions. In a company conversation Bypass asks nothing either (internet, Docker, the member's machine, pushes, deploys), plain commands stay in the sandbox, and the team's Studio administrator can turn it off in the Harness (`bypass_mode`); it then applies as Full access. |
142
-
143
- For one run, set `PIAGENT_PERMISSION_PROFILE=read-only|workspace-write|trusted-full-access|bypass`, or use `piagent-auto --read-only`, `--workspace-write`, `--full-access`, or `--bypass`.
144
-
145
- Inside an active Pi session, use `/permission` for the menu or a session-local switch:
146
-
147
- ```text
148
- /permission
149
- /permission status
150
- /permission read-only
151
- /permission workspace-write
152
- /permission full-access
153
- /permission full-access Implement the requested trusted repo task.
154
- /permission bypass
78
+ piagent-update # latest release
79
+ piagent-update --check # only check
80
+ piagent-update --version X.Y.Z # a specific release, newer or older
155
81
  ```
156
82
 
157
- Legacy aliases still work: `/permission-status`, `/read-only`, `/workspace-write`, and `/full-access`. Full-access also accepts a task after the command. The guard switches the current session to `trusted-full-access`, then forwards the remaining text as the next user request.
83
+ It installs the pinned Pi host first, verifies the version on disk, then runs the installer; with `--project` it also migrates the project and runs the doctor. Team pins, rollback and uninstall: [Update & uninstall](https://piagent.io.vn/en/update) and the [release and install policy](docs/release-install-policy.md).
158
84
 
159
- ## Parent-direct orchestration
160
-
161
- The parent model owns reasoning, implementation, and verification. When helpers are enabled it may delegate up to two fresh read-only helpers, such as an independent research question or a review of its patch. Token-saving estimates are telemetry, not an admission requirement. Helpers never implement, inherit parent history, spawn nested helpers, or retry a deterministic failure.
162
-
163
- Inside Pi:
164
-
165
- ```text
166
- /piagent-orchestration
85
+ ```bash
86
+ piagent-uninstall # report only
87
+ piagent-uninstall --apply # remove
167
88
  ```
168
89
 
169
- This shows the active mode, helper ceiling, review lenses, Field Guide path, writer policy, and dispatch/skip evidence without triggering a model follow-up.
90
+ Credentials, trust decisions, sessions, todos and project memory are never removed.
170
91
 
171
- Source work is freeform: the model reads, edits and runs the project's checks
172
- directly, with no contract, declared scope or final gate. The guard still
173
- enforces protected and read-only paths, the permission profile, the context
174
- budget for large files and stale read-to-edit snapshots, and asks before
175
- destructive or external actions. In the managed company harness the plan,
176
- check and review steps per turn are set by the team's Harness in Studio.
92
+ ## Two modes, one dashboard
177
93
 
178
- ## Profiles
179
-
180
- Switching profile is one command inside Pi:
94
+ | | Personal | Company |
95
+ |---|---|---|
96
+ | Start | `pi`, `piagent dashboard` | `piagent studio`, `piagent studio --web` |
97
+ | Models | Your own account, any model Pi supports | Chosen per role (main · research · review) in Agent Studio |
98
+ | Keys | On your machine, managed by Pi | In Keychain via Agent Watch; the model never sees them |
99
+ | Commands | Normal network; push and publish wait for approval | Sandbox (Seatbelt / bubblewrap) without network; network one approval at a time |
100
+ | Verification | You ask for it | The team's Harness runs checks and review every turn |
181
101
 
182
- ```text
183
- /profile # status
184
- /profile fullstack # apply
185
- /profile setup # select profile, then select the tech for each role
186
- ```
102
+ ## What's in the box
187
103
 
188
- `/profile list` shows every profile and its aliases. The setup flow prefers a native select UI; where the Pi host has no select control, it falls back to a compact options card and an exact `/profile tech apply ...` line rather than asking the model to explain every option.
104
+ | Area | What you get |
105
+ |---|---|
106
+ | Guard | Protected and read-only paths, permission profiles, stale-read and large-file checks, secret redaction on tool output, confirmation for external and destructive actions |
107
+ | Dashboard | Conversations, folder tree, editor, terminals, hunk-by-hunk review, Timeline restore and `/undo`, Documents, 13 colour themes, ⌘K command palette |
108
+ | Company harness | Plan · check · review per turn, decision queue one card at a time, team memory with `memory_ask`, wrong-project warnings, long-task resilience |
109
+ | Context Engine | Local incremental index, hybrid search, token-budgeted packs, semantic compaction — `/context` |
110
+ | MCP | `pi-mcp-adapter` with pinned presets, four config scopes, approval gate for repository servers — `piagent-mcp` |
111
+ | Profiles | 11 built-in profiles (frontend, backend, fullstack, data, DevOps, mobile, docs…) with protected paths and verify commands — `/profile` |
112
+ | Reports | `fe-change-report`: before/after screenshots with numbered red frames, checks and E2E, viewable in Documents |
113
+
114
+ <details>
115
+ <summary><strong>Permission profiles</strong></summary>
116
+
117
+ | Profile | Use when | Guard behaviour |
118
+ |---|---|---|
119
+ | `read-only` | Scout, audit, review | Allows `read`, `grep`, `find`, `ls` and piagent state tools; blocks shell, edits and unknown tools. |
120
+ | `workspace-write` | Normal implementation | Default. Protected-path, read-only-path, shell and capability checks; asks before destructive or external actions. |
121
+ | `trusted-full-access` | Trusted local automation | More autonomy, still enforces protected paths, secret redaction, capability lock integrity and destructive/external confirmation. |
122
+ | `bypass` | You accept every risk | No gate asks or blocks. Output is still redacted and every turn keeps its `/undo` checkpoint. Remove it from `permissionProfiles.allowedModes` to forbid it; in company mode the Studio admin can turn it off (`bypass_mode`). |
189
123
 
190
- ## Capability packs
124
+ Inside Pi use `/permission` (menu), `/permission status`, `/permission read-only`, `/permission workspace-write`, `/permission full-access [task]` or `/permission bypass`. For one run: `PIAGENT_PERMISSION_PROFILE=…` or `piagent-auto --read-only|--workspace-write|--full-access|--bypass`. The guard exposes `piagent_permission_status` to the model.
191
125
 
192
- Capability packs group governed prompts, skills, subagents, policies, adapters, recipes, and eval scenarios behind a declarative manifest. Project profiles select exact pack versions and explicitly grant owner, lifecycle, filesystem, network, and external-action boundaries. The generated lock is deterministic and records profile, pack, artifact, and permission digests.
126
+ </details>
193
127
 
194
- Commands and lock format: [Capability packs](docs/capability-packs.md).
128
+ <details>
129
+ <summary><strong>Session commands</strong></summary>
195
130
 
196
- ## Built-in profiles
131
+ These are settings and read-only views; none of them starts a model turn. Every command is explained in the [command reference](docs/command-reference-vietnamese.md).
197
132
 
198
- | Profile | Use when |
133
+ | Command | Purpose |
199
134
  |---|---|
200
- | `generic` | Unknown or low-structure repository |
201
- | `web-frontend` | Frontend-only work |
202
- | `backend-api` | Backend/API work |
203
- | `be-readonly-fe` | Backend is source-of-truth/read-only; frontend is write target |
204
- | `fullstack` | Frontend and backend may both be changed when the task allows |
205
- | `node-typescript` | Node/TypeScript library or tooling |
206
- | `python` | Python app/library |
207
- | `data` | ETL, dbt, DVC, notebook, or data pipeline |
208
- | `devops` | Docker, Terraform, Kubernetes, Helm, GitHub Actions |
209
- | `mobile` | React Native or Flutter |
210
- | `docs` | Documentation portal/manual |
211
-
212
- ## Main workflows
213
-
214
- Work is requested in plain language; the commands below are settings and read-only views typed inside a Pi session, and none of them starts a model turn. [Command reference](docs/command-reference-vietnamese.md) explains each one.
215
-
216
- | Command | Use when |
217
- |---|---|
218
- | `/profile` | Show or apply the project profile; `/profile setup` selects the tech for each role. |
135
+ | `/profile` | Show or apply the profile. `/profile setup`, `/profile tech`, `/profile auto` pick the tech per role (recorded with `piagent_profile_tech_context_record`). |
219
136
  | `/permission` | Show or switch the session permission profile. |
220
- | `/context` | Context Engine index, search, packs, test impact and compaction. |
221
- | `/usage` | Session, model, thinking and context usage; `/usage logs` shows compacted tool output. |
137
+ | `/context` | Context Engine index, search, packs, test impact, compaction. |
138
+ | `/usage` | Session, model, thinking and context usage; `/usage logs` for compacted tool output. |
222
139
  | `/memory` | Explicit project memory. |
223
140
  | `/piagent-mcp` | MCP servers, scopes and approvals. |
224
141
  | `/piagent-status` | Profile, guard, runtime and authenticated model state. |
225
- | `/piagent-inspector` | One read-only menu for the session diff, commands and failures, safety warnings, and context budget. A four-row panel is always shown beside Pi's native footer and can be hidden for the session with `toggle`. |
226
-
227
- The workflow commands (`/workflow`, `/task`, `/scout`, `/fresh`, `/onboard`, `/commands`, `/model-options`) were retired in 1.9.0. Say what you want instead — "scout the payment flow read-only, do not edit", "review the current diff", "commit these two files". For a heavy session, start a new one with Pi's `/new`.
228
-
229
- Git stays a capability rather than a `/git-*` namespace, so natural language works. `git push`, GitHub writes and publishing ask for confirmation first. Broad staging — `git add .`, `git add -A`, `git add --all`, `git add -- .`, `git add :/` — requires confirmation, so unrelated or private files are not swept into a commit silently.
230
-
231
- Paste a screenshot path straight into a task and the guard attaches it as `[image1]` before the model sees the prompt: `.png`, `.jpg`, `.jpeg`, `.gif`, `.webp`, `.bmp`, up to 4 images at 8 MB each. The target must be inside the project or a directory listed in `additionalReadRoots`; protected paths, paths outside the resolved filesystem read scope, symlink escapes, and extension-only fake images are refused. Pasted text reaches the model as typed; there is no checklist to paste.
142
+ | `/piagent-inspector` | Diff, commands and failures, safety warnings and context budget in one read-only menu. |
143
+ | `/piagent-orchestration` | Helper mode, ceiling and dispatch evidence. |
232
144
 
233
- Web research and image understanding remain separate capabilities. The pinned `pi-web-access` integration uses the authenticated `openai-codex` route first when it is available and keeps its automatic search fallback; it never copies provider credentials into project or browser state. Images are passed as native image input to the selected session model rather than through a Piagent-owned OCR service. The dashboard reports both effective facts under **Settings → Providers & models**: `Codex Web Search` when that route is ready, and `Codex Vision` only when the current Codex model advertises image input.
145
+ Git stays a capability: ask for "commit these two files" or "open a PR" (the `/commit` and `/pr` prompts exist for the same flow). Models are picked with Pi's `/model` or `Ctrl+L`; see [Model options](docs/model-options.md).
234
146
 
235
- The Session Hub can attach browser-selected images and documents to a new or existing conversation. Markdown, text, PDF and DOCX files use bounded local extraction; the chat keeps a compact file card while the project **Documents** workspace provides a readable preview without starting a model turn. Files over the direct-send limit stay in the project workspace instead of being copied into a prompt, and protected paths, redaction, session binding and one-shot attachment references remain enforced by the runtime.
147
+ </details>
236
148
 
237
- A spec that lives outside the project — the one just downloaded to `~/Downloads` — is read with `piagent_document_read` once its directory is listed in the profile's `additionalReadRoots`. The grant is read-only, covers `.md`, `.txt`, `.csv`, `.json`, `.yaml`, `.pdf`, and `.docx` only, and does not open anything `protectedPaths` covers. See [command reference](docs/command-reference-vietnamese.md).
149
+ <details>
150
+ <summary><strong>Subagents and MCP</strong></summary>
238
151
 
239
- ## Model selection
152
+ The parent model owns reasoning, implementation and verification. With helpers enabled it may delegate up to two fresh read-only helpers (research, or a review of its patch); helpers never implement or spawn helpers. `piagent-setup` installs the `pi-subagents` runtime with a clamped preset and `/subagents-doctor` runs a health check. Details: [Subagent orchestration capabilities](docs/subagent-orchestration-capabilities.md), [auto-delegation](docs/auto-delegation-policy.md), parallel-review in [subagents and multi-agent](docs/subagents-and-multiagent.md).
240
153
 
241
- Handled by Pi's native UI: `/model` or `Ctrl+L` to pick, `Ctrl+P` to cycle the scoped set, `Shift+Tab` to cycle thinking level where the model supports it. Global setup seeds `enabledModels`; see [Model options](docs/model-options.md) to inspect or re-apply it.
154
+ `piagent-setup` installs `pi-mcp-adapter` and seeds the `core` preset (Context7, Chrome DevTools, GitHub); `popular` adds Playwright and Figma. Seeding writes definitions only; servers connect lazily. Keep provider keys in environment variables. Web research uses the pinned `pi-web-access` add-on. See [MCP and tools](docs/mcp-and-tools.md).
242
155
 
243
- ## MCP setup
156
+ </details>
244
157
 
245
- `piagent-setup` and `piagent-install` both install `pi-mcp-adapter` and seed the `core` preset. Pass `--no-mcp` to skip it.
158
+ <details>
159
+ <summary><strong>Security model</strong></summary>
246
160
 
247
- | Preset | Includes |
248
- |---|---|
249
- | `core` | Context7, Chrome DevTools, GitHub |
250
- | `popular` | core + Playwright + Figma desktop/local |
251
- | `all` | popular + Figma remote (requires an approved Figma MCP client) |
252
-
253
- Seeding writes server definitions; it does not start or authenticate anything. Servers connect lazily, so each one needs its own prerequisite before its first call: Chrome DevTools needs a local Chrome, and GitHub needs Docker running plus `GITHUB_PERSONAL_ACCESS_TOKEN` exported. `piagent-mcp --list` prints what each server requires. Project-scope `.mcp.json` files ship empty on purpose — the shared baseline is the global config, not the project one.
254
-
255
- Keep provider keys in environment variables, never in committed config. Switching presets and per-project scoping: [MCP and tools](docs/mcp-and-tools.md).
161
+ The guard is an application-level accident-prevention layer, not an OS sandbox. It blocks path-like access to protected paths across built-in, custom and MCP tools (nested objects, `file://` URIs, percent-encoding, case-insensitive matches, symlink escapes), extracts shell operands to block raw `bash` access, confirmation-gates external writes launched through the shell, and redacts sensitive data from tool output. The [redaction benchmark](docs/security-redaction-benchmark.md) detects 52/52 contextual secrets with 0/30 false positives on benign text; it is an internal gate, not an independent audit.
256
162
 
257
- ## Subagents
163
+ For untrusted code or adversarial prompts, run Pi inside a container or VM with filesystem, process, network and credential boundaries. Threat model: [docs/security-threat-model.md](docs/security-threat-model.md). Report vulnerabilities privately as described in [SECURITY.md](SECURITY.md).
258
164
 
259
- `piagent-setup` installs the optional `pi-subagents` compatibility runtime with a clamped `safe` preset. Daily tasks stay parent-direct; builtin agents and workers are disabled, and helper mode allows up to two read-only helpers. The inspector states dispatch/skip reasons.
165
+ </details>
260
166
 
261
- `/subagents-doctor` runs a health check. See [Subagents and multi-agent](docs/subagents-and-multiagent.md) for the read-only helper opt-in contract.
167
+ ## Evidence
262
168
 
263
- ## Repository layout
264
-
265
- ```text
266
- piagent/
267
- ├─ architecture/ machine-readable layer and file budgets
268
- ├─ adapters/ reusable project profiles
269
- ├─ catalog/ deterministic capability index
270
- ├─ docs/ EN/VI canonical docs plus stable operating guides
271
- ├─ evals/ governed evaluation scenarios
272
- ├─ packs/ versioned capability manifests and recipes
273
- ├─ packages/
274
- │ ├─ piagent-core/ Pi package: extensions, runtime, skills, managed harness
275
- │ └─ piagent-webui/ dashboard: contracts, client, server, gateway, ownership
276
- ├─ schemas/ JSON schemas
277
- ├─ scripts/ setup, doctor, verification helpers
278
- └─ templates/ project/global templates
279
- ```
280
-
281
- `piagent-core` is the Pi extension and runs headless on its own. `piagent-webui` is the
282
- `piagent dashboard` surface — a separate dependency spine that reads the platform but is
283
- never read by it, so the runtime keeps working with the dashboard absent. Both layer maps
284
- are enforced by `npm run architecture:check`; see [Architecture](docs/en/architecture.md).
169
+ | Measure | Result | Source |
170
+ |---|---|---|
171
+ | Tasks resolved, production-v1 (v1.6.0, GPT-5.6 Luna Medium) | Piagent 54/54 · `codex-cli` 48/54 | [benchmark](https://piagent.io.vn/en/benchmark) |
172
+ | Fresh tokens, primary fixed-workload family | ratio `0.3857` (−61.43%), 95% CI `0.3073..0.4840` | [methodology](docs/quality-benchmark.md) |
173
+ | Usage accounting | 108/108 sessions exact, zero retries | same run |
174
+ | Secret redaction | 52/52 contextual cases, 0/30 benign false positives | [redaction benchmark](docs/security-redaction-benchmark.md) |
175
+ | Release cadence | every release in [CHANGELOG.md](CHANGELOG.md) | [changelog page](https://piagent.io.vn/en/whats-new) |
285
176
 
286
- ## Verification
177
+ The benchmark is a maintainer-built synthetic suite measured at v1.6.0 and not re-run for later releases; it makes no claim about wall-clock time or cost. Run it yourself with `piagent-benchmark --production --dry-run`, or the quick `core-v1` smoke with `piagent-benchmark --dry-run`.
287
178
 
288
- One command runs the full local gate — typecheck, tests, capability catalog, doctor, and the scaffold check:
179
+ ## Contributing
289
180
 
290
181
  ```bash
182
+ npm ci
291
183
  npm run verify
292
184
  ```
293
185
 
294
- Individual checks and the contributor flow are in [CONTRIBUTING.md](CONTRIBUTING.md). Token and session follow-up is `/usage` inside Pi; see [Usage observability](docs/usage-observability.md). Run the zero-provider WebUI/Terminal gate with `npm run benchmark:webui-parity`; preview the deeper Piagent/`codex-cli` Luna-medium suite with `npm run benchmark:deep -- --dry-run`. Preview the smoke benchmark with `piagent-benchmark --dry-run`; preview the 108-session production gate with `piagent-benchmark --production --dry-run`. Scoring, isolation, confidence, and quota details are in the [Quality benchmark guide](docs/quality-benchmark.md).
295
-
296
- ## Public safety
297
-
298
- This repository intentionally excludes:
186
+ `npm run verify` runs typecheck, tests, the capability catalog, the doctor and the architecture, wording and docs-site checks. The docs site and `CHANGELOG.md` are generated: edit `docs-site/content/` and `docs-site/releases.json`, then run `node scripts/build-docs-site.mjs`. Contributor flow: [CONTRIBUTING.md](CONTRIBUTING.md). Layout and layer rules: [Architecture](docs/en/architecture.md).
299
187
 
300
- - OAuth tokens and `auth.json`;
301
- - `.env` files;
302
- - MCP API keys and provider tokens;
303
- - Pi sessions, todos, caches, and local trust files;
304
- - project-private data dumps;
305
- - local machine paths.
188
+ This repository never contains OAuth tokens, `auth.json`, `.env` files, MCP or provider keys, Pi sessions, project data dumps or local machine paths.
306
189
 
307
190
  ## Documentation
308
191
 
309
- - [Documentation language index](docs/README.md)
310
- - [Architecture (English)](docs/en/architecture.md)
311
- - [Architecture (Tiếng Việt)](docs/vi/architecture.md)
312
- - [Maintainer guide (English)](docs/en/maintainer-guide.md)
313
- - [Maintainer guide (Tiếng Việt)](docs/vi/maintainer-guide.md)
314
- - [Public docs site (VI/EN)](https://piagent.io.vn)
315
- - [Static team docs site](docs-site/index.html) — bilingual output generated from `docs-site/content/`, preview with `npm run site:preview`
316
- - [Changelog](CHANGELOG.md)
317
- - [Vercel docs site deploy](docs/vercel-docs-site.md)
318
- - [Operator manual tiếng Việt](docs/operator-manual-vietnamese.md)
319
- - [Quickstart tiếng Việt](docs/quickstart-vietnamese.md)
320
- - [Command reference tiếng Việt](docs/command-reference-vietnamese.md)
321
- - [Pi Context Engine](docs/context-engine.md)
322
- - [Team onboarding](docs/team-onboarding.md)
323
- - [Project onboarding](docs/project-onboarding.md)
324
- - [Workflow recipes](docs/workflow-recipes.md)
325
- - [Project adapters](docs/project-adapters.md)
326
- - [Architecture](docs/architecture.md)
327
- - [Distribution standard](docs/distribution-standard.md)
328
- - [Release and install policy](docs/release-install-policy.md)
329
- - [Publishing for teams](docs/publishing-for-teams.md)
330
- - [OAuth providers](docs/oauth-providers.md)
331
- - [Herdr workflow](docs/herdr-workflow.md)
332
- - [MCP and tools](docs/mcp-and-tools.md)
333
- - [Subagents and multi-agent](docs/subagents-and-multiagent.md)
334
- - [Auto-delegation policy](docs/auto-delegation-policy.md)
335
- - [Subagent orchestration capabilities](docs/subagent-orchestration-capabilities.md)
336
- - [Context-window policy](docs/context-window-policy.md)
337
- - [Memory policy](docs/memory-policy.md)
338
- - [Task lifecycle tiếng Việt](docs/task-lifecycle-vietnamese.md) (historical, before 1.9.0)
339
- - [Task implementation contract](docs/task-implementation-contract.md) (historical, before 1.9.0)
340
- - [Runtime quality baseline](docs/runtime-quality-baseline.md)
341
- - [Usage observability](docs/usage-observability.md)
342
- - [Model options](docs/model-options.md)
343
- - [Quality benchmark guide](docs/quality-benchmark.md)
344
- - [Sensitive-data redaction benchmark](docs/security-redaction-benchmark.md)
345
- - [Runtime policy design](docs/runtime-policy-design.md)
346
- - [Security threat model](docs/security-threat-model.md)
347
- - [Package architecture notes](docs/package-architecture-notes.md)
348
-
349
- ## Maturity
350
-
351
- 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.41.0` or a reviewed commit.
352
-
353
- Ready for:
354
-
355
- - global Pi setup;
356
- - project onboarding;
357
- - profile-driven guarded implementation tasks;
358
- - read-only scouting and planning;
359
- - backend-readonly/frontend-write workflows;
360
- - bounded subagent scouting, planning, implementation, and review;
361
- - runtime checks for exec policy, context budget, context preflight, tool policy, and usage snapshot;
362
- - project-level quality/token/cost benchmarking.
363
-
364
- Application-level policy layer:
365
-
366
- - The guard extension is an accident-prevention layer for agent mistakes and common prompt-injection patterns.
367
- - Raw path-like tool access to protected paths is blocked before execution. This covers Pi built-ins such as `read`, `write`, `edit`, `grep`, `find`, `ls`, and custom/MCP tools when their input contains path-like strings, including nested objects, arrays, and `file://` URIs.
368
- - The default MCP proxy carrier is decoded only from bounded object-shaped JSON. Provider/action confirmation and protected/read-only path checks then apply to the effective MCP tool; malformed, oversized, scalar, array, or excessively nested proxy payloads fail closed.
369
- - Runtime permission profiles control autonomy: `read-only`, `workspace-write`, `trusted-full-access`, and `bypass`. The full-access profile is explicit and auditable; it does not disable protected-path checks, secret redaction, capability lock integrity, or destructive/external confirmations. `bypass` does, only when chosen explicitly (and, in a company conversation, only while the team's Harness allows it); it keeps output redaction and turn checkpoints.
370
- - Protected paths are matched case-insensitively, existing aliases are resolved to their canonical repository path, and scope-aware filesystem tools reject repository escape or symbolic-link traversal.
371
- - Path-like strings are percent-decoded once before matching. Excessively nested tool input fails closed instead of being silently skipped.
372
- - Known content fields such as `content`, `query`, `pattern`, `text`, and `command` are excluded from generic path extraction to preserve normal search/edit behavior. Tool-specific checks still validate `grep.glob` and `find.pattern` when they explicitly target protected paths.
373
- - The ambiguous `source` field remains metadata for configured external providers and piagent tools, but is treated as a filesystem path for file-oriented tools and unknown/local tools; protected-path and read-scope checks then apply before execution.
374
- - Broad `grep`, `find`, and `ls` sweeps get result-filter backstops: protected file content lines or protected path metadata are redacted before the model sees output. Text tool results and JSON-like result details also pass through shared sensitive-data redaction; image, audio, and resource payloads are left intact.
375
- - The redaction release gate is a synthetic/internal benchmark for contextual recall, benign preservation, structured fields, and bounded large output. The public security threat model maps current assumptions, attack vectors, controls, and residual risks; it is not an independent audit. Stronger assurance still requires a broader OS/shell matrix, more parser fuzzing, continued symlink/path-traversal testing, third-party review, and an LTS/backport policy. Opaque entropy without a credential-bearing context and transformed output such as base64-encoded content remain outside the redaction guarantee.
376
- - Raw `bash` access to protected paths is blocked through shell operand extraction. The guard covers partial shell globs, bare filenames, canonical symbolic-link aliases, and attached input/output redirections. `.pi/piagent-state/**` and `.pi/piagent-profile.json` are self-protected; use `piagent_context` and the piagent tools instead.
377
- - External writes launched through guarded shell tools are confirmation-gated as well as direct provider tools. This includes GitHub CLI write actions and non-read-only `curl`/`wget` forms, including common execution wrappers; known read/list/GET forms remain non-interactive.
378
- - Observed bash results are persisted under `.pi/piagent-state/observed-bash.jsonl`, so parent agents can check results produced by guarded subagent processes. Command identity is kept as a SHA-256 hash while sensitive command text is redacted at both the in-memory and persisted boundaries.
379
- - Project memory files are private-by-default in generated projects; opt in to shared memory only after review/redaction.
380
- - It is not an OS sandbox or complete security boundary. It depends on the controlled tool paths and shell parsing that the platform observes, and it cannot stop another process with the same OS permissions from reading or writing outside the guard. For untrusted code, untrusted prompts, or adversarial workloads, run Pi inside an isolated container/VM with filesystem, process, network, and credential boundaries.
381
- - Release verification audits the small helper dependency tree separately from the exact Pi host and pinned optional add-ons at the high-severity gate. Upstream lower-severity findings are still reported and tracked; a green helper-only audit is not treated as proof that the deployed runtime tree is clean.
382
-
383
- Still requires project-specific validation for:
384
-
385
- - high-risk production changes;
386
- - provider/model changes with materially different behavior;
387
- - complex parallel writer workflows;
388
- - environments requiring hard filesystem, network, or process sandboxing outside Pi.
389
-
390
- ## Security reports
391
-
392
- Report suspected vulnerabilities privately using the process in [SECURITY.md](SECURITY.md). Do not put live credentials, OAuth sessions, customer data, or exploit details in a public issue.
192
+ - **Start:** [Website](https://piagent.io.vn/en/) · [Install](https://piagent.io.vn/en/quickstart) · [Ecosystem](https://piagent.io.vn/en/ecosystem) · [Windows](docs/en/windows.md) · [Team onboarding](docs/team-onboarding.md)
193
+ - **Use:** [Command reference](docs/command-reference-vietnamese.md) · [Workflow recipes](docs/workflow-recipes.md) · [Workspace editor](docs/en/workspace-editor.md) · [Model options](docs/model-options.md) · [OAuth providers](docs/oauth-providers.md) · [Context Engine](docs/context-engine.md) · [Memory policy](docs/memory-policy.md)
194
+ - **Operate:** [Release and install policy](docs/release-install-policy.md) · [Publishing for teams](docs/publishing-for-teams.md) · [Distribution standard](docs/distribution-standard.md) · [Usage observability](docs/usage-observability.md) · [Operator manual (VI)](docs/operator-manual-vietnamese.md)
195
+ - **Internals:** [Architecture](docs/en/architecture.md) · [Maintainer guide](docs/en/maintainer-guide.md) · [Runtime policy design](docs/runtime-policy-design.md) · [Security threat model](docs/security-threat-model.md) · [Quality benchmark](docs/quality-benchmark.md) · [Capability packs](docs/capability-packs.md) · [All docs](docs/README.md)
393
196
 
394
197
  ## License
395
198
 
396
- MIT License. See [LICENSE](LICENSE).
199
+ MIT. See [LICENSE](LICENSE).