Add agent command execution (terminal panel)
- DB: new agent_commands table (id, agent_id, command, status, output, exit_code, timestamps)
- Server: 4 new routes
POST /api/agents/:id/commands queue a command (dashboard → agent)
GET /api/agents/:id/commands history (last 50) for dashboard
GET /api/agents/commands/pending agent dequeues + marks running (Bearer auth)
POST /api/agents/commands/:id/result agent posts output/exit_code (Bearer auth)
Output capped at 128 KB; Bearer token enforced on agent-facing routes
- Agents (Linux/macOS/Windows): each polls /commands/pending each cycle,
executes via bash/PowerShell with 60s timeout, posts result back
- UI: ">_" button on each AgentCard opens CommandTerminal panel
Input line, Run button, history list (status icon + command + time)
Click any entry with output to expand/collapse its output
Auto-refreshes every 4 s while open
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
13b3e3612b
commit
ce4bea5e29
15 files changed
+543
-15
No files matched your search
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"files": {
|
||||
"main.css": "/static/css/main.4668db54.css",
|
||||
"main.js": "/static/js/main.f791418f.js",
|
||||
"main.css": "/static/css/main.b251a0fb.css",
|
||||
"main.js": "/static/js/main.b7e3c916.js",
|
||||
"static/js/453.d456ce70.chunk.js": "/static/js/453.d456ce70.chunk.js",
|
||||
"index.html": "/index.html",
|
||||
"main.4668db54.css.map": "/static/css/main.4668db54.css.map",
|
||||
"main.f791418f.js.map": "/static/js/main.f791418f.js.map",
|
||||
"main.b251a0fb.css.map": "/static/css/main.b251a0fb.css.map",
|
||||
"main.b7e3c916.js.map": "/static/js/main.b7e3c916.js.map",
|
||||
"453.d456ce70.chunk.js.map": "/static/js/453.d456ce70.chunk.js.map"
|
||||
},
|
||||
"entrypoints": [
|
||||
"static/css/main.4668db54.css",
|
||||
"static/js/main.f791418f.js"
|
||||
"static/css/main.b251a0fb.css",
|
||||
"static/js/main.b7e3c916.js"
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user