@piagent/platform 1.3.0 → 1.4.0

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 (304) hide show
  1. package/CHANGELOG.md +56 -3
  2. package/README.md +3 -3
  3. package/architecture/layers.json +96 -1
  4. package/docs/README.md +1 -0
  5. package/docs/architecture.md +1 -0
  6. package/docs/authority-manifest.md +1 -0
  7. package/docs/auto-delegation-policy.md +1 -0
  8. package/docs/capability-packs.md +10 -2
  9. package/docs/command-reference-vietnamese.md +5 -4
  10. package/docs/context-engine.md +1 -0
  11. package/docs/context-window-policy.md +1 -0
  12. package/docs/distribution-standard.md +8 -7
  13. package/docs/herdr-workflow.md +1 -0
  14. package/docs/mcp-and-tools.md +14 -9
  15. package/docs/memory-policy.md +1 -0
  16. package/docs/model-options.md +1 -0
  17. package/docs/oauth-providers.md +1 -0
  18. package/docs/operator-manual-vietnamese.md +15 -12
  19. package/docs/package-architecture-notes.md +1 -0
  20. package/docs/project-adapters.md +1 -0
  21. package/docs/project-onboarding.md +1 -0
  22. package/docs/publishing-for-teams.md +1 -0
  23. package/docs/quality-benchmark.md +1 -0
  24. package/docs/quickstart-vietnamese.md +3 -2
  25. package/docs/release-install-policy.md +11 -7
  26. package/docs/runtime-harness-standard.md +1 -0
  27. package/docs/runtime-policy-design.md +1 -0
  28. package/docs/runtime-quality-baseline.md +1 -0
  29. package/docs/security-redaction-benchmark.md +1 -0
  30. package/docs/security-threat-model.md +2 -1
  31. package/docs/subagent-orchestration-capabilities.md +1 -0
  32. package/docs/subagents-and-multiagent.md +1 -0
  33. package/docs/task-implementation-contract.md +1 -0
  34. package/docs/task-lifecycle-vietnamese.md +1 -0
  35. package/docs/team-onboarding.md +3 -2
  36. package/docs/third-party-neutrality.md +26 -0
  37. package/docs/usage-observability.md +1 -0
  38. package/docs/vercel-docs-site.md +1 -0
  39. package/docs/workflow-recipes.md +1 -0
  40. package/docs-site/architecture.html +1 -1
  41. package/docs-site/benchmark.html +1 -1
  42. package/docs-site/commands.html +1 -1
  43. package/docs-site/context-engine.html +1 -1
  44. package/docs-site/en/architecture.html +1 -1
  45. package/docs-site/en/benchmark.html +1 -1
  46. package/docs-site/en/commands.html +1 -1
  47. package/docs-site/en/context-engine.html +1 -1
  48. package/docs-site/en/index.html +1 -1
  49. package/docs-site/en/mcp-approval.html +1 -1
  50. package/docs-site/en/mcp-auth.html +1 -1
  51. package/docs-site/en/mcp-servers.html +1 -1
  52. package/docs-site/en/mcp.html +1 -1
  53. package/docs-site/en/permissions.html +1 -1
  54. package/docs-site/en/profiles.html +1 -1
  55. package/docs-site/en/quickstart.html +1 -1
  56. package/docs-site/en/runtime.html +1 -1
  57. package/docs-site/en/scope.html +1 -1
  58. package/docs-site/en/security.html +1 -1
  59. package/docs-site/en/team.html +1 -1
  60. package/docs-site/en/whats-new.html +1 -1
  61. package/docs-site/en/workflows.html +1 -1
  62. package/docs-site/index.html +1 -1
  63. package/docs-site/mcp-approval.html +1 -1
  64. package/docs-site/mcp-auth.html +1 -1
  65. package/docs-site/mcp-servers.html +1 -1
  66. package/docs-site/mcp.html +1 -1
  67. package/docs-site/permissions.html +1 -1
  68. package/docs-site/profiles.html +1 -1
  69. package/docs-site/quickstart.html +1 -1
  70. package/docs-site/runtime.html +1 -1
  71. package/docs-site/scope.html +1 -1
  72. package/docs-site/security.html +1 -1
  73. package/docs-site/team.html +1 -1
  74. package/docs-site/whats-new.html +1 -1
  75. package/docs-site/workflows.html +1 -1
  76. package/evals/fixtures/mutation-provenance-record.invalid.json +17 -0
  77. package/evals/fixtures/mutation-provenance-record.valid.json +27 -0
  78. package/evals/fixtures/piagent-webui/approval-v1.invalid.json +54 -0
  79. package/evals/fixtures/piagent-webui/approval-v1.valid.json +58 -0
  80. package/evals/fixtures/piagent-webui/attachment-v1.invalid.json +25 -0
  81. package/evals/fixtures/piagent-webui/attachment-v1.valid.json +25 -0
  82. package/evals/fixtures/piagent-webui/capabilities-v1.invalid.json +51 -0
  83. package/evals/fixtures/piagent-webui/capabilities-v1.valid.json +122 -0
  84. package/evals/fixtures/piagent-webui/commit-summary-v1.invalid.json +10 -0
  85. package/evals/fixtures/piagent-webui/commit-summary-v1.valid.json +25 -0
  86. package/evals/fixtures/piagent-webui/control-command-v1.invalid.json +37 -0
  87. package/evals/fixtures/piagent-webui/control-command-v1.valid.json +35 -0
  88. package/evals/fixtures/piagent-webui/diff-v1.invalid.json +13 -0
  89. package/evals/fixtures/piagent-webui/diff-v1.valid.json +141 -0
  90. package/evals/fixtures/piagent-webui/gateway-capabilities-v1.invalid.json +35 -0
  91. package/evals/fixtures/piagent-webui/gateway-capabilities-v1.valid.json +35 -0
  92. package/evals/fixtures/piagent-webui/gateway-protocol-v1.invalid.json +14 -0
  93. package/evals/fixtures/piagent-webui/gateway-protocol-v1.valid.json +14 -0
  94. package/evals/fixtures/piagent-webui/handoff-history-v1.invalid.json +16 -0
  95. package/evals/fixtures/piagent-webui/handoff-history-v1.valid.json +16 -0
  96. package/evals/fixtures/piagent-webui/model-catalog-v1.invalid.json +31 -0
  97. package/evals/fixtures/piagent-webui/model-catalog-v1.valid.json +43 -0
  98. package/evals/fixtures/piagent-webui/queue-v1.invalid.json +29 -0
  99. package/evals/fixtures/piagent-webui/queue-v1.valid.json +44 -0
  100. package/evals/fixtures/piagent-webui/recovery-history-v1.invalid.json +17 -0
  101. package/evals/fixtures/piagent-webui/recovery-history-v1.valid.json +20 -0
  102. package/evals/fixtures/piagent-webui/release-monitor-v1.invalid.json +12 -0
  103. package/evals/fixtures/piagent-webui/release-monitor-v1.valid.json +29 -0
  104. package/evals/fixtures/piagent-webui/review-state-v1.invalid.json +25 -0
  105. package/evals/fixtures/piagent-webui/review-state-v1.valid.json +38 -0
  106. package/evals/fixtures/piagent-webui/runtime-event-v2.invalid.json +49 -0
  107. package/evals/fixtures/piagent-webui/runtime-event-v2.valid.json +49 -0
  108. package/evals/fixtures/piagent-webui/session-catalog-v1.invalid.json +17 -0
  109. package/evals/fixtures/piagent-webui/session-catalog-v1.valid.json +58 -0
  110. package/evals/fixtures/piagent-webui/session-command-v1.invalid.json +19 -0
  111. package/evals/fixtures/piagent-webui/session-command-v1.valid.json +19 -0
  112. package/evals/fixtures/piagent-webui/snapshot-v1.invalid.json +5 -0
  113. package/evals/fixtures/piagent-webui/snapshot-v1.valid.json +191 -0
  114. package/evals/fixtures/piagent-webui/source-change-v1.invalid.json +57 -0
  115. package/evals/fixtures/piagent-webui/source-change-v1.valid.json +98 -0
  116. package/evals/fixtures/piagent-webui/source-mutation-v1.invalid.json +19 -0
  117. package/evals/fixtures/piagent-webui/source-mutation-v1.valid.json +38 -0
  118. package/evals/fixtures/piagent-webui/source-revert-v1.invalid.json +20 -0
  119. package/evals/fixtures/piagent-webui/source-revert-v1.valid.json +62 -0
  120. package/evals/fixtures/piagent-webui/subagent-tree-v1.invalid.json +26 -0
  121. package/evals/fixtures/piagent-webui/subagent-tree-v1.valid.json +39 -0
  122. package/evals/fixtures/piagent-webui/task-index-v1.invalid.json +15 -0
  123. package/evals/fixtures/piagent-webui/task-index-v1.valid.json +15 -0
  124. package/evals/fixtures/piagent-webui/task-timeline-v1.invalid.json +14 -0
  125. package/evals/fixtures/piagent-webui/task-timeline-v1.valid.json +16 -0
  126. package/evals/fixtures/piagent-webui/transcript-v1.invalid.json +35 -0
  127. package/evals/fixtures/piagent-webui/transcript-v1.valid.json +55 -0
  128. package/evals/fixtures/task-baseline-manifest.invalid.json +16 -0
  129. package/evals/fixtures/task-baseline-manifest.valid.json +41 -0
  130. package/evals/fixtures/verifier-file-snapshot.invalid.json +21 -0
  131. package/evals/fixtures/verifier-file-snapshot.valid.json +21 -0
  132. package/package.json +30 -3
  133. package/packages/piagent-core/benchmark/benchmark-candidate.d.ts +1 -0
  134. package/packages/piagent-core/benchmark/benchmark-forensics.d.ts +1 -0
  135. package/packages/piagent-core/benchmark/benchmark-ledger.d.ts +4 -0
  136. package/packages/piagent-core/benchmark/benchmark-record-validation.d.ts +1 -0
  137. package/packages/piagent-core/benchmark/benchmark-runtime.d.ts +1 -0
  138. package/packages/piagent-core/capabilities/capability-core.js +2 -2
  139. package/packages/piagent-core/capabilities/capability-verification-cache.js +280 -0
  140. package/packages/piagent-core/capabilities/runtime-integrity.js +153 -1
  141. package/packages/piagent-core/extensions/document-intake.ts +24 -10
  142. package/packages/piagent-core/extensions/piagent-guard.ts +90 -73
  143. package/packages/piagent-core/extensions/redaction-core.d.ts +2 -0
  144. package/packages/piagent-core/extensions/state-retention.js +77 -44
  145. package/packages/piagent-core/extensions/task-journal.js +30 -1
  146. package/packages/piagent-core/extensions/task-state.js +33 -36
  147. package/packages/piagent-core/mcp/mcp-server-catalog.js +5 -5
  148. package/packages/piagent-core/package.json +1 -1
  149. package/packages/piagent-core/runtime/hooks/session-start-hook.ts +2 -2
  150. package/packages/piagent-core/runtime/hooks/tool-call-hook.ts +5 -2
  151. package/packages/piagent-core/runtime/hooks/tool-result-hook.ts +20 -19
  152. package/packages/piagent-core/runtime/hooks/tool-result-metadata.ts +13 -0
  153. package/packages/piagent-core/runtime/input/chat-images.ts +2 -2
  154. package/packages/piagent-core/runtime/inspection/activity-event-adapter.ts +94 -0
  155. package/packages/piagent-core/runtime/inspection/approval-broker.ts +318 -0
  156. package/packages/piagent-core/runtime/inspection/commit-summary-projection.ts +59 -0
  157. package/packages/piagent-core/runtime/inspection/context-telemetry-inspection.ts +37 -0
  158. package/packages/piagent-core/runtime/inspection/criteria-links.ts +295 -0
  159. package/packages/piagent-core/runtime/inspection/diff-projection.ts +499 -0
  160. package/packages/piagent-core/runtime/inspection/git-filter-safety.ts +38 -0
  161. package/packages/piagent-core/runtime/inspection/git-numstat-adapter.ts +71 -0
  162. package/packages/piagent-core/runtime/inspection/git-status-adapter.ts +493 -0
  163. package/packages/piagent-core/runtime/inspection/git-tree-adapter.ts +108 -0
  164. package/packages/piagent-core/runtime/inspection/mcp-control.ts +10 -0
  165. package/packages/piagent-core/runtime/inspection/mutation-provenance-contract.ts +131 -0
  166. package/packages/piagent-core/runtime/inspection/mutation-provenance-recorder.ts +48 -0
  167. package/packages/piagent-core/runtime/inspection/mutation-provenance-store.ts +161 -0
  168. package/packages/piagent-core/runtime/inspection/project-runtime-inspection.ts +36 -0
  169. package/packages/piagent-core/runtime/inspection/review-state-contract.ts +108 -0
  170. package/packages/piagent-core/runtime/inspection/review-state-projection.ts +93 -0
  171. package/packages/piagent-core/runtime/inspection/review-state-store.ts +112 -0
  172. package/packages/piagent-core/runtime/inspection/runtime-event-store.ts +262 -0
  173. package/packages/piagent-core/runtime/inspection/same-process-bridge-proof.ts +103 -0
  174. package/packages/piagent-core/runtime/inspection/source-change-projection.ts +471 -0
  175. package/packages/piagent-core/runtime/inspection/source-evidence-contract.ts +139 -0
  176. package/packages/piagent-core/runtime/inspection/source-evidence-store.ts +315 -0
  177. package/packages/piagent-core/runtime/inspection/source-handoff-store.ts +70 -0
  178. package/packages/piagent-core/runtime/inspection/source-inspection-plan.ts +34 -0
  179. package/packages/piagent-core/runtime/inspection/source-mutation-projection.ts +164 -0
  180. package/packages/piagent-core/runtime/inspection/source-mutation-store.ts +168 -0
  181. package/packages/piagent-core/runtime/inspection/source-open-target.ts +38 -0
  182. package/packages/piagent-core/runtime/inspection/source-revert-projection.ts +147 -0
  183. package/packages/piagent-core/runtime/inspection/task-baseline-start-capture.ts +22 -0
  184. package/packages/piagent-core/runtime/inspection/task-compaction-history.ts +160 -0
  185. package/packages/piagent-core/runtime/inspection/task-control-journal.ts +131 -0
  186. package/packages/piagent-core/runtime/inspection/task-handoff-history.ts +95 -0
  187. package/packages/piagent-core/runtime/inspection/task-provenance-projection.ts +60 -0
  188. package/packages/piagent-core/runtime/inspection/task-recovery-timeline.ts +88 -0
  189. package/packages/piagent-core/runtime/inspection/task-run-index.ts +87 -0
  190. package/packages/piagent-core/runtime/inspection/task-source-projection.ts +401 -0
  191. package/packages/piagent-core/runtime/inspection/task-subagent-tree.ts +101 -0
  192. package/packages/piagent-core/runtime/inspection/text-diff.ts +60 -0
  193. package/packages/piagent-core/runtime/inspection/verifier-snapshot-contract.ts +114 -0
  194. package/packages/piagent-core/runtime/inspection/verifier-snapshot-store.ts +189 -0
  195. package/packages/piagent-core/runtime/inspection/webui-snapshot.ts +320 -0
  196. package/packages/piagent-core/runtime/inspection/workspace-file-reader.ts +132 -0
  197. package/packages/piagent-core/runtime/inspection/workspace-source-projection.ts +96 -0
  198. package/packages/piagent-core/runtime/inspection/zero-turn-conformance.ts +175 -0
  199. package/packages/piagent-core/runtime/orchestration/owned-work-budget.ts +68 -4
  200. package/packages/piagent-core/runtime/policy/source-index-transaction.ts +173 -0
  201. package/packages/piagent-core/runtime/policy/source-mutation-guard-binding.ts +42 -0
  202. package/packages/piagent-core/runtime/policy/source-mutation-guard.ts +184 -0
  203. package/packages/piagent-core/runtime/policy/source-worktree-transaction.ts +105 -0
  204. package/packages/piagent-core/runtime/product/activity-inspector-footer.ts +5 -3
  205. package/packages/piagent-core/runtime/product/activity-inspector.ts +85 -343
  206. package/packages/piagent-core/runtime/recovery/resume-state.ts +38 -1
  207. package/packages/piagent-core/runtime/registration/activity-inspector-command.ts +68 -14
  208. package/packages/piagent-core/runtime/registration/task-start-tool.ts +13 -14
  209. package/packages/piagent-core/runtime/session/model-authorship-state.ts +31 -3
  210. package/packages/piagent-core/runtime/session/runtime-state.ts +11 -1
  211. package/packages/piagent-webui/dist/client/assets/index-DjMntaK5.js +172 -0
  212. package/packages/piagent-webui/dist/client/assets/index-DwKCWbwd.css +1 -0
  213. package/packages/piagent-webui/dist/client/index.html +16 -0
  214. package/packages/piagent-webui/extension/attachment-store.ts +323 -0
  215. package/packages/piagent-webui/extension/held-message-queue.ts +311 -0
  216. package/packages/piagent-webui/extension/lifecycle-controller.ts +408 -0
  217. package/packages/piagent-webui/extension/lifecycle-event-adapter.ts +23 -0
  218. package/packages/piagent-webui/extension/piagent-webui.ts +470 -0
  219. package/packages/piagent-webui/extension/review-controller.ts +160 -0
  220. package/packages/piagent-webui/extension/same-session-bridge.ts +500 -0
  221. package/packages/piagent-webui/extension/session-options-controller.ts +281 -0
  222. package/packages/piagent-webui/extension/session-stream-adapter.ts +249 -0
  223. package/packages/piagent-webui/extension/source-mutation-controller.ts +215 -0
  224. package/packages/piagent-webui/extension/source-open-controller.ts +136 -0
  225. package/packages/piagent-webui/extension/source-revert-controller.ts +189 -0
  226. package/packages/piagent-webui/extension/terminal-session-adapter.ts +73 -0
  227. package/packages/piagent-webui/extension/vscode-handoff.ts +51 -0
  228. package/packages/piagent-webui/gateway/control-socket.ts +92 -0
  229. package/packages/piagent-webui/gateway/gateway-events.ts +60 -0
  230. package/packages/piagent-webui/gateway/gateway-protocol-service.ts +64 -0
  231. package/packages/piagent-webui/gateway/gateway-service.ts +215 -0
  232. package/packages/piagent-webui/gateway/gateway-session-stream.ts +110 -0
  233. package/packages/piagent-webui/gateway/mcp-auth-broker.ts +158 -0
  234. package/packages/piagent-webui/gateway/native-project-picker.ts +29 -0
  235. package/packages/piagent-webui/gateway/pi-host.ts +41 -0
  236. package/packages/piagent-webui/gateway/profile-state.ts +1 -0
  237. package/packages/piagent-webui/gateway/project-registry.ts +108 -0
  238. package/packages/piagent-webui/gateway/provider-auth-broker.ts +172 -0
  239. package/packages/piagent-webui/gateway/session-catalog.ts +128 -0
  240. package/packages/piagent-webui/gateway/session-command-controller.ts +237 -0
  241. package/packages/piagent-webui/gateway/session-command-store.ts +224 -0
  242. package/packages/piagent-webui/gateway/session-inspection-registry.ts +204 -0
  243. package/packages/piagent-webui/gateway/session-lease-store.ts +1 -0
  244. package/packages/piagent-webui/gateway/session-metadata-store.ts +152 -0
  245. package/packages/piagent-webui/gateway/session-runtime-supervisor.ts +485 -0
  246. package/packages/piagent-webui/ownership/gateway-runtime-context.ts +8 -0
  247. package/packages/piagent-webui/ownership/profile-state.ts +117 -0
  248. package/packages/piagent-webui/ownership/session-lease-store.ts +329 -0
  249. package/packages/piagent-webui/ownership/session-refs.ts +8 -0
  250. package/packages/piagent-webui/package.json +33 -0
  251. package/packages/piagent-webui/server/README.md +4 -0
  252. package/packages/piagent-webui/server/benchmark-release-monitor.ts +230 -0
  253. package/packages/piagent-webui/server/core-inspection-provider.ts +403 -0
  254. package/packages/piagent-webui/server/gateway-websocket.ts +143 -0
  255. package/packages/piagent-webui/server/http-security.ts +27 -0
  256. package/packages/piagent-webui/server/ipc-read-model-client.ts +89 -0
  257. package/packages/piagent-webui/server/loopback-server.ts +368 -0
  258. package/packages/piagent-webui/server/read-model-provider.ts +37 -0
  259. package/packages/piagent-webui/server/read-only-router.ts +105 -0
  260. package/packages/piagent-webui/server/session-auth.ts +88 -0
  261. package/packages/piagent-webui/server/sidecar-main.ts +86 -0
  262. package/packages/piagent-webui/server/sse-hub.ts +76 -0
  263. package/packages/piagent-webui/server/static-bundle.ts +40 -0
  264. package/packages/piagent-webui/server/transcript-projection.ts +110 -0
  265. package/schemas/mutation-provenance-record.schema.json +100 -0
  266. package/schemas/piagent-webui/approval-v1.schema.json +654 -0
  267. package/schemas/piagent-webui/attachment-v1.schema.json +267 -0
  268. package/schemas/piagent-webui/capabilities-v1.schema.json +729 -0
  269. package/schemas/piagent-webui/catalog-v1.json +240 -0
  270. package/schemas/piagent-webui/commit-summary-v1.schema.json +63 -0
  271. package/schemas/piagent-webui/common-v1.schema.json +479 -0
  272. package/schemas/piagent-webui/control-command-v1.schema.json +1780 -0
  273. package/schemas/piagent-webui/diff-v1.schema.json +826 -0
  274. package/schemas/piagent-webui/gateway-capabilities-v1.schema.json +136 -0
  275. package/schemas/piagent-webui/gateway-protocol-v1.schema.json +456 -0
  276. package/schemas/piagent-webui/handoff-history-v1.schema.json +92 -0
  277. package/schemas/piagent-webui/model-catalog-v1.schema.json +95 -0
  278. package/schemas/piagent-webui/queue-v1.schema.json +99 -0
  279. package/schemas/piagent-webui/recovery-history-v1.schema.json +144 -0
  280. package/schemas/piagent-webui/release-monitor-v1.schema.json +173 -0
  281. package/schemas/piagent-webui/review-state-v1.schema.json +206 -0
  282. package/schemas/piagent-webui/runtime-event-v2.schema.json +5206 -0
  283. package/schemas/piagent-webui/session-catalog-v1.schema.json +222 -0
  284. package/schemas/piagent-webui/session-command-v1.schema.json +390 -0
  285. package/schemas/piagent-webui/snapshot-v1.schema.json +2622 -0
  286. package/schemas/piagent-webui/source-change-v1.schema.json +763 -0
  287. package/schemas/piagent-webui/source-mutation-v1.schema.json +96 -0
  288. package/schemas/piagent-webui/source-revert-v1.schema.json +130 -0
  289. package/schemas/piagent-webui/subagent-tree-v1.schema.json +88 -0
  290. package/schemas/piagent-webui/task-index-v1.schema.json +74 -0
  291. package/schemas/piagent-webui/task-timeline-v1.schema.json +49 -0
  292. package/schemas/piagent-webui/transcript-v1.schema.json +243 -0
  293. package/schemas/task-baseline-manifest.schema.json +122 -0
  294. package/schemas/verifier-file-snapshot.schema.json +81 -0
  295. package/scripts/check-architecture.mjs +1 -0
  296. package/scripts/check-doc-languages.mjs +19 -2
  297. package/scripts/check-third-party-neutrality.mjs +43 -0
  298. package/scripts/install-global.sh +1 -1
  299. package/scripts/piagent-cli.mjs +17 -3
  300. package/scripts/piagent-dashboard.mjs +208 -0
  301. package/scripts/piagent-webui-launcher.mjs +121 -0
  302. package/scripts/typescript-loader.mjs +26 -1
  303. package/scripts/verify-local.sh +253 -0
  304. package/scripts/verify-release-identity.mjs +4 -1
