feat(tmux): add shared muse tmux socket manager with CLI and agent [TOOL tmux.*] integration
This commit is contained in:
+32
-1
@@ -72,7 +72,38 @@ box muse <self> send --thread <thread_uuid> "<message>"
|
||||
|
||||
---
|
||||
|
||||
## 4. Best Practices & Invariants
|
||||
## 4. Shared Tmux Socket Tooling (`muse tmux` & `[TOOL tmux.*]`)
|
||||
|
||||
Agents and operators can spawn background sessions and send keystrokes to long-running tasks via the shared socket `/tmp/tmux-muse.sock`.
|
||||
|
||||
### Via Native CLI:
|
||||
```bash
|
||||
# List sessions on shared socket
|
||||
muse <account> tmux list
|
||||
|
||||
# Create or send commands to a background session
|
||||
muse <account> tmux send <session> "command to execute"
|
||||
|
||||
# Capture recent scrollback output from a session
|
||||
muse <account> tmux capture <session> --lines 30
|
||||
|
||||
# Kill a session
|
||||
muse <account> tmux kill <session>
|
||||
```
|
||||
|
||||
### Via Autonomous Agent Directives:
|
||||
Agents can emit structured tool calls in sidechats:
|
||||
```text
|
||||
[TOOL tmux.new {"session": "build-worker", "command": "python3 /srv/worker.py"}]
|
||||
[TOOL tmux.send {"session": "build-worker", "keys": "ls -la"}]
|
||||
[TOOL tmux.capture {"session": "build-worker", "lines": 20}]
|
||||
[TOOL tmux.list {}]
|
||||
[TOOL tmux.kill {"session": "build-worker"}]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 5. Best Practices & Invariants
|
||||
|
||||
1. **Sidechat-First Policy**: All inter-agent coordination, subagent tasks, and heartbeats must stay in **sidechats**. Do not send automated routine messages to `main` chat.
|
||||
2. **Sub-Agent Prioritization**: Break down complex diagnostic or verification jobs by delegating sub-tasks to dedicated subagent threads.
|
||||
|
||||
Reference in New Issue
Block a user