diff --git a/README.md b/README.md index dd3471d..74333c5 100644 --- a/README.md +++ b/README.md @@ -41,8 +41,14 @@ Then install the extension: 4. Select `E:\Projects\Loki\extension`. The extension posts tab metadata to -`http://127.0.0.1:17666/ingest/chrome-extension`. It does not read page DOM, -cookies, or page content. +`http://127.0.0.1:17666/ingest/chrome-extension`. Its normal sync does not read +page DOM, cookies, or page content. + +The popup also exposes `Debug sweep`. Chrome will warn that Loki can debug +pages because the extension uses `chrome.debugger`. A sweep attaches to each +debuggable tab, probes Chrome Debugger Protocol domains, records frame/runtime/ +performance/security/root-DOM metadata, then detaches. It does not read response +bodies, cookies, form values, or full page DOM. ## CDP Observation @@ -65,6 +71,7 @@ npm run smoke Loki writes: - `state/loki.chrome_snapshot.cc` +- `state/loki.chrome_debug_probe.cc` - `state/loki.provider_advertisement.cc` - `state/loki.eve_surface.cc` diff --git a/docs/architecture.md b/docs/architecture.md index 1810888..0ee2ea6 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -8,20 +8,24 @@ CultMesh/Eve consumers while keeping Chrome installation easy for the operator. ## Current Mechanism The Chrome extension observes tab metadata with explicit Chrome permissions and -posts reports to Loki's localhost ingest endpoint. Chrome can also expose -DevTools metadata on `127.0.0.1:{port}` when started with -`--remote-debugging-port`. Loki normalizes both sources into one snapshot and -writes three documents from that snapshot. +posts reports to Loki's localhost ingest endpoint. On command, it also uses +`chrome.debugger` to attach to debuggable tabs, probe Chrome Debugger Protocol +domains, and detach. Chrome can also expose DevTools metadata on +`127.0.0.1:{port}` when started with `--remote-debugging-port`. Loki normalizes +these sources into one snapshot and writes typed witness documents from that +state. ```mermaid flowchart LR Extension["Chrome extension"] --> Ingest["extension ingest"] + Debugger["chrome.debugger sweep"] --> Ingest Chrome["Chrome CDP endpoint"] --> Observe["observe CDP"] Config["Loki config"] --> Ingest Config --> Observe Ingest --> Combine["combined snapshot"] Observe --> Combine Combine --> Snapshot["chrome_snapshot.cc"] + Combine --> Debug["chrome_debug_probe.cc"] Snapshot --> Provider["provider_advertisement.cc"] Snapshot --> Surface["eve_surface.cc"] ``` @@ -30,6 +34,7 @@ flowchart LR - CDP reachability is observed state, not assumed capability. - Extension reachability is observed state, not assumed capability. +- Debug sweeps are explicit observations, not continuous hidden attachment. - Chrome owns page reality; Loki owns only the observation snapshot. - `.cc` witnesses are the durable local state surface. - Eve/CultUI output is derived from the same snapshot as the witness. diff --git a/extension/manifest.json b/extension/manifest.json index 03eb1c9..e3a3056 100644 --- a/extension/manifest.json +++ b/extension/manifest.json @@ -5,6 +5,7 @@ "description": "Publishes Chrome tab metadata to the local Loki CultMesh daemon.", "permissions": [ "alarms", + "debugger", "storage", "tabs" ], diff --git a/extension/popup.css b/extension/popup.css index baa15b4..d199fa2 100644 --- a/extension/popup.css +++ b/extension/popup.css @@ -85,6 +85,12 @@ button { cursor: pointer; } +button + button { + margin-top: 8px; + border-color: #34516f; + background: #386181; +} + button:disabled { cursor: wait; opacity: 0.65; diff --git a/extension/popup.html b/extension/popup.html index 9021511..a60d8dd 100644 --- a/extension/popup.html +++ b/extension/popup.html @@ -26,11 +26,16 @@