@piagent/platform 1.37.1 → 1.38.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/CHANGELOG.md +47 -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 +2 -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 +17 -0
  22. package/docs-site/content/index.html +4 -4
  23. package/docs-site/content/whats-new.html +17 -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 +18 -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 +18 -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-DXF8-XqE.js +1 -0
  175. package/packages/piagent-webui/dist/client/assets/Button-DZJosXQi.js +1 -0
  176. package/packages/piagent-webui/dist/client/assets/DialogTitle-CL-fzCnT.js +3 -0
  177. package/packages/piagent-webui/dist/client/assets/MarkdownMessage-k4tq1y8s.js +29 -0
  178. package/packages/piagent-webui/dist/client/assets/TerminalPanel-DvOPgrGI.js +2 -0
  179. package/packages/piagent-webui/dist/client/assets/TerminalView-B_a16moC.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-DMZL1kLS.js +1 -0
  182. package/packages/piagent-webui/dist/client/assets/WorkspaceCodeEditor-BCiYM9NA.js +2 -0
  183. package/packages/piagent-webui/dist/client/assets/WorkspaceExplorer-DttpQtpf.js +5 -0
  184. package/packages/piagent-webui/dist/client/assets/WorkspaceQuickOpen-fgXwQ46B.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-B1M7IjfA.js +10 -0
  187. package/packages/piagent-webui/dist/client/assets/dist-BUYtGaUP.js +1 -0
  188. package/packages/piagent-webui/dist/client/assets/dist-C82AtDDT.js +6 -0
  189. package/packages/piagent-webui/dist/client/assets/dist-D9b8j6pJ.js +1 -0
  190. package/packages/piagent-webui/dist/client/assets/dist-DLfpWwLs.js +23 -0
  191. package/packages/piagent-webui/dist/client/assets/dist-DcEu_WYV.js +1 -0
  192. package/packages/piagent-webui/dist/client/assets/dist-_JsfplOG.js +9 -0
  193. package/packages/piagent-webui/dist/client/assets/dist-idN8f9Fc.js +1 -0
  194. package/packages/piagent-webui/dist/client/assets/dist-nvgpa2Us.js +1 -0
  195. package/packages/piagent-webui/dist/client/assets/index-BW8-BUMx.js +102 -0
  196. package/packages/piagent-webui/dist/client/assets/index-Brs_HjIo.css +1 -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-HE0XxoJf.js +1 -0
  199. package/packages/piagent-webui/dist/client/assets/ui-preferences-DiddStu0.js +124 -0
  200. package/packages/piagent-webui/dist/client/assets/useTheme-_ESOj7MI.js +10 -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 +14 -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
