Commit Graph

80 Commits

Author SHA1 Message Date
Levi Neely 84f5d26d60 webui: chat rendering refactor + image_read PNG compression 2026-05-25 23:13:03 +02:00
lkn 0eb6cad285 add image_read tool, update core and file_read 2026-05-25 22:18:39 +02:00
Levi Neely 8fb3ce0597 fix subagent_spawn: use /bin/echo for 9P writes
Bash builtin echo/printf may split multi-line content across
multiple write syscalls, which the FUSE 9P proxy rejects.
/bin/echo (coreutils) does a single write.
2026-05-22 12:39:03 +02:00
Ollie Agent c3fab7714d docs: update filesystem descriptions to match 9P implementation
SYSTEM_PROMPT:
- Replace separate backend/model/agent/cwd files with unified cfg
- Add prompt permission note (agent can't write to own prompt)
- Add missing files: usage, cost, env
- Add missing root paths: u/, x/, tmp/
- Update operations section: use cfg and ctl properly
- Fix session creation example (printf for newlines)

ARCHITECTURE:
- Already updated in prior commit

tools/route:
- Fix backend resolution to read from cfg instead of nonexistent
  separate backend file
2026-05-20 09:53:04 +02:00
Ollie Agent 9465e2f4a8 route: per-backend tier model mapping, --backend flag
- Resolves model from OLLIE_TIER_{WORKER|EXPERT}_{backend}
- Falls back to legacy OLLIE_CASCADE_MODEL/OLLIE_ESCALATE_MODEL
- --backend flag lets orchestrator pick a different backend
- Inherits parent session's backend by default
- OLLIE_ENABLED_BACKENDS documents available backends
- README updated with tier config examples
2026-05-20 09:30:55 +02:00
Ollie Agent 4b6562b6f2 add t/route: unified dispatch with tier selection
- route --tier=worker (default): cheap model for scoped subtasks
- route --tier=expert: strong model for complex reasoning
- Orchestrator now uses route instead of cascade
- Unified prompt and callback contract for both tiers
- cascade/escalate remain available for other agents
2026-05-20 09:26:05 +02:00
Ollie Agent d28d6af23c agents: slim down configs, remove unused tools
- Remove task tools from default/coding agent prompts (planning is coding-only)
- Remove MCP server config from coding agent
- Remove env and grep tools from orchestrator allowlist
- Delete unused tool scripts: env, grep, task_add, task_check, task_clear
- Strip default agent to minimal prompt set
2026-05-20 09:14:46 +02:00
Ollie Agent 4471d25344 orchestrator/worker: relax to goal-oriented delegation
- Orchestrator: describe what, not how. Workers reason about implementation.
- cascade prompt: allow workers to read code and make decisions within scope.
- Worker identity: 'reason and complete' replaces 'execute exactly'.
- Removes over-specification pressure from orchestrator.
2026-05-20 09:10:06 +02:00
Ollie Agent 7418114e44 add escalate tools 2026-05-19 15:27:22 +02:00
Levi Neely 137d2c0e84 tools: add structured STATUS prefix signals for smaller model clarity
Addresses the loop/no-op problem where small models (e.g. devstral-small)
fail to interpret ambiguous prose output as terminal control signals.

Changes:
- file_write: prefix STATUS=done/no_change/error with STATE_CHANGED and RETRYABLE
- file_edit: same prefix scheme; also RETRYABLE=true for ambiguous match errors
- file_read: prefix STATUS=ok/empty/not_found/error to distinguish data absence from failure
- file_glob: prefix STATUS=ok/no_matches/error with MATCH_COUNT
- file_grep: prefix STATUS=ok/no_matches/error with MATCH_COUNT
- task_add: emit STATUS=ok ADDED=N TOTAL_TASKS=M
- task_check: emit STATUS=done TASK_COMPLETE=true/false REMAINING=N
- task_clear: emit STATUS=ok CLEARED=N REMAINING=N TASK_COMPLETE=true/false
- cascade: rewrite worker termination block as numbered mandatory rules;
  add explicit STATUS: error branch; clarify stop-after-write requirement
2026-05-19 10:15:08 +00:00
Ollie Agent 39b54f1571 improve system prompt 2026-05-18 22:39:07 +02:00
Ollie Agent eba9120d61 update agent/cascade models 2026-05-18 11:56:40 +02:00
Levi Neely 426e3a423b env/grep tools, orchestrator file_edit 2026-05-17 16:46:30 +02:00
Levi Neely 2b30e3cc3e add orchestrator/worker agents; update cascade defaults to deepseek v4 2026-05-17 15:04:06 +02:00
Levi Neely 6884e69995 subagent_generate: validate constraints is an array 2026-05-17 14:02:58 +02:00
Levi Neely a5efaa623f subagent_generate: rewrite as standalone Python; fix spawn header
- Eliminates inline Python-in-shell; same logic, directly inspectable.
- Fix stale Output comment in subagent_spawn header.
2026-05-17 14:01:57 +02:00
Levi Neely 36eeb38a06 subagent_spawn: only cleanup jit-* configs; fix Returns doc 2026-05-17 13:59:59 +02:00
Levi Neely 2703ea5d3f subagent_spawn: auto-cleanup JIT config; report resolved backend/model
- Remove JIT agent config from a/ after session creation (server has
  already loaded it), eliminating identity debris accumulation.
- Read actual backend/model from session cfg instead of echoing
  CLI-level defaults.
- Remove manual cleanup instruction from prompt (now automatic).
2026-05-17 13:58:41 +02:00
Levi Neely 65f7bc3bd9 subagent_spawn: exponential backoff, structured output; fix stale docs
- Replace 5s/50ms poll with exponential backoff (~25s total)
- Output structured KV (session, path, backend, model) like cascade
- subagent_generate: remove stale result_path from header, document arg input
- Soften 'always use pipeline' to guidance matching actual behavior
2026-05-17 13:57:10 +02:00
Levi Neely bf91cab41c subagent_generate: accept JSON as arg; remove all escaping from prompt examples 2026-05-17 13:54:38 +02:00
Levi Neely 2516209acc subagent_spawn: read agent name from stdin when piped; fix prompt to use pipe
subagent_spawn now reads the agent name from stdin (first line) when
-agent flag is not provided and stdin is not a tty. This enables clean
pipe composition: echo JSON | subagent_generate | subagent_spawn.
2026-05-17 13:49:55 +02:00
Levi Neely e4608b09aa cascade: fail fast without OLLIE_SESSION_ID; structured output record 2026-05-17 13:28:21 +02:00
Levi Neely c1857f8545 cascade: include hostname in session ID to avoid collisions on shared mounts 2026-05-17 13:20:24 +02:00
Levi Neely 033df45ef9 cascade: exponential backoff for session readiness poll 2026-05-17 13:19:50 +02:00
Levi Neely b4be3a01d9 add cascade tool and script-driven orchestrator
tools/cascade: fire-and-forget delegation to cheap model; worker
reports back to parent prompt when done. Parallelizable.

scripts/u/cascade: script-driven hub-and-spoke orchestrator for
terminal use — planner decomposes, workers execute in parallel,
planner synthesizes.
2026-05-17 13:16:18 +02:00
Levi Neely 7ae8b69ec9 tools: per-tool semantic truncation (file_grep 50, lsp_references 50, memory_recall 10/50, file_read 500) 2026-05-17 12:51:49 +02:00
Levi Neely c2f8eb29a6 tools: annotate file_read and memory_recall as cold-tier 2026-05-17 10:59:18 +02:00
Levi Neely 3eb5152ded remove result_path — redundant with parent_session_id header 2026-05-17 10:34:35 +02:00
Levi Neely 9c0d22960b subagent_spawn: inject parent plan as context header 2026-05-17 10:26:57 +02:00
Levi Neely 5f0e25bd1d subagent_generate: structured identity envelope (role, roster, protocol, constraints) 2026-05-17 10:26:22 +02:00
Levi Neely 94d8923167 prompt: tighten narration rules; file_grep: default to content mode 2026-05-16 07:37:18 +02:00
Levi Neely 9fabcb3851 tools/lsp: add parallel annotation to read-only lsp tools 2026-05-11 13:23:37 +02:00
Levi Neely e1e5538a42 tools: remove hardcoded fallback paths in memory_remember, task_check 2026-05-11 13:20:26 +02:00
Levi Neely f320979142 tools/lsp: fix _lib import path, add lsp_completion
All lsp_* scripts used OLLIE_TOOLS_PATH for sys.path which points to
the physical backing store where _lib does not exist. Changed to use
$OLLIE/t (the FUSE mount) where _lib actually lives.

Also added lsp_completion script and textDocument/completion support
in the LSP bridge.
2026-05-11 13:19:02 +02:00
Levi Neely d7a6d7b8c3 file_read: remove max size limit, use islice for streaming reads
The 8MB size check caused models to fall back to cat which reads the
entire file without truncation. Now uses itertools.islice to read only
the requested segment without loading the whole file into memory.

Also: sandbox config additions (pcfs, ~/img).
2026-05-08 11:28:43 +02:00
Levi Neely 33323b275e subagent_generate: fix JIT agent system prompt
Use $OLLIE/x/prime SYSTEM_PROMPT command instead of bare token.
Wrap custom prompt in echo command since all prompt array entries
are now shell commands.
2026-05-04 11:33:36 +02:00
Levi Neely 2bbaecb531 JIT subagent generation via subagent_generate | xargs subagent_spawn
- rename agent_generate to subagent_generate
- subagent_generate reads JSON from stdin, copies default.json as base,
  replaces prompt with SYSTEM_PROMPT + identity text
- update tools-subagent.md to enforce composition pattern
- remove unused agent configs and prompts (devops, qa, reviewer,
  sysarchitect, writer)
- update agents/README.md
- update core submodule (remove stale-read pruning)
2026-05-02 13:50:52 +02:00
Levi Neely af6547eb3a subagent_spawn: use /bin/date to avoid plan9 date 2026-05-02 10:50:14 +02:00
Levi Neely bee78e308c tools: add agent_generate for JIT agent creation
New tool that generates a temporary agent config from a base agent
with custom identity text. Returns a unique agent name (jit-<hex>)
for use with subagent_spawn. Single file in a/, no p/ file needed.
2026-05-02 10:29:06 +02:00
Levi Neely 29ea11be22 lsp tool 2026-04-30 14:39:13 +02:00
Levi Neely 3fec18b780 tools: add LSP bridge and tool scripts
Adds a thin LSP bridge daemon (tools/_lib/lsp/) that manages LSP server
processes on demand, with adapters for gopls, clangd, and intelephense.

Tool scripts:
- lsp_definition: go to definition
- lsp_references: find all references
- lsp_hover: type/doc info
- lsp_rename: rename symbol (applies edits directly)
- lsp_symbols: document/workspace symbols
- lsp_diagnostics: errors and warnings
2026-04-30 11:12:31 +02:00
Levi Neely 03f661c0a6 subagent_spawn: use __ separator for parent prefix 2026-04-29 18:21:52 +02:00
Levi Neely 993097ef6f subagent: fire-and-forget spawn, auto-inject parent/session IDs, env file
subagent_spawn rewritten: creates session, submits prompt, returns
immediately. Auto-prefixes session name with parent ID for uniqueness.
Injects [parent_session_id] and [session_id] headers into every prompt.

New read-only env file in session namespace exposes OLLIE_ vars.
TUI background-tails chat file for async output.
Updated SYSTEM_PROMPT.md and tools-subagent.md.
2026-04-26 22:19:06 +02:00
Levi Neely b33a411427 subagent: add -name flag, document roster convention
subagent_spawn now passes -name through to b, letting the parent assign
predictable session IDs. Updated coordination docs: parent passes full
peer roster in seeding prompts, names prefixed with parent session ID
for global uniqueness. Noted silent failure on duplicate names.
2026-04-26 20:34:27 +02:00
Levi Neely 2f9e392320 restore reasoning_think tool and prompt
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 19:07:13 +02:00
Levi Neely e4c76603ba remove reasoning_think tool and prompt
Backend now streams native thinking tokens via StreamEvent.Reasoning.
The no-op scratchpad tool is redundant.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 19:04:03 +02:00
Levi Neely d9e9ca1b52 file tools: simplify to read/edit/write without sentinel machinery
system prompt: require task list for multi-step work
agents: remove preTurn hook; rely on agentSpawn prime + system prompt
backend: require OLLIE_BACKEND/OLLIE_MODEL env vars

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 18:29:18 +02:00
Levi Neely b5a0765fc1 tools/agents: skip blank task_add args; remind task_check when plan has open tasks
preTurn now has two branches: no plan → remind task_add; open tasks → remind
task_check. Blank/whitespace-only arguments to task_add are silently skipped.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 13:26:03 +02:00
Levi Neely dcf7d4010f tools/prompts: fix task_add printf bug; point agents at t/idx for tool discovery
printf format string starting with '-' was treated as a flag; use '--' to
terminate option parsing. Agents reading individual tool scripts to understand
them should use $OLLIE/t/idx instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 13:10:36 +02:00
Levi Neely b7f6b08e6a task: session plan checklist; replace todo.sh fallback
- tools/task_add, task_check, task_clear: manage s/{sid}/plan markdown checklist
- prompts/tools-task.md: agent command reference, injected at spawn via prime tools-task
- agents: add 'prime tools-task' to agentSpawn in all configs
- scripts/x/task: show_plan() on 'task list'; drop todo.sh fallback (wrong tool)
- prompts/tools-todosh.md: removed (no longer needed)
- prompts/tools-subagent.md: add coordination model documentation
- core: update submodule ref (s/{sid}/plan 9p endpoint)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 12:30:14 +02:00