makeStat had explicit Length computation for /backends, /models, /help
but not /agents. Replace the specific cases with a generic default that
reads any root-level file via rootStore. /help keeps its os.Stat path
since the rootStore readFn reads the whole file (expensive for large help).
pathType() only recognized 'proc' as a subdirectory under sessions.
The 'agent' hierarchy (agent/, agent/{aid}/, agent/{aid}/proc/) was
falling through to 'return "file"', causing walk() to succeed with
QTFile at any depth. 9p ls then printed the basename 'agent' forever.
Fix: increase SplitN limit to 5, add directory cases for the full
agent path hierarchy, and verify the session exists before allowing
descent into any sub-path.
Peers were removed from core but lingered in the 9P layer.
Deleted: PeerAdd, PeerRemove, PeerList, PeerSubmit (D-Bus + manager),
peer directory listing, peer file handling, peer stat, peer
creation/removal, HasPeer, peers field on Session.
Rename the internal olliesrv/session package to olliesrv/mgr to resolve
the naming conflict with ollie/session (the core session package).
This allows importing ollie/session without an alias — the temporary
`agent "ollie/session"` scaffolding is removed. All references now
use the natural package name: session.X for core types, mgr.X for the
9P session manager.
The top-level sessions directory is now /session/ instead of /s/.
Clearer, self-documenting namespace. The agent/{aid} sublevel
will be added in a future change.
Shell fd position advances after write, so the subsequent read
arrives with offset=N (write length). readDNS always serves from
offset 0, fixing empty reads from exec 3<>file; echo >&3; cat <&3.
/route now uses LLM-based capability classification with
OLLIE_ROUTE_MODEL_FAST and OLLIE_ROUTE_MODEL_POWER env vars.
OLLIE_TIER_* env vars are no longer used.
Write a task description to /route; a cheap local model (OLLIE_ROUTE_BACKEND/
OLLIE_ROUTE_MODEL, defaults to ollama/qwen3:8b) classifies it as worker or
expert. The resolved backend+model for that tier is returned on read.
Explicit tier still supported via JSON {"tier":"expert"} to skip classification.
/generate: write a prompt (plain text or JSON with backend/model/system),
read back a one-shot LLM completion. Stateless, no session needed.
/route: write a tier name (worker/expert), read back the resolved
backend+model from OLLIE_TIER_* env vars.
Follows the Plan 9 /net/dns pattern: per-fid request-response.
Write JSON request (or plain prefix), write blocks during LLM call,
read returns the completion result. Per-fid state means concurrent
clients get independent request/response pairs.
Also includes the Complete method, findOrCreateCopilot, and noise
stripping helpers in the session package.
- ls /s/{id}/proc/ lists detached PIDs
- cat /s/{id}/proc/{pid} reads ring buffer output
- rm /s/{id}/proc/{pid} dismisses the process
- echo detach > /s/{id}/ctl detaches running process
- echo "signal {pid} [TERM|KILL]" > /s/{id}/ctl signals detached process
Walk validates PID exists in detached list before succeeding.
- Add CachedListModels() with 24h TTL to avoid repeated Models() API calls
- Cache readdir serialized bytes per-fid (rebuild only at offset=0)
- Skip all session file size computation in makeStat (report len=0)
- Short-circuit pathType() for session paths to avoid triggering Stat
- Remove e.Info() call from subdirectory readdir (unused mtime)
- Add monotonic timer to handle() for profiling 9p operations
- Add fcallTypeName() helper
- Fix stubCore for new Detach/SaveSession interface methods
- Add tools-process.md prompt
Before: ls inside a session dir took 1.38s (kiro) / 67ms (openrouter)
After: 182µs regardless of backend (7500x improvement)
Remove a/, p/, sk/, m/, tr/, tmp/, u/, x/, and per-session t/ from the
9P namespace. These are all files on disk that the runtime reads directly
from ~/.config/ollie/ — serving them through 9P added indirection without
value.
What remains:
- /s/ (live sessions: the dynamic state that doesn't exist on disk)
- /backends, /models, /help (synthetic root files)
This brings olliesrv's scope in line with the D-Bus daemon: session
lifecycle, prompt submission, state observation, and streaming output.
- Add ModelCache that prefetches models from all backends at startup
- Cache models in memory, refresh on demand via Invalidate()
- Add global /ctl file with 'invalidate' command
- Add 'invalidate' ctl command and /invalidate slash command in sessions
- Fix filePerm to query rootStore for root-level file permissions
- Add 'models' to root directory listing
Remove hardcoded permission switch in makeStat and delegate to
the underlying FileTree.Stat() instead. This makes FileList in
sessionfile.go the single source of truth for session file modes.
- server.New takes server.Config (no more internal construction)
- OnRename removed: wstat handles all fid rewriting directly
- WithStrict/WithYolo removed (passed via ManagerConfig)
- Default dir functions moved to main.go
- tool.go and root.go in main package (wiring)
- Server is now a pure protocol handler