@piagent/platform 1.37.1 → 1.38.2

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 (283) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/README.md +5 -3
  3. package/README.vi.md +2 -2
  4. package/catalog/capabilities.json +2 -2
  5. package/docs/command-reference-vietnamese.md +4 -3
  6. package/docs/distribution-standard.md +6 -6
  7. package/docs/en/maintainer-guide.md +8 -0
  8. package/docs/en/workspace-editor.md +222 -0
  9. package/docs/languages.json +13 -4
  10. package/docs/operator-manual-vietnamese.md +7 -7
  11. package/docs/publishing-for-teams.md +3 -0
  12. package/docs/release-install-policy.md +2 -2
  13. package/docs/research/ide-m0-spike.md +101 -0
  14. package/docs/team-onboarding.md +2 -2
  15. package/docs/vi/maintainer-guide.md +8 -0
  16. package/docs/vi/workspace-editor.md +217 -0
  17. package/docs-site/architecture.html +1 -1
  18. package/docs-site/benchmark.html +1 -1
  19. package/docs-site/commands.html +1 -1
  20. package/docs-site/content/en/index.html +4 -4
  21. package/docs-site/content/en/whats-new.html +23 -0
  22. package/docs-site/content/index.html +4 -4
  23. package/docs-site/content/whats-new.html +23 -0
  24. package/docs-site/context-engine.html +1 -1
  25. package/docs-site/ecosystem.html +1 -1
  26. package/docs-site/en/architecture.html +1 -1
  27. package/docs-site/en/benchmark.html +1 -1
  28. package/docs-site/en/commands.html +1 -1
  29. package/docs-site/en/context-engine.html +1 -1
  30. package/docs-site/en/ecosystem.html +1 -1
  31. package/docs-site/en/index.html +5 -5
  32. package/docs-site/en/mcp-approval.html +1 -1
  33. package/docs-site/en/mcp-auth.html +1 -1
  34. package/docs-site/en/mcp-servers.html +1 -1
  35. package/docs-site/en/mcp.html +1 -1
  36. package/docs-site/en/permissions.html +1 -1
  37. package/docs-site/en/profiles.html +1 -1
  38. package/docs-site/en/quickstart.html +1 -1
  39. package/docs-site/en/runtime.html +1 -1
  40. package/docs-site/en/scope.html +1 -1
  41. package/docs-site/en/security.html +1 -1
  42. package/docs-site/en/team.html +1 -1
  43. package/docs-site/en/whats-new.html +24 -1
  44. package/docs-site/en/windows.html +1 -1
  45. package/docs-site/en/workflows.html +1 -1
  46. package/docs-site/index.html +5 -5
  47. package/docs-site/mcp-approval.html +1 -1
  48. package/docs-site/mcp-auth.html +1 -1
  49. package/docs-site/mcp-servers.html +1 -1
  50. package/docs-site/mcp.html +1 -1
  51. package/docs-site/permissions.html +1 -1
  52. package/docs-site/profiles.html +1 -1
  53. package/docs-site/quickstart.html +1 -1
  54. package/docs-site/runtime.html +1 -1
  55. package/docs-site/scope.html +1 -1
  56. package/docs-site/security.html +1 -1
  57. package/docs-site/team.html +1 -1
  58. package/docs-site/whats-new.html +24 -1
  59. package/docs-site/windows.html +1 -1
  60. package/docs-site/workflows.html +1 -1
  61. package/evals/fixtures/piagent-webui/checkpoint-v1.invalid.json +21 -0
  62. package/evals/fixtures/piagent-webui/checkpoint-v1.valid.json +20 -0
  63. package/evals/fixtures/piagent-webui/terminal-v1.invalid.json +17 -0
  64. package/evals/fixtures/piagent-webui/terminal-v1.valid.json +16 -0
  65. package/evals/fixtures/piagent-webui/workspace-file-v1.invalid.json +24 -0
  66. package/evals/fixtures/piagent-webui/workspace-file-v1.valid.json +23 -0
  67. package/evals/fixtures/piagent-webui/workspace-paths-v1.invalid.json +24 -0
  68. package/evals/fixtures/piagent-webui/workspace-paths-v1.valid.json +24 -0
  69. package/evals/fixtures/piagent-webui/workspace-search-v1.invalid.json +26 -0
  70. package/evals/fixtures/piagent-webui/workspace-search-v1.valid.json +26 -0
  71. package/evals/fixtures/piagent-webui/workspace-tree-v1.invalid.json +28 -0
  72. package/evals/fixtures/piagent-webui/workspace-tree-v1.valid.json +27 -0
  73. package/evals/fixtures/piagent-webui/workspace-write-v1.invalid.json +19 -0
  74. package/evals/fixtures/piagent-webui/workspace-write-v1.valid.json +19 -0
  75. package/evals/long-task-soak-v1/README.md +17 -0
  76. package/evals/long-task-soak-v1/lib/session-loop.mjs +19 -3
  77. package/evals/long-task-soak-v1/scenarios/ide-editor-terminal.json +19 -0
  78. package/evals/long-task-soak-v1/surfaces/webui-gateway.mjs +17 -2
  79. package/evals/long-task-soak-v1/surfaces/workspace-actions.mjs +95 -0
  80. package/evals/private-holdout-v1/public-exposure.v2.json +2 -2
  81. package/package.json +7 -3
  82. package/packages/piagent-core/extensions/fallback-base-policy.ts +1 -1
  83. package/packages/piagent-core/extensions/guard-types.ts +3 -1
  84. package/packages/piagent-core/extensions/path-suggestions.ts +137 -0
  85. package/packages/piagent-core/extensions/piagent-guard.ts +85 -7
  86. package/packages/piagent-core/extensions/workspace-inspection.ts +145 -0
  87. package/packages/piagent-core/extensions/workspace-policy.d.ts +7 -0
  88. package/packages/piagent-core/extensions/workspace-policy.js +3 -0
  89. package/packages/piagent-core/extensions/workspace-search-index.mjs +8 -0
  90. package/packages/piagent-core/extensions/workspace-search.ts +74 -0
  91. package/packages/piagent-core/extensions/workspace-write.ts +116 -0
  92. package/packages/piagent-core/managed/background-process.mjs +9 -4
  93. package/packages/piagent-core/managed/boundary-package-proxy.mjs +21 -0
  94. package/packages/piagent-core/managed/boundary-queue.mjs +24 -0
  95. package/packages/piagent-core/managed/checkpoint-git.mjs +16 -0
  96. package/packages/piagent-core/managed/checkpoints.mjs +17 -64
  97. package/packages/piagent-core/managed/command-tools.mjs +6 -6
  98. package/packages/piagent-core/managed/continuation.mjs +3 -0
  99. package/packages/piagent-core/managed/dist/workspace/assets/adapters/backend-api/profile.json +88 -0
  100. package/packages/piagent-core/managed/dist/workspace/assets/adapters/be-readonly-fe/profile.json +130 -0
  101. package/packages/piagent-core/managed/dist/workspace/assets/adapters/data/profile.json +88 -0
  102. package/packages/piagent-core/managed/dist/workspace/assets/adapters/devops/profile.json +90 -0
  103. package/packages/piagent-core/managed/dist/workspace/assets/adapters/docs/profile.json +74 -0
  104. package/packages/piagent-core/managed/dist/workspace/assets/adapters/fullstack/profile.json +92 -0
  105. package/packages/piagent-core/managed/dist/workspace/assets/adapters/generic/profile.json +95 -0
  106. package/packages/piagent-core/managed/dist/workspace/assets/adapters/mobile/profile.json +86 -0
  107. package/packages/piagent-core/managed/dist/workspace/assets/adapters/node-typescript/profile.json +74 -0
  108. package/packages/piagent-core/managed/dist/workspace/assets/adapters/python/profile.json +75 -0
  109. package/packages/piagent-core/managed/dist/workspace/assets/adapters/web-frontend/profile.json +99 -0
  110. package/packages/piagent-core/managed/dist/workspace/assets/local-state-path-BrmghxEZ.js +284 -0
  111. package/packages/piagent-core/managed/dist/workspace/assets/packages/piagent-core/policies/base-policy.json +351 -0
  112. package/packages/piagent-core/managed/dist/workspace/manifest.json +65 -0
  113. package/packages/piagent-core/managed/dist/workspace/worker.mjs +7374 -0
  114. package/packages/piagent-core/managed/dist/workspace/workspace-search-index.mjs +1007 -0
  115. package/packages/piagent-core/managed/patch-snapshot.mjs +6 -8
  116. package/packages/piagent-core/managed/permission.mjs +29 -6
  117. package/packages/piagent-core/managed/repository-operation.mjs +2 -1
  118. package/packages/piagent-core/managed/review-snapshot-request.mjs +21 -0
  119. package/packages/piagent-core/managed/sandbox-diagnostic.mjs +2 -0
  120. package/packages/piagent-core/managed/session-mutation-observations.mjs +37 -0
  121. package/packages/piagent-core/managed/session.mjs +2 -2
  122. package/packages/piagent-core/managed/source-revert-requests.mjs +21 -0
  123. package/packages/piagent-core/managed/terminal-boundary.mjs +88 -0
  124. package/packages/piagent-core/managed/terminal-channel.mjs +66 -0
  125. package/packages/piagent-core/managed/terminal-runtime.mjs +64 -0
  126. package/packages/piagent-core/managed/terminal-seatbelt.mjs +48 -0
  127. package/packages/piagent-core/managed/terminal-worker.mjs +70 -0
  128. package/packages/piagent-core/managed/tool-boundary.mjs +45 -35
  129. package/packages/piagent-core/managed/tool-freshness.mjs +47 -0
  130. package/packages/piagent-core/managed/tool-worker.mjs +18 -3
  131. package/packages/piagent-core/managed/workspace-worker-pins.mjs +26 -0
  132. package/packages/piagent-core/package.json +1 -1
  133. package/packages/piagent-core/policies/base-policy.json +2 -1
  134. package/packages/piagent-core/runtime/checkpoints/checkpoint-authority.ts +43 -0
  135. package/packages/piagent-core/runtime/checkpoints/checkpoint-refs.mjs +51 -0
  136. package/packages/piagent-core/runtime/checkpoints/checkpoint-store.mjs +179 -0
  137. package/packages/piagent-core/runtime/checkpoints/checkpoint-worker.ts +28 -0
  138. package/packages/piagent-core/runtime/checkpoints/git-adapter.mjs +36 -0
  139. package/packages/piagent-core/runtime/checkpoints/persistent-history.mjs +96 -0
  140. package/packages/piagent-core/runtime/checkpoints/personal-git.ts +272 -0
  141. package/packages/piagent-core/runtime/checkpoints/personal-runtime.ts +158 -0
  142. package/packages/piagent-core/runtime/checkpoints/prune.mjs +29 -0
  143. package/packages/piagent-core/runtime/checkpoints/restore-preview.mjs +46 -0
  144. package/packages/piagent-core/runtime/checkpoints/turn-checkpoints.mjs +167 -0
  145. package/packages/piagent-core/runtime/hooks/session-hooks.ts +19 -16
  146. package/packages/piagent-core/runtime/hooks/session-start-hook.ts +3 -0
  147. package/packages/piagent-core/runtime/hooks/tool-call-hook.ts +2 -2
  148. package/packages/piagent-core/runtime/inspection/diff-projection.ts +2 -1
  149. package/packages/piagent-core/runtime/inspection/managed-source-revert.ts +90 -0
  150. package/packages/piagent-core/runtime/inspection/review-state-projection.ts +19 -8
  151. package/packages/piagent-core/runtime/inspection/session-diff-projection.ts +47 -0
  152. package/packages/piagent-core/runtime/inspection/session-hunk-provenance.ts +56 -0
  153. package/packages/piagent-core/runtime/inspection/session-mutation-observer.ts +125 -0
  154. package/packages/piagent-core/runtime/inspection/source-action-contract.ts +123 -0
  155. package/packages/piagent-core/runtime/inspection/source-change-projection.ts +3 -9
  156. package/packages/piagent-core/runtime/inspection/source-mutation-projection.ts +3 -41
  157. package/packages/piagent-core/runtime/inspection/source-mutation-store.ts +6 -36
  158. package/packages/piagent-core/runtime/inspection/source-revert-projection.ts +36 -30
  159. package/packages/piagent-core/runtime/inspection/text-diff.ts +5 -4
  160. package/packages/piagent-core/runtime/inspection/workspace-worker.ts +79 -0
  161. package/packages/piagent-core/runtime/policy/source-index-transaction.ts +3 -10
  162. package/packages/piagent-core/runtime/policy/source-mutation-guard-binding.ts +27 -2
  163. package/packages/piagent-core/runtime/policy/source-mutation-guard.ts +42 -12
  164. package/packages/piagent-core/runtime/policy/source-worktree-transaction.ts +10 -5
  165. package/packages/piagent-core/runtime/policy/workspace-write-authority.ts +51 -0
  166. package/packages/piagent-core/runtime/process-owner.mjs +20 -0
  167. package/packages/piagent-core/runtime/process-tree-watch.mjs +46 -0
  168. package/packages/piagent-core/runtime/quality/model-mutation-proof.ts +8 -5
  169. package/packages/piagent-core/runtime/registration/permission-commands.ts +10 -2
  170. package/packages/piagent-core/runtime/registration/task-evidence-tools.ts +1 -1
  171. package/packages/piagent-core/runtime/session/workspace-member-edits.d.mts +7 -0
  172. package/packages/piagent-core/runtime/session/workspace-member-edits.mjs +41 -0
  173. package/packages/piagent-core/security/workspace-file-reader.ts +2 -1
  174. package/packages/piagent-webui/dist/client/assets/Alert-DGWhP2MM.js +1 -0
  175. package/packages/piagent-webui/dist/client/assets/Button-QItfZUNj.js +1 -0
  176. package/packages/piagent-webui/dist/client/assets/DialogTitle-CyaFPaiW.js +3 -0
  177. package/packages/piagent-webui/dist/client/assets/MarkdownMessage-DtEwqme0.js +29 -0
  178. package/packages/piagent-webui/dist/client/assets/TerminalPanel-C3vkzjQ6.js +2 -0
  179. package/packages/piagent-webui/dist/client/assets/TerminalView-TNjhBGfa.js +9 -0
  180. package/packages/piagent-webui/dist/client/assets/TerminalView-kHJ-D0s7.css +1 -0
  181. package/packages/piagent-webui/dist/client/assets/Typography-B9om7Evq.js +1 -0
  182. package/packages/piagent-webui/dist/client/assets/WorkspaceCodeEditor-BAhYwQNM.js +2 -0
  183. package/packages/piagent-webui/dist/client/assets/WorkspaceExplorer-Coh_GWCO.js +5 -0
  184. package/packages/piagent-webui/dist/client/assets/WorkspaceQuickOpen-Bn4miZq4.js +1 -0
  185. package/packages/piagent-webui/dist/client/assets/bootstrap-CedkNtRG.js +1 -0
  186. package/packages/piagent-webui/dist/client/assets/dist-B5MCHZv5.js +9 -0
  187. package/packages/piagent-webui/dist/client/assets/dist-BM_LL1o9.js +1 -0
  188. package/packages/piagent-webui/dist/client/assets/dist-C2TMLUTo.js +23 -0
  189. package/packages/piagent-webui/dist/client/assets/dist-CqL3udNu.js +1 -0
  190. package/packages/piagent-webui/dist/client/assets/dist-D4df0jLQ.js +1 -0
  191. package/packages/piagent-webui/dist/client/assets/dist-D6i5SpQu.js +10 -0
  192. package/packages/piagent-webui/dist/client/assets/dist-DfjUS8LS.js +6 -0
  193. package/packages/piagent-webui/dist/client/assets/dist-IRUjhd1P.js +1 -0
  194. package/packages/piagent-webui/dist/client/assets/dist-sNhoSseW.js +1 -0
  195. package/packages/piagent-webui/dist/client/assets/index-Brs_HjIo.css +1 -0
  196. package/packages/piagent-webui/dist/client/assets/index-a-perpOX.js +102 -0
  197. package/packages/piagent-webui/dist/client/assets/rolldown-runtime-hePW80VL.js +1 -0
  198. package/packages/piagent-webui/dist/client/assets/tab-close-nAxrK7Lq.js +1 -0
  199. package/packages/piagent-webui/dist/client/assets/ui-preferences-BO3AV7QE.js +10 -0
  200. package/packages/piagent-webui/dist/client/assets/useId-DEefKUAT.js +124 -0
  201. package/packages/piagent-webui/dist/client/assets/workspace-api-O7auv_td.js +1 -0
  202. package/packages/piagent-webui/dist/client/index.html +10 -2
  203. package/packages/piagent-webui/extension/same-session-bridge.ts +2 -3
  204. package/packages/piagent-webui/extension/source-revert-controller.ts +14 -208
  205. package/packages/piagent-webui/gateway/checkpoint-sessions.ts +99 -0
  206. package/packages/piagent-webui/gateway/checkpoint-store.ts +6 -0
  207. package/packages/piagent-webui/gateway/company-relay.ts +5 -0
  208. package/packages/piagent-webui/gateway/company-terminal-cache.ts +54 -0
  209. package/packages/piagent-webui/gateway/company-terminal-channel.ts +117 -0
  210. package/packages/piagent-webui/gateway/company-terminal-relay.ts +75 -0
  211. package/packages/piagent-webui/gateway/gateway-protocol-service.ts +12 -0
  212. package/packages/piagent-webui/gateway/gateway-service.ts +48 -4
  213. package/packages/piagent-webui/gateway/managed-gateway.mjs +30 -3
  214. package/packages/piagent-webui/gateway/managed-projection.ts +5 -3
  215. package/packages/piagent-webui/gateway/managed-source-revert-controller.ts +45 -0
  216. package/packages/piagent-webui/gateway/managed-source-revert-sessions.ts +74 -0
  217. package/packages/piagent-webui/gateway/managed-terminal-binding.ts +30 -0
  218. package/packages/piagent-webui/gateway/managed-terminal-processes.ts +74 -0
  219. package/packages/piagent-webui/gateway/managed-terminal-sessions.ts +9 -0
  220. package/packages/piagent-webui/gateway/path-suggestions.ts +1 -124
  221. package/packages/piagent-webui/gateway/personal-terminal-binding.ts +36 -0
  222. package/packages/piagent-webui/gateway/personal-terminal-diagnostic.mjs +16 -0
  223. package/packages/piagent-webui/gateway/personal-terminal-processes.ts +119 -0
  224. package/packages/piagent-webui/gateway/personal-terminal-sessions.ts +22 -0
  225. package/packages/piagent-webui/gateway/runtime-session-controls.ts +2 -1
  226. package/packages/piagent-webui/gateway/session-catalog.ts +3 -2
  227. package/packages/piagent-webui/gateway/session-command-controller.ts +4 -4
  228. package/packages/piagent-webui/gateway/session-inspection-registry.ts +29 -5
  229. package/packages/piagent-webui/gateway/session-runtime-supervisor.ts +8 -8
  230. package/packages/piagent-webui/gateway/signed-session-journal.ts +77 -0
  231. package/packages/piagent-webui/gateway/source-revert-sessions.ts +74 -0
  232. package/packages/piagent-webui/gateway/source-revert-store.ts +47 -0
  233. package/packages/piagent-webui/gateway/terminal-command-ledger.ts +33 -0
  234. package/packages/piagent-webui/gateway/terminal-mentions.ts +29 -0
  235. package/packages/piagent-webui/gateway/terminal-output-buffer.ts +58 -0
  236. package/packages/piagent-webui/gateway/terminal-router.ts +12 -0
  237. package/packages/piagent-webui/gateway/terminal-sessions.ts +247 -0
  238. package/packages/piagent-webui/gateway/workspace-write-sessions.ts +69 -0
  239. package/packages/piagent-webui/gateway/workspace-write-store.ts +6 -0
  240. package/packages/piagent-webui/package.json +15 -2
  241. package/packages/piagent-webui/server/checkpoint-command.ts +30 -0
  242. package/packages/piagent-webui/server/checkpoint-controller.ts +87 -0
  243. package/packages/piagent-webui/server/checkpoint-routes.ts +38 -0
  244. package/packages/piagent-webui/server/control-command-digest.ts +5 -0
  245. package/packages/piagent-webui/server/core-inspection-provider.ts +16 -22
  246. package/packages/piagent-webui/server/gateway-websocket.ts +36 -8
  247. package/packages/piagent-webui/server/loopback-server.ts +9 -0
  248. package/packages/piagent-webui/server/read-model-provider.ts +3 -0
  249. package/packages/piagent-webui/server/read-only-router.ts +3 -0
  250. package/packages/piagent-webui/server/session-auth.ts +4 -1
  251. package/packages/piagent-webui/server/session-source-revert-routes.ts +54 -0
  252. package/packages/piagent-webui/server/source-projection-binding.ts +18 -0
  253. package/packages/piagent-webui/server/source-revert-controller.ts +225 -0
  254. package/packages/piagent-webui/server/terminal-command.ts +35 -0
  255. package/packages/piagent-webui/server/terminal-websocket-stream.ts +56 -0
  256. package/packages/piagent-webui/server/transcript-projection.ts +2 -1
  257. package/packages/piagent-webui/server/workspace-read-routes.ts +32 -0
  258. package/packages/piagent-webui/server/workspace-reader.ts +23 -0
  259. package/packages/piagent-webui/server/workspace-write-controller.ts +118 -0
  260. package/packages/piagent-webui/server/workspace-write-routes.ts +38 -0
  261. package/packages/piagent-webui/shared/terminal-message.ts +23 -0
  262. package/schemas/piagent-webui/catalog-v1.json +63 -0
  263. package/schemas/piagent-webui/checkpoint-v1.schema.json +466 -0
  264. package/schemas/piagent-webui/control-command-v1.schema.json +68 -3
  265. package/schemas/piagent-webui/diff-v1.schema.json +4 -0
  266. package/schemas/piagent-webui/gateway-protocol-v1.schema.json +123 -3
  267. package/schemas/piagent-webui/session-catalog-v1.schema.json +1 -1
  268. package/schemas/piagent-webui/session-command-v1.schema.json +1 -1
  269. package/schemas/piagent-webui/snapshot-v1.schema.json +2 -1
  270. package/schemas/piagent-webui/source-revert-v1.schema.json +22 -3
  271. package/schemas/piagent-webui/terminal-v1.schema.json +495 -0
  272. package/schemas/piagent-webui/workspace-file-v1.schema.json +79 -0
  273. package/schemas/piagent-webui/workspace-paths-v1.schema.json +71 -0
  274. package/schemas/piagent-webui/workspace-search-v1.schema.json +80 -0
  275. package/schemas/piagent-webui/workspace-tree-v1.schema.json +87 -0
  276. package/schemas/piagent-webui/workspace-write-v1.schema.json +276 -0
  277. package/schemas/project-profile.schema.json +8 -3
  278. package/scripts/company-terminal.mjs +16 -11
  279. package/scripts/pi-auto.sh +5 -1
  280. package/scripts/team-doctor.sh +8 -0
  281. package/packages/piagent-webui/dist/client/assets/MarkdownMessage-CfgyQQbW.js +0 -29
  282. package/packages/piagent-webui/dist/client/assets/index-HyzWKvDu.js +0 -234
  283. package/packages/piagent-webui/dist/client/assets/index-_0nGP2n3.css +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,66 @@