package/CHANGELOG.md CHANGED
@@ -2,9 +2,62 @@
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
- ## Unreleased
6
-
7
- No changes after the `v1.3.0` stable boundary.
5
+ ## v1.4.0 - 2026-08-15
6
+
7
+ ### Local Session Hub and WebUI
8
+
9
+ - Added a local, one-per-profile Gateway and `piagent dashboard` experience for
10
+ creating, reopening, resuming, renaming, pinning, archiving, unarchiving, and
11
+ forking durable Pi sessions without starting an extra model turn for views.
12
+ - Rebuilt the browser client as a conversation-first MUI application with a
13
+ compact composer, project and model controls, light/dark themes, Vietnamese
14
+ and English UI, responsive layouts, and an Agent Inspector for tasks, source
15
+ changes, activity, verification, usage, and handoff evidence.
16
+ - Added exact Gateway-owned chat streaming, held-message queues, bounded
17
+ attachments, model/thinking controls, lifecycle controls, and Pi-owned
18
+ approval cards while preserving one authoritative writer per session.
19
+
20
+ ### Source review, recovery, and security
21
+
22
+ - Added Task Changes, Working Tree, and Staged projections with bounded diffs,
23
+ provenance, criterion/verifier links, protected-path enforcement, and guarded
24
+ stage, unstage, revert, and editor handoff actions.
25
+ - Added durable session leases, terminal compatibility ownership, restart and
26
+ stale-owner recovery, idempotent command receipts, replay/resync, doctor with
27
+ explicit repair, and corrupt-state fail-closed behavior.
28
+ - Hardened the TypeScript loader, local control socket creation, runtime
29
+ integrity inventory, browser authentication, redaction, event bounds, and
30
+ provider/MCP credential handling.
31
+
32
+ ### Documentation and release gates
33
+
34
+ - Classified every root operating document by language, retained canonical
35
+ English/Vietnamese entry points, and added a gate that rejects unclassified
36
+ or unindexed Vietnamese documentation.
37
+ - Added a provider-neutral product-language gate while retaining third-party
38
+ names only where they describe real integrations, dependencies, or operator
39
+ commands.
40
+ - Added the executable WUI5-18 release matrix covering durable sessions,
41
+ ownership, recovery, approvals, protected data, transport validation,
42
+ accessibility, themes, and zero-model-turn navigation.
43
+
44
+ ## v1.3.1 - 2026-08-13
45
+
46
+ ### Security and reliability hardening
47
+
48
+ - Extended the capability integrity inventory to include the TypeScript loader,
49
+ CLI dispatcher, and the remaining task-state, verification, and backend
50
+ decision modules that can affect runtime enforcement.
51
+ - Replaced repeated full-file capability hashing on every tool call with a
52
+ fail-closed metadata cache. Session start may re-pin an unchanged grant to a
53
+ new installed build; build drift discovered during a running session blocks
54
+ that session until restart instead of silently rewriting its lock.
55
+ - Removed shell interpolation from the `pdftotext` availability probe while
56
+ preserving the existing PDF extraction behavior.
57
+ - Made local JSONL state locks publish their complete owner atomically and
58
+ recover a hard-killed normal writer without exposing an empty lock. Recovery
59
+ ownership is deliberately fail-closed: if that recovery process itself is
60
+ killed, an operator must remove its `.recovery` lock before writes resume.
8
61
 
