usage: document path resolution rules

This commit is contained in:
Ollie Agent 2026-08-04 19:23:24 +02:00
parent 63a9f0b1d6
commit d78fe997da
1 changed files with 19 additions and 0 deletions

View File

@ -77,6 +77,25 @@ o read state # → session/myproject/agent/default/state
o readloop statewait
```
### Path resolution
Paths are slash-delimited 9P namespace paths. The `o` CLI resolves them based
on context:
| Path type | Example | Resolves to |
|---|---|---|
| Root-level | `o read models` | `models` (no context needed) |
| Agent file | `o read state` | `session/$session/agent/$agent/state` |
| Session file | `o read env` | `session/$session/env` |
| Full path | `o read session/foo/agent/bar/chat` | Used as-is |
Root-level paths (`session/`, `agents`, `models`, `help`, `ctl`, `tools`) and
absolute paths (starting with `session/`) bypass context resolution entirely.
Agent-level files (`chat`, `state`, `prompt`, `statewait`, `cfg`, `plan`,
`log`, `cost`, `offset`, `context`, `systemprompt`) require both `$session`
and `$agent`. Session-level files (`env`, `ctl`, `id`, `name`, `paused`)
require only `$session`.
### Prompt REPL
`o prompt` is an interactive multi-line REPL with readline editing: