pi-browser-use 0.10.1 → 0.11.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.
Files changed (55) hide show
  1. package/dist/annotate.d.ts +0 -14
  2. package/dist/annotate.js +0 -14
  3. package/dist/artifacts.d.ts +0 -2
  4. package/dist/artifacts.js +0 -2
  5. package/dist/auth-verifiers.d.ts +0 -29
  6. package/dist/auth-verifiers.js +0 -31
  7. package/dist/chrome-launcher.d.ts +0 -59
  8. package/dist/chrome-launcher.js +1 -55
  9. package/dist/client.d.ts +0 -4
  10. package/dist/client.js +0 -17
  11. package/dist/config.d.ts +0 -25
  12. package/dist/config.js +0 -23
  13. package/dist/doctor.d.ts +0 -8
  14. package/dist/doctor.js +0 -5
  15. package/dist/existing-flow.d.ts +0 -31
  16. package/dist/existing-flow.js +0 -29
  17. package/dist/focus-policy.d.ts +0 -13
  18. package/dist/focus-policy.js +0 -13
  19. package/dist/index.d.ts +0 -1
  20. package/dist/index.js +0 -1
  21. package/dist/mcp-server.d.ts +0 -2
  22. package/dist/mcp-server.js +0 -10
  23. package/dist/named-profile.d.ts +0 -36
  24. package/dist/named-profile.js +0 -37
  25. package/dist/persistent-backend.d.ts +2 -56
  26. package/dist/persistent-backend.js +30 -65
  27. package/dist/persistent-store.d.ts +0 -24
  28. package/dist/persistent-store.js +0 -24
  29. package/dist/profile-lock.d.ts +0 -21
  30. package/dist/profile-lock.js +0 -27
  31. package/dist/profile.d.ts +0 -10
  32. package/dist/profile.js +0 -14
  33. package/dist/runtime.d.ts +0 -3
  34. package/dist/runtime.js +3 -92
  35. package/dist/session-manager.d.ts +0 -48
  36. package/dist/session-manager.js +0 -46
  37. package/dist/session.d.ts +0 -42
  38. package/dist/session.js +0 -18
  39. package/dist/settings.d.ts +0 -5
  40. package/dist/settings.js +0 -5
  41. package/dist/setup-flow.d.ts +0 -41
  42. package/dist/setup-flow.js +0 -37
  43. package/dist/shared-backend.d.ts +0 -30
  44. package/dist/shared-backend.js +0 -31
  45. package/dist/tab-bridge.d.ts +0 -27
  46. package/dist/tab-bridge.js +0 -27
  47. package/dist/tool-augment.d.ts +0 -9
  48. package/dist/tool-augment.js +0 -14
  49. package/dist/vision.d.ts +0 -17
  50. package/dist/vision.js +0 -17
  51. package/docs/performance.md +14 -0
  52. package/extension/README.md +2 -0
  53. package/extension/background.js +4 -9
  54. package/package.json +4 -2
  55. package/plugin.json +1 -1
@@ -41,6 +41,8 @@ Budgets live in [`performance-budgets.json`](../performance-budgets.json). They
41
41
  | Published map files | 0 |
42
42
  | Production dependency closure | 140 packages |
43
43
 
44
+ The published artifact stays byte-lean by design: `tsconfig.json` sets `removeComments` so emitted JavaScript and declarations carry no comment bytes, and build maps never ship. Source commentary lives in the repository, not in the installed package.
45
+
44
46
  ## Reproduce locally and in CI
45
47
 
46
48
  ```sh
@@ -57,3 +59,15 @@ npm run bench -- --startup-only --json
57
59
  ```
58
60
 
59
61
  `perf:audit` and `bench --json` are suitable for machine capture. Use at least seven cold imports and ten runtime iterations when updating the table. Record Node, OS, architecture, commit, and whether Chrome was headless; do not compare results collected with different modes or iteration counts.
