From 47c4890037c7e3364b3b2e018ae1bde02e2a79e9 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Wed, 29 Jul 2026 20:34:42 +0200 Subject: [PATCH] =?UTF-8?q?update=20prompts=20and=20scripts=20path:=20s/?= =?UTF-8?q?=20=E2=86=92=20session/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prompts/session_9p.md | 62 +++++++++++++++++++++---------------------- session/manager.go | 2 +- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/prompts/session_9p.md b/prompts/session_9p.md index 44c3935..9450ef9 100644 --- a/prompts/session_9p.md +++ b/prompts/session_9p.md @@ -33,33 +33,33 @@ exec 3<>$OLLIE/complete; echo '{"file":"main.go","prefix":"func "}' >&3; cat <&3 ## 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} ``` -**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 | File | Mode | Purpose | |---|---|---| -| `${OLLIE}/s/new` | r/w | Read: key=value template. Write: create a new session. | -| `${OLLIE}/s/idx` | read | Session index (id\tstate\tcwd\tbackend\tmodel) | -| `${OLLIE}/s/ls` | exec | List sessions | -| `${OLLIE}/s/kill` | exec | Kill a session | -| `${OLLIE}/s/sh` | exec | Interactive shell | -| `${OLLIE}/s/b` | exec | Batch session | -| `${OLLIE}/s/bfg` | exec | Foreground query | -| `${OLLIE}/s/bbg` | exec | Background query | -| `${OLLIE}/s/cleanup` | exec | Kill idle sessions | +| `${OLLIE}/session/new` | r/w | Read: key=value template. Write: create a new session. | +| `${OLLIE}/session/idx` | read | Session index (id\tstate\tcwd\tbackend\tmodel) | +| `${OLLIE}/session/ls` | exec | List sessions | +| `${OLLIE}/session/kill` | exec | Kill a session | +| `${OLLIE}/session/sh` | exec | Interactive shell | +| `${OLLIE}/session/b` | exec | Batch session | +| `${OLLIE}/session/bfg` | exec | Foreground query | +| `${OLLIE}/session/bbg` | exec | Background query | +| `${OLLIE}/session/cleanup` | exec | Kill idle sessions | -### Session Directory (`${OLLIE}/s/{id}/`) +### Session Directory (`${OLLIE}/session/{id}/`) | File | Mode | Purpose | |---|---|---| @@ -92,25 +92,25 @@ Sessions live at `${OLLIE}/s/`. Each session is a directory; all operations are ```bash # Discover sessions -cat $OLLIE/s/idx +cat $OLLIE/session/idx # Discover sessions in same cwd -grep "$PWD" $OLLIE/s/idx +grep "$PWD" $OLLIE/session/idx # Spawn a session (minimal, generated ID) -echo "cwd=$PWD" > $OLLIE/s/new +echo "cwd=$PWD" > $OLLIE/session/new # 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 -rm -r $OLLIE/s/{id} +rm -r $OLLIE/session/{id} # Rename a session -echo "rn newname" > $OLLIE/s/{id}/ctl +echo "rn newname" > $OLLIE/session/{id}/ctl # Send a prompt -echo "your prompt here" > $OLLIE/s/{id}/prompt +echo "your prompt here" > $OLLIE/session/{id}/prompt # Control commands via ctl: # stop — interrupt the current agent turn @@ -121,30 +121,30 @@ echo "your prompt here" > $OLLIE/s/{id}/prompt # cwd — change the working directory # model — switch model # backend — 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) -cat $OLLIE/s/{id}/cfg +cat $OLLIE/session/{id}/cfg # Write config changes -echo "temperature=0.7" > $OLLIE/s/{id}/cfg +echo "temperature=0.7" > $OLLIE/session/{id}/cfg # Read most recent response -offset=$(cat $OLLIE/s/{id}/offset) -tail -c +$((offset + 1)) $OLLIE/s/{id}/chat +offset=$(cat $OLLIE/session/{id}/offset) +tail -c +$((offset + 1)) $OLLIE/session/{id}/chat # Read current state -cat $OLLIE/s/{id}/state +cat $OLLIE/session/{id}/state # Discover available models -cat $OLLIE/s/{id}/models +cat $OLLIE/session/{id}/models # Add a peer link (bidirectional) -touch $OLLIE/s/{id}/peer/{peerid} +touch $OLLIE/session/{id}/peer/{peerid} # 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) -rm $OLLIE/s/{id}/peer/{peerid} +rm $OLLIE/session/{id}/peer/{peerid} ``` diff --git a/session/manager.go b/session/manager.go index 8195c5e..a09878f 100644 --- a/session/manager.go +++ b/session/manager.go @@ -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 }, 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) }, BlockingReadFn: notBlocking,