Replace subprocess-based token refresh (superpowers run-session --child-session)
with direct SEQPACKET CreateSession RPC to superpowerd. This fixes:
1. Session PID mismatch: old approach registered session to short-lived sh
subprocess PID, causing immediate pidAlive() failure on next use
2. Child session failure: --child-session fails when superpowerd restarts
(parent session gone)
3. Gentoo python-exec2c exec chain: replace os.execvp startup with direct
CreateSession call
The adapter now owns its session directly (peerPID = adapter PID), so the
session stays valid for the adapters entire lifetime.
When superpowerd returns exit 255 with no output streamed, treat it as a
suspicious session failure (same as auth error) and retry with a refreshed
token. This addresses intermittent elevated command failures where the
session silently expires mid-conversation.
Also adds stderr logging at key decision points: token refresh attempts,
retry signals, RPC errors, and non-JSON responses from superpowerd.
prime script no longer detects platform/git locally. All PRIME_*
variables are set by BuildRuntime callers and stored in the agent
for /agent reloads. Templates use PRIME_CWD instead of PWD.
- ollie-remote embeds tool scripts at compile time (no deployment needed)
- justfile copies tools/ into remote/ before building
- /agent command passes PWD to prompt resolver for remote sessions
- file_grep falls back to GNU grep when rg is unavailable
Tools were not working because:
1. remote.Server.ListTools() returned nil so no tool definitions
were sent to the model via the API
2. CallTool always dispatched as execute_code regardless of tool name
Now ListTools calls the remote list_tools RPC, and CallTool passes
the actual tool name through.
Two issues caused remote sessions to have empty system prompts:
1. prompt_resolver set cmd.Dir to the remote CWD which does not exist
locally, causing all prompt commands to fail with ENOENT.
2. No FUSE mount was started for remote sessions since WithMount9P
hooks into a local execute.Server that does not exist.
Also fixes go vet context leak warnings in execute/server.go.
Design for local agent loop + remote tool execution over SSH.
Inspired by goq toolserv/ssh.go pattern: bootstrap a minimal binary
on the remote host, communicate via JSON-RPC over stdin/stdout.
Keeps LLM streaming, D-Bus signals, and GUI local while executing
tools on a remote filesystem.
Reframe from "everything is a file" as the sole design principle to
the actual layered philosophy:
- Design: small extensible core (Emacs-like)
- Integration: 9P filesystem (canonical) or D-Bus (conventional)
Both are thin adapters over the same agent.Core.
- Remove references to non-existent 9P paths (t/idx, sk/idx, m/, etc)
- Update system overview diagram to show KDE/Web frontends over D-Bus
- Show embedded D-Bus adapter in olliesrv and ollied alternative
- Update tool/skill discovery references to use env vars
- Update agent config example to current format
Split session management (9P and D-Bus) out of the monolithic system
prompts into dedicated files primed separately:
- session-9p.md: 9P filesystem session operations
- session-dbus.md: D-Bus method/signal session operations
System prompts are now server-agnostic. The install target copies
the appropriate session-*.md as session.md. Agent configs prime
"session" after "SYSTEM_PROMPT" to compose the full prompt.
This eliminates the N×2 variant matrix (one -9p and -dbus per model)
and makes adding new model prompts simpler.
Two issues prevented the KDE GUI from seeing restored sessions:
1. QDBusInterface cached stale introspection data after service restart,
causing ListSessions calls to silently fail.
2. SessionCreated D-Bus signals were never emitted for restored sessions
because the dbus adapter was nil during session.Manager initialization.