aboutsummaryrefslogtreecommitdiff
path: root/src/cdp/ownership.ts
diff options
context:
space:
mode:
authoramankumarsingh77 <amankumarsingh7702@gmail.com>2026-07-28 20:25:38 +0530
committerAman Kumar <145339995+amankumarsingh77@users.noreply.github.com>2026-08-02 19:12:46 +0530
commit330767d862458386e804bde240a1f0d7835b9b8e (patch)
tree13a5f2086d265959c1bfa10bb88641a6804fd1f5 /src/cdp/ownership.ts
parent12d7a38ba0f1b1e4e301fce81e22f4b93036d211 (diff)
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) <noreply@anthropic.com>
Diffstat (limited to 'src/cdp/ownership.ts')
-rw-r--r--src/cdp/ownership.ts16
1 files changed, 0 insertions, 16 deletions
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<string>;
- /** Replace the full set — used on restoreState to re-hydrate from disk. */
replaceAll(ids: ReadonlyArray<string>): 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;