Commit Graph

8 Commits

Author SHA1 Message Date
Ollie Agent 3d65d787a2 elevate: broker credential support for privileged tool execution 2026-07-30 23:37:57 +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 ca8af814e9 toolsrv: conditional tool variants for heterogeneous hosts
A .meta file can now declare multiple variants, each gated by match
conditions. The first variant where all conditions pass determines the
tool's schema, documentation, and executable. If no variant matches,
the tool is hidden from the registry on that host.

Match conditions:
  binary  — exec.LookPath or absolute path stat
  file    — os.Stat (file or dir exists)
  os      — runtime.GOOS
  arch    — runtime.GOARCH
  env     — environment variable is non-empty
  nenv    — environment variable is empty

This enables network-transparent tool declarations: one .meta file
works across heterogeneous hosts (systemd vs syslog, apt vs pacman,
GUI vs headless). When ollie-remote deploys to a different machine,
tools adapt their contract to what's actually available.

No variants field = current behavior, zero breaking changes.
2026-07-30 23:13:31 +02:00
Ollie Agent 44e420fc7e toolsrv: support cmd field in .meta for external tool resolution
Tools no longer need to be co-located in $OLLIE_TOOLS_PATH. The .meta
sidecar can specify a cmd field pointing to any executable:
- Absolute path: use directly
- Bare name: resolve via $PATH

Resolution order: OLLIE_TOOLS_PATH/<name> → meta.cmd → PATH lookup.
Local wrappers always win, enabling simplified interfaces over complex
system binaries.

Rewrites doc/WRITING_TOOLS.md to document the plugin model: any
executable + .meta = tool, no source tree integration required.
2026-07-30 23:02:08 +02:00
Ollie Agent 5a84e8b326 toolsrv: fix Registry.discover() to use .meta files
The Registry had its own discover() method that still required
'ollie:prompt' in file content — the old header-based check that was
removed from DiscoverTools(). This caused tool_load to fail for ALL
tools (not just Go binaries) since .meta is now the sole metadata source.

Fix: delegate to DiscoverTools() which correctly scans .meta files.
2026-07-30 22:50:49 +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 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 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