pi-agent-browser-native 0.9.5 → 0.9.7
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.
- package/CHANGELOG.md +114 -1
- package/README.md +17 -6
- package/dist/extensions/agent-browser/index.js +2482 -925
- package/dist/packaged/lib/browser-session-conversion.js +2946 -0
- package/dist/packaged/lib/config-policy.js +599 -0
- package/dist/packaged/lib/parsing.js +34 -0
- package/dist/packaged/lib/playbook.js +728 -0
- package/dist/packaged/lib/results/snapshot.js +2800 -0
- package/dist/packaged/lib/runtime.js +3075 -0
- package/docs/ARCHITECTURE.md +29 -10
- package/docs/CODE_QUALITY.md +32 -5
- package/docs/COMMAND_REFERENCE.md +156 -40
- package/docs/ELECTRON.md +1 -1
- package/docs/PERFORMANCE.md +252 -0
- package/docs/REFERENCE.md +15 -15
- package/docs/RELEASE.md +41 -18
- package/docs/REQUIREMENTS.md +6 -0
- package/docs/SESSION_STORAGE.md +13 -5
- package/docs/SUPPORT_MATRIX.md +31 -25
- package/docs/TOOL_CONTRACT.md +41 -18
- package/docs/performance/2026-10-12.json +7257 -0
- package/docs/platform-smoke.md +18 -14
- package/package.json +18 -4
- package/platform-smoke.config.mjs +3 -2
- package/scripts/agent-browser-capability-baseline.mjs +16 -2
- package/scripts/agent-browser-target.mjs +1 -1
- package/scripts/build.mjs +16 -5
- package/scripts/capability-options.mjs +20 -0
- package/scripts/capability-samples.mjs +23 -10
- package/scripts/config.mjs +1 -1
- package/scripts/convert-browser-session.mjs +1 -1
- package/scripts/platform-smoke/commands.mjs +30 -4
- package/scripts/platform-smoke/doctor-support.mjs +11 -2
- package/scripts/platform-smoke/doctor-windows.mjs +1 -1
- package/scripts/platform-smoke/doctor.mjs +26 -11
- package/scripts/platform-smoke/linux-image/Dockerfile +6 -3
- package/scripts/platform-smoke/platform-build-windows.ps1 +23 -3
- package/scripts/platform-smoke/suite-checks.mjs +11 -1
- package/scripts/platform-smoke/targets.mjs +4 -3
- package/scripts/platform-smoke.mjs +68 -25
- package/dist/extensions/agent-browser/lib/argv-descriptor.js +0 -123
- package/dist/extensions/agent-browser/lib/argv-grammar.js +0 -320
- package/dist/extensions/agent-browser/lib/bash-guard.js +0 -193
- package/dist/extensions/agent-browser/lib/batch-lifecycle.js +0 -131
- package/dist/extensions/agent-browser/lib/browser-execution-claim-codec.js +0 -61
- package/dist/extensions/agent-browser/lib/browser-execution-claim-storage.js +0 -232
- package/dist/extensions/agent-browser/lib/browser-execution-claims.js +0 -202
- package/dist/extensions/agent-browser/lib/browser-execution-identity.js +0 -77
- package/dist/extensions/agent-browser/lib/browser-journal-branch.js +0 -98
- package/dist/extensions/agent-browser/lib/browser-journal-contracts.js +0 -1
- package/dist/extensions/agent-browser/lib/browser-journal-projection.js +0 -221
- package/dist/extensions/agent-browser/lib/browser-journal-reader.js +0 -89
- package/dist/extensions/agent-browser/lib/browser-journal-replay.js +0 -246
- package/dist/extensions/agent-browser/lib/browser-journal.js +0 -148
- package/dist/extensions/agent-browser/lib/browser-legacy-pages.js +0 -220
- package/dist/extensions/agent-browser/lib/browser-legacy-projection.js +0 -282
- package/dist/extensions/agent-browser/lib/browser-legacy-types.js +0 -1
- package/dist/extensions/agent-browser/lib/browser-session-conversion-stream.js +0 -217
- package/dist/extensions/agent-browser/lib/browser-session-conversion.js +0 -126
- package/dist/extensions/agent-browser/lib/browser-transcript-contracts.js +0 -35
- package/dist/extensions/agent-browser/lib/browser-transcript-validation.js +0 -166
- package/dist/extensions/agent-browser/lib/browser-transcript.js +0 -189
- package/dist/extensions/agent-browser/lib/browser-value-parsing.js +0 -15
- package/dist/extensions/agent-browser/lib/command-capabilities.js +0 -340
- package/dist/extensions/agent-browser/lib/command-policy.js +0 -155
- package/dist/extensions/agent-browser/lib/command-taxonomy.js +0 -105
- package/dist/extensions/agent-browser/lib/config-policy.js +0 -450
- package/dist/extensions/agent-browser/lib/config-providers.js +0 -71
- package/dist/extensions/agent-browser/lib/config-validation.js +0 -231
- package/dist/extensions/agent-browser/lib/config.js +0 -69
- package/dist/extensions/agent-browser/lib/electron/cdp.js +0 -62
- package/dist/extensions/agent-browser/lib/electron/cleanup.js +0 -274
- package/dist/extensions/agent-browser/lib/electron/discovery-darwin.js +0 -109
- package/dist/extensions/agent-browser/lib/electron/discovery-desktop.js +0 -136
- package/dist/extensions/agent-browser/lib/electron/discovery-evidence.js +0 -90
- package/dist/extensions/agent-browser/lib/electron/discovery-linux.js +0 -93
- package/dist/extensions/agent-browser/lib/electron/discovery-packages.js +0 -162
- package/dist/extensions/agent-browser/lib/electron/discovery-types.js +0 -2
- package/dist/extensions/agent-browser/lib/electron/discovery.js +0 -217
- package/dist/extensions/agent-browser/lib/electron/launch-monitor.js +0 -102
- package/dist/extensions/agent-browser/lib/electron/launch-process.js +0 -209
- package/dist/extensions/agent-browser/lib/electron/launch-types.js +0 -2
- package/dist/extensions/agent-browser/lib/electron/launch.js +0 -340
- package/dist/extensions/agent-browser/lib/executable-path.js +0 -29
- package/dist/extensions/agent-browser/lib/execution-cwd.js +0 -67
- package/dist/extensions/agent-browser/lib/fs-utils.js +0 -10
- package/dist/extensions/agent-browser/lib/input-modes/electron.js +0 -201
- package/dist/extensions/agent-browser/lib/input-modes/job.js +0 -198
- package/dist/extensions/agent-browser/lib/input-modes/lookup-network-evidence.js +0 -116
- package/dist/extensions/agent-browser/lib/input-modes/lookup-plan.js +0 -132
- package/dist/extensions/agent-browser/lib/input-modes/lookup-redaction.js +0 -57
- package/dist/extensions/agent-browser/lib/input-modes/lookup-source-evidence.js +0 -151
- package/dist/extensions/agent-browser/lib/input-modes/lookup-workspace.js +0 -142
- package/dist/extensions/agent-browser/lib/input-modes/lookups.js +0 -84
- package/dist/extensions/agent-browser/lib/input-modes/params.js +0 -195
- package/dist/extensions/agent-browser/lib/input-modes/qa-analysis.js +0 -268
- package/dist/extensions/agent-browser/lib/input-modes/qa-presentation.js +0 -117
- package/dist/extensions/agent-browser/lib/input-modes/script-child.js +0 -396
- package/dist/extensions/agent-browser/lib/input-modes/script-protocol.js +0 -86
- package/dist/extensions/agent-browser/lib/input-modes/script-types.js +0 -1
- package/dist/extensions/agent-browser/lib/input-modes/script-validation.js +0 -60
- package/dist/extensions/agent-browser/lib/input-modes/script.js +0 -108
- package/dist/extensions/agent-browser/lib/input-modes/semantic-action.js +0 -243
- package/dist/extensions/agent-browser/lib/input-modes/shared.js +0 -48
- package/dist/extensions/agent-browser/lib/input-modes/types.js +0 -65
- package/dist/extensions/agent-browser/lib/json-schema.js +0 -65
- package/dist/extensions/agent-browser/lib/launch-scoped-flags.js +0 -212
- package/dist/extensions/agent-browser/lib/managed-session-policy-lock.js +0 -165
- package/dist/extensions/agent-browser/lib/managed-session-posix-storage.js +0 -58
- package/dist/extensions/agent-browser/lib/managed-session-project-identity.js +0 -244
- package/dist/extensions/agent-browser/lib/managed-session-restore-context.js +0 -84
- package/dist/extensions/agent-browser/lib/managed-session-restore-policy.js +0 -119
- package/dist/extensions/agent-browser/lib/managed-session-restore-state.js +0 -83
- package/dist/extensions/agent-browser/lib/managed-session-restore.js +0 -212
- package/dist/extensions/agent-browser/lib/managed-session-snapshot-records.js +0 -277
- package/dist/extensions/agent-browser/lib/managed-session-snapshots.js +0 -181
- package/dist/extensions/agent-browser/lib/managed-session-storage.js +0 -126
- package/dist/extensions/agent-browser/lib/native-confirmation.js +0 -140
- package/dist/extensions/agent-browser/lib/native-output.js +0 -81
- package/dist/extensions/agent-browser/lib/orchestration/batch-stdin.js +0 -182
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/artifact-merge.js +0 -30
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/artifact-paths.js +0 -188
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/browser-observation-result.js +0 -82
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/click-dispatch.js +0 -406
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/diagnostic-values.js +0 -31
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/diagnostics.js +0 -240
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/electron-observation.js +0 -203
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/electron-text-diagnostics.js +0 -109
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/fill-diagnostics.js +0 -119
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/final-result-action-recovery.js +0 -147
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/final-result-actions.js +0 -144
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/final-result-content.js +0 -123
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/final-result-contracts.js +0 -1
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/final-result-details.js +0 -156
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/final-result-electron.js +0 -187
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/final-result-evidence.js +0 -39
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/final-result-missing-binary.js +0 -89
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/final-result-recovery.js +0 -97
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/final-result-redaction.js +0 -106
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/final-result-timeout.js +0 -110
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/final-result.js +0 -53
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/index.js +0 -224
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/interaction-diagnostics.js +0 -290
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/managed-session-close.js +0 -167
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/managed-session-daemon-inspection.js +0 -108
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/managed-session-daemon-policy.js +0 -174
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/native-helper-observation.js +0 -65
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/observation-types.js +0 -1
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/overlay-diagnostics.js +0 -120
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare/network-page-filter.js +0 -192
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare/scroll-shims.js +0 -225
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare/snapshot-filter-data.js +0 -150
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare/snapshot-filter.js +0 -174
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare/snapshot-rendered-text.js +0 -147
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare/wait-timeouts.js +0 -145
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-artifacts.js +0 -159
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-command.js +0 -131
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-contracts.js +0 -1
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-daemon.js +0 -93
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-failure.js +0 -42
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-guards.js +0 -242
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-input.js +0 -75
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-observations.js +0 -92
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-page-selection.js +0 -254
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-page-state.js +0 -121
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-refs.js +0 -130
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-resources.js +0 -114
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-semantic.js +0 -121
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-session-plan.js +0 -222
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare-timeouts.js +0 -68
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/prepare.js +0 -202
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-analysis.js +0 -191
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-confirmation.js +0 -152
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-diagnostics.js +0 -182
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-electron.js +0 -150
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-lifecycle-contracts.js +0 -1
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-lifecycle-phase-contracts.js +0 -1
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-lifecycle-phase.js +0 -115
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-lifecycle.js +0 -256
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-managed-contracts.js +0 -1
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-managed.js +0 -256
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-native-phase-contracts.js +0 -1
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-native-phase.js +0 -93
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-native.js +0 -113
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-navigation-contracts.js +0 -1
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-navigation.js +0 -316
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-ownership.js +0 -28
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-page-phase-contracts.js +0 -1
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-page-phase.js +0 -142
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-presentation-contracts.js +0 -1
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-presentation.js +0 -333
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-publication-phase-contracts.js +0 -1
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-publication-phase.js +0 -71
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-publication.js +0 -201
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-receipts.js +0 -183
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-refs.js +0 -200
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output-tabs.js +0 -142
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/process-output.js +0 -25
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/prompt-guards.js +0 -50
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/recording-receipt-reconciliation.js +0 -198
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/recording-recovery-contracts.js +0 -1
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/recording-recovery-presentation.js +0 -154
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/recording-recovery.js +0 -80
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/screenshot-capture.js +0 -14
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/screenshot-observation.js +0 -206
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/session-state-commands.js +0 -130
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/session-state-electron.js +0 -212
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/session-state-observations.js +0 -61
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/session-state-outcomes.js +0 -187
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/session-state-refs.js +0 -169
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/session-state-tabs.js +0 -228
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/session-state.js +0 -117
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/text-visibility-diagnostics.js +0 -182
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/timeout-diagnostics.js +0 -256
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/timeout-progress.js +0 -108
- package/dist/extensions/agent-browser/lib/orchestration/browser-run/types.js +0 -1
- package/dist/extensions/agent-browser/lib/orchestration/code-artifact-observation.js +0 -39
- package/dist/extensions/agent-browser/lib/orchestration/code-image-observation.js +0 -119
- package/dist/extensions/agent-browser/lib/orchestration/electron-host/branch.js +0 -93
- package/dist/extensions/agent-browser/lib/orchestration/electron-host/cleanup-result.js +0 -58
- package/dist/extensions/agent-browser/lib/orchestration/electron-host/cleanup.js +0 -78
- package/dist/extensions/agent-browser/lib/orchestration/electron-host/contracts.js +0 -1
- package/dist/extensions/agent-browser/lib/orchestration/electron-host/discovery.js +0 -106
- package/dist/extensions/agent-browser/lib/orchestration/electron-host/index.js +0 -60
- package/dist/extensions/agent-browser/lib/orchestration/electron-host/policy.js +0 -86
- package/dist/extensions/agent-browser/lib/orchestration/electron-host/probe-collection.js +0 -68
- package/dist/extensions/agent-browser/lib/orchestration/electron-host/probe-data.js +0 -169
- package/dist/extensions/agent-browser/lib/orchestration/electron-host/probe-presentation.js +0 -182
- package/dist/extensions/agent-browser/lib/orchestration/electron-host/probe.js +0 -161
- package/dist/extensions/agent-browser/lib/orchestration/electron-host/status.js +0 -167
- package/dist/extensions/agent-browser/lib/orchestration/execution-queue.js +0 -98
- package/dist/extensions/agent-browser/lib/orchestration/extension-artifact-preflight.js +0 -211
- package/dist/extensions/agent-browser/lib/orchestration/extension-artifacts.js +0 -23
- package/dist/extensions/agent-browser/lib/orchestration/extension-attachment-replay.js +0 -99
- package/dist/extensions/agent-browser/lib/orchestration/extension-branch-restore.js +0 -275
- package/dist/extensions/agent-browser/lib/orchestration/extension-code.js +0 -280
- package/dist/extensions/agent-browser/lib/orchestration/extension-command-admission.js +0 -303
- package/dist/extensions/agent-browser/lib/orchestration/extension-command-output.js +0 -36
- package/dist/extensions/agent-browser/lib/orchestration/extension-command-result.js +0 -335
- package/dist/extensions/agent-browser/lib/orchestration/extension-command-run.js +0 -227
- package/dist/extensions/agent-browser/lib/orchestration/extension-command-state.js +0 -1
- package/dist/extensions/agent-browser/lib/orchestration/extension-electron-ownership.js +0 -204
- package/dist/extensions/agent-browser/lib/orchestration/extension-execution-locks.js +0 -139
- package/dist/extensions/agent-browser/lib/orchestration/extension-execution-queue.js +0 -24
- package/dist/extensions/agent-browser/lib/orchestration/extension-host-coordination.js +0 -98
- package/dist/extensions/agent-browser/lib/orchestration/extension-host-run.js +0 -295
- package/dist/extensions/agent-browser/lib/orchestration/extension-intent-replay.js +0 -41
- package/dist/extensions/agent-browser/lib/orchestration/extension-invocation.js +0 -7
- package/dist/extensions/agent-browser/lib/orchestration/extension-lifecycle.js +0 -102
- package/dist/extensions/agent-browser/lib/orchestration/extension-managed-ownership.js +0 -133
- package/dist/extensions/agent-browser/lib/orchestration/extension-observation.js +0 -120
- package/dist/extensions/agent-browser/lib/orchestration/extension-prompt.js +0 -180
- package/dist/extensions/agent-browser/lib/orchestration/extension-recording.js +0 -290
- package/dist/extensions/agent-browser/lib/orchestration/extension-resource-contracts.js +0 -1
- package/dist/extensions/agent-browser/lib/orchestration/extension-resource-replay.js +0 -269
- package/dist/extensions/agent-browser/lib/orchestration/extension-result-state.js +0 -113
- package/dist/extensions/agent-browser/lib/orchestration/extension-runtime.js +0 -146
- package/dist/extensions/agent-browser/lib/orchestration/extension-script-leases.js +0 -58
- package/dist/extensions/agent-browser/lib/orchestration/extension-tool-boundary.js +0 -62
- package/dist/extensions/agent-browser/lib/orchestration/extension-version-check.js +0 -54
- package/dist/extensions/agent-browser/lib/orchestration/input-plan-types.js +0 -1
- package/dist/extensions/agent-browser/lib/orchestration/input-plan.js +0 -313
- package/dist/extensions/agent-browser/lib/orchestration/input-redaction.js +0 -62
- package/dist/extensions/agent-browser/lib/orchestration/native-config.js +0 -144
- package/dist/extensions/agent-browser/lib/orchestration/native-root-launch.js +0 -77
- package/dist/extensions/agent-browser/lib/orchestration/native-session-defaults.js +0 -231
- package/dist/extensions/agent-browser/lib/orchestration/operation-paths.js +0 -142
- package/dist/extensions/agent-browser/lib/orchestration/output-file.js +0 -276
- package/dist/extensions/agent-browser/lib/orchestration/script-mode.js +0 -220
- package/dist/extensions/agent-browser/lib/owned-managed-session-context.js +0 -55
- package/dist/extensions/agent-browser/lib/page-target-batch.js +0 -118
- package/dist/extensions/agent-browser/lib/page-target-guards.js +0 -50
- package/dist/extensions/agent-browser/lib/page-target-navigation.js +0 -104
- package/dist/extensions/agent-browser/lib/page-target-validation.js +0 -90
- package/dist/extensions/agent-browser/lib/parsing.js +0 -30
- package/dist/extensions/agent-browser/lib/pi-tool-rendering.js +0 -343
- package/dist/extensions/agent-browser/lib/playbook.js +0 -146
- package/dist/extensions/agent-browser/lib/process-child.js +0 -284
- package/dist/extensions/agent-browser/lib/process-environment.js +0 -48
- package/dist/extensions/agent-browser/lib/process-errors.js +0 -23
- package/dist/extensions/agent-browser/lib/process-identity.js +0 -127
- package/dist/extensions/agent-browser/lib/process-socket-storage.js +0 -256
- package/dist/extensions/agent-browser/lib/process-stdout.js +0 -74
- package/dist/extensions/agent-browser/lib/process.js +0 -216
- package/dist/extensions/agent-browser/lib/prompt-artifacts.js +0 -287
- package/dist/extensions/agent-browser/lib/prompt-policy.js +0 -54
- package/dist/extensions/agent-browser/lib/read-command.js +0 -41
- package/dist/extensions/agent-browser/lib/read-confirmation.js +0 -162
- package/dist/extensions/agent-browser/lib/recording-reservations.js +0 -208
- package/dist/extensions/agent-browser/lib/redaction-fields.js +0 -75
- package/dist/extensions/agent-browser/lib/redaction-json.js +0 -149
- package/dist/extensions/agent-browser/lib/redaction-url.js +0 -88
- package/dist/extensions/agent-browser/lib/results/action-contracts.js +0 -1
- package/dist/extensions/agent-browser/lib/results/action-recommendations.js +0 -38
- package/dist/extensions/agent-browser/lib/results/artifact-contracts.js +0 -1
- package/dist/extensions/agent-browser/lib/results/artifact-manifest-validation.js +0 -133
- package/dist/extensions/agent-browser/lib/results/artifact-manifest.js +0 -173
- package/dist/extensions/agent-browser/lib/results/artifact-recommendations.js +0 -73
- package/dist/extensions/agent-browser/lib/results/categories.js +0 -152
- package/dist/extensions/agent-browser/lib/results/confirmation.js +0 -75
- package/dist/extensions/agent-browser/lib/results/contracts.js +0 -1
- package/dist/extensions/agent-browser/lib/results/editable-ref-evidence.js +0 -99
- package/dist/extensions/agent-browser/lib/results/electron-recommendations.js +0 -83
- package/dist/extensions/agent-browser/lib/results/envelope-decoding.js +0 -48
- package/dist/extensions/agent-browser/lib/results/envelope.js +0 -198
- package/dist/extensions/agent-browser/lib/results/evidence-contracts.js +0 -1
- package/dist/extensions/agent-browser/lib/results/failure-recommendations.js +0 -180
- package/dist/extensions/agent-browser/lib/results/network-routes.js +0 -133
- package/dist/extensions/agent-browser/lib/results/network.js +0 -89
- package/dist/extensions/agent-browser/lib/results/next-actions.js +0 -111
- package/dist/extensions/agent-browser/lib/results/presentation/artifact-files.js +0 -320
- package/dist/extensions/agent-browser/lib/results/presentation/artifact-format.js +0 -138
- package/dist/extensions/agent-browser/lib/results/presentation/artifact-images.js +0 -113
- package/dist/extensions/agent-browser/lib/results/presentation/artifact-verification.js +0 -145
- package/dist/extensions/agent-browser/lib/results/presentation/artifacts.js +0 -165
- package/dist/extensions/agent-browser/lib/results/presentation/batch-contracts.js +0 -1
- package/dist/extensions/agent-browser/lib/results/presentation/batch-recording.js +0 -118
- package/dist/extensions/agent-browser/lib/results/presentation/batch-redaction.js +0 -68
- package/dist/extensions/agent-browser/lib/results/presentation/batch-rendering.js +0 -135
- package/dist/extensions/agent-browser/lib/results/presentation/batch-step.js +0 -227
- package/dist/extensions/agent-browser/lib/results/presentation/batch-summary.js +0 -91
- package/dist/extensions/agent-browser/lib/results/presentation/batch.js +0 -123
- package/dist/extensions/agent-browser/lib/results/presentation/browser-profile-recovery.js +0 -54
- package/dist/extensions/agent-browser/lib/results/presentation/command-presenters.js +0 -216
- package/dist/extensions/agent-browser/lib/results/presentation/common.js +0 -81
- package/dist/extensions/agent-browser/lib/results/presentation/content.js +0 -119
- package/dist/extensions/agent-browser/lib/results/presentation/diagnostic-a11y.js +0 -67
- package/dist/extensions/agent-browser/lib/results/presentation/diagnostic-health.js +0 -79
- package/dist/extensions/agent-browser/lib/results/presentation/diagnostic-identity.js +0 -199
- package/dist/extensions/agent-browser/lib/results/presentation/diagnostic-logs.js +0 -75
- package/dist/extensions/agent-browser/lib/results/presentation/diagnostic-network-actions.js +0 -216
- package/dist/extensions/agent-browser/lib/results/presentation/diagnostic-network.js +0 -124
- package/dist/extensions/agent-browser/lib/results/presentation/diagnostic-redaction.js +0 -64
- package/dist/extensions/agent-browser/lib/results/presentation/diagnostic-storage.js +0 -209
- package/dist/extensions/agent-browser/lib/results/presentation/diagnostic-stream.js +0 -69
- package/dist/extensions/agent-browser/lib/results/presentation/diagnostic-summary.js +0 -222
- package/dist/extensions/agent-browser/lib/results/presentation/diagnostics.js +0 -124
- package/dist/extensions/agent-browser/lib/results/presentation/early-result.js +0 -70
- package/dist/extensions/agent-browser/lib/results/presentation/errors.js +0 -285
- package/dist/extensions/agent-browser/lib/results/presentation/input-contracts.js +0 -1
- package/dist/extensions/agent-browser/lib/results/presentation/large-output.js +0 -117
- package/dist/extensions/agent-browser/lib/results/presentation/navigation.js +0 -231
- package/dist/extensions/agent-browser/lib/results/presentation/notices.js +0 -75
- package/dist/extensions/agent-browser/lib/results/presentation/observation-contracts.js +0 -1
- package/dist/extensions/agent-browser/lib/results/presentation/observation-rendering.js +0 -127
- package/dist/extensions/agent-browser/lib/results/presentation/outcomes.js +0 -120
- package/dist/extensions/agent-browser/lib/results/presentation/output-completion.js +0 -77
- package/dist/extensions/agent-browser/lib/results/presentation/output-spill.js +0 -51
- package/dist/extensions/agent-browser/lib/results/presentation/registry.js +0 -145
- package/dist/extensions/agent-browser/lib/results/presentation/semantic-action.js +0 -104
- package/dist/extensions/agent-browser/lib/results/presentation/skills.js +0 -183
- package/dist/extensions/agent-browser/lib/results/presentation/source.js +0 -109
- package/dist/extensions/agent-browser/lib/results/presentation.js +0 -19
- package/dist/extensions/agent-browser/lib/results/recommendation-contracts.js +0 -1
- package/dist/extensions/agent-browser/lib/results/recording.js +0 -88
- package/dist/extensions/agent-browser/lib/results/recovery-actions.js +0 -118
- package/dist/extensions/agent-browser/lib/results/recovery-next-actions.js +0 -60
- package/dist/extensions/agent-browser/lib/results/selector-recovery-target.js +0 -83
- package/dist/extensions/agent-browser/lib/results/selector-recovery.js +0 -261
- package/dist/extensions/agent-browser/lib/results/snapshot-compact.js +0 -266
- package/dist/extensions/agent-browser/lib/results/snapshot-content.js +0 -32
- package/dist/extensions/agent-browser/lib/results/snapshot-high-value-controls.js +0 -240
- package/dist/extensions/agent-browser/lib/results/snapshot-refs.js +0 -103
- package/dist/extensions/agent-browser/lib/results/snapshot-segments.js +0 -383
- package/dist/extensions/agent-browser/lib/results/snapshot-spill.js +0 -53
- package/dist/extensions/agent-browser/lib/results/snapshot.js +0 -44
- package/dist/extensions/agent-browser/lib/results/text.js +0 -44
- package/dist/extensions/agent-browser/lib/runtime-args-validation.js +0 -133
- package/dist/extensions/agent-browser/lib/runtime-compatibility.js +0 -81
- package/dist/extensions/agent-browser/lib/runtime-contracts.js +0 -1
- package/dist/extensions/agent-browser/lib/runtime-redaction.js +0 -118
- package/dist/extensions/agent-browser/lib/runtime-replay-events.js +0 -144
- package/dist/extensions/agent-browser/lib/runtime-session-identity.js +0 -76
- package/dist/extensions/agent-browser/lib/runtime-session-plan.js +0 -114
- package/dist/extensions/agent-browser/lib/runtime-session-replay.js +0 -123
- package/dist/extensions/agent-browser/lib/runtime-tab-correction.js +0 -65
- package/dist/extensions/agent-browser/lib/runtime-timeouts.js +0 -28
- package/dist/extensions/agent-browser/lib/runtime.js +0 -163
- package/dist/extensions/agent-browser/lib/session-identity.js +0 -51
- package/dist/extensions/agent-browser/lib/session-page-observation.js +0 -357
- package/dist/extensions/agent-browser/lib/session-page-state.js +0 -353
- package/dist/extensions/agent-browser/lib/session-page-types.js +0 -1
- package/dist/extensions/agent-browser/lib/string-enum-schema.js +0 -8
- package/dist/extensions/agent-browser/lib/temp-artifact-budget.js +0 -81
- package/dist/extensions/agent-browser/lib/temp-mutation-queue.js +0 -7
- package/dist/extensions/agent-browser/lib/temp-root-ownership.js +0 -234
- package/dist/extensions/agent-browser/lib/temp-root.js +0 -211
- package/dist/extensions/agent-browser/lib/temp.js +0 -91
- package/dist/extensions/agent-browser/lib/tool-surface.js +0 -239
- package/dist/extensions/agent-browser/lib/upstream-version.js +0 -15
- package/dist/extensions/agent-browser/lib/web-search-providers.js +0 -193
- package/dist/extensions/agent-browser/lib/web-search-request.js +0 -102
- package/dist/extensions/agent-browser/lib/web-search-results.js +0 -281
- package/dist/extensions/agent-browser/lib/web-search-schema.js +0 -82
- package/dist/extensions/agent-browser/lib/web-search.js +0 -167
- package/dist/extensions/agent-browser/lib/webmcp-observation.js +0 -35
- package/dist/extensions/agent-browser/lib/windows-stock-launcher.js +0 -96
- package/dist/scripts/agent-browser-target.mjs +0 -23
package/docs/ELECTRON.md
CHANGED
|
@@ -219,7 +219,7 @@ Cleanup partial failures fail the tool result with `failureCategory: "cleanup-fa
|
|
|
219
219
|
|
|
220
220
|
For manual launches, close commands (`close`, `quit`, or `exit`) only close the browser/CDP session. Close the app yourself and clean its profile/temp files with normal host tools.
|
|
221
221
|
|
|
222
|
-
On Pi `quit`, active wrapper-owned Electron launches are best-effort cleaned. On `/reload`, the current branch-visible active Electron launch and its isolated temp `userDataDir` are preserved for continuity while off-branch owned Electron launches are cleaned before process-local ownership is cleared. First reuse after reload/resume checks that the PID and profile are present, the saved browser WebSocket endpoint still matches the live app, and upstream `get cdp-url` points to that browser or one of its current targets. Ordinary browser calls, status reads, and probes share this check under the existing session lock; no reconnect or ref reset is needed. The `get cdp-url` read honors the caller's `timeoutMs` and cancellation, while localhost CDP requests keep their short fixed fetch budgets. Missing or mismatched evidence does not grant reuse, and generic restore-disabled sessions keep their existing rules. If cleanup is partial and skips or fails `user-data-dir` removal because the process or debug port is still live, the generic temp sweep preserves that profile path across reload, quit, repeated temp cleanup, process-exit cleanup, and stale temp-root pruning after restart rather than deleting it out from under the remaining host resource. If `electron.cleanup` closes the attached managed session but host process/profile cleanup is partial, later default browser calls still rotate away from that closed wrapper-managed session. Stale restored records (PID gone, port dead) are **reported** instead of guessed at or killed.
|
|
222
|
+
On Pi `quit`, active wrapper-owned Electron launches are best-effort cleaned. A managed fork restart (`pi restart` or `/restart`, shutdown disposition `handoff` or `provisional`) is not a quit: every active branch-visible launch keeps running with its isolated profile protected through process exit, and the replacement worker restores its ownership from the transcript for later status, probe, and cleanup; off-branch owned launches are cleaned as on `/reload`. On `/reload`, the current branch-visible active Electron launch and its isolated temp `userDataDir` are preserved for continuity while off-branch owned Electron launches are cleaned before process-local ownership is cleared. First reuse after reload/resume checks that the PID and profile are present, the saved browser WebSocket endpoint still matches the live app, and upstream `get cdp-url` points to that browser or one of its current targets. Ordinary browser calls, status reads, and probes share this check under the existing session lock; no reconnect or ref reset is needed. The `get cdp-url` read honors the caller's `timeoutMs` and cancellation, while localhost CDP requests keep their short fixed fetch budgets. Missing or mismatched evidence does not grant reuse, and generic restore-disabled sessions keep their existing rules. If cleanup is partial and skips or fails `user-data-dir` removal because the process or debug port is still live, the generic temp sweep preserves that profile path across reload, quit, repeated temp cleanup, process-exit cleanup, and stale temp-root pruning after restart rather than deleting it out from under the remaining host resource. If `electron.cleanup` closes the attached managed session but host process/profile cleanup is partial, later default browser calls still rotate away from that closed wrapper-managed session. Stale restored records (PID gone, port dead) are **reported** instead of guessed at or killed.
|
|
223
223
|
|
|
224
224
|
### `timeoutMs` by action (quick reference)
|
|
225
225
|
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
# Performance
|
|
2
|
+
|
|
3
|
+
The extension avoids redundant work while preserving native browser capabilities,
|
|
4
|
+
validation, redaction, page-target checks, transcript integrity, and cleanup
|
|
5
|
+
ownership. The largest improvements are in large-result processing and offline
|
|
6
|
+
journal conversion. Browser navigation and model latency remain outside those
|
|
7
|
+
CPU measurements.
|
|
8
|
+
|
|
9
|
+
## Captured baseline and integrated result
|
|
10
|
+
|
|
11
|
+
The [retained measurement record](performance/2026-10-12.json) compares baseline
|
|
12
|
+
`41467b70d255c06f5ec5e226a1adec420f8bcf4b` with the integrated runtime, identified by
|
|
13
|
+
source and compiled-tree hashes. Measurements used Node 24.21.0 on macOS arm64,
|
|
14
|
+
Apple M5 Pro, 18 logical CPUs, and 64 GiB RAM. This was a shared host: recorded load
|
|
15
|
+
varied substantially. Paired order was baseline / optimized / optimized / baseline.
|
|
16
|
+
|
|
17
|
+
### Fixed compiled-owner workloads
|
|
18
|
+
|
|
19
|
+
Each side has 14 measured samples per workload, after two warmups in each run.
|
|
20
|
+
Values are pooled medians in milliseconds; CPU is process user + system time.
|
|
21
|
+
Outputs, recovery metadata, ordering, UTF-8, discarded JSON grammar, and recording
|
|
22
|
+
replacement controls passed on both revisions.
|
|
23
|
+
|
|
24
|
+
| Workload | Wall before → after | CPU before → after | CPU reduction |
|
|
25
|
+
| ------------------------------------------------- | ------------------: | -----------------: | ------------: |
|
|
26
|
+
| Redact 1 MiB prose with embedded credentials | 33.05 → 20.43 | 37.82 → 23.82 | 37.0% |
|
|
27
|
+
| Summarize 20,000 snapshot refs | 8.49 → 1.23 | 12.68 → 2.74 | 78.4% |
|
|
28
|
+
| Project batch metadata with 10,000 discarded rows | 22.10 → 0.14 | 26.73 → 0.18 | 99.3% |
|
|
29
|
+
| Merge 10,000 artifact entries | 591.48 → 3.46 | 609.91 → 6.37 | 99.0% |
|
|
30
|
+
| Project 1,000 small journal records | 47.58 → 13.42 | 101.96 → 27.34 | 73.2% |
|
|
31
|
+
|
|
32
|
+
These are deliberate scaling fixtures, not estimates of every ordinary call.
|
|
33
|
+
For example, batch projection's median transient heap delta fell from 59.24 MiB to
|
|
34
|
+
0.064 MiB, but that delta is not a retained-memory or allocation-total measurement.
|
|
35
|
+
Automatic GC and scheduling still produced wall-time outliers; the record retains
|
|
36
|
+
all samples rather than trimming them.
|
|
37
|
+
|
|
38
|
+
### Actual native browser calls
|
|
39
|
+
|
|
40
|
+
The registered extension tools also ran against real agent-browser **0.38.1** and
|
|
41
|
+
headless Chrome for Testing **151.0.7922.77**, using deterministic loopback pages,
|
|
42
|
+
automatic per-root sessions, two warmups, and 30 measured calls per workload on
|
|
43
|
+
each revision. These source-loaded harness calls include native/browser subprocess
|
|
44
|
+
latency; they do not include Pi's model/provider turn or external-site latency.
|
|
45
|
+
|
|
46
|
+
| Warm native workload | Median wall ms before → after |
|
|
47
|
+
| ---------------------------- | ----------------------------: |
|
|
48
|
+
| Title read with current refs | 156.14 → 127.19 |
|
|
49
|
+
| Selector text read | 188.21 → 158.55 |
|
|
50
|
+
| Interactive snapshot | 229.03 → 211.23 |
|
|
51
|
+
| Two-row native getter batch | 187.07 → 157.04 |
|
|
52
|
+
| One-getter browser code cell | 185.03 → 154.88 |
|
|
53
|
+
|
|
54
|
+
Host noise matters: one snapshot run was slower, 239.08 versus 229.25 ms;
|
|
55
|
+
its other pair improved. These samples do not establish a universal browser
|
|
56
|
+
speedup. Instrumented fake-native controls provide stronger work-count evidence:
|
|
57
|
+
qualifying title/batch calls drop from four subprocesses to three; snapshot and
|
|
58
|
+
eval drop from six to five; ref text/fill drop from five to four. No-ref and
|
|
59
|
+
unrelated explicit-session controls keep their existing three subprocesses.
|
|
60
|
+
Within-revision run medians varied by up to about 40 ms, so differences beyond
|
|
61
|
+
the eliminated subprocess are not causally attributed here.
|
|
62
|
+
|
|
63
|
+
Fifteen fresh import/factory samples on each revision remained below the existing
|
|
64
|
+
250 ms budget: baseline 54.91–57.14 ms, optimized 55.29–58.44 ms. Ranges overlap,
|
|
65
|
+
so no startup improvement is claimed. Both sides included optional search-tool
|
|
66
|
+
registration without a search call. This diagnostic uses the locked development
|
|
67
|
+
SDK snapshot; latest official/fork host qualification is a separate delivery gate.
|
|
68
|
+
|
|
69
|
+
### Additional owner-boundary evidence
|
|
70
|
+
|
|
71
|
+
Independent timeout-artifact checks remove cumulative retry waits: 1,000 missing
|
|
72
|
+
paths took a median 50,700.11 → 59.54 ms, while one path stayed 50.58 → 50.66 ms.
|
|
73
|
+
Across three 1,000-path runs, median process-wide sampled peaks were 19.19 MB
|
|
74
|
+
heapUsed and 89.33 MB RSS, compared with 13.92 MB / 82.30 MB before (1 ms sampling). This exchanges modest linear transient memory for
|
|
75
|
+
overlapping independent timers; it does not infer completed native steps.
|
|
76
|
+
|
|
77
|
+
The distinct-session conversion comparison isolates branch retention: its
|
|
78
|
+
pre-retention converter has the baseline retention logic **with the new tokenizer**,
|
|
79
|
+
not the unchanged baseline commit. At 2,000 identities, median process-wide sampled
|
|
80
|
+
peak heapUsed fell from 96.16 to 31.35 MB (1 ms sampling). At 4,000 identities,
|
|
81
|
+
that pre-retention converter aborted with heap exhaustion (exit 134); the optimized
|
|
82
|
+
converter completed with exact source/checksum checks. Both used `--max-old-space-size=128`; the actual total V8 heap limit was
|
|
83
|
+
335,544,320 bytes, not a 128 MiB process-memory cap.
|
|
84
|
+
The separate integrated compiled >1 GiB proof converted 1,612,280,613 source
|
|
85
|
+
bytes to 1,078,631,285 bytes, verifying 34,683 refs, 100 receipts, three branches,
|
|
86
|
+
and 4,001 distinct sessions. Its actual V8 heap limit was 335,544,320 bytes and
|
|
87
|
+
peak RSS was 375,568 KiB. This correctness proof is separate from the smaller
|
|
88
|
+
scaling comparison.
|
|
89
|
+
|
|
90
|
+
Synthetic macOS discovery fixtures removed 360 unnecessary payload filesystem
|
|
91
|
+
requests (601 → 241), with median CPU 19.86 → 10.27 ms. The strict quality-prefix
|
|
92
|
+
fixture reduced duplicate policy passes from three to one, with median wall time
|
|
93
|
+
6,085.27 → 3,665.97 ms. That is the prefix, not the entire quality workflow. Raw
|
|
94
|
+
owner measurements and their fixture protocols are retained alongside the final
|
|
95
|
+
integrated profiles.
|
|
96
|
+
|
|
97
|
+
## Reproduce the warm-path profile
|
|
98
|
+
|
|
99
|
+
Use the repository's Node and npm versions, install its locked dependencies, and
|
|
100
|
+
build the target first:
|
|
101
|
+
|
|
102
|
+
```sh
|
|
103
|
+
npm ci --ignore-scripts
|
|
104
|
+
npm run build
|
|
105
|
+
npm run performance-profile -- --samples 7 > performance.json
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
The profiler imports compiled production owners and checks independently specified
|
|
109
|
+
outputs. It runs two warmups and records every measured sample for five fixed
|
|
110
|
+
workloads: 1 MiB prose redaction, a 20,000-ref snapshot summary, metadata projection
|
|
111
|
+
of a batch containing 10,000 data rows, a 10,000-entry artifact manifest, and 1,000
|
|
112
|
+
small journal projections. It does not launch a browser, Pi, npm, or a subprocess.
|
|
113
|
+
|
|
114
|
+
To compare revisions, build each in its own worktree and use the **same profiler**
|
|
115
|
+
against both compiled trees. Alternate the order to reduce host-load bias:
|
|
116
|
+
|
|
117
|
+
```sh
|
|
118
|
+
node --expose-gc scripts/profile-performance.mjs --root ../baseline --samples 7 > baseline-a.json
|
|
119
|
+
node --expose-gc scripts/profile-performance.mjs --root . --samples 7 > optimized-a.json
|
|
120
|
+
node --expose-gc scripts/profile-performance.mjs --root . --samples 7 > optimized-b.json
|
|
121
|
+
node --expose-gc scripts/profile-performance.mjs --root ../baseline --samples 7 > baseline-b.json
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Keep Node, fixtures, configuration, and hardware constant. Do not run broad tests
|
|
125
|
+
or builds alongside timing samples. Source, compiled-tree, lockfile, fixture, and
|
|
126
|
+
profiler hashes identify the actual inputs; a package version alone is not a
|
|
127
|
+
revision identifier.
|
|
128
|
+
|
|
129
|
+
Wall time excludes imports, fixture construction, explicit pre-sample GC, and
|
|
130
|
+
output assertions. CPU includes process user and system time during that interval.
|
|
131
|
+
Heap deltas are transient `heapUsed` differences with the output still alive—not
|
|
132
|
+
allocation totals, retained memory, or peaks. RSS is process-wide; the reported
|
|
133
|
+
high-water mark also includes setup. Shared-host load and automatic GC remain
|
|
134
|
+
sources of variation. There are no warm-path timing thresholds.
|
|
135
|
+
|
|
136
|
+
Entrypoint startup has a separate fresh-process profiler and its existing 250 ms
|
|
137
|
+
budget:
|
|
138
|
+
|
|
139
|
+
```sh
|
|
140
|
+
npm run verify -- startup-profile --samples 3
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
That measurement is extension import/factory time, not full Pi startup or browser
|
|
144
|
+
launch time. See [the proof contract](REFERENCE.md#proof-and-verification).
|
|
145
|
+
|
|
146
|
+
## What changed
|
|
147
|
+
|
|
148
|
+
### Results and command planning
|
|
149
|
+
|
|
150
|
+
- Embedded-JSON redaction searches for structured-value openers and copies ordinary
|
|
151
|
+
prose in slices rather than appending every character. Balanced-value parsing,
|
|
152
|
+
malformed-input handling, credential redaction, and unchanged output survive.
|
|
153
|
+
- Snapshot summaries count the existing refs without constructing and sorting a
|
|
154
|
+
complete ref list that the summary never uses.
|
|
155
|
+
- Compact batch metadata excludes `data` and `stdout` before recursive projection
|
|
156
|
+
and redaction. Required metadata, warnings, and exact recovery actions remain;
|
|
157
|
+
full result and replay ownership do not move into the compact observation.
|
|
158
|
+
- Artifact-manifest merging materializes recording candidates only when the entry
|
|
159
|
+
can supersede a recording. Ordinary image entries no longer copy a growing map
|
|
160
|
+
for a check that immediately returns empty. Recording identity and ordering stay
|
|
161
|
+
unchanged.
|
|
162
|
+
- Argv descriptors reuse their already-cleaned command tokens. Launch-flag checks
|
|
163
|
+
discover command position only for the special `wait --state` distinction;
|
|
164
|
+
native boolean and restore flag semantics remain intact.
|
|
165
|
+
|
|
166
|
+
### Journal and artifact storage
|
|
167
|
+
|
|
168
|
+
Journal projection uses the installed streaming parser's raw tokenizer instead of
|
|
169
|
+
building a Node stream pipeline for each record. Live replay applies the same
|
|
170
|
+
native-or-token selection as its metadata scan to retained-size records; larger
|
|
171
|
+
records still use the tokenizer. Both paths validate UTF-8 and complete JSON,
|
|
172
|
+
including discarded values. The streaming path retains its explicit end-of-input
|
|
173
|
+
flush, and the parser is still loaded lazily.
|
|
174
|
+
|
|
175
|
+
Both offline converters retain a branch projection only until its last source
|
|
176
|
+
child consumes it. Linear histories no longer retain every historical state map;
|
|
177
|
+
real forks keep the independent state they need. Conversion still verifies the
|
|
178
|
+
unchanged source and publishes an exclusive separate copy, never rewriting the
|
|
179
|
+
original journal. The large-journal proof includes an individual string above
|
|
180
|
+
Node's string ceiling and 4,000 distinct session identities:
|
|
181
|
+
|
|
182
|
+
```sh
|
|
183
|
+
npm run build
|
|
184
|
+
node --max-old-space-size=128 test/helpers/large-browser-journal.mjs
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
The `128` setting limits V8 old space, not total V8 heap or process RSS. Report
|
|
188
|
+
those separately. See [session storage](SESSION_STORAGE.md#verification).
|
|
189
|
+
|
|
190
|
+
Artifact-retention scans overlap four independent file stats at a time, preserving
|
|
191
|
+
scan order before eviction. This does not change the secure socket-directory
|
|
192
|
+
traversal or its validation/error order.
|
|
193
|
+
|
|
194
|
+
### Browser execution and timeout recovery
|
|
195
|
+
|
|
196
|
+
A daemon observation may be reused only within one locked call, for its exact
|
|
197
|
+
socket/namespace/session identity, before any intervening browser helper. It is
|
|
198
|
+
not a cross-call cache. Replacement and unknown-generation checks remain
|
|
199
|
+
fail-closed; capture still obtains its distinct post-operation generation receipt.
|
|
200
|
+
Calls with no redundant observation keep their existing probes.
|
|
201
|
+
|
|
202
|
+
A call waiting for another Pi process's browser operation no longer starts a
|
|
203
|
+
process-identity query every 10 ms while that holder is confirmed alive. It sleeps
|
|
204
|
+
on the holder's owner-lifetime socket and re-runs normal arbitration when the
|
|
205
|
+
socket closes on release or exit. Unverifiable and still-choosing claims,
|
|
206
|
+
unavailable endpoints (including socket paths over the platform limit) and
|
|
207
|
+
native Windows keep polling. See [execution coordination](ARCHITECTURE.md).
|
|
208
|
+
|
|
209
|
+
Independent timeout-artifact retry windows now overlap. Each declared path still
|
|
210
|
+
gets up to three checks, 25 ms apart; results retain native plan order and page
|
|
211
|
+
inspection starts afterward. A file finishing after **its own** window may remain
|
|
212
|
+
missing. Existing files and recovered URLs remain current-state evidence, never
|
|
213
|
+
proof that a timed-out step executed. See
|
|
214
|
+
[the timeout contract](TOOL_CONTRACT.md#details).
|
|
215
|
+
|
|
216
|
+
### Discovery, verification, and packages
|
|
217
|
+
|
|
218
|
+
macOS Electron discovery stops after a missing framework instead of also probing
|
|
219
|
+
its payload. Positive app verification and discovery order are unchanged.
|
|
220
|
+
|
|
221
|
+
The quality facade runs scope and suppression-policy validation once through
|
|
222
|
+
`lint`, rather than also repeating those checks as standalone steps. The same
|
|
223
|
+
strict checker, compiler, formatting, tests, mutation probes, and document checks
|
|
224
|
+
remain required.
|
|
225
|
+
|
|
226
|
+
The build retains the complete emitted checkout tree. npm selects the bundled
|
|
227
|
+
extension, unchanged permissioned code worker, and standalone helper bundles under
|
|
228
|
+
`dist/packaged/lib/`. Package-only helpers do not overwrite raw checkout modules:
|
|
229
|
+
that would split shared async-local process context and temporary-resource owners.
|
|
230
|
+
Pi peers stay external and host-provided; source installs keep the existing
|
|
231
|
+
`prepare` build. The package consumer checks execute config, offline conversion,
|
|
232
|
+
the permissioned worker, and real Pi SDK/CLI loading without optional host peers
|
|
233
|
+
installed in the consumer.
|
|
234
|
+
|
|
235
|
+
## Preserved boundaries and rejected approaches
|
|
236
|
+
|
|
237
|
+
No cross-call config/secret/DOM cache, pooled JavaScript worker, new recipe layer,
|
|
238
|
+
or weaker validation gate was introduced. Fresh code globals, ordered secrets,
|
|
239
|
+
rate spacing, cancellation, shared locks, live page checks, redaction, and
|
|
240
|
+
branch-visible replay retain their existing owners.
|
|
241
|
+
|
|
242
|
+
Parallel socket-directory traversal was not adopted: candidate traversal and
|
|
243
|
+
native unknown-Dirent fallback behavior did not preserve the baseline's integrity
|
|
244
|
+
and failure-order controls. The original traversal remains. Helper bundles that
|
|
245
|
+
overwrite emitted checkout modules were also rejected and replaced with separate
|
|
246
|
+
package-only outputs. Smaller whitespace-only bundles did not demonstrate a
|
|
247
|
+
startup improvement beyond host noise.
|
|
248
|
+
|
|
249
|
+
These decisions bound the performance claims. Synthetic CPU/scaling improvements
|
|
250
|
+
are not an equivalent speedup for arbitrary browser workflows, external sites,
|
|
251
|
+
model responses, or installation time. Windows qualification remains subject to
|
|
252
|
+
the explicit owner waiver in [release guidance](RELEASE.md#current-0616-rollout-waiver).
|
package/docs/REFERENCE.md
CHANGED
|
@@ -8,7 +8,7 @@ It is for Pi users who want agents to browse sites, inspect pages, click through
|
|
|
8
8
|
|
|
9
9
|
## Pi release qualification
|
|
10
10
|
|
|
11
|
-
CI qualifies the latest stable official Pi and latest maintained fork `main`, resolving their version/commit once per run and retaining SDK/CLI identity evidence. Locked development dependencies are reproducible build snapshots, not qualification targets; runtime peers remain wildcard. `npm run check:compat` checks the installed candidate SDK/CLI identity, typechecks, runs the existing offline tests (including the native Pi pipeline with a controlled provider and fake browser), and tests a packed runtime-only installation through both the SDK and the actual bundled RPC CLI. It does not substitute a fork SDK while leaving official types or child CLI installed.
|
|
11
|
+
CI qualifies the latest stable official Pi and latest maintained fork `main`, resolving their version/commit once per run and retaining SDK/CLI identity evidence. Locked development dependencies are reproducible build snapshots, not qualification targets; runtime peers remain wildcard. The development snapshot overrides Undici to exact 8.12.3 because official Pi 1.0.2 through 1.4.0 pins exact Undici 8.10.2, which has the high/moderate advisories GHSA-xjj6-f33q-929c, GHSA-4qv8-2p9j-2685 and GHSA-f72v-6w45-q472; remove the override once the official development SDK depends on 8.12.2 or later. npm applies root overrides only where this repository is the npm root project: checkouts and Git-source installs, whose build-time development tree resolves 8.12.3. Published npm-package consumers never receive it, the extension does not import Undici at runtime, and qualified official Pi hosts keep their own Undici 8.10.2. `npm run check:compat` checks the installed candidate SDK/CLI identity, typechecks, runs the existing offline tests (including the native Pi pipeline with a controlled provider and fake browser), and tests a packed runtime-only installation through both the SDK and the actual bundled RPC CLI. It does not substitute a fork SDK while leaving official types or child CLI installed.
|
|
12
12
|
|
|
13
13
|
Run in an empty HOME with a **short** TMPDIR outside your real home. Long temporary paths can exceed macOS's 103-byte Unix socket limit; keep the fixture's socket safety checks intact. Native lifecycle controls, live upstream help sampling, lifecycle dogfood, and platform qualification remain the separate gates documented below. A Pi-only compatibility run uses no live browser profiles, credentials, or agent-browser fork, and does not certify those external integrations.
|
|
14
14
|
|
|
@@ -88,7 +88,7 @@ The result is optimized for agent work:
|
|
|
88
88
|
| Page snapshots are too large or viewport-blind | Shows compact, main-content-first summaries, surfaces an `Omitted high-value controls` section (plus `details.data.highValueControlRefIds`) when dense pages or desktop host screens hide editables, named surfaces/tabs, primary action buttons, and high-signal named links such as repository results from the trimmed ref lists, supports wrapper-side `snapshot -i --search <text>` / `--filter role=<role>` to trim dense pages while preserving full `details.refSnapshot`, supports `snapshot --viewport` for scroll/viewport metadata, supports `snapshot --diff` for quick ref-map deltas versus the prior tracked snapshot, and stores full redacted output in spill files when needed | `extensions/agent-browser/lib/results/snapshot.ts`, `extensions/agent-browser/lib/orchestration/browser-run/prepare.ts`, `test/agent-browser.presentation.test.ts`, `test/agent-browser.extension-validation.test.ts` |
|
|
89
89
|
| Screenshots/downloads get lost in text | Normalizes artifact paths, creates missing parent directories, leaves click/download execution to native download, and reports existence, size, cwd, session, and repair status | [`docs/COMMAND_REFERENCE.md`](COMMAND_REFERENCE.md#download-screenshot-and-pdf-files) |
|
|
90
90
|
| Profile restores and tab drift confuse agents | Tracks managed sessions, keeps every upstream helper probe on the same idle-timeout launch configuration so the background browser is not restarted between a snapshot and action, retains native CDP target IDs so same-address tabs remain distinct after resume, re-selects target tabs after observed drift, live-verifies the active target and refreshes its title after successful tab selection or `tab close` (while retaining new blank tabs, deliberate `about:blank` selections, and post-close blank targets, including batch transitions), rehydrates branch-backed session state on Pi session-tree changes, and pins later commands only for sessions with drift/restored-session risk | generated tab-recovery notes below; `test/agent-browser.extension-tab-recovery.test.ts` (drift and about:blank recovery), `test/agent-browser.extension-tabs.test.ts` (post-close target), `test/agent-browser.extension-ref-guards.test.ts` (snapshot/action environment and session-tree rehydration), `test/agent-browser.resume-state-branch-replay.test.ts` (tab targets / branch replay), `test/agent-browser.resume-state-managed-lifecycle.test.ts` (persisted managed ownership), `test/agent-browser.resume-state-launch-policy.test.ts` (resumed launch configuration) |
|
|
91
|
-
| Auth/profile workflows can leak secrets | Supports `auth save --password-stdin`, redacts sensitive args, SAML/OAuth-bearing URLs, stdout/stderr, details, and snapshot spills, and discards malformed oversized stdout instead of persisting a parse-failure spill | `test/agent-browser.extension-security-redaction.test.ts`
|
|
91
|
+
| Auth/profile workflows can leak secrets | Supports `auth save --password-stdin`, redacts sensitive args, SAML/OAuth-bearing URLs, stdout/stderr, details, and snapshot spills, and discards malformed oversized stdout instead of persisting a parse-failure spill | `test/agent-browser.extension-security-redaction.test.ts`, `test/agent-browser.extension-artifacts-fallbacks.test.ts` |
|
|
92
92
|
| Stateful cookies/storage/auth output bloats or leaks context | Presentation layer redacts `details.data` for cookies and credential-like storage values while keeping low-risk local QA values such as `theme: dark` readable; recursively scrubs other structured upstream JSON (network, diff, trace/profiler, stream, dashboard, chat, auth, dialog, frame, state, and similar) using sensitive key names plus string heuristics; masks sensitive argv flags and positionals, including raw batch rows and ordered code journals; scrubs secrets from failed batch step errors; and exposes a compact redacted `batch` matrix on top-level `details.data` | `extensions/agent-browser/lib/results/presentation.ts`, `extensions/agent-browser/lib/results/presentation/diagnostics.ts`, `extensions/agent-browser/lib/runtime.ts`, `test/agent-browser.presentation-diagnostics.test.ts` |
|
|
93
93
|
| Stale `@eN` refs fail mysteriously | Defines full per-session refs once in the native journal, exposes them on dedicated captures, rejects mismatched URLs / unknown refs / unsafe `batch` stdin ordering before spawn, adds recovery guidance to rerun `snapshot -i` or use stable `find` locators | `extensions/agent-browser/index.ts`, `extensions/agent-browser/lib/session-page-state.ts`, `test/agent-browser.session-page-state.test.ts`, `test/agent-browser.results.test.ts`, `test/agent-browser.extension-ref-guards.test.ts`, `test/agent-browser.extension-semantic-recovery.test.ts` |
|
|
94
94
|
| Agents need stable success/failure buckets | Exposes bounded `resultCategory`, `successCategory`, and `failureCategory` on tool `details` for branching without parsing prose; final results return native `isError` and a visible prose failure notice while preserving parseable caller-requested `--json` output. Native structured results expose the same bounded, redacted observations, not internal replay metadata | [`docs/TOOL_CONTRACT.md`](TOOL_CONTRACT.md#details), `extensions/agent-browser/lib/results/categories.ts`, `extensions/agent-browser/index.ts`, `extensions/agent-browser/lib/pi-tool-rendering.ts`, `test/agent-browser.results.test.ts`, `test/agent-browser.extension-validation.test.ts`, `test/agent-browser.pi-pipeline.test.ts` |
|
|
@@ -96,7 +96,7 @@ The result is optimized for agent work:
|
|
|
96
96
|
| Dashboard scroll commands can look successful while nothing moves | Handles standard `scroll <dir> [px]` against the document first (including pages whose smooth-scroll CSS defeats upstream wheel timing), falls back upstream when the document cannot move, and samples viewport/containers around the fallback; explicit CSS-container scrolling uses instant movement so smooth-scroll CSS cannot cause a premature no-movement failure; unchanged positions fail as `upstream-error` with `details.scrollNoop`, visible recovery guidance, and exact snapshot/screenshot checks. Unsupported `scrollintoview text=...` fails before dispatch, including inside effective batch rows, and shows exact native `find text ... hover` and snapshot/ref recovery payloads; help remains native pass-through. | [`docs/TOOL_CONTRACT.md`](TOOL_CONTRACT.md#details), [`docs/COMMAND_REFERENCE.md`](COMMAND_REFERENCE.md#core-page-and-element-commands), `test/agent-browser.extension-validation.test.ts` |
|
|
97
97
|
| Dropdown/combobox clicks can focus or hit native option box-model errors | Adds first-class `select <selector> <value...>` paths through native `args` and `agent_browser_action`; semantic role/name or label select resolves exactly one current visible combobox/listbox ref before action. Custom combobox clicks still detect focused controls with explicit `aria-expanded` state but no visible options and return `details.comboboxFocus` plus exact recovery `nextActions` | [`docs/TOOL_CONTRACT.md`](TOOL_CONTRACT.md#details), [`docs/COMMAND_REFERENCE.md`](COMMAND_REFERENCE.md#core-page-and-element-commands), `extensions/agent-browser/lib/input-modes/semantic-action.ts`, `test/agent-browser.extension-input-modes.test.ts`, `test/agent-browser.extension-validation.test.ts` |
|
|
98
98
|
| Recording workflows fail late when `ffmpeg` is missing or report stale lifecycle state | After successful `record start` / `record restart`, reports `successCategory: "artifact-pending"`, returns an exact `stop-pending-recording` action, warns when older natives report pending output without `ffmpeg`, and conservatively invalidates prior page-scoped `@e…` refs on every executed start attempt and URL-bearing restart to protect older supported natives. This is not evidence of a page change: 0.37 records the active page unless a URL is supplied; FPS-only calls keep the intended tab; an unbounded transcript-backed namespace/session index reserves active destinations across aliases, serializes artifact lifecycle and explicit wait/output writes, persists cross-branch close tombstones, retires every successful close path (including every matching namespace owner for `close --all`), rejects missing/stale restart output, coalesces terminal batch state, keeps only the newest pending path per identity, rejects recording starts after a nested close, folds Unicode path aliases, and retains exact cleanup actions with visible guidance on any later same-session failure | [`docs/TOOL_CONTRACT.md`](TOOL_CONTRACT.md#details), [`docs/COMMAND_REFERENCE.md`](COMMAND_REFERENCE.md#diff-debug-and-streaming), `test/agent-browser.extension-validation.test.ts`, `test/agent-browser.presentation-artifacts-batch.test.ts` |
|
|
99
|
-
| Upstream CLI drift can silently invalidate wrapper behavior | Publishes a repo-readable command reference, verifies it against the recommended 0.
|
|
99
|
+
| Upstream CLI drift can silently invalidate wrapper behavior | Publishes a repo-readable command reference, verifies it against the recommended 0.41.0 target, and probes browser-backed calls once per cwd/PATH so stable versions below the 0.35.0 floor fail before browser launch with installed/expected version evidence | `npm run verify` |
|
|
100
100
|
| Pages can expose structured workflows through experimental WebMCP | Shows native positive WebMCP availability in navigation summaries and passes through `webmcp list`, `invoke`, detached `result` / `cancel`, params/frame/timeout options, and the bundled `webmcp-gen` skill; treats `--no-webmcp` as launch-scoped, keeps pending or unsuccessfully settled targets unverified with an actionable `get url` follow-up, invalidates stale refs after page tools run, and budgets effective raw or stdin batch timeouts | [`docs/COMMAND_REFERENCE.md`](COMMAND_REFERENCE.md#webmcp-page-tools), `test/agent-browser.extension-ref-guards.test.ts`, `test/agent-browser.wait-timeouts.test.ts`, `test/agent-browser.real-upstream-contract.test.ts` |
|
|
101
101
|
| Desktop Electron apps need discovery, CDP attach, and safe teardown | `agent_browser_electron` runs host `list` / isolated `launch` (temp profile, OS-chosen debug port) / `status` / `probe` / `cleanup`, merges `launchId` plus managed `sessionName`, supports `handoff` `snapshot` / `tabs` / `connect`, and surfaces mismatch and post-command health guidance; wrapper cleanup applies only to launches it created | `extensions/agent-browser/lib/electron/discovery.ts`, `launch.ts`, `cleanup.ts`, [`docs/TOOL_CONTRACT.md`](TOOL_CONTRACT.md#agent_browser_electron), [`docs/COMMAND_REFERENCE.md`](COMMAND_REFERENCE.md#electron-desktop-apps) |
|
|
102
102
|
| Agents need bundled `skills` text and local setup/status commands without touching the live session | Treats `skills list/get/path`, local auth/profile/setup commands, `session list`, and local state lifecycle commands as sessionless reads/actions when upstream does not need a live page. Session/state rows and targets remain visible, and supported upstream state/config/path operations pass through unchanged. Browser-backed workflows still receive an implicit session only when the caller did not choose one. | [`docs/COMMAND_REFERENCE.md`](COMMAND_REFERENCE.md#built-in-skills), `extensions/agent-browser/lib/command-policy.ts`, `extensions/agent-browser/lib/runtime.ts` |
|
|
@@ -119,9 +119,9 @@ Optional external tools unlock the full command surface:
|
|
|
119
119
|
| `agent-browser` | All browser automation through this extension | See upstream install docs |
|
|
120
120
|
| `ffmpeg` | Recording WebM (libvpx) or MP4 (libx264); install before `record start` / `record restart` | `brew install ffmpeg` or `brew install ffmpeg-full` |
|
|
121
121
|
|
|
122
|
-
Keep both binaries on `PATH`. This package recommends `agent-browser 0.
|
|
122
|
+
Keep both binaries on `PATH`. This package recommends `agent-browser 0.41.0` and accepts stable versions at or above the 0.35.0 floor; browser-backed calls fail fast below that floor while local inspection/setup commands remain available for diagnosis. Native 0.37 validates `ffmpeg`, the output extension and FPS before recording; older supported natives may defer failures until stop. Use `record start <path.webm|path.mp4> [url] [--fps <n>]` (1–60 fps, default 30), then verify the completed file after `record stop`. Native `doctor` checks the recording dependency and encoders.
|
|
123
123
|
|
|
124
|
-
On 0.38
|
|
124
|
+
On 0.38+, use `snapshot --delta` for native full/unchanged/changed revisions and `snapshot --delta --full` to reset its baseline. Surviving DOM nodes keep their refs, but navigation/replaced nodes still require fresh refs. The wrapper preserves native revisions and refreshes complete refs internally for partial results. `screenshot --if-changed` (or `--threshold 0.01`) skips unchanged images without creating an artifact. `--input-mode instant|smooth|human` controls native session pointer movement; `click ... --human`, `drag ... --human`, and timed `mouse move` remain ordinary `args`. Recordings accept `--cursor` and `--contact-sheet`; the latter produces a timestamped PNG verified after stop. `auth login <name> --no-navigate` fills a prepared login page after upstream checks its origin. See the [command reference](COMMAND_REFERENCE.md#upstream-0381-rebaseline) for examples and limits.
|
|
125
125
|
|
|
126
126
|
### Android / Termux
|
|
127
127
|
|
|
@@ -203,7 +203,7 @@ npm run doctor
|
|
|
203
203
|
The doctor checks:
|
|
204
204
|
|
|
205
205
|
- upstream `agent-browser` exists on `PATH`
|
|
206
|
-
- the installed upstream is a stable version at or above the supported 0.35.0 floor; 0.
|
|
206
|
+
- the installed upstream is a stable version at or above the supported 0.35.0 floor; 0.41.0 remains the recommended baseline
|
|
207
207
|
- `pi --version` meets the minimum Pi runtime floor for this release; older Pi versions are setup failures
|
|
208
208
|
- Pi settings do not point at multiple active `pi-agent-browser-native` sources
|
|
209
209
|
|
|
@@ -554,7 +554,7 @@ Ordinary native config discovery stays at the project or current managed browser
|
|
|
554
554
|
|
|
555
555
|
### Shared browser defaults
|
|
556
556
|
|
|
557
|
-
Ordinary browser calls use one native named browser per **root Pi session**. A parent and its subagents share that browser; unrelated roots get different names and can browse concurrently. `pi-subagents`
|
|
557
|
+
Ordinary browser calls use one native named browser per **root Pi session**. A parent and its subagents share that browser; unrelated roots get different names and can browse concurrently. Current `pi-subagents` launches each child with equal `PI_INTERCOM_ROOT_SESSION_ID` and `PI_INTERCOM_PARENT_SESSION_ID` values naming its main session, including fresh and forked delegated runs; older releases supplied `PI_SUBAGENT_CHILD` with `PI_SUBAGENT_ROOT_SESSION_ID`, which remains supported. Ordinary Pi new/fork/clone sessions get their own root identity; resuming the same root or changing its cwd keeps its browser name.
|
|
558
558
|
|
|
559
559
|
Cooperating updated Pi processes share a cross-process lock keyed by the actual socket context, canonical namespace, and session. It covers a direct call's helpers and action, or an entire code call; different identities can run independently. Coordinate navigation across separate tool calls with existing subagent/intercom tools. This is ordering, not rollback or protection against human navigation, external CLI clients, or older extension versions. Parent or child exit does not close the group browser. Native idle policy applies; explicitly close only your group's browser when the group is finished.
|
|
560
560
|
|
|
@@ -709,7 +709,7 @@ The opt-in real-upstream suite is separate because it drives a real browser inst
|
|
|
709
709
|
npm run verify -- real-upstream
|
|
710
710
|
```
|
|
711
711
|
|
|
712
|
-
That mode sets `PI_AGENT_BROWSER_REAL_UPSTREAM=1` and runs `test/agent-browser.real-upstream-contract.test.ts` against the real `agent-browser` on `PATH` (the stable version must meet the 0.35.0 floor; current command-reference validation targets the recommended 0.
|
|
712
|
+
That mode sets `PI_AGENT_BROWSER_REAL_UPSTREAM=1` and runs `test/agent-browser.real-upstream-contract.test.ts` against the real `agent-browser` on `PATH` (the stable version must meet the 0.35.0 floor; current command-reference validation targets the recommended 0.41.0 capability baseline), selecting the sessionless plugin probe separately and then all remaining declarations, including explicit native text. It also runs `test/agent-browser.batch-fidelity.test.ts` and `test/agent-browser.overlay-real-upstream.test.ts` with the same opt-in environment. It covers inspection, skills, experimental WebMCP list/invoke/result/cancel plus `--no-webmcp`, and a broad core interaction and navigation matrix on localhost fixtures (including off-viewport click, frame-scoped selector/wait/click behavior, form command fixes, `batch` stdin, and `pushstate`), plus `vitals`, network route/requests/HAR, diff snapshot/screenshot/url, trace/profiler, console/errors/highlight, stream enable/status/disable, `cookies set --curl`, a `react tree` missing-renderer path, and `wait --download` with the on-disk caveat documented in release notes. The harness uses a throwaway temp `HOME` and dedicated socket/screenshot directories so the run does not touch your normal browser profile paths. Browser-opening or credential-dependent families such as `inspect`, `dashboard`, `chat`, provider clouds, and OS clipboard flows stay in fake-upstream or manual validation unless a safe deterministic fixture is added. For prerequisites, isolation details, and troubleshooting, see [`docs/RELEASE.md`](RELEASE.md#real-upstream-contract-validation).
|
|
713
713
|
|
|
714
714
|
A deterministic host-only live-browser wrapper smoke is available without an LLM choosing tool calls:
|
|
715
715
|
|
|
@@ -729,7 +729,7 @@ npm run smoke:platform:doctor
|
|
|
729
729
|
npm run verify -- release
|
|
730
730
|
```
|
|
731
731
|
|
|
732
|
-
`npm run verify -- release` includes the default verification gate, packaged Pi smoke coverage, and the release-blocking Crabbox platform matrix (the same matrix `npm run smoke:platform:all` runs standalone). For the full maintainer release flow, follow [`docs/RELEASE.md`](RELEASE.md). The package also has a `prepublishOnly` hook that runs the same release gate and `npm pack --dry-run` during `npm publish`.
|
|
732
|
+
`npm run verify -- release` includes the default verification gate, the configured-source lifecycle harness, packaged Pi smoke coverage, and the release-blocking Crabbox platform matrix (the same matrix `npm run smoke:platform:all` runs standalone). For the full maintainer release flow, follow [`docs/RELEASE.md`](RELEASE.md). The package also has a `prepublishOnly` hook that runs the same release gate and `npm pack --dry-run` during `npm publish`.
|
|
733
733
|
|
|
734
734
|
## How it works
|
|
735
735
|
|
|
@@ -742,12 +742,12 @@ npm run verify -- release
|
|
|
742
742
|
5. Screenshots, downloads, recordings, traces, profiles, and spill files are normalized as Pi-visible artifacts where possible.
|
|
743
743
|
6. Generated playbook text in docs and browser instructions stays aligned with `extensions/agent-browser/lib/playbook.ts`.
|
|
744
744
|
|
|
745
|
-
The upstream browser engine remains [`agent-browser`](https://agent-browser.dev/). This package does not bundle it. The recommended baseline is 0.
|
|
745
|
+
The upstream browser engine remains [`agent-browser`](https://agent-browser.dev/). This package does not bundle it. The recommended baseline is 0.41.0 and the stable runtime floor is 0.35.0; newer stable versions are accepted without version-specific compatibility shims.
|
|
746
746
|
|
|
747
747
|
## Current limits
|
|
748
748
|
|
|
749
749
|
- Published pre-1.0 package.
|
|
750
|
-
- Recommends upstream `agent-browser` 0.
|
|
750
|
+
- Recommends upstream `agent-browser` 0.41.0 and accepts stable runtimes at or above 0.35.0.
|
|
751
751
|
- Does not bundle `agent-browser`; users install it separately.
|
|
752
752
|
- Does not provide a human browser UI inside Pi; the primary UX is agent-invoked tool calls. `--headed` asks upstream to show a browser window, but the wrapper cannot yet prove that the window is visible on the user's desktop.
|
|
753
753
|
- Localhost means the browser host's loopback, not necessarily the shell/Pi host. If `http://localhost:<port>` or `http://127.0.0.1:<port>` fails with errors such as `ERR_EMPTY_RESPONSE`, use an environment-specific host-reachable HTTP(S) address. A `file://` fixture is supported when upstream browser launch settings allow it; use HTTP(S) only when the browser environment cannot reach the local file.
|
|
@@ -757,11 +757,11 @@ The upstream browser engine remains [`agent-browser`](https://agent-browser.dev/
|
|
|
757
757
|
|
|
758
758
|
## Automatic npm releases (maintainers)
|
|
759
759
|
|
|
760
|
-
|
|
760
|
+
The [shared release procedure](https://github.com/fitchmultz/.github#automatic-npm-releases) creates a reviewed patch-version PR after changes merge to `main`, then publishes the same version on npm and GitHub using the exact qualified candidate tarball.
|
|
761
761
|
|
|
762
|
-
|
|
762
|
+
Check the final source and candidate against [the existing release gates](RELEASE.md#pre-release-checks), including required lifecycle/live-site evidence and artifact checks. Complete enabled reviews and resolve their findings. Apply the documented Windows waiver without claiming a Windows or full composed-gate pass. Workflow validation is not evidence that publication completed on either service.
|
|
763
763
|
|
|
764
|
-
|
|
764
|
+
Set repository variable `NPM_RELEASE_ENABLED` to anything other than `true` to stop new version and release plans; cancel pending runs separately when needed. Follow the shared procedure to retry an unpublished candidate.
|
|
765
765
|
|
|
766
766
|
## Local development
|
|
767
767
|
|
|
@@ -789,7 +789,7 @@ Configured-source lifecycle validation:
|
|
|
789
789
|
npm run verify -- lifecycle
|
|
790
790
|
```
|
|
791
791
|
|
|
792
|
-
The harness defaults to Pi model `zai/glm-5.2` and **180000 ms** per-step tmux waits; pass `--model <id>` and/or `--timeout-ms <ms>` after `lifecycle` when you need different settings (see [Configured-source lifecycle validation](RELEASE.md#configured-source-lifecycle-validation) in `docs/RELEASE.md`). It launches the supported Pi runtime with `--approve` and a deterministic `--session-id`, drives `/reload`, closes Pi, relaunches the exact same session, asserts the JSONL header id, and checks managed-session continuity, compiled-entrypoint pickup after process restart, persisted spill reachability, and native returned failure status and JSON preservation.
|
|
792
|
+
The harness defaults to Pi model `zai/glm-5.2` and **180000 ms** per-step tmux waits; pass `--model <id>` and/or `--timeout-ms <ms>` after `lifecycle` (or after `release`, which forwards them only to its lifecycle step) when you need different settings (see [Configured-source lifecycle validation](RELEASE.md#configured-source-lifecycle-validation) in `docs/RELEASE.md`). It launches the supported Pi runtime with `--approve` and a deterministic `--session-id`, drives `/reload`, closes Pi, relaunches the exact same session, asserts the JSONL header id, and checks managed-session continuity, compiled-entrypoint pickup after process restart, persisted spill reachability, and native returned failure status and JSON preservation.
|
|
793
793
|
|
|
794
794
|
Use lifecycle validation when testing `/reload`, exact-session relaunch, `/resume`, managed-session continuity, or persisted artifact behavior. Branch-backed state and `session_tree` cleanup ownership are covered by focused extension harness tests. Maintainers must run the lifecycle harness before every publish; see [Pre-release checks](RELEASE.md#pre-release-checks).
|
|
795
795
|
|