@broberg/lens-daemon 0.1.20 → 0.1.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@broberg/lens-daemon",
3
- "version": "0.1.20",
3
+ "version": "0.1.22",
4
4
  "description": "The Lens module of the cardmem daemon (flows, critic, coverage, capture sessions, the /lens/* routes and the cardmem-lens MCP) as a package. The daemon mounts createLensRouter(deps) + createLensMcpRouter(deps). Bun runtime.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/flow.ts CHANGED
@@ -404,7 +404,13 @@ export interface FlowResult {
404
404
  downloads?: FlowDownload[];
405
405
  /** F009.125 — the extension this run loaded: its id (read at load time), the
406
406
  * build path the caller named, and whether host access was SIMULATED on a copy. */
407
- extension?: { id: string; path: string; host_access: 'as-built' | 'simulated'; note?: string } | null;
407
+ extension?: {
408
+ id: string; path: string; host_access: 'as-built' | 'simulated'; note?: string;
409
+ /** F009.129 — the chrome.storage.local KEYS seeded before step 0 (names only, never
410
+ * values), and which one Lens minted itself. A failed mint never gets here — it
411
+ * ends the run before step 0 naming url + status. */
412
+ storage_local?: { keys: string[]; minted: string | null };
413
+ } | null;
408
414
  name: string;
409
415
  status: 'pass' | 'fail' | 'error';
410
416
  steps: FlowStepResult[];
@@ -3157,6 +3163,7 @@ export async function runFlow(flow: Flow, env: AuthEnv, opts: RunFlowOptions = {
3157
3163
  path: flow.extension.path,
3158
3164
  host_access: prepared.simulated ? 'simulated' : 'as-built',
3159
3165
  ...(prepared.simulated ? { note: SIMULATED_ACCESS_NOTE } : {}),
3166
+ ...(Object.keys(seed).length ? { storage_local: { keys: Object.keys(seed), minted: mint?.key ?? null } } : {}),
3160
3167
  };
3161
3168
  }
3162
3169
  // F074.36 — measure the credential BEFORE driving, so a run that cannot
package/src/mcp.ts CHANGED
@@ -369,7 +369,7 @@ export const TOOLS = [
369
369
  path: { type: 'string' },
370
370
  grant_host_access: { type: 'boolean' },
371
371
  storage_local: { type: 'object', description: 'F009.126 — {key: JSON value} for chrome.storage.local, set before step 0.' },
372
- storage_local_mint: { type: 'object', description: 'F009.129 — {key, url, method?, secretPath | secretEnv, body?}: the DAEMON calls the mint url (Bearer secret; secretPath relative to local_path, sandboxed) and writes the JSON answer to chrome.storage.local[key] before step 0, so a real token never passes through you. Wins over storage_local on the same key. Value and secret never appear in the report.' },
372
+ storage_local_mint: { type: 'object', description: 'F009.129 — {key, url, method?, secretPath | secretEnv, body?}: the DAEMON calls the mint url (Bearer secret; secretPath relative to local_path, sandboxed) and writes the JSON answer to chrome.storage.local[key] before step 0, so a real token never passes through you. Wins over storage_local on the same key. Value and secret never appear in the report; it carries extension.storage_local {keys, minted} — key NAMES only — so you can see the login was seeded. Steps after openPopup still run on the page under test: add in:"popup" to drive the popup.' },
373
373
  },
374
374
  },
375
375
  steps: {