@morphllm/morphsdk 0.2.56 → 0.2.58

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.
Files changed (165) hide show
  1. package/dist/anthropic-CaFUHxBW.d.ts +89 -0
  2. package/dist/{chunk-SALJ2K6S.js → chunk-2CASO3ZO.js} +60 -98
  3. package/dist/chunk-2CASO3ZO.js.map +1 -0
  4. package/dist/chunk-374N3GIA.js +118 -0
  5. package/dist/chunk-374N3GIA.js.map +1 -0
  6. package/dist/chunk-3IQIT6MC.js +65 -0
  7. package/dist/chunk-3IQIT6MC.js.map +1 -0
  8. package/dist/chunk-4VGOBA2J.js +57 -0
  9. package/dist/chunk-4VGOBA2J.js.map +1 -0
  10. package/dist/chunk-527P5X2E.js +98 -0
  11. package/dist/chunk-527P5X2E.js.map +1 -0
  12. package/dist/chunk-6N6ZYZYD.js +74 -0
  13. package/dist/chunk-6N6ZYZYD.js.map +1 -0
  14. package/dist/chunk-6Y5JB4JC.js +195 -0
  15. package/dist/chunk-6Y5JB4JC.js.map +1 -0
  16. package/dist/{chunk-WSSSSBWU.js → chunk-7EIHYJSG.js} +18 -18
  17. package/dist/chunk-7EIHYJSG.js.map +1 -0
  18. package/dist/{chunk-TICMYDII.js → chunk-APP75CBN.js} +33 -16
  19. package/dist/chunk-APP75CBN.js.map +1 -0
  20. package/dist/chunk-ILJ3J5IA.js +72 -0
  21. package/dist/chunk-ILJ3J5IA.js.map +1 -0
  22. package/dist/chunk-ISWL67SF.js +1 -0
  23. package/dist/chunk-KW7OEGZK.js +9 -0
  24. package/dist/chunk-KW7OEGZK.js.map +1 -0
  25. package/dist/chunk-Q5AHGIQO.js +205 -0
  26. package/dist/chunk-Q5AHGIQO.js.map +1 -0
  27. package/dist/{chunk-TJIUA27P.js → chunk-XT5ZO6ES.js} +9 -5
  28. package/dist/chunk-XT5ZO6ES.js.map +1 -0
  29. package/dist/{chunk-LVPVVLTI.js → chunk-YV75OQTE.js} +105 -17
  30. package/dist/chunk-YV75OQTE.js.map +1 -0
  31. package/dist/{chunk-ZJIIICRA.js → chunk-ZO4PPFCZ.js} +60 -29
  32. package/dist/chunk-ZO4PPFCZ.js.map +1 -0
  33. package/dist/{client-CFoR--IU.d.ts → client-CextMMm9.d.ts} +10 -15
  34. package/dist/client.cjs +698 -466
  35. package/dist/client.cjs.map +1 -1
  36. package/dist/client.d.ts +3 -2
  37. package/dist/client.js +14 -15
  38. package/dist/finish-kXAcUJyB.d.ts +33 -0
  39. package/dist/gemini-CE80Pbdy.d.ts +117 -0
  40. package/dist/index.cjs +711 -466
  41. package/dist/index.cjs.map +1 -1
  42. package/dist/index.d.ts +4 -3
  43. package/dist/index.js +16 -16
  44. package/dist/openai-Fvpqln7F.d.ts +89 -0
  45. package/dist/tools/warp_grep/agent/config.cjs +8 -4
  46. package/dist/tools/warp_grep/agent/config.cjs.map +1 -1
  47. package/dist/tools/warp_grep/agent/config.d.ts +7 -2
  48. package/dist/tools/warp_grep/agent/config.js +1 -1
  49. package/dist/tools/warp_grep/agent/formatter.cjs +32 -15
  50. package/dist/tools/warp_grep/agent/formatter.cjs.map +1 -1
  51. package/dist/tools/warp_grep/agent/formatter.d.ts +1 -1
  52. package/dist/tools/warp_grep/agent/formatter.js +1 -1
  53. package/dist/tools/warp_grep/agent/parser.cjs +104 -17
  54. package/dist/tools/warp_grep/agent/parser.cjs.map +1 -1
  55. package/dist/tools/warp_grep/agent/parser.d.ts +3 -5
  56. package/dist/tools/warp_grep/agent/parser.js +1 -3
  57. package/dist/tools/warp_grep/agent/prompt.cjs +132 -56
  58. package/dist/tools/warp_grep/agent/prompt.cjs.map +1 -1
  59. package/dist/tools/warp_grep/agent/prompt.d.ts +1 -1
  60. package/dist/tools/warp_grep/agent/prompt.js +1 -1
  61. package/dist/tools/warp_grep/agent/runner.cjs +466 -313
  62. package/dist/tools/warp_grep/agent/runner.cjs.map +1 -1
  63. package/dist/tools/warp_grep/agent/runner.d.ts +1 -0
  64. package/dist/tools/warp_grep/agent/runner.js +6 -9
  65. package/dist/tools/warp_grep/agent/types.cjs.map +1 -1
  66. package/dist/tools/warp_grep/agent/types.d.ts +9 -2
  67. package/dist/tools/warp_grep/anthropic.cjs +656 -380
  68. package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
  69. package/dist/tools/warp_grep/anthropic.d.ts +4 -74
  70. package/dist/tools/warp_grep/anthropic.js +13 -16
  71. package/dist/tools/warp_grep/client.cjs +1593 -0
  72. package/dist/tools/warp_grep/client.cjs.map +1 -0
  73. package/dist/tools/warp_grep/client.d.ts +87 -0
  74. package/dist/tools/warp_grep/client.js +26 -0
  75. package/dist/tools/warp_grep/gemini.cjs +1587 -0
  76. package/dist/tools/warp_grep/gemini.cjs.map +1 -0
  77. package/dist/tools/warp_grep/gemini.d.ts +7 -0
  78. package/dist/tools/warp_grep/gemini.js +34 -0
  79. package/dist/tools/warp_grep/harness.cjs +1195 -0
  80. package/dist/tools/warp_grep/harness.cjs.map +1 -0
  81. package/dist/tools/warp_grep/harness.d.ts +107 -0
  82. package/dist/tools/warp_grep/harness.js +68 -0
  83. package/dist/tools/warp_grep/harness.js.map +1 -0
  84. package/dist/tools/warp_grep/index.cjs +818 -466
  85. package/dist/tools/warp_grep/index.cjs.map +1 -1
  86. package/dist/tools/warp_grep/index.d.ts +11 -6
  87. package/dist/tools/warp_grep/index.js +43 -23
  88. package/dist/tools/warp_grep/openai.cjs +656 -378
  89. package/dist/tools/warp_grep/openai.cjs.map +1 -1
  90. package/dist/tools/warp_grep/openai.d.ts +4 -74
  91. package/dist/tools/warp_grep/openai.js +13 -14
  92. package/dist/tools/warp_grep/providers/local.cjs +66 -27
  93. package/dist/tools/warp_grep/providers/local.cjs.map +1 -1
  94. package/dist/tools/warp_grep/providers/local.d.ts +4 -9
  95. package/dist/tools/warp_grep/providers/local.js +2 -2
  96. package/dist/tools/warp_grep/providers/remote.cjs +211 -0
  97. package/dist/tools/warp_grep/providers/remote.cjs.map +1 -0
  98. package/dist/tools/warp_grep/providers/remote.d.ts +67 -0
  99. package/dist/tools/warp_grep/providers/remote.js +9 -0
  100. package/dist/tools/warp_grep/providers/types.cjs.map +1 -1
  101. package/dist/tools/warp_grep/providers/types.d.ts +7 -15
  102. package/dist/tools/warp_grep/vercel.cjs +668 -397
  103. package/dist/tools/warp_grep/vercel.cjs.map +1 -1
  104. package/dist/tools/warp_grep/vercel.d.ts +4 -51
  105. package/dist/tools/warp_grep/vercel.js +16 -15
  106. package/dist/types-a_hxdPI6.d.ts +144 -0
  107. package/dist/vercel-3yjvfmVB.d.ts +66 -0
  108. package/package.json +17 -2
  109. package/dist/chunk-4ZHDBKBY.js +0 -83
  110. package/dist/chunk-4ZHDBKBY.js.map +0 -1
  111. package/dist/chunk-73RQWOQC.js +0 -16
  112. package/dist/chunk-73RQWOQC.js.map +0 -1
  113. package/dist/chunk-7OQOOB3R.js +0 -1
  114. package/dist/chunk-EK7OQPWD.js +0 -44
  115. package/dist/chunk-EK7OQPWD.js.map +0 -1
  116. package/dist/chunk-GJURLQ3L.js +0 -77
  117. package/dist/chunk-GJURLQ3L.js.map +0 -1
  118. package/dist/chunk-HQO45BAJ.js +0 -14
  119. package/dist/chunk-HQO45BAJ.js.map +0 -1
  120. package/dist/chunk-LVPVVLTI.js.map +0 -1
  121. package/dist/chunk-NDZO5IPV.js +0 -121
  122. package/dist/chunk-NDZO5IPV.js.map +0 -1
  123. package/dist/chunk-QVRXBAMM.js +0 -107
  124. package/dist/chunk-QVRXBAMM.js.map +0 -1
  125. package/dist/chunk-SALJ2K6S.js.map +0 -1
  126. package/dist/chunk-TICMYDII.js.map +0 -1
  127. package/dist/chunk-TJIUA27P.js.map +0 -1
  128. package/dist/chunk-UIRJE422.js +0 -70
  129. package/dist/chunk-UIRJE422.js.map +0 -1
  130. package/dist/chunk-WETRQJGU.js +0 -129
  131. package/dist/chunk-WETRQJGU.js.map +0 -1
  132. package/dist/chunk-WSSSSBWU.js.map +0 -1
  133. package/dist/chunk-ZJIIICRA.js.map +0 -1
  134. package/dist/core-CpkYEi_T.d.ts +0 -158
  135. package/dist/tools/warp_grep/agent/grep_helpers.cjs +0 -148
  136. package/dist/tools/warp_grep/agent/grep_helpers.cjs.map +0 -1
  137. package/dist/tools/warp_grep/agent/grep_helpers.d.ts +0 -16
  138. package/dist/tools/warp_grep/agent/grep_helpers.js +0 -14
  139. package/dist/tools/warp_grep/tools/analyse.cjs +0 -40
  140. package/dist/tools/warp_grep/tools/analyse.cjs.map +0 -1
  141. package/dist/tools/warp_grep/tools/analyse.d.ts +0 -10
  142. package/dist/tools/warp_grep/tools/analyse.js +0 -8
  143. package/dist/tools/warp_grep/tools/finish.cjs +0 -69
  144. package/dist/tools/warp_grep/tools/finish.cjs.map +0 -1
  145. package/dist/tools/warp_grep/tools/finish.d.ts +0 -10
  146. package/dist/tools/warp_grep/tools/finish.js +0 -10
  147. package/dist/tools/warp_grep/tools/grep.cjs +0 -38
  148. package/dist/tools/warp_grep/tools/grep.cjs.map +0 -1
  149. package/dist/tools/warp_grep/tools/grep.d.ts +0 -8
  150. package/dist/tools/warp_grep/tools/grep.js +0 -15
  151. package/dist/tools/warp_grep/tools/grep.js.map +0 -1
  152. package/dist/tools/warp_grep/tools/read.cjs +0 -38
  153. package/dist/tools/warp_grep/tools/read.cjs.map +0 -1
  154. package/dist/tools/warp_grep/tools/read.d.ts +0 -9
  155. package/dist/tools/warp_grep/tools/read.js +0 -8
  156. package/dist/tools/warp_grep/tools/read.js.map +0 -1
  157. package/dist/tools/warp_grep/utils/format.cjs +0 -42
  158. package/dist/tools/warp_grep/utils/format.cjs.map +0 -1
  159. package/dist/tools/warp_grep/utils/format.d.ts +0 -4
  160. package/dist/tools/warp_grep/utils/format.js +0 -18
  161. package/dist/tools/warp_grep/utils/format.js.map +0 -1
  162. /package/dist/{chunk-7OQOOB3R.js.map → chunk-ISWL67SF.js.map} +0 -0
  163. /package/dist/tools/warp_grep/{agent/grep_helpers.js.map → client.js.map} +0 -0
  164. /package/dist/tools/warp_grep/{tools/analyse.js.map → gemini.js.map} +0 -0
  165. /package/dist/tools/warp_grep/{tools/finish.js.map → providers/remote.js.map} +0 -0
