Commit Graph

1120 Commits

Author SHA1 Message Date
Ollie Agent fb09d0e366 file_read: add ollie:prompt block for auto-discovery
Usage documentation is now embedded in the script header and
automatically extracted into the system prompt by BuildRuntime.
This replaces the corresponding section in tools-file.md.
2026-07-21 13:18:57 +02:00
Ollie Agent f56398aeb1 prompts: extract tool interface and skill discovery into own files
SYSTEM_PROMPT.md now contains only behavioral directives (identity,
output protocol, accuracy, security). Tool Interface and Skill Discovery
are separate prompt files referenced by agent configs.

Agent configs use short names resolved via OLLIE_PROMPTS_PATH and no
longer reference SYSTEM_PROMPT.md or session.md (those are now embedded
in the binary and injected automatically).
2026-07-21 13:07:24 +02:00
Ollie Agent db616bcbf1 remove doc/PLANNING.md (unimplemented task_plan/task_complete)
These tools were never reliably used by agents. Planning is handled
via in-context plan files (s/{id}/plan) and the replan/stall detection
in the agent loop.
2026-07-21 12:33:40 +02:00
Ollie Agent 228e0c48d6 add service definitions for superpowerd + elevate adapter
openrc: single service (ollie.initd) manages both superpowerd and the
elevate adapter via start_post/stop_pre, since supervise-daemon only
supervises one process and openrc has no PartOf equivalent.

systemd: two user services with native dependency management.
superpowerd.service runs the daemon; ollie-elevate-adapter.service
depends on it via Requires+PartOf (auto-stops with superpowerd).
2026-07-21 12:30:01 +02:00
Ollie Agent 2803fb30f3 elevate-adapter: connection pooling to superpowerd
Reuse SEQPACKET connections across requests instead of
connect/close per command. Connections are returned to a
pool (max 4 idle) after successful use and discarded on error.

superpowerd HandleConn already loops for multiple requests
per connection, so this is safe. Each ExecuteCommandStreaming
still blocks its connection until the command exits, so
concurrent commands use separate pooled connections.
2026-07-21 11:55:13 +02:00
Ollie Agent 0fa24ef8c2 remove elevate-adapter-start script and agentSpawn hook
The adapter is now started by the system service manager, not
on-demand from inside the sandbox. ensureElevateAdapter was
removed from core in the previous commit.
2026-07-21 11:49:42 +02:00
Ollie Agent e2e1e95fd8 remove dbus submodule, update docs for -no9p mode
olliesrv now supports D-Bus-only operation via -no9p flag,
replacing the need for the standalone ollied daemon (archived).

