@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.
Files changed (101) hide show
  1. package/dist/cjs/a2a/client.d.ts +1 -1
  2. package/dist/cjs/a2a/client.d.ts.map +1 -1
  3. package/dist/cjs/a2a/client.js +0 -2
  4. package/dist/cjs/a2a/client.js.map +1 -1
  5. package/dist/cjs/a2a/index.d.ts +4 -4
  6. package/dist/cjs/a2a/runner.d.ts +3 -3
  7. package/dist/cjs/agent/engine.d.ts +4 -4
  8. package/dist/cjs/agent/history-manager.d.ts +2 -2
  9. package/dist/cjs/agent/llm-caller.d.ts +6 -6
  10. package/dist/cjs/agent/tool-executor.d.ts +7 -7
  11. package/dist/cjs/agent/types.d.ts +9 -9
  12. package/dist/cjs/context/collector.d.ts +1 -1
  13. package/dist/cjs/context/manager.d.ts +2 -2
  14. package/dist/cjs/context/types.d.ts +1 -1
  15. package/dist/cjs/hooks/types.d.ts +2 -2
  16. package/dist/cjs/index.d.ts +76 -76
  17. package/dist/cjs/llm/anthropic-provider.d.ts +1 -1
  18. package/dist/cjs/llm/factory.d.ts +1 -1
  19. package/dist/cjs/llm/ollama-provider.d.ts +2 -2
  20. package/dist/cjs/llm/openai-provider.d.ts +1 -1
  21. package/dist/cjs/llm/provider.d.ts +6 -6
  22. package/dist/cjs/llm/types.d.ts +2 -2
  23. package/dist/cjs/mcp/base-client.d.ts +2 -2
  24. package/dist/cjs/mcp/client.d.ts +2 -2
  25. package/dist/cjs/mcp/factory.d.ts +1 -1
  26. package/dist/cjs/mcp/http-client.d.ts +2 -2
  27. package/dist/cjs/mcp/stdio-client.d.ts +2 -2
  28. package/dist/cjs/mcp/types.d.ts +2 -2
  29. package/dist/cjs/memory/extractor.d.ts +2 -2
  30. package/dist/cjs/memory/persona.d.ts +2 -2
  31. package/dist/cjs/memory/pipeline.d.ts +4 -4
  32. package/dist/cjs/memory/recall.d.ts +1 -1
  33. package/dist/cjs/memory/scene.d.ts +1 -1
  34. package/dist/cjs/middleware/audit-log.d.ts +2 -2
  35. package/dist/cjs/middleware/timing.d.ts +2 -2
  36. package/dist/cjs/middleware/tool-guard.d.ts +2 -2
  37. package/dist/cjs/middleware/types.d.ts +1 -1
  38. package/dist/cjs/pool/engine-pool.d.ts +1 -1
  39. package/dist/cjs/runtime/run-registry.d.ts +1 -1
  40. package/dist/cjs/sandbox/types.d.ts +2 -2
  41. package/dist/cjs/security/guard.d.ts +1 -1
  42. package/dist/cjs/security/permission.d.ts +1 -1
  43. package/dist/cjs/skill/manager.d.ts +1 -1
  44. package/dist/cjs/skill/router.d.ts +2 -2
  45. package/dist/cjs/store/file-tool-result-store.d.ts +1 -1
  46. package/dist/cjs/tool/delegate.d.ts +2 -2
  47. package/dist/cjs/tool/registry.d.ts +1 -1
  48. package/dist/cjs/tool/types.d.ts +1 -1
  49. package/dist/cjs/utils/event-collector.d.ts +1 -1
  50. package/dist/cjs/utils/token-counter.d.ts +1 -1
  51. package/dist/esm/a2a/client.d.ts +1 -1
  52. package/dist/esm/a2a/client.d.ts.map +1 -1
  53. package/dist/esm/a2a/client.js +0 -2
  54. package/dist/esm/a2a/client.js.map +1 -1
  55. package/dist/esm/a2a/index.d.ts +4 -4
  56. package/dist/esm/a2a/runner.d.ts +3 -3
  57. package/dist/esm/agent/engine.d.ts +4 -4
  58. package/dist/esm/agent/history-manager.d.ts +2 -2
  59. package/dist/esm/agent/llm-caller.d.ts +6 -6
  60. package/dist/esm/agent/tool-executor.d.ts +7 -7
  61. package/dist/esm/agent/types.d.ts +9 -9
  62. package/dist/esm/context/collector.d.ts +1 -1
  63. package/dist/esm/context/manager.d.ts +2 -2
  64. package/dist/esm/context/types.d.ts +1 -1
  65. package/dist/esm/hooks/types.d.ts +2 -2
  66. package/dist/esm/index.d.ts +76 -76
  67. package/dist/esm/llm/anthropic-provider.d.ts +1 -1
  68. package/dist/esm/llm/factory.d.ts +1 -1
  69. package/dist/esm/llm/ollama-provider.d.ts +2 -2
  70. package/dist/esm/llm/openai-provider.d.ts +1 -1
  71. package/dist/esm/llm/provider.d.ts +6 -6
  72. package/dist/esm/llm/types.d.ts +2 -2
  73. package/dist/esm/mcp/base-client.d.ts +2 -2
  74. package/dist/esm/mcp/client.d.ts +2 -2
  75. package/dist/esm/mcp/factory.d.ts +1 -1
  76. package/dist/esm/mcp/http-client.d.ts +2 -2
  77. package/dist/esm/mcp/stdio-client.d.ts +2 -2
  78. package/dist/esm/mcp/types.d.ts +2 -2
  79. package/dist/esm/memory/extractor.d.ts +2 -2
  80. package/dist/esm/memory/persona.d.ts +2 -2
  81. package/dist/esm/memory/pipeline.d.ts +4 -4
  82. package/dist/esm/memory/recall.d.ts +1 -1
  83. package/dist/esm/memory/scene.d.ts +1 -1
  84. package/dist/esm/middleware/audit-log.d.ts +2 -2
  85. package/dist/esm/middleware/timing.d.ts +2 -2
  86. package/dist/esm/middleware/tool-guard.d.ts +2 -2
  87. package/dist/esm/middleware/types.d.ts +1 -1
  88. package/dist/esm/pool/engine-pool.d.ts +1 -1
  89. package/dist/esm/runtime/run-registry.d.ts +1 -1
  90. package/dist/esm/sandbox/types.d.ts +2 -2
  91. package/dist/esm/security/guard.d.ts +1 -1
  92. package/dist/esm/security/permission.d.ts +1 -1
  93. package/dist/esm/skill/manager.d.ts +1 -1
  94. package/dist/esm/skill/router.d.ts +2 -2
  95. package/dist/esm/store/file-tool-result-store.d.ts +1 -1
  96. package/dist/esm/tool/delegate.d.ts +2 -2
  97. package/dist/esm/tool/registry.d.ts +1 -1
  98. package/dist/esm/tool/types.d.ts +1 -1
  99. package/dist/esm/utils/event-collector.d.ts +1 -1
  100. package/dist/esm/utils/token-counter.d.ts +1 -1
  101. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import type { SanitizeResult, SecurityRule, SecurityPolicy } from './types.ts';