@@ -1,10 +1,8 @@
1
1
  import {
2
- LLMResponseParseError,
3
2
  LLMResponseParser
4
- } from "../../../chunk-LVPVVLTI.js";
3
+ } from "../../../chunk-YV75OQTE.js";
5
4
  import "../../../chunk-PZ5AY32C.js";
6
5
  export {
7
- LLMResponseParseError,
8
6
  LLMResponseParser
9
7
  };
10
8
  //# sourceMappingURL=parser.js.map
@@ -24,110 +24,188 @@ __export(prompt_exports, {
24
24
  getSystemPrompt: () => getSystemPrompt
25
25
  });
26
26
  module.exports = __toCommonJS(prompt_exports);
27
- var SYSTEM_PROMPT = `You are a code search agent. Your task is to find all relevant code for a given query.
27
+ var SYSTEM_PROMPT = `You are a code search agent. Your task is to find all relevant code for a given search_string.
28
28
 
29
- <workflow>
29
+ ### workflow
30
30
  You have exactly 4 turns. The 4th turn MUST be a \`finish\` call. Each turn allows up to 8 parallel tool calls.
31
31
 
32
- - Turn 1: Map the territory OR dive deep (based on query specificity)
32
+ - Turn 1: Map the territory OR dive deep (based on search_string specificity)
33
33
  - Turn 2-3: Refine based on findings
34
34
  - Turn 4: MUST call \`finish\` with all relevant code locations
35
35
  - You MAY call \`finish\` early if confident\u2014but never before at least 1 search turn.
36
+ - The user strongly prefers if you can call the finish tool early, but you must be correct
36
37
 
37
- Remember, if the task feels easy to you, it is strongly desirable to call \`finish\` early using fewer turns, but quality over speed.
38
- </workflow>
38
+ Remember, if the task feels easy to you, it is strongly desirable to call 'finish' early using fewer turns, but quality over speed
39
39
 
40
- <tools>
41
- ### \`analyse <path> [pattern]\`
42
- Directory tree or file search. Shows structure of a path, optionally filtered by regex pattern.
43
- - \`path\`: Required. Directory or file path (use \`.\` for repo root)
44
- - \`pattern\`: Optional regex to filter results
40
+ ### tools
41
+ Tool calls use nested XML elements:
42
+ \`\`\`xml
43
+ <tool_name>
44
+ <parameter>value</parameter>
45
+ </tool_name>
46
+ \`\`\`
47
+
48
+ ### \`list_directory\`
49
+ Directory tree view. Shows structure of a path, optionally filtered by regex pattern.
50
+
51
+ Elements:
52
+ - \`<path>\` (required): Directory path to list (use \`.\` for repo root)
53
+ - \`<pattern>\` (optional): Regex to filter results
45
54
 
46
55
  Examples:
47
56
  \`\`\`
48
- analyse .
49
- analyse src/api
50
- analyse . ".*\\.ts$"
51
- analyse src "test.*"
57
+ <list_directory>
58
+ <path>src/services</path>
59
+ </list_directory>
60
+
61
+ <list_directory>
62
+ <path>lib/utils</path>
63
+ <pattern>.*\\.(ts|js)$</pattern>
64
+ </list_directory>
52
65
  \`\`\`
53
66
 
54
- ### \`read <path>[:start-end]\`
55
- Read file contents. Line range is 1-based, inclusive.
67
+ ### \`read\`
68
+ Read file contents. Supports multiple line ranges.
56
69
  - Returns numbered lines for easy reference
57
- - Omit range to read entire file
70
+ - ALWAYS include import statements (usually lines 1-20). Better to over-include than miss context.
71
+
72
+ Elements:
73
+ - \`<path>\` (required): File path to read
74
+ - \`<lines>\` (optional): Line ranges like "1-50,75-80,100-120" (omit to read entire file)
58
75
 
59
76
  Examples:
60
77
  \`\`\`
61
- read src/main.py
62
- read src/db/conn.py:10-50
63
- read package.json:1-20
78
+ <read>
79
+ <path>src/main.py</path>
80
+ </read>
81
+
82
+ <read>
83
+ <path>src/auth.py</path>
84
+ <lines>1-20,45-80,150-200</lines>
85
+ </read>
64
86
  \`\`\`
65
87
 
66
- ### \`grep '<pattern>' <path>\`
67
- Ripgrep search. Finds pattern matches across files.
68
- - \`'<pattern>'\`: Required. Regex pattern wrapped in single quotes
69
- - \`<path>\`: Required. Directory or file to search (use \`.\` for repo root)
88
+ ### \`grep\`
89
+ Search for pattern matches across files. Returns matches with 1 line of context above and below.
90
+ - Match lines use \`:\` separator \u2192 \`filepath:linenum:content\`
91
+ - Context lines use \`-\` separator \u2192 \`filepath-linenum-content\`
92
+
93
+ Elements:
94
+ - \`<pattern>\` (required): Search pattern (regex). Use \`(a|b)\` for OR patterns.
95
+ - \`<sub_dir>\` (optional): Subdirectory to search in (defaults to \`.\`)
96
+ - \`<glob>\` (optional): File pattern filter like \`*.py\` or \`*.{ts,tsx}\`
70
97
 
71
98
  Examples:
72
99
  \`\`\`
73
- grep 'class.*Service' src/
74
- grep 'def authenticate' .
75
- grep 'import.*from' src/components/
76
- grep 'TODO' .
100
+ <grep>
101
+ <pattern>(authenticate|authorize|login)</pattern>
102
+ <sub_dir>src/auth/</sub_dir>
103
+ </grep>
104
+
105
+ <grep>
106
+ <pattern>class.*(Service|Controller)</pattern>
107
+ <glob>*.{ts,js}</glob>
108
+ </grep>
109
+
110
+ <grep>
111
+ <pattern>(DB_HOST|DATABASE_URL|connection)</pattern>
112
+ <glob>*.{py,yaml,env}</glob>
113
+ <sub_dir>lib/</sub_dir>
114
+ </grep>
77
115
  \`\`\`
78
116
 
79
- ### \`finish <file1:ranges> [file2:ranges ...]\`
80
- Submit final answer with all relevant code locations.
81
- - Include generous line ranges\u2014don't be stingy with context
82
- - Ranges are comma-separated: \`file.py:10-30,50-60\`
83
- - ALWAYS include import statements at the top of files (usually lines 1-20)
84
- - If code spans multiple files, include ALL of them
85
- - Small files can be returned in full
117
+ ### \`finish\`
118
+ Submit final answer with all relevant code locations. Uses nested \`<file>\` elements.
119
+
120
+ File elements:
121
+ - \`<path>\` (required): File path
122
+ - \`<lines>\` (optional): Line ranges like "1-50,75-80" (\`*\` for entire file)
123
+
124
+ ALWAYS include import statements (usually lines 1-20). Better to over-include than miss context.
86
125
 
87
126
  Examples:
88
127
  \`\`\`
89
- finish src/auth.py:1-15,25-50,75-80 src/models/user.py:1-10,20-45
90
- finish src/index.ts:1-100
128
+ <finish>
129
+ <file>
130
+ <path>src/auth.py</path>
131
+ <lines>1-15,25-50,75-80</lines>
132
+ </file>
133
+ <file>
134
+ <path>src/models/user.py</path>
135
+ <lines>*</lines>
136
+ </file>
137
+ </finish>
91
138
  \`\`\`
92
139
  </tools>
93
140
 
94
141
  <strategy>
95
- **Before your first tool call, classify the query:**
142
+ **Before your first tool call, classify the search_string:**
96
143
 
97
- | Query Type | Turn 1 Strategy | Early Finish? |
98
- |------------|-----------------|---------------|
99
- | **Specific** (function name, error string, unique identifier) | 8 parallel greps on likely paths | Often by turn 2 |
100
- | **Conceptual** (how does X work, where is Y handled) | analyse + 2-3 broad greps | Rarely early |
101
- | **Exploratory** (find all tests, list API endpoints) | analyse at multiple depths | Usually needs 3 turns |
144
+ | Search_string Type | Round 1 Strategy | Early Finish? |
145
+ |------------|------------------|---------------|
146
+ | **Specific** (function name, error string, unique identifier) | 8 parallel greps on likely paths | Often by round 2 |
147
+ | **Conceptual** (how does X work, where is Y handled) | list_directory + 2-3 broad greps | Rarely early |
148
+ | **Exploratory** (find all tests, list API endpoints) | list_directory at multiple depths | Usually needs 3 rounds |
102
149
 
103
150
  **Parallel call patterns:**
104
151
  - **Shotgun grep**: Same pattern, 8 different directories\u2014fast coverage
105
152
  - **Variant grep**: 8 pattern variations (synonyms, naming conventions)\u2014catches inconsistent codebases
106
- - **Funnel**: 1 analyse + 7 greps\u2014orient and search simultaneously
153
+ - **Funnel**: 1 list_directory + 7 greps\u2014orient and search simultaneously
107
154
  - **Deep read**: 8 reads on files you already identified\u2014gather full context fast
155
+
156
+ **Tool call expectations:**
157
+ - Low quality tool calls are ones that give back sparse information. This either means they are not well thought out and are not educated guesses OR, they are too broad and give back too many results.
158
+ - High quality tool calls strike a balance between complexity in the tool call to exclude results we know we don't want, and how wide the search space is so that we don't miss anything. It is ok to start off with wider search spaces, but is imperative that you use your intuition from there on out and seek high quality tool calls only.
159
+ - You are not starting blind, you have some information about root level repo structure going in, so use that to prevent making trivial repo wide queries.
160
+ - The grep tool shows you which file path and line numbers the pattern was found in, use this information smartly when trying to read the file.
108
161
  </strategy>
109
162
 
110
163
  <output_format>
111
164
  EVERY response MUST follow this exact format:
112
165
 
113
166
  1. First, wrap your reasoning in \`<think>...</think>\` tags containing:
114
- - Query classification (specific/conceptual/exploratory)
115
- - Confidence estimate (can I finish in 1-2 turns?)
116
- - This turn's parallel strategy
167
+ - Search_string classification (specific/conceptual/exploratory)
168
+ - Confidence estimate (can I finish in 1-2 rounds?)
169
+ - This round's parallel strategy
117
170
  - What signals would let me finish early?
118
171
 
119
- 2. Then, output tool calls wrapped in \`<tool_call>...</tool_call>\` tags, one per line.
172
+ 2. Then, output up to 8 tool calls using nested XML elements.
120
173
 
121
174
  Example:
122
175
  \`\`\`
123
176
  <think>
124
- This is a specific query about authentication. I'll grep for auth-related patterns.
125
- High confidence I can finish in 2 turns if I find the auth module.
177
+ This is a specific search_string about authentication. I'll grep for auth-related patterns.
178
+ High confidence I can finish in 2 rounds if I find the auth module. I have already been shown the repo's structure at root
126
179
  Strategy: Shotgun grep across likely directories.
127
180
  </think>
128
- <tool_call>grep 'authenticate' src/</tool_call>
129
- <tool_call>grep 'login' src/</tool_call>
130
- <tool_call>analyse src/auth</tool_call>
181
+ <grep>
182
+ <pattern>(authenticate|login|session)</pattern>
183
+ <sub_dir>src/auth/</sub_dir>
184
+ </grep>
185
+ <grep>
186
+ <pattern>(middleware|interceptor)</pattern>
187
+ <glob>*.{ts,js}</glob>
188
+ </grep>
189
+ <list_directory>
190
+ <path>src/auth</path>
191
+ </list_directory>
192
+ \`\`\`
193
+
194
+ Finishing example:
195
+ \`\`\`
196
+ <think>
197
+ I think I have a rough idea, but this is my last turn so I must call the finish tool regardless.
198
+ </think>
199
+ <finish>
200
+ <file>
201
+ <path>src/auth/login.py</path>
202
+ <lines>1-50</lines>
203
+ </file>
204
+ <file>
205
+ <path>src/middleware/session.py</path>
206
+ <lines>10-80</lines>
207
+ </file>
208
+ </finish>
131
209
  \`\`\`
132
210
 
133
211
  No commentary outside \`<think>\`. No explanations after tool calls.
@@ -140,9 +218,7 @@ When calling \`finish\`:
140
218
  - Include any type definitions, interfaces, or constants used
141
219
  - Better to over-include than leave the user missing context
142
220
  - If unsure about boundaries, include more rather than less
143
- </finishing_requirements>
144
-
145
- Begin your exploration now to find code relevant to the query.`;
221
+ </finishing_requirements>`;
146
222
  function getSystemPrompt() {
147
223
  return SYSTEM_PROMPT;
148
224
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../tools/warp_grep/agent/prompt.ts"],"sourcesContent":["export const SYSTEM_PROMPT = `You are a code search agent. Your task is to find all relevant code for a given query.\n\n<workflow>\nYou have exactly 4 turns. The 4th turn MUST be a \\`finish\\` call. Each turn allows up to 8 parallel tool calls.\n\n- Turn 1: Map the territory OR dive deep (based on query specificity)\n- Turn 2-3: Refine based on findings\n- Turn 4: MUST call \\`finish\\` with all relevant code locations\n- You MAY call \\`finish\\` early if confident—but never before at least 1 search turn.\n\nRemember, if the task feels easy to you, it is strongly desirable to call \\`finish\\` early using fewer turns, but quality over speed.\n</workflow>\n\n<tools>\n### \\`analyse <path> [pattern]\\`\nDirectory tree or file search. Shows structure of a path, optionally filtered by regex pattern.\n- \\`path\\`: Required. Directory or file path (use \\`.\\` for repo root)\n- \\`pattern\\`: Optional regex to filter results\n\nExamples:\n\\`\\`\\`\nanalyse .\nanalyse src/api\nanalyse . \".*\\\\.ts$\"\nanalyse src \"test.*\"\n\\`\\`\\`\n\n### \\`read <path>[:start-end]\\`\nRead file contents. Line range is 1-based, inclusive.\n- Returns numbered lines for easy reference\n- Omit range to read entire file\n\nExamples:\n\\`\\`\\`\nread src/main.py\nread src/db/conn.py:10-50\nread package.json:1-20\n\\`\\`\\`\n\n### \\`grep '<pattern>' <path>\\`\nRipgrep search. Finds pattern matches across files.\n- \\`'<pattern>'\\`: Required. Regex pattern wrapped in single quotes\n- \\`<path>\\`: Required. Directory or file to search (use \\`.\\` for repo root)\n\nExamples:\n\\`\\`\\`\ngrep 'class.*Service' src/\ngrep 'def authenticate' .\ngrep 'import.*from' src/components/\ngrep 'TODO' .\n\\`\\`\\`\n\n### \\`finish <file1:ranges> [file2:ranges ...]\\`\nSubmit final answer with all relevant code locations.\n- Include generous line ranges—don't be stingy with context\n- Ranges are comma-separated: \\`file.py:10-30,50-60\\`\n- ALWAYS include import statements at the top of files (usually lines 1-20)\n- If code spans multiple files, include ALL of them\n- Small files can be returned in full\n\nExamples:\n\\`\\`\\`\nfinish src/auth.py:1-15,25-50,75-80 src/models/user.py:1-10,20-45\nfinish src/index.ts:1-100\n\\`\\`\\`\n</tools>\n\n<strategy>\n**Before your first tool call, classify the query:**\n\n| Query Type | Turn 1 Strategy | Early Finish? |\n|------------|-----------------|---------------|\n| **Specific** (function name, error string, unique identifier) | 8 parallel greps on likely paths | Often by turn 2 |\n| **Conceptual** (how does X work, where is Y handled) | analyse + 2-3 broad greps | Rarely early |\n| **Exploratory** (find all tests, list API endpoints) | analyse at multiple depths | Usually needs 3 turns |\n\n**Parallel call patterns:**\n- **Shotgun grep**: Same pattern, 8 different directories—fast coverage\n- **Variant grep**: 8 pattern variations (synonyms, naming conventions)—catches inconsistent codebases\n- **Funnel**: 1 analyse + 7 greps—orient and search simultaneously\n- **Deep read**: 8 reads on files you already identified—gather full context fast\n</strategy>\n\n<output_format>\nEVERY response MUST follow this exact format:\n\n1. First, wrap your reasoning in \\`<think>...</think>\\` tags containing:\n - Query classification (specific/conceptual/exploratory)\n - Confidence estimate (can I finish in 1-2 turns?)\n - This turn's parallel strategy\n - What signals would let me finish early?\n\n2. Then, output tool calls wrapped in \\`<tool_call>...</tool_call>\\` tags, one per line.\n\nExample:\n\\`\\`\\`\n<think>\nThis is a specific query about authentication. I'll grep for auth-related patterns.\nHigh confidence I can finish in 2 turns if I find the auth module.\nStrategy: Shotgun grep across likely directories.\n</think>\n<tool_call>grep 'authenticate' src/</tool_call>\n<tool_call>grep 'login' src/</tool_call>\n<tool_call>analyse src/auth</tool_call>\n\\`\\`\\`\n\nNo commentary outside \\`<think>\\`. No explanations after tool calls.\n</output_format>\n\n<finishing_requirements>\nWhen calling \\`finish\\`:\n- Include the import section (typically lines 1-20) of each file\n- Include all function/class definitions that are relevant\n- Include any type definitions, interfaces, or constants used\n- Better to over-include than leave the user missing context\n- If unsure about boundaries, include more rather than less\n</finishing_requirements>\n\nBegin your exploration now to find code relevant to the query.`;\n\nexport function getSystemPrompt(): string {\n\treturn SYSTEM_PROMPT;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAwHtB,SAAS,kBAA0B;AACzC,SAAO;AACR;","names":[]}
1
+ {"version":3,"sources":["../../../../tools/warp_grep/agent/prompt.ts"],"sourcesContent":["export const SYSTEM_PROMPT = `You are a code search agent. Your task is to find all relevant code for a given search_string.\n\n### workflow\nYou have exactly 4 turns. The 4th turn MUST be a \\`finish\\` call. Each turn allows up to 8 parallel tool calls.\n\n- Turn 1: Map the territory OR dive deep (based on search_string specificity)\n- Turn 2-3: Refine based on findings\n- Turn 4: MUST call \\`finish\\` with all relevant code locations\n- You MAY call \\`finish\\` early if confident—but never before at least 1 search turn.\n- The user strongly prefers if you can call the finish tool early, but you must be correct\n\nRemember, if the task feels easy to you, it is strongly desirable to call 'finish' early using fewer turns, but quality over speed\n\n### tools\nTool calls use nested XML elements:\n\\`\\`\\`xml\n<tool_name>\n <parameter>value</parameter>\n</tool_name>\n\\`\\`\\`\n\n### \\`list_directory\\`\nDirectory tree view. Shows structure of a path, optionally filtered by regex pattern.\n\nElements:\n- \\`<path>\\` (required): Directory path to list (use \\`.\\` for repo root)\n- \\`<pattern>\\` (optional): Regex to filter results\n\nExamples:\n\\`\\`\\`\n<list_directory>\n <path>src/services</path>\n</list_directory>\n\n<list_directory>\n <path>lib/utils</path>\n <pattern>.*\\\\.(ts|js)$</pattern>\n</list_directory>\n\\`\\`\\`\n\n### \\`read\\`\nRead file contents. Supports multiple line ranges.\n- Returns numbered lines for easy reference\n- ALWAYS include import statements (usually lines 1-20). Better to over-include than miss context.\n\nElements:\n- \\`<path>\\` (required): File path to read\n- \\`<lines>\\` (optional): Line ranges like \"1-50,75-80,100-120\" (omit to read entire file)\n\nExamples:\n\\`\\`\\`\n<read>\n <path>src/main.py</path>\n</read>\n\n<read>\n <path>src/auth.py</path>\n <lines>1-20,45-80,150-200</lines>\n</read>\n\\`\\`\\`\n\n### \\`grep\\`\nSearch for pattern matches across files. Returns matches with 1 line of context above and below.\n- Match lines use \\`:\\` separator → \\`filepath:linenum:content\\`\n- Context lines use \\`-\\` separator \\`filepath-linenum-content\\`\n\nElements:\n- \\`<pattern>\\` (required): Search pattern (regex). Use \\`(a|b)\\` for OR patterns.\n- \\`<sub_dir>\\` (optional): Subdirectory to search in (defaults to \\`.\\`)\n- \\`<glob>\\` (optional): File pattern filter like \\`*.py\\` or \\`*.{ts,tsx}\\`\n\nExamples:\n\\`\\`\\`\n<grep>\n <pattern>(authenticate|authorize|login)</pattern>\n <sub_dir>src/auth/</sub_dir>\n</grep>\n\n<grep>\n <pattern>class.*(Service|Controller)</pattern>\n <glob>*.{ts,js}</glob>\n</grep>\n\n<grep>\n <pattern>(DB_HOST|DATABASE_URL|connection)</pattern>\n <glob>*.{py,yaml,env}</glob>\n <sub_dir>lib/</sub_dir>\n</grep>\n\\`\\`\\`\n\n### \\`finish\\`\nSubmit final answer with all relevant code locations. Uses nested \\`<file>\\` elements.\n\nFile elements:\n- \\`<path>\\` (required): File path\n- \\`<lines>\\` (optional): Line ranges like \"1-50,75-80\" (\\`*\\` for entire file)\n\nALWAYS include import statements (usually lines 1-20). Better to over-include than miss context.\n\nExamples:\n\\`\\`\\`\n<finish>\n <file>\n <path>src/auth.py</path>\n <lines>1-15,25-50,75-80</lines>\n </file>\n <file>\n <path>src/models/user.py</path>\n <lines>*</lines>\n </file>\n</finish>\n\\`\\`\\`\n</tools>\n\n<strategy>\n**Before your first tool call, classify the search_string:**\n\n| Search_string Type | Round 1 Strategy | Early Finish? |\n|------------|------------------|---------------|\n| **Specific** (function name, error string, unique identifier) | 8 parallel greps on likely paths | Often by round 2 |\n| **Conceptual** (how does X work, where is Y handled) | list_directory + 2-3 broad greps | Rarely early |\n| **Exploratory** (find all tests, list API endpoints) | list_directory at multiple depths | Usually needs 3 rounds |\n\n**Parallel call patterns:**\n- **Shotgun grep**: Same pattern, 8 different directories—fast coverage\n- **Variant grep**: 8 pattern variations (synonyms, naming conventions)—catches inconsistent codebases\n- **Funnel**: 1 list_directory + 7 greps—orient and search simultaneously\n- **Deep read**: 8 reads on files you already identified—gather full context fast\n\n**Tool call expectations:**\n- Low quality tool calls are ones that give back sparse information. This either means they are not well thought out and are not educated guesses OR, they are too broad and give back too many results.\n- High quality tool calls strike a balance between complexity in the tool call to exclude results we know we don't want, and how wide the search space is so that we don't miss anything. It is ok to start off with wider search spaces, but is imperative that you use your intuition from there on out and seek high quality tool calls only.\n- You are not starting blind, you have some information about root level repo structure going in, so use that to prevent making trivial repo wide queries.\n- The grep tool shows you which file path and line numbers the pattern was found in, use this information smartly when trying to read the file.\n</strategy>\n\n<output_format>\nEVERY response MUST follow this exact format:\n\n1. First, wrap your reasoning in \\`<think>...</think>\\` tags containing:\n - Search_string classification (specific/conceptual/exploratory)\n - Confidence estimate (can I finish in 1-2 rounds?)\n - This round's parallel strategy\n - What signals would let me finish early?\n\n2. Then, output up to 8 tool calls using nested XML elements.\n\nExample:\n\\`\\`\\`\n<think>\nThis is a specific search_string about authentication. I'll grep for auth-related patterns.\nHigh confidence I can finish in 2 rounds if I find the auth module. I have already been shown the repo's structure at root\nStrategy: Shotgun grep across likely directories.\n</think>\n<grep>\n <pattern>(authenticate|login|session)</pattern>\n <sub_dir>src/auth/</sub_dir>\n</grep>\n<grep>\n <pattern>(middleware|interceptor)</pattern>\n <glob>*.{ts,js}</glob>\n</grep>\n<list_directory>\n <path>src/auth</path>\n</list_directory>\n\\`\\`\\`\n\nFinishing example:\n\\`\\`\\`\n<think>\nI think I have a rough idea, but this is my last turn so I must call the finish tool regardless.\n</think>\n<finish>\n <file>\n <path>src/auth/login.py</path>\n <lines>1-50</lines>\n </file>\n <file>\n <path>src/middleware/session.py</path>\n <lines>10-80</lines>\n </file>\n</finish>\n\\`\\`\\`\n\nNo commentary outside \\`<think>\\`. No explanations after tool calls.\n</output_format>\n\n<finishing_requirements>\nWhen calling \\`finish\\`:\n- Include the import section (typically lines 1-20) of each file\n- Include all function/class definitions that are relevant\n- Include any type definitions, interfaces, or constants used\n- Better to over-include than leave the user missing context\n- If unsure about boundaries, include more rather than less\n</finishing_requirements>`;\n\nexport function getSystemPrompt(): string {\n return SYSTEM_PROMPT;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoMtB,SAAS,kBAA0B;AACxC,SAAO;AACT;","names":[]}
@@ -1,4 +1,4 @@
1
- declare const SYSTEM_PROMPT = "You are a code search agent. Your task is to find all relevant code for a given query.\n\n<workflow>\nYou have exactly 4 turns. The 4th turn MUST be a `finish` call. Each turn allows up to 8 parallel tool calls.\n\n- Turn 1: Map the territory OR dive deep (based on query specificity)\n- Turn 2-3: Refine based on findings\n- Turn 4: MUST call `finish` with all relevant code locations\n- You MAY call `finish` early if confident\u2014but never before at least 1 search turn.\n\nRemember, if the task feels easy to you, it is strongly desirable to call `finish` early using fewer turns, but quality over speed.\n</workflow>\n\n<tools>\n### `analyse <path> [pattern]`\nDirectory tree or file search. Shows structure of a path, optionally filtered by regex pattern.\n- `path`: Required. Directory or file path (use `.` for repo root)\n- `pattern`: Optional regex to filter results\n\nExamples:\n```\nanalyse .\nanalyse src/api\nanalyse . \".*\\.ts$\"\nanalyse src \"test.*\"\n```\n\n### `read <path>[:start-end]`\nRead file contents. Line range is 1-based, inclusive.\n- Returns numbered lines for easy reference\n- Omit range to read entire file\n\nExamples:\n```\nread src/main.py\nread src/db/conn.py:10-50\nread package.json:1-20\n```\n\n### `grep '<pattern>' <path>`\nRipgrep search. Finds pattern matches across files.\n- `'<pattern>'`: Required. Regex pattern wrapped in single quotes\n- `<path>`: Required. Directory or file to search (use `.` for repo root)\n\nExamples:\n```\ngrep 'class.*Service' src/\ngrep 'def authenticate' .\ngrep 'import.*from' src/components/\ngrep 'TODO' .\n```\n\n### `finish <file1:ranges> [file2:ranges ...]`\nSubmit final answer with all relevant code locations.\n- Include generous line ranges\u2014don't be stingy with context\n- Ranges are comma-separated: `file.py:10-30,50-60`\n- ALWAYS include import statements at the top of files (usually lines 1-20)\n- If code spans multiple files, include ALL of them\n- Small files can be returned in full\n\nExamples:\n```\nfinish src/auth.py:1-15,25-50,75-80 src/models/user.py:1-10,20-45\nfinish src/index.ts:1-100\n```\n</tools>\n\n<strategy>\n**Before your first tool call, classify the query:**\n\n| Query Type | Turn 1 Strategy | Early Finish? |\n|------------|-----------------|---------------|\n| **Specific** (function name, error string, unique identifier) | 8 parallel greps on likely paths | Often by turn 2 |\n| **Conceptual** (how does X work, where is Y handled) | analyse + 2-3 broad greps | Rarely early |\n| **Exploratory** (find all tests, list API endpoints) | analyse at multiple depths | Usually needs 3 turns |\n\n**Parallel call patterns:**\n- **Shotgun grep**: Same pattern, 8 different directories\u2014fast coverage\n- **Variant grep**: 8 pattern variations (synonyms, naming conventions)\u2014catches inconsistent codebases\n- **Funnel**: 1 analyse + 7 greps\u2014orient and search simultaneously\n- **Deep read**: 8 reads on files you already identified\u2014gather full context fast\n</strategy>\n\n<output_format>\nEVERY response MUST follow this exact format:\n\n1. First, wrap your reasoning in `<think>...</think>` tags containing:\n - Query classification (specific/conceptual/exploratory)\n - Confidence estimate (can I finish in 1-2 turns?)\n - This turn's parallel strategy\n - What signals would let me finish early?\n\n2. Then, output tool calls wrapped in `<tool_call>...</tool_call>` tags, one per line.\n\nExample:\n```\n<think>\nThis is a specific query about authentication. I'll grep for auth-related patterns.\nHigh confidence I can finish in 2 turns if I find the auth module.\nStrategy: Shotgun grep across likely directories.\n</think>\n<tool_call>grep 'authenticate' src/</tool_call>\n<tool_call>grep 'login' src/</tool_call>\n<tool_call>analyse src/auth</tool_call>\n```\n\nNo commentary outside `<think>`. No explanations after tool calls.\n</output_format>\n\n<finishing_requirements>\nWhen calling `finish`:\n- Include the import section (typically lines 1-20) of each file\n- Include all function/class definitions that are relevant\n- Include any type definitions, interfaces, or constants used\n- Better to over-include than leave the user missing context\n- If unsure about boundaries, include more rather than less\n</finishing_requirements>\n\nBegin your exploration now to find code relevant to the query.";
1
+ declare const SYSTEM_PROMPT = "You are a code search agent. Your task is to find all relevant code for a given search_string.\n\n### workflow\nYou have exactly 4 turns. The 4th turn MUST be a `finish` call. Each turn allows up to 8 parallel tool calls.\n\n- Turn 1: Map the territory OR dive deep (based on search_string specificity)\n- Turn 2-3: Refine based on findings\n- Turn 4: MUST call `finish` with all relevant code locations\n- You MAY call `finish` early if confident\u2014but never before at least 1 search turn.\n- The user strongly prefers if you can call the finish tool early, but you must be correct\n\nRemember, if the task feels easy to you, it is strongly desirable to call 'finish' early using fewer turns, but quality over speed\n\n### tools\nTool calls use nested XML elements:\n```xml\n<tool_name>\n <parameter>value</parameter>\n</tool_name>\n```\n\n### `list_directory`\nDirectory tree view. Shows structure of a path, optionally filtered by regex pattern.\n\nElements:\n- `<path>` (required): Directory path to list (use `.` for repo root)\n- `<pattern>` (optional): Regex to filter results\n\nExamples:\n```\n<list_directory>\n <path>src/services</path>\n</list_directory>\n\n<list_directory>\n <path>lib/utils</path>\n <pattern>.*\\.(ts|js)$</pattern>\n</list_directory>\n```\n\n### `read`\nRead file contents. Supports multiple line ranges.\n- Returns numbered lines for easy reference\n- ALWAYS include import statements (usually lines 1-20). Better to over-include than miss context.\n\nElements:\n- `<path>` (required): File path to read\n- `<lines>` (optional): Line ranges like \"1-50,75-80,100-120\" (omit to read entire file)\n\nExamples:\n```\n<read>\n <path>src/main.py</path>\n</read>\n\n<read>\n <path>src/auth.py</path>\n <lines>1-20,45-80,150-200</lines>\n</read>\n```\n\n### `grep`\nSearch for pattern matches across files. Returns matches with 1 line of context above and below.\n- Match lines use `:` separator \u2192 `filepath:linenum:content`\n- Context lines use `-` separator \u2192 `filepath-linenum-content`\n\nElements:\n- `<pattern>` (required): Search pattern (regex). Use `(a|b)` for OR patterns.\n- `<sub_dir>` (optional): Subdirectory to search in (defaults to `.`)\n- `<glob>` (optional): File pattern filter like `*.py` or `*.{ts,tsx}`\n\nExamples:\n```\n<grep>\n <pattern>(authenticate|authorize|login)</pattern>\n <sub_dir>src/auth/</sub_dir>\n</grep>\n\n<grep>\n <pattern>class.*(Service|Controller)</pattern>\n <glob>*.{ts,js}</glob>\n</grep>\n\n<grep>\n <pattern>(DB_HOST|DATABASE_URL|connection)</pattern>\n <glob>*.{py,yaml,env}</glob>\n <sub_dir>lib/</sub_dir>\n</grep>\n```\n\n### `finish`\nSubmit final answer with all relevant code locations. Uses nested `<file>` elements.\n\nFile elements:\n- `<path>` (required): File path\n- `<lines>` (optional): Line ranges like \"1-50,75-80\" (`*` for entire file)\n\nALWAYS include import statements (usually lines 1-20). Better to over-include than miss context.\n\nExamples:\n```\n<finish>\n <file>\n <path>src/auth.py</path>\n <lines>1-15,25-50,75-80</lines>\n </file>\n <file>\n <path>src/models/user.py</path>\n <lines>*</lines>\n </file>\n</finish>\n```\n</tools>\n\n<strategy>\n**Before your first tool call, classify the search_string:**\n\n| Search_string Type | Round 1 Strategy | Early Finish? |\n|------------|------------------|---------------|\n| **Specific** (function name, error string, unique identifier) | 8 parallel greps on likely paths | Often by round 2 |\n| **Conceptual** (how does X work, where is Y handled) | list_directory + 2-3 broad greps | Rarely early |\n| **Exploratory** (find all tests, list API endpoints) | list_directory at multiple depths | Usually needs 3 rounds |\n\n**Parallel call patterns:**\n- **Shotgun grep**: Same pattern, 8 different directories\u2014fast coverage\n- **Variant grep**: 8 pattern variations (synonyms, naming conventions)\u2014catches inconsistent codebases\n- **Funnel**: 1 list_directory + 7 greps\u2014orient and search simultaneously\n- **Deep read**: 8 reads on files you already identified\u2014gather full context fast\n\n**Tool call expectations:**\n- Low quality tool calls are ones that give back sparse information. This either means they are not well thought out and are not educated guesses OR, they are too broad and give back too many results.\n- High quality tool calls strike a balance between complexity in the tool call to exclude results we know we don't want, and how wide the search space is so that we don't miss anything. It is ok to start off with wider search spaces, but is imperative that you use your intuition from there on out and seek high quality tool calls only.\n- You are not starting blind, you have some information about root level repo structure going in, so use that to prevent making trivial repo wide queries.\n- The grep tool shows you which file path and line numbers the pattern was found in, use this information smartly when trying to read the file.\n</strategy>\n\n<output_format>\nEVERY response MUST follow this exact format:\n\n1. First, wrap your reasoning in `<think>...</think>` tags containing:\n - Search_string classification (specific/conceptual/exploratory)\n - Confidence estimate (can I finish in 1-2 rounds?)\n - This round's parallel strategy\n - What signals would let me finish early?\n\n2. Then, output up to 8 tool calls using nested XML elements.\n\nExample:\n```\n<think>\nThis is a specific search_string about authentication. I'll grep for auth-related patterns.\nHigh confidence I can finish in 2 rounds if I find the auth module. I have already been shown the repo's structure at root\nStrategy: Shotgun grep across likely directories.\n</think>\n<grep>\n <pattern>(authenticate|login|session)</pattern>\n <sub_dir>src/auth/</sub_dir>\n</grep>\n<grep>\n <pattern>(middleware|interceptor)</pattern>\n <glob>*.{ts,js}</glob>\n</grep>\n<list_directory>\n <path>src/auth</path>\n</list_directory>\n```\n\nFinishing example:\n```\n<think>\nI think I have a rough idea, but this is my last turn so I must call the finish tool regardless.\n</think>\n<finish>\n <file>\n <path>src/auth/login.py</path>\n <lines>1-50</lines>\n </file>\n <file>\n <path>src/middleware/session.py</path>\n <lines>10-80</lines>\n </file>\n</finish>\n```\n\nNo commentary outside `<think>`. No explanations after tool calls.\n</output_format>\n\n<finishing_requirements>\nWhen calling `finish`:\n- Include the import section (typically lines 1-20) of each file\n- Include all function/class definitions that are relevant\n- Include any type definitions, interfaces, or constants used\n- Better to over-include than leave the user missing context\n- If unsure about boundaries, include more rather than less\n</finishing_requirements>";
2
2
  declare function getSystemPrompt(): string;
3
3
 
4
4
  export { SYSTEM_PROMPT, getSystemPrompt };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SYSTEM_PROMPT,
3
3
  getSystemPrompt
4
- } from "../../../chunk-WETRQJGU.js";
4
+ } from "../../../chunk-Q5AHGIQO.js";
5
5
  import "../../../chunk-PZ5AY32C.js";
6
6
  export {
7
7
  SYSTEM_PROMPT,