Commit graph

21 commits

Author SHA1 Message Date
Manohar
84aa98dd14 refactor(dashboard): rewrite activity page, simplify activity API 2026-06-05 19:49:23 +00:00
Manohar
2cbb9b3bcf feat(dashboard): knowledge page + Tiger knowledge API 2026-06-05 19:49:23 +00:00
Manohar
598dbdd4a4 refactor(bridge): update tasks-file route 2026-06-05 19:49:23 +00:00
Manohar
e00c6db544 feat(bridge): add alerts, context, spawn, suggestions, health, feedback, knowledge, chat-mirror, telegram-webhook, angel/positions routes + wire in index.ts 2026-06-05 19:49:23 +00:00
Manohar
2c0bf6c999 chore(dashboard): dependency updates 2026-06-05 19:49:23 +00:00
Manohar
10e42260b6 chore(bridge): dependency updates for new route surface 2026-06-05 19:49:23 +00:00
Manohar
808deeb34f docs: add ARCHITECTURE.md (Task 7) 2026-05-03 06:02:41 +00:00
Manohar
9c3e8ac69f chore(bridge): update index.ts header docblock + tiger.ts comment (Task 2 cleanup) 2026-05-03 06:01:41 +00:00
Manohar
a109009352 chore: remove pre-ws-migration backups; add smoke-test; clean IDENTITY/SOUL
- Remove bridge/src/routes/chat.ts.pre-ws-migration (obsolete backup)
- Remove IDENTITY.md + SOUL.md from repo root (canonical copies live in
  Docker named volume, not git — these were incorrectly tracked)
- Add scripts/smoke-test.sh: 11-check test suite for bridge + OpenClaw
  Run after every deploy. All 11 checks passing on current build.
2026-05-02 20:12:43 +00:00
Manohar
4ee0517345 feat(dashboard): agents page, knowledge, schedule/digest cards, dual-source tasks
- app/agents/: new Agents page showing per-agent status + workspace files
- app/knowledge/: Knowledge base viewer
- app/api/tiger/: proxy routes for cron, file-tasks, file-projects, keys, agents
- components/agent-strip.tsx: agent status bar for dashboard home
- components/command-bar.tsx: command palette
- components/digest-card.tsx + schedule-card.tsx: weekly digest + cron schedule
- components/status-footer.tsx: system status footer
- tasks page: dual-source (TASKS.md JSON block + SQLite) with fallback
- projects page: PROJECTS.md reader with kanban board integration
2026-05-02 20:11:43 +00:00
Manohar
968d6fd178 fix(bridge): tempfile escaping in chat/dispatch/tasks; remove stale K8S refs
Shell escaping fixes (all three routes had the same bug):
- chat.ts: replace escapedMessage + shell-inline with tmpFile docker cp pattern
- dispatch.ts: replace escapedJson + printf with tmpFile docker cp pattern
- tasks.ts: same as dispatch
- inbox path corrected: /sandbox/... → /home/node/.openclaw/workspace/tasks/inbox

Stale reference removals:
- tiger.ts: remove K8S_NAMESPACE + POD_NAME constants (dead since k3s exit)
- index.ts: rewrite header docblock (Caddy→Traefik, k3s→docker exec)
- dispatch.ts: kubectl comment → docker exec comment
- tasks.ts: same kubectl comment fix
2026-05-02 20:10:43 +00:00
Manohar
a65902edf9 feat(bridge): Telegram polling, file-based tasks/projects, cron/keys/deploy routes
- routes/notify.ts: Telegram delivery endpoint POST /tiger/notify
- routes/tasks-file.ts: TASKS.md/PROJECTS.md reader (JSON block parser — P0 fix)
  Parser reads only from TASKS_JSON fenced block; returns 502 if block absent
- routes/cron.ts: GET /tiger/cron + POST /tiger/cron/:id/run
- routes/keys.ts: GET /tiger/keys (key presence map, no values exposed)
- routes/agents-activity.ts: GET /tiger/agents/:id/files
- routes/route-task.ts: POST /tiger/route-task (LLM router)
- routes/deploy.ts: POST /tiger/deploy-dashboard (path: OpenClawDashboard)
- db.ts: comment Reserved telegram columns (future task-from-Telegram)
2026-05-02 20:09:43 +00:00
Manohar
fbeba9e300 feat(bridge): LLM routing lib + model fallback chain to free model
- Add bridge/src/lib/ (llm.ts and supporting helpers) for LLM routing
- Fix model fallback chain: add openrouter/arcee-ai/trinity-large-preview:free
  as second fallback so a free model catches OpenRouter billing failures
- Previous state: MiniMax timeout → openrouter/auto → billing error → outage
- Now: MiniMax → openrouter/auto → arcee-ai/trinity-large-preview:free
2026-05-02 20:08:43 +00:00
76620da6b2 chore: save working state before bind-mount setup (pre tiger write access) 2026-04-25 20:05:51 +00:00
03ae4072d9 fix(deploy): grep with no matches no longer aborts script under set -e
The UNTRACKED count used 'git status --short | grep '^??' | wc -l | xargs'.
When the working tree is clean, grep exits 1 (no matches found). Combined
with 'set -euo pipefail' at the top of the script, that exit 1 killed the
script mid-preflight.

Fix: use 'grep -c' with '|| true' fallback. grep -c counts matches and
prints 0 if none; the fallback handles the exit code so set -e is happy.
2026-04-19 13:21:01 +05:30
01ab630085 feat(dev): deploy.sh + local-dev.sh + bridge remote mode
deploy.sh:
  Validated explicit-deploy workflow. Pre-flight checks (local build,
  uncommitted changes, server reachability) run on Mac before touching
  server. Code pushed to server via 'git push ssh://...' over the
  existing SSH connection — no Mac SSH server required. Server does
  git reset --hard to the pushed commit, reinstalls deps if
  package.json changed, rebuilds dashboard, restarts services, verifies
  health. Full troubleshooting guide in file header.

