kagent-ts 0.1.4 → 0.1.5
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/LICENSE +68 -21
- package/README.md +27 -371
- package/dist/compression/progressive-compressor.d.ts +66 -0
- package/dist/compression/progressive-compressor.d.ts.map +1 -0
- package/dist/compression/progressive-compressor.js +367 -0
- package/dist/compression/progressive-compressor.js.map +1 -0
- package/dist/compression/types.d.ts +1 -5
- package/dist/compression/types.d.ts.map +1 -1
- package/dist/context/context-manager.d.ts +34 -15
- package/dist/context/context-manager.d.ts.map +1 -1
- package/dist/context/context-manager.js +78 -28
- package/dist/context/context-manager.js.map +1 -1
- package/dist/context/types.d.ts +20 -4
- package/dist/context/types.d.ts.map +1 -1
- package/dist/core/agent.d.ts +354 -25
- package/dist/core/agent.d.ts.map +1 -1
- package/dist/core/agent.js +646 -64
- package/dist/core/agent.js.map +1 -1
- package/dist/core/fusion-agent.d.ts +207 -0
- package/dist/core/fusion-agent.d.ts.map +1 -0
- package/dist/core/fusion-agent.js +769 -0
- package/dist/core/fusion-agent.js.map +1 -0
- package/dist/core/hooks.d.ts +19 -7
- package/dist/core/hooks.d.ts.map +1 -1
- package/dist/core/plan-solve-agent.d.ts +1 -15
- package/dist/core/plan-solve-agent.d.ts.map +1 -1
- package/dist/core/plan-solve-agent.js +142 -117
- package/dist/core/plan-solve-agent.js.map +1 -1
- package/dist/core/react-agent.d.ts +0 -13
- package/dist/core/react-agent.d.ts.map +1 -1
- package/dist/core/react-agent.js +127 -102
- package/dist/core/react-agent.js.map +1 -1
- package/dist/core/response-schema.d.ts +65 -0
- package/dist/core/response-schema.d.ts.map +1 -1
- package/dist/core/response-schema.js +174 -1
- package/dist/core/response-schema.js.map +1 -1
- package/dist/core/system-prompts.d.ts +27 -0
- package/dist/core/system-prompts.d.ts.map +1 -0
- package/dist/core/system-prompts.js +112 -0
- package/dist/core/system-prompts.js.map +1 -0
- package/dist/eval/benchmark.d.ts +81 -0
- package/dist/eval/benchmark.d.ts.map +1 -0
- package/dist/eval/benchmark.js +292 -0
- package/dist/eval/benchmark.js.map +1 -0
- package/dist/eval/eval-runner.d.ts +79 -0
- package/dist/eval/eval-runner.d.ts.map +1 -0
- package/dist/eval/eval-runner.js +252 -0
- package/dist/eval/eval-runner.js.map +1 -0
- package/dist/eval/index.d.ts +7 -0
- package/dist/eval/index.d.ts.map +1 -0
- package/dist/eval/index.js +13 -0
- package/dist/eval/index.js.map +1 -0
- package/dist/eval/tool-call-evaluator.d.ts +72 -0
- package/dist/eval/tool-call-evaluator.d.ts.map +1 -0
- package/dist/eval/tool-call-evaluator.js +265 -0
- package/dist/eval/tool-call-evaluator.js.map +1 -0
- package/dist/eval/types.d.ts +219 -0
- package/dist/eval/types.d.ts.map +1 -0
- package/dist/eval/types.js +3 -0
- package/dist/eval/types.js.map +1 -0
- package/dist/index.d.ts +58 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +116 -8
- package/dist/index.js.map +1 -1
- package/dist/llm/anthropic-provider.d.ts +141 -0
- package/dist/llm/anthropic-provider.d.ts.map +1 -0
- package/dist/llm/anthropic-provider.js +486 -0
- package/dist/llm/anthropic-provider.js.map +1 -0
- package/dist/llm/errors.d.ts +26 -0
- package/dist/llm/errors.d.ts.map +1 -0
- package/dist/llm/errors.js +19 -0
- package/dist/llm/errors.js.map +1 -0
- package/dist/llm/factory.d.ts +73 -0
- package/dist/llm/factory.d.ts.map +1 -0
- package/dist/llm/factory.js +77 -0
- package/dist/llm/factory.js.map +1 -0
- package/dist/llm/fallback-provider.d.ts +47 -0
- package/dist/llm/fallback-provider.d.ts.map +1 -0
- package/dist/llm/fallback-provider.js +91 -0
- package/dist/llm/fallback-provider.js.map +1 -0
- package/dist/llm/interface.d.ts +54 -11
- package/dist/llm/interface.d.ts.map +1 -1
- package/dist/llm/interface.js +34 -0
- package/dist/llm/interface.js.map +1 -1
- package/dist/llm/model-router.d.ts +126 -0
- package/dist/llm/model-router.d.ts.map +1 -0
- package/dist/llm/model-router.js +178 -0
- package/dist/llm/model-router.js.map +1 -0
- package/dist/llm/openai-provider.d.ts +8 -32
- package/dist/llm/openai-provider.d.ts.map +1 -1
- package/dist/llm/openai-provider.js +27 -60
- package/dist/llm/openai-provider.js.map +1 -1
- package/dist/llm/rate-limiter.d.ts +41 -0
- package/dist/llm/rate-limiter.d.ts.map +1 -0
- package/dist/llm/rate-limiter.js +93 -0
- package/dist/llm/rate-limiter.js.map +1 -0
- package/dist/llm/retry.d.ts +26 -0
- package/dist/llm/retry.d.ts.map +1 -0
- package/dist/llm/retry.js +44 -0
- package/dist/llm/retry.js.map +1 -0
- package/dist/llm/token-budget.d.ts +97 -0
- package/dist/llm/token-budget.d.ts.map +1 -0
- package/dist/llm/token-budget.js +115 -0
- package/dist/llm/token-budget.js.map +1 -0
- package/dist/logging/index.d.ts +2 -0
- package/dist/logging/index.d.ts.map +1 -0
- package/dist/logging/index.js +7 -0
- package/dist/logging/index.js.map +1 -0
- package/dist/logging/logger.d.ts +38 -0
- package/dist/logging/logger.d.ts.map +1 -0
- package/dist/logging/logger.js +34 -0
- package/dist/logging/logger.js.map +1 -0
- package/dist/mcp/mcp-client-manager.d.ts +10 -2
- package/dist/mcp/mcp-client-manager.d.ts.map +1 -1
- package/dist/mcp/mcp-client-manager.js +20 -9
- package/dist/mcp/mcp-client-manager.js.map +1 -1
- package/dist/memory/index.d.ts +3 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +6 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/memory-manager.d.ts +119 -0
- package/dist/memory/memory-manager.d.ts.map +1 -0
- package/dist/memory/memory-manager.js +334 -0
- package/dist/memory/memory-manager.js.map +1 -0
- package/dist/messages/types.d.ts +2 -0
- package/dist/messages/types.d.ts.map +1 -1
- package/dist/orchestrator/index.d.ts +5 -0
- package/dist/orchestrator/index.d.ts.map +1 -0
- package/dist/orchestrator/index.js +13 -0
- package/dist/orchestrator/index.js.map +1 -0
- package/dist/orchestrator/json-extractor.d.ts +18 -0
- package/dist/orchestrator/json-extractor.d.ts.map +1 -0
- package/dist/orchestrator/json-extractor.js +111 -0
- package/dist/orchestrator/json-extractor.js.map +1 -0
- package/dist/orchestrator/orchestrator-agent.d.ts +152 -0
- package/dist/orchestrator/orchestrator-agent.d.ts.map +1 -0
- package/dist/orchestrator/orchestrator-agent.js +675 -0
- package/dist/orchestrator/orchestrator-agent.js.map +1 -0
- package/dist/orchestrator/orchestrator-response.d.ts +40 -0
- package/dist/orchestrator/orchestrator-response.d.ts.map +1 -0
- package/dist/orchestrator/orchestrator-response.js +275 -0
- package/dist/orchestrator/orchestrator-response.js.map +1 -0
- package/dist/orchestrator/orchestrator-types.d.ts +116 -0
- package/dist/orchestrator/orchestrator-types.d.ts.map +1 -0
- package/dist/orchestrator/orchestrator-types.js +3 -0
- package/dist/orchestrator/orchestrator-types.js.map +1 -0
- package/dist/preferences/preference-manager.d.ts +8 -3
- package/dist/preferences/preference-manager.d.ts.map +1 -1
- package/dist/preferences/preference-manager.js +17 -4
- package/dist/preferences/preference-manager.js.map +1 -1
- package/dist/rag/chroma-store.d.ts +52 -0
- package/dist/rag/chroma-store.d.ts.map +1 -0
- package/dist/rag/chroma-store.js +110 -0
- package/dist/rag/chroma-store.js.map +1 -0
- package/dist/rag/document-loader.d.ts +21 -0
- package/dist/rag/document-loader.d.ts.map +1 -0
- package/dist/rag/document-loader.js +129 -0
- package/dist/rag/document-loader.js.map +1 -0
- package/dist/rag/embedding-provider.d.ts +36 -0
- package/dist/rag/embedding-provider.d.ts.map +1 -0
- package/dist/rag/embedding-provider.js +74 -0
- package/dist/rag/embedding-provider.js.map +1 -0
- package/dist/rag/index.d.ts +17 -0
- package/dist/rag/index.d.ts.map +1 -0
- package/dist/rag/index.js +27 -0
- package/dist/rag/index.js.map +1 -0
- package/dist/rag/keyword-index.d.ts +53 -0
- package/dist/rag/keyword-index.d.ts.map +1 -0
- package/dist/rag/keyword-index.js +161 -0
- package/dist/rag/keyword-index.js.map +1 -0
- package/dist/rag/llm-reranker.d.ts +36 -0
- package/dist/rag/llm-reranker.d.ts.map +1 -0
- package/dist/rag/llm-reranker.js +95 -0
- package/dist/rag/llm-reranker.js.map +1 -0
- package/dist/rag/rag-manager.d.ts +54 -0
- package/dist/rag/rag-manager.d.ts.map +1 -0
- package/dist/rag/rag-manager.js +179 -0
- package/dist/rag/rag-manager.js.map +1 -0
- package/dist/rag/rag-types.d.ts +143 -0
- package/dist/rag/rag-types.d.ts.map +1 -0
- package/dist/rag/rag-types.js +9 -0
- package/dist/rag/rag-types.js.map +1 -0
- package/dist/rag/rrf.d.ts +47 -0
- package/dist/rag/rrf.d.ts.map +1 -0
- package/dist/rag/rrf.js +70 -0
- package/dist/rag/rrf.js.map +1 -0
- package/dist/rag/search-knowledge.d.ts +24 -0
- package/dist/rag/search-knowledge.d.ts.map +1 -0
- package/dist/rag/search-knowledge.js +86 -0
- package/dist/rag/search-knowledge.js.map +1 -0
- package/dist/rag/text-splitter.d.ts +25 -0
- package/dist/rag/text-splitter.d.ts.map +1 -0
- package/dist/rag/text-splitter.js +136 -0
- package/dist/rag/text-splitter.js.map +1 -0
- package/dist/rag/vector-store.d.ts +34 -0
- package/dist/rag/vector-store.d.ts.map +1 -0
- package/dist/rag/vector-store.js +73 -0
- package/dist/rag/vector-store.js.map +1 -0
- package/dist/reflection/error-notebook.d.ts +125 -0
- package/dist/reflection/error-notebook.d.ts.map +1 -0
- package/dist/reflection/error-notebook.js +368 -0
- package/dist/reflection/error-notebook.js.map +1 -0
- package/dist/reflection/index.d.ts +8 -0
- package/dist/reflection/index.d.ts.map +1 -0
- package/dist/reflection/index.js +12 -0
- package/dist/reflection/index.js.map +1 -0
- package/dist/reflection/memory-reflector.d.ts +97 -0
- package/dist/reflection/memory-reflector.d.ts.map +1 -0
- package/dist/reflection/memory-reflector.js +215 -0
- package/dist/reflection/memory-reflector.js.map +1 -0
- package/dist/reflection/reflection-agent.d.ts +105 -0
- package/dist/reflection/reflection-agent.d.ts.map +1 -0
- package/dist/reflection/reflection-agent.js +234 -0
- package/dist/reflection/reflection-agent.js.map +1 -0
- package/dist/reflection/reflection-hook.d.ts +50 -0
- package/dist/reflection/reflection-hook.d.ts.map +1 -0
- package/dist/reflection/reflection-hook.js +108 -0
- package/dist/reflection/reflection-hook.js.map +1 -0
- package/dist/rules/project-rules.d.ts +47 -0
- package/dist/rules/project-rules.d.ts.map +1 -0
- package/dist/rules/project-rules.js +166 -0
- package/dist/rules/project-rules.js.map +1 -0
- package/dist/security/boundaries.d.ts +81 -0
- package/dist/security/boundaries.d.ts.map +1 -0
- package/dist/security/boundaries.js +158 -0
- package/dist/security/boundaries.js.map +1 -0
- package/dist/security/index.d.ts +2 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +11 -0
- package/dist/security/index.js.map +1 -0
- package/dist/session/session-types.d.ts +25 -4
- package/dist/session/session-types.d.ts.map +1 -1
- package/dist/skills/file-skill-loader.d.ts +4 -6
- package/dist/skills/file-skill-loader.d.ts.map +1 -1
- package/dist/skills/file-skill-loader.js +8 -19
- package/dist/skills/file-skill-loader.js.map +1 -1
- package/dist/skills/index.d.ts +1 -1
- package/dist/skills/index.d.ts.map +1 -1
- package/dist/skills/index.js +1 -2
- package/dist/skills/index.js.map +1 -1
- package/dist/skills/skill-manager.d.ts +18 -8
- package/dist/skills/skill-manager.d.ts.map +1 -1
- package/dist/skills/skill-manager.js +58 -36
- package/dist/skills/skill-manager.js.map +1 -1
- package/dist/skills/types.d.ts +3 -8
- package/dist/skills/types.d.ts.map +1 -1
- package/dist/subagent/index.d.ts +4 -0
- package/dist/subagent/index.d.ts.map +1 -0
- package/dist/subagent/index.js +8 -0
- package/dist/subagent/index.js.map +1 -0
- package/dist/subagent/subagent-loader.d.ts +53 -0
- package/dist/subagent/subagent-loader.d.ts.map +1 -0
- package/dist/subagent/subagent-loader.js +155 -0
- package/dist/subagent/subagent-loader.js.map +1 -0
- package/dist/subagent/subagent-manager.d.ts +161 -0
- package/dist/subagent/subagent-manager.d.ts.map +1 -0
- package/dist/subagent/subagent-manager.js +468 -0
- package/dist/subagent/subagent-manager.js.map +1 -0
- package/dist/subagent/subagent-types.d.ts +77 -0
- package/dist/subagent/subagent-types.d.ts.map +1 -0
- package/dist/subagent/subagent-types.js +3 -0
- package/dist/subagent/subagent-types.js.map +1 -0
- package/dist/tools/builtin/bash.d.ts +3 -0
- package/dist/tools/builtin/bash.d.ts.map +1 -0
- package/dist/tools/builtin/bash.js +87 -0
- package/dist/tools/builtin/bash.js.map +1 -0
- package/dist/tools/builtin/edit-file.d.ts.map +1 -1
- package/dist/tools/builtin/edit-file.js +1 -0
- package/dist/tools/builtin/edit-file.js.map +1 -1
- package/dist/tools/builtin/index.d.ts +14 -0
- package/dist/tools/builtin/index.d.ts.map +1 -1
- package/dist/tools/builtin/index.js +45 -1
- package/dist/tools/builtin/index.js.map +1 -1
- package/dist/tools/builtin/list-errors.d.ts +7 -0
- package/dist/tools/builtin/list-errors.d.ts.map +1 -0
- package/dist/tools/builtin/list-errors.js +64 -0
- package/dist/tools/builtin/list-errors.js.map +1 -0
- package/dist/tools/builtin/list-subagents.d.ts +7 -0
- package/dist/tools/builtin/list-subagents.d.ts.map +1 -0
- package/dist/tools/builtin/list-subagents.js +21 -0
- package/dist/tools/builtin/list-subagents.js.map +1 -0
- package/dist/tools/builtin/recall.d.ts +11 -0
- package/dist/tools/builtin/recall.d.ts.map +1 -0
- package/dist/tools/builtin/recall.js +60 -0
- package/dist/tools/builtin/recall.js.map +1 -0
- package/dist/tools/builtin/remember.d.ts +12 -0
- package/dist/tools/builtin/remember.d.ts.map +1 -0
- package/dist/tools/builtin/remember.js +72 -0
- package/dist/tools/builtin/remember.js.map +1 -0
- package/dist/tools/builtin/skill.d.ts +14 -0
- package/dist/tools/builtin/skill.d.ts.map +1 -0
- package/dist/tools/builtin/skill.js +71 -0
- package/dist/tools/builtin/skill.js.map +1 -0
- package/dist/tools/builtin/spawn-subagent.d.ts +7 -0
- package/dist/tools/builtin/spawn-subagent.d.ts.map +1 -0
- package/dist/tools/builtin/spawn-subagent.js +43 -0
- package/dist/tools/builtin/spawn-subagent.js.map +1 -0
- package/dist/tools/builtin/web-fetch.d.ts +3 -0
- package/dist/tools/builtin/web-fetch.d.ts.map +1 -0
- package/dist/tools/builtin/web-fetch.js +101 -0
- package/dist/tools/builtin/web-fetch.js.map +1 -0
- package/dist/tools/builtin/write-file.d.ts.map +1 -1
- package/dist/tools/builtin/write-file.js +1 -0
- package/dist/tools/builtin/write-file.js.map +1 -1
- package/dist/tools/circuit-breaker.d.ts +19 -10
- package/dist/tools/circuit-breaker.d.ts.map +1 -1
- package/dist/tools/circuit-breaker.js +22 -11
- package/dist/tools/circuit-breaker.js.map +1 -1
- package/dist/tools/error-tracker.d.ts +28 -44
- package/dist/tools/error-tracker.d.ts.map +1 -1
- package/dist/tools/error-tracker.js +39 -156
- package/dist/tools/error-tracker.js.map +1 -1
- package/dist/tools/tool-filter.d.ts +70 -0
- package/dist/tools/tool-filter.d.ts.map +1 -0
- package/dist/tools/tool-filter.js +92 -0
- package/dist/tools/tool-filter.js.map +1 -0
- package/dist/tools/tool-output-truncator.d.ts +36 -0
- package/dist/tools/tool-output-truncator.d.ts.map +1 -0
- package/dist/tools/tool-output-truncator.js +117 -0
- package/dist/tools/tool-output-truncator.js.map +1 -0
- package/dist/tools/tool-registry.d.ts +25 -9
- package/dist/tools/tool-registry.d.ts.map +1 -1
- package/dist/tools/tool-registry.js +77 -28
- package/dist/tools/tool-registry.js.map +1 -1
- package/dist/tools/tool-validator.d.ts +13 -0
- package/dist/tools/tool-validator.d.ts.map +1 -0
- package/dist/tools/tool-validator.js +116 -0
- package/dist/tools/tool-validator.js.map +1 -0
- package/dist/tools/types.d.ts +86 -3
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/types.js +51 -2
- package/dist/tools/types.js.map +1 -1
- package/dist/trace/trace-logger.d.ts +30 -4
- package/dist/trace/trace-logger.d.ts.map +1 -1
- package/dist/trace/trace-logger.js +82 -6
- package/dist/trace/trace-logger.js.map +1 -1
- package/package.json +13 -4
- package/dist/compression/sliding-window.d.ts +0 -21
- package/dist/compression/sliding-window.d.ts.map +0 -1
- package/dist/compression/sliding-window.js +0 -44
- package/dist/compression/sliding-window.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-manager.js","sourceRoot":"","sources":["../../src/context/context-manager.ts"],"names":[],"mappings":";;;AAAA,6CAAsD;
|
|
1
|
+
{"version":3,"file":"context-manager.js","sourceRoot":"","sources":["../../src/context/context-manager.ts"],"names":[],"mappings":";;;AAAA,6CAAsD;AAEtD,0DAAqD;AACrD,kFAA8E;AAE9E,8CAA0D;AAE1D;;;;;;;;GAQG;AACH,MAAa,cAAc;IACjB,MAAM,CAAgB;IACtB,QAAQ,GAAkB,EAAE,CAAC;IAC7B,aAAa,GAAuB,IAAI,CAAC;IACzC,aAAa,GAAG,KAAK,CAAC;IACtB,UAAU,CAAwB;IAClC,MAAM,CAAS;IAEvB,YAAY,MAA+B,EAAE,MAAe;QAC1D,IAAI,CAAC,MAAM,GAAG;YACZ,SAAS,EAAE,MAAM,EAAE,SAAS,IAAI,MAAM;YACtC,oBAAoB,EAAE,MAAM,EAAE,oBAAoB,IAAI,KAAK;YAC3D,SAAS,EAAE,MAAM,EAAE,SAAS,IAAI,EAAE;YAClC,kBAAkB,EAAE,MAAM,EAAE,kBAAkB,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;YAChE,WAAW,EAAE,MAAM,EAAE,WAAW;SACjC,CAAC;QAEF,sBAAsB;QACtB,IAAI,IAAI,CAAC,MAAM,CAAC,oBAAoB,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,oBAAoB,GAAG,IAAI,EAAE,CAAC;YACpF,MAAM,IAAI,KAAK,CACb,2EAA2E;gBAC3E,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,gBAAgB,IA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AEG;IACH,KAAK;QACH,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;IAC7B,CAAC;CACF;AAtLD,wCAsLC"}
|
package/dist/context/types.d.ts
CHANGED
|
@@ -9,11 +9,27 @@ export interface ContextConfig {
|
|
|
9
9
|
*/
|
|
10
10
|
maxTokens: number;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* Free tokens to reserve when compression fires.
|
|
13
|
+
*
|
|
14
|
+
* Two modes (auto-detected by value):
|
|
15
|
+
* - **Absolute** (`>= 1`): reserve this many tokens. Default 20000.
|
|
16
|
+
* - **Ratio** (`< 1`): reserve this fraction of maxTokens.
|
|
17
|
+
* Must be ≤ 0.25 so the trigger point is ≥ 75 % of the window.
|
|
18
|
+
*
|
|
19
|
+
* Trigger condition: `currentTokens >= maxTokens - reserve` where
|
|
20
|
+
* `reserve = threshold (< 1 ? maxTokens * threshold : threshold)`.
|
|
15
21
|
*/
|
|
16
|
-
|
|
22
|
+
compressionThreshold: number;
|
|
23
|
+
/**
|
|
24
|
+
* Number of conversation turns to preserve in Step 2 of compression.
|
|
25
|
+
* Default: 40.
|
|
26
|
+
*/
|
|
27
|
+
keepTurns: number;
|
|
28
|
+
/**
|
|
29
|
+
* Tool results older than this (ms) are candidates for removal in Step 3.
|
|
30
|
+
* Default: 3600000 (60 minutes).
|
|
31
|
+
*/
|
|
32
|
+
toolResultMaxAgeMs: number;
|
|
17
33
|
/**
|
|
18
34
|
* Compression strategy configuration.
|
|
19
35
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/context/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/context/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;;;;;OAUG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAE7B;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,uDAAuD;IACvD,aAAa,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,YAAY,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,YAAY,EAAE,OAAO,CAAC;IACtB,2BAA2B;IAC3B,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
package/dist/core/agent.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { LLMProvider } from "../llm/interface";
|
|
1
|
+
import { LLMProvider, ToolCall } from "../llm/interface";
|
|
2
|
+
import { LLMNetworkError } from "../llm/errors";
|
|
2
3
|
import { ContextManager } from "../context/context-manager";
|
|
3
4
|
import { Tool } from "./types";
|
|
4
5
|
import { ToolRegistry } from "../tools/tool-registry";
|
|
5
6
|
import { ToolErrorTracker } from "../tools/error-tracker";
|
|
6
7
|
import { SkillManager } from "../skills/skill-manager";
|
|
8
|
+
import { MemoryManager } from "../memory/memory-manager";
|
|
9
|
+
import { ProjectRules } from "../rules/project-rules";
|
|
7
10
|
import { SessionManager } from "../session/session-manager";
|
|
8
11
|
import { SessionState, SessionStatus, AgentType } from "../session/session-types";
|
|
9
12
|
import { PreferenceManager } from "../preferences/preference-manager";
|
|
@@ -11,6 +14,19 @@ import { Preferences } from "../preferences/types";
|
|
|
11
14
|
import { AgentHooks } from "./hooks";
|
|
12
15
|
import { McpClientManager } from "../mcp/mcp-client-manager";
|
|
13
16
|
import type { McpServerConfig } from "../mcp/mcp-types";
|
|
17
|
+
import { SubAgentManager } from "../subagent/subagent-manager";
|
|
18
|
+
import type { SubAgentResult } from "../subagent/subagent-types";
|
|
19
|
+
import { RAGManager } from "../rag/rag-manager";
|
|
20
|
+
import type { RAGConfig } from "../rag/rag-types";
|
|
21
|
+
import { Logger } from "../logging/logger";
|
|
22
|
+
import { TokenBudget, TokenBudgetConfig } from "../llm/token-budget";
|
|
23
|
+
/**
|
|
24
|
+
* Callback for human-in-the-loop tool approval.
|
|
25
|
+
*
|
|
26
|
+
* Called before executing a tool marked `requireApproval: true`.
|
|
27
|
+
* Return `true` to approve execution, `false` to deny it.
|
|
28
|
+
*/
|
|
29
|
+
export type ApprovalCallback = (toolName: string, args: Record<string, unknown>) => Promise<boolean>;
|
|
14
30
|
/**
|
|
15
31
|
* Base configuration for any Agent.
|
|
16
32
|
*/
|
|
@@ -27,6 +43,17 @@ export interface AgentConfig {
|
|
|
27
43
|
* Takes precedence over the plain `tools` array.
|
|
28
44
|
*/
|
|
29
45
|
toolRegistry?: ToolRegistry;
|
|
46
|
+
/**
|
|
47
|
+
* Max bytes a tool output can be before it is automatically truncated.
|
|
48
|
+
* When a tool returns a result larger than this, the first 2 KB are kept
|
|
49
|
+
* in context and the full output is saved to disk for on-demand reading.
|
|
50
|
+
*
|
|
51
|
+
* Set to 0 (default) to disable truncation.
|
|
52
|
+
*
|
|
53
|
+
* Only used when `toolRegistry` is NOT provided (the framework creates
|
|
54
|
+
* its own registry).
|
|
55
|
+
*/
|
|
56
|
+
toolOutputMaxBytes?: number;
|
|
30
57
|
/**
|
|
31
58
|
* Number of retry attempts allowed per tool before its circuit
|
|
32
59
|
* breaker opens. Only used with the plain `tools` array path
|
|
@@ -56,12 +83,42 @@ export interface AgentConfig {
|
|
|
56
83
|
* full content loads on activation.
|
|
57
84
|
*/
|
|
58
85
|
skillsDir?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Path to the long-term memory storage directory.
|
|
88
|
+
* Default: ".memory". The MemoryManager persists facts, rules, and
|
|
89
|
+
* decisions across sessions using an index (MEMORY.md) + individual
|
|
90
|
+
* markdown files.
|
|
91
|
+
*/
|
|
92
|
+
memoryDir?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Path to a project rules file (e.g. "RULES.md") or directory (e.g.
|
|
95
|
+
* ".rules/"). Rules are user-authored, always injected into the system
|
|
96
|
+
* prompt, and reloaded at the start of each run.
|
|
97
|
+
*/
|
|
98
|
+
rulesPath?: string;
|
|
59
99
|
systemPrompt?: string;
|
|
60
100
|
/**
|
|
61
101
|
* Lifecycle hooks for observing agent execution.
|
|
62
102
|
* Accepts a single AgentHooks or an array of them.
|
|
63
103
|
*/
|
|
64
104
|
hooks?: AgentHooks | AgentHooks[];
|
|
105
|
+
/**
|
|
106
|
+
* Human-in-the-loop approval callback.
|
|
107
|
+
*
|
|
108
|
+
* Called before executing tools marked `requireApproval: true`.
|
|
109
|
+
* Return `true` to approve, `false` to deny (the tool is skipped and
|
|
110
|
+
* an APPROVAL_DENIED result is injected into context).
|
|
111
|
+
*
|
|
112
|
+
* If not provided, tools with `requireApproval: true` are ALWAYS DENIED
|
|
113
|
+
* (safe default — no silent execution of dangerous tools).
|
|
114
|
+
*/
|
|
115
|
+
onToolApproval?: ApprovalCallback;
|
|
116
|
+
/**
|
|
117
|
+
* Logger instance for framework-internal messages.
|
|
118
|
+
* Defaults to {@link ConsoleLogger} (writes to `console` with `[Tag]` prefix).
|
|
119
|
+
* Pass a {@link SilentLogger} to suppress all framework output.
|
|
120
|
+
*/
|
|
121
|
+
logger?: Logger;
|
|
65
122
|
/**
|
|
66
123
|
* Explicit user preferences: key-value pairs of plain-text directives
|
|
67
124
|
* injected into the system prompt so the LLM always honors them.
|
|
@@ -122,6 +179,81 @@ export interface AgentConfig {
|
|
|
122
179
|
* ```
|
|
123
180
|
*/
|
|
124
181
|
mcpServers?: Record<string, McpServerConfig>;
|
|
182
|
+
/**
|
|
183
|
+
* Path to a directory of sub-agent definitions (AGENT.md files).
|
|
184
|
+
*
|
|
185
|
+
* Each subdirectory should contain an `AGENT.md` file with YAML-like
|
|
186
|
+
* frontmatter (name, description, tools, skills) and a body that serves
|
|
187
|
+
* as the system prompt.
|
|
188
|
+
*
|
|
189
|
+
* Sub-agents can be spawned by the main agent via the `spawn_subagent`
|
|
190
|
+
* tool. They run asynchronously; results are injected back as user
|
|
191
|
+
* messages.
|
|
192
|
+
*
|
|
193
|
+
* @example
|
|
194
|
+
* ```
|
|
195
|
+
* subagents/
|
|
196
|
+
* ├── code-reviewer/
|
|
197
|
+
* │ └── AGENT.md
|
|
198
|
+
* └── researcher/
|
|
199
|
+
* └── AGENT.md
|
|
200
|
+
* ```
|
|
201
|
+
*/
|
|
202
|
+
subAgentsDir?: string;
|
|
203
|
+
/**
|
|
204
|
+
* LLM provider for sub-agents spawned by the main agent.
|
|
205
|
+
*
|
|
206
|
+
* When set, sub-agents use this provider instead of the main agent's LLM.
|
|
207
|
+
* This enables model routing — use a cheaper/faster model for simple
|
|
208
|
+
* sub-agent tasks while keeping the main model for complex reasoning.
|
|
209
|
+
*
|
|
210
|
+
* When omitted, sub-agents inherit the main agent's `llm` provider.
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* ```ts
|
|
214
|
+
* const agent = new ReActAgent({
|
|
215
|
+
* llm: new OpenAIProvider({ model: "gpt-4o" }),
|
|
216
|
+
* subAgentLLM: new OpenAIProvider({ model: "gpt-4o-mini" }),
|
|
217
|
+
* subAgentsDir: "./subagents",
|
|
218
|
+
* });
|
|
219
|
+
* ```
|
|
220
|
+
*/
|
|
221
|
+
subAgentLLM?: LLMProvider;
|
|
222
|
+
/**
|
|
223
|
+
* RAG (Retrieval-Augmented Generation) configuration.
|
|
224
|
+
*
|
|
225
|
+
* When set, documents from `documentsDir` are indexed at startup and the
|
|
226
|
+
* `search_knowledge` tool is registered so the LLM can retrieve relevant
|
|
227
|
+
* context before answering.
|
|
228
|
+
*
|
|
229
|
+
* @example
|
|
230
|
+
* ```ts
|
|
231
|
+
* rag: {
|
|
232
|
+
* documentsDir: "./docs",
|
|
233
|
+
* embeddingProvider: new OpenAIEmbeddingProvider({ apiKey: "..." }),
|
|
234
|
+
* topK: 5,
|
|
235
|
+
* }
|
|
236
|
+
* ```
|
|
237
|
+
*/
|
|
238
|
+
rag?: RAGConfig;
|
|
239
|
+
/**
|
|
240
|
+
* Token budget configuration for session-level cost control.
|
|
241
|
+
* When set, the agent stops making LLM calls when cumulative token
|
|
242
|
+
* consumption exceeds `maxTotalTokens`. The budget resets on
|
|
243
|
+
* `clearConversation()` and `reset()`.
|
|
244
|
+
*/
|
|
245
|
+
tokenBudgetConfig?: TokenBudgetConfig;
|
|
246
|
+
/**
|
|
247
|
+
* Enable parallel execution of tool calls within a single LLM response.
|
|
248
|
+
*
|
|
249
|
+
* When `true` (default), tool calls from the same LLM response that are
|
|
250
|
+
* all parallel-safe (no `sequential: true` marks) execute concurrently
|
|
251
|
+
* via `Promise.allSettled`. This reduces per-turn latency from
|
|
252
|
+
* `sum(latency)` to `max(latency)`.
|
|
253
|
+
*
|
|
254
|
+
* Set to `false` to always execute tools one at a time (legacy behaviour).
|
|
255
|
+
*/
|
|
256
|
+
enableParallelToolExecution?: boolean;
|
|
125
257
|
}
|
|
126
258
|
/**
|
|
127
259
|
* Abstract base Agent class.
|
|
@@ -142,6 +274,10 @@ export declare abstract class Agent {
|
|
|
142
274
|
protected contextManager: ContextManager;
|
|
143
275
|
protected toolRegistry: ToolRegistry;
|
|
144
276
|
protected skillManager: SkillManager;
|
|
277
|
+
/** Long-term memory (rules + project facts) persisted across sessions. */
|
|
278
|
+
protected memoryManager: MemoryManager;
|
|
279
|
+
/** User-defined project rules loaded from disk. */
|
|
280
|
+
protected projectRules: ProjectRules;
|
|
145
281
|
/** The original core system prompt (before skill sections are appended). */
|
|
146
282
|
protected coreSystemPrompt: string;
|
|
147
283
|
/** User preferences — plain-text directives injected into the system prompt. */
|
|
@@ -150,22 +286,40 @@ export declare abstract class Agent {
|
|
|
150
286
|
protected preferenceManager?: PreferenceManager;
|
|
151
287
|
/** Lifecycle hooks for observing agent execution. */
|
|
152
288
|
protected hooks: AgentHooks[];
|
|
153
|
-
/**
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
protected
|
|
289
|
+
/** Logger for framework-internal messages. */
|
|
290
|
+
protected logger: Logger;
|
|
291
|
+
/** Token budget for session-level cost control (optional). */
|
|
292
|
+
protected tokenBudget?: TokenBudget;
|
|
293
|
+
/** Human-in-the-loop approval callback (from AgentConfig). */
|
|
294
|
+
protected onToolApproval?: ApprovalCallback;
|
|
295
|
+
/** Whether to execute independent tool calls in parallel (default: true). */
|
|
296
|
+
protected enableParallelToolExecution: boolean;
|
|
157
297
|
/** Session manager for checkpoint persistence (optional). */
|
|
158
298
|
protected sessionManager?: SessionManager;
|
|
159
299
|
/** Whether auto-checkpointing is enabled. */
|
|
160
300
|
protected checkpointingEnabled: boolean;
|
|
161
301
|
/** Whether the current run has been cancelled by the user. */
|
|
162
302
|
protected _cancelled: boolean;
|
|
303
|
+
/** Controller for aborting in-flight LLM requests on cancellation. */
|
|
304
|
+
protected _abortController?: AbortController;
|
|
163
305
|
/** MCP server configurations (from AgentConfig). */
|
|
164
306
|
protected mcpServerConfigs?: Record<string, McpServerConfig>;
|
|
165
307
|
/** MCP client manager for dynamic tool discovery (lazily initialized). */
|
|
166
308
|
protected mcpClientManager?: McpClientManager;
|
|
167
309
|
/** Guards async init() from running more than once per instance. */
|
|
168
310
|
private _mcpInitialized;
|
|
311
|
+
/** RAG manager (lazily initialized in init()). */
|
|
312
|
+
protected ragManager?: RAGManager;
|
|
313
|
+
/** RAG configuration (from AgentConfig). */
|
|
314
|
+
protected ragConfig?: RAGConfig;
|
|
315
|
+
/** Sub-agent manager (lazily initialized in init()). */
|
|
316
|
+
protected subAgentManager?: SubAgentManager;
|
|
317
|
+
/** Sub-agent definitions directory (from AgentConfig). */
|
|
318
|
+
protected subAgentsDir?: string;
|
|
319
|
+
/** LLM provider for sub-agents (defaults to main llm if not set). */
|
|
320
|
+
protected subAgentLLM?: LLMProvider;
|
|
321
|
+
/** Skills directory path (from AgentConfig). */
|
|
322
|
+
protected skillsDir?: string;
|
|
169
323
|
constructor(config: AgentConfig);
|
|
170
324
|
/**
|
|
171
325
|
* Run the agent with the given user input and return the final response.
|
|
@@ -199,21 +353,117 @@ export declare abstract class Agent {
|
|
|
199
353
|
*/
|
|
200
354
|
addHook(hook: AgentHooks): void;
|
|
201
355
|
/**
|
|
202
|
-
* Rebuild the system message
|
|
203
|
-
*
|
|
356
|
+
* Rebuild the system message.
|
|
357
|
+
*
|
|
358
|
+
* Sections are assembled in priority order:
|
|
359
|
+
* 1. Core prompt (agent identity + instructions)
|
|
360
|
+
* 2. Project rules (user-authored, always injected)
|
|
361
|
+
* 3. Preferences (user-set language / verbosity / style)
|
|
362
|
+
* 4. Error recovery rules (tool failure recovery guidance)
|
|
363
|
+
* 5. Long-term memories (index of persisted facts + rules)
|
|
364
|
+
* 6. Available skills (inactive skills the LLM can activate)
|
|
365
|
+
* 7. Active skill content (full instructions for activated skills)
|
|
366
|
+
*
|
|
367
|
+
* Empty sections are silently skipped.
|
|
368
|
+
*/
|
|
369
|
+
/**
|
|
370
|
+
* Build the full system prompt from all sections.
|
|
371
|
+
*
|
|
372
|
+
* Subclasses that need to append extra content (e.g. plan progress)
|
|
373
|
+
* should call this and concatenate, instead of duplicating the assembly.
|
|
204
374
|
*/
|
|
375
|
+
protected buildSystemPrompt(): string;
|
|
205
376
|
protected rebuildSystemPrompt(): void;
|
|
206
377
|
/**
|
|
207
|
-
* Pre-iteration maintenance:
|
|
208
|
-
* 1. Compress context window if needed.
|
|
209
|
-
* 2. Auto-reload preferences from disk if the file was manually edited.
|
|
378
|
+
* Pre-iteration maintenance: compress context window if needed.
|
|
210
379
|
*/
|
|
211
|
-
protected checkAndCompress(): void
|
|
380
|
+
protected checkAndCompress(): Promise<void>;
|
|
381
|
+
/**
|
|
382
|
+
* Reload preferences from disk if the file was manually edited.
|
|
383
|
+
* Called once at the start of each run so edits between runs take
|
|
384
|
+
* effect without restarting the agent process — but they won't
|
|
385
|
+
* change mid-run behavior.
|
|
386
|
+
*/
|
|
387
|
+
protected reloadPreferencesIfChanged(): boolean;
|
|
388
|
+
/**
|
|
389
|
+
* Re-scan the skills directory for new SKILL.md files added between runs.
|
|
390
|
+
* New skills are registered and become available to the LLM immediately.
|
|
391
|
+
*/
|
|
392
|
+
protected reloadSkillsFromDirectory(): boolean;
|
|
393
|
+
/**
|
|
394
|
+
* Re-read the MEMORY.md index from disk if it was manually edited
|
|
395
|
+
* between runs. The index is a lightweight list of memory names +
|
|
396
|
+
* descriptions — full content is loaded on demand via the recall tool.
|
|
397
|
+
*/
|
|
398
|
+
protected reloadMemoryIfChanged(): boolean;
|
|
399
|
+
/**
|
|
400
|
+
* Incrementally connect to MCP servers that were added to the config
|
|
401
|
+
* since the last run. Already-connected servers are left untouched.
|
|
402
|
+
*/
|
|
403
|
+
protected reconnectMCPIfNeeded(): Promise<void>;
|
|
404
|
+
/**
|
|
405
|
+
* Reload all dynamic resources at the start of a run.
|
|
406
|
+
* Picks up changes made between conversation turns.
|
|
407
|
+
*/
|
|
408
|
+
protected reloadDynamicResources(): Promise<void>;
|
|
409
|
+
/**
|
|
410
|
+
* After a resume, recover results from sub-agents that were cancelled
|
|
411
|
+
* mid-run. Completed results are injected into context so the LLM can
|
|
412
|
+
* see them; still-running sub-agents get a notice.
|
|
413
|
+
*/
|
|
414
|
+
protected recoverOrphanedSubAgentResults(): void;
|
|
415
|
+
/**
|
|
416
|
+
* Validate that user input won't overwhelm the context window.
|
|
417
|
+
*
|
|
418
|
+
* Returns a user-facing error string if the input is too large,
|
|
419
|
+
* or `null` if it passes the check.
|
|
420
|
+
*/
|
|
421
|
+
protected validateInputSize(input: string): string | null;
|
|
422
|
+
/**
|
|
423
|
+
* Check whether a tool that requires approval should be executed.
|
|
424
|
+
*
|
|
425
|
+
* @returns `true` if approved, `false` if denied (or no callback configured).
|
|
426
|
+
*/
|
|
427
|
+
protected checkToolApproval(toolName: string, args: Record<string, unknown>): Promise<boolean>;
|
|
428
|
+
/**
|
|
429
|
+
* Execute a batch of tool calls from a single LLM response.
|
|
430
|
+
*
|
|
431
|
+
* When `enableParallelToolExecution` is true and all tools in the batch are
|
|
432
|
+
* parallel-safe (`sequential` is not set), tools execute concurrently via
|
|
433
|
+
* `Promise.allSettled`. Otherwise, they execute one at a time (serial).
|
|
434
|
+
*
|
|
435
|
+
* Handles the full lifecycle for each tool call:
|
|
436
|
+
* 1. Parse JSON arguments (malformed args → error result, no execution)
|
|
437
|
+
* 2. HITL approval check for tools marked `requireApproval`
|
|
438
|
+
* 3. Hook notifications (`onToolStart`, `onToolEnd`, `onToolError`)
|
|
439
|
+
* 4. Execution via `ToolRegistry.execute()`
|
|
440
|
+
* 5. Context injection (all results added after execution completes)
|
|
441
|
+
* 6. Post-execution: sub-agent spawn tracking, MCP failure warnings
|
|
442
|
+
*
|
|
443
|
+
* @param toolCalls The tool calls from the LLM response.
|
|
444
|
+
* @param mcpWarnedServers Set tracking which MCP servers have already
|
|
445
|
+
* been warned about in this batch.
|
|
446
|
+
* @returns Whether any tool in the batch failed.
|
|
447
|
+
*/
|
|
448
|
+
protected executeToolCallsBatch(toolCalls: ToolCall[], mcpWarnedServers: Set<string>): Promise<{
|
|
449
|
+
hadFailure: boolean;
|
|
450
|
+
}>;
|
|
451
|
+
/**
|
|
452
|
+
* Check whether the token budget allows another LLM call.
|
|
453
|
+
*
|
|
454
|
+
* @param estimatedInputTokens Approximate tokens in the upcoming request
|
|
455
|
+
* (system prompt + context messages).
|
|
456
|
+
* @returns A user-facing error string if the budget is exhausted,
|
|
457
|
+
* or `null` if the call can proceed.
|
|
458
|
+
*/
|
|
459
|
+
protected checkTokenBudget(estimatedInputTokens: number): string | null;
|
|
212
460
|
/**
|
|
213
461
|
* Cancel the current run.
|
|
214
462
|
*
|
|
215
|
-
*
|
|
216
|
-
*
|
|
463
|
+
* Aborts any in-flight LLM request via the AbortController, sets the
|
|
464
|
+
* cancellation flag, and cancels all running sub-agents. The agent loop
|
|
465
|
+
* will save a "cancelled" checkpoint and exit at its next iteration.
|
|
466
|
+
* The session is preserved on disk and can be resumed later.
|
|
217
467
|
*/
|
|
218
468
|
cancel(): void;
|
|
219
469
|
/**
|
|
@@ -254,10 +504,20 @@ export declare abstract class Agent {
|
|
|
254
504
|
*/
|
|
255
505
|
protected buildBaseSessionState(status: SessionStatus): SessionState;
|
|
256
506
|
/**
|
|
257
|
-
* Save a session checkpoint to disk (if session manager is configured
|
|
258
|
-
* and the run has NOT been cancelled).
|
|
507
|
+
* Save a session checkpoint to disk (if session manager is configured).
|
|
259
508
|
*/
|
|
260
509
|
protected saveCheckpoint(status?: SessionStatus): void;
|
|
510
|
+
/**
|
|
511
|
+
* Handle an LLMNetworkError: save an interrupted checkpoint if
|
|
512
|
+
* checkpointing is enabled, and return a user-facing message with
|
|
513
|
+
* resume instructions.
|
|
514
|
+
*
|
|
515
|
+
* @param err The network error that occurred.
|
|
516
|
+
* @param iteration The current iteration number (for the log).
|
|
517
|
+
* @param resumeInstruction What the user should type to resume
|
|
518
|
+
* (e.g. "continue with my previous request").
|
|
519
|
+
*/
|
|
520
|
+
protected handleNetworkError(err: LLMNetworkError, iteration: number, resumeInstruction?: string): string;
|
|
261
521
|
/**
|
|
262
522
|
* Restore agent state from a previously saved session.
|
|
263
523
|
*
|
|
@@ -275,6 +535,39 @@ export declare abstract class Agent {
|
|
|
275
535
|
* Use this to begin a new topic without creating a new agent instance.
|
|
276
536
|
*/
|
|
277
537
|
clearConversation(): void;
|
|
538
|
+
/**
|
|
539
|
+
* Continue the current conversation with a follow-up input.
|
|
540
|
+
*
|
|
541
|
+
* Equivalent to `run()` but conveys the semantics of a multi-turn
|
|
542
|
+
* conversation continuation. Messages from previous calls are preserved
|
|
543
|
+
* in context, so the LLM sees the full conversation history.
|
|
544
|
+
*
|
|
545
|
+
* @param input The follow-up message from the user.
|
|
546
|
+
* @returns The agent's response.
|
|
547
|
+
*/
|
|
548
|
+
chat(input: string): Promise<string>;
|
|
549
|
+
/**
|
|
550
|
+
* Start a new topic with a fresh conversation.
|
|
551
|
+
*
|
|
552
|
+
* Clears the message history (preserving the system prompt and
|
|
553
|
+
* configuration) and runs the input as the first message of a
|
|
554
|
+
* new conversation. The token budget is also reset.
|
|
555
|
+
*
|
|
556
|
+
* @param input The first message of the new topic.
|
|
557
|
+
* @returns The agent's response.
|
|
558
|
+
*/
|
|
559
|
+
newTopic(input: string): Promise<string>;
|
|
560
|
+
/**
|
|
561
|
+
* The number of messages in the current conversation (excluding the
|
|
562
|
+
* system message). Use this to check whether there is an active
|
|
563
|
+
* conversation or to monitor context growth.
|
|
564
|
+
*/
|
|
565
|
+
get conversationLength(): number;
|
|
566
|
+
/**
|
|
567
|
+
* Get the cumulative token consumption and cost for the current session.
|
|
568
|
+
* Returns null if no `tokenBudgetConfig` was configured.
|
|
569
|
+
*/
|
|
570
|
+
getSessionCost(): import("../llm/token-budget").TokenBudgetCost | null;
|
|
278
571
|
/**
|
|
279
572
|
* Reset the agent to its initial state.
|
|
280
573
|
*
|
|
@@ -307,26 +600,62 @@ export declare abstract class Agent {
|
|
|
307
600
|
* even if init() was never called or no servers were configured.
|
|
308
601
|
*/
|
|
309
602
|
shutdown(): Promise<void>;
|
|
603
|
+
/**
|
|
604
|
+
* Check whether sub-agents are available.
|
|
605
|
+
*
|
|
606
|
+
* Used by `buildSystemPrompt()` to decide whether to include sub-agent
|
|
607
|
+
* delegation instructions. Returns true only when a SubAgentManager is
|
|
608
|
+
* configured AND has at least one registered definition.
|
|
609
|
+
*/
|
|
610
|
+
protected hasSubAgents(): boolean;
|
|
611
|
+
/**
|
|
612
|
+
* Spawn a sub-agent by definition name.
|
|
613
|
+
*
|
|
614
|
+
* The sub-agent runs asynchronously — this method returns immediately.
|
|
615
|
+
* Call `pollSubAgentResults()` at the start of each iteration to
|
|
616
|
+
* collect completed results.
|
|
617
|
+
*
|
|
618
|
+
* @param name The registered sub-agent definition name.
|
|
619
|
+
* @param input The task description for the sub-agent.
|
|
620
|
+
* @returns The unique run ID.
|
|
621
|
+
*/
|
|
622
|
+
protected spawnSubAgent(name: string, input: string): string;
|
|
623
|
+
/**
|
|
624
|
+
* Poll for completed sub-agent results.
|
|
625
|
+
*
|
|
626
|
+
* Should be called at the start of each ReAct iteration to inject
|
|
627
|
+
* sub-agent outputs into the main agent's context.
|
|
628
|
+
*/
|
|
629
|
+
protected pollSubAgentResults(): Promise<SubAgentResult[]>;
|
|
310
630
|
/**
|
|
311
631
|
* Get the error tracker (if configured via the ToolRegistry).
|
|
312
632
|
*/
|
|
313
633
|
get errorTracker(): ToolErrorTracker | undefined;
|
|
314
634
|
/**
|
|
315
|
-
* Call after a tool returns
|
|
316
|
-
*
|
|
317
|
-
*
|
|
635
|
+
* Call after a tool returns a result — checks if the result indicates
|
|
636
|
+
* a tool failure (retryable or fatal) and saves the trace ID so the
|
|
637
|
+
* next LLM analysis thought can be captured.
|
|
318
638
|
*
|
|
319
|
-
* @param toolName The name of the tool that
|
|
320
|
-
* @param result The
|
|
639
|
+
* @param toolName The name of the tool that was executed.
|
|
640
|
+
* @param result The structured ToolResult returned by ToolRegistry.execute().
|
|
321
641
|
*/
|
|
322
|
-
protected trackToolErrorForAnalysis(toolName: string, result: string): void;
|
|
323
642
|
/**
|
|
324
|
-
*
|
|
325
|
-
*
|
|
643
|
+
* Capture the LLM's reasoning as error analysis for any active tool error traces.
|
|
644
|
+
*
|
|
645
|
+
* Call this after parsing the LLM's `thought` from each response. If any tools
|
|
646
|
+
* have an open failure chain (active trace), the thought is recorded as the
|
|
647
|
+
* LLM's analysis of what went wrong and how to proceed.
|
|
648
|
+
*
|
|
649
|
+
* This feeds the error→analysis pipeline:
|
|
650
|
+
* 1. Tool fails → recordFailure() creates an active trace
|
|
651
|
+
* 2. LLM sees error → its next thought IS the analysis
|
|
652
|
+
* 3. Analysis → recordAnalysis() attaches the LLM's reasoning to the trace
|
|
653
|
+
*
|
|
654
|
+
* For cross-session learning, use ErrorNotebook (错题本) via ReflectionHook.
|
|
326
655
|
*
|
|
327
|
-
* @param thought The LLM's
|
|
656
|
+
* @param thought The LLM's reasoning (from parsed.thought).
|
|
328
657
|
*/
|
|
329
|
-
protected
|
|
658
|
+
protected captureErrorAnalysis(thought: string): void;
|
|
330
659
|
/**
|
|
331
660
|
* Generate a markdown report of all recorded tool error traces.
|
|
332
661
|
*/
|
package/dist/core/agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/core/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/core/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAKhD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI1D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,YA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