Commit Graph

79 Commits

Author SHA1 Message Date
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 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
Ollie Agent b01dbdfba8 sandbox: single config, no named profiles
Removed the named sandbox concept. One config file: sandbox.yaml
(installed to ~/.config/ollie/sandbox.yaml). Removed sandbox-remote.yaml,
moved restricted.yaml to doc/ as a sample. Removed the 'sandbox' arg
from tool dispatch.
2026-08-11 21:23:23 +02:00
Levi Neely be4f6aaf09 feat: add tools file to agent namespace
Add /session/{sid}/agent/{aid}/tools file:
- Read: list loaded tools for this agent
- Write: load a tool by name

Also add missing tool_load to justfile install.
2026-08-10 20:29:04 +02:00
Levi Neely 0ed0c30e18 fix: update justfile paths after package refactor 2026-08-10 20:18:34 +02:00
Levi Neely 1cd158926a rename ollie-remote to toolsrv
- cmd/ollie-remote -> cmd/toolsrv
- Update all references in toolsrv package
- Update justfile build targets
- Binary now installed as ~/.local/bin/toolsrv
2026-08-10 15:01:42 +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 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
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 8093566e67 justfile: standardize all installs to ~/.local/bin
Previously, Go binaries and scripts installed to ~/bin while cmake
(KDE) installed to ~/.local/bin. This caused stale binaries in ~/bin
to shadow fresh builds since ~/bin comes first on PATH.

- Change bin variable from ~/bin to ~/.local/bin
- Add migrate-bin target to clean stale ~/bin copies
- Run migrate-bin automatically during install
2026-08-09 00:03:49 +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
Ollie Agent 5f960b56f8 justfile: remove deleted packages (detach, skills) from build/test targets 2026-08-08 16:15:21 +02:00
Ollie Agent ba740701e2 simplify prompt loading, some renames 2026-08-08 13:29:01 +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
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 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 5678ee723a remove: acme backend (cmd/Ollie)
Replaced by the 'o' command which provides a simpler interface.
2026-08-04 14:04:26 +02:00
Levi Neely a72554f9b1 remove doc/help.md: help is now generated from spec 2026-08-04 11:45:57 +02:00
Levi Neely b5c67e1a93 lib9p: shared library for 9P client operations
Go shared library (c-shared buildmode) that wraps 9fans.net/go/plan9/client.
Provides C API for persistent 9P connections, eliminating process spawn
overhead for GUI operations.

Exports: ollie9p_connect, ollie9p_read, ollie9p_write, ollie9p_rdwr,
ollie9p_ls, ollie9p_stat, ollie9p_remove, ollie9p_create, ollie9p_mkdir,
ollie9p_rename, ollie9p_close, ollie9p_last_error, ollie9p_free

Build: go build -buildmode=c-shared -o libollie9p.so
Install: just lib9p (installs to ~/.local/lib and ~/.local/include)
2026-08-03 20:04:07 +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 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 60fafd5381 remove tools/builtin/ — zero built-in tools, all tools are external scripts
With the zero-tools transition complete, the tools/builtin/ package
served no purpose — Builtins() returned nil. Removed:

- tools/builtin/builtins.go and the directory
- builtins field, WithBuiltins, Dispatch from toolsrv.Server
- Handler type from toolsrv (only used by builtins)
- OnPreDispatch/WithOnPreDispatch (dead code)
- Strict field and WithStrict (dead code, never read)
- CallTool simplified — no fallback to Dispatch
- builtin import and WithBuiltins/WithStrict calls from ollie-remote
- tools/builtin from justfile build/test targets

Updated AGENTS.md, ARCHITECTURE.md, README.md, EVOLUTION.md
2026-08-03 00:55:22 +02:00
Ollie Agent 8fba664f11 cleanup / unify toolsrv bootstrap 2026-08-02 20:08:45 +02:00
Ollie Agent e25157ffcd multiplex toolsrv, wip zero-tool server 2026-08-02 19:18:39 +02:00
Ollie Agent 1e126ce76a Replace imperative 9P filesystem with declarative EDSL
The old fs/session/ package (14 files) and cmd/olliesrv/elevate_tree.go
(imperative FileTree implementations) are gone. Replaced by a single
declarative EDSL in fs/spec.go that declares the entire 9P namespace.

