Commit Graph

21 Commits

Author SHA1 Message Date
Levi Neely 332a90d6af share active-sessions dir with 9p backend
Both backends now use ~/.local/share/ollie/sessions/active since
they are mutually exclusive.
2026-07-19 13:27:47 +02:00
Levi Neely 8d031fa525 remove Makefile (consolidated into root justfile) 2026-07-19 13:02:47 +02:00
Levi Neely 0f5fd23340 remove prompts/ — now at repo root as SYSTEM_PROMPT-dbus.md 2026-07-19 12:13:11 +02:00
Levi Neely f590b7f6c2 add dbus-specific system prompts
Moved from 9p/prompts/ — these are the system prompts specific to the
dbus frontend (session management, 9P filesystem model, etc).
2026-07-19 12:07:56 +02:00
Levi Neely c88a176fd1 readme: document D-Bus interface; add missing introspection entries 2026-07-18 22:29:55 +02:00
Levi Neely e1ce5df53c dbus: add GetPlan, SetPlan, GetSystemPrompt, GetContextSize, GetPreviousPrompt, Compact, ClearContext
Closes remaining feature gaps vs 9p interface.
2026-07-18 18:16:55 +02:00
Levi Neely d907aa53f4 dbus: fix streaming performance
- sendNotification now async (fire-and-forget goroutine)
- ChatUpdated coalescing interval 50ms -> 150ms to reduce signal flood
2026-07-18 17:32:53 +02:00
Levi Neely 8bd59a6509 dbus: add Generate and Route methods
Generate: stateless one-shot LLM call (prompt, system, backend, model)
Route: classify task, return best backend+model from available models

Both delegate to core backend.Generate() and backend.Route().
KDE frontends can use Route as a preprocessing step before CreateSession.
2026-07-18 17:21:50 +02:00
Levi Neely 935c234ce9 dbus: add GetEnv method for session environment inspection 2026-07-18 15:27:05 +02:00
Levi Neely dd8a31dd8a dbus: wire OnExit hook for detached process context injection
When a detached process exits, formats its output and calls
InjectSystemEvent on the agent core. Also emits ProcessExited
D-Bus signal for GUI notification.
2026-07-17 22:07:45 +02:00
Levi Neely 31cac84423 dbus: add detached process management methods
New D-Bus methods on SessionManager:
- DetachProcess(sessionID) - detach currently running process
- ListDetached(sessionID) - list detached processes (pid/cmd/started/status)
- SignalDetached(sessionID, pid, signal) - send TERM or KILL
- GetDetachedOutput(sessionID, pid) - read ring buffer output
- DismissDetached(sessionID, pid) - remove exited process from list

New signal: ProcessDetached(sessionID) emitted on detach.
2026-07-17 16:51:55 +02:00
Levi Neely 7900514548 batch ChatUpdated D-Bus signals with 50ms coalescing
Previously every streaming token fired a separate D-Bus signal,
flooding the session bus and back-pressuring the HTTP stream reader.
New chatEmitter buffers text and flushes at most every 50ms. Log
writes remain immediate so GetChat always returns current data.
flushSync() drains the buffer before StateChanged signals.
2026-07-16 06:03:06 +02:00
Levi Neely 99a8dbfe88 session persistence: SIGHUP, bus disconnect, checkpointing, chat log restore
- Add SIGHUP to signal handler for non-systemd session teardown
- Detect D-Bus session bus disconnection via conn.Context().Done()
- Checkpoint individual sessions to disk on every idle transition
- Remove checkpoint files when sessions are killed
- Rebuild visible chat log from last 8 messages on restore
2026-07-14 20:58:06 +02:00
Levi Neely bb2ced28d8 session persistence: save/restore active sessions across restarts
On shutdown (SIGTERM/SIGINT), all active sessions are persisted to
~/.local/share/ollie/active-sessions/ as JSON files containing the
full message context, backend, model, agent, and cwd metadata.

On startup, persisted sessions are automatically restored with their
complete context window, then the persist files are cleaned up.
Copilot sessions are excluded from persistence (ephemeral).
2026-07-14 20:42:08 +02:00
Levi Neely 76c4ddcdd9 feat: add Complete D-Bus method for code completion
Adds a Complete method that manages a dedicated copilot session,
sends a FIM prompt with prefix/suffix context, waits for the
result, and returns cleaned completion text. Includes unit tests
for strip helpers.
2026-07-14 12:30:01 +02:00
Levi Neely 5afe7b69ac fix nil pointer dereference on /agent command
NewDispatcher was not passed to AgentCoreConfig in the dbus session
manager, causing a nil function call when switching agents via /agent.
2026-07-14 11:59:03 +02:00
Levi Neely 93ba8ffd29 feat: emit SessionRenamed signal on successful rename 2026-07-08 19:27:20 +02:00
Levi Neely 3178aaad81 chore: ignore build artifact 2026-07-08 15:55:58 +02:00
Levi Neely 4480c9a089 gitignore: add ollied binary 2026-07-07 13:32:51 +02:00
Levi Neely 4ba889bb41 pure Go D-Bus daemon replacing C++/cgo implementation 2026-07-07 13:02:25 +02:00
Levi Neely 9ec7f3bdc7 initial commit 2026-07-07 12:47:37 +02:00