2
2
 
3
3
  This file records release-facing changes for Pi Agent Platform. Copy the relevant version block into GitHub Releases when publishing a tag.
4
4
 
5
+ ## v1.38.2 - 2026-10-23
6
+
7
+ A folder tree as in VS Code, colour themes, and an editor and terminal that stay in view.
8
+
9
+ ### Added
10
+
11
+ - **Colour themes.** Settings → Appearance → Color theme, or `Color theme: …` in the command palette (⌘K): Piagent Dark and Light, Dracula, One Dark, Monokai, Nord, Tokyo Night, Catppuccin Mocha, Gruvbox Dark, Solarized Dark and Light, GitHub Dark and Light. A theme colours the interface, the editor's syntax (no longer CodeMirror's light default on a dark page) and the terminal's ANSI palette; Light/Dark switches to that mode's Piagent theme. Kept in this browser like the language.
12
+
13
+ ### Changed
14
+
15
+ - **The editor and terminal stay in view.** On wide screens they are pinned under the header while the conversation beside them scrolls, so a long conversation no longer carries them away; the Files/Terminal switches are pinned too, on every width. A splitter (drag, or ←/→ when focused) sets the editor's width, kept in this browser. On phones the folder tree is narrower and the editor's actions stay on one line.
16
+ - **The files panel is a folder tree, as in VS Code.** Folders open in place under their parent (▸/▾) instead of replacing the list, each read when first opened and refreshed while open; the open file is highlighted and a file opened from search, a link or Cmd/Ctrl+P shows in its folder. **New file** starts in the last folder chosen.
17
+
18
+ ## v1.38.1 - 2026-10-23
19
+
20
+ v1.38.0 was tagged but never published: its release checks failed on two tests. This is the same release.
21
+
22
+ ### Tests
23
+
24
+ - `tests/managed-terminal-boundary.test.mjs`: the Linux fixture says it is a Linux boundary, as the real one does (the macOS Seatbelt path was taken on Linux and failed).
25
+ - `tests/managed-network-approval-web.test.mjs`: the approval card gets 30 s to appear on slow runners.
26
+
27
+ ## v1.38.0 - 2026-10-23 (not published)
28
+
29
+ Piagent becomes an editor: files, terminals, inline review and checkpoints in the dashboard, and Bypass that asks nothing (company conversations too, where the Harness allows it).
30
+
31
+ ### Added
32
+
33
+ - **Bypass, as in Codex.** A new `bypass` permission mode (`/permission bypass`, `piagent-auto --bypass`, `PIAGENT_PERMISSION_PROFILE=bypass`, or **Bypass** in the dashboard's access menu) turns every Piagent gate off in a personal session: nothing is asked or blocked, deletes, pushes, migrations, external sends and protected or read-only paths included. Tool output is still redacted and each turn still gets its `/undo` checkpoint. A policy can forbid it by leaving `bypass` out of `permissionProfiles.allowedModes`. **Full access** (`trusted-full-access`) is unchanged.
34
+ - **Bypass in company conversations, where the Harness allows it.** A company conversation now has three levels: Ask first, **Full access** (what the dashboard called Bypass before: asks only what must be confirmed) and **Bypass**, which asks nothing (internet, Docker, the member's machine, pushes, deploys, migrations) while plain commands stay in the sandbox. Bypass needs the Harness's `bypass_mode` (Agent Studio, on by default; an administrator can turn it off) carried by an Agent Watch that knows the field; without an explicit yes it is not offered, and a conversation left in Bypass after it is turned off applies as Full access. `/bypass on|full|off` in the dashboard and in `piagent studio`.
35
+ - **Editor-like workspace.** Square 2px edges across the dashboard; file and terminal tabs close with their own ×; the files and terminal panels hide with a × of their own; the editor sits above the terminal and both share the window height.
36
+
37
+ ### Fixes
38
+
39
+ - **A checkpoint that cannot be taken no longer stops the agent's edit.** Personal snapshots failed on a submodule, a file over 16 MB, a tree over 64 MB or a file changing mid-snapshot, and every write was then refused. Snapshots now hash the whole tree in one Git call (about 0.5 s instead of 35 s on a 4,000-file repository), include tracked files of any size, skip untracked files over 100 MB and leave submodules out. A turn whose snapshot fails has no checkpoint and ends the history before it; only another live owner of the session's history makes an edit wait. Company checkpoints get the same snapshot.
40
+ - **Restoring a turn no longer overwrites a file the member saved from the editor during it.** Such files are reported as conflicts by `/undo` and Timeline restore.
41
+ - **Checkpoint snapshots stay out of the project's refs.** They live in a private repository inside the Git directory that borrows the project's objects, so `git push --mirror` cannot publish untracked files; conversations untouched for 30 days lose their checkpoints.
42
+ - **The company explorer, editor and review panels no longer wait behind the agent's running command.** Reads run beside it (three at a time) and the editor's permission poll no longer stacks requests.
43
+ - **A flood of terminal output no longer drops the dashboard connection.** Output is paced at about 4 MB/s, the writer is paused while the browser catches up, output it cannot keep up with is marked as skipped, and a terminal tab never stops rendering for good. Company terminal workers pause instead of exiting when their pipe backs up. A flood of short lines no longer stalls the Gateway: tiny PTY reads are joined before pacing and the replay buffer trims its window once it doubles instead of on every line.
44
+ - Restored files the turn had deleted get a new file's usual mode instead of owner-only.
45
+ - **Company terminals work on macOS.** The company Gateway creates the PTY and starts only the shell under the agent's offline Seatbelt profile, which gains terminal ioctls and `/dev/tty`; opening any other terminal stays denied, and nothing runs on the host. Company terminals also write the project's Git directories and package caches like the agent's offline commands, so `go build` and `git` in a worktree work.
46
+ - **Terminals:** background jobs stop with their terminal (the shell's tree is watched while it runs); actions refused before anything ran are reported as refused, not "may have run"; a stale revision is resent instead of dropping queued keystrokes; `@terminal` naming no open terminal attaches nothing instead of blocking the message; the personal shell no longer inherits the Gateway's `PI_*`/`PIAGENT_*` variables.
47
+ - **Editor:** **Rename** and **Delete** for the open file, applied only to the version shown; new files get the usual mode and their missing folders; creating a file never replaces one that appeared meanwhile; refusals that changed nothing (oversized file, linked folder) are reported as such. Kept hunks survive a page reload in the same browser.
48
+ - **Checkpoints:** a restore that stopped midway finishes what is left instead of refusing its own work; a refusal before any file changed is reported as refused; a file ignored since the turn is refused rather than overwritten; folders the turn created and its undo emptied are removed; any shell command not provably read-only takes the turn's checkpoint; a lock or capture left by a process from before a reboot, or whose number was reused, no longer blocks.
49
+
50
+ - Company inline review preserves exact agent observations across trusted internal snapshot reads; ordinary shell commands still invalidate attribution.
51
+
52
+ ### Added
53
+
54
+ - Timeline checkpoint restoration previews affected files, requires confirmation and reverses safe turns until a member-edit conflict. Personal `/undo` shares the checkpoint service with company mode; personal history is bounded and pins Git trees without changing HEAD or the index. Browser retries retain the same request across tab reloads.
55
+
56
+ - Company Session Hub terminals run inside the Linux/WSL bubblewrap boundary through the company Gateway and authenticated relay, with no network, credential masking and sandbox process cleanup. Disconnects reconnect for replay without automatically resending commands. Doctor reports prerequisites. The complete browser workflow is qualified on Linux arm64; native Linux x64 and WSL remain unverified.
57
+
58
+ - Personal Session Hub terminals open up to four project shells with lazy xterm tabs, resizing, Ctrl+C and reconnect replay. Session teardown cleans terminal processes. Explicit `@terminal`/`@terminal:2` sends attach bounded redacted output. Optional native PTY failures leave the dashboard usable and appear in Doctor; company terminals never fall back to host execution.
59
+
60
+ - Session Hub reviews exact observed agent hunks inline, with Keep, preview-confirmed Revert, hunk navigation/counts and current/removed-line comments to the composer. Clean tabs refresh after agent changes; dirty drafts retain conflict handling. Company source review and revert run in the existing sandbox. New untracked agent files support review; deletion through hunk revert remains unavailable.
61
+
62
+ - Session Hub edits and atomically saves files with Cmd/Ctrl+S, dirty tabs, new files and digest conflicts (Reload/Compare/confirmed Overwrite). Live permission and protected-path checks apply in personal and company mode. Durable receipts prevent duplicate saves; member edits notify the next agent turn and invalidate stale agent edits.
63
+ - Session Hub opens project files in read-only editor tabs, with Files/Search navigation, Cmd/Ctrl+P, line links from tool calls, source changes and @mentions, and a drawer on smaller screens. Protected files stay locked. Company file reads and searches run inside the session's existing sandbox through its Gateway.
64
+
5
65
  ## v1.37.1 - 2026-10-22
6
66
 
7
67
  Closes, helper reports and team-memory lessons Studio can trust (from the 2026-10-22 upstream audit), and two outbound-address fixes from the 2026-10-22 security review.
package/README.md CHANGED
@@ -138,8 +138,9 @@ Project profiles can declare a runtime `permissionProfile`:
138
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
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
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. |
141
142
 
142
- For one run, set `PIAGENT_PERMISSION_PROFILE=read-only|workspace-write|trusted-full-access`, or use `piagent-auto --read-only`, `--workspace-write`, or `--full-access`.
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`.
143
144
 
144
145
  Inside an active Pi session, use `/permission` for the menu or a session-local switch:
145
146
 
@@ -150,6 +151,7 @@ Inside an active Pi session, use `/permission` for the menu or a session-local s
150
151
  /permission workspace-write
151
152
  /permission full-access
152
153
  /permission full-access Implement the requested trusted repo task.
154
+ /permission bypass
153
155
  ```
154
156
 
155
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.
@@ -346,7 +348,7 @@ This repository intentionally excludes:
346
348
 
347
349
  ## Maturity
348
350
 
349
- 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.37.1` or a reviewed commit.
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.38.2` or a reviewed commit.
350
352
 
351
353
  Ready for:
352
354
 
@@ -364,7 +366,7 @@ Application-level policy layer:
364
366
  - The guard extension is an accident-prevention layer for agent mistakes and common prompt-injection patterns.
365
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.
366
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.
367
- - Runtime permission profiles control autonomy: `read-only`, `workspace-write`, and `trusted-full-access`. The full-access profile is explicit and auditable; it does not disable protected-path checks, secret redaction, capability lock integrity, or destructive/external confirmations.
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.
368
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.
369
371
  - Path-like strings are percent-decoded once before matching. Excessively nested tool input fails closed instead of being silently skipped.
370
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.
package/README.vi.md CHANGED
@@ -74,7 +74,7 @@ hình chỉ đọc, không command nào mở lượt model.
74
74
  | Command | Mục đích |
75
75
  |---|---|
76
76
  | `/profile` | Xem hoặc đổi project profile; `/profile setup` chọn tech cho từng vai trò |
77
- | `/permission` | Đổi permission mode trong session |
77
+ | `/permission` | Đổi permission mode trong session; `/permission bypass` (hoặc `piagent-auto --bypass`) tắt mọi cổng kiểm soát của Piagent như bypass của Codex, vẫn che secret trong output và giữ `/undo`; cuộc trò chuyện company dùng `/bypass on` khi admin Studio để Bypass bật trong Harness |
78
78
  | `/context` | Xem Context Engine, index, retrieval và telemetry |
79
79
  | `/usage` | Xem session, model, thinking và context usage |
80
80
  | `/piagent-inspector` | Mở menu read-only để xem task diff, command fail/block, safety warning và context budget; panel bốn dòng tự hiện sát footer native, `toggle` để ẩn trong session |
@@ -179,7 +179,7 @@ Xem [bằng chứng benchmark](https://piagent.io.vn/benchmark) và
179
179
 
180
180
  Gate này chạy architecture check, test, typecheck, capability validation, runtime smoke và docs consistency trước khi release.
181
181
 
182
- Bản phát hành hiện tại là `v1.37.1`. Với team hoặc production, hãy pin tag này
182
+ Bản phát hành hiện tại là `v1.38.2`. Với team hoặc production, hãy pin tag này
183
183
  hoặc một commit đã review thay vì dựa vào nguồn package không cố định.
184
184
 
185
185
  ## Security
@@ -26,8 +26,8 @@
26
26
  "path": "evals/scenarios/capability-resolution.json"
27
27
  },
28
28
  {
29
- "byteSize": 7631,
30
- "digest": "sha256:e50361eda8ca41dc75afdff2ff21498499147b494ad4ed7b444a4a29279ba884",
29
+ "byteSize": 7647,
30
+ "digest": "sha256:422b26bca154240747970d948cdf1ded57b9dcb544d6547dedb4d1ddfda4b4da",
31
31
  "id": "base-policy",
32
32
  "kind": "policies",
33
33
  "path": "packages/piagent-core/policies/base-policy.json"
@@ -130,7 +130,7 @@ Các command này đến từ package `piagent-core`; tất cả chạy ngay và
130
130
  | `/piagent-inspector` | Muốn xem Piagent đang làm gì, sửa file nào, diff bao nhiêu dòng, command nào fail/block và context còn bao nhiêu. | Mở menu `summary/files/commands/security/context/toggle`; read-only, không gọi model. |
131
131
  | `/piagent-orchestration` | Xem chính sách helper/subagent. | Mode, giới hạn helper, review lens, Field Guide; không gọi model. |
132
132
  | `/context` | Xem index/search/pack/impact/efficiency/preflight/compact. | Menu context, không gọi model. |
133
- | `/permission` | Xem/đổi quyền runtime. | Menu status/read-only/workspace-write/full-access. |
133
+ | `/permission` | Xem/đổi quyền runtime. | Menu status/read-only/workspace-write/full-access/bypass. |
134
134
  | `/fast status\|on\|off` | Xem/bật/tắt Fast service tier cho session OpenAI Codex. | Chạy ngay, 0 model token; giữ nguyên model/thinking. Session trống mặc định tắt, environment override hoặc state đã lưu khi resume có thể được ưu tiên. |
135
135
  | `/memory` hoặc `/memory-policy` | Xem memory policy. | Chạy ngay, không gọi model. |
136
136
  | `/piagent-mcp` | Xem/quản trị MCP trong Pi. | Menu MCP, không gọi model. |
@@ -477,8 +477,8 @@ Các lệnh này chạy ngoài Pi.
477
477
  | Command | Dùng khi nào |
478
478
  |---|---|
479
479
  | `npm install -g --ignore-scripts @earendil-works/pi-coding-agent@1.3.0` | Cài Pi CLI tương thích với release hiện tại. |
480
- | `npm install -g --ignore-scripts @piagent/platform@1.37.1` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
481
- | `pi install git:github.com/Vt-mmm/piagent@v1.37.1` | Cài pinned release khi cần reproducible team setup. |
480
+ | `npm install -g --ignore-scripts @piagent/platform@1.38.2` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
481
+ | `pi install git:github.com/Vt-mmm/piagent@v1.38.2` | Cài pinned release khi cần reproducible team setup. |
482
482
  | `pi install git:github.com/Vt-mmm/piagent` | Cài latest package platform cho máy cá nhân/sandbox. |
483
483
  | `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ì. |
484
484
  | `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. |
@@ -500,6 +500,7 @@ Các lệnh này chạy ngoài Pi.
500
500
  | `piagent-auto --read-only -p "<task>"` | Auto-run scout/read-only; guard chặn shell/write/unknown tool. |
501
501
  | `piagent-auto --full-access -p "<task>"` | Trusted automation style; không tắt protected paths/redaction/human gates. |
502
502
  | `pi` rồi `/permission full-access <task>` | Một lệnh trong Pi để bật full-access cho session và giao task. Alias `/full-access <task>` vẫn chạy. |
503
+ | `piagent-auto --bypass`, `/permission bypass` | Bypass như Codex: không hỏi, không chặn gì (xoá, push, migration, gửi ra ngoài, file được bảo vệ đều chạy). Output vẫn che secret, `/undo` vẫn hoàn tác từng lượt. Company: `/bypass on` (Bypass), `/bypass full` (Toàn quyền), `/bypass off` (Hỏi trước); admin Studio tắt được Bypass trong Harness, khi đó cuộc trò chuyện chạy như Toàn quyền. |
503
504
  | `pi --list-models` | Xem model Pi thấy được theo credentials hiện tại. |
504
505
  | `piagent-install --with-mcp --with-subagents` | Cài global package + MCP + subagent baseline từ package bin. |
505
506
  | `piagent-setup <project> --profile auto` | Setup đầy đủ cho một project khi muốn preseed bằng bin. |
@@ -15,9 +15,9 @@ Repo này phải chạy được cho nhiều project/domain khác nhau. Vì vậ
15
15
 
16
16
  | Use case | Package source |
17
17
  |---|---|
18
- | Team pinned release | `git:github.com/Vt-mmm/piagent@v1.37.1` |
18
+ | Team pinned release | `git:github.com/Vt-mmm/piagent@v1.38.2` |
19
19
  | Personal/sandbox dev | `git:github.com/Vt-mmm/piagent` |
20
- | Registry distribution | `npm:@piagent/platform@1.37.1` |
20
+ | Registry distribution | `npm:@piagent/platform@1.38.2` |
21
21
  | Enterprise npm (fork under another scope) | `npm:@your-scope/platform@x.y.z` |
22
22
  | Local platform dev | `/path/to/piagent` |
23
23
 
@@ -54,7 +54,7 @@ Root `package.json` có `pi` manifest trỏ tới:
54
54
  Do đó team có thể:
55
55
 
56
56
  ```bash
57
- pi install git:github.com/Vt-mmm/piagent@v1.37.1
57
+ pi install git:github.com/Vt-mmm/piagent@v1.38.2
58
58
  ```
59
59
 
60
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.
@@ -66,12 +66,12 @@ Team nên install global package một lần:
66
66
  ```bash
67
67
  node --version # >= 22.19.0
68
68
  npm install -g --ignore-scripts @earendil-works/pi-coding-agent@1.3.0
69
- npm install -g --ignore-scripts @piagent/platform@1.37.1
69
+ npm install -g --ignore-scripts @piagent/platform@1.38.2
70
70
  piagent-install --stable --dry-run
71
71
  piagent-install --stable
72
72
  ```
73
73
 
74
- `pi install git:github.com/Vt-mmm/piagent@v1.37.1` 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.37.1`.
74
+ `pi install git:github.com/Vt-mmm/piagent@v1.38.2` 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.38.2`.
75
75
 
76
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).
77
77
 
@@ -118,7 +118,7 @@ Nếu muốn commit sẵn `.pi/piagent-profile.json` vào repo hoặc bootstrap
118
118
  ```bash
119
119
  bash scripts/setup.sh /path/to/project \
120
120
  --profile be-readonly-fe \
121
- --package-source git:github.com/Vt-mmm/piagent@v1.37.1 \
121
+ --package-source git:github.com/Vt-mmm/piagent@v1.38.2 \
122
122
  --mcp-preset core \
123
123
  --subagents-preset safe
124
124
  ```
@@ -2,6 +2,14 @@
2
2
 
3
3
  [Tiếng Việt](../vi/maintainer-guide.md)
4
4
 
5
+ ## Full test runs
6
+
7
+ `npm test` runs at most two test files concurrently, matching `npm run verify`.
8
+ Several integration files own real SDKs, sandbox workers and browsers; limiting
9
+ competing files avoids exhausting their existing deadlines. The limit does not
10
+ change test selection or assertions. Place Node runner options before file paths;
11
+ appending `--test-concurrency=2` after `npm test --` does not configure this script.
12
+
5
13
  ## Placement rule
6
14
 
7
15
  Before adding code, answer one ownership question:
@@ -0,0 +1,222 @@
1
+ # Read and edit project files in Session Hub
2
+
3
+ [Tiếng Việt](../vi/workspace-editor.md)
4
+
5
+ Open a conversation in `piagent dashboard`, then choose **Files**. On a wide
6
+ screen the sidebar lists the project tree and the editor sits beside chat. On
7
+ smaller screens Files opens a drawer. Choose **Sessions** to return to the
8
+ conversation list.
9
+
10
+ Choose a file to open an editor tab. Cmd/Ctrl+P searches file names. **Search**
11
+ finds literal text and opens results at their line. File links on tool cards,
12
+ source changes and `@path:line` mentions also open the editor. **Open in VS Code**
13
+ remains available in source changes.
14
+
15
+ The tree respects Git ignore rules and loads one directory at a time. Lists and
16
+ searches have limits and say when results are truncated. Without ripgrep, search
17
+ uses an existing Context Engine index; it does not create an index and may only
18
+ find indexed files. The view reports when search is unavailable.
19
+
20
+ Protected files show a lock and cannot be opened. Binary and oversized files show
21
+ a notice instead of content. Unsafe paths and symlinks are refused. Company
22
+ requests go through the company Gateway and read files inside the session's
23
+ existing sandbox. Writes use that same boundary. Browser access never receives a Studio grant.
24
+
25
+ JavaScript, TypeScript, JSON, Markdown, Python, HTML and CSS parsers load when
26
+ needed; other files remain readable as plain text.
27
+
28
+ With write access, edit text and press **Cmd/Ctrl+S** or **Save**. A dot marks
29
+ unsaved tabs. Closing a dirty tab asks before discarding it; hiding Files or
30
+ switching conversations keeps drafts in this page's memory. Leaving the page
31
+ warns about unsaved drafts. Drafts are not restored after a browser restart.
32
+ **New file** accepts a relative path; missing folders are created when you save.
33
+ New files get the usual mode for your umask. **Rename** and **Delete** act on the
34
+ open file with no unsaved changes, only if it is still the version shown: a file
35
+ changed on disk, or a new name that already exists, is refused. Delete asks first;
36
+ Git can restore a committed file.
37
+
38
+ Saving checks the current permission profile, protected/read-only paths and the
39
+ file digest. If the file changed, choose **Reload**, **Compare** or **Overwrite**.
40
+ Overwrite requires confirmation and still checks the version shown in the dialog.
41
+ A connection failure keeps the draft; retrying the save uses the same command so
42
+ it cannot write twice. An uncertain result asks you to reload and check first.
43
+
44
+ A notice says when the agent is running. A successful member save refreshes
45
+ Source Changes and gives the next agent turn a short note naming the edited
46
+ files. An agent that read an older version must read again before edit/write.
47
+ Company reads and writes share the agent's queue inside the existing sandbox.
48
+ Read-only access disables saving, and the server checks access again on each save.
49
+
50
+ ## Review agent changes
51
+
52
+ Open files show proven agent hunks with added lines, removed-line blocks and gutter
53
+ markers. Each open tab shows its remaining hunk count. **Alt+ArrowDown/Up** moves
54
+ between hunks. **Keep** removes a hunk from review without changing the file; it
55
+ survives closing the drawer and reloading the page in this browser (only paths,
56
+ digests and hunk references are stored, never code), and changed content needs
57
+ review again.
58
+
59
+ **Revert** opens a preview and requires confirmation. It uses the existing guarded
60
+ source revert and preserves the Git index. If the response is lost, **Check again**
61
+ asks about the same command. Revert is unavailable for mixed member/agent hunks,
62
+ stale content, protected paths and unsupported changes. Newly created untracked
63
+ agent files can be reviewed and kept; deleting them through revert is not yet
64
+ supported. A pre-existing member file is not treated as wholly agent-authored.
65
+
66
+ Agent activity refreshes clean open files. Unsaved drafts stay intact and show the
67
+ same conflict choices as saving. Hunk decorations disappear while editing a draft.
68
+ **Comment on current line** or **Cmd/Ctrl+Shift+M** opens LineReview. Removed lines
69
+ have their own comment button and retain the old line number and text. **Put in the
70
+ composer** appends comments to your draft; send the message to ask the agent to act.
71
+
72
+ Attribution requires an exact observed write/edit/patch in this session and a
73
+ current, complete, unredacted diff. CRLF and missing final newlines are compared
74
+ exactly. Unobserved shell edits and observations lost on runtime restart do not
75
+ receive agent hunk markers. Company review and revert run inside its sandbox.
76
+
77
+ ## Personal terminal
78
+
79
+ Choose **Terminal** beside Files, then **+** to open the member's shell in the
80
+ conversation's project. Each conversation supports four tabs. The panel sits
81
+ below the editor on wide screens and opens a bottom drawer on smaller screens.
82
+ Drag the separator to change its height, or focus it and use the arrow keys.
83
+ The terminal follows the current theme; Ctrl+C interrupts the foreground command.
84
+
85
+ Typed commands run with the member's host privileges, without an agent approval
86
+ prompt. Personal terminal execution is not a sandbox. Closing a terminal,
87
+ releasing or restarting its session, or shutting down the Gateway stops its
88
+ process group and every process started from it. The shell's tree is watched
89
+ while it runs, so a background job (`cmd &`, then `exit`) stops with its terminal
90
+ too; a process meant to outlive the terminal should be started elsewhere.
91
+
92
+ A command that prints faster than the browser can draw (`yes`, a large `cat`)
93
+ is paced: the terminal pauses its writer while the page catches up, and output
94
+ the page could not keep up with is replaced by an `[… output skipped …]` marker.
95
+ The conversation on the same connection is not interrupted.
96
+
97
+ Hiding the panel or reloading the page preserves the shell while its Gateway
98
+ runtime remains alive. Reopening replays up to 64 KB of retained output per tab.
99
+ Replay and agent attachments redact recognized secrets; the live terminal shows
100
+ the member's own raw output. Restarting the Gateway clears terminals and buffers.
101
+ If a command's receipt is lost, input pauses: **Check command again** asks about
102
+ the same command. Check the terminal before choosing **Checked, continue**.
103
+ Pending commands survive panel changes in page memory, not a page reload.
104
+
105
+ Write `@terminal` (terminal 1) or `@terminal:2` in the composer, then press Send
106
+ to attach the current redacted output. Repeated mentions attach a tab once, with
107
+ at most four tabs and a combined 64 KB of output. A mention of a terminal that
108
+ is not open attaches nothing and the message is sent as written. Output is quoted as untrusted evidence; merely typing a mention sends
109
+ nothing. Tab numbers increase within the runtime and are not reused after close.
110
+
111
+ The optional native PTY module can be unavailable. The panel explains this and
112
+ `piagent-doctor --json` reports `productReadiness.personalTerminal`; other dashboard
113
+ features remain usable. Doctor checks module loading and does not claim a shell
114
+ spawn test; a shell that cannot start is reported when you open a terminal. An
115
+ action refused before anything ran (no project folder, an exited terminal) says
116
+ so instead of "the command may have run". Native Windows is unavailable; use WSL.
117
+
118
+
119
+ ## Company terminal
120
+
121
+ Company conversations use the same terminal panel through the company Gateway,
122
+ including when opened from the personal dashboard. The shell runs inside the
123
+ conversation's tool boundary: bubblewrap on Linux and WSL, Seatbelt on macOS. It
124
+ has no internet, package proxy or Docker access. Writes reach the project, its Git
125
+ directories, the project's package caches and a private temporary directory, as
126
+ the agent's own offline commands do; a read-only profile keeps the project read-only. Credential
127
+ files are masked, and protected paths retain the boundary's restrictions.
128
+ The shell is Bash without startup files; it does not load the member's shell config.
129
+
130
+ Up to four terminals belong to each conversation. Closing a terminal, releasing
131
+ its conversation or shutting down the company Gateway stops its sandbox and
132
+ all descendants, including detached children. Hiding the panel and reloading the
133
+ browser preserve the terminal while the company runtime lives. A lost relay
134
+ connection disables input and reconnects for state and replay; it never resends
135
+ commands automatically. Explicit terminal mentions are attached inside the
136
+ company Gateway, and Studio grants stay there.
137
+
138
+ On macOS, Seatbelt refuses to create a PTY, so the company Gateway creates it
139
+ and starts only the shell under the agent's offline Seatbelt profile. That profile
140
+ gains two rules: terminal control calls on terminal devices, and `/dev/tty`. The
141
+ shell can reach only the terminal it was handed; opening any other terminal stays
142
+ denied. No company shell ever runs on the host. Native Windows is unavailable; use WSL.
143
+
144
+ `piagent-doctor --json` reports `productReadiness.companyTerminal`. A supported
145
+ result checks runtime files and prerequisites only (`ptySpawnVerified: false`);
146
+ it is not proof that this machine can spawn a sandboxed PTY. The complete
147
+ Gateway, relay and browser workflow was qualified on Linux arm64 in Docker and on
148
+ macOS arm64. Native Linux x64 and WSL were not independently qualified.
149
+
150
+ ## Restore an agent turn
151
+
152
+ In a Git project, a completed turn that changed files has **Restore before this
153
+ turn** in the Timeline. Open it to preview the affected files and number of turns,
154
+ then choose **Confirm restore**. Restoration runs from the newest turn back to
155
+ the selected turn. It removes files created by those turns and restores the
156
+ previous contents of files they changed. HEAD, commits made during a turn and
157
+ the member's staging area remain unchanged.
158
+
159
+ If a member changed an affected file afterward, restoration stops at that turn
160
+ and names the conflicting files. Newer safe turns may already have been restored;
161
+ the result reports how many. A running agent, changed preview or revoked write
162
+ permission requires a fresh preview. Protected and read-only paths retain their
163
+ restrictions. A project without Git has no checkpoints.
164
+
165
+ A file the member saved from the editor after a turn began counts as the
166
+ member's: restoring that turn names it as a conflict instead of putting it back.
167
+ A file that is on disk but outside the current snapshot (ignored since the turn,
168
+ or an untracked file too large to snapshot) is refused the same way. If a restore
169
+ stopped midway, a fresh preview lists only what is left: files already back as
170
+ they were count as done, not as conflicts. A refusal before any file changed is
171
+ reported as refused, not uncertain. Folders the turn created and the restore
172
+ emptied are removed. Any shell command that is not provably read-only takes the
173
+ turn's checkpoint first.
174
+ Edits typed into a terminal are not tracked this way; the drift check still
175
+ refuses files changed after the turn ended.
176
+
177
+ Personal Pi TUI also supports `/undo` for the latest turn without asking the
178
+ model. Personal history retains up to 64 checkpoints per project and session in
179
+ owner-only `.pi/piagent-state/checkpoints` files; a conversation untouched for
180
+ 30 days loses its checkpoints. Snapshots are kept in a private repository inside
181
+ the Git directory (`.git/piagent/checkpoints.git`), which uses the project's
182
+ objects but has its own refs: `git push --mirror` never publishes them, and the
183
+ project's garbage collection does not remove them. Snapshots include tracked files of any size,
184
+ skip untracked files over 100 MB and leave submodules out; undo never touches
185
+ what a snapshot left out. When a snapshot cannot be taken, the agent's edit
186
+ still proceeds; that turn has no checkpoint and earlier checkpoints are dropped,
187
+ because restoring past it would claim a state it never recorded. Only another
188
+ live runtime holding the same session's history makes an edit wait. If a personal runtime stops before the final snapshot, recovery leaves its
189
+ file edits intact and discards only the unfinished checkpoint metadata. Earlier
190
+ completed checkpoints still apply their member-edit conflict checks. Company checkpoint
191
+ operations run inside the existing sandbox; company history lasts for the runtime.
192
+
193
+ If the browser loses a restore response, **Check result again** sends the same
194
+ request key. The pending request survives reload in the same browser tab; reload
195
+ never submits it automatically. Keep that tab until the result is known. If the
196
+ browser cannot save the pending request, it refuses a new restore. An unconfirmed
197
+ result may mean files already changed: inspect them before continuing. Checking
198
+ the same request does not automatically repeat an uncertain file operation. If
199
+ only some files changed or the history save failed, the retained checkpoint can
200
+ report a conflict; inspect and resolve the files before a fresh restore attempt.
201
+
202
+
203
+ ## Try the complete workflow
204
+
205
+ Use a disposable Git project with an initial commit and a passing test command.
206
+ For personal mode, open it in `piagent dashboard`. For company mode, select its
207
+ company conversation.
208
+
209
+ 1. Open a tracked file in Files, make a small change and save with Cmd/Ctrl+S.
210
+ 2. Open Terminal, run the project's test command and inspect its exit status.
211
+ 3. Keep a different tracked file open. Ask the agent to read and edit that file
212
+ using edit/write. After the turn, inspect the added and removed inline lines.
213
+ 4. Choose Keep and check that the file content stays unchanged. Ask for a second
214
+ turn creating a small new file. Avoid shell edits for this attribution check.
215
+ 5. On the first agent turn, choose Restore before this turn. Check that the
216
+ preview lists both turns and both files, then confirm.
217
+ 6. Verify that the original file is restored, the new file is removed, and your
218
+ saved change from step 1 remains. HEAD and the staging area stay unchanged.
219
+
220
+ The `ide-editor-terminal` soak scenario separately exercises guarded editor saves
221
+ and terminal tests through the WebUI protocol. Its oracle self-check and transport
222
+ tests do not by themselves prove a completed run against a live model.
@@ -21,8 +21,8 @@
21
21
  "en": "README.md",
22
22
  "vi": "README.vi.md",
23
23
  "consistentAt": {
24
- "en": "5bc07f53997a89aeede83ee1208b1978d390b256",
25
- "vi": "44f4ce7fbda88734c40295a1b5d7bcc5082c46f2"
24
+ "en": "3a2494ac972f9c6859c66a7b977a3d0d12a65aca",
25
+ "vi": "c13e5aba7ff4b785d25a242617f57440b6b782eb"
26
26
  }
27
27
  },
28
28
  {
@@ -48,8 +48,8 @@
48
48
  "en": "docs/en/maintainer-guide.md",
49
49
  "vi": "docs/vi/maintainer-guide.md",
50
50
  "consistentAt": {
51
- "en": "e04ab2a64da66c59fbc2f52b472db481815c6ea5",
52
- "vi": "8ce84e7221156cfa3882e29d50045be989d1ea7d"
51
+ "en": "f54ad1af538e0dcde9f899219a3c70f76aeb8fef",
52
+ "vi": "51420ffcc8c4675eefaf31e08be9231c6521c2b9"
53
53
  }
54
54
  },
55
55
  {
@@ -60,6 +60,15 @@
60
60
  "en": "8bf18c59e1a99a57747a1d68775f43379d24e7af",
61
61
  "vi": "b6681a5be29c2891568d0cdbc26890b3b8f9570f"
62
62
  }
63
+ },
64
+ {
65
+ "topic": "workspace-editor",
66
+ "en": "docs/en/workspace-editor.md",
67
+ "vi": "docs/vi/workspace-editor.md",
68
+ "consistentAt": {
69
+ "en": "5e0866a133a9cf965abfd0877205d9177eb0fde6",
70
+ "vi": "cad370bbfb798d2b6459e1067b4bd5f9d9b47ed3"
71
+ }
63
72
  }
64
73
  ]
