@hanzlaa/rcode 4.3.0 → 4.3.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzlaa/rcode",
3
- "version": "4.3.0",
3
+ "version": "4.3.1",
4
4
  "description": "rcode — the AI team that never forgets. Persistent memory, specialist agents, and slash commands for AI IDEs. Works in Claude Code, Cursor, Gemini, VS Code, and Antigravity.",
5
5
  "main": "cli/index.js",
6
6
  "bin": {
@@ -25,8 +25,8 @@ rcode isn't configured for this project yet. Let me set it up — takes 30 secon
25
25
  **1. Bootstrap local tooling** — copy bin from the global install:
26
26
 
27
27
  ```bash
28
- GLOBAL_RIHAL="$HOME/.rcode"
29
- TOOLS_SRC="$GLOBAL_RIHAL/bin/rcode-tools.cjs"
28
+ GLOBAL_RCODE="$HOME/.rcode"
29
+ TOOLS_SRC="$GLOBAL_RCODE/bin/rcode-tools.cjs"
30
30
 
31
31
  if [ ! -f "$TOOLS_SRC" ]; then
32
32
  echo "ERROR: Global rcode tools not found at $TOOLS_SRC"
@@ -42,7 +42,7 @@ Use for major workflow transitions.
42
42
 
43
43
  ```
44
44
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
45
- RIHAL ► {STAGE NAME}
45
+ RCODE ► {STAGE NAME}
46
46
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
47
47
  ```
48
48
 
@@ -69,7 +69,7 @@ Use this when a router command dispatches to another command:
69
69
 
70
70
  ```
71
71
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
72
- RIHAL ► ROUTING
72
+ RCODE ► ROUTING
73
73
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
74
74
 
75
75
  Input: {user's question or intent}
@@ -328,7 +328,7 @@ Use standard markdown pipe tables with status symbols:
328
328
  **Majlis banner** (multi-agent council):
329
329
  ```
330
330
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
331
- RIHAL ► MAJLIS CONVENING
331
+ RCODE ► MAJLIS CONVENING
332
332
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
333
333
  ```
334
334
 
@@ -354,7 +354,7 @@ the banner, not inside it.
354
354
 
355
355
  ```
356
356
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
357
- RIHAL ► PLANNING SPRINT 01.1
357
+ RCODE ► PLANNING SPRINT 01.1
358
358
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
359
359
  التخطيط للسباق 01.1 — يرجى الانتظار
360
360
  ```
@@ -389,7 +389,7 @@ translated prose goes outside the art, on its own line(s).
389
389
 
390
390
  - Varying box/banner widths within same output
391
391
  - Mixing banner styles (`===`, `---`, `***`)
392
- - Skipping `RIHAL ►` prefix in stage banners
392
+ - Skipping `RCODE ►` prefix in stage banners
393
393
  - Random emoji (`🚀`, `✨`, `💫`) outside the approved set
394
394
  - Missing Next Up block after workflow completions
395
395
  - Hardcoding references to other methodologies in rcode's UX
@@ -16,7 +16,7 @@ Append `step-10-complete` to `stepsCompleted`. Add `completedAt: {ISO date}`.
16
16
 
17
17
  ```
18
18
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
19
- RIHAL ► ROADMAP CREATED
19
+ RCODE ► ROADMAP CREATED
20
20
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
21
21
 
22
22
  Source PRD: {inputFile}
@@ -160,11 +160,12 @@ function handleRequest(req, res) {
160
160
  server.listen(PORT, '127.0.0.1', () => {
161
161
  console.log(`\n🕌 Majlis (مجلس) — rcode Dashboard`);
162
162
  console.log(`━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━`);
163
- console.log(` Mode: view-only`);
164
- console.log(` URL: http://localhost:${PORT}`);
165
- console.log(` Scanning: ${RCODE_DIR}`);
166
- console.log(` Refresh: 30s soft poll`);
167
- console.log(` Stop: kill $(ss -ltnp 'sport = :${PORT}' | awk 'NR>1{match($6,/pid=([0-9]+)/,m); print m[1]}')`);
163
+ console.log(` 👉 OPEN THIS: http://localhost:${PORT}`);
164
+ console.log(` Mode: view-only`);
165
+ console.log(` Scanning: ${RCODE_DIR}`);
166
+ console.log(` Refresh: 30s soft poll`);
167
+ console.log(` Note: port ${PORT + 1} is the internal orchestrator API not for the browser`);
168
+ console.log(` Stop: kill $(ss -ltnp 'sport = :${PORT}' | awk 'NR>1{match($6,/pid=([0-9]+)/,m); print m[1]}')`);
168
169
  console.log(`━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n`);
169
170
  });
170
171
 
@@ -224,7 +225,7 @@ function spawnOrchestrator() {
224
225
  try {
225
226
  _orchProc = spawn(process.execPath, [ORCH_BIN], {
226
227
  cwd: path.join(__dirname, '..'),
227
- env: { ...process.env, ORCH_TOKEN, RCODE_DIR, PROJECT_ROOT },
228
+ env: { ...process.env, ORCH_TOKEN, RCODE_DIR, PROJECT_ROOT, DASH_PORT: String(PORT) },
228
229
  stdio: 'pipe',
229
230
  });
230
231
  _orchProc.stdout.on('data', chunk => {
@@ -676,10 +676,25 @@ const server = http.createServer(async (req, res) => {
676
676
  res.setHeader('Access-Control-Allow-Headers', 'Authorization, Content-Type');
677
677
  if (method === 'OPTIONS') { res.writeHead(204); res.end(); return; }
678
678
 
679
- if (!authed(req)) { json(res, 401, { error: 'unauthorized' }); return; }
680
-
681
679
  const pathOnly = url.indexOf('?') === -1 ? url : url.slice(0, url.indexOf('?'));
682
680
 
681
+ // Friendly landing for browser navigation (no token needed). Hitting this
682
+ // port directly is a common mistake — the orchestrator is the INTERNAL API,
683
+ // not the dashboard. Point people at the dashboard instead of a bare 401.
684
+ if (method === 'GET' && (pathOnly === '/' || pathOnly === '/favicon.ico')) {
685
+ const dashUrl = 'http://localhost:' + (process.env.DASH_PORT || '7717');
686
+ res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' });
687
+ res.end('<!doctype html><meta charset="utf-8"><title>rcode orchestrator</title>'
688
+ + '<body style="font-family:system-ui,sans-serif;background:#05080f;color:#e6edf7;'
689
+ + 'display:grid;place-items:center;height:100vh;margin:0;text-align:center">'
690
+ + '<div><h1 style="color:#2dd4bf;margin:0 0 .5rem">rcode orchestrator</h1>'
691
+ + '<p style="color:#8595ad">This is the internal API (port ' + PORT + ') — not the dashboard.</p>'
692
+ + '<p>Open the dashboard → <a style="color:#a78bfa" href="' + dashUrl + '">' + dashUrl + '</a></p></div>');
693
+ return;
694
+ }
695
+
696
+ if (!authed(req)) { json(res, 401, { error: 'unauthorized' }); return; }
697
+
683
698
  if (method === 'GET' && pathOnly === '/api/status') { json(res, 200, { ok: true, sessions: sessions.size }); return; }
684
699
  if (method === 'GET' && pathOnly === '/api/runners') { await handleRunners(res); return; }
685
700
  if (method === 'GET' && pathOnly === '/api/sessions') { await handleSessions(res); return; }