@hanzlaa/rcode 4.5.0 → 4.6.0
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 +1 -1
- package/rcode/agents/rcode-mariam.md +6 -0
- package/rcode/agents/rcode-sadiq.md +6 -0
- package/rcode/agents/rcode-waleed.md +6 -0
- package/rcode/bin/rcode-hooks.cjs +41 -5
- package/rcode/skills/agents/mariam-marketing/SKILL.md +1 -0
- package/rcode/skills/agents/sadiq-analyst/SKILL.md +1 -0
- package/rcode/skills/agents/waleed-architect/SKILL.md +1 -0
- package/rcode/workflows/council.md +29 -1
- package/server/dashboard.js +6 -3
- package/server/lib/html/client/components/App.js +1 -1
- package/server/lib/html/client/components/OrchPanel.js +2 -2
- package/server/lib/html/client/components/XtermPanel.js +98 -23
- package/server/lib/html/client/orchestrator.js +28 -15
- package/server/lib/html/client/views/OrchestrationView.js +247 -169
- package/server/lib/html/css.js +596 -227
- package/server/lib/html/shell.js +9 -3
- package/server/orchestrator.js +3 -4
package/server/lib/html/shell.js
CHANGED
|
@@ -6,8 +6,14 @@ const { renderClientJs } = require('./client');
|
|
|
6
6
|
|
|
7
7
|
function esc(s) { return String(s || '').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>'); }
|
|
8
8
|
|
|
9
|
-
function renderHtml(state, orchToken) {
|
|
9
|
+
function renderHtml(state, orchToken, orchPort) {
|
|
10
10
|
const projectName = state.projectName || 'No project initialized';
|
|
11
|
+
// #969 — the client used to hardcode port 7718 for the orchestrator API.
|
|
12
|
+
// A dashboard started with ORCH_PORT set (e.g. to test in isolation from a
|
|
13
|
+
// production instance) would silently talk to the wrong orchestrator. The
|
|
14
|
+
// actual port is injected here — both into the CSP connect-src allowlist
|
|
15
|
+
// and into window.__ORCH_PORT__ for orchestrator.js to read at runtime.
|
|
16
|
+
const port = parseInt(orchPort, 10) || 7718;
|
|
11
17
|
|
|
12
18
|
// Agent roster moved to server/lib/html/client/agents-data.js (Sprint 31.3).
|
|
13
19
|
// AgentsView.js renders it client-side; shell.js no longer needs it.
|
|
@@ -17,7 +23,7 @@ function renderHtml(state, orchToken) {
|
|
|
17
23
|
<head>
|
|
18
24
|
<meta charset="UTF-8">
|
|
19
25
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
20
|
-
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com data:; img-src 'self' data:; connect-src 'self' http://localhost
|
|
26
|
+
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com data:; img-src 'self' data:; connect-src 'self' http://localhost:${port} http://127.0.0.1:${port} ws: wss:; object-src 'none'; base-uri 'self'; frame-ancestors 'none'">
|
|
21
27
|
<meta http-equiv="X-Content-Type-Options" content="nosniff">
|
|
22
28
|
<meta name="referrer" content="strict-origin-when-cross-origin">
|
|
23
29
|
<title>Majlis — ${esc(projectName)}</title>
|
|
@@ -26,7 +32,7 @@ function renderHtml(state, orchToken) {
|
|
|
26
32
|
<script src="https://cdn.jsdelivr.net/npm/marked@18.0.4/lib/marked.umd.js" integrity="sha384-8RA8Ah4c9upJmKfg5nH01OgjZoQ3mRX+ngrKYWXQYj2dHYxFqYz8POSlii33f0wB" crossorigin="anonymous"><\/script>
|
|
27
33
|
<script src="https://cdn.jsdelivr.net/npm/xterm@5.3.0/lib/xterm.js" integrity="sha384-/nfmYPUzWMS6v2atn8hbljz7NE0EI1iGx34lJaNzyVjWGDzMv+ciUZUeJpKA3Glc" crossorigin="anonymous"><\/script>
|
|
28
34
|
<script src="https://cdn.jsdelivr.net/npm/xterm-addon-fit@0.8.0/lib/xterm-addon-fit.js" integrity="sha384-AQLWHRKAgdTxkolJcLOELg4E9rE89CPE2xMy3tIRFn08NcGKPTsELdvKomqji+DL" crossorigin="anonymous"><\/script>
|
|
29
|
-
<script>window.__ORCH_TOKEN__ = ${JSON.stringify(orchToken || '')};<\/script>
|
|
35
|
+
<script>window.__ORCH_TOKEN__ = ${JSON.stringify(orchToken || '')}; window.__ORCH_PORT__ = ${port};<\/script>
|
|
30
36
|
${renderCss()}
|
|
31
37
|
</head>
|
|
32
38
|
<body>
|
package/server/orchestrator.js
CHANGED
|
@@ -791,10 +791,9 @@ const server = http.createServer(async (req, res) => {
|
|
|
791
791
|
res.writeHead(404); res.end('Not found');
|
|
792
792
|
});
|
|
793
793
|
|
|
794
|
-
server
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
});
|
|
794
|
+
// NOTE: the single server 'error' handler lives below the WebSocket block —
|
|
795
|
+
// a second handler here would fire first and exit(1) before the EADDRINUSE
|
|
796
|
+
// exit(2) path runs, re-triggering the dashboard's 3s respawn loop (#964).
|
|
798
797
|
|
|
799
798
|
// WebSocket upgrade — authenticate, validate the storyId, then hand off.
|
|
800
799
|
if (WebSocketServer) {
|