README: add ollie-9p client section, fix stale pkg/ paths
This commit is contained in:
parent
c96982c1ec
commit
0b9f345930
46
README.md
46
README.md
|
|
@ -70,7 +70,47 @@ Session IDs are Unix nanosecond timestamps with a random suffix (e.g. `174427668
|
||||||
mk
|
mk
|
||||||
```
|
```
|
||||||
|
|
||||||
Installs `olliesrv` to `$HOME/bin`.
|
Installs `olliesrv` and `ollie-9p` to `$HOME/bin`.
|
||||||
|
|
||||||
|
## ollie-9p
|
||||||
|
|
||||||
|
`ollie-9p` is the 9P client used internally by agents and tool scripts to interact with the server. It auto-discovers the server via `$NAMESPACE` and identifies the caller via `$OLLIE_UNAME`.
|
||||||
|
|
||||||
|
```
|
||||||
|
ollie-9p [-a addr] <command> <path>
|
||||||
|
```
|
||||||
|
|
||||||
|
| Command | Description |
|
||||||
|
|---|---|
|
||||||
|
| `read path` | Read file contents to stdout |
|
||||||
|
| `write path` | Write stdin to file |
|
||||||
|
| `rdwr path` | Write stdin then read response (request-response files) |
|
||||||
|
| `stat path` | Print file metadata |
|
||||||
|
| `ls [-l] [-d] path` | List directory contents |
|
||||||
|
| `create path` | Create a file |
|
||||||
|
| `remove path` | Remove a file/directory |
|
||||||
|
| `mkdir path` | Create a directory |
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# Submit a prompt
|
||||||
|
echo "explain this code" | ollie-9p write s/ollie/prompt
|
||||||
|
|
||||||
|
# Load a tool
|
||||||
|
echo 'file_edit' | ollie-9p rdwr tools
|
||||||
|
|
||||||
|
# Route a task to a model
|
||||||
|
echo 'implement login page' | ollie-9p rdwr route
|
||||||
|
|
||||||
|
# Create a session
|
||||||
|
echo "cwd=$PWD" | ollie-9p write s/new
|
||||||
|
|
||||||
|
# Read session state
|
||||||
|
ollie-9p read s/ollie/state
|
||||||
|
```
|
||||||
|
|
||||||
|
Tool scripts use `ollie-9p` rather than the FUSE mount so they work in sandboxed environments where the mount may not be visible.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|
@ -283,8 +323,8 @@ $ tail -f chat &
|
||||||
$ echo "list the go files in $PWD" > prompt
|
$ echo "list the go files in $PWD" > prompt
|
||||||
user: list the go files in /home/lkn/src/ollie
|
user: list the go files in /home/lkn/src/ollie
|
||||||
assistant: -> shell({"cmd":"find . -name '*.go'"})
|
assistant: -> shell({"cmd":"find . -name '*.go'"})
|
||||||
= pkg/agent/core.go
|
= agent/core.go
|
||||||
pkg/agent/loop.go
|
agent/loop.go
|
||||||
...
|
...
|
||||||
assistant: The Go source files are: core.go, loop.go, ...
|
assistant: The Go source files are: core.go, loop.go, ...
|
||||||
$ cat state
|
$ cat state
|
||||||
|
|
|
||||||
Reference in New Issue