1
+ import type { SanitizeResult, SecurityRule, SecurityPolicy } from './types.js';
2
2
  export declare class SecurityGuard {
3
3
  private policy;
4
4
  /** 已编译的正则规则缓存(避免每次 sanitize 重复遍历数组) */
@@ -1,4 +1,4 @@
1
- import type { ToolRiskAssessment } from './risk.ts';
1
+ import type { ToolRiskAssessment } from './risk.js';
2
2
  export type PermissionDecision = 'pending' | 'approved' | 'rejected' | 'expired';
3
3
  export interface PermissionRequest {
4
4
  id: string;
@@ -1,4 +1,4 @@
1
- import type { Skill, SkillManifest, SkillSource } from './types.ts';
1
+ import type { Skill, SkillManifest, SkillSource } from './types.js';
2
2
  /** 懒加载配置 */
3
3
  interface LazyLoadConfig {
4
4
  /** content LRU 缓存容量(默认 30) */
@@ -1,5 +1,5 @@
1
- import type { RouteResult, RouteStrategy } from './types.ts';
2
- import type { SkillManager } from './manager.ts';
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,4 +1,4 @@
1
- import type { ToolResultStore, OffloadEntry } from '../agent/types.ts';
1
+ import type { ToolResultStore, OffloadEntry } from '../agent/types.js';
2
2
  export interface FileToolResultStoreOptions {
3
3
  /** 工具结果存储目录(默认 {cwd}/data/tool-results) */
4
4
  storeDir: string;
@@ -1,5 +1,5 @@
1
- import type { RegisteredTool, ToolContext } from './types.ts';
2
- import type { StructuredAgentOutput, WorkflowRole } from '../agent/workflow.ts';
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.ts';
1
+ import type { ToolDefinition, ToolExecutor, ToolContext, RegisteredTool, ToolCategory } from './types.js';
2
2
  /** defineTool 简化参数 */
3
3
  export interface DefineToolOptions {
4
4
  name: string;
@@ -1,4 +1,4 @@
1
- import type { EnvInfo } from '../context/types.ts';
1
+ import type { EnvInfo } from '../context/types.js';
2
2
  export interface ToolDefinition {
3
3
  type: 'function';
4
4
  function: {
@@ -1,4 +1,4 @@
1
- import type { AgentEvent } from '../types.ts';
1
+ import type { AgentEvent } from '../types.js';
2
2
  /** Engine 事件流消费结果 */
3
3
  export interface EngineRunResult {
4
4
  finalContent: string;
@@ -1,4 +1,4 @@
1
- import type { Message } from '../types.ts';
1
+ import type { Message } from '../types.js';
2
2
  /**
3
3
  * 计算文本的 token 数量(带 LRU 缓存)
4
4
  * @param text 输入文本
@@ -1,4 +1,4 @@
1
- import type { A2AAgentCard, A2ASendTaskParams, A2ATask, A2ATaskEvent } from './types.ts';
1
+ import type { A2AAgentCard, A2ASendTaskParams, A2ATask, A2ATaskEvent } from './types.js';
2
2
  /** A2A 客户端配置 */
3
3
  export interface A2AClientOptions {
4
4
  /** 请求超时(毫秒),默认 300000(5分钟) */
@@ -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,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;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;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"}
@@ -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,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AK,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"}
@@ -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.ts';
2
- export { A2AClient } from './client.ts';
3
- export { createA2ARemoteRunner, extractTextFromMessage } from './runner.ts';
4
- export type { A2ARemoteRunnerConfig } from './runner.ts';
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
@@ -1,6 +1,6 @@
1
- import type { SubAgentRunner } from '../tool/delegate.ts';
2
- import type { A2AMessage } from './types.ts';
3
- import { A2AClient } from './client.ts';
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.ts';
2
- import type { ToolRegistry } from '../tool/registry.ts';
3
- import type { AgentConfig, RunOptions } from './types.ts';
4
- import type { HookEvent, HookContext, HookResult } from '../hooks/types.ts';
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.ts';
2
- import type { ToolResultStore } from './types.ts';
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.ts';
2
- import type { LLMProvider } from '../llm/types.ts';
3
- import type { ToolDefinition } from '../tool/types.ts';
4
- import type { RetryPolicy } from './types.ts';
5
- import type { HookEvent, HookContext, HookResult } from '../hooks/types.ts';
6
- import type { HistoryManager } from './history-manager.ts';
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.ts';
2
- import type { ToolRegistry } from '../tool/registry.ts';
3
- import type { ToolContext } from '../tool/types.ts';
4
- import type { SecurityGuard } from '../security/guard.ts';
5
- import type { HookEvent, HookContext, HookResult } from '../hooks/types.ts';
6
- import type { Middleware } from '../middleware/types.ts';
7
- import type { HistoryManager } from './history-manager.ts';
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.ts';
2
- import type { ToolRegistry } from '../tool/registry.ts';
3
- import type { SkillManager } from '../skill/manager.ts';
4
- import type { SkillRouter } from '../skill/router.ts';
5
- import type { ContextManager } from '../context/manager.ts';
6
- import type { SecurityGuard } from '../security/guard.ts';
7
- import type { SessionContext } from '../types.ts';
8
- import type { Hook } from '../hooks/types.ts';
9
- import type { Middleware } from '../middleware/types.ts';
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,4 +1,4 @@
1
- import type { EnvInfo, EnvCollector as IEnvCollector } from './types.ts';
1
+ import type { EnvInfo, EnvCollector as IEnvCollector } from './types.js';
2
2
  /**
3
3
  * 默认本地环境采集器
4
4
  * 采集当前机器的 OS、CPU、内存、Shell 等信息
@@ -1,5 +1,5 @@
1
- import type { Message } from '../types.ts';
2
- import type { BuildContextOptions } from './types.ts';
1
+ import type { Message } from '../types.js';
2
+ import type { BuildContextOptions } from './types.js';
3
3
  /**
4
4
  * 消息构建器(纯函数式,无状态)
5
5
  *
@@ -1,4 +1,4 @@
1
- import type { Message } from '../types.ts';
1
+ import type { Message } from '../types.js';
2
2
  export interface EnvInfo {
3
3
  /** 操作系统信息,e.g. "Linux 5.15.0 x86_64" */
4
4
  os: string;
@@ -1,5 +1,5 @@
1
- import type { Message, TokenUsage } from '../types.ts';
2
- import type { ToolDefinition } from '../tool/types.ts';
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 处理器接收的上下文信息
@@ -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.ts';
2
- export { AgentEngine } from './agent/engine.ts';
3
- export { DEFAULT_COMPLEX_WORKFLOW_TEMPLATE, buildDebateInstructions, buildStructuredOutputInstruction, buildWorkflowDecisionMemory, formatDebateOutput, formatStructuredAgentOutput, formatWorkflowTemplateForPrompt, getWorkflowRoleStage, getWorkflowTemplate, parseDebateOutput, parseStructuredAgentOutput, wrapTaskWithWorkflowInstructions, } from './agent/workflow.ts';
4
- export type { StructuredAgentOutput, WorkflowCheckpoint, WorkflowDecisionLog, WorkflowRole, WorkflowStageTemplate, WorkflowTemplate, DebateOutput } from './agent/workflow.ts';
5
- export { HistoryManager } from './agent/history-manager.ts';
6
- export { LLMCaller } from './agent/llm-caller.ts';
7
- export { AgentToolExecutor } from './agent/tool-executor.ts';
8
- export type { AgentConfig, RunOptions, RetryPolicy, ToolResultStore, OffloadEntry } from './agent/types.ts';
9
- export type { LLMProvider, ModelConfig, ModelInfo, ChatParams, ChatResponse, ChatChunk, } from './llm/types.ts';
10
- export { OpenAIProvider } from './llm/openai-provider.ts';
11
- export { AnthropicProvider } from './llm/anthropic-provider.ts';
12
- export { OllamaProvider } from './llm/ollama-provider.ts';
13
- export { createLLMProvider, BUILTIN_PROVIDERS } from './llm/factory.ts';
14
- export type { BuiltinProvider } from './llm/factory.ts';
15
- export { ContextManager } from './context/manager.ts';
16
- export { LocalEnvCollector } from './context/collector.ts';
17
- export type { BuildContextOptions, EnvInfo, EnvCollector, } from './context/types.ts';
18
- export { SkillManager } from './skill/manager.ts';
19
- export { SkillRouter } from './skill/router.ts';
20
- export type { Skill, SkillManifest, SkillSource, RouteResult, RouteStrategy, MatchType, } from './skill/types.ts';
21
- export { ToolRegistry } from './tool/registry.ts';
22
- export type { DefineToolOptions } from './tool/registry.ts';
23
- export { createDelegateTool } from './tool/delegate.ts';
24
- export type { SubAgentRunner } from './tool/delegate.ts';
25
- export type { ToolDefinition, ToolExecutor, ToolContext, SubAgentEventEmitter, WidgetEventEmitter, ArtifactEventEmitter, ArtifactData, RegisteredTool, ToolCategory, ShellExecutor, FileSystemExecutor, } from './tool/types.ts';
26
- export { registerMCPTools, MCP_TOOL_PREFIX, buildMCPToolName, sanitizeForToolName } from './mcp/client.ts';
27
- export { createMCPClient, registerTransport } from './mcp/factory.ts';
28
- export type { TransportFactory } from './mcp/factory.ts';
29
- export { MCPClientBase } from './mcp/base-client.ts';
30
- export { StdioMCPClient } from './mcp/stdio-client.ts';
31
- export { HttpMCPClient } from './mcp/http-client.ts';
32
- export { resolveProxyAgentForCategory, resolveProxyUrlForCategory, getSystemProxyUrl, clearSystemProxyCache, getWindowsSystemProxy, DEFAULT_PROXY_SETTINGS, } from './mcp/proxy-agent.ts';
33
- export type { ProxyMode, ProxyCategoryConfig, ProxySettings, } from './mcp/proxy-agent.ts';
34
- export type { MCPClient, MCPServerConfig, MCPTransport, } from './mcp/types.ts';
35
- export { SecurityGuard } from './security/guard.ts';
36
- export type { SanitizeResult, SecurityRule, SecurityPolicy, Severity, } from './security/types.ts';
37
- export { assessToolRisk, isLowRiskTool, clearRiskCache, setToolSecurityPolicyProvider, } from './security/risk.ts';
38
- export type { ToolRiskLevel, ToolRiskAssessment, ToolSecurityPolicy, ToolSecurityPolicyProvider, } from './security/risk.ts';
39
- export { createPermissionRequest, listPermissionRequests, findApprovedPermission, decidePermissionRequest, configurePermissionManager, InMemoryPermissionStore, } from './security/permission.ts';
40
- export type { PermissionDecision, PermissionRequest, PermissionStore, } from './security/permission.ts';
41
- export type { Sandbox, SandboxConfig, SandboxManager, ScriptLanguage, } from './sandbox/types.ts';
42
- export { SANDBOX_BLOCKED_COMMANDS, SANDBOX_SAFE_ENV_KEYS, DEFAULT_SANDBOX_CONFIG } from './sandbox/types.ts';
43
- export { logEvent, setLogTransport } from './observability/logger.ts';
44
- export type { LogLevel, ObservabilityEvent, LogTransport, } from './observability/logger.ts';
45
- export { EnginePool } from './pool/engine-pool.ts';
46
- export { RunRegistry, InMemoryRunStateStore } from './runtime/run-registry.ts';
47
- export type { BufferedEvent, RunToolCallRecord, EventSubscriber, RunStatus, ActiveRun, RunSnapshot, RunStateStore, } from './runtime/run-registry.ts';
48
- export { JsonStore, JsonListStore } from './store/json-store.ts';
49
- export type { JsonStoreOptions } from './store/json-store.ts';
50
- export { FileToolResultStore } from './store/file-tool-result-store.ts';
51
- export type { FileToolResultStoreOptions } from './store/file-tool-result-store.ts';
52
- export { TimingMiddleware } from './middleware/timing.ts';
53
- export type { TimingReport } from './middleware/timing.ts';
54
- export { ToolGuardMiddleware } from './middleware/tool-guard.ts';
55
- export { AuditLogMiddleware } from './middleware/audit-log.ts';
56
- export type { Hook, HookEvent, HookContext, HookResult, } from './hooks/types.ts';
57
- export type { Middleware, MiddlewareContext, } from './middleware/types.ts';
58
- export type { MemoryEntry, MemoryLayer, MemoryServiceLike, } from './memory/types.ts';
59
- export { MemoryExtractor } from './memory/extractor.ts';
60
- export type { AtomFact, ExtractorOptions } from './memory/extractor.ts';
61
- export { SceneAggregator } from './memory/scene.ts';
62
- export type { SceneBlock, SceneAggregatorOptions } from './memory/scene.ts';
63
- export { PersonaGenerator } from './memory/persona.ts';
64
- export type { PersonaFacet, PersonaGeneratorOptions } from './memory/persona.ts';
65
- export { MemoryCheckpoint, getMemoryCheckpoint, resetMemoryCheckpoint } from './memory/checkpoint.ts';
66
- export type { CheckpointData } from './memory/checkpoint.ts';
67
- export { MemoryRecallEngine, formatRecallForPrompt } from './memory/recall.ts';
68
- export type { RecallResult, ScoredMemoryEntry, RecallOptions } from './memory/recall.ts';
69
- export { MemoryPipeline } from './memory/pipeline.ts';
70
- export type { PipelineOptions, PipelineResult } from './memory/pipeline.ts';
71
- export { getDataPath, getProjectDataPath, ensureDataDir, ensureProjectDataDir, expandEnvVars, setAppName, getAppName, } from './utils/data-dir.ts';
72
- export { collectEngineOutput } from './utils/event-collector.ts';
73
- export type { EngineRunResult } from './utils/event-collector.ts';
74
- export { A2AClient, createA2ARemoteRunner, extractTextFromMessage, } from './a2a/index.ts';
75
- export type { A2ARemoteRunnerConfig, } from './a2a/index.ts';
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.ts';
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.ts';
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.ts';
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.ts';
8
- import { OpenAIProvider } from './openai-provider.ts';
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.ts';
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.ts';
2
- export { OpenAIProvider } from './openai-provider.ts';
3
- export { AnthropicProvider } from './anthropic-provider.ts';
4
- export { OllamaProvider } from './ollama-provider.ts';
5
- export { createLLMProvider, BUILTIN_PROVIDERS } from './factory.ts';
6
- export type { BuiltinProvider } from './factory.ts';
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
@@ -1,5 +1,5 @@
1
- import type { Message, TokenUsage } from '../types.ts';
2
- import type { ToolDefinition } from '../tool/types.ts';
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.ts';
2
- import type { ToolDefinition } from '../tool/types.ts';
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';
@@ -1,5 +1,5 @@
1
- import type { MCPClient } from './types.ts';
2
- import type { ToolRegistry } from '../tool/registry.ts';
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,4 +1,4 @@
1
- import type { MCPClient, MCPServerConfig } from './types.ts';
1
+ import type { MCPClient, MCPServerConfig } from './types.js';
2
2
  /** 自定义 transport 工厂函数签名 */
3
3
  export type TransportFactory = () => MCPClient;
4
4
  /**
@@ -1,5 +1,5 @@
1
- import { MCPClientBase } from './base-client.ts';
2
- import type { MCPServerConfig } from './types.ts';
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.ts';
2
- import type { MCPServerConfig } from './types.ts';
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;
@@ -1,5 +1,5 @@
1
- import type { ToolDefinition } from '../tool/types.ts';
2
- import type { ProxyCategoryConfig } from './proxy-agent.ts';
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.ts';
2
- import type { Message } from '../types.ts';
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.ts';
2
- import type { SceneBlock } from './scene.ts';
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.ts';
2
- import type { MemoryServiceLike } from './types.ts';
3
- import { type SceneBlock } from './scene.ts';
4
- import type { Message } from '../types.ts';
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;