Commit Graph

227 Commits

Author SHA1 Message Date
Levi Neely 839f463536 prompts: ban pointless indirection (thin wrappers/delegations) 2026-08-14 14:48:46 +02:00
Levi Neely ab79f6edd1 agent-coding prompt: anti-defensive-coding, prefer removing code 2026-08-14 08:51:11 +02:00
Levi Neely 16e54d1f03 fix: trailing comma in agent configs (invalid JSON from sed) 2026-08-13 21:49:58 +02:00
Levi Neely a1e78bca80 remove tool_load: use ctl directly
tool_load was a built-in intercept in the agent loop — the only
'tool' that didn't run in toolsrv. Removed entirely:
- Intercept in loop.go (25 lines)
- Script + .meta in data/tools/
- autoLoad references in agent configs

Loading tools is now exclusively via ctl (which already existed):
  echo 'tool_load X' | ollie-9p write .../ctl

System prompt updated to show the ctl pattern.
2026-08-13 21:44:46 +02:00
Levi Neely 4061e494b3 remove ObserverFeed script — feed file replaces it 2026-08-13 21:10:22 +02:00
Levi Neely 0b932a60ca rename observer-feed to ObserverFeed 2026-08-13 14:55:33 +02:00
Levi Neely b9dfae0204 observer prompt: make constraints explicit and unambiguous 2026-08-13 14:28:51 +02:00
Levi Neely 81e78a952d add observer agent: read-only watcher with git-based feeder script
- observer.json: read-only tool set (file_read, file_grep, file_glob, reasoning_think)
- agent-observer.md: terse observation-only prompt
- observer-feed: polls git diff, feeds changes to agent prompt
- justfile: install new files
2026-08-13 14:28:20 +02:00
Levi Neely 6a19c135eb prompts: drop tool path from system prompt, use absolute path in copilot example 2026-08-13 12:04:52 +02:00
Levi Neely 83b0b59a0a prompts: remove /home/user path examples that bias tilde expansion
- file_grep.meta: replace /home/user/project with /abs/path
- system_prompt.md: use $XDG_CONFIG_HOME instead of ~
- agent-copilot.md: use relative path in code block example
2026-08-13 12:02:27 +02:00
Levi Neely e662d32c61 o: simplify new — only accept sname/aname syntax 2026-08-13 09:30:01 +02:00
Levi Neely 6465861908 o: accept sname/aname syntax for new command 2026-08-13 09:29:00 +02:00
Levi Neely 05770ee28b o: re-split args to handle quoted invocations from acme 2026-08-13 09:24:52 +02:00
Levi Neely 37608ab9b6 o new: ignore 'session already exists' error 2026-08-13 09:22:18 +02:00
Levi Neely bbf8176cc8 o new: use sname/aname syntax to create session+agent 2026-08-13 09:19:34 +02:00
Levi Neely 9bb3cd76b8 Remove sudo mechanism from bypass system
The sudo credential broker was never functional and added complexity
without value. This removes:

- Sudo field from bypass Request structs (broker, client, toolsrv)
- Sudo parameter from EvaluateRequest interface and implementations
- Sudo/ResetsCounter fields from MetaFile and Variant structs
- sudo: true from system_logs.meta variants
- All sudo documentation from writing-tools.md, tool-registry.md,
  core.md, evolution.md, and misc.md

Bypass remains fully functional for sandbox escapes. Tools that need
elevated privileges should handle that internally or be run manually.
2026-08-12 08:58:41 +02:00
Ollie Agent 97c208fa39 toolsrv: kill all procs on shutdown, add Pdeathsig
- KillAll(): sends SIGKILL to all running proc groups on clean shutdown
- Pdeathsig: SIGKILL ensures child procs die if toolsrv crashes
- Shell tool: use subshell + set +e for streaming without exit propagation
- Fix integration test to match new error format

This is the connection-based ownership model: toolsrv death = proc death.
The session owns the toolsrv process, so session death cascades to all procs.
2026-08-11 10:02:53 +02:00
Ollie Agent 0d1eeaa46b fix: background process lifecycle, streaming output, and connection deadlocks
- Timeout: timeout=0 means no deadline (was defaulting to 30s)
- Signal: send to process group (-pgid) not just process; SIGTERM no longer
  cancels context (only SIGKILL does); cmd.Cancel sends SIGTERM with 5s WaitDelay
- Streaming: background procs stream output in real-time via procWriter;
  shell tool no longer buffers all output into a bash variable
- Proc tree: olliesrv exposes proc/{id}/out, proc/{id}/ctl, proc/{id}/status
  as proper 9P directory (was broken flat file)
- Connection: proc handlers dial fresh toolsrv conn per request via
  Session.DialToolServer() to avoid deadlocking the agent's blocked conn
- Stat format: key=value (exited=true, exit_code=N, id=N) matching client parser
- GC: procs auto-removed 10min after LastRead (exited procs only)
- Rename: PID -> ID throughout (synthetic, not OS PID)
- Ctl commands: term (SIGTERM), kill (SIGKILL), signal <n>, dismiss
- System prompt: correct ollie-9p commands for proc management
2026-08-11 09:44:08 +02:00
Ollie Agent a098fbff0c agent: inject dispatch flags (bypass, timeout, sandbox, background) into all tool schemas
Dispatch-level flags are now injected into every tool's JSON schema
at runtime via injectDispatchFlags(). No need to declare them in
individual .meta files — they're universal.

