@brunosps00/dev-workflow 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -26,7 +26,7 @@ npx @brunosps00/dev-workflow install-deps
26
26
 
27
27
  ## Commands
28
28
 
29
- dev-workflow v1.1.1 ships **31 commands** organized into four tiers. Most users only invoke Tier 1 + Tier 2.
29
+ dev-workflow v1.1.2 ships **31 commands** organized into four tiers. Most users only invoke Tier 1 + Tier 2.
30
30
 
31
31
  ### Tier 1 — Gateway (3)
32
32
 
@@ -310,7 +310,7 @@ npx @brunosps00/dev-workflow list-installed # Show managed instal
310
310
  npx @brunosps00/dev-workflow doctor # Check wrappers, agents, skills, MCPs, gates
311
311
  npx @brunosps00/dev-workflow repair # Reconcile managed files from recorded install state
312
312
  npx @brunosps00/dev-workflow install-deps # Install Playwright, react-doctor; check security scanners + Docker
313
- npx @brunosps00/dev-workflow setup-wsl-browser # WSL NAT: build CDP relay + add Hyper-V firewall rule
313
+ npx @brunosps00/dev-workflow setup-wsl-browser # WSL NAT: install prebuilt CDP relay + add Hyper-V firewall rule
314
314
  npx @brunosps00/dev-workflow install-azure-skills # Opt-in: Azure skills + Microsoft Learn MCP
315
315
  npx @brunosps00/dev-workflow install-azure-skills --products=azure-aks,azure-openai # Subset override
316
316
  npx @brunosps00/dev-workflow install-aws-skills # Opt-in: AWS skills + AWS MCP Server (needs uv + aws cli + creds)
