pi-lean-portal 0.2.3 → 0.2.4
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.
|
Binary file
|
|
Binary file
|
package/browser-toggle.ts
CHANGED
|
@@ -142,9 +142,14 @@ function applyBrowserState(pi: ExtensionAPI, enable: boolean): void {
|
|
|
142
142
|
const current = pi.getActiveTools();
|
|
143
143
|
pi.setActiveTools([...new Set([...current, ...registered])]);
|
|
144
144
|
} else {
|
|
145
|
-
// Keep everything that is NOT a browser+sibling tool
|
|
146
|
-
|
|
147
|
-
|
|
145
|
+
// Keep everything that is NOT a browser+sibling tool — but only
|
|
146
|
+
// within the *currently active* set. Using getActiveTools() (not
|
|
147
|
+
// getAllTools()) is critical for peer-toggle composition: /web off
|
|
148
|
+
// must not re-enable tools that another toggle (e.g. host's /api off)
|
|
149
|
+
// has already disabled. getAllTools() would silently re-activate
|
|
150
|
+
// every registered tool outside our own set.
|
|
151
|
+
const current = pi.getActiveTools();
|
|
152
|
+
pi.setActiveTools(current.filter((name) => !registered.has(name)));
|
|
148
153
|
}
|
|
149
154
|
}
|
|
150
155
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-lean-portal",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Pi extension. Interactive web browsing for Pi — a /web toggle removes the tools from context when switched off, Playwright Chromium/Firefox deliver accessibility-tree snapshots, persistent profiles, cookies, and domain-matched guides; custom/stealth backends (Camoufox) plug in when a site blocks the shipped browsers.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|