@probelabs/probe 0.6.0-rc109 → 0.6.0-rc113
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/build/agent/ProbeAgent.js +5 -2
- package/build/agent/index.js +26378 -4808
- package/build/agent/schemaUtils.js +276 -794
- package/cjs/agent/ProbeAgent.cjs +26084 -4514
- package/cjs/index.cjs +26084 -4514
- package/package.json +2 -1
- package/src/agent/ProbeAgent.js +5 -2
- package/src/agent/schemaUtils.js +276 -794
|
@@ -73,6 +73,7 @@ export class ProbeAgent {
|
|
|
73
73
|
* @param {boolean} [options.debug] - Enable debug mode
|
|
74
74
|
* @param {boolean} [options.outline] - Enable outline-xml format for search results
|
|
75
75
|
* @param {number} [options.maxResponseTokens] - Maximum tokens for AI responses
|
|
76
|
+
* @param {number} [options.maxIterations] - Maximum tool iterations (overrides MAX_TOOL_ITERATIONS env var)
|
|
76
77
|
* @param {boolean} [options.disableMermaidValidation=false] - Disable automatic mermaid diagram validation and fixing
|
|
77
78
|
* @param {boolean} [options.enableMcp=false] - Enable MCP tool integration
|
|
78
79
|
* @param {string} [options.mcpConfigPath] - Path to MCP configuration file
|
|
@@ -90,6 +91,7 @@ export class ProbeAgent {
|
|
|
90
91
|
this.tracer = options.tracer || null;
|
|
91
92
|
this.outline = !!options.outline;
|
|
92
93
|
this.maxResponseTokens = options.maxResponseTokens || parseInt(process.env.MAX_RESPONSE_TOKENS || '0', 10) || null;
|
|
94
|
+
this.maxIterations = options.maxIterations || null;
|
|
93
95
|
this.disableMermaidValidation = !!options.disableMermaidValidation;
|
|
94
96
|
|
|
95
97
|
// Bash configuration
|
|
@@ -929,12 +931,13 @@ When troubleshooting:
|
|
|
929
931
|
// +1 for schema formatting
|
|
930
932
|
// +2 for potential Mermaid validation retries (can be multiple diagrams)
|
|
931
933
|
// +1 for potential JSON correction
|
|
932
|
-
const
|
|
934
|
+
const baseMaxIterations = this.maxIterations || MAX_TOOL_ITERATIONS;
|
|
935
|
+
const maxIterations = options.schema ? baseMaxIterations + 4 : baseMaxIterations;
|
|
933
936
|
|
|
934
937
|
if (this.debug) {
|
|
935
938
|
console.log(`[DEBUG] Starting agentic flow for question: ${message.substring(0, 100)}...`);
|
|
936
939
|
if (options.schema) {
|
|
937
|
-
console.log(`[DEBUG] Schema provided, using extended iteration limit: ${maxIterations} (base: ${
|
|
940
|
+
console.log(`[DEBUG] Schema provided, using extended iteration limit: ${maxIterations} (base: ${baseMaxIterations})`);
|
|
938
941
|
}
|
|
939
942
|
}
|
|
940
943
|
|