Skip to content

v0.2.2 — DOM streaming, streamCell overhaul, notebook utilities

Latest

Choose a tag to compare

@syrex1013 syrex1013 released this 17 Jun 20:27
· 1 commit to main since this release

What's new in 0.2.2

Added

  • streamCell(ref, options?) now accepts { timeoutMs?, heartbeatMs? } — configurable execution timeout (default 180 s) and heartbeat interval (default 30 s)
  • DOM fallback in streamCell: when cells.list() returns no output for a running cell (e.g. a 55-minute training loop), the SDK reads live page text via Playwright's shadow-DOM walker and streams it incrementally
  • BrowserSession.readPageText() — public shadow-DOM text-node walker
  • outputsToText(outputs) — converts a Jupyter outputs array to plain text; exported from package root
  • hasErrorOutput(outputs) — returns true if any output has output_type === "error"; exported from package root
  • stripOutputs(notebookJson) — strips all cell outputs and execution counts from a notebook JSON string before upload; exported from package root
  • StreamCellOptions type exported from package root

Changed

  • streamCell no longer yields raw JSON snapshots — yields incremental text OutputChunk objects
  • Heartbeat messages are yielded as OutputChunk (type stdout) instead of written directly to process.stdout

Fixed

  • WebSocket error events on ColabProxy absorbed via EventEmitter (no more uncaught exceptions on socket errors)