Rate limiting is now time-based (leaky bucket in core/elevate), so
per-turn reset hooks are no longer needed. Remove ResetElevation from
session config, files.go, root.go, and main.go.
Daemon creates a root context, cancelled on SIGTERM. Sessions derive
their context from it. Agent turns derive from session ctx. Tools
get the turn ctx.
Signal propagation:
- SIGTERM → daemonCancel() → all session ctxs cancelled → agent turns exit
- User interrupt → agent.Interrupt() (SIGINT equivalent, turn-level only)
- Session kill → sess.Cancel() → that session's agents stop
Previously sessions used context.Background() — daemon shutdown had
no automatic propagation to running agents.
Types moved from ollie/session to ollie/agent:
AgentConfig, AgentConfigPath, AgentsDirs, BuildRuntime, Load, Event,
PersistedAgent, LoadPersistedAgent, RestoreHistory, PromptEnv,
History, Runtime, ErrInterrupted, WatchState.
ollie/session is no longer imported directly in top-level 9p/ files
or mgr/format.go and mgr/sessionfile.go (they only need agent types).
WatchAgent const inlined as string literal.
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.
Adds resetElevation callback to sessionHelper, called when a new
prompt is written (turn boundary). The Manager passes
broker.ResetTurn(sessionID) via ManagerConfig.ResetElevation.
The mount logic is now a library package (mount/) called directly
by `olliesrv mount`. No external binary needed.
Per-session auto-mounts are gone entirely. The mount subcommand
remains for network-transparent human access to remote servers.
Start the elevation broker on $OLLIE_ELEVATE_SOCKET at daemon
startup. D-Bus notifications with approve/deny/persist actions
map back to broker.Resolve() via ActionInvoked signals.
Replaces the external superpowerd adapter.
Drop start/fgstart/stop/status subcommands. olliesrv now runs
directly in the foreground; lifecycle managed by the supervisor
(systemd, openrc, or xdg-autostart). Keep mount as a convenience
subcommand for mounting remote 9P servers via 9pfuse.
- Remove daemonize(), stopServer(), isRunning(), pid file management
- runServer() no longer takes pidPath
- Move desktop file to main repo services/xdg-autostart/
- Update README examples
Read: surface listing of all tools (name + description)
Write tool name, then read: full ollie:prompt content
Subsequent read reverts to surface listing (query cleared after use)
The preamble is now composed as:
system_prompt + operational_model + environment + agent_prompts
- Embed SYSTEM_PROMPT.md, session-9p.md, session-dbus.md in the binary
- Render environment block at runtime with live cwd/platform/date values
- Inject operational model based on server mode (Enable9P/EnableDBus)
- Accept system_prompt= override in session creation and D-Bus CreateSession
- Agent configs no longer need to reference system/session prompt files
olliesrv now supports three operating modes:
+9p +dbus (default): full 9P server with embedded D-Bus adapter
+9p -dbus (-nodbus): pure 9P server, no desktop integration
-9p +dbus (-no9p): D-Bus only, no filesystem interface
The -no9p flag gates all 9P listener setup (unix + tcp), the 9P
server instance, and per-session FUSE mounts. D-Bus becomes mandatory
in this mode (errors if session bus is unavailable). -no9p and -nodbus
are mutually exclusive.
This replaces the need for the archived standalone ollied daemon.
Expose org.ollie.SessionManager on the session bus directly from olliesrv.
The adapter emits StateChanged, ChatUpdated, SessionCreated, SessionKilled,
SessionRenamed, ProcessDetached, and ProcessExited signals. All KDE frontends
work without ollied.
Fixes:
- ListSessions: use Manager.List() instead of broken Readdir("")
- RenameSession: delegate to Manager.RenameSession()
- WatchExisting: start signal watchers for sessions restored at startup
- Introspection XML: declare all methods and signals
/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.
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.
- Wire ReadPlanStep directly from sess.plan (no filesystem read)
- Add ListHandlers to ManagerConfig; passed through to AgentCoreConfig
- Hoist skillTree in main.go; populate ListHandlers for tools+skills
- Add ListHandlers to ManagerConfig
- 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
- 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
- Add Server.InterruptAll() to cancel in-progress turns on all sessions
- Call InterruptAll() before Shutdown() on SIGINT/SIGTERM in main
- Remove defaultAgentsDir/defaultSessionsDir helpers; inline paths.CfgDir()
expressions directly (OLLIE_CFG_PATH already handles relocation)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace inline ensureEnv() with env.EnsureDefaults() from ollie/pkg/env
- Serve ollie/env as a readable file containing the daemon's full process env
- Remove extraEnv/InitialEnv session-spec mechanism (no longer needed)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>