From 1cd158926a093ec9bb281dbe4f19048b798ae399 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Mon, 10 Aug 2026 15:01:42 +0200 Subject: [PATCH] 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 --- cmd/{ollie-remote => toolsrv}/.gitignore | 0 cmd/{ollie-remote => toolsrv}/main.go | 6 +++--- .../sandbox-remote.yaml | 0 cmd/{ollie-remote => toolsrv}/test/.gitignore | 0 .../test/.ollie-sandbox.yaml | 0 .../test/Containerfile | 0 cmd/{ollie-remote => toolsrv}/test/hello.go | 0 cmd/{ollie-remote => toolsrv}/test/run.sh | 0 justfile | 16 +++++++-------- toolsrv/spawn.go | 4 ++-- toolsrv/transport.go | 20 +++++++++---------- 11 files changed, 23 insertions(+), 23 deletions(-) rename cmd/{ollie-remote => toolsrv}/.gitignore (100%) rename cmd/{ollie-remote => toolsrv}/main.go (91%) rename cmd/{ollie-remote => toolsrv}/sandbox-remote.yaml (100%) rename cmd/{ollie-remote => toolsrv}/test/.gitignore (100%) rename cmd/{ollie-remote => toolsrv}/test/.ollie-sandbox.yaml (100%) rename cmd/{ollie-remote => toolsrv}/test/Containerfile (100%) rename cmd/{ollie-remote => toolsrv}/test/hello.go (100%) rename cmd/{ollie-remote => toolsrv}/test/run.sh (100%) diff --git a/cmd/ollie-remote/.gitignore b/cmd/toolsrv/.gitignore similarity index 100% rename from cmd/ollie-remote/.gitignore rename to cmd/toolsrv/.gitignore diff --git a/cmd/ollie-remote/main.go b/cmd/toolsrv/main.go similarity index 91% rename from cmd/ollie-remote/main.go rename to cmd/toolsrv/main.go index 89ebacf..5ab1f22 100644 --- a/cmd/ollie-remote/main.go +++ b/cmd/toolsrv/main.go @@ -1,4 +1,4 @@ -// ollie-remote — tool execution server. +// toolsrv — tool execution server. // // Accepts JSON-RPC 2.0 connections. Executes tool calls in a sandboxed // environment. Used both locally (spawned by olliesrv) and remotely @@ -6,7 +6,7 @@ // // Usage: // -// ollie-remote serve --cwd /path/to/project [--listen /path/to/sock] [--yolo] +// toolsrv serve --cwd /path/to/project [--listen /path/to/sock] [--yolo] // // When --listen is provided, accepts connections on a Unix socket. // Otherwise, serves a single session over stdin/stdout (bootstrap mode). @@ -33,7 +33,7 @@ var ( func main() { if len(os.Args) < 2 || os.Args[1] != "serve" { - fmt.Fprintln(os.Stderr, "usage: ollie-remote serve --cwd [--listen ]") + fmt.Fprintln(os.Stderr, "usage: toolsrv serve --cwd [--listen ]") os.Exit(1) } flag.CommandLine.Parse(os.Args[2:]) diff --git a/cmd/ollie-remote/sandbox-remote.yaml b/cmd/toolsrv/sandbox-remote.yaml similarity index 100% rename from cmd/ollie-remote/sandbox-remote.yaml rename to cmd/toolsrv/sandbox-remote.yaml diff --git a/cmd/ollie-remote/test/.gitignore b/cmd/toolsrv/test/.gitignore similarity index 100% rename from cmd/ollie-remote/test/.gitignore rename to cmd/toolsrv/test/.gitignore diff --git a/cmd/ollie-remote/test/.ollie-sandbox.yaml b/cmd/toolsrv/test/.ollie-sandbox.yaml similarity index 100% rename from cmd/ollie-remote/test/.ollie-sandbox.yaml rename to cmd/toolsrv/test/.ollie-sandbox.yaml diff --git a/cmd/ollie-remote/test/Containerfile b/cmd/toolsrv/test/Containerfile similarity index 100% rename from cmd/ollie-remote/test/Containerfile rename to cmd/toolsrv/test/Containerfile diff --git a/cmd/ollie-remote/test/hello.go b/cmd/toolsrv/test/hello.go similarity index 100% rename from cmd/ollie-remote/test/hello.go rename to cmd/toolsrv/test/hello.go diff --git a/cmd/ollie-remote/test/run.sh b/cmd/toolsrv/test/run.sh similarity index 100% rename from cmd/ollie-remote/test/run.sh rename to cmd/toolsrv/test/run.sh diff --git a/justfile b/justfile index 5830d35..6549e4b 100644 --- a/justfile +++ b/justfile @@ -22,9 +22,9 @@ kf5: build-kf5 install-kf5 # === Build targets === -build: core ninep lib9p ollie-remote lsp-tools kde +build: core ninep lib9p toolsrv lsp-tools kde -build-kf5: core ninep lib9p ollie-remote kde-kf5 +build-kf5: core ninep lib9p toolsrv kde-kf5 core: @echo === Building ollie-core === @@ -61,9 +61,9 @@ lsp-tools: go build -o {{cfg}}/tools/lsp_diagnostics ./tools/lsp/cmd/lsp_diagnostics/ install -m644 ./tools/lsp/cmd/lsp_diagnostics/lsp_diagnostics.meta {{cfg}}/tools/lsp_diagnostics.meta -ollie-remote: - @echo === Building ollie-remote === - go build -buildvcs=false -o {{bin}}/ollie-remote ./cmd/ollie-remote/ +toolsrv: + @echo === Building toolsrv === + go build -buildvcs=false -o {{bin}}/toolsrv ./cmd/toolsrv/ kde: @echo === Building ollie-kde === @@ -92,7 +92,7 @@ install-el: migrate-bin: #!/usr/bin/env sh old="$HOME/bin" - for f in olliesrv ollie-9p ollie-remote ollie-gui ollie-remount logseq-cli o; do + for f in olliesrv ollie-9p ollie-remote toolsrv ollie-gui ollie-remount logseq-cli o; do if [ -f "$old/$f" ]; then echo " removing stale $old/$f" rm -f "$old/$f" @@ -259,8 +259,8 @@ test-9p: go test ./fs/... test-remote: - @echo === Testing ollie-remote === - go build ./cmd/ollie-remote/... + @echo === Testing toolsrv === + go build ./cmd/toolsrv/... # === Clean === diff --git a/toolsrv/spawn.go b/toolsrv/spawn.go index ff2aa2a..5b1a5e9 100644 --- a/toolsrv/spawn.go +++ b/toolsrv/spawn.go @@ -23,7 +23,7 @@ func (p *Process) Close() { } } -// Spawn starts a local ollie-remote subprocess listening on a Unix socket. +// Spawn starts a local toolsrv subprocess listening on a Unix socket. // The returned Process owns the subprocess lifecycle. Callers connect // via Dial(LocalAddr(proc.Socket)). func Spawn(ctx context.Context, cwd string, opts ...Option) (*Process, error) { @@ -50,7 +50,7 @@ func Spawn(ctx context.Context, cwd string, opts ...Option) (*Process, error) { }, nil } -// SpawnRemote starts ollie-remote on a remote host via SSH, sets up Unix +// SpawnRemote starts toolsrv on a remote host via SSH, sets up Unix // socket forwarding, and returns a Process with the local forwarded socket. func SpawnRemote(ctx context.Context, cfg RemoteConfig) (*Process, error) { StreamOutput(ctx, fmt.Sprintf("[toolsrv] dialing %s (cwd: %s)...\n", cfg.SSHTarget, cfg.CWD)) diff --git a/toolsrv/transport.go b/toolsrv/transport.go index 2dcfd58..d6d400e 100644 --- a/toolsrv/transport.go +++ b/toolsrv/transport.go @@ -30,13 +30,13 @@ type transport struct { cleanup func() } -// localDial spawns ollie-remote as a local subprocess listening on a Unix +// localDial spawns toolsrv as a local subprocess listening on a Unix // socket, waits for it to be ready, and returns the socket path. func localDial(ctx context.Context, cwd string, opts ...Option) (*transport, error) { - // Bootstrap: verify ollie-remote binary is present. + // Bootstrap: verify toolsrv binary is present. binPath, err := findLocalBinary() if err != nil { - return nil, fmt.Errorf("bootstrap: ollie-remote not found") + return nil, fmt.Errorf("bootstrap: toolsrv not found") } // Verify tools directory is accessible via ToolsPath(). @@ -124,7 +124,7 @@ func localDial(ctx context.Context, cwd string, opts ...Option) (*transport, err return &transport{r: conn, w: conn, sockPath: sockPath, cleanup: cleanup}, nil } -// sshDial connects to a remote host via SSH, bootstraps ollie-remote +// sshDial connects to a remote host via SSH, bootstraps toolsrv // with --listen mode, sets up SSH Unix socket forwarding, and returns // a transport connected to the forwarded local socket. // @@ -152,7 +152,7 @@ tar xzf - -C "$CACHE_DIR" # $XDG_CONFIG_HOME/ollie resolves to it. export XDG_CONFIG_HOME="$(dirname "$CACHE_DIR")" export PATH="$CACHE_DIR/bin:$PATH" -exec "$CACHE_DIR/bin/ollie-remote" serve --cwd %s --listen %s +exec "$CACHE_DIR/bin/toolsrv" serve --cwd %s --listen %s `, shellEscape(cfg.CWD), shellEscape(remoteSock)) sshArgs := []string{ @@ -257,22 +257,22 @@ func writeTarball(w io.Writer, dir string) error { return cmd.Run() } -// findLocalBinary locates the ollie-remote binary on the local system. +// findLocalBinary locates the toolsrv binary on the local system. func findLocalBinary() (string, error) { home, _ := os.UserHomeDir() candidates := []string{ - filepath.Join(home, "bin", "ollie-remote"), - filepath.Join(home, ".local", "bin", "ollie-remote"), + filepath.Join(home, "bin", "toolsrv"), + filepath.Join(home, ".local", "bin", "toolsrv"), } for _, p := range candidates { if _, err := os.Stat(p); err == nil { return p, nil } } - if p, err := exec.LookPath("ollie-remote"); err == nil { + if p, err := exec.LookPath("toolsrv"); err == nil { return p, nil } - return "", fmt.Errorf("ollie-remote not found (checked %s)", strings.Join(candidates, ", ")) + return "", fmt.Errorf("toolsrv not found (checked %s)", strings.Join(candidates, ", ")) } // shellEscape escapes a string for safe use in a shell command.