This repository has been archived on 2026-07-21. You can view files and clone it, but cannot push or open issues or pull requests.
ollie-dbus/README.md

4.4 KiB

ollie-dbus

D-Bus daemon exposing the ollie agent runtime on the session bus as org.ollie.SessionManager. Used by the KDE Plasma widget and other desktop clients.

Building

mk

Installs ollie-dbus to $HOME/bin.

Usage

ollie-dbus   # starts daemon, connects to session bus

The daemon claims the bus name org.ollie.SessionManager and exports a single object at /org/ollie/SessionManager. It persists active sessions to ~/.local/share/ollie/active-sessions/ and restores them on restart. Desktop notifications are sent via org.freedesktop.Notifications when a turn completes.

A .desktop file (org.ollie.SessionManager.desktop) is included for D-Bus activation.

Interface

Bus name: org.ollie.SessionManager
Object path: /org/ollie/SessionManager
Interface: org.ollie.SessionManager

Session lifecycle

Method Args Returns
CreateSession cwd, backend, model, agent session_id (string)
ListSessions — []string (tab-separated: id, state, model, agent)
KillSession session_id bool
RenameSession session_id, new_name bool

Interaction

Method Args Returns
Submit session_id, prompt bool
Interrupt session_id bool
Compact session_id bool
ClearContext session_id bool

State queries

Method Args Returns
GetState session_id state string (idle, thinking, calling:X)
GetChat session_id, offset (int64) text, new_offset
GetUsage session_id usage string
GetCost session_id cost string
GetEnv session_id env string (key=value lines)
GetConfig session_id config string (key=value lines)
SetConfig session_id, key, value bool
GetContext session_id JSONL message history
GetPlan session_id plan string
SetPlan session_id, plan bool
GetSystemPrompt session_id rendered system prompt
GetContextSize session_id context size string
GetPreviousPrompt session_id last submitted prompt

Enumeration

Method Args Returns
ListBackends — []string
ListModels session_id []string
ListAgents — []string

Peers

Method Args Returns
PeerAdd session_id, peer_id bool
PeerRemove session_id, peer_id bool
PeerList session_id []string
PeerSubmit session_id, peer_id, prompt bool

Detached processes

Method Args Returns
DetachProcess session_id bool
ListDetached session_id []string (tab-separated: pid, command, started, status)
SignalDetached session_id, pid (int32), signal bool
GetDetachedOutput session_id, pid (int32) output string
DismissDetached session_id, pid (int32) bool

Stateless operations

Method Args Returns
Generate prompt, system, backend, model result string
Route task, backend "backend=X model=Y"
Complete cwd, file, prefix, suffix, context completion string

Complete uses env vars OLLIE_COMPLETE_MODEL and OLLIE_COMPLETE_BACKEND to select the model. It manages a persistent copilot session per working directory.

Signals

Signal Args
SessionCreated session_id
SessionKilled session_id
SessionRenamed old_id, new_id
StateChanged session_id, new_state
ChatUpdated session_id, offset (int64), new_text
ProcessDetached session_id
ProcessExited session_id, pid (int32), exit_code (int32)

ChatUpdated is coalesced (emitted at most every 150ms) to avoid flooding the bus during streaming.

Example (gdbus)

# Create a session
gdbus call -e -d org.ollie.SessionManager \
  -o /org/ollie/SessionManager \
  -m org.ollie.SessionManager.CreateSession \
  "$PWD" "" "" ""

# Submit a prompt
gdbus call -e -d org.ollie.SessionManager \
  -o /org/ollie/SessionManager \
  -m org.ollie.SessionManager.Submit \
  "<session_id>" "hello"

# Monitor signals
gdbus monitor -e -d org.ollie.SessionManager