Releases: olimsaidov/icdp
v0.4.0
Changes
- Breaking: split the Node relay adapter into two HTTP servers.
- Host uplink traffic now uses
hostPort/hostHostnameand optional Host-serverfallbackHTTP. - CDP clients,
/json,/json/list,/json/version, and/icdp/statusnow usebrowserPort/browserHostname. - Removed the old single-port
port/serverreturn shape;RelayServernow returnshostServer,browserServer,hostPort, andbrowserPort. - Updated playground defaults to Host shell
3000, CDP9222, and app3001. - Updated docs, integration tests, and agent-browser e2e harness for the split topology.
Rationale
Deployments can expose the Host uplink through ingress while keeping CDP discovery and the CDP WebSocket private. The split belongs in the Node transport adapter because RelayCore already owns the Host-vs-Client protocol boundary without knowing about sockets or ports.
Verification
npm run checknpm testnpm run buildnpm run docs:buildnpm run test:e2e
v0.3.1
Full Changelog: v0.3.0...v0.3.1
v0.3.0 — self-contained build
Self-contained package — no more transpilePackages
@olimsaidov/icdp/frame and /host now ship as self-contained ESM: their runtime dependencies (including the CommonJS chobitsu) are inlined at build time, so the published entries have no bare imports.
Consumers' bundlers no longer need transpilePackages: ["@olimsaidov/icdp"] (Next.js) or the equivalent — importing icdp in a bundler app just works. Verified against a Next.js 16 app: next build succeeds with transpilePackages removed.
Notes
- No API changes — drop-in for 0.2.x.
/hoststays small (no chobitsu); only/framecarries the inlined in-page CDP engine.- New guide: Use icdp in a bundler app (Next.js, Vite).
v0.2.1 — Fix Target reloaded on freshly-created targets
Patch: don't re-probe an already-connected Target on iframe load
Fixes a handshake race that the v0.2.0 onCreateTarget flow exposes: a Client that creates a Target and immediately drives it (e.g. agent-browser tab new <url>) could fail its first command with Target reloaded (typically on Page.enable).
Cause: the Host re-probed a Pairing on every iframe load event. For a freshly paired iframe, the agent's boot hello already connected the channel before load fired, so the re-probe drew a second hello — which the Host treats as a reload and uses to fail in-flight commands.
Fix: re-probe on load only when there is no channel yet. A connected pairing is left untouched; a genuine reload still reconnects via the new document's own boot hello.
No API changes. Recommended for anyone using onCreateTarget / pairing freshly-created iframes.
Full diff: v0.2.0...v0.2.1
v0.2.0 — Client-driven target lifecycle
Host-side Target lifecycle hooks
A Host can now let a CDP Client open and close Targets by passing onCreateTarget / onCloseTarget to IcdpHost:
new IcdpHost({
onCreateTarget: ({ url }) => { /* create + pair() an iframe */ return targetId },
onCloseTarget: (targetId) => host.unpair(targetId),
})- Capability advertising — the Host announces which methods it handles; the Relay forwards only those and keeps its built-in defaults for unset hooks. Existing Hosts (and
new IcdpHost(window)) are unaffected. - Await-connect —
createTargetresolves only after the new Target finishes its handshake, so the Client's first command can't race the not-connected gate. A Target that never connects (timeout/early destroy) is torn down instead of leaking as a zombie. - Relay hardening — session-scoped
createTarget/closeTargetare honored (browser-domain, sessionId echoed back); forwarded requests are bounded by a timeout + disconnect cleanup;closeTargetreturns CDP's{ success: true }; onlycreateTarget/closeTargetare host-forwardable so registry methods stay Relay-owned.
Full diff: 7bdc609...v0.2.0
v0.1.1
Full Changelog: https://github.com/olimsaidov/icdp/commits/v0.1.1