Skip to content
This repository was archived by the owner on Apr 27, 2026. It is now read-only.

Commit 8fdb70c

Browse files
committed
fix: Renamed Shell to Command
1 parent 8b8bae4 commit 8fdb70c

3 files changed

Lines changed: 14 additions & 13 deletions

File tree

internal/llm/system_prompt_template.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ You are an interactive CLI agent specializing in software engineering tasks. You
5050
- Use the todo tool for task tracking and progress updates.
5151
- Use sandbox and debugging tools to validate hypotheses before risky changes.
5252
- Surface uncertainties to the user rather than guessing.
53-
- Validate your changes through building / linting / testing (e.g. with Shell method in sandbox tool)
53+
- Validate your changes through building / linting / testing (e.g. with Command method in sandbox tool)
5454
- Use the parallel_tool to execute multiple tools (e.g. multiple search_files, search_file_content, read_file) concurrently.
5555
- Use the codebase_investigator tool to gather context about the codebase
5656
(only for searching and reading more files, what files are relevant for editing, where certain logic is implemented, etc.).
5757
- Try to read up documentation of libraries and APIs you're using
58-
(e.g. read files downloaded to system e.g. in node_modules or go/pkg, can be done with the context tool calls or web search tool, or Shell method in the golang sandbox)
58+
(e.g. read files downloaded to system e.g. in node_modules or go/pkg, can be done with the context tool calls or web search tool, or Command method in the golang sandbox)
5959
- At least partially read files before modifying them
6060
6161
## Task Tracking
@@ -69,7 +69,7 @@ You are an interactive CLI agent specializing in software engineering tasks. You
6969
- Creating files
7070
- Building and testing
7171
3. Draft new files
72-
4. Build and test your changes (using tool calls like 'go_sandbox' using the Shell method and 'tool_summarize')
72+
4. Build and test your changes (using tool calls like 'go_sandbox' using the Command method and 'tool_summarize')
7373
5. Give a very short explanation how the user can get started with the project
7474
- **Modify Existing Project**
7575
1. Gather context: inspect context relating to the task (with codebase investigator)
@@ -78,7 +78,7 @@ You are an interactive CLI agent specializing in software engineering tasks. You
7878
- Implementing changes
7979
- Building and testing
8080
3. Update files and create new ones
81-
4. Build and test your changes (using tool calls like 'go_sandbox' using the Shell method)
81+
4. Build and test your changes (using tool calls like 'go_sandbox' using the Command method)
8282
- Fix your changes
8383
- Rebuild and test after fixing
8484
5. Give a very short explanation what was done and how the user can test it
@@ -87,7 +87,7 @@ You are an interactive CLI agent specializing in software engineering tasks. You
8787
2. Answer the question
8888
- **Fix failing Tests or Build**
8989
1. Run tests or build (investigate what tooling is required only if necessary, otherwise the context may be sufficient)
90-
- Use the go_sandbox tool to run tests (e.g. with the Shell method)
90+
- Use the go_sandbox tool to run tests (e.g. with the Command method)
9191
- Try to extract only errors from the output with the tool_summarize and/or searching it in the go_sandbox tool
9292
2. Gather context about errors (with codebase investigator)
9393
3. If necessary, think about what are root causes for the errors and how to fix them

