@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 { MemoryEntry, MemoryLayer } from './types.ts';
1
+ import type { MemoryEntry, MemoryLayer } from './types.js';
2
2
  /** 召回结果 */
3
3
  export interface RecallResult {
4
4
  /** 召回的记忆条目(按相关度排序) */
@@ -1,4 +1,4 @@
1
- import type { LLMProvider } from '../llm/types.ts';
1
+ import type { LLMProvider } from '../llm/types.js';
2
2
  /** 场景块(L2) */
3
3
  export interface SceneBlock {
4
4
  /** 场景 ID(snake_case) */
@@ -1,5 +1,5 @@
1
- import type { Middleware, MiddlewareContext } from '../middleware/types.ts';
2
- import type { HookContext, HookResult } from '../hooks/types.ts';
1
+ import type { Middleware, MiddlewareContext } from '../middleware/types.js';
2
+ import type { HookContext, HookResult } from '../hooks/types.js';
3
3
  /**
4
4
  * 记录每轮迭代和工具调用的审计日志
5
5
  * - before/after: 记录迭代开始/结束 + 消息数量
@@ -1,5 +1,5 @@
1
- import type { Middleware, MiddlewareContext } from '../middleware/types.ts';
2
- import type { HookContext, HookResult } from '../hooks/types.ts';
1
+ import type { Middleware, MiddlewareContext } from '../middleware/types.js';
2
+ import type { HookContext, HookResult } from '../hooks/types.js';
3
3
  export interface TimingReport {
4
4
  type: 'iteration' | 'tool';
5
5
  sessionId?: string;
@@ -1,5 +1,5 @@
1
- import type { Middleware } from '../middleware/types.ts';
2
- import type { HookContext, HookResult } from '../hooks/types.ts';
1
+ import type { Middleware } from '../middleware/types.js';
2
+ import type { HookContext, HookResult } from '../hooks/types.js';
3
3
  /**
4
4
  * 工具调用守卫:对指定工具进行拦截
5
5
  * - 可配置需要拦截的工具名列表
@@ -1,4 +1,4 @@
1
- import type { HookContext, HookResult } from '../hooks/types.ts';
1
+ import type { HookContext, HookResult } from '../hooks/types.js';
2
2
  /**
3
3
  * 中间件 before/after 接收的上下文信息
4
4
  * 包含当前迭代的关键状态快照,中间件可读取但不应直接修改
@@ -1,4 +1,4 @@
1
- import type { AgentEngine } from '../agent/engine.ts';
1
+ import type { AgentEngine } from '../agent/engine.js';
2
2
  /** AgentEngine 实例复用池 */
3
3
  export declare class EnginePool {
4
4
  private pool;
@@ -1,4 +1,4 @@
1
- import type { WorkflowCheckpoint } from '../agent/workflow.ts';
1
+ import type { WorkflowCheckpoint } from '../agent/workflow.js';
2
2
  /** 单条事件 */
3
3
  export interface BufferedEvent {
4
4
  event: string;
@@ -1,5 +1,5 @@
1
- import type { SecurityRule } from '../security/types.ts';
2
- import type { ShellExecutor, FileSystemExecutor } from '../tool/types.ts';
1
+ import type { SecurityRule } from '../security/types.js';
2
+ import type { ShellExecutor, FileSystemExecutor } from '../tool/types.js';
3
3
  /** 沙箱配置 */
4
4
  export interface SandboxConfig {
5
5
  /** 沙箱根目录(默认 ~/.workai/sandboxes/{id}) */
@@ -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 输入文本
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cicctencent/agent-core",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Core engine for AI agent — LLM orchestration, tool execution, MCP, skill routing, security, and memory pipeline.",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/index.js",