@saber2pr/ai-agent 0.0.25 → 0.0.26
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/lib/core/agent-graph.js
CHANGED
|
@@ -60,6 +60,7 @@ class McpGraphAgent {
|
|
|
60
60
|
this.verbose = options.verbose || false;
|
|
61
61
|
this.alwaysSystem = options.alwaysSystem || true;
|
|
62
62
|
this.targetDir = options.targetDir || process.cwd();
|
|
63
|
+
this.recursionLimit = options.recursionLimit || 200;
|
|
63
64
|
process.setMaxListeners(100);
|
|
64
65
|
// ✅ 修复 AbortSignal 监听器数量警告
|
|
65
66
|
// LangChain 的 HTTP 客户端会创建多个 AbortSignal,需要增加默认限制
|
|
@@ -144,7 +145,7 @@ class McpGraphAgent {
|
|
|
144
145
|
messages: [new messages_1.HumanMessage(query)],
|
|
145
146
|
mode: "auto",
|
|
146
147
|
targetCount: 4,
|
|
147
|
-
}, { configurable: { thread_id: "auto_worker" }, recursionLimit:
|
|
148
|
+
}, { configurable: { thread_id: "auto_worker" }, recursionLimit: this.recursionLimit, debug: this.verbose, });
|
|
148
149
|
for await (const output of stream)
|
|
149
150
|
this.renderOutput(output);
|
|
150
151
|
}
|
package/lib/types/type.d.ts
CHANGED