From 3381b4305a6128bb7fe1be807488e3c56f902f4b Mon Sep 17 00:00:00 2001 From: Franklin Castillo Date: Wed, 5 Aug 2026 18:28:28 -0400 Subject: [PATCH] docs(coding-agent): correct js-debug runtime + extraction path per review Two wording fixes for PR #7759 review: - debug.md no longer requires `node` on PATH; documents that the adapter runs under node if available, else the omp Bun host, matching resolveDefaultJsDebugAdapter()'s process.execPath fallback. - The unavailable message and CHANGELOG now say "extract under ~/.local/opt" (not "to ~/.local/opt/js-debug/"), so the archive's js-debug/src/dapDebugServer.js lands at the auto-discovered path instead of one directory too deep. Refs #7757. --- docs/tools/debug.md | 3 ++- packages/coding-agent/CHANGELOG.md | 2 +- packages/coding-agent/src/tools/debug.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/tools/debug.md b/docs/tools/debug.md index f6bc58711..667f51784 100644 --- a/docs/tools/debug.md +++ b/docs/tools/debug.md @@ -330,7 +330,7 @@ Example `.omp/dap.json`: ## Notes - `packages/coding-agent/src/prompts/tools/debug.md` tells the model only one active root session is supported. Adapter-requested child sessions belong to that root tree. -- The default JavaScript/TypeScript adapter runs vscode-js-debug's `dapDebugServer.js` over TCP. It is **not** an npm package — `npm i -g js-debug-adapter` 404s (`js-debug-adapter` is the omp adapter id, not an installable package). Install `dapDebugServer.js` (requires `node` on `PATH`) one of these ways; the first two are auto-discovered by `resolveJsDebugServerPath()` in `packages/coding-agent/src/dap/config.ts`: +- The default JavaScript/TypeScript adapter runs vscode-js-debug's `dapDebugServer.js` over TCP. It is **not** an npm package — `npm i -g js-debug-adapter` 404s (`js-debug-adapter` is the omp adapter id, not an installable package). Install `dapDebugServer.js` one of these ways; the first two are auto-discovered by `resolveJsDebugServerPath()` in `packages/coding-agent/src/dap/config.ts`: - Mason (`:MasonInstall js-debug-adapter`) → discovered at `~/.local/share/nvim/mason/packages/js-debug-adapter/js-debug/src/dapDebugServer.js`. - Standalone release tarball, extracted so `dapDebugServer.js` lands at `~/.local/opt/js-debug/src/dapDebugServer.js`: ```sh @@ -340,6 +340,7 @@ Example `.omp/dap.json`: ``` Replace `v1.117.0` with the latest tag from the [releases page](https://github.com/microsoft/vscode-js-debug/releases). - Any other location via `JS_DEBUG_DAP_SERVER=`. +- The adapter runs under `node` if on `PATH`, otherwise under the omp host (Bun); `resolveDefaultJsDebugAdapter()` falls back to `process.execPath`, so a Bun-only setup is supported. - `configurationDone` is sent automatically during root and child launch/attach handshakes and lazily before later requests if the initial handshake did not complete. - `startDebugging` reverse requests create recursive child sessions on the same TCP server; a stopped child becomes the target for thread-level actions. - `output` exposes the active session’s merged `output` event stream only; the tool does not distinguish stdout, stderr, and console categories. diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index 2aa0a5c33..7fc0f2f0f 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -4,7 +4,7 @@ ### Changed -- Clarified the JavaScript/TypeScript debug adapter install path: `js-debug-adapter` is the omp adapter id, not an npm package, so `npm i -g js-debug-adapter` 404s. The docs and the "adapter not available" message now point to the supported installs — Mason, the standalone release tarball extracted to `~/.local/opt/js-debug/` (auto-discovered), or `JS_DEBUG_DAP_SERVER` ([#7757](https://github.com/can1357/oh-my-pi/issues/7757)). +- Clarified the JavaScript/TypeScript debug adapter install path: `js-debug-adapter` is the omp adapter id, not an npm package, so `npm i -g js-debug-adapter` 404s. The docs and the "adapter not available" message now point to the supported installs — Mason, the standalone release tarball extracted under `~/.local/opt` (auto-discovered), or `JS_DEBUG_DAP_SERVER`. The docs also note the adapter runs under `node` if available, else the omp Bun host ([#7757](https://github.com/can1357/oh-my-pi/issues/7757)). ## [17.2.9] - 2026-08-05 diff --git a/packages/coding-agent/src/tools/debug.ts b/packages/coding-agent/src/tools/debug.ts index 1590475da..ba5e31983 100644 --- a/packages/coding-agent/src/tools/debug.ts +++ b/packages/coding-agent/src/tools/debug.ts @@ -505,7 +505,7 @@ const ADAPTER_UNAVAILABLE_MESSAGES: Readonly> = { dlv: "adapter 'dlv' is not available: install with 'go install github.com/go-delve/delve/cmd/dlv@latest'", rdbg: "adapter 'rdbg' is not available: install with 'gem install debug'", "js-debug-adapter": - "adapter 'js-debug-adapter' is not available: vscode-js-debug is not an npm package — install via Mason (`:MasonInstall js-debug-adapter`), extract the release tarball (https://github.com/microsoft/vscode-js-debug/releases) to ~/.local/opt/js-debug/, or set JS_DEBUG_DAP_SERVER to dapDebugServer.js", + "adapter 'js-debug-adapter' is not available: vscode-js-debug is not an npm package — install via Mason (`:MasonInstall js-debug-adapter`), extract the release tarball (https://github.com/microsoft/vscode-js-debug/releases) under ~/.local/opt, or set JS_DEBUG_DAP_SERVER to dapDebugServer.js", }; const ADAPTER_CANONICAL_COMMANDS: Readonly> = {