Commit Graph

1529 Commits

Author SHA1 Message Date
Ollie Agent 4208dd9b14 update kde submodule (gui: never auto-restart streams on finish) 2026-08-01 20:55:47 +02:00
Ollie Agent 210638a88c update kde submodule (gui: dedup sessions, fix field mapping) 2026-08-01 20:53:14 +02:00
Ollie Agent 8176daec45 session/idx: emit one line per agent in buildIndex
buildIndex now iterates all agents in each session and emits
one line per agent, so the GUI can enumerate all existing
session/agent directories.
2026-08-01 20:49:46 +02:00
Ollie Agent 9ef397045c session: add multi-agent support by name, not index
- Session.Agent() now looks up activeAgentName in the agents slice
  instead of returning agents[0]. Falls back to first agent if unset.
- Added SetActiveAgent(), FindAgent(), SaveFuncs() methods.
- New() and AddAgent() set activeAgentName automatically.
- CreateAgent: refactored to ADD to existing core session instead
  of overwriting it. If sess.Core exists, builds the new agent via
  agent.NewAgent() and adds it via Core.AddAgent().
- agent/new now lists all agents in the session directory.
- 9P path handlers (rootReaddir/Stat/Open) use FindAgent() and
  AgentLogFor() to resolve agents by name/ID instead of using
  the first agent exclusively.
- Added AgentLogFor(id) to fs Session for per-agent log lookup.
2026-08-01 20:44:47 +02:00
Ollie Agent b1cbb9ca7c session/fs: handle empty sessions during persistence
persistSession: check sess.Core.Agent() != nil before saving.
silently skip sessions with no agent instead of logging
'no active session' error on shutdown.

SaveSession: return nil (no-op) when there are no agents,
rather than returning an error that gets logged.
2026-08-01 20:35:02 +02:00
Ollie Agent cb13f6523c fs/session: fix deadlock in agent/new via setAgentLogLocked
SetAgentLog acquires sess.mu, but CreateAgent in create.go
already holds sess.mu when calling it — causing a deadlock on
agent/new writes. Split into SetAgentLog (locks) and
setAgentLogLocked (no lock) so callers that already hold the
lock can use the locked variant directly.
2026-08-01 20:32:18 +02:00
Ollie Agent 951fdc8133 session: support multiple agents in data structures
- session.Session: r *agent.Agent → agents []*agent.Agent
  - Agent() returns agents[0] for backward compat
  - Added Agents(), AgentAt(), AgentCount(), AddAgent()
  - Close/SetEnv/SetSessionID iterate all agents
  - Other methods use Agent() (primary agent)
- fs/session: AgentLog *AgentLog → AgentLogs map[string]*AgentLog
  - Added AgentLog() (returns first) and SetAgentLog(id, al) methods
  - Updated create.go, persist.go, root.go, olliesrv/server.go
2026-08-01 20:29:23 +02:00
Ollie Agent 107a157a18 update kde submodule: no line trimming before tab split 2026-08-01 20:20:12 +02:00
Ollie Agent df15faf7bc update kde submodule: fix empty sessions dropped by trimmed() 2026-08-01 20:18:31 +02:00
Ollie Agent 456e68c389 update kde submodule: debug logging 2026-08-01 20:16:53 +02:00
Ollie Agent 5a32ce5577 update kde submodule: prevent sidebar focus stealing 2026-08-01 20:14:46 +02:00
Ollie Agent 85353d2aaf update kde submodule: use eventwait data, no timer 2026-08-01 20:13:59 +02:00
Ollie Agent 0ec7efada6 update kde submodule: robust session loading on startup 2026-08-01 20:10:25 +02:00
Ollie Agent 98d83965a4 update kde submodule: load sessions on startup, (no sessions) placeholder 2026-08-01 20:05:37 +02:00
Ollie Agent b038e82931 fix: rdwr on agent/new now returns agent name
The rdwr pattern needs per-fid state to work correctly (like session/new).
- Added agentNewResult field to fid struct
- Intercept writes to /session/{id}/agent/new and store result on fid
- Intercept reads from /session/{id}/agent/new and return stored result
- Added CreateAgentFromRoot public API
- Clearer error message when cwd is missing
2026-08-01 20:02:30 +02:00
Ollie Agent 6fe212a6fc fix: add name= field to agent/new template, support in CreateAgent
- Added name= as the first field in agent/new read template
- CreateAgent now accepts name= as alias for agent_alias=
- gofmt formatting fixes
2026-08-01 19:58:00 +02:00
Ollie Agent 8b795ad7e6 fix: allow access to agent/new on empty sessions
pathType in server.go blocked walks to agent/new when Core is nil.
Added early return for parts[2]=="new" before the nil-guard so the
agent creation file is always accessible.

Also made agent/new rdwr return the agent name instead of just "ok".
2026-08-01 19:56:14 +02:00
Ollie Agent a01338b850 update kde submodule for empty session gui support 2026-08-01 19:51:12 +02:00
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 7e731d4624 update kde submodule: rdwr for session/new and agent/new 2026-08-01 18:50:28 +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 4bfbf70d45 fix: CreateAgent creates session (with Core) atomically, never registers nil Core in map 2026-08-01 18:46:06 +02:00
Ollie Agent c58a1d839b update kde submodule: two-step create (session/new then agent/new) 2026-08-01 18:41:23 +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 3144bcea3c update kde submodule: fix session/agent group split 2026-08-01 18:35:38 +02:00
Ollie Agent e32453ffa4 update kde submodule: group session/agent params in new session dialog 2026-08-01 18:33:11 +02:00
Ollie Agent 32706fdac2 server: add agent_alias param to session/new for explicit agent name 2026-08-01 18:32:58 +02:00
Ollie Agent aabf1f41a2 update kde submodule: stop state stream on session kill 2026-08-01 18:28:01 +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 047b944322 update kde submodule: double-click rename for agent nodes 2026-08-01 18:17:19 +02:00
Ollie Agent f97a544ab0 update kde submodule: re-discover agent ID on state stream start 2026-08-01 18:14:36 +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 f08147b0b6 update kde submodule: remove 'Agent ' prefix from display name 2026-08-01 18:04:35 +02:00
Ollie Agent 9acc609db5 fix: server.go pathType validates agent by Name not ID 2026-08-01 18:02:57 +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 afda1f7dd6 agent: add id (immutable) and name (mutable) files to 9P agent directory 2026-08-01 17:41:17 +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 7403e1f5bb session: replace timestamp-prefix IDs with UUIDv4; show first segment in acme GUI 2026-08-01 17:26:34 +02:00
Ollie Agent 0395a4a92f agent: replace timestamp-based response IDs with UUIDv4 2026-08-01 17:22:16 +02:00
Ollie Agent fb2956f4e4 update kde submodule: omit resp ID 2026-08-01 17:18:33 +02:00
Ollie Agent 82c3e62f35 update kde submodule: emoji call/tool 2026-08-01 17:17:42 +02:00
Ollie Agent 902e6bdf3f update kde submodule: ❌ error 2026-08-01 17:16:24 +02:00
Ollie Agent 77006d63bc update kde submodule: emoji labels 2026-08-01 17:15:51 +02:00
Ollie Agent d532ebf3b6 update kde submodule: emoji-style ⚠️ 2026-08-01 17:13:42 +02:00
Ollie Agent 7e6651a64f update kde submodule: user-interrupt rendering 2026-08-01 17:11:57 +02:00
Ollie Agent 60c75b1f5b update kde submodule: fix context menu kill target 2026-08-01 17:08:27 +02:00