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.
All() and Get() were looking at root.Children() (mounted child trees)
but sessions are stored in rootState.sessions. They were never mounted
as children, so All() always returned empty — breaking D-Bus ListSessions
and WatchExisting, causing the KDE GUI to see no restored sessions.
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.
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.
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.
Import ollie/agent for types that moved from ollie/session:
AgentConfig, BuildRuntime, Event, PersistedAgent, Load, etc.
Remove ollie/session imports from files that no longer need it.
Fix test helpers to provide NewDispatcher (required by Agent).
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.
- NewSessionTree now only serves plan + env (session-level)
- NewAgentTree serves all 21 agent-level files
- Tests updated to use agent tree for agent files
- Removed kill/rename/save from ctl (session ops via rm/mv)
- TestSessionManagerOpenStore tests session-level file (plan)
Documents the new filesystem structure:
- session/{sid}/plan, env (session-level)
- session/{sid}/agent/{aid}/* (agent-level)
- Removed peer operations (deferred for redesign)
- All operations use ollie-9p CLI
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.
- Delete session/core.go (the consumer-defined interface)
- Change Session.Core field from interface to *agent.Session
- Change NewSession and ManagerConfig.NewCore to use concrete type
- Rewrite all tests to use real sessions with backend.Noop
The 9p layer now depends directly on the concrete type from
ollie/session. No more interface indirection. Tests exercise
real session behavior instead of stub methods.
Core interface defined in 9p/session/core.go lists the methods
the 9P layer needs. The real *session.Session satisfies it implicitly.
Test stubs continue to work via interface satisfaction.
Adds resetElevation callback to sessionHelper, called when a new
prompt is written (turn boundary). The Manager passes
broker.ResetTurn(sessionID) via ManagerConfig.ResetElevation.
- Add agent watcher goroutine that emits ConfigChanged(session, key, value)
D-Bus signal when the per-session agent name changes
- Add ConfigChanged to introspection XML
- Fix CreateSession: only apply OLLIE_DEFAULT_AGENT when no agent arg was
explicitly provided. Previously, passing agent=default would trigger the
env override, making it impossible to select a specific agent from the GUI.
Pass WithToolRegistry/WithSkillsRegistry into execute.Decl() so every
Server the factory creates has registries set. Removes fragile post-
construction wiring that only applied to the first dispatcher instance.