Commit Graph

7 Commits

Author SHA1 Message Date
Ollie Agent 2e55e30795 elevate: move adapter auto-start from sandboxed client to Go server
Remove _start_adapter() from x/elevate (ran inside sandbox, could not
function). The Go executeElevated() now calls ensureElevateAdapter()
which runs outside the sandbox and can properly start the adapter.

core: update submodule.
2026-07-19 11:34:05 +02:00
Ollie Agent 6bc4ab6745 elevate: auto-start adapter + refresh stale session token
elevate-adapter-superpowerd: detect auth errors from superpowerd and
automatically refresh the session token via "superpowers run-session
--child-session", retrying the request once.

x/elevate: auto-start the adapter if the socket is not available,
removing the dependency on the agentSpawn hook for adapter lifecycle.

core: update submodule (hook run/fail summary).
2026-07-19 10:25:34 +02:00
Ollie Agent 83ca936c8c elevate: streaming protocol for real-time output
Replace the batch JSON request/response protocol with a streaming
frame protocol. The adapter now uses superpowerd ExecuteCommandStreaming
with SCM_RIGHTS fd-passing to stream stdout/stderr in real-time.

Protocol: client sends {cmd,cwd}+newline, server streams frames
(type byte + 4-byte length + payload). This enables elevated+detach
to capture live output in the ring buffer.

Also updates core submodule with elevated+detach support.
2026-07-18 00:16:32 +02:00
Levi Neely 778af112db fix: strip script dir from sys.path before imports in x/ Python scripts
Python adds the script directory to sys.path[0] at startup and tries to
create a FileFinder for it. When the script lives on a 9P FUSE mount the
FileFinder init fails before any stdlib import can succeed. sys is a
builtin and loads without filesystem access, so strip the path first.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 11:49:03 +02:00
Levi Neely 16d4fc57ff elevate: default socket to XDG_RUNTIME_DIR, add to sandbox env
Both x/elevate and elevate-adapter-superpowerd now default the socket
path to $XDG_RUNTIME_DIR/ollie/elevate.sock (falling back to
/run/user/<uid>/ollie/elevate.sock) when OLLIE_ELEVATE_SOCKET is unset.
Add OLLIE_ELEVATE_SOCKET to env sections of both sandbox configs.
Add {XDG_RUNTIME_DIR}/ollie to restricted sandbox filesystem rw rules
so x/elevate can reach the socket. Update README env block and
scripts/README socket path docs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 11:43:24 +02:00
Levi Neely 7a88fb3437 implement generic x/elevate with socket broker pattern
x/elevate is now a generic client: reads OLLIE_ELEVATE_SOCKET, sends
{cmd,cwd}, reads back {stdout,stderr,exit_code}. All backend-specific
logic moves to adapters. Add elevate-adapter-superpowerd as the
reference adapter: owns the socket lifecycle, translates the ollie
protocol to superpowerd JSON-RPC ExecuteCommand. Add OLLIE_ELEVATE_SOCKET
to env docs. Update scripts/README.md with protocol spec, adapter
setup, and guide for writing custom adapters.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 11:41:54 +02:00
Levi Neely 8a82d0966b elevation: add x/elevate plugin; update mkfile and docs
Replace tools/elevate_superpowers with scripts/x/elevate — a single
self-contained plugin that bootstraps into a superpowers session and
runs the IPC. mkfile installs it to ~/.config/ollie/scripts/x/.
Update 08_tool-elevate.md to remove backend-specific language.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 20:50:37 +02:00