62
+
63
+ ## Task-level evaluation
64
+
65
+ `npm run eval -- --json` runs deterministic browser tasks against fixed DOM fixtures in a fresh isolated session. Each task attempt gets its own runtime and records objective checks, startup/task/step timings, bounded failure text, evidence-capture error counts, and artifact paths in `eval-results/result.json`. Failed attempts save a screenshot by default; use `--evidence all` to capture evidence after every successful step or `--evidence none` to disable it. Failures are classified as `harness` (the browser environment never became usable: startup failed, no step succeeded, or cleanup broke) or `task` (the scenario regressed), and the summary reports `harnessFailures` separately so a broken browser environment is not mistaken for task regressions. Unknown CLI options are rejected. The report contract is documented in [Eval result schema](eval-results.md), including the `eval-budgets.json` gate that mirrors the Code Foundry eval contract.
66
+
67
+ ```sh
68
+ npm run eval -- --iterations 3 --json
69
+ npm run eval -- --task form-submit,extract-list --evidence all
70
+ npm run eval -- --list
71
+ ```
72
+
73
+ These tasks evaluate runtime and browser-tool behavior, not model quality. Keep them deterministic and network-free for local/CI regression checks. Model-agent evaluations should use the same task IDs and metadata but run in a separate harness, with the model, prompt, reasoning budget, dependency hash, and retry policy recorded. Do not silently truncate normal browser results; bounded evidence is only for judge-facing output.
@@ -17,6 +17,8 @@ default, override via `tabBridgePort` in `pi-browser-use` settings plus the
17
17
  extension's stored `piBridgeUrl`) for open-tab requests, creates each tab
18
18
  inactive in the `pi-browser-use` group, keeps the group collapsed, and
19
19
  reports back per-token so Pi selects the exact tab — never by URL matching.
20
+ Polling is event-driven plus a one-minute alarm; it does not run a persistent
21
+ timer that can keep Chrome alive after its windows are closed.
20
22
 
21
23
  ## Permissions
22
24
 
@@ -112,7 +112,6 @@ chrome.runtime.onMessage.addListener((message, _sender, sendResponse) => {
112
112
  * The bridge URL override lives in local storage (default loopback port).
113
113
  */
114
114
  const PI_BRIDGE_DEFAULT_URL = 'http://127.0.0.1:31973'
115
- const PI_BRIDGE_POLL_MS = 2000
116
115
  let piBridgeUrlOverride = null
117
116
 
118
117
  try {
@@ -163,15 +162,11 @@ async function pollBridgeOnce() {
163
162
  }
164
163
  }
165
164
 
166
- setInterval(() => {
167
- void pollBridgeOnce().catch(() => {})
168
- }, PI_BRIDGE_POLL_MS)
169
-
170
165
  /**
171
- * MV3 service workers are short-lived: setInterval dies permanently once the
172
- * worker is evicted, so the fast poll above only covers the awake case. The
173
- * repeating alarm wakes a suspended worker and guarantees a poll at least
174
- * every minute (safe floor for the alarm cadence). Re-created on every
166
+ * MV3 service workers are short-lived, and a persistent timer can keep Chrome
167
+ * alive after the user closes its windows. Use an alarm instead: it wakes a
168
+ * suspended worker without holding the browser open, and guarantees a poll at
169
+ * least every minute (safe floor for the alarm cadence). Re-created on every
175
170
  * startup since alarm persistence across restarts is not guaranteed.
176
171
  */
177
172
  const PI_BRIDGE_ALARM = 'pi-bridge-poll'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-browser-use",
3
- "version": "0.10.1",
3
+ "version": "0.11.1",
4
4
  "description": "Opinionated browser automation via chrome-devtools-mcp: native Pi extension and portable Agent Plugins 1.0 skills + MCP server.",
5
5
  "keywords": [
6
6
  "automation",
@@ -54,6 +54,8 @@
54
54
  "typecheck": "tsc -p tsconfig.json --noEmit",
55
55
  "prepublishOnly": "npm run build",
56
56
  "bench": "node scripts/bench.mjs",
57
+ "eval": "node scripts/eval.mjs",
58
+ "preeval": "npm run build",
57
59
  "test": "node --test test/*.test.mjs",
58
60
  "preperf:audit": "npm run build",
59
61
  "perf:audit": "node scripts/performance.mjs",
@@ -73,7 +75,7 @@
73
75
  "@types/node": "^22.0.0",
74
76
  "oxfmt": "^0.66.0",
75
77
  "oxlint": "^1.81.0",
76
- "typescript": "^5.9.0"
78
+ "typescript": "^6.0.3"
77
79
  },
78
80
  "peerDependencies": {
79
81
  "@earendil-works/pi-ai": ">=0.80.10",
package/plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "pi-browser-use",
4
- "version": "0.10.1",
4
+ "version": "0.11.1",
5
5
  "description": "Managed persistent, fresh, and existing Chrome sessions with focus-safe browser tools and CLI-first skills.",
6
6
  "author": {
7
7
  "name": "0xPlayerOne"