glidercli 0.4.31 → 0.4.32

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/lib/bserve.js CHANGED
@@ -149,7 +149,8 @@ async function buildLiveCatalog() {
149
149
  focusedWindowId,
150
150
  listTabsOk,
151
151
  });
152
- if (listTabsOk) reapFromMap(connectedTargets, catalog.reapSessionIds);
152
+ // catalog.listTabsOk is false on untrusted empty chrome.tabs (no mass-reap)
153
+ if (catalog.listTabsOk) reapFromMap(connectedTargets, catalog.reapSessionIds);
153
154
  return catalog;
154
155
  }
155
156
 
@@ -169,10 +169,13 @@ function buildCatalog({ chromeTabs, chromeWindows, cdpPages, focusedWindowId, li
169
169
  const attached = [];
170
170
  const stale = [];
171
171
  const ok = listTabsOk === true;
172
+ // listTabs "ok" + zero chrome.tabs while CDP pages exist is untrusted (MV3 SW
173
+ // empty query). Do not mark tab_gone / reap - that wipes /targets after status.
174
+ const chromeEmptyUntrusted = ok && tabs.length === 0 && enriched.length > 0;
172
175
  for (const p of enriched) {
173
176
  if (matched.has(p.sessionId)) continue;
174
177
  const row = cdpRow(p);
175
- if (ok && p.tabId && !chromeIds.has(p.tabId)) {
178
+ if (ok && !chromeEmptyUntrusted && p.tabId && !chromeIds.has(p.tabId)) {
176
179
  stale.push({ ...row, reason: 'tab_gone' });
177
180
  } else {
178
181
  attached.push(row);
@@ -181,7 +184,7 @@ function buildCatalog({ chromeTabs, chromeWindows, cdpPages, focusedWindowId, li
181
184
 
182
185
  return {
183
186
  focusedWindowId: focusedWindowId || 0,
184
- listTabsOk: ok,
187
+ listTabsOk: ok && !chromeEmptyUntrusted,
185
188
  windows,
186
189
  attached,
187
190
  stale,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glidercli",
3
- "version": "0.4.31",
3
+ "version": "0.4.32",
4
4
  "description": "Browser automation CLI. Control a configured Chromium browser through an extension CDP relay, run YAML tasks, and execute bounded autonomous loops.",
5
5
  "bin": {
6
6
  "glider": "bin/glider.js"