raggiecode 0.2.1__py3-none-any.whl
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.
- Agent/__init__.py +0 -0
- Agent/agent.py +891 -0
- Agent/chat_history_db.py +1500 -0
- Agent/command.py +49 -0
- Agent/config.py +46 -0
- Agent/effort_levels.py +33 -0
- Agent/git_manager.py +727 -0
- Agent/tools.py +35 -0
- Commands/__init__.py +18 -0
- Commands/effort.py +42 -0
- Commands/global_todo.py +23 -0
- Commands/help.py +22 -0
- Commands/reasoning.py +24 -0
- Commands/redo.py +11 -0
- Commands/reindex.py +27 -0
- Commands/shell.py +28 -0
- Commands/stream.py +24 -0
- Commands/undo.py +13 -0
- Commands/unlimited_effort.py +8 -0
- Commands/window_size.py +29 -0
- RAG/__init__.py +0 -0
- RAG/document.py +119 -0
- RAG/find.py +408 -0
- RAG/graph.py +231 -0
- Tools/GetFileCodeStructure.py +43 -0
- Tools/GetSymbolSourceCode.py +27 -0
- Tools/__init__.py +39 -0
- Tools/ask_user.py +102 -0
- Tools/dispatch_subagent.py +215 -0
- Tools/document.py +35 -0
- Tools/edit_symbol.py +250 -0
- Tools/fuzzy_search.py +119 -0
- Tools/list_dir.py +51 -0
- Tools/read.py +49 -0
- Tools/read_image.py +75 -0
- Tools/remove.py +75 -0
- Tools/replace.py +305 -0
- Tools/search.py +41 -0
- Tools/shell.py +149 -0
- Tools/shell_kill.py +87 -0
- Tools/temp_background_service.py +113 -0
- Tools/todo_list.py +481 -0
- Tools/utils.py +116 -0
- Tools/view_changes.py +179 -0
- Tools/walk_call_tree.py +30 -0
- Tools/web_fetch.py +175 -0
- Tools/web_search.py +69 -0
- Tools/write.py +48 -0
- cli.py +111 -0
- config/__init__.py +0 -0
- config/coder_system_prompt.md +119 -0
- config/roles.json +43 -0
- config/tools.json +709 -0
- indexing/__init__.py +0 -0
- indexing/cli.py +128 -0
- indexing/code_index_sdk.py +832 -0
- indexing/code_indexer.py +1763 -0
- indexing/db_schema.py +396 -0
- indexing/export_to_json.py +346 -0
- indexing/extractors.py +189 -0
- indexing/file_utils.py +97 -0
- indexing/frontend/__init__.py +0 -0
- indexing/frontend/css_extractor.py +195 -0
- indexing/frontend/css_parser.py +387 -0
- indexing/frontend/css_selector_utils.py +226 -0
- indexing/frontend/edit_safety.py +573 -0
- indexing/frontend/graph.py +838 -0
- indexing/frontend/html_extractor.py +496 -0
- indexing/frontend/html_parser.py +314 -0
- indexing/frontend/jsx_extractor.py +1204 -0
- indexing/frontend/location_lookup.py +247 -0
- indexing/frontend/resolver.py +485 -0
- indexing/frontend/runtime_resolver.py +862 -0
- indexing/frontend/semantic_output.py +705 -0
- indexing/frontend/source_location.py +69 -0
- indexing/frontend_config.py +72 -0
- indexing/frontend_models.py +347 -0
- indexing/language_config.py +360 -0
- indexing/models.py +284 -0
- indexing/node_utils.py +1112 -0
- indexing/parse_worker.py +1082 -0
- indexing/queries.py +1542 -0
- indexing/sdk_examples.py +426 -0
- interactive.py +248 -0
- raggie.py +673 -0
- raggiecode-0.2.1.dist-info/METADATA +944 -0
- raggiecode-0.2.1.dist-info/RECORD +93 -0
- raggiecode-0.2.1.dist-info/WHEEL +5 -0
- raggiecode-0.2.1.dist-info/entry_points.txt +2 -0
- raggiecode-0.2.1.dist-info/top_level.txt +10 -0
- skills/__init__.py +3 -0
- skills/manager.py +114 -0
- skills/tool.py +121 -0
config/tools.json
ADDED
|
@@ -0,0 +1,709 @@
|
|
|
1
|
+
{
|
|
2
|
+
"UglyWholeFileContentDump": {
|
|
3
|
+
"type": "function",
|
|
4
|
+
"function": {
|
|
5
|
+
"name": "UglyWholeFileContentDump",
|
|
6
|
+
"description": "Read and return an ugly dump of the WHOLE CONTENT of a file. use this ONLY WHEN NECESSARY. This tool is heavily throttled. Files matched by .gitignore return an explicit error from the tool. For code exploration, consider using GetFileCodeStructure, GetSymbolSourceCode, or WalkCallTree first those are unlimited and free to use as much as you want",
|
|
7
|
+
"parameters": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"file_path": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "The path to the file to read"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"required": ["file_path"]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"ListDir": {
|
|
20
|
+
"type": "function",
|
|
21
|
+
"function": {
|
|
22
|
+
"name": "ListDir",
|
|
23
|
+
"description": "List the contents of a directory with details including item type (FILE/DIR) and size in bytes. Recursively lists subdirectories up to the specified depth, with indentation to show nesting. Returns a formatted list showing the number of items and each item's name, type, and size. Returns an error if the path does not exist or is not a directory.",
|
|
24
|
+
"parameters": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"required": ["directory_path"],
|
|
27
|
+
"properties": {
|
|
28
|
+
"directory_path": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "The path to the directory to list"
|
|
31
|
+
},
|
|
32
|
+
"depth": {
|
|
33
|
+
"type": "integer",
|
|
34
|
+
"description": "How many levels deep to recursively list subdirectories. Default is 1 (only the immediate contents).",
|
|
35
|
+
"default": 1
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"Shell": {
|
|
42
|
+
"type": "function",
|
|
43
|
+
"function": {
|
|
44
|
+
"name": "Shell",
|
|
45
|
+
"description": "Execute a shell command via subprocess. Returns stdout on success; on failure returns stderr with the exit code. The command is killed if it exceeds the timeout (default 30 seconds). NEVER use this to write or edit files (use WriteFile/ReplaceText instead). NEVER use this to read files that are in .gitignore. For long-running commands, use TempBackgroundService instead.",
|
|
46
|
+
"parameters": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"required": ["command"],
|
|
49
|
+
"properties": {
|
|
50
|
+
"command": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"description": "The shell command to execute (requires user confirmation)"
|
|
53
|
+
},
|
|
54
|
+
"timeout": {
|
|
55
|
+
"type": "integer",
|
|
56
|
+
"description": "Maximum execution time in seconds before the command is killed (default: 30)"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"TempBackgroundService": {
|
|
63
|
+
"type": "function",
|
|
64
|
+
"function": {
|
|
65
|
+
"name": "TempBackgroundService",
|
|
66
|
+
"description": "Start a TEMPORARY background service (non-blocking). Designed for short-lived dev servers, watch processes, or other long-running services that need to stay alive while you do other work. Returns a PID that can be used with ShellKill to terminate the process. Applies the same sandbox and gitignore restrictions as Shell. Requires user confirmation. stdout and stderr are captured to temp files and returned when the process is killed. STRONGLY DISCOURAGED for: (1) normal shell commands whose output you need — use Shell instead, (2) installing dependencies (pip install, npm install, etc.) — use Shell instead, (3) build/test commands — use Shell instead. Only use this when the process MUST keep running in the background while you perform other tasks.",
|
|
67
|
+
"parameters": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"required": ["command"],
|
|
70
|
+
"properties": {
|
|
71
|
+
"command": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"description": "The command to start as a temporary background service (requires user confirmation)"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"ShellKill": {
|
|
80
|
+
"type": "function",
|
|
81
|
+
"function": {
|
|
82
|
+
"name": "ShellKill",
|
|
83
|
+
"description": "Kill a temporary background service by its PID. Returns any stdout/stderr captured while the process was running. Use the PID returned by TempBackgroundService.",
|
|
84
|
+
"parameters": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"required": ["pid"],
|
|
87
|
+
"properties": {
|
|
88
|
+
"pid": {
|
|
89
|
+
"type": "integer",
|
|
90
|
+
"description": "The PID of the background service to kill (returned by TempBackgroundService)"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"WriteFile": {
|
|
97
|
+
"type": "function",
|
|
98
|
+
"function": {
|
|
99
|
+
"name": "WriteFile",
|
|
100
|
+
"description": "Write content to a file. Overwrites the file if it already exists. Creates parent directories automatically. Refuses to operate on gitignored files.",
|
|
101
|
+
"parameters": {
|
|
102
|
+
"type": "object",
|
|
103
|
+
"required": ["file_path", "content"],
|
|
104
|
+
"properties": {
|
|
105
|
+
"file_path": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"description": "The path of the file to write to (will be created or overwritten)"
|
|
108
|
+
},
|
|
109
|
+
"content": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"description": "The full content to write to the file"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"ReplaceText": {
|
|
118
|
+
"type": "function",
|
|
119
|
+
"function": {
|
|
120
|
+
"name": "ReplaceText",
|
|
121
|
+
"description": "Find and replace text in an existing file. Returns a unified-diff-like view with 5 lines of context before and after each change: removed lines prefixed with '-', added lines prefixed with '+', context lines indented with spaces. By default, old_string is matched literally (exact text, including whitespace and indentation). Set use_regex=true to treat old_string as a Python regex pattern with new_string supporting backreferences (e.g. \\1). By default the pattern must match exactly once — if it matches more than once, the operation fails with a count and suggests replace_all=true to replace all occurrences. Refuses gitignored files. Asks consent if path is outside cwd.",
|
|
122
|
+
"parameters": {
|
|
123
|
+
"type": "object",
|
|
124
|
+
"required": ["file_path", "old_string", "new_string"],
|
|
125
|
+
"properties": {
|
|
126
|
+
"file_path": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"description": "The path to the file to modify"
|
|
129
|
+
},
|
|
130
|
+
"old_string": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"description": "The exact text to find (literal match by default). Must match whitespace and indentation exactly. Set use_regex=true to treat this as a Python regex pattern."
|
|
133
|
+
},
|
|
134
|
+
"new_string": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"description": "The replacement text. Supports backreferences (e.g. \\1) when use_regex=true."
|
|
137
|
+
},
|
|
138
|
+
"replace_all": {
|
|
139
|
+
"type": "boolean",
|
|
140
|
+
"description": "Set to true to replace ALL occurrences. Default false (single match required)."
|
|
141
|
+
},
|
|
142
|
+
"use_regex": {
|
|
143
|
+
"type": "boolean",
|
|
144
|
+
"description": "Set to true to treat old_string as a Python regex pattern. Default false (literal match)."
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"RemoveFile": {
|
|
151
|
+
"type": "function",
|
|
152
|
+
"function": {
|
|
153
|
+
"name": "RemoveFile",
|
|
154
|
+
"description": "Remove a file or directory (recursively) from the filesystem. REFUSES to remove files that are matched by .gitignore — returns an error telling you to instruct the user to make the change themselves. DO NOT attempt to bypass this by using the Shell tool for gitignored files.",
|
|
155
|
+
"parameters": {
|
|
156
|
+
"type": "object",
|
|
157
|
+
"required": ["file_path"],
|
|
158
|
+
"properties": {
|
|
159
|
+
"file_path": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"description": "The path of the file or directory to remove"
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"GetSymbolSourceCode": {
|
|
168
|
+
"type": "function",
|
|
169
|
+
"function": {
|
|
170
|
+
"name": "GetSymbolSourceCode",
|
|
171
|
+
"description": "Advanced Coding Analysis Tool to Query the AST based dependency tracker for the full source code of a function, method, or class by name. If the symbol has a description in the index, it is prepended as '# Description: ...'. If an exact name match is not found, returns a fuzzy search across functions, classes, and variables ranked by match quality (exact name → partial name → description match). Use this to quickly read the implementation of a symbol without manually opening files. This is NOT the Unix 'find' command — it queries the code index, not the filesystem.",
|
|
172
|
+
"parameters": {
|
|
173
|
+
"type": "object",
|
|
174
|
+
"required": ["symbol_name"],
|
|
175
|
+
"properties": {
|
|
176
|
+
"symbol_name": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"description": "The name of the function, method, or class to find"
|
|
179
|
+
},
|
|
180
|
+
"file_path": {
|
|
181
|
+
"type": "string",
|
|
182
|
+
"description": "Optional file path to disambiguate when multiple symbols share the same name"
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"GetFileCodeSemantics": {
|
|
189
|
+
"type": "function",
|
|
190
|
+
"function": {
|
|
191
|
+
"name": "GetFileCodeSemantics",
|
|
192
|
+
"description": "shows code structure inside the file (use this before using UglyWholeFileContentDump). Supports 15 languages: Python, Go, C#, JavaScript, TypeScript, TSX, Rust, Zig, Elixir, C++, C, PHP, Dart, Java, Kotlin. Shows: functions with their parameters, what each function depends on (function calls, method calls, class references, variable references — resolved to their definition file paths), classes with their methods and member variables, nested classes, top-level variables, and imports. Literal string dependencies (e.g., format strings) are filtered out. If descriptions exist in the code index, they are shown as '# description' annotations. Use this to quickly understand a file's structure and its connections to the rest of the codebase. Set include_bodies=true to get the full source code of all functions and classes in a single call, reducing exploration overhead.This is the canonical, complete source of truth for code in this project — equivalent to reading the file directly. DO NOT use any other AST parsers because this is AST based AND does proper dependencies tracking AND hyper-optimized for your usage and massive performance. if you are not using you are seriously missing out",
|
|
193
|
+
"parameters": {
|
|
194
|
+
"type": "object",
|
|
195
|
+
"required": ["file_path"],
|
|
196
|
+
"properties": {
|
|
197
|
+
"file_path": {
|
|
198
|
+
"type": "string",
|
|
199
|
+
"description": "The path to the file to analyze"
|
|
200
|
+
},
|
|
201
|
+
"include_bodies": {
|
|
202
|
+
"type": "boolean",
|
|
203
|
+
"description": "If true, include full source code for all functions and classes in the file (default: false). Use this to get everything in one call instead of multiple GetSymbolSourceCode calls."
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"WalkCallTree": {
|
|
210
|
+
"type": "function",
|
|
211
|
+
"function": {
|
|
212
|
+
"name": "WalkCallTree",
|
|
213
|
+
"description": "Advanced Coding Analysis Tool to Perform a breadth-first traversal of the call graph starting from a function or method, using the code index's dependency table. Returns JSON lines (one JSON object per line), sorted by depth then name. Each node has: id (e.g., 'f:123' for functions, 'ext:name' for unresolved externals), name, kind (function/method/external), file path, start line number, a one-line snippet of the first body line, depth (distance from root), cycle (true if this node appeared earlier in the ancestor chain — the traversal stops at cycles), and callees (list of child node IDs). Max depth defaults to 5. Set include_external=true to include unresolved third-party calls as 'ext:name' nodes. Use exclude to skip certain path prefixes (e.g., ['tests/', 'vendor/']). Use this to trace the entire call flow from an entry point.",
|
|
214
|
+
"parameters": {
|
|
215
|
+
"type": "object",
|
|
216
|
+
"required": ["symbol_name"],
|
|
217
|
+
"properties": {
|
|
218
|
+
"symbol_name": {
|
|
219
|
+
"type": "string",
|
|
220
|
+
"description": "Name of the starting function or method"
|
|
221
|
+
},
|
|
222
|
+
"file_path": {
|
|
223
|
+
"type": "string",
|
|
224
|
+
"description": "Optional file path to disambiguate same-name symbols"
|
|
225
|
+
},
|
|
226
|
+
"max_depth": {
|
|
227
|
+
"type": "integer",
|
|
228
|
+
"description": "Maximum depth to traverse (default 5)"
|
|
229
|
+
},
|
|
230
|
+
"include_external": {
|
|
231
|
+
"type": "boolean",
|
|
232
|
+
"description": "Include external/third-party calls as 'ext:name' nodes (default false)"
|
|
233
|
+
},
|
|
234
|
+
"exclude": {
|
|
235
|
+
"type": "array",
|
|
236
|
+
"items": {"type": "string"},
|
|
237
|
+
"description": "Optional list of path prefixes to exclude from results (e.g. ['tests/', 'vendor/'])"
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"Document": {
|
|
244
|
+
"type": "function",
|
|
245
|
+
"function": {
|
|
246
|
+
"name": "Document",
|
|
247
|
+
"description": "[experimental] Read or update descriptions for functions, methods, classes, or variables in the code index database. Descriptions persist across sessions — they are stored in SQLite (.code_index.raggie) and are automatically displayed by GetSymbolSourceCode (as '# Description: ...') and GetFileCodeStructure (as '# annotation'). Use this to build lasting knowledge about the codebase so you don't have to re-discover how things work in future conversations. Supports two actions: 'read' (get current description) and 'update' (set a new description).",
|
|
248
|
+
"parameters": {
|
|
249
|
+
"type": "object",
|
|
250
|
+
"required": ["symbol_name", "description"],
|
|
251
|
+
"properties": {
|
|
252
|
+
"symbol_name": {
|
|
253
|
+
"type": "string",
|
|
254
|
+
"description": "The name of the symbol to document"
|
|
255
|
+
},
|
|
256
|
+
"description": {
|
|
257
|
+
"type": "string",
|
|
258
|
+
"description": "The description to add or update in the code index"
|
|
259
|
+
},
|
|
260
|
+
"symbol_type": {
|
|
261
|
+
"type": "string",
|
|
262
|
+
"description": "The type of symbol: 'function', 'method', 'class', or 'variable' (defaults to 'function')"
|
|
263
|
+
},
|
|
264
|
+
"file_path": {
|
|
265
|
+
"type": "string",
|
|
266
|
+
"description": "Optional file path to disambiguate same-name symbols"
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
"SetSkill": {
|
|
273
|
+
"type": "function",
|
|
274
|
+
"function": {
|
|
275
|
+
"name": "SetSkill",
|
|
276
|
+
"description": "Create or update a named skill for your own role. You can only create or update skills for your own role — the role is determined automatically. A role can have multiple skills, each identified by a unique name. This requires user consent before applying changes. Skills are markdown-formatted instructions that extend the agent's behavior.",
|
|
277
|
+
"parameters": {
|
|
278
|
+
"type": "object",
|
|
279
|
+
"properties": {
|
|
280
|
+
"name": {
|
|
281
|
+
"type": "string",
|
|
282
|
+
"description": "The skill name (e.g., 'testing', 'refactoring', 'git-workflow')"
|
|
283
|
+
},
|
|
284
|
+
"content": {
|
|
285
|
+
"type": "string",
|
|
286
|
+
"description": "The new skill content in markdown format"
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
"required": ["name", "content"]
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"GetSkill": {
|
|
294
|
+
"type": "function",
|
|
295
|
+
"function": {
|
|
296
|
+
"name": "GetSkill",
|
|
297
|
+
"description": "Fetch the full content of a specific skill by name. Skills are advertised as brief summaries in the system prompt — use this tool to retrieve the complete skill content when you need to work with a particular skill. The full content is returned as text in the tool response.",
|
|
298
|
+
"parameters": {
|
|
299
|
+
"type": "object",
|
|
300
|
+
"properties": {
|
|
301
|
+
"name": {
|
|
302
|
+
"type": "string",
|
|
303
|
+
"description": "The skill name to fetch (e.g., 'testing', 'refactoring')"
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
"required": ["name"]
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"SearchAllFilesContent": {
|
|
311
|
+
"type": "function",
|
|
312
|
+
"function": {
|
|
313
|
+
"name": "SearchAllFilesContent",
|
|
314
|
+
"description": "Search for a string of characters using regex inside a directory or a file, this is your simple grep-like tool, less advanced than ReadCodeSymbol",
|
|
315
|
+
"parameters": {
|
|
316
|
+
"type": "object",
|
|
317
|
+
"required": ["search_term", "directory"],
|
|
318
|
+
"properties": {
|
|
319
|
+
"search_term": {
|
|
320
|
+
"type": "string",
|
|
321
|
+
"description": "the term or regex you are trying to search for"
|
|
322
|
+
},
|
|
323
|
+
"directory": {
|
|
324
|
+
"type": "string",
|
|
325
|
+
"description": "The directory to search in"
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
"ReadImage": {
|
|
332
|
+
"type": "function",
|
|
333
|
+
"function": {
|
|
334
|
+
"name": "ReadImage",
|
|
335
|
+
"description": "Read and encode an image file for vision analysis. Returns base64-encoded image data with MIME type. Supports PNG, JPG, JPEG, GIF, BMP, WEBP, SVG, TIFF, ICO, HEIC, HEIF. Use this to analyze screenshots, diagrams, or any visual content with the vision-capable model.",
|
|
336
|
+
"parameters": {
|
|
337
|
+
"type": "object",
|
|
338
|
+
"required": ["file_path"],
|
|
339
|
+
"properties": {
|
|
340
|
+
"file_path": {
|
|
341
|
+
"type": "string",
|
|
342
|
+
"description": "The path to the image file to read"
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
"WebFetch": {
|
|
349
|
+
"type": "function",
|
|
350
|
+
"function": {
|
|
351
|
+
"name": "WebFetch",
|
|
352
|
+
"description": "Fetch a URL over HTTP/HTTPS and return its content as readable text. HTML pages are stripped to plain text (scripts/styles removed, block elements turned into line breaks); JSON, XML, and plain text are returned as-is. Other content types (binary, images, PDFs) are rejected. Output is truncated to max_chars (default 20000). Use this to read documentation, GitHub issues, changelogs, API references, or any web page mid-task. The url must start with http:// or https://.",
|
|
353
|
+
"parameters": {
|
|
354
|
+
"type": "object",
|
|
355
|
+
"required": ["url"],
|
|
356
|
+
"properties": {
|
|
357
|
+
"url": {
|
|
358
|
+
"type": "string",
|
|
359
|
+
"description": "The http:// or https:// URL to fetch"
|
|
360
|
+
},
|
|
361
|
+
"max_chars": {
|
|
362
|
+
"type": "integer",
|
|
363
|
+
"description": "Maximum number of characters to return (default 20000). Content beyond this is truncated."
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
"WebSearch": {
|
|
370
|
+
"type": "function",
|
|
371
|
+
"function": {
|
|
372
|
+
"name": "WebSearch",
|
|
373
|
+
"description": "Search the web via DuckDuckGo (no API key required) and return a ranked list of results, each with a title, URL, and snippet. Use this to find documentation, error solutions, library references, or current information, then follow up with WebFetch on a promising URL to read the full page. Returns up to max_results results (default 5, max 20).",
|
|
374
|
+
"parameters": {
|
|
375
|
+
"type": "object",
|
|
376
|
+
"required": ["query"],
|
|
377
|
+
"properties": {
|
|
378
|
+
"query": {
|
|
379
|
+
"type": "string",
|
|
380
|
+
"description": "The search query"
|
|
381
|
+
},
|
|
382
|
+
"max_results": {
|
|
383
|
+
"type": "integer",
|
|
384
|
+
"description": "Maximum number of results to return (default 5, capped at 20)"
|
|
385
|
+
},
|
|
386
|
+
"region": {
|
|
387
|
+
"type": "string",
|
|
388
|
+
"description": "Optional region code for localized results (e.g. 'us-en', 'uk-en'). Defaults to 'wt-wt' (no region)."
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
"DispatchSubagent": {
|
|
395
|
+
"type": "function",
|
|
396
|
+
"function": {
|
|
397
|
+
"name": "DispatchSubagent",
|
|
398
|
+
"description": "Dispatch a subagent to handle a subtask. The subagent inherits the same role as the parent session. The subagent runs sequentially and returns its output. Useful for delegating specialized tasks. Safety limit: max 3 depth levels to prevent infinite nesting. Subagents can create their own todo lists for complex subtasks (nested todo lists are allowed, depth is displayed for visibility). to delegate a take for it you do a complete handover with all the specs, requirements. (this uses less tokens than you because it doesn't share your context window)",
|
|
399
|
+
"parameters": {
|
|
400
|
+
"type": "object",
|
|
401
|
+
"required": ["prompt"],
|
|
402
|
+
"properties": {
|
|
403
|
+
"prompt": {
|
|
404
|
+
"type": "string",
|
|
405
|
+
"description": "The task/prompt to give to the subagent"
|
|
406
|
+
},
|
|
407
|
+
"timeout": {
|
|
408
|
+
"type": "integer",
|
|
409
|
+
"description": "Optional timeout in seconds (default: 300)"
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
"CreateTodoList": {
|
|
416
|
+
"type": "function",
|
|
417
|
+
"function": {
|
|
418
|
+
"name": "CreateTodoList",
|
|
419
|
+
"description": "Create a new todo list for the current session. Todo lists are persisted in the database and can be resumed if the session is interrupted. Use this for complex multi-step tasks that require planning and user approval before execution.",
|
|
420
|
+
"parameters": {
|
|
421
|
+
"type": "object",
|
|
422
|
+
"properties": {}
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
"AddTask": {
|
|
427
|
+
"type": "function",
|
|
428
|
+
"function": {
|
|
429
|
+
"name": "AddTask",
|
|
430
|
+
"description": "Add a task to a todo list. Each task is executed by a dedicated subagent in its own isolated session via ExecuteNextTask. Because each subagent starts fresh with no memory of the orchestrator's conversation, it relies entirely on the task fields you provide here to understand what to do and how to do it. The 'context' field is critical: it should contain all the background information the subagent needs about the codebase, architecture, prior decisions, file locations, or any other details specific to this task that the subagent won't be able to infer on its own. Without sufficient context, the subagent may produce incorrect or incomplete work. Tasks are executed sequentially in order_index order.",
|
|
431
|
+
"parameters": {
|
|
432
|
+
"type": "object",
|
|
433
|
+
"required": ["todo_list_id", "goal"],
|
|
434
|
+
"properties": {
|
|
435
|
+
"todo_list_id": {
|
|
436
|
+
"type": "integer",
|
|
437
|
+
"description": "The ID of the todo list to add the task to"
|
|
438
|
+
},
|
|
439
|
+
"goal": {
|
|
440
|
+
"type": "string",
|
|
441
|
+
"description": "Clear description of what needs to be done"
|
|
442
|
+
},
|
|
443
|
+
"requirements": {
|
|
444
|
+
"type": "string",
|
|
445
|
+
"description": "Specific requirements or constraints for the task"
|
|
446
|
+
},
|
|
447
|
+
"notes": {
|
|
448
|
+
"type": "string",
|
|
449
|
+
"description": "Additional helpful context for the task"
|
|
450
|
+
},
|
|
451
|
+
"context": {
|
|
452
|
+
"type": "string",
|
|
453
|
+
"description": "Background information the subagent needs to accomplish this task. Since each task is executed by a separate isolated subagent with no access to the orchestrator's conversation history, this field is how you pass along knowledge about the codebase, architecture decisions, relevant file paths, API contracts, data structures, or any other details the subagent needs. Be thorough — the subagent cannot ask you questions during execution."
|
|
454
|
+
},
|
|
455
|
+
"insert_after": {
|
|
456
|
+
"type": "integer",
|
|
457
|
+
"description": "Insert this task after the given task number (1-based). Use 0 to insert at the beginning. If omitted, the task is appended to the end of the list. Example: insert_after=2 inserts after task 2, making the new task become task 3."
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
"GetTodoList": {
|
|
464
|
+
"type": "function",
|
|
465
|
+
"function": {
|
|
466
|
+
"name": "GetTodoList",
|
|
467
|
+
"description": "Retrieve and display a todo list with all its tasks, including their status (pending, in_progress, completed, failed, cancelled). Use this to review the plan before asking for user approval.",
|
|
468
|
+
"parameters": {
|
|
469
|
+
"type": "object",
|
|
470
|
+
"required": ["todo_list_id"],
|
|
471
|
+
"properties": {
|
|
472
|
+
"todo_list_id": {
|
|
473
|
+
"type": "integer",
|
|
474
|
+
"description": "The ID of the todo list to retrieve"
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
"ApproveTodoList": {
|
|
481
|
+
"type": "function",
|
|
482
|
+
"function": {
|
|
483
|
+
"name": "ApproveTodoList",
|
|
484
|
+
"description": "Display the todo list execution plan to the user and ask for approval (y/n). If approved, the todo list status is set to 'approved' and tasks can be executed. If rejected, the user is prompted to provide feedback, the todo list is marked as 'rejected', and the agent should rebuild the plan based on the feedback. Tasks cannot be executed without user approval.",
|
|
485
|
+
"parameters": {
|
|
486
|
+
"type": "object",
|
|
487
|
+
"required": ["todo_list_id"],
|
|
488
|
+
"properties": {
|
|
489
|
+
"todo_list_id": {
|
|
490
|
+
"type": "integer",
|
|
491
|
+
"description": "The ID of the todo list to approve"
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
"ExecuteNextTask": {
|
|
498
|
+
"type": "function",
|
|
499
|
+
"function": {
|
|
500
|
+
"name": "ExecuteNextTask",
|
|
501
|
+
"description": "Execute the next pending task in the todo list by dispatching a subagent. The subagent receives the task's goal, requirements, notes, and a summary of all previously completed tasks in this todo list. Tasks are executed sequentially (no parallelization). The todo list must be approved before any task can be executed. Returns an error if the todo list is not approved. When all tasks are completed, the todo list is automatically deleted from the database.",
|
|
502
|
+
"parameters": {
|
|
503
|
+
"type": "object",
|
|
504
|
+
"required": ["todo_list_id"],
|
|
505
|
+
"properties": {
|
|
506
|
+
"todo_list_id": {
|
|
507
|
+
"type": "integer",
|
|
508
|
+
"description": "The ID of the todo list to execute the next task from"
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
"MarkTaskComplete": {
|
|
515
|
+
"type": "function",
|
|
516
|
+
"function": {
|
|
517
|
+
"name": "MarkTaskComplete",
|
|
518
|
+
"description": "Manually mark a task as completed. Use this if a task was completed outside of the normal ExecuteNextTask flow, or to correct task status. Optionally provide todo_list_id to trigger auto-deletion when all tasks in that list are done.",
|
|
519
|
+
"parameters": {
|
|
520
|
+
"type": "object",
|
|
521
|
+
"required": ["task_id"],
|
|
522
|
+
"properties": {
|
|
523
|
+
"task_id": {
|
|
524
|
+
"type": "integer",
|
|
525
|
+
"description": "The ID of the task to mark as completed"
|
|
526
|
+
},
|
|
527
|
+
"todo_list_id": {
|
|
528
|
+
"type": "integer",
|
|
529
|
+
"description": "Optional: The ID of the todo list this task belongs to. If provided, the todo list will be automatically deleted when all its tasks are completed."
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
"MarkTaskFailed": {
|
|
536
|
+
"type": "function",
|
|
537
|
+
"function": {
|
|
538
|
+
"name": "MarkTaskFailed",
|
|
539
|
+
"description": "Manually mark a task as failed. Use this if a task encountered an error and cannot be completed.",
|
|
540
|
+
"parameters": {
|
|
541
|
+
"type": "object",
|
|
542
|
+
"required": ["task_id"],
|
|
543
|
+
"properties": {
|
|
544
|
+
"task_id": {
|
|
545
|
+
"type": "integer",
|
|
546
|
+
"description": "The ID of the task to mark as failed"
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
"MarkTaskCancelled": {
|
|
553
|
+
"type": "function",
|
|
554
|
+
"function": {
|
|
555
|
+
"name": "MarkTaskCancelled",
|
|
556
|
+
"description": "Manually mark a task as cancelled. Use this if a task is no longer needed or should be skipped. Cancelled tasks are distinct from failed tasks - they were intentionally not executed. A reason is required so the cancellation is documented.",
|
|
557
|
+
"parameters": {
|
|
558
|
+
"type": "object",
|
|
559
|
+
"required": ["task_id", "reason"],
|
|
560
|
+
"properties": {
|
|
561
|
+
"task_id": {
|
|
562
|
+
"type": "integer",
|
|
563
|
+
"description": "The ID of the task to mark as cancelled"
|
|
564
|
+
},
|
|
565
|
+
"reason": {
|
|
566
|
+
"type": "string",
|
|
567
|
+
"description": "A brief explanation of why this task is being cancelled. This is stored and displayed in the todo list for future reference."
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
"GetActiveTodoList": {
|
|
574
|
+
"type": "function",
|
|
575
|
+
"function": {
|
|
576
|
+
"name": "GetActiveTodoList",
|
|
577
|
+
"description": "Get the active (pending, in_progress, or rejected) todo list for the current session. Returns the todo list ID and status. Returns 'No active todo list found' if there is no active todo list. Use this to check if there's an incomplete todo list that can be resumed.",
|
|
578
|
+
"parameters": {
|
|
579
|
+
"type": "object",
|
|
580
|
+
"properties": {}
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
"AskUser": {
|
|
585
|
+
"type": "function",
|
|
586
|
+
"function": {
|
|
587
|
+
"name": "AskUser",
|
|
588
|
+
"description": "Ask the user a question to resolve ambiguity or get a decision on important matters. Use this when you encounter an ambiguity and you are not certain that your decision meet the requirement of the user or the requirement is entirely unclear or when face multiple valid approaches and the user's preference matters. You can provide predefined options with descriptions to make it easy for the user to choose, or ask a free-form question without options. The user can always type a custom answer even when options are provided.",
|
|
589
|
+
"parameters": {
|
|
590
|
+
"type": "object",
|
|
591
|
+
"required": ["question"],
|
|
592
|
+
"properties": {
|
|
593
|
+
"question": {
|
|
594
|
+
"type": "string",
|
|
595
|
+
"description": "The question to ask the user. Be specific and provide enough context for the user to make an informed decision. but keep it short and easy to understan"
|
|
596
|
+
},
|
|
597
|
+
"options": {
|
|
598
|
+
"type": "array",
|
|
599
|
+
"description": "Predefined options for the user to choose from. Each option has a label and optional description. If omitted, the user will be prompted for a free-form answer. The user can always type a custom answer even when options are provided.",
|
|
600
|
+
"items": {
|
|
601
|
+
"type": "object",
|
|
602
|
+
"properties": {
|
|
603
|
+
"label": {
|
|
604
|
+
"type": "string",
|
|
605
|
+
"description": "Short label for the option"
|
|
606
|
+
},
|
|
607
|
+
"description": {
|
|
608
|
+
"type": "string",
|
|
609
|
+
"description": "Longer description explaining the option"
|
|
610
|
+
}
|
|
611
|
+
},
|
|
612
|
+
"required": ["label"]
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
"allow_multiple": {
|
|
616
|
+
"type": "boolean",
|
|
617
|
+
"description": "If true, the user can select multiple options (comma-separated numbers). Default false (single selection)."
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
},
|
|
623
|
+
"FileNameSearch": {
|
|
624
|
+
"type": "function",
|
|
625
|
+
"function": {
|
|
626
|
+
"name": "FileNameSearch",
|
|
627
|
+
"description": "Search for file names by partial or approximate match. Fuzzy search capable — uses subsequence matching with bonuses for consecutive chars and word boundaries. Walks the directory tree and returns the top 5 highest-scoring matches. Respects .aiignore/.gitignore. Use this to quickly locate files when you only remember part of the name.",
|
|
628
|
+
"parameters": {
|
|
629
|
+
"type": "object",
|
|
630
|
+
"required": ["query"],
|
|
631
|
+
"properties": {
|
|
632
|
+
"query": {
|
|
633
|
+
"type": "string",
|
|
634
|
+
"description": "The partial or approximate file name to search for (e.g. 'agent' matches 'agent.py', 'AgentManager.cs', etc.)"
|
|
635
|
+
},
|
|
636
|
+
"directory": {
|
|
637
|
+
"type": "string",
|
|
638
|
+
"description": "The directory to search in (default: current working directory)"
|
|
639
|
+
},
|
|
640
|
+
"max_results": {
|
|
641
|
+
"type": "integer",
|
|
642
|
+
"description": "Maximum number of results to return (default 5)",
|
|
643
|
+
"default": 5
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
"ViewChanges": {
|
|
650
|
+
"type": "function",
|
|
651
|
+
"function": {
|
|
652
|
+
"name": "ViewChanges",
|
|
653
|
+
"description": "View changes tracked by the built-in git repository (.raggie/git/). Supports three view_type modes: 'status' (list added/modified/deleted files since last commit), 'diff' (show the actual file diffs/content), 'log' (show commit history). For 'status', optionally filter by 'category' to see only one type of change. For 'diff', optionally set 'max_diff_lines' to limit output size (default 500). Optionally filter by 'path' to narrow results to specific files. Use this to review what has changed before or after commits, or to understand the commit history.",
|
|
654
|
+
"parameters": {
|
|
655
|
+
"type": "object",
|
|
656
|
+
"required": ["view_type"],
|
|
657
|
+
"properties": {
|
|
658
|
+
"view_type": {
|
|
659
|
+
"type": "string",
|
|
660
|
+
"description": "What to view: 'status' for a summary of changed files, 'diff' for actual file diffs, 'log' for commit history",
|
|
661
|
+
"enum": ["status", "diff", "log"]
|
|
662
|
+
},
|
|
663
|
+
"path": {
|
|
664
|
+
"type": "string",
|
|
665
|
+
"description": "Optional file path filter — only show changes for files whose path contains this substring"
|
|
666
|
+
},
|
|
667
|
+
"max_count": {
|
|
668
|
+
"type": "integer",
|
|
669
|
+
"description": "Maximum number of commits to return when view_type is 'log' (default: 10)"
|
|
670
|
+
},
|
|
671
|
+
"category": {
|
|
672
|
+
"type": "string",
|
|
673
|
+
"description": "For view_type='status': filter to only this category of changes. If not set, all categories are shown.",
|
|
674
|
+
"enum": ["added", "modified", "deleted", "unchanged"]
|
|
675
|
+
},
|
|
676
|
+
"max_diff_lines": {
|
|
677
|
+
"type": "integer",
|
|
678
|
+
"description": "For view_type='diff': maximum number of lines per diff. Larger diffs are truncated to show the head and tail, with a truncation marker. Set to 0 for no limit (default: 500)"
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
},
|
|
684
|
+
"EditSymbol": {
|
|
685
|
+
"type": "function",
|
|
686
|
+
"function": {
|
|
687
|
+
"name": "EditSymbol",
|
|
688
|
+
"description": "Replace the entire implementation of a function, method, or class by name. Provide the COMPLETE new source code — not a diff or patch. Returns a diff view of the changes. Refuses gitignored files. Use GetSymbolSourceCode first if you need to see the current implementation.",
|
|
689
|
+
"parameters": {
|
|
690
|
+
"type": "object",
|
|
691
|
+
"required": ["symbol_name", "new_source"],
|
|
692
|
+
"properties": {
|
|
693
|
+
"symbol_name": {
|
|
694
|
+
"type": "string",
|
|
695
|
+
"description": "The name of the function, method, or class to edit"
|
|
696
|
+
},
|
|
697
|
+
"new_source": {
|
|
698
|
+
"type": "string",
|
|
699
|
+
"description": "The complete new source code for the symbol. This replaces the entire current implementation from start line to end line."
|
|
700
|
+
},
|
|
701
|
+
"file_path": {
|
|
702
|
+
"type": "string",
|
|
703
|
+
"description": "Optional file path to disambiguate when multiple symbols share the same name"
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
}
|