@@ -47,7 +47,7 @@ const HELP_TEXT = `
47
47
  repair Reconcile managed files using the recorded install state
48
48
  subtask Create, complete, consume, and list local subagent handoffs
49
49
  install-deps Install system dependencies (Playwright browsers, MCP servers)
50
- setup-wsl-browser (WSL) Build the CDP relay on Windows + add the Hyper-V firewall rule so flows can drive the real Windows browser
50
+ setup-wsl-browser (WSL) Install the prebuilt CDP relay + add the Hyper-V firewall rule so flows can drive the real Windows browser
51
51
  install-azure-skills Opt-in: clone curated Azure skills from MicrosoftDocs/Agent-Skills
52
52
  into .agents/skills/azure/ and register the Microsoft Learn MCP
53
53
  server (HTTP, no-auth). Interactive category selection.
@@ -172,8 +172,8 @@ function printBrowserGuidance() {
172
172
  if (mirrored) {
173
173
  console.log(' Mirrored networking detected — connects to the Windows browser on 127.0.0.1 directly.');
174
174
  } else {
175
- console.log(' NAT networking — run `npx @brunosps00/dev-workflow setup-wsl-browser` once to build the');
176
- console.log(' cdp-relay.exe (needs Rust on Windows) and add the Hyper-V firewall rule. Otherwise flows');
175
+ console.log(' NAT networking — run `npx @brunosps00/dev-workflow setup-wsl-browser` once to install the');
176
+ console.log(' bundled cdp-relay.exe and add the Hyper-V firewall rule. Otherwise flows');
177
177
  console.log(' fall back to the local headless Chromium (faithful video, no Windows browser).');
178
178
  }
179
179
  console.log(' Details: .dw/skills/dw-testing-discipline/references/playwright-recipes.md ("Browser on WSL").');
@@ -1,17 +1,19 @@
1
- const { execSync, spawnSync } = require('child_process');
1
+ const { execSync } = require('child_process');
2
2
  const fs = require('fs');
3
3
  const path = require('path');
4
4
 
5
- // Builds the Rust CDP relay (cdp-relay.exe) on Windows and adds the one-time Hyper-V firewall
6
- // rule so WSL (NAT networking) can drive the real Windows browser over CDP. Idempotent.
5
+ // Installs the prebuilt CDP relay (cdp-relay.exe) on Windows and adds the one-time
6
+ // Hyper-V firewall rule so WSL (NAT networking) can drive the real Windows browser over CDP.
7
+ // Idempotent.
7
8
  //
8
9
  // Why: Chromium binds its debug port to Windows loopback only, and the WSL Hyper-V firewall
9
10
  // defaults inbound to Block. A fixed-port relay + one Hyper-V allow rule bridges WSL -> browser.
10
- // The relay is a tiny static .exe — no Node/Python/PowerShell runtime dependency at run time.
11
+ // The relay is a tiny prebuilt .exe — no Rust/Node/Python runtime dependency on the Windows target.
11
12
 
12
13
  const RELAY_PORT = 39222;
13
14
  const WSL_VM_CREATOR_ID = '{40E0AC32-46A5-438A-A0B2-2B479E8F2E90}'; // standard WSL VM creator id
14
15
  const RULE_NAME = 'dw-cdp-relay';
16
+ const RELAY_EXE_SRC = path.join(__dirname, '..', 'scaffold', 'scripts', 'cdp-relay', 'bin', 'cdp-relay.exe');
15
17
 
16
18
  function isWsl() {
17
19
  if (process.env.WSL_DISTRO_NAME) return true;
@@ -31,27 +33,6 @@ function winEnv(name) {
31
33
  }
32
34
  }
33
35
 
34
- function findWindowsCargo() {
35
- try {
36
- const line = execSync('cmd.exe /c where cargo', { stdio: 'pipe' })
37
- .toString()
38
- .split(/\r?\n/)
39
- .map((s) => s.trim())
40
- .find((s) => /cargo\.exe$/i.test(s));
41
- if (!line) return null;
42
- const wsl = execSync(`wslpath -u "${line}"`, { stdio: 'pipe' }).toString().trim();
43
- return fs.existsSync(wsl) ? { winPath: line, wslPath: wsl } : null;
44
- } catch {
45
- return null;
46
- }
47
- }
48
-
49
- function copyCrate(srcDir, destWslDir) {
50
- fs.mkdirSync(path.join(destWslDir, 'src'), { recursive: true });
51
- fs.copyFileSync(path.join(srcDir, 'Cargo.toml'), path.join(destWslDir, 'Cargo.toml'));
52
- fs.copyFileSync(path.join(srcDir, 'src', 'main.rs'), path.join(destWslDir, 'src', 'main.rs'));
53
- }
54
-
55
36
  function run() {
56
37
  console.log('\n dev-workflow setup-wsl-browser');
57
38
  console.log(` ${'='.repeat(40)}\n`);
@@ -68,32 +49,18 @@ function run() {
68
49
  }
69
50
  const destWin = `${localAppData}\\dev-workflow`;
70
51
  const destWsl = execSync(`wslpath -u "${destWin}"`, { stdio: 'pipe' }).toString().trim();
71
- const srcWslDir = `${destWsl}/cdp-relay-src`;
72
- const srcWinDir = `${destWin}\\cdp-relay-src`;
73
-
74
- // 1) Build the relay with the Windows Rust toolchain.
75
- const cargo = findWindowsCargo();
76
- if (!cargo) {
77
- console.log(' \x1b[33m—\x1b[0m No Windows `cargo` found (where cargo). Install Rust on Windows: https://rustup.rs');
78
- console.log(' Without the relay, WSL flows fall back to the local headless Chromium (faithful, no Windows browser).');
79
- return;
80
- }
81
52
 
82
- const crateSrc = path.join(__dirname, '..', 'scaffold', 'scripts', 'cdp-relay');
83
- if (!fs.existsSync(path.join(crateSrc, 'Cargo.toml'))) {
84
- console.log(` \x1b[31m✗\x1b[0m Relay crate source not found at ${crateSrc}`);
53
+ // 1) Install the prebuilt Windows relay bundled in the npm package.
54
+ if (!fs.existsSync(RELAY_EXE_SRC)) {
55
+ console.log(` \x1b[31m✗\x1b[0m Prebuilt relay not found at ${RELAY_EXE_SRC}`);
56
+ console.log(' The dev-workflow package is incomplete. Reinstall or update @brunosps00/dev-workflow.');
85
57
  return;
86
58
  }
87
59
 
88
- process.stdout.write(' Building cdp-relay.exe (Windows cargo, release)...');
60
+ process.stdout.write(' Installing cdp-relay.exe (prebuilt Windows x64)...');
89
61
  try {
90
62
  fs.mkdirSync(destWsl, { recursive: true });
91
- copyCrate(crateSrc, srcWslDir);
92
- execSync(`"${cargo.wslPath}" build --release --manifest-path "${srcWinDir}\\Cargo.toml"`, {
93
- stdio: 'pipe',
94
- timeout: 180000,
95
- });
96
- fs.copyFileSync(path.join(srcWslDir, 'target', 'release', 'cdp-relay.exe'), path.join(destWsl, 'cdp-relay.exe'));
63
+ fs.copyFileSync(RELAY_EXE_SRC, path.join(destWsl, 'cdp-relay.exe'));
97
64
  console.log(' \x1b[32m✓\x1b[0m');
98
65
  console.log(` ${destWin}\\cdp-relay.exe`);
99
66
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brunosps00/dev-workflow",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "AI-driven development workflow commands for any project. Scaffolds a complete PRD-to-PR pipeline with multi-platform AI assistant support.",
5
5
  "bin": {
6
6
  "dev-workflow": "./bin/dev-workflow.js"
@@ -298,7 +298,7 @@ The runner drives Playwright via the Node API and records video with `page.scree
298
298
  mechanism that works over CDP). It generates `scripts/<slug>.flow.mjs` — a plain ESM module exporting
299
299
  `async function flow({ page, context, expect, baseURL, step, shot })` — not a `@playwright/test` spec,
300
300
  so it needs no project `playwright.config.*`. The browser is chosen by `.dw/scripts/lib/resolve-browser.mjs`
301
- (WSL-resilient: full headless Chromium by default; set `BROWSER_TEST` to a Windows browser exe to drive it over CDP — in NAT run `npx @brunosps00/dev-workflow setup-wsl-browser` once for the cdp-relay.exe + Hyper-V rule, mirrored networking works directly);
301
+ (WSL-resilient: full headless Chromium by default; set `BROWSER_TEST` to a Windows browser exe to drive it over CDP — in NAT run `npx @brunosps00/dev-workflow setup-wsl-browser` once to install the prebuilt cdp-relay.exe + Hyper-V rule, mirrored networking works directly);
302
302
  see the "Browser on WSL" section of `dw-testing-discipline/references/playwright-recipes.md`. Chromium
303
303
  only — `screencast`/CDP do not support Firefox/WebKit.
304
304
 
@@ -124,7 +124,7 @@ Match the keyword and suggest:
124
124
  | `docker`, `compose`, `container` | `/dw-dockerize` |
125
125
  | `new project`, `bootstrap`, `scaffold` | `/dw-new-project` |
126
126
  | `functional doc`, `screen map`, `e2e doc` | `/dw-functional-doc` |
127
- | `wsl`, `browser`, `playwright browser`, `cdp` | `npx @brunosps00/dev-workflow setup-wsl-browser` when WSL NAT must drive the real Windows browser |
127
+ | `wsl`, `browser`, `playwright browser`, `cdp` | `npx @brunosps00/dev-workflow setup-wsl-browser` installs the prebuilt relay when WSL NAT must drive the real Windows browser |
128
128
  | `azure`, `microsoft learn`, `azure skills` | `/dw-install-azure-skills` |
129
129
  | `aws`, `aws mcp`, `aws skills` | `/dw-install-aws-skills` |
130
130
  | `incident`, `outage`, `postmortem`, `sev-1`, `sev-2` | (Skill `dw-incident-response` auto-invoked from `/dw-bugfix` for prod-critical) |
@@ -298,7 +298,7 @@ O runner dirige o Playwright pela API Node e grava vídeo com `page.screencast`
298
298
  funciona via CDP). Ele gera `scripts/<slug>.flow.mjs` — um módulo ESM simples que exporta
299
299
  `async function flow({ page, context, expect, baseURL, step, shot })`, não um spec `@playwright/test`,
300
300
  então dispensa o `playwright.config.*` do projeto. O browser é escolhido por `.dw/scripts/lib/resolve-browser.mjs`
301
- (resiliente no WSL: Chromium headless full por padrão; defina `BROWSER_TEST` com o caminho do exe do browser do Windows para dirigi-lo via CDP — em NAT rode `npx @brunosps00/dev-workflow setup-wsl-browser` uma vez para o cdp-relay.exe + regra Hyper-V, em mirrored funciona direto);
301
+ (resiliente no WSL: Chromium headless full por padrão; defina `BROWSER_TEST` com o caminho do exe do browser do Windows para dirigi-lo via CDP — em NAT rode `npx @brunosps00/dev-workflow setup-wsl-browser` uma vez para instalar o cdp-relay.exe precompilado + regra Hyper-V, em mirrored funciona direto);
302
302
  veja a seção "Browser on WSL" de `dw-testing-discipline/references/playwright-recipes.md`. Só Chromium —
303
303
  `screencast`/CDP não suportam Firefox/WebKit.
304
304
 
@@ -120,7 +120,7 @@ Auto-invocados por comandos primários mas disponíveis standalone.
120
120
  | `docker`, `compose`, `container` | `/dw-dockerize` |
121
121
  | `new project`, `bootstrap`, `scaffold` | `/dw-new-project` |
122
122
  | `functional doc`, `screen map` | `/dw-functional-doc` |
123
- | `wsl`, `browser`, `playwright browser`, `cdp` | `npx @brunosps00/dev-workflow setup-wsl-browser` quando WSL NAT precisa dirigir o browser real do Windows |
123
+ | `wsl`, `browser`, `playwright browser`, `cdp` | `npx @brunosps00/dev-workflow setup-wsl-browser` instala o relay precompilado quando WSL NAT precisa dirigir o browser real do Windows |
124
124
  | `azure`, `microsoft learn`, `azure skills` | `/dw-install-azure-skills` |
125
125
  | `aws`, `aws mcp`, `aws skills` | `/dw-install-aws-skills` |
126
126
  | `incident`, `outage`, `postmortem`, `sev-1` | (Skill `dw-incident-response` auto-invocada de `/dw-bugfix`) |
@@ -0,0 +1,7 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "cdp-relay"
7
+ version = "0.1.0"
@@ -2,7 +2,7 @@
2
2
  name = "cdp-relay"
3
3
  version = "0.1.0"
4
4
  edition = "2021"
5
- description = "Tiny TCP forwarder so WSL can reach a Windows browser's CDP debug port in NAT mode. Built on Windows by dev-workflow; no runtime dependency."
5
+ description = "Tiny TCP forwarder so WSL can reach a Windows browser's CDP debug port in NAT mode. Source for the prebuilt dev-workflow relay; no runtime dependency."
6
6
 
7
7
  [[bin]]
8
8
  name = "cdp-relay"
@@ -3,7 +3,8 @@
3
3
  //! Listens on 0.0.0.0:<listen> and forwards every connection to 127.0.0.1:<target>.
4
4
  //! dev-workflow runs this on the Windows side so WSL (NAT networking) can reach a Windows
5
5
  //! browser's CDP remote-debugging port, which Chromium binds to loopback only. std-only:
6
- //! no crates, no runtime — a single static .exe built with the user's Windows `cargo`.
6
+ //! no crates, no runtime. dev-workflow ships a prebuilt Windows x64 .exe; this source is
7
+ //! kept for maintainers who need to rebuild it.
7
8
 
8
9
  use std::env;
9
10
  use std::io;
@@ -21,7 +21,7 @@
21
21
  // networking mode WSL shares that loopback, so 127.0.0.1 connects directly. In NAT mode the
22
22
  // helper starts the prebuilt cdp-relay.exe on Windows (0.0.0.0:<fixed port> -> 127.0.0.1:debug)
23
23
  // and connects via the Windows host gateway. That needs the one-time setup performed by
24
- // `npx @brunosps00/dev-workflow setup-wsl-browser` (builds the relay + adds the Hyper-V firewall
24
+ // `npx @brunosps00/dev-workflow setup-wsl-browser` (installs the prebuilt relay + adds the Hyper-V firewall
25
25
  // rule). Without it, the helper falls back to the local headless Chromium.
26
26
 
27
27
  import fs from "node:fs";
@@ -207,7 +207,7 @@ function relayPort(projectRoot) {
207
207
  return DEFAULT_RELAY_PORT;
208
208
  }
209
209
 
210
- // The prebuilt Rust relay (cdp-relay.exe), built on Windows by `setup-wsl-browser`. Order:
210
+ // The prebuilt Windows relay (cdp-relay.exe), installed by `setup-wsl-browser`. Order:
211
211
  // .dw/config.json relayExe -> %LOCALAPPDATA%\dev-workflow\cdp-relay.exe. Returns { winPath, wslPath } or null.
212
212
  function findRelayExe(projectRoot) {
213
213
  const candidates = [];
@@ -293,7 +293,7 @@ async function launchWindowsBrowser(exePath, { headless, projectRoot }) {
293
293
  await cleanup();
294
294
  throw new Error(
295
295
  "WSL is in NAT mode; reaching the Windows browser needs cdp-relay.exe. Run " +
296
- "`npx @brunosps00/dev-workflow setup-wsl-browser` (builds the relay on Windows and adds the " +
296
+ "`npx @brunosps00/dev-workflow setup-wsl-browser` (installs the prebuilt relay and adds the " +
297
297
  "Hyper-V firewall rule). Alternatively enable mirrored networking or set BROWSER_TEST to a CDP URL.",
298
298
  );
299
299
  }
@@ -288,8 +288,8 @@ Resolution order: `BROWSER_TEST` env → `.dw/config.json` (`browserTest`) → d
288
288
  Tries `127.0.0.1` first, then the Windows host (default-route gateway) for NAT.
289
289
  - **`BROWSER_TEST` = Windows exe** (e.g. `/mnt/c/.../msedge.exe`): launches it with a temp profile in
290
290
  remote-debugging mode (`--remote-allow-origins=*`) and connects over CDP. **Works in both WSL2 modes:**
291
- in mirrored networking it connects to `127.0.0.1` directly; in NAT mode it starts the prebuilt
292
- **`cdp-relay.exe`** (a tiny Rust binary, no runtime) on Windows — `0.0.0.0:39222` → `127.0.0.1:<debug>` —
291
+ in mirrored networking it connects to `127.0.0.1` directly; in NAT mode it starts the bundled
292
+ **`cdp-relay.exe`** (a tiny prebuilt Windows x64 binary, no runtime) on Windows — `0.0.0.0:39222` → `127.0.0.1:<debug>` —
293
293
  and connects via the Windows host gateway. Falls back to headless Chromium if the relay/rule is absent.
294
294
  - **`BROWSER_TEST` = channel** (`chrome` | `msedge` | `chromium`): launches that channel locally.
295
295
 
@@ -300,8 +300,8 @@ binds its debug port to loopback only):
300
300
  npx @brunosps00/dev-workflow setup-wsl-browser
301
301
  ```
302
302
 
303
- This builds `cdp-relay.exe` with the Windows Rust toolchain (`rustup` on Windows) and adds a Hyper-V
304
- firewall inbound allow rule for TCP 39222 (one UAC prompt). After that, the *real* Windows browser is
303
+ This installs the `cdp-relay.exe` bundled with dev-workflow and adds a Hyper-V firewall inbound allow
304
+ rule for TCP 39222 (one UAC prompt). No Rust toolchain is required on the Windows target. After that, the *real* Windows browser is
305
305
  driven from WSL — including `page.screencast` video — under NAT. The launched browser and relay use a
306
306
  throwaway profile and are killed on exit.
307
307