Removed redundant declarations from shell.meta (now injected globally).
2026-08-11 08:26:14 +02:00
Ollie Agent 308ebbbd22 shell: add background flag to tool schema 2026-08-11 08:24:47 +02:00
Ollie Agent 2870da593d agent: default unset scope to global (safe by default)
Only tools that explicitly declare scope="write" get path-based
parallelism. Unset scope is now global (full barrier), avoiding the
"path is a lie" problem where a tool has a path arg but modifies
other files (e.g., lsp_rename).

Tools must opt in to parallelism:
- scope=read: never conflicts
- scope=write: conflicts on same path only
- scope=global (or unset): serialization barrier

Added scope=write to file_edit.meta and file_write.meta.
2026-08-11 07:57:22 +02:00
Ollie Agent 586edc1332 agent: replace ReadOnly with explicit scope field (read/write/global)
Rename ToolInfo.ReadOnly bool → ToolInfo.Scope string with three values:
- "read"  — path-scoped read, never conflicts (always parallel)
- "write" — path-scoped write, conflicts on same file path only
- "global" — full serialization barrier, runs alone

Tools declare scope in their .meta file. If unset, inferred from path
arg presence (write if path exists, global otherwise).

This correctly classifies lsp_rename as global (cross-file workspace
edits) despite having a path argument. The path arg in lsp_rename is
a symbol coordinate, not a resource scope.

All .meta files updated: readOnly:true → scope:read,
readOnly:false → scope:global, lsp_rename gets scope:global.
2026-08-11 07:56:00 +02:00
Levi Neely d292f2aa59 feat: make tool_load a built-in tool
tool_load must be handled specially by the agent runtime because tools
run inside toolsrv's sandbox and cannot load other tools into
themselves. The runtime now intercepts tool_load calls and directly
invokes ToolServer.LoadTool().

This is the only built-in tool - all others are external scripts.
2026-08-10 20:37:37 +02:00
Levi Neely 6c26f15840 o: support root-relative paths with leading /
Paths starting with / are treated as root-relative, ignoring
the current context prefix. This allows accessing root-level
files/directories even when in a session or agent context.

Example: o myproj/coding ls /bypass  # list root bypass/ dir
2026-08-10 13:47:10 +02:00
Levi Neely d621e7322a o: use session/agent slash syntax for context
Simplify context parsing:
- o <cmd>                   Root level
- o <session> <cmd>         Session level
- o <session>/<agent> <cmd> Agent level

The slash disambiguates between session and agent context,
eliminating the need for 'session' and 'agent' keywords.

Examples:
  o myproj ls               # session level
  o myproj/coding prompt    # agent level
2026-08-10 13:40:26 +02:00
Levi Neely 14a52236c8 o: hierarchical context selectors
Refactor o CLI to use explicit context selectors:
- o <cmd>                       Root level
- o session <sname> <cmd>       Session level
- o agent <sname> <aname> <cmd> Agent level

Environment variables $session and $agent can substitute for
positional args for backwards compatibility.

Update acme scripts to use new interface:
  o agent $OLLIE_SESSION $OLLIE_AGENT prompt
