@probelabs/probe 0.6.0-rc265 → 0.6.0-rc267

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 (37) hide show
  1. package/bin/binaries/probe-v0.6.0-rc267-aarch64-apple-darwin.tar.gz +0 -0
  2. package/bin/binaries/probe-v0.6.0-rc267-aarch64-unknown-linux-musl.tar.gz +0 -0
  3. package/bin/binaries/probe-v0.6.0-rc267-x86_64-apple-darwin.tar.gz +0 -0
  4. package/bin/binaries/probe-v0.6.0-rc267-x86_64-pc-windows-msvc.zip +0 -0
  5. package/bin/binaries/probe-v0.6.0-rc267-x86_64-unknown-linux-musl.tar.gz +0 -0
  6. package/build/agent/ProbeAgent.js +644 -1442
  7. package/build/agent/engines/enhanced-vercel.js +0 -7
  8. package/build/agent/index.js +3941 -5940
  9. package/build/agent/mcp/index.js +6 -15
  10. package/build/agent/mcp/xmlBridge.js +24 -324
  11. package/build/agent/tasks/index.js +0 -1
  12. package/build/agent/tools.js +11 -181
  13. package/build/index.js +13 -35
  14. package/build/tools/common.js +15 -707
  15. package/build/tools/executePlan.js +2 -2
  16. package/build/tools/index.js +8 -11
  17. package/cjs/agent/ProbeAgent.cjs +3734 -5831
  18. package/cjs/index.cjs +4797 -6869
  19. package/package.json +1 -1
  20. package/src/agent/ProbeAgent.js +644 -1442
  21. package/src/agent/engines/enhanced-vercel.js +0 -7
  22. package/src/agent/index.js +10 -2
  23. package/src/agent/mcp/index.js +6 -15
  24. package/src/agent/mcp/xmlBridge.js +24 -324
  25. package/src/agent/tasks/index.js +0 -1
  26. package/src/agent/tools.js +11 -181
  27. package/src/index.js +13 -35
  28. package/src/tools/common.js +15 -707
  29. package/src/tools/executePlan.js +2 -2
  30. package/src/tools/index.js +8 -11
  31. package/bin/binaries/probe-v0.6.0-rc265-aarch64-apple-darwin.tar.gz +0 -0
  32. package/bin/binaries/probe-v0.6.0-rc265-aarch64-unknown-linux-musl.tar.gz +0 -0
  33. package/bin/binaries/probe-v0.6.0-rc265-x86_64-apple-darwin.tar.gz +0 -0
  34. package/bin/binaries/probe-v0.6.0-rc265-x86_64-pc-windows-msvc.zip +0 -0
  35. package/bin/binaries/probe-v0.6.0-rc265-x86_64-unknown-linux-musl.tar.gz +0 -0
  36. package/build/agent/xmlParsingUtils.js +0 -221
  37. package/src/agent/xmlParsingUtils.js +0 -221
