tool registry: lazy-loading tool promotion via s/{sid}/tools
This commit is contained in:
parent
96dda6e5f0
commit
b387b33593
|
|
@ -15,15 +15,9 @@ Your world model is a 9P filesystem mounted at ${OLLIE}. Your session ID is `${O
|
|||
| `complete` | r/w | Write: JSON `{"file","prefix","suffix"}`. Read: code completion result. |
|
||||
| `generate` | r/w | Write: JSON `{"prompt"}` or plain text. Read: one-shot LLM generation result. |
|
||||
| `route` | r/w | Write: task description. Read: `backend=X model=Y` recommendation. |
|
||||
| `tools` | r/w | Write: tool name. Read: tool's full prompt/documentation. |
|
||||
|
||||
`complete`, `generate`, `route`, and `tools` are request-response files. Open one r/w, write a query, then read the response from the same fd:
|
||||
`complete`, `generate`, and `route` are request-response files. Open one r/w, write a query, then read the response from the same fd:
|
||||
|
||||
```bash
|
||||
# Get a tool's documentation
|
||||
exec 3<>$OLLIE/tools; echo 'file_edit' >&3; cat <&3; exec 3>&-
|
||||
# → returns file_edit's usage, args, and examples
|
||||
|
||||
# Pick a backend+model for a task
|
||||
exec 3<>$OLLIE/route; echo 'implement login page' >&3; cat <&3; exec 3>&-
|
||||
# → returns "backend=anthropic model=claude-sonnet-4-20250514"
|
||||
|
|
@ -37,8 +31,6 @@ exec 3<>$OLLIE/complete; echo '{"file":"main.go","prefix":"func "}' >&3; cat <&3
|
|||
# → returns completion candidates
|
||||
```
|
||||
|
||||
Shorthand: `echo 'file_edit' | 9p rdwr ollie/tools`
|
||||
|
||||
## Peer Agent Discovery
|
||||
|
||||
Sessions sharing your `cwd` are your peer agents. Read `${OLLIE}/s/idx` to discover other sessions available for cooperation:
|
||||
|
|
@ -91,6 +83,9 @@ Sessions live at `${OLLIE}/s/`. Each session is a directory; all operations are
|
|||
| `statewait` | read | Blocks until state changes; returns new value |
|
||||
| `systemprompt` | read | Fully rendered system prompt |
|
||||
| `tail` | exec | Tail helper |
|
||||
| `tools` | r/w | Write tool name to load it (promote to native callable). Read: list all available tools. |
|
||||
| `tools.loaded`| read | List currently loaded (promoted) tools for this session |
|
||||
| `tools.rev` | read | Revision counter — bumps each time a tool is loaded |
|
||||
| `usage` | read | Token usage stats |
|
||||
|
||||
## Operations
|
||||
|
|
|
|||
Reference in New Issue