cmd/olliesrv/server.go simplified from 1430 to 825 lines:
- Deleted pathType() (110 lines) — tree.Stat() now handles all path resolution
- Deleted isSessionFile(), dirMode(), filePerm() — all from tree's info
- Deleted fsRoute/routes/route/routeDir — single rootTree, no route table
- Deleted elevateTree — EDSL handles /elevate/ in spec.go
- Deleted handleWrite(), readDNS(), helpPath() — dead code
- Deleted all 5 per-fid result fields — EDSL Request handlers manage state
- Deleted all path-based intercepts in read()/write() — entry.RequestRespMode()
- Deleted all path-depth hacks in makeStat() — custom Stat() closures in EDSL
- Deleted all content-length compute logic — info.Size() from tree
- Removed imports: agent, backend, elevate, paths, toolsrv, json

New fs/ package:
- spec.go — single EDSL declaration of the entire namespace
- builder.go — BuildTree() validates and compiles spec into *Tree
- tree.go — configurable FileTree implementation
- fsnode.go — Dir(), Leaf(), TemplateDir(), NodeOption constructors
- agentfiles.go / sessionfiles.go / rootfiles.go / elevatefiles.go
  — handler implementations wired by the EDSL
- lifecycle.go — Create, Kill, Rename, Shutdown, InterruptAll
- persist.go, procfiles.go
- edsl.md — documentation of the EDSL
2026-08-02 15:22:17 +02:00
Ollie Agent 74a907d9f1 justfile: drop dbus from build/test, remove session-dbus.md install 2026-08-01 10:16:14 +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 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 0acc36abfd toolsrv: embed sandbox/default.yaml, fix lifecycle
- Embed the full sandbox/default.yaml instead of sandbox-remote.yaml
  so local ollie-remote subprocesses get proper sandbox permissions
  (DNS, git config, etc.)
- justfile copies sandbox/default.yaml temporarily during build
- Register builtins + ToolRegistry + SkillsRegistry on ollie-remote
- Pdeathsig: kernel auto-SIGTERMs children when parent dies
- Cleanup: SIGTERM → 3s grace → SIGKILL (guaranteed kill)
- Atomic counter for unique socket paths (no collisions)
2026-07-31 14:17:59 +02:00
Levi Neely 59b672966f toolsrv: unified socket-based execution
Execution is now identical for local and remote:
- Session calls Spawn()/SpawnRemote() → owns *Process with socket
- Clients call Dial(LocalAddr(socket)) → *Conn over Unix socket
- ollie-remote serves --listen mode with multi-client accept loop
- Builtins (shell, tool_load, skill_load) run in subprocess with registries

Lifecycle:
- Pdeathsig ensures children die with parent (no orphans)
- Cleanup: SIGTERM → 3s grace → SIGKILL (guaranteed)
- Socket paths use atomic counter for uniqueness
- Session Kill() closes Process

Protocol:
- Extended RPC: set_env, set_cwd, detach, list_detached, etc.
- Shell goes through builtin dispatch (parses 'cmd' field correctly)
- Streaming output via JSON-RPC notifications
2026-07-31 14:10:47 +02:00
Levi Neely d597758909 feat(ollie-remote): embed compiled LSP tools alongside scripts in build 2026-07-31 11:07:49 +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 cb5f99b332 fix ResolveTool to check OLLIE_TOOLS_PATH for variant cmd names 2026-07-30 23:40:24 +02:00
Ollie Agent 36e42057d4 justfile: rm stale files before go build (overwrite safety) 2026-07-30 22:43:03 +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 1015536f2c tools: move builtins to tools/builtin/
Prepares tools/ as the umbrella for all tool implementations:
- tools/builtin/ — in-process handlers (shell, reasoning, tool/skill registry)
- tools/lsp/ — (next) Go LSP tools with shared client library

