cleanup: remove superpowerd references from codebase

This commit is contained in:
Levi Neely 2026-07-27 10:57:09 +02:00
parent ad274f288c
commit 997b68d6df
2 changed files with 6 additions and 45 deletions

2
core

@ -1 +1 @@
Subproject commit fb8f4acff16868493cabda7c5904c52b2c166cac
Subproject commit bd40dc9637b375b84a022c7e3be9a51e1cfba6ae

View File

@ -240,51 +240,12 @@ OLLIE_ELEVATE_SOCKET=${XDG_RUNTIME_DIR}/ollie/elevate.sock
Any process that listens on a Unix stream socket and speaks this protocol is a valid
adapter.
### x/elevate-adapter-superpowerd
### Integrated elevation broker
The included adapter bridges the ollie elevate protocol to superpowerd, a hypothetical
external command broker. superpowerd is a daemon running outside any sandbox that
accepts `ExecuteCommand` requests over its own Unix socket and runs them in an
unsandboxed context — satisfying the kernel-level constraint.
**Start the adapter** (outside the sandbox, once per session):
```sh
superpowers run-session -- python3 $OLLIE/x/elevate-adapter-superpowerd
```
`superpowers run-session` acquires a session token and re-runs the adapter with
`SUPERPOWERD_SESSION_TOKEN` set. The adapter then:
1. Creates the socket at `OLLIE_ELEVATE_SOCKET` and listens for connections
2. For each request, connects to superpowerd and sends a JSON-RPC `ExecuteCommand`:
```json
{
"jsonrpc": "2.0",
"method": "ExecuteCommand",
"id": 1,
"params": {
"auth": {"session_token": "<token>"},
"command": "<cmd>",
"working_dir": "<cwd>",
"approval_timeout": 7200
}
}
```
3. Translates the response to the ollie protocol and returns it to `x/elevate`
4. Cleans up the socket on exit (`SIGTERM`/`SIGINT`)
The superpowerd socket is resolved from `SUPERPOWERD_SOCKET`,
`SUPERPOWERD_SOCKET_DIR/superpowerd.sock`, `$XDG_RUNTIME_DIR/superpowerd/superpowerd.sock`,
or `/run/user/<uid>/superpowerd/superpowerd.sock`.
### Writing your own adapter
Any daemon that owns `OLLIE_ELEVATE_SOCKET` and speaks the two-message JSON protocol
is a valid adapter. The daemon must be started outside landrun; that's the only
constraint. Use `elevate-adapter-superpowerd` as a template.
As of 2026-07, elevation is handled by olliesrv's integrated broker (`core/pkg/elevate`).
The broker listens on `$OLLIE_ELEVATE_SOCKET` and handles command execution with
human-in-the-loop approval via desktop notifications. No external adapter or daemon
is required.
### Disabling elevation