pi-agent-browser-native 0.2.50 → 0.2.51
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 +10 -0
- package/README.md +1 -1
- package/docs/RELEASE.md +1 -1
- package/package.json +4 -3
- package/scripts/prepare.mjs +68 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.2.51 - 2026-06-11
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Made the source-package `prepare` lifecycle install dev dependencies with scripts disabled when Pi's `npm install --omit=dev` package path omits the compiler and peer type packages, so GitHub/source installs can still build `dist/` from a clean clone without changing runtime dependency policy.
|
|
10
|
+
|
|
11
|
+
### Validation
|
|
12
|
+
|
|
13
|
+
- Reproduced the `pi install -l --approve https://github.com/fitchmultz/pi-agent-browser-native@v0.2.50` source-install failure, then verified production-dependency source builds, project-local GitHub install, project-local npm install, and release gates before publish.
|
|
14
|
+
|
|
5
15
|
## 0.2.50 - 2026-06-11
|
|
6
16
|
|
|
7
17
|
### Changed
|
package/README.md
CHANGED
|
@@ -575,7 +575,7 @@ For larger local handoffs or PR-ready confidence before expensive release/lifecy
|
|
|
575
575
|
npm run verify -- pre-pr
|
|
576
576
|
```
|
|
577
577
|
|
|
578
|
-
That mode composes the full default gate with `npm run verify -- package`, so package contents and forbidden archived/repo-only files are checked without launching Pi lifecycle, Crabbox, or live dogfood flows. Package, package-pi, lifecycle, platform-target, and startup-profile modes all build `dist/` first so clean checkouts do not validate stale or missing compiled output. GitHub/source installs run the package `prepare` script
|
|
578
|
+
That mode composes the full default gate with `npm run verify -- package`, so package contents and forbidden archived/repo-only files are checked without launching Pi lifecycle, Crabbox, or live dogfood flows. Package, package-pi, lifecycle, platform-target, and startup-profile modes all build `dist/` first so clean checkouts do not validate stale or missing compiled output. GitHub/source installs run the package `prepare` script; when Pi installs with `npm install --omit=dev`, that script installs the source-build dev dependencies with lifecycle scripts disabled before building the ignored `dist/` entrypoint that Pi loads.
|
|
579
579
|
|
|
580
580
|
The deterministic agent-efficiency benchmark’s **standalone JSON/Markdown accounting run** is not part of default or pre-PR `npm run verify` (only `npm run verify -- benchmark` or `npm run benchmark:agent-browser` invokes the script). The full unit suite still exercises `test/agent-browser.efficiency-benchmark.test.ts`. Use the script before and after agent-facing abstractions to prove call-count, output-size, stale-ref, artifact, failure-category coverage, success-rate, and elapsed-time effects before changing the wrapper UX:
|
|
581
581
|
|
package/docs/RELEASE.md
CHANGED
|
@@ -178,7 +178,7 @@ Maintainer constraints for evolving scenarios and version bumps are summarized u
|
|
|
178
178
|
- `LICENSE` exists in the repo and the packed tarball
|
|
179
179
|
- canonical published docs are present
|
|
180
180
|
- `npm pack --json --dry-run` runs the `prepack` build and packs the compiled `dist/extensions/agent-browser/index.js` entrypoint
|
|
181
|
-
- GitHub/source installs run the package `prepare` build so Pi can load the ignored compiled `dist/extensions/agent-browser/index.js` entrypoint from a fresh clone
|
|
181
|
+
- GitHub/source installs run the package `prepare` build; when Pi installs with `npm install --omit=dev`, `scripts/prepare.mjs` installs source-build dev dependencies with lifecycle scripts disabled before building so Pi can load the ignored compiled `dist/extensions/agent-browser/index.js` entrypoint from a fresh clone
|
|
182
182
|
- the package-level doctor command and capability baseline are present
|
|
183
183
|
- compiled extension runtime files are present, including the split result-rendering modules required by the published facade
|
|
184
184
|
- source-only, agent-only, and superseded docs are absent from the tarball
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-browser-native",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.51",
|
|
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)",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"platform-smoke.config.mjs",
|
|
36
36
|
"scripts/config.mjs",
|
|
37
37
|
"scripts/doctor.mjs",
|
|
38
|
+
"scripts/prepare.mjs",
|
|
38
39
|
"scripts/agent-browser-capability-baseline.mjs",
|
|
39
40
|
"scripts/platform-smoke.mjs",
|
|
40
41
|
"scripts/platform-smoke",
|
|
@@ -65,7 +66,7 @@
|
|
|
65
66
|
"@earendil-works/pi-ai": "0.79.1",
|
|
66
67
|
"@earendil-works/pi-coding-agent": "0.79.1",
|
|
67
68
|
"@earendil-works/pi-tui": "0.79.1",
|
|
68
|
-
"@types/node": "^25.
|
|
69
|
+
"@types/node": "^25.9.3",
|
|
69
70
|
"tsx": "^4.21.0",
|
|
70
71
|
"typebox": "^1.1.38",
|
|
71
72
|
"typescript": "^6.0.3"
|
|
@@ -92,7 +93,7 @@
|
|
|
92
93
|
"build": "node ./scripts/build.mjs",
|
|
93
94
|
"startup-profile": "node ./scripts/profile-startup.mjs",
|
|
94
95
|
"prepack": "npm run build",
|
|
95
|
-
"prepare": "
|
|
96
|
+
"prepare": "node ./scripts/prepare.mjs"
|
|
96
97
|
},
|
|
97
98
|
"packageManager": "npm@11.14.0"
|
|
98
99
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Purpose: Build generated dist output for GitHub/source installs even when Pi invokes npm install --omit=dev.
|
|
4
|
+
* Responsibilities: Detect missing source-build dependencies, install dev dependencies with lifecycle scripts disabled, then run the canonical build.
|
|
5
|
+
* Scope: Package install lifecycle only; npm tarball contents and runtime behavior remain owned by scripts/build.mjs.
|
|
6
|
+
* Usage: package.json prepare script.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { execFile as execFileCallback } from "node:child_process";
|
|
10
|
+
import { createRequire } from "node:module";
|
|
11
|
+
import { join } from "node:path";
|
|
12
|
+
import process from "node:process";
|
|
13
|
+
import { promisify } from "node:util";
|
|
14
|
+
|
|
15
|
+
const execFile = promisify(execFileCallback);
|
|
16
|
+
const require = createRequire(import.meta.url);
|
|
17
|
+
const REQUIRED_SOURCE_BUILD_MODULES = [
|
|
18
|
+
"typescript",
|
|
19
|
+
"typebox",
|
|
20
|
+
"@earendil-works/pi-coding-agent",
|
|
21
|
+
"@earendil-works/pi-tui",
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
function canResolveBuildDependencies() {
|
|
25
|
+
return REQUIRED_SOURCE_BUILD_MODULES.every((moduleName) => {
|
|
26
|
+
try {
|
|
27
|
+
require.resolve(moduleName);
|
|
28
|
+
return true;
|
|
29
|
+
} catch {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async function runNpmInstallDevDependencies() {
|
|
36
|
+
const npmExecPath = process.env.npm_execpath;
|
|
37
|
+
const options = process.platform === "win32" ? { shell: true } : {};
|
|
38
|
+
if (npmExecPath) {
|
|
39
|
+
await execFile(process.execPath, [npmExecPath, "install", "--include=dev", "--ignore-scripts"], {
|
|
40
|
+
...options,
|
|
41
|
+
cwd: process.cwd(),
|
|
42
|
+
maxBuffer: 20 * 1024 * 1024,
|
|
43
|
+
});
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
await execFile("npm", ["install", "--include=dev", "--ignore-scripts"], {
|
|
47
|
+
...options,
|
|
48
|
+
cwd: process.cwd(),
|
|
49
|
+
maxBuffer: 20 * 1024 * 1024,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
async function main() {
|
|
54
|
+
if (!canResolveBuildDependencies()) {
|
|
55
|
+
await runNpmInstallDevDependencies();
|
|
56
|
+
}
|
|
57
|
+
await execFile(process.execPath, [join(process.cwd(), "scripts", "build.mjs")], {
|
|
58
|
+
cwd: process.cwd(),
|
|
59
|
+
maxBuffer: 20 * 1024 * 1024,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
main().catch((error) => {
|
|
64
|
+
if (error?.stdout) process.stdout.write(error.stdout);
|
|
65
|
+
if (error?.stderr) process.stderr.write(error.stderr);
|
|
66
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
67
|
+
process.exitCode = 1;
|
|
68
|
+
});
|