2026-08-10 13:37:29 +02:00
Levi Neely 6937dda94a acme: auto-create session/agent like kate plugin
Add acme-ollie-ensure helper that:
- Creates 'acme' session if it doesn't exist
- Creates agent named by cwd hash (like kate's approach)
- Updates agent cwd if it already exists

All acme commands now call acme-ollie-ensure before sending
prompts, so they work without manual session setup.
2026-08-10 11:37:38 +02:00
Levi Neely e667689729 Revert "acme: use o generate instead of o prompt"
This reverts commit 9d7230452c.
2026-08-10 11:36:08 +02:00
Levi Neely 9d7230452c acme: use o generate instead of o prompt
One-shot generation doesn't require session/agent context.
2026-08-10 11:33:57 +02:00
Levi Neely abbd718e6a acme: add ollie integration commands
Add acme scripts for interacting with ollie:
- AskFile: describe the current file
- Explain: explain selected code
- Document: add documentation comments
- Fix: fix selected code
- Refactor: refactor selected code
- AddTests: write unit tests for selection
- SendVerbatim: send selection as-is

Scripts use the acme 9P filesystem to read selections and pipe
prompts to ollie via 'o prompt'.

Also update justfile to install/uninstall the acme scripts.
2026-08-10 11:29:59 +02:00
Levi Neely 46524d37dd kiro: wire session CWD through to EnvState; o: add new command
- backend: add CWD field to GenerationParams for environment state
- kiro: pass session CWD to kiroCurrentEnvState instead of hardcoded '/'
- agent/runtime: set GenParams.CWD from session cwd in BuildRuntime
- o new: create sessions and agents via 9P filesystem
- o prompt: support piped stdin for non-interactive use
2026-08-10 09:10:13 +02:00
Ollie Agent 2d74ffb95e prompt audit: trim system prompt, kill dead code, improve maintainability
- System prompt: ~200 → ~80 lines (removed tool-first table, API docs,
  output protocol, dead 9P entries)
- Removed AllowTools entirely (field, RPC, configs)
- Removed PRIME_* env vars, replaced with typed struct fields
- Merged tool listing + docs into single renderTools()
- Killed BuildToolListing, changed OnToolsChanged to func() signal
- Typed Preamble.Section (compile-time safety)
- Added protocol docs on extractToolResult
- Added session/ package godoc
- Moved output protocol to per-agent prompts
- Rewrote data/agents/README.md
- Moved 7 reference docs from doc/resources/ to doc/
- Deleted PromptEnv() dead function
2026-08-09 14:13:52 +02:00
Ollie Agent 25924d0909 fs: add /help ctl command — returns command reference 2026-08-09 03:32:21 +02:00
Ollie Agent cbfc08875b fs: unify ctl — all levels use rdwrHandler + rdwrDispatch
Root, session, and agent ctl files all share the same dispatch
mechanism: rdwrHandler map → rdwrDispatch → Request (rdwr).

- ctlHandler/ctlDispatch (write-only) removed
- Root and session ctl upgraded to Request (rdwr), return 'ok'
- systemprompt moved to agent ctl command
- nopRead removed (dead)
2026-08-09 02:58:09 +02:00
Ollie Agent 993d5a812a fs: move tools to ctl commands, remove tools file
/tools        — lists loaded tools
/tool_load X  — loads a tool by name

System prompt updated to instruct the agent to use ctl for tool
management instead of writing to a tools file.
2026-08-09 02:52:06 +02:00
Ollie Agent 94088ccc94 fs: move cwd to ctl command, remove cwd file
/cwd returns current directory, /cwd X changes it (with stat check).
One fewer file in the agent namespace.
2026-08-09 02:48:50 +02:00
Ollie Agent 2561e01574 fs: move per-agent models to ctl command, remove models file
/models now lists available models for the agent's backend via ctl.
One fewer file in the agent namespace. The root-level models file
(all backends) remains unchanged.
2026-08-09 02:47:26 +02:00
Ollie Agent c05f4d1ef0 fs: agent ctl becomes rdwr (request-response)
The ctl file is now a Request handler: write a command, read the
response. Commands with no args return current state:

  /model        → prints current model
  /agent        → prints current profile
  /cwd          → prints working directory
  /name         → prints agent name
  /model X      → switches model, returns new model
  /compact      → compacts, returns 'ok'

o ctl now uses 'ollie-9p rdwr' to get the response.
This enables /model (no args) to show the current model from
any frontend.
2026-08-09 02:44:21 +02:00
Ollie Agent a4e5f7c9c5 unify commands: / == o ctl, all operations are ctl commands
The slash prefix in prompts now routes directly to the agent's ctl
file. No special-cased commands in the agent — the ctl handler is the
single command surface:

  /stop, /compact, /clear, /model X, /inject X, /agent X, /cwd X

New ctl commands:
  inject <text>  — overwrites any pending inject (replaces /i and /irw)
  agent <name>   — switch agent profile (moved from commands.go)

Agent methods added: Compact(), Clear(), SwitchProfile() — called by
the ctl handler, testable independently.

HandleCommand is now a thin trampoline: strip /, run 'o ctl <rest>'.
commands.go reduced from 155 to 50 lines.

REPL: / → o ctl, !q/!quit → exit TUI.
2026-08-09 02:40:48 +02:00
Ollie Agent 1bc438771f agent: replace 12 slash commands with ! prefix
! runs 'o' with session/agent context, giving access to the entire
namespace from any frontend (TUI, GUI, Emacs). Examples:
  !ctl compact       — compact context
  !ctl stop          — stop agent
  !read stats        — show usage/cost/ctxsz
  !read models       — list models

Kept: /i (inject mid-turn), /irw (rewrite inject), /agent (profile switch).
Removed: /backend, /models, /model, /maxsteps, /agents, /compact,
/context, /cost, /usage, /history, /clear, /sp.

Also simplified the o prompt REPL: slash commands reduced to /i and
/quit. Everything else via !<cmd>.

Dead code removed: contextDebug() in history.go.
2026-08-09 02:33:03 +02:00
Ollie Agent c7aea0db59 rename elevate→bypass throughout
The sandbox escape mechanism is a bypass, not privilege elevation.
The old name caused the agent to confuse it with sudo.

- elevate/ → bypass/ (package, types, tests)
- elevate_notify.go → bypass_notify.go
- Namespace: /elevate → /bypass, session/*/elevate → session/*/bypass
- Tool arg: "elevated" → "bypass"
- Env: OLLIE_ELEVATE_SOCKET → OLLIE_BYPASS_SOCKET
- File: elevate-policy.yaml → bypass-policy.yaml
- All docs, prompts, and scripts updated
2026-08-09 02:22:39 +02:00
Ollie Agent d1907adfae o script: audit cleanup
- Merge readloop into read -l (loop mode)
- Remove chatstream command (TUI uses 'o read chat' directly)
- Rework ctl: o ctl <cmd> [session] [agent] — dispatches to
  session ctl for kill/pause/resume, agent ctl for the rest
- Add trap EXIT to kill background statewait loop (fixes zombie)
- Remove -1 compatibility flag from generate
- Remove no-op bracketed paste bind from prompt REPL
- Fix /i help text: 'inject prompt (mid-turn or queued)'
- Update all help text to reflect current commands
2026-08-09 02:15:48 +02:00
Ollie Agent 49c93eab5f remove usage_log.go (write-only telemetry), clean AGENT_FILES
- Delete agent/usage_log.go — wrote JSONL to disk but nothing read it
- Remove appendUsageLog call from turn.go
- Remove dead 'offset' from AGENT_FILES tab-completion list
- TUI: grep markers+fences from o log (single read, not streaming)
2026-08-09 02:03:51 +02:00
Ollie Agent 72db6d900d fs: namespace cleanup — merge and remove dead files
- fifo.in + fifo.out → single fifo (write enqueues, read dequeues)
- cost + usage + ctxsz → single stats (key=value lines)
- Remove connection (no consumers, heartbeat handles it)
- Remove dead prevPrompt field and write (prompt.prev gone from spec)
- Clean AGENT_FILES: remove state, context, tail (all already absent
  from spec, were only in the tab-completion list)
2026-08-09 01:57:41 +02:00
Ollie Agent 744f775eb5 fs: split chat into chat (filtered text) and chat.raw (full markup)
chat — strips [[[...]]] markers and source fences at the byte level.
Partial lines pass through immediately for true streaming. Terminals
and text editors use this.

chat.raw — full block-structured stream with markers and fences.
GUIs that parse blocks (KDE, web) use this.

The TUI no longer pipes through grep (which was line-buffering and
killing char-by-char streaming since Aug 4).

The stripMarkers state machine processes each chunk from the server:
- Complete lines starting with [[[ and ending with ]]] → dropped
- Fence lines (```...) → dropped (open toggles in-fence state)
- Partial lines (no trailing \n) → always emitted immediately
- Everything else → passed through
2026-08-09 01:43:39 +02:00
Ollie Agent 2c5444e902 o: /agent with no args shows current agent profile 2026-08-08 23:07:54 +02:00
Ollie Agent b5404fff87 o: /cwd with no args shows current working directory 2026-08-08 23:07:26 +02:00
Ollie Agent cf1866d646 o: /model and /backend with no args show current value 2026-08-08 23:04:33 +02:00
Ollie Agent 79afb09f3d o: fix /i command — was sending double-slash to prompt
$line still had the leading / from input, so echo "/$line" sent
//i ... to the agent. Use $cmd (which has the / stripped) instead.
2026-08-08 23:00:59 +02:00
Ollie Agent d596c31606 backend: move default backend selection to backends.conf
backends.conf now supports a top-level 'backend = name' line that
selects the default backend for new sessions. Lookup order:

  1. backends.conf 'backend = ...'
  2. OLLIE_BACKEND env var (fallback)
  3. session-level backend= parameter (override)

No env file needed for backend/model config anymore.
2026-08-08 22:57:37 +02:00
Ollie Agent c9df895445 data: add model field to copilot/kiro in sample backends.conf 2026-08-08 22:55:00 +02:00
Ollie Agent 2c26a7fb9c backend: add backends.conf for per-backend configuration
Each backend is now configured via ~/.config/ollie/backends.conf:

    [openrouter]
    key = sk-or-v1-...
    model = qwen/qwen3-235b-a22b

    [anthropic]
    key = sk-ant-...

Each backend knows its own default URL (openrouter → openrouter.ai/api,
anthropic → api.anthropic.com, etc). Only key and optional model needed.

Env vars (OLLIE_OPENAI_KEY, OLLIE_ANTHROPIC_KEY, etc) still work as
fallback for backward compatibility, but backends.conf is the canonical
config path going forward.

- Delete openAIName() (URL no longer determines backend identity)
- Delete geminiKey() (config handles fallback)
- Install template with mode 600 (contains API keys)
- Only install template if user hasn't created their own
2026-08-08 16:25:47 +02:00
Levi Neely 07ec63704e o prompt: drop readline for paste support
Switch from 'read -e' to plain 'read' so multi-line paste can be
captured. Readline was consuming pasted lines individually.
Increase drain timeout to 100ms.
2026-08-07 17:46:35 +02:00
Levi Neely 189ec65aae o prompt: buffer multi-line paste input
Drains additional lines within 50ms of the first line to capture
multi-line pastes in the TUI prompt.
2026-08-07 17:44:05 +02:00
Levi Neely 8397f1aa74 o: add log command, rename tail to chatstream
- Add 'o log [-n N]' to read last N lines from agent log (default 1000)
- Rename 'o tail' to 'o chatstream' for clarity
- Update TUI to show log history before streaming chat
2026-08-07 17:34:33 +02:00
Levi Neely e84b4ffef7 feat: add resetsCounter tool property to reset step budget on active progress
Tools like file_write, file_edit, and shell now reset the agent's step
counter when called successfully. This allows the agent to continue
working without hitting the soft step-budget guardrail as long as it's
making active progress (writing files, running commands) rather than
looping on research/reading.

Changes:
- Add ResetsCounter bool to ToolInfo and MetaFile structs
- Parse resetsCounter from .meta JSON files
- Reset step counter in agent loop when ResetsCounter tool succeeds
- Add resetsCounter: true to file_write, file_edit, shell
- Reduce maxSteps from 50 to 25 (resetsCounter makes this safe)
2026-08-07 17:13:14 +02:00
Ollie Agent 84b8b03dad agent: replace hardcoded model maps with models.yaml config
- Remove defaultCompactionModels map from compaction.go
- Add agent/models.go: load ~/.config/ollie/models.yaml for all backend/model settings
- Completion (Complete()) falls back to models.yaml completion section when env vars unset
- Compaction falls back to models.yaml compaction section per-backend
- Add data/configs/models.yaml.sample as reference config
- Priority chain: agent config > OLLIE_*_MODEL env > models.yaml > session model
2026-08-07 07:24:43 +02:00
Ollie Agent 06b287b8f2 remove hooks blocks and beads/freeloader refs from all agent JSON configs
- Remove "hooks" blocks from all 8 agent JSON files (copilot, default, driver, explorer, librarian, navigator, taskmanager, theo)
- Remove beads shell one-liner from prompt arrays in default.json and driver.json
- Hooks mechanism is dead code; these empty blocks are just noise
2026-08-07 07:15:04 +02:00
Ollie Agent d80a87eb86 clean up OLLIE_* env vars: replace with XDG conventions
- Remove all OLLIE_*_PATH vars (TOOLS_PATH, CFG_PATH, DATA_PATH, etc.)
  Use XDG_CONFIG_HOME/ollie/* and XDG_DATA_HOME/ollie/* instead
- Replace OLLIE_<TAG>_LOG per-component logging with single OLLIE_LOG={level}
- Replace OLLIE_USAGE_LOG with XDG_DATA_HOME-based path
- Replace OLLIE_OLLAMA_URL with standard OLLAMA_HOST (or omit entirely)
- Rename protocol markers: OLLIE_LISTEN_READY → ListenReady, OLLIE_9P_OPEN → Open
- Remove freeloader hooks from agent configs
- Update sandbox YAMLs to use XDG paths instead of OLLIE_*_PATH tokens
- Update shell tools to use $(dirname "$0") fallback instead of OLLIE_TOOLS_PATH
- Update docs and prompts accordingly
2026-08-07 07:11:53 +02:00
Levi Neely 54c6bc3ed2 update kde submodule pointer; whitespace cleanup in data/scripts/o 2026-08-06 14:06:14 +02:00
Ollie Agent fc0c368e91 Good idea fairy cleanup: ~960 lines removed
Phase 1:
- agent/hooks.go (entire hooks engine, 237 lines)
- backend/noop.go (unused test backend)
- backend/oneshot.go: Route/RouteRequest/RouteResult + /route 9P file
- cmd/ollie-9p/mount/ (FUSE mount, 336 lines)
- toolsrv/schema.go (ParseToolInfo, zero callers)
- toolsrv/discover.go: ToolPrompt/ReadTool (zero callers)
- agent/commands.go: CompactionSnapshot + history.go: PreCompactionSnapshot
- data/tools/route.meta + justfile route install

Phase 2:
- detach/process.go: stripped Signal(), Cmd field, unused imports
- SignalDetached reimplemented with syscall.Kill directly

24 files changed, 19 insertions, ~980 deletions
2026-08-05 21:51:55 +02:00
Ollie Agent 4ebcdf24b9 Remove dead data/tools/route (replaced by 9P /route file) 2026-08-05 19:45:58 +02:00
Ollie Agent 38efa3c985 Remove stale data/prompts/system_prompt.md (not embedded, not installed) 2026-08-05 19:41:52 +02:00
Ollie Agent 5584a24efb Remove tool_active/skill_active references from system prompts and core.md 2026-08-05 19:40:21 +02:00
Ollie Agent 2e14d2e93b Add o complete and o route subcommands, update table 2026-08-05 19:20:52 +02:00
Levi Neely 9e07821c26 shell: always print exit code, even on success
Ensures tool output is never blank - at minimum shows 'exit: 0'.
2026-08-05 08:25:41 +02:00
Levi Neely 1766b7c2bb remove unused session-9p.md prompt file
Not referenced by any agent config or code - dead file.
2026-08-05 08:21:33 +02:00
Levi Neely cee5e9fefe remove D-Bus session management, 9P is the only control plane
- Remove OperationalModel function and OpModel prompt layer (dead code)
- Update session-9p.md: remove D-Bus preference mention
- Update desktop file: remove X-DBUS-* entries
- Update systemd service: remove dbus.service dependency
- Rewrite route, process_output, process_signal tools to use 9P

D-Bus is still used for:
- Desktop notifications (org.freedesktop.Notifications) for elevation prompts
- KDE tools (gui_windows, etc.) talking to KWin - not ollie's D-Bus
2026-08-05 08:20:04 +02:00
Ollie Agent 3349b610ec remove remaining Reactions references from data/prompts and history.go 2026-08-04 20:22:58 +02:00
Ollie Agent 5ab073ebdb fix resolve_context unbound variable when no args 2026-08-04 19:54:48 +02:00
Ollie Agent 0694f47376 o: add trailing session/agent args to prompt, tail, stop, kill, ctl 2026-08-04 19:45:17 +02:00
Ollie Agent f1611fb50b o tui: clear prompt pane before entering REPL 2026-08-04 19:41:14 +02:00
Ollie Agent a5510a7a2b o tui: accept [session] [agent] positional args 2026-08-04 19:40:39 +02:00
Ollie Agent 1a2ad14f6b docs: replace all session/{id} and {sid} with {sname} 2026-08-04 19:30:57 +02:00
Ollie Agent 3a8e3f3c63 o prompt: add /i and /info to inspect agent state 2026-08-04 19:29:57 +02:00
Ollie Agent b939bd4c6b docs: replace all {aid} with {aname} 2026-08-04 19:29:34 +02:00
Ollie Agent 3f69427084 docs: standardize on {sname} and {aname} placeholder syntax 2026-08-04 19:29:00 +02:00
Ollie Agent 0f8cfd0c14 docs: replace agent/0 with agent/{aname} in path templates 2026-08-04 19:26:22 +02:00
Ollie Agent 8ffbf3b699 o prompt: use . as send trigger, empty lines add newlines 2026-08-04 18:56:47 +02:00
Ollie Agent 19a96ab2de o prompt: fix readline line editing with ANSI prompt
Wrap bold escape sequences in \001/\002 markers so readline
correctly tracks cursor position. Fixes Ctrl+U, Ctrl+W, and
other readline kill commands after typing several characters.
2026-08-04 18:56:19 +02:00
Ollie Agent e375126adf o tui: clear chat pane before tail 2026-08-04 18:54:16 +02:00
Ollie Agent cd18539280 o tui: add /quit and /q slash commands 2026-08-04 18:53:01 +02:00
Ollie Agent 0923633624 o tui: remove shell pane, replace state pane with tmux status bar 2026-08-04 18:52:01 +02:00
Levi Neely 0f29757dac o: add generate command for one-shot prompts
Uses /generate 9P file - no session/agent context needed.
Example: o generate 'explain monads'
2026-08-04 17:25:17 +02:00
Levi Neely 59fb7d5561 o tui: use percentage-based layout instead of fixed sizes
- Right column: 25% width
- State/shell: 50/50 split
- Prompt: 20% height
- Adapts to terminal size
2026-08-04 17:09:53 +02:00
Levi Neely 77d589f98b o tui: filter out [[[...]]] block markers from chat stream 2026-08-04 17:05:52 +02:00
Levi Neely abdc91d097 remove mount/ package references and ollie-watchdog
- mount/ package no longer exists, remove from build/test rules
- remove ollie-watchdog script (unused)
- keep ollie-remount (still needed for FUSE recovery)
2026-08-04 16:58:44 +02:00
Levi Neely 05517c384a o: simplify path resolution, remove auto-session/agent
- Remove auto-resolution of session/agent (was slow, unexpected)
- Path classification determines required context level immediately
- Errors are fast and actionable with clear fix instructions
- Root-level paths work without any context
- o env now just prints export statements without requiring context
2026-08-04 16:57:01 +02:00
Levi Neely 7189a9fc24 scripts: add 'o write' subcommand 2026-08-03 12:48:08 +02:00
Levi Neely 8bb4246cde prompts: document tool discovery in session-9p.md
- Global catalog: read /tools
- Loaded tools: read agent/tools
- Load a tool: write tool name to agent/tools
- Added tools to agent directory file table
2026-08-03 11:26:37 +02:00
Levi Neely 8f09aa2060 scripts: enable readline in prompt REPL (read -e)
Supports C-a, C-e, C-u, C-k, M-b, M-f, arrow keys, etc.
Sent prompts and slash commands are added to readline history
so up-arrow recalls previous inputs.
2026-08-03 10:09:32 +02:00
Levi Neely 62cfc06a88 scripts: rename blkread → readloop 2026-08-03 10:07:54 +02:00
Levi Neely e726599f84 scripts: add 'o blkread' — blocking read loop for statewait et al 2026-08-03 10:07:10 +02:00
Levi Neely 9c75c1b9aa scripts: fix tui shell cwd to $HOME (fixes .bashrc not found) 2026-08-03 10:04:56 +02:00
Levi Neely d693bd8071 scripts: add 'o tui exit' to kill tmux session 2026-08-03 10:03:47 +02:00
Levi Neely 30621d2ed9 scripts: add 'o kill', slash commands in prompt REPL
o kill: kills the active session.

Prompt REPL now supports slash commands:
  /stop, /compact, /kill, /clear, /model X, /backend X, /cwd X, /help

Slash commands are handled locally without sending to the agent.
2026-08-03 09:56:34 +02:00
Levi Neely ae556a2a3a scripts: add 'o tui' tmux layout and 'o stop' shorthand
o tui: launches a 4-pane tmux layout with:
  - chat stream (left, large)
  - statewait monitor (top-right, reactive)
  - spare shell with session/agent exported (bottom-right)
  - prompt REPL (bottom, full width)

o stop: shorthand for 'o ctl stop' to interrupt a running agent.
2026-08-03 09:55:06 +02:00
Levi Neely 338358fbf3 scripts: replace individual scripts with unified 'o' dispatcher
Single multi-call script with subcommands: read, ls, ctl, prompt,
tail, env. Replaces prompt, ollieread, sendctl, ollie-ls.

Features:
- Env var fallback chain: OLLIE_SESSION_ID → session → positional arg
- Auto-selects first session/agent when none specified
- Multi-line prompt mode (blank line sends)
- Uses immutable IDs in 9P paths (works with alias resolution)
- eval-able 'o env' for shell integration
2026-08-03 09:49:45 +02:00
Levi Neely 44f173214d fs: add Aliases to FsNodeDecl for immutable ID path resolution
Nodes in the 9P namespace can now declare alternate names (Aliases)
that resolve during Twalk but are invisible in directory listings.
Session dirs alias their immutable RunnableID(), agent dirs alias
their ID(). Clients can use session/{uuid}/agent/{uuid}/... paths
that remain valid across renames.

Changes:
- fs/fsnode.go: Add Aliases []string field, Alias() NodeOption
- fs/builder.go: findChild checks aliases via matchAlias helper
- fs/sessionfiles.go: Session dirs get Alias(s.RunnableID())
- fs/agentfiles.go: Agent dirs get Alias(a.ID())
- fs/spec.go: Add /aliases file (read-only alias→path table)
- fs/rootfiles.go: readAliases handler
- fs/lifecycle.go: buildIndex includes immutable ID in session/idx
- doc/edsl.md: Document Aliases field and behavior
- prompts: Update session/idx format documentation

The KDE GUI submodule now uses immutable IDs in all 9P paths,
fixing disconnected indicators after session rename.
2026-08-03 09:41:26 +02:00
Levi Neely 4094c95587 more qol utils 2026-08-03 08:57:52 +02:00
Ollie Agent 56527598d6 utils for terminal interface 2026-08-03 07:43:50 +02:00
Ollie Agent 172b093893 replace $OLLIE/help with ollie-9p read help
ollie-watchdog doesn't need a FUSE mount to probe the server.
ollie-9p speaks the 9P protocol over the Unix socket directly.
2026-08-03 01:22:31 +02:00
Ollie Agent ffccfc57f2 fix plan path: use OLLIE_UNAME via ollie-9p write
session/{id}/agent/{aid}/plan → ollie-9p write
session/$OLLIE_SESSION_ID/agent/$OLLIE_UNAME/plan

UNAME is the agent's immutable ID, matching the agent directory
name. Using ollie-9p write instead of a mounted filesystem path.
2026-08-03 01:20:50 +02:00
Ollie Agent 0cfb99a747 fix plan path: OLLIE_UNAME is the agent ID
OLLIE_AGENT_NAME doesn't exist. OLLIE_UNAME is the env
var that carries the agent's immutable ID.
2026-08-03 01:19:48 +02:00
Ollie Agent bc4c27b602 demote plan from session level to agent level
plan now lives at session/{id}/agent/{aid}/plan instead of
session/{id}/plan. Moved the Leaf declaration from fs/sessionfiles.go
to fs/agentfiles.go. Updated both prompt docs to match.
2026-08-03 01:06:16 +02:00
Ollie Agent c55615bf1b fix stale plan path: s/ → session/
/home/lkn/mnt/ollie/s/ollie/plan was leftover from an old
mount point convention. Updated to /home/lkn/mnt/ollie/session/...
2026-08-03 01:04:22 +02:00
Ollie Agent eaf0a83a57 move LSP .meta files to live alongside their Go code
Each lsp_*.meta now lives in tools/lsp/cmd/<name>/ alongside
main.go, rather than in data/tools/. The lsp-tools just target
was updated to install both the binary and its .meta sidecar.

AGENTS.md updated to document the pattern for compiled tools.
2026-08-03 01:03:27 +02:00
Ollie Agent 7beef106e0 tool_load: add dynamic tool loader with bash script
Add a tool_load tool that writes a tool name to the session's 9P
tools file via ollie-9p, enabling on-demand tool loading.

Reduce autoLoad lists in default.json and theo.json to bare
essentials — everything else is loaded via tool_load.
2026-08-03 00:15:36 +02:00
Ollie Agent d3860304af Add formatted tool output fences 2026-08-02 22:57:17 +02:00
Ollie Agent 088aa38f1c data/agents/default.json: remove hard-coded shell and reasoning_think from autoLoad
These two are built-in tools always available regardless of autoload.
No need to explicitly load them.
2026-08-02 21:16:43 +02:00
Ollie Agent e25157ffcd multiplex toolsrv, wip zero-tool server 2026-08-02 19:18:39 +02:00
Ollie Agent 4e582688ad session rename: add ollie-9p mv command, wire into KDE GUI 2026-08-01 15:46:56 +02:00
Levi Neely 5911315408 docs: remove all D-Bus references, add Phase 13 to EVOLUTION
- Delete data/prompts/session-dbus.md (obsolete operational model)
- AGENTS.md: remove dbus/ from layout, single integration surface
- ARCHITECTURE.md: remove D-Bus adapter section, embedded adapter, diagrams
- EVOLUTION.md: add Phase 13 (9P streaming, D-Bus removal), fix principles,
  add D-Bus to dead ends table
- USAGE.md: remove D-Bus reference
- session-9p.md: document chat (streaming) and log (64KB window) files
2026-07-31 20:47:15 +02:00
Levi Neely 7eb022faba remove built-in skill handlers, replace with external tools
skill_list and skill_load are now external shell scripts (data/tools/).
Removed from builtins: SkillList, SkillLoad, SkillActive.
Removed: toolsrv/skills.go, tools/builtin/skill.go, WithSkillsRegistry,
SkillsRegistry accessor, ListSkillsTools.
ollie-remote no longer initializes a skills registry.

The demarcation: built-ins mutate agent internals (tool schema, context
injection). Skills are just file reads — no special treatment needed.
2026-07-31 16:45:37 +02:00
Levi Neely 9f8a1130cf skills: replace built-in handlers with external shell scripts
skill_list and skill_load are now simple shell scripts that read
SKILL.md files from OLLIE_SKILLS_PATH. No built-in registry needed.
skill_load returns the file body as tool result (tier:hot, survives compaction).
skill_active dropped — model uses skill_list instead.
2026-07-31 16:42:49 +02:00
Levi Neely 1c7087d0bf logseq.meta: full API documentation with all commands and args 2026-07-31 15:08:46 +02:00
Levi Neely 0790dc7e4e logseq tool: use REST API instead of broken MCP endpoint
Logseq 2.0.1 has bug #12413 where POST /mcp always returns 400.
Switched to the REST API at POST /api which works correctly.
Requires OLLIE_LOGSEQ_TOKEN env var.

Commands: listPages, getPage, searchBlocks, listTags, listProperties,
upsertNodes, getCurrentGraph
2026-07-31 15:07:40 +02:00
Levi Neely c75dc6f6c7 add logseq tool: query/modify Logseq DB graph via built-in MCP server
- data/tools/logseq: Python wrapper (same pattern as atlassian_cli)
- data/tools/logseq.meta: tool metadata with full prompt
- data/scripts/logseq-cli: shell bridge using mcp-to-command + mcp-remote
- justfile: install logseq tool + logseq-cli script

Commands: listPages, getPage, searchBlocks, listTags, listProperties, upsertNodes
Transport: streamable-http to http://127.0.0.1:12315/mcp (Logseq 2 DB built-in)
2026-07-31 15:01:20 +02:00
Levi Neely 9b087f23d1 fix copilot.json: remove trailing comma 2026-07-31 14:19:58 +02:00
Ollie Agent 9abf16d75f remove SUPERPOWERD and OLLIE_TRANSCRIPT_PATH references 2026-07-31 08:40:37 +02:00
Ollie Agent 5021dedabe docs: replace /home/lkn/mnt/ollie/session/ paths with 9p commands 2026-07-31 08:36:47 +02:00
Ollie Agent cb98439339 docs: remove dead s/ls, s/kill, s/cleanup refs; fix ollie-9p remove→rm 2026-07-31 07:56:39 +02:00
Ollie Agent 855671d8ac remove dead acme scripts (Kmpl, Oi, Theo, Wtf) and stale data/scripts/README 2026-07-31 07:50:41 +02:00
Ollie Agent 5955562c1d system_logs: first variant-based tool + OR match support
Adds system_logs with two variants:
- journalctl (systemd hosts): unit, since, lines, grep
- dmesg (any Linux): source, lines, grep

Both declare sudo: true — privilege escalation is handled by dispatch.

Also adds OR support in match conditions: array values mean any must
pass. Combined with AND across keys:
  {"binary": ["journalctl", "systemd-cat"], "os": "linux"}
  = (journalctl OR systemd-cat) AND linux
2026-07-30 23:28:37 +02:00
Ollie Agent 77b4b624cf tools/lsp: port LSP tools from Python to Go
Implements a bridge daemon + client architecture in pure Go:
- tools/lsp/ — shared library (adapter registry, LSP server management,
  JSON-RPC framing, bridge daemon, client)
- tools/lsp/cmd/{lsp_definition,lsp_references,lsp_hover,lsp_rename,
  lsp_symbols,lsp_completion,lsp_diagnostics}/ — individual binaries

Each binary:
- Reads JSON args from stdin (same contract as before)
- Connects to bridge daemon over Unix socket (starts it if needed)
- Bridge manages long-lived LSP server processes (gopls, clangd, intelephense)
- Bridge auto-exits after 5min idle

Removes:
- Python LSP tool scripts (data/tools/lsp_*)
- Python LSP library (data/tools/_lib/lsp/)

Adds lsp-tools build target to justfile. The .meta sidecar files remain
in data/tools/ and are installed alongside the compiled binaries.
2026-07-30 22:10:56 +02:00
Ollie Agent 69b2c2cc40 tool metadata: replace header comment parsing with .meta sidecar files
The tool registry now reads metadata exclusively from JSON .meta sidecar
files alongside each tool executable. Header comment parsing (ollie:prompt,
ollie:tier, ollie:parallel, args_json) is removed entirely.

- Add toolsrv/meta.go: MetaFile struct, LoadMetaFile, ToolInfoFromMeta
- Rewrite discover.go: scans .meta files only
- Rewrite schema.go: ParseToolInfo reads .meta only
- Rewrite tier.go: tier/readOnly from .meta only
- Generate .meta for all 35 tools
- Update all docs: README, AGENTS.md, ARCHITECTURE, CORE, USAGE, WRITING_TOOLS
2026-07-30 21:48:42 +02:00
Ollie Agent 942cad2dee rename contrib/{prompts,scripts,services,tools,skills,agents} → data/
These are project data files, not community contributions.
contrib/elisp stays as-is.
2026-07-30 21:40:11 +02:00