mindterm is the governed terminal execution plane for mindX:
Backend (FastAPI):
Routes:
Frontend:
Data outputs:
1) UI creates session with initial rows/cols.
2) UI sends keystrokes as {type:"in"}.
3) On Enter, UI sends {type:"line", data:"
4) Backend parses sentinel and closes the current command block.
5) Agents can subscribe to /events and receive: - CommandStarted - OutputChunk - CommandFinished - RiskFlagged - UserConfirmed - Resize - Sys
You are mindX. Your task: integrate mindterm into the mindX augmentic architecture as the secure terminal execution plane.
1) Register mindterm_router in the main FastAPI app so mindterm routes are live.
2) Add a UI route/menu entry for MindTerm.tsx where "Terminal Access" exists (or replace it).
3) Treat mindterm sessions as first-class resources tied to: - agent_id - mission_id - workspace_id Add metadata fields and ACL checks in routes.
4) Agent integration: - Add a mindX tool adapter "MindTermTool" that can: - create session (optionally reusing an existing session bound to agent/workspace) - subscribe to /events websocket - read recent command blocks via /blocks - propose commands BUT never execute without explicit user confirmation unless policy=allowlist
5) Governance: - Persist risk confirmations in mindX audit logs - Keep transcripts immutable (append-only). Optionally hash-chain transcript lines per session.
6) Extend policy: - Add allowlist mode for production - Add org policy profiles (dev/test/prod)
7) Convert OutputChunk -> structured knowledge: - On CommandFinished, summarize the block output via an internal agent and attach summary to block metadata.
Deliverables:
6) Minimal wiring checklist (fast)
Backend:
Add from mindx_backend_service.mindterm import mindterm_router; app.include_router(mindterm_router)
Ensure data/ is writable.
Frontend:
Add a route to render
Start:
./mindX.sh --frontend
7) Optional v0.0.4.1 hardening (next)
If you want the next jump immediately, request:
"v0.0.4.1 add agent_id/workspace_id binding + ACL + allowlist policy profiles"
and I'll output the complete patch set (backend + UI changes).