@probelabs/probe 0.6.0-rc231 → 0.6.0-rc233
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-rc233-aarch64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc233-aarch64-unknown-linux-musl.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc233-x86_64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc233-x86_64-pc-windows-msvc.zip +0 -0
- package/bin/binaries/probe-v0.6.0-rc233-x86_64-unknown-linux-musl.tar.gz +0 -0
- package/build/agent/ProbeAgent.d.ts +2 -0
- package/build/agent/ProbeAgent.js +105 -12
- package/build/agent/dsl/agent-test.mjs +341 -0
- package/build/agent/dsl/analyze-test.mjs +237 -0
- package/build/agent/dsl/diag-test.mjs +78 -0
- package/build/agent/dsl/environment.js +387 -0
- package/build/agent/dsl/manual-test.mjs +662 -0
- package/build/agent/dsl/output-buffer-test.mjs +124 -0
- package/build/agent/dsl/pipeline-direct-test.mjs +147 -0
- package/build/agent/dsl/pipeline-test.mjs +223 -0
- package/build/agent/dsl/runtime.js +206 -0
- package/build/agent/dsl/sandbox-experiment.mjs +309 -0
- package/build/agent/dsl/transformer.js +156 -0
- package/build/agent/dsl/trigger-test.mjs +159 -0
- package/build/agent/dsl/validator.js +183 -0
- package/build/agent/index.js +18776 -7675
- package/build/agent/probeTool.js +9 -0
- package/build/agent/tools.js +9 -1
- package/build/delegate.js +12 -6
- package/build/index.js +5 -0
- package/build/tools/common.js +7 -0
- package/build/tools/executePlan.js +761 -0
- package/build/tools/index.js +4 -0
- package/cjs/agent/ProbeAgent.cjs +12891 -1797
- package/cjs/index.cjs +12395 -1292
- package/package.json +5 -1
- package/src/agent/ProbeAgent.d.ts +2 -0
- package/src/agent/ProbeAgent.js +105 -12
- package/src/agent/dsl/agent-test.mjs +341 -0
- package/src/agent/dsl/analyze-test.mjs +237 -0
- package/src/agent/dsl/diag-test.mjs +78 -0
- package/src/agent/dsl/environment.js +387 -0
- package/src/agent/dsl/manual-test.mjs +662 -0
- package/src/agent/dsl/output-buffer-test.mjs +124 -0
- package/src/agent/dsl/pipeline-direct-test.mjs +147 -0
- package/src/agent/dsl/pipeline-test.mjs +223 -0
- package/src/agent/dsl/runtime.js +206 -0
- package/src/agent/dsl/sandbox-experiment.mjs +309 -0
- package/src/agent/dsl/transformer.js +156 -0
- package/src/agent/dsl/trigger-test.mjs +159 -0
- package/src/agent/dsl/validator.js +183 -0
- package/src/agent/index.js +8 -0
- package/src/agent/probeTool.js +9 -0
- package/src/agent/tools.js +9 -1
- package/src/delegate.js +12 -6
- package/src/index.js +5 -0
- package/src/tools/common.js +7 -0
- package/src/tools/executePlan.js +761 -0
- package/src/tools/index.js +4 -0
- package/bin/binaries/probe-v0.6.0-rc231-aarch64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc231-aarch64-unknown-linux-musl.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc231-x86_64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc231-x86_64-pc-windows-msvc.zip +0 -0
- package/bin/binaries/probe-v0.6.0-rc231-x86_64-unknown-linux-musl.tar.gz +0 -0
package/build/agent/probeTool.js
CHANGED
|
@@ -211,6 +211,15 @@ export function createWrappedTools(baseTools) {
|
|
|
211
211
|
);
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
+
// Wrap execute_plan tool
|
|
215
|
+
if (baseTools.executePlanTool) {
|
|
216
|
+
wrappedTools.executePlanToolInstance = wrapToolWithEmitter(
|
|
217
|
+
baseTools.executePlanTool,
|
|
218
|
+
'execute_plan',
|
|
219
|
+
baseTools.executePlanTool.execute
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
|
|
214
223
|
// Wrap bash tool
|
|
215
224
|
if (baseTools.bashTool) {
|
|
216
225
|
wrappedTools.bashToolInstance = wrapToolWithEmitter(
|
package/build/agent/tools.js
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
extractTool,
|
|
6
6
|
delegateTool,
|
|
7
7
|
analyzeAllTool,
|
|
8
|
+
createExecutePlanTool,
|
|
8
9
|
bashTool,
|
|
9
10
|
editTool,
|
|
10
11
|
createTool,
|
|
@@ -16,6 +17,7 @@ import {
|
|
|
16
17
|
extractSchema,
|
|
17
18
|
delegateSchema,
|
|
18
19
|
analyzeAllSchema,
|
|
20
|
+
executePlanSchema,
|
|
19
21
|
bashSchema,
|
|
20
22
|
editSchema,
|
|
21
23
|
createSchema,
|
|
@@ -24,6 +26,7 @@ import {
|
|
|
24
26
|
extractToolDefinition,
|
|
25
27
|
delegateToolDefinition,
|
|
26
28
|
analyzeAllToolDefinition,
|
|
29
|
+
getExecutePlanToolDefinition,
|
|
27
30
|
bashToolDefinition,
|
|
28
31
|
editToolDefinition,
|
|
29
32
|
createToolDefinition,
|
|
@@ -58,7 +61,10 @@ export function createTools(configOptions) {
|
|
|
58
61
|
if (configOptions.enableDelegate && isToolAllowed('delegate')) {
|
|
59
62
|
tools.delegateTool = delegateTool(configOptions);
|
|
60
63
|
}
|
|
61
|
-
if (isToolAllowed('
|
|
64
|
+
if (configOptions.enableExecutePlan && isToolAllowed('execute_plan')) {
|
|
65
|
+
tools.executePlanTool = createExecutePlanTool(configOptions);
|
|
66
|
+
} else if (isToolAllowed('analyze_all')) {
|
|
67
|
+
// analyze_all is fallback when execute_plan is not enabled
|
|
62
68
|
tools.analyzeAllTool = analyzeAllTool(configOptions);
|
|
63
69
|
}
|
|
64
70
|
|
|
@@ -97,6 +103,7 @@ export {
|
|
|
97
103
|
extractSchema,
|
|
98
104
|
delegateSchema,
|
|
99
105
|
analyzeAllSchema,
|
|
106
|
+
executePlanSchema,
|
|
100
107
|
bashSchema,
|
|
101
108
|
editSchema,
|
|
102
109
|
createSchema,
|
|
@@ -106,6 +113,7 @@ export {
|
|
|
106
113
|
extractToolDefinition,
|
|
107
114
|
delegateToolDefinition,
|
|
108
115
|
analyzeAllToolDefinition,
|
|
116
|
+
getExecutePlanToolDefinition,
|
|
109
117
|
bashToolDefinition,
|
|
110
118
|
editToolDefinition,
|
|
111
119
|
createToolDefinition,
|
package/build/delegate.js
CHANGED
|
@@ -19,11 +19,14 @@ import { ProbeAgent } from './agent/ProbeAgent.js';
|
|
|
19
19
|
* - For long-running processes, periodic cleanup of stale sessions may be needed
|
|
20
20
|
*/
|
|
21
21
|
class DelegationManager {
|
|
22
|
-
constructor() {
|
|
23
|
-
this.maxConcurrent =
|
|
24
|
-
|
|
22
|
+
constructor(options = {}) {
|
|
23
|
+
this.maxConcurrent = options.maxConcurrent
|
|
24
|
+
?? parseInt(process.env.MAX_CONCURRENT_DELEGATIONS || '3', 10);
|
|
25
|
+
this.maxPerSession = options.maxPerSession
|
|
26
|
+
?? parseInt(process.env.MAX_DELEGATIONS_PER_SESSION || '10', 10);
|
|
25
27
|
// Default queue timeout: 60 seconds. Set DELEGATION_QUEUE_TIMEOUT=0 to disable.
|
|
26
|
-
this.defaultQueueTimeout =
|
|
28
|
+
this.defaultQueueTimeout = options.queueTimeout
|
|
29
|
+
?? parseInt(process.env.DELEGATION_QUEUE_TIMEOUT || '60000', 10);
|
|
27
30
|
|
|
28
31
|
// Track delegations per session with timestamp for potential TTL cleanup
|
|
29
32
|
// Map<string, { count: number, lastUpdated: number }>
|
|
@@ -353,6 +356,7 @@ const DEFAULT_DELEGATE_TIMEOUT = parseInt(process.env.DELEGATE_TIMEOUT, 10) || 3
|
|
|
353
356
|
* @param {boolean} [options.enableMcp=false] - Enable MCP tool integration (inherited from parent)
|
|
354
357
|
* @param {Object} [options.mcpConfig] - MCP configuration object (inherited from parent)
|
|
355
358
|
* @param {string} [options.mcpConfigPath] - Path to MCP configuration file (inherited from parent)
|
|
359
|
+
* @param {Object} [options.concurrencyLimiter=null] - Global AI concurrency limiter (DelegationManager instance)
|
|
356
360
|
* @returns {Promise<string>} The response from the delegate agent
|
|
357
361
|
*/
|
|
358
362
|
export async function delegate({
|
|
@@ -379,7 +383,8 @@ export async function delegate({
|
|
|
379
383
|
enableMcp = false,
|
|
380
384
|
mcpConfig = null,
|
|
381
385
|
mcpConfigPath = null,
|
|
382
|
-
delegationManager = null // Optional per-instance manager, falls back to default singleton
|
|
386
|
+
delegationManager = null, // Optional per-instance manager, falls back to default singleton
|
|
387
|
+
concurrencyLimiter = null // Optional global AI concurrency limiter
|
|
383
388
|
}) {
|
|
384
389
|
if (!task || typeof task !== 'string') {
|
|
385
390
|
throw new Error('Task parameter is required and must be a string');
|
|
@@ -464,7 +469,8 @@ export async function delegate({
|
|
|
464
469
|
enableTasks, // Inherit from parent (subagent gets isolated TaskManager)
|
|
465
470
|
enableMcp, // Inherit from parent (subagent creates own MCPXmlBridge)
|
|
466
471
|
mcpConfig, // Inherit from parent
|
|
467
|
-
mcpConfigPath // Inherit from parent
|
|
472
|
+
mcpConfigPath, // Inherit from parent
|
|
473
|
+
concurrencyLimiter // Inherit global AI concurrency limiter
|
|
468
474
|
});
|
|
469
475
|
|
|
470
476
|
if (debug) {
|
package/build/index.js
CHANGED
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
extractSchema,
|
|
27
27
|
delegateSchema,
|
|
28
28
|
analyzeAllSchema,
|
|
29
|
+
executePlanSchema,
|
|
29
30
|
attemptCompletionSchema,
|
|
30
31
|
bashSchema,
|
|
31
32
|
searchToolDefinition,
|
|
@@ -46,6 +47,7 @@ import {
|
|
|
46
47
|
createToolDefinition
|
|
47
48
|
} from './tools/edit.js';
|
|
48
49
|
import { searchTool, queryTool, extractTool, delegateTool, analyzeAllTool } from './tools/vercel.js';
|
|
50
|
+
import { createExecutePlanTool, getExecutePlanToolDefinition } from './tools/executePlan.js';
|
|
49
51
|
import { bashTool } from './tools/bash.js';
|
|
50
52
|
import { editTool, createTool } from './tools/edit.js';
|
|
51
53
|
import { ProbeAgent } from './agent/ProbeAgent.js';
|
|
@@ -90,6 +92,7 @@ export {
|
|
|
90
92
|
extractTool,
|
|
91
93
|
delegateTool,
|
|
92
94
|
analyzeAllTool,
|
|
95
|
+
createExecutePlanTool,
|
|
93
96
|
bashTool,
|
|
94
97
|
editTool,
|
|
95
98
|
createTool,
|
|
@@ -102,6 +105,7 @@ export {
|
|
|
102
105
|
extractSchema,
|
|
103
106
|
delegateSchema,
|
|
104
107
|
analyzeAllSchema,
|
|
108
|
+
executePlanSchema,
|
|
105
109
|
attemptCompletionSchema,
|
|
106
110
|
bashSchema,
|
|
107
111
|
editSchema,
|
|
@@ -112,6 +116,7 @@ export {
|
|
|
112
116
|
extractToolDefinition,
|
|
113
117
|
delegateToolDefinition,
|
|
114
118
|
analyzeAllToolDefinition,
|
|
119
|
+
getExecutePlanToolDefinition,
|
|
115
120
|
attemptCompletionToolDefinition,
|
|
116
121
|
bashToolDefinition,
|
|
117
122
|
editToolDefinition,
|
package/build/tools/common.js
CHANGED
|
@@ -54,6 +54,11 @@ export const analyzeAllSchema = z.object({
|
|
|
54
54
|
path: z.string().optional().default('.').describe('Directory path to search in')
|
|
55
55
|
});
|
|
56
56
|
|
|
57
|
+
export const executePlanSchema = z.object({
|
|
58
|
+
code: z.string().min(1).describe('JavaScript DSL code to execute. All function calls look synchronous — do NOT use async/await. Use map(items, fn) for batch operations. Use LLM(instruction, data) for AI processing.'),
|
|
59
|
+
description: z.string().optional().describe('Human-readable description of what this plan does, for logging.')
|
|
60
|
+
});
|
|
61
|
+
|
|
57
62
|
// Schema for the attempt_completion tool - flexible validation for direct XML response
|
|
58
63
|
export const attemptCompletionSchema = {
|
|
59
64
|
// Custom validation that requires result parameter but allows direct XML response
|
|
@@ -425,6 +430,7 @@ export const DEFAULT_VALID_TOOLS = [
|
|
|
425
430
|
'extract',
|
|
426
431
|
'delegate',
|
|
427
432
|
'analyze_all',
|
|
433
|
+
'execute_plan',
|
|
428
434
|
'listSkills',
|
|
429
435
|
'useSkill',
|
|
430
436
|
'listFiles',
|
|
@@ -463,6 +469,7 @@ function getValidParamsForTool(toolName) {
|
|
|
463
469
|
extract: extractSchema,
|
|
464
470
|
delegate: delegateSchema,
|
|
465
471
|
analyze_all: analyzeAllSchema,
|
|
472
|
+
execute_plan: executePlanSchema,
|
|
466
473
|
listSkills: listSkillsSchema,
|
|
467
474
|
useSkill: useSkillSchema,
|
|
468
475
|
bash: bashSchema,
|