@@ -0,0 +1,24 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "version": "piagent-webui-workspace-paths-v1",
4
+ "generatedAt": "2026-10-22T00:00:00.000Z",
5
+ "identity": {
6
+ "projectRef": "project_01",
7
+ "runtimeInstanceId": "runtime_01",
8
+ "sessionRef": "session_01",
9
+ "taskId": null,
10
+ "taskRunId": null,
11
+ "agentOperationId": null,
12
+ "toolCallId": null
13
+ },
14
+ "query": "hello",
15
+ "truncated": false,
16
+ "suggestions": [
17
+ {
18
+ "value": "hello.ts",
19
+ "label": "hello.ts",
20
+ "detail": "hello.ts",
21
+ "kind": "shell"
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "version": "piagent-webui-workspace-paths-v1",
4
+ "generatedAt": "2026-10-22T00:00:00.000Z",
5
+ "identity": {
6
+ "projectRef": "project_01",
7
+ "runtimeInstanceId": "runtime_01",
8
+ "sessionRef": "session_01",
9
+ "taskId": null,
10
+ "taskRunId": null,
11
+ "agentOperationId": null,
12
+ "toolCallId": null
13
+ },
14
+ "query": "hello",
15
+ "truncated": false,
16
+ "suggestions": [
17
+ {
18
+ "value": "hello.ts",
19
+ "label": "hello.ts",
20
+ "detail": "hello.ts",
21
+ "kind": "file"
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "version": "piagent-webui-workspace-search-v1",
4
+ "generatedAt": "2026-10-22T00:00:00.000Z",
5
+ "identity": {
6
+ "projectRef": "project_01",
7
+ "runtimeInstanceId": "runtime_01",
8
+ "sessionRef": "session_01",
9
+ "taskId": null,
10
+ "taskRunId": null,
11
+ "agentOperationId": null,
12
+ "toolCallId": null
13
+ },
14
+ "query": "hello",
15
+ "truncated": false,
16
+ "available": true,
17
+ "backend": "ripgrep",
18
+ "matches": [
19
+ {
20
+ "path": "hello.ts",
21
+ "line": 0,
22
+ "column": 3,
23
+ "preview": " hello"
24
+ }
25
+ ]
26
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "version": "piagent-webui-workspace-search-v1",
4
+ "generatedAt": "2026-10-22T00:00:00.000Z",
5
+ "identity": {
6
+ "projectRef": "project_01",
7
+ "runtimeInstanceId": "runtime_01",
8
+ "sessionRef": "session_01",
9
+ "taskId": null,
10
+ "taskRunId": null,
11
+ "agentOperationId": null,
12
+ "toolCallId": null
13
+ },
14
+ "query": "hello",
15
+ "truncated": false,
16
+ "available": true,
17
+ "backend": "ripgrep",
18
+ "matches": [
19
+ {
20
+ "path": "hello.ts",
21
+ "line": 2,
22
+ "column": 3,
23
+ "preview": " hello"
24
+ }
25
+ ]
26
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "version": "piagent-webui-workspace-tree-v1",
4
+ "generatedAt": "2026-10-22T00:00:00.000Z",
5
+ "identity": {
6
+ "projectRef": "project_01",
7
+ "runtimeInstanceId": "runtime_01",
8
+ "sessionRef": "session_01",
9
+ "taskId": null,
10
+ "taskRunId": null,
11
+ "agentOperationId": null,
12
+ "toolCallId": null
13
+ },
14
+ "path": "",
15
+ "entries": [
16
+ {
17
+ "name": "src",
18
+ "path": "src",
19
+ "kind": "directory",
20
+ "protected": false,
21
+ "readOnly": false,
22
+ "ignored": false
23
+ }
24
+ ],
25
+ "truncated": false,
26
+ "source": "git",
27
+ "unexpectedAuthority": true
28
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "version": "piagent-webui-workspace-tree-v1",
4
+ "generatedAt": "2026-10-22T00:00:00.000Z",
5
+ "identity": {
6
+ "projectRef": "project_01",
7
+ "runtimeInstanceId": "runtime_01",
8
+ "sessionRef": "session_01",
9
+ "taskId": null,
10
+ "taskRunId": null,
11
+ "agentOperationId": null,
12
+ "toolCallId": null
13
+ },
14
+ "path": "",
15
+ "entries": [
16
+ {
17
+ "name": "src",
18
+ "path": "src",
19
+ "kind": "directory",
20
+ "protected": false,
21
+ "readOnly": false,
22
+ "ignored": false
23
+ }
24
+ ],
25
+ "truncated": false,
26
+ "source": "git"
27
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "version": "piagent-webui-workspace-write-v1",
4
+ "messageType": "state",
5
+ "identity": {
6
+ "projectRef": "project_01",
7
+ "runtimeInstanceId": "runtime_01",
8
+ "sessionRef": "session_01",
9
+ "taskId": null,
10
+ "taskRunId": null,
11
+ "agentOperationId": null,
12
+ "toolCallId": null
13
+ },
14
+ "revisions": {
15
+ "workspaceRevision": "workspace.0"
16
+ },
17
+ "writable": "yes",
18
+ "agentRunning": false
19
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "version": "piagent-webui-workspace-write-v1",
4
+ "messageType": "state",
5
+ "identity": {
6
+ "projectRef": "project_01",
7
+ "runtimeInstanceId": "runtime_01",
8
+ "sessionRef": "session_01",
9
+ "taskId": null,
10
+ "taskRunId": null,
11
+ "agentOperationId": null,
12
+ "toolCallId": null
13
+ },
14
+ "revisions": {
15
+ "workspaceRevision": "workspace.0"
16
+ },
17
+ "writable": true,
18
+ "agentRunning": false
19
+ }
@@ -28,6 +28,7 @@ the deterministic lifecycle evidence lives in `evals/long-horizon-v1` and the
28
28
  node evals/long-task-soak-v1/runner.mjs --list
29
29
  node evals/long-task-soak-v1/runner.mjs --self-check # oracles: fail on the fixture, pass on the reference
30
30
  node evals/long-task-soak-v1/runner.mjs --surface webui --scenario autonomous-node-inventory
31
+ node evals/long-task-soak-v1/runner.mjs --surface webui --scenario ide-editor-terminal
31
32
  node evals/long-task-soak-v1/runner.mjs --surface both --category business,third-party --repeat 2
32
33
  ```
33
34
 
@@ -35,6 +36,16 @@ Runs go to `~/piagent-soak/runs/<time>/<scenario>-<surface>-<n>/` (`project/`,
35
36
  `events.jsonl`, `result.json`); reports to `~/piagent-soak/reports/` as JSON
36
37
  and Markdown. `--work-root` moves both.
37
38
 
39
+ `ide-editor-terminal` requires a working company terminal (qualified on Linux;
40
+ macOS Seatbelt reports unavailable). After the first agent turn, the member reads
41
+ README through the workspace API, saves an appended note with its exact digest,
42
+ and verifies the saved bytes through the same API. It then opens a real terminal
43
+ over the authenticated Gateway WebSocket, runs `npm test`, observes its numeric
44
+ exit status and closes the terminal. Missing, rejected, uncertain or unfinished
45
+ member actions fail the scenario even if the agent's hidden oracle passes.
46
+ These are editor/terminal protocol operations, not browser rendering coverage;
47
+ the browser workflows are qualified separately. No host shell fallback is used.
48
+
38
49
  ## Verdicts
39
50
 
40
51
  - `smooth`: the checks pass and the member never had to push.
@@ -77,6 +88,12 @@ the scenario's decisions need, each counted as a push); per run:
77
88
  }
78
89
  ```
79
90
 
91
+ WebUI scenarios can also use ordered actions after a settled turn:
92
+ `{ "when": { "turns": 1 }, "do": "editor_save", "path": "README.md", "append": "\nMember note.\n" }`
93
+ and `{ "when": { "turns": 1 }, "do": "terminal_test", "command": "npm test", "timeoutSec": 120, "expectedExitCode": 0 }`.
94
+ They run in listed order before oracle judging. The RPC terminal surface does
95
+ not implement these member workspace operations and fails them explicitly.
96
+
80
97
  A fixture is `fixtures/<name>/` with `project/` (what the member's repository
81
98
  holds), `fixture.json` (`setup` commands such as dependency installs,
82
99
  `protect`ed files), one or more hidden overlays (acceptance tests the agent
@@ -24,12 +24,13 @@ export async function playScenario({ scenario, surface, prepared, runDir }) {
24
24
  const budget = { maxMinutes: 120, maxNudges: 3, stallMinutes: 15, ...(scenario.budget ?? {}) };
25
25
  const persona = new Persona(scenario), started = Date.now(), log = fs.createWriteStream(path.join(runDir, 'events.jsonl'));
26
26
  const stats = { turns: 0, toolCalls: 0, toolErrors: 0, providerRetries: 0, compactions: 0, capacityWaits: 0, assistantMessages: 0,
27
- nudges: 0, stalls: 0, crashes: 0, restarts: 0, memberStops: 0, steers: 0, questions: 0, proseAnswers: 0, approvals: 0, inputTokens: 0, outputTokens: 0 };
27
+ nudges: 0, stalls: 0, crashes: 0, restarts: 0, memberStops: 0, steers: 0, questions: 0, proseAnswers: 0, approvals: 0, inputTokens: 0, outputTokens: 0, workspaceActions: 0 };
28
28
  const turns = [], defects = [], actions = (scenario.userActions ?? []).map(a => ({ ...a, fired: false }));
29
29
  const record = (type, data = {}) => log.write(JSON.stringify({ t: Date.now() - started, type, ...data }) + '\n');
30
30
  let lastActivity = Date.now(), pendingAction = null;
31
31
 
32
32
  const due = a => !a.fired && ((a.when?.toolCalls != null && stats.toolCalls >= a.when.toolCalls)
33
+ || (a.when?.turns != null && stats.turns >= a.when.turns)
33
34
  || (a.when?.minutes != null && Date.now() - started >= a.when.minutes * MINUTE));
34
35
  const hooks = {
35
36
  onEvent(e) {
@@ -73,7 +74,16 @@ export async function playScenario({ scenario, surface, prepared, runDir }) {
73
74
  if (restarted === 'reopened') return { resume: action.text ?? persona.afterStall() };
74
75
  if (!restarted) record('member_action_unsupported', { do: action.do });
75
76
  }
76
- } catch (error) { record('member_action_failed', { do: action.do, error: String(error?.message ?? error) }); }
77
+ else if (['editor_save', 'terminal_test'].includes(action.do)) {
78
+ if (!surface.memberAction) throw Error('workspace-actions-require-webui');
79
+ const result = await surface.memberAction(action);
80
+ action.completed = true; stats.workspaceActions++;
81
+ record('member_action_completed', { do: action.do, ...result });
82
+ }
83
+ } catch (error) {
84
+ record('member_action_failed', { do: action.do, error: String(error?.message ?? error) });
85
+ if (['editor_save', 'terminal_test'].includes(action.do)) defects.push({ defect: 'workspace_action_failed', action: action.do });
86
+ }
77
87
  return null;
78
88
  }
79
89
 
@@ -104,6 +114,10 @@ export async function playScenario({ scenario, surface, prepared, runDir }) {
104
114
  const turn = await turnEnd();
105
115
  stats.turns++; finalTurn = turn;
106
116
  const action = pendingAction ? await pendingAction : null; pendingAction = null;
117
+ // Ordered member work at a settled turn must finish before oracle judging.
118
+ for (const next of actions.filter(a => ['editor_save', 'terminal_test'].includes(a.do) && due(a))) {
119
+ next.fired = true; await fire(next);
120
+ }
107
121
  if (turn.crashed) {
108
122
  stats.crashes++; record('crash', { detail: turn.error });
109
123
  if (!(await surface.restart().catch(() => false))) { defects.push({ turn: stats.turns, defect: 'process_crashed_unrecoverable' }); break; }
@@ -156,7 +170,9 @@ export async function playScenario({ scenario, surface, prepared, runDir }) {
156
170
  for (const file of touched) defects.push({ defect: 'protected_file_changed', file });
157
171
  for (const id of notAsked) defects.push({ defect: 'business_decision_not_asked', decision: id });
158
172
  if (scenario.questionsExpected === false) for (const q of persona.unexpected) defects.push({ defect: 'unneeded_question', question: q.slice(0, 200) });
159
- const pass = phasesDone === phases.length && oracle.pass && touched.length === 0;
173
+ const workspaceActionsComplete = actions.filter(a => ['editor_save', 'terminal_test'].includes(a.do)).every(a => a.completed);
174
+ if (!workspaceActionsComplete) defects.push({ defect: 'workspace_actions_incomplete' });
175
+ const pass = phasesDone === phases.length && oracle.pass && touched.length === 0 && workspaceActionsComplete;
160
176
  return {
161
177
  scenario: scenario.id, pass, verdict: verdict({ pass, ...stats, maxNudges: budget.maxNudges }),
162
178
  minutes: +((Date.now() - started) / MINUTE).toFixed(1), phases: `${phasesDone}/${phases.length}`, stats, defects, turns, oracle,
@@ -0,0 +1,19 @@
1
+ {
2
+ "id": "ide-editor-terminal",
3
+ "title": "Member saves a document through the editor API and runs the project tests in the company terminal",
4
+ "category": ["ide", "autonomous", "long-horizon"],
5
+ "language": "vi",
6
+ "fixture": "node-inventory",
7
+ "requires": ["git"],
8
+ "prompt": "Làm toàn bộ SPEC.md cho thư viện kho-hang: cài đặt đủ 9 mục trong src/, viết test từng mục trong test/, chạy npm test đến khi qua hết. Đặc tả đã đủ, không cần hỏi lại, cứ làm đến xong. Sau lượt này anh sẽ mở README.md trong editor, lưu ghi chú của anh và tự chạy npm test trong terminal của WebUI.",
9
+ "questionsExpected": false,
10
+ "decisions": [],
11
+ "approvals": "allow",
12
+ "userActions": [
13
+ { "when": { "turns": 1 }, "do": "editor_save", "path": "README.md", "append": "\nMember reviewed this project in the Session Hub editor.\n" },
14
+ { "when": { "turns": 1 }, "do": "terminal_test", "command": "npm test", "timeoutSec": 120, "expectedExitCode": 0 }
15
+ ],
16
+ "budget": { "maxMinutes": 60, "maxNudges": 3, "stallMinutes": 12 },
17
+ "oracle": { "hidden": "hidden", "checks": [{ "name": "spec acceptance", "run": "node --test 'test/*.test.js'", "timeoutSec": 300 }] },
18
+ "reference": "reference"
19
+ }
@@ -2,6 +2,7 @@ import { spawn } from 'node:child_process';
2
2
  import { randomUUID } from 'node:crypto';
3
3
  import { WebSocket } from 'ws';
4
4
  import { piagentEnv } from '../lib/workspace.mjs';
5
+ import { editWorkspace, runTerminal } from './workspace-actions.mjs';
5
6
 
6
7
  // The company WebUI (Agent Watch Auto) used the way the browser app uses it:
7
8
  // the launch link's capability for a cookie and CSRF token, the Gateway
@@ -12,7 +13,13 @@ const PROTOCOL = { schemaVersion: 1, version: 'piagent-gateway-protocol-v1' };
12
13
  const wait = ms => new Promise(r => setTimeout(r, ms));
13
14
 
14
15
  export class WebUiSurface {
15
- constructor({ piagent = 'piagent' } = {}) { this.piagent = piagent; this.pending = new Map(); this.answered = new Set(); }
16
+ constructor({ piagent = 'piagent' } = {}) { this.piagent = piagent; this.pending = new Map(); this.answered = new Set(); this.terminalListeners = new Set(); }
17
+ onTerminal(listener) { this.terminalListeners.add(listener); return () => this.terminalListeners.delete(listener); }
18
+ memberAction(action) {
19
+ if (action.do === 'editor_save') return editWorkspace(this, action);
20
+ if (action.do === 'terminal_test') return runTerminal(this, action);
21
+ throw Error('unsupported-workspace-action');
22
+ }
16
23
 
17
24
  // `--web` prints the launch link; when no company Gateway runs yet it starts
18
25
  // one and keeps serving it, so read the link without waiting for an exit
@@ -64,6 +71,10 @@ export class WebUiSurface {
64
71
  ws.on('open', () => ws.send(JSON.stringify({ ...PROTOCOL, messageType: 'connect', clientRef: 'soak_member', minimumProtocol: 1, maximumProtocol: 1, lastEventSequence: null, catalogRevision: null })));
65
72
  ws.on('message', data => {
66
73
  let frame; try { frame = JSON.parse(String(data)); } catch { return; }
74
+ if (frame.version === 'piagent-terminal-v1') {
75
+ for (const listener of this.terminalListeners) listener(frame);
76
+ return;
77
+ }
67
78
  if (frame.messageType === 'hello') { clearTimeout(timer); resolve(ws); return; }
68
79
  if (frame.messageType === 'response') {
69
80
  const p = this.pending.get(frame.requestId); if (!p) return; this.pending.delete(frame.requestId);
@@ -77,11 +88,15 @@ export class WebUiSurface {
77
88
  }
78
89
 
79
90
  #request(command) {
91
+ return this.gatewayRequest('sessions.command', { command });
92
+ }
93
+
94
+ gatewayRequest(method, params) {
80
95
  const requestId = opaque('request');
81
96
  return new Promise((resolve, reject) => {
82
97
  const timer = setTimeout(() => { this.pending.delete(requestId); reject(Error('gateway command timeout')); }, 60_000);
83
98
  this.pending.set(requestId, { resolve: v => { clearTimeout(timer); resolve(v); }, reject: e => { clearTimeout(timer); reject(e); } });
84
- this.ws.send(JSON.stringify({ ...PROTOCOL, messageType: 'request', requestId, method: 'sessions.command', params: { command } }));
99
+ this.ws.send(JSON.stringify({ ...PROTOCOL, messageType: 'request', requestId, method, params }));
85
100
  });
86
101
  }
87
102
 
@@ -0,0 +1,95 @@
1
+ import { createHash, randomUUID } from 'node:crypto';
2
+
3
+ const canonical = value => Array.isArray(value) ? `[${value.map(canonical).join(',')}]`
4
+ : value && typeof value === 'object' ? `{${Object.entries(value).sort(([a], [b]) => a.localeCompare(b))
5
+ .map(([key, item]) => `${JSON.stringify(key)}:${canonical(item)}`).join(',')}}` : JSON.stringify(value);
6
+ const digest = value => `sha256:${createHash('sha256').update(value).digest('hex')}`;
7
+ const requireThat = (condition, reason) => { if (!condition) throw Error(reason); };
8
+ const wait = ms => new Promise(resolve => setTimeout(resolve, ms));
9
+
10
+ function command(state, action, version, payload) {
11
+ const now = Date.now(), identity = state.identity, expectedRevisions = state.revisions;
12
+ return { schemaVersion: 1, version, messageType: 'command', action, identity, expectedRevisions, payload,
13
+ commandId: randomUUID(), idempotencyKey: randomUUID(), requestedAt: new Date(now).toISOString(),
14
+ expiresAt: new Date(now + 60000).toISOString(), actionDigest: digest(canonical({ action, identity, expectedRevisions, payload })) };
15
+ }
16
+
17
+ function correlated(receipt, sent) {
18
+ requireThat(receipt?.schemaVersion === 1 && receipt.version === sent.version && receipt.messageType === 'receipt'
19
+ && receipt.commandId === sent.commandId && receipt.action === sent.action && receipt.actionDigest === sent.actionDigest
20
+ && canonical(receipt.identity) === canonical(sent.identity), 'member-action-receipt-mismatch');
21
+ requireThat(receipt.phase === 'settled', `member-action-${receipt.phase ?? 'invalid'}:${receipt.resultCode ?? receipt.reasonCode ?? 'unknown'}`);
22
+ }
23
+
24
+ // These are member operations through the same authenticated Gateway routes as
25
+ // the editor and terminal. No host filesystem or shell shortcut qualifies them.
26
+ export async function editWorkspace(surface, action) {
27
+ requireThat(surface.sessionRef && typeof action.path === 'string' && typeof action.append === 'string', 'editor-action-invalid');
28
+ const base = `/api/v1/sessions/${encodeURIComponent(surface.sessionRef)}`;
29
+ const readPath = `${base}/inspection/workspace/file?${new URLSearchParams({ path: action.path })}`;
30
+ const before = await surface.http('GET', readPath);
31
+ requireThat(before.status === 200 && typeof before.value?.content === 'string' && typeof before.value.digest === 'string'
32
+ && !before.value.protected && !before.value.readOnly && !before.value.binary && !before.value.oversized, 'editor-file-unavailable');
33
+ const state = await surface.http('GET', `${base}/workspace/write`);
34
+ requireThat(state.status === 200 && state.value?.writable, 'editor-write-unavailable');
35
+ const content = before.value.content + action.append;
36
+ const sent = command(state.value, 'workspace.write', 'piagent-webui-workspace-write-v1',
37
+ { path: action.path, content, expectedDigest: before.value.digest });
38
+ const result = await surface.http('POST', `${base}/workspace/write`, sent);
39
+ requireThat(result.status === 200, `editor-write-http:${result.status}`);
40
+ correlated(result.value, sent);
41
+ requireThat(result.value.idempotencyKeyDigest === digest(sent.idempotencyKey) && result.value.resultCode === 'saved'
42
+ && result.value.path === action.path, 'editor-write-not-saved');
43
+ const after = await surface.http('GET', readPath);
44
+ requireThat(after.status === 200 && after.value?.content === content && after.value.digest === result.value.digest,
45
+ 'editor-save-readback-mismatch');
46
+ return { path: action.path, digest: result.value.digest };
47
+ }
48
+
49
+ export async function runTerminal(surface, action) {
50
+ requireThat(surface.sessionRef && typeof action.command === 'string' && action.command.length > 0
51
+ && action.command.length <= 12000, 'terminal-action-invalid');
52
+ const timeout = Number(action.timeoutSec ?? 120);
53
+ requireThat(Number.isFinite(timeout) && timeout > 0 && timeout <= 600, 'terminal-action-timeout-invalid');
54
+ const buffers = new Map();
55
+ const unsubscribe = surface.onTerminal(message => {
56
+ if (message.messageType !== 'output' || message.identity?.sessionRef !== surface.sessionRef) return;
57
+ if (!buffers.has(message.terminalRef) && buffers.size >= 4) return;
58
+ buffers.set(message.terminalRef, ((buffers.get(message.terminalRef) ?? '') + message.data).slice(-65536));
59
+ });
60
+ const execute = async payload => {
61
+ const state = await surface.gatewayRequest('terminals.state', { sessionRef: surface.sessionRef, csrfToken: surface.csrf });
62
+ requireThat(state?.messageType === 'state' && state.available && state.identity?.sessionRef === surface.sessionRef,
63
+ `terminal-unavailable:${state?.reasonCode ?? 'invalid-state'}`);
64
+ const sent = command(state, 'terminal.command', 'piagent-terminal-v1', payload);
65
+ const receipt = await surface.gatewayRequest('terminals.command', { command: sent, csrfToken: surface.csrf });
66
+ correlated(receipt, sent);
67
+ requireThat(receipt.idempotencyKey === sent.idempotencyKey, 'terminal-idempotency-mismatch');
68
+ return receipt;
69
+ };
70
+ let terminalRef;
71
+ try {
72
+ const opened = await execute({ kind: 'open', cols: 100, rows: 30 });
73
+ terminalRef = opened.terminalRef;
74
+ requireThat(typeof terminalRef === 'string', 'terminal-open-missing-reference');
75
+ const marker = `SOAK_${randomUUID().replaceAll('-', '')}`;
76
+ // The shell echoes a format string, never the marker followed by a numeric
77
+ // status; only execution can produce the completion witness.
78
+ await execute({ kind: 'input', terminalRef,
79
+ data: `( ${action.command} ); soak_status=$?; printf '\\n%s:%s\\n' '${marker}' "$soak_status"\n` });
80
+ const deadline = Date.now() + timeout * 1000;
81
+ while (Date.now() < deadline) {
82
+ const match = buffers.get(terminalRef)?.match(new RegExp(`${marker}:(\\d+)`));
83
+ if (match) {
84
+ const exitCode = Number(match[1]);
85
+ requireThat(exitCode === (action.expectedExitCode ?? 0), `terminal-command-exit:${exitCode}`);
86
+ return { exitCode };
87
+ }
88
+ await wait(50);
89
+ }
90
+ throw Error('terminal-command-completion-timeout');
91
+ } finally {
92
+ try { if (terminalRef) await execute({ kind: 'close', terminalRef }); }
93
+ finally { unsubscribe(); }
94
+ }
95
+ }
@@ -256,8 +256,8 @@
256
256
  },
257
257
  {
258
258
  "path": "tests",
259
- "fileCount": 570,
260
- "sha256": "49831d3854e0342c89dc2e8dc28aaa0b9a0e6ae7870e1ab5c7ab003fee12e787"
259
+ "fileCount": 619,
260
+ "sha256": "837b457b95e2aee754b713263ed5bafed0ce1ef3dcff8035b47b43e4f65d3cbe"
261
261
  }
262
262
  ],
263
263
  "custodianComparisonRules": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@piagent/platform",
3
- "version": "1.37.1",
3
+ "version": "1.38.1",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -66,7 +66,8 @@
66
66
  "schemas/",
67
67
  "scripts/",
68
68
  "templates/",
69
- "types/"
69
+ "types/",
70
+ "packages/piagent-core/managed/dist/workspace/"
70
71
  ],
71
72
  "bin": {
72
73
  "piagent": "scripts/piagent-cli.mjs",
@@ -154,7 +155,7 @@
154
155
  ],
155
156
  "scripts": {
156
157
  "verify": "bash scripts/verify-local.sh",
157
- "test": "PIAGENT_NO_UPDATE_CHECK=1 node --test --test-force-exit tests/*.test.mjs",
158
+ "test": "PIAGENT_NO_UPDATE_CHECK=1 node --test --test-concurrency=2 --test-force-exit tests/*.test.mjs",
158
159
  "test:webui:e2e": "playwright test --config playwright.webui.config.mjs",
159
160
  "test:policy": "node --test tests/policy-core.test.mjs",
160
161
  "test:golden": "node --test tests/golden-enforcement.test.mjs",
@@ -192,5 +193,8 @@
192
193
  },
193
194
  "engines": {
194
195
  "node": ">=22.19.0"
196
+ },
197
+ "optionalDependencies": {
198
+ "@lydell/node-pty": "1.2.0-beta.15"
195
199
  }
196
200
  }
@@ -31,7 +31,7 @@ export function fallbackBasePolicy(
31
31
  defaultRequiredContext: ["AGENTS.md", "README.md"],
32
32
  permissionProfiles: {
33
33
  defaultMode: "workspace-write",
34
- allowedModes: ["read-only", "workspace-write", "trusted-full-access"]
34
+ allowedModes: ["read-only", "workspace-write", "trusted-full-access", "bypass"]
35
35
  },
36
36
  execPolicy: {
37
37
  defaultMode: "enforce",
@@ -322,7 +322,9 @@ export type ResolvedOrchestrationPolicy = {
322
322
  rules: string[];
323
323
  };
324
324
 
325
- export type PermissionProfileMode = "read-only" | "workspace-write" | "trusted-full-access";
325
+ // "bypass": personal sessions only; no Piagent gate asks or blocks (as Codex's
326
+ // --dangerously-bypass-approvals-and-sandbox). Output redaction and turn checkpoints still run.
327
+ export type PermissionProfileMode = "read-only" | "workspace-write" | "trusted-full-access" | "bypass";
326
328
 
327
329
  export type PermissionProfilesConfig = {
328
330
  defaultMode?: PermissionProfileMode;