Commit Graph

18 Commits

Author SHA1 Message Date
Ollie Agent 94d11f9121 feat: support empty sessions (Core=nil) for multi-agent prep
Create() now registers a Session with Core=nil instead of just reserving
a name. All code paths that accessed sess.Core are nil-guarded:

- root.go: buildIndex, InterruptAll, rootOpen (proc read), rootDel (proc dismiss)
- persist.go: Kill, Rename, Shutdown, waitIdle, persistSession
- files.go: handleCtl save command
- create.go: Create() creates and registers the empty session

Also fixed pathType in server.go which panicked on empty sessions
(calling sess.Core.Agent().Name() when Core is nil). The panic was
caught by the recovery handler and returned as 'internal error'.

AGENTS.md: document cmd/ollie-remote test/build quirk
2026-08-01 19:47:02 +02:00
Ollie Agent daf535308f server: handle session/new write+read in server (rdwr pattern), bypass FileConfig 2026-08-01 19:31:39 +02:00
Ollie Agent 349d0fc470 server+kde: session/new and agent/new use rdwr pattern (write request, read response) 2026-08-01 18:50:10 +02:00
Ollie Agent 90ffca8622 server: split session/new (name only) from agent/new (cwd, backend, model, agent, alias, remote) 2026-08-01 18:41:10 +02:00
Ollie Agent e7f3fa32f8 agent: ID is UUID first segment (not incrementing); default Name = ID; remove atomic.NextUID 2026-08-01 18:26:07 +02:00
Ollie Agent ff17a90bbf fix: agent rename uses SetName() not Submit(/agent ...); add SetName method to agent.Agent 2026-08-01 18:12:18 +02:00
Ollie Agent d90fd1448f fix: agent rename path parsing — route strips session/ prefix, so old is ollie/agent/default not session/ollie/agent/default 2026-08-01 18:08:49 +02:00
Ollie Agent 19690d0ef5 fix: validate agent directory by Name only (not ID); gofmt all changed files 2026-08-01 17:59:39 +02:00
Ollie Agent 859d3cb16f agent: directory keyed by Name (not ID); agent rename via mv; validate both Name and ID 2026-08-01 17:46:23 +02:00
Ollie Agent 20f05eae6a fix: key sessions map by Name (not UUID); rename moves dir; id file immutable 2026-08-01 17:34:52 +02:00
Ollie Agent 89f0ea4179 session: split immutable ID from mutable Name; add id/name files to 9P 2026-08-01 17:31:16 +02:00
Ollie Agent 8ae8a6ead4 session rename: eventwait file, broadcast on create/delete/rename, ollie-9p mv 2026-08-01 16:14:49 +02:00
Ollie Agent 937e6aef3b update: agent loop, session persistence, 9P filesystem, server, and remote sandbox 2026-08-01 15:06:49 +02:00
Ollie Agent 83304e2896 split Session into Session + AgentState; move all agent-scoped state to AgentState
Session struct now only holds: id, uname, mu, Core, SessionCtx, cancel,
proc, modelsMu/Cache/At.

New AgentState struct holds: log, logVers, ChatOffset, chatCond, plan,
prevPrompt, remote — all per-agent state.

agentHelper now takes an *AgentState alongside *Session. All agent file
operations (plan, log, chat, prevPrompt, offset, remote, cfg) access
AgentState fields instead of Session fields.

Removed startEventLog from NewSession (was writing to session log).
replayMessagesToLog takes *AgentState. Rename no longer appends to log.
ReadPlanStep stubbed out (TODO: look up correct AgentState).
server.go makeStat stubbed out AgentState log size tracking (TODO).
2026-08-01 14:17:56 +02:00
Ollie Agent 3046afd8ed fix 9P session/agent boundary enforcement
Bug: reading agent files (log, chat, state, etc.) via 9P returned the
same data regardless of which session or agent ID was specified. The
server did not validate agent IDs and had out-of-bounds slice access
on  when the path had fewer components than expected.

Fixes:
- fs/session/root.go: Added  guard before all
   checks in rootReaddir, rootStat, rootOpen.
  Added  guard before  access in rootStat.
  Added agent ID validation — returns error if the requested agent ID
  doesn't match the session's actual agent.
- cmd/olliesrv/server.go: Restructured pathType() to nest agent path
  checks inside a single
  block, preventing proc-path checks from incorrectly matching agent
  paths. Added agent ID validation (returns "" = not found).
  Added agent-path support in makeStat() for Qid version tracking on
  log/chat. Skip blocking files (chat, statewait) in stat-size
  computation to prevent hangs.
2026-08-01 13:39:14 +02:00
Levi Neely 43d0db520a remove D-Bus adapter from olliesrv
Delete dbus/dbus.go — the entire D-Bus SessionManager service is gone.
No more 150ms poll loop, no more signal emission, no more method handlers.

- Remove ollie/dbus import, nodbus flag, dbusAdapter variable
- Remove OnSessionCreated/Killed/Renamed hooks from Config
- Remove EnableDBus from Config
- Elevation notifications connect to session bus directly (godbus stays
  as a dependency solely for org.freedesktop.Notifications)

All clients now use 9P exclusively. D-Bus is dead.
2026-07-31 20:41:02 +02:00
Ollie Agent ddddb1f53b remove s/, u/, x/ script namespaces and 9P backing
All session scripts (s/sh, s/b, s/bfg, s/bbg, s/ls, s/kill, s/cleanup),
utility scripts (u/optimize, u/complete, u/cascade, u/escalate), and
internal scripts (x/bd, x/prime, x/freeloader, x/task) are removed.

These are replaced by:
- generate, complete, route files (ollie-9p rdwr)
- integrated elevation broker
- D-Bus/9P session management

Also removes:
- 9P rootFileOrder entries and permission map for script files
- Script-serving catch-all in rootOpen
- prependOlliePath (no x/ scripts to shadow PATH with)

ollie-watchdog moved to contrib/scripts/ alongside ollie-remount.
2026-07-30 21:36:54 +02:00
Ollie Agent 9b6ddb7df1 flatten: absorb submodules into single Go module
- Remove submodules: core, 9p, acme, httpgw, remote, el
- Keep submodules: kde, webui (separate build systems)
- Collapse core/ packages into root: agent/, backend/, detach/, elevate/,
  env/, log/, paths/, sandbox/, session/, skills/, tools/, toolsrv/
- Collapse 9p/ packages: fs/session/, mount/, dbus/, cmd/olliesrv/
- Move binaries: acme/ → cmd/Ollie/, httpgw/ → cmd/ollie-httpgw/,
  remote/ → cmd/ollie-remote/, 9p/cmd/ollie-9p/ → cmd/ollie-9p/
- Move data: agents/, prompts/, tools/, scripts/, skills/ → contrib/
- Move services/ → contrib/services/, experiments/ → doc/experiments/
- Delete .beads/, .claude/, .kiro
- Single go.mod at root (module ollie)
- Fix all import paths, merge fs/ + session/ packages
- Extract dbus/ and elevate/notify.go from 9p server package
- Update justfile for new paths and single-module build
2026-07-30 18:57:51 +02:00