chore(bridge): update index.ts header docblock + tiger.ts comment (Task 2 cleanup)
This commit is contained in:
parent
a109009352
commit
9c3e8ac69f
2 changed files with 51 additions and 14 deletions
|
|
@ -3,23 +3,60 @@
|
||||||
*
|
*
|
||||||
* Express server running on the Hetzner VPS host (port 3456).
|
* Express server running on the Hetzner VPS host (port 3456).
|
||||||
* Wraps docker exec commands into authenticated REST endpoints consumed
|
* Wraps docker exec commands into authenticated REST endpoints consumed
|
||||||
* by the Next.js dashboard and Tiger's cron jobs.
|
* by the Next.js dashboard and Tiger agent cron jobs.
|
||||||
*
|
*
|
||||||
* Architecture:
|
* Architecture:
|
||||||
* Dashboard (Next.js) → HTTPS → Traefik (dokploy-traefik)
|
* Dashboard (Next.js) → HTTPS → Traefik → Tiger Bridge (port 3456)
|
||||||
* → Tiger Bridge (this server, port 3456)
|
* → docker exec tiger-openclaw
|
||||||
* → docker exec tiger-openclaw
|
* → OpenClaw (Tiger agent)
|
||||||
* → OpenClaw agent (Tiger agent)
|
*
|
||||||
|
* Auth: Bearer token (TIGER_BRIDGE_TOKEN). All routes except none are protected.
|
||||||
*
|
*
|
||||||
* Routes:
|
* Routes:
|
||||||
* GET /tiger/status — container health + process state + memory/CPU
|
* GET /tiger/status — container health + memory/CPU
|
||||||
* GET /tiger/logs — SSE stream of real-time container logs
|
* GET /tiger/logs — SSE stream of container logs
|
||||||
* POST /tiger/exec — run a command inside the container
|
* POST /tiger/exec — run arbitrary command in container
|
||||||
* GET /tiger/config — read openclaw.json config
|
* GET /tiger/config — read openclaw.json
|
||||||
* POST /tiger/config — update config
|
* POST /tiger/config — update openclaw.json
|
||||||
* POST /tiger/restart — trigger container restart via watchdog
|
* GET /tiger/config/models — list registered models
|
||||||
* GET /tiger/workspace — list workspace files
|
* GET /tiger/config/models/agents — per-agent model overrides
|
||||||
* GET /tiger/files/:path — read a workspace file
|
* PATCH /tiger/config/models/agents/:id — update agent model
|
||||||
|
* POST /tiger/restart — restart tiger-openclaw container
|
||||||
|
* GET /tiger/workspace — list workspace files
|
||||||
|
* GET /tiger/files/:path — read a workspace file
|
||||||
|
* PUT /tiger/agents/:id/file — write an agent workspace file
|
||||||
|
* GET /tiger/agents — list configured agents
|
||||||
|
* GET /tiger/agents/:id/files — list agent workspace files
|
||||||
|
* GET /tiger/agents/activity — recent agent activity log
|
||||||
|
* GET /tiger/projects — list projects (SQLite)
|
||||||
|
* POST /tiger/projects — create project
|
||||||
|
* GET /tiger/projects/:id — get project
|
||||||
|
* PUT /tiger/projects/:id — update project
|
||||||
|
* DELETE /tiger/projects/:id — delete project
|
||||||
|
* GET /tiger/tasks — list tasks (SQLite)
|
||||||
|
* GET /tiger/tasks/:id — get task
|
||||||
|
* PUT /tiger/tasks/:id — update task
|
||||||
|
* DELETE /tiger/tasks/:id — delete task
|
||||||
|
* POST /tiger/tasks/:id/execute — enqueue task for execution
|
||||||
|
* GET /tiger/file-tasks — TASKS.md → tasks[] (JSON block)
|
||||||
|
* GET /tiger/file-tasks/active — in-progress + pending-action only
|
||||||
|
* GET /tiger/file-tasks/completed — completed section only
|
||||||
|
* GET /tiger/file-tasks/projects — PROJECTS.md → projects[]
|
||||||
|
* GET /tiger/cron — list cron jobs (jobs.json)
|
||||||
|
* POST /tiger/cron/:id/run — fire cron job immediately
|
||||||
|
* POST /tiger/notify — send Telegram message {message, chatId?}
|
||||||
|
* POST /tiger/dispatch — enqueue task to SQLite + write to inbox
|
||||||
|
* GET /tiger/dispatch/status/:id — poll task execution status
|
||||||
|
* POST /tiger/chat — SSE streaming chat to Tiger agent
|
||||||
|
* GET /tiger/chat/history — recent chat messages (SQLite)
|
||||||
|
* DELETE /tiger/chat/history — clear chat history
|
||||||
|
* POST /tiger/chat/persist — persist a message to SQLite
|
||||||
|
* POST /tiger/route-task — LLM router: which agent handles X?
|
||||||
|
* POST /tiger/deploy-dashboard — git pull + rebuild + restart dashboard
|
||||||
|
* GET /tiger/keys — key presence map (no values exposed)
|
||||||
|
* PATCH /tiger/keys — upsert a key
|
||||||
|
* DELETE /tiger/keys/:name — remove a key
|
||||||
|
* ALL /api/gateway — proxy to OpenClaw gateway API
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import express from "express";
|
import express from "express";
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ async function execFileOnHost(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute a command inside the Tiger container.
|
* Execute a command inside the Tiger container.
|
||||||
* Commands run directly via docker exec (no kubectl needed).
|
* Commands run directly via docker exec inside tiger-openclaw container.
|
||||||
*/
|
*/
|
||||||
export async function execInSandbox(
|
export async function execInSandbox(
|
||||||
command: string,
|
command: string,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue