docs: fix stale references in 9p.md, usage.md, misc.md
- 9p.md: update agent file table to current namespace - usage.md: readloop→read -l, tail→read chat, command table updated, TUI description updated (no grep pipe) - misc.md: readloop→read -l
This commit is contained in:
parent
42823dab2e
commit
aa74e1c683
34
README.md
34
README.md
|
|
@ -23,21 +23,31 @@ See [`doc/usage.md`](doc/usage.md) for usage instructions.
|
|||
|
||||
## Configuration
|
||||
|
||||
### Environment: `~/.config/ollie/env`
|
||||
### Backends: `~/.config/ollie/backends.conf`
|
||||
|
||||
```
|
||||
OLLIE_BACKEND=openai # ollama | openai | anthropic | copilot | kiro (default: ollama)
|
||||
OLLIE_OPENAI_URL=https://openrouter.ai/api
|
||||
OLLIE_OPENAI_KEY=sk-or-...
|
||||
OLLIE_ANTHROPIC_KEY=sk-ant-...
|
||||
OLLIE_COPILOT_TOKEN=...
|
||||
OLLIE_KIRO_TOKEN=... # bearer token or sqlite:// path (auto-detected from Kiro CLI if unset)
|
||||
OLLIE_MODEL=qwen/qwen3-235b-a22b
|
||||
OLLIE_COMPLETE_BACKEND=ollama # backend for code completion
|
||||
OLLIE_COMPLETE_MODEL=qwen3:latest # model for code completion
|
||||
```ini
|
||||
# Default backend for new sessions
|
||||
backend = openrouter
|
||||
|
||||
[openrouter]
|
||||
key = sk-or-v1-...
|
||||
model = qwen/qwen3-235b-a22b
|
||||
|
||||
[anthropic]
|
||||
key = sk-ant-...
|
||||
model = claude-sonnet-4-20250514
|
||||
|
||||
[ollama]
|
||||
host = http://localhost:11434
|
||||
model = qwen3:latest
|
||||
|
||||
[kiro]
|
||||
# key auto-detected from Kiro CLI if unset
|
||||
```
|
||||
|
||||
Everything lives under `$XDG_CONFIG_HOME/ollie/` (default: `~/.config/ollie/`) — tools in `tools/`, memory in `memory/`, agents in `agents/`, prompts in `prompts/`, skills in `skills/`. Shell environment variables take precedence over the env file.
|
||||
Each section configures a backend. The session selects which backend to use via the `backend` top-level setting or per-agent `backend=` in cfg. See `data/backends.conf` for the full template.
|
||||
|
||||
Everything lives under `$XDG_CONFIG_HOME/ollie/` (default: `~/.config/ollie/`) — tools in `tools/`, memory in `memory/`, agents in `agents/`, prompts in `prompts/`, skills in `skills/`.
|
||||
|
||||
## What you can do
|
||||
|
||||
|
|
|
|||
|
|
@ -115,12 +115,15 @@ echo 'implement login page' | ollie-9p rdwr route
|
|||
| File | Mode | Description |
|
||||
|---|---|---|
|
||||
| `prompt` | write | Queue a new turn |
|
||||
| `fifo` | r/w | Prompt queue (write=enqueue, read=dequeue) |
|
||||
| `statewait` | read (blocking) | Blocks until state changes |
|
||||
| `state` | read | Current state |
|
||||
| `chat` | read | Full conversation history |
|
||||
| `context` | read | Full message history as JSONL |
|
||||
| `offset` | read | Byte position after last user prompt |
|
||||
| `chat` | read (streaming) | Filtered text (no markers/fences) |
|
||||
| `chat.raw` | read (streaming) | Full markup with block markers |
|
||||
| `log` | read | Last 64KB of conversation (non-blocking) |
|
||||
| `plan` | r/w | Scratch space for agent planning |
|
||||
| `prompt.prev` | read | The last submitted prompt |
|
||||
| `env` | read | Session environment variables |
|
||||
| `cost` | read | Cumulative cost in USD |
|
||||
| `cfg` | r/w | Agent config (key=value) |
|
||||
| `ctl` | rdwr | Control commands (write cmd, read response) |
|
||||
| `stats` | read | Token usage, cost, context size (key=value) |
|
||||
| `name` | r/w | Mutable agent name |
|
||||
| `id` | read | Immutable agent UUID |
|
||||
| `proc/{pid}` | read | Detached process output |
|
||||
|
|
@ -132,13 +132,9 @@ agent_tester=$(o ls session/tester/agent | grep -v '^new$')
|
|||
send() {
|
||||
sid=$1; shift
|
||||
aname=$1; shift
|
||||
exec 3< <(o readloop "session/$sid/agent/$aname/statewait" &)
|
||||
sleep 0.1
|
||||
o write "session/$sid/agent/$aname/prompt" "$*"
|
||||
until o read "session/$sid/agent/$aname/state" | grep -q idle; do sleep 0.5; done
|
||||
exec 3<&-
|
||||
offset=$(o read "session/$sid/agent/$aname/offset" | tr -d '[:space:]')
|
||||
o read "session/$sid/agent/$aname/chat" | tail -c +$((offset + 1))
|
||||
# Block until agent returns to idle
|
||||
while [ "$(o read "session/$sid/agent/$aname/statewait")" != "idle" ]; do :; done
|
||||
}
|
||||
|
||||
reply=$(send developer "$agent_developer" "Implement a function that parses a JSON config file.")
|
||||
|
|
@ -169,9 +165,9 @@ $reply")
|
|||
$result")
|
||||
done
|
||||
|
||||
o kill developer
|
||||
o kill reviewer
|
||||
o kill tester
|
||||
session=developer o ctl kill
|
||||
session=reviewer o ctl kill
|
||||
session=tester o ctl kill
|
||||
```
|
||||
|
||||
The script initializes the routing, but agents can discover other sessions
|
||||
|
|
|
|||
23
doc/usage.md
23
doc/usage.md
|
|
@ -45,7 +45,7 @@ In another terminal:
|
|||
|
||||
```sh
|
||||
eval $(o env myproject default)
|
||||
o tail # stream chat output
|
||||
o read chat # stream chat output
|
||||
```
|
||||
|
||||
<table align="center" width="90%">
|
||||
|
|
@ -66,14 +66,13 @@ o tail # stream chat output
|
|||
| Command | Description |
|
||||
|---|---|
|
||||
| `o prompt` | Interactive multi-line prompt REPL |
|
||||
| `o tail` | Stream chat output |
|
||||
| `o read <path>` | Read any file in the namespace |
|
||||
| `o read [-l] <path>` | Read a file (-l: loop, re-read after each return) |
|
||||
| `o write <path> [data]` | Write to any file |
|
||||
| `o readloop <path>` | Read in a loop (re-reads after each return) |
|
||||
| `o ls [path]` | List namespace entries |
|
||||
| `o ctl <cmd>` | Send raw control command to agent |
|
||||
| `o stop` | Interrupt the running agent |
|
||||
| `o kill` | Kill the active session |
|
||||
| `o ctl <cmd> [args]` | Send control command (rdwr: gets response) |
|
||||
| `o generate <prompt>` | One-shot generation (no session needed) |
|
||||
| `o complete <json>` | Code completion |
|
||||
| `o route <task>` | Route task to best model |
|
||||
| `o tui` | Launch tmux TUI |
|
||||
| `o env [session] [agent]` | Print export statements for context |
|
||||
|
||||
|
|
@ -85,8 +84,8 @@ Context is set via `$session` and `$agent` environment variables:
|
|||
eval $(o env myproject default) # export session=myproject agent=default
|
||||
|
||||
# Now every o command addresses the right agent automatically:
|
||||
o read state # → session/myproject/agent/default/state
|
||||
o readloop statewait
|
||||
o ctl model # → shows current model
|
||||
o read -l statewait
|
||||
```
|
||||
|
||||
### Path resolution
|
||||
|
|
@ -158,7 +157,7 @@ echo "list 5 blog post ideas" | o generate | head -3 | o generate
|
|||
|
||||
## `o tui` — tmux Terminal UI
|
||||
|
||||
`o tui` composes `o tail` and `o prompt` into a single tmux layout — two shell
|
||||
`o tui` composes `o read chat` and `o prompt` into a single tmux layout — two shell
|
||||
commands in two panes, with agent state in the tmux status bar:
|
||||
|
||||
<p align="center">
|
||||
|
|
@ -175,8 +174,8 @@ o tui
|
|||
1. Requires `$session` and `$agent` to be set.
|
||||
2. Creates a tmux session named `o-<session>`.
|
||||
3. Two panes:
|
||||
- **Pane 0** (top, 80%): `o tail | grep` — streams chat output, filters block markers.
|
||||
- **Pane 1** (bottom, 20%): `o prompt` — multi-line REPL with slash commands.
|
||||
- **Pane 0** (top, 80%): `o read chat` — streams filtered chat output (markers stripped server-side).
|
||||
- **Pane 1** (bottom, 20%): `o prompt` — multi-line REPL (`/` prefix runs ctl commands).
|
||||
4. A background loop reads `statewait` and updates the tmux status bar instantly.
|
||||
5. Focuses the prompt pane and attaches.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue