diff options
| author | Claudomator Agent <agent@claudomator> | 2026-03-09 04:59:39 +0000 |
|---|---|---|
| committer | Claudomator Agent <agent@claudomator> | 2026-03-09 04:59:39 +0000 |
| commit | 67b8544b222392d8a01847e3d34559c23fd0cd12 (patch) | |
| tree | b7d27c83cac301dc9b902f3dda34d6a2a4da37d6 /internal/config | |
| parent | fc1459be18d4718f2c5f15325e1a1d07fb0b3a9e (diff) | |
api: make workspace root configurable instead of hardcoded /workspace
- Add workspaceRoot field (default "/workspace") to Server struct
- Add SetWorkspaceRoot method on Server
- Update handleListWorkspaces to use s.workspaceRoot
- Add WorkspaceRoot field to Config with default "/workspace"
- Wire cfg.WorkspaceRoot into server in serve.go
- Expose --workspace-root flag on the serve command
- Add TestListWorkspaces_UsesConfiguredRoot integration test
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/config')
| -rw-r--r-- | internal/config/config.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index d3d9d68..daf42fe 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -17,6 +17,7 @@ type Config struct { DefaultTimeout string `toml:"default_timeout"` ServerAddr string `toml:"server_addr"` WebhookURL string `toml:"webhook_url"` + WorkspaceRoot string `toml:"workspace_root"` } func Default() (*Config, error) { @@ -37,6 +38,7 @@ func Default() (*Config, error) { MaxConcurrent: 3, DefaultTimeout: "15m", ServerAddr: ":8484", + WorkspaceRoot: "/workspace", }, nil } |
