pi-agent-browser-native 0.9.4 → 0.9.6

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 (388) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +60 -812
  3. package/dist/extensions/agent-browser/index.js +2381 -1706
  4. package/dist/packaged/lib/browser-session-conversion.js +2810 -0
  5. package/dist/packaged/lib/config-policy.js +599 -0
  6. package/dist/packaged/lib/parsing.js +34 -0
  7. package/dist/packaged/lib/playbook.js +694 -0
  8. package/dist/packaged/lib/results/snapshot.js +2671 -0
  9. package/dist/packaged/lib/runtime.js +3027 -0
  10. package/docs/ARCHITECTURE.md +14 -3
  11. package/docs/CODE_QUALITY.md +39 -3
  12. package/docs/COMMAND_REFERENCE.md +22 -22
  13. package/docs/ELECTRON.md +24 -2
  14. package/docs/PERFORMANCE.md +243 -0
  15. package/docs/REFERENCE.md +869 -0
  16. package/docs/RELEASE.md +9 -9
  17. package/docs/REQUIREMENTS.md +1 -1
  18. package/docs/SESSION_STORAGE.md +11 -3
  19. package/docs/SUPPORT_MATRIX.md +16 -11
  20. package/docs/TOOL_CONTRACT.md +17 -13
  21. package/docs/performance/2026-10-12.json +7257 -0
  22. package/docs/platform-smoke.md +3 -3
  23. package/package.json +15 -3
  24. package/scripts/build.mjs +16 -5
  25. package/scripts/config.mjs +24 -20
  26. package/scripts/convert-browser-session.mjs +1 -1
  27. package/scripts/doctor.mjs +2 -2
  28. package/scripts/platform-smoke/lease-evidence.mjs +2 -4
  29. package/scripts/platform-smoke/linux-image/Dockerfile +8 -2
  30. package/scripts/platform-smoke/targets.mjs +1 -5
  31. package/dist/extensions/agent-browser/lib/argv-descriptor.js +0 -123
  32. package/dist/extensions/agent-browser/lib/argv-grammar.js +0 -320
  33. package/dist/extensions/agent-browser/lib/bash-guard.js +0 -193
  34. package/dist/extensions/agent-browser/lib/batch-lifecycle.js +0 -131
  35. package/dist/extensions/agent-browser/lib/browser-execution-claim-codec.js +0 -61
  36. package/dist/extensions/agent-browser/lib/browser-execution-claim-storage.js +0 -232
  37. package/dist/extensions/agent-browser/lib/browser-execution-claims.js +0 -202
  38. package/dist/extensions/agent-browser/lib/browser-execution-identity.js +0 -77
  39. package/dist/extensions/agent-browser/lib/browser-journal-branch.js +0 -98
  40. package/dist/extensions/agent-browser/lib/browser-journal-contracts.js +0 -1
  41. package/dist/extensions/agent-browser/lib/browser-journal-projection.js +0 -221
  42. package/dist/extensions/agent-browser/lib/browser-journal-reader.js +0 -89
  43. package/dist/extensions/agent-browser/lib/browser-journal-replay.js +0 -246
  44. package/dist/extensions/agent-browser/lib/browser-journal.js +0 -148
  45. package/dist/extensions/agent-browser/lib/browser-legacy-pages.js +0 -220
  46. package/dist/extensions/agent-browser/lib/browser-legacy-projection.js +0 -282
  47. package/dist/extensions/agent-browser/lib/browser-legacy-types.js +0 -1
  48. package/dist/extensions/agent-browser/lib/browser-session-conversion-stream.js +0 -217
  49. package/dist/extensions/agent-browser/lib/browser-session-conversion.js +0 -126
  50. package/dist/extensions/agent-browser/lib/browser-transcript-contracts.js +0 -35
  51. package/dist/extensions/agent-browser/lib/browser-transcript-validation.js +0 -166
  52. package/dist/extensions/agent-browser/lib/browser-transcript.js +0 -189
  53. package/dist/extensions/agent-browser/lib/browser-value-parsing.js +0 -15
  54. package/dist/extensions/agent-browser/lib/command-capabilities.js +0 -340
  55. package/dist/extensions/agent-browser/lib/command-policy.js +0 -155
  56. package/dist/extensions/agent-browser/lib/command-taxonomy.js +0 -105
  57. package/dist/extensions/agent-browser/lib/config-policy.js +0 -450
  58. package/dist/extensions/agent-browser/lib/config-providers.js +0 -71
  59. package/dist/extensions/agent-browser/lib/config-validation.js +0 -218
  60. package/dist/extensions/agent-browser/lib/config.js +0 -69
  61. package/dist/extensions/agent-browser/lib/electron/cdp.js +0 -58
  62. package/dist/extensions/agent-browser/lib/electron/cleanup.js +0 -308
  63. package/dist/extensions/agent-browser/lib/electron/discovery-darwin.js +0 -109
  64. package/dist/extensions/agent-browser/lib/electron/discovery-desktop.js +0 -136
  65. package/dist/extensions/agent-browser/lib/electron/discovery-evidence.js +0 -89
  66. package/dist/extensions/agent-browser/lib/electron/discovery-linux.js +0 -93
  67. package/dist/extensions/agent-browser/lib/electron/discovery-packages.js +0 -162
  68. package/dist/extensions/agent-browser/lib/electron/discovery-types.js +0 -2
  69. package/dist/extensions/agent-browser/lib/electron/discovery.js +0 -217
  70. package/dist/extensions/agent-browser/lib/electron/launch-monitor.js +0 -102
  71. package/dist/extensions/agent-browser/lib/electron/launch-process.js +0 -209
  72. package/dist/extensions/agent-browser/lib/electron/launch-types.js +0 -2
  73. package/dist/extensions/agent-browser/lib/electron/launch.js +0 -329
  74. package/dist/extensions/agent-browser/lib/executable-path.js +0 -29
  75. package/dist/extensions/agent-browser/lib/execution-cwd.js +0 -67
  76. package/dist/extensions/agent-browser/lib/fs-utils.js +0 -18
  77. package/dist/extensions/agent-browser/lib/input-modes/electron.js +0 -201
  78. package/dist/extensions/agent-browser/lib/input-modes/job.js +0 -195
  79. package/dist/extensions/agent-browser/lib/input-modes/lookup-network-evidence.js +0 -104
  80. package/dist/extensions/agent-browser/lib/input-modes/lookup-plan.js +0 -132
  81. package/dist/extensions/agent-browser/lib/input-modes/lookup-redaction.js +0 -57
  82. package/dist/extensions/agent-browser/lib/input-modes/lookup-source-evidence.js +0 -151
  83. package/dist/extensions/agent-browser/lib/input-modes/lookup-workspace.js +0 -142
  84. package/dist/extensions/agent-browser/lib/input-modes/lookups.js +0 -83
  85. package/dist/extensions/agent-browser/lib/input-modes/params.js +0 -195
  86. package/dist/extensions/agent-browser/lib/input-modes/qa-analysis.js +0 -268
  87. package/dist/extensions/agent-browser/lib/input-modes/qa-presentation.js +0 -117
  88. package/dist/extensions/agent-browser/lib/input-modes/script-child.js +0 -396
  89. package/dist/extensions/agent-browser/lib/input-modes/script-protocol.js +0 -86
  90. package/dist/extensions/agent-browser/lib/input-modes/script-types.js +0 -1
  91. package/dist/extensions/agent-browser/lib/input-modes/script-validation.js +0 -60
  92. package/dist/extensions/agent-browser/lib/input-modes/script.js +0 -108
  93. package/dist/extensions/agent-browser/lib/input-modes/semantic-action.js +0 -243
  94. package/dist/extensions/agent-browser/lib/input-modes/shared.js +0 -48
  95. package/dist/extensions/agent-browser/lib/input-modes/types.js +0 -65
  96. package/dist/extensions/agent-browser/lib/json-schema.js +0 -65
  97. package/dist/extensions/agent-browser/lib/launch-scoped-flags.js +0 -212
  98. package/dist/extensions/agent-browser/lib/managed-session-policy-lock.js +0 -165
  99. package/dist/extensions/agent-browser/lib/managed-session-posix-storage.js +0 -58
  100. package/dist/extensions/agent-browser/lib/managed-session-project-identity.js +0 -244
  101. package/dist/extensions/agent-browser/lib/managed-session-restore-context.js +0 -84
  102. package/dist/extensions/agent-browser/lib/managed-session-restore-policy.js +0 -119
  103. package/dist/extensions/agent-browser/lib/managed-session-restore-state.js +0 -83
  104. package/dist/extensions/agent-browser/lib/managed-session-restore.js +0 -212
  105. package/dist/extensions/agent-browser/lib/managed-session-snapshot-records.js +0 -277
  106. package/dist/extensions/agent-browser/lib/managed-session-snapshots.js +0 -181
  107. package/dist/extensions/agent-browser/lib/managed-session-storage.js +0 -126
  108. package/dist/extensions/agent-browser/lib/native-confirmation.js +0 -140
  109. package/dist/extensions/agent-browser/lib/native-output.js +0 -81
  110. package/dist/extensions/agent-browser/lib/orchestration/batch-stdin.js +0 -182
  111. package/dist/extensions/agent-browser/lib/orchestration/browser-run/artifact-merge.js +0 -30
  112. package/dist/extensions/agent-browser/lib/orchestration/browser-run/artifact-paths.js +0 -188
  113. package/dist/extensions/agent-browser/lib/orchestration/browser-run/browser-observation-result.js +0 -82
  114. package/dist/extensions/agent-browser/lib/orchestration/browser-run/click-dispatch.js +0 -406
  115. package/dist/extensions/agent-browser/lib/orchestration/browser-run/diagnostic-values.js +0 -31
  116. package/dist/extensions/agent-browser/lib/orchestration/browser-run/diagnostics.js +0 -240
  117. package/dist/extensions/agent-browser/lib/orchestration/browser-run/electron-observation.js +0 -202
  118. package/dist/extensions/agent-browser/lib/orchestration/browser-run/electron-text-diagnostics.js +0 -109
  119. package/dist/extensions/agent-browser/lib/orchestration/browser-run/fill-diagnostics.js +0 -119
  120. package/dist/extensions/agent-browser/lib/orchestration/browser-run/final-result-action-recovery.js +0 -147
  121. package/dist/extensions/agent-browser/lib/orchestration/browser-run/final-result-actions.js +0 -144
  122. package/dist/extensions/agent-browser/lib/orchestration/browser-run/final-result-content.js +0 -123
  123. package/dist/extensions/agent-browser/lib/orchestration/browser-run/final-result-contracts.js +0 -1
  124. package/dist/extensions/agent-browser/lib/orchestration/browser-run/final-result-details.js +0 -156
  125. package/dist/extensions/agent-browser/lib/orchestration/browser-run/final-result-electron.js +0 -179
  126. package/dist/extensions/agent-browser/lib/orchestration/browser-run/final-result-evidence.js +0 -39
  127. package/dist/extensions/agent-browser/lib/orchestration/browser-run/final-result-missing-binary.js +0 -89
  128. package/dist/extensions/agent-browser/lib/orchestration/browser-run/final-result-recovery.js +0 -97
  129. package/dist/extensions/agent-browser/lib/orchestration/browser-run/final-result-redaction.js +0 -106
  130. package/dist/extensions/agent-browser/lib/orchestration/browser-run/final-result-timeout.js +0 -110
  131. package/dist/extensions/agent-browser/lib/orchestration/browser-run/final-result.js +0 -53
  132. package/dist/extensions/agent-browser/lib/orchestration/browser-run/index.js +0 -224
  133. package/dist/extensions/agent-browser/lib/orchestration/browser-run/interaction-diagnostics.js +0 -290
  134. package/dist/extensions/agent-browser/lib/orchestration/browser-run/managed-session-close.js +0 -167
  135. package/dist/extensions/agent-browser/lib/orchestration/browser-run/managed-session-daemon-inspection.js +0 -108
  136. package/dist/extensions/agent-browser/lib/orchestration/browser-run/managed-session-daemon-policy.js +0 -174
  137. package/dist/extensions/agent-browser/lib/orchestration/browser-run/native-helper-observation.js +0 -65
  138. package/dist/extensions/agent-browser/lib/orchestration/browser-run/observation-types.js +0 -1
  139. package/dist/extensions/agent-browser/lib/orchestration/browser-run/overlay-diagnostics.js +0 -120
  140. package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare/network-page-filter.js +0 -192
  141. package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare/scroll-shims.js +0 -225
  142. package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare/snapshot-filter-data.js +0 -150
  143. package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare/snapshot-filter.js +0 -165
  144. package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare/snapshot-rendered-text.js +0 -147
  145. package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare/wait-timeouts.js +0 -145
  146. package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-artifacts.js +0 -159
  147. package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-command.js +0 -131
  148. package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-contracts.js +0 -1
  149. package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-daemon.js +0 -93
  150. package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-failure.js +0 -42
  151. package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-guards.js +0 -242
  152. package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-input.js +0 -75
  153. package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-observations.js +0 -92
  154. package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-page-selection.js +0 -254
  155. package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-page-state.js +0 -121
  156. package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-refs.js +0 -130
  157. package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-resources.js +0 -114
  158. package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-semantic.js +0 -121
  159. package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-session-plan.js +0 -222
  160. package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-timeouts.js +0 -68
  161. package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare.js +0 -202
  162. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-analysis.js +0 -191
  163. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-confirmation.js +0 -152
  164. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-diagnostics.js +0 -182
  165. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-electron.js +0 -150
  166. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-lifecycle-contracts.js +0 -1
  167. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-lifecycle-phase-contracts.js +0 -1
  168. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-lifecycle-phase.js +0 -115
  169. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-lifecycle.js +0 -256
  170. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-managed-contracts.js +0 -1
  171. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-managed.js +0 -256
  172. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-native-phase-contracts.js +0 -1
  173. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-native-phase.js +0 -93
  174. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-native.js +0 -113
  175. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-navigation-contracts.js +0 -1
  176. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-navigation.js +0 -316
  177. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-ownership.js +0 -28
  178. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-page-phase-contracts.js +0 -1
  179. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-page-phase.js +0 -142
  180. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-presentation-contracts.js +0 -1
  181. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-presentation.js +0 -333
  182. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-publication-phase-contracts.js +0 -1
  183. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-publication-phase.js +0 -71
  184. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-publication.js +0 -201
  185. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-receipts.js +0 -183
  186. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-refs.js +0 -200
  187. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-tabs.js +0 -142
  188. package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output.js +0 -25
  189. package/dist/extensions/agent-browser/lib/orchestration/browser-run/prompt-guards.js +0 -50
  190. package/dist/extensions/agent-browser/lib/orchestration/browser-run/recording-receipt-reconciliation.js +0 -198
  191. package/dist/extensions/agent-browser/lib/orchestration/browser-run/recording-recovery-contracts.js +0 -1
  192. package/dist/extensions/agent-browser/lib/orchestration/browser-run/recording-recovery-presentation.js +0 -154
  193. package/dist/extensions/agent-browser/lib/orchestration/browser-run/recording-recovery.js +0 -80
  194. package/dist/extensions/agent-browser/lib/orchestration/browser-run/screenshot-capture.js +0 -14
  195. package/dist/extensions/agent-browser/lib/orchestration/browser-run/screenshot-observation.js +0 -206
  196. package/dist/extensions/agent-browser/lib/orchestration/browser-run/session-state-commands.js +0 -130
  197. package/dist/extensions/agent-browser/lib/orchestration/browser-run/session-state-electron.js +0 -210
  198. package/dist/extensions/agent-browser/lib/orchestration/browser-run/session-state-observations.js +0 -61
  199. package/dist/extensions/agent-browser/lib/orchestration/browser-run/session-state-outcomes.js +0 -187
  200. package/dist/extensions/agent-browser/lib/orchestration/browser-run/session-state-refs.js +0 -171
  201. package/dist/extensions/agent-browser/lib/orchestration/browser-run/session-state-tabs.js +0 -228
  202. package/dist/extensions/agent-browser/lib/orchestration/browser-run/session-state.js +0 -117
  203. package/dist/extensions/agent-browser/lib/orchestration/browser-run/text-visibility-diagnostics.js +0 -182
  204. package/dist/extensions/agent-browser/lib/orchestration/browser-run/timeout-diagnostics.js +0 -256
  205. package/dist/extensions/agent-browser/lib/orchestration/browser-run/timeout-progress.js +0 -108
  206. package/dist/extensions/agent-browser/lib/orchestration/browser-run/types.js +0 -1
  207. package/dist/extensions/agent-browser/lib/orchestration/code-artifact-observation.js +0 -39
  208. package/dist/extensions/agent-browser/lib/orchestration/code-image-observation.js +0 -119
  209. package/dist/extensions/agent-browser/lib/orchestration/electron-host/branch.js +0 -92
  210. package/dist/extensions/agent-browser/lib/orchestration/electron-host/cleanup-result.js +0 -58
  211. package/dist/extensions/agent-browser/lib/orchestration/electron-host/cleanup.js +0 -78
  212. package/dist/extensions/agent-browser/lib/orchestration/electron-host/contracts.js +0 -1
  213. package/dist/extensions/agent-browser/lib/orchestration/electron-host/discovery.js +0 -106
  214. package/dist/extensions/agent-browser/lib/orchestration/electron-host/index.js +0 -60
  215. package/dist/extensions/agent-browser/lib/orchestration/electron-host/policy.js +0 -86
  216. package/dist/extensions/agent-browser/lib/orchestration/electron-host/probe-collection.js +0 -69
  217. package/dist/extensions/agent-browser/lib/orchestration/electron-host/probe-data.js +0 -167
  218. package/dist/extensions/agent-browser/lib/orchestration/electron-host/probe-presentation.js +0 -164
  219. package/dist/extensions/agent-browser/lib/orchestration/electron-host/probe.js +0 -161
  220. package/dist/extensions/agent-browser/lib/orchestration/electron-host/status.js +0 -165
  221. package/dist/extensions/agent-browser/lib/orchestration/execution-queue.js +0 -98
  222. package/dist/extensions/agent-browser/lib/orchestration/extension-artifact-preflight.js +0 -211
  223. package/dist/extensions/agent-browser/lib/orchestration/extension-artifacts.js +0 -23
  224. package/dist/extensions/agent-browser/lib/orchestration/extension-attachment-replay.js +0 -99
  225. package/dist/extensions/agent-browser/lib/orchestration/extension-branch-restore.js +0 -275
  226. package/dist/extensions/agent-browser/lib/orchestration/extension-code.js +0 -280
  227. package/dist/extensions/agent-browser/lib/orchestration/extension-command-admission.js +0 -303
  228. package/dist/extensions/agent-browser/lib/orchestration/extension-command-output.js +0 -36
  229. package/dist/extensions/agent-browser/lib/orchestration/extension-command-result.js +0 -335
  230. package/dist/extensions/agent-browser/lib/orchestration/extension-command-run.js +0 -227
  231. package/dist/extensions/agent-browser/lib/orchestration/extension-command-state.js +0 -1
  232. package/dist/extensions/agent-browser/lib/orchestration/extension-electron-ownership.js +0 -204
  233. package/dist/extensions/agent-browser/lib/orchestration/extension-execution-locks.js +0 -139
  234. package/dist/extensions/agent-browser/lib/orchestration/extension-execution-queue.js +0 -24
  235. package/dist/extensions/agent-browser/lib/orchestration/extension-host-coordination.js +0 -98
  236. package/dist/extensions/agent-browser/lib/orchestration/extension-host-run.js +0 -295
  237. package/dist/extensions/agent-browser/lib/orchestration/extension-intent-replay.js +0 -41
  238. package/dist/extensions/agent-browser/lib/orchestration/extension-invocation.js +0 -7
  239. package/dist/extensions/agent-browser/lib/orchestration/extension-lifecycle.js +0 -102
  240. package/dist/extensions/agent-browser/lib/orchestration/extension-managed-ownership.js +0 -133
  241. package/dist/extensions/agent-browser/lib/orchestration/extension-observation.js +0 -120
  242. package/dist/extensions/agent-browser/lib/orchestration/extension-prompt.js +0 -180
  243. package/dist/extensions/agent-browser/lib/orchestration/extension-recording.js +0 -290
  244. package/dist/extensions/agent-browser/lib/orchestration/extension-resource-contracts.js +0 -1
  245. package/dist/extensions/agent-browser/lib/orchestration/extension-resource-replay.js +0 -269
  246. package/dist/extensions/agent-browser/lib/orchestration/extension-result-state.js +0 -113
  247. package/dist/extensions/agent-browser/lib/orchestration/extension-runtime.js +0 -146
  248. package/dist/extensions/agent-browser/lib/orchestration/extension-script-leases.js +0 -58
  249. package/dist/extensions/agent-browser/lib/orchestration/extension-tool-boundary.js +0 -62
  250. package/dist/extensions/agent-browser/lib/orchestration/extension-version-check.js +0 -54
  251. package/dist/extensions/agent-browser/lib/orchestration/input-plan-types.js +0 -1
  252. package/dist/extensions/agent-browser/lib/orchestration/input-plan.js +0 -313
  253. package/dist/extensions/agent-browser/lib/orchestration/input-redaction.js +0 -62
  254. package/dist/extensions/agent-browser/lib/orchestration/native-config.js +0 -144
  255. package/dist/extensions/agent-browser/lib/orchestration/native-root-launch.js +0 -77
  256. package/dist/extensions/agent-browser/lib/orchestration/native-session-defaults.js +0 -231
  257. package/dist/extensions/agent-browser/lib/orchestration/operation-paths.js +0 -142
  258. package/dist/extensions/agent-browser/lib/orchestration/output-file.js +0 -276
  259. package/dist/extensions/agent-browser/lib/orchestration/script-mode.js +0 -220
  260. package/dist/extensions/agent-browser/lib/owned-managed-session-context.js +0 -55
  261. package/dist/extensions/agent-browser/lib/page-target-batch.js +0 -118
  262. package/dist/extensions/agent-browser/lib/page-target-guards.js +0 -50
  263. package/dist/extensions/agent-browser/lib/page-target-navigation.js +0 -104
  264. package/dist/extensions/agent-browser/lib/page-target-validation.js +0 -90
  265. package/dist/extensions/agent-browser/lib/parsing.js +0 -30
  266. package/dist/extensions/agent-browser/lib/pi-tool-rendering.js +0 -343
  267. package/dist/extensions/agent-browser/lib/playbook.js +0 -146
  268. package/dist/extensions/agent-browser/lib/process-child.js +0 -284
  269. package/dist/extensions/agent-browser/lib/process-environment.js +0 -48
  270. package/dist/extensions/agent-browser/lib/process-errors.js +0 -23
  271. package/dist/extensions/agent-browser/lib/process-identity.js +0 -127
  272. package/dist/extensions/agent-browser/lib/process-socket-storage.js +0 -256
  273. package/dist/extensions/agent-browser/lib/process-stdout.js +0 -74
  274. package/dist/extensions/agent-browser/lib/process.js +0 -216
  275. package/dist/extensions/agent-browser/lib/prompt-artifacts.js +0 -287
  276. package/dist/extensions/agent-browser/lib/prompt-policy.js +0 -54
  277. package/dist/extensions/agent-browser/lib/read-command.js +0 -41
  278. package/dist/extensions/agent-browser/lib/read-confirmation.js +0 -162
  279. package/dist/extensions/agent-browser/lib/recording-reservations.js +0 -208
  280. package/dist/extensions/agent-browser/lib/redaction-fields.js +0 -75
  281. package/dist/extensions/agent-browser/lib/redaction-json.js +0 -149
  282. package/dist/extensions/agent-browser/lib/redaction-url.js +0 -88
  283. package/dist/extensions/agent-browser/lib/results/action-contracts.js +0 -1
  284. package/dist/extensions/agent-browser/lib/results/action-recommendations.js +0 -38
  285. package/dist/extensions/agent-browser/lib/results/artifact-contracts.js +0 -1
  286. package/dist/extensions/agent-browser/lib/results/artifact-manifest-validation.js +0 -133
  287. package/dist/extensions/agent-browser/lib/results/artifact-manifest.js +0 -173
  288. package/dist/extensions/agent-browser/lib/results/artifact-recommendations.js +0 -73
  289. package/dist/extensions/agent-browser/lib/results/categories.js +0 -152
  290. package/dist/extensions/agent-browser/lib/results/confirmation.js +0 -75
  291. package/dist/extensions/agent-browser/lib/results/contracts.js +0 -1
  292. package/dist/extensions/agent-browser/lib/results/editable-ref-evidence.js +0 -99
  293. package/dist/extensions/agent-browser/lib/results/electron-recommendations.js +0 -83
  294. package/dist/extensions/agent-browser/lib/results/envelope-decoding.js +0 -48
  295. package/dist/extensions/agent-browser/lib/results/envelope.js +0 -198
  296. package/dist/extensions/agent-browser/lib/results/evidence-contracts.js +0 -1
  297. package/dist/extensions/agent-browser/lib/results/failure-recommendations.js +0 -180
  298. package/dist/extensions/agent-browser/lib/results/network-routes.js +0 -133
  299. package/dist/extensions/agent-browser/lib/results/network.js +0 -89
  300. package/dist/extensions/agent-browser/lib/results/next-actions.js +0 -111
  301. package/dist/extensions/agent-browser/lib/results/presentation/artifact-files.js +0 -320
  302. package/dist/extensions/agent-browser/lib/results/presentation/artifact-format.js +0 -138
  303. package/dist/extensions/agent-browser/lib/results/presentation/artifact-images.js +0 -113
  304. package/dist/extensions/agent-browser/lib/results/presentation/artifact-verification.js +0 -145
  305. package/dist/extensions/agent-browser/lib/results/presentation/artifacts.js +0 -165
  306. package/dist/extensions/agent-browser/lib/results/presentation/batch-contracts.js +0 -1
  307. package/dist/extensions/agent-browser/lib/results/presentation/batch-recording.js +0 -118
  308. package/dist/extensions/agent-browser/lib/results/presentation/batch-redaction.js +0 -68
  309. package/dist/extensions/agent-browser/lib/results/presentation/batch-rendering.js +0 -135
  310. package/dist/extensions/agent-browser/lib/results/presentation/batch-step.js +0 -227
  311. package/dist/extensions/agent-browser/lib/results/presentation/batch-summary.js +0 -91
  312. package/dist/extensions/agent-browser/lib/results/presentation/batch.js +0 -123
  313. package/dist/extensions/agent-browser/lib/results/presentation/browser-profile-recovery.js +0 -54
  314. package/dist/extensions/agent-browser/lib/results/presentation/command-presenters.js +0 -216
  315. package/dist/extensions/agent-browser/lib/results/presentation/common.js +0 -81
  316. package/dist/extensions/agent-browser/lib/results/presentation/content.js +0 -119
  317. package/dist/extensions/agent-browser/lib/results/presentation/diagnostic-a11y.js +0 -67
  318. package/dist/extensions/agent-browser/lib/results/presentation/diagnostic-health.js +0 -79
  319. package/dist/extensions/agent-browser/lib/results/presentation/diagnostic-identity.js +0 -199
  320. package/dist/extensions/agent-browser/lib/results/presentation/diagnostic-logs.js +0 -75
  321. package/dist/extensions/agent-browser/lib/results/presentation/diagnostic-network-actions.js +0 -216
  322. package/dist/extensions/agent-browser/lib/results/presentation/diagnostic-network.js +0 -124
  323. package/dist/extensions/agent-browser/lib/results/presentation/diagnostic-redaction.js +0 -64
  324. package/dist/extensions/agent-browser/lib/results/presentation/diagnostic-storage.js +0 -209
  325. package/dist/extensions/agent-browser/lib/results/presentation/diagnostic-stream.js +0 -69
  326. package/dist/extensions/agent-browser/lib/results/presentation/diagnostic-summary.js +0 -222
  327. package/dist/extensions/agent-browser/lib/results/presentation/diagnostics.js +0 -124
  328. package/dist/extensions/agent-browser/lib/results/presentation/early-result.js +0 -70
  329. package/dist/extensions/agent-browser/lib/results/presentation/errors.js +0 -285
  330. package/dist/extensions/agent-browser/lib/results/presentation/input-contracts.js +0 -1
  331. package/dist/extensions/agent-browser/lib/results/presentation/large-output.js +0 -117
  332. package/dist/extensions/agent-browser/lib/results/presentation/navigation.js +0 -231
  333. package/dist/extensions/agent-browser/lib/results/presentation/notices.js +0 -75
  334. package/dist/extensions/agent-browser/lib/results/presentation/observation-contracts.js +0 -1
  335. package/dist/extensions/agent-browser/lib/results/presentation/observation-rendering.js +0 -127
  336. package/dist/extensions/agent-browser/lib/results/presentation/outcomes.js +0 -120
  337. package/dist/extensions/agent-browser/lib/results/presentation/output-completion.js +0 -77
  338. package/dist/extensions/agent-browser/lib/results/presentation/output-spill.js +0 -51
  339. package/dist/extensions/agent-browser/lib/results/presentation/registry.js +0 -145
  340. package/dist/extensions/agent-browser/lib/results/presentation/semantic-action.js +0 -104
  341. package/dist/extensions/agent-browser/lib/results/presentation/skills.js +0 -178
  342. package/dist/extensions/agent-browser/lib/results/presentation/source.js +0 -109
  343. package/dist/extensions/agent-browser/lib/results/presentation.js +0 -19
  344. package/dist/extensions/agent-browser/lib/results/recommendation-contracts.js +0 -1
  345. package/dist/extensions/agent-browser/lib/results/recording.js +0 -88
  346. package/dist/extensions/agent-browser/lib/results/recovery-actions.js +0 -118
  347. package/dist/extensions/agent-browser/lib/results/recovery-next-actions.js +0 -60
  348. package/dist/extensions/agent-browser/lib/results/selector-recovery-target.js +0 -83
  349. package/dist/extensions/agent-browser/lib/results/selector-recovery.js +0 -261
  350. package/dist/extensions/agent-browser/lib/results/snapshot-compact.js +0 -266
  351. package/dist/extensions/agent-browser/lib/results/snapshot-content.js +0 -32
  352. package/dist/extensions/agent-browser/lib/results/snapshot-high-value-controls.js +0 -240
  353. package/dist/extensions/agent-browser/lib/results/snapshot-refs.js +0 -103
  354. package/dist/extensions/agent-browser/lib/results/snapshot-segments.js +0 -383
  355. package/dist/extensions/agent-browser/lib/results/snapshot-spill.js +0 -53
  356. package/dist/extensions/agent-browser/lib/results/snapshot.js +0 -44
  357. package/dist/extensions/agent-browser/lib/results/text.js +0 -44
  358. package/dist/extensions/agent-browser/lib/runtime-args-validation.js +0 -133
  359. package/dist/extensions/agent-browser/lib/runtime-compatibility.js +0 -81
  360. package/dist/extensions/agent-browser/lib/runtime-contracts.js +0 -1
  361. package/dist/extensions/agent-browser/lib/runtime-redaction.js +0 -118
  362. package/dist/extensions/agent-browser/lib/runtime-replay-events.js +0 -144
  363. package/dist/extensions/agent-browser/lib/runtime-session-identity.js +0 -76
  364. package/dist/extensions/agent-browser/lib/runtime-session-plan.js +0 -114
  365. package/dist/extensions/agent-browser/lib/runtime-session-replay.js +0 -123
  366. package/dist/extensions/agent-browser/lib/runtime-tab-correction.js +0 -65
  367. package/dist/extensions/agent-browser/lib/runtime-timeouts.js +0 -28
  368. package/dist/extensions/agent-browser/lib/runtime.js +0 -163
  369. package/dist/extensions/agent-browser/lib/session-identity.js +0 -51
  370. package/dist/extensions/agent-browser/lib/session-page-observation.js +0 -357
  371. package/dist/extensions/agent-browser/lib/session-page-state.js +0 -353
  372. package/dist/extensions/agent-browser/lib/session-page-types.js +0 -1
  373. package/dist/extensions/agent-browser/lib/string-enum-schema.js +0 -8
  374. package/dist/extensions/agent-browser/lib/temp-artifact-budget.js +0 -78
  375. package/dist/extensions/agent-browser/lib/temp-mutation-queue.js +0 -7
  376. package/dist/extensions/agent-browser/lib/temp-root-ownership.js +0 -234
  377. package/dist/extensions/agent-browser/lib/temp-root.js +0 -207
  378. package/dist/extensions/agent-browser/lib/temp.js +0 -91
  379. package/dist/extensions/agent-browser/lib/tool-surface.js +0 -239
  380. package/dist/extensions/agent-browser/lib/upstream-version.js +0 -15
  381. package/dist/extensions/agent-browser/lib/web-search-providers.js +0 -229
  382. package/dist/extensions/agent-browser/lib/web-search-request.js +0 -108
  383. package/dist/extensions/agent-browser/lib/web-search-results.js +0 -281
  384. package/dist/extensions/agent-browser/lib/web-search-schema.js +0 -82
  385. package/dist/extensions/agent-browser/lib/web-search.js +0 -149
  386. package/dist/extensions/agent-browser/lib/webmcp-observation.js +0 -35
  387. package/dist/extensions/agent-browser/lib/windows-stock-launcher.js +0 -96
  388. package/dist/scripts/agent-browser-target.mjs +0 -23