65
74
  }
@@ -19,12 +19,12 @@ Support matrix release hiện tại: macOS Apple Silicon + Bash và Linux x64 +
19
19
  ```bash
20
20
  node --version # >= 22.19.0
21
21
  npm install -g --ignore-scripts @earendil-works/pi-coding-agent@1.3.0
22
- npm install -g --ignore-scripts @piagent/platform@1.37.1
22
+ npm install -g --ignore-scripts @piagent/platform@1.38.2
23
23
  piagent-install --stable --dry-run
24
24
  piagent-install --stable
25
25
  ```
26
26
 
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.37.1`. 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.38.2`. Máy cá nhân có thể dùng `git:github.com/Vt-mmm/piagent` để theo latest.
28
28
 
29
29
  Nếu đang ở source checkout của platform, dùng helper theo channel để preview trước khi đổi:
30
30
 
@@ -100,7 +100,7 @@ install package once
100
100
 
101
101
  ```bash
102
102
  npm install -g --ignore-scripts @earendil-works/pi-coding-agent@1.3.0
103
- npm install -g --ignore-scripts @piagent/platform@1.37.1
103
+ npm install -g --ignore-scripts @piagent/platform@1.38.2
104
104
  piagent-install --stable --dry-run
105
105
  piagent-install --stable
106
106
  ```
