evolcore 0.0.5 → 0.0.6
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/CHANGELOG.md +43 -0
- package/README.md +4 -12
- package/dist/agents/baseagent.js +39 -0
- package/dist/agents/claude-runner.js +10 -2
- package/dist/agents/codex-runner.js +37 -8
- package/dist/agents/ecagent-runner.js +1159 -0
- package/dist/agents/gemini-runner.js +4 -1
- package/dist/agents/runner-types.js +20 -4
- package/dist/aun/msg/history.js +32 -9
- package/dist/aun/outbox.js +4 -9
- package/dist/channels/aun.js +32 -6
- package/dist/channels/daemon.js +7 -4
- package/dist/channels/dingtalk.js +3 -5
- package/dist/channels/feishu.js +16 -108
- package/dist/channels/wechat.js +4 -4
- package/dist/channels/wecom.js +4 -6
- package/dist/cli/agent-command.js +1 -1
- package/dist/cli/agent.js +42 -11
- package/dist/cli/aun-commands.js +50 -3
- package/dist/cli/daemon-commands.js +81 -6
- package/dist/cli/data-command.js +132 -0
- package/dist/cli/index.js +11 -3
- package/dist/cli/init.js +76 -17
- package/dist/cli/net-check.js +9 -20
- package/dist/cli/restart-monitor.js +11 -2
- package/dist/cli/trigger-command.js +1 -1
- package/dist/cli/watch-msg.js +12 -25
- package/dist/config/builtin-roles.js +3 -1
- package/dist/config/config-field-policy.js +1 -1
- package/dist/config/gateway-config.js +21 -4
- package/dist/config/resolved-config-op.js +10 -0
- package/dist/core/command/command-handler.js +2 -2
- package/dist/core/command/menu-handler.js +11 -9
- package/dist/core/command/role-menu.js +11 -0
- package/dist/core/command/slash-handler.js +18 -14
- package/dist/core/data-migration.js +1434 -0
- package/dist/core/handoff/store.js +14 -4
- package/dist/core/inference/text-inference.js +42 -1
- package/dist/core/message/pending-hints.js +1 -1
- package/dist/core/message/response-engine.js +406 -167
- package/dist/core/message/retry-scheduler.js +71 -0
- package/dist/core/model/model-catalog.js +7 -2
- package/dist/core/model/model-fallback.js +81 -0
- package/dist/core/protected-paths.js +41 -8
- package/dist/core/session/adapters/ecagent-session-file-adapter.js +112 -0
- package/dist/core/session/session-fs-store.js +283 -59
- package/dist/core/session/session-manager.js +19 -21
- package/dist/core/session/session-title.js +1 -0
- package/dist/core/session/session-turn-coordinator.js +8 -1
- package/dist/core/system-channels.js +1 -0
- package/dist/index.js +10 -9
- package/dist/paths.js +35 -27
- package/dist/trigger/feedback.js +16 -0
- package/dist/trigger/legacy-session-history.js +19 -0
- package/dist/trigger/manager.js +12 -1
- package/dist/trigger/parser.js +4 -2
- package/dist/trigger/scheduler.js +185 -15
- package/dist/trigger/session-lock.js +62 -0
- package/dist/trigger/state.js +64 -0
- package/dist/trigger/validation.js +32 -2
- package/dist/utils/aid-bind.js +1 -1
- package/dist/utils/error-utils.js +9 -0
- package/dist/utils/welcome.js +2 -3
- package/ecagent/LICENSE +21 -0
- package/ecagent/NOTICE +11 -0
- package/ecagent/README.md +61 -0
- package/ecagent/dist/agent-loop.d.ts +24 -0
- package/ecagent/dist/agent-loop.d.ts.map +1 -0
- package/ecagent/dist/agent-loop.js +547 -0
- package/ecagent/dist/agent-loop.js.map +1 -0
- package/ecagent/dist/agent.d.ts +127 -0
- package/ecagent/dist/agent.d.ts.map +1 -0
- package/ecagent/dist/agent.js +386 -0
- package/ecagent/dist/agent.js.map +1 -0
- package/ecagent/dist/harness/agent-harness.d.ts +95 -0
- package/ecagent/dist/harness/agent-harness.d.ts.map +1 -0
- package/ecagent/dist/harness/agent-harness.js +926 -0
- package/ecagent/dist/harness/agent-harness.js.map +1 -0
- package/ecagent/dist/harness/compaction/branch-summarization.d.ts +51 -0
- package/ecagent/dist/harness/compaction/branch-summarization.d.ts.map +1 -0
- package/ecagent/dist/harness/compaction/branch-summarization.js +174 -0
- package/ecagent/dist/harness/compaction/branch-summarization.js.map +1 -0
- package/ecagent/dist/harness/compaction/compaction.d.ts +95 -0
- package/ecagent/dist/harness/compaction/compaction.d.ts.map +1 -0
- package/ecagent/dist/harness/compaction/compaction.js +528 -0
- package/ecagent/dist/harness/compaction/compaction.js.map +1 -0
- package/ecagent/dist/harness/compaction/utils.d.ts +25 -0
- package/ecagent/dist/harness/compaction/utils.d.ts.map +1 -0
- package/ecagent/dist/harness/compaction/utils.js +131 -0
- package/ecagent/dist/harness/compaction/utils.js.map +1 -0
- package/ecagent/dist/harness/env/nodejs.d.ts +51 -0
- package/ecagent/dist/harness/env/nodejs.d.ts.map +1 -0
- package/ecagent/dist/harness/env/nodejs.js +513 -0
- package/ecagent/dist/harness/env/nodejs.js.map +1 -0
- package/ecagent/dist/harness/messages.d.ts +51 -0
- package/ecagent/dist/harness/messages.d.ts.map +1 -0
- package/ecagent/dist/harness/messages.js +102 -0
- package/ecagent/dist/harness/messages.js.map +1 -0
- package/ecagent/dist/harness/prompt-templates.d.ts +48 -0
- package/ecagent/dist/harness/prompt-templates.d.ts.map +1 -0
- package/ecagent/dist/harness/prompt-templates.js +230 -0
- package/ecagent/dist/harness/prompt-templates.js.map +1 -0
- package/ecagent/dist/harness/session/jsonl-repo.d.ts +26 -0
- package/ecagent/dist/harness/session/jsonl-repo.d.ts.map +1 -0
- package/ecagent/dist/harness/session/jsonl-repo.js +100 -0
- package/ecagent/dist/harness/session/jsonl-repo.js.map +1 -0
- package/ecagent/dist/harness/session/jsonl-storage.d.ts +34 -0
- package/ecagent/dist/harness/session/jsonl-storage.d.ts.map +1 -0
- package/ecagent/dist/harness/session/jsonl-storage.js +234 -0
- package/ecagent/dist/harness/session/jsonl-storage.js.map +1 -0
- package/ecagent/dist/harness/session/memory-repo.d.ts +18 -0
- package/ecagent/dist/harness/session/memory-repo.d.ts.map +1 -0
- package/ecagent/dist/harness/session/memory-repo.js +44 -0
- package/ecagent/dist/harness/session/memory-repo.js.map +1 -0
- package/ecagent/dist/harness/session/memory-storage.d.ts +25 -0
- package/ecagent/dist/harness/session/memory-storage.d.ts.map +1 -0
- package/ecagent/dist/harness/session/memory-storage.js +111 -0
- package/ecagent/dist/harness/session/memory-storage.js.map +1 -0
- package/ecagent/dist/harness/session/repo-utils.d.ts +11 -0
- package/ecagent/dist/harness/session/repo-utils.d.ts.map +1 -0
- package/ecagent/dist/harness/session/repo-utils.js +39 -0
- package/ecagent/dist/harness/session/repo-utils.js.map +1 -0
- package/ecagent/dist/harness/session/session.d.ts +47 -0
- package/ecagent/dist/harness/session/session.d.ts.map +1 -0
- package/ecagent/dist/harness/session/session.js +245 -0
- package/ecagent/dist/harness/session/session.js.map +1 -0
- package/ecagent/dist/harness/session/uuid.d.ts +2 -0
- package/ecagent/dist/harness/session/uuid.d.ts.map +1 -0
- package/ecagent/dist/harness/session/uuid.js +50 -0
- package/ecagent/dist/harness/session/uuid.js.map +1 -0
- package/ecagent/dist/harness/skills.d.ts +44 -0
- package/ecagent/dist/harness/skills.d.ts.map +1 -0
- package/ecagent/dist/harness/skills.js +311 -0
- package/ecagent/dist/harness/skills.js.map +1 -0
- package/ecagent/dist/harness/system-prompt.d.ts +3 -0
- package/ecagent/dist/harness/system-prompt.d.ts.map +1 -0
- package/ecagent/dist/harness/system-prompt.js +30 -0
- package/ecagent/dist/harness/system-prompt.js.map +1 -0
- package/ecagent/dist/harness/types.d.ts +619 -0
- package/ecagent/dist/harness/types.d.ts.map +1 -0
- package/ecagent/dist/harness/types.js +81 -0
- package/ecagent/dist/harness/types.js.map +1 -0
- package/ecagent/dist/harness/utils/shell-output.d.ts +14 -0
- package/ecagent/dist/harness/utils/shell-output.d.ts.map +1 -0
- package/ecagent/dist/harness/utils/shell-output.js +126 -0
- package/ecagent/dist/harness/utils/shell-output.js.map +1 -0
- package/ecagent/dist/harness/utils/truncate.d.ts +70 -0
- package/ecagent/dist/harness/utils/truncate.d.ts.map +1 -0
- package/ecagent/dist/harness/utils/truncate.js +290 -0
- package/ecagent/dist/harness/utils/truncate.js.map +1 -0
- package/ecagent/dist/index.d.ts +22 -0
- package/ecagent/dist/index.d.ts.map +1 -0
- package/ecagent/dist/index.js +27 -0
- package/ecagent/dist/index.js.map +1 -0
- package/ecagent/dist/node.d.ts +3 -0
- package/ecagent/dist/node.d.ts.map +1 -0
- package/ecagent/dist/node.js +3 -0
- package/ecagent/dist/node.js.map +1 -0
- package/ecagent/dist/proxy.d.ts +69 -0
- package/ecagent/dist/proxy.d.ts.map +1 -0
- package/ecagent/dist/proxy.js +278 -0
- package/ecagent/dist/proxy.js.map +1 -0
- package/ecagent/dist/runtime/api/lazy.d.ts +15 -0
- package/ecagent/dist/runtime/api/lazy.d.ts.map +1 -0
- package/ecagent/dist/runtime/api/lazy.js +59 -0
- package/ecagent/dist/runtime/api/lazy.js.map +1 -0
- package/ecagent/dist/runtime/api/pi-messages.d.ts +97 -0
- package/ecagent/dist/runtime/api/pi-messages.d.ts.map +1 -0
- package/ecagent/dist/runtime/api/pi-messages.js +307 -0
- package/ecagent/dist/runtime/api/pi-messages.js.map +1 -0
- package/ecagent/dist/runtime/api/pi-messages.lazy.d.ts +3 -0
- package/ecagent/dist/runtime/api/pi-messages.lazy.d.ts.map +1 -0
- package/ecagent/dist/runtime/api/pi-messages.lazy.js +3 -0
- package/ecagent/dist/runtime/api/pi-messages.lazy.js.map +1 -0
- package/ecagent/dist/runtime/auth/context.d.ts +7 -0
- package/ecagent/dist/runtime/auth/context.d.ts.map +1 -0
- package/ecagent/dist/runtime/auth/context.js +42 -0
- package/ecagent/dist/runtime/auth/context.js.map +1 -0
- package/ecagent/dist/runtime/auth/credential-store.d.ts +16 -0
- package/ecagent/dist/runtime/auth/credential-store.d.ts.map +1 -0
- package/ecagent/dist/runtime/auth/credential-store.js +39 -0
- package/ecagent/dist/runtime/auth/credential-store.js.map +1 -0
- package/ecagent/dist/runtime/auth/helpers.d.ts +20 -0
- package/ecagent/dist/runtime/auth/helpers.d.ts.map +1 -0
- package/ecagent/dist/runtime/auth/helpers.js +46 -0
- package/ecagent/dist/runtime/auth/helpers.js.map +1 -0
- package/ecagent/dist/runtime/auth/resolve.d.ts +26 -0
- package/ecagent/dist/runtime/auth/resolve.d.ts.map +1 -0
- package/ecagent/dist/runtime/auth/resolve.js +100 -0
- package/ecagent/dist/runtime/auth/resolve.js.map +1 -0
- package/ecagent/dist/runtime/auth/types.d.ts +180 -0
- package/ecagent/dist/runtime/auth/types.d.ts.map +1 -0
- package/ecagent/dist/runtime/auth/types.js +2 -0
- package/ecagent/dist/runtime/auth/types.js.map +1 -0
- package/ecagent/dist/runtime/compat.d.ts +28 -0
- package/ecagent/dist/runtime/compat.d.ts.map +1 -0
- package/ecagent/dist/runtime/compat.js +86 -0
- package/ecagent/dist/runtime/compat.js.map +1 -0
- package/ecagent/dist/runtime/index.d.ts +20 -0
- package/ecagent/dist/runtime/index.d.ts.map +1 -0
- package/ecagent/dist/runtime/index.js +17 -0
- package/ecagent/dist/runtime/index.js.map +1 -0
- package/ecagent/dist/runtime/models.d.ts +142 -0
- package/ecagent/dist/runtime/models.d.ts.map +1 -0
- package/ecagent/dist/runtime/models.js +245 -0
- package/ecagent/dist/runtime/models.js.map +1 -0
- package/ecagent/dist/runtime/oauth.d.ts +2 -0
- package/ecagent/dist/runtime/oauth.d.ts.map +1 -0
- package/ecagent/dist/runtime/oauth.js +2 -0
- package/ecagent/dist/runtime/oauth.js.map +1 -0
- package/ecagent/dist/runtime/providers/faux.d.ts +97 -0
- package/ecagent/dist/runtime/providers/faux.d.ts.map +1 -0
- package/ecagent/dist/runtime/providers/faux.js +395 -0
- package/ecagent/dist/runtime/providers/faux.js.map +1 -0
- package/ecagent/dist/runtime/types.d.ts +607 -0
- package/ecagent/dist/runtime/types.d.ts.map +1 -0
- package/ecagent/dist/runtime/types.js +2 -0
- package/ecagent/dist/runtime/types.js.map +1 -0
- package/ecagent/dist/runtime/utils/diagnostics.d.ts +19 -0
- package/ecagent/dist/runtime/utils/diagnostics.d.ts.map +1 -0
- package/ecagent/dist/runtime/utils/diagnostics.js +25 -0
- package/ecagent/dist/runtime/utils/diagnostics.js.map +1 -0
- package/ecagent/dist/runtime/utils/event-stream.d.ts +21 -0
- package/ecagent/dist/runtime/utils/event-stream.d.ts.map +1 -0
- package/ecagent/dist/runtime/utils/event-stream.js +77 -0
- package/ecagent/dist/runtime/utils/event-stream.js.map +1 -0
- package/ecagent/dist/runtime/utils/headers.d.ts +4 -0
- package/ecagent/dist/runtime/utils/headers.d.ts.map +1 -0
- package/ecagent/dist/runtime/utils/headers.js +18 -0
- package/ecagent/dist/runtime/utils/headers.js.map +1 -0
- package/ecagent/dist/runtime/utils/json-parse.d.ts +16 -0
- package/ecagent/dist/runtime/utils/json-parse.d.ts.map +1 -0
- package/ecagent/dist/runtime/utils/json-parse.js +113 -0
- package/ecagent/dist/runtime/utils/json-parse.js.map +1 -0
- package/ecagent/dist/runtime/utils/oauth/types.d.ts +64 -0
- package/ecagent/dist/runtime/utils/oauth/types.d.ts.map +1 -0
- package/ecagent/dist/runtime/utils/oauth/types.js +2 -0
- package/ecagent/dist/runtime/utils/oauth/types.js.map +1 -0
- package/ecagent/dist/runtime/utils/overflow.d.ts +58 -0
- package/ecagent/dist/runtime/utils/overflow.d.ts.map +1 -0
- package/ecagent/dist/runtime/utils/overflow.js +158 -0
- package/ecagent/dist/runtime/utils/overflow.js.map +1 -0
- package/ecagent/dist/runtime/utils/provider-env.d.ts +7 -0
- package/ecagent/dist/runtime/utils/provider-env.d.ts.map +1 -0
- package/ecagent/dist/runtime/utils/provider-env.js +44 -0
- package/ecagent/dist/runtime/utils/provider-env.js.map +1 -0
- package/ecagent/dist/runtime/utils/retry.d.ts +12 -0
- package/ecagent/dist/runtime/utils/retry.d.ts.map +1 -0
- package/ecagent/dist/runtime/utils/retry.js +90 -0
- package/ecagent/dist/runtime/utils/retry.js.map +1 -0
- package/ecagent/dist/runtime/utils/typebox-helpers.d.ts +17 -0
- package/ecagent/dist/runtime/utils/typebox-helpers.d.ts.map +1 -0
- package/ecagent/dist/runtime/utils/typebox-helpers.js +21 -0
- package/ecagent/dist/runtime/utils/typebox-helpers.js.map +1 -0
- package/ecagent/dist/runtime/utils/validation.d.ts +18 -0
- package/ecagent/dist/runtime/utils/validation.d.ts.map +1 -0
- package/ecagent/dist/runtime/utils/validation.js +269 -0
- package/ecagent/dist/runtime/utils/validation.js.map +1 -0
- package/ecagent/dist/types.d.ts +401 -0
- package/ecagent/dist/types.d.ts.map +1 -0
- package/ecagent/dist/types.js +2 -0
- package/ecagent/dist/types.js.map +1 -0
- package/ecagent/package.json +93 -0
- package/ecagent/src/agent-loop.ts +792 -0
- package/ecagent/src/agent.ts +575 -0
- package/ecagent/src/harness/agent-harness.ts +1029 -0
- package/ecagent/src/harness/compaction/branch-summarization.ts +261 -0
- package/ecagent/src/harness/compaction/compaction.ts +753 -0
- package/ecagent/src/harness/compaction/utils.ts +144 -0
- package/ecagent/src/harness/env/nodejs.ts +569 -0
- package/ecagent/src/harness/messages.ts +164 -0
- package/ecagent/src/harness/prompt-templates.ts +267 -0
- package/ecagent/src/harness/session/jsonl-repo.ts +179 -0
- package/ecagent/src/harness/session/jsonl-storage.ts +314 -0
- package/ecagent/src/harness/session/memory-repo.ts +50 -0
- package/ecagent/src/harness/session/memory-storage.ts +133 -0
- package/ecagent/src/harness/session/repo-utils.ts +51 -0
- package/ecagent/src/harness/session/session.ts +338 -0
- package/ecagent/src/harness/session/uuid.ts +54 -0
- package/ecagent/src/harness/skills.ts +375 -0
- package/ecagent/src/harness/system-prompt.ts +34 -0
- package/ecagent/src/harness/types.ts +838 -0
- package/ecagent/src/harness/utils/shell-output.ts +135 -0
- package/ecagent/src/harness/utils/truncate.ts +344 -0
- package/ecagent/src/index.ts +46 -0
- package/ecagent/src/node.ts +2 -0
- package/ecagent/src/proxy.ts +367 -0
- package/ecagent/src/runtime/api/lazy.ts +70 -0
- package/ecagent/src/runtime/api/pi-messages.lazy.ts +4 -0
- package/ecagent/src/runtime/api/pi-messages.ts +436 -0
- package/ecagent/src/runtime/auth/context.ts +45 -0
- package/ecagent/src/runtime/auth/credential-store.ts +47 -0
- package/ecagent/src/runtime/auth/helpers.ts +46 -0
- package/ecagent/src/runtime/auth/resolve.ts +141 -0
- package/ecagent/src/runtime/auth/types.ts +182 -0
- package/ecagent/src/runtime/compat.ts +158 -0
- package/ecagent/src/runtime/index.ts +31 -0
- package/ecagent/src/runtime/models.ts +452 -0
- package/ecagent/src/runtime/oauth.ts +1 -0
- package/ecagent/src/runtime/providers/faux.ts +538 -0
- package/ecagent/src/runtime/types.ts +718 -0
- package/ecagent/src/runtime/utils/diagnostics.ts +45 -0
- package/ecagent/src/runtime/utils/event-stream.ts +88 -0
- package/ecagent/src/runtime/utils/headers.ts +18 -0
- package/ecagent/src/runtime/utils/json-parse.ts +124 -0
- package/ecagent/src/runtime/utils/oauth/types.ts +79 -0
- package/ecagent/src/runtime/utils/overflow.ts +165 -0
- package/ecagent/src/runtime/utils/provider-env.ts +52 -0
- package/ecagent/src/runtime/utils/retry.ts +101 -0
- package/ecagent/src/runtime/utils/typebox-helpers.ts +24 -0
- package/ecagent/src/runtime/utils/validation.ts +310 -0
- package/ecagent/src/types.ts +430 -0
- package/ecagent/tsconfig.build.json +32 -0
- package/kits/schemas/_meta.json +7 -4
- package/kits/schemas/agent-config.schema.10.json +370 -0
- package/kits/schemas/defaults.schema.4.json +93 -0
- package/kits/schemas/relation-config.schema.8.json +69 -0
- package/kits/templates/roles/admin.json +1 -1
- package/package.json +22 -6
- package/skills/eclink/SKILL.md +70 -0
- package/skills/eclink/agents/openai.yaml +4 -0
- package/assets/.env.template +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,49 @@
|
|
|
3
3
|
本文件记录 EvolCore 的重要变更。EvolClaw 版本线的历史记录已归档至
|
|
4
4
|
[`docs/_archive/CHANGELOG-evolclaw.md`](docs/_archive/CHANGELOG-evolclaw.md)。
|
|
5
5
|
|
|
6
|
+
## 0.0.6 (2026-08-03)
|
|
7
|
+
|
|
8
|
+
### 跨渠道消息与会话迁移
|
|
9
|
+
|
|
10
|
+
- 扩展消息历史查询支持所有渠道(AUN、飞书、微信、钉钉、QQ 频道、企业微信),统一历史查询接口。
|
|
11
|
+
- 增强数据迁移机制应对会话目录结构演进,支持实例隔离与显式迁移。
|
|
12
|
+
- 压平 Agent 会话目录为 channelSessionKey,统一会话扫描与 AUN 消息查看路径。
|
|
13
|
+
- 完善 channelSessionKey 的跨平台编码和边界校验,排除旧布局父目录被误识别为会话。
|
|
14
|
+
- 完善 Trigger 会话历史回溯能力,迁移 Trigger 持久化数据至 Agent 目录并收紧访问边界。
|
|
15
|
+
|
|
16
|
+
### 任务调度与模型降级
|
|
17
|
+
|
|
18
|
+
- 统一任务级重试调度策略,完善模型不可用时的受控降级与恢复探测。
|
|
19
|
+
- 支持备用模型采用自身默认推理强度,限制备用模型链仅在全局默认配置中定义。
|
|
20
|
+
- 修正静默成功的协议提交判定,使 API 退避等待可被会话中断立即取消。
|
|
21
|
+
|
|
22
|
+
### 上下文与可靠性
|
|
23
|
+
|
|
24
|
+
- 修正上下文窗口与压缩阈值,支持上下文超限连续恢复。
|
|
25
|
+
- 保留触发任务失败审计信息,优化模型调用上下文统计。
|
|
26
|
+
- 完善上游异常重试提示。
|
|
27
|
+
|
|
28
|
+
### 操作卡片与热重载
|
|
29
|
+
|
|
30
|
+
- 完善操作卡片自由输入校验、审计与客户端兼容。
|
|
31
|
+
- 为无副作用的零工作协议失败增加安全重放,避免误判已计费空响应。
|
|
32
|
+
- 允许管理员通过控制通道热重载当前 Agent。
|
|
33
|
+
|
|
34
|
+
### 管理界面
|
|
35
|
+
|
|
36
|
+
- 修复 ECWeb 对新会话目录的扫描与消息读取。
|
|
37
|
+
- 确保会话迁移来源选择确定并兼容非规范目录。
|
|
38
|
+
|
|
39
|
+
### 基座 Agent 扩展
|
|
40
|
+
|
|
41
|
+
- 内嵌 ecagent 运行时,作为第四个可选基座 Agent(claude / codex / gemini / ecagent),npm 主包直接提供源码与编译产物,无需单独安装。
|
|
42
|
+
|
|
43
|
+
### 运行与安全
|
|
44
|
+
|
|
45
|
+
- 完善用户数据迁移的启停校验,阻止源码旧编译产物启动服务。
|
|
46
|
+
- 完善 Codex 命令授权兼容性,清理过期静态资源。
|
|
47
|
+
- 合并远程角色菜单协议更新。
|
|
48
|
+
|
|
6
49
|
## 0.0.5 (2026-07-31)
|
|
7
50
|
|
|
8
51
|
### 消息准入
|
package/README.md
CHANGED
|
@@ -78,7 +78,7 @@ ResponseEngine.processMessage()
|
|
|
78
78
|
### 环境要求
|
|
79
79
|
|
|
80
80
|
- **操作系统**:macOS / Linux / Windows
|
|
81
|
-
- **Node.js** >= 22(依赖 `node:sqlite`)
|
|
81
|
+
- **Node.js** >= 22.19.0(依赖 `node:sqlite`)
|
|
82
82
|
- **Claude Code** >= 2.1.32(`npm install -g @anthropic-ai/claude-code`)
|
|
83
83
|
|
|
84
84
|
### 1. 安装
|
|
@@ -86,16 +86,16 @@ ResponseEngine.processMessage()
|
|
|
86
86
|
**一行安装(macOS / Linux)**:
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
|
-
curl -fsSL https://
|
|
89
|
+
curl -fsSL https://aun-network.oss-cn-hangzhou.aliyuncs.com/evolcore/install.sh | bash
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
**Windows PowerShell**:
|
|
93
93
|
|
|
94
94
|
```powershell
|
|
95
|
-
irm https://
|
|
95
|
+
irm https://aun-network.oss-cn-hangzhou.aliyuncs.com/evolcore/install.ps1 | iex
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
安装器会自动进入 `ec init` 交互向导;只有已有配置同时包含控制 AID 和 Owner 时才跳过。绑定完成后运行 `ec start` 和 `ec status`。安装器不会停止或重启服务,详细流程见 [一键安装脚本说明](docs/evolcore-install-script.md)。
|
|
99
99
|
|
|
100
100
|
**npm 全局安装**:
|
|
101
101
|
|
|
@@ -363,11 +363,3 @@ v3.2 新增进程级身份标识。启动时自动生成 `ec+5位数字.agentid.
|
|
|
363
363
|
## 许可证
|
|
364
364
|
|
|
365
365
|
MIT — 详见 [LICENSE](LICENSE) 声明
|
|
366
|
-
|
|
367
|
-
## 交流群
|
|
368
|
-
|
|
369
|
-
EvolCore 正在内测中,欢迎加入微信群交流使用体验、反馈问题或参与讨论:
|
|
370
|
-
|
|
371
|
-
<img src="assets/wechat-group-qr.jpeg" width="300" alt="EvolCore 内测群二维码" />
|
|
372
|
-
|
|
373
|
-
> 二维码过期后可在 [Issues](https://github.com/eLeanwang/evolcore/issues) 中留言,我会更新邀请链接。
|
package/dist/agents/baseagent.js
CHANGED
|
@@ -26,6 +26,8 @@ const BASEAGENT_ALIASES = {
|
|
|
26
26
|
'gemini-cli': { canonical: 'gemini', displayName: 'Gemini CLI' },
|
|
27
27
|
'gemini cli': { canonical: 'gemini', displayName: 'Gemini CLI' },
|
|
28
28
|
geminicli: { canonical: 'gemini', displayName: 'Gemini CLI' },
|
|
29
|
+
ecagent: { canonical: 'ecagent', displayName: 'ecagent' },
|
|
30
|
+
'ec-agent': { canonical: 'ecagent', displayName: 'ecagent' },
|
|
29
31
|
hermes: { canonical: 'hermes', displayName: 'Hermes' },
|
|
30
32
|
};
|
|
31
33
|
export function normalizeBaseagent(input) {
|
|
@@ -207,3 +209,40 @@ export function resolveGoogleConfig(config, override) {
|
|
|
207
209
|
const location = override?.location || googleCfg?.location || process.env.GOOGLE_CLOUD_LOCATION || 'us-central1';
|
|
208
210
|
return { cliPath, model, apiKey, mode, useVertex, project, location };
|
|
209
211
|
}
|
|
212
|
+
// ── EvolCore bundled ecagent ──────────────────────────────────────────
|
|
213
|
+
export const DEFAULT_ECAGENT_BASE_URL = 'https://mg-new.evolai.cn/openclaw-proxy/v1';
|
|
214
|
+
export const DEFAULT_ECAGENT_MODEL = 'claude-sonnet-4-6';
|
|
215
|
+
export const DEFAULT_ECAGENT_TIMEOUT_MS = 120_000;
|
|
216
|
+
export const DEFAULT_ECAGENT_MAX_RETRIES = 2;
|
|
217
|
+
export const DEFAULT_ECAGENT_MAX_RETRY_DELAY_MS = 4_000;
|
|
218
|
+
export function resolveEcagentConfig(config, override) {
|
|
219
|
+
const configured = config.agents?.ecagent;
|
|
220
|
+
const isPlaceholder = (value) => !value
|
|
221
|
+
|| value.includes('your-')
|
|
222
|
+
|| value.includes('placeholder');
|
|
223
|
+
const apiKey = (isPlaceholder(override?.apiKey) ? undefined : override?.apiKey)
|
|
224
|
+
|| (isPlaceholder(configured?.apiKey) ? undefined : configured?.apiKey)
|
|
225
|
+
|| process.env.ECAGENT_API_KEY
|
|
226
|
+
|| process.env.OPENAI_API_KEY;
|
|
227
|
+
if (!apiKey) {
|
|
228
|
+
throw new Error('No ecagent API key found. Set baseagents.ecagent.apiKey, env ECAGENT_API_KEY, or env OPENAI_API_KEY');
|
|
229
|
+
}
|
|
230
|
+
const baseUrl = (override?.baseUrl && !override.baseUrl.includes('placeholder') ? override.baseUrl : undefined)
|
|
231
|
+
|| (configured?.baseUrl && !configured.baseUrl.includes('placeholder') ? configured.baseUrl : undefined)
|
|
232
|
+
|| process.env.ECAGENT_BASE_URL
|
|
233
|
+
|| DEFAULT_ECAGENT_BASE_URL;
|
|
234
|
+
const model = override?.model || configured?.model || DEFAULT_ECAGENT_MODEL;
|
|
235
|
+
const effort = override?.effort ?? configured?.effort;
|
|
236
|
+
const numberOr = (value, fallback) => (typeof value === 'number' && Number.isFinite(value) && value >= 0 ? value : fallback);
|
|
237
|
+
return {
|
|
238
|
+
apiKey,
|
|
239
|
+
baseUrl,
|
|
240
|
+
model,
|
|
241
|
+
effort,
|
|
242
|
+
timeoutMs: numberOr(override?.timeoutMs ?? configured?.timeoutMs, DEFAULT_ECAGENT_TIMEOUT_MS),
|
|
243
|
+
maxRetries: numberOr(override?.maxRetries ?? configured?.maxRetries, DEFAULT_ECAGENT_MAX_RETRIES),
|
|
244
|
+
maxRetryDelayMs: numberOr(override?.maxRetryDelayMs ?? configured?.maxRetryDelayMs, DEFAULT_ECAGENT_MAX_RETRY_DELAY_MS),
|
|
245
|
+
evolcoreAgentAid: configured?.evolcoreAgentAid,
|
|
246
|
+
evolcoreAgentConfig: configured?.evolcoreAgentConfig,
|
|
247
|
+
};
|
|
248
|
+
}
|
|
@@ -1557,7 +1557,7 @@ export class AgentRunner {
|
|
|
1557
1557
|
const totalTokens = contextTokensForUsage(u, !!isClaudeModel);
|
|
1558
1558
|
const contextWindowTokens = realContextWindowForModel(sdkModel);
|
|
1559
1559
|
const autoCompactTokens = autoCompactWindowForModel(sdkModel);
|
|
1560
|
-
const
|
|
1560
|
+
const aggregateContextUsage = totalTokens > 0 ? {
|
|
1561
1561
|
totalTokens,
|
|
1562
1562
|
maxTokens: contextWindowTokens,
|
|
1563
1563
|
percentage: Math.round((totalTokens / contextWindowTokens) * 100),
|
|
@@ -1610,6 +1610,12 @@ export class AgentRunner {
|
|
|
1610
1610
|
// 降级:无逐次数据,写一条累计行
|
|
1611
1611
|
modelCalls = [{ call_index: 0, model: callModel_, tokenUsage: u, contextUsage: contextUsageForCall(u), degraded: true }];
|
|
1612
1612
|
}
|
|
1613
|
+
// `event.usage` is aggregate query usage when the SDK made multiple
|
|
1614
|
+
// model calls. The top-level context field must describe a single
|
|
1615
|
+
// current request; aggregate usage remains available in tokenUsage.
|
|
1616
|
+
const contextUsage = lastModelCall?.contextUsage
|
|
1617
|
+
?? modelCalls?.at(-1)?.contextUsage
|
|
1618
|
+
?? aggregateContextUsage;
|
|
1613
1619
|
const completeEvent = {
|
|
1614
1620
|
type: 'complete',
|
|
1615
1621
|
result: cleanResult,
|
|
@@ -2080,7 +2086,9 @@ export class AgentRunner {
|
|
|
2080
2086
|
// 本次调用使用的模型/强度:优先 modelOverride(message-processor 按 关系>agent>全局 解析后传入),
|
|
2081
2087
|
// 缺省回落 agent 级 this.model。作为 per-call 入参传入,无共享状态,多对端并发互不污染。
|
|
2082
2088
|
const callModel = modelOverride?.model || this.model;
|
|
2083
|
-
const callEffort = (modelOverride?.
|
|
2089
|
+
const callEffort = (modelOverride?.effortMode === 'model_default'
|
|
2090
|
+
? undefined
|
|
2091
|
+
: modelOverride?.effort ?? this.effort);
|
|
2084
2092
|
const callSessionTitle = sanitizeSessionTitle(modelOverride?.sessionTitle);
|
|
2085
2093
|
logger.info(`[AgentRunner] runQuery model=${callModel} effort=${callEffort ?? 'auto'} ` +
|
|
2086
2094
|
`permMode=${requestedPermissionMode}->${callPermissionMode} role=${runPermissionContext?.role ?? 'none'} ` +
|
|
@@ -264,6 +264,24 @@ export class CodexRunner {
|
|
|
264
264
|
createDelegationCarrier() {
|
|
265
265
|
return randomBytes(32).toString('base64url');
|
|
266
266
|
}
|
|
267
|
+
approvedLiteralEvolcoreCommandArgv(command) {
|
|
268
|
+
const classification = classifyEvolcoreShellCommand(command);
|
|
269
|
+
if (classification.kind === 'bounded-output')
|
|
270
|
+
return classification.command.argv;
|
|
271
|
+
if (classification.kind !== 'literal')
|
|
272
|
+
return undefined;
|
|
273
|
+
const argv = parseLiteralShellArgv(command);
|
|
274
|
+
return argv?.[0] === 'ec' ? argv : undefined;
|
|
275
|
+
}
|
|
276
|
+
unwrapCodexShellCommandArgv(argv) {
|
|
277
|
+
if (argv.length !== 3 || argv[1] !== '-lc')
|
|
278
|
+
return undefined;
|
|
279
|
+
const shell = argv[0];
|
|
280
|
+
if (!['bash', '/bin/bash', '/usr/bin/bash', 'sh', '/bin/sh', '/usr/bin/sh'].includes(shell)) {
|
|
281
|
+
return undefined;
|
|
282
|
+
}
|
|
283
|
+
return argv[2];
|
|
284
|
+
}
|
|
267
285
|
approvedEvolcoreCommandArgv(toolInput) {
|
|
268
286
|
const explicitArgv = Array.isArray(toolInput.commandArgv)
|
|
269
287
|
&& toolInput.commandArgv.every(value => typeof value === 'string')
|
|
@@ -271,14 +289,23 @@ export class CodexRunner {
|
|
|
271
289
|
: undefined;
|
|
272
290
|
if (explicitArgv?.[0] === 'ec')
|
|
273
291
|
return explicitArgv;
|
|
292
|
+
const explicitWrappedCommand = explicitArgv
|
|
293
|
+
? this.unwrapCodexShellCommandArgv(explicitArgv)
|
|
294
|
+
: undefined;
|
|
295
|
+
if (explicitWrappedCommand !== undefined) {
|
|
296
|
+
return this.approvedLiteralEvolcoreCommandArgv(explicitWrappedCommand);
|
|
297
|
+
}
|
|
274
298
|
const command = typeof toolInput.command === 'string' ? toolInput.command : '';
|
|
275
|
-
const
|
|
276
|
-
if (
|
|
277
|
-
return
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
299
|
+
const directArgv = this.approvedLiteralEvolcoreCommandArgv(command);
|
|
300
|
+
if (directArgv)
|
|
301
|
+
return directArgv;
|
|
302
|
+
const wrappedArgv = parseLiteralShellArgv(command);
|
|
303
|
+
const wrappedCommand = wrappedArgv
|
|
304
|
+
? this.unwrapCodexShellCommandArgv(wrappedArgv)
|
|
305
|
+
: undefined;
|
|
306
|
+
return wrappedCommand === undefined
|
|
307
|
+
? undefined
|
|
308
|
+
: this.approvedLiteralEvolcoreCommandArgv(wrappedCommand);
|
|
282
309
|
}
|
|
283
310
|
armApprovedDelegationCommand(sessionId, toolInput) {
|
|
284
311
|
const threadId = this.activeSessions.get(sessionId);
|
|
@@ -748,7 +775,9 @@ export class CodexRunner {
|
|
|
748
775
|
let agentSessionId = initialAgentSessionId || this.activeSessions.get(sessionId);
|
|
749
776
|
const resumingThread = !!agentSessionId;
|
|
750
777
|
const callModel = modelOverride?.model || this.model;
|
|
751
|
-
const callEffort = modelOverride?.
|
|
778
|
+
const callEffort = modelOverride?.effortMode === 'model_default'
|
|
779
|
+
? undefined
|
|
780
|
+
: modelOverride?.effort ?? this.effort;
|
|
752
781
|
// per-call 权限模式:优先 override(message-processor 解析后传入),缺省回落实例级 currentMode。
|
|
753
782
|
// 写入 chatModes 供异步审批回调按 sessionKey 读取,并据此派生本次 thread 的 approvalPolicy/sandbox,
|
|
754
783
|
// 不依赖共享的 this.approvalPolicy/this.sandboxMode(多会话并发互不污染)。
|