scripts: add s/sh, s/job, s/q, s/sched, s/ls, s/kill to ollie filesystem
Install scripts to ~/.config/ollie/scripts/ (not ~/bin/) so they are served via the 9p mount without PATH changes. Add thin wrappers oq-q (s/q, foreground one-shot) and oq-schedule (s/sched, background with b/ path output). Switch osh and oq from OLLIE_9MOUNT to OLLIE. Update mkfile, docs, and submodule pointer. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e758def35a
commit
f984565082
2
9p
2
9p
|
|
@ -1 +1 @@
|
|||
Subproject commit 4ec6707bf942c39c222608fcc76138cf9fa6e86e
|
||||
Subproject commit 3a96284d986478fbac63d3b25edcbbe3b16cfdc8
|
||||
|
|
@ -13,6 +13,7 @@ What happens if agent primitives are exposed as an ordinary filesystem? How much
|
|||
- `tui/`:
|
||||
- `9p/`:
|
||||
- `el/`:
|
||||
- `scripts/`: shell scripts installed to `~/.config/ollie/scripts/` and exposed via `s/sh` and `s/job`
|
||||
|
||||
## Getting Started
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ ollie/
|
|||
s/ sessions ls
|
||||
idx session index (ro) cat: id state cwd backend model, one per line
|
||||
new create session (r/w) cat: KV template; echo "cwd=/path" >
|
||||
sh interactive shell (x) exec s/sh [-new|-resume] [-backend B] [-model M]
|
||||
job batch job (x) exec s/job [-bg] [-parallel N] [-keep] [prompt...]
|
||||
<id>/ session directory rm -r to kill; mv to rename
|
||||
agent active agent (r/w)
|
||||
backend active backend (r/w)
|
||||
|
|
|
|||
11
mkfile
11
mkfile
|
|
@ -38,8 +38,13 @@ data:V:
|
|||
|
||||
scripts:V:
|
||||
echo === Installing scripts ===
|
||||
mkdir -p $HOME/bin
|
||||
cp -f scripts/osh scripts/oq $HOME/bin/
|
||||
mkdir -p $HOME/.config/ollie/scripts
|
||||
cp -f scripts/osh $HOME/.config/ollie/scripts/sh
|
||||
cp -f scripts/oq $HOME/.config/ollie/scripts/job
|
||||
cp -f scripts/oq-q $HOME/.config/ollie/scripts/q
|
||||
cp -f scripts/oq-schedule $HOME/.config/ollie/scripts/sched
|
||||
cp -f scripts/ls $HOME/.config/ollie/scripts/ls
|
||||
cp -f scripts/kill $HOME/.config/ollie/scripts/kill
|
||||
|
||||
help:V:
|
||||
echo 'Ollie monorepo build targets:'
|
||||
|
|
@ -48,7 +53,7 @@ help:V:
|
|||
echo ' tui - Build terminal UI'
|
||||
echo ' 9p - Build 9p filesystem server'
|
||||
echo ' data - Install agents, prompts, skills, and tools to ~/.config/ollie/'
|
||||
echo ' scripts - Install shell scripts to ~/bin/'
|
||||
echo ' scripts - Install shell scripts to ~/.config/ollie/scripts/'
|
||||
echo ''
|
||||
echo 'Submodules must be initialized first:'
|
||||
echo ' git submodule update --init --recursive'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,16 @@
|
|||
# scripts
|
||||
|
||||
Shell scripts for interacting with the ollie 9P filesystem.
|
||||
All scripts read `OLLIE_9MOUNT` (default: `$HOME/mnt/ollie`) for the mount path.
|
||||
All scripts read `OLLIE` (default: `$HOME/mnt/ollie`) for the mount path.
|
||||
|
||||
`mk scripts` installs them to `~/.config/ollie/scripts/` and they are exposed via the
|
||||
mounted filesystem as `s/sh` (osh) and `s/job` (oq), so they are available without
|
||||
any `$PATH` changes:
|
||||
|
||||
```sh
|
||||
exec $OLLIE/s/sh # start interactive shell
|
||||
$OLLIE/s/job "my prompt" # run a batch job
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env bash
|
||||
rm -r ${OLLIE}/s/$1
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env bash
|
||||
cat ${OLLIE}/s/idx
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
set -euo pipefail
|
||||
|
||||
MOUNT=${OLLIE_9MOUNT:-$HOME/mnt/ollie}
|
||||
MOUNT=${OLLIE:-$HOME/mnt/ollie}
|
||||
|
||||
die() { printf 'oq: %s\n' "$*" >&2; exit 1; }
|
||||
trap 'printf "\n"' EXIT
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
# s/q: foreground one-shot query; output goes to stdout.
|
||||
exec "${0%/*}/job" "$@"
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
# s/sched: submit a background job; prints the b/ path for each job.
|
||||
OLLIE=${OLLIE:-$HOME/mnt/ollie}
|
||||
"${0%/*}/job" -bg "$@" | while IFS= read -r id; do
|
||||
[ -n "$id" ] && printf '%s/b/%s\n' "$OLLIE" "$id"
|
||||
done
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
# osh: interactive chat interface for ollie AI agents.
|
||||
set -o history
|
||||
|
||||
MOUNT=${OLLIE_9MOUNT:-$HOME/mnt/ollie}
|
||||
MOUNT=${OLLIE:-$HOME/mnt/ollie}
|
||||
LAST=$HOME/.config/ollie/last-session
|
||||
|
||||
# load_session <dir> → prints session ID for that dir, or nothing
|
||||
|
|
|
|||
Loading…
Reference in New Issue