Commit Graph

8 Commits

Author SHA1 Message Date
ollie f08e0abdf0 core: support dynamic tool registration 2026-07-28 14:13:08 +02:00
ollie 5fc7bd816e streaming: emit partial tool output via context callback 2026-07-19 21:06:13 +02:00
ollie a53d5b9618 remote: fetch host_info, inject PWD for remote prompt resolution
prompt_resolver: when cmd.Dir cannot be set (remote CWD does not exist
locally), inject PWD=cwd into subprocess env so envsubst in prime sees
the correct working directory.

remote.Server: fetch host_info RPC after connect, expose HostInfo struct
with platform, arch, is_git_repo for the session to pass to prompts.
2026-07-19 20:17:32 +02:00
ollie f19236d6df remote: SSH bootstrap with auto-deploy
Dial() now bootstraps ollie-remote on the remote host automatically:
- Computes SHA-256 of the local ollie-remote binary
- Sends a bootstrap script over SSH stdin
- If the remote has a matching cached binary, skips transfer
- Otherwise transfers gzip+base64 encoded binary
- Monitors stderr for OLLIE_LOADER_START/READY signals
- After bootstrap, stdin/stdout switch to JSON-RPC

The local binary is found at ~/bin/ollie-remote (just build output)
or ~/.local/bin/ollie-remote or PATH.
2026-07-19 19:54:57 +02:00
ollie 609e399219 remote: implement ListTools RPC and fix CallTool routing
remote.Server.ListTools() now calls the remote via a list_tools RPC
method instead of returning nil. This ensures the model receives
proper tool definitions through the API.

remote.Server.CallTool() now passes the actual tool name (execute_code,
call_tool, pipe) as the RPC method instead of hardcoding execute.
Simplified result handling since resp.Result is already json.RawMessage.
2026-07-19 19:49:31 +02:00
ollie 01e97daefc remote: parse port from user@host:port SSH target 2026-07-19 19:11:32 +02:00
ollie b218706f76 remote: use full path to ollie-remote binary
SSH non-interactive shells do not source .bashrc/.profile, so
~/.cache/ollie/bin is not in PATH. Use the full path directly.
2026-07-19 19:02:28 +02:00
ollie e468e15672 remote: add SSH-based remote execution client
Package remote provides a tools.Server implementation that forwards
tool calls to an ollie-remote process over SSH via JSON-RPC.

Key components:
- Dial(): opens SSH, launches ollie-remote, verifies with ping
- Server: implements tools.Server, forwards CallTool over RPC
- Decl(): factory compatible with tools.NewDispatcherFunc
- Config: SSH target, CWD, tools path, yolo flag

Integration: swap execute.Decl() with remote.Decl() in session
creation when remote= config is set.
2026-07-19 18:19:38 +02:00