Commit Graph
4 Commits
Author SHA1 Message Date
Coff0xc cdd7e9ad54 fix(extension): mark a truncated capture body and drop failed requests
A body cut to exactly MAX_BODY looked complete, so the later truncate call
did nothing. The stored body now goes through truncate and keeps the
marker. Network.loadingFailed removes the request instead of leaving it
until the map evicts it. The cap counts JavaScript characters, not bytes.
2026-11-23 02:13:47 +00:00
Coff0xc 7625473c04 fix(extension): bound in-flight capture requests
Requests that never finish stayed in the debugger map with their full
post body. The map now drops the oldest entry past 500, and a stored body
is cut at the ingest limit.
2026-11-21 19:55:30 +00:00
Xiaobo def23f6b38 fix(extension): accept object-shaped response headers from CDP
Network.responseReceived hands back response.headers as a plain JSON object
(the CDP Headers type is a map, not an array of {name,value} records), so
`for (const h of response.headers)` throws "object is not iterable" on every
single response. queueExchange() rejects, the .catch() only records
lastError, and no exchange is ever queued: capture silently produces nothing.

Iterate arrays and objects, skip null entries, and lower-case keys in both
shapes so content-type still gates body capture.
2026-11-16 22:12:18 +08:00
BaaRai d8f47d4359 Traffic ingest: capture operator browsing via a browser extension
Closes #33. The MITM proxy only sees the agent's own actions, so
anything behind a human gate (signup captcha, email OTP, 2FA, SSO)
left the authenticated surface dark. The operator's browser becomes a
capture source instead:

- traffic: exported RecordExternal storing an externally captured
  exchange through the same spill/blob/FTS path as proxy traffic
  (insert logic shared with record()); rejects unparsable URLs and
  empty methods
- server: POST /api/traffic/ingest inside the authenticated API group,
  batch capped at 50 entries, bodies truncated at 256 KiB, per-entry
  ingested/failed counts
- extension/: Manifest V3 Chrome/Edge extension driving the
  chrome.debugger Network domain on the chosen tab, batching text
  exchanges to the ingest endpoint with the operator's URL + JWT in
  chrome.storage.local; binary bodies skipped; flush on batch/stop
- tests for both layers, README section
2026-10-11 14:53:08 +02:00