pi-agent-browser-native 0.9.8 → 0.9.10
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 +30 -0
- package/README.md +1 -1
- package/dist/extensions/agent-browser/index.js +19 -12
- package/dist/packaged/lib/browser-session-conversion.js +1 -0
- package/dist/packaged/lib/playbook.js +1 -0
- package/dist/packaged/lib/results/snapshot.js +1 -0
- package/dist/packaged/lib/runtime.js +9 -2
- package/docs/ARCHITECTURE.md +7 -7
- package/docs/COMMAND_REFERENCE.md +16 -10
- package/docs/REFERENCE.md +39 -18
- package/docs/RELEASE.md +9 -9
- package/docs/REQUIREMENTS.md +3 -3
- package/docs/SESSION_STORAGE.md +1 -1
- package/docs/SUPPORT_MATRIX.md +25 -24
- package/docs/TOOL_CONTRACT.md +4 -4
- package/docs/platform-smoke.md +1 -1
- package/package.json +4 -7
- package/scripts/agent-browser-target.mjs +1 -1
- package/scripts/capability-samples.mjs +4 -3
- package/scripts/doctor.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.9.10 - 2026-11-02
|
|
6
|
+
|
|
7
|
+
<!-- npm-release:unreleased:start -->
|
|
8
|
+
<!-- npm-release:unreleased:end -->
|
|
9
|
+
|
|
10
|
+
- Raise the Pi floor to 1.5.0 (#347) ([5685a6d](https://github.com/fitchmultz/pi-agent-browser-native/commit/5685a6d53d0d6447d222f7e8210991234bde0071))
|
|
11
|
+
|
|
12
|
+
### What's Changed
|
|
13
|
+
|
|
14
|
+
- Raise the Pi floor to 1.5.0 by @fitchmultz in https://github.com/fitchmultz/pi-agent-browser-native/pull/347
|
|
15
|
+
|
|
16
|
+
**Full Changelog**: https://github.com/fitchmultz/pi-agent-browser-native/compare/v0.9.9...v0.9.10
|
|
17
|
+
|
|
18
|
+
## 0.9.9 - 2026-11-02
|
|
19
|
+
|
|
20
|
+
<!-- npm-release:unreleased:start -->
|
|
21
|
+
|
|
22
|
+
- Document a pinned Android-native source build for Termux instead of the Linux-musl executable, preserving the existing managed launcher and full dashboard.
|
|
23
|
+
- Recommend separately installed `agent-browser` 0.41.1 without raising the stable 0.35.0 runtime floor. Preserve and redact the pinned Android source's CDP transport-header argument.
|
|
24
|
+
|
|
25
|
+
<!-- npm-release:unreleased:end -->
|
|
26
|
+
|
|
27
|
+
- Correct Android browser installation (2/2) (#345) ([89ba3c6](https://github.com/fitchmultz/pi-agent-browser-native/commit/89ba3c6758ef3403476031d84b7fb069f821d04d))
|
|
28
|
+
|
|
29
|
+
### What's Changed
|
|
30
|
+
|
|
31
|
+
- Correct Android browser installation (2/2) by @fitchmultz in https://github.com/fitchmultz/pi-agent-browser-native/pull/345
|
|
32
|
+
|
|
33
|
+
**Full Changelog**: https://github.com/fitchmultz/pi-agent-browser-native/compare/v0.9.8...v0.9.9
|
|
34
|
+
|
|
5
35
|
## 0.9.8 - 2026-11-01
|
|
6
36
|
|
|
7
37
|
<!-- npm-release:unreleased:start -->
|
package/README.md
CHANGED
|
@@ -70,7 +70,7 @@ Shared root browsers survive Pi exit. Ask Pi to close your group's browser when
|
|
|
70
70
|
|
|
71
71
|
Profile access exposes private page content to the model. That content can persist in transcripts and saved files. Use temporary profiles for tests.
|
|
72
72
|
|
|
73
|
-
Credential-like values are redacted, but ordinary page text stays visible. Verify the signed-in page after you select a profile or restore browser state.
|
|
73
|
+
Credential-like values, including CDP transport headers on the [pinned Android build](docs/REFERENCE.md#android--termux), are redacted, but ordinary page text stays visible. Verify the signed-in page after you select a profile or restore browser state.
|
|
74
74
|
|
|
75
75
|
Native `batch --omit-command` keeps indexed results without echoed commands. Cookie/storage redaction, ordered close/reopen effects, snapshot refs, and artifact verification still apply, including when empty stdin rows are skipped.
|
|
76
76
|
|
|
@@ -746,6 +746,7 @@ var init_argv_grammar = __esm({
|
|
|
746
746
|
"--session",
|
|
747
747
|
"--namespace",
|
|
748
748
|
"--cdp",
|
|
749
|
+
"--cdp-headers",
|
|
749
750
|
"--config",
|
|
750
751
|
"--profile",
|
|
751
752
|
"--session-name",
|
|
@@ -1773,7 +1774,13 @@ var init_runtime_redaction = __esm({
|
|
|
1773
1774
|
init_redaction_fields();
|
|
1774
1775
|
init_redaction_json();
|
|
1775
1776
|
init_redaction_url();
|
|
1776
|
-
SENSITIVE_VALUE_FLAGS = /* @__PURE__ */ new Set([
|
|
1777
|
+
SENSITIVE_VALUE_FLAGS = /* @__PURE__ */ new Set([
|
|
1778
|
+
"--body",
|
|
1779
|
+
"--cdp-headers",
|
|
1780
|
+
"--headers",
|
|
1781
|
+
"--password",
|
|
1782
|
+
"--proxy"
|
|
1783
|
+
]);
|
|
1777
1784
|
}
|
|
1778
1785
|
});
|
|
1779
1786
|
|
|
@@ -5743,7 +5750,7 @@ var TARGET_AGENT_BROWSER_VERSION, TARGET_AGENT_BROWSER_VERSION_LABEL, MINIMUM_AG
|
|
|
5743
5750
|
var init_agent_browser_target = __esm({
|
|
5744
5751
|
"dist/scripts/agent-browser-target.mjs"() {
|
|
5745
5752
|
"use strict";
|
|
5746
|
-
TARGET_AGENT_BROWSER_VERSION = "0.41.
|
|
5753
|
+
TARGET_AGENT_BROWSER_VERSION = "0.41.1";
|
|
5747
5754
|
TARGET_AGENT_BROWSER_VERSION_LABEL = `agent-browser ${TARGET_AGENT_BROWSER_VERSION}`;
|
|
5748
5755
|
MINIMUM_AGENT_BROWSER_VERSION = "0.35.0";
|
|
5749
5756
|
MINIMUM_AGENT_BROWSER_VERSION_LABEL = `agent-browser ${MINIMUM_AGENT_BROWSER_VERSION}`;
|
|
@@ -35182,7 +35189,7 @@ function getLatestUserMessage(manager) {
|
|
|
35182
35189
|
import { Text as Text2 } from "@earendil-works/pi-tui";
|
|
35183
35190
|
|
|
35184
35191
|
// dist/extensions/agent-browser/lib/pi-tool-rendering.js
|
|
35185
|
-
import {
|
|
35192
|
+
import { Text, truncateToWidth } from "@earendil-works/pi-tui";
|
|
35186
35193
|
|
|
35187
35194
|
// dist/extensions/agent-browser/lib/input-modes/electron.js
|
|
35188
35195
|
init_parsing();
|
|
@@ -35465,12 +35472,9 @@ function colorizeToolOutputLines(outputText, theme, isError) {
|
|
|
35465
35472
|
return isError ? theme.fg("error", line) : theme.fg("toolOutput", line);
|
|
35466
35473
|
});
|
|
35467
35474
|
}
|
|
35468
|
-
function
|
|
35469
|
-
const
|
|
35470
|
-
|
|
35471
|
-
}
|
|
35472
|
-
function formatVisualTruncationNotice(remainingLines, totalLines, theme, width) {
|
|
35473
|
-
const notice = `${theme.fg("muted", `... (${remainingLines} more lines, ${totalLines} total, `)}${formatExpandHint(theme)}${theme.fg("muted", ")")}`;
|
|
35475
|
+
function formatVisualTruncationNotice(hidden, expandKey, theme, width) {
|
|
35476
|
+
const expandHint = `${theme.fg("dim", expandKey)} ${theme.fg("muted", "to expand")}`;
|
|
35477
|
+
const notice = `${theme.fg("muted", `... (${hidden.remainingLines} more lines, ${hidden.totalLines} total, `)}${expandHint}${theme.fg("muted", ")")}`;
|
|
35474
35478
|
return truncateToWidth(notice, Math.max(0, width));
|
|
35475
35479
|
}
|
|
35476
35480
|
function compiledArgs(result) {
|
|
@@ -35640,11 +35644,14 @@ function finalizeAgentBrowserFailure(result, input) {
|
|
|
35640
35644
|
}
|
|
35641
35645
|
var AgentBrowserResultComponent = class {
|
|
35642
35646
|
expanded = false;
|
|
35647
|
+
expandKey = "";
|
|
35643
35648
|
theme;
|
|
35644
35649
|
text = new Text("", 0, 0);
|
|
35645
35650
|
value;
|
|
35646
35651
|
formatKey;
|
|
35647
|
-
setResult(result, options, theme,
|
|
35652
|
+
setResult(result, options, theme, context2) {
|
|
35653
|
+
const { isError } = context2;
|
|
35654
|
+
this.expandKey = context2.keyText("app.tools.expand");
|
|
35648
35655
|
const details = isRecord(result.details) ? result.details : void 0;
|
|
35649
35656
|
const key = [
|
|
35650
35657
|
getPrimaryTextContent(result),
|
|
@@ -35686,7 +35693,7 @@ var AgentBrowserResultComponent = class {
|
|
|
35686
35693
|
const hiddenLineCount = lines.length - TUI_COLLAPSED_OUTPUT_MAX_LINES;
|
|
35687
35694
|
return [
|
|
35688
35695
|
...lines.slice(0, TUI_COLLAPSED_OUTPUT_MAX_LINES),
|
|
35689
|
-
formatVisualTruncationNotice(hiddenLineCount, lines.length, theme, width)
|
|
35696
|
+
formatVisualTruncationNotice({ remainingLines: hiddenLineCount, totalLines: lines.length }, this.expandKey, theme, width)
|
|
35690
35697
|
];
|
|
35691
35698
|
}
|
|
35692
35699
|
invalidate() {
|
|
@@ -44681,7 +44688,7 @@ function executeCode(runtime, invocation) {
|
|
|
44681
44688
|
function registerBrowserTools(runtime) {
|
|
44682
44689
|
const renderResult = (result, options, theme, context2) => {
|
|
44683
44690
|
const component = context2.lastComponent instanceof AgentBrowserResultComponent ? context2.lastComponent : new AgentBrowserResultComponent();
|
|
44684
|
-
component.setResult(result, options, theme, context2
|
|
44691
|
+
component.setResult(result, options, theme, context2);
|
|
44685
44692
|
return component;
|
|
44686
44693
|
};
|
|
44687
44694
|
const renderers = {
|
|
@@ -394,6 +394,7 @@ var GLOBAL_VALUE_FLAGS = [
|
|
|
394
394
|
"--session",
|
|
395
395
|
"--namespace",
|
|
396
396
|
"--cdp",
|
|
397
|
+
"--cdp-headers",
|
|
397
398
|
"--config",
|
|
398
399
|
"--profile",
|
|
399
400
|
"--session-name",
|
|
@@ -1341,7 +1342,7 @@ function getAgentBrowserProcessEnvironment(baseEnv = process.env) {
|
|
|
1341
1342
|
}
|
|
1342
1343
|
|
|
1343
1344
|
// dist/scripts/agent-browser-target.mjs
|
|
1344
|
-
var TARGET_AGENT_BROWSER_VERSION = "0.41.
|
|
1345
|
+
var TARGET_AGENT_BROWSER_VERSION = "0.41.1";
|
|
1345
1346
|
var TARGET_AGENT_BROWSER_VERSION_LABEL = `agent-browser ${TARGET_AGENT_BROWSER_VERSION}`;
|
|
1346
1347
|
var MINIMUM_AGENT_BROWSER_VERSION = "0.35.0";
|
|
1347
1348
|
var MINIMUM_AGENT_BROWSER_VERSION_LABEL = `agent-browser ${MINIMUM_AGENT_BROWSER_VERSION}`;
|
|
@@ -1941,7 +1942,13 @@ function redactLooseUrls(text2) {
|
|
|
1941
1942
|
}
|
|
1942
1943
|
|
|
1943
1944
|
// dist/extensions/agent-browser/lib/runtime-redaction.js
|
|
1944
|
-
var SENSITIVE_VALUE_FLAGS = /* @__PURE__ */ new Set([
|
|
1945
|
+
var SENSITIVE_VALUE_FLAGS = /* @__PURE__ */ new Set([
|
|
1946
|
+
"--body",
|
|
1947
|
+
"--cdp-headers",
|
|
1948
|
+
"--headers",
|
|
1949
|
+
"--password",
|
|
1950
|
+
"--proxy"
|
|
1951
|
+
]);
|
|
1945
1952
|
function redactSensitiveText(text2) {
|
|
1946
1953
|
const serialized = redactSerializedJson(text2, redactSensitiveText);
|
|
1947
1954
|
if (serialized !== void 0) {
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -12,7 +12,7 @@ Related docs:
|
|
|
12
12
|
|
|
13
13
|
Build this as a **thin `pi` extension/package** that exposes native commands and persistent-browser code while keeping upstream `agent-browser` as the source of truth.
|
|
14
14
|
|
|
15
|
-
The recommended separately installed native is 0.41.
|
|
15
|
+
The recommended separately installed native is 0.41.1, with the stable 0.35.0 runtime floor unchanged. Native owns the newer download persistence, origin-scoped restore, project-config trust, and daemon `.config` cleanup; the wrapper adds no version-specific emulation. Native finite MCP calls remain outside the current integration: existing validation rejects non-help `mcp`, and inner identity, cross-session locking, secret presentation, and image delivery are unresolved. See the [capability guide](COMMAND_REFERENCE.md#upstream-0411-qualification) and [MCP boundary](TOOL_CONTRACT.md#native-mcp-boundary).
|
|
16
16
|
|
|
17
17
|
The package install path is the primary product path. Local checkout development should use explicit CLI loading for isolated smoke tests and configured-source plain `pi` runs for lifecycle validation, while package-manifest behavior and packaged contents matter more.
|
|
18
18
|
|
|
@@ -36,7 +36,7 @@ Pi peers. GitHub/source installs retain the same `prepare` build.
|
|
|
36
36
|
|
|
37
37
|
`orchestration/batch-stdin.ts` owns exact native batch-option filtering and raw-argument-over-stdin selection. Indexed `--omit-command` receipts regain their original-plan command at the native observation boundary, before existing lifecycle, ref, artifact, and redaction reducers. Skipped empty stdin rows retain their native indexes; prepared artifact requests use compact returned-row positions. Recording recovery uses those compact positions for artifact attribution and later-recording actions, preserving unrelated step evidence. Presentation uses index-only public receipts and spills. Canonical finish events retain already-redacted attribution before `BrowserCommandResult.complete` removes reconstructed commands from public per-step details; there is no second replay cache.
|
|
38
38
|
|
|
39
|
-
`agent_browser_tools` inventories/enables five flat specialized tools: action, QA, Electron, UI source, and network source. `lib/tool-surface.ts` registers them once and adds them through Pi's native active-tool API, preserving unrelated tools, explicit host selections, and native selected-tool history. The five advanced direct tools use native `defaultActive: false`, not deferred registration.
|
|
39
|
+
`agent_browser_tools` inventories/enables five flat specialized tools: action, QA, Electron, UI source, and network source. `lib/tool-surface.ts` registers them once and adds them through Pi's native active-tool API, preserving unrelated tools, explicit host selections, and native selected-tool history. The five advanced direct tools use native `defaultActive: false`, not deferred registration. Pi restores transcript-enabled advanced tools natively when resuming default-tool sessions; a narrow additive fallback covers `--no-builtin-tools` resumes, which skip native restoration. It does not deactivate explicit/defaultTools selections or widen filtered catalogs/CLI allowlists; loader, tree and reload retain native selection semantics. It owns no parallel activation journal. QA verdicts, unique accessible select, host Electron lifecycle, and bounded source scans remain specialized capabilities rather than being reduced to raw-command approximations. The former public job DSL and isolated script route are removed.
|
|
40
40
|
|
|
41
41
|
Optional `agent_browser_web_search` remains separately credential/config gated and independent of browser state.
|
|
42
42
|
|
|
@@ -77,7 +77,7 @@ All participating Pi processes must restart with the updated package; `/reload`
|
|
|
77
77
|
|
|
78
78
|
`lib/browser-transcript.ts` defines one canonical `data.event` format and optional once-stored `data.snapshot`. Direct, advanced, code and Electron host operations record begin/finish receipts before dispatch and after observed effects, using outer tool-call ID plus inner index and a unique operation ID. The shared page reducer retains an inaccessible candidate during unresolved work and requires explicit reuse/replace/invalidate/unknown disposition. Ordinary results omit unchanged maps and unrelated artifact receipts; journal events carry redacted artifact-row changes in commit order. Final rendering queues actual spill writes and manifest publication, allowing unrelated small observations to finish while another namespace holds its artifact/lifecycle operation. `lib/orchestration/browser-run/artifact-merge.ts` preserves concurrent three-way manifest updates and recording lifecycle order. Native lifecycle evidence is retained before presentation/export. Failed begin blocks dispatch; failed finish stops dependent work and requires inspection without mutation replay. A named persistent journal requires actual publication even before Pi's first conversation. Disabled/no-file sessions use the native current in-memory ancestry for direct browser work without claiming durability; code still requires a published intent journal. Observation-only artifact receipts are optional without a published journal, so sessionless local results retain complete redacted private spills and selected files. Code lifecycle joins include outer finalization, and the shared generation guard keeps prior-branch observation spills process-private and prevents their artifact publication onto the new branch. JavaScript variables are never persisted.
|
|
79
79
|
|
|
80
|
-
`lib/browser-journal.ts` token-projects published envelopes and ancestry through public Pi file/header/leaf APIs, loading only winning snapshot definitions. Replay retains one structural prefix per native manager/header and published file identity, reusing unchanged metadata or validating only appended bytes. Rotation, truncation, native reseed, same-size timestamp changes and failures fall back to full validation. Selected event and winning snapshot bodies are reread; this append-only index is neither a ref cache nor a replacement for publication receipts. It captures the selected leaf before asynchronous reads and validates that same branch through public `getEntry()` ancestry on both hosts. Capture-local admission reuses a validated append-only prefix while checking endpoint identity/parent and new suffixes; publication/durability checks remain independent. Startup/tree restoration uses one queued captured replay for branch state and cleanup leases, with one per-session launch-configuration fold. Stock official
|
|
80
|
+
`lib/browser-journal.ts` token-projects published envelopes and ancestry through public Pi file/header/leaf APIs, loading only winning snapshot definitions. Replay retains one structural prefix per native manager/header and published file identity, reusing unchanged metadata or validating only appended bytes. Rotation, truncation, native reseed, same-size timestamp changes and failures fall back to full validation. Selected event and winning snapshot bodies are reread; this append-only index is neither a ref cache nor a replacement for publication receipts. It captures the selected leaf before asynchronous reads and validates that same branch through public `getEntry()` ancestry on both hosts. Capture-local admission reuses a validated append-only prefix while checking endpoint identity/parent and new suffixes; publication/durability checks remain independent. Startup/tree restoration uses one queued captured replay for branch state and cleanup leases, with one per-session launch-configuration fold. Stock official Pi still eagerly loads native history before extension startup. `lib/browser-legacy-projection.ts` and its shared field projection normalize historical receipts read-only into this same canonical reducer at the journal boundary. Normal resume keeps the original bytes and locator; mixed-format ancestry, confirmation settings/provenance and cleanup ownership remain branch-relative. Non-winning legacy maps are discarded after each receipt. Native event validation cannot downgrade to the legacy path. `lib/browser-session-conversion.ts` reuses that decoder only when an operator explicitly requests a validated stopped separate archive copy. Native generation checks use PID/start and socket identity, never saved URL or delta revision alone. Filtered/helper captures share this check. Small owner-qualified launch receipts retain observed restore-key provenance; restart verifies the current native generation and key before treating that provenance as live. Full storage, migration and consumer-memory boundaries are documented in [`SESSION_STORAGE.md`](SESSION_STORAGE.md).
|
|
81
81
|
|
|
82
82
|
### Canonical observations and image geometry
|
|
83
83
|
|
|
@@ -115,7 +115,7 @@ Global/override package profile names with `policy: "always"` and executable def
|
|
|
115
115
|
|
|
116
116
|
### Prompt guidance budget
|
|
117
117
|
|
|
118
|
-
Use Pi-native `promptGuidelines`, tool declarations, and named `systemPromptOptions.sections` contributions. Do not return a replacement full system prompt from `before_agent_start`: it breaks additive declaration anchoring. Official Pi
|
|
118
|
+
Use Pi-native `promptGuidelines`, tool declarations, and named `systemPromptOptions.sections` contributions. Do not return a replacement full system prompt from `before_agent_start`: it breaks additive declaration anchoring. Official Pi and the fork use this same composition; hosted programmatic tool calling, async provider lifecycle, image-detail overrides, or model-specific payload edits are not package dependencies. Prefix stability is not proof of a cache hit.
|
|
119
119
|
|
|
120
120
|
Browser instructions come from one full source assembled from `lib/playbook.ts` and current trusted config. Shared rules and all advanced tool guidelines are delivered together, rather than maintaining a short eager summary beside a hidden manual. Managed hosts defer this full group; stock hosts receive it eagerly. Tool registrations retain concise descriptions and schemas without duplicate `promptGuidelines`.
|
|
121
121
|
|
|
@@ -136,7 +136,7 @@ The published package should load from the `pi` manifest in `package.json`.
|
|
|
136
136
|
Local checkout validation has two intentional modes:
|
|
137
137
|
|
|
138
138
|
- **Checkout-only extension mode:** use explicit CLI loading such as `pi --approve --no-extensions -e .` from the intentionally trusted repository root. This disables automatic extension loading and avoids duplicate `agent_browser` registrations, but settings, configured package resolution, and other resource types remain active. Temporary `HOME` and `PI_CODING_AGENT_DIR` directories isolate test settings; `PI_OFFLINE=1` disables automatic startup network/update operations. Omit `--approve` only when testing Project Trust.
|
|
139
|
-
- **Configured-source lifecycle mode:** configure exactly one active checkout or package source in Pi settings and launch plain `pi` for manual validation, or run the automated harness that launches with `--approve`. This is the right mode for validating `/reload` and exact-session relaunch because those lifecycle checks exercise discovered/configured resources. Focused extension harness tests validate branch-backed `session_tree` rehydration and cleanup ownership. Before shipping, maintainers also run `npm run verify -- lifecycle` (same semantics under automation, using Pi
|
|
139
|
+
- **Configured-source lifecycle mode:** configure exactly one active checkout or package source in Pi settings and launch plain `pi` for manual validation, or run the automated harness that launches with `--approve`. This is the right mode for validating `/reload` and exact-session relaunch because those lifecycle checks exercise discovered/configured resources. Focused extension harness tests validate branch-backed `session_tree` rehydration and cleanup ownership. Before shipping, maintainers also run `npm run verify -- lifecycle` (same semantics under automation, using Pi's `--approve --session-id` to reopen the exact JSONL session) plus the live-site checks in [`RELEASE.md`](RELEASE.md#pre-release-checks); `npm publish` enforces `npm run verify -- release` via `prepublishOnly` unless scripts are skipped.
|
|
140
140
|
|
|
141
141
|
The repo should not add a repo-local `.pi/extensions/` autoload shim as the documented checkout path.
|
|
142
142
|
|
|
@@ -201,7 +201,7 @@ Ownership rule:
|
|
|
201
201
|
|
|
202
202
|
Practical policy:
|
|
203
203
|
|
|
204
|
-
- preserve the current branch-visible extension-managed session across `/reload`, exact-session relaunch, `/resume`, and Pi
|
|
204
|
+
- preserve the current branch-visible extension-managed session across `/reload`, exact-session relaunch, `/resume`, and Pi `session_tree` branch transitions so persisted sessions can keep following the live browser after lifecycle changes
|
|
205
205
|
- close the active extension-managed session when the originating `pi` process quits, while leaving explicit caller-provided sessions alone; a managed fork restart is not a quit (see below)
|
|
206
206
|
- after branch restore, use the existing locked daemon inspection to distinguish a confirmed inactive wrapper-owned daemon from a live, unknown, or unavailable one. For compatible automatic managed restore only, keep the pending reopen in ordered session page state and persist it as `sessionTabReopenPending`. Non-page calls such as `tab list` can start a daemon without fulfilling it; explicit HTTP reads leave the managed browser and pending reopen untouched, including across branch/reload replay. Before the first current-page operation (`get url`, history commands and relative `pushstate` included), reopen the complete recorded URL with native `open`, invalidate old refs with the existing `page-transition` state, and verify the actual tab. Explicit URL reads and all-read batches skip managed ownership changes and browser helpers entirely; native owns their HTTP fetch and validation. Native `open` resets frame scope. Consume the obligation on that attempt or an executed explicit context/navigation/close command, not an unreached batch row; a failed open does not permit repeated navigation of a now-live browser. After the reopen CLI starts, cancellation returns a structured `aborted` result through the ordinary result path with the exact namespace/session, consumed marker and ref invalidation; it does not throw away replay state or run later browser helpers. Cancellation before the CLI starts does not consume the pending reopen. Internal URLs retain their fragments while tab/ref comparisons remain fragment-insensitive and presentation keeps normal redaction. Older transcripts cannot recover a fragment they did not record. Caller-owned/attached browsers and restore-disabled sessions do not take this path; live wrong-tab recovery still only selects an existing target. Reopening reloads the URL, not unsaved forms, JavaScript memory, or history. There is no second restore store or lifecycle lock.
|
|
207
207
|
- set an idle timeout on extension-managed sessions as a backstop for abnormal exits or cleanup failures, and apply that same `AGENT_BROWSER_IDLE_TIMEOUT_MS` value to every subprocess targeting that owned session (including wrapper helper snapshots, tab lists, and navigation-summary reads); caller-owned sessions instead retain native config/environment idle policy because changing the launch environment between calls can make upstream restart the background browser, discard the active tab, and invalidate fresh refs
|
|
@@ -241,7 +241,7 @@ This is primarily about ownership clarity and avoiding surprise, not adding a he
|
|
|
241
241
|
|
|
242
242
|
Native Pi lifecycle callbacks and existing queues retain ownership-aware shutdown/reload/restart behavior. Shared root and caller-owned browsers are not closed on Pi quit; wrapper-owned managed/fresh and Electron resources keep UUID/branch-qualified cleanup. An ordinary session fork does not inherit its parent's cleanup rights. Close or clean up owned resources before disabling/removing the extension: native reload after removal has no browser handover guarantee. Forced concurrent SDK reload and recovery after failed off-branch cleanup are not fully qualified lifecycle guarantees.
|
|
243
243
|
|
|
244
|
-
Native close/save and explicit URL reopen remain the persistence path, not a live browser snapshot. Page JavaScript, unsaved forms, history, IndexedDB and live recordings are not serialized by this extension. Neither supported
|
|
244
|
+
Native close/save and explicit URL reopen remain the persistence path, not a live browser snapshot. Page JavaScript, unsaved forms, history, IndexedDB and live recordings are not serialized by this extension. Neither supported target uses Browser checkpoint or fork metadata/revision hooks; retained legacy journal decoding remains confined to stopped-copy conversion.
|
|
245
245
|
|
|
246
246
|
### Launch flags
|
|
247
247
|
|
|
@@ -11,7 +11,7 @@ Related docs:
|
|
|
11
11
|
|
|
12
12
|
## Purpose
|
|
13
13
|
|
|
14
|
-
Requires Pi 1.
|
|
14
|
+
Requires Pi 1.5.0 or newer; official and fork hosts are qualified independently.
|
|
15
15
|
|
|
16
16
|
Provide a local, repo-readable command reference for the native `agent_browser` tool.
|
|
17
17
|
|
|
@@ -28,15 +28,19 @@ SDK hosts can supply an awaited [`beforeExecute` callback](TOOL_CONTRACT.md#host
|
|
|
28
28
|
<!-- agent-browser-capability-baseline:start upstream-baseline -->
|
|
29
29
|
<!-- Generated from scripts/agent-browser-capability-baseline.mjs. Run `npm run docs -- command-reference write` to update. Do not edit manually. -->
|
|
30
30
|
|
|
31
|
-
This reference is baselined to the locally installed `agent-browser 0.41.
|
|
31
|
+
This reference is baselined to the locally installed `agent-browser 0.41.1` command/help surface, audited against vercel-labs/agent-browser@5868f7c05020e047c00e68e4abf9253cce864f41. Upstream `agent-browser` remains the source of truth for command semantics; this file is the local fallback for Pi agent sessions where direct binary help is blocked or discouraged.
|
|
32
32
|
|
|
33
33
|
The lightweight drift check is `npm run verify -- command-reference`. Run it whenever the installed upstream `agent-browser` version changes or this reference is edited.
|
|
34
34
|
|
|
35
35
|
<!-- agent-browser-capability-baseline:end upstream-baseline -->
|
|
36
36
|
|
|
37
|
+
### Upstream 0.41.1 qualification
|
|
38
|
+
|
|
39
|
+
The recommended upstream is 0.41.1. Native owns cookie-attribute parsing, error clearing, MCP selector waits, plugin-error redaction, and output/timeout limit validation. Published npm 0.41.1 help is qualified separately from the [pinned Android source](REFERENCE.md#android--termux), which includes additional CDP transport-header support. The wrapper recognizes that source's `--cdp-headers <json>` as one global value and redacts it from invocation presentation; native owns discovery and authentication. The stable runtime floor remains 0.35.0, with no version-specific shim.
|
|
40
|
+
|
|
37
41
|
### Upstream 0.41.0 rebaseline
|
|
38
42
|
|
|
39
|
-
The recommended
|
|
43
|
+
The recommended stock npm `agent-browser@0.41.1` includes the capabilities below, with source citations to upstream commit `1453dd37a40c730fe00f592bc32198a896ff8747`. Runtime support still starts at stable 0.35.0 with no upper cap or version-specific emulation. These native changes span [0.39.3](https://github.com/vercel-labs/agent-browser/releases/tag/v0.39.3), [0.39.4](https://github.com/vercel-labs/agent-browser/releases/tag/v0.39.4), [0.40.0](https://github.com/vercel-labs/agent-browser/releases/tag/v0.40.0), and [0.41.0](https://github.com/vercel-labs/agent-browser/releases/tag/v0.41.0).
|
|
40
44
|
|
|
41
45
|
- Native 0.39.4+ `wait --download <path>` handles downloads that completed before the wait and moves a locally launched browser's downloaded bytes to the requested destination. Native refuses to move files reported by an attached/remote CDP browser. The wrapper still requires on-disk artifact verification; a reported path alone is not success, so supported 0.35.0–0.39.3 natives, which report the path without moving the file, fail as `artifact-missing`. See [native download handling](https://github.com/vercel-labs/agent-browser/blob/1453dd37a40c730fe00f592bc32198a896ff8747/cli/src/native/actions.rs#L11403-L11508).
|
|
42
46
|
- Native daemon shutdown removes its own `<session>.config` along with other daemon files, while retaining `.target` and `.log`. This prevents new configuration-file accumulation; it does not sweep all historical orphans or optimize the wrapper's socket-directory scan. Updating this metadata cannot speed an installation already running 0.41.0. See [file ownership](https://github.com/vercel-labs/agent-browser/blob/1453dd37a40c730fe00f592bc32198a896ff8747/cli/src/session_files.rs#L75-L104) and [shutdown cleanup](https://github.com/vercel-labs/agent-browser/blob/1453dd37a40c730fe00f592bc32198a896ff8747/cli/src/native/daemon.rs#L147-L151).
|
|
@@ -1087,11 +1091,12 @@ The extension composes stock `--args --no-startup-window` for local Chrome start
|
|
|
1087
1091
|
- `--webgpu`: enable upstream's platform-specific WebGPU launch preset. Environment: `AGENT_BROWSER_WEBGPU`; config: `"webgpu": true`. Use it on a fresh local launch. It is incompatible while enabled with `--cdp`, `--auto-connect`, and provider launches. `AGENT_BROWSER_NO_XVFB=1` disables upstream's automatic Xvfb for displayless headed Linux sessions.
|
|
1088
1092
|
- `--no-webmcp`: disable experimental WebMCP support, which upstream 0.36.0 enables by default for locally managed Chrome. Environment: `AGENT_BROWSER_NO_WEBMCP`; config: `noWebmcp`. Use it on a fresh launch; `--no-webmcp false` explicitly enables the launch feature when config or environment disabled it.
|
|
1089
1093
|
- `--cdp <port|url>`: connect through Chrome DevTools Protocol. Use it, `--auto-connect`, or `connect <port|url>` once on a named/fresh session, verify with `get url`, then reuse that session without repeating the attach flag. After a successful attachment the wrapper avoids re-emitting its own compatibility launch argument; caller launch/config/file-access settings remain unchanged. Content-bearing first use is blocked until URL verification; later page reads/interactions live-check the URL because the attached browser can drift externally. `close` clears attachment state.
|
|
1094
|
+
- `--cdp-headers <json>` (pinned Android source build): send a JSON object of string-valued headers for native CDP HTTP discovery and WebSocket authentication. Environment: `AGENT_BROWSER_CDP_HEADERS`. Supply it with the initial `--cdp` call or an explicit `connect`; these are transport credentials, not page/origin `--headers`. Values pass through unchanged and are redacted from invocation presentation. Published stock 0.41.1 help does not advertise this flag.
|
|
1090
1095
|
- `--color-scheme <scheme>`: `dark`, `light`, or `no-preference`. Environment: `AGENT_BROWSER_COLOR_SCHEME`.
|
|
1091
1096
|
- `--download-path <path>`: default browser download directory. Environment: `AGENT_BROWSER_DOWNLOAD_PATH`.
|
|
1092
1097
|
- `--engine <name>`: `chrome` by default, `lightpanda`, or experimental `obscura`. Environment: `AGENT_BROWSER_ENGINE`. Launch-scoped; use `sessionMode: "fresh"` when changing a managed browser. See [Lightpanda](#lightpanda-engine) and [Obscura](#obscura-engine-experimental).
|
|
1093
1098
|
|
|
1094
|
-
On Android/Termux, follow the
|
|
1099
|
+
On Android/Termux, follow the [native Android setup](REFERENCE.md#android--termux) to build an Android-native CLI, install Termux's `which`, and expose its Chromium launcher as `$PREFIX/bin/chromium`. Do not substitute the packaged Linux-musl executable: its CLI HTTP requests can fail hostname resolution even when browser navigation works. Prefer native PATH-based system-browser discovery over ambient `AGENT_BROWSER_EXECUTABLE_PATH`: it survives isolated `HOME` values and works for ordinary native calls. Code retains the selected browser's normal launch configuration. Wrapper-generated Android managed identities use a compact 80-bit digest so ordinary namespaces and fresh rotations fit upstream's Unix socket path.
|
|
1095
1100
|
|
|
1096
1101
|
- `--no-auto-dialog`: disable automatic dismissal of alert/beforeunload dialogs. Environment: `AGENT_BROWSER_NO_AUTO_DIALOG`. Explicit `true`/`false` reaches all helpers in that call; keep the same selection on follow-ups to avoid native daemon replacement.
|
|
1097
1102
|
- `--idle-timeout <ms>`: native background browser lifecycle setting (also accepts `10s`, `3m`, `1h`). Caller-owned sessions retain native idle policy; an explicit flag is carried to every helper in that call. Keep it consistent between calls to avoid a native daemon restart. Only wrapper-owned sessions receive the implicit timeout and numeric mismatch check against `PI_AGENT_BROWSER_IMPLICIT_SESSION_IDLE_TIMEOUT_MS`.
|
|
@@ -1174,9 +1179,9 @@ Standalone `agent-browser` looks for `agent-browser.json` in these locations, fr
|
|
|
1174
1179
|
|
|
1175
1180
|
Native `session` and `namespace` defaults are honored by ordinary tool calls before implicit-session generation; `sessionName` is only a legacy restore key. Per-call flags override environment, which overrides project/user JSON. `--config` or `AGENT_BROWSER_CONFIG` selects one file instead of merging the discovered files; per-call config also reaches helper subprocesses. Caller-owned native `AGENT_BROWSER_SOCKET_DIR` is honored unless the wrapper-specific socket override is set. Code retains these native defaults while fixing the parent-selected session and namespace for the cell.
|
|
1176
1181
|
|
|
1177
|
-
Auto-discovered `./agent-browser.json` cannot set `executablePath`, `args`, or `plugins`: native warns and ignores them. Put
|
|
1182
|
+
Auto-discovered `./agent-browser.json` cannot set `executablePath`, `args`, or `plugins`: native warns and ignores them. The pinned Android source further restricts auto-discovery to the allowlist in its [native configuration guide](https://github.com/fitchmultz/agent-browser/blob/500be1a391ea3e870dff0893e310011ba634468c/docs/content/docs/configuration.mdx). Put advanced settings in `~/.agent-browser/config.json`, environment, CLI flags, or explicitly select the trusted file with `--config ./agent-browser.json`. This native rule is separate from Pi's project trust, the wrapper's native explicit-file identity inspection, and the package's `.pi/config/...` layers.
|
|
1178
1183
|
|
|
1179
|
-
Use separated `--config <path>` to load a specific upstream config; upstream 0.33.2 does not recognize `--config=<path>` as the global selector. Browser-backed and sessionless native calls preserve `--config`, `AGENT_BROWSER_CONFIG`, passive project/user config, and other upstream environment exactly as supplied. The Pi-scoped package config under `.pi/config/pi-agent-browser-native/` remains separate. Boolean flags accept optional `true` or `false` values, such as `--headed false`, `--webgpu false`, or `--no-webmcp false`, to override config.
|
|
1184
|
+
Use separated `--config <path>` to load a specific upstream config; upstream 0.33.2 does not recognize `--config=<path>` as the global selector. Browser-backed and sessionless native calls preserve `--config`, `AGENT_BROWSER_CONFIG`, passive project/user config, and other upstream environment exactly as supplied. The Pi-scoped package config under `.pi/config/pi-agent-browser-native/` remains separate. Boolean flags accept optional `true` or `false` values, such as `--headed false`, `--webgpu false`, or `--no-webmcp false`, to override config. For browser extensions, use user config, an explicitly selected trusted file, environment, or CLI flags; the pinned Android source ignores extensions in auto-discovered project config.
|
|
1180
1185
|
|
|
1181
1186
|
Other useful environment variables include `AGENT_BROWSER_DEFAULT_TIMEOUT`, `AGENT_BROWSER_AUTOSAVE_INTERVAL_MS`, `AGENT_BROWSER_STREAM_PORT`, `AGENT_BROWSER_STREAM_QUALITY`, `AGENT_BROWSER_STREAM_MAX_WIDTH`, `AGENT_BROWSER_STREAM_MAX_HEIGHT`, `AGENT_BROWSER_IDLE_TIMEOUT_MS`, `AGENT_BROWSER_ENCRYPTION_KEY`, `AGENT_BROWSER_STATE_EXPIRE_DAYS`, `AGENT_BROWSER_IOS_DEVICE`, `AGENT_BROWSER_IOS_UDID`, `AI_GATEWAY_URL`, `AI_GATEWAY_API_KEY`, provider credential names, and AWS credential names when using AgentCore. The upstream child receives the parent environment plus wrapper overrides such as the managed socket directory, clamped default operation timeout, canonical owned-session namespace (including empty default), and Pi-transcript- plus Git-checkout-generation-scoped `AGENT_BROWSER_RESTORE` for wrapper-owned managed sessions (`buildAgentBrowserProcessEnv` in `extensions/agent-browser/lib/process.ts`, ownership carried by the wrapper's typed process options and call-scoped managed-session context). Model-facing output still redacts recognized secret values.
|
|
1182
1187
|
|
|
@@ -1207,16 +1212,16 @@ Other useful environment variables include `AGENT_BROWSER_DEFAULT_TIMEOUT`, `AGE
|
|
|
1207
1212
|
<!-- agent-browser-capability-baseline:start capability-token-baseline -->
|
|
1208
1213
|
<!-- Generated from scripts/agent-browser-capability-baseline.mjs. Run `npm run docs -- command-reference write` to update. Do not edit manually. -->
|
|
1209
1214
|
<details>
|
|
1210
|
-
<summary>Generated verifier capability baseline for agent-browser 0.41.
|
|
1215
|
+
<summary>Generated verifier capability baseline for agent-browser 0.41.1</summary>
|
|
1211
1216
|
|
|
1212
1217
|
This generated block is review data for maintainers. The human-authored reference sections above remain the readable command guide.
|
|
1213
1218
|
|
|
1214
1219
|
#### Source evidence
|
|
1215
1220
|
|
|
1216
1221
|
- repository: `vercel-labs/agent-browser`
|
|
1217
|
-
- upstream HEAD: `
|
|
1218
|
-
- upstream package version: `0.41.
|
|
1219
|
-
- inspected: `stock npm agent-browser@0.41.
|
|
1222
|
+
- upstream HEAD: `5868f7c05020e047c00e68e4abf9253cce864f41`
|
|
1223
|
+
- upstream package version: `0.41.1`
|
|
1224
|
+
- inspected: `stock npm agent-browser@0.41.1 package, official release binary, and upstream source`
|
|
1220
1225
|
- inspected: `agent-browser --version`
|
|
1221
1226
|
- inspected: `agent-browser --help`
|
|
1222
1227
|
- inspected: `selected agent-browser <command> --help output`
|
|
@@ -1247,6 +1252,7 @@ This generated block is review data for maintainers. The human-authored referenc
|
|
|
1247
1252
|
- inspected: `cli/src/native/a11y/mod.rs`
|
|
1248
1253
|
- inspected: `cli/src/native/browser.rs`
|
|
1249
1254
|
- inspected: `cli/src/native/cdp/obscura.rs`
|
|
1255
|
+
- inspected: `cli/src/native/cdp/discovery.rs`
|
|
1250
1256
|
- inspected: `cli/src/native/policy.rs`
|
|
1251
1257
|
- inspected: `cli/src/native/providers.rs`
|
|
1252
1258
|
- inspected: `cli/src/native/tab_binding.rs`
|
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.
|
|
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.
|
|
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
|
|
|
@@ -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.41.
|
|
99
|
+
| Upstream CLI drift can silently invalidate wrapper behavior | Publishes a repo-readable command reference, verifies it against the recommended 0.41.1 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` |
|
|
@@ -105,7 +105,7 @@ Artifact results show known requested paths separately from reported/resolved lo
|
|
|
105
105
|
|
|
106
106
|
## Fastest way to try it
|
|
107
107
|
|
|
108
|
-
Use Node 24.21.0 or newer and Pi 1.
|
|
108
|
+
Use Node 24.21.0 or newer and Pi 1.5.0 or newer. This package keeps optional Pi core imports as wildcard `peerDependencies` because Pi package docs require the host Pi install to provide those packages, retains a locked Pi development snapshot while qualifying the latest official/fork graphs, and makes Pi hosts below 1.5.0 a setup failure through `pi-agent-browser-doctor`. There are no compatibility shims for older Pi releases.
|
|
109
109
|
|
|
110
110
|
Install upstream `agent-browser` first and make sure it is on `PATH`:
|
|
111
111
|
|
|
@@ -119,7 +119,7 @@ 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.41.
|
|
122
|
+
Keep both binaries on `PATH`. This package recommends `agent-browser 0.41.1` 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
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
|
|
|
@@ -133,22 +133,43 @@ syscall blocked by Android. Build/type-check scripts therefore use native `tsgo`
|
|
|
133
133
|
on Termux; macOS/Linux continue using the package-local pinned `tsc`.
|
|
134
134
|
Published precompiled npm packages do not require a compiler at runtime.
|
|
135
135
|
|
|
136
|
-
Android support
|
|
136
|
+
Android support uses an Android-native `agent-browser` source build with Termux's system Chromium, not Chrome for Testing. The packaged Linux-musl executable can launch Chromium but fail hostname resolution for CLI HTTP requests such as `read` and `doctor`'s CDN probe. Building for Android fixes those requests without changing TLS verification or the wrapper's HTTP behavior.
|
|
137
|
+
|
|
138
|
+
The verified source revision is [`agent-browser` 0.41.1 with the native Android repair](https://github.com/fitchmultz/agent-browser/pull/2), commit `500be1a391ea3e870dff0893e310011ba634468c`. There is no published Android binary; [vercel-labs/agent-browser#1587](https://github.com/vercel-labs/agent-browser/issues/1587) tracks that packaging. The [native Android build guide](https://github.com/fitchmultz/agent-browser/blob/500be1a391ea3e870dff0893e310011ba634468c/docs/content/docs/installation.mdx#androidtermux) explains the build requirements and dashboard assets. Use Node.js 24+, native pnpm 11+, and Termux's build tools:
|
|
137
139
|
|
|
138
140
|
```bash
|
|
139
|
-
pkg install
|
|
140
|
-
pkg install chromium ffmpeg which
|
|
141
|
-
npm install -g --ignore-scripts agent-browser
|
|
142
|
-
ln -sfn "$(npm root -g)/agent-browser/bin/agent-browser-linux-musl-arm64" \
|
|
143
|
-
"$(npm prefix -g)/bin/agent-browser"
|
|
141
|
+
pkg install x11-repo
|
|
142
|
+
pkg install chromium ffmpeg which rust clang make pkg-config
|
|
144
143
|
ln -sfn "$PREFIX/lib/chromium/chromium-launcher.sh" "$PREFIX/bin/chromium"
|
|
145
|
-
agent-browser
|
|
144
|
+
git clone https://github.com/fitchmultz/agent-browser agent-browser-termux
|
|
145
|
+
cd agent-browser-termux
|
|
146
|
+
git checkout --detach 500be1a391ea3e870dff0893e310011ba634468c
|
|
147
|
+
pnpm --pm-on-fail=ignore install --frozen-lockfile --filter dashboard --ignore-scripts
|
|
148
|
+
pnpm --pm-on-fail=ignore --dir packages/dashboard exec next build --webpack
|
|
149
|
+
cargo build --release --locked --manifest-path cli/Cargo.toml
|
|
150
|
+
node scripts/copy-native.js
|
|
151
|
+
node bin/agent-browser.js --version
|
|
152
|
+
node bin/agent-browser.js read https://example.com
|
|
153
|
+
node bin/agent-browser.js doctor
|
|
146
154
|
which chromium
|
|
147
155
|
```
|
|
148
156
|
|
|
149
|
-
|
|
157
|
+
Before installing the Pi extension, `agent-browser` must resolve to this native build as an executable on `PATH`. If you already use a managed launcher, update its native target to `bin/agent-browser-android-arm64` in the launcher's canonical source. Preserve the managed launcher itself.
|
|
158
|
+
|
|
159
|
+
For a fresh Termux install without an existing command, create the named executable in Termux's `$PREFIX/bin`. Run this from the `agent-browser-termux` checkout:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
if ! command -v agent-browser >/dev/null 2>&1; then
|
|
163
|
+
ln -s "$PWD/bin/agent-browser-android-arm64" "$PREFIX/bin/agent-browser"
|
|
164
|
+
fi
|
|
165
|
+
agent-browser --version
|
|
166
|
+
agent-browser read https://example.com
|
|
167
|
+
agent-browser doctor
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
The conditional preserves an existing launcher, and `ln -s` refuses to overwrite an existing destination. If you use a managed launcher, run the same verification commands after updating its native target. Rebuild after source updates; npm upgrades do not provide an Android executable. The `which` package and Chromium launcher symlink satisfy native Android's PATH-based browser discovery even when tests or Pi sessions isolate `HOME`. Browser code uses the same native launch configuration as direct calls.
|
|
150
171
|
|
|
151
|
-
|
|
172
|
+
The wrapper uses Termux-private socket/policy storage, compact 80-bit managed identities so ordinary namespaces and fresh rotations fit the Unix socket-path limit, Termux's `ps`, and Android app-sandbox trust rules automatically. The native 0.41.1 repair passed real HTTPS reads and `doctor` on the Fold8; this is focused native CLI evidence, not full wrapper or Android release qualification. Historical 0.6 Android validation covered headless browser flows, managed restore, namespaced sessions, the former script/job inputs, QA, screenshots, and recording; it does not qualify the 0.7 code contract. Electron desktop discovery/lifecycle is not applicable to Android apps. Android remains outside the release-blocking Crabbox matrix until a repeatable Android provider target is added.
|
|
152
173
|
|
|
153
174
|
The native tool also gives agents absolute installed-package doc paths in its full browser instructions. Raw `args` are the 1:1 upstream CLI coverage path for the targeted `agent-browser` release; `agent_browser_code` adds bounded JavaScript orchestration over the same browser, while advanced tools preserve semantic actions, diagnostic QA, source lookup, and Electron lifecycle. Agents should read `README.md` for setup/dependencies, `docs/COMMAND_REFERENCE.md` for targeted command workflows, and `docs/TOOL_CONTRACT.md` for result/detail contracts only when deeper guidance is needed.
|
|
154
175
|
|
|
@@ -203,7 +224,7 @@ npm run doctor
|
|
|
203
224
|
The doctor checks:
|
|
204
225
|
|
|
205
226
|
- upstream `agent-browser` exists on `PATH`
|
|
206
|
-
- the installed upstream is a stable version at or above the supported 0.35.0 floor; 0.41.
|
|
227
|
+
- the installed upstream is a stable version at or above the supported 0.35.0 floor; 0.41.1 remains the recommended baseline
|
|
207
228
|
- `pi --version` meets the minimum Pi runtime floor for this release; older Pi versions are setup failures
|
|
208
229
|
- Pi settings do not point at multiple active `pi-agent-browser-native` sources
|
|
209
230
|
|
|
@@ -709,7 +730,7 @@ The opt-in real-upstream suite is separate because it drives a real browser inst
|
|
|
709
730
|
npm run verify -- real-upstream
|
|
710
731
|
```
|
|
711
732
|
|
|
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.
|
|
733
|
+
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.1 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
734
|
|
|
714
735
|
A deterministic host-only live-browser wrapper smoke is available without an LLM choosing tool calls:
|
|
715
736
|
|
|
@@ -742,12 +763,12 @@ npm run verify -- release
|
|
|
742
763
|
5. Screenshots, downloads, recordings, traces, profiles, and spill files are normalized as Pi-visible artifacts where possible.
|
|
743
764
|
6. Generated playbook text in docs and browser instructions stays aligned with `extensions/agent-browser/lib/playbook.ts`.
|
|
744
765
|
|
|
745
|
-
The upstream browser engine remains [`agent-browser`](https://agent-browser.dev/). This package does not bundle it. The recommended baseline is 0.41.
|
|
766
|
+
The upstream browser engine remains [`agent-browser`](https://agent-browser.dev/). This package does not bundle it. The recommended baseline is 0.41.1 and the stable runtime floor is 0.35.0; newer stable versions are accepted without version-specific compatibility shims.
|
|
746
767
|
|
|
747
768
|
## Current limits
|
|
748
769
|
|
|
749
770
|
- Published pre-1.0 package.
|
|
750
|
-
- Recommends upstream `agent-browser` 0.41.
|
|
771
|
+
- Recommends upstream `agent-browser` 0.41.1 and accepts stable runtimes at or above 0.35.0.
|
|
751
772
|
- Does not bundle `agent-browser`; users install it separately.
|
|
752
773
|
- 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
774
|
- 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.
|
|
@@ -771,7 +792,7 @@ Install upstream `agent-browser`, then install dependencies:
|
|
|
771
792
|
npm install
|
|
772
793
|
```
|
|
773
794
|
|
|
774
|
-
Use the npm version declared in `package.json` `packageManager` when refreshing `package-lock.json` so optional-platform lockfile metadata does not drift. Use Node 24.21.0 and Pi 1.
|
|
795
|
+
Use the npm version declared in `package.json` `packageManager` when refreshing `package-lock.json` so optional-platform lockfile metadata does not drift. Use Node 24.21.0 and Pi 1.5.0 or newer for lifecycle and interactive browser smokes; locked Pi devDependencies are reproducible build snapshots, not qualification targets. CI selects the once-resolved latest official graph for native lifecycle and package smoke, and independently qualifies the latest maintained fork. See [Environment and automation pitfalls](RELEASE.md#environment-and-automation-pitfalls) in `docs/RELEASE.md`.
|
|
775
796
|
|
|
776
797
|
Checkout-only extension smoke test:
|
|
777
798
|
|
package/docs/RELEASE.md
CHANGED
|
@@ -36,9 +36,9 @@ Linux/macOS, declared Node floors, official/fork host and consumer-artifact chec
|
|
|
36
36
|
|
|
37
37
|
Docs/workflow-only changes may reuse prior live/platform evidence when the complete compiled runtime, runtime dependencies and relevant tests are unchanged. Changed published files require a new retained tarball checked by `verify-package.mjs --smoke-pi`, including runtime-only SDK and actual CLI loading. Publish those exact checked bytes without repacking.
|
|
38
38
|
|
|
39
|
-
## Pi 1.0 upgrade and qualification
|
|
39
|
+
## Pi 1.5.0 upgrade and qualification
|
|
40
40
|
|
|
41
|
-
This contract requires Pi 1.
|
|
41
|
+
This contract requires Pi 1.5.0. Do not install or activate it in running pre-1.5 sessions; coordinate the runtime cutover and restart participating agents first. Keep runtime activation separate from isolated checkout/SDK qualification. Preserve auth/profile/state files, explicit artifacts and Pi journals when updating or rolling back; browser mutations are not reversible through a package rollback.
|
|
42
42
|
|
|
43
43
|
Qualify the exact official and fork host graphs independently, including SDK and actual CLI loading, explicit/defaultTools/loader/initial-resume/tree/reload selections, structured success/failure/redaction and unchanged JSON. Inspect regular and fullscreen native TUI results, including failures and images. Keep the existing 250 ms import/factory and 1,000 ms lock budgets; synthetic research timings are not final-source release evidence or universal performance guarantees. Apply normal required macOS/Linux release gates; Windows is separately labeled best-effort. Host identity and actual supported APIs, not a version label alone, determine qualification.
|
|
44
44
|
|
|
@@ -52,9 +52,9 @@ Rollback is package-level: restore the previously installed 0.6 package from you
|
|
|
52
52
|
|
|
53
53
|
### Changed-path qualification
|
|
54
54
|
|
|
55
|
-
The minimum Pi runtime is 1.
|
|
55
|
+
The minimum Pi runtime is 1.5.0, matching the native APIs the tool contract uses. Wildcard peers remain host-owned dependency declarations, not support for older runtimes.
|
|
56
56
|
|
|
57
|
-
Qualify official Pi
|
|
57
|
+
Qualify official Pi and the fork independently with the existing host/package/lifecycle infrastructure. Required evidence for the redesign includes compact schema and additive activation/history, native prompt sections, shared direct/code auth continuity, fresh JavaScript globals, selected real images and conservative geometry, visible handled failures/exact recovery, real cross-process helper/action and whole-cell ordering, cancellation/reaping, and ordered transition replay after interruption/branch changes. Retain native batch and advanced action/QA/Electron/source outcome coverage. Small synthetic timing comparisons are not universal performance claims or sandbox certification.
|
|
58
58
|
|
|
59
59
|
Routine GitHub PR and release-call checks include a nonblocking Windows build/import/process smoke; deep official/fork Windows qualification and its environment self-check are manual-only. Retain every failed attempt, including historical waived diagnostics, without claiming a Windows pass from an aggregate that ignored failures. These focused checks complement, rather than replace, the local release and publication gates.
|
|
60
60
|
|
|
@@ -139,7 +139,7 @@ Releases that change the Pi agent runtime also require interactive `tmux`-driven
|
|
|
139
139
|
|
|
140
140
|
When reviewing saved session JSONL after a failed smoke or QA reclassification, expect browser tool rows to carry `isError: true` whenever `details.resultCategory` is `failure`. The model-visible observation must also report failure. Canonical JSON stays parseable and unchanged. Final public results return `isError` directly, with a prose failure notice outside explicit JSON, so Pi's transcript matches the wrapper contract ([`TOOL_CONTRACT.md`](TOOL_CONTRACT.md#details)). Preserve a normal Pi session directory for those checks; avoiding `--no-session` keeps this evidence intact ([`AGENTS.md`](https://github.com/fitchmultz/pi-agent-browser-native/blob/main/AGENTS.md) preferred validation workflow).
|
|
141
141
|
|
|
142
|
-
The configured-source lifecycle regression harness is required before release because it launches an interactive Pi 1.
|
|
142
|
+
The configured-source lifecycle regression harness is required before release because it launches an interactive Pi 1.5.0+ process under `tmux` with `--approve` and validates `/reload`, full relaunch with the same exact `--session-id`, managed-session continuity, persisted artifacts, compiled-entrypoint pickup after process restart, and native returned-failure behavior. Branch-backed `session_tree` rehydration and cleanup ownership are validated by focused extension harness tests:
|
|
143
143
|
|
|
144
144
|
```bash
|
|
145
145
|
npm run verify -- lifecycle
|
|
@@ -325,9 +325,9 @@ That npm script sets `PI_AGENT_BROWSER_REAL_UPSTREAM=1`, runs the sessionless pl
|
|
|
325
325
|
|
|
326
326
|
This suite requires the installed stable `agent-browser --version` to meet the minimum in `scripts/agent-browser-target.mjs`; the output-shape fixture and command-reference verifier remain aligned to the current recommended baseline. It serves fixture pages from localhost and checks stable `details`/`data` keys via `test/fixtures/agent-browser-real-output-shapes.json`. Coverage groups:
|
|
327
327
|
|
|
328
|
-
- **Inspection and skills (stateless JSON):** `--version`, `--help`, `snapshot --help`, `skills list`, `skills get … --full` (including `webmcp-gen` on the 0.41.
|
|
328
|
+
- **Inspection and skills (stateless JSON):** `--version`, `--help`, `snapshot --help`, `skills list`, `skills get … --full` (including `webmcp-gen` on the 0.41.1 target), `skills path …` (no managed `sessionName` / `usedImplicitSession`).
|
|
329
329
|
- **Native 0.38 observation/recording:** full/unchanged delta snapshots, persistent refs, partial batch ref follow-ups, conditional screenshot suppression, sticky pointer mode and timed mouse movement, cursor recording and verified contact-sheet output. These options are skipped when explicitly validating the older stable floor.
|
|
330
|
-
- **WebMCP target contract:** on the 0.41.
|
|
330
|
+
- **WebMCP target contract:** on the 0.41.1 target, `webmcp list`, `invoke` with params/frame selection, detached `result` / `cancel`, ref invalidation after page tools, and a separate fresh launch with `--no-webmcp` returning an empty list.
|
|
331
331
|
- **Navigation metadata and native tab setup:** plain pages stay quiet; a page with tools retains positive native `data.webmcp` and shows the `webmcp list` hint. New tabs inherit configured headers before their first request, and clearing headers removes them on the next tab. No wrapper inheritance code is involved.
|
|
332
332
|
- **Recording FPS paths and pinning:** the opt-in `test/agent-browser.batch-fidelity.test.ts` native case checks direct/raw/stdin preflight before dispatch, actual start/restart destinations and pinned targets with leading `--fps`, conservative start-ref protection, FPS-only restart continuity, and valid 12-fps WebM output after explicitly logged 12-second fixture captures. Run it with `PI_AGENT_BROWSER_REAL_UPSTREAM=1`; it requires native 0.37 or newer. Keep focused older-native controls for fresh-page starts and the start-then-ref batch latch when changing that policy.
|
|
333
333
|
- **Managed session core and safe diagnostic matrix:** fresh `open` on the contract fixture, then implicit reuse across `eval --stdin`, `snapshot -i`, interaction commands (`click`, `dblclick`, `fill`, `type`, `type --clear --delay`, `focus`, `keyboard` with `type` / `inserttext`, `press`, `hover`, `check`, `uncheck`, `select`, failed `select` no-match, `upload`, `drag`, `mouse`, `scroll`, off-viewport click, `scrollintoview`, `wait` on selectors in the main frame and a selected iframe), extraction (`get` variants, `is` variants, `find label … fill` via native `<label>`, `aria-label`, and `aria-labelledby`, inline `eval`), file outputs (`screenshot`, `pdf`), navigation (`back`, `forward`, `reload`, `tab list`, another `open` to the same fixture), `batch` stdin, `pushstate`, `vitals … --json`, network route/requests/HAR, diff snapshot/screenshot/url, trace/profiler, console/errors/highlight, stream enable/status/disable, and `cookies set --curl`.
|
|
@@ -341,7 +341,7 @@ The default unit suite also runs `agentBrowserExtension passes through core comm
|
|
|
341
341
|
|
|
342
342
|
### Native lifecycle qualification
|
|
343
343
|
|
|
344
|
-
[`test/agent-browser.native-lifecycle.test.mjs`](https://github.com/fitchmultz/pi-agent-browser-native/blob/main/test/agent-browser.native-lifecycle.test.mjs) is the model-free portable SDK lifecycle gate. It loads the compiled extension through real native resource discovery and executes browser tools against loopback fixtures. Qualify official and fork Pi
|
|
344
|
+
[`test/agent-browser.native-lifecycle.test.mjs`](https://github.com/fitchmultz/pi-agent-browser-native/blob/main/test/agent-browser.native-lifecycle.test.mjs) is the model-free portable SDK lifecycle gate. It loads the compiled extension through real native resource discovery and executes browser tools against loopback fixtures. Qualify official and fork Pi graphs independently: no removed fork-only APIs are required. It covers branch/reload continuity, detached and queued code cancellation/ordering, managed cleanup, caller-owned attachment and off-branch routing, failed journal-begin refusal during recording, and root save/reopen across fresh checkout/state-directory inodes. This is lifecycle evidence, not serialization of live page JavaScript, forms or recordings.
|
|
345
345
|
|
|
346
346
|
Run non-root with an isolated HOME/socket root and stock `agent-browser`, Chrome for Testing and ffmpeg, without personal profiles or inherited credentials/configuration. The browser directory must contain binaries, never a personal profile.
|
|
347
347
|
|
|
@@ -384,7 +384,7 @@ For a root-check change, run the identical final test against both the pre-fix a
|
|
|
384
384
|
- **Missing or extra `details` / `data` keys:** Update `test/fixtures/agent-browser-real-output-shapes.json` in the same change as the wrapper or presentation code that shifts those keys.
|
|
385
385
|
- **Timeouts:** The broad matrix has a 180-second bound; the focused cold-reopen, click-mutation, and plugin cases each have a 60-second bound. Repeated timeouts usually mean a hung browser, blocked loopback, or an environment preventing headful/headless launch—check upstream logs and local security tooling before loosening timeouts.
|
|
386
386
|
|
|
387
|
-
Native 0.39.4 fixes already-completed downloads and requested-path persistence ([upstream change](https://github.com/vercel-labs/agent-browser/releases/tag/v0.39.4)); the recommended 0.41.
|
|
387
|
+
Native 0.39.4 fixes already-completed downloads and requested-path persistence ([upstream change](https://github.com/vercel-labs/agent-browser/releases/tag/v0.39.4)); the recommended 0.41.1 contract requires the fixture's actual bytes at the requested destination and verified wrapper artifacts. Older supported natives (0.35.0–0.39.3) report the requested path without moving the file, so the same contract requires the wrapper's fail-closed `artifact-missing` result there. Native only moves downloads from a browser it launched, not attached/remote CDP paths. `details.savedFilePath` alone remains metadata: require `details.artifactVerification` and `details.artifacts[].exists`, and retain the artifact-presentation tests that fail reported-but-missing outputs. This fixture refresh is not a wrapper runtime download fix. If the suite fails because JSON/detail keys drifted, update the wrapper behavior or refresh `test/fixtures/agent-browser-real-output-shapes.json` together with the presentation work that consumes those shapes.
|
|
388
388
|
|
|
389
389
|
Example smoke prompt:
|
|
390
390
|
|
package/docs/REQUIREMENTS.md
CHANGED
|
@@ -16,7 +16,7 @@ Define the product requirements and constraints for `pi-agent-browser-native`.
|
|
|
16
16
|
## Runtime requirements
|
|
17
17
|
|
|
18
18
|
- Node.js 24.21.0 or newer.
|
|
19
|
-
- Pi 1.
|
|
19
|
+
- Pi 1.5.0 or newer.
|
|
20
20
|
- A separate stable `agent-browser` installation, version 0.35.0 or newer, available on `PATH`.
|
|
21
21
|
|
|
22
22
|
## Product requirements
|
|
@@ -73,7 +73,7 @@ Define the product requirements and constraints for `pi-agent-browser-native`.
|
|
|
73
73
|
|
|
74
74
|
- Keep the always-on interface compact: `agent_browser { args, stdin?, outputPath?, timeoutMs?, sessionMode? }`, strict-JSON `agent_browser_code { code, session?, namespace?, timeoutMs?, outputPath? }`, and `agent_browser_tools { enable? }`.
|
|
75
75
|
- Preserve the complete native command surface through one CLI executor. Native batch handles fixed sequences; code handles branches/loops/aggregation. Remove the redundant public job DSL and old isolated-script execution instead of carrying parallel legacy runtimes.
|
|
76
|
-
- Register advanced action, QA, Electron, UI-source, and network-source tools once with native `defaultActive: false`. Enable additively through Pi's native tool selection/history without removing unrelated tools. Preserve explicit/defaultTools selections, loader activation, initial resume, tree navigation and reload; retain only the additive fallback needed for
|
|
76
|
+
- Register advanced action, QA, Electron, UI-source, and network-source tools once with native `defaultActive: false`. Enable additively through Pi's native tool selection/history without removing unrelated tools. Preserve explicit/defaultTools selections, loader activation, initial resume, tree navigation and reload; retain only the additive fallback needed for `--no-builtin-tools` resumes, which skip native restoration. Use flat schemas and return executable next actions naming the actual tool.
|
|
77
77
|
- Preserve unique visible accessible dropdown selection, semantic/ref recovery, truthful QA verdicts (including ambiguous error-buffer residue), attached diagnostic preservation/defaults, Electron process/profile ownership, and bounded source scans. Raw diagnostic-read success is not a QA verdict, and source hints remain candidates rather than authoritative blame.
|
|
78
78
|
- Code runs in a fresh permissioned Node child with no host APIs/imports, null-prototype task globals, JSON-only bounded IPC, serial native calls, and explicit JSON/image output. Keep current source/output/call/deadline limits. Browser/authentication persists under existing native ownership and configuration; JavaScript variables do not. Allow ordinary native commands including batch/auth/profile/state/connect/close, but prevent changes to the fixed parent-selected identity and namespace-wide close within a cell.
|
|
79
79
|
- Hold a cooperating-process execution lock keyed by actual socket context, canonical namespace, and session across direct helper/action work or the entire code cell. Use ordered multi-identity acquisition for replacement/cleanup and a namespace barrier for direct close-all. This does not coordinate humans, third-party clients, or older versions, guarantee atomic browser actions, or provide rollback.
|
|
@@ -128,7 +128,7 @@ The design should comfortably support workflows such as:
|
|
|
128
128
|
## Implications for the implementation
|
|
129
129
|
|
|
130
130
|
- Package-manifest behavior matters more than repo-local development wiring.
|
|
131
|
-
- The extension uses native Pi tool registration/activation and named prompt sections rather than replacing the full system prompt. Require Pi 1.
|
|
131
|
+
- The extension uses native Pi tool registration/activation and named prompt sections rather than replacing the full system prompt. Require Pi 1.5.0 and qualify official and fork hosts independently. Retain the instruction-group collector when supported and identical full native prompt-section fallback otherwise; hosted provider orchestration is not required.
|
|
132
132
|
- The wrapper should stay thin, with upstream `agent-browser` remaining the source of truth for command semantics.
|
|
133
133
|
- Successful and failed tool outcomes should surface bounded machine-readable fields on Pi-facing `details` (`resultCategory`, `successCategory`, `failureCategory`, optional structured `nextActions`, optional `pageChangeSummary` with explicit observed-vs-dispatched evidence and per-step summaries on `batch`, optional `artifactVerification` with the same shape on successful `batchSteps[]` rows, optional `outputFile`, optional `timeoutPartialProgress`) so agents can branch without parsing prose; browser-bearing `nextActions` must preserve a known session identity so recovery cannot inspect an unrelated implicit session; stateful commands (`auth`, `cookies`, `storage`, `dialog`, `frame`, `state`) plus other structured diagnostics (for example `network`, `diff`, `trace`, `stream`, `dashboard`, `chat`) and `batch` should redact secret-bearing payloads in model-facing `details.data`, including the compact per-step `batch` roll-up on the parent result (full per-step payloads live on `batchSteps[]`). Dialog/prompt-related timeouts should be bounded with recovery `nextActions`; non-dialog timeouts should prefer best-effort per-step progress and retry payloads when a plan is available; no-op scrolls should expose no-movement state instead of only an upstream success boolean; explicit page/container scroll helpers should expose before/after movement evidence. The contract lives in [`TOOL_CONTRACT.md`](TOOL_CONTRACT.md#details), enums and classifier precedence live in `extensions/agent-browser/lib/results/categories.ts` and `contracts.ts`, and presentation-time summaries, redaction, network request follow-ups, and artifact verification rollups are assembled in `extensions/agent-browser/lib/results/presentation.ts` (`buildPageChangeSummary`, command taxonomy predicates from `command-taxonomy.ts`, `redactPresentationData`, `buildArtifactVerificationSummary`, `buildBatchPresentation`).
|
|
134
134
|
- User-facing docs belong in `README.md` and the canonical published files under `docs/`.
|
package/docs/SESSION_STORAGE.md
CHANGED
|
@@ -16,7 +16,7 @@ A saved URL or map cannot prove the native browser survived. Reuse checks native
|
|
|
16
16
|
|
|
17
17
|
Replay locates the journal through Pi's public session file, UUID and selected leaf. It captures that leaf before asynchronous reads and uses the same boundary for file and public native ancestry validation, so concurrent appends cannot change the branch being replayed. It validates complete newline-terminated records. A record up to 1 MiB with nesting within 1024 levels and at most 64 Ki structural bytes (`{`, `[`, `,` or `:` outside strings) uses native JSON, which briefly holds that record's text and parsed value, a few MiB at most. Larger or denser records and any native rejection use the token projector with unpacked discarded strings, fed in the same 64 KiB chunks as file reads, so both paths accept the same records and report the same first error. A cold restore frames and validates the whole journal. Subsequent restores on the same native manager retain only complete-record structural metadata: an unchanged file reuses that index, and an append scans from the last complete record, including any previously incomplete tail. Locator/header-object changes, rotation, truncation, same-size timestamp changes and failed reads or replay discard the index and use the full validating scanner. The index follows Pi's documented append-only entry contract; native reseeding replaces its header object even when the UUID stays the same. External prefix rewrites must be reopened through Pi rather than disguised as appends to its live journal. This is not an adversarial file-integrity guarantee. Each restore still projects selected envelopes, follows ancestry and rereads winning snapshot bodies; it never caches refs or browser outcomes. An incomplete live tail remains uncommitted. Public `getEntry()` supplies structural ancestry checks on both supported hosts. Capture-local admission validates ancestry through the root, then reuses that append-only prefix after indexed endpoint identity/parent checks. New suffixes still reject missing/cyclic ancestry and unrelated branches; session/generation changes invalidate admission. Behind-host mutation of an old ancestor without native reseed/generation change is outside this append-only contract. Durable replay/append proofs remain independent: prefix reuse does not replace publication receipts or trust an unpublished selected leaf. No writable manager or private core storage is used.
|
|
18
18
|
|
|
19
|
-
Official Pi
|
|
19
|
+
Official Pi eagerly loads its own native journal before extension startup. This extension reduces browser write duplication and bounds extension recovery on that host; complete heap-independent host loading requires adoption of the native core repair. A caller-requested individual snapshot/result still must fit its consumer's memory. This is not an unlimited model-context or single-value API.
|
|
20
20
|
|
|
21
21
|
Artifact events persist row upserts/removals in journal order. The internal recent view defaults to 100 rows; it is separate from cumulative journal size and the independent recording reservation/tombstone journal. Artifact upserts are credential-redacted before persistence. Tool `details.artifactManifest` contains only changed or referenced receipts for that invocation, including evictions observed during that call. Retention summaries and close cleanup guidance can describe the internal recent view without copying it into every result.
|
|
22
22
|
|
package/docs/SUPPORT_MATRIX.md
CHANGED
|
@@ -31,31 +31,32 @@ When upstream ships a new `agent-browser` or the inventory changes:
|
|
|
31
31
|
|
|
32
32
|
Native text and artifact ownership: the registered artifact owner covers empty-row screenshot alignment, nonscreenshot placeholders and bail truncation; the upgrade owner covers one-copy failed explicit text. The text/presentation owners cover cookie/storage format redaction across content, details, complete spills and exports, effective raw/stdin batch intent and native JSON all-entry maps. Real-native cases exercise screenshot paths, explicit/shorthand sensitive-key storage reads, empty-name cookies and CLI true/false helper continuity over opposite env/config defaults. Debug false creates no native log with clean or opposite defaults; later calls retain native inheritance. Native unescaped multiline all-entry/raw-batch text retains the documented heuristic ceiling; structured JSON provides the unambiguous storage boundary.
|
|
33
33
|
|
|
34
|
-
The compact direct/code/loader surface replaces public multimode inputs while retaining native commands and advanced outcomes. This section describes the implementation contract; dated evidence below does not qualify
|
|
35
|
-
|
|
36
|
-
| Area | Contract and verification target
|
|
37
|
-
| ------------------------ |
|
|
38
|
-
| RQ-0064 fixed workflows | Public job DSL removed; native `batch --bail` preserves fixed ordering, waits, explicit assertions, paced keyboard/wait rows, and timeout partial progress. Code handles branches/loops.
|
|
39
|
-
| RQ-0065 QA | Flat `agent_browser_qa` preserves visible assertions, attached-buffer scope, diagnostic residue ambiguity, actionable/benign classification, and actual pass/fail. Fail-fast receipts separate failed checks from later `notRunChecks`; incomplete/timeout evidence stays unverified and execution counts without receipts remain unknown.
|
|
40
|
-
| RQ-0066 / RQ-0067 source | Flat source/network tools retain bounded host scans and candidates-only semantics even in browser-only hosts.
|
|
41
|
-
| RQ-0068 recipes | No recipe registry, persistent JavaScript, second driver, or interpreter dependency.
|
|
42
|
-
| RQ-0072 refs | Page-scoped ref checks scan effective raw/stdin batch plans through every snapshot. A snapshot clears the invalidation latch, but a later page-changing step sets it again even when no refs precede that snapshot; later guarded ref use fails before spawn unless another snapshot intervenes. Same-snapshot fill and role-checked form-control exceptions remain. [`TOOL_CONTRACT.md`](TOOL_CONTRACT.md#details), `test/agent-browser.extension-ref-guards.test.ts` own this contract.
|
|
43
|
-
| Native indexed batches | Exact `--omit-command` preserves index-only public receipts and spills with ordinary credential/error redaction, ordered close/reopen/ref state, and artifact verification. Original native indexes include skipped empty stdin rows; artifact requests and recording-recovery merges use compact returned-row positions, retaining unrelated artifacts and later-recording actions. Recording `outputPath` receipts use redacted internal attribution; every returned result, including unconfirmed finishes, omits step commands. Raw argv still overrides stdin. `test/agent-browser.batch-fidelity.test.ts` owns live direct/code/input/lifecycle/artifact proof on natives with `--omit-command` (0.40.0+; older supported natives skip that case); `test/agent-browser.presentation-diagnostics.test.ts` owns full-spill redaction; `test/agent-browser.storage-recovery.test.ts` owns unconfirmed-finish omission.
|
|
44
|
-
| RQ-0096 Electron | Flat lifecycle tool preserves app/process/profile ownership and cancellation; native browser/code operations reuse its returned session. CDP readiness/liveness requires a nonempty Browser/browser string. Restored cleanup requires the launch-time process start identity and fails closed without a match. Managed fork restart dispositions `handoff`/`provisional` keep active branch-visible launches, profiles, and managed sessions for the replacement worker; `release` and absent dispositions clean as quit ([`ELECTRON.md`](ELECTRON.md)).
|
|
45
|
-
| RQ-0142 code | Fresh permissioned Node child over persistent parent-selected browser; explicit JSON/current-cell image output, visible failures/counts, ordinary auth/config/environment, ordered Pi intent/completion transitions, child cancellation/reaping, no legacy public execution.
|
|
46
|
-
| Hotpath boundaries | Unrelated tools/harmless Bash return before prompt policy. Latest raw user intent is seeded on start/tree, updated by `message_end` and refreshed after native content replacement. Captured admission uses a validated append-only prefix; one queued replay restores branch/lease state and folds per-session launch settings once. Per-row renderer memoization skips unchanged formatting. No broad config/trust/history cache, new wait/timer or budget increase.
|
|
47
|
-
| Shared ordering | Actual socket/namespace/session lock spans helper/action or entire cell; sorted identity sets for replacement/cleanup and namespace barrier for direct close-all. Requires every participating Pi to run the updated package; no human/third-party/older-version guarantee or transaction.
|
|
48
|
-
| Lightpanda engine | Chrome remains default; separately installed Lightpanda is opt-in. `--engine` uses existing managed fresh-launch recovery; effective CLI/env/config Lightpanda omits wrapper Chrome profile/executable defaults while preserving native choices. Positively identified images are text-rendered with unknown geometry, not visual/coordinate parity. No automatic fallback. `test/agent-browser.runtime.test.ts`, `test/agent-browser.shared-defaults.test.ts`, and `test/agent-browser.screenshot-geometry.test.ts` own the regressions; [limits](COMMAND_REFERENCE.md#lightpanda-engine).
|
|
49
|
-
| Observation and geometry | Canonical bounded JSON/prose/code/native `structuredContent` observations expose exact recovery and receipts, with native namespace/output-schema metadata and canonical returned `isError`; complete observation spills preserve large output. Image dimensions/CSS viewport/DPR/crop/scroll/frame evidence is measured or explicitly unknown; no viewport-coordinate assumptions for full-page/element images.
|
|
50
|
-
| Pi integration | Pi 1.0 floor with independently qualified official/fork graphs. Five advanced direct tools use native `defaultActive: false`; a narrow additive
|
|
34
|
+
The compact direct/code/loader surface replaces public multimode inputs while retaining native commands and advanced outcomes. This section describes the implementation contract; dated evidence below does not qualify the current code.
|
|
35
|
+
|
|
36
|
+
| Area | Contract and verification target |
|
|
37
|
+
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
38
|
+
| RQ-0064 fixed workflows | Public job DSL removed; native `batch --bail` preserves fixed ordering, waits, explicit assertions, paced keyboard/wait rows, and timeout partial progress. Code handles branches/loops. |
|
|
39
|
+
| RQ-0065 QA | Flat `agent_browser_qa` preserves visible assertions, attached-buffer scope, diagnostic residue ambiguity, actionable/benign classification, and actual pass/fail. Fail-fast receipts separate failed checks from later `notRunChecks`; incomplete/timeout evidence stays unverified and execution counts without receipts remain unknown. |
|
|
40
|
+
| RQ-0066 / RQ-0067 source | Flat source/network tools retain bounded host scans and candidates-only semantics even in browser-only hosts. |
|
|
41
|
+
| RQ-0068 recipes | No recipe registry, persistent JavaScript, second driver, or interpreter dependency. |
|
|
42
|
+
| RQ-0072 refs | Page-scoped ref checks scan effective raw/stdin batch plans through every snapshot. A snapshot clears the invalidation latch, but a later page-changing step sets it again even when no refs precede that snapshot; later guarded ref use fails before spawn unless another snapshot intervenes. Same-snapshot fill and role-checked form-control exceptions remain. [`TOOL_CONTRACT.md`](TOOL_CONTRACT.md#details), `test/agent-browser.extension-ref-guards.test.ts` own this contract. |
|
|
43
|
+
| Native indexed batches | Exact `--omit-command` preserves index-only public receipts and spills with ordinary credential/error redaction, ordered close/reopen/ref state, and artifact verification. Original native indexes include skipped empty stdin rows; artifact requests and recording-recovery merges use compact returned-row positions, retaining unrelated artifacts and later-recording actions. Recording `outputPath` receipts use redacted internal attribution; every returned result, including unconfirmed finishes, omits step commands. Raw argv still overrides stdin. `test/agent-browser.batch-fidelity.test.ts` owns live direct/code/input/lifecycle/artifact proof on natives with `--omit-command` (0.40.0+; older supported natives skip that case); `test/agent-browser.presentation-diagnostics.test.ts` owns full-spill redaction; `test/agent-browser.storage-recovery.test.ts` owns unconfirmed-finish omission. |
|
|
44
|
+
| RQ-0096 Electron | Flat lifecycle tool preserves app/process/profile ownership and cancellation; native browser/code operations reuse its returned session. CDP readiness/liveness requires a nonempty Browser/browser string. Restored cleanup requires the launch-time process start identity and fails closed without a match. Managed fork restart dispositions `handoff`/`provisional` keep active branch-visible launches, profiles, and managed sessions for the replacement worker; `release` and absent dispositions clean as quit ([`ELECTRON.md`](ELECTRON.md)). |
|
|
45
|
+
| RQ-0142 code | Fresh permissioned Node child over persistent parent-selected browser; explicit JSON/current-cell image output, visible failures/counts, ordinary auth/config/environment, ordered Pi intent/completion transitions, child cancellation/reaping, no legacy public execution. |
|
|
46
|
+
| Hotpath boundaries | Unrelated tools/harmless Bash return before prompt policy. Latest raw user intent is seeded on start/tree, updated by `message_end` and refreshed after native content replacement. Captured admission uses a validated append-only prefix; one queued replay restores branch/lease state and folds per-session launch settings once. Per-row renderer memoization skips unchanged formatting. No broad config/trust/history cache, new wait/timer or budget increase. |
|
|
47
|
+
| Shared ordering | Actual socket/namespace/session lock spans helper/action or entire cell; sorted identity sets for replacement/cleanup and namespace barrier for direct close-all. Requires every participating Pi to run the updated package; no human/third-party/older-version guarantee or transaction. |
|
|
48
|
+
| Lightpanda engine | Chrome remains default; separately installed Lightpanda is opt-in. `--engine` uses existing managed fresh-launch recovery; effective CLI/env/config Lightpanda omits wrapper Chrome profile/executable defaults while preserving native choices. Positively identified images are text-rendered with unknown geometry, not visual/coordinate parity. No automatic fallback. `test/agent-browser.runtime.test.ts`, `test/agent-browser.shared-defaults.test.ts`, and `test/agent-browser.screenshot-geometry.test.ts` own the regressions; [limits](COMMAND_REFERENCE.md#lightpanda-engine). |
|
|
49
|
+
| Observation and geometry | Canonical bounded JSON/prose/code/native `structuredContent` observations expose exact recovery and receipts, with native namespace/output-schema metadata and canonical returned `isError`; complete observation spills preserve large output. Image dimensions/CSS viewport/DPR/crop/scroll/frame evidence is measured or explicitly unknown; no viewport-coordinate assumptions for full-page/element images. |
|
|
50
|
+
| Pi integration | Pi 1.5.0 floor with independently qualified official/fork graphs. Five advanced direct tools use native `defaultActive: false`; Pi restores transcript selections natively in default-tool sessions, and a narrow additive fallback covers `--no-builtin-tools` resumes without overriding explicit/defaultTools/filtered host selection. Loader/tree/reload retain native history; public `pi:instruction-groups` registration supplies one full `browser` instruction source. Managed hosts own deferred delivery; unmanaged/stock hosts receive identical full eager guidance even for generic prompts. No permission widening or legacy discovery metadata. `test/agent-browser.discovery.test.ts` covers full-text parity, dynamic ownership, and startup/late registration; tool-surface tests preserve host selections, with pipeline coverage in `test/agent-browser.pi-pipeline.test.ts`. No checkpoint or fork metadata/revision APIs, provider payload edits or image-detail overrides. |
|
|
51
51
|
|
|
52
52
|
See [migration](TOOL_CONTRACT.md#07-migration), [canonical observations](TOOL_CONTRACT.md#canonical-observation), and [release qualification/rollback](RELEASE.md#07-upgrade-and-rollback). Routine GitHub Actions runs official/fork Linux compatibility, a macOS packed-Pi smoke, Native lifecycle Linux, and one nonblocking latest-official native-Windows build/import/process smoke on PRs to `main`. Native Windows is best-effort. Its broader official/fork environment/full-contract/Git/npm-consumer qualification is manual-only, with real failures and artifacts retained. Release/platform evidence and review remain separate from these focused checks.
|
|
53
53
|
|
|
54
54
|
## Audit result
|
|
55
55
|
|
|
56
|
-
- Recommended upstream: `agent-browser 0.41.
|
|
56
|
+
- Recommended upstream: `agent-browser 0.41.1` (must match `TARGET_AGENT_BROWSER_VERSION` in [`scripts/agent-browser-target.mjs`](../scripts/agent-browser-target.mjs); the capability baseline imports it). Runtime support accepts stable versions at or above the 0.35.0 floor without version-specific shims.
|
|
57
57
|
- Source of truth: `CAPABILITY_BASELINE.inventorySections` in the same file (stable `id` keys: `skills`, `core-commands`, `state-tabs-frames-dialogs`, `network-storage-artifacts-diagnostics`, `batch-auth-setup-ai`, `options-and-env`).
|
|
58
|
-
- Status:
|
|
58
|
+
- Status: current help qualification targets the official 0.41.1 release binary and upstream commit `5868f7c05020e047c00e68e4abf9253cce864f41` (2026-11-01). Crossed releases 0.39.3, 0.39.4, 0.40.0, and 0.41.0 add indexed batch receipts, route CORS configuration, finite MCP CLI calls, and native fixes for completed downloads, restore-origin isolation, project-config trust, daemon `.config` cleanup, screenshots, tab/process ownership, and Windows output capture. Native owns these behaviors; no version-specific emulation is added. The `.config` fix prevents new daemon-file accumulation but does not sweep historical orphans or change the wrapper's socket-directory scan. A metadata update cannot speed an already-0.41.0 installation. Optional engines, cloud providers, and Windows remain separately qualified; see the [current guide](COMMAND_REFERENCE.md#upstream-0410-rebaseline).
|
|
59
|
+
- The 0.41.1 qualification includes native cookie-attribute parsing, error clearing, MCP selector waits, plugin-error redaction, and output/timeout limit fixes. The pinned Android source also includes `--cdp-headers`; the wrapper recognizes its value without interpreting the JSON and redacts the entire value from invocation presentation. Published npm 0.41.1 help is qualified separately and does not advertise that source-only flag. See [current qualification](COMMAND_REFERENCE.md#upstream-0411-qualification).
|
|
59
60
|
- High-priority support gaps: 2026-05-26 audit found sessionless local commands and command-scoped value flags needed sharper wrapper handling; runtime/tests/docs now cover those paths. The 0.28.0 rebaseline added local `mcp` and `plugin` surfaces plus plugin-backed credential login; wrapper docs/tests mark `mcp` and known `plugin` commands sessionless, with no compatibility shim for older upstream releases. The 0.29.1 rebaseline added upstream `@agent-browser/sandbox` helper-package guidance and stricter `install --with-deps` failure semantics; no new wrapper runtime mode or bundled dependency was required. The 0.30.1 rebaseline fixed native `wait --url` glob matching; fixed-sequence assertions use that native command. The 0.31.0 rebaseline adds restore workflow and namespace/session lifecycle surfaces (`--restore`, restore checks, `--namespace`, `session id`, and `session info`) without adding a wrapper compatibility layer. The 0.31.1 rebaseline fixes upstream React renderer selection for `react tree`, `react inspect`, and `react suspense`; no wrapper runtime change was required. The 0.31.2 rebaseline adds the local-launch-only `--webgpu` preset and `doctor --webgpu`, plus periodic restore-state autosaves controlled by `AGENT_BROWSER_AUTOSAVE_INTERVAL_MS`; the wrapper treats WebGPU as launch-scoped and, for wrapper-owned headed launches, defaults autosave off to avoid upstream 0.33.2's visible temporary storage-collector tabs while preserving save-on-close and explicit opt-in at daemon launch; changing a running daemon requires close plus a fresh launch. The 0.32.0 rebaseline hardens request/worker/popup/WebRTC containment behind `--allowed-domains`, fixes waits against already-complete documents, and adds a separate `@agent-browser/eve` package; the wrapper makes containment launch-scoped, leaves enforcement upstream-owned, and adds no Eve-specific mode. The 0.32.1–0.32.2 rebaseline updates only eve compatibility/packaging, but the full current-surface audit also found the local reference had omitted upstream `read [url]` since 0.30.0; baseline/help sampling, content-first presentation, tab-target preservation, timeout budgeting, docs, and tests now cover it. The 0.32.3–0.32.4 rebaseline adds HAR response-body capture modes, the `derive-client` skill, fixed `find role` implicit-ARIA / accessible-name matching with locator-detail misses, and an advertised `find` action list of `click, fill, check, hover, text` only; the wrapper documents and classifies those surfaces without adding a new input mode. Remaining upstream-owned caveat: some help paths still mention `wait <selector> --state hidden` / `detached`, but runtime probes show those shapes still fail, so wrapper docs keep `wait --fn` disappearance predicates and top-level `uncheck` / `type` / `focus` passthrough instead of `find` for those actions. Native 0.39.4+ fixes already-completed `wait --download <path>` and moves downloaded bytes to the requested path for locally launched browsers; attached/remote CDP paths are not movable through that operation. The current native fixture requires saved bytes and verified artifacts, while reported-but-missing output still fails through the artifact-presentation owner.
|
|
60
61
|
- MCP boundary: native 0.41.0 `mcp call <tool>` and finite stdin-driven MCP complete normally, but the wrapper currently rejects every non-help MCP invocation. Native inner session/namespace identity, cross-session coordination, credential presentation, and image delivery are not integrated. This is a concrete support limitation, not a claim that finite MCP hangs; see the [contract](TOOL_CONTRACT.md#native-mcp-boundary).
|
|
61
62
|
- Established outcomes remain: semantic/ref recovery, same-snapshot form batching, click-dispatch diagnostics, requested-artifact evidence, QA, Electron, source/network correlation, and optional Exa/Brave search. The 0.7 tools preserve these capabilities under compact direct/code and discoverable advanced contracts. Reusable browser recipes remain intentionally absent.
|
|
@@ -98,7 +99,7 @@ Current summary:
|
|
|
98
99
|
| RQ-0153 | Browser storage retains native JSONL authority, once-stored ancestral ref definitions, small correlated begin/finish events, explicit uncertainty/reuse and native-generation validation, invocation-only artifact receipts and ordered row changes. Failed persistence never retries effects; ordinary forks retain facts without acquiring parent cleanup rights. Read-only token replay automatically normalizes historical receipts through the same canonical reducer at the unchanged locator/bytes, retaining mixed-format ancestry, confirmation settings/provenance and cleanup ownership. Optional stopped separate-copy conversion reuses that decoder. | [`docs/SESSION_STORAGE.md`](SESSION_STORAGE.md), `lib/browser-transcript.ts`, `lib/browser-journal.ts`, `lib/browser-session-conversion.ts`, `test/agent-browser.storage-growth.test.ts`, `test/agent-browser.storage-recovery.test.ts`, existing script/ref/confirmation/Electron lifecycle tests |
|
|
99
100
|
| RQ-0152 | Agent feedback closes recovery and evidence gaps without a new runtime layer: unknown-target timeouts return a visibly executable `get url` → `snapshot -i` fail-fast action while dialog recovery remains allowed; successful tab creation/selection/close, including dispatched batch rows, live-verifies URL/fresh titles and retains new, selected, and post-close blank tabs; compacted direct or batched `outputPath` writes use only full command-redacted live wrapper spills and fail rather than save metadata; explicit URL reads/all-read batches avoid browser helpers and managed replacement, while proven native read confirmations preserve exact session routing and capability-gated browser independence; single session-info preflights distinguish daemon/browser/native/Pi ownership; native recording receipts expose capture versus encoded measurements and survive failure/timeout exports, with bounded identity-matched recovery and no file-only success; direct or batched first/fresh local headed launches expose an unverified `browserWindow` handoff while attachments do not; snapshot spills and SAML/OAuth URL values are redacted at model/persistence boundaries; unsupported direct/batch `scrollintoview text=...` fails before upstream false success with visible native recovery payloads while help passes through; and web search sends Exa primary/version guidance, removes exact normalized-URL duplicates without overfetch, and labels provider page dates without claiming crawl/version proof. | [`docs/TOOL_CONTRACT.md`](TOOL_CONTRACT.md), [`docs/COMMAND_REFERENCE.md`](COMMAND_REFERENCE.md), [`docs/ARCHITECTURE.md`](ARCHITECTURE.md), `test/agent-browser.extension-errors-artifacts.test.ts`, `test/agent-browser.extension-tabs.test.ts`, `test/agent-browser.extension-validation.test.ts`, `test/agent-browser.page-target-validation.test.ts`, `test/agent-browser.runtime.test.ts`, `test/agent-browser.snapshot-presentation.test.ts`, `test/agent-browser.web-search.test.ts`, `test/agent-browser.real-upstream-contract.test.ts` |
|
|
100
101
|
|
|
101
|
-
Browser journal storage (RQ-0153) uses one canonical small event/reducer, once-stored complete captures and journal-ordered artifact changes. Incomparable persisted process-start formats invalidate refs without reopening a live same-PID/socket managed page; the activation regression and proven-replacement controls live in `test/agent-browser.storage-recovery.test.ts`. `test/agent-browser.incremental-replay.test.ts` exercises real native SDK appends/tree selection and measures actual file-read bytes, with full-scan fallback for changed locators, native reseeds, rotation, truncation and same-size edits; torn publication and genuine file errors remain failures rather than cached success. Only structural metadata is reused, not selected ref definitions. `test/agent-browser.storage-growth.test.ts` protects the incident-sized map and ordinary-code growth; `test/agent-browser.storage-recovery.test.ts` covers actual append-fault dispatch counts, concurrent publication during captured-branch replay, unpublished selected-leaf refusal, unknown prefixes, same-URL generation replacement, branch conversion and strict token validation. Existing tab/ref, read-confirmation, recording, artifact and Electron lifecycle suites retain their contracts. The opt-in `test/helpers/large-browser-journal.mjs` exercises a >1 GiB original with a giant ignored value under a constrained V8 heap; it reports actual RSS separately. Official and fork load/restart qualification remains independent, and stock official
|
|
102
|
+
Browser journal storage (RQ-0153) uses one canonical small event/reducer, once-stored complete captures and journal-ordered artifact changes. Incomparable persisted process-start formats invalidate refs without reopening a live same-PID/socket managed page; the activation regression and proven-replacement controls live in `test/agent-browser.storage-recovery.test.ts`. `test/agent-browser.incremental-replay.test.ts` exercises real native SDK appends/tree selection and measures actual file-read bytes, with full-scan fallback for changed locators, native reseeds, rotation, truncation and same-size edits; torn publication and genuine file errors remain failures rather than cached success. Only structural metadata is reused, not selected ref definitions. `test/agent-browser.storage-growth.test.ts` protects the incident-sized map and ordinary-code growth; `test/agent-browser.storage-recovery.test.ts` covers actual append-fault dispatch counts, concurrent publication during captured-branch replay, unpublished selected-leaf refusal, unknown prefixes, same-URL generation replacement, branch conversion and strict token validation. Existing tab/ref, read-confirmation, recording, artifact and Electron lifecycle suites retain their contracts. The opt-in `test/helpers/large-browser-journal.mjs` exercises a >1 GiB original with a giant ignored value under a constrained V8 heap; it reports actual RSS separately. Official and fork load/restart qualification remains independent, and stock official Pi's native eager loader is not repaired by the extension alone. Ordinary legacy resume preserves the original locator and bytes; optional archive conversion is offline and source-retaining. The shared harness retains raw legacy fixtures so resume suites exercise runtime normalization, not pre-converted journals. See [`SESSION_STORAGE.md`](SESSION_STORAGE.md).
|
|
102
103
|
|
|
103
104
|
QA truthfulness (#121, RQ-0145) is covered by the registered-tool controls in `test/agent-browser.extension-input-modes.test.ts` and the strict `contract suite matches QA non-pass after same-URL error-buffer rollover` case in `test/agent-browser.real-upstream-contract.test.ts`. The real fixture fills the native error FIFO with identical rows, then verifies that a new document actually throws again at the same URL and that QA is always non-pass. Matched rows fail as an unverified check, not an application-error assertion. Empty/cleared and explicit `checkErrors: false` controls preserve valid passes; the wrapper does not fix upstream `errors --clear` or accept a warning-only pass as resolution.
|
|
104
105
|
|
|
@@ -150,11 +151,11 @@ scaling profiles remain separate from real-browser latency and host qualificatio
|
|
|
150
151
|
|
|
151
152
|
**0.38.1 PR evidence (2026-09-17, local macOS):** the full unit/fake suite passed 1,146 tests with 27 opt-in skips; the final review fixes then passed typecheck and 64 affected tests. Generated docs, live command-reference sampling, and the 132-file packaged Pi smoke passed. The real-upstream contract and 75 native batch/fidelity checks passed, as did all eight deterministic dogfood flows. Interactive compiled-checkout Pi smoke covered example.com and react.dev, delta/ref follow-ups, conditional screenshots, and a recording batch whose persisted result had two verified artifacts and no pending artifacts. Separate native probes confirmed helper-consumed WebMCP catalog updates remain visible. These checks do not qualify release-only platform/lifecycle gates; the hosted native-Windows result is recorded on the PR.
|
|
152
153
|
|
|
153
|
-
Re-run the gates below before each release. Dated outcomes in this table are historical evidence for their named source/version, not qualification of the current
|
|
154
|
+
Re-run the gates below before each release. Dated outcomes in this table are historical evidence for their named source/version, not qualification of the current implementation. The earlier 0.36.0 rebaseline passed local pre-PR, real-upstream and deterministic dogfood on 2026-09-01; the 0.35.0 floor was last validated locally on 2026-08-26. The historical 0.38.1 PR qualification used local macOS and the hosted native-Windows gate. Current explicit owner waivers take precedence; neither historical passes nor failures qualify the new candidate. Release-only cross-platform/model/lifecycle and publication gates remain separate.
|
|
154
155
|
|
|
155
156
|
| Gate | Evidence | Status |
|
|
156
157
|
| ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
157
|
-
| Native lifecycle Linux | Portable public SDK/native-browser lifecycle gate covers branch/reload, ordered code cancellation, ownership/routing, journal-begin failure and root save/reopen; see [native qualification](RELEASE.md#native-lifecycle-qualification). | Requalify the exact final source and host graph; no
|
|
158
|
+
| Native lifecycle Linux | Portable public SDK/native-browser lifecycle gate covers branch/reload, ordered code cancellation, ownership/routing, journal-begin failure and root save/reopen; see [native qualification](RELEASE.md#native-lifecycle-qualification). | Requalify the exact final source and host graph; no current candidate pass is claimed by historical evidence below. |
|
|
158
159
|
| Default local gate | `npm run verify` checks generated playbook drift, clean-builds generated `dist/`, runs `tsc --noEmit`, unit/fake tests, generated command-reference blocks, and live command-reference sampling. | **Earlier 0.36.0:** pass on 2026-09-01; 779 tests passed, two opt-in real-upstream tests skipped, and build/typecheck/docs/live command-reference gates passed. |
|
|
159
160
|
| Pre-PR local gate | `npm run verify -- pre-pr` composes the default gate with package-content verification. Use before larger local handoffs or PR-ready claims when lifecycle/platform/live dogfood cost is not warranted. | **Earlier 0.36.0 / package 0.6.2:** pass on 2026-09-01; 779 tests passed, two opt-in tests skipped, and the 127-file tarball verified. |
|
|
160
161
|
| Windows argument transport (#102/#131/#141) | `test/agent-browser.windows-argv.test.ts` exercises actual host argv, empty values, quotes, Unicode/spaces, stdin, custom shims and failure outcomes. `test/agent-browser.windows-stock-launcher.test.ts` covers the recognized global npm CMD template's direct-native path, command selection, fallback, literal LF/CRLF and cancellation. Custom or unrecognized batch launchers retain their existing newline limitation. POSIX keeps Node `spawn`. | Native Windows focused qualification on 2026-09-21 passed all seven stock-launcher controls, all 29 Chromium cases and 33 process/argv cases (two existing platform skips). Actual upstream Rust received all 12 expected operands; the original CMD path lost all four newline-bearing operands. These focused results do not replace full-suite, managed-browser, package or release gates. |
|
|
@@ -163,13 +164,13 @@ Re-run the gates below before each release. Dated outcomes in this table are his
|
|
|
163
164
|
| Startup profile | `npm run verify -- startup-profile --samples <n>` clean-builds generated `dist/`, records direct package entrypoint import/factory timing in fresh Node processes using the same `scripts/startup-measurement.mjs` measurement and 250ms budget as the startup owner test (the test retains its Android-only 1000ms exception), and writes `.artifacts/startup-profile/latest.json`. It must not launch Pi, tmux, mise, npm, browsers, or `agent-browser`; full Pi TUI ready-prompt profiling is intentionally excluded after it proved too invasive for routine verification. Run this opt-in evidence when package layout, the compiled entrypoint, top-level imports, schema registration, or prompt/config startup logic changes. | **Earlier compiled 0.6.2 entrypoint:** pass on 2026-09-01 with three samples; median 104.9 ms and max 114.5 ms, below the 250 ms budget. |
|
|
164
165
|
| Deterministic dogfood smoke | `npm run verify -- dogfood` clean-builds, then `scripts/verify-agent-browser-dogfood.ts` drives the native wrapper against a loopback HTTP fixture through persistent code aggregation, advanced QA/actions, native batch, screenshot artifact verification, and session close with the real `agent-browser` on `PATH`. | **Earlier 0.36.0 / package 0.6.2 / Pi 0.84.4:** pass on 2026-09-01; QA, script branching/cleanup, fresh/current opens, semantic clicks, job screenshot verification, and close all passed. |
|
|
165
166
|
| WebGPU and restore autosave | Live 0.31.2 feature probes validate the new upstream paths independently from ordinary browser dogfood. | **macOS:** `doctor --webgpu` passed Apple Metal render/readback and headless red-pixel screenshot checks; the official Hello Triangle sample exposed the Metal adapter and produced a verified non-black screenshot. **Ubuntu image:** `doctor --webgpu --headed --json` passed SwiftShader render/readback and red-pixel screenshot checks with the baked Vulkan/Mesa/Xvfb dependencies. **Restore autosave:** an idle headless page timer changed localStorage and the namespaced restore file contained the new value before close; test state was removed. Wrapper-owned headed launches default periodic autosave off to avoid upstream 0.33.2 visible temporary collector tabs; native close still saves, direct window close can lose newer state because headed browsers are exempt from idle shutdown, and explicit `AGENT_BROWSER_AUTOSAVE_INTERVAL_MS` opts in at daemon launch; its effective value persists across resume, and changing a running wrapper-owned headed daemon in either direction requires close plus a fresh launch. On 2026-08-06, a headed checkout dogfood run crossed `react.dev` → `example.com` → `react.dev`, idled past the autosave interval while recording, showed no temporary page switch in frame/contact-sheet review, and closed both sessions successfully; disposable evidence was removed. **Windows interactive desktop:** post-release validation on 2026-07-15 used a disposable clone of snapshot `57cc3c0d-7d7c-4a4c-9c57-8270d4174679`, a logged-in console session, `agent-browser 0.31.2`, and Edge 150. The headed doctor WebGPU render/readback subcheck passed in 0.99s and its decoded screenshot subcheck passed with `rgb(255,0,0)`; a separate `--webgpu --headed` launch opened the proof page and the Parallels console capture visibly recorded the red triangle (553,500 bright-red pixels; SHA-256 `f5a28f5336cbdfeb0ff557af9425458bddc6b266d3cc6b946de7b101a0b43288`). The full doctor remained nonzero only for the unrelated absence of a separately installed Chrome binary; the explicit Edge executable completed the launch and both WebGPU probes. Local evidence is under `.artifacts/windows-webgpu-interactive/20260715T150903Z/summary.json`; the disposable clone and temporary account were deleted afterward. |
|
|
166
|
-
| Android/Termux local bring-up | Non-release-blocking source validation uses Termux system Chromium through
|
|
167
|
+
| Android/Termux local bring-up | Non-release-blocking source validation uses an Android-native CLI build and Termux system Chromium through native PATH discovery, real Pi managed-session smoke, deterministic dogfood, and the default unit/package gate. Electron desktop lifecycle is not applicable. | **Focused native 0.41.1 repair:** on 2026-11-01, Fold8 native HTTPS reads of example.com and the Rust Book passed with default certificate verification; `doctor` passed its CDN probe and scratch Chromium launch. The official Linux-musl 0.41.1 executable failed hostname resolution on the same device. This qualifies the native repair, not the full wrapper or Android release matrix. See [native PR #2](https://github.com/fitchmultz/agent-browser/pull/2) and [Android setup](REFERENCE.md#android--termux). **Historical 0.6 local evidence (not 0.7 code qualification):** Android 17 / arm64 Termux passed implicit, explicit, and namespaced fresh sessions, managed restore, script, QA, semantic action, job, click, eval/batch stdin, screenshot attachment, recording dependencies, and cleanup; Android is not yet a Crabbox release target. |
|
|
167
168
|
| Crabbox platform smoke | `npm run check:platform-smoke` syntax-checks the harness and cheap invariants. `npm run smoke:platform:ubuntu-image` builds the project-owned Linux image, `npm run smoke:platform:doctor` checks Crabbox 0.26.0+ and local target readiness, and `npm run smoke:platform:all` runs doctor first, then fast target-local `platform-build` (`npm run verify -- platform-target`, pack, clean Pi install) plus `browser-dogfood-smoke` on required Crabbox `macos` and `ubuntu`; optional best-effort `windows-native` remains explicitly selectable and nonzero on failure; see [`platform-smoke.md`](platform-smoke.md). Target artifacts include Crabbox/provider/work-root metadata, and release review also checks provider-specific `crabbox list` commands for leftover leases/clones. | **Earlier 0.36.0 / package 0.6.2 / Pi 0.84.4:** Ubuntu `platform-build` and `browser-dogfood-smoke` passed with 11/11 assertions each on 2026-09-01, including complete artifact manifests and lease cleanup. Under explicit GitHub-only release waivers, macOS SSH and native Windows were not run because localhost SSH and `prlctl` were unavailable. |
|
|
168
169
|
| `verify -- release` / `prepublishOnly` | `npm run verify -- release` chains the default gate with the configured-source lifecycle harness, packaged Pi smoke, and the release-blocking Crabbox platform matrix (`verifySteps` `release` in [`scripts/project.mjs`](https://github.com/fitchmultz/pi-agent-browser-native/blob/main/scripts/project.mjs)). Lifecycle options after `release` (`--model`, `--timeout-ms`, `--verbose`, `--keep-artifacts`) reach only the lifecycle step. `package.json` `prepublishOnly` runs that compose before `npm pack --dry-run` during `npm publish`. It intentionally omits standalone real-upstream and host-only dogfood modes—see [`RELEASE.md`](RELEASE.md#pre-release-checks). | **Package 0.6.2:** on 2026-09-01 the default, lifecycle, package-Pi, startup, real-upstream, deterministic dogfood, harness, Ubuntu image, and Ubuntu target gates passed individually. The canonical full composition was not reported as passed because macOS SSH and native Windows were explicitly waived after doctor confirmed localhost SSH and `prlctl` were unavailable. That historical release created GitHub artifacts only; it did not authorize npm publishing. |
|
|
169
170
|
| Configured-source lifecycle | `npm run verify -- lifecycle` (`scripts/verify-lifecycle.mjs`) drives `/reload`, closes and relaunches Pi with the same exact `--session-id`, checks the JSONL session header id, session continuity, slash-command sentinel tokens (`v1` before reload and `v2` after full relaunch), persisted spill reachability, and native returned failure status and JSON preservation for a QA reclassification with a fake upstream on `PATH`. Default Pi model is `zai/glm-5.2`; default per-step wait is **180000 ms** (`DEFAULT_TIMEOUT_MS`); override model with `--model <id>` and waits with `--timeout-ms <ms>`. Passthrough flags in [`scripts/project.mjs`](https://github.com/fitchmultz/pi-agent-browser-native/blob/main/scripts/project.mjs): `--keep-artifacts`, `--model`, `--verbose`, and `--timeout-ms` plus a value (for example `npm run verify -- lifecycle --model openai-codex/gpt-5.5:minimal --keep-artifacts --verbose --timeout-ms 600000`). | **Pi 0.84.4 on 2026-09-01:** pass; `/reload`, exact-session relaunch, managed continuity, persisted spill reachability, and Pi failure status all verified. |
|
|
170
171
|
| Quick isolated Pi smoke | `pi --approve --no-extensions --no-skills -e .` from trusted repo root; checkout-native browser tools only. | **Earlier 0.36.0 / package 0.6.2 / Pi 0.84.4:** isolated checkout tmux smoke passed on 2026-09-01; native `agent_browser` completed version, localhost open, WebMCP list/invoke, visible-text verification, and close. |
|
|
171
172
|
|
|
172
|
-
Runtime floor note: package metadata requires Node 24.21.0 or newer, keeps optional Pi core package peer ranges wildcard per installed Pi package docs, keeps direct Pi development dependencies locked as reproducible snapshots while qualification resolves the latest stable official Pi and maintained fork main independently, and makes `pi --version` below 1.
|
|
173
|
+
Runtime floor note: package metadata requires Node 24.21.0 or newer, keeps optional Pi core package peer ranges wildcard per installed Pi package docs, keeps direct Pi development dependencies locked as reproducible snapshots while qualification resolves the latest stable official Pi and maintained fork main independently, and makes `pi --version` below 1.5.0 a setup failure through `pi-agent-browser-doctor` / `npm run doctor`. The Pi floor follows the native tool-history/prompt APIs and includes no older-host compatibility shim.
|
|
173
174
|
|
|
174
175
|
## Baseline checklist by inventory section
|
|
175
176
|
|
package/docs/TOOL_CONTRACT.md
CHANGED
|
@@ -17,9 +17,9 @@ The extension synchronously registers a `browser` instruction group through the
|
|
|
17
17
|
|
|
18
18
|
Group enablement reveals selected declarations and instructions, not callable permissions. `agent_browser_tools` remains the separate advanced-tool activation path. Existing host selections, exclusions, namespaces, and restored tool history are unchanged.
|
|
19
19
|
|
|
20
|
-
Pi 1.
|
|
20
|
+
Pi 1.5.0 or newer is required; official and fork qualification is independent. Five specialized direct tools declare native `defaultActive: false`: `agent_browser_action`, `agent_browser_qa`, `agent_browser_electron`, `agent_browser_source`, and `agent_browser_network_source`. They require activation unless selected by the host; they are not deferred tools. Explicit CLI allowlists, SDK selections/defaultTools, loader activation, restored tool history, tree navigation and reload are respected. Omit CLI `--tools` for lazy activation, or include every desired advanced tool in its allowlist; the loader reports excluded tools as unavailable rather than bypassing host selection.
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
On resume, Pi restores the transcript's tool loadout natively in default-tool sessions. Sessions started with `--no-builtin-tools` (SDK `noTools: "builtin"`) skip that restoration, so the extension retains a narrow additive resume fallback for available advanced tools; it never deactivates host-selected tools or bypasses an explicit allowlist/filtered catalog. Remove that fallback when Pi restores that mode natively.
|
|
23
23
|
|
|
24
24
|
## Why this tool shape
|
|
25
25
|
|
|
@@ -175,7 +175,7 @@ Use exact labels from the latest snapshot. Return to the model when a fresh obse
|
|
|
175
175
|
|
|
176
176
|
### Native capability baseline
|
|
177
177
|
|
|
178
|
-
The recommended separately installed stock native is 0.41.
|
|
178
|
+
The recommended separately installed stock native is 0.41.1; stable support still starts at 0.35.0 without an upper cap or version-specific shims. The [0.41.1 guide](COMMAND_REFERENCE.md#upstream-0411-qualification) covers native fixes, the pinned Android source's additional CDP transport-header support, and current integration limits. Native 0.39.2+ rejects hidden, disabled, and off-viewport click/double-click targets. Scroll the intended control into view and refresh refs before retrying; native success alone does not prove the application changed.
|
|
179
179
|
|
|
180
180
|
`--use-system-ca` accepts an optional separated `true`/`false` and configures CLI HTTPS requests from `read`, `install`, `upgrade`, and `doctor`, not browser launch. `--ca-cert` adds custom roots on every platform for those CLI requests; `SSL_CERT_FILE` is an ambient fallback. Native retains explicit `read` trust choices per session until close, including daemon restarts. Verification stays enabled. Remote CDP/provider TLS is not configured by these options, and browser CA trust remains Linux-Chromium-only.
|
|
181
181
|
|
|
@@ -658,7 +658,7 @@ These categories are intentionally bounded and stable so agents can branch on th
|
|
|
658
658
|
|
|
659
659
|
For argv-supplied `--allowed-domains`, the wrapper treats domain containment as launch-scoped. Upstream owns request, worker, popup, and WebRTC containment plus incompatible-mode rejection; the wrapper passes the setting and upstream result through unchanged.
|
|
660
660
|
|
|
661
|
-
Final public results return canonical `isError: true` when `resultCategory` is `failure`; Pi
|
|
661
|
+
Final public results return canonical `isError: true` when `resultCategory` is `failure`; Pi honors that return without a `tool_result` repair hook. For normal prose, finalization appends `Result category: failure; failureCategory: …; Pi tool isError: true.` to model-visible text. Explicit parseable JSON remains unchanged, including code JSON and preparation failures; invalid/non-JSON text retains the notice. The TUI also shows the category at the top of failed rendered results so collapsed rows keep the outcome visible. Shared finalization lives in `lib/native-output.ts` and `finalizeAgentBrowserFailure` in `lib/pi-tool-rendering.ts`. This keeps transcript, UI and structured outcomes aligned after wrapper-side reclassification such as `qa-failure` or `artifact-missing`.
|
|
662
662
|
|
|
663
663
|
For `batch`, top-level `details` still carries `resultCategory` plus `successCategory` or `failureCategory` for the **aggregate** tool outcome: if any step fails, the overall result is a failure (`resultCategory: "failure"`) even when later steps succeed—inspect `batchSteps[]` for per-step outcomes. Each `batchSteps[]` entry includes its own `resultCategory` and either `successCategory` or `failureCategory` for that step. When upstream reports it, successful and failed rows also expose a dedicated `lifecycle` field containing only the bounded `effectiveLaunch.browserLaunched` boolean; on failed rows this preserves launch evidence even though the ordinary result payload is omitted. Live state and transcript replay use that evidence to distinguish a terminal nested close from a post-close browser launch. `batchFailure.failedStep` duplicates the first failing step’s details, including its `failureCategory`, bounded lifecycle evidence, and any `nextActions`.
|
|
664
664
|
|
package/docs/platform-smoke.md
CHANGED
|
@@ -43,7 +43,7 @@ npm run verify -- platform-smoke run --target ubuntu --suite platform-build
|
|
|
43
43
|
|
|
44
44
|
With maintainer approval, local macOS execution can replace localhost SSH. For native Windows, routine GitHub Actions includes only the nonblocking smoke. On-demand full Windows jobs and Crabbox/Parallels target results retain their own scope and failures; neither is substituted for required macOS/Ubuntu evidence or relabeled a browser-dogfood pass. Record alternate native checks separately from Crabbox SSH or Parallels results. The default `release` and `prepublishOnly` commands still select the Crabbox matrix; record alternate suite evidence separately rather than reporting those commands as passed.
|
|
45
45
|
|
|
46
|
-
On macOS, run the unchanged commands returned by `buildPlatformBuildCommand('macos', 'pi-agent-browser-native', '24.21.0')` and `buildBrowserDogfoodCommand('macos', '0.41.
|
|
46
|
+
On macOS, run the unchanged commands returned by `buildPlatformBuildCommand('macos', 'pi-agent-browser-native', '24.21.0')` and `buildBrowserDogfoodCommand('macos', '0.41.1', true)` in [`scripts/platform-smoke/targets.mjs`](../scripts/platform-smoke/targets.mjs), serially in a clean private source copy. Use private HOME, npm and Pi settings, and headless browser profiles, and clear inherited `PI_*` variables first: a shell started from Pi exports `PI_PACKAGE_DIR` and `PI_MANAGED_CLI`, which make the archived Pi CLI report the host package instead of the locked suite version. No Remote Login or host security change is required.
|
|
47
47
|
|
|
48
48
|
Retain the exact source head/tree, package and tool versions, native OS/architecture, generated commands, stdout/stderr, every `PLATFORM_*` exit marker, actual Pi registration output, dogfood JSON and verified screenshot. Check the suite assertions below and clean up only the run's processes and temporary files. These alternatives do not waive Ubuntu or any non-platform release check.
|
|
49
49
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-browser-native",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.10",
|
|
4
4
|
"description": "pi extension that exposes agent-browser as a native tool for browser automation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Mitch Fultz (https://github.com/fitchmultz)",
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
"typebox": "*"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"@earendil-works/pi-ai": "1.0
|
|
88
|
-
"@earendil-works/pi-coding-agent": "1.0
|
|
89
|
-
"@earendil-works/pi-tui": "1.0
|
|
87
|
+
"@earendil-works/pi-ai": "1.5.0",
|
|
88
|
+
"@earendil-works/pi-coding-agent": "1.5.0",
|
|
89
|
+
"@earendil-works/pi-tui": "1.5.0",
|
|
90
90
|
"@types/cross-spawn": "6.0.6",
|
|
91
91
|
"@types/node": "24.19.1",
|
|
92
92
|
"@types/which": "2.0.2",
|
|
@@ -153,8 +153,5 @@
|
|
|
153
153
|
"stream-json": "3.7.0",
|
|
154
154
|
"strip-json-comments": "5.0.3",
|
|
155
155
|
"which": "2.0.2"
|
|
156
|
-
},
|
|
157
|
-
"overrides": {
|
|
158
|
-
"undici": "8.12.3"
|
|
159
156
|
}
|
|
160
157
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const TARGET_AGENT_BROWSER_SOURCE = "scripts/agent-browser-target.mjs";
|
|
2
|
-
export const TARGET_AGENT_BROWSER_VERSION = "0.41.
|
|
2
|
+
export const TARGET_AGENT_BROWSER_VERSION = "0.41.1";
|
|
3
3
|
export const TARGET_AGENT_BROWSER_VERSION_LABEL = `agent-browser ${TARGET_AGENT_BROWSER_VERSION}`;
|
|
4
4
|
export const MINIMUM_AGENT_BROWSER_VERSION = "0.35.0";
|
|
5
5
|
export const MINIMUM_AGENT_BROWSER_VERSION_LABEL = `agent-browser ${MINIMUM_AGENT_BROWSER_VERSION}`;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/** Audited upstream source evidence and the native help commands sampled for drift. */
|
|
2
2
|
export const sourceEvidence = Object.freeze({
|
|
3
3
|
repository: "vercel-labs/agent-browser",
|
|
4
|
-
upstreamHead: "
|
|
5
|
-
upstreamPackageVersion: "0.41.
|
|
4
|
+
upstreamHead: "5868f7c05020e047c00e68e4abf9253cce864f41",
|
|
5
|
+
upstreamPackageVersion: "0.41.1",
|
|
6
6
|
inspectedSources: Object.freeze([
|
|
7
|
-
"stock npm agent-browser@0.41.
|
|
7
|
+
"stock npm agent-browser@0.41.1 package, official release binary, and upstream source",
|
|
8
8
|
"agent-browser --version",
|
|
9
9
|
"agent-browser --help",
|
|
10
10
|
"selected agent-browser <command> --help output",
|
|
@@ -35,6 +35,7 @@ export const sourceEvidence = Object.freeze({
|
|
|
35
35
|
"cli/src/native/a11y/mod.rs",
|
|
36
36
|
"cli/src/native/browser.rs",
|
|
37
37
|
"cli/src/native/cdp/obscura.rs",
|
|
38
|
+
"cli/src/native/cdp/discovery.rs",
|
|
38
39
|
"cli/src/native/policy.rs",
|
|
39
40
|
"cli/src/native/providers.rs",
|
|
40
41
|
"cli/src/native/tab_binding.rs",
|
package/scripts/doctor.mjs
CHANGED
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
|
|
27
27
|
const execFile = promisify(execFileCallback);
|
|
28
28
|
const RECOMMENDED_VERSION = TARGET_AGENT_BROWSER_VERSION;
|
|
29
|
-
export const MINIMUM_PI_VERSION = "1.
|
|
29
|
+
export const MINIMUM_PI_VERSION = "1.5.0";
|
|
30
30
|
const DEFAULT_AGENT_DIR = resolve(homedir(), ".pi/agent");
|
|
31
31
|
|
|
32
32
|
/** @typedef {{readonly status: "pass" | "warn" | "fail", readonly title: string, readonly lines: readonly string[], readonly warnings?: readonly string[]}} DoctorCheck */
|