Skip to content

docs: CDP cookies design spec + fix stale command count#5

Open
drakulavich wants to merge 1 commit into
mainfrom
docs/cdp-cookies-design
Open

docs: CDP cookies design spec + fix stale command count#5
drakulavich wants to merge 1 commit into
mainfrom
docs/cdp-cookies-design

Conversation

@drakulavich
Copy link
Copy Markdown
Owner

Summary

  • The next roadmap item under storage is cookie-*, but the only honest implementation must include HttpOnly cookies. Those are not visible to document.cookie, and HttpOnly is exactly where session/auth cookies live — so a JS-only cookie-list would silently omit the rows that matter on any logged-in page.
  • Rather than ship that misleading partial API, this PR lands the design the next session will execute against: a CDP transport co-located with the existing Bun.WebView driver, five cookie-* commands that treat HttpOnly as first-class data, and an implementation outline at file-level granularity.
  • Also fixes the stale "18 commands" claim in AGENTS.md — the README's command table now lists 25 rows after the localstorage/sessionstorage additions.

Files changed

  • new docs/superpowers/specs/2026-05-14-cdp-cookies-design.md — design spec.
  • README.md — roadmap entry links the spec.
  • AGENTS.md — replace stale count with a reference to the README table.

Why this path (vs. shipping cookie-* now)

The user-facing brief explicitly called out: "avoid a misleading partial API" and "If cookie-* is not safely feasible, choose a smaller roadmap/documentation cleanup that unblocks it, such as designing/adding the CDP path." A correct CDP implementation requires new transport infrastructure (Chrome stderr scraping to discover the debug port, a minimal WS-based CDP client, dual-client handling alongside Bun.WebView) plus e2e validation against real Chrome. That's not safely deliverable in one session — but the design is.

The spec also captures next-step reuse: state-save/state-load and tab-* are both CDP-only and will reuse the same client introduced for cookies.

Test plan

  • bun test — 111 pass / 10 skip (unchanged from baseline; this PR is docs-only).
  • bun build src/cli.ts --compile --outfile dist/bowser — succeeds; ./dist/bowser --help lists current commands unchanged.
  • No e2e changes (no behavior change).

🤖 Generated with Claude Code

The next storage roadmap item is `cookie-*`, but the only honest
implementation must include HttpOnly cookies — and those require CDP,
which bowser doesn't yet plumb. Shipping a `document.cookie`-only
`cookie-list` would silently omit every auth cookie on a logged-in page,
exactly the misleading-partial-API trap. This commit lands the design
that the next session will execute against, instead.

- `docs/superpowers/specs/2026-05-14-cdp-cookies-design.md` — full
  design: why document.cookie is insufficient, CDP transport approach
  (alongside Bun.WebView), daemon ops, CLI surface for 5 cookie
  commands, implementation outline with file-level responsibilities,
  risks (stderr-scraping for debug port, dual-client CDP), and
  out-of-scope items reusing the same plumbing (state-save/load, tabs).
- `README.md` — roadmap entry now links the spec.
- `AGENTS.md` — fix stale "18 commands" to point at the README table
  (currently 25 entries).

No code changes; `bun test` (111 pass / 10 skip) and `bun build` unchanged.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant