@probelabs/probe 0.6.0-rc112 → 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 +127 -124
- package/build/agent/schemaUtils.js +7 -5
- package/cjs/agent/ProbeAgent.cjs +127 -124
- package/cjs/index.cjs +127 -124
- package/package.json +1 -1
- package/src/agent/ProbeAgent.js +5 -2
- package/src/agent/schemaUtils.js +7 -5
|
@@ -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
|
|
package/build/agent/index.js
CHANGED
|
@@ -16653,7 +16653,7 @@ var require_package = __commonJS({
|
|
|
16653
16653
|
module2.exports = {
|
|
16654
16654
|
name: "@aws-sdk/client-bedrock-runtime",
|
|
16655
16655
|
description: "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
|
|
16656
|
-
version: "3.
|
|
16656
|
+
version: "3.901.0",
|
|
16657
16657
|
scripts: {
|
|
16658
16658
|
build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
16659
16659
|
"build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
|
|
@@ -16672,51 +16672,51 @@ var require_package = __commonJS({
|
|
|
16672
16672
|
dependencies: {
|
|
16673
16673
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
16674
16674
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
16675
|
-
"@aws-sdk/core": "3.
|
|
16676
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
16677
|
-
"@aws-sdk/eventstream-handler-node": "3.
|
|
16678
|
-
"@aws-sdk/middleware-eventstream": "3.
|
|
16679
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
16680
|
-
"@aws-sdk/middleware-logger": "3.
|
|
16681
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
16682
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
16683
|
-
"@aws-sdk/middleware-websocket": "3.
|
|
16684
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
16685
|
-
"@aws-sdk/token-providers": "3.
|
|
16686
|
-
"@aws-sdk/types": "3.
|
|
16687
|
-
"@aws-sdk/util-endpoints": "3.
|
|
16688
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
16689
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
16690
|
-
"@smithy/config-resolver": "^4.
|
|
16691
|
-
"@smithy/core": "^3.
|
|
16692
|
-
"@smithy/eventstream-serde-browser": "^4.
|
|
16693
|
-
"@smithy/eventstream-serde-config-resolver": "^4.
|
|
16694
|
-
"@smithy/eventstream-serde-node": "^4.
|
|
16695
|
-
"@smithy/fetch-http-handler": "^5.
|
|
16696
|
-
"@smithy/hash-node": "^4.
|
|
16697
|
-
"@smithy/invalid-dependency": "^4.
|
|
16698
|
-
"@smithy/middleware-content-length": "^4.
|
|
16699
|
-
"@smithy/middleware-endpoint": "^4.
|
|
16700
|
-
"@smithy/middleware-retry": "^4.
|
|
16701
|
-
"@smithy/middleware-serde": "^4.
|
|
16702
|
-
"@smithy/middleware-stack": "^4.
|
|
16703
|
-
"@smithy/node-config-provider": "^4.
|
|
16704
|
-
"@smithy/node-http-handler": "^4.
|
|
16705
|
-
"@smithy/protocol-http": "^5.
|
|
16706
|
-
"@smithy/smithy-client": "^4.
|
|
16707
|
-
"@smithy/types": "^4.
|
|
16708
|
-
"@smithy/url-parser": "^4.
|
|
16709
|
-
"@smithy/util-base64": "^4.
|
|
16710
|
-
"@smithy/util-body-length-browser": "^4.
|
|
16711
|
-
"@smithy/util-body-length-node": "^4.
|
|
16712
|
-
"@smithy/util-defaults-mode-browser": "^4.
|
|
16713
|
-
"@smithy/util-defaults-mode-node": "^4.
|
|
16714
|
-
"@smithy/util-endpoints": "^3.
|
|
16715
|
-
"@smithy/util-middleware": "^4.
|
|
16716
|
-
"@smithy/util-retry": "^4.
|
|
16717
|
-
"@smithy/util-stream": "^4.
|
|
16718
|
-
"@smithy/util-utf8": "^4.
|
|
16719
|
-
"@smithy/uuid": "^1.
|
|
16675
|
+
"@aws-sdk/core": "3.901.0",
|
|
16676
|
+
"@aws-sdk/credential-provider-node": "3.901.0",
|
|
16677
|
+
"@aws-sdk/eventstream-handler-node": "3.901.0",
|
|
16678
|
+
"@aws-sdk/middleware-eventstream": "3.901.0",
|
|
16679
|
+
"@aws-sdk/middleware-host-header": "3.901.0",
|
|
16680
|
+
"@aws-sdk/middleware-logger": "3.901.0",
|
|
16681
|
+
"@aws-sdk/middleware-recursion-detection": "3.901.0",
|
|
16682
|
+
"@aws-sdk/middleware-user-agent": "3.901.0",
|
|
16683
|
+
"@aws-sdk/middleware-websocket": "3.901.0",
|
|
16684
|
+
"@aws-sdk/region-config-resolver": "3.901.0",
|
|
16685
|
+
"@aws-sdk/token-providers": "3.901.0",
|
|
16686
|
+
"@aws-sdk/types": "3.901.0",
|
|
16687
|
+
"@aws-sdk/util-endpoints": "3.901.0",
|
|
16688
|
+
"@aws-sdk/util-user-agent-browser": "3.901.0",
|
|
16689
|
+
"@aws-sdk/util-user-agent-node": "3.901.0",
|
|
16690
|
+
"@smithy/config-resolver": "^4.3.0",
|
|
16691
|
+
"@smithy/core": "^3.14.0",
|
|
16692
|
+
"@smithy/eventstream-serde-browser": "^4.2.0",
|
|
16693
|
+
"@smithy/eventstream-serde-config-resolver": "^4.3.0",
|
|
16694
|
+
"@smithy/eventstream-serde-node": "^4.2.0",
|
|
16695
|
+
"@smithy/fetch-http-handler": "^5.3.0",
|
|
16696
|
+
"@smithy/hash-node": "^4.2.0",
|
|
16697
|
+
"@smithy/invalid-dependency": "^4.2.0",
|
|
16698
|
+
"@smithy/middleware-content-length": "^4.2.0",
|
|
16699
|
+
"@smithy/middleware-endpoint": "^4.3.0",
|
|
16700
|
+
"@smithy/middleware-retry": "^4.4.0",
|
|
16701
|
+
"@smithy/middleware-serde": "^4.2.0",
|
|
16702
|
+
"@smithy/middleware-stack": "^4.2.0",
|
|
16703
|
+
"@smithy/node-config-provider": "^4.3.0",
|
|
16704
|
+
"@smithy/node-http-handler": "^4.3.0",
|
|
16705
|
+
"@smithy/protocol-http": "^5.3.0",
|
|
16706
|
+
"@smithy/smithy-client": "^4.7.0",
|
|
16707
|
+
"@smithy/types": "^4.6.0",
|
|
16708
|
+
"@smithy/url-parser": "^4.2.0",
|
|
16709
|
+
"@smithy/util-base64": "^4.2.0",
|
|
16710
|
+
"@smithy/util-body-length-browser": "^4.2.0",
|
|
16711
|
+
"@smithy/util-body-length-node": "^4.2.0",
|
|
16712
|
+
"@smithy/util-defaults-mode-browser": "^4.2.0",
|
|
16713
|
+
"@smithy/util-defaults-mode-node": "^4.2.0",
|
|
16714
|
+
"@smithy/util-endpoints": "^3.2.0",
|
|
16715
|
+
"@smithy/util-middleware": "^4.2.0",
|
|
16716
|
+
"@smithy/util-retry": "^4.2.0",
|
|
16717
|
+
"@smithy/util-stream": "^4.4.0",
|
|
16718
|
+
"@smithy/util-utf8": "^4.2.0",
|
|
16719
|
+
"@smithy/uuid": "^1.1.0",
|
|
16720
16720
|
tslib: "^2.6.2"
|
|
16721
16721
|
},
|
|
16722
16722
|
devDependencies: {
|
|
@@ -17453,7 +17453,7 @@ var require_package2 = __commonJS({
|
|
|
17453
17453
|
module2.exports = {
|
|
17454
17454
|
name: "@aws-sdk/client-sso",
|
|
17455
17455
|
description: "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",
|
|
17456
|
-
version: "3.
|
|
17456
|
+
version: "3.901.0",
|
|
17457
17457
|
scripts: {
|
|
17458
17458
|
build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
17459
17459
|
"build:cjs": "node ../../scripts/compilation/inline client-sso",
|
|
@@ -17472,41 +17472,41 @@ var require_package2 = __commonJS({
|
|
|
17472
17472
|
dependencies: {
|
|
17473
17473
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
17474
17474
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
17475
|
-
"@aws-sdk/core": "3.
|
|
17476
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
17477
|
-
"@aws-sdk/middleware-logger": "3.
|
|
17478
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
17479
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
17480
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
17481
|
-
"@aws-sdk/types": "3.
|
|
17482
|
-
"@aws-sdk/util-endpoints": "3.
|
|
17483
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
17484
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
17485
|
-
"@smithy/config-resolver": "^4.
|
|
17486
|
-
"@smithy/core": "^3.
|
|
17487
|
-
"@smithy/fetch-http-handler": "^5.
|
|
17488
|
-
"@smithy/hash-node": "^4.
|
|
17489
|
-
"@smithy/invalid-dependency": "^4.
|
|
17490
|
-
"@smithy/middleware-content-length": "^4.
|
|
17491
|
-
"@smithy/middleware-endpoint": "^4.
|
|
17492
|
-
"@smithy/middleware-retry": "^4.
|
|
17493
|
-
"@smithy/middleware-serde": "^4.
|
|
17494
|
-
"@smithy/middleware-stack": "^4.
|
|
17495
|
-
"@smithy/node-config-provider": "^4.
|
|
17496
|
-
"@smithy/node-http-handler": "^4.
|
|
17497
|
-
"@smithy/protocol-http": "^5.
|
|
17498
|
-
"@smithy/smithy-client": "^4.
|
|
17499
|
-
"@smithy/types": "^4.
|
|
17500
|
-
"@smithy/url-parser": "^4.
|
|
17501
|
-
"@smithy/util-base64": "^4.
|
|
17502
|
-
"@smithy/util-body-length-browser": "^4.
|
|
17503
|
-
"@smithy/util-body-length-node": "^4.
|
|
17504
|
-
"@smithy/util-defaults-mode-browser": "^4.
|
|
17505
|
-
"@smithy/util-defaults-mode-node": "^4.
|
|
17506
|
-
"@smithy/util-endpoints": "^3.
|
|
17507
|
-
"@smithy/util-middleware": "^4.
|
|
17508
|
-
"@smithy/util-retry": "^4.
|
|
17509
|
-
"@smithy/util-utf8": "^4.
|
|
17475
|
+
"@aws-sdk/core": "3.901.0",
|
|
17476
|
+
"@aws-sdk/middleware-host-header": "3.901.0",
|
|
17477
|
+
"@aws-sdk/middleware-logger": "3.901.0",
|
|
17478
|
+
"@aws-sdk/middleware-recursion-detection": "3.901.0",
|
|
17479
|
+
"@aws-sdk/middleware-user-agent": "3.901.0",
|
|
17480
|
+
"@aws-sdk/region-config-resolver": "3.901.0",
|
|
17481
|
+
"@aws-sdk/types": "3.901.0",
|
|
17482
|
+
"@aws-sdk/util-endpoints": "3.901.0",
|
|
17483
|
+
"@aws-sdk/util-user-agent-browser": "3.901.0",
|
|
17484
|
+
"@aws-sdk/util-user-agent-node": "3.901.0",
|
|
17485
|
+
"@smithy/config-resolver": "^4.3.0",
|
|
17486
|
+
"@smithy/core": "^3.14.0",
|
|
17487
|
+
"@smithy/fetch-http-handler": "^5.3.0",
|
|
17488
|
+
"@smithy/hash-node": "^4.2.0",
|
|
17489
|
+
"@smithy/invalid-dependency": "^4.2.0",
|
|
17490
|
+
"@smithy/middleware-content-length": "^4.2.0",
|
|
17491
|
+
"@smithy/middleware-endpoint": "^4.3.0",
|
|
17492
|
+
"@smithy/middleware-retry": "^4.4.0",
|
|
17493
|
+
"@smithy/middleware-serde": "^4.2.0",
|
|
17494
|
+
"@smithy/middleware-stack": "^4.2.0",
|
|
17495
|
+
"@smithy/node-config-provider": "^4.3.0",
|
|
17496
|
+
"@smithy/node-http-handler": "^4.3.0",
|
|
17497
|
+
"@smithy/protocol-http": "^5.3.0",
|
|
17498
|
+
"@smithy/smithy-client": "^4.7.0",
|
|
17499
|
+
"@smithy/types": "^4.6.0",
|
|
17500
|
+
"@smithy/url-parser": "^4.2.0",
|
|
17501
|
+
"@smithy/util-base64": "^4.2.0",
|
|
17502
|
+
"@smithy/util-body-length-browser": "^4.2.0",
|
|
17503
|
+
"@smithy/util-body-length-node": "^4.2.0",
|
|
17504
|
+
"@smithy/util-defaults-mode-browser": "^4.2.0",
|
|
17505
|
+
"@smithy/util-defaults-mode-node": "^4.2.0",
|
|
17506
|
+
"@smithy/util-endpoints": "^3.2.0",
|
|
17507
|
+
"@smithy/util-middleware": "^4.2.0",
|
|
17508
|
+
"@smithy/util-retry": "^4.2.0",
|
|
17509
|
+
"@smithy/util-utf8": "^4.2.0",
|
|
17510
17510
|
tslib: "^2.6.2"
|
|
17511
17511
|
},
|
|
17512
17512
|
devDependencies: {
|
|
@@ -18655,7 +18655,7 @@ var init_package = __esm({
|
|
|
18655
18655
|
"node_modules/@aws-sdk/nested-clients/package.json"() {
|
|
18656
18656
|
package_default = {
|
|
18657
18657
|
name: "@aws-sdk/nested-clients",
|
|
18658
|
-
version: "3.
|
|
18658
|
+
version: "3.901.0",
|
|
18659
18659
|
description: "Nested clients for AWS SDK packages.",
|
|
18660
18660
|
main: "./dist-cjs/index.js",
|
|
18661
18661
|
module: "./dist-es/index.js",
|
|
@@ -18684,41 +18684,41 @@ var init_package = __esm({
|
|
|
18684
18684
|
dependencies: {
|
|
18685
18685
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
18686
18686
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
18687
|
-
"@aws-sdk/core": "3.
|
|
18688
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
18689
|
-
"@aws-sdk/middleware-logger": "3.
|
|
18690
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
18691
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
18692
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
18693
|
-
"@aws-sdk/types": "3.
|
|
18694
|
-
"@aws-sdk/util-endpoints": "3.
|
|
18695
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
18696
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
18697
|
-
"@smithy/config-resolver": "^4.
|
|
18698
|
-
"@smithy/core": "^3.
|
|
18699
|
-
"@smithy/fetch-http-handler": "^5.
|
|
18700
|
-
"@smithy/hash-node": "^4.
|
|
18701
|
-
"@smithy/invalid-dependency": "^4.
|
|
18702
|
-
"@smithy/middleware-content-length": "^4.
|
|
18703
|
-
"@smithy/middleware-endpoint": "^4.
|
|
18704
|
-
"@smithy/middleware-retry": "^4.
|
|
18705
|
-
"@smithy/middleware-serde": "^4.
|
|
18706
|
-
"@smithy/middleware-stack": "^4.
|
|
18707
|
-
"@smithy/node-config-provider": "^4.
|
|
18708
|
-
"@smithy/node-http-handler": "^4.
|
|
18709
|
-
"@smithy/protocol-http": "^5.
|
|
18710
|
-
"@smithy/smithy-client": "^4.
|
|
18711
|
-
"@smithy/types": "^4.
|
|
18712
|
-
"@smithy/url-parser": "^4.
|
|
18713
|
-
"@smithy/util-base64": "^4.
|
|
18714
|
-
"@smithy/util-body-length-browser": "^4.
|
|
18715
|
-
"@smithy/util-body-length-node": "^4.
|
|
18716
|
-
"@smithy/util-defaults-mode-browser": "^4.
|
|
18717
|
-
"@smithy/util-defaults-mode-node": "^4.
|
|
18718
|
-
"@smithy/util-endpoints": "^3.
|
|
18719
|
-
"@smithy/util-middleware": "^4.
|
|
18720
|
-
"@smithy/util-retry": "^4.
|
|
18721
|
-
"@smithy/util-utf8": "^4.
|
|
18687
|
+
"@aws-sdk/core": "3.901.0",
|
|
18688
|
+
"@aws-sdk/middleware-host-header": "3.901.0",
|
|
18689
|
+
"@aws-sdk/middleware-logger": "3.901.0",
|
|
18690
|
+
"@aws-sdk/middleware-recursion-detection": "3.901.0",
|
|
18691
|
+
"@aws-sdk/middleware-user-agent": "3.901.0",
|
|
18692
|
+
"@aws-sdk/region-config-resolver": "3.901.0",
|
|
18693
|
+
"@aws-sdk/types": "3.901.0",
|
|
18694
|
+
"@aws-sdk/util-endpoints": "3.901.0",
|
|
18695
|
+
"@aws-sdk/util-user-agent-browser": "3.901.0",
|
|
18696
|
+
"@aws-sdk/util-user-agent-node": "3.901.0",
|
|
18697
|
+
"@smithy/config-resolver": "^4.3.0",
|
|
18698
|
+
"@smithy/core": "^3.14.0",
|
|
18699
|
+
"@smithy/fetch-http-handler": "^5.3.0",
|
|
18700
|
+
"@smithy/hash-node": "^4.2.0",
|
|
18701
|
+
"@smithy/invalid-dependency": "^4.2.0",
|
|
18702
|
+
"@smithy/middleware-content-length": "^4.2.0",
|
|
18703
|
+
"@smithy/middleware-endpoint": "^4.3.0",
|
|
18704
|
+
"@smithy/middleware-retry": "^4.4.0",
|
|
18705
|
+
"@smithy/middleware-serde": "^4.2.0",
|
|
18706
|
+
"@smithy/middleware-stack": "^4.2.0",
|
|
18707
|
+
"@smithy/node-config-provider": "^4.3.0",
|
|
18708
|
+
"@smithy/node-http-handler": "^4.3.0",
|
|
18709
|
+
"@smithy/protocol-http": "^5.3.0",
|
|
18710
|
+
"@smithy/smithy-client": "^4.7.0",
|
|
18711
|
+
"@smithy/types": "^4.6.0",
|
|
18712
|
+
"@smithy/url-parser": "^4.2.0",
|
|
18713
|
+
"@smithy/util-base64": "^4.2.0",
|
|
18714
|
+
"@smithy/util-body-length-browser": "^4.2.0",
|
|
18715
|
+
"@smithy/util-body-length-node": "^4.2.0",
|
|
18716
|
+
"@smithy/util-defaults-mode-browser": "^4.2.0",
|
|
18717
|
+
"@smithy/util-defaults-mode-node": "^4.2.0",
|
|
18718
|
+
"@smithy/util-endpoints": "^3.2.0",
|
|
18719
|
+
"@smithy/util-middleware": "^4.2.0",
|
|
18720
|
+
"@smithy/util-retry": "^4.2.0",
|
|
18721
|
+
"@smithy/util-utf8": "^4.2.0",
|
|
18722
18722
|
tslib: "^2.6.2"
|
|
18723
18723
|
},
|
|
18724
18724
|
devDependencies: {
|
|
@@ -54486,7 +54486,9 @@ When presented with a broken Mermaid diagram, analyze it thoroughly and provide
|
|
|
54486
54486
|
model: this.options.model,
|
|
54487
54487
|
debug: this.options.debug,
|
|
54488
54488
|
tracer: this.options.tracer,
|
|
54489
|
-
allowEdit: this.options.allowEdit
|
|
54489
|
+
allowEdit: this.options.allowEdit,
|
|
54490
|
+
maxIterations: 2
|
|
54491
|
+
// Limit mermaid fixing to 2 iterations to prevent long loops
|
|
54490
54492
|
});
|
|
54491
54493
|
}
|
|
54492
54494
|
return this.agent;
|
|
@@ -54545,9 +54547,7 @@ ${contentToFix}
|
|
|
54545
54547
|
|
|
54546
54548
|
Provide only the corrected Mermaid diagram within a mermaid code block. Do not add any explanations or additional text.`;
|
|
54547
54549
|
try {
|
|
54548
|
-
const result = await this.agent.answer(prompt, []
|
|
54549
|
-
schema: "Return only valid Mermaid diagram code within ```mermaid code block"
|
|
54550
|
-
});
|
|
54550
|
+
const result = await this.agent.answer(prompt, []);
|
|
54551
54551
|
const extractedDiagram = this.extractCorrectedDiagram(result);
|
|
54552
54552
|
return extractedDiagram || result;
|
|
54553
54553
|
} catch (error2) {
|
|
@@ -55303,6 +55303,7 @@ var init_ProbeAgent = __esm({
|
|
|
55303
55303
|
* @param {boolean} [options.debug] - Enable debug mode
|
|
55304
55304
|
* @param {boolean} [options.outline] - Enable outline-xml format for search results
|
|
55305
55305
|
* @param {number} [options.maxResponseTokens] - Maximum tokens for AI responses
|
|
55306
|
+
* @param {number} [options.maxIterations] - Maximum tool iterations (overrides MAX_TOOL_ITERATIONS env var)
|
|
55306
55307
|
* @param {boolean} [options.disableMermaidValidation=false] - Disable automatic mermaid diagram validation and fixing
|
|
55307
55308
|
* @param {boolean} [options.enableMcp=false] - Enable MCP tool integration
|
|
55308
55309
|
* @param {string} [options.mcpConfigPath] - Path to MCP configuration file
|
|
@@ -55319,6 +55320,7 @@ var init_ProbeAgent = __esm({
|
|
|
55319
55320
|
this.tracer = options.tracer || null;
|
|
55320
55321
|
this.outline = !!options.outline;
|
|
55321
55322
|
this.maxResponseTokens = options.maxResponseTokens || parseInt(process.env.MAX_RESPONSE_TOKENS || "0", 10) || null;
|
|
55323
|
+
this.maxIterations = options.maxIterations || null;
|
|
55322
55324
|
this.disableMermaidValidation = !!options.disableMermaidValidation;
|
|
55323
55325
|
this.enableBash = !!options.enableBash;
|
|
55324
55326
|
this.bashConfig = options.bashConfig || {};
|
|
@@ -56013,11 +56015,12 @@ You are working with a repository located at: ${searchDirectory}
|
|
|
56013
56015
|
let currentIteration = 0;
|
|
56014
56016
|
let completionAttempted = false;
|
|
56015
56017
|
let finalResult = "I was unable to complete your request due to reaching the maximum number of tool iterations.";
|
|
56016
|
-
const
|
|
56018
|
+
const baseMaxIterations = this.maxIterations || MAX_TOOL_ITERATIONS;
|
|
56019
|
+
const maxIterations = options.schema ? baseMaxIterations + 4 : baseMaxIterations;
|
|
56017
56020
|
if (this.debug) {
|
|
56018
56021
|
console.log(`[DEBUG] Starting agentic flow for question: ${message.substring(0, 100)}...`);
|
|
56019
56022
|
if (options.schema) {
|
|
56020
|
-
console.log(`[DEBUG] Schema provided, using extended iteration limit: ${maxIterations} (base: ${
|
|
56023
|
+
console.log(`[DEBUG] Schema provided, using extended iteration limit: ${maxIterations} (base: ${baseMaxIterations})`);
|
|
56021
56024
|
}
|
|
56022
56025
|
}
|
|
56023
56026
|
while (currentIteration < maxIterations && !completionAttempted) {
|
|
@@ -811,7 +811,8 @@ When presented with a broken Mermaid diagram, analyze it thoroughly and provide
|
|
|
811
811
|
model: this.options.model,
|
|
812
812
|
debug: this.options.debug,
|
|
813
813
|
tracer: this.options.tracer,
|
|
814
|
-
allowEdit: this.options.allowEdit
|
|
814
|
+
allowEdit: this.options.allowEdit,
|
|
815
|
+
maxIterations: 2 // Limit mermaid fixing to 2 iterations to prevent long loops
|
|
815
816
|
});
|
|
816
817
|
}
|
|
817
818
|
|
|
@@ -884,10 +885,11 @@ ${contentToFix}
|
|
|
884
885
|
Provide only the corrected Mermaid diagram within a mermaid code block. Do not add any explanations or additional text.`;
|
|
885
886
|
|
|
886
887
|
try {
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
888
|
+
// Don't pass schema to avoid infinite loop where AI returns raw mermaid code
|
|
889
|
+
// instead of using attempt_completion tool. The custom prompt already instructs
|
|
890
|
+
// to return only mermaid code blocks.
|
|
891
|
+
const result = await this.agent.answer(prompt, []);
|
|
892
|
+
|
|
891
893
|
// Extract the mermaid code from the response
|
|
892
894
|
const extractedDiagram = this.extractCorrectedDiagram(result);
|
|
893
895
|
return extractedDiagram || result;
|
package/cjs/agent/ProbeAgent.cjs
CHANGED
|
@@ -16647,7 +16647,7 @@ var require_package = __commonJS({
|
|
|
16647
16647
|
module2.exports = {
|
|
16648
16648
|
name: "@aws-sdk/client-bedrock-runtime",
|
|
16649
16649
|
description: "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
|
|
16650
|
-
version: "3.
|
|
16650
|
+
version: "3.901.0",
|
|
16651
16651
|
scripts: {
|
|
16652
16652
|
build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
16653
16653
|
"build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
|
|
@@ -16666,51 +16666,51 @@ var require_package = __commonJS({
|
|
|
16666
16666
|
dependencies: {
|
|
16667
16667
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
16668
16668
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
16669
|
-
"@aws-sdk/core": "3.
|
|
16670
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
16671
|
-
"@aws-sdk/eventstream-handler-node": "3.
|
|
16672
|
-
"@aws-sdk/middleware-eventstream": "3.
|
|
16673
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
16674
|
-
"@aws-sdk/middleware-logger": "3.
|
|
16675
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
16676
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
16677
|
-
"@aws-sdk/middleware-websocket": "3.
|
|
16678
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
16679
|
-
"@aws-sdk/token-providers": "3.
|
|
16680
|
-
"@aws-sdk/types": "3.
|
|
16681
|
-
"@aws-sdk/util-endpoints": "3.
|
|
16682
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
16683
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
16684
|
-
"@smithy/config-resolver": "^4.
|
|
16685
|
-
"@smithy/core": "^3.
|
|
16686
|
-
"@smithy/eventstream-serde-browser": "^4.
|
|
16687
|
-
"@smithy/eventstream-serde-config-resolver": "^4.
|
|
16688
|
-
"@smithy/eventstream-serde-node": "^4.
|
|
16689
|
-
"@smithy/fetch-http-handler": "^5.
|
|
16690
|
-
"@smithy/hash-node": "^4.
|
|
16691
|
-
"@smithy/invalid-dependency": "^4.
|
|
16692
|
-
"@smithy/middleware-content-length": "^4.
|
|
16693
|
-
"@smithy/middleware-endpoint": "^4.
|
|
16694
|
-
"@smithy/middleware-retry": "^4.
|
|
16695
|
-
"@smithy/middleware-serde": "^4.
|
|
16696
|
-
"@smithy/middleware-stack": "^4.
|
|
16697
|
-
"@smithy/node-config-provider": "^4.
|
|
16698
|
-
"@smithy/node-http-handler": "^4.
|
|
16699
|
-
"@smithy/protocol-http": "^5.
|
|
16700
|
-
"@smithy/smithy-client": "^4.
|
|
16701
|
-
"@smithy/types": "^4.
|
|
16702
|
-
"@smithy/url-parser": "^4.
|
|
16703
|
-
"@smithy/util-base64": "^4.
|
|
16704
|
-
"@smithy/util-body-length-browser": "^4.
|
|
16705
|
-
"@smithy/util-body-length-node": "^4.
|
|
16706
|
-
"@smithy/util-defaults-mode-browser": "^4.
|
|
16707
|
-
"@smithy/util-defaults-mode-node": "^4.
|
|
16708
|
-
"@smithy/util-endpoints": "^3.
|
|
16709
|
-
"@smithy/util-middleware": "^4.
|
|
16710
|
-
"@smithy/util-retry": "^4.
|
|
16711
|
-
"@smithy/util-stream": "^4.
|
|
16712
|
-
"@smithy/util-utf8": "^4.
|
|
16713
|
-
"@smithy/uuid": "^1.
|
|
16669
|
+
"@aws-sdk/core": "3.901.0",
|
|
16670
|
+
"@aws-sdk/credential-provider-node": "3.901.0",
|
|
16671
|
+
"@aws-sdk/eventstream-handler-node": "3.901.0",
|
|
16672
|
+
"@aws-sdk/middleware-eventstream": "3.901.0",
|
|
16673
|
+
"@aws-sdk/middleware-host-header": "3.901.0",
|
|
16674
|
+
"@aws-sdk/middleware-logger": "3.901.0",
|
|
16675
|
+
"@aws-sdk/middleware-recursion-detection": "3.901.0",
|
|
16676
|
+
"@aws-sdk/middleware-user-agent": "3.901.0",
|
|
16677
|
+
"@aws-sdk/middleware-websocket": "3.901.0",
|
|
16678
|
+
"@aws-sdk/region-config-resolver": "3.901.0",
|
|
16679
|
+
"@aws-sdk/token-providers": "3.901.0",
|
|
16680
|
+
"@aws-sdk/types": "3.901.0",
|
|
16681
|
+
"@aws-sdk/util-endpoints": "3.901.0",
|
|
16682
|
+
"@aws-sdk/util-user-agent-browser": "3.901.0",
|
|
16683
|
+
"@aws-sdk/util-user-agent-node": "3.901.0",
|
|
16684
|
+
"@smithy/config-resolver": "^4.3.0",
|
|
16685
|
+
"@smithy/core": "^3.14.0",
|
|
16686
|
+
"@smithy/eventstream-serde-browser": "^4.2.0",
|
|
16687
|
+
"@smithy/eventstream-serde-config-resolver": "^4.3.0",
|
|
16688
|
+
"@smithy/eventstream-serde-node": "^4.2.0",
|
|
16689
|
+
"@smithy/fetch-http-handler": "^5.3.0",
|
|
16690
|
+
"@smithy/hash-node": "^4.2.0",
|
|
16691
|
+
"@smithy/invalid-dependency": "^4.2.0",
|
|
16692
|
+
"@smithy/middleware-content-length": "^4.2.0",
|
|
16693
|
+
"@smithy/middleware-endpoint": "^4.3.0",
|
|
16694
|
+
"@smithy/middleware-retry": "^4.4.0",
|
|
16695
|
+
"@smithy/middleware-serde": "^4.2.0",
|
|
16696
|
+
"@smithy/middleware-stack": "^4.2.0",
|
|
16697
|
+
"@smithy/node-config-provider": "^4.3.0",
|
|
16698
|
+
"@smithy/node-http-handler": "^4.3.0",
|
|
16699
|
+
"@smithy/protocol-http": "^5.3.0",
|
|
16700
|
+
"@smithy/smithy-client": "^4.7.0",
|
|
16701
|
+
"@smithy/types": "^4.6.0",
|
|
16702
|
+
"@smithy/url-parser": "^4.2.0",
|
|
16703
|
+
"@smithy/util-base64": "^4.2.0",
|
|
16704
|
+
"@smithy/util-body-length-browser": "^4.2.0",
|
|
16705
|
+
"@smithy/util-body-length-node": "^4.2.0",
|
|
16706
|
+
"@smithy/util-defaults-mode-browser": "^4.2.0",
|
|
16707
|
+
"@smithy/util-defaults-mode-node": "^4.2.0",
|
|
16708
|
+
"@smithy/util-endpoints": "^3.2.0",
|
|
16709
|
+
"@smithy/util-middleware": "^4.2.0",
|
|
16710
|
+
"@smithy/util-retry": "^4.2.0",
|
|
16711
|
+
"@smithy/util-stream": "^4.4.0",
|
|
16712
|
+
"@smithy/util-utf8": "^4.2.0",
|
|
16713
|
+
"@smithy/uuid": "^1.1.0",
|
|
16714
16714
|
tslib: "^2.6.2"
|
|
16715
16715
|
},
|
|
16716
16716
|
devDependencies: {
|
|
@@ -17447,7 +17447,7 @@ var require_package2 = __commonJS({
|
|
|
17447
17447
|
module2.exports = {
|
|
17448
17448
|
name: "@aws-sdk/client-sso",
|
|
17449
17449
|
description: "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",
|
|
17450
|
-
version: "3.
|
|
17450
|
+
version: "3.901.0",
|
|
17451
17451
|
scripts: {
|
|
17452
17452
|
build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
17453
17453
|
"build:cjs": "node ../../scripts/compilation/inline client-sso",
|
|
@@ -17466,41 +17466,41 @@ var require_package2 = __commonJS({
|
|
|
17466
17466
|
dependencies: {
|
|
17467
17467
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
17468
17468
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
17469
|
-
"@aws-sdk/core": "3.
|
|
17470
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
17471
|
-
"@aws-sdk/middleware-logger": "3.
|
|
17472
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
17473
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
17474
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
17475
|
-
"@aws-sdk/types": "3.
|
|
17476
|
-
"@aws-sdk/util-endpoints": "3.
|
|
17477
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
17478
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
17479
|
-
"@smithy/config-resolver": "^4.
|
|
17480
|
-
"@smithy/core": "^3.
|
|
17481
|
-
"@smithy/fetch-http-handler": "^5.
|
|
17482
|
-
"@smithy/hash-node": "^4.
|
|
17483
|
-
"@smithy/invalid-dependency": "^4.
|
|
17484
|
-
"@smithy/middleware-content-length": "^4.
|
|
17485
|
-
"@smithy/middleware-endpoint": "^4.
|
|
17486
|
-
"@smithy/middleware-retry": "^4.
|
|
17487
|
-
"@smithy/middleware-serde": "^4.
|
|
17488
|
-
"@smithy/middleware-stack": "^4.
|
|
17489
|
-
"@smithy/node-config-provider": "^4.
|
|
17490
|
-
"@smithy/node-http-handler": "^4.
|
|
17491
|
-
"@smithy/protocol-http": "^5.
|
|
17492
|
-
"@smithy/smithy-client": "^4.
|
|
17493
|
-
"@smithy/types": "^4.
|
|
17494
|
-
"@smithy/url-parser": "^4.
|
|
17495
|
-
"@smithy/util-base64": "^4.
|
|
17496
|
-
"@smithy/util-body-length-browser": "^4.
|
|
17497
|
-
"@smithy/util-body-length-node": "^4.
|
|
17498
|
-
"@smithy/util-defaults-mode-browser": "^4.
|
|
17499
|
-
"@smithy/util-defaults-mode-node": "^4.
|
|
17500
|
-
"@smithy/util-endpoints": "^3.
|
|
17501
|
-
"@smithy/util-middleware": "^4.
|
|
17502
|
-
"@smithy/util-retry": "^4.
|
|
17503
|
-
"@smithy/util-utf8": "^4.
|
|
17469
|
+
"@aws-sdk/core": "3.901.0",
|
|
17470
|
+
"@aws-sdk/middleware-host-header": "3.901.0",
|
|
17471
|
+
"@aws-sdk/middleware-logger": "3.901.0",
|
|
17472
|
+
"@aws-sdk/middleware-recursion-detection": "3.901.0",
|
|
17473
|
+
"@aws-sdk/middleware-user-agent": "3.901.0",
|
|
17474
|
+
"@aws-sdk/region-config-resolver": "3.901.0",
|
|
17475
|
+
"@aws-sdk/types": "3.901.0",
|
|
17476
|
+
"@aws-sdk/util-endpoints": "3.901.0",
|
|
17477
|
+
"@aws-sdk/util-user-agent-browser": "3.901.0",
|
|
17478
|
+
"@aws-sdk/util-user-agent-node": "3.901.0",
|
|
17479
|
+
"@smithy/config-resolver": "^4.3.0",
|
|
17480
|
+
"@smithy/core": "^3.14.0",
|
|
17481
|
+
"@smithy/fetch-http-handler": "^5.3.0",
|
|
17482
|
+
"@smithy/hash-node": "^4.2.0",
|
|
17483
|
+
"@smithy/invalid-dependency": "^4.2.0",
|
|
17484
|
+
"@smithy/middleware-content-length": "^4.2.0",
|
|
17485
|
+
"@smithy/middleware-endpoint": "^4.3.0",
|
|
17486
|
+
"@smithy/middleware-retry": "^4.4.0",
|
|
17487
|
+
"@smithy/middleware-serde": "^4.2.0",
|
|
17488
|
+
"@smithy/middleware-stack": "^4.2.0",
|
|
17489
|
+
"@smithy/node-config-provider": "^4.3.0",
|
|
17490
|
+
"@smithy/node-http-handler": "^4.3.0",
|
|
17491
|
+
"@smithy/protocol-http": "^5.3.0",
|
|
17492
|
+
"@smithy/smithy-client": "^4.7.0",
|
|
17493
|
+
"@smithy/types": "^4.6.0",
|
|
17494
|
+
"@smithy/url-parser": "^4.2.0",
|
|
17495
|
+
"@smithy/util-base64": "^4.2.0",
|
|
17496
|
+
"@smithy/util-body-length-browser": "^4.2.0",
|
|
17497
|
+
"@smithy/util-body-length-node": "^4.2.0",
|
|
17498
|
+
"@smithy/util-defaults-mode-browser": "^4.2.0",
|
|
17499
|
+
"@smithy/util-defaults-mode-node": "^4.2.0",
|
|
17500
|
+
"@smithy/util-endpoints": "^3.2.0",
|
|
17501
|
+
"@smithy/util-middleware": "^4.2.0",
|
|
17502
|
+
"@smithy/util-retry": "^4.2.0",
|
|
17503
|
+
"@smithy/util-utf8": "^4.2.0",
|
|
17504
17504
|
tslib: "^2.6.2"
|
|
17505
17505
|
},
|
|
17506
17506
|
devDependencies: {
|
|
@@ -18649,7 +18649,7 @@ var init_package = __esm({
|
|
|
18649
18649
|
"node_modules/@aws-sdk/nested-clients/package.json"() {
|
|
18650
18650
|
package_default = {
|
|
18651
18651
|
name: "@aws-sdk/nested-clients",
|
|
18652
|
-
version: "3.
|
|
18652
|
+
version: "3.901.0",
|
|
18653
18653
|
description: "Nested clients for AWS SDK packages.",
|
|
18654
18654
|
main: "./dist-cjs/index.js",
|
|
18655
18655
|
module: "./dist-es/index.js",
|
|
@@ -18678,41 +18678,41 @@ var init_package = __esm({
|
|
|
18678
18678
|
dependencies: {
|
|
18679
18679
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
18680
18680
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
18681
|
-
"@aws-sdk/core": "3.
|
|
18682
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
18683
|
-
"@aws-sdk/middleware-logger": "3.
|
|
18684
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
18685
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
18686
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
18687
|
-
"@aws-sdk/types": "3.
|
|
18688
|
-
"@aws-sdk/util-endpoints": "3.
|
|
18689
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
18690
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
18691
|
-
"@smithy/config-resolver": "^4.
|
|
18692
|
-
"@smithy/core": "^3.
|
|
18693
|
-
"@smithy/fetch-http-handler": "^5.
|
|
18694
|
-
"@smithy/hash-node": "^4.
|
|
18695
|
-
"@smithy/invalid-dependency": "^4.
|
|
18696
|
-
"@smithy/middleware-content-length": "^4.
|
|
18697
|
-
"@smithy/middleware-endpoint": "^4.
|
|
18698
|
-
"@smithy/middleware-retry": "^4.
|
|
18699
|
-
"@smithy/middleware-serde": "^4.
|
|
18700
|
-
"@smithy/middleware-stack": "^4.
|
|
18701
|
-
"@smithy/node-config-provider": "^4.
|
|
18702
|
-
"@smithy/node-http-handler": "^4.
|
|
18703
|
-
"@smithy/protocol-http": "^5.
|
|
18704
|
-
"@smithy/smithy-client": "^4.
|
|
18705
|
-
"@smithy/types": "^4.
|
|
18706
|
-
"@smithy/url-parser": "^4.
|
|
18707
|
-
"@smithy/util-base64": "^4.
|
|
18708
|
-
"@smithy/util-body-length-browser": "^4.
|
|
18709
|
-
"@smithy/util-body-length-node": "^4.
|
|
18710
|
-
"@smithy/util-defaults-mode-browser": "^4.
|
|
18711
|
-
"@smithy/util-defaults-mode-node": "^4.
|
|
18712
|
-
"@smithy/util-endpoints": "^3.
|
|
18713
|
-
"@smithy/util-middleware": "^4.
|
|
18714
|
-
"@smithy/util-retry": "^4.
|
|
18715
|
-
"@smithy/util-utf8": "^4.
|
|
18681
|
+
"@aws-sdk/core": "3.901.0",
|
|
18682
|
+
"@aws-sdk/middleware-host-header": "3.901.0",
|
|
18683
|
+
"@aws-sdk/middleware-logger": "3.901.0",
|
|
18684
|
+
"@aws-sdk/middleware-recursion-detection": "3.901.0",
|
|
18685
|
+
"@aws-sdk/middleware-user-agent": "3.901.0",
|
|
18686
|
+
"@aws-sdk/region-config-resolver": "3.901.0",
|
|
18687
|
+
"@aws-sdk/types": "3.901.0",
|
|
18688
|
+
"@aws-sdk/util-endpoints": "3.901.0",
|
|
18689
|
+
"@aws-sdk/util-user-agent-browser": "3.901.0",
|
|
18690
|
+
"@aws-sdk/util-user-agent-node": "3.901.0",
|
|
18691
|
+
"@smithy/config-resolver": "^4.3.0",
|
|
18692
|
+
"@smithy/core": "^3.14.0",
|
|
18693
|
+
"@smithy/fetch-http-handler": "^5.3.0",
|
|
18694
|
+
"@smithy/hash-node": "^4.2.0",
|
|
18695
|
+
"@smithy/invalid-dependency": "^4.2.0",
|
|
18696
|
+
"@smithy/middleware-content-length": "^4.2.0",
|
|
18697
|
+
"@smithy/middleware-endpoint": "^4.3.0",
|
|
18698
|
+
"@smithy/middleware-retry": "^4.4.0",
|
|
18699
|
+
"@smithy/middleware-serde": "^4.2.0",
|
|
18700
|
+
"@smithy/middleware-stack": "^4.2.0",
|
|
18701
|
+
"@smithy/node-config-provider": "^4.3.0",
|
|
18702
|
+
"@smithy/node-http-handler": "^4.3.0",
|
|
18703
|
+
"@smithy/protocol-http": "^5.3.0",
|
|
18704
|
+
"@smithy/smithy-client": "^4.7.0",
|
|
18705
|
+
"@smithy/types": "^4.6.0",
|
|
18706
|
+
"@smithy/url-parser": "^4.2.0",
|
|
18707
|
+
"@smithy/util-base64": "^4.2.0",
|
|
18708
|
+
"@smithy/util-body-length-browser": "^4.2.0",
|
|
18709
|
+
"@smithy/util-body-length-node": "^4.2.0",
|
|
18710
|
+
"@smithy/util-defaults-mode-browser": "^4.2.0",
|
|
18711
|
+
"@smithy/util-defaults-mode-node": "^4.2.0",
|
|
18712
|
+
"@smithy/util-endpoints": "^3.2.0",
|
|
18713
|
+
"@smithy/util-middleware": "^4.2.0",
|
|
18714
|
+
"@smithy/util-retry": "^4.2.0",
|
|
18715
|
+
"@smithy/util-utf8": "^4.2.0",
|
|
18716
18716
|
tslib: "^2.6.2"
|
|
18717
18717
|
},
|
|
18718
18718
|
devDependencies: {
|
|
@@ -54208,7 +54208,9 @@ When presented with a broken Mermaid diagram, analyze it thoroughly and provide
|
|
|
54208
54208
|
model: this.options.model,
|
|
54209
54209
|
debug: this.options.debug,
|
|
54210
54210
|
tracer: this.options.tracer,
|
|
54211
|
-
allowEdit: this.options.allowEdit
|
|
54211
|
+
allowEdit: this.options.allowEdit,
|
|
54212
|
+
maxIterations: 2
|
|
54213
|
+
// Limit mermaid fixing to 2 iterations to prevent long loops
|
|
54212
54214
|
});
|
|
54213
54215
|
}
|
|
54214
54216
|
return this.agent;
|
|
@@ -54267,9 +54269,7 @@ ${contentToFix}
|
|
|
54267
54269
|
|
|
54268
54270
|
Provide only the corrected Mermaid diagram within a mermaid code block. Do not add any explanations or additional text.`;
|
|
54269
54271
|
try {
|
|
54270
|
-
const result = await this.agent.answer(prompt, []
|
|
54271
|
-
schema: "Return only valid Mermaid diagram code within ```mermaid code block"
|
|
54272
|
-
});
|
|
54272
|
+
const result = await this.agent.answer(prompt, []);
|
|
54273
54273
|
const extractedDiagram = this.extractCorrectedDiagram(result);
|
|
54274
54274
|
return extractedDiagram || result;
|
|
54275
54275
|
} catch (error2) {
|
|
@@ -55025,6 +55025,7 @@ var init_ProbeAgent = __esm({
|
|
|
55025
55025
|
* @param {boolean} [options.debug] - Enable debug mode
|
|
55026
55026
|
* @param {boolean} [options.outline] - Enable outline-xml format for search results
|
|
55027
55027
|
* @param {number} [options.maxResponseTokens] - Maximum tokens for AI responses
|
|
55028
|
+
* @param {number} [options.maxIterations] - Maximum tool iterations (overrides MAX_TOOL_ITERATIONS env var)
|
|
55028
55029
|
* @param {boolean} [options.disableMermaidValidation=false] - Disable automatic mermaid diagram validation and fixing
|
|
55029
55030
|
* @param {boolean} [options.enableMcp=false] - Enable MCP tool integration
|
|
55030
55031
|
* @param {string} [options.mcpConfigPath] - Path to MCP configuration file
|
|
@@ -55041,6 +55042,7 @@ var init_ProbeAgent = __esm({
|
|
|
55041
55042
|
this.tracer = options.tracer || null;
|
|
55042
55043
|
this.outline = !!options.outline;
|
|
55043
55044
|
this.maxResponseTokens = options.maxResponseTokens || parseInt(process.env.MAX_RESPONSE_TOKENS || "0", 10) || null;
|
|
55045
|
+
this.maxIterations = options.maxIterations || null;
|
|
55044
55046
|
this.disableMermaidValidation = !!options.disableMermaidValidation;
|
|
55045
55047
|
this.enableBash = !!options.enableBash;
|
|
55046
55048
|
this.bashConfig = options.bashConfig || {};
|
|
@@ -55735,11 +55737,12 @@ You are working with a repository located at: ${searchDirectory}
|
|
|
55735
55737
|
let currentIteration = 0;
|
|
55736
55738
|
let completionAttempted = false;
|
|
55737
55739
|
let finalResult = "I was unable to complete your request due to reaching the maximum number of tool iterations.";
|
|
55738
|
-
const
|
|
55740
|
+
const baseMaxIterations = this.maxIterations || MAX_TOOL_ITERATIONS;
|
|
55741
|
+
const maxIterations = options.schema ? baseMaxIterations + 4 : baseMaxIterations;
|
|
55739
55742
|
if (this.debug) {
|
|
55740
55743
|
console.log(`[DEBUG] Starting agentic flow for question: ${message.substring(0, 100)}...`);
|
|
55741
55744
|
if (options.schema) {
|
|
55742
|
-
console.log(`[DEBUG] Schema provided, using extended iteration limit: ${maxIterations} (base: ${
|
|
55745
|
+
console.log(`[DEBUG] Schema provided, using extended iteration limit: ${maxIterations} (base: ${baseMaxIterations})`);
|
|
55743
55746
|
}
|
|
55744
55747
|
}
|
|
55745
55748
|
while (currentIteration < maxIterations && !completionAttempted) {
|
package/cjs/index.cjs
CHANGED
|
@@ -20173,7 +20173,7 @@ var require_package = __commonJS({
|
|
|
20173
20173
|
module2.exports = {
|
|
20174
20174
|
name: "@aws-sdk/client-bedrock-runtime",
|
|
20175
20175
|
description: "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
|
|
20176
|
-
version: "3.
|
|
20176
|
+
version: "3.901.0",
|
|
20177
20177
|
scripts: {
|
|
20178
20178
|
build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
20179
20179
|
"build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
|
|
@@ -20192,51 +20192,51 @@ var require_package = __commonJS({
|
|
|
20192
20192
|
dependencies: {
|
|
20193
20193
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
20194
20194
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
20195
|
-
"@aws-sdk/core": "3.
|
|
20196
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
20197
|
-
"@aws-sdk/eventstream-handler-node": "3.
|
|
20198
|
-
"@aws-sdk/middleware-eventstream": "3.
|
|
20199
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
20200
|
-
"@aws-sdk/middleware-logger": "3.
|
|
20201
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
20202
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
20203
|
-
"@aws-sdk/middleware-websocket": "3.
|
|
20204
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
20205
|
-
"@aws-sdk/token-providers": "3.
|
|
20206
|
-
"@aws-sdk/types": "3.
|
|
20207
|
-
"@aws-sdk/util-endpoints": "3.
|
|
20208
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
20209
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
20210
|
-
"@smithy/config-resolver": "^4.
|
|
20211
|
-
"@smithy/core": "^3.
|
|
20212
|
-
"@smithy/eventstream-serde-browser": "^4.
|
|
20213
|
-
"@smithy/eventstream-serde-config-resolver": "^4.
|
|
20214
|
-
"@smithy/eventstream-serde-node": "^4.
|
|
20215
|
-
"@smithy/fetch-http-handler": "^5.
|
|
20216
|
-
"@smithy/hash-node": "^4.
|
|
20217
|
-
"@smithy/invalid-dependency": "^4.
|
|
20218
|
-
"@smithy/middleware-content-length": "^4.
|
|
20219
|
-
"@smithy/middleware-endpoint": "^4.
|
|
20220
|
-
"@smithy/middleware-retry": "^4.
|
|
20221
|
-
"@smithy/middleware-serde": "^4.
|
|
20222
|
-
"@smithy/middleware-stack": "^4.
|
|
20223
|
-
"@smithy/node-config-provider": "^4.
|
|
20224
|
-
"@smithy/node-http-handler": "^4.
|
|
20225
|
-
"@smithy/protocol-http": "^5.
|
|
20226
|
-
"@smithy/smithy-client": "^4.
|
|
20227
|
-
"@smithy/types": "^4.
|
|
20228
|
-
"@smithy/url-parser": "^4.
|
|
20229
|
-
"@smithy/util-base64": "^4.
|
|
20230
|
-
"@smithy/util-body-length-browser": "^4.
|
|
20231
|
-
"@smithy/util-body-length-node": "^4.
|
|
20232
|
-
"@smithy/util-defaults-mode-browser": "^4.
|
|
20233
|
-
"@smithy/util-defaults-mode-node": "^4.
|
|
20234
|
-
"@smithy/util-endpoints": "^3.
|
|
20235
|
-
"@smithy/util-middleware": "^4.
|
|
20236
|
-
"@smithy/util-retry": "^4.
|
|
20237
|
-
"@smithy/util-stream": "^4.
|
|
20238
|
-
"@smithy/util-utf8": "^4.
|
|
20239
|
-
"@smithy/uuid": "^1.
|
|
20195
|
+
"@aws-sdk/core": "3.901.0",
|
|
20196
|
+
"@aws-sdk/credential-provider-node": "3.901.0",
|
|
20197
|
+
"@aws-sdk/eventstream-handler-node": "3.901.0",
|
|
20198
|
+
"@aws-sdk/middleware-eventstream": "3.901.0",
|
|
20199
|
+
"@aws-sdk/middleware-host-header": "3.901.0",
|
|
20200
|
+
"@aws-sdk/middleware-logger": "3.901.0",
|
|
20201
|
+
"@aws-sdk/middleware-recursion-detection": "3.901.0",
|
|
20202
|
+
"@aws-sdk/middleware-user-agent": "3.901.0",
|
|
20203
|
+
"@aws-sdk/middleware-websocket": "3.901.0",
|
|
20204
|
+
"@aws-sdk/region-config-resolver": "3.901.0",
|
|
20205
|
+
"@aws-sdk/token-providers": "3.901.0",
|
|
20206
|
+
"@aws-sdk/types": "3.901.0",
|
|
20207
|
+
"@aws-sdk/util-endpoints": "3.901.0",
|
|
20208
|
+
"@aws-sdk/util-user-agent-browser": "3.901.0",
|
|
20209
|
+
"@aws-sdk/util-user-agent-node": "3.901.0",
|
|
20210
|
+
"@smithy/config-resolver": "^4.3.0",
|
|
20211
|
+
"@smithy/core": "^3.14.0",
|
|
20212
|
+
"@smithy/eventstream-serde-browser": "^4.2.0",
|
|
20213
|
+
"@smithy/eventstream-serde-config-resolver": "^4.3.0",
|
|
20214
|
+
"@smithy/eventstream-serde-node": "^4.2.0",
|
|
20215
|
+
"@smithy/fetch-http-handler": "^5.3.0",
|
|
20216
|
+
"@smithy/hash-node": "^4.2.0",
|
|
20217
|
+
"@smithy/invalid-dependency": "^4.2.0",
|
|
20218
|
+
"@smithy/middleware-content-length": "^4.2.0",
|
|
20219
|
+
"@smithy/middleware-endpoint": "^4.3.0",
|
|
20220
|
+
"@smithy/middleware-retry": "^4.4.0",
|
|
20221
|
+
"@smithy/middleware-serde": "^4.2.0",
|
|
20222
|
+
"@smithy/middleware-stack": "^4.2.0",
|
|
20223
|
+
"@smithy/node-config-provider": "^4.3.0",
|
|
20224
|
+
"@smithy/node-http-handler": "^4.3.0",
|
|
20225
|
+
"@smithy/protocol-http": "^5.3.0",
|
|
20226
|
+
"@smithy/smithy-client": "^4.7.0",
|
|
20227
|
+
"@smithy/types": "^4.6.0",
|
|
20228
|
+
"@smithy/url-parser": "^4.2.0",
|
|
20229
|
+
"@smithy/util-base64": "^4.2.0",
|
|
20230
|
+
"@smithy/util-body-length-browser": "^4.2.0",
|
|
20231
|
+
"@smithy/util-body-length-node": "^4.2.0",
|
|
20232
|
+
"@smithy/util-defaults-mode-browser": "^4.2.0",
|
|
20233
|
+
"@smithy/util-defaults-mode-node": "^4.2.0",
|
|
20234
|
+
"@smithy/util-endpoints": "^3.2.0",
|
|
20235
|
+
"@smithy/util-middleware": "^4.2.0",
|
|
20236
|
+
"@smithy/util-retry": "^4.2.0",
|
|
20237
|
+
"@smithy/util-stream": "^4.4.0",
|
|
20238
|
+
"@smithy/util-utf8": "^4.2.0",
|
|
20239
|
+
"@smithy/uuid": "^1.1.0",
|
|
20240
20240
|
tslib: "^2.6.2"
|
|
20241
20241
|
},
|
|
20242
20242
|
devDependencies: {
|
|
@@ -20973,7 +20973,7 @@ var require_package2 = __commonJS({
|
|
|
20973
20973
|
module2.exports = {
|
|
20974
20974
|
name: "@aws-sdk/client-sso",
|
|
20975
20975
|
description: "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",
|
|
20976
|
-
version: "3.
|
|
20976
|
+
version: "3.901.0",
|
|
20977
20977
|
scripts: {
|
|
20978
20978
|
build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
20979
20979
|
"build:cjs": "node ../../scripts/compilation/inline client-sso",
|
|
@@ -20992,41 +20992,41 @@ var require_package2 = __commonJS({
|
|
|
20992
20992
|
dependencies: {
|
|
20993
20993
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
20994
20994
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
20995
|
-
"@aws-sdk/core": "3.
|
|
20996
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
20997
|
-
"@aws-sdk/middleware-logger": "3.
|
|
20998
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
20999
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
21000
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
21001
|
-
"@aws-sdk/types": "3.
|
|
21002
|
-
"@aws-sdk/util-endpoints": "3.
|
|
21003
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
21004
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
21005
|
-
"@smithy/config-resolver": "^4.
|
|
21006
|
-
"@smithy/core": "^3.
|
|
21007
|
-
"@smithy/fetch-http-handler": "^5.
|
|
21008
|
-
"@smithy/hash-node": "^4.
|
|
21009
|
-
"@smithy/invalid-dependency": "^4.
|
|
21010
|
-
"@smithy/middleware-content-length": "^4.
|
|
21011
|
-
"@smithy/middleware-endpoint": "^4.
|
|
21012
|
-
"@smithy/middleware-retry": "^4.
|
|
21013
|
-
"@smithy/middleware-serde": "^4.
|
|
21014
|
-
"@smithy/middleware-stack": "^4.
|
|
21015
|
-
"@smithy/node-config-provider": "^4.
|
|
21016
|
-
"@smithy/node-http-handler": "^4.
|
|
21017
|
-
"@smithy/protocol-http": "^5.
|
|
21018
|
-
"@smithy/smithy-client": "^4.
|
|
21019
|
-
"@smithy/types": "^4.
|
|
21020
|
-
"@smithy/url-parser": "^4.
|
|
21021
|
-
"@smithy/util-base64": "^4.
|
|
21022
|
-
"@smithy/util-body-length-browser": "^4.
|
|
21023
|
-
"@smithy/util-body-length-node": "^4.
|
|
21024
|
-
"@smithy/util-defaults-mode-browser": "^4.
|
|
21025
|
-
"@smithy/util-defaults-mode-node": "^4.
|
|
21026
|
-
"@smithy/util-endpoints": "^3.
|
|
21027
|
-
"@smithy/util-middleware": "^4.
|
|
21028
|
-
"@smithy/util-retry": "^4.
|
|
21029
|
-
"@smithy/util-utf8": "^4.
|
|
20995
|
+
"@aws-sdk/core": "3.901.0",
|
|
20996
|
+
"@aws-sdk/middleware-host-header": "3.901.0",
|
|
20997
|
+
"@aws-sdk/middleware-logger": "3.901.0",
|
|
20998
|
+
"@aws-sdk/middleware-recursion-detection": "3.901.0",
|
|
20999
|
+
"@aws-sdk/middleware-user-agent": "3.901.0",
|
|
21000
|
+
"@aws-sdk/region-config-resolver": "3.901.0",
|
|
21001
|
+
"@aws-sdk/types": "3.901.0",
|
|
21002
|
+
"@aws-sdk/util-endpoints": "3.901.0",
|
|
21003
|
+
"@aws-sdk/util-user-agent-browser": "3.901.0",
|
|
21004
|
+
"@aws-sdk/util-user-agent-node": "3.901.0",
|
|
21005
|
+
"@smithy/config-resolver": "^4.3.0",
|
|
21006
|
+
"@smithy/core": "^3.14.0",
|
|
21007
|
+
"@smithy/fetch-http-handler": "^5.3.0",
|
|
21008
|
+
"@smithy/hash-node": "^4.2.0",
|
|
21009
|
+
"@smithy/invalid-dependency": "^4.2.0",
|
|
21010
|
+
"@smithy/middleware-content-length": "^4.2.0",
|
|
21011
|
+
"@smithy/middleware-endpoint": "^4.3.0",
|
|
21012
|
+
"@smithy/middleware-retry": "^4.4.0",
|
|
21013
|
+
"@smithy/middleware-serde": "^4.2.0",
|
|
21014
|
+
"@smithy/middleware-stack": "^4.2.0",
|
|
21015
|
+
"@smithy/node-config-provider": "^4.3.0",
|
|
21016
|
+
"@smithy/node-http-handler": "^4.3.0",
|
|
21017
|
+
"@smithy/protocol-http": "^5.3.0",
|
|
21018
|
+
"@smithy/smithy-client": "^4.7.0",
|
|
21019
|
+
"@smithy/types": "^4.6.0",
|
|
21020
|
+
"@smithy/url-parser": "^4.2.0",
|
|
21021
|
+
"@smithy/util-base64": "^4.2.0",
|
|
21022
|
+
"@smithy/util-body-length-browser": "^4.2.0",
|
|
21023
|
+
"@smithy/util-body-length-node": "^4.2.0",
|
|
21024
|
+
"@smithy/util-defaults-mode-browser": "^4.2.0",
|
|
21025
|
+
"@smithy/util-defaults-mode-node": "^4.2.0",
|
|
21026
|
+
"@smithy/util-endpoints": "^3.2.0",
|
|
21027
|
+
"@smithy/util-middleware": "^4.2.0",
|
|
21028
|
+
"@smithy/util-retry": "^4.2.0",
|
|
21029
|
+
"@smithy/util-utf8": "^4.2.0",
|
|
21030
21030
|
tslib: "^2.6.2"
|
|
21031
21031
|
},
|
|
21032
21032
|
devDependencies: {
|
|
@@ -22175,7 +22175,7 @@ var init_package = __esm({
|
|
|
22175
22175
|
"node_modules/@aws-sdk/nested-clients/package.json"() {
|
|
22176
22176
|
package_default = {
|
|
22177
22177
|
name: "@aws-sdk/nested-clients",
|
|
22178
|
-
version: "3.
|
|
22178
|
+
version: "3.901.0",
|
|
22179
22179
|
description: "Nested clients for AWS SDK packages.",
|
|
22180
22180
|
main: "./dist-cjs/index.js",
|
|
22181
22181
|
module: "./dist-es/index.js",
|
|
@@ -22204,41 +22204,41 @@ var init_package = __esm({
|
|
|
22204
22204
|
dependencies: {
|
|
22205
22205
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
22206
22206
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
22207
|
-
"@aws-sdk/core": "3.
|
|
22208
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
22209
|
-
"@aws-sdk/middleware-logger": "3.
|
|
22210
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
22211
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
22212
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
22213
|
-
"@aws-sdk/types": "3.
|
|
22214
|
-
"@aws-sdk/util-endpoints": "3.
|
|
22215
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
22216
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
22217
|
-
"@smithy/config-resolver": "^4.
|
|
22218
|
-
"@smithy/core": "^3.
|
|
22219
|
-
"@smithy/fetch-http-handler": "^5.
|
|
22220
|
-
"@smithy/hash-node": "^4.
|
|
22221
|
-
"@smithy/invalid-dependency": "^4.
|
|
22222
|
-
"@smithy/middleware-content-length": "^4.
|
|
22223
|
-
"@smithy/middleware-endpoint": "^4.
|
|
22224
|
-
"@smithy/middleware-retry": "^4.
|
|
22225
|
-
"@smithy/middleware-serde": "^4.
|
|
22226
|
-
"@smithy/middleware-stack": "^4.
|
|
22227
|
-
"@smithy/node-config-provider": "^4.
|
|
22228
|
-
"@smithy/node-http-handler": "^4.
|
|
22229
|
-
"@smithy/protocol-http": "^5.
|
|
22230
|
-
"@smithy/smithy-client": "^4.
|
|
22231
|
-
"@smithy/types": "^4.
|
|
22232
|
-
"@smithy/url-parser": "^4.
|
|
22233
|
-
"@smithy/util-base64": "^4.
|
|
22234
|
-
"@smithy/util-body-length-browser": "^4.
|
|
22235
|
-
"@smithy/util-body-length-node": "^4.
|
|
22236
|
-
"@smithy/util-defaults-mode-browser": "^4.
|
|
22237
|
-
"@smithy/util-defaults-mode-node": "^4.
|
|
22238
|
-
"@smithy/util-endpoints": "^3.
|
|
22239
|
-
"@smithy/util-middleware": "^4.
|
|
22240
|
-
"@smithy/util-retry": "^4.
|
|
22241
|
-
"@smithy/util-utf8": "^4.
|
|
22207
|
+
"@aws-sdk/core": "3.901.0",
|
|
22208
|
+
"@aws-sdk/middleware-host-header": "3.901.0",
|
|
22209
|
+
"@aws-sdk/middleware-logger": "3.901.0",
|
|
22210
|
+
"@aws-sdk/middleware-recursion-detection": "3.901.0",
|
|
22211
|
+
"@aws-sdk/middleware-user-agent": "3.901.0",
|
|
22212
|
+
"@aws-sdk/region-config-resolver": "3.901.0",
|
|
22213
|
+
"@aws-sdk/types": "3.901.0",
|
|
22214
|
+
"@aws-sdk/util-endpoints": "3.901.0",
|
|
22215
|
+
"@aws-sdk/util-user-agent-browser": "3.901.0",
|
|
22216
|
+
"@aws-sdk/util-user-agent-node": "3.901.0",
|
|
22217
|
+
"@smithy/config-resolver": "^4.3.0",
|
|
22218
|
+
"@smithy/core": "^3.14.0",
|
|
22219
|
+
"@smithy/fetch-http-handler": "^5.3.0",
|
|
22220
|
+
"@smithy/hash-node": "^4.2.0",
|
|
22221
|
+
"@smithy/invalid-dependency": "^4.2.0",
|
|
22222
|
+
"@smithy/middleware-content-length": "^4.2.0",
|
|
22223
|
+
"@smithy/middleware-endpoint": "^4.3.0",
|
|
22224
|
+
"@smithy/middleware-retry": "^4.4.0",
|
|
22225
|
+
"@smithy/middleware-serde": "^4.2.0",
|
|
22226
|
+
"@smithy/middleware-stack": "^4.2.0",
|
|
22227
|
+
"@smithy/node-config-provider": "^4.3.0",
|
|
22228
|
+
"@smithy/node-http-handler": "^4.3.0",
|
|
22229
|
+
"@smithy/protocol-http": "^5.3.0",
|
|
22230
|
+
"@smithy/smithy-client": "^4.7.0",
|
|
22231
|
+
"@smithy/types": "^4.6.0",
|
|
22232
|
+
"@smithy/url-parser": "^4.2.0",
|
|
22233
|
+
"@smithy/util-base64": "^4.2.0",
|
|
22234
|
+
"@smithy/util-body-length-browser": "^4.2.0",
|
|
22235
|
+
"@smithy/util-body-length-node": "^4.2.0",
|
|
22236
|
+
"@smithy/util-defaults-mode-browser": "^4.2.0",
|
|
22237
|
+
"@smithy/util-defaults-mode-node": "^4.2.0",
|
|
22238
|
+
"@smithy/util-endpoints": "^3.2.0",
|
|
22239
|
+
"@smithy/util-middleware": "^4.2.0",
|
|
22240
|
+
"@smithy/util-retry": "^4.2.0",
|
|
22241
|
+
"@smithy/util-utf8": "^4.2.0",
|
|
22242
22242
|
tslib: "^2.6.2"
|
|
22243
22243
|
},
|
|
22244
22244
|
devDependencies: {
|
|
@@ -54353,7 +54353,9 @@ When presented with a broken Mermaid diagram, analyze it thoroughly and provide
|
|
|
54353
54353
|
model: this.options.model,
|
|
54354
54354
|
debug: this.options.debug,
|
|
54355
54355
|
tracer: this.options.tracer,
|
|
54356
|
-
allowEdit: this.options.allowEdit
|
|
54356
|
+
allowEdit: this.options.allowEdit,
|
|
54357
|
+
maxIterations: 2
|
|
54358
|
+
// Limit mermaid fixing to 2 iterations to prevent long loops
|
|
54357
54359
|
});
|
|
54358
54360
|
}
|
|
54359
54361
|
return this.agent;
|
|
@@ -54412,9 +54414,7 @@ ${contentToFix}
|
|
|
54412
54414
|
|
|
54413
54415
|
Provide only the corrected Mermaid diagram within a mermaid code block. Do not add any explanations or additional text.`;
|
|
54414
54416
|
try {
|
|
54415
|
-
const result = await this.agent.answer(prompt, []
|
|
54416
|
-
schema: "Return only valid Mermaid diagram code within ```mermaid code block"
|
|
54417
|
-
});
|
|
54417
|
+
const result = await this.agent.answer(prompt, []);
|
|
54418
54418
|
const extractedDiagram = this.extractCorrectedDiagram(result);
|
|
54419
54419
|
return extractedDiagram || result;
|
|
54420
54420
|
} catch (error2) {
|
|
@@ -55170,6 +55170,7 @@ var init_ProbeAgent = __esm({
|
|
|
55170
55170
|
* @param {boolean} [options.debug] - Enable debug mode
|
|
55171
55171
|
* @param {boolean} [options.outline] - Enable outline-xml format for search results
|
|
55172
55172
|
* @param {number} [options.maxResponseTokens] - Maximum tokens for AI responses
|
|
55173
|
+
* @param {number} [options.maxIterations] - Maximum tool iterations (overrides MAX_TOOL_ITERATIONS env var)
|
|
55173
55174
|
* @param {boolean} [options.disableMermaidValidation=false] - Disable automatic mermaid diagram validation and fixing
|
|
55174
55175
|
* @param {boolean} [options.enableMcp=false] - Enable MCP tool integration
|
|
55175
55176
|
* @param {string} [options.mcpConfigPath] - Path to MCP configuration file
|
|
@@ -55186,6 +55187,7 @@ var init_ProbeAgent = __esm({
|
|
|
55186
55187
|
this.tracer = options.tracer || null;
|
|
55187
55188
|
this.outline = !!options.outline;
|
|
55188
55189
|
this.maxResponseTokens = options.maxResponseTokens || parseInt(process.env.MAX_RESPONSE_TOKENS || "0", 10) || null;
|
|
55190
|
+
this.maxIterations = options.maxIterations || null;
|
|
55189
55191
|
this.disableMermaidValidation = !!options.disableMermaidValidation;
|
|
55190
55192
|
this.enableBash = !!options.enableBash;
|
|
55191
55193
|
this.bashConfig = options.bashConfig || {};
|
|
@@ -55880,11 +55882,12 @@ You are working with a repository located at: ${searchDirectory}
|
|
|
55880
55882
|
let currentIteration = 0;
|
|
55881
55883
|
let completionAttempted = false;
|
|
55882
55884
|
let finalResult = "I was unable to complete your request due to reaching the maximum number of tool iterations.";
|
|
55883
|
-
const
|
|
55885
|
+
const baseMaxIterations = this.maxIterations || MAX_TOOL_ITERATIONS;
|
|
55886
|
+
const maxIterations = options.schema ? baseMaxIterations + 4 : baseMaxIterations;
|
|
55884
55887
|
if (this.debug) {
|
|
55885
55888
|
console.log(`[DEBUG] Starting agentic flow for question: ${message.substring(0, 100)}...`);
|
|
55886
55889
|
if (options.schema) {
|
|
55887
|
-
console.log(`[DEBUG] Schema provided, using extended iteration limit: ${maxIterations} (base: ${
|
|
55890
|
+
console.log(`[DEBUG] Schema provided, using extended iteration limit: ${maxIterations} (base: ${baseMaxIterations})`);
|
|
55888
55891
|
}
|
|
55889
55892
|
}
|
|
55890
55893
|
while (currentIteration < maxIterations && !completionAttempted) {
|
package/package.json
CHANGED
package/src/agent/ProbeAgent.js
CHANGED
|
@@ -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
|
|
package/src/agent/schemaUtils.js
CHANGED
|
@@ -811,7 +811,8 @@ When presented with a broken Mermaid diagram, analyze it thoroughly and provide
|
|
|
811
811
|
model: this.options.model,
|
|
812
812
|
debug: this.options.debug,
|
|
813
813
|
tracer: this.options.tracer,
|
|
814
|
-
allowEdit: this.options.allowEdit
|
|
814
|
+
allowEdit: this.options.allowEdit,
|
|
815
|
+
maxIterations: 2 // Limit mermaid fixing to 2 iterations to prevent long loops
|
|
815
816
|
});
|
|
816
817
|
}
|
|
817
818
|
|
|
@@ -884,10 +885,11 @@ ${contentToFix}
|
|
|
884
885
|
Provide only the corrected Mermaid diagram within a mermaid code block. Do not add any explanations or additional text.`;
|
|
885
886
|
|
|
886
887
|
try {
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
888
|
+
// Don't pass schema to avoid infinite loop where AI returns raw mermaid code
|
|
889
|
+
// instead of using attempt_completion tool. The custom prompt already instructs
|
|
890
|
+
// to return only mermaid code blocks.
|
|
891
|
+
const result = await this.agent.answer(prompt, []);
|
|
892
|
+
|
|
891
893
|
// Extract the mermaid code from the response
|
|
892
894
|
const extractedDiagram = this.extractCorrectedDiagram(result);
|
|
893
895
|
return extractedDiagram || result;
|