Spaces:
Runtime error
Runtime error
Nyk commited on
Commit ·
2d79c1a
1
Parent(s): 78b1a46
fix: scrub deployment-specific data from public repo
Browse files- Replace hardcoded Telegram bot integrations (Jarv/Forge/Nefes/Ops)
with a single generic Telegram entry
- Remove 'forge' agent from hardcoded UI color themes
- Replace /home/openclaw/ paths in .env.example with /path/to/
- Fix default port in scripts: 3005 → 3000 (matches docs)
- Replace 'Jarvis' placeholder with generic 'my-agent'
- Rename 'Forge' → 'Builder' in agent identity registry
- .env.example +3 -3
- scripts/agent-heartbeat.sh +1 -1
- scripts/notification-daemon.sh +1 -1
- src/app/api/integrations/route.ts +3 -9
- src/components/chat/chat-panel.tsx +0 -1
- src/components/chat/message-bubble.tsx +0 -1
- src/components/panels/agent-comms-panel.tsx +1 -1
- src/components/panels/notifications-panel.tsx +1 -1
.env.example
CHANGED
|
@@ -65,9 +65,9 @@ NEXT_PUBLIC_GATEWAY_URL=
|
|
| 65 |
# MISSION_CONTROL_TOKENS_PATH=.data/mission-control-tokens.json
|
| 66 |
|
| 67 |
# === OpenClaw Paths (derived from OPENCLAW_HOME if not set) ===
|
| 68 |
-
# OPENCLAW_LOG_DIR=/
|
| 69 |
-
# OPENCLAW_MEMORY_DIR=/
|
| 70 |
-
# OPENCLAW_SOUL_TEMPLATES_DIR=/
|
| 71 |
# OPENCLAW_BIN=openclaw
|
| 72 |
|
| 73 |
# === Super Admin / Provisioning (optional) ===
|
|
|
|
| 65 |
# MISSION_CONTROL_TOKENS_PATH=.data/mission-control-tokens.json
|
| 66 |
|
| 67 |
# === OpenClaw Paths (derived from OPENCLAW_HOME if not set) ===
|
| 68 |
+
# OPENCLAW_LOG_DIR=/path/to/.openclaw/logs
|
| 69 |
+
# OPENCLAW_MEMORY_DIR=/path/to/.openclaw/memory
|
| 70 |
+
# OPENCLAW_SOUL_TEMPLATES_DIR=/path/to/.openclaw/templates/souls
|
| 71 |
# OPENCLAW_BIN=openclaw
|
| 72 |
|
| 73 |
# === Super Admin / Provisioning (optional) ===
|
scripts/agent-heartbeat.sh
CHANGED
|
@@ -11,7 +11,7 @@
|
|
| 11 |
set -e
|
| 12 |
|
| 13 |
# Configuration
|
| 14 |
-
MISSION_CONTROL_URL="${MISSION_CONTROL_URL:-http://localhost:
|
| 15 |
LOG_DIR="${LOG_DIR:-$HOME/.mission-control/logs}"
|
| 16 |
LOG_FILE="$LOG_DIR/agent-heartbeat-$(date +%Y-%m-%d).log"
|
| 17 |
MAX_CONCURRENT=3 # Max agents to check concurrently
|
|
|
|
| 11 |
set -e
|
| 12 |
|
| 13 |
# Configuration
|
| 14 |
+
MISSION_CONTROL_URL="${MISSION_CONTROL_URL:-http://localhost:3000}"
|
| 15 |
LOG_DIR="${LOG_DIR:-$HOME/.mission-control/logs}"
|
| 16 |
LOG_FILE="$LOG_DIR/agent-heartbeat-$(date +%Y-%m-%d).log"
|
| 17 |
MAX_CONCURRENT=3 # Max agents to check concurrently
|
scripts/notification-daemon.sh
CHANGED
|
@@ -16,7 +16,7 @@
|
|
| 16 |
set -e
|
| 17 |
|
| 18 |
# Configuration
|
| 19 |
-
MISSION_CONTROL_URL="${MISSION_CONTROL_URL:-http://localhost:
|
| 20 |
LOG_DIR="${LOG_DIR:-$HOME/.mission-control/logs}"
|
| 21 |
LOG_FILE="$LOG_DIR/notification-daemon-$(date +%Y-%m-%d).log"
|
| 22 |
PID_FILE="/tmp/notification-daemon.pid"
|
|
|
|
| 16 |
set -e
|
| 17 |
|
| 18 |
# Configuration
|
| 19 |
+
MISSION_CONTROL_URL="${MISSION_CONTROL_URL:-http://localhost:3000}"
|
| 20 |
LOG_DIR="${LOG_DIR:-$HOME/.mission-control/logs}"
|
| 21 |
LOG_FILE="$LOG_DIR/notification-daemon-$(date +%Y-%m-%d).log"
|
| 22 |
PID_FILE="/tmp/notification-daemon.pid"
|
src/app/api/integrations/route.ts
CHANGED
|
@@ -35,11 +35,8 @@ const INTEGRATIONS: IntegrationDef[] = [
|
|
| 35 |
{ id: 'x_twitter', name: 'X / Twitter', category: 'social', envVars: ['X_COOKIES_PATH'] },
|
| 36 |
{ id: 'linkedin', name: 'LinkedIn', category: 'social', envVars: ['LINKEDIN_ACCESS_TOKEN'] },
|
| 37 |
|
| 38 |
-
// Messaging
|
| 39 |
-
{ id: '
|
| 40 |
-
{ id: 'telegram_forge', name: 'Telegram (Forge)', category: 'messaging', envVars: ['TELEGRAM_BOT_TOKEN_FORGE'], vaultItem: 'openclaw-telegram-bot-token-forge', testable: true },
|
| 41 |
-
{ id: 'telegram_nefes', name: 'Telegram (Nefes)', category: 'messaging', envVars: ['TELEGRAM_BOT_TOKEN_NEFES'], vaultItem: 'openclaw-telegram-bot-token-nefes', testable: true },
|
| 42 |
-
{ id: 'telegram_ops', name: 'Telegram (Ops)', category: 'messaging', envVars: ['TELEGRAM_BOT_TOKEN_OPS'], vaultItem: 'openclaw-telegram-bot-token-ops', testable: true },
|
| 43 |
|
| 44 |
// Dev Tools
|
| 45 |
{ id: 'github', name: 'GitHub', category: 'devtools', envVars: ['GITHUB_TOKEN'], vaultItem: 'openclaw-github-token', testable: true },
|
|
@@ -419,10 +416,7 @@ async function handleTest(
|
|
| 419 |
let result: { ok: boolean; detail: string }
|
| 420 |
|
| 421 |
switch (integration.id) {
|
| 422 |
-
case '
|
| 423 |
-
case 'telegram_forge':
|
| 424 |
-
case 'telegram_nefes':
|
| 425 |
-
case 'telegram_ops': {
|
| 426 |
const token = envMap.get(integration.envVars[0])
|
| 427 |
if (!token) return NextResponse.json({ ok: false, detail: 'Token not set' })
|
| 428 |
const res = await fetch(`https://api.telegram.org/bot${token}/getMe`, { signal: AbortSignal.timeout(5000) })
|
|
|
|
| 35 |
{ id: 'x_twitter', name: 'X / Twitter', category: 'social', envVars: ['X_COOKIES_PATH'] },
|
| 36 |
{ id: 'linkedin', name: 'LinkedIn', category: 'social', envVars: ['LINKEDIN_ACCESS_TOKEN'] },
|
| 37 |
|
| 38 |
+
// Messaging — add entries here for each Telegram bot you run
|
| 39 |
+
{ id: 'telegram', name: 'Telegram', category: 'messaging', envVars: ['TELEGRAM_BOT_TOKEN'], vaultItem: 'openclaw-telegram-bot-token', testable: true },
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
// Dev Tools
|
| 42 |
{ id: 'github', name: 'GitHub', category: 'devtools', envVars: ['GITHUB_TOKEN'], vaultItem: 'openclaw-github-token', testable: true },
|
|
|
|
| 416 |
let result: { ok: boolean; detail: string }
|
| 417 |
|
| 418 |
switch (integration.id) {
|
| 419 |
+
case 'telegram': {
|
|
|
|
|
|
|
|
|
|
| 420 |
const token = envMap.get(integration.envVars[0])
|
| 421 |
if (!token) return NextResponse.json({ ok: false, detail: 'Token not set' })
|
| 422 |
const res = await fetch(`https://api.telegram.org/bot${token}/getMe`, { signal: AbortSignal.timeout(5000) })
|
src/components/chat/chat-panel.tsx
CHANGED
|
@@ -270,7 +270,6 @@ export function ChatPanel() {
|
|
| 270 |
function AgentAvatar({ name, size = 'md' }: { name: string; size?: 'sm' | 'md' }) {
|
| 271 |
const colors: Record<string, string> = {
|
| 272 |
coordinator: 'bg-purple-500/20 text-purple-400',
|
| 273 |
-
forge: 'bg-blue-500/20 text-blue-400',
|
| 274 |
aegis: 'bg-red-500/20 text-red-400',
|
| 275 |
research: 'bg-green-500/20 text-green-400',
|
| 276 |
ops: 'bg-orange-500/20 text-orange-400',
|
|
|
|
| 270 |
function AgentAvatar({ name, size = 'md' }: { name: string; size?: 'sm' | 'md' }) {
|
| 271 |
const colors: Record<string, string> = {
|
| 272 |
coordinator: 'bg-purple-500/20 text-purple-400',
|
|
|
|
| 273 |
aegis: 'bg-red-500/20 text-red-400',
|
| 274 |
research: 'bg-green-500/20 text-green-400',
|
| 275 |
ops: 'bg-orange-500/20 text-orange-400',
|
src/components/chat/message-bubble.tsx
CHANGED
|
@@ -4,7 +4,6 @@ import { ChatMessage } from '@/store'
|
|
| 4 |
|
| 5 |
const AGENT_COLORS: Record<string, { bg: string; text: string; border: string }> = {
|
| 6 |
coordinator: { bg: 'bg-purple-500/10', text: 'text-purple-400', border: 'border-purple-500/20' },
|
| 7 |
-
forge: { bg: 'bg-blue-500/10', text: 'text-blue-400', border: 'border-blue-500/20' },
|
| 8 |
aegis: { bg: 'bg-red-500/10', text: 'text-red-400', border: 'border-red-500/20' },
|
| 9 |
research: { bg: 'bg-green-500/10', text: 'text-green-400', border: 'border-green-500/20' },
|
| 10 |
design: { bg: 'bg-pink-500/10', text: 'text-pink-400', border: 'border-pink-500/20' },
|
|
|
|
| 4 |
|
| 5 |
const AGENT_COLORS: Record<string, { bg: string; text: string; border: string }> = {
|
| 6 |
coordinator: { bg: 'bg-purple-500/10', text: 'text-purple-400', border: 'border-purple-500/20' },
|
|
|
|
| 7 |
aegis: { bg: 'bg-red-500/10', text: 'text-red-400', border: 'border-red-500/20' },
|
| 8 |
research: { bg: 'bg-green-500/10', text: 'text-green-400', border: 'border-green-500/20' },
|
| 9 |
design: { bg: 'bg-pink-500/10', text: 'text-pink-400', border: 'border-pink-500/20' },
|
src/components/panels/agent-comms-panel.tsx
CHANGED
|
@@ -52,7 +52,7 @@ interface AgentOption {
|
|
| 52 |
// Agent identity: color + emoji (matches openclaw.json)
|
| 53 |
const AGENT_IDENTITY: Record<string, { color: string; emoji: string; label: string }> = {
|
| 54 |
[COORDINATOR_AGENT]: { color: '#a78bfa', emoji: '🧭', label: 'Coordinator' },
|
| 55 |
-
|
| 56 |
research: { color: '#4ade80', emoji: '🔬', label: 'Research' },
|
| 57 |
content: { color: '#818cf8', emoji: '✏️', label: 'Content' },
|
| 58 |
ops: { color: '#fb923c', emoji: '⚡', label: 'Ops' },
|
|
|
|
| 52 |
// Agent identity: color + emoji (matches openclaw.json)
|
| 53 |
const AGENT_IDENTITY: Record<string, { color: string; emoji: string; label: string }> = {
|
| 54 |
[COORDINATOR_AGENT]: { color: '#a78bfa', emoji: '🧭', label: 'Coordinator' },
|
| 55 |
+
builder: { color: '#60a5fa', emoji: '🛠️', label: 'Builder' },
|
| 56 |
research: { color: '#4ade80', emoji: '🔬', label: 'Research' },
|
| 57 |
content: { color: '#818cf8', emoji: '✏️', label: 'Content' },
|
| 58 |
ops: { color: '#fb923c', emoji: '⚡', label: 'Ops' },
|
src/components/panels/notifications-panel.tsx
CHANGED
|
@@ -86,7 +86,7 @@ export function NotificationsPanel() {
|
|
| 86 |
value={recipient}
|
| 87 |
onChange={(e) => setRecipient(e.target.value)}
|
| 88 |
className="w-full bg-surface-1 text-foreground rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-primary/50"
|
| 89 |
-
placeholder="Agent name (e.g.,
|
| 90 |
/>
|
| 91 |
</div>
|
| 92 |
|
|
|
|
| 86 |
value={recipient}
|
| 87 |
onChange={(e) => setRecipient(e.target.value)}
|
| 88 |
className="w-full bg-surface-1 text-foreground rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-primary/50"
|
| 89 |
+
placeholder="Agent name (e.g., my-agent)"
|
| 90 |
/>
|
| 91 |
</div>
|
| 92 |
|