Commit Graph

471 Commits

Author SHA1 Message Date
Levi Neely 1a01002f7b planning: observe step, task dispatcher, tool parallel annotations, graceful degradation
- agents: agentSpawn uses 'task prime', postTurn uses 'task list' (observe step)
- scripts/x/task: dispatcher routes to bd (beads) or todo.sh based on availability
- prompts/tools-todosh.md: prime context for todo.sh fallback
- tools: add '# ollie:parallel read' annotation to file_read, file_glob, file_grep,
  file_grep, memory_recall, reasoning_think, denote_view
- core: update submodule ref

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 09:00:54 +02:00
Levi Neely c170917ff2 agents: revert postTurn bd list (premature)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 23:56:31 +02:00
Levi Neely c0a4fd1525 agents: observe step via postTurn bd list
All agents now run `bd list --status open` after each turn. Output is
injected into session history (not stdout) so the model is aware of open
tasks on the next turn without triggering autonomous continuation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 23:53:11 +02:00
Levi Neely df4d8a3a19 agents: move tool primes to agentSpawn; update core submodule
Tool primes (tools-file, tools-reasoning, tools-memory, tools-subagent,
tools-elevate) moved from preTurn to agentSpawn across all agent configs.
Context is now injected once at session refresh points (start, post-clear,
post-compaction) rather than repeated on every turn.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 19:38:27 +02:00
Levi Neely fd3ba91519 update el submodule: fix spec→cfg 2026-04-25 12:34:58 +02:00
Levi Neely 1fe136a2c2 update tui submodule: rebuild session layer 2026-04-25 12:33:19 +02:00
Levi Neely 2f8d18dc51 elevate: auto-start adapter via agentSpawn hook
Add x/elevate-adapter-start: checks if the adapter is already listening
(connect test), starts it in the background if not. Exits 0 always so it
never blocks session startup. Wire it into agentSpawn in all agent configs
and install it via mkfile.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 11:54:29 +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 b9b4a1fe1d mkfile: install elevate-adapter-superpowerd with scripts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 11:47:51 +02:00
Levi Neely 5ff7f189f5 update core submodule (OLLIE_ELEVATE_SOCKET in env)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 11:45:53 +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 1de43c1105 docs: reframe x/elevate as sandbox escape hatch, not privilege escalation
The purpose is to run steps outside the Landlock sandbox, not to gain
privileges. Clarify the constraint (kernel-enforced, must reach an
external process), reframe the minimal example and superpowerd walkthrough
accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 11:33:22 +02:00
Levi Neely 2eefe5a01d docs: correct custom elevation backend section
sudo/doas don't work: Landlock is kernel-level and applies regardless
of user privileges within the sandboxed process. The backend must hand
the command to a process spawned outside landrun entirely. The
superpowerd Unix socket pattern is the right model.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 11:32:09 +02:00
Levi Neely 8700373c63 docs: remove incorrect session token injection paragraph
x/elevate handles token acquisition itself via the re-exec through
superpowers run-session when SUPERPOWERD_SESSION_TOKEN is absent.
No manual injection is needed; the paragraph was wrong.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 11:30:13 +02:00
Levi Neely 0eaa4dc8eb docs: remove broken superpowerd link, treat as hypothetical
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 11:26:37 +02:00
Levi Neely 61491ce786 docs: expand x/elevate with full backend setup guide
Document the plugin interface contract (args, cwd, stdout/exit code),
plugin path resolution (OLLIE_PLUGINS_PATH / ~/.config/ollie/scripts/x/),
a minimal exec-only example, a step-by-step walkthrough of the default
superpowerd implementation including session token injection, and custom
backend examples (sudo, doas, disable).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 11:23:47 +02:00
Levi Neely df651908c4 docs: document x/ namespace and x/elevate in scripts/README.md
Add x/ to the namespace list and add an x/elevate section describing
its role as the elevation plugin for execute_code elevated steps, the
calling convention, the default superpowerd implementation, and how to
replace or disable it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 11:22:29 +02:00
Levi Neely d42778c61a docs: correct Sandboxing section in ARCHITECTURE.md
Sandboxing is not layered. It is applied specifically to execute_code:
each step is wrapped with landrun using a named config from
~/.config/ollie/sandbox/<name>.yaml (default: "default"). Steps marked
elevated:true bypass the sandbox via x/elevate. Remove superpowerd
reference.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 11:21:29 +02:00
Levi Neely 5326de7b46 docs: fix auto-compact description in ARCHITECTURE.md
Auto-compact does exist: triggers automatically at 75% of the model's
context length (128k default), and also manually via /compact.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 11:19:53 +02:00
Levi Neely ead4678ee5 docs: correct Session and Context section in ARCHITECTURE.md
Remove references to the non-existent contextBuilder and rolling window.
Describe the actual compaction model: unbounded history, explicit /compact
trigger, LLM-generated summary, system message preservation, user message
budget (~20k tokens), tool call flattening, and pre-compaction snapshot.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 11:19:05 +02:00
Levi Neely eff00a7b2e docs: document httpgw and webui
Add HTTP gateway and web UI sections to USAGE.md: build instructions,
runtime flags, HTTP→9P endpoint reference, nginx serving example, and
Vite dev workflow. Add HTTP gateway architecture section to
ARCHITECTURE.md with frontend comparison table. Update README.md with
httpgw build target, dual remote-access paths (9P mount vs httpgw),
and container example updated for both.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 09:14:48 +02:00
Levi Neely c3df30df3c docs: add multi-agent workflows and store federation to USAGE.md
Promote IDEAS.md content to concrete how-to documentation: subagent
delegation via subagent_spawn, concurrent sessions with direct prompt
passing (prompt/statewait/offset), predefined shell-script workflows,
self-generating workflows, and store federation via OLLIE_TOOLS_PATH
and OLLIE_TRANSCRIPT_PATH pointing at 9pfuse-mounted remote dirs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 08:37:33 +02:00
Levi Neely 2148c8c668 update docs: unify b/ into s/, introduce s/bfg and s/bbg
Batch and session namespaces are now a single s/ concept. s/bfg blocks
until the agent finishes and writes to stdout; s/bbg returns immediately
and prints the session path. s/b is the core one-shot runner. Remove all
b/ references from README, USAGE, ARCHITECTURE, and scripts/README.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 08:31:15 +02:00
Levi Neely 7b8d665457 fix subagent_spawn, sort sessions, update prompts
- subagent_spawn: use s/bfg instead of deprecated b/q
- SYSTEM_PROMPT: fix stale /b/ reference to /s/
- core: sort session index by ID
- webui: gitignore .kiro/
2026-04-24 21:44:57 +02:00
Levi Neely 0cca67c66f update core and webui submodules 2026-04-24 21:33:35 +02:00
Levi Neely 528bb232ca update httpgw and webui submodules 2026-04-24 21:14:18 +02:00
Levi Neely d98c6d3ef0 webui + httpgw fixes, tilde expansion, build targets
- Update core, httpgw, webui submodules
- Add httpgw and webui to mk all rule
2026-04-24 20:11:04 +02:00
Levi Neely 78f7d63b60 add ollie-webui as webui submodule
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 18:33:19 +02:00
Levi Neely 261d20ded1 bump httpgw 2026-04-24 18:31:08 +02:00
Levi Neely 9c007efce5 httpgw: JSON API with structured parsing and consumer-facing endpoints
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 18:30:04 +02:00
Levi Neely 1fa59b1b5d add httpgw submodule and mkfile target 2026-04-24 17:45:07 +02:00
Levi Neely dfabeab4a8 sh: fix is_idle for multi-word state values 2026-04-24 15:39:42 +02:00
Levi Neely a232925745 sh: multi-line input with C-j/C-m via readmulti 2026-04-24 15:38:38 +02:00
Levi Neely 963210ea6e scripts/s/sh: replace line with awk; remove sh.rc 2026-04-24 15:29:42 +02:00
Levi Neely 52f6226057 update core submodule 2026-04-24 14:08:09 +02:00
Levi Neely 6ab2bf7011 doc: add prompt composition observation 2026-04-24 14:04:11 +02:00
Levi Neely 379fa33935 update core submodule, sandbox config 2026-04-24 14:01:00 +02:00
Levi Neely e4b78b705a s/cleanup: kill idle sessions instead of removing done batch jobs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 09:18:31 +02:00
Levi Neely 9e26eb0375 s/b: poll for session directory after creation
FUSE entry cache may not reflect the new session directory immediately
after the write to s/new returns. Poll until it appears, mirroring the
approach in s/sh.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 09:17:41 +02:00
Levi Neely 00155f28fc s/b: write s/new as single write() to avoid partial-KV parse failure
Bash's printf builtin issues one write() syscall per call; the server
processes each write independently, so the first write (name= only)
would fail the cwd-required check. Build the full KV string first,
then write once.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 08:48:58 +02:00
Levi Neely b3e0367078 fix s/bfg and s/bbg: reference s/b not s/job
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 08:44:48 +02:00
Levi Neely 57d164310c remove batch jobs; rename spec -> cfg; s/job -> s/b, s/q -> s/bfg, s/sched -> s/bbg
Batch jobs were a front-end concern. All one-shot query workflows now
compose session primitives via s/b (engine), s/bfg (foreground), and
s/bbg (background). Parallel execution is a shell loop.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 08:42:38 +02:00
Levi Neely 14b4e5db1a core, 9p: update submodules (spec file refactor)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 07:43:17 +02:00
Levi Neely 127e518dae frontends: update to spec file; remove individual session file reads
tui/session: IsIdle reads spec and parses state= key.
scripts/s/sh, sh.rc: add spec_get helper; is_idle, /cwd, /model,
/agent, /backend read via spec_get; writes go to spec as key=value.
el/ellie.el: ellie--state reads spec with string-match on state=.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 07:43:10 +02:00
Levi Neely 908db7fbdd 9p: update submodule (batch/session dirspec docs)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 07:14:27 +02:00
Levi Neely 87ebe75c10 9p: update submodule (README docs update)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 07:06:16 +02:00
Levi Neely 68591a30e8 mkfile: install s/ scripts to scripts/s/ instead of defunct scripts/b/ 2026-04-23 23:44:25 +02:00
Levi Neely f4c340c2cb unify s/ and b/ namespaces: batch jobs now live under s/
Option C implementation: single namespace with composable file tables.
Batch jobs are sessions with a reduced file set — the directory
contents declare the capability.

- core: SessionStore absorbs BatchStore; s/new detects batch format
- 9p: /b/ removed entirely; all routing through /s/
- scripts/b/* moved to scripts/s/*; paths updated
- subagent_spawn, optimize: /b/q -> /s/q
- scripts/b/ removed
2026-04-23 18:50:05 +02:00
Levi Neely 7477a0f78d core: update submodule (RunFileStore refactor) 2026-04-23 18:20:32 +02:00