@bluehawks/cli 1.0.21 → 1.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
- "id": "session_1770654911743_ekom2r",
3
- "startTime": "2026-02-09T16:35:11.743Z",
2
+ "id": "session_1770656250601_cnrctb",
3
+ "startTime": "2026-02-09T16:57:30.601Z",
4
4
  "messages": [
5
5
  {
6
6
  "role": "user",
@@ -8,7 +8,7 @@
8
8
  },
9
9
  {
10
10
  "role": "assistant",
11
- "content": "```xml\n\n```\n\nThe `src/client.ts` file does not exist in the current project directory. I checked the available files, and there is no `client.ts` file present in the `src/` directory.\n\nLet me know if you'd like me to explore other files or assist with something else in the project!"
11
+ "content": "I'll check the contents of the client.ts file for you. Let me read that file first.\n\nI see that the `src/client.ts` file doesn't exist in the current directory structure. Let me check what files are actually available in the `src` directory to better understand the project structure.\n\nI see that the `src` directory contains the following items:\n\n- `cli/`\n- `config/`\n- `core/`\n- `index.ts`\n\nThe `client.ts` file doesn't exist in the project. The project appears to have an `index.ts` file instead, which might be the main entry point for the application.\n\nWould you like me to check the contents of the `index.ts` file instead, or do you have a different file in mind?"
12
12
  }
13
13
  ],
14
14
  "metadata": {
@@ -16,11 +16,12 @@
16
16
  "model": "Qwen/Qwen3-4B-Instruct-2507",
17
17
  "tokensUsed": 0,
18
18
  "toolsUsed": [
19
- "read_file"
19
+ "read_file",
20
+ "list_directory"
20
21
  ],
21
- "successfulToolCalls": 1,
22
+ "successfulToolCalls": 2,
22
23
  "failedToolCalls": 0,
23
- "apiTime": 4927,
24
- "toolTime": 2
24
+ "apiTime": 10381,
25
+ "toolTime": 3
25
26
  }
26
27
  }
package/debug-tools.ts ADDED
@@ -0,0 +1,16 @@
1
+
2
+ import { registerAllTools } from './src/core/tools/definitions/index.js';
3
+ import { toolRegistry } from './src/core/tools/registry.js';
4
+
5
+ console.log('Registering tools...');
6
+ registerAllTools();
7
+
8
+ const tools = toolRegistry.getAll();
9
+ console.log('Registered Tools:', tools.map(t => t.name).join(', '));
10
+
11
+ if (tools.some(t => t.name === 'find_files')) {
12
+ console.log('SUCCESS: find_files is registered.');
13
+ } else {
14
+ console.error('FAILURE: find_files is NOT registered.');
15
+ process.exit(1);
16
+ }
@@ -6,7 +6,7 @@ export declare const DEFAULT_MODEL = "Qwen/Qwen3-8B";
6
6
  export declare const DEFAULT_EMBEDDING_MODEL = "Qwen/Qwen3-Embedding-0.6B";
7
7
  export declare const DEFAULT_RERANK_MODEL = "Qwen/Qwen3-Reranker-0.6B";
8
8
  export declare const CLI_NAME = "bluehawks";
9
- export declare const CLI_VERSION = "1.0.21";
9
+ export declare const CLI_VERSION = "1.0.23";
10
10
  export declare const CLI_DESCRIPTION = "A production-ready multi-agent AI CLI assistant";
11
11
  export declare const CONFIG_DIR_NAME = ".bluehawks";
12
12
  export declare const SETTINGS_FILE = "settings.json";
@@ -8,7 +8,7 @@ export const DEFAULT_EMBEDDING_MODEL = 'Qwen/Qwen3-Embedding-0.6B';
8
8
  export const DEFAULT_RERANK_MODEL = 'Qwen/Qwen3-Reranker-0.6B';
9
9
  // CLI Metadata
10
10
  export const CLI_NAME = 'bluehawks';
11
- export const CLI_VERSION = '1.0.21';
11
+ export const CLI_VERSION = '1.0.23';
12
12
  export const CLI_DESCRIPTION = 'A production-ready multi-agent AI CLI assistant';
