Remove workspace-root configuration and use client run directories

This commit is contained in:
2026-10-09 00:32:00 +01:00
parent 4697bb4465
commit c5a5521015
17 changed files with 97 additions and 116 deletions
+2 -2
View File
@@ -95,8 +95,8 @@ pipelines run "bug fix" "Fix the layout" --yes --json \
--allow-tools --write-paths internal/example.go --request-key my-unique-task
```
Runs default to the current directory and latest accepted version. The server
checks allowed workspace roots, including symlink resolution. `--version` chooses
Runs default to the client's current directory and latest accepted version.
The server resolves that directory without a repository allowlist. `--version` chooses
an immutable version in JSON mode. `--yes` never grants tools implicitly.
Go-specific file editing and restricted Go shell checks remain in effect.
`--wait` polls until terminal status, returns nonzero on failure/cancellation,
+1 -1
View File
@@ -36,7 +36,7 @@ OS tools. The old managed installation helper remains only for explicit legacy
data/lifecycle access; it is not the standard installer.
Optional autostart is a separate explicit `pipelines service enable` step. It
uses the OS user manager directly, requires trusted workspace roots, supports a
uses the OS user manager directly, supports a
side-effect-free preview, and captures only documented environment settings.
Uninstallation refuses to remove binaries while its autostart definition remains;
disable the service first. Installation itself still registers or starts nothing.
+9 -9
View File
@@ -30,14 +30,15 @@ The installer does not hardcode a system destination or run sudo.
## Start explicitly
```sh
pipelines serve -workspace-root "$HOME" # foreground server; Ctrl+C stops it
pipelines serve # foreground server; Ctrl+C stops it
# In another terminal:
pipelines
```
The server listens on loopback. Limit `-workspace-root` to trusted repositories;
repeat the flag for multiple roots. Omission permits only the server's working
directory. Runtime repository requests cannot escape these roots via symlinks.
The server listens on loopback. Change into your repository and run a pipeline
there; the client sends its current directory to the server. The server's own
working directory does not restrict which repositories you can use. Model tool
permissions and approved edit paths remain separate, per-run/stage controls.
The SQLite database uses the standard user data location, honoring `XDG_DATA_HOME`
when set. On macOS it uses the user Application Support directory. `-db FILE`
@@ -51,19 +52,18 @@ Stop any existing foreground or legacy server first, then explicitly configure
the OS user service:
```sh
pipelines service enable --workspace-root "$HOME"
pipelines service enable
pipelines service status
```
This starts the server now and at subsequent logins. Linux uses
`systemctl --user`; macOS uses a LaunchAgent in your user `Library/LaunchAgents`.
There is no sudo, Docker dependency, or second supervisor. Choose a narrower root
if possible; repeat `--workspace-root` for multiple trusted directories. `--db`
There is no sudo, Docker dependency, or second supervisor. `--db`
and `--addr` select the database/listen address, just like foreground startup.
Re-run enable to update the definition and restart with the new settings.
```sh
pipelines service enable --workspace-root "$HOME/repos" --print # preview only
pipelines service enable --print # preview only
pipelines service disable # stop and remove
```
@@ -133,6 +133,6 @@ no command infers that directory from an executable location. The old
`--system-command`, provisioning, and autostart installer flags have been removed.
To migrate, stop the old server first, install normal Go binaries, and start with
`pipelines serve -db EXISTING_DATABASE -workspace-root TRUSTED_ROOT`. Keep the old
`pipelines serve -db EXISTING_DATABASE`. Keep the old
data and credentials until you have verified the new setup. There is no automatic
purge, database move, login migration, or shared OpenCode service modification.
+6
View File
@@ -31,3 +31,9 @@ files/symlinks, preview without side effects, and lifecycle calls using a mock O
manager. The installed macOS CLI's preview was validated with `plutil -lint`.
`GOOS=linux GOARCH=amd64 go build ./cmd/...` also passed. Actual launchd/systemd
registration, logout/login restart, and Linux lingering remain **not tested**.
An isolated installed-CLI check started the server in one directory and invoked
`pipelines run` from two other directories. With a mock OpenCode executable, both
runs completed and recorded/executed in the client invocation directory. The
autostart preview required no repository configuration and passed `plutil -lint`.
CLI and dashboard regression tests also check invocation-directory selection.