Skip to content

Releases: olimsaidov/icdp

v0.4.0

18 Jun 18:22
03afe83

Choose a tag to compare

Changes

  • Breaking: split the Node relay adapter into two HTTP servers.
  • Host uplink traffic now uses hostPort / hostHostname and optional Host-server fallback HTTP.
  • CDP clients, /json, /json/list, /json/version, and /icdp/status now use browserPort / browserHostname.
  • Removed the old single-port port / server return shape; RelayServer now returns hostServer, browserServer, hostPort, and browserPort.
  • Updated playground defaults to Host shell 3000, CDP 9222, and app 3001.
  • 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 check
  • npm test
  • npm run build
  • npm run docs:build
  • npm run test:e2e

v0.3.1

13 Jun 23:11
f4e2355

Choose a tag to compare

Full Changelog: v0.3.0...v0.3.1

v0.3.0 — self-contained build

13 Jun 18:53
e2cf52f

Choose a tag to compare

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.
  • /host stays small (no chobitsu); only /frame carries the inlined in-page CDP engine.
  • New guide: Use icdp in a bundler app (Next.js, Vite).

Docs: https://olimsaidov.github.io/icdp/

v0.2.1 — Fix Target reloaded on freshly-created targets

13 Jun 15:55
c9be76b

Choose a tag to compare

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

13 Jun 15:25
f3d6c77

Choose a tag to compare

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-connectcreateTarget resolves 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/closeTarget are honored (browser-domain, sessionId echoed back); forwarded requests are bounded by a timeout + disconnect cleanup; closeTarget returns CDP's { success: true }; only createTarget/closeTarget are host-forwardable so registry methods stay Relay-owned.

Full diff: 7bdc609...v0.2.0

v0.1.1

13 Jun 10:13
55b8f26

Choose a tag to compare