- Remove dbus/ submodule
- Update README: three-mode table, remove ollied references
- Update doc/ARCHITECTURE.md: remove ollied section and references
2026-07-21 11:44:38 +02:00
Ollie Agent 058d7aed0d elevate-adapter: direct CreateSession for token refresh
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.
2026-07-21 07:42:54 +02:00
Levi Neely a65178f936 elevate-adapter: retry on exit 255 with no output, add diagnostic logging
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.
2026-07-20 15:49:58 +02:00
Levi Neely 9b7832b134 acme: update submodule (fix Del passthrough bug) 2026-07-20 14:08:02 +02:00
Levi Neely cf6fe52fc4 update core, 9p submodules; agent configs and prime script 2026-07-20 13:37:22 +02:00
Levi Neely 160cf1a46b kf5 corrections, remote is broken 2026-07-20 10:25:43 +02:00
Ollie Agent 8929f10aa8 README: expand remote execution section with streaming, persistence, comparison 2026-07-19 21:57:56 +02:00
Ollie Agent b7217232a3 remote: session persistence across restarts 2026-07-19 21:53:01 +02:00
Ollie Agent be041cff1a doc: add Streaming section to REMOTE_EXECUTION 2026-07-19 21:41:24 +02:00
Ollie Agent 365be9ae32 streaming: tool output without duplication or new event roles 2026-07-19 21:36:55 +02:00
Ollie Agent 0d9b30d4da streaming: unified tool output streaming 2026-07-19 21:26:15 +02:00
Ollie Agent 1c46dba853 remote exec: streaming output notifications 2026-07-19 21:06:13 +02:00
Ollie Agent fc85617d32 doc: update REMOTE_EXECUTION with implementation status and lessons learned 2026-07-19 20:54:00 +02:00
Ollie Agent bafe2627fb remote: always deploy fresh sandbox config 2026-07-19 20:50:00 +02:00
Ollie Agent 932793db11 remote: fix /dev sandbox access 2026-07-19 20:48:07 +02:00
Ollie Agent e71a11c237 justfile: copy tools from repo source, not installed copy 2026-07-19 20:45:44 +02:00
Ollie Agent 5cb0f6190c file_glob: fall back to find when rg is unavailable 2026-07-19 20:43:54 +02:00
Ollie Agent 965fe76ca5 file_grep: fall back to GNU grep when rg is unavailable 2026-07-19 20:40:56 +02:00
Ollie Agent b7623db619 prompt: unified PRIME_* env, prime is pure renderer
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.
2026-07-19 20:37:37 +02:00
Ollie Agent 5b1a3760c6 prompt: unified PRIME_* env for local and remote sessions 2026-07-19 20:26:52 +02:00
Ollie Agent c080dbc406 remote exec: fix CWD and host info in system prompt 2026-07-19 20:17:32 +02:00
Ollie Agent 9f84b33e69 remote: fix sandbox restrictions 2026-07-19 20:10:04 +02:00
Ollie Agent acb3ebedac remote exec: embed tools, fix prompt CWD, grep fallback
- 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
2026-07-19 20:05:22 +02:00
Ollie Agent c4ecae47e5 remote: SSH bootstrap auto-deploys ollie-remote binary 2026-07-19 19:55:04 +02:00
Ollie Agent 868b8e8d08 remote exec: fix tool routing and declarations
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.
2026-07-19 19:49:48 +02:00
Ollie Agent 80f13188c9 remote exec: fix empty systemprompt for remote sessions
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.
2026-07-19 19:43:27 +02:00
Ollie Agent 9dfeb71d63 9p: track remote execution integration 2026-07-19 18:58:32 +02:00
Ollie Agent 0bd192b04e remote: track latest (sandbox + landrun deploy fixes) 2026-07-19 18:50:11 +02:00
Ollie Agent 0130649cb4 track core + remote fixes for sandbox config 2026-07-19 18:44:46 +02:00
Ollie Agent dc279aca6e justfile: add ollie-remote build/test/clean targets 2026-07-19 18:34:32 +02:00
Ollie Agent e025f2f4ff docs: add ollie-remote to README and AGENTS.md 2026-07-19 18:22:38 +02:00
Ollie Agent 121e45c1cb core: track remote execution client 2026-07-19 18:19:54 +02:00
Ollie Agent e7a723181b add ollie-remote submodule (split-brain execution server) 2026-07-19 18:17:25 +02:00
Ollie Agent 2e8fd6d30a docs: add remote sandbox section to split-brain design
Covers configuration layering (embedded default, .ollie-sandbox.yaml
per-project override, NixOS auto-detection), why remote is simpler
than local, and kernel compatibility.
2026-07-19 18:10:52 +02:00
Ollie Agent 8d13ce6730 docs: add remote execution (split-brain) design doc
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.
2026-07-19 18:00:43 +02:00
Ollie Agent 60f38a51cd docs: remove model tier refs, add KDE/dbus to frontends and repo structure
- Remove cascade/escalate/OLLIE_TIER_* references (model tiers are gone)
- Add dbus/ and kde/ to repo structure
- Frontends table now shows KDE components over D-Bus
- httpgw rewritten as D-Bus bridge description
- Key design decisions updated for dual integration surfaces
2026-07-19 17:52:29 +02:00
Ollie Agent 5cb0e5c057 docs: add D-Bus adapter, ollied, and KDE integration sections 2026-07-19 17:48:02 +02:00
Ollie Agent 94e321d46c docs: note web UI also connects via D-Bus 2026-07-19 17:44:55 +02:00
Ollie Agent 4d8a3db4ee docs: s/filesystems/the Unix philosophy/ 2026-07-19 17:43:36 +02:00
Ollie Agent e86b615383 docs: rewrite philosophy section
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.
2026-07-19 17:42:31 +02:00
Ollie Agent ecbc93f3b4 docs: update architecture for current 9P/D-Bus topology
- 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
2026-07-19 17:38:19 +02:00
Ollie Agent 37bd0f9899 justfile: ensure memory directory exists on install 2026-07-19 17:31:20 +02:00
Ollie Agent e72199a8ab prompts: extract session management into separate files
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.
2026-07-19 17:00:10 +02:00
Ollie Agent d4bfcbbb17 fix: GUI not refreshing sessions after olliesrv restart
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.
2026-07-19 14:16:24 +02:00