How to Coordinate Role-Based CLI Seats & Session Handovers for AI Agents: A Governance MCP Server
Описание и применение
Множественные AI‑агенты, работающие в одной терминальной среде, могут вызывать гонки, потерю контекста и разрушительные команды. CliSeat обеспечивает однопользовательские блокировки, ведёт хронологический журнал переходов с криптографической подписью и автоматически освобождает заброшенные сессии.
Задача
Multiple AI agent sessions running in the same terminal can cause race conditions, session handover amnesia, and out-of-domain execution.
Результат
Agents can safely coordinate repository mutations, preserve context across handovers, and prevent accidental destructive actions.
Рабочий процесс
- 1. Agent claims a domain seat via CliSeat’s SeatManager.
- 2. If the seat is occupied, the claim is rejected with holder info.
- 3. Agent performs its tasks while holding the seat.
- 4. Upon completion or timeout, agent records a handover brief to HandoverLedger.
- 5. CliSeat logs the brief with a SHA‑256 hash in an SQLite WAL ledger.
- 6. Next agent claims the seat and reads the ledger for context.
Доказательства
When another session attempts to mutate the repository while domain:cli is occupied, the claim is rejected immediately with the current holder's session ID and remaining lease time.
CliSeat persists every handover to an atomic SQLite WAL database sealed with a SHA-256 state hash.
- Дата записи: 2026-10-21T06:56:02.540Z