@@ -285,7 +285,7 @@ Không phải daily default. Dùng khi muốn tạo sẵn `.pi` files cho projec
285
285
  bash /path/to/piagent/scripts/setup.sh /path/to/project \
286
286
  --project-only \
287
287
  --profile auto \
288
- --package-source git:github.com/Vt-mmm/piagent@v1.37.1 \
288
+ --package-source git:github.com/Vt-mmm/piagent@v1.38.2 \
289
289
  --mcp-preset core \
290
290
  --subagents-preset safe
291
291
  ```
@@ -999,8 +999,8 @@ Watchdog là optional adversarial reviewer ở cuối turn, không bật mặc
999
999
 
1000
1000
  | Command | Dùng để |
1001
1001
  |---|---|
1002
- | `npm install -g --ignore-scripts @piagent/platform@1.37.1` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
1003
- | `pi install git:github.com/Vt-mmm/piagent@v1.37.1` | Install pinned release cho reproducible team setup. |
1002
+ | `npm install -g --ignore-scripts @piagent/platform@1.38.2` | Cài terminal helper `piagent-*` từ release tag hiện tại. |
1003
+ | `pi install git:github.com/Vt-mmm/piagent@v1.38.2` | Install pinned release cho reproducible team setup. |
1004
1004
  | `pi install git:github.com/Vt-mmm/piagent` | Install latest platform package cho máy cá nhân/sandbox. |
1005
1005
  | 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). |
1006
1006
  | 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. |
@@ -1096,7 +1096,7 @@ Mở lại Pi session sau khi install.
1096
1096
  Cài lại terminal helper đúng release rồi kiểm tra `PATH`:
1097
1097
 
1098
1098
  ```bash
