Commit Graph

334 Commits

Author SHA1 Message Date
Levi Neely af7363cb1d dbus: add remote parameter to CreateSession
The D-Bus method was missing the remote parameter that session.Manager
already supports. Add it as the 6th arg after system_prompt so frontends
can create remote execution sessions via D-Bus.
2026-07-24 11:58:01 +02:00
lkn 32abf7a00c 9p: add ListModelsByBackend D-Bus method 2026-07-21 15:32:41 +02:00
lkn 88a4119707 docs: document peer/ operations (touch/rm/write) 2026-07-21 14:57:30 +02:00
lkn 4a87d25f22 README: add tools, state, peer/, proc/ to filesystem layout 2026-07-21 14:51:18 +02:00
lkn c289f5c7fd prompts: mark 9P as preferred, D-Bus as fallback 2026-07-21 14:45:20 +02:00
lkn c7c8fd1b8b session: inject operational model into restore path
Restored sessions were calling BuildRuntime without baseLayers,
so the 9P/D-Bus operational model never appeared in the system prompt.
Now computes sysPrompt, opModel, envBlock and passes them as BaseLayers.
2026-07-21 14:40:46 +02:00
lkn 87e6c664bd dbus: add systemPrompt arg to CreateSession introspection XML 2026-07-21 14:28:06 +02:00
lkn 17f28647b8 prompts: update D-Bus operational model with all methods, signals, and examples 2026-07-21 14:10:43 +02:00
lkn 590dbb5b4a prompts: rewrite 9P operational model with complete file tree and request-response examples 2026-07-21 14:04:24 +02:00
lkn 5dd0685c10 prompts: update 9P operational model with dns-style endpoints and full file tree 2026-07-21 13:59:38 +02:00
lkn 4964369025 9p: implement /tools write→read (dns pattern) for tool prompt lookup 2026-07-21 13:55:50 +02:00
lkn fe05415ebc 9p: add /tools to root directory listing 2026-07-21 13:50:59 +02:00
lkn 035e4db4b8 add /tools synthetic file with /net/dns pattern
Read: surface listing of all tools (name + description)
Write tool name, then read: full ollie:prompt content
Subsequent read reverts to surface listing (query cleared after use)
2026-07-21 13:36:38 +02:00
lkn 686fa5d0c8 embed layered system prompt: system + operational model + environment
The preamble is now composed as:
  system_prompt + operational_model + environment + agent_prompts

- Embed SYSTEM_PROMPT.md, session-9p.md, session-dbus.md in the binary
- Render environment block at runtime with live cwd/platform/date values
- Inject operational model based on server mode (Enable9P/EnableDBus)
- Accept system_prompt= override in session creation and D-Bus CreateSession
- Agent configs no longer need to reference system/session prompt files
2026-07-21 13:06:55 +02:00
Levi Neely cad8a18950 add -no9p flag for D-Bus only mode
olliesrv now supports three operating modes:
  +9p +dbus (default): full 9P server with embedded D-Bus adapter
  +9p -dbus (-nodbus): pure 9P server, no desktop integration
  -9p +dbus (-no9p): D-Bus only, no filesystem interface

The -no9p flag gates all 9P listener setup (unix + tcp), the 9P
server instance, and per-session FUSE mounts. D-Bus becomes mandatory
in this mode (errors if session bus is unavailable). -no9p and -nodbus
are mutually exclusive.

This replaces the need for the archived standalone ollied daemon.
2026-07-21 11:40:02 +02:00
Levi Neely 21b0cf1543 9p: fix stat Length=0 for session files breaking 9pfuse reads 2026-07-20 13:36:44 +02:00
Levi Neely c4e1950f8c remote: restore sessions with remote= reconnect to remote host 2026-07-19 21:53:01 +02:00
Levi Neely 208db7ba68 streaming: handle tool streaming via empty-content start signal 2026-07-19 21:36:55 +02:00
Levi Neely 4b24b33377 streaming: tool as first-class streaming role in chat log 2026-07-19 21:25:58 +02:00
Levi Neely bba14ddcde session: pass PromptEnvExtra to AgentCoreConfig 2026-07-19 20:37:37 +02:00
Levi Neely 03a29b0877 session: pass PromptEnv to all BuildRuntime calls
Both restore and create paths now include PRIME_* env vars.
Remote path uses HostInfo; local path uses PromptEnv(cwd).
2026-07-19 20:26:52 +02:00
Levi Neely 28232fd833 remote sessions: eager dial, pass host info to prompt resolution
Dial the remote eagerly during session creation so HostInfo is available
for BuildRuntime. Pass PRIME_PLATFORM and PRIME_IS_GIT_REPO as env vars
so the system prompt reflects the remote host, not the local machine.
2026-07-19 20:17:32 +02:00
Levi Neely b95bab0ef8 fix: start FUSE mount for remote sessions
Remote sessions had no local mount because WithMount9P hooks into the
local execute.Server which does not exist for remote sessions. Start
the mount directly and tear it down on kill/shutdown.
2026-07-19 19:43:19 +02:00
Levi Neely fce23afd28 session: store remote target, expose in cfg read
The remote= field is now visible when reading s/{id}/cfg,
and stored on the Session struct for future persistence.
2026-07-19 19:10:02 +02:00
Levi Neely 4f8e0c2768 session: wire remote= config for split-brain execution
When creating a session with remote=user@host, the session manager
uses remote.Decl() instead of execute.Decl() for the tool dispatcher.
This forwards all tool calls over SSH to an ollie-remote process on
the target host.

