pi-chrome 0.15.24 → 0.15.25

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 CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  All notable user-facing changes to `pi-chrome`.
4
4
 
5
+ ## 0.15.25 — 2026-05-16
6
+
7
+ - **Reload after older installs.** `/reload` now recovers from stale singleton state left by pi-chrome 0.15.19 and earlier instead of skipping the freshly loaded extension.
8
+ - **Test suite coverage.** Added gate buckets plus strict-CSP fallback, dynamic wait readiness, and explicit tab lifecycle challenges.
9
+
5
10
  ## 0.15.24 — 2026-05-16
6
11
 
7
12
  - **Unload Chrome tools on lock.** `chrome_*` tools now deactivate when `/chrome revoke` runs or timed authorization expires, keeping the prompt/tool list small after Chrome control locks again.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "Pi Chrome Connector",
4
- "version": "0.15.24",
4
+ "version": "0.15.25",
5
5
  "description": "Lets Pi control tabs in Chrome via a local connector at 127.0.0.1.",
6
6
  "permissions": [
7
7
  "tabs",
@@ -470,17 +470,21 @@ function StringEnum<T extends readonly [string, ...string[]]>(values: T) {
470
470
 
471
471
  export default function (pi: ExtensionAPI): void {
472
472
  const instanceToken = Symbol("pi-chrome-instance");
473
+ const currentRoot = extensionRoot();
473
474
  const globalState = globalThis as typeof globalThis & {
474
- [PI_CHROME_GLOBAL_KEY]?: { version: string; root: string; token: symbol };
475
+ [PI_CHROME_GLOBAL_KEY]?: { version: string; root: string; token?: symbol };
475
476
  };
476
477
  const alreadyLoaded = globalState[PI_CHROME_GLOBAL_KEY];
477
- if (alreadyLoaded) {
478
+ if (alreadyLoaded?.token || (alreadyLoaded && alreadyLoaded.root !== currentRoot)) {
478
479
  console.warn(
479
- `pi-chrome already loaded from ${alreadyLoaded.root} (v${alreadyLoaded.version}); skipping duplicate from ${extensionRoot()}.`,
480
+ `pi-chrome already loaded from ${alreadyLoaded.root} (v${alreadyLoaded.version}); skipping duplicate from ${currentRoot}.`,
480
481
  );
481
482
  return;
482
483
  }
483
- globalState[PI_CHROME_GLOBAL_KEY] = { version: PI_CHROME_VERSION, root: extensionRoot(), token: instanceToken };
484
+ // pi-chrome <=0.15.19 set the singleton flag but did not clear it on reload.
485
+ // If the stale flag points at this same extension root, replace it instead of
486
+ // skipping the freshly reloaded extension.
487
+ globalState[PI_CHROME_GLOBAL_KEY] = { version: PI_CHROME_VERSION, root: currentRoot, token: instanceToken };
484
488
 
485
489
  const bridge = new ChromeProfileBridge(DEFAULT_HOST, DEFAULT_PORT);
486
490
  let backgroundDefault = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-chrome",
3
- "version": "0.15.24",
3
+ "version": "0.15.25",
4
4
  "scripts": {
5
5
  "version": "node scripts/sync-manifest-version.js",
6
6
  "prepublishOnly": "node scripts/sync-manifest-version.js"