@rubytech/create-realagent 1.0.856 → 1.0.858
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/dist/index.js +6 -6
- package/dist/port-resolution.js +1 -1
- package/package.json +2 -2
- package/payload/platform/plugins/admin/hooks/pre-tool-use.sh +2 -2
- package/payload/platform/plugins/admin/mcp/dist/lib/neo4j.js +1 -1
- package/payload/platform/plugins/admin/mcp/dist/lib/neo4j.js.map +1 -1
- package/payload/platform/plugins/cloudflare/scripts/_stream-log.sh +1 -1
- package/payload/platform/plugins/cloudflare/scripts/setup-tunnel.sh +36 -9
- package/payload/platform/plugins/contacts/mcp/dist/lib/neo4j.js +1 -1
- package/payload/platform/plugins/contacts/mcp/dist/lib/neo4j.js.map +1 -1
- package/payload/platform/plugins/email/mcp/dist/lib/neo4j.js +1 -1
- package/payload/platform/plugins/email/mcp/dist/lib/neo4j.js.map +1 -1
- package/payload/platform/plugins/email/mcp/dist/scripts/email-auto-respond.js +1 -1
- package/payload/platform/plugins/email/mcp/dist/scripts/email-auto-respond.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/neo4j.js +1 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/neo4j.js.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/lib/neo4j.js +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/lib/neo4j.js.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/check-due-events.js +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/check-due-events.js.map +1 -1
- package/payload/platform/plugins/tasks/mcp/dist/lib/neo4j.js +1 -1
- package/payload/platform/plugins/tasks/mcp/dist/lib/neo4j.js.map +1 -1
- package/payload/platform/plugins/waitlist/mcp/dist/lib/neo4j.js +1 -1
- package/payload/platform/plugins/waitlist/mcp/dist/lib/neo4j.js.map +1 -1
- package/payload/platform/plugins/workflows/mcp/dist/lib/neo4j.js +1 -1
- package/payload/platform/plugins/workflows/mcp/dist/lib/neo4j.js.map +1 -1
- package/payload/platform/scripts/check-no-task-id-leaks.mjs +110 -0
- package/payload/platform/scripts/vnc.sh +6 -6
- package/payload/server/chunk-7ADUQXTU.js +2143 -0
- package/payload/server/chunk-BY4LZDL4.js +667 -0
- package/payload/server/chunk-CNNPNADU.js +10891 -0
- package/payload/server/chunk-FL3H3AQD.js +1603 -0
- package/payload/server/client-pool-WA5WGN7W.js +34 -0
- package/payload/server/cloudflare-task-tracker-OOQCL5ZB.js +20 -0
- package/payload/server/maxy-edge.js +3 -3
- package/payload/server/server.js +8 -8
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Build-time gate: rejects `(Task NNN)` citations in operator-visible production
|
|
3
|
+
// strings. Citations are allowed in inline comments and test titles/bodies only.
|
|
4
|
+
//
|
|
5
|
+
// Live repro that motivated the gate: setup-tunnel.sh on realagent 192.168.88.8
|
|
6
|
+
// emitted `Re-run the installer to provision Chromium (Task 929).` to the
|
|
7
|
+
// operator's chat surface — the citation made the operator chase Task 929's
|
|
8
|
+
// history rather than execute the verb. Operator surfaces strip citations;
|
|
9
|
+
// internal references keep them.
|
|
10
|
+
//
|
|
11
|
+
// Comment-skip is line-leading-character based, not AST. The repo's actual
|
|
12
|
+
// comment forms are: `#` (shell), `//` (TS/JS line), `*`/`/*`/`/**` (JSDoc
|
|
13
|
+
// continuation, block, doc), and `{/*` (JSX). Any line whose first non-
|
|
14
|
+
// whitespace token is one of these is skipped. Test files (`__tests__/` and
|
|
15
|
+
// `*.test.{ts,tsx,js}`) are skipped wholesale because the brief's out-of-scope
|
|
16
|
+
// rule covers test titles, and test bodies that assert on citations are
|
|
17
|
+
// equivalent to titles for this gate's purpose.
|
|
18
|
+
|
|
19
|
+
import { readFileSync, readdirSync, statSync } from 'node:fs'
|
|
20
|
+
import { dirname, join, relative, sep, basename } from 'node:path'
|
|
21
|
+
import { fileURLToPath } from 'node:url'
|
|
22
|
+
|
|
23
|
+
const SCRIPT_DIR = dirname(fileURLToPath(import.meta.url))
|
|
24
|
+
const REPO_ROOT = join(SCRIPT_DIR, '..', '..')
|
|
25
|
+
|
|
26
|
+
const SCAN_ROOTS = [
|
|
27
|
+
join(REPO_ROOT, 'platform', 'scripts'),
|
|
28
|
+
join(REPO_ROOT, 'platform', 'plugins'),
|
|
29
|
+
join(REPO_ROOT, 'platform', 'ui', 'server'),
|
|
30
|
+
join(REPO_ROOT, 'platform', 'ui', 'app'),
|
|
31
|
+
join(REPO_ROOT, 'packages', 'create-maxy', 'src'),
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
const ALLOWED_EXTS = new Set(['.sh', '.ts', '.tsx', '.js', '.mjs', '.cjs'])
|
|
35
|
+
const SKIP_DIR_NAMES = new Set([
|
|
36
|
+
'node_modules', 'dist', 'build', '.next', 'payload', '__tests__',
|
|
37
|
+
])
|
|
38
|
+
const TASK_ID_RE = /\(Task \d+\)/
|
|
39
|
+
|
|
40
|
+
function isCommentLine(line) {
|
|
41
|
+
const trimmed = line.replace(/^\s+/, '')
|
|
42
|
+
if (trimmed.startsWith('#')) return true
|
|
43
|
+
if (trimmed.startsWith('//')) return true
|
|
44
|
+
if (trimmed.startsWith('/*')) return true
|
|
45
|
+
if (trimmed.startsWith('*')) return true
|
|
46
|
+
if (trimmed.startsWith('{/*')) return true
|
|
47
|
+
return false
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function shouldScanFile(filePath) {
|
|
51
|
+
const name = basename(filePath)
|
|
52
|
+
if (name.endsWith('.test.ts')) return false
|
|
53
|
+
if (name.endsWith('.test.tsx')) return false
|
|
54
|
+
if (name.endsWith('.test.js')) return false
|
|
55
|
+
const ext = name.includes('.') ? '.' + name.split('.').pop() : ''
|
|
56
|
+
return ALLOWED_EXTS.has(ext)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function* walk(root) {
|
|
60
|
+
let entries
|
|
61
|
+
try {
|
|
62
|
+
entries = readdirSync(root)
|
|
63
|
+
} catch {
|
|
64
|
+
return
|
|
65
|
+
}
|
|
66
|
+
for (const name of entries) {
|
|
67
|
+
if (SKIP_DIR_NAMES.has(name)) continue
|
|
68
|
+
const full = join(root, name)
|
|
69
|
+
let st
|
|
70
|
+
try { st = statSync(full) } catch { continue }
|
|
71
|
+
if (st.isDirectory()) {
|
|
72
|
+
yield* walk(full)
|
|
73
|
+
} else if (st.isFile()) {
|
|
74
|
+
yield full
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const leaks = []
|
|
80
|
+
|
|
81
|
+
for (const root of SCAN_ROOTS) {
|
|
82
|
+
for (const file of walk(root)) {
|
|
83
|
+
if (!shouldScanFile(file)) continue
|
|
84
|
+
let content
|
|
85
|
+
try {
|
|
86
|
+
content = readFileSync(file, 'utf-8')
|
|
87
|
+
} catch {
|
|
88
|
+
continue
|
|
89
|
+
}
|
|
90
|
+
const lines = content.split('\n')
|
|
91
|
+
for (let i = 0; i < lines.length; i++) {
|
|
92
|
+
const line = lines[i]
|
|
93
|
+
if (!TASK_ID_RE.test(line)) continue
|
|
94
|
+
if (isCommentLine(line)) continue
|
|
95
|
+
leaks.push({ file: relative(REPO_ROOT, file), line: i + 1, content: line.trim() })
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if (leaks.length > 0) {
|
|
101
|
+
console.error(`check-no-task-id-leaks: ${leaks.length} operator-visible (Task NNN) citation(s) found:`)
|
|
102
|
+
for (const leak of leaks) {
|
|
103
|
+
console.error(` ${leak.file}:${leak.line}: ${leak.content}`)
|
|
104
|
+
}
|
|
105
|
+
console.error('')
|
|
106
|
+
console.error('Citations belong in inline comments only, never in operator-visible strings')
|
|
107
|
+
console.error('(stderr/stdout, log files surfaced via logs-read.sh, systemd unit')
|
|
108
|
+
console.error('--description=, error messages, console.log/warn/error, throw new Error).')
|
|
109
|
+
process.exit(1)
|
|
110
|
+
}
|
|
@@ -96,18 +96,18 @@ CHROMIUM_BIN_FILE="${PLATFORM_ROOT}/config/chromium-binary.path"
|
|
|
96
96
|
if [ ! -r "$CHROMIUM_BIN_FILE" ]; then
|
|
97
97
|
log "[vnc.sh:chromium] FATAL: ${CHROMIUM_BIN_FILE} missing or unreadable"
|
|
98
98
|
echo "ERROR: ${CHROMIUM_BIN_FILE} missing or unreadable." >&2
|
|
99
|
-
echo " Re-run the installer to provision a non-snap Chromium
|
|
99
|
+
echo " Re-run the installer to provision a non-snap Chromium." >&2
|
|
100
100
|
exit 1
|
|
101
101
|
fi
|
|
102
102
|
CHROMIUM_BIN="$(head -n1 "$CHROMIUM_BIN_FILE" | tr -d '[:space:]')"
|
|
103
103
|
if [ -z "$CHROMIUM_BIN" ]; then
|
|
104
104
|
log "[vnc.sh:chromium] FATAL: ${CHROMIUM_BIN_FILE} is empty"
|
|
105
|
-
echo "ERROR: ${CHROMIUM_BIN_FILE} is empty — re-run installer
|
|
105
|
+
echo "ERROR: ${CHROMIUM_BIN_FILE} is empty — re-run installer." >&2
|
|
106
106
|
exit 1
|
|
107
107
|
fi
|
|
108
108
|
if [ ! -x "$CHROMIUM_BIN" ]; then
|
|
109
109
|
log "[vnc.sh:chromium] FATAL: configured CHROMIUM_BIN=${CHROMIUM_BIN} is not executable"
|
|
110
|
-
echo "ERROR: configured Chromium binary ${CHROMIUM_BIN} is not executable — re-run installer
|
|
110
|
+
echo "ERROR: configured Chromium binary ${CHROMIUM_BIN} is not executable — re-run installer." >&2
|
|
111
111
|
exit 1
|
|
112
112
|
fi
|
|
113
113
|
CHROMIUM_REALPATH="$(readlink -f "$CHROMIUM_BIN" 2>/dev/null || echo "$CHROMIUM_BIN")"
|
|
@@ -115,7 +115,7 @@ case ":$(echo "$CHROMIUM_REALPATH" | tr '/' ':'):" in
|
|
|
115
115
|
*:snap:*)
|
|
116
116
|
log "[vnc.sh:chromium] FATAL: CHROMIUM_BIN=${CHROMIUM_BIN} resolves to ${CHROMIUM_REALPATH} (snap-confined)"
|
|
117
117
|
echo "ERROR: configured Chromium ${CHROMIUM_BIN} resolves to ${CHROMIUM_REALPATH} which is snap-confined." >&2
|
|
118
|
-
echo " Snap AppArmor denies writes to ~/.{brand}/chromium-profile/. Re-run installer to install Google Chrome
|
|
118
|
+
echo " Snap AppArmor denies writes to ~/.{brand}/chromium-profile/. Re-run installer to install Google Chrome." >&2
|
|
119
119
|
exit 1
|
|
120
120
|
;;
|
|
121
121
|
esac
|
|
@@ -305,7 +305,7 @@ start_chrome_on() {
|
|
|
305
305
|
if check_window_on_display "${target_display}"; then
|
|
306
306
|
log "Chromium ready (${label}) with CDP on :${CDP_PORT} windowPresent=true"
|
|
307
307
|
else
|
|
308
|
-
log "WARNING: Chromium CDP up on :${CDP_PORT} but no window visible on ${target_display} (${label}) — observability-only, not gating
|
|
308
|
+
log "WARNING: Chromium CDP up on :${CDP_PORT} but no window visible on ${target_display} (${label}) — observability-only, not gating"
|
|
309
309
|
fi
|
|
310
310
|
else
|
|
311
311
|
log "ERROR: Chromium failed to start on ${target_display} (${label}) — CDP port ${CDP_PORT} not listening (browser-specialist degraded)"
|
|
@@ -381,7 +381,7 @@ start_chrome_native() {
|
|
|
381
381
|
elif [ "$NATIVE_SESSION_TYPE" = "wayland" ]; then
|
|
382
382
|
log "Chromium ready (native) with CDP on :${CDP_PORT} windowPresent=unknown (wayland)"
|
|
383
383
|
else
|
|
384
|
-
log "WARNING: Chromium CDP up on :${CDP_PORT} but no window visible on ${NATIVE_DISPLAY} (native) — observability-only, not gating
|
|
384
|
+
log "WARNING: Chromium CDP up on :${CDP_PORT} but no window visible on ${NATIVE_DISPLAY} (native) — observability-only, not gating"
|
|
385
385
|
fi
|
|
386
386
|
else
|
|
387
387
|
log "ERROR: Chromium failed to start on ${NATIVE_DISPLAY} (native) — CDP port ${CDP_PORT} not listening (browser-specialist degraded)"
|