From 67b8544b222392d8a01847e3d34559c23fd0cd12 Mon Sep 17 00:00:00 2001 From: Claudomator Agent Date: Mon, 9 Mar 2026 04:59:39 +0000 Subject: 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 --- internal/config/config.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'internal/config') 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 } -- cgit v1.2.3