Skip to content

feat: add devtool-connector and devtool-mcp-server packages#86

Merged
gaoachao merged 5 commits into
mainfrom
feat/add-devtool-packages
Jun 25, 2026
Merged

feat: add devtool-connector and devtool-mcp-server packages#86
gaoachao merged 5 commits into
mainfrom
feat/add-devtool-packages

Conversation

@hzy

@hzy hzy commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Migrate devtool packages from lynx-stack to this repository, updated to match the current version level.

Package Old (lynx-stack) New (this repo)
@lynx-js/devtool-connector v0.1.1 v0.9.3
@lynx-js/devtool-mcp-server v0.5.1 v0.13.3
@lynx-js/skill-lynx-devtool v0.1.0 v0.13.3

New Packages

mcp-servers/devtool-connector/

Transport layer for communicating with Lynx devices:

  • Android (ADB), iOS (usbmux), Desktop (TCP)
  • Background daemon for persistent connections
  • Inspector UI with DevTools frontend

mcp-servers/devtool-mcp-server/

MCP server with 46 tools across 13 domains:
App, CSS, DOM, Debugger, Device, HeapProfiler, Input, Lynx, Memory, Page, Performance, Runtime, UITree

Updated Skill (packages/skills/lynx-devtool/)

Now has 16 commands (was 9):

  • New: global-switch, inspect, take-heap-snapshot, recorder-start, recorder-end, recorder-analysis, reactlynx (tree/find/inspect/update)

CI

  • Added E2E test job using EmbeddedLynx binary on Linux
  • 69 connector unit tests + 28 MCP server unit tests

Related PRs

Migrate devtool packages from lynx-stack to this repository, updated
to match the current internal version level:

- @lynx-js/devtool-connector v0.9.3 (was v0.1.1 in lynx-stack)
- @lynx-js/devtool-mcp-server v0.13.3 (was v0.5.1 in lynx-stack)
- @lynx-js/skill-lynx-devtool updated to v0.13.3

New packages:
- mcp-servers/devtool-connector: Transport layer for communicating
  with Lynx devices (Android/iOS/Desktop + background daemon)
- mcp-servers/devtool-mcp-server: MCP server with 46 tools across
  13 domains (App, CSS, DOM, Debugger, Device, HeapProfiler, Input,
  Lynx, Memory, Page, Performance, Runtime, UITree)

Updated skill:
- 16 commands (added global-switch, inspect, take-heap-snapshot,
  recorder-start/end/analysis, reactlynx)
- Daemon transport support for persistent device connections

CI:
- Added E2E test job using EmbeddedLynx binary on Linux
Copilot AI review requested due to automatic review settings June 24, 2026 05:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates the Lynx DevTool connector + MCP server (and the lynx-devtool skill) into this monorepo, updating them to newer versions and wiring in unit/E2E testing + workspace configuration.

Changes:

  • Add new workspace packages under mcp-servers/ for @lynx-js/devtool-connector and @lynx-js/devtool-mcp-server.
  • Expand @lynx-js/skill-lynx-devtool CLI with new commands (global-switch, inspect, recorder, reactlynx, heap snapshot, etc.) and updated transport/daemon handling.
  • Update repo config for workspace discovery, dependency catalogs, changesets fixed versioning, and CI E2E coverage.

Reviewed changes

