@cicctencent/agent-core 0.1.13 → 0.1.14
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/dist/cjs/a2a/client.d.ts +1 -1
- package/dist/cjs/a2a/client.d.ts.map +1 -1
- package/dist/cjs/a2a/client.js +0 -2
- package/dist/cjs/a2a/client.js.map +1 -1
- package/dist/cjs/a2a/index.d.ts +4 -4
- package/dist/cjs/a2a/runner.d.ts +3 -3
- package/dist/cjs/agent/engine.d.ts +4 -4
- package/dist/cjs/agent/history-manager.d.ts +2 -2
- package/dist/cjs/agent/llm-caller.d.ts +6 -6
- package/dist/cjs/agent/tool-executor.d.ts +7 -7
- package/dist/cjs/agent/types.d.ts +9 -9
- package/dist/cjs/context/collector.d.ts +1 -1
- package/dist/cjs/context/manager.d.ts +2 -2
- package/dist/cjs/context/types.d.ts +1 -1
- package/dist/cjs/hooks/types.d.ts +2 -2
- package/dist/cjs/index.d.ts +76 -76
- package/dist/cjs/llm/anthropic-provider.d.ts +1 -1
- package/dist/cjs/llm/factory.d.ts +1 -1
- package/dist/cjs/llm/ollama-provider.d.ts +2 -2
- package/dist/cjs/llm/openai-provider.d.ts +1 -1
- package/dist/cjs/llm/provider.d.ts +6 -6
- package/dist/cjs/llm/types.d.ts +2 -2
- package/dist/cjs/mcp/base-client.d.ts +2 -2
- package/dist/cjs/mcp/client.d.ts +2 -2
- package/dist/cjs/mcp/factory.d.ts +1 -1
- package/dist/cjs/mcp/http-client.d.ts +2 -2
- package/dist/cjs/mcp/stdio-client.d.ts +2 -2
- package/dist/cjs/mcp/types.d.ts +2 -2
- package/dist/cjs/memory/extractor.d.ts +2 -2
- package/dist/cjs/memory/persona.d.ts +2 -2
- package/dist/cjs/memory/pipeline.d.ts +4 -4
- package/dist/cjs/memory/recall.d.ts +1 -1
- package/dist/cjs/memory/scene.d.ts +1 -1
- package/dist/cjs/middleware/audit-log.d.ts +2 -2
- package/dist/cjs/middleware/timing.d.ts +2 -2
- package/dist/cjs/middleware/tool-guard.d.ts +2 -2
- package/dist/cjs/middleware/types.d.ts +1 -1
- package/dist/cjs/pool/engine-pool.d.ts +1 -1
- package/dist/cjs/runtime/run-registry.d.ts +1 -1
- package/dist/cjs/sandbox/types.d.ts +2 -2
- package/dist/cjs/security/guard.d.ts +1 -1
- package/dist/cjs/security/permission.d.ts +1 -1
- package/dist/cjs/skill/manager.d.ts +1 -1
- package/dist/cjs/skill/router.d.ts +2 -2
- package/dist/cjs/store/file-tool-result-store.d.ts +1 -1
- package/dist/cjs/tool/delegate.d.ts +2 -2
- package/dist/cjs/tool/registry.d.ts +1 -1
- package/dist/cjs/tool/types.d.ts +1 -1
- package/dist/cjs/utils/event-collector.d.ts +1 -1
- package/dist/cjs/utils/token-counter.d.ts +1 -1
- package/dist/esm/a2a/client.d.ts +1 -1
- package/dist/esm/a2a/client.d.ts.map +1 -1
- package/dist/esm/a2a/client.js +0 -2
- package/dist/esm/a2a/client.js.map +1 -1
- package/dist/esm/a2a/index.d.ts +4 -4
- package/dist/esm/a2a/runner.d.ts +3 -3
- package/dist/esm/agent/engine.d.ts +4 -4
- package/dist/esm/agent/history-manager.d.ts +2 -2
- package/dist/esm/agent/llm-caller.d.ts +6 -6
- package/dist/esm/agent/tool-executor.d.ts +7 -7
- package/dist/esm/agent/types.d.ts +9 -9
- package/dist/esm/context/collector.d.ts +1 -1
- package/dist/esm/context/manager.d.ts +2 -2
- package/dist/esm/context/types.d.ts +1 -1
- package/dist/esm/hooks/types.d.ts +2 -2
- package/dist/esm/index.d.ts +76 -76
- package/dist/esm/llm/anthropic-provider.d.ts +1 -1
- package/dist/esm/llm/factory.d.ts +1 -1
- package/dist/esm/llm/ollama-provider.d.ts +2 -2
- package/dist/esm/llm/openai-provider.d.ts +1 -1
- package/dist/esm/llm/provider.d.ts +6 -6
- package/dist/esm/llm/types.d.ts +2 -2
- package/dist/esm/mcp/base-client.d.ts +2 -2
- package/dist/esm/mcp/client.d.ts +2 -2
- package/dist/esm/mcp/factory.d.ts +1 -1
- package/dist/esm/mcp/http-client.d.ts +2 -2
- package/dist/esm/mcp/stdio-client.d.ts +2 -2
- package/dist/esm/mcp/types.d.ts +2 -2
- package/dist/esm/memory/extractor.d.ts +2 -2
- package/dist/esm/memory/persona.d.ts +2 -2
- package/dist/esm/memory/pipeline.d.ts +4 -4
- package/dist/esm/memory/recall.d.ts +1 -1
- package/dist/esm/memory/scene.d.ts +1 -1
- package/dist/esm/middleware/audit-log.d.ts +2 -2
- package/dist/esm/middleware/timing.d.ts +2 -2
- package/dist/esm/middleware/tool-guard.d.ts +2 -2
- package/dist/esm/middleware/types.d.ts +1 -1
- package/dist/esm/pool/engine-pool.d.ts +1 -1
- package/dist/esm/runtime/run-registry.d.ts +1 -1
- package/dist/esm/sandbox/types.d.ts +2 -2
- package/dist/esm/security/guard.d.ts +1 -1
- package/dist/esm/security/permission.d.ts +1 -1
- package/dist/esm/skill/manager.d.ts +1 -1
- package/dist/esm/skill/router.d.ts +2 -2
- package/dist/esm/store/file-tool-result-store.d.ts +1 -1
- package/dist/esm/tool/delegate.d.ts +2 -2
- package/dist/esm/tool/registry.d.ts +1 -1
- package/dist/esm/tool/types.d.ts +1 -1
- package/dist/esm/utils/event-collector.d.ts +1 -1
- package/dist/esm/utils/token-counter.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RouteResult, RouteStrategy } from './types.
|
|
2
|
-
import type { SkillManager } from './manager.
|
|
1
|
+
import type { RouteResult, RouteStrategy } from './types.js';
|
|
2
|
+
import type { SkillManager } from './manager.js';
|
|
3
3
|
export declare class SkillRouter {
|
|
4
4
|
private strategies;
|
|
5
5
|
private skillManager;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RegisteredTool, ToolContext } from './types.
|
|
2
|
-
import type { StructuredAgentOutput, WorkflowRole } from '../agent/workflow.
|
|
1
|
+
import type { RegisteredTool, ToolContext } from './types.js';
|
|
2
|
+
import type { StructuredAgentOutput, WorkflowRole } from '../agent/workflow.js';
|
|
3
3
|
/**
|
|
4
4
|
* 子 Agent 执行器接口
|
|
5
5
|
* 由上层(agent.service.ts)实现,Core 层只定义接口
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ToolDefinition, ToolExecutor, ToolContext, RegisteredTool, ToolCategory } from './types.
|
|
1
|
+
import type { ToolDefinition, ToolExecutor, ToolContext, RegisteredTool, ToolCategory } from './types.js';
|
|
2
2
|
/** defineTool 简化参数 */
|
|
3
3
|
export interface DefineToolOptions {
|
|
4
4
|
name: string;
|
package/dist/cjs/tool/types.d.ts
CHANGED
package/dist/esm/a2a/client.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/a2a/client.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,YAAY,EAGZ,iBAAiB,EACjB,OAAO,EACP,YAAY,EAGb,MAAM,YAAY,CAAC;AASpB,gBAAgB;AAChB,MAAM,WAAW,gBAAgB;IAC/B,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB,wBAAwB;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED;;;;;;;GAOG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,OAAO,CAAyB;gBAE5B,OAAO,GAAE,gBAAqB;IAQ1C;;;OAGG;IACG,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAe3D,wCAAwC;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;IAQ7E;;;;OAIG;IAC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AAO,CAAC;IAQ7E;;;;OAIG;IACG,iBAAiB,CACrB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,iBAAiB,EACzB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,EACvC,WAAW,CAAC,EAAE,WAAW,GACxB,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IA0E/B,wBAAwB;IAClB,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAUzF,yBAAyB;IACnB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWpE,wBAAwB;IACxB,OAAO,CAAC,mBAAmB;IAM3B,qBAAqB;YACP,WAAW;IAyBzB,2CAA2C;YAC7B,eAAe;IAgB7B,iBAAiB;YACH,gBAAgB;CAS/B"}
|
package/dist/esm/a2a/client.js
CHANGED
|
@@ -159,8 +159,6 @@ export class A2AClient {
|
|
|
159
159
|
const trimmed = baseUrl.replace(/\/+$/, '');
|
|
160
160
|
if (trimmed.includes('/.well-known/agent.json'))
|
|
161
161
|
return trimmed;
|
|
162
|
-
if (trimmed.endsWith('/a2a'))
|
|
163
|
-
return `${trimmed}/.well-known/agent.json`;
|
|
164
162
|
return `${trimmed}/.well-known/agent.json`;
|
|
165
163
|
}
|
|
166
164
|
/** 发送 JSON-RPC 请求 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/a2a/client.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,2BAA2B;AAC3B,8BAA8B;AAC9B,+DAA+D;AAa/D,2BAA2B;AAC3B,IAAI,YAAY,GAAG,CAAC,CAAC;AAErB,SAAS,SAAS;IAChB,OAAO,OAAO,EAAE,YAAY,IAAI,IAAI,CAAC,GAAG,EAAE,EAAE,C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EAAE,MAAM,EAAE,EAAE;YAC/C,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;gBACtB,MAAM,CAAC,IAAI,KAAK,CAAC,2CAA2C,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC;YACjF,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACnB,CAAC,CAAC,CAAC;QACH,IAAI,CAAC;YACH,OAAO,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;QACtD,CAAC;gBAAS,CAAC;YACT,YAAY,CAAC,KAAM,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IAED,iBAAiB;IACT,KAAK,CAAC,gBAAgB,CAAC,GAAW,EAAE,IAAiB;QAC3D,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;QACzC,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACjE,IAAI,CAAC;YACH,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;QACzE,CAAC;gBAAS,CAAC;YACT,YAAY,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;CACF"}
|
package/dist/esm/a2a/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type { A2AAgentCard, A2AAgentSkill, A2AAgentCapabilities, A2ATextPart, A2AFilePart, A2ADataPart, A2APart, A2AMessage, A2ATaskState, A2ATaskStatus, A2AArtifact, A2ATask, A2ATaskStatusUpdateEvent, A2ATaskArtifactUpdateEvent, A2ATaskEvent, A2AJsonRpcRequest, A2AJsonRpcResponse, A2AJsonRpcError, A2ASendTaskParams, A2ASendSubscribeParams, A2AGetTaskParams, A2ACancelTaskParams, A2ARemoteAgentConfig, } from './types.
|
|
2
|
-
export { A2AClient } from './client.
|
|
3
|
-
export { createA2ARemoteRunner, extractTextFromMessage } from './runner.
|
|
4
|
-
export type { A2ARemoteRunnerConfig } from './runner.
|
|
1
|
+
export type { A2AAgentCard, A2AAgentSkill, A2AAgentCapabilities, A2ATextPart, A2AFilePart, A2ADataPart, A2APart, A2AMessage, A2ATaskState, A2ATaskStatus, A2AArtifact, A2ATask, A2ATaskStatusUpdateEvent, A2ATaskArtifactUpdateEvent, A2ATaskEvent, A2AJsonRpcRequest, A2AJsonRpcResponse, A2AJsonRpcError, A2ASendTaskParams, A2ASendSubscribeParams, A2AGetTaskParams, A2ACancelTaskParams, A2ARemoteAgentConfig, } from './types.js';
|
|
2
|
+
export { A2AClient } from './client.js';
|
|
3
|
+
export { createA2ARemoteRunner, extractTextFromMessage } from './runner.js';
|
|
4
|
+
export type { A2ARemoteRunnerConfig } from './runner.js';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/a2a/runner.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { SubAgentRunner } from '../tool/delegate.
|
|
2
|
-
import type { A2AMessage } from './types.
|
|
3
|
-
import { A2AClient } from './client.
|
|
1
|
+
import type { SubAgentRunner } from '../tool/delegate.js';
|
|
2
|
+
import type { A2AMessage } from './types.js';
|
|
3
|
+
import { A2AClient } from './client.js';
|
|
4
4
|
/** 从 A2A Message 中提取文本内容 */
|
|
5
5
|
export declare function extractTextFromMessage(message?: A2AMessage): string;
|
|
6
6
|
/** createA2ARemoteRunner 配置项 */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { AgentEvent, AgentStatus, Message } from '../types.
|
|
2
|
-
import type { ToolRegistry } from '../tool/registry.
|
|
3
|
-
import type { AgentConfig, RunOptions } from './types.
|
|
4
|
-
import type { HookEvent, HookContext, HookResult } from '../hooks/types.
|
|
1
|
+
import type { AgentEvent, AgentStatus, Message } from '../types.js';
|
|
2
|
+
import type { ToolRegistry } from '../tool/registry.js';
|
|
3
|
+
import type { AgentConfig, RunOptions } from './types.js';
|
|
4
|
+
import type { HookEvent, HookContext, HookResult } from '../hooks/types.js';
|
|
5
5
|
export declare class AgentEngine {
|
|
6
6
|
private config;
|
|
7
7
|
/** sessionId → AgentStatus */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Message } from '../types.
|
|
2
|
-
import type { ToolResultStore } from './types.
|
|
1
|
+
import type { Message } from '../types.js';
|
|
2
|
+
import type { ToolResultStore } from './types.js';
|
|
3
3
|
/** 历史管理配置 */
|
|
4
4
|
export interface HistoryManagerConfig {
|
|
5
5
|
/** 消息历史上限(滑动窗口),默认 50 */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { AgentEvent, Message, TokenUsage } from '../types.
|
|
2
|
-
import type { LLMProvider } from '../llm/types.
|
|
3
|
-
import type { ToolDefinition } from '../tool/types.
|
|
4
|
-
import type { RetryPolicy } from './types.
|
|
5
|
-
import type { HookEvent, HookContext, HookResult } from '../hooks/types.
|
|
6
|
-
import type { HistoryManager } from './history-manager.
|
|
1
|
+
import type { AgentEvent, Message, TokenUsage } from '../types.js';
|
|
2
|
+
import type { LLMProvider } from '../llm/types.js';
|
|
3
|
+
import type { ToolDefinition } from '../tool/types.js';
|
|
4
|
+
import type { RetryPolicy } from './types.js';
|
|
5
|
+
import type { HookEvent, HookContext, HookResult } from '../hooks/types.js';
|
|
6
|
+
import type { HistoryManager } from './history-manager.js';
|
|
7
7
|
/** LLM 调用配置 */
|
|
8
8
|
export interface LLMCallerConfig {
|
|
9
9
|
/** 主 LLM Provider */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { AgentEvent, Message, ToolCall, ToolCallRecord } from '../types.
|
|
2
|
-
import type { ToolRegistry } from '../tool/registry.
|
|
3
|
-
import type { ToolContext } from '../tool/types.
|
|
4
|
-
import type { SecurityGuard } from '../security/guard.
|
|
5
|
-
import type { HookEvent, HookContext, HookResult } from '../hooks/types.
|
|
6
|
-
import type { Middleware } from '../middleware/types.
|
|
7
|
-
import type { HistoryManager } from './history-manager.
|
|
1
|
+
import type { AgentEvent, Message, ToolCall, ToolCallRecord } from '../types.js';
|
|
2
|
+
import type { ToolRegistry } from '../tool/registry.js';
|
|
3
|
+
import type { ToolContext } from '../tool/types.js';
|
|
4
|
+
import type { SecurityGuard } from '../security/guard.js';
|
|
5
|
+
import type { HookEvent, HookContext, HookResult } from '../hooks/types.js';
|
|
6
|
+
import type { Middleware } from '../middleware/types.js';
|
|
7
|
+
import type { HistoryManager } from './history-manager.js';
|
|
8
8
|
/** 工具执行配置 */
|
|
9
9
|
export interface ToolExecutorConfig {
|
|
10
10
|
/** Tool Registry */
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { LLMProvider } from '../llm/types.
|
|
2
|
-
import type { ToolRegistry } from '../tool/registry.
|
|
3
|
-
import type { SkillManager } from '../skill/manager.
|
|
4
|
-
import type { SkillRouter } from '../skill/router.
|
|
5
|
-
import type { ContextManager } from '../context/manager.
|
|
6
|
-
import type { SecurityGuard } from '../security/guard.
|
|
7
|
-
import type { SessionContext } from '../types.
|
|
8
|
-
import type { Hook } from '../hooks/types.
|
|
9
|
-
import type { Middleware } from '../middleware/types.
|
|
1
|
+
import type { LLMProvider } from '../llm/types.js';
|
|
2
|
+
import type { ToolRegistry } from '../tool/registry.js';
|
|
3
|
+
import type { SkillManager } from '../skill/manager.js';
|
|
4
|
+
import type { SkillRouter } from '../skill/router.js';
|
|
5
|
+
import type { ContextManager } from '../context/manager.js';
|
|
6
|
+
import type { SecurityGuard } from '../security/guard.js';
|
|
7
|
+
import type { SessionContext } from '../types.js';
|
|
8
|
+
import type { Hook } from '../hooks/types.js';
|
|
9
|
+
import type { Middleware } from '../middleware/types.js';
|
|
10
10
|
/** 上下文卸载条目(工具结果摘要 + 原文引用,用于非破坏性压缩) */
|
|
11
11
|
export interface OffloadEntry {
|
|
12
12
|
/** 唯一引用 ID,格式:{toolName}_{timestamp}_{hash} */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Message, TokenUsage } from '../types.
|
|
2
|
-
import type { ToolDefinition } from '../tool/types.
|
|
1
|
+
import type { Message, TokenUsage } from '../types.js';
|
|
2
|
+
import type { ToolDefinition } from '../tool/types.js';
|
|
3
3
|
export type HookEvent = 'before_tool' | 'after_tool' | 'before_ll_call' | 'after_ll_call' | 'on_iteration_start' | 'on_error' | 'on_complete';
|
|
4
4
|
/**
|
|
5
5
|
* Hook 处理器接收的上下文信息
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
export type { Message, MessageRole, ToolCall, AgentEvent, BaseEvent, ThinkingEvent, ToolCallEvent, ToolResultEvent, MessageEvent, DoneEvent, ErrorEvent, SteeringEvent, RetryEvent, AgentResult, AgentStatus, SessionContext, TokenUsage, ToolCallRecord, } from './types.
|
|
2
|
-
export { AgentEngine } from './agent/engine.
|
|
3
|
-
export { DEFAULT_COMPLEX_WORKFLOW_TEMPLATE, buildDebateInstructions, buildStructuredOutputInstruction, buildWorkflowDecisionMemory, formatDebateOutput, formatStructuredAgentOutput, formatWorkflowTemplateForPrompt, getWorkflowRoleStage, getWorkflowTemplate, parseDebateOutput, parseStructuredAgentOutput, wrapTaskWithWorkflowInstructions, } from './agent/workflow.
|
|
4
|
-
export type { StructuredAgentOutput, WorkflowCheckpoint, WorkflowDecisionLog, WorkflowRole, WorkflowStageTemplate, WorkflowTemplate, DebateOutput } from './agent/workflow.
|
|
5
|
-
export { HistoryManager } from './agent/history-manager.
|
|
6
|
-
export { LLMCaller } from './agent/llm-caller.
|
|
7
|
-
export { AgentToolExecutor } from './agent/tool-executor.
|
|
8
|
-
export type { AgentConfig, RunOptions, RetryPolicy, ToolResultStore, OffloadEntry } from './agent/types.
|
|
9
|
-
export type { LLMProvider, ModelConfig, ModelInfo, ChatParams, ChatResponse, ChatChunk, } from './llm/types.
|
|
10
|
-
export { OpenAIProvider } from './llm/openai-provider.
|
|
11
|
-
export { AnthropicProvider } from './llm/anthropic-provider.
|
|
12
|
-
export { OllamaProvider } from './llm/ollama-provider.
|
|
13
|
-
export { createLLMProvider, BUILTIN_PROVIDERS } from './llm/factory.
|
|
14
|
-
export type { BuiltinProvider } from './llm/factory.
|
|
15
|
-
export { ContextManager } from './context/manager.
|
|
16
|
-
export { LocalEnvCollector } from './context/collector.
|
|
17
|
-
export type { BuildContextOptions, EnvInfo, EnvCollector, } from './context/types.
|
|
18
|
-
export { SkillManager } from './skill/manager.
|
|
19
|
-
export { SkillRouter } from './skill/router.
|
|
20
|
-
export type { Skill, SkillManifest, SkillSource, RouteResult, RouteStrategy, MatchType, } from './skill/types.
|
|
21
|
-
export { ToolRegistry } from './tool/registry.
|
|
22
|
-
export type { DefineToolOptions } from './tool/registry.
|
|
23
|
-
export { createDelegateTool } from './tool/delegate.
|
|
24
|
-
export type { SubAgentRunner } from './tool/delegate.
|
|
25
|
-
export type { ToolDefinition, ToolExecutor, ToolContext, SubAgentEventEmitter, WidgetEventEmitter, ArtifactEventEmitter, ArtifactData, RegisteredTool, ToolCategory, ShellExecutor, FileSystemExecutor, } from './tool/types.
|
|
26
|
-
export { registerMCPTools, MCP_TOOL_PREFIX, buildMCPToolName, sanitizeForToolName } from './mcp/client.
|
|
27
|
-
export { createMCPClient, registerTransport } from './mcp/factory.
|
|
28
|
-
export type { TransportFactory } from './mcp/factory.
|
|
29
|
-
export { MCPClientBase } from './mcp/base-client.
|
|
30
|
-
export { StdioMCPClient } from './mcp/stdio-client.
|
|
31
|
-
export { HttpMCPClient } from './mcp/http-client.
|
|
32
|
-
export { resolveProxyAgentForCategory, resolveProxyUrlForCategory, getSystemProxyUrl, clearSystemProxyCache, getWindowsSystemProxy, DEFAULT_PROXY_SETTINGS, } from './mcp/proxy-agent.
|
|
33
|
-
export type { ProxyMode, ProxyCategoryConfig, ProxySettings, } from './mcp/proxy-agent.
|
|
34
|
-
export type { MCPClient, MCPServerConfig, MCPTransport, } from './mcp/types.
|
|
35
|
-
export { SecurityGuard } from './security/guard.
|
|
36
|
-
export type { SanitizeResult, SecurityRule, SecurityPolicy, Severity, } from './security/types.
|
|
37
|
-
export { assessToolRisk, isLowRiskTool, clearRiskCache, setToolSecurityPolicyProvider, } from './security/risk.
|
|
38
|
-
export type { ToolRiskLevel, ToolRiskAssessment, ToolSecurityPolicy, ToolSecurityPolicyProvider, } from './security/risk.
|
|
39
|
-
export { createPermissionRequest, listPermissionRequests, findApprovedPermission, decidePermissionRequest, configurePermissionManager, InMemoryPermissionStore, } from './security/permission.
|
|
40
|
-
export type { PermissionDecision, PermissionRequest, PermissionStore, } from './security/permission.
|
|
41
|
-
export type { Sandbox, SandboxConfig, SandboxManager, ScriptLanguage, } from './sandbox/types.
|
|
42
|
-
export { SANDBOX_BLOCKED_COMMANDS, SANDBOX_SAFE_ENV_KEYS, DEFAULT_SANDBOX_CONFIG } from './sandbox/types.
|
|
43
|
-
export { logEvent, setLogTransport } from './observability/logger.
|
|
44
|
-
export type { LogLevel, ObservabilityEvent, LogTransport, } from './observability/logger.
|
|
45
|
-
export { EnginePool } from './pool/engine-pool.
|
|
46
|
-
export { RunRegistry, InMemoryRunStateStore } from './runtime/run-registry.
|
|
47
|
-
export type { BufferedEvent, RunToolCallRecord, EventSubscriber, RunStatus, ActiveRun, RunSnapshot, RunStateStore, } from './runtime/run-registry.
|
|
48
|
-
export { JsonStore, JsonListStore } from './store/json-store.
|
|
49
|
-
export type { JsonStoreOptions } from './store/json-store.
|
|
50
|
-
export { FileToolResultStore } from './store/file-tool-result-store.
|
|
51
|
-
export type { FileToolResultStoreOptions } from './store/file-tool-result-store.
|
|
52
|
-
export { TimingMiddleware } from './middleware/timing.
|
|
53
|
-
export type { TimingReport } from './middleware/timing.
|
|
54
|
-
export { ToolGuardMiddleware } from './middleware/tool-guard.
|
|
55
|
-
export { AuditLogMiddleware } from './middleware/audit-log.
|
|
56
|
-
export type { Hook, HookEvent, HookContext, HookResult, } from './hooks/types.
|
|
57
|
-
export type { Middleware, MiddlewareContext, } from './middleware/types.
|
|
58
|
-
export type { MemoryEntry, MemoryLayer, MemoryServiceLike, } from './memory/types.
|
|
59
|
-
export { MemoryExtractor } from './memory/extractor.
|
|
60
|
-
export type { AtomFact, ExtractorOptions } from './memory/extractor.
|
|
61
|
-
export { SceneAggregator } from './memory/scene.
|
|
62
|
-
export type { SceneBlock, SceneAggregatorOptions } from './memory/scene.
|
|
63
|
-
export { PersonaGenerator } from './memory/persona.
|
|
64
|
-
export type { PersonaFacet, PersonaGeneratorOptions } from './memory/persona.
|
|
65
|
-
export { MemoryCheckpoint, getMemoryCheckpoint, resetMemoryCheckpoint } from './memory/checkpoint.
|
|
66
|
-
export type { CheckpointData } from './memory/checkpoint.
|
|
67
|
-
export { MemoryRecallEngine, formatRecallForPrompt } from './memory/recall.
|
|
68
|
-
export type { RecallResult, ScoredMemoryEntry, RecallOptions } from './memory/recall.
|
|
69
|
-
export { MemoryPipeline } from './memory/pipeline.
|
|
70
|
-
export type { PipelineOptions, PipelineResult } from './memory/pipeline.
|
|
71
|
-
export { getDataPath, getProjectDataPath, ensureDataDir, ensureProjectDataDir, expandEnvVars, setAppName, getAppName, } from './utils/data-dir.
|
|
72
|
-
export { collectEngineOutput } from './utils/event-collector.
|
|
73
|
-
export type { EngineRunResult } from './utils/event-collector.
|
|
74
|
-
export { A2AClient, createA2ARemoteRunner, extractTextFromMessage, } from './a2a/index.
|
|
75
|
-
export type { A2ARemoteRunnerConfig, } from './a2a/index.
|
|
76
|
-
export type { A2AAgentCard, A2AAgentSkill, A2AAgentCapabilities, A2APart, A2ATextPart, A2AFilePart, A2ADataPart, A2AMessage, A2ATaskState, A2ATaskStatus, A2AArtifact, A2ATask, A2ATaskStatusUpdateEvent, A2ATaskArtifactUpdateEvent, A2ATaskEvent, A2AJsonRpcRequest, A2AJsonRpcResponse, A2AJsonRpcError, A2ASendTaskParams, A2ASendSubscribeParams, A2AGetTaskParams, A2ACancelTaskParams, A2ARemoteAgentConfig, } from './a2a/index.
|
|
1
|
+
export type { Message, MessageRole, ToolCall, AgentEvent, BaseEvent, ThinkingEvent, ToolCallEvent, ToolResultEvent, MessageEvent, DoneEvent, ErrorEvent, SteeringEvent, RetryEvent, AgentResult, AgentStatus, SessionContext, TokenUsage, ToolCallRecord, } from './types.js';
|
|
2
|
+
export { AgentEngine } from './agent/engine.js';
|
|
3
|
+
export { DEFAULT_COMPLEX_WORKFLOW_TEMPLATE, buildDebateInstructions, buildStructuredOutputInstruction, buildWorkflowDecisionMemory, formatDebateOutput, formatStructuredAgentOutput, formatWorkflowTemplateForPrompt, getWorkflowRoleStage, getWorkflowTemplate, parseDebateOutput, parseStructuredAgentOutput, wrapTaskWithWorkflowInstructions, } from './agent/workflow.js';
|
|
4
|
+
export type { StructuredAgentOutput, WorkflowCheckpoint, WorkflowDecisionLog, WorkflowRole, WorkflowStageTemplate, WorkflowTemplate, DebateOutput } from './agent/workflow.js';
|
|
5
|
+
export { HistoryManager } from './agent/history-manager.js';
|
|
6
|
+
export { LLMCaller } from './agent/llm-caller.js';
|
|
7
|
+
export { AgentToolExecutor } from './agent/tool-executor.js';
|
|
8
|
+
export type { AgentConfig, RunOptions, RetryPolicy, ToolResultStore, OffloadEntry } from './agent/types.js';
|
|
9
|
+
export type { LLMProvider, ModelConfig, ModelInfo, ChatParams, ChatResponse, ChatChunk, } from './llm/types.js';
|
|
10
|
+
export { OpenAIProvider } from './llm/openai-provider.js';
|
|
11
|
+
export { AnthropicProvider } from './llm/anthropic-provider.js';
|
|
12
|
+
export { OllamaProvider } from './llm/ollama-provider.js';
|
|
13
|
+
export { createLLMProvider, BUILTIN_PROVIDERS } from './llm/factory.js';
|
|
14
|
+
export type { BuiltinProvider } from './llm/factory.js';
|
|
15
|
+
export { ContextManager } from './context/manager.js';
|
|
16
|
+
export { LocalEnvCollector } from './context/collector.js';
|
|
17
|
+
export type { BuildContextOptions, EnvInfo, EnvCollector, } from './context/types.js';
|
|
18
|
+
export { SkillManager } from './skill/manager.js';
|
|
19
|
+
export { SkillRouter } from './skill/router.js';
|
|
20
|
+
export type { Skill, SkillManifest, SkillSource, RouteResult, RouteStrategy, MatchType, } from './skill/types.js';
|
|
21
|
+
export { ToolRegistry } from './tool/registry.js';
|
|
22
|
+
export type { DefineToolOptions } from './tool/registry.js';
|
|
23
|
+
export { createDelegateTool } from './tool/delegate.js';
|
|
24
|
+
export type { SubAgentRunner } from './tool/delegate.js';
|
|
25
|
+
export type { ToolDefinition, ToolExecutor, ToolContext, SubAgentEventEmitter, WidgetEventEmitter, ArtifactEventEmitter, ArtifactData, RegisteredTool, ToolCategory, ShellExecutor, FileSystemExecutor, } from './tool/types.js';
|
|
26
|
+
export { registerMCPTools, MCP_TOOL_PREFIX, buildMCPToolName, sanitizeForToolName } from './mcp/client.js';
|
|
27
|
+
export { createMCPClient, registerTransport } from './mcp/factory.js';
|
|
28
|
+
export type { TransportFactory } from './mcp/factory.js';
|
|
29
|
+
export { MCPClientBase } from './mcp/base-client.js';
|
|
30
|
+
export { StdioMCPClient } from './mcp/stdio-client.js';
|
|
31
|
+
export { HttpMCPClient } from './mcp/http-client.js';
|
|
32
|
+
export { resolveProxyAgentForCategory, resolveProxyUrlForCategory, getSystemProxyUrl, clearSystemProxyCache, getWindowsSystemProxy, DEFAULT_PROXY_SETTINGS, } from './mcp/proxy-agent.js';
|
|
33
|
+
export type { ProxyMode, ProxyCategoryConfig, ProxySettings, } from './mcp/proxy-agent.js';
|
|
34
|
+
export type { MCPClient, MCPServerConfig, MCPTransport, } from './mcp/types.js';
|
|
35
|
+
export { SecurityGuard } from './security/guard.js';
|
|
36
|
+
export type { SanitizeResult, SecurityRule, SecurityPolicy, Severity, } from './security/types.js';
|
|
37
|
+
export { assessToolRisk, isLowRiskTool, clearRiskCache, setToolSecurityPolicyProvider, } from './security/risk.js';
|
|
38
|
+
export type { ToolRiskLevel, ToolRiskAssessment, ToolSecurityPolicy, ToolSecurityPolicyProvider, } from './security/risk.js';
|
|
39
|
+
export { createPermissionRequest, listPermissionRequests, findApprovedPermission, decidePermissionRequest, configurePermissionManager, InMemoryPermissionStore, } from './security/permission.js';
|
|
40
|
+
export type { PermissionDecision, PermissionRequest, PermissionStore, } from './security/permission.js';
|
|
41
|
+
export type { Sandbox, SandboxConfig, SandboxManager, ScriptLanguage, } from './sandbox/types.js';
|
|
42
|
+
export { SANDBOX_BLOCKED_COMMANDS, SANDBOX_SAFE_ENV_KEYS, DEFAULT_SANDBOX_CONFIG } from './sandbox/types.js';
|
|
43
|
+
export { logEvent, setLogTransport } from './observability/logger.js';
|
|
44
|
+
export type { LogLevel, ObservabilityEvent, LogTransport, } from './observability/logger.js';
|
|
45
|
+
export { EnginePool } from './pool/engine-pool.js';
|
|
46
|
+
export { RunRegistry, InMemoryRunStateStore } from './runtime/run-registry.js';
|
|
47
|
+
export type { BufferedEvent, RunToolCallRecord, EventSubscriber, RunStatus, ActiveRun, RunSnapshot, RunStateStore, } from './runtime/run-registry.js';
|
|
48
|
+
export { JsonStore, JsonListStore } from './store/json-store.js';
|
|
49
|
+
export type { JsonStoreOptions } from './store/json-store.js';
|
|
50
|
+
export { FileToolResultStore } from './store/file-tool-result-store.js';
|
|
51
|
+
export type { FileToolResultStoreOptions } from './store/file-tool-result-store.js';
|
|
52
|
+
export { TimingMiddleware } from './middleware/timing.js';
|
|
53
|
+
export type { TimingReport } from './middleware/timing.js';
|
|
54
|
+
export { ToolGuardMiddleware } from './middleware/tool-guard.js';
|
|
55
|
+
export { AuditLogMiddleware } from './middleware/audit-log.js';
|
|
56
|
+
export type { Hook, HookEvent, HookContext, HookResult, } from './hooks/types.js';
|
|
57
|
+
export type { Middleware, MiddlewareContext, } from './middleware/types.js';
|
|
58
|
+
export type { MemoryEntry, MemoryLayer, MemoryServiceLike, } from './memory/types.js';
|
|
59
|
+
export { MemoryExtractor } from './memory/extractor.js';
|
|
60
|
+
export type { AtomFact, ExtractorOptions } from './memory/extractor.js';
|
|
61
|
+
export { SceneAggregator } from './memory/scene.js';
|
|
62
|
+
export type { SceneBlock, SceneAggregatorOptions } from './memory/scene.js';
|
|
63
|
+
export { PersonaGenerator } from './memory/persona.js';
|
|
64
|
+
export type { PersonaFacet, PersonaGeneratorOptions } from './memory/persona.js';
|
|
65
|
+
export { MemoryCheckpoint, getMemoryCheckpoint, resetMemoryCheckpoint } from './memory/checkpoint.js';
|
|
66
|
+
export type { CheckpointData } from './memory/checkpoint.js';
|
|
67
|
+
export { MemoryRecallEngine, formatRecallForPrompt } from './memory/recall.js';
|
|
68
|
+
export type { RecallResult, ScoredMemoryEntry, RecallOptions } from './memory/recall.js';
|
|
69
|
+
export { MemoryPipeline } from './memory/pipeline.js';
|
|
70
|
+
export type { PipelineOptions, PipelineResult } from './memory/pipeline.js';
|
|
71
|
+
export { getDataPath, getProjectDataPath, ensureDataDir, ensureProjectDataDir, expandEnvVars, setAppName, getAppName, } from './utils/data-dir.js';
|
|
72
|
+
export { collectEngineOutput } from './utils/event-collector.js';
|
|
73
|
+
export type { EngineRunResult } from './utils/event-collector.js';
|
|
74
|
+
export { A2AClient, createA2ARemoteRunner, extractTextFromMessage, } from './a2a/index.js';
|
|
75
|
+
export type { A2ARemoteRunnerConfig, } from './a2a/index.js';
|
|
76
|
+
export type { A2AAgentCard, A2AAgentSkill, A2AAgentCapabilities, A2APart, A2ATextPart, A2AFilePart, A2ADataPart, A2AMessage, A2ATaskState, A2ATaskStatus, A2AArtifact, A2ATask, A2ATaskStatusUpdateEvent, A2ATaskArtifactUpdateEvent, A2ATaskEvent, A2AJsonRpcRequest, A2AJsonRpcResponse, A2AJsonRpcError, A2ASendTaskParams, A2ASendSubscribeParams, A2AGetTaskParams, A2ACancelTaskParams, A2ARemoteAgentConfig, } from './a2a/index.js';
|
|
77
77
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @description 实现 Anthropic Messages API,支持 Claude 系列模型,
|
|
4
4
|
* 内部自动完成 OpenAI 格式 ↔ Anthropic 格式的双向转换
|
|
5
5
|
*/
|
|
6
|
-
import type { LLMProvider, ModelConfig, ModelInfo, ChatParams, ChatResponse, ChatChunk } from './types.
|
|
6
|
+
import type { LLMProvider, ModelConfig, ModelInfo, ChatParams, ChatResponse, ChatChunk } from './types.js';
|
|
7
7
|
export declare class AnthropicProvider implements LLMProvider {
|
|
8
8
|
private config;
|
|
9
9
|
constructor(config: ModelConfig);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @description 根据 ModelConfig.provider 自动创建对应的 LLMProvider 实例
|
|
4
4
|
* 支持 'openai' | 'anthropic' | 'ollama' 及任意 OpenAI 兼容供应商
|
|
5
5
|
*/
|
|
6
|
-
import type { ModelConfig, LLMProvider } from './types.
|
|
6
|
+
import type { ModelConfig, LLMProvider } from './types.js';
|
|
7
7
|
/** 已注册的供应商名称集合 */
|
|
8
8
|
export declare const BUILTIN_PROVIDERS: readonly ["openai", "anthropic", "ollama"];
|
|
9
9
|
export type BuiltinProvider = (typeof BUILTIN_PROVIDERS)[number];
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Ollama 原生支持 OpenAI 兼容接口(/v1/chat/completions)
|
|
5
5
|
* 默认地址 http://localhost:11434/v1
|
|
6
6
|
*/
|
|
7
|
-
import type { ModelConfig, ModelInfo } from './types.
|
|
8
|
-
import { OpenAIProvider } from './openai-provider.
|
|
7
|
+
import type { ModelConfig, ModelInfo } from './types.js';
|
|
8
|
+
import { OpenAIProvider } from './openai-provider.js';
|
|
9
9
|
export declare class OllamaProvider extends OpenAIProvider {
|
|
10
10
|
constructor(config: ModelConfig);
|
|
11
11
|
getModel(): ModelInfo;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @file OpenAI 兼容 LLM Provider
|
|
3
3
|
* @description 使用原生 fetch 实现,支持任意 OpenAI 兼容端点(OpenAI / DeepSeek / Ollama / vLLM 等)
|
|
4
4
|
*/
|
|
5
|
-
import type { LLMProvider, ModelConfig, ModelInfo, ChatParams, ChatResponse, ChatChunk } from './types.
|
|
5
|
+
import type { LLMProvider, ModelConfig, ModelInfo, ChatParams, ChatResponse, ChatChunk } from './types.js';
|
|
6
6
|
export declare class OpenAIProvider implements LLMProvider {
|
|
7
7
|
protected config: Required<Pick<ModelConfig, 'provider' | 'model'>> & ModelConfig;
|
|
8
8
|
constructor(config: ModelConfig);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export type { LLMProvider, ModelConfig, ModelInfo, ChatParams, ChatResponse, ChatChunk } from './types.
|
|
2
|
-
export { OpenAIProvider } from './openai-provider.
|
|
3
|
-
export { AnthropicProvider } from './anthropic-provider.
|
|
4
|
-
export { OllamaProvider } from './ollama-provider.
|
|
5
|
-
export { createLLMProvider, BUILTIN_PROVIDERS } from './factory.
|
|
6
|
-
export type { BuiltinProvider } from './factory.
|
|
1
|
+
export type { LLMProvider, ModelConfig, ModelInfo, ChatParams, ChatResponse, ChatChunk } from './types.js';
|
|
2
|
+
export { OpenAIProvider } from './openai-provider.js';
|
|
3
|
+
export { AnthropicProvider } from './anthropic-provider.js';
|
|
4
|
+
export { OllamaProvider } from './ollama-provider.js';
|
|
5
|
+
export { createLLMProvider, BUILTIN_PROVIDERS } from './factory.js';
|
|
6
|
+
export type { BuiltinProvider } from './factory.js';
|
|
7
7
|
//# sourceMappingURL=provider.d.ts.map
|
package/dist/esm/llm/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Message, TokenUsage } from '../types.
|
|
2
|
-
import type { ToolDefinition } from '../tool/types.
|
|
1
|
+
import type { Message, TokenUsage } from '../types.js';
|
|
2
|
+
import type { ToolDefinition } from '../tool/types.js';
|
|
3
3
|
export interface ModelConfig {
|
|
4
4
|
/** 供应商标识:'openai' | 'anthropic' | 'azure' | 'ollama' | 自定义 */
|
|
5
5
|
provider: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MCPClient, MCPServerConfig } from './types.
|
|
2
|
-
import type { ToolDefinition } from '../tool/types.
|
|
1
|
+
import type { MCPClient, MCPServerConfig } from './types.js';
|
|
2
|
+
import type { ToolDefinition } from '../tool/types.js';
|
|
3
3
|
/** JSON-RPC 请求 */
|
|
4
4
|
interface JsonRpcRequest {
|
|
5
5
|
jsonrpc: '2.0';
|
package/dist/esm/mcp/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MCPClient } from './types.
|
|
2
|
-
import type { ToolRegistry } from '../tool/registry.
|
|
1
|
+
import type { MCPClient } from './types.js';
|
|
2
|
+
import type { ToolRegistry } from '../tool/registry.js';
|
|
3
3
|
/** MCP 工具名前缀,用于与 builtin/skill 等工具区分 */
|
|
4
4
|
export declare const MCP_TOOL_PREFIX = "mcp_";
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MCPClientBase } from './base-client.
|
|
2
|
-
import type { MCPServerConfig } from './types.
|
|
1
|
+
import { MCPClientBase } from './base-client.js';
|
|
2
|
+
import type { MCPServerConfig } from './types.js';
|
|
3
3
|
export declare class HttpMCPClient extends MCPClientBase {
|
|
4
4
|
private endpoint;
|
|
5
5
|
private sessionId?;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MCPClientBase } from './base-client.
|
|
2
|
-
import type { MCPServerConfig } from './types.
|
|
1
|
+
import { MCPClientBase } from './base-client.js';
|
|
2
|
+
import type { MCPServerConfig } from './types.js';
|
|
3
3
|
export declare class StdioMCPClient extends MCPClientBase {
|
|
4
4
|
private process;
|
|
5
5
|
private buffer;
|
package/dist/esm/mcp/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ToolDefinition } from '../tool/types.
|
|
2
|
-
import type { ProxyCategoryConfig } from './proxy-agent.
|
|
1
|
+
import type { ToolDefinition } from '../tool/types.js';
|
|
2
|
+
import type { ProxyCategoryConfig } from './proxy-agent.js';
|
|
3
3
|
export type MCPTransport = 'stdio' | 'http' | 'sse' | 'streamableHttp' | (string & {});
|
|
4
4
|
export interface MCPServerConfig {
|
|
5
5
|
name: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { LLMProvider } from '../llm/types.
|
|
2
|
-
import type { Message } from '../types.
|
|
1
|
+
import type { LLMProvider } from '../llm/types.js';
|
|
2
|
+
import type { Message } from '../types.js';
|
|
3
3
|
/** 从对话中提取的原子事实 */
|
|
4
4
|
export interface AtomFact {
|
|
5
5
|
/** 记忆键(snake_case,用于 upsert) */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { LLMProvider } from '../llm/types.
|
|
2
|
-
import type { SceneBlock } from './scene.
|
|
1
|
+
import type { LLMProvider } from '../llm/types.js';
|
|
2
|
+
import type { SceneBlock } from './scene.js';
|
|
3
3
|
/** 画像维度 */
|
|
4
4
|
export interface PersonaFacet {
|
|
5
5
|
/** 维度键(如 coding_style, tool_preference) */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { LLMProvider } from '../llm/types.
|
|
2
|
-
import type { MemoryServiceLike } from './types.
|
|
3
|
-
import { type SceneBlock } from './scene.
|
|
4
|
-
import type { Message } from '../types.
|
|
1
|
+
import type { LLMProvider } from '../llm/types.js';
|
|
2
|
+
import type { MemoryServiceLike } from './types.js';
|
|
3
|
+
import { type SceneBlock } from './scene.js';
|
|
4
|
+
import type { Message } from '../types.js';
|
|
5
5
|
/** 管道配置 */
|
|
6
6
|
export interface PipelineOptions {
|
|
7
7
|
llmProvider: LLMProvider;
|