From 330767d862458386e804bde240a1f0d7835b9b8e Mon Sep 17 00:00:00 2001 From: amankumarsingh77 Date: Tue, 28 Jul 2026 20:25:38 +0530 Subject: refactor(cdp): strip comment noise Removes module banners, section dividers, and comments restating the code. Keeps one-line notes for the window.open/browserContextId constraint, the seed-tab claim, the unverifiable-pin reuse rule, the SeedTargetProvider rationale, the deliberate dialog retention, the discovery-time browser quirks, and the guarded CDP decoder assertion. Co-Authored-By: Claude Opus 5 (1M context) --- src/cdp/ownership.ts | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/cdp/ownership.ts') diff --git a/src/cdp/ownership.ts b/src/cdp/ownership.ts index 727b3d8..0a1a810 100644 --- a/src/cdp/ownership.ts +++ b/src/cdp/ownership.ts @@ -1,28 +1,12 @@ -/** - * Tracks which tab targetIds belong to this harness session. - * - * The harness attaches to the user's running Chrome, which is also full of - * the user's own tabs. Without an ownership boundary the agent could attach - * to (or close) personal tabs by accident. The registry is the single source - * of truth for "did this session open that tab?". - * - * Mutations notify a single change listener so the orchestrator can persist - * to disk via the existing BrowserState flow without the registry needing to - * know about the pi storage API. - */ export type OwnershipRegistry = { add(targetId: string): void; remove(targetId: string): void; has(targetId: string): boolean; list(): ReadonlyArray; - /** Replace the full set — used on restoreState to re-hydrate from disk. */ replaceAll(ids: ReadonlyArray): void; setHarnessWindow(targetId: string | undefined): void; harnessWindow(): string | undefined; - /** The real Chrome windowId of the dedicated harness window — the durable - * identity of "the window this session initialized", surviving seed-tab - * closure. Undefined until the window is created (or after teardown). */ setHarnessWindowId(windowId: number | undefined): void; harnessWindowId(): number | undefined; onChange(cb: () => void): void; -- cgit v1.2.3