- Add u/ as a top-level namespace backed by scripts/u/
- Expose b/q and b/sched as script files under b/
- Remove q, sched, optimize from s/ (sessionStoreFiles)
- Update s/ script read path to scripts/s/
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Eliminates the explicit script name list — any entry in sessionStoreFiles
beyond "new" and "idx" is automatically served from disk.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add s/sh, s/job, s/q, s/sched, s/ls, and s/kill as file-backed entries
in the session store, all served from ~/.config/ollie/scripts/. Introduce
sessionStoreFiles to centralize permissions and drive routing, mode, and
stat length — replacing per-entry switch cases and OR chains in server.go.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tailing works well for append-only logs but is fundamentally racy for
files that get overwritten: fast state changes collapse into a single
truncation signal, so tail reads the wrong (already-stale) value.
Remove mutableFile, mutableVers, trackMutable, and the per-fid readBuf
entirely. Only chat retains append-only stat reporting (Qid.Vers +
Length) for tail -f. All other session files (state, usage, backend,
model, agent, cwd) are plain poll-on-read files.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Expose generation parameters (maxTokens, temperature, frequencyPenalty,
presencePenalty) as a readable/writable 9P file. Read returns all four
keys as key=value lines; empty value means unset (API default). Write
parses the same format, updating only the keys present.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace hard-coded ~/.config/ollie and ~/.local/share/ollie paths
with paths.CfgDir() and paths.DataDir() to support OLLIE_CFG_PATH
and OLLIE_DATA_PATH env vars.
Replaces /tmp/ollie per-session scratch space with a 9P-served tmp/
directory backed by OLLIE_TMP_PATH (~/.local/share/ollie/tmp by default).
Markers are now global, hash-addressed by absolute file path, and shared
across all sessions. OLLIE_TMP_PATH is always set by ensureEnv().
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
flags after the subcommand (e.g. start -tcp :564) were silently ignored
because flag.Parse() stopped at the first non-flag argument. parse
os.Args[2:] after extracting the subcommand from os.Args[1].
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- -tcp <addr> flag on start/fgstart listens on TCP in addition to the Unix socket
- mount <address> [mountpoint] mounts a remote olliesrv namespace locally via 9pfuse
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Capture chatOffset after the user event is appended rather than
before Submit, so tail -c +$((offset+1)) yields only the model
response for that turn.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Records the byte position of chat EOF immediately before each prompt
is submitted. Clients can read offset after a turn completes and use
tail -c +$((offset+1)) to extract just the new output without needing
a dedicated reply file.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
On failure, result is empty and only status carries the error.
Callers (subagent_spawn, oq) now always have a useful value in
result regardless of success or failure.
executeJob was only capturing 'assistant' events from core.Submit.
Backend errors emit an 'error' event that was silently dropped,
causing jobs with nonexistent models to show status=done with empty
result instead of status=failed.
- Add b/ to filesystem layout (job spec, status, result, usage, ctxsz)
- Add BatchStore to backing stores table
- Add Batch jobs section with submit/poll/remove examples and oq reference
- Remove s/{id}/reply from layout
Introduces b/ as a first-class 9P namespace alongside s/. Writing to
b/new creates one or more ephemeral agent jobs (parallel=N suffix -0..-N)
each running the same prompt in an independent agentCore with no
persistent session state.
Per-job files: spec, status, result, usage, ctxsz.
BatchStore/BatchJobStore mirror SessionStore/SessionFileStore.
rm -r b/{id} cancels and removes the job.
Also removes s/{id}/reply: b/{id}/result is the purpose-built
replacement for one-shot prompt->reply use cases.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Ensure all OLLIE_* path env vars (OLLIE, OLLIE_TOOLS_PATH,
OLLIE_SKILLS_PATH, OLLIE_PLAN_PATH, OLLIE_MEMORY_PATH) are set
to their default values via os.Setenv before the server or any
session is created. This guarantees they are visible to tool
subprocesses without requiring explicit external configuration.
makeStat was reporting Length=0 for /s/new, /s/idx, /backends, /help,
and all store-backed files (/a/*, /p/*, /sk/*, /t/*). Clients that
check stat before reading (cat, 9pfuse) saw an empty file and never
issued Tread.
Also adds debug logging (OLLIE_9P_DEBUG=1) across all 9P operations,
tagged with "9p:" prefix.
rm -r first unlinks each synthetic file in s/{id}/ before removing the
directory. The remove handler was passing the file basename to
SessionStore.Delete, which failed with "session not found".
Treat /s/{id}/{file} removes as no-ops so rm -r can proceed to the
directory removal, which triggers the actual session kill.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All /s/ directory operations now route through SessionStore:
- pathType uses sessionStore.Stat for /s/{name} entries
- readDir uses sessionStore.List for /s/ listing
- wstat uses sessionStore.Rename for session renames
- read/write/remove for /s/new and /s/{id} already updated
README.md changes excluded (unrelated to store work).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add ReadableStore, WritableStore, ReadWriteStore, BlobStore, and Store
interfaces with FlatDirStore as the default filesystem-backed implementation.
Each 9P directory endpoint is now backed by a named store:
/a/ agentStore (Store - FlatDirStore)
/p/ promptStore (ReadableStore - FlatDirStore)
/m/ memStore (Store - FlatDirStore)
/pl/ planStore (Store - FlatDirStore)
/t/ toolStore (Store - ToolStore, synthetic idx)
/sk/ skillStore (Store - SkillStore, wraps skills package)
/s/{id}/ per-session (ReadWriteStore - SessionFileStore, in-memory)
Swapping a backend (e.g. /m/ to a vector store, /pl/ to beads) now requires
only a new Store implementation — no changes to the 9P server logic.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Create handler initializes an empty file in memDir; write handler
(called from clunk) writes the full content to disk. Removes
temporary debug logging.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>