@@ -137,7 +137,7 @@ Result details:
137
137
  }
138
138
  ```
139
139
 
140
- For Exa, `details.searchType` is the effective requested type even when the provider response does not echo it. `requestId` is included when Exa returns one. Brave omits both fields. `pageDate` comes from Exa `publishedDate` (an estimated page creation date) or Brave `page_age`; Brave may separately return `age`. These provider fields are not crawl/retrieval age or proof that a result matches a requested version. For version-sensitive work, inspect the result, constrain one follow-up to the primary domain (`includeDomains` for Exa or `site:` in a Brave query), and read the primary page. Failures return structured results: local config/validation problems (invalid config, disabled tool, missing credential, blank query, Exa-only filters resolved to Brave) are `validation-error`; provider/network failures are `upstream-error`; both keep `isError` and redacted messages.
140
+ For Exa, `details.searchType` is the effective requested type even when the provider response does not echo it. `requestId` is included when Exa returns one. Brave omits both fields. `pageDate` comes from Exa `publishedDate` (an estimated page creation date) or Brave `page_age`; Brave may separately return `age`. These provider fields are not crawl/retrieval age or proof that a result matches a requested version. For version-sensitive work, inspect the result, constrain one follow-up to the primary domain (`includeDomains` for Exa or `site:` in a Brave query), and read the primary page. Failures return structured results: local config/validation problems (invalid config, disabled tool, missing credential, blank query, Exa-only filters resolved to Brave) are `validation-error`; provider/network failures are `upstream-error`; both keep `isError` and redacted messages. Malformed provider JSON reports the provider-specific invalid-JSON error without parser previews or parser causes. Malformed config files, in extension loading and the config CLI alike, report their scope/path and `Invalid JSON` plus the parser's numeric position/line/column when available, never source fragments; either payload may contain credentials. Provider HTTP failures never echo the response body or status text: they report the provider, `HTTP <status>`, and a fixed hint (credential/permission check for 401/403, retry later for 5xx, check the search parameters otherwise); HTTP 429 keeps the rate-limit guidance. Text content, `details`, and structured output are rendered from one redacted result object.
141
141
 
142
142
  ## Input mode chooser
143
143
 
@@ -300,7 +300,7 @@ Examples:
300
300
 
301
301
  Relative file operands, `outputPath`, and source/network-source scans use one `pi-change-working-dir` owner reply captured before browser policy and queues; code calls inherit it. The integration uses the synchronous `pi-change-working-dir:resolve-execution-cwd` event with `{ sessionManager, result?: { cwd, error? } }`. Owner errors or invalid replies fail validation. No owner means native `ctx.cwd`; a known older owner identified through public tool/command package provenance requires an update and Pi restart. No private directory journal is read.
302
302
 
303
- Browser/session/config ownership stays separate. Ordinary calls retain the native project or managed launch root, while an unnamed fresh launch and explicit native config resolve against the execution directory. `details.managedSessionCwd`, when present, records the managed launch root for transcript replay, including ordered code transitions. Pi package config/trust and artifact-store identity remain unchanged. A deleted launch directory returns `validation-error` before dispatch; restore it or explicitly choose fresh/config from the new directory. See [working-directory changes](../README.md#working-directory-changes).
303
+ Browser/session/config ownership stays separate. Ordinary calls retain the native project or managed launch root, while an unnamed fresh launch and explicit native config resolve against the execution directory. `details.managedSessionCwd`, when present, records the managed launch root for transcript replay, including ordered code transitions. Pi package config/trust and artifact-store identity remain unchanged. A deleted launch directory returns `validation-error` before dispatch; restore it or explicitly choose fresh/config from the new directory. See [working-directory changes](REFERENCE.md#working-directory-changes).
304
304
 
305
305
  ### `agent_browser_code`
306
306
 
@@ -339,9 +339,9 @@ Source runs in a fresh permissioned Node child with an empty child environment,
339
339
 
340
340
  `codeRun` reports `callCount`, `emitCount`, `failedCallCount`, `rejectedCallCount`, and timeout/abort flags. `codeSteps` retains bounded audit rows. Handled browser failures may coexist with successful source completion, but remain model-visible in `failures` with exact recovery evidence and in the failure count. A successful code result therefore does not assert that every inner command succeeded. Invalid inner input shapes make the outer result fail even if source handles their observations. Uncaught source exceptions use `script-error`; deadline and cancellation use `timeout` and `aborted`; output/bridge validation retains its specific failure.
341
341
 
342
- Direct browser use in a disabled/no-file Pi session (`--no-session`) records current in-memory state without claiming persistence. Code requires an actually published journal, and a named but not-yet-published persistent conversation refuses browser dispatch. Sessionless local inspections and browser-independent reads remain available without journal publication, including complete redacted private spills and selected output files; observation-only artifact receipts are optional until publication. Direct, code and Electron host operations use one canonical journal event/reducer. Begin/finish records correlate operation ID, outer tool-call ID and inner command index, preserving native effects before presentation/export. Complete snapshots are defined once; ordinary finishes explicitly reuse, replace, invalidate or keep refs unknown. An unfinished begin requires inspection and a new capture, without repeating the mutation. Failed finish publication reports `browserStatePersistence: "finish-unconfirmed"` and stops dependent code calls; failed begin reports `"begin-unconfirmed"` and prevents dispatch. These acknowledgments do not promise power-loss-atomic browser actions. See [session storage and conversion](SESSION_STORAGE.md).
342
+ Direct browser use in a disabled/no-file Pi session (`--no-session`) records current in-memory state without claiming persistence. Code requires an actually published journal, and a named but not-yet-published persistent conversation refuses browser dispatch. Sessionless local inspections and browser-independent reads remain available without journal publication, including complete redacted private spills and selected output files; observation-only artifact receipts are optional until publication. Direct, code and Electron host operations use one canonical journal event/reducer. Begin/finish records correlate operation ID, outer tool-call ID and inner command index, preserving native effects before presentation/export. Complete snapshots are defined once; ordinary finishes explicitly reuse, replace, invalidate or keep refs unknown. An unfinished begin requires inspection and a new capture, without repeating the mutation. Failed finish publication reports `browserStatePersistence: "finish-unconfirmed"` and stops dependent code calls; failed begin reports `"begin-unconfirmed"` and prevents dispatch. These acknowledgments do not promise power-loss-atomic browser actions. Historical browser receipts resume automatically through the same canonical reducer at the unchanged native journal locator, without conversion or rewritten bytes. Native validation, generation checks and publication requirements still apply. See [session storage](SESSION_STORAGE.md).
343
343
 
344
- Abort, timeout, branch change, reload, and shutdown stop/reap the child, settle the active inner call and join outer observation finalization before releasing lifecycle coordination. A result from a prior branch retains its complete caller observation in a process-private spill without changing the newly selected branch's artifact state. They do not roll back browser actions or automatically close the selected browser. Existing ownership still controls later shutdown cleanup. The offline converter normalizes exact pre-0.7 isolated-session cleanup leases into owner-qualified canonical events; runtime only reads those canonical cleanup facts, without old public script execution.
344
+ Abort, timeout, branch change, reload, and shutdown stop/reap the child, settle the active inner call and join outer observation finalization before releasing lifecycle coordination. A result from a prior branch retains its complete caller observation in a process-private spill without changing the newly selected branch's artifact state. They do not roll back browser actions or automatically close the selected browser. Existing ownership still controls later shutdown cleanup. The shared read-only decoder normalizes exact pre-0.7 isolated-session cleanup leases into owner-qualified canonical events for ordinary replay or optional archive conversion; runtime retains only those cleanup facts, without old public script execution.
345
345
 
346
346
  ### `agent_browser_action`
347
347
 
@@ -377,7 +377,7 @@ Enable `qa`. Flat input is either `{ url, ...checks }` or `{ attached: true, ...
377
377
  { "attached": true, "expectedText": "Explorer", "checkErrors": true }
378
378
  ```
379
379
 
380
- QA compiles a fixed `batch --bail` diagnostic plan. URL QA clears enabled network/console buffers, captures page-error residue after native clear, opens the requested URL, waits for readiness, allows a bounded 150 ms diagnostic settle when needed, then performs visible-text/selector assertions, enabled diagnostic reads, and optional screenshot. Expected text uses bounded visible-element predicates with a 5-second native timeout. Missing assertions stop before later diagnostics. URL QA does not require the previous page target.
380
+ QA compiles a fixed `batch --bail` diagnostic plan. URL QA clears enabled network/console buffers, captures page-error residue after native clear, opens the requested URL, waits for readiness, allows a bounded 150 ms diagnostic settle when needed, then performs visible-text/selector assertions, enabled diagnostic reads, and optional screenshot. Expected text uses bounded visible-element predicates with a 5-second native timeout. Text nodes and control values under `display: none` or `opacity: 0` ancestors, or whose computed visibility is hidden, do not satisfy the assertion; `display: contents` wrappers and `visibility: visible` overrides still count. Missing assertions stop before later diagnostics. URL QA does not require the previous page target.
381
381
 
382
382
  Attached QA checks the current browser without navigation or buffer clears. It first requires a live nonempty URL, including file/custom app URLs. Failed target verification returns exact tab/URL recovery instead of running the batch. Diagnostic reads default off because preserved buffers may predate this check; URL diagnostics default on. Explicit `checkErrors: false` skips the error-baseline check.
383
383
 
@@ -402,16 +402,20 @@ Enable `electron`. Inputs are flat `{ action, ...fields, outputPath? }`; caller
402
402
  { "action": "cleanup", "launchId": "electron-…" }
403
403
  ```
404
404
 
405
- `handoff` defaults to `snapshot`; `tabs` verifies/discovers targets without an interactive snapshot, and `connect` stops after attach. `targetType` is `page` by default, or `webview`/`any`. Launch cannot reuse the normal signed-in app profile or an existing app; use host launch plus direct native `connect` for that. Windows launch requires a verifiable path rather than scan-based name resolution; this is not Windows qualification evidence.
405
+ `handoff` defaults to `snapshot`; `tabs` verifies/discovers targets without an interactive snapshot, and `connect` stops after attach. `targetType` is `page` by default, or `webview`/`any`. CDP readiness and debug-port liveness require `/json/version` to contain a nonempty, non-whitespace `Browser` or `browser` string; other version metadata is optional. Launch cannot reuse the normal signed-in app profile or an existing app; use host launch plus direct native `connect` for that. Windows launch requires a verifiable path rather than scan-based name resolution; this is not Windows qualification evidence.
406
406
 
407
407
  `appArgs` cannot override user-data-dir/debug lifecycle flags or include bare `--`. Caller `allow`/`deny` substring policies match app names/IDs/paths, with deny winning. Likely-sensitive discovery annotations are advisory. Non-Electron executables fail validation.
408
408
 
409
+ Electron payload evidence accepts `app.asar`, `app/`, or the stock runtime's `default_app.asar`, alongside platform runtime resources (including Electron Framework on macOS). Stock npm Electron can launch an unpackaged app by passing its binary as `executablePath` and the app directory in `appArgs`; discovery and explicit paths share the same evidence check.
410
+
409
411
  Timeouts are per action: launch readiness defaults to 15 seconds, capped at 120 seconds after discovery; status/probe use the normal 35-second subprocess budget per read (or configured override); cleanup applies its default 35-second managed-close budget separately to close and initial process-exit wait. Local CDP HTTP probes use one second. There is no combined end-to-end teardown deadline. Cancellation before spawn opens nothing; cancellation during launch cleans the new process/profile.
410
412
 
411
- `details.electron` retains action-specific `apps`, `launch`, `statuses`, `targets`, `probe`, `cleanup`, and failure diagnostics; `compiledElectron` retains the action plan. `launchId` identifies host lifecycle; `sessionName` identifies browser commands. `userDataDirState` measures the tracked path as present, absent (ENOENT), or unknown; it does not audit all app residue. Failed startup output includes redacted last-4096-byte stdout/stderr tails; private profile-local files follow profile ownership, not a lifetime byte cap. Failed cleanup preserves live profiles. Reload preserves current branch-visible launches and cleans off-branch owned launches; quit cleans owned launches. Restored attachments must match live endpoint/PID/profile evidence before reuse.
413
+ `details.electron` retains action-specific `apps`, `launch`, `statuses`, `targets`, `probe`, `cleanup`, and failure diagnostics; `compiledElectron` retains the action plan. `launchId` identifies host lifecycle; `sessionName` identifies browser commands. `userDataDirState` measures the tracked path as present, absent (ENOENT), or unknown; it does not audit all app residue. Failed startup output includes redacted last-4096-byte stdout/stderr tails; private profile-local files follow profile ownership, not a lifetime byte cap. Failed cleanup preserves live profiles. Launch records the app process start identity. Before signaling a live restored PID without a tracked child handle, cleanup requires that recorded identity to match the live process; a missing (including records from older versions), unreadable, or mismatched identity leaves the process/profile intact. Reload preserves current branch-visible launches and cleans off-branch owned launches; quit cleans owned launches. Restored attachments must match live endpoint/PID/profile evidence before reuse.
412
414
 
413
415
  Post-command process/target loss fails as `tab-drift`; fill verification and broad-shell-text diagnostics remain available. Recovery actions use `agent_browser_electron` with flat params for status/probe/cleanup and `agent_browser` for native tab/URL/ref operations. If inactive, enable `electron` first. Manually launched apps and explicit saved artifacts remain host-owned.
414
416
 
417
+ Status/probe mismatch checks and probe page-target state use complete URLs, not display previews. Managed-session/probe URL summaries remain capped at 300 characters and probe tab URLs at 240; shortened output does not itself imply drift. Probe `sessionTabTarget` and `refSnapshot` retain full target identity for follow-up commands and replay.
418
+
415
419
  ### `agent_browser_source`
416
420
 
417
421
  Enable `source`. Flat fields: at least one of `selector`, `reactFiberId`, or `componentName`; optional `includeDomHints` (default true), `maxWorkspaceFiles` (default 2,000, maximum 5,000), `outputPath`, `timeoutMs`, and `sessionMode`.
@@ -432,7 +436,7 @@ Enable `network`. Flat fields: at least one of `requestId`, `filter`, or `url`;
432
436
  { "requestId": "req-1", "url": "/api/fail" }
433
437
  ```
434
438
 
435
- A request ID runs native `network request`; filter/URL adds `network requests --filter`, with explicit filter winning. Failed HTTP/failed/error rows are correlated with initiator metadata and a bounded URL-literal search under the captured execution directory (up to eight needles and ten workspace matches). `networkSourceLookup` retains `{ status, failedRequests, candidates, limitations, summary }`; statuses are `failed-requests-found`, `no-failed-requests`, or `no-candidates`. URLs and credentials are redacted. Request URLs are diagnostic evidence and never replace the active page target. No candidates alone does not fail a successful batch or assign blame. HAR and full native diagnostics remain available through `args`.
439
+ A request ID runs native `network request`; filter/URL adds `network requests --filter`, with explicit filter winning for both the native query and failed-request/initiator analysis. Initiators of failed requests outside that filter/URL scope are ignored. Repeated request IDs count once (first matching failed row wins); anonymous rows and different IDs at the same URL remain distinct. Failed HTTP/failed/error rows are correlated with initiator metadata and a bounded URL-literal search under the captured execution directory (up to eight needles and ten workspace matches). `networkSourceLookup` retains `{ status, failedRequests, candidates, limitations, summary }`; statuses are `failed-requests-found`, `no-failed-requests`, or `no-candidates`. URLs and credentials are redacted. Request URLs are diagnostic evidence and never replace the active page target. No candidates alone does not fail a successful batch or assign blame. HAR and full native diagnostics remain available through `args`.
436
440
 
437
441
  ### `stdin`
438
442
 
@@ -499,7 +503,7 @@ Example:
499
503
 
500
504
  ### `sessionMode`
501
505
 
502
- A native `session` default from user/project JSON or `AGENT_BROWSER_SESSION` selects a caller-owned browser for direct, code, action, QA, and source tools. Per-call flags still win. Like literal `--session`, this selection takes precedence over `fresh`; it reports `usedImplicitSession: false` and is not closed when Pi quits. Without a selected native session, attachment, or explicit fresh launch, auto calls select a stable root-Pi named session and root-specific native restore key. `PI_SUBAGENT_ROOT_SESSION_ID` carries the parent identity to descendants; ordinary new/fork/clone roots differ, while resume/cwd changes keep identity. Root sessions report `usedImplicitSession: false` and survive parent/child quit. Global/override package profile names with `policy: "always"` and executable defaults bootstrap only inactive automatic roots whose effective engine is Chrome. Lightpanda receives no wrapper-supplied Chrome profile/executable defaults; caller native args, environment and config remain authoritative. Active roots preserve native launch settings/current restore key, including matching root-name follow-ups; unrelated explicit browsers are unchanged. Profile paths and project-only profile config remain advisory. Native restore covers cookies and web storage, not newly created IndexedDB or memory-only authentication. See the README for communal bootstrap and persistent-profile fallback. Active older/fresh managed sessions retain the lifecycle below. `agent_browser_qa` with `attached: true` can inspect this shared current session using the same live target checks. See [shared browser defaults](../README.md#shared-browser-defaults).
506
+ A native `session` default from user/project JSON or `AGENT_BROWSER_SESSION` selects a caller-owned browser for direct, code, action, QA, and source tools. Per-call flags still win. Like literal `--session`, this selection takes precedence over `fresh`; it reports `usedImplicitSession: false` and is not closed when Pi quits. Without a selected native session, attachment, or explicit fresh launch, auto calls select a stable root-Pi named session and root-specific native restore key. `PI_SUBAGENT_ROOT_SESSION_ID` carries the parent identity to descendants; ordinary new/fork/clone roots differ, while resume/cwd changes keep identity. Root sessions report `usedImplicitSession: false` and survive parent/child quit. Global/override package profile names with `policy: "always"` and executable defaults bootstrap only inactive automatic roots whose effective engine is Chrome. Lightpanda receives no wrapper-supplied Chrome profile/executable defaults; caller native args, environment and config remain authoritative. Active roots preserve native launch settings/current restore key, including matching root-name follow-ups; unrelated explicit browsers are unchanged. Profile paths and project-only profile config remain advisory. Native restore covers cookies and web storage, not newly created IndexedDB or memory-only authentication. See the detailed reference for communal bootstrap and persistent-profile fallback. Active older/fresh managed sessions retain the lifecycle below. `agent_browser_qa` with `attached: true` can inspect this shared current session using the same live target checks. See [shared browser defaults](REFERENCE.md#shared-browser-defaults).
503
507
 
504
508
  - type: `"auto" | "fresh"`
505
509
  - optional
@@ -644,7 +648,7 @@ Ref preflight details (command taxonomy in `extensions/agent-browser/lib/command
644
648
 
645
649
  - **Spelling and operands:** `@eN`, `eN`, and `ref=eN` share the same stale-ref checks, including inside raw and stdin batches. Only upstream ref-resolving selector slots are considered; `get count` and `diff snapshot --selector` keep their CSS/XPath or CSS semantics, while literal text and key/mouse data are not refs.
646
650
  - **URL alignment:** `refSnapshot.target.url` and the session’s current tab URL are compared via `targetsMatch` / `normalizeComparableUrl` in `extensions/agent-browser/index.ts`: values are trimmed, parsed as URLs when possible, compared **after dropping the `#fragment`**, and the query string remains significant. If either side lacks a `url`, `targetsMatch` treats the pair as matching so early-session calls are not blocked.
647
- - **Batch stdin ordering:** user `batch` JSON is scanned in order. Any step whose first token satisfies `isRefInvalidatingBatchCommand` sets a latch that blocks later steps whose first token satisfies `isRefGuardedCommand` and that mention `@e…` refs, except for same-snapshot native form-control steps whose current snapshot role metadata identifies all refs as safe controls (`check`/`uncheck` or direct `click`/`tap` on checkbox or radio refs, and `select` on combobox refs). A step whose first token is `snapshot` clears that latch for subsequent steps (pre-spawn intent only; it does not wait for upstream success). These predicates read explicit command capability flags from `command-taxonomy.ts`: navigation/mutation verbs such as `open` / `goto`, `reload`, non-form `click`, and related upstream commands have `invalidatesBatchRefs`, and `record start` steps (any outcome), `record restart` steps with a URL operand, plus WebMCP `invoke` / `result` / `cancel` steps also set the latch because upstream swaps or navigates the active page; same-snapshot `fill` rows and the role-checked native form-control rows stay guarded against missing/stale refs but do not set the latch, allowing ordinary form batches before a final click/submit step. Direct `click`/`tap @e…` is only treated as a safe form-control row when every ref in that step is a latest-snapshot checkbox or radio; other click/tap refs remain invalidating. Ref-guarded commands accept page-scoped refs for interaction (`click`, `fill`, `download`, `scrollintoview` / `scrollinto`, and others centralized in the command taxonomy). Changing either capability requires updating this contract, [`docs/SUPPORT_MATRIX.md`](SUPPORT_MATRIX.md) `RQ-0072`/`RQ-0087` notes, README and command-reference pitfalls, and `test/agent-browser.extension-validation.test.ts`.
651
+ - **Batch ordering:** effective raw-argument or stdin `batch` steps are scanned in order. Any step whose first token satisfies `isRefInvalidatingBatchCommand` sets a latch that blocks later steps whose first token satisfies `isRefGuardedCommand` and that mention `@e…` refs, except for same-snapshot native form-control steps whose current snapshot role metadata identifies all refs as safe controls (`check`/`uncheck` or direct `click`/`tap` on checkbox or radio refs, and `select` on combobox refs). A step whose first token is `snapshot` clears that latch for subsequent steps (pre-spawn intent only; it does not wait for upstream success). The scan continues after every snapshot, even when no refs precede it: `snapshot -i`, a non-form `click @e1`, then `get value @e2` is rejected before spawn unless another snapshot separates the click from the getter. These predicates read explicit command capability flags from `command-taxonomy.ts`: navigation/mutation verbs such as `open` / `goto`, `reload`, non-form `click`, and related upstream commands have `invalidatesBatchRefs`, and `record start` steps (any outcome), `record restart` steps with a URL operand, plus WebMCP `invoke` / `result` / `cancel` steps also set the latch because upstream swaps or navigates the active page; same-snapshot `fill` rows and the role-checked native form-control rows stay guarded against missing/stale refs but do not set the latch, allowing ordinary form batches before a final click/submit step. Direct `click`/`tap @e…` is only treated as a safe form-control row when every ref in that step is a latest-snapshot checkbox or radio; other click/tap refs remain invalidating. Ref-guarded commands accept page-scoped refs for interaction (`click`, `fill`, `download`, `scrollintoview` / `scrollinto`, and others centralized in the command taxonomy). Changing either capability requires updating this contract, [`docs/SUPPORT_MATRIX.md`](SUPPORT_MATRIX.md) `RQ-0072`/`RQ-0087` notes, README and command-reference pitfalls, and `test/agent-browser.extension-ref-guards.test.ts`.
648
652
 
649
653
  **Presentation redaction (implementation map):** Successful non-`batch` tool calls and each successful `batchSteps[]` row run upstream `data` through `redactPresentationData` in `extensions/agent-browser/lib/results/presentation/diagnostics.ts`: `cookies` still walk objects/arrays and replace case-insensitive `value` keys with `"[REDACTED]"`; `storage` redacts values when the key or value looks credential-like (token, cookie, auth, secret, JWT, bearer/basic credential, high-entropy token-like string, or nested sensitive JSON) but keeps low-risk primitive QA values such as booleans, numbers, and short strings visible. Redacted storage entries add `valueRedacted` plus `valueRedactionReason` in `details.data`; diagnostic formatters mirror the same decision. Every other command’s payload is recursively scrubbed with the shared `redactSensitiveValue`, which redacts known sensitive key names and applies string-level sensitivity heuristics so network, diff, trace/profiler, stream, dashboard, chat, and other structured results do not echo bearer tokens, proxy credentials, or similar fields verbatim into `details.data`. Echoed `command` arrays in `details` and in batch roll-ups use `redactInvocationArgs` from `extensions/agent-browser/lib/runtime.ts` to mask trailing values for sensitive global flags (including `--body`, `--headers`, `--password`, and `--proxy`), preserve the special positional rules for `cookies set`, `storage local|session set`, and `set credentials` (native `cookies set --curl <file>` imports are file operands, so ordinary import paths remain visible in echoes and failed batch diagnostics), and scrub other argv tokens for URLs and inline secrets. Raw batch row strings are parsed and command-redacted for presentation and ordered intent/completion journals; execution argv remains unchanged. Failed batch steps additionally run `redactExactValues` on structured step errors so literals taken from that step’s argv (cookie value, storage set value, `--password` / `--password=` tokens) cannot reappear inside formatted error blobs. When the full batch is large enough to need its own aggregate spill, that spill reapplies these per-command data and argv redactors before persistence rather than using generic batch redaction.
650
654
 
@@ -755,7 +759,7 @@ Additional structured fields can appear when relevant:
755
759
  - `networkRequestsPageFilter` after wrapper-side `network requests --current-page`, `--current-origin`, or `--current-url`. Shape: `{ cleanArgs, currentUrl, mode, matchedRows, totalRows }`; the visible rows and `details.data.requests` / `items` / `entries` are filtered while the active session page target is read with `get url`.
756
760
  - `richInputRecovery` after a raw `find` or compiled `agent_browser_action` `fill` fails with `selector-not-found` and the same current-ref diagnostic finds exact editable `searchbox` / `textbox` candidates. Shape follows `RichInputRecoveryDiagnostic` in `extensions/agent-browser/lib/results/selector-recovery.ts`: `{ candidates, inputMethodHint, nextActionIds, summary, target }`, where each candidate has `ref`, `role`, `name`, `focusArgs`, `clickArgs`, and `reason`. Visible text appends `Rich input recovery`, and `details.nextActions` gains ids from `getAgentBrowserRichInputRecoveryNextActionIds`: `focus-current-editable-ref` / `click-current-editable-ref` (or numbered variants). These actions are bounded to focus/click/inspect-style recovery: they do not include the fill text, do not press `Enter`, and do not submit. After the right current editable ref is focused, use `keyboard type` for framework-controlled editors that require real key events. Use paste-like `keyboard inserttext` only with separate application-state verification, and submit only when explicitly required by the flow.
757
761
  - unsupported `scrollintoview text=<label>` / `scrollinto text=<label>` fails before upstream dispatch, directly or inside an effective raw/stdin batch row, because current upstream can report success without moving the page; help forms pass through unchanged. Visible failure text and `details.nextActions` both return the session-scoped `scroll-semantic-text-target` (`find text <label> hover`) when hover side effects are acceptable, plus `refresh-refs-for-scroll-target` (`snapshot -i`) before `scrollintoview <@ref>`. CSS, `xpath=...`, and current `@e…` targets remain native pass-through.
758
- - `scrollPage` when the wrapper moves `document.scrollingElement` directly for `scroll <up|down|left|right> [px|percent]` or `scroll to end|top`; it temporarily disables smooth scrolling so immediate before/after offsets are reliable, returns `{ request, result }`, and includes `exitCode: 0` on success. Directional document no-movement falls through to upstream wheel behavior so nested panes still work. Explicit CSS-container calls `scroll <selector> <up|down|left|right> [px|percent]` remain wrapper-handled, use `Element.scrollBy` with `behavior: "instant"` before measuring movement so smooth-scroll CSS cannot cause a premature no-movement failure, and report `details.scrollContainer`. All scroll helper shims are skipped when startup-scoped flags are present so the requested browser/profile launches before any helper command.
762
+ - `scrollPage` when the wrapper moves `document.scrollingElement` directly for `scroll <up|down|left|right> [px|percent]` or `scroll to end|top`; it temporarily disables smooth scrolling so immediate before/after offsets are reliable, returns `{ request, result }`, and includes `exitCode: 0` on success. Directional document no-movement falls through to upstream wheel behavior so nested panes still work. Explicit CSS-container calls `scroll <selector> <up|down|left|right> [px|percent]` remain wrapper-handled, use `Element.scrollBy` with `behavior: "instant"` before measuring movement so smooth-scroll CSS cannot cause a premature no-movement failure, and report `details.scrollContainer`. Shims recognize only complete command shapes: exactly three tokens for `scroll to end|top`, or three/four for CSS-container scroll. Surplus operands, such as `scroll to end --selector #panel`, pass through to native agent-browser without a shim discarding them. All scroll helper shims are skipped when startup-scoped flags are present so the requested browser/profile launches before any helper command.
759
763
  - `scrollNoop` after a nominally successful large **top-level** upstream scroll fallback on an existing or fresh managed session when wrapper-side read-only probes before and after the command show no change in `window.scrollX` / `window.scrollY` and no change in the sampled prominent scrollable containers. The wrapper reclassifies this outcome as `failureCategory: "upstream-error"` rather than claiming the page scrolled. To avoid pre-launching a session without caller startup state, this probe is skipped for small pixel scrolls, calls that would create a managed session only for the probe, and invocations with startup-scoped flags such as `--profile`, `--state`, `--restore`, `--namespace`, `--session-name`, `--cdp`, providers, init scripts, or similar launch settings. Shape: `{ reason: "no-observed-scroll-position-change", message, before, after, recommendations }`; `before` / `after` include viewport dimensions, document scroll dimensions, and up to ten sampled container descriptors plus scroll offsets. Container descriptors use only sample index, tag name, and ARIA role; DOM ids/classes are intentionally not stored. This diagnostic is conservative evidence that the page-level scroll likely missed a nested pane, not proof that every app-specific region is unchanged. Visible text starts with `Scroll completed with no observed movement`, appends `Scroll diagnostic: no observed scroll movement`, sets `details.data.scrolled` to `false` / `details.data.noMovement` to `true`, and `details.nextActions` gains `inspect-after-noop-scroll` (`snapshot -i`) plus `verify-noop-scroll-visually` (`screenshot`), session-prefixed when applicable.
760
764
  - `comboboxFocus` after a successful explicit combobox-targeted `click` / `fill` / `find … click|fill` (for example `agent_browser_action` with role `combobox`, including when that semantic action resolves through a current visible `@ref` before execution) when a read-only probe sees the active element is combobox-like, `aria-expanded` is explicitly present (`false` or `true`), and no visible `listbox` / `option` / menu option elements are open. Shape: `{ reason: "focused-combobox-without-visible-options", message, activeElement, visibleListboxCount, visibleOptionCount, recommendations }`; `activeElement` includes bounded role/tag/expanded/hasPopup/name metadata with normal text redaction. Visible text appends `Combobox diagnostic: focused combobox did not expose visible options`, and `details.nextActions` gains `inspect-focused-combobox` (`snapshot -i`), `try-open-combobox-with-arrow` (`press ArrowDown`), and `try-open-combobox-with-enter` (`press Enter`), session-prefixed when applicable. The diagnostic is deliberately gated to explicit combobox-targeted calls to avoid extra probes or false positives on ordinary clicks/textboxes.
761
765
  - `recordingDependencyWarning` after a successful `record start` or `record restart` when the wrapper cannot find an executable `ffmpeg` on the Pi process `PATH`. Shape: `{ reason: "ffmpeg-missing-for-recording", dependency: "ffmpeg", command, message, recommendations }`. Visible text appends `Recording dependency warning: ffmpeg not found on PATH`. This is a non-blocking warning after native success, not a preflight or encoding check. Native 0.37 validates ffmpeg at startup; older supported natives may defer failure. Treat the pending output as unverified, stop and check its result, then install ffmpeg before starting a new recording.
@@ -763,7 +767,7 @@ Additional structured fields can appear when relevant:
763
767
  - `electronGetTextScopeWarning` after a successful wrapper-tracked attached Electron `get text <selector>` (standalone or successful `batch`) when a broad non-ref CSS selector such as `body`, `html`, `main`, `div`, or `[role=application]` may read the whole app shell. Ordinary browser pages do not qualify without wrapper-owned Electron launch provenance. Shape: `{ selector, summary, electronContext: { launchId?, sessionName?, url? } }`; multiple batched diagnostics use `electronGetTextScopeWarnings`. Visible text appends `Broad Electron get text selector warning`, and next actions use `snapshot-for-electron-text-scope` ids with session-scoped `snapshot -i` payloads.
764
768
  - `evalStdinHint` after a successful `eval --stdin` when caller stdin (trimmed) looks function-shaped to the wrapper’s lightweight detector (in `extensions/agent-browser/lib/orchestration/browser-run/diagnostics.ts`: leading `function` / `async function`, parenthesized arrow `(…) =>`, or a concise `name =>` / `async name =>` form) **and** upstream JSON `data` is an object whose `result` field is a plain empty object (`{}`). Arrays such as `[]` do not qualify. It includes `reason` and `suggestion`; visible output appends `Eval stdin hint` with the same guidance. This is a heuristic for the common mistake of returning a function object instead of invoking it or passing a plain expression, not a JavaScript parser or proof that the page returned no useful data. Before this diagnostic path runs, the wrapper also recovers the common malformed native-tool call `args: ["eval", "--stdin", "..."]` with no top-level `stdin` by moving trailing `args` tokens after `--stdin` into the process stdin stream.
765
769
  - `evalResultWarning` after a successful `eval --stdin` when the current or prior page URL is `file:` (from navigation summary, session tab target, or persisted session page state), upstream JSON `data.result` is strictly `null`, and stdin is non-empty and not a trivial literal `null`/`undefined`. Fields: `reason`, `suggestion`. Visible output appends `Eval result warning` without failing the tool. Use snapshot -i, ref-based getters, screenshots, or http(s) fixtures when file:// null results are inconclusive.
766
- - `timeoutPartialProgress` after `runAgentBrowserProcess` reports `timedOut` (wrapper child-process watchdog) when best-effort recovery finds useful context. `summary` counts planned steps with unknown outcomes and observed declared artifact paths, plus whether page context came from live session reads or only from a planned URL. An existing file or matching URL is current-state evidence, not proof that any planned step ran. `steps` lists planned argv from the compiled QA batch plan (`compiledJob` remains its internal metadata name) or, when that object is absent, from the effective upstream `batch` source: raw argument command strings exclusively when present, otherwise JSON-array stdin, whether caller-authored or wrapper-generated by advanced source tools (1-based indices). Ignored stdin does not contribute recovery steps or artifact evidence. Generated QA rows may include `generatedFrom`. Each step has `status: "unknown"` and a `reason`: the watchdog fired before upstream reported its outcome. Multi-step timeouts do not identify a completed prefix, failed step, pending suffix, or retry position. For a single read-only or idempotent step such as a wait, snapshot, screenshot, navigation, or diagnostic, `retryStep.retry` and `retry-timeout-step` may offer a candidate after inspection; its outcome remains unknown. Each retry uses `args: ["batch"]` with `stdin` containing the original row, preserving native row operands instead of reinterpreting them as outer CLI globals. Otherwise, when the target is already verified, `inspect-current-page-after-timeout` (`snapshot -i`) lets the agent inspect state before deciding how to resume. When the target is unknown, every standalone snapshot action is removed and replaced by one executable `verify-page-target-after-timeout` action: a session-scoped `batch --bail` with stdin `[["get","url"],["snapshot","-i"]]`, so snapshot runs only after the wrapper's page-target guard is satisfied; visible failure text prints those redacted args and short stdin rather than pointing only to structured details. Dialog `status`, `accept`, and `dismiss` remain allowed while the target is unknown so timeout dialog recovery actions are executable. When a retryable step timed out during `sessionMode: "fresh"` and no live URL was recovered, `retry-timeout-step` uses top-level `sessionMode: "fresh"` instead of prefixing the abandoned generated session name. `currentPage` comes from session-scoped `get url` followed by `get title` when the session answers, otherwise a fallback URL may be inferred from the last `open` / `navigate` / `pushstate` step in the plan; `liveUrlRecovered` is true only when the wrapper recovered a live URL, so planned URLs are not treated as proof that the page actually opened. `artifacts` reports post-timeout path existence, not creation by this invocation or step completion. It covers declared output paths on `screenshot`, `pdf`, `download`, and `wait --download` steps (absolute path, existence, `state`, optional `sizeBytes`, `stepIndex`). It uses native operand positions, including literal dash-leading paths: first operand for `pdf`, second for `download`, and the next retained operand after the first timeout pair is removed for `wait --download` / `-d`. Visible text repeats the same block under `Timeout partial progress`, applying URL and path-segment redaction; the prose `Planned steps` list shows at most six steps, then an omitted-count line when the plan is longer. This is recovery evidence only; missing entries do not prove the upstream step never ran or that no other side effects occurred.
770
+ - `timeoutPartialProgress` after `runAgentBrowserProcess` reports `timedOut` (wrapper child-process watchdog) when best-effort recovery finds useful context. `summary` counts planned steps with unknown outcomes and observed declared artifact paths, plus whether page context came from live session reads or only from a planned URL. An existing file or matching URL is current-state evidence, not proof that any planned step ran. `steps` lists planned argv from the compiled QA batch plan (`compiledJob` remains its internal metadata name) or, when that object is absent, from the effective upstream `batch` source: raw argument command strings exclusively when present, otherwise JSON-array stdin, whether caller-authored or wrapper-generated by advanced source tools (1-based indices). Ignored stdin does not contribute recovery steps or artifact evidence. Generated QA rows may include `generatedFrom`. Each step has `status: "unknown"` and a `reason`: the watchdog fired before upstream reported its outcome. Multi-step timeouts do not identify a completed prefix, failed step, pending suffix, or retry position. For a single read-only or idempotent step such as a wait, snapshot, screenshot, navigation, or diagnostic, `retryStep.retry` and `retry-timeout-step` may offer a candidate after inspection; its outcome remains unknown. Each retry uses `args: ["batch"]` with `stdin` containing the original row, preserving native row operands instead of reinterpreting them as outer CLI globals. Otherwise, when the target is already verified, `inspect-current-page-after-timeout` (`snapshot -i`) lets the agent inspect state before deciding how to resume. When the target is unknown, every standalone snapshot action is removed and replaced by one executable `verify-page-target-after-timeout` action: a session-scoped `batch --bail` with stdin `[["get","url"],["snapshot","-i"]]`, so snapshot runs only after the wrapper's page-target guard is satisfied; visible failure text prints those redacted args and short stdin rather than pointing only to structured details. Dialog `status`, `accept`, and `dismiss` remain allowed while the target is unknown so timeout dialog recovery actions are executable. When a retryable step timed out during `sessionMode: "fresh"` and no live URL was recovered, `retry-timeout-step` uses top-level `sessionMode: "fresh"` instead of prefixing the abandoned generated session name. `currentPage` comes from session-scoped `get url` followed by `get title` when the session answers, otherwise a fallback URL may be inferred from the last `open` / `navigate` / `pushstate` step in the plan; `liveUrlRecovered` is true only when the wrapper recovered a live URL, so planned URLs are not treated as proof that the page actually opened. `artifacts` reports post-timeout path existence, not creation by this invocation or step completion. Independent paths are sampled concurrently in plan order, each with up to three filesystem checks separated by 25 ms; page inspection starts after these retry windows settle. A file finishing after its own window may remain missing, even if a later page probe succeeds. It covers declared output paths on `screenshot`, `pdf`, `download`, and `wait --download` steps (absolute path, existence, `state`, optional `sizeBytes`, `stepIndex`). It uses native operand positions, including literal dash-leading paths: first operand for `pdf`, second for `download`, and the next retained operand after the first timeout pair is removed for `wait --download` / `-d`. Visible text repeats the same block under `Timeout partial progress`, applying URL and path-segment redaction; the prose `Planned steps` list shows at most six steps, then an omitted-count line when the plan is longer. This is recovery evidence only; missing entries do not prove the upstream step never ran or that no other side effects occurred.
767
771
  - `managedSessionHeadedAutosaveInterval` on active/current-after-failure wrapper-owned headed session rows, containing the canonical effective launch-time `AGENT_BROWSER_AUTOSAVE_INTERVAL_MS` string (invalid or out-of-range explicit values resolve to upstream's `"30000"` default). It is `"0"` for the wrapper default and can hold an explicit interval such as `"1000"`; transcript replay and still-owned off-current helpers reapply the recorded value. It is omitted for sessionless, headless, caller-owned, abandoned, and closed calls. If a resumed Pi process explicitly requests a different value in either direction, non-close calls fail with close-plus-fresh recovery guidance while close still uses the recorded daemon value.
768
772
  - `managedSessionHeadedAutosaveDisabled: true` is the narrower compatibility marker that the targeted session uses the wrapper's default interval `0`, rather than an explicit caller interval. It accompanies `managedSessionHeadedAutosaveInterval: "0"` on active rows and remains omitted for explicitly configured autosave.
769
773
  - `managedSessionOutcome` after a managed-session plan reaches process execution (`buildManagedSessionOutcome` / `formatManagedSessionOutcomeText` in `extensions/agent-browser/lib/orchestration/browser-run/session-state.ts`). Populated when `buildExecutionPlan` injects an extension-managed implicit or fresh `--session`, and also when a successful explicit `--session <current-wrapper-managed-session> close` closes the current managed session. It remains omitted for unrelated explicit user-managed sessions and for sessionless inspection/local paths that skip injection. Successful nested-batch lifecycle rows are evaluated in order: a terminal close reports and replays `status: "closed"` even when aggregate artifact verification makes the tool result fail; a later lifecycle-proven browser launch (including a post-close `record stop`) keeps the session active, an explicitly non-launching diagnostic leaves it closed, and an unknown row stays conservatively active even when the failed batch was the first managed call. Fields: `status` (`created`, `replaced`, `unchanged`, `closed`, `preserved`, or `abandoned`), `sessionMode`, `attemptedSessionName`, `previousSessionName`, `currentSessionName`, optional `currentSessionNamespace`, optional `replacedSessionName`, optional `replacedSessionNamespace`, optional `replacedSessionClosed` (false means automatic close failed and the previous session remains wrapper-owned/restorable for explicit cleanup), `activeBefore`, `activeAfter`, `succeeded`, and `summary` (machine-oriented; may include generated session names). Use `currentSessionNamespace` with `currentSessionName` when following preserved-session recovery actions; retry-fresh actions stay in the attempted namespace. Model-visible echo: when `sessionMode` is `"fresh"` **and** `succeeded` is false, or when `replacedSessionClosed` is false after a replacement, the wrapper appends action-oriented `Managed session outcome` and `Recovery` lines without repeating generated session ids in visible prose; session names remain in `details.managedSessionOutcome`. Failed fresh launches may also append `details.nextActions` such as `run-agent-browser-doctor`, `verify-current-managed-session`, `snapshot-current-managed-session`, or `retry-fresh-managed-session`. When other trailing diagnostic prose is also emitted in the same result, that block is concatenated **after** semantic-action candidate lines, overlay/selector-visibility tails, eval hints/warnings, and `Timeout partial progress` (see `rawAppendedDiagnosticText` in `extensions/agent-browser/lib/orchestration/browser-run/final-result.ts`). For `"auto"` failures the same struct may appear on `details` without that extra line. When post-upstream analysis (for example **`qa`** preset failure) flips the overall tool result after a successful batch, or a fresh native batch opens the requested page and then a later step fails, the managed-session transition still reflects that the fresh browser became current. The visible recovery says the fresh launch became current and points to `failureCategory` / `qaPreset` / `batchFailure` for the post-launch failure instead of telling the agent that the old session was preserved.
@@ -937,7 +941,7 @@ For exact delayed-input behavior, build native rows instead of relying on unveri
937
941
  }
938
942
  ```
939
943
 
940
- Fixed waits are elapsed time, not postconditions. Preserve explicit URL/text waits, same-snapshot fill ordering, fresh refs after mutations, and partial-progress inspection. There is no legacy public script/job runtime. Exact isolated-script cleanup leases are normalized only by offline conversion so canonical replay can retire their recorded pre-upgrade resources. Saved auth and original Pi transcripts are not rewritten or deleted; [rollback](RELEASE.md#07-upgrade-and-rollback) changes the package version, not browser side effects.
944
+ Fixed waits are elapsed time, not postconditions. Preserve explicit URL/text waits, same-snapshot fill ordering, fresh refs after mutations, and partial-progress inspection. There is no legacy public script/job runtime. Exact isolated-script cleanup leases are normalized during ordinary read-only replay so the canonical cleanup path can retire recorded pre-upgrade resources without acquiring a parent's cleanup rights on a fork. Optional separate-copy conversion uses the same decoder. Saved auth and original Pi transcripts are not rewritten or deleted; [rollback](RELEASE.md#07-upgrade-and-rollback) changes the package version, not browser side effects.
941
945
 
942
946
  ## Non-goals
943
947