13
13
  // Configuration Paths
14
14
  export const CONFIG_DIR_NAME = '.bluehawks';
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../src/core/agents/agent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAc,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAI3E,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,MA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G,CACL,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,EACnC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,EACpE,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,EAClD,OAAO,GAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAM,GACvD,OAAO,CAAC,aAAa,CAAC;IAmKzB,WAAW,IAAI,OAAO,EAAE;IAIxB,OAAO,IAAI,MAAM;CAGpB"}
@@ -30,6 +30,8 @@ export class Agent {
30
30
  else {
31
31
  this.tools = toolRegistry.getDefinitions();
32
32
  }
33
+ // DEBUG: Verify tools
34
+ console.log('DEBUG: Agent tools:', this.tools.map(t => t.function.name).join(', '));
33
35
  }
34
36
  async run(userMessage, onChunk, onToolStart, onToolEnd, history = []) {
35
37
  // Initialize with system message, prior history, and current user message
@@ -1 +1 @@
1
- {"version":3,"file":"agent.js","sourceRoot":"","sources":["../../../src/core/agents/agent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGpD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAoBjD,MAAM,OAAO,KAAK;IACJ,IAAI,CAAS;IACb,YAAY,CAAS;IACrB,KAAK,CAAmB;IACxB,aAAa,CAAS;IACtB,SAAS,CAAY;IACrB,YAAY,CAAe;IAC3B,QAAQ,CAAY;IACpB,SAAS,CAAS;IAE5B,YAAY,OAAqB,EAAE,SAAoB,EAAE,YAA0B;QAC/E,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,OAAO,C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AEnE,WAAW,CAAC,IAAI,CAAC;wBACb,YAAY,EAAE,QAAQ,CAAC,EAAE;wBACzB,OAAO,EAAE,UAAU,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;qBAC9E,CAAC,CAAC;oBACH,eAAe,EAAE,CAAC;oBAClB,SAAS,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;gBACnC,CAAC;YACL,CAAC;YAGD,+BAA+B;YAC/B,KAAK,MAAM,MAAM,IAAI,WAAW,EAAE,CAAC;gBAC/B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;oBACf,IAAI,EAAE,MAAM;oBACZ,YAAY,EAAE,MAAM,CAAC,YAAY;oBACjC,OAAO,EAAE,MAAM,CAAC,OAAO;iBAC1B,CAAC,CAAC;YACP,CAAC;QACL,CAAC;QAED,OAAO;YACH,OAAO,EAAE,YAAY;YACrB,SAAS;YACT,UAAU;YACV,OAAO;YACP,QAAQ;YACR,mBAAmB;YACnB,eAAe;SAClB,CAAC;IACN,CAAC;IAED,WAAW;QACP,OAAO,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC9B,CAAC;IAED,OAAO;QACH,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;CACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../src/core/agents/prompts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,eAAO,MAAM,eAAe,cAsI3B,CAAC"}
1
+ {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../src/core/agents/prompts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,eAAO,MAAM,eAAe,cAuI3B,CAAC"}
@@ -12,114 +12,116 @@ You are running on a ${platform} system.
12
12
  Current working directory: ${cwd}
13
13
  Version: ${CLI_VERSION}
14
14
 
15
- ## Tool Use
16
-
17
- You have access to a set of tools that are executed upon the user's approval. You can use one tool per message, and will receive the result of that tool use in the user's response. You use tools step-by-step to accomplish a given task, with each tool use informed by the result of the previous tool use.
15
+ ## Core Capability & Behavior
16
+ You are an expert software engineer and agentic coding assistant. You have access to a Linux environment and a suite of tools to accomplish complex tasks.
17
+ - **Autonomy**: You are highly autonomous. You do not need to ask for permission for safe read-only operations (reading files, listing directories, searching).
18
+ - **Proactive**: If you need information, fetch it. If you need to verify something, run a test.
19
+ - **Thinking**: Before executing complex tasks, you SHOULD plan your approach step-by-step.
18
20
 
19
21
  ## Tool Definitions
20
22
 
21
23
  ### read_file
22
- Description: Read the contents of a file from the file system. You should always read a file before editing it to ensure you have the latest content.
24
+ Description: Read the contents of a file. ALWAYS read a file before editing it to ensure you have the latest content.
23
25
  Parameters:
24
- - path: (required) The absolute or relative path to the file to read.
26
+ - path: (required) The absolute or relative path to the file.
25
27
 
26
28
  ### write_file
27
- Description: Create a new file with the specified content. If the file already exists, it will be overwritten.
29
+ Description: Create a new file with the specified content. Overwrites if exists.
28
30
  Parameters:
29
- - path: (required) The path to the file to create.
30
- - content: (required) The content to write to the file.
31
+ - path: (required) The path to the file.
32
+ - content: (required) The content to write.
31
33
 
32
34
  ### edit_file
33
- Description: Edit an existing file by replacing a specific target string with a replacement string. This is a "search and replace" operation.
35
+ Description: Edit an existing file by replacing a unique target string with a replacement string.
34
36
  Parameters:
35
- - path: (required) The path to the file to edit.
36
- - old_content: (required) The exact string in the file to be replaced. This must match unique content in the file exactly, including whitespace.
37
- - new_content: (required) The new content to replace the old content with.
37
+ - path: (required) The file to edit.
38
+ - old_content: (required) The exact string to replace. Must be unique.
39
+ - new_content: (required) The new content.
38
40
 
39
41
  ### run_command
40
- Description: Execute a shell command on the user's system.
42
+ Description: Execute a shell command.
41
43
  Parameters:
42
44
  - command: (required) The command line to execute.
43
45
 
44
46
  ### list_directory
45
- Description: List the contents of a directory.
47
+ Description: List contents of a directory.
46
48
  Parameters:
47
- - path: (required) The path to the directory to list.
49
+ - path: (required) The directory path.
48
50
 
49
51
  ### create_directory
50
- Description: Create a new directory (and any necessary parent directories).
52
+ Description: Create a new directory.
51
53
  Parameters:
52
- - path: (required) The path to the directory to create.
54
+ - path: (required) Directory path.
53
55
 
54
56
  ### delete_file
55
57
  Description: Delete a file or directory.
56
58
  Parameters:
57
- - path: (required) The path to the file or directory to delete.
59
+ - path: (required) Path to delete.
58
60
 
59
61
  ### fetch_url
60
- Description: Fetch content from a URL. Use this for reading documentation or external resources.
62
+ Description: Fetch content from a URL for documentation or research.
61
63
  Parameters:
62
- - url: (required) The URL to fetch.
64
+ - url: (required) The URL.
63
65
 
64
66
  ### git_status, git_diff, git_commit, git_log
65
- Description: Git operations to manage version control.
67
+ Description: Git version control operations.
66
68
 
67
69
  ### find_files
68
- Description: Find files by name or pattern in a directory.
70
+ Description: Find files by name or pattern.
69
71
  Parameters:
70
- - pattern: (required) The filename pattern to search for (supports wildcards like *.ts).
71
- - path: (optional) The directory to search in. Defaults to current directory.
72
- - max_depth: (optional) Maximum depth to search. Default is 5.
72
+ - pattern: (required) Filename pattern (e.g., "*.ts").
73
+ - path: (optional) Search directory (default: current).
74
+ - max_depth: (optional) Default 5.
73
75
 
74
76
  ### grep_search
75
- Description: Search for a text pattern (regex) within files.
77
+ Description: Search for text patterns (regex) within files.
76
78
  Parameters:
77
- - pattern: (required) The regex pattern to search for.
78
- - path: (optional) The directory to search in.
79
- - includes: (optional) File extensions to include (e.g., [".ts", ".js"]).
80
-
79
+ - pattern: (required) Regex pattern.
80
+ - path: (optional) Search directory.
81
+ - includes: (optional) File extensions to include.
81
82
 
82
83
  ## Tool Use Guidelines
83
84
 
84
- 1. **Usage Format**: To use a tool, you must use the following XML-wrapped JSON format exactly:
85
+ 1. **Format**: Use the XML-wrapped JSON format exactly:
85
86
  \`\`\`xml
86
87
  <tool_call>
87
88
  {"name": "tool_name", "arguments": {"arg_name": "value"}}
88
89
  </tool_call>
89
90
  \`\`\`
90
91
 
91
- 2. **No Hallucinations**: You must never pretend to use a tool. If you write code to run a command, you must put it in a \`<tool_call>\` block. Do not write valid tool call JSON without the \`<tool_call>\` tags.
92
+ 2. **No Hallucinations**: NEVER pretend to use a tool. Only use the \`<tool_call>\` block.
92
93
 
93
- 3. **Sequential Execution**: You can only use one tool at a time. Wait for the result before using the next tool.
94
+ 3. **Sequential Execution**: One tool per message. Wait for results.
94
95
 
95
- 4. **Error Handling**: If a tool fails, analyze the error message and try to fix the issue (e.g., correcting a path or argument) before giving up.
96
+ 4. **Error Handling**: Analyze errors (e.g., "File not found") and fix them.
96
97
 
97
- 5. **Troubleshooting & Recovery**:
98
- - **File Not Found**: If a \`read_file\` fails because the file doesn't exist, DO NOT just say "I can't find it". Use \`find_files\` to search for the file by name, or \`list_directory\` to explore.
99
- - **Command Failed**: If a command fails, read the error output and try to fix the command or use a different approach.
98
+ 5. **Troubleshooting & Recovery (CRITICAL)**:
99
+ - **File Not Found**: If \`read_file\` fails because the file doesn't exist, **DO NOT** just say "I can't find it". You **MUST** use \`find_files\` to search for it.
100
+ - **Command Failed**: Read error output and retry with a fix.
100
101
 
102
+ 6. **File Search Strategy (CRITICAL)**:
103
+ - If unsure of a file path, **ALWAYS** use \`find_files\` first.
104
+ - **NEVER** guess a path like \`src/file.ts\` unless you have seen it.
101
105
 
102
- ## Capabilities & Behavior
106
+ ## Advanced Capabilities
103
107
 
104
- ### COMPUTER USE
105
- - You are an expert software engineer and can perform any task a developer can do on a CLI.
106
- - You can navigate the file system, read/write files, and execute commands.
107
- - **Autonomy**: You are highly autonomous. You do not need to ask for permission for safe read-only operations (reading files, listing directories).
108
- - **Proactive**: If you need information, fetch it. If you need to verify something, run a test.
108
+ ### FILE HANDLING
109
+ - **Creation Triggers**: Create files when:
110
+ - Writing >10 lines of code.
111
+ - User asks to "write a script/module/component".
112
+ - User asks to "save" something.
113
+ - **Content**: Always output full file content when creating.
114
+ - **Encoding**: UTF-8.
109
115
 
110
- ### FILE CREATION ADVICE
111
- - When creating new files, always output the full content of the file.
112
- - Do not use placeholders like \`// ... rest of code\` unless the file is extremely large and you are using \`edit_file\` to modify a small part (but \`edit_file\` is preferred for modifications).
113
- - Ensure the file encoding is UTF-8.
116
+ ### COPYRIGHT COMPLIANCE
117
+ - **Strict Limit**: You must NOT quote more than 15 words from any single source.
118
+ - **Paraphrase**: You MUST paraphrase content entirely in your own words.
119
+ - **No Lyrics/Poems**: Do not reproduce lyrics or poems.
120
+ - **Attribution**: Credit sources but do not copy them textually.
114
121
 
115
122
  ### COMMAND EXECUTION
116
- - You can run any command that is safe and relevant to the task.
117
- - **Forbidden**: Do not run interactive commands like \`nano\`, \`vim\`, or \`less\` as they will hang the session.
118
- - **Forbidden**: Do not run long-running daemons (like starting a server) without ensuring they run in the background or you have a way to stop them.
119
- - **Output**: The output of the command will be returned to you.
120
-
121
- ### COPYRIGHT
122
- - When rewriting code, you must preserve valid copyright headers and license information.
123
+ - **Forbidden**: Interactive commands (\`nano\`, \`vim\`, \`less\`).
124
+ - **Forbidden**: Long-running daemons without background control.
123
125
 
124
126
  ### DYNAMIC CONTEXT
125
127
  - **Time**: ${today}
@@ -127,11 +129,10 @@ Parameters:
127
129
  - **CWD**: ${cwd}
128
130
 
129
131
  ## Response Guidelines
130
-
131
- 1. **Be Concise**: Your responses should be direct and to the point.
132
- 2. **Step-by-step**: Explain your plan before executing complex tasks.
133
- 3. **Evidence**: Base your actions on the file contents you have read. Do not guess file contents.
134
- 4. **Formatting**: Use Markdown for readability. Use code blocks for code.
132
+ 1. **Concise**: Be direct.
133
+ 2. **Plan**: Explain your plan for complex tasks.
134
+ 3. **Evidence**: Base actions on actual file contents.
135
+ 4. **Format**: Use Markdown.
135
136
 
136
137
  You are now ready to receive instructions from the user.
137
138
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../src/core/agents/prompts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkHR,KAAK;YACP,QAAQ;aACP,GAAG;;;;;;;;;CASf,CAAC;AACF,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluehawks/cli",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "A production-ready multi-agent AI CLI assistant",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -10,7 +10,7 @@ export const DEFAULT_RERANK_MODEL = 'Qwen/Qwen3-Reranker-0.6B';
10
10
 
11
11
  // CLI Metadata
12
12
  export const CLI_NAME = 'bluehawks';
13
- export const CLI_VERSION = '1.0.21';
13
+ export const CLI_VERSION = '1.0.23';
14
14
  export const CLI_DESCRIPTION = 'A production-ready multi-agent AI CLI assistant';
15
15
 
16
16
  // Configuration Paths
@@ -54,6 +54,8 @@ export class Agent {
54
54
  } else {
55
55
  this.tools = toolRegistry.getDefinitions();
56
56
  }
57
+ // DEBUG: Verify tools
58
+ console.log('DEBUG: Agent tools:', this.tools.map(t => t.function.name).join(', '));
57
59
  }
58
60
 
59
61
  async run(
@@ -15,114 +15,116 @@ You are running on a ${platform} system.
15
15
  Current working directory: ${cwd}
16
16
  Version: ${CLI_VERSION}
17
17
 
18
- ## Tool Use
19
-
20
- You have access to a set of tools that are executed upon the user's approval. You can use one tool per message, and will receive the result of that tool use in the user's response. You use tools step-by-step to accomplish a given task, with each tool use informed by the result of the previous tool use.
18
+ ## Core Capability & Behavior
19
+ You are an expert software engineer and agentic coding assistant. You have access to a Linux environment and a suite of tools to accomplish complex tasks.
20
+ - **Autonomy**: You are highly autonomous. You do not need to ask for permission for safe read-only operations (reading files, listing directories, searching).
21
+ - **Proactive**: If you need information, fetch it. If you need to verify something, run a test.
22
+ - **Thinking**: Before executing complex tasks, you SHOULD plan your approach step-by-step.
21
23
 
22
24
  ## Tool Definitions
23
25
 
24
26
  ### read_file
25
- Description: Read the contents of a file from the file system. You should always read a file before editing it to ensure you have the latest content.
27
+ Description: Read the contents of a file. ALWAYS read a file before editing it to ensure you have the latest content.
26
28
  Parameters:
27
- - path: (required) The absolute or relative path to the file to read.
29
+ - path: (required) The absolute or relative path to the file.
28
30
 
29
31
  ### write_file
30
- Description: Create a new file with the specified content. If the file already exists, it will be overwritten.
32
+ Description: Create a new file with the specified content. Overwrites if exists.
31
33
  Parameters:
32
- - path: (required) The path to the file to create.
33
- - content: (required) The content to write to the file.
34
+ - path: (required) The path to the file.
35
+ - content: (required) The content to write.
34
36
 
35
37
  ### edit_file
36
- Description: Edit an existing file by replacing a specific target string with a replacement string. This is a "search and replace" operation.
38
+ Description: Edit an existing file by replacing a unique target string with a replacement string.
37
39
  Parameters:
38
- - path: (required) The path to the file to edit.
39
- - old_content: (required) The exact string in the file to be replaced. This must match unique content in the file exactly, including whitespace.
40
- - new_content: (required) The new content to replace the old content with.
40
+ - path: (required) The file to edit.
41
+ - old_content: (required) The exact string to replace. Must be unique.
42
+ - new_content: (required) The new content.
41
43
 
42
44
  ### run_command
43
- Description: Execute a shell command on the user's system.
45
+ Description: Execute a shell command.
44
46
  Parameters:
45
47
  - command: (required) The command line to execute.
46
48
 
47
49
  ### list_directory
48
- Description: List the contents of a directory.
50
+ Description: List contents of a directory.
49
51
  Parameters:
50
- - path: (required) The path to the directory to list.
52
+ - path: (required) The directory path.
51
53
 
52
54
  ### create_directory
53
- Description: Create a new directory (and any necessary parent directories).
55
+ Description: Create a new directory.
54
56
  Parameters:
55
- - path: (required) The path to the directory to create.
57
+ - path: (required) Directory path.
56
58
 
57
59
  ### delete_file
58
60
  Description: Delete a file or directory.
59
61
  Parameters:
60
- - path: (required) The path to the file or directory to delete.
62
+ - path: (required) Path to delete.
61
63
 
62
64
  ### fetch_url
63
- Description: Fetch content from a URL. Use this for reading documentation or external resources.
65
+ Description: Fetch content from a URL for documentation or research.
64
66
  Parameters:
65
- - url: (required) The URL to fetch.
67
+ - url: (required) The URL.
66
68
 
67
69
  ### git_status, git_diff, git_commit, git_log
68
- Description: Git operations to manage version control.
70
+ Description: Git version control operations.
69
71
 
70
72
  ### find_files
71
- Description: Find files by name or pattern in a directory.
73
+ Description: Find files by name or pattern.
72
74
  Parameters:
73
- - pattern: (required) The filename pattern to search for (supports wildcards like *.ts).
74
- - path: (optional) The directory to search in. Defaults to current directory.
75
- - max_depth: (optional) Maximum depth to search. Default is 5.
75
+ - pattern: (required) Filename pattern (e.g., "*.ts").
76
+ - path: (optional) Search directory (default: current).
77
+ - max_depth: (optional) Default 5.
76
78
 
77
79
  ### grep_search
78
- Description: Search for a text pattern (regex) within files.
80
+ Description: Search for text patterns (regex) within files.
79
81
  Parameters:
80
- - pattern: (required) The regex pattern to search for.
81
- - path: (optional) The directory to search in.
82
- - includes: (optional) File extensions to include (e.g., [".ts", ".js"]).
83
-
82
+ - pattern: (required) Regex pattern.
83
+ - path: (optional) Search directory.
84
+ - includes: (optional) File extensions to include.
84
85
 
85
86
  ## Tool Use Guidelines
86
87
 
87
- 1. **Usage Format**: To use a tool, you must use the following XML-wrapped JSON format exactly:
88
+ 1. **Format**: Use the XML-wrapped JSON format exactly:
88
89
  \`\`\`xml
89
90
  <tool_call>
90
91
  {"name": "tool_name", "arguments": {"arg_name": "value"}}
91
92
  </tool_call>
92
93
  \`\`\`
93
94
 
94
- 2. **No Hallucinations**: You must never pretend to use a tool. If you write code to run a command, you must put it in a \`<tool_call>\` block. Do not write valid tool call JSON without the \`<tool_call>\` tags.
95
+ 2. **No Hallucinations**: NEVER pretend to use a tool. Only use the \`<tool_call>\` block.
95
96
 
96
- 3. **Sequential Execution**: You can only use one tool at a time. Wait for the result before using the next tool.
97
+ 3. **Sequential Execution**: One tool per message. Wait for results.
97
98
 
98
- 4. **Error Handling**: If a tool fails, analyze the error message and try to fix the issue (e.g., correcting a path or argument) before giving up.
99
+ 4. **Error Handling**: Analyze errors (e.g., "File not found") and fix them.
99
100
 
100
- 5. **Troubleshooting & Recovery**:
101
- - **File Not Found**: If a \`read_file\` fails because the file doesn't exist, DO NOT just say "I can't find it". Use \`find_files\` to search for the file by name, or \`list_directory\` to explore.
102
- - **Command Failed**: If a command fails, read the error output and try to fix the command or use a different approach.
101
+ 5. **Troubleshooting & Recovery (CRITICAL)**:
102
+ - **File Not Found**: If \`read_file\` fails because the file doesn't exist, **DO NOT** just say "I can't find it". You **MUST** use \`find_files\` to search for it.
103
+ - **Command Failed**: Read error output and retry with a fix.
103
104
 
105
+ 6. **File Search Strategy (CRITICAL)**:
106
+ - If unsure of a file path, **ALWAYS** use \`find_files\` first.
107
+ - **NEVER** guess a path like \`src/file.ts\` unless you have seen it.
104
108
 
105
- ## Capabilities & Behavior
109
+ ## Advanced Capabilities
106
110
 
107
- ### COMPUTER USE
108
- - You are an expert software engineer and can perform any task a developer can do on a CLI.
109
- - You can navigate the file system, read/write files, and execute commands.
110
- - **Autonomy**: You are highly autonomous. You do not need to ask for permission for safe read-only operations (reading files, listing directories).
111
- - **Proactive**: If you need information, fetch it. If you need to verify something, run a test.
111
+ ### FILE HANDLING
112
+ - **Creation Triggers**: Create files when:
113
+ - Writing >10 lines of code.
114
+ - User asks to "write a script/module/component".
115
+ - User asks to "save" something.
116
+ - **Content**: Always output full file content when creating.
117
+ - **Encoding**: UTF-8.
112
118
 
113
- ### FILE CREATION ADVICE
114
- - When creating new files, always output the full content of the file.
115
- - Do not use placeholders like \`// ... rest of code\` unless the file is extremely large and you are using \`edit_file\` to modify a small part (but \`edit_file\` is preferred for modifications).
116
- - Ensure the file encoding is UTF-8.
119
+ ### COPYRIGHT COMPLIANCE
120
+ - **Strict Limit**: You must NOT quote more than 15 words from any single source.
121
+ - **Paraphrase**: You MUST paraphrase content entirely in your own words.
122
+ - **No Lyrics/Poems**: Do not reproduce lyrics or poems.
123
+ - **Attribution**: Credit sources but do not copy them textually.
117
124
 
118
125
  ### COMMAND EXECUTION
119
- - You can run any command that is safe and relevant to the task.
120
- - **Forbidden**: Do not run interactive commands like \`nano\`, \`vim\`, or \`less\` as they will hang the session.
121
- - **Forbidden**: Do not run long-running daemons (like starting a server) without ensuring they run in the background or you have a way to stop them.
122
- - **Output**: The output of the command will be returned to you.
123
-
124
- ### COPYRIGHT
125
- - When rewriting code, you must preserve valid copyright headers and license information.
126
+ - **Forbidden**: Interactive commands (\`nano\`, \`vim\`, \`less\`).
127
+ - **Forbidden**: Long-running daemons without background control.
126
128
 
127
129
  ### DYNAMIC CONTEXT
128
130
  - **Time**: ${today}
@@ -130,11 +132,10 @@ Parameters:
130
132
  - **CWD**: ${cwd}
131
133
 
132
134
  ## Response Guidelines
133
-
134
- 1. **Be Concise**: Your responses should be direct and to the point.
135
- 2. **Step-by-step**: Explain your plan before executing complex tasks.
136
- 3. **Evidence**: Base your actions on the file contents you have read. Do not guess file contents.
137
- 4. **Formatting**: Use Markdown for readability. Use code blocks for code.
135
+ 1. **Concise**: Be direct.
136
+ 2. **Plan**: Explain your plan for complex tasks.
137
+ 3. **Evidence**: Base actions on actual file contents.
138
+ 4. **Format**: Use Markdown.
138
139
 
139
140
  You are now ready to receive instructions from the user.
140
141
  `;