From af7363cb1dd2d4e5c37ac03296079eb9f0a01451 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Fri, 24 Jul 2026 11:58:01 +0200 Subject: [PATCH] dbus: add remote parameter to CreateSession The D-Bus method was missing the remote parameter that session.Manager already supports. Add it as the 6th arg after system_prompt so frontends can create remote execution sessions via D-Bus. --- dbus.go | 6 +++++- prompts/session_dbus.md | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dbus.go b/dbus.go index 2a6c284..836a628 100644 --- a/dbus.go +++ b/dbus.go @@ -217,7 +217,7 @@ func (a *DBusAdapter) stopWatcher(id string) { // --- D-Bus exported methods --- -func (a *DBusAdapter) CreateSession(cwd, backendName, modelName, agentName, systemPrompt string) (string, *dbus.Error) { +func (a *DBusAdapter) CreateSession(cwd, backendName, modelName, agentName, systemPrompt, remote string) (string, *dbus.Error) { var args []string if cwd != "" { args = append(args, "cwd="+cwd) @@ -234,6 +234,9 @@ func (a *DBusAdapter) CreateSession(cwd, backendName, modelName, agentName, syst if systemPrompt != "" { args = append(args, "system_prompt="+systemPrompt) } + if remote != "" { + args = append(args, "remote="+remote) + } if cwd == "" { dir, _ := os.Getwd() args = append(args, "cwd="+dir) @@ -669,6 +672,7 @@ var introspectXML = ` + diff --git a/prompts/session_dbus.md b/prompts/session_dbus.md index 8d7591b..48c6e23 100644 --- a/prompts/session_dbus.md +++ b/prompts/session_dbus.md @@ -35,7 +35,7 @@ All session operations go through the D-Bus interface. | Method | Args | Returns | Purpose | |---|---|---|---| -| `CreateSession` | cwd, backend, model, agent, system_prompt | session_id | Create a new session | +| `CreateSession` | cwd, backend, model, agent, system_prompt, remote | session_id | Create a new session | | `ListSessions` | — | array of "id\tstate\tmodel\tagent" | Discover sessions | | `KillSession` | session_id | bool | Terminate a session | | `RenameSession` | session_id, new_name | bool | Rename a session | @@ -119,7 +119,7 @@ dbus-send --session --dest=org.ollie.SessionManager --type=method_call --print-r # Create a session dbus-send --session --dest=org.ollie.SessionManager --type=method_call --print-reply \ /org/ollie/SessionManager org.ollie.SessionManager.CreateSession \ - string:"$PWD" string:"" string:"" string:"default" string:"" + string:"$PWD" string:"" string:"" string:"default" string:"" string:"" # Submit a prompt dbus-send --session --dest=org.ollie.SessionManager --type=method_call \