internal/tools/sandbox.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ func (t *SandboxTool) Description() string {
251251
b.WriteString(" }\n")
252252
b.WriteString(" ```\n\n")
253253

254-
b.WriteString("2. Shell(command []string, stdin string) (stdout string, stderr string, exitCode int)\n")
254+
b.WriteString("2. Command(command []string, stdin string) (stdout string, stderr string, exitCode int)\n")
255255
b.WriteString(" - Execute shell commands with optional stdin input\n")
256256
b.WriteString(" - Requires command authorization\n")
257257
b.WriteString(" - Pass empty string for stdin if not needed\n")
@@ -260,13 +260,13 @@ func (t *SandboxTool) Description() string {
260260
b.WriteString(" package main\n\n")
261261
b.WriteString(" import \"fmt\"\n\n")
262262
b.WriteString(" func main() {\n")
263-
b.WriteString(" out, err, code := Shell([]string{\"ls\", \"-la\"}, \"\")\n")
263+
b.WriteString(" out, err, code := Command([]string{\"ls\", \"-la\"}, \"\")\n")
264264
b.WriteString(" fmt.Printf(\"ls output: %s, stderr: %s, exit: %d\\n\", out, err, code)\n\n")
265-
b.WriteString(" out, err, code = Shell([]string{\"grep\", \"pattern\"}, \"line1\\nline2\\npattern here\\n\")\n")
265+
b.WriteString(" out, err, code = Command([]string{\"grep\", \"pattern\"}, \"line1\\nline2\\npattern here\\n\")\n")
266266
b.WriteString(" fmt.Printf(\"grep output: %s, stderr: %s, exit: %d\\n\", out, err, code)\n\n")
267-
b.WriteString(" out, err, code = Shell([]string{\"go\", \"build\", \"./cmd/statcode-ai\"}, \"\")\n")
267+
b.WriteString(" out, err, code = Command([]string{\"go\", \"build\", \"./cmd/statcode-ai\"}, \"\")\n")
268268
b.WriteString(" fmt.Printf(\"go build output: %s, stderr: %s, exit: %d\\n\", out, err, code)\n\n")
269-
b.WriteString(" _, err, code = Shell([]string{\"mkdir\", \"-p\", \"tmp/build/cache\"}, \"\")\n")
269+
b.WriteString(" _, err, code = Command([]string{\"mkdir\", \"-p\", \"tmp/build/cache\"}, \"\")\n")
270270
b.WriteString(" fmt.Printf(\"mkdir stderr: %s, exit: %d\\n\", err, code)\n")
271271
b.WriteString(" }\n")
272272
b.WriteString(" ```\n\n")
@@ -442,7 +442,7 @@ func (t *SandboxTool) Description() string {
442442
b.WriteString(")\n")
443443
b.WriteString("\n")
444444
b.WriteString("func main() {\n")
445-
b.WriteString(" stdout, stderr, code := Shell([]string{\"go\", \"build\", \"./...\"}, \"\")\n")
445+
b.WriteString(" stdout, stderr, code := Command([]string{\"go\", \"build\", \"./...\"}, \"\")\n")
446446
b.WriteString(" if err == 0 {\n")
447447
b.WriteString(" fmt.Println(\"Compiled successfully\")\n")
448448
b.WriteString(" } else {\n")
@@ -937,7 +937,7 @@ func (t *SandboxTool) executeWASM(ctx context.Context, wasmBytes []byte, sandbox
937937

938938
// Check authorization for command
939939
if adapter != nil && adapter.authorizer != nil {
940-
decision, err := adapter.Authorize(ctx, ToolNameShell, map[string]interface{}{
940+
decision, err := adapter.Authorize(ctx, ToolNameCommand, map[string]interface{}{
941941
"command": commandDisplay,
942942
"command_args": commandArgs,
943943
})
@@ -1011,7 +1011,7 @@ func (t *SandboxTool) executeWASM(ctx context.Context, wasmBytes []byte, sandbox
10111011

10121012
return int32(exitCode)
10131013
}).
1014-
Export(ToolNameShell)
1014+
Export(ToolNameCommand)
10151015

10161016
// summarize(prompt_ptr, prompt_len, text_ptr, text_len, result_ptr, result_cap) -> status_code
10171017
envBuilder.NewFunctionBuilder().

internal/tools/tool_names.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const (
77
ToolNameWriteFileDiff = "write_file_diff"
88
ToolNameWriteFileJSON = "write_file_json"
99
ToolNameShell = "shell"
10+
ToolNameCommand = "command"
1011
ToolNameStatusProgram = "status_program"
1112
ToolNameWaitProgram = "wait_program"
1213
ToolNameStopProgram = "stop_program"

0 commit comments

Comments
 (0)