@lifeaitools/rdc-skills 0.24.36 → 0.24.37

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/git-sha.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "sha": "cf32c946a9301254d1cd07754c1d457de585b682"
2
+ "sha": "c0a05b4d7c50514b9852b5d853ac4b0cccf8505a"
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifeaitools/rdc-skills",
3
- "version": "0.24.36",
3
+ "version": "0.24.37",
4
4
  "description": "RDC typed-agent dispatch skill suite for Claude Code - plan, build, review, overnight builds",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -34,19 +34,56 @@ description: "Usage `rdc:edit <site|brand|route|file>` — open the local websit
34
34
  - `test`, `studio_test`, and `studio-test` resolve to `brandSlug=test` and `appSlug=studio_test`.
35
35
  - If the target is a local file or route and the brand/app is unclear, ask one concise question.
36
36
 
37
- ### 3. Start or reuse the editor host
38
- - The editor host lives at `http://localhost:3015`.
39
- - Launch the host if needed:
37
+ Resolve the **target dev server** (package + port) so the preview iframe has
38
+ something live to load. Read the brand app's `package.json` `name` and its
39
+ `dev` script port never hard-code a stale port:
40
+
41
+ | Target | App dir | Package (`name`) | Dev port | `targetUrl` |
42
+ |--------|---------|------------------|----------|-------------|
43
+ | `prt` / `prtrust.fund` | `apps/prt` | `@regen/prt-portal` | `3006` | `http://localhost:3006` |
44
+ | `test` / `studio_test` | (bundled) | — (editor host serves it) | `3015` | auto (`/editor/local-test-target`) |
45
+
46
+ For any other brand, derive the package name and port by reading
47
+ `apps/<app>/package.json` (`name` field and the `--port` in the `dev` script).
48
+ `brandSlug=test` needs no target server — the editor host serves the fixture
49
+ on its own origin.
50
+
51
+ ### 3. Start or reuse BOTH servers (edit starts everything)
52
+ `rdc:edit` must bring up everything the preview needs — the editor host AND the
53
+ target brand's dev server. Start-or-reuse each: probe the port first, only
54
+ launch if it is dead.
55
+
56
+ **3a. Editor host (`http://localhost:3015`)**
57
+ - Probe: `curl -s -o /dev/null -w "%{http_code}" http://localhost:3015/` — any
58
+ non-`000` means it is already up; reuse it.
59
+ - Launch only if down (background, do not block the session):
40
60
  ```powershell
41
61
  pnpm --filter @regen/editor-host dev
42
62
  ```
43
- - Open the editor page for the resolved target:
63
+
64
+ **3b. Target brand dev server (skip for `brandSlug=test`)**
65
+ - Probe the resolved dev port (e.g. `http://localhost:3006/`). Non-`000` =
66
+ already running; reuse it. `EADDRINUSE` on launch also means reuse — not an error.
67
+ - Launch only if down (background), then health-wait on the port before opening:
68
+ ```powershell
69
+ pnpm --filter <package> dev
70
+ ```
71
+ Bounded health-wait only (no `for`/`seq`/`sleep` polling loops):
72
+ ```bash
73
+ until curl -s -o /dev/null http://localhost:<port>/; do sleep 2; done
74
+ ```
75
+ - Open the editor page for the resolved target once BOTH report a live code:
44
76
  ```txt
45
- http://localhost:3015/editor/local/<brandSlug>?targetUrl=<targetUrl>
77
+ http://localhost:3015/editor/local/<brandSlug>?appSlug=<appSlug>&targetUrl=<targetUrl>
46
78
  ```
47
79
 
48
80
  ### 4. Open the page
49
81
  - Normal use: open the URL in the browser and confirm the editor loaded.
82
+ Open via PowerShell `Start-Process`, NOT `cmd start` — `cmd` treats the `&`
83
+ between query params as a command separator and truncates the URL:
84
+ ```powershell
85
+ Start-Process 'http://localhost:3015/editor/local/<brandSlug>?appSlug=<appSlug>&targetUrl=<targetUrl>'
86
+ ```
50
87
  - `RDC_TEST=1`: do not force a foreground browser action; report the exact editor URL and whether the target was resolved.
51
88
 
52
89
  ### 5. Report the result