pi-agent-browser-native 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/extensions/agent-browser/index.js +0 -5
- package/dist/extensions/agent-browser/lib/tool-surface.js +9 -2
- package/docs/RELEASE.md +6 -8
- package/docs/SUPPORT_MATRIX.md +2 -2
- package/docs/platform-smoke.md +2 -2
- package/package.json +1 -1
- package/scripts/doctor.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.7.1 - 2026-09-22
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Defer the native replay helper import until awaited session restoration, preserving fast package registration and the complete restored tool surface. Public browser commands and saved-session behavior remain unchanged.
|
|
8
|
+
|
|
3
9
|
## 0.7.0 - 2026-09-22
|
|
4
10
|
|
|
5
11
|
### Changed
|
|
@@ -2032,11 +2032,6 @@ export default function agentBrowserExtension(pi, { beforeExecute } = {}) {
|
|
|
2032
2032
|
return finalizeObservation(result, params, ctx);
|
|
2033
2033
|
},
|
|
2034
2034
|
executionMode: beforeExecute ? "sequential" : undefined,
|
|
2035
|
-
renderCodeCall(args, theme, context) {
|
|
2036
|
-
const text = context.lastComponent instanceof Text ? context.lastComponent : new Text("", 0, 0);
|
|
2037
|
-
text.setText(formatAgentBrowserRenderCall(args, theme, context.expanded));
|
|
2038
|
-
return text;
|
|
2039
|
-
},
|
|
2040
2035
|
promptGuidelines: toolPromptGuidelines,
|
|
2041
2036
|
renderCall: agentBrowserTool.renderCall, renderResult: agentBrowserTool.renderResult,
|
|
2042
2037
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Text } from "@earendil-works/pi-tui";
|
|
2
|
+
import { formatAgentBrowserRenderCall } from "./pi-tool-rendering.js";
|
|
2
3
|
import { AGENT_BROWSER_PARAMS, AGENT_BROWSER_CODE_PARAMS, AGENT_BROWSER_ACTION_PARAMS, AGENT_BROWSER_QA_PARAMS, AGENT_BROWSER_ELECTRON_PARAMS, AGENT_BROWSER_SOURCE_PARAMS, AGENT_BROWSER_NETWORK_SOURCE_PARAMS, AGENT_BROWSER_TOOLS_PARAMS, } from "./input-modes/params.js";
|
|
3
4
|
import { ADVANCED_TOOL_PROMPT_GUIDELINES, buildToolPromptGuidelines } from "./playbook.js";
|
|
4
5
|
export const AGENT_BROWSER_TOOL_INVENTORY = {
|
|
@@ -32,7 +33,11 @@ export function registerAgentBrowserToolSurface(pi, options) {
|
|
|
32
33
|
constrainedSampling: { type: "json_schema", strict: "prefer" },
|
|
33
34
|
execute: options.executeCode,
|
|
34
35
|
executionMode: options.executionMode,
|
|
35
|
-
renderCall
|
|
36
|
+
renderCall(args, theme, context) {
|
|
37
|
+
const text = context.lastComponent instanceof Text ? context.lastComponent : new Text("", 0, 0);
|
|
38
|
+
text.setText(formatAgentBrowserRenderCall(args, theme, context.expanded));
|
|
39
|
+
return text;
|
|
40
|
+
},
|
|
36
41
|
renderResult: options.renderResult,
|
|
37
42
|
});
|
|
38
43
|
pi.registerTool({
|
|
@@ -123,6 +128,8 @@ export function registerAgentBrowserToolSurface(pi, options) {
|
|
|
123
128
|
const available = new Set(pi.getAllTools().map(({ name }) => name));
|
|
124
129
|
if (!["agent_browser", "agent_browser_code", "agent_browser_tools", ...advancedNames].every(name => available.has(name)))
|
|
125
130
|
return;
|
|
131
|
+
// Keep Pi's replay helper behind the awaited restoration boundary, not factory registration.
|
|
132
|
+
const { getCurrentSystemMessage } = await import("@earendil-works/pi-ai");
|
|
126
133
|
const current = getCurrentSystemMessage(ctx.sessionManager.buildSessionProjection().messages);
|
|
127
134
|
const restored = new Set(current?.toolsAdded?.map(({ name }) => name));
|
|
128
135
|
const active = pi.getActiveTools().filter((name) => !advancedNames.has(name) || restored.has(name));
|
package/docs/RELEASE.md
CHANGED
|
@@ -39,7 +39,7 @@ The minimum Pi runtime is 0.87.0, matching the native APIs used by the new tool
|
|
|
39
39
|
|
|
40
40
|
Qualify official Pi 0.87 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.
|
|
41
41
|
|
|
42
|
-
Existing owner waivers remain authoritative. Windows qualification is waived; report diagnostic failures without claiming a pass or restarting waived repair work. GitHub Actions
|
|
42
|
+
Existing owner waivers remain authoritative. Windows qualification is waived; report diagnostic failures without claiming a pass or restarting waived repair work. Routine GitHub Actions now runs on PRs to `main` and manual dispatch, with no Windows CI job. These focused checks complement, rather than replace, the local release and publication gates.
|
|
43
43
|
|
|
44
44
|
## Pre-release checks
|
|
45
45
|
|
|
@@ -71,7 +71,7 @@ npm run verify -- pre-pr
|
|
|
71
71
|
3. `npm run verify -- package-pi`, which first validates package contents via `npm pack --json --dry-run` and then smoke-loads the packed package in Pi isolation
|
|
72
72
|
4. `npm run smoke:platform:doctor` and the full Crabbox matrix from [`platform-smoke.md`](platform-smoke.md): macOS SSH, Ubuntu local-container, and native Windows Parallels targets running fast target-local `platform-build` plus `browser-dogfood-smoke`
|
|
73
73
|
|
|
74
|
-
When using the documented, maintainer-approved [local macOS
|
|
74
|
+
When using the documented, maintainer-approved [local macOS alternative](platform-smoke.md#alternate-native-transports), run and inspect that target-local suite separately alongside the remaining release checks. The default composed gate is unchanged; alternate evidence must not be labeled a passing Crabbox matrix.
|
|
75
75
|
|
|
76
76
|
`npm publish` runs npm’s `prepublishOnly` script from `package.json`, which executes the same `npm run verify -- release` gate and then `npm pack --dry-run`. That concatenated gate is everything in the default `npm run verify` step (generated playbook drift, clean `dist/` build, TypeScript, the unit/fake suite, generated command-reference blocks, and live upstream command-reference sampling against the targeted `agent-browser` on `PATH`), the configured-source lifecycle harness, the packaged Pi smoke in `package-pi`, and the release-blocking Crabbox platform matrix. Using `npm publish --ignore-scripts` skips that contract intentionally.
|
|
77
77
|
|
|
@@ -322,15 +322,13 @@ node --test test/agent-browser.checkpoint-native.test.mjs
|
|
|
322
322
|
|
|
323
323
|
`PI_CHECKPOINT_TEST_EXTENSION` can select a separate baseline checkout. With `PI_CHECKPOINT_TEST_BASELINE_RESTORE=1`, only its existing root-restore path runs and every receipt must retain the old shutdown blocker; this is not positive sleep qualification. The SDK selector is test-only; it does not change package peers or activate an extension. This gate is separate from the default 0.84 unit fixtures and release/platform/model-based gates. Qualification is for ordinary native save-on-close and explicit URL reopen, not a live browser snapshot. Journal fault injection checks that ongoing native I/O errors reject acquisition and preserve prior bytes/accepted entries. Permission repair must recover through core capture without repeating the failed append; recording retry and cleanup leases remain extension-owned. The test also checks exact repaired entries/selection in a separate-process strict cold restore and rejection of a mismatched artifact. After explicit close it observes native daemon exit before asserting idle readiness; an acknowledgement alone is not proof of inactivity. The abnormal-restart regression kills only its exact SDK fixture PID after ordinary branch navigation, then reopens the real journal in a fresh SDK process. It verifies that the off-branch wrapper-created daemon blocks capture without acquiring cleanup ownership, and that explicit managed-looking names and a nonowned namespace retain ambient routing. Same-namespace/same-name controls check distinct live daemons in owned and ambient socket roots, continued blocking after closing only the caller, ambient-only blocking after closing the historical daemon, and positive readiness after both are explicitly closed. All browser ownership evidence comes from executed native tools, never injected ownership records.
|
|
324
324
|
|
|
325
|
-
####
|
|
325
|
+
#### Routine GitHub PR checks
|
|
326
326
|
|
|
327
|
-
[`.github/workflows/
|
|
327
|
+
[`.github/workflows/pi-compatibility.yml`](https://github.com/fitchmultz/pi-agent-browser-native/blob/main/.github/workflows/pi-compatibility.yml) runs on PRs to `main` and manual dispatch. Independent Ubuntu jobs qualify the locked official Pi graph on Node 22.19.0 and the pinned fork's complete installed graph on Node 24.21.0. Each runs `check:compat` once: host identity, typecheck, the full offline suite, and packed SDK/CLI loading. A parallel macOS Node 24 job checks the packed Pi load without repeating the full suite. When the candidate official version differs from the supported Pi floor, that macOS job also selects the actual floor graph for a focused type/package smoke. The host selector uses the pinned `fitchmultz/.github` automation scripts without changing them. There are no cross-job host artifacts or persistent caches.
|
|
328
328
|
|
|
329
|
-
|
|
329
|
+
[`.github/workflows/native-checkpoint.yml`](https://github.com/fitchmultz/pi-agent-browser-native/blob/main/.github/workflows/native-checkpoint.yml) independently checks out the PR head and runs on the same PR/manual triggers. Its CI-only [`ci-native-checkpoint.sh`](https://github.com/fitchmultz/pi-agent-browser-native/blob/main/scripts/ci-native-checkpoint.sh) builds the pinned fork and compiled extension on Node **26.9.0**, installs stock **agent-browser 0.38.1** and Chrome for Testing, checks generated playbook and live command-reference drift, then requires **13 passed, zero failed/cancelled/skipped/todo** real-browser checkpoints. It does not repeat the official full suite. Sources use a private `/tmp` root, sanitized environment, non-root execution, and a loopback-only network namespace. No personal profile, credentials, or model calls are involved.
|
|
330
330
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
CI uploads raw setup/build/provenance logs, Node 26 and document verification output, and native TAP (including receipts), even on failure. Chrome is downloaded through the pinned stock installer, not separately version-pinned; the actual browser version is logged. These checks prove synthetic native behavior on that runner and sourcehost, not real-site authentication, Electron-app behavior, managed-key cold portability, or complete personal qualification. Passing this gate does not replace code review or full personal-workspace acceptance.
|
|
331
|
+
CI writes setup, provenance, command-reference, and native TAP results to the job log instead of uploading artifacts. The checks cover their exact source, host, and synthetic browser paths; they do not replace release/manual-publication gates, real-site authentication, or full personal-workspace sleep/resume qualification.
|
|
334
332
|
|
|
335
333
|
### Native Linux socket-root regression
|
|
336
334
|
|
package/docs/SUPPORT_MATRIX.md
CHANGED
|
@@ -42,7 +42,7 @@ The compact direct/code/loader surface replaces public multimode inputs while re
|
|
|
42
42
|
| Observation and geometry | Canonical bounded JSON/prose/code observations expose exact recovery and receipts; 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. |
|
|
43
43
|
| Pi integration | Native additive activation/history and prompt sections on independently qualified official Pi 0.87 and fork; optional checkpoint hooks, no provider payload/image-detail overrides. |
|
|
44
44
|
|
|
45
|
-
See [migration](TOOL_CONTRACT.md#07-migration), [canonical observations](TOOL_CONTRACT.md#canonical-observation), and [release qualification/rollback](RELEASE.md#07-upgrade-and-rollback).
|
|
45
|
+
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, and native Linux checkpoints on PRs to `main`; Windows CI is excluded. Release/platform evidence and review remain separate from these focused checks.
|
|
46
46
|
|
|
47
47
|
## Audit result
|
|
48
48
|
|
|
@@ -123,7 +123,7 @@ At runtime source `3a9adf490883149e7f79ee070d1900877e17b891`, PR compatibility p
|
|
|
123
123
|
|
|
124
124
|
Fresh precommit evidence for that runtime passed real Pi checkout/live-site and supported disposable Electron smoke, configured-source lifecycle, packaged runtime-only SDK/CLI loading, real-upstream checks, native macOS and the canonical named Ubuntu target (Debian 12). Local macOS is the documented alternate, not an SSH pass. Docs/workflow-only delivery may reuse this runtime evidence only after all 104 rebuilt runtime files match the checked artifact; changed published docs require a newly checked retained tarball. No additional paid/live gate is implied by an otherwise byte-identical runtime.
|
|
125
125
|
|
|
126
|
-
Linux/macOS, declared Node floors, official/fork host identities, required consumer artifacts and Native checkpoint Linux remain required.
|
|
126
|
+
Linux/macOS, declared Node floors, official/fork host identities, required consumer artifacts and Native checkpoint Linux remain required. Routine GitHub Actions is enabled for PRs to `main` and manual dispatch; its focused results do not substitute for the release and platform gates. Retain all three final reviewer approvals before merge/release/activation. The unchanged composed `release`/`prepublishOnly` command still includes Windows and is not reported as passed under this waiver; see [release guidance](RELEASE.md#current-0616-rollout-waiver).
|
|
127
127
|
|
|
128
128
|
## Verification evidence
|
|
129
129
|
|
package/docs/platform-smoke.md
CHANGED
|
@@ -40,11 +40,11 @@ npm run verify -- platform-smoke run --target ubuntu --suite platform-build
|
|
|
40
40
|
|
|
41
41
|
## Alternate native transports
|
|
42
42
|
|
|
43
|
-
With maintainer approval, local macOS execution can replace localhost SSH
|
|
43
|
+
With maintainer approval, local macOS execution can replace localhost SSH. Routine GitHub Actions has no Windows job; the separate Crabbox/Parallels release target remains as documented above. 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.
|
|
44
44
|
|
|
45
45
|
On macOS, run the unchanged commands returned by `buildPlatformBuildCommand('macos', 'pi-agent-browser-native', 24)` and `buildBrowserDogfoodCommand('macos', '0.38.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. No Remote Login or host security change is required.
|
|
46
46
|
|
|
47
|
-
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.
|
|
47
|
+
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.
|
|
48
48
|
|
|
49
49
|
## Required environment
|
|
50
50
|
|
package/package.json
CHANGED
package/scripts/doctor.mjs
CHANGED
|
@@ -26,7 +26,7 @@ const EXTENSION_ENTRYPOINTS = Object.freeze([
|
|
|
26
26
|
"dist/extensions/agent-browser/index.js",
|
|
27
27
|
]);
|
|
28
28
|
const RECOMMENDED_VERSION = TARGET_AGENT_BROWSER_VERSION;
|
|
29
|
-
const MINIMUM_PI_VERSION = "0.87.0";
|
|
29
|
+
export const MINIMUM_PI_VERSION = "0.87.0";
|
|
30
30
|
const DEFAULT_AGENT_DIR = resolve(homedir(), ".pi/agent");
|
|
31
31
|
const THIS_PACKAGE_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
|
32
32
|
|