Copilot reviewed 169 out of 170 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
pnpm-workspace.yaml Adds mcp-servers/* to workspace and introduces ADB dependency catalog entries.
packages/skills/lynx-devtool/src/index.ts Updates CLI entrypoint bootstrapping and program startup flow.
packages/skills/lynx-devtool/src/devtool.ts Reworks CLI program setup to build transports/context and register expanded command set.
packages/skills/lynx-devtool/src/connector.ts Adds a connector helper entry (default transports + re-exports) for programmatic usage.
packages/skills/lynx-devtool/src/commands/take-screenshot.ts Updates screenshot flow to use CDP stream + ack handling and shared client/session resolution.
packages/skills/lynx-devtool/src/commands/recorder-start.ts Adds recorder start command and recording-start implementation.
packages/skills/lynx-devtool/src/commands/recorder-analysis.ts Adds helpers to analyze recorder output buffers and generate file diagnostics.
packages/skills/lynx-devtool/src/commands/reactlynx/tree.ts Adds reactlynx tree command for printing/serializing component tree.
packages/skills/lynx-devtool/src/commands/reactlynx/index.ts Adds ReactLynx command namespace wiring (tree/find/inspect/update).
packages/skills/lynx-devtool/src/commands/reactlynx/format.ts Adds ASCII/label formatting for ReactLynx tree output.
packages/skills/lynx-devtool/src/commands/open.ts Updates page opening logic to a new connector message pipeline.
packages/skills/lynx-devtool/src/commands/list-sessions.ts Updates session listing to use shared client resolution and naming options.
packages/skills/lynx-devtool/src/commands/list-clients.ts Improves list-clients behavior + adds reusable runListClientsCommand error messaging.
packages/skills/lynx-devtool/src/commands/inspect.ts Adds inspect command for emitting inspector URL for a client/session.
packages/skills/lynx-devtool/src/commands/global-switch.ts Adds global-switch command group (list/get/set) over connector global switches.
packages/skills/lynx-devtool/src/commands/get-sources.ts Updates parsed-scripts listing to use CDP stream + idle reader helper.
packages/skills/lynx-devtool/src/commands/cdp.ts Extends CDP command with thread routing support and shared resolution helpers.
packages/skills/lynx-devtool/src/commands/app.ts Updates App command to use shared client resolution and naming options.
packages/skills/lynx-devtool/rslib.config.ts Updates skill build configuration (multiple entries, build-time defines, preserveModules).
packages/skills/lynx-devtool/references/take-heap-snapshot.md Adds heap snapshot reference documentation.
packages/skills/lynx-devtool/references/recorder.md Adds recorder command documentation and recording file diagnostics guidance.
packages/skills/lynx-devtool/references/global-switch.md Adds documentation for global-switch keys/meaning/usage.
packages/skills/lynx-devtool/package.json Bumps version and updates dependency declarations for the updated skill.
packages/skills/lynx-devtool/examples/touch-using-screenshot-coordinates.md Adds example guidance discouraging screenshot-derived tap coordinates.
packages/skills/lynx-devtool/examples/touch-using-lynx-geometry.md Adds example guidance for diagnostic geometry APIs vs DOM-based clicking.
packages/skills/lynx-devtool/examples/touch-using-dom-coordinates.md Adds example for DOM-derived coordinates for touch emulation.
packages/skills/lynx-devtool/examples/programmatic-debugging.md Adds example for programmatic usage via connector entrypoint.
packages/skills/lynx-devtool/examples/main-thread-logs-and-properties.md Adds example workflow for main-thread log capture + Runtime.getProperties.
packages/skills/lynx-devtool/examples/getting-console-logs.md Updates console log example output formatting and adds main-thread usage example.
mcp-servers/devtool-mcp-server/tsconfig.json Adds TypeScript config for the MCP server package.
mcp-servers/devtool-mcp-server/test/utils/testTool.ts Adds tool-testing harness helper (createToolContext) for unit tests.
mcp-servers/devtool-mcp-server/test/utils/cdp-types.ts Adds CDP response type helpers for tests.
mcp-servers/devtool-mcp-server/test/tools/UITree_getLynxUITree.test.ts Adds unit test for UITree tool behavior.
mcp-servers/devtool-mcp-server/test/tools/Runtime_getHeapUsage.test.ts Adds unit tests covering Runtime heap usage and thread routing.
mcp-servers/devtool-mcp-server/test/tools/Runtime_evaluate_getProperties.test.ts Adds unit tests for Runtime evaluate + getProperties thread routing and params.
mcp-servers/devtool-mcp-server/test/tools/proxyTestUtils.ts Adds shared proxy request/response helpers for tool tests.
mcp-servers/devtool-mcp-server/test/tools/Performance_getAllPerformanceEntries.test.ts Adds test verifying Performance.enable before fetching entries.
mcp-servers/devtool-mcp-server/test/tools/Memory_getAllMemoryUsage.test.ts Adds tests around global-session defaults and explicit session overrides.
mcp-servers/devtool-mcp-server/test/tools/DOM_setAttributesAsText.test.ts Adds test for passing through DOM.setAttributesAsText params.
mcp-servers/devtool-mcp-server/test/tools/DOM_getDocument.test.ts Adds test for DOM.getDocument compression disabling + depth passing.
mcp-servers/devtool-mcp-server/test/tools/Device_openPage.test.ts Adds tests for openPage tool behavior and fallback behavior.
mcp-servers/devtool-mcp-server/test/tools/App_globalSwitch.test.ts Adds tests for App global switch tools (get/set/list).
mcp-servers/devtool-mcp-server/test/tools/AGENTS.md Adds testing guidelines document for MCP tool tests.
mcp-servers/devtool-mcp-server/test/McpResponse.test.ts Adds unit test for McpResponse serialization behavior.
mcp-servers/devtool-mcp-server/src/tools/UITree/GetLynxUITree.ts Adds UITree.getLynxUITree tool implementation.
mcp-servers/devtool-mcp-server/src/tools/Runtime/GetProperties.ts Adds Runtime.getProperties tool with thread routing + filtered params.
mcp-servers/devtool-mcp-server/src/tools/Runtime/GetHeapUsage.ts Adds Runtime.getHeapUsage tool with thread routing.
mcp-servers/devtool-mcp-server/src/tools/Runtime/Evaluate.ts Adds Runtime.evaluate tool with thread routing + filtered params.
mcp-servers/devtool-mcp-server/src/tools/Performance/GetAllTimingInfo.ts Adds Performance.getAllTimingInfo tool implementation.
mcp-servers/devtool-mcp-server/src/tools/Performance/GetAllPerformanceEntries.ts Adds Performance.getAllPerformanceEntries tool implementation.
mcp-servers/devtool-mcp-server/src/tools/Page/TakeScreenshot.ts Adds Page.takeScreenshot tool saving temp artifact + attaching image output.
mcp-servers/devtool-mcp-server/src/tools/Page/Reload.ts Adds Page.reload tool with ignoreCache/url options.
mcp-servers/devtool-mcp-server/src/tools/Page/GetResourceTree.ts Adds Page.getResourceTree tool.
mcp-servers/devtool-mcp-server/src/tools/Page/GetResourceContent.ts Adds Page.getResourceContent tool with url/nodeId validation.
mcp-servers/devtool-mcp-server/src/tools/Memory/GetAllMemoryUsage.ts Adds Memory.getAllMemoryUsage tool with global-session defaults + timeout control.
mcp-servers/devtool-mcp-server/src/tools/Lynx/GetVersion.ts Adds Lynx.getVersion tool.
mcp-servers/devtool-mcp-server/src/tools/Input/EmulateTouchFromMouseEvent.ts Adds Input.emulateTouchFromMouseEvent tool.
mcp-servers/devtool-mcp-server/src/tools/DOM/SetAttributesAsText.ts Adds DOM.setAttributesAsText tool.
mcp-servers/devtool-mcp-server/src/tools/DOM/ScrollIntoViewIfNeeded.ts Adds DOM.scrollIntoViewIfNeeded tool.
mcp-servers/devtool-mcp-server/src/tools/DOM/RequestChildNodes.ts Adds DOM.requestChildNodes tool.
mcp-servers/devtool-mcp-server/src/tools/DOM/QuerySelectorAll.ts Adds DOM.querySelectorAll tool.
mcp-servers/devtool-mcp-server/src/tools/DOM/QuerySelector.ts Adds DOM.querySelector tool.
mcp-servers/devtool-mcp-server/src/tools/DOM/PushNodesByBackendIdsToFrontend.ts Adds DOM.pushNodesByBackendIdsToFrontend tool.
mcp-servers/devtool-mcp-server/src/tools/DOM/PerformSearch.ts Adds DOM.performSearch tool.
mcp-servers/devtool-mcp-server/src/tools/DOM/InnerText.ts Adds DOM.innerText tool.
mcp-servers/devtool-mcp-server/src/tools/DOM/GetSearchResults.ts Adds DOM.getSearchResults tool.
mcp-servers/devtool-mcp-server/src/tools/DOM/GetOriginalNodeIndex.ts Adds DOM.getOriginalNodeIndex tool.
mcp-servers/devtool-mcp-server/src/tools/DOM/GetNodeForLocation.ts Adds DOM.getNodeForLocation tool.
mcp-servers/devtool-mcp-server/src/tools/DOM/GetDocumentWithBoxModel.ts Adds DOM.getDocumentWithBoxModel tool.
mcp-servers/devtool-mcp-server/src/tools/DOM/GetDocument.ts Adds DOM.getDocument tool.
mcp-servers/devtool-mcp-server/src/tools/DOM/GetBoxModel.ts Adds DOM.getBoxModel tool.
mcp-servers/devtool-mcp-server/src/tools/DOM/GetAttributes.ts Adds DOM.getAttributes tool.
mcp-servers/devtool-mcp-server/src/tools/DOM/DescribeNode.ts Adds DOM.describeNode tool.
mcp-servers/devtool-mcp-server/src/tools/Device/OpenPage.ts Adds Device.openPage tool with headless readiness handling and fallback open behavior.
mcp-servers/devtool-mcp-server/src/tools/Device/ListSessions.ts Adds Device.listSessions tool.
mcp-servers/devtool-mcp-server/src/tools/Device/ListDevices.ts Adds Device.listDevices tool.
mcp-servers/devtool-mcp-server/src/tools/Device/ListClients.ts Adds Device.listClients tool.
mcp-servers/devtool-mcp-server/src/tools/Device/ClosePage.ts Adds Device.closePage tool.
mcp-servers/devtool-mcp-server/src/tools/defineTool.ts Adds tool definition helper types and wrapper for tool modules.
mcp-servers/devtool-mcp-server/src/tools/Debugger/ListScripts.ts Adds Debugger.listScripts tool (CDP stream parsing).
mcp-servers/devtool-mcp-server/src/tools/Debugger/GetScriptSource.ts Adds Debugger.getScriptSource tool (optional temp file save).
mcp-servers/devtool-mcp-server/src/tools/CSS/GetStyleSheetText.ts Adds CSS.getStyleSheetText tool.
mcp-servers/devtool-mcp-server/src/tools/CSS/GetMatchedStylesForNode.ts Adds CSS.getMatchedStylesForNode tool.
mcp-servers/devtool-mcp-server/src/tools/CSS/GetInlineStylesForNode.ts Adds CSS.getInlineStylesForNode tool.
mcp-servers/devtool-mcp-server/src/tools/CSS/GetComputedStyleForNode.ts Adds CSS.getComputedStyleForNode tool.
mcp-servers/devtool-mcp-server/src/tools/CSS/GetBackgroundColors.ts Adds CSS.getBackgroundColors tool.
mcp-servers/devtool-mcp-server/src/tools/App/SetGlobalSwitch.ts Adds App.setGlobalSwitch tool.
mcp-servers/devtool-mcp-server/src/tools/App/ListGlobalSwitch.ts Adds App.listGlobalSwitch tool.
mcp-servers/devtool-mcp-server/src/tools/App/globalSwitch.ts Adds shared global switch key schema/constants.
mcp-servers/devtool-mcp-server/src/tools/App/GetGlobalSwitch.ts Adds App.getGlobalSwitch tool.
mcp-servers/devtool-mcp-server/src/schema/index.ts Adds shared Zod schemas for tool parameters.
mcp-servers/devtool-mcp-server/src/McpResponse.ts Adds MCP response accumulator (text + images).
mcp-servers/devtool-mcp-server/src/McpContext.ts Adds MCP context wrapper around the connector.
mcp-servers/devtool-mcp-server/src/main.ts Adds executable MCP server entrypoint wiring server + stdio transport.
mcp-servers/devtool-mcp-server/src/connector.ts Adds connector re-export surface for consumers.
mcp-servers/devtool-mcp-server/rslib.config.ts Adds rslib build config for the MCP server library + CLI.
mcp-servers/devtool-mcp-server/README.md Adds MCP server package README and client setup instructions.
mcp-servers/devtool-mcp-server/package.json Adds MCP server package manifest and publishing configuration.
mcp-servers/devtool-connector/tsconfig.json Adds TypeScript config for the connector package.
mcp-servers/devtool-connector/test/usbmux.test.ts Adds unit test coverage for usbmux plist packet exchange.
mcp-servers/devtool-connector/test/testWithClient.test.ts Adds unit tests for client selection + session selection helpers.
mcp-servers/devtool-connector/test/open-app-daemon.test.ts Adds test ensuring openApp waits for listClients when available.
mcp-servers/devtool-connector/test/list-clients-fallback.test.ts Adds test for listClients fallback behavior with daemon transport.
mcp-servers/devtool-connector/test/daemon-protocol.test.ts Adds unit tests for daemon protocol type guards.
mcp-servers/devtool-connector/test/daemon-manager.test.ts Adds tests for daemon entry path resolution.
mcp-servers/devtool-connector/test/daemon-connect-timeout.test.ts Adds test coverage for daemon connection setup timeouts.
mcp-servers/devtool-connector/test/connector-lifecycle.test.ts Adds test ensuring message writes complete before disposing connections.
mcp-servers/devtool-connector/test/clientId.test.ts Adds unit tests for clientId serialize/deserialize behavior.
mcp-servers/devtool-connector/src/transport/ws-stream.ts Adds ws-based WebSocketStream compatibility wrapper for Node 18+.
mcp-servers/devtool-connector/src/transport/transport.ts Adds transport interfaces/types (devices/clients/apps/connections).
mcp-servers/devtool-connector/src/transport/peertalk.ts Adds peertalk framing encode/decode transform streams.
mcp-servers/devtool-connector/src/transport/ios.ts Adds iOS transport implementation via usbmux + peertalk.
mcp-servers/devtool-connector/src/transport/index.ts Adds transport exports barrel.
mcp-servers/devtool-connector/src/transport/desktop.ts Adds Desktop transport implementation.
mcp-servers/devtool-connector/src/transport/base.ts Adds connection setup helpers (codec + piping + debug-router lock takeover).
mcp-servers/devtool-connector/src/takeover.ts Adds debug-router lock takeover helper with filesystem coordination.
mcp-servers/devtool-connector/src/streams/utils.ts Adds stream utilities (filter/inspect/session guard).
mcp-servers/devtool-connector/src/streams/index.ts Adds streams exports barrel.
mcp-servers/devtool-connector/src/streams/cdp.ts Adds CDP request/response transforms and result parsing.
mcp-servers/devtool-connector/src/daemon/version.ts Adds connector version constant read from package.json.
mcp-servers/devtool-connector/src/daemon/protocol.ts Adds daemon protocol types/constants and type guards.
mcp-servers/devtool-connector/src/daemon/manager.ts Adds daemon lifecycle management (spawn/ensureRunning/kill).
mcp-servers/devtool-connector/src/daemon/index.ts Adds daemon exports barrel.
mcp-servers/devtool-connector/src/daemon/entry.ts Adds daemon process entrypoint.
mcp-servers/devtool-connector/src/client-id.ts Adds clientId serialize/deserialize helper.
mcp-servers/devtool-connector/rslib.config.ts Adds connector package build configuration and publint enforcement.
mcp-servers/devtool-connector/package.json Adds connector package manifest and publishing configuration.
.github/workflows/test.yml Adds E2E test job running EmbeddedLynx-based connector + MCP server e2e suites.
.changeset/config.json Pins devtool connector/mcp-server/skill versions together via changesets fixed group.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/skills/lynx-devtool/src/index.ts Outdated
Comment thread packages/skills/lynx-devtool/src/commands/open.ts Outdated
Comment thread packages/skills/lynx-devtool/src/commands/take-screenshot.ts Outdated
Comment thread packages/mcp-servers/devtool-mcp-server/rslib.config.ts Outdated
Comment thread packages/skills/lynx-devtool/src/devtool.ts Outdated
Comment thread packages/skills/lynx-devtool/package.json
Comment thread packages/mcp-servers/devtool-mcp-server/package.json
Comment thread packages/mcp-servers/devtool-connector/package.json
- Add .github/workflows/lynx-devtool.yml that downloads and launches
  the EmbeddedLynx headless runtime, waits for its debug-router port,
  then runs the connector and mcp-server e2e suites against it.
- Remove the inline e2e job from test.yml (the binary was never
  launched there, so the tests could not find a client/session).
- Add adapted devtool-mcp-server e2e (tools.test.ts) covering the
  open-source tool set against EmbeddedLynx.
- Remove internal-only webview-cdp e2e (Douyin WebView parity test
  depending on internal CDP reference docs).
- Skip background-thread heap snapshot on EmbeddedLynx (unsupported).
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown

Skill Evals

Eval definitions: 10/10 valid.
Task eval score: 85.0 / 100 with skill vs 32.9 / 100 without skill (Δ +52.1) across 8 skill suites.
Trigger eval score: 80.3 / 100 across 8 skill suites.

Skill With skill Without skill Δ Trigger
lynx-debug-info-remapping 100.0 (5/5) 20.0 (1/5) +80.0 75.0 (6/8)
lynx-devtool 100.0 (4/4) 50.0 (2/4) +50.0 87.5 (7/8)
lynx-trace-analysis 100.0 (5/5) 40.0 (2/5) +60.0 87.5 (7/8)
lynx-trace-record 100.0 (5/5) 0.0 (0/5) +100.0 75.0 (6/8)
lynx-typescript 80.0 (4/5) 40.0 (2/5) +40.0 66.7 (6/9)
lynx-ui 33.3 (1/3) 33.3 (1/3) +0.0 81.3 (13/16)
reactlynx-best-practices 100.0 (5/5) 80.0 (4/5) +20.0 91.7 (11/12)
rspeedy-bundle-size 66.7 (2/3) 0.0 (0/3) +66.7 77.3 (17/22)

Workflow run

Relocate devtool-connector and devtool-mcp-server from top-level
mcp-servers/ to packages/mcp-servers/ for consistency with the
rest of the workspace layout. Update pnpm-workspace.yaml glob,
the lynx-devtool e2e workflow paths, and the connector tsconfig
extends path accordingly.
Copilot AI review requested due to automatic review settings June 24, 2026 12:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 169 out of 170 changed files in this pull request and generated 14 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

Comment thread packages/skills/lynx-devtool/src/index.ts
Comment thread packages/skills/lynx-devtool/src/index.ts Outdated
Comment thread packages/skills/lynx-devtool/src/devtool.ts
Comment thread packages/skills/lynx-devtool/src/commands/take-screenshot.ts
Comment thread packages/skills/lynx-devtool/src/commands/take-screenshot.ts Outdated
Comment thread packages/mcp-servers/devtool-mcp-server/src/main.ts
Comment thread pnpm-workspace.yaml
Comment thread packages/skills/lynx-devtool/package.json
Comment thread packages/mcp-servers/devtool-connector/src/client-id.ts
Comment thread packages/mcp-servers/devtool-connector/rslib.config.ts
hzy added 2 commits June 24, 2026 23:13
- Add reactlynx e2e to the skill package, driving the full
  init -> refresh -> operation_v2 -> inspect -> update-prop pipeline
  against a real ReactLynx page.
- Use the public @lynx-example/react-devtool bundle (ships
  @lynx-js/preact-devtools) so the test runs on EmbeddedLynx; the
  former EmbeddedLynx skip is removed.
- Match 'Provider' (present in the minified bundle) instead of the
  internal-specific 'view' component name.
- Extend the e2e workflow to launch EmbeddedLynx twice: the Swiper
  bundle for connector/mcp-server tools, then the ReactLynx bundle
  for the reactlynx suite. Factor the port-readiness wait into a
  shared .github/scripts/wait-debug-router.sh.
- Format all migrated devtool files to the skills repo style
  (single quotes, no trailing commas) via biome.
- Remove eslint-disable references to the eslint-plugin-n rules
  (n/no-unsupported-features/node-builtins, n/no-process-exit) that
  are not configured in this repo; fix no-explicit-any / no-unused-vars
  in migrated test utilities.
- Add a changeset for the three devtool packages.
Copilot AI review requested due to automatic review settings June 24, 2026 15:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@gaoachao gaoachao merged commit 6f4df9d into main Jun 25, 2026
7 checks passed
@gaoachao gaoachao deleted the feat/add-devtool-packages branch June 25, 2026 06:11
lynx-skills-sync-bot Bot pushed a commit that referenced this pull request Jun 25, 2026
* feat: add devtool-connector and devtool-mcp-server packages

Migrate devtool packages from lynx-stack to this repository, updated
to match the current internal version level:

- @lynx-js/devtool-connector v0.9.3 (was v0.1.1 in lynx-stack)
- @lynx-js/devtool-mcp-server v0.13.3 (was v0.5.1 in lynx-stack)
- @lynx-js/skill-lynx-devtool updated to v0.13.3

New packages:
- mcp-servers/devtool-connector: Transport layer for communicating
  with Lynx devices (Android/iOS/Desktop + background daemon)
- mcp-servers/devtool-mcp-server: MCP server with 46 tools across
  13 domains (App, CSS, DOM, Debugger, Device, HeapProfiler, Input,
  Lynx, Memory, Page, Performance, Runtime, UITree)

Updated skill:
- 16 commands (added global-switch, inspect, take-heap-snapshot,
  recorder-start/end/analysis, reactlynx)
- Daemon transport support for persistent device connections

CI:
- Added E2E test job using EmbeddedLynx binary on Linux

* ci: add dedicated lynx-devtool e2e workflow with EmbeddedLynx

- Add .github/workflows/lynx-devtool.yml that downloads and launches
  the EmbeddedLynx headless runtime, waits for its debug-router port,
  then runs the connector and mcp-server e2e suites against it.
- Remove the inline e2e job from test.yml (the binary was never
  launched there, so the tests could not find a client/session).
- Add adapted devtool-mcp-server e2e (tools.test.ts) covering the
  open-source tool set against EmbeddedLynx.
- Remove internal-only webview-cdp e2e (Douyin WebView parity test
  depending on internal CDP reference docs).
- Skip background-thread heap snapshot on EmbeddedLynx (unsupported).

* refactor: move mcp-servers under packages/

Relocate devtool-connector and devtool-mcp-server from top-level
mcp-servers/ to packages/mcp-servers/ for consistency with the
rest of the workspace layout. Update pnpm-workspace.yaml glob,
the lynx-devtool e2e workflow paths, and the connector tsconfig
extends path accordingly.

* test(lynx-devtool): enable reactlynx e2e against public bundle

- Add reactlynx e2e to the skill package, driving the full
  init -> refresh -> operation_v2 -> inspect -> update-prop pipeline
  against a real ReactLynx page.
- Use the public @lynx-example/react-devtool bundle (ships
  @lynx-js/preact-devtools) so the test runs on EmbeddedLynx; the
  former EmbeddedLynx skip is removed.
- Match 'Provider' (present in the minified bundle) instead of the
  internal-specific 'view' component name.
- Extend the e2e workflow to launch EmbeddedLynx twice: the Swiper
  bundle for connector/mcp-server tools, then the ReactLynx bundle
  for the reactlynx suite. Factor the port-readiness wait into a
  shared .github/scripts/wait-debug-router.sh.

* style: apply biome/eslint formatting and add changeset

- Format all migrated devtool files to the skills repo style
  (single quotes, no trailing commas) via biome.
- Remove eslint-disable references to the eslint-plugin-n rules
  (n/no-unsupported-features/node-builtins, n/no-process-exit) that
  are not configured in this repo; fix no-explicit-any / no-unused-vars
  in migrated test utilities.
- Add a changeset for the three devtool packages.

Source-commit: 6f4df9d
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.

3 participants