# @lynx-js/devtool-connector

## 0.19.2

### Patch Changes

- Use `pnpx` for one-shot agent-lynx commands in the documentation, bundled skills, and Connector CLI guidance. Use `npm_config_registry` for registry overrides so the examples work on pnpm 10 and 11.
- Updated dependency `@rslib/core` to `^1.0.7`.
- Updated dependency `ws` to `^8.23.0`.
- Add daemon-managed Lynx Simulator commands and JSON/JavaScript page environments, with public runtime packages installed on first use.
  
  Support windowless device pixel ratio and visible-window background color options in `agent-lynx open`.
  
  Include the Lynx Simulator Skill, page-environment examples, and extension guides in the CLI and standalone Skill distribution.
- Raise the `HDTTransport` output stream buffer `highWaterMark` so multi-chunk CDP bursts (such as `HeapProfiler.takeHeapSnapshot`) are not prematurely paused before the consumer drains them.
- Recommend `agent-lynx wait-for-client` when `list-clients` or default target resolution finds no active clients.
- Enable `TCP_NODELAY` (`setNoDelay(true)`) on `DesktopTransport` and `Usbmux` TCP sockets to avoid Nagle buffering delays on small Peertalk frames.
- Remove the nonexistent `--refresh` flag from the `reactlynx link` component-not-found recovery hint.
- Simplify `HDTTransport` client-list resolution, target routing, and registration hooks, and wait across transient `ClientList` reconnect gaps when resolving or routing to a stable `debugRouterId`.

## 0.19.1

### Patch Changes

- Updated dependency `plist` to `^5.1.1`.
- Updated dependency `ws` to `^8.22.2`.
- Close subscribed daemon WebSocket sessions when forwarding a message to `DeviceConnection` fails, and preserve the target `transportId` in `Connector` clean-EOF diagnostics.
- Skip corrupt or stale per-device entries in `~/bdc_config` when loading `iOSBDCTransport` routes so valid BDC endpoints remain discoverable.
- Keep Peertalk frame buffering amortized when messages arrive in small fragments.
- Avoid disposing underlying Peertalk connections when `writable.abort()` runs while no write is in flight.
- Enable TCP keepalive on direct and proxied `createProxySocket` connections so intermediate NAT/proxy idle timeouts do not drop long-lived BDC tunnels.
- Simplify `PeertalkToMessageTransformStream` frame buffering and remove the unused `MessageToPeertalkTransformStream` class.
- Simplify `connectWithPeertalk` writer lifecycle and promise chaining in `transport/base.ts`.

## 0.19.0

### Minor Changes

- Remove the built-in `agent-lynx --client headless:0` path, replaced by Lynx Simulator, including SpawnTransport and headless runtime preparation. EmbeddedLynx and NodeLynx test runtimes remain available.
- Include the transport ID in client IDs to route requests directly to the matching transport and isolate daemon connections across transports. Client IDs now use `transportId:deviceId:target`; rediscover clients instead of reusing IDs from older versions.

### Patch Changes

- Updated dependency `@yume-chan/adb-server-node-tcp` to `3.0.0-beta.5`.
- Updated dependency `@yume-chan/adb` to `3.0.0-beta.5`.
- Updated dependency `@yume-chan/stream-extra` to `3.0.0-beta.5`.
- Updated dependency `plist` to `^5.1.0`.
- Updated dependency `@rslib/core` to `^1.0.6`.
- Reuse a known target's transport when reconnecting after a disconnect, allowing its connection setup to wait for the device instead of failing on a temporarily empty device scan.
- Include the actual discovery path in empty `list-clients` errors, including responding HDT/Aiden endpoints and whether they bypassed direct device discovery. Preserve this information through the daemon and clarify that `--no-daemon` still prioritizes HDT/Aiden.
- Load the Inspector Preact DevTools plugin from the configured network mirror so the panel is reachable in restricted network environments.

## 0.18.8

No changes in this release.

## 0.18.7

### Patch Changes

- Updated dependency `semver` to `^7.8.6`.

## 0.18.6

No changes in this release.

## 0.18.5

No changes in this release.

## 0.18.4

### Patch Changes

- Updated dependency `@rslib/core` to `^1.0.5`.
- Updated dependency `ws` to `^8.22.1`.
- Schedule idle cleanup for unsubscribed daemon device connections discovered by `listClients` and use `readOnce` for daemon control responses.
- Keep an idle DevTool device connection open for 30 seconds after the last subscriber leaves.
- Remove `getAndroidTransportSpec` and delegate default Android ADB server configuration to `AdbServerNodeJsTcpConnector`. Direct mode now uses `ADB_SERVER_SOCKET` first, then `ANDROID_ADB_SERVER_ADDRESS` and `ANDROID_ADB_SERVER_PORT`, with the IPv4 loopback default (`127.0.0.1:5037`), because the ADB server always binds IPv4 loopback while `localhost` can resolve to ::1 first, and upstream errors for invalid ports instead of silently falling back. Replace the nonstandard `ADB_SERVER_HOST` / `ADB_SERVER_PORT` variables with the standard names.
  
  ADB configuration is read from `process.env` at transport construction, not the product entrypoint's injected `env` object. Explicit socket options still override the environment. Strip the standard ADB configuration variables from daemon child processes to retain direct/daemon isolation.

