@probelabs/probe 0.6.0-rc210 → 0.6.0-rc212
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.
- package/bin/binaries/probe-v0.6.0-rc212-aarch64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc212-aarch64-unknown-linux-musl.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc212-x86_64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc212-x86_64-pc-windows-msvc.zip +0 -0
- package/bin/binaries/probe-v0.6.0-rc212-x86_64-unknown-linux-musl.tar.gz +0 -0
- package/build/agent/ProbeAgent.js +19 -3
- package/build/agent/index.js +639 -75
- package/build/agent/probeTool.js +11 -2
- package/build/agent/tools.js +8 -0
- package/build/index.js +6 -1
- package/build/search.js +2 -2
- package/build/tools/analyzeAll.js +624 -0
- package/build/tools/common.js +149 -85
- package/build/tools/langchain.js +1 -1
- package/build/tools/vercel.js +61 -2
- package/cjs/agent/ProbeAgent.cjs +9698 -6756
- package/cjs/index.cjs +9702 -6754
- package/package.json +1 -1
- package/src/agent/ProbeAgent.js +19 -3
- package/src/agent/probeTool.js +11 -2
- package/src/agent/tools.js +8 -0
- package/src/index.js +6 -1
- package/src/search.js +2 -2
- package/src/tools/analyzeAll.js +624 -0
- package/src/tools/common.js +149 -85
- package/src/tools/langchain.js +1 -1
- package/src/tools/vercel.js +61 -2
- package/bin/binaries/probe-v0.6.0-rc210-aarch64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc210-aarch64-unknown-linux-musl.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc210-x86_64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc210-x86_64-pc-windows-msvc.zip +0 -0
- package/bin/binaries/probe-v0.6.0-rc210-x86_64-unknown-linux-musl.tar.gz +0 -0
package/package.json
CHANGED
package/src/agent/ProbeAgent.js
CHANGED
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
queryToolDefinition,
|
|
25
25
|
extractToolDefinition,
|
|
26
26
|
delegateToolDefinition,
|
|
27
|
+
analyzeAllToolDefinition,
|
|
27
28
|
bashToolDefinition,
|
|
28
29
|
listFilesToolDefinition,
|
|
29
30
|
searchFilesToolDefinition,
|
|
@@ -561,6 +562,9 @@ export class ProbeAgent {
|
|
|
561
562
|
if (this.enableDelegate && wrappedTools.delegateToolInstance && isToolAllowed('delegate')) {
|
|
562
563
|
this.toolImplementations.delegate = wrappedTools.delegateToolInstance;
|
|
563
564
|
}
|
|
565
|
+
if (wrappedTools.analyzeAllToolInstance && isToolAllowed('analyze_all')) {
|
|
566
|
+
this.toolImplementations.analyze_all = wrappedTools.analyzeAllToolInstance;
|
|
567
|
+
}
|
|
564
568
|
|
|
565
569
|
// File browsing tools
|
|
566
570
|
if (isToolAllowed('listFiles')) {
|
|
@@ -2065,6 +2069,11 @@ ${extractGuidance}
|
|
|
2065
2069
|
toolDefinitions += `${delegateToolDefinition}\n`;
|
|
2066
2070
|
}
|
|
2067
2071
|
|
|
2072
|
+
// Analyze All tool for bulk data processing
|
|
2073
|
+
if (isToolAllowed('analyze_all')) {
|
|
2074
|
+
toolDefinitions += `${analyzeAllToolDefinition}\n`;
|
|
2075
|
+
}
|
|
2076
|
+
|
|
2068
2077
|
// Build XML tool guidelines with dynamic examples based on allowed tools
|
|
2069
2078
|
// Build examples only for allowed tools
|
|
2070
2079
|
let toolExamples = '';
|
|
@@ -2129,6 +2138,9 @@ The configuration is loaded from src/config.js lines 15-25 which contains the da
|
|
|
2129
2138
|
if (this.enableDelegate && isToolAllowed('delegate')) {
|
|
2130
2139
|
availableToolsList += '- delegate: Delegate big distinct tasks to specialized probe subagents.\n';
|
|
2131
2140
|
}
|
|
2141
|
+
if (isToolAllowed('analyze_all')) {
|
|
2142
|
+
availableToolsList += '- analyze_all: Process ALL data matching a query using map-reduce (for aggregate questions needing 100% coverage).\n';
|
|
2143
|
+
}
|
|
2132
2144
|
if (this.enableBash && isToolAllowed('bash')) {
|
|
2133
2145
|
availableToolsList += '- bash: Execute bash commands for system operations.\n';
|
|
2134
2146
|
}
|
|
@@ -2642,11 +2654,11 @@ Follow these instructions carefully:
|
|
|
2642
2654
|
if (!maxResponseTokens) {
|
|
2643
2655
|
// Use model-based defaults if not explicitly configured
|
|
2644
2656
|
maxResponseTokens = 4000;
|
|
2645
|
-
if (this.model.includes('opus') || this.model.includes('sonnet') || this.model.startsWith('gpt-4-')) {
|
|
2657
|
+
if (this.model && this.model.includes('opus') || this.model && this.model.includes('sonnet') || this.model && this.model.startsWith('gpt-4-')) {
|
|
2646
2658
|
maxResponseTokens = 8192;
|
|
2647
|
-
} else if (this.model.startsWith('gpt-4o')) {
|
|
2659
|
+
} else if (this.model && this.model.startsWith('gpt-4o')) {
|
|
2648
2660
|
maxResponseTokens = 8192;
|
|
2649
|
-
} else if (this.model.startsWith('gemini')) {
|
|
2661
|
+
} else if (this.model && this.model.startsWith('gemini')) {
|
|
2650
2662
|
maxResponseTokens = 32000;
|
|
2651
2663
|
}
|
|
2652
2664
|
}
|
|
@@ -2820,6 +2832,10 @@ Follow these instructions carefully:
|
|
|
2820
2832
|
if (this.enableDelegate && this.allowedTools.isEnabled('delegate')) {
|
|
2821
2833
|
validTools.push('delegate');
|
|
2822
2834
|
}
|
|
2835
|
+
// Analyze All tool (for bulk data processing with map-reduce)
|
|
2836
|
+
if (this.allowedTools.isEnabled('analyze_all')) {
|
|
2837
|
+
validTools.push('analyze_all');
|
|
2838
|
+
}
|
|
2823
2839
|
// Task tool (require both enableTasks flag AND allowedTools permission)
|
|
2824
2840
|
if (this.enableTasks && this.allowedTools.isEnabled('task')) {
|
|
2825
2841
|
validTools.push('task');
|
package/src/agent/probeTool.js
CHANGED
|
@@ -196,12 +196,21 @@ export function createWrappedTools(baseTools) {
|
|
|
196
196
|
// Wrap delegate tool
|
|
197
197
|
if (baseTools.delegateTool) {
|
|
198
198
|
wrappedTools.delegateToolInstance = wrapToolWithEmitter(
|
|
199
|
-
baseTools.delegateTool,
|
|
200
|
-
'delegate',
|
|
199
|
+
baseTools.delegateTool,
|
|
200
|
+
'delegate',
|
|
201
201
|
baseTools.delegateTool.execute
|
|
202
202
|
);
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
+
// Wrap analyze_all tool
|
|
206
|
+
if (baseTools.analyzeAllTool) {
|
|
207
|
+
wrappedTools.analyzeAllToolInstance = wrapToolWithEmitter(
|
|
208
|
+
baseTools.analyzeAllTool,
|
|
209
|
+
'analyze_all',
|
|
210
|
+
baseTools.analyzeAllTool.execute
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
|
|
205
214
|
// Wrap bash tool
|
|
206
215
|
if (baseTools.bashTool) {
|
|
207
216
|
wrappedTools.bashToolInstance = wrapToolWithEmitter(
|
package/src/agent/tools.js
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
queryTool,
|
|
5
5
|
extractTool,
|
|
6
6
|
delegateTool,
|
|
7
|
+
analyzeAllTool,
|
|
7
8
|
bashTool,
|
|
8
9
|
editTool,
|
|
9
10
|
createTool,
|
|
@@ -14,6 +15,7 @@ import {
|
|
|
14
15
|
querySchema,
|
|
15
16
|
extractSchema,
|
|
16
17
|
delegateSchema,
|
|
18
|
+
analyzeAllSchema,
|
|
17
19
|
bashSchema,
|
|
18
20
|
editSchema,
|
|
19
21
|
createSchema,
|
|
@@ -21,6 +23,7 @@ import {
|
|
|
21
23
|
queryToolDefinition,
|
|
22
24
|
extractToolDefinition,
|
|
23
25
|
delegateToolDefinition,
|
|
26
|
+
analyzeAllToolDefinition,
|
|
24
27
|
bashToolDefinition,
|
|
25
28
|
editToolDefinition,
|
|
26
29
|
createToolDefinition,
|
|
@@ -53,6 +56,9 @@ export function createTools(configOptions) {
|
|
|
53
56
|
if (configOptions.enableDelegate && isToolAllowed('delegate')) {
|
|
54
57
|
tools.delegateTool = delegateTool(configOptions);
|
|
55
58
|
}
|
|
59
|
+
if (isToolAllowed('analyze_all')) {
|
|
60
|
+
tools.analyzeAllTool = analyzeAllTool(configOptions);
|
|
61
|
+
}
|
|
56
62
|
|
|
57
63
|
// Add bash tool if enabled
|
|
58
64
|
if (configOptions.enableBash && isToolAllowed('bash')) {
|
|
@@ -88,6 +94,7 @@ export {
|
|
|
88
94
|
querySchema,
|
|
89
95
|
extractSchema,
|
|
90
96
|
delegateSchema,
|
|
97
|
+
analyzeAllSchema,
|
|
91
98
|
bashSchema,
|
|
92
99
|
editSchema,
|
|
93
100
|
createSchema,
|
|
@@ -96,6 +103,7 @@ export {
|
|
|
96
103
|
queryToolDefinition,
|
|
97
104
|
extractToolDefinition,
|
|
98
105
|
delegateToolDefinition,
|
|
106
|
+
analyzeAllToolDefinition,
|
|
99
107
|
bashToolDefinition,
|
|
100
108
|
editToolDefinition,
|
|
101
109
|
createToolDefinition,
|
package/src/index.js
CHANGED
|
@@ -25,12 +25,14 @@ import {
|
|
|
25
25
|
querySchema,
|
|
26
26
|
extractSchema,
|
|
27
27
|
delegateSchema,
|
|
28
|
+
analyzeAllSchema,
|
|
28
29
|
attemptCompletionSchema,
|
|
29
30
|
bashSchema,
|
|
30
31
|
searchToolDefinition,
|
|
31
32
|
queryToolDefinition,
|
|
32
33
|
extractToolDefinition,
|
|
33
34
|
delegateToolDefinition,
|
|
35
|
+
analyzeAllToolDefinition,
|
|
34
36
|
attemptCompletionToolDefinition,
|
|
35
37
|
bashToolDefinition,
|
|
36
38
|
parseXmlToolCall
|
|
@@ -41,7 +43,7 @@ import {
|
|
|
41
43
|
editToolDefinition,
|
|
42
44
|
createToolDefinition
|
|
43
45
|
} from './tools/edit.js';
|
|
44
|
-
import { searchTool, queryTool, extractTool, delegateTool } from './tools/vercel.js';
|
|
46
|
+
import { searchTool, queryTool, extractTool, delegateTool, analyzeAllTool } from './tools/vercel.js';
|
|
45
47
|
import { bashTool } from './tools/bash.js';
|
|
46
48
|
import { editTool, createTool } from './tools/edit.js';
|
|
47
49
|
import { ProbeAgent } from './agent/ProbeAgent.js';
|
|
@@ -85,6 +87,7 @@ export {
|
|
|
85
87
|
queryTool,
|
|
86
88
|
extractTool,
|
|
87
89
|
delegateTool,
|
|
90
|
+
analyzeAllTool,
|
|
88
91
|
bashTool,
|
|
89
92
|
editTool,
|
|
90
93
|
createTool,
|
|
@@ -96,6 +99,7 @@ export {
|
|
|
96
99
|
querySchema,
|
|
97
100
|
extractSchema,
|
|
98
101
|
delegateSchema,
|
|
102
|
+
analyzeAllSchema,
|
|
99
103
|
attemptCompletionSchema,
|
|
100
104
|
bashSchema,
|
|
101
105
|
editSchema,
|
|
@@ -105,6 +109,7 @@ export {
|
|
|
105
109
|
queryToolDefinition,
|
|
106
110
|
extractToolDefinition,
|
|
107
111
|
delegateToolDefinition,
|
|
112
|
+
analyzeAllToolDefinition,
|
|
108
113
|
attemptCompletionToolDefinition,
|
|
109
114
|
bashToolDefinition,
|
|
110
115
|
editToolDefinition,
|
package/src/search.js
CHANGED
|
@@ -94,8 +94,8 @@ export async function search(options) {
|
|
|
94
94
|
|
|
95
95
|
// Set default maxTokens if not provided
|
|
96
96
|
if (!options.maxTokens) {
|
|
97
|
-
options.maxTokens =
|
|
98
|
-
cliArgs.push('--max-tokens', '
|
|
97
|
+
options.maxTokens = 20000;
|
|
98
|
+
cliArgs.push('--max-tokens', '20000');
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
// Set default timeout if not provided
|