Usage: printf "cwd=/path\nremote=user@host\n" > \$OLLIE/s/new
2026-07-19 18:57:26 +02:00
Levi Neely eaa32cd94d dbus: emit SessionCreated for restored sessions in WatchExisting
During startup, session.NewManager restores sessions and fires the
OnSessionCreated callback, but dbusAdapter is still nil at that point
so SessionCreated signals were never emitted. WatchExisting runs after
the adapter is live — emit SessionCreated there so GUI clients learn
about pre-existing sessions reliably.
2026-07-19 14:16:10 +02:00
Levi Neely 8fa630f65c share active-sessions dir with dbus backend
Both backends now use ~/.local/share/ollie/sessions/active since
they are mutually exclusive.
2026-07-19 13:27:46 +02:00
Levi Neely 29b08a87ad remove Makefile and mkfile (consolidated into root justfile) 2026-07-19 13:02:47 +02:00
Levi Neely ebc82f338b remove tools/ — now at repo root 2026-07-19 12:37:15 +02:00
Levi Neely f9a2e3249d move prompts/ and skills/ to parent repo
Prompts and skills are shared across frontends (9p, kde, dbus),
so they belong at the repo root rather than duplicated per frontend.
2026-07-19 12:07:18 +02:00
Levi Neely 0b236374c0 9p: fix prompt file permission for FUSE (0466 -> 0666) 2026-07-19 00:20:41 +02:00
Levi Neely b050ef4ab7 9p: replay last 20 messages into chat log on session restore 2026-07-19 00:10:05 +02:00
Levi Neely 3c29fb28bb autostart: run ollie-remount after 3s delay 2026-07-18 23:38:37 +02:00
Levi Neely e53cdc565c add xdg autostart desktop file for olliesrv 2026-07-18 23:37:41 +02:00
Levi Neely f630c644e1 complete: use backend.Generate instead of copilot session 2026-07-18 23:34:24 +02:00
Levi Neely b410133759 readme: document generate, route, complete endpoints (net/dns pattern) 2026-07-18 22:56:11 +02:00
Levi Neely 120a971a0b readme: use relative URLs 2026-07-18 22:41:34 +02:00
Levi Neely fea481e928 readme: move httpgw docs to httpgw/README.md 2026-07-18 22:39:34 +02:00
Levi Neely da611d3ef2 dbus: add Complete and missing session methods; readme: add -nodbus flag 2026-07-18 22:36:24 +02:00
Levi Neely 8e4c1accaa readme: document root-level endpoints (complete, generate, route, ctl, agents) 2026-07-18 22:25:26 +02:00
Levi Neely 53df31fe7e readme: remove sales pitch, keep facts 2026-07-18 22:13:57 +02:00
Levi Neely 39d14eae16 9p: -tcp implies -nodbus for remote deployments 2026-07-18 21:42:52 +02:00
Levi Neely aeb933a3c2 9p: add -nodbus flag for headless/container deployments
When running on a remote server or in a container without a D-Bus
session bus, pass -nodbus to skip the adapter entirely. Pure 9P
still works.
2026-07-18 21:40:37 +02:00
Levi Neely f065429d24 9p: add embedded D-Bus protocol adapter
Expose org.ollie.SessionManager on the session bus directly from olliesrv.
The adapter emits StateChanged, ChatUpdated, SessionCreated, SessionKilled,
SessionRenamed, ProcessDetached, and ProcessExited signals. All KDE frontends
work without ollied.

Fixes:
- ListSessions: use Manager.List() instead of broken Readdir("")
- RenameSession: delegate to Manager.RenameSession()
- WatchExisting: start signal watchers for sessions restored at startup
- Introspection XML: declare all methods and signals
2026-07-18 21:36:07 +02:00
Levi Neely 6a9ea19abe 9p: /route output uses spaces, no newlines 2026-07-18 17:15:59 +02:00
Levi Neely d33fae7946 9p: fix readDNS to consume result on read (return EOF on second read)
Previous implementation returned data forever, causing cat to loop.
Now clears the buffer after first read so subsequent reads get EOF.
2026-07-18 17:14:44 +02:00
Levi Neely ece6c19fa6 9p: fix /net/dns read pattern — ignore offset for write-then-read
Shell fd position advances after write, so the subsequent read
arrives with offset=N (write length). readDNS always serves from
offset 0, fixing empty reads from exec 3<>file; echo >&3; cat <&3.
2026-07-18 17:13:01 +02:00
Levi Neely a01891621d 9p: rebuild with fixed route classifier 2026-07-18 17:05:48 +02:00
Levi Neely f1f7afafe1 9p: delegate /generate and /route to core backend package 2026-07-18 16:59:29 +02:00
Levi Neely 6d0be8295e remove tier routing: drop route/cascade/escalate tools and prompts
/route now uses LLM-based capability classification with
OLLIE_ROUTE_MODEL_FAST and OLLIE_ROUTE_MODEL_POWER env vars.
OLLIE_TIER_* env vars are no longer used.
2026-07-18 16:55:19 +02:00