local-dev.sh:
  Runs bridge (:3457) and dashboard (:3101) locally on Mac while
  reaching Tiger via SSH. Separate ports + separate SQLite DB keep it
  isolated from prod (still live on :3100/:3456). Hot-reload in both
  layers. Clean Ctrl-C shutdown.

bridge remote mode:
  Added TIGER_REMOTE=true support in bridge/src/tiger.ts and chat.ts.
  When set, 'docker exec tiger-openclaw' calls are prefixed with
  'ssh $TIGER_REMOTE_SSH'. Backward-compatible: VPS leaves TIGER_REMOTE
  unset and runs docker locally as before.

Workflow moving forward:
  • Edit locally on Mac
  • ./local-dev.sh to test against real Tiger
  • git commit small + often
  • ./deploy.sh to push to production
2026-04-19 01:24:23 +05:30
1c04c9d5f1 chore: sync pre-existing uncommitted work from migration era
These files accumulated between commit d4a3f2b (initial dashboard) and
today's fix work. Grouping them into one commit to avoid losing history
rather than attempting to backdate individual changes.

Contents:
  • dashboard gateway routes: /api/gw/* + /api/status + /api/tiger/dispatch
  • dashboard components: app-sidebar, cost-monitor, kanban-board, task-dialog
  • dashboard hooks/lib: use-gateway, gateway client
  • dashboard shadcn/ui: dialog, progress, select
  • bridge routes: gateway (gateway proxy for bridge-side control)
  • next.config.ts + package.json/lock updates

Future work should commit in smaller, topical units.
2026-04-18 19:10:47 +00:00
6621c6b28b feat(chat): server-side persistence via SQLite
Chat history now survives hard refresh, tab close, and multi-device use.

Schema:
  chat_messages(id, session_id, role, content, meta, created_at)
  + index on (session_id, created_at DESC)

Bridge endpoints:
  POST   /tiger/chat          — unchanged externally, now persists
                                user + agent messages alongside the
                                existing LLM dispatch
  GET    /tiger/chat/history  — ?sessionId=X&limit=200 → ordered messages
  DELETE /tiger/chat/history  — ?sessionId=X → wipe history

Dashboard:
  /api/chat/history           — proxy route, bridge token stays server-side
  contexts/chat-context.tsx   — ChatProvider hydrates messages from the
                                history endpoint on mount; clearChat()
                                now also hits DELETE /api/chat/history

Design: single-session model for now (DEFAULT_SESSION_ID constant matches
the openclaw agent --session-id used by the dispatch call). Multi-session
support would require session UI + session-aware routing — deferred to a
later feature sprint.

Tradeoff noted: message data is duplicated between our SQLite and whatever
state OpenClaw keeps internally. Chose duplication over coupling — if
OpenClaw session semantics change, dashboard history remains intact.
2026-04-18 19:10:47 +00:00
8fe6694a21 fix(infra): rebrand, workspace path, model config, chat SSE streaming
- Rebrand Tarzan → Tiger in layout metadata and header
- Bridge: point WORKSPACE_SYMLINK at the docker volume path post-migration
  (/var/lib/docker/volumes/tiger_tiger-workspace/_data) — the old
  /root/tiger-workspace symlink was orphaned after the April standalone
  migration, causing workspace endpoint to return empty.
- Bridge: read agents.defaults.model.primary for model info + expose all
  configured availableModels so the dashboard card can show them.
- Dashboard: page.tsx renders currentModel/fallbackModels/availableModels.
- Chat streaming fix (client side):
  * proper SSE buffering across TCP chunks (split on \n\n, keep tail in
    buffer, {stream: true} decoder for multi-byte UTF-8)
  * separate status vs chunk handlers — status no longer pollutes content
  * fall back to data.content in done event if streamingRef is empty
  * visible parse errors instead of silent catch
  * plain-text rendering while streaming, ReactMarkdown only after done —
    avoids per-token markdown reparse which was killing the typing feel

Root causes:
  1. tiger-bridge crash-looped for 36h on EADDRINUSE because a manual
     nohup restart squatted on port 3456; systemd's tsx version couldn't
     bind. Killing the squatter restored the expected tsx-src workflow.
  2. ChunkLoadError on /chat: npm run build ran under a live next start
     prod server, creating an in-memory manifest vs on-disk build split.
     Fixed by disciplined build-then-restart.
  3. Dashboard chat silently dropped responses: SSE 'status' event text
     was being concatenated into the agent message content.
2026-04-18 19:10:47 +00:00
d4a3f2b869 feat: complete Tiger dashboard implementation
- Bridge: Express API server with SQLite (projects, tasks, executions, outputs)
- Dashboard: Next.js app rewired from WebSocket gateway to Tiger Bridge HTTP API
- Tasks: Kanban board with drag-drop, project management with CRUD
- Dispatch: Task dispatch to sandbox with file watcher for status updates
- UI: Container health panel, workspace browser, logs viewer, output viewer

Critical fixes:
- Use execInSandbox instead of execOnHost for container operations
- Watch symlink path instead of container-internal path
- URL-encoded params for GET requests instead of body
- PUT/DELETE support added to useBridgeRequest

Sprints 1-5 complete. Ready for VPS deployment.
2026-04-12 23:27:51 +05:30
10d1555e9d feat: initial commit with dashboard, docs, and configurations 2026-02-10 20:54:37 +05:30