## 0.18.3

No changes in this release.

## 0.18.2

### Patch Changes

- Route requests through a sole daemon without requiring a fresh device scan, so it can reuse a healthy pooled connection and validate unknown targets itself.
- Add a daemon-managed Simulator with a lazily prepared Core/native host, window options, and JSON/JavaScript page environments on `open`.

## 0.18.1

### Patch Changes

- Include transport and request context when a connection ends before a response.
- Add sandbox apps open -S/--restart to stop the target app before launching its page through the shared Transport restart option.
- Use the open command's deadline while waiting for the page SessionList, while keeping the 10-second default for direct library calls.
- Preserve device transport error names, codes and messages in daemon WebSocket close reasons.
- Allow HDT client discovery three seconds to complete its handshake and fresh ClientList exchange.

## 0.18.0

### Minor Changes

- Add an optional `schema` to `Connector.openApp`, including daemon forwarding. Android opens the schema directly in the requested app, with shell-safe URL handling, instead of launching its default activity. Other transports ignore the option unless supported.

## 0.17.0

### Patch Changes

- Close aborted unary command responses during daemon shutdown so callers do not wait for their own timeout.
- Updated dependency `dprint` to `^0.64.3`.
- Updated dependency `@rslib/core` to `^1.0.4`.
- Scope HDT transport responses to the selected app for both direct and daemon connections, so another app's session list cannot close its streams or supply its CDP responses.
- Preserve the request timeout when its transport closes without a response instead of reporting a generic missing response.
- Wait for the runtime to confirm the screenshot frame acknowledgement before closing its connection, so the next capture is not blocked by an unprocessed acknowledgement.

## 0.16.6

No changes in this release.

## 0.16.5

### Patch Changes

- Refresh cached ref coordinates after unannotated screenshots change the host coordinate mode, preserving node identities and invalidating stale coordinates when capture fails.

## 0.16.4

### Patch Changes

- Updated dependency `dprint` to `^0.63.0`.

## 0.16.3

### Patch Changes

- Updated dependency `@yume-chan/adb-server-node-tcp` to `3.0.0-beta.4`.
- Updated dependency `@yume-chan/adb` to `3.0.0-beta.4`.
- Updated dependency `@yume-chan/stream-extra` to `3.0.0-beta.4`.
- Updated dependency `dprint` to `^0.62.0`.
- Updated dependency `@types/node` to `^24.19.2`.
- Updated dependency `ws` to `^8.22.0`.
- Use Node's stream read-result type in ReactLynx sessions to avoid declaration-build failures caused by mixing Node and DOM stream types. Runtime behavior is unchanged.
- Share the Connector, HDT transports, command engine and daemon lifecycle between the public and internal distributions. Align the public implementation with version 0.16.2 and allow cross-origin version discovery while retaining loopback control protections.
  
  Use the Connector namespace for the Android app icon helper, including its embedded DEX artifact.
  
  Keep host-specific protocol declarations in the internal facade while sharing the generic Customized response parser and request correlation logic.
  
  The `/transport` entry point no longer exports `wsStreams`, `WsWebSocketStream` or `createWebSocketReadable`. Keep the WebSocket implementation internal and bundled for daemon and HDT transports so consumers do not need `ws` types.

## 0.13.2

### Patch Changes

- 51e5de9: Remove the internal `xdb` protocol types from the public type surface.

  `XdbJsbRequest`, `XdbJsbResponse`, `XdbGlobalPropsRequest` and
  `XdbGlobalPropsResponse`, along with their `CustomizedResponseMap` and
  `Response` entries, described a ByteDance-internal DevTool protocol. The
  commands that spoke it are not part of the public CLI, so the types had no
  consumer here and only leaked internal protocol names into the published
  `.d.ts`.

## 0.9.5

### Patch Changes

- 1ff373d: Allow all available Android Apps.

## 0.9.4

### Patch Changes

- 6f4df9d: Add the Lynx DevTool packages: `@lynx-js/devtool-connector` (device transport layer with background daemon), `@lynx-js/devtool-mcp-server` (MCP server exposing DOM/CSS/Runtime/Performance and more tools), and an updated `@lynx-js/skill-lynx-devtool` skill with screenshot, console, heap snapshot, recorder, and ReactLynx inspection commands.
