update prompts and scripts path: s/ → session/

This commit is contained in:
Levi Neely 2026-07-29 20:34:42 +02:00
parent 55fcebd032
commit 47c4890037
2 changed files with 32 additions and 32 deletions

View File

@ -33,33 +33,33 @@ exec 3<>$OLLIE/complete; echo '{"file":"main.go","prefix":"func "}' >&3; cat <&3
## Peer Agent Discovery ## Peer Agent Discovery
Sessions sharing your `cwd` are your peer agents. Read `${OLLIE}/s/idx` to discover other sessions available for cooperation: Sessions sharing your `cwd` are your peer agents. Read `${OLLIE}/session/idx` to discover other sessions available for cooperation:
``` ```
{id}\t{state}\t{cwd}\t{backend}\t{model} {id}\t{state}\t{cwd}\t{backend}\t{model}
``` ```
**Inter-Agent Communication**: To send a prompt to another session: `echo "your prompt" > ${OLLIE}/s/{id}/prompt`. Always provide a return path (e.g., [message from $OLLIE_SESSION_ID]). **Inter-Agent Communication**: To send a prompt to another session: `echo "your prompt" > ${OLLIE}/session/{id}/prompt`. Always provide a return path (e.g., [message from $OLLIE_SESSION_ID]).
## Session Management (`${OLLIE}/s/`) ## Session Management (`${OLLIE}/session/`)
Sessions live at `${OLLIE}/s/`. Each session is a directory; all operations are filesystem reads and writes. Sessions live at `${OLLIE}/session/`. Each session is a directory; all operations are filesystem reads and writes.
### Session Store Files ### Session Store Files
| File | Mode | Purpose | | File | Mode | Purpose |
|---|---|---| |---|---|---|
| `${OLLIE}/s/new` | r/w | Read: key=value template. Write: create a new session. | | `${OLLIE}/session/new` | r/w | Read: key=value template. Write: create a new session. |
| `${OLLIE}/s/idx` | read | Session index (id\tstate\tcwd\tbackend\tmodel) | | `${OLLIE}/session/idx` | read | Session index (id\tstate\tcwd\tbackend\tmodel) |
| `${OLLIE}/s/ls` | exec | List sessions | | `${OLLIE}/session/ls` | exec | List sessions |
| `${OLLIE}/s/kill` | exec | Kill a session | | `${OLLIE}/session/kill` | exec | Kill a session |
| `${OLLIE}/s/sh` | exec | Interactive shell | | `${OLLIE}/session/sh` | exec | Interactive shell |
| `${OLLIE}/s/b` | exec | Batch session | | `${OLLIE}/session/b` | exec | Batch session |
| `${OLLIE}/s/bfg` | exec | Foreground query | | `${OLLIE}/session/bfg` | exec | Foreground query |
| `${OLLIE}/s/bbg` | exec | Background query | | `${OLLIE}/session/bbg` | exec | Background query |
| `${OLLIE}/s/cleanup` | exec | Kill idle sessions | | `${OLLIE}/session/cleanup` | exec | Kill idle sessions |
### Session Directory (`${OLLIE}/s/{id}/`) ### Session Directory (`${OLLIE}/session/{id}/`)
| File | Mode | Purpose | | File | Mode | Purpose |
|---|---|---| |---|---|---|
@ -92,25 +92,25 @@ Sessions live at `${OLLIE}/s/`. Each session is a directory; all operations are
```bash ```bash
# Discover sessions # Discover sessions
cat $OLLIE/s/idx cat $OLLIE/session/idx
# Discover sessions in same cwd # Discover sessions in same cwd
grep "$PWD" $OLLIE/s/idx grep "$PWD" $OLLIE/session/idx
# Spawn a session (minimal, generated ID) # Spawn a session (minimal, generated ID)
echo "cwd=$PWD" > $OLLIE/s/new echo "cwd=$PWD" > $OLLIE/session/new
# Spawn a session (named) # Spawn a session (named)
printf 'name=reviewer\ncwd=%s\n' "$PWD" > $OLLIE/s/new printf 'name=reviewer\ncwd=%s\n' "$PWD" > $OLLIE/session/new
# Kill a session # Kill a session
rm -r $OLLIE/s/{id} rm -r $OLLIE/session/{id}
# Rename a session # Rename a session
echo "rn newname" > $OLLIE/s/{id}/ctl echo "rn newname" > $OLLIE/session/{id}/ctl
# Send a prompt # Send a prompt
echo "your prompt here" > $OLLIE/s/{id}/prompt echo "your prompt here" > $OLLIE/session/{id}/prompt
# Control commands via ctl: # Control commands via ctl:
# stop — interrupt the current agent turn # stop — interrupt the current agent turn
@ -121,30 +121,30 @@ echo "your prompt here" > $OLLIE/s/{id}/prompt
# cwd <path> — change the working directory # cwd <path> — change the working directory
# model <name> — switch model # model <name> — switch model
# backend <name> — switch backend # backend <name> — switch backend
echo "model gpt-4o" > $OLLIE/s/{id}/ctl echo "model gpt-4o" > $OLLIE/session/{id}/ctl
# Read session config (backend, model, agent, cwd, params) # Read session config (backend, model, agent, cwd, params)
cat $OLLIE/s/{id}/cfg cat $OLLIE/session/{id}/cfg
# Write config changes # Write config changes
echo "temperature=0.7" > $OLLIE/s/{id}/cfg echo "temperature=0.7" > $OLLIE/session/{id}/cfg
# Read most recent response # Read most recent response
offset=$(cat $OLLIE/s/{id}/offset) offset=$(cat $OLLIE/session/{id}/offset)
tail -c +$((offset + 1)) $OLLIE/s/{id}/chat tail -c +$((offset + 1)) $OLLIE/session/{id}/chat
# Read current state # Read current state
cat $OLLIE/s/{id}/state cat $OLLIE/session/{id}/state
# Discover available models # Discover available models
cat $OLLIE/s/{id}/models cat $OLLIE/session/{id}/models
# Add a peer link (bidirectional) # Add a peer link (bidirectional)
touch $OLLIE/s/{id}/peer/{peerid} touch $OLLIE/session/{id}/peer/{peerid}
# Send a prompt to a peer # Send a prompt to a peer
echo "your message" > $OLLIE/s/{id}/peer/{peerid} echo "your message" > $OLLIE/session/{id}/peer/{peerid}
# Remove a peer link (bidirectional) # Remove a peer link (bidirectional)
rm $OLLIE/s/{id}/peer/{peerid} rm $OLLIE/session/{id}/peer/{peerid}
``` ```

View File

@ -407,7 +407,7 @@ func (s *Manager) openEntry(name string) (fs.File, error) {
return &fs.SyntheticFileInfo{Name_: name, Mode_: fs.Perms[fs.PathSessions].Files[name]}, nil return &fs.SyntheticFileInfo{Name_: name, Mode_: fs.Perms[fs.PathSessions].Files[name]}, nil
}, },
ReadFn: func() ([]byte, error) { ReadFn: func() ([]byte, error) {
return s.cfg.ReadFile(paths.CfgDir() + "/scripts/s/" + name) return s.cfg.ReadFile(paths.CfgDir() + "/scripts/session/" + name)
}, },
WriteFn: func([]byte) error { return fmt.Errorf("%s: not writable", name) }, WriteFn: func([]byte) error { return fmt.Errorf("%s: not writable", name) },
BlockingReadFn: notBlocking, BlockingReadFn: notBlocking,