Commit Graph

54 Commits

Author SHA1 Message Date
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
Ollie Agent 9b6ddb7df1 flatten: absorb submodules into single Go module
- Remove submodules: core, 9p, acme, httpgw, remote, el
- Keep submodules: kde, webui (separate build systems)
- Collapse core/ packages into root: agent/, backend/, detach/, elevate/,
  env/, log/, paths/, sandbox/, session/, skills/, tools/, toolsrv/
- Collapse 9p/ packages: fs/session/, mount/, dbus/, cmd/olliesrv/
- Move binaries: acme/ → cmd/Ollie/, httpgw/ → cmd/ollie-httpgw/,
  remote/ → cmd/ollie-remote/, 9p/cmd/ollie-9p/ → cmd/ollie-9p/
- Move data: agents/, prompts/, tools/, scripts/, skills/ → contrib/
- Move services/ → contrib/services/, experiments/ → doc/experiments/
- Delete .beads/, .claude/, .kiro
- Single go.mod at root (module ollie)
- Fix all import paths, merge fs/ + session/ packages
- Extract dbus/ and elevate/notify.go from 9p server package
- Update justfile for new paths and single-module build
2026-07-30 18:57:51 +02:00
Levi Neely a92429d973 update justfile 2026-07-30 09:26:21 +02:00
Levi Neely 70d0a22af4 user-preferences, execute_code→shell, dead scripts cleanup
- Add prompts/user-preferences.md: visual-first communication preference
  and communication style directives (moved from system_prompt.md).
- Inject user-preferences.md into all agent definitions.
- Replace all execute_code references with shell across docs, prompts,
  and agent configs.
- Remove dead u/ and x/ entries from scripts/README.md.
- Remove SYSTEM_PROMPT_QWEN systemPrompt override from navigator.
- justfile: install user-preferences.md.
2026-07-29 14:44:25 +02:00
Levi Neely af548e238a justfile: remove denote_view, add _lib/args helpers 2026-07-29 08:49:22 +02:00
Ollie Agent 2c45676de0 remove env and grep from justfile install list (deleted from tools/) 2026-07-29 00:19:52 +02:00
Ollie Agent af32aff641 delete SYSTEM_PROMPT.md, remove from justfile, update docs to reference embedded prompt 2026-07-28 23:31:10 +02:00
Ollie Agent d279aecba0 remove allowExecutors from agent JSONs, config, and execute server; remove dead prompt install lines from justfile 2026-07-28 22:38:21 +02:00
Ollie Agent 3db61a4b85 justfile: fix indentation for navigator/driver install 2026-07-27 20:39:03 +02:00
Ollie Agent 3483468369 justfile: remove stale DEVSTRAL install line 2026-07-27 20:33:24 +02:00
Ollie Agent 5db9ba85a8 justfile: update partner -> navigator, add driver 2026-07-27 20:32:48 +02:00
Levi Neely 85b860721e remove ollie-9p-mount (FUSE inlined into olliesrv) 2026-07-27 11:52:04 +02:00
Levi Neely a57d324fda justfile: build ollie-9p client binary 2026-07-27 11:45:41 +02:00
Levi Neely a8b1e7c70f elevate: integrated broker (replaces superpowerd adapter)
- core/pkg/elevate: broker engine (policy, requests, exec, streaming)
- 9p: wired into olliesrv with D-Bus notification overlay
- elevate client: now sends env in request for proper env forwarding
2026-07-27 10:44:37 +02:00
Levi Neely 62f65ff9b0 justfile: collapse 9p/dbus into default and kf5 variants 2026-07-27 08:53:25 +02:00
Ollie Agent 836201c280 service/autostart install manually 2026-07-26 11:41:58 +02:00
Ollie Agent fd27166c12 ollie: remove daemon subcommands, centralize service file management
olliesrv no longer has start/fgstart/stop/status subcommands — it runs
in the foreground and relies on the supervisor (systemd, openrc, or
xdg-autostart) for lifecycle management. This simplifies the binary
and makes the single-process model explicit.

Changes:
- All docs: olliesrv start → olliesrv
- justfile: add install-services target, used by all install recipes;
  installs systemd user unit, openrc init script, xdg autostart entry;
  remove inline autostart installs from individual targets
- systemd unit: ExecStart drops "start" subcommand
- openrc init script: deleted (was for daemonized start; now managed
  via install-services)
- xdg-autostart: new desktop entry (moved from 9p/ submodule),
  Exec=olliesrv (no longer shells out to start + remount)
- contrib/ollie-remount: add debug echo for namespace/socket
- 9p submodule: remove daemon subcommands from Go code;
  delete old desktop file
- el submodule: update README for foreground-only olliesrv
2026-07-25 18:20:26 +02:00
Ollie Agent 5e5cd8e689 prompts: remove tools-* files (now embedded in tool scripts), keep tools-core 2026-07-21 14:49:15 +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
Levi Neely 160cf1a46b kf5 corrections, remote is broken 2026-07-20 10:25:43 +02:00
Ollie Agent e71a11c237 justfile: copy tools from repo source, not installed copy 2026-07-19 20:45:44 +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 dc279aca6e justfile: add ollie-remote build/test/clean targets 2026-07-19 18:34:32 +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 64ae23603e run tests before install — fail early if tests break 2026-07-19 13:40:30 +02:00