Package rename: ollie/tools → ollie/tools/builtin
2026-07-30 22:04:32 +02:00
Ollie Agent ba8db09143 justfile: fix .meta install loop and remove dead targets
- Fix for loop: just doesn't need $$ escaping (that produces PID)
- Remove empty install-scripts and install-contrib targets
- Fold script installs into install-data
2026-07-30 21:55:21 +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
Ollie Agent ddddb1f53b remove s/, u/, x/ script namespaces and 9P backing
All session scripts (s/sh, s/b, s/bfg, s/bbg, s/ls, s/kill, s/cleanup),
utility scripts (u/optimize, u/complete, u/cascade, u/escalate), and
internal scripts (x/bd, x/prime, x/freeloader, x/task) are removed.

These are replaced by:
- generate, complete, route files (ollie-9p rdwr)
- integrated elevation broker
- D-Bus/9P session management

Also removes:
- 9P rootFileOrder entries and permission map for script files
- Script-serving catch-all in rootOpen
- prependOlliePath (no x/ scripts to shadow PATH with)

ollie-watchdog moved to contrib/scripts/ alongside ollie-remount.
2026-07-30 21:36:54 +02:00
Ollie Agent 96dc6e442b main.go for olliesrv 2026-07-30 21:14:26 +02:00
Ollie Agent b2a3e7121f justfile: move install-kde* rules to kde/justfile
The install-kde and install-kde-kf5 targets are now invoked via
'just -f kde/justfile install-kde' from the install/install-kf5 recipes.
Removed the standalone install-kde* targets from the root justfile.
2026-07-30 20:44:31 +02:00
Ollie Agent d6544ba892 fix justfiles: quote echo args with parens, remove stale cd kde
- KDE justfile: quote @echo arguments containing parentheses (sh syntax)
- KDE justfile: remove 'cd kde &&' prefix from cmake commands (already
  running from kde/ directory when invoked via just -f)
- Root justfile: quote all @echo arguments with parentheses
- KDE justfile: fix cmake install prefix and j*(nproc) typo
2026-07-30 20:43:08 +02:00
Ollie Agent ea3db9eb08 remove httpgw and webui; update AGENTS.md to reflect current structure
- Remove cmd/ollie-httpgw/ directory and webui/ submodule
- Update justfile: remove httpgw/webui build targets
- Update README.md: remove httpgw/webui references
- Update doc/ARCHITECTURE.md: remove httpgw/webui references
- Update doc/EVOLUTION.md: remove httpgw/webui references
- Update doc/USAGE.md: remove httpgw/webui sections
- Update AGENTS.md: fix repo layout, build targets, testing, architecture
  paths, key files, adding tools/prompts, submodule workflow
2026-07-30 20:19:32 +02:00
Ollie Agent 33030053ef split KDE and webui into submodule justfiles
- Create kde/justfile with build, install, clean, uninstall targets
- Create webui/justfile with build target
- Root justfile delegates to submodule justfiles via `just -f`
- Remove inlined KDE commands from root justfile
2026-07-30 19:18:28 +02:00
Ollie Agent 619dbe555c justfile: fix indentation, update acme/scripts/ paths, remove cd core 2026-07-30 19:06:48 +02:00
Ollie Agent 4bc7a21097 flatten: fix stragglers — remote server, _lib, stray go.mod files
- Rewrite cmd/ollie-remote to use toolsrv.Server API (was using non-existent
  ollie/pkg/tools and ollie/pkg/tools/execute packages)
- Restore tools/_lib/ from pre-flatten branch (was lost in migration)
- Remove stray go.mod/go.sum from cmd/Ollie, cmd/ollie-httpgw, cmd/ollie-remote
- Update justfile: ollie-remote target copies tools from contrib/tools/
- Remove leftover root prompts/ directory
2026-07-30 19:01:36 +02:00