ai-browser-profile 1.0.8 → 1.0.9

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.
@@ -179,15 +179,50 @@ def read_indexeddb(
179
179
  [o.strip() for o in origins if o and o.strip()] if origins else None
180
180
  )
181
181
 
182
+ # Defaults to skip even when no explicit filter is given:
183
+ # chrome-extension:// — extensions, not portable across browsers
184
+ # localhost / 127.* — dev servers, irrelevant across machines
185
+ # file:// — local file URLs
186
+ SKIP_PREFIXES = (
187
+ "chrome-extension://",
188
+ "http://localhost",
189
+ "https://localhost",
190
+ "http://127.",
191
+ "https://127.",
192
+ "file://",
193
+ )
194
+ # Skip pathologically large origins by default (e.g. kapwing video editor
195
+ # which stores 2 GB of project blobs). Caller can still ask for them
196
+ # explicitly via origin_filter.
197
+ MAX_LEVELDB_BYTES = 200 * 1024 * 1024 # 200 MB
198
+
199
+ def _dir_size(p) -> int:
200
+ try:
201
+ return sum(f.stat().st_size for f in p.rglob("*") if f.is_file())
202
+ except Exception:
203
+ return 0
204
+
182
205
  out: dict[str, list[IdbDbDump]] = {}
183
206
  skipped_dbs = 0
207
+ skipped_origins = 0
184
208
 
185
209
  for leveldb_dir in sorted(idb_root.glob("*.indexeddb.leveldb")):
186
210
  origin = _idb_dir_to_origin(leveldb_dir.name)
187
211
  if origin is None:
188
212
  continue
189
- if origin_filter and not any(f in origin for f in origin_filter):
190
- continue
213
+ if origin_filter:
214
+ if not any(f in origin for f in origin_filter):
215
+ continue
216
+ else:
217
+ # No explicit filter — apply default safety skips.
218
+ if any(origin.startswith(p) for p in SKIP_PREFIXES):
219
+ skipped_origins += 1
220
+ continue
221
+ size = _dir_size(leveldb_dir)
222
+ if size > MAX_LEVELDB_BYTES:
223
+ log.info("skipping oversized IndexedDB %s (%.1f MB)", origin, size/1024/1024)
224
+ skipped_origins += 1
225
+ continue
191
226
 
192
227
  blob_dir = leveldb_dir.parent / leveldb_dir.name.replace(".leveldb", ".blob")
193
228
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-browser-profile",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Extract user identity (name, emails, accounts, addresses, payments) from browser data into a self-ranking SQLite database. Install as a Claude Code agent skill.",
5
5
  "bin": {
6
6
  "ai-browser-profile": "bin/cli.js"