9
62
  ## v1.3.0 - 2026-08-12
10
63
 
package/README.md CHANGED
@@ -248,8 +248,8 @@ Handled by Pi's native UI: `/model` or `Ctrl+L` to pick, `Ctrl+P` to cycle the s
248
248
  | Preset | Includes |
249
249
  |---|---|
250
250
  | `core` | Context7, Chrome DevTools, GitHub |
251
- | `popular` | core + Playwright + Figma remote |
252
- | `all` | popular + Figma desktop/local |
251
+ | `popular` | core + Playwright + Figma desktop/local |
252
+ | `all` | popular + Figma remote (requires an approved Figma MCP client) |
253
253
 
254
254
  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.
255
255
 
@@ -343,7 +343,7 @@ This repository intentionally excludes:
343
343
 
344
344
  ## Maturity
345
345
 
346
- 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.3.0` or a reviewed commit.
346
+ 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.4.0` or a reviewed commit.
347
347
 
348
348
  Ready for:
349
349
 
@@ -43,6 +43,48 @@
43
43
  "packages/piagent-core/benchmark"
44
44
  ]
45
45
  },
46
+ {
47
+ "name": "webui-contracts",
48
+ "roots": [
49
+ "packages/piagent-webui/contracts"
50
+ ]
51
+ },
52
+ {
53
+ "name": "webui-client",
54
+ "roots": [
55
+ "packages/piagent-webui/client"
56
+ ]
57
+ },
58
+ {
59
+ "name": "webui-server",
60
+ "roots": [
61
+ "packages/piagent-webui/server"
62
+ ]
63
+ },
64
+ {
65
+ "name": "webui-extension",
66
+ "roots": [
67
+ "packages/piagent-webui/extension"
68
+ ]
69
+ },
70
+ {
71
+ "name": "webui-gateway",
72
+ "roots": [
73
+ "packages/piagent-webui/gateway"
74
+ ]
75
+ },
76
+ {
77
+ "name": "webui-ownership",
78
+ "roots": [
79
+ "packages/piagent-webui/ownership"
80
+ ]
81
+ },
82
+ {
83
+ "name": "webui-build",
84
+ "roots": [
85
+ "packages/piagent-webui"
86
+ ]
87
+ },
46
88
  {
47
89
  "name": "entrypoints",
48
90
  "roots": [
@@ -86,6 +128,49 @@
86
128
  "benchmark": [
87
129
  "benchmark"
88
130
  ],
131
+ "webui-contracts": [
132
+ "webui-contracts"
133
+ ],
134
+ "webui-client": [
135
+ "webui-client",
136
+ "webui-contracts"
137
+ ],
138
+ "webui-server": [
139
+ "webui-server",
140
+ "webui-contracts",
141
+ "runtime",
142
+ "core",
143
+ "security",
144
+ "benchmark"
145
+ ],
146
+ "webui-extension": [
147
+ "webui-extension",
148
+ "webui-server",
149
+ "webui-ownership",
150
+ "runtime",
151
+ "core",
152
+ "security"
153
+ ],
154
+ "webui-gateway": [
155
+ "webui-gateway",
156
+ "webui-ownership",
157
+ "webui-server",
158
+ "webui-contracts",
159
+ "runtime",
160
+ "core",
161
+ "security"
162
+ ],
163
+ "webui-ownership": [
164
+ "webui-ownership"
165
+ ],
166
+ "webui-build": [
167
+ "webui-build",
168
+ "webui-contracts",
169
+ "webui-client",
170
+ "webui-server",
171
+ "webui-gateway",
172
+ "webui-ownership"
173
+ ],
89
174
  "entrypoints": [
90
175
  "entrypoints",
91
176
  "runtime",
@@ -93,7 +178,10 @@
93
178
  "mcp",
94
179
  "capabilities",
95
180
  "security",
96
- "benchmark"
181
+ "benchmark",
182
+ "webui-gateway",
183
+ "webui-ownership",
184
+ "webui-server"
97
185
  ]
98
186
  },
99
187
  "lineBudgets": {
@@ -105,6 +193,13 @@
105
193
  "capabilities": 1200,
106
194
  "security": 400,
107
195
  "benchmark": 1000,
196
+ "webui-contracts": 2000,
197
+ "webui-client": 500,
198
+ "webui-server": 500,
199
+ "webui-extension": 500,
200
+ "webui-gateway": 500,
201
+ "webui-ownership": 500,
202
+ "webui-build": 500,
108
203
  "entrypoints": 800
109
204
  },
110
205
  "files": {
package/docs/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # Documentation languages
2
+ <!-- language: en+vi -->
2
3
 
3
4
  [English](en/README.md) | [Tiếng Việt](vi/README.md)
4
5
 
@@ -1,4 +1,5 @@
1
1
  # Architecture documentation
2
+ <!-- language: en+vi -->
2
3
 
3
4
  - [English architecture](en/architecture.md)
4
5
  - [Architecture tiếng Việt](vi/architecture.md)
@@ -1,4 +1,5 @@
1
1
  # Capability authority manifest
2
+ <!-- language: en -->
2
3
 
3
4
  The capability authority manifest is the versioned policy source for Piagent
4
5
  1.3 tasks. It includes every shipped capability without granting every
@@ -1,4 +1,5 @@
1
1
  # Solo-first orchestration policy
2
+ <!-- language: vi; english-index: docs-site/content/en/workflows.html -->
2
3
 
3
4
  Mục tiêu: user không phải nhớ `/run`, `/parallel`, `/chain` cho workflow hằng ngày, nhưng platform cũng không tự biến mọi task thành swarm tốn token. Khi anh gõ `/workflow task`, `/workflow be-to-fe`, `/workflow platform-improve`, `/workflow plan`, hoặc `/workflow review`, parent agent đọc `piagent_orchestration_policy`, giữ mặc định **solo-first**, rồi chỉ dùng subagents nếu việc đó giúp giảm nhiễu context, tăng tốc read-heavy work, hoặc tăng chất lượng review. Alias cũ như `/task` vẫn giữ cùng policy.
4
5
 
@@ -1,4 +1,5 @@
1
1
  # Capability packs
2
+ <!-- language: vi; english-index: docs-site/content/en/scope.html -->
2
3
 
3
4
  ## Tổng quan
4
5
 
@@ -178,7 +179,7 @@ Lock pin hai thứ khác nhau, và khi lệch thì câu trả lời cũng khác
178
179
  - `packs` — name, version, origin, source, owner, lifecycle và digest của manifest. Manifest khai luôn `provides`, nên artifact xuất hiện thêm, biến mất hoặc đổi path đều nằm ở nhánh này;
179
180
  - permission theo hướng: granting key (`capabilities`, `filesystemRead`, `filesystemWrite`, `networkDomains`, `externalActions`) chặn khi **thêm**; restricting key (`protectedPaths`, `readOnlyPaths`, `shellProtectedPaths`) chặn khi **mất**.
180
181
 
181
- **Build — platform đổi bản, lock được ghi lại và báo, session chạy tiếp (`repin`):**
182
+ **Build — platform đổi bản, lock chỉ được ghi lại tại session start có kiểm soát (`repin`):**
182
183
 
183
184
  - `core.packageVersion`, `core.runtimeFiles`, `core.packageDigest`;
184
185
  - nội dung artifact (`artifacts[].digest`).
@@ -187,6 +188,13 @@ Vì sao nội dung artifact nằm ở nhánh build: adapter policy file, base po
187
188
 
188
189
  Việc pin build cũng chưa bao giờ chống được trường hợp nó trông giống: code kiểm tra lock chính là một trong các file mà lock pin, nên thứ gì sửa được platform đã cài thì sửa luôn được checker.
189
190
 
191
+ Session start thực hiện full verification và có thể ghi lại build mới nếu grant
192
+ không đổi. Sau khi session đã bind với một build digest, drift mới phát hiện giữa
193
+ phiên sẽ chặn tool call và yêu cầu restart; một session khác re-pin build mới
194
+ không làm session cũ tự chuyển identity. Mỗi tool call vẫn kiểm tra integrity,
195
+ nhưng đường bình thường dùng fingerprint metadata mạnh; bất kỳ thay đổi, lỗi
196
+ metadata, symlink hoặc catalog/profile/lock drift nào đều quay lại full hash.
197
+
190
198
  ## Lifecycle
191
199
 
192
200
  | Trạng thái | Ý nghĩa |
@@ -249,7 +257,7 @@ Khai source không cấp quyền gì. Pack ngoài vẫn phải qua `capabilityPo
249
257
  ## Giới hạn hiện tại
250
258
 
251
259
  - Catalog là local file, chưa có remote discovery service. Catalog chỉ chứa pack của platform; pack ngoài xuất hiện trong lock của project.
252
- - Lock là preflight và integrity contract; runtime guard xác minh lại trước mỗi tool call đối với profile hiện hành. `PIAGENT_PROFILE` trusted override và legacy profile chưa khai `capabilityPacks` nằm ngoài lock gate; khi lock lỗi chỉ nhóm recovery/read-only tool giới hạn được phép hoạt động.
260
+ - Lock là preflight và integrity contract; runtime guard kiểm tra lại trước mỗi tool call đối với profile hiện hành, dùng cache metadata fail-closed và full hash khi cache không còn hợp lệ. `PIAGENT_PROFILE` trusted override và legacy profile chưa khai `capabilityPacks` nằm ngoài lock gate; khi lock lỗi chỉ nhóm recovery/read-only tool giới hạn được phép hoạt động.
253
261
  - Eval scenario mới có schema và validation; execution matrix được triển khai ở phase tiếp theo.
254
262
  - Recipe binding nội bộ và eval scenario ID được kiểm tra trong exact dependency graph; capability binding vẫn do runtime tool registry giải quyết.
255
263
  - External action proposal chỉ được validate; authorization, artifact byte verification và executor có credential không nằm trong phạm vi này.
@@ -1,4 +1,5 @@
1
1
  # Command reference tiếng Việt
2
+ <!-- language: vi; english-index: docs-site/content/en/commands.html -->
2
3
 
3
4
  > Nếu cần flow đầy đủ theo thứ tự dùng thật, đọc `docs/operator-manual-vietnamese.md`. File này chỉ là bảng tra cứu command.
4
5
 
@@ -309,7 +310,7 @@ Các command này thuộc Pi core hoặc package Pi chính. Tên/availability c
309
310
  | `/mcp setup` | Setup/refresh MCP | Khi MCP chưa nhận config. | Tùy adapter/version. |
310
311
  | `/mcp tools` | List MCP tools | Muốn biết server expose tool nào. | Dùng trước khi bảo agent gọi tool ngoài. |
311
312
  | `/mcp reconnect` | Kết nối lại MCP | Khi server lỗi, token mới, hoặc config đổi. | Không thay thế việc export secret env. |
312
- | `/mcp-auth figma` | OAuth Figma MCP | Khi dùng Figma remote MCP. | Có thể khác theo Figma/Pi MCP package version. |
313
+ | `/mcp-auth figma` | OAuth Figma remote MCP | Chỉ dùng khi Piagent đã được duyệt trong Figma MCP Catalog. | Nếu bị từ chối client, dùng `figma-desktop`. |
313
314
  | `/piagent-mcp` | Menu MCP | Không nhớ subcommand, hoặc muốn xem có việc gì cần làm. | Menu dựng theo project; không có select UI thì in thẳng bảng trạng thái. |
314
315
  | `/piagent-mcp status` | Danh sách MCP server + state | Muốn biết server nào đang có, ở scope nào, sẵn sàng chưa. | Đọc config, không kiểm tra kết nối live — cái đó là `/mcp`. |
315
316
  | `/piagent-mcp get <name>` | Chi tiết một server | Trước khi duyệt, hoặc khi không rõ scope nào đang có hiệu lực. | Giá trị credential bị mask; `${VAR}` in nguyên vì là tên biến. |
@@ -501,8 +502,8 @@ Các lệnh này chạy ngoài Pi.
501
502
  | Command | Dùng khi nào |
502
503
  |---|---|
503
504
  | `npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.84.1` | Cài Pi CLI tương thích với release hiện tại. |
504
- | `npm install -g --ignore-scripts @piagent/platform@1.3.0` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
505
- | `pi install git:github.com/Vt-mmm/piagent@v1.3.0` | Cài pinned release khi cần reproducible team setup. |
505
+ | `npm install -g --ignore-scripts @piagent/platform@1.4.0` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
506
+ | `pi install git:github.com/Vt-mmm/piagent@v1.4.0` | Cài pinned release khi cần reproducible team setup. |
506
507
  | `pi install git:github.com/Vt-mmm/piagent` | Cài latest package platform cho máy cá nhân/sandbox. |
507
508
  | `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ì. |
508
509
  | `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. |
@@ -533,7 +534,7 @@ Các lệnh này chạy ngoài Pi.
533
534
  | `piagent-route --prompt-file <file> --execute --yes -- --approve` | Explicit prelaunch adaptive task; giữ hard pin và fail closed nếu preflight/catalog không đủ. |
534
535
  | `piagent-model-scope --preset full` | Re-apply full provider model scope. |
535
536
  | `piagent-mcp --preset core --scope global --replace` | Apply the governed MCP core baseline: Context7, Chrome DevTools, GitHub. |
536
- | `piagent-mcp --preset popular --scope global --replace` | Apply the governed MCP popular baseline: core + Playwright + Figma remote. |
537
+ | `piagent-mcp --preset popular --scope global --replace` | Apply the governed MCP popular baseline: core + Playwright + Figma desktop. |
537
538
  | `piagent-mcp --list` | List MCP presets. |
538
539
  | `piagent-subagents --preset safe` | Re-apply subagent safe config. |
539
540
  | `pi install npm:pi-web-access@0.17.0` | Cấp web/search/fetch tools cho builtin `researcher`; platform setup/update cài mặc định từ `v1.2.8`. |
@@ -1,4 +1,5 @@
1
1
  # Pi Context Engine
2
+ <!-- language: vi; english-index: docs-site/content/en/context-engine.html -->
2
3
 
3
4
  ## Mục tiêu
4
5
 
@@ -1,4 +1,5 @@
1
1
  # Context-window policy
2
+ <!-- language: vi; english-index: docs-site/content/en/runtime.html -->
2
3
 
3
4
  ## Mục tiêu
4
5
 
@@ -1,4 +1,5 @@
1
1
  # Distribution standard
2
+ <!-- language: vi; english-index: docs-site/content/en/team.html -->
2
3
 
3
4
  ## Nguyên tắc
4
5
 
@@ -14,9 +15,9 @@ Repo này phải chạy được cho nhiều project/domain khác nhau. Vì vậ
14
15
 
15
16
  | Use case | Package source |
16
17
  |---|---|
17
- | Team pinned release | `git:github.com/Vt-mmm/piagent@v1.3.0` |
18
+ | Team pinned release | `git:github.com/Vt-mmm/piagent@v1.4.0` |
18
19
  | Personal/sandbox dev | `git:github.com/Vt-mmm/piagent` |
19
- | Registry distribution | `npm:@piagent/platform@1.3.0` |
20
+ | Registry distribution | `npm:@piagent/platform@1.4.0` |
20
21
  | Enterprise npm (fork under another scope) | `npm:@your-scope/platform@x.y.z` |
21
22
  | Local platform dev | `/path/to/piagent` |
22
23
 
@@ -26,7 +27,7 @@ Latest tiện cho máy cá nhân muốn nhận cập nhật nhanh. Pin tag/commi
26
27
 
27
28
  | Channel | Command | Target | Policy |
28
29
  |---|---|---|---|
29
- | `stable` | `bash scripts/install-global.sh --stable` | Helper release tag resolved to commit SHA, currently `v1.3.0` | Install the Pi package matching the helper. |
30
+ | `stable` | `bash scripts/install-global.sh --stable` | Helper release tag resolved to commit SHA, currently `v1.4.0` | Install the Pi package matching the helper. |
30
31
  | `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
32
  | `dev` | `bash scripts/install-global.sh --dev` | Moving Git source | Personal/sandbox only; do not commit into project settings. |
32
33
  | `local` | `bash scripts/install-global.sh --local` | Current checkout path | Platform development only. |
@@ -53,7 +54,7 @@ Root `package.json` có `pi` manifest trỏ tới:
53
54
  Do đó team có thể:
54
55
 
55
56
  ```bash
56
- pi install git:github.com/Vt-mmm/piagent@v1.3.0
57
+ pi install git:github.com/Vt-mmm/piagent@v1.4.0
57
58
  ```
58
59
 
59
60
  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 +66,12 @@ Team nên install global package một lần:
65
66
  ```bash
66
67
  node --version # >= 22.19.0
67
68
  npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.84.1
68
- npm install -g --ignore-scripts @piagent/platform@1.3.0
69
+ npm install -g --ignore-scripts @piagent/platform@1.4.0
69
70
  piagent-install --stable --dry-run
70
71
  piagent-install --stable
71
72
  ```
72
73
 
73
- `pi install git:github.com/Vt-mmm/piagent@v1.3.0` 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.3.0`.
74
+ `pi install git:github.com/Vt-mmm/piagent@v1.4.0` 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.4.0`.
74
75
 
75
76
  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
77
 
@@ -120,7 +121,7 @@ Nếu muốn commit sẵn `.pi/piagent-profile.json` vào repo hoặc bootstrap
120
121
  ```bash
121
122
  bash scripts/setup.sh /path/to/project \
122
123
  --profile be-readonly-fe \
123
- --package-source git:github.com/Vt-mmm/piagent@v1.3.0 \
124
+ --package-source git:github.com/Vt-mmm/piagent@v1.4.0 \
124
125
  --mcp-preset core \
125
126
  --subagents-preset safe
126
127
  ```
@@ -1,4 +1,5 @@
1
1
  # Herdr workflow
2
+ <!-- language: vi; english-index: docs-site/content/en/workflows.html -->
2
3
 
3
4
  ## Mục tiêu
4
5
 
@@ -1,4 +1,5 @@
1
1
  # MCP và tool policy
2
+ <!-- language: vi; english-index: docs-site/content/en/mcp.html -->
2
3
 
3
4
  ## Kết luận hiện tại
4
5
 
@@ -85,12 +86,14 @@ Chặn theo hai lớp: tên field nghe như credential, và giá trị tự nó
85
86
 
86
87
  ## Login vào account MCP
87
88
 
88
- Platform **không tự chạy OAuth và không giữ token**. `pi-mcp-adapter` đã sở hữu luồng đó — nó đăng ký `/mcp` và `/mcp-auth`, giữ callback server và OAuth provider — và dựng kho credential thứ ba cho credential của bên khác là lựa chọn tệ hơn. Việc của platform là phát hiện và chỉ đường:
89
+ Platform **không tự giữ token**. WebUI chỉ điều phối luồng OAuth do `pi-mcp-adapter` sở hữu; adapter giữ callback server, OAuth provider và credential store. Remote server vẫn có thể giới hạn client nào được phép đăng ký.
89
90
 
90
91
  ```text
91
- /mcp-auth figma
92
+ /mcp-auth <approved-remote-server>
92
93
  ```
93
94
 
95
+ Figma Desktop không cần OAuth. Figma Remote chỉ dùng được sau khi Piagent có trong Figma MCP Catalog.
96
+
94
97
  `/piagent-mcp doctor` (hoặc `piagent-mcp doctor` ngoài terminal) phân loại từng server:
95
98
 
96
99
  | State | Nghĩa |
@@ -227,7 +230,7 @@ Trong Pi:
227
230
  /mcp setup
228
231
  /mcp tools
229
232
  /mcp reconnect
230
- /mcp-auth figma
233
+ /mcp-auth <approved-remote-server>
231
234
  ```
232
235
 
233
236
  ## MCP config layers
@@ -257,12 +260,12 @@ Quy ước của platform:
257
260
  | `docs` | Context7 | docs mới của framework/library |
258
261
  | `browser` | Chrome DevTools, Playwright | inspect UI/runtime/browser automation |
259
262
  | `github` | GitHub MCP | issue/PR/repo/release workflow |
260
- | `design` | Figma remote | design-to-code qua Figma OAuth |
261
- | `design-local` | Figma desktop | Figma desktop Dev Mode MCP local |
263
+ | `design` | Figma desktop | design-to-code qua Figma desktop Dev Mode MCP |
264
+ | `design-local` | Figma desktop | alias tương thích cho preset local cũ |
262
265
  | `web` | Context7, Chrome DevTools, Playwright | FE/web workflow |
263
266
  | `core` | Context7, Chrome DevTools, GitHub | default team baseline |
264
- | `popular` | core + Playwright + Figma remote | baseline nhiều team dev dùng |
265
- | `all` | popular + Figma desktop | đầy đủ, dùng khi muốn sẵn cả local Figma |
267
+ | `popular` | core + Playwright + Figma desktop | baseline nhiều team dev dùng |
268
+ | `all` | popular + Figma remote | thêm cấu hình remote cho client đã được Figma duyệt |
266
269
 
267
270
  ## Server baseline
268
271
 
@@ -300,7 +303,7 @@ export CONTEXT7_API_KEY=ctx7sk_...
300
303
 
301
304
  ### Figma
302
305
 
303
- Remote MCP:
306
+ Remote MCP (chỉ dùng được khi client đã được Figma duyệt trong MCP Catalog):
304
307
 
305
308
  ```json
306
309
  {
@@ -331,7 +334,9 @@ Local desktop MCP:
331
334
 
332
335
  Khuyến nghị thực tế:
333
336
 
334
- - dùng remote Figma MCP khi account/org hỗ trợ OAuth;
337
+ - Piagent mặc định dùng desktop local vì Figma Remote hiện chỉ chấp nhận các client có trong Figma MCP Catalog;
338
+ - lỗi `mcp-oauth-client-not-approved` nghĩa là Figma từ chối đăng ký client, không phải lỗi account hay token của người dùng;
339
+ - dùng remote Figma MCP sau khi Piagent được Figma duyệt;
335
340
  - dùng desktop local khi cần selection-based Dev Mode trong app Figma;
336
341
  - nếu muốn Pi-native thay vì MCP, có thể cài `pi install npm:pi-mono-figma@0.2.2` sau khi hoàn tất security và license review.
337
342
 
@@ -1,4 +1,5 @@
1
1
  # Memory policy cho Pi Agent Platform
2
+ <!-- language: vi; english-index: docs-site/content/en/runtime.html -->
2
3
 
3
4
  ## Tóm tắt quyết định
4
5
 
@@ -1,4 +1,5 @@
1
1
  # Model selector and scope
2
+ <!-- language: vi; english-index: docs-site/content/en/quickstart.html -->
2
3
 
3
4
  Pi Agent Platform không khóa vào một provider. Hai họ model dưới đây đều là first-class option: **model OpenAI Codex** (provider id `openai-codex`) và **model Claude của Anthropic** (provider id `anthropic`).
4
5
 
@@ -1,4 +1,5 @@
1
1
  # OAuth providers trong Pi
2
+ <!-- language: vi; english-index: docs-site/content/en/mcp-auth.html -->
2
3
 
3
4
  ## Mục tiêu
4
5
 
@@ -1,4 +1,5 @@
1
1
  # Pi Agent Platform - Operator manual tiếng Việt
2
+ <!-- language: vi; english-index: docs-site/content/en/index.html -->
2
3
 
3
4
  ## Mục tiêu
4
5
 
@@ -18,12 +19,12 @@ Support matrix release hiện tại: macOS Apple Silicon + Bash và Linux x64 +
18
19
  ```bash
19
20
  node --version # >= 22.19.0
20
21
  npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.84.1
21
- npm install -g --ignore-scripts @piagent/platform@1.3.0
22
+ npm install -g --ignore-scripts @piagent/platform@1.4.0
22
23
  piagent-install --stable --dry-run
23
24
  piagent-install --stable
24
25
  ```
25
26
 
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.3.0`. Máy cá nhân có thể dùng `git:github.com/Vt-mmm/piagent` để theo latest.
27
+ 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.4.0`. Máy cá nhân có thể dùng `git:github.com/Vt-mmm/piagent` để theo latest.
27
28
 
28
29
  Nếu đang ở source checkout của platform, dùng helper theo channel để preview trước khi đổi:
29
30
 
@@ -99,7 +100,7 @@ install package once
99
100
 
100
101
  ```bash
101
102
  npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.84.1
102
- npm install -g --ignore-scripts @piagent/platform@1.3.0
103
+ npm install -g --ignore-scripts @piagent/platform@1.4.0
103
104
  piagent-install --stable --dry-run
104
105
  piagent-install --stable
105
106
  ```
@@ -282,7 +283,7 @@ Không phải daily default. Dùng khi muốn tạo sẵn `.pi` files cho projec
282
283
  bash /path/to/piagent/scripts/setup.sh /path/to/project \
283
284
  --project-only \
284
285
  --profile auto \
285
- --package-source git:github.com/Vt-mmm/piagent@v1.3.0 \
286
+ --package-source git:github.com/Vt-mmm/piagent@v1.4.0 \
286
287
  --mcp-preset core \
287
288
  --subagents-preset safe
288
289
  ```
@@ -821,12 +822,12 @@ session mới để usage/prompt/change evidence không bị trộn.
821
822
  | `docs` | Context7 | Cần docs framework/library mới. |
822
823
  | `browser` | Chrome DevTools, Playwright | FE/browser/runtime inspection. |
823
824
  | `github` | GitHub MCP | Issue/PR/repo/release workflow. |
824
- | `design` | Figma remote | Design-to-code qua Figma OAuth. |
825
- | `design-local` | Figma desktop | Figma Dev Mode local selection. |
825
+ | `design` | Figma desktop | Design-to-code qua Figma Dev Mode local. |
826
+ | `design-local` | Figma desktop | Alias tương thích cho preset local cũ. |
826
827
  | `web` | Context7 + browser tools | Web/FE default. |
827
828
  | `core` | Context7, Chrome DevTools, GitHub | Team baseline. |
828
- | `popular` | core + Playwright + Figma remote | Full dev baseline. |
829
- | `all` | popular + Figma desktop | Cần cả remote + local design. |
829
+ | `popular` | core + Playwright + Figma desktop | Full dev baseline. |
830
+ | `all` | popular + Figma remote | Thêm remote cho client đã được Figma duyệt. |
830
831
 
831
832
  ### Cấu hình global
832
833
 
@@ -864,9 +865,11 @@ node /path/to/piagent/scripts/mcp-manage.mjs \
864
865
  /mcp setup
865
866
  /mcp tools
866
867
  /mcp reconnect
867
- /mcp-auth figma
868
+ /mcp-auth <approved-remote-server>
868
869
  ```
869
870
 
871
+ `figma-desktop` không cần OAuth. Figma Remote chỉ chấp nhận client đã được duyệt trong Figma MCP Catalog.
872
+
870
873
  ### Config layers
871
874
 
872
875
  | File | Scope | Ghi chú |
@@ -1039,8 +1042,8 @@ Watchdog là optional adversarial reviewer ở cuối turn, không bật mặc
1039
1042
 
1040
1043
  | Command | Dùng để |
1041
1044
  |---|---|
1042
- | `npm install -g --ignore-scripts @piagent/platform@1.3.0` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
1043
- | `pi install git:github.com/Vt-mmm/piagent@v1.3.0` | Install pinned release cho reproducible team setup. |
1045
+ | `npm install -g --ignore-scripts @piagent/platform@1.4.0` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
1046
+ | `pi install git:github.com/Vt-mmm/piagent@v1.4.0` | Install pinned release cho reproducible team setup. |
1044
1047
  | `pi install git:github.com/Vt-mmm/piagent` | Install latest platform package cho máy cá nhân/sandbox. |
1045
1048
  | 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). |
1046
1049
  | 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. |
@@ -1152,7 +1155,7 @@ Mở lại Pi session sau khi install.
1152
1155
  Cài lại terminal helper đúng release rồi kiểm tra `PATH`:
1153
1156
 
1154
1157
  ```bash
1155
- npm install -g --ignore-scripts @piagent/platform@1.3.0
1158
+ npm install -g --ignore-scripts @piagent/platform@1.4.0
1156
1159
  command -v piagent-install
1157
1160
  ```
1158
1161
 
@@ -1,4 +1,5 @@
1
1
  # Package architecture notes
2
+ <!-- language: en -->
2
3
 
3
4
  This path is retained for stable links. The maintained architecture documents are:
4
5
 
@@ -1,4 +1,5 @@
1
1
  # Project adapters
2
+ <!-- language: vi; english-index: docs-site/content/en/profiles.html -->
2
3
 
3
4
  ## Mục tiêu
4
5
 
@@ -1,4 +1,5 @@
1
1
  # Project onboarding snapshot
2
+ <!-- language: vi; english-index: docs-site/content/en/team.html -->
2
3
 
3
4
  ## Mục tiêu
4
5
 
@@ -1,4 +1,5 @@
1
1
  # Publish cho team dùng
2
+ <!-- language: vi; english-index: docs-site/content/en/team.html -->
2
3
 
3
4
  ## Mục tiêu
4
5
 
@@ -1,4 +1,5 @@
1
1
  # Quality benchmark guide
2
+ <!-- language: vi; english-index: docs-site/content/en/benchmark.html -->
2
3
 
3
4
  ## Chạy và chấm tự động bằng một lệnh
4
5
 
@@ -1,4 +1,5 @@
1
1
  # Quickstart tiếng Việt
2
+ <!-- language: vi; english-index: docs-site/content/en/quickstart.html -->
2
3
 
3
4
  > Nếu cần hướng dẫn đầy đủ từ setup, command, token/session, MCP đến subagents, xem `docs/operator-manual-vietnamese.md`.
4
5
 
@@ -50,14 +51,14 @@ Xong. Từ đây project nào cũng chỉ cần `cd` vào rồi gõ `pi`.
50
51
 
51
52
  Rollout team pin từng bước, update, rollback, và channel `--dev` cho máy cá nhân: [release-install-policy.md](release-install-policy.md).
52
53
 
53
- ## Bước 2 — login OAuth provider model (OpenAI/ChatGPT hoặc Anthropic)
54
+ ## Bước 2 — login OAuth provider model đã chọn
54
55
 
55
56
  ```bash
56
57
  pi
57
58
  /login
58
59
  ```
59
60
 
60
- Chọn provider cho họ model muốn dùng trong danh sách Pi: OpenAI/ChatGPT cho model Codex, hoặc Anthropic cho model Claude. Token được lưu local trong Pi agent dir, không nằm trong repo.
61
+ Chọn đúng provider được Pi liệt kê cho model cần dùng và hoàn tất flow OAuth tương ứng. Token được lưu local trong Pi agent dir, không nằm trong repo.
61
62
 
62
63
  ## Bước 3 — chọn model và chạy project onboarding
63
64