@@ -1,4 +1,4 @@
1
- // Tool definitions and XML parsing for the probe agent
1
+ // Tool creation and schema exports for the probe agent
2
2
  import {
3
3
  searchTool,
4
4
  queryTool,
@@ -13,7 +13,6 @@ import {
13
13
  multiEditTool,
14
14
  DEFAULT_SYSTEM_MESSAGE,
15
15
  attemptCompletionSchema,
16
- attemptCompletionToolDefinition,
17
16
  searchSchema,
18
17
  querySchema,
19
18
  extractSchema,
@@ -25,23 +24,12 @@ import {
25
24
  editSchema,
26
25
  createSchema,
27
26
  multiEditSchema,
28
- searchToolDefinition,
29
- queryToolDefinition,
30
- extractToolDefinition,
31
- delegateToolDefinition,
32
- analyzeAllToolDefinition,
33
- getExecutePlanToolDefinition,
34
- getCleanupExecutePlanToolDefinition,
35
- bashToolDefinition,
36
- editToolDefinition,
37
- createToolDefinition,
38
- multiEditToolDefinition,
39
- googleSearchToolDefinition,
40
- urlContextToolDefinition,
41
- parseXmlToolCall
27
+ listFilesSchema,
28
+ searchFilesSchema,
29
+ readImageSchema,
30
+ listSkillsSchema,
31
+ useSkillSchema
42
32
  } from '../index.js';
43
- import { randomUUID } from 'crypto';
44
- import { processXmlWithThinkingAndRecovery } from './xmlParsingUtils.js';
45
33
 
46
34
  // Create configured tool instances
47
35
  export function createTools(configOptions) {
@@ -96,11 +84,9 @@ export function createTools(configOptions) {
96
84
  return tools;
97
85
  }
98
86
 
99
- // Export tool definitions and schemas
100
87
  // Export task tool from tasks module
101
88
  export {
102
89
  taskSchema,
103
- taskToolDefinition,
104
90
  taskSystemPrompt,
105
91
  taskGuidancePrompt,
106
92
  createTaskCompletionBlockedMessage,
@@ -122,165 +108,9 @@ export {
122
108
  createSchema,
123
109
  multiEditSchema,
124
110
  attemptCompletionSchema,
125
- searchToolDefinition,
126
- queryToolDefinition,
127
- extractToolDefinition,
128
- delegateToolDefinition,
129
- analyzeAllToolDefinition,
130
- getExecutePlanToolDefinition,
131
- getCleanupExecutePlanToolDefinition,
132
- bashToolDefinition,
133
- editToolDefinition,
134
- createToolDefinition,
135
- multiEditToolDefinition,
136
- attemptCompletionToolDefinition,
137
- googleSearchToolDefinition,
138
- urlContextToolDefinition,
139
- parseXmlToolCall
111
+ listFilesSchema,
112
+ searchFilesSchema,
113
+ readImageSchema,
114
+ listSkillsSchema,
115
+ useSkillSchema
140
116
  };
141
-
142
- // Define the listFiles tool XML definition
143
- export const listFilesToolDefinition = `
144
- ## listFiles
145
- Description: List files and directories in a specified location.
146
-
147
- Parameters:
148
- - directory: (optional) The directory path to list files from. Defaults to current directory if not specified.
149
-
150
- Usage Example:
151
-
152
- <examples>
153
-
154
- User: Can you list the files in the src directory?
155
- <listFiles>
156
- <directory>src</directory>
157
- </listFiles>
158
-
159
- User: What files are in the current directory?
160
- <listFiles>
161
- </listFiles>
162
-
163
- </examples>
164
- `;
165
-
166
- // Define the searchFiles tool XML definition
167
- export const searchFilesToolDefinition = `
168
- ## searchFiles
169
- Description: Find files with name matching a glob pattern with recursive search capability.
170
-
171
- Parameters:
172
- - pattern: (required) The glob pattern to search for (e.g., "**/*.js", "*.md").
173
- - directory: (optional) The directory to search in. Defaults to current directory if not specified.
174
- - recursive: (optional) Whether to search recursively. Defaults to true.
175
-
176
- Usage Example:
177
-
178
- <examples>
179
-
180
- User: Can you find all JavaScript files in the project?
181
- <searchFiles>
182
- <pattern>**/*.js</pattern>
183
- </searchFiles>
184
-
185
- User: Find all markdown files in the docs directory, but only at the top level.
186
- <searchFiles>
187
- <pattern>*.md</pattern>
188
- <directory>docs</directory>
189
- <recursive>false</recursive>
190
- </searchFiles>
191
-
192
- </examples>
193
- `;
194
-
195
- // Define the listSkills tool XML definition
196
- export const listSkillsToolDefinition = `
197
- ## listSkills
198
- Description: List available agent skills discovered in the repository.
199
-
200
- Parameters:
201
- - filter: (optional) Substring filter to match skill names or descriptions.
202
-
203
- Usage Example:
204
-
205
- <examples>
206
-
207
- User: What skills are available?
208
- <listSkills>
209
- </listSkills>
210
-
211
- User: Show me skills related to docs
212
- <listSkills>
213
- <filter>docs</filter>
214
- </listSkills>
215
-
216
- </examples>
217
- `;
218
-
219
- // Define the useSkill tool XML definition
220
- export const useSkillToolDefinition = `
221
- ## useSkill
222
- Description: Load and activate a specific skill's instructions. Use this before following a skill's guidance.
223
-
224
- Parameters:
225
- - name: (required) The skill name to activate.
226
-
227
- Usage Example:
228
-
229
- <examples>
230
-
231
- User: Use the onboarding skill
232
- <useSkill>
233
- <name>onboarding</name>
234
- </useSkill>
235
-
236
- </examples>
237
- `;
238
-
239
- // Define the readImage tool XML definition
240
- export const readImageToolDefinition = `
241
- ## readImage
242
- Description: Read and load an image file so it can be viewed by the AI. Use this when you need to analyze, describe, or work with image content. Images from user messages are automatically loaded, but use this tool to explicitly read images mentioned in tool outputs or when you need to examine specific image files.
243
-
244
- Parameters:
245
- - path: (required) The path to the image file to read. Supports png, jpg, jpeg, webp, bmp, and svg formats.
246
-
247
- Usage Example:
248
-
249
- <examples>
250
-
251
- User: Can you describe what's in screenshot.png?
252
- <readImage>
253
- <path>screenshot.png</path>
254
- </readImage>
255
-
256
- User: Analyze the diagram in docs/architecture.svg
257
- <readImage>
258
- <path>docs/architecture.svg</path>
259
- </readImage>
260
-
261
- </examples>
262
- `;
263
-
264
- /**
265
- * Enhanced XML parser that handles thinking tags and attempt_complete shorthand
266
- * This function removes any <thinking></thinking> tags from the input string
267
- * before passing it to the original parseXmlToolCall function
268
- * @param {string} xmlString - The XML string to parse
269
- * @param {string[]} [validTools] - List of valid tool names to parse (optional)
270
- * @returns {Object|null} - The parsed tool call or null if no valid tool call found
271
- */
272
- export function parseXmlToolCallWithThinking(xmlString, validTools) {
273
- // Use the shared processing logic
274
- const { cleanedXmlString, recoveryResult, thinkingContent } = processXmlWithThinkingAndRecovery(xmlString, validTools);
275
-
276
- // If recovery found an attempt_complete pattern, return it with thinking content
277
- if (recoveryResult) {
278
- return { ...recoveryResult, thinkingContent };
279
- }
280
-
281
- // Otherwise, use the original parseXmlToolCall function to parse the cleaned XML string
282
- const toolCall = parseXmlToolCall(cleanedXmlString, validTools);
283
-
284
- // Return tool call with thinking content attached
285
- return toolCall ? { ...toolCall, thinkingContent } : null;
286
- }
package/build/index.js CHANGED
@@ -30,27 +30,19 @@ import {
30
30
  cleanupExecutePlanSchema,
31
31
  attemptCompletionSchema,
32
32
  bashSchema,
33
- searchToolDefinition,
34
- queryToolDefinition,
35
- extractToolDefinition,
36
- delegateToolDefinition,
37
- analyzeAllToolDefinition,
38
- attemptCompletionToolDefinition,
39
- bashToolDefinition,
40
- googleSearchToolDefinition,
41
- urlContextToolDefinition,
42
- parseXmlToolCall
33
+ listFilesSchema,
34
+ searchFilesSchema,
35
+ readImageSchema,
36
+ listSkillsSchema,
37
+ useSkillSchema
43
38
  } from './tools/common.js';
44
39
  import {
45
40
  editSchema,
46
41
  createSchema,
47
- multiEditSchema,
48
- editToolDefinition,
49
- createToolDefinition,
50
- multiEditToolDefinition
42
+ multiEditSchema
51
43
  } from './tools/edit.js';
52
44
  import { searchTool, queryTool, extractTool, delegateTool, analyzeAllTool } from './tools/vercel.js';
53
- import { createExecutePlanTool, getExecutePlanToolDefinition, createCleanupExecutePlanTool, getCleanupExecutePlanToolDefinition } from './tools/executePlan.js';
45
+ import { createExecutePlanTool, createCleanupExecutePlanTool } from './tools/executePlan.js';
54
46
  import { bashTool } from './tools/bash.js';
55
47
  import { editTool, createTool, multiEditTool } from './tools/edit.js';
56
48
  import { FileTracker } from './tools/fileTracker.js';
@@ -62,7 +54,6 @@ import { HookManager, HOOK_TYPES } from './agent/hooks/index.js';
62
54
  import {
63
55
  TaskManager,
64
56
  taskSchema,
65
- taskToolDefinition,
66
57
  taskSystemPrompt,
67
58
  createTaskTool
68
59
  } from './agent/tasks/index.js';
@@ -119,27 +110,14 @@ export {
119
110
  editSchema,
120
111
  createSchema,
121
112
  multiEditSchema,
122
- // Export tool definitions
123
- searchToolDefinition,
124
- queryToolDefinition,
125
- extractToolDefinition,
126
- delegateToolDefinition,
127
- analyzeAllToolDefinition,
128
- getExecutePlanToolDefinition,
129
- getCleanupExecutePlanToolDefinition,
130
- attemptCompletionToolDefinition,
131
- bashToolDefinition,
132
- editToolDefinition,
133
- createToolDefinition,
134
- multiEditToolDefinition,
135
- googleSearchToolDefinition,
136
- urlContextToolDefinition,
137
- // Export parser function
138
- parseXmlToolCall,
113
+ listFilesSchema,
114
+ searchFilesSchema,
115
+ readImageSchema,
116
+ listSkillsSchema,
117
+ useSkillSchema,
139
118
  // Export task management
140
119
  TaskManager,
141
120
  taskSchema,
142
- taskToolDefinition,
143
121
  taskSystemPrompt,
144
122
  createTaskTool
145
- };
123
+ };