1099
- npm install -g --ignore-scripts @piagent/platform@1.37.1
1099
+ npm install -g --ignore-scripts @piagent/platform@1.38.2
1100
1100
  command -v piagent-install
1101
1101
  ```
1102
1102
 
@@ -41,6 +41,9 @@ pi install /path/to/piagent
41
41
 
42
42
  ## Versioning
43
43
 
44
+ - `1.38.2`: khung Tệp là cây thư mục như VS Code; theme màu (Piagent, Dracula, One Dark, Monokai, Nord, Tokyo Night, Catppuccin Mocha, Gruvbox, Solarized, GitHub) cho giao diện, editor và terminal, lưu trên trình duyệt (`piagent-webui-theme`); editor và terminal ghim dưới header khi hội thoại cuộn, có thanh chia độ rộng.
45
+ - `1.38.1`: nội dung như 1.38.0; 1.38.0 có tag nhưng không được publish vì hai test của bước kiểm tra phát hành (fixture Linux của terminal công ty, thời gian chờ thẻ duyệt).
46
+ - `1.38.0`: (tag, không publish) dashboard thành editor (file, tìm kiếm, lưu có kiểm tra xung đột, đổi tên/xóa, terminal cá nhân và công ty, review hunk Giữ/Hoàn tác, Timeline khôi phục lượt dùng chung checkpoint với `/undo`); quyền `bypass` cho cuộc trò chuyện cá nhân; cuộc trò chuyện công ty có `bypass` khi `harness.configuration.bypass_mode` là `true` (Agent Studio 0.38.0, Agent Watch 0.15.14 / Windows 0.1.17), "Toàn quyền" là `trusted-full-access`; `/bypass on|full|off`.
44
47
  - `1.37.1`: đóng run lỗi rồi hỏi lại chỉ được ghi là đã đóng khi Agent Watch gửi lại thật (`close-retry`, Agent Watch 0.15.11 / Windows 0.1.16); với Agent Watch cũ run để mở và được khôi phục khi mở lại cuộc trò chuyện; đóng role của helper đi qua cùng cơ chế chờ Studio và không làm hỏng câu trả lời; settlement gửi lại khi lỗi tạm thời; bài học lệnh lỗi lặp theo cả câu lệnh; file feedback skill riêng cho từng tên; serve cũ bị bỏ khi đổi key; bảo mật: `web_fetch` và package proxy chặn địa chỉ nội bộ ở mọi dạng IPv6 (mapped/NAT64/6to4 dạng hex), package proxy kiểm tra và ghim địa chỉ cả khi có `HTTPS_PROXY`.
45
48
  - `1.37.0`: câu trả lời Studio báo "Request interrupted" (upstream bị cắt giữa chừng) được hỏi lại như `upstream_interrupted` thay vì dừng task; thêm `piagent studio --rpc` cho script điều khiển một cuộc trò chuyện công ty; bộ soak task dài `evals/long-task-soak-v1` (chỉ trong repo).
46
49
  - `1.36.1`: lỗi `managed-broker` (Agent Watch không tới được Studio) trong lúc Studio vẫn trả lời heartbeat được hỏi lại, chờ tăng dần từ 2 giây, tối đa 3 phút kể từ request thành công gần nhất, rồi mới báo lỗi; bước đóng run cuối lượt cũng vậy; mỗi lần chờ ghi vào `studio-link.jsonl` và báo về Studio (`broker_offline`).
@@ -153,7 +153,7 @@ Use this flow when the team needs both terminal commands and the Pi package:
153
153
  ```bash
154
154
  node --version # >= 22.19.0
155
155
  npm install -g --ignore-scripts @earendil-works/pi-coding-agent@1.3.0
156
- npm install -g --ignore-scripts @piagent/platform@1.37.1
156
+ npm install -g --ignore-scripts @piagent/platform@1.38.2
157
157
  piagent-install --stable --dry-run
158
158
  piagent-install --stable
159
159
  ```
@@ -179,7 +179,7 @@ bash scripts/install-global.sh --stable
179
179
  Use this only when terminal commands are not needed:
180
180
 
181
181
  ```bash
182
- pi install git:github.com/Vt-mmm/piagent@v1.37.1
182
+ pi install git:github.com/Vt-mmm/piagent@v1.38.2
183
183
  ```
184
184
 
185
185
  Direct `pi install` does not create `piagent-*` commands on `PATH`.