SUMMARY.md · 4.2 KB

mindterm v0.0.4 — Integration Summary for mindX

mindterm is the governed terminal execution plane for mindX:

What was added

Backend (FastAPI):

- service.py (PTY manager + command blocks + sentinel parsing) - policy.py (risk scoring) - transcript.py (append-only logs) - blocks.py (JSONL block store + memory cache) - events.py (in-memory pubsub) - routes.py (UI websocket, agent events websocket, blocks API) - __init__.py (router export)

Routes:

Frontend:

- xterm.js terminal - policy gate panel - command blocks panel

Data outputs:

Operational model

1) UI creates session with initial rows/cols.

2) UI sends keystrokes as {type:"in"}.

3) On Enter, UI sends {type:"line", data:""}: - Backend policy assesses risk. - If risky, backend emits RiskFlagged and asks for confirm. - If allowed, backend wraps the command to print a sentinel with exit code: __MINDTERM__END__::

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

Current limitations


mindX Integration Prompt (ingest this)

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:

- wires router + UI navigation - adds MindTermTool for agents - binds sessions to mindX identities/workspaces - adds initial ACL/policy profile support

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 or replace existing "Terminal Access" widget.

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).


All DocumentsDocument IndexThe Book of mindXImprovement JournalAPI Reference