summaryrefslogtreecommitdiff
path: root/internal/api/validate.go
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-03-08 20:16:00 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-03-08 20:16:00 +0000
commit1f36e2312d316969db65a601ac7d9793fbc3bc4c (patch)
tree1d91358beaf910df23a5bd18b9dabbc3f59d448a /internal/api/validate.go
parent9955a2f10c034dac60bc17cde6b80b432e21d9d3 (diff)
feat: rename working_dir→project_dir; git sandbox execution
- ClaudeConfig.WorkingDir → ProjectDir (json: project_dir) - UnmarshalJSON fallback reads legacy working_dir from DB records - New executions with project_dir clone into a temp sandbox via git clone --local - Non-git project_dirs get git init + initial commit before clone - After success: verify clean working tree, merge --ff-only back to project_dir, remove sandbox - On failure/BLOCKED: sandbox preserved, path included in error message - Resume executions run directly in project_dir (no re-clone) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/api/validate.go')
-rw-r--r--internal/api/validate.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/api/validate.go b/internal/api/validate.go
index d8ebde9..4b691a9 100644
--- a/internal/api/validate.go
+++ b/internal/api/validate.go
@@ -56,7 +56,7 @@ func (s *Server) handleValidateTask(w http.ResponseWriter, r *http.Request) {
Name string `json:"name"`
Claude struct {
Instructions string `json:"instructions"`
- WorkingDir string `json:"working_dir"`
+ ProjectDir string `json:"project_dir"`
AllowedTools []string `json:"allowed_tools"`
} `json:"claude"`
}
@@ -74,8 +74,8 @@ func (s *Server) handleValidateTask(w http.ResponseWriter, r *http.Request) {
}
userMsg := fmt.Sprintf("Task name: %s\n\nInstructions:\n%s", input.Name, input.Claude.Instructions)
- if input.Claude.WorkingDir != "" {
- userMsg += fmt.Sprintf("\n\nWorking directory: %s", input.Claude.WorkingDir)
+ if input.Claude.ProjectDir != "" {
+ userMsg += fmt.Sprintf("\n\nWorking directory: %s", input.Claude.ProjectDir)
}
if len(input.Claude.AllowedTools) > 0 {
userMsg += fmt.Sprintf("\n\nAllowed tools: %v", input.Claude.AllowedTools)