evolcore 0.0.20 → 0.0.21

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 (123) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +58 -9
  3. package/dist/agents/baseagent.js +10 -6
  4. package/dist/agents/claude-runner.js +379 -108
  5. package/dist/agents/codex-app-server-client.js +10 -2
  6. package/dist/agents/codex-runner.js +402 -135
  7. package/dist/agents/ecagent-runner.js +171 -61
  8. package/dist/agents/gemini-runner.js +130 -30
  9. package/dist/agents/request-identity.js +25 -0
  10. package/dist/agents/runner-types.js +19 -0
  11. package/dist/aun/aid/agentmd.js +59 -2
  12. package/dist/aun/aid/identity.js +4 -1
  13. package/dist/aun/aid/index.js +1 -1
  14. package/dist/aun/msg/group.js +72 -6
  15. package/dist/aun/msg/history.js +213 -36
  16. package/dist/aun/msg/managed-operation.js +58 -9
  17. package/dist/aun/msg/p2p.js +5 -0
  18. package/dist/aun/outbox.js +182 -80
  19. package/dist/aun/service-proxy.js +43 -25
  20. package/dist/channels/aun.js +409 -88
  21. package/dist/channels/daemon.js +6 -1
  22. package/dist/cli/agent-command.js +4 -3
  23. package/dist/cli/agent.js +66 -56
  24. package/dist/cli/aun-commands.js +177 -42
  25. package/dist/cli/command-log.js +10 -11
  26. package/dist/cli/contact.js +1 -0
  27. package/dist/cli/daemon-commands.js +69 -115
  28. package/dist/cli/init.js +27 -15
  29. package/dist/cli/task-context.js +46 -0
  30. package/dist/cli/trigger-command.js +1 -1
  31. package/dist/cli/watch-logs.js +10 -3
  32. package/dist/config/builtin-roles.js +1 -0
  33. package/dist/config/config-field-policy.js +16 -5
  34. package/dist/config/config-manager.js +135 -17
  35. package/dist/config/contact-operation-service.js +32 -1
  36. package/dist/config/contact-request-service.js +44 -0
  37. package/dist/config/daemon-services.js +186 -0
  38. package/dist/config/gateway-config.js +20 -9
  39. package/dist/config/role-service.js +54 -3
  40. package/dist/config/schema-migration.js +550 -0
  41. package/dist/config-store.js +151 -9
  42. package/dist/core/agent-application-service.js +279 -0
  43. package/dist/core/audit/log-integrity.js +102 -0
  44. package/dist/core/auth/agent-delegation.js +31 -1
  45. package/dist/core/auth/auth-gateway.js +33 -4
  46. package/dist/core/auth/authorization-audit.js +150 -2
  47. package/dist/core/auth/operation-authorizer.js +41 -1
  48. package/dist/core/auth/operation-catalog.js +9 -1
  49. package/dist/core/bootstrap-service.js +6 -2
  50. package/dist/core/causation/aun-association.js +7 -4
  51. package/dist/core/command/agent-control.js +56 -16
  52. package/dist/core/command/command-handler.js +290 -44
  53. package/dist/core/command/connect-menu.js +3 -4
  54. package/dist/core/command/group-menu.js +5 -7
  55. package/dist/core/command/menu-handler.js +279 -80
  56. package/dist/core/command/role-menu.js +21 -11
  57. package/dist/core/command/slash-gate.js +85 -18
  58. package/dist/core/command/slash-handler.js +350 -32
  59. package/dist/core/event-catalog.js +5 -0
  60. package/dist/core/evolagent.js +4 -0
  61. package/dist/core/handoff/dispatcher.js +4 -0
  62. package/dist/core/handoff/runtime.js +10 -0
  63. package/dist/core/handoff/store.js +32 -9
  64. package/dist/core/inference/text-inference.js +7 -15
  65. package/dist/core/message/im-renderer.js +83 -84
  66. package/dist/core/message/{inbound-admission.js → message-admission.js} +51 -1
  67. package/dist/core/message/message-bridge.js +124 -10
  68. package/dist/core/message/message-log.js +14 -7
  69. package/dist/core/message/message-queue.js +206 -16
  70. package/dist/core/message/message-utils.js +12 -5
  71. package/dist/core/message/response-engine.js +486 -68
  72. package/dist/core/message/send-receipt.js +1 -0
  73. package/dist/core/message/stream-debouncer.js +9 -2
  74. package/dist/core/model/model-catalog.js +23 -15
  75. package/dist/core/model/model-diagnostics.js +28 -10
  76. package/dist/core/permission/approval-gateway.js +180 -6
  77. package/dist/core/permission/ec-command-parser.js +410 -54
  78. package/dist/core/permission/mode.js +18 -3
  79. package/dist/core/{protected-paths.js → permission/protected-paths.js} +17 -5
  80. package/dist/core/permission/readonly-shell-query.js +263 -9
  81. package/dist/core/permission/sandbox-runtime.js +159 -1
  82. package/dist/core/permission/tool-policy.js +575 -21
  83. package/dist/core/session/session-fs-store.js +154 -5
  84. package/dist/core/session/session-manager.js +299 -30
  85. package/dist/core/session/session-renew.js +19 -12
  86. package/dist/core/session/session-turn-coordinator.js +11 -4
  87. package/dist/eck/kit-renderer.js +1 -1
  88. package/dist/index.js +253 -46
  89. package/dist/ipc.js +374 -24
  90. package/dist/paths.js +64 -7
  91. package/dist/response-system/context-builder.js +1 -7
  92. package/dist/trigger/anomaly-store.js +1 -0
  93. package/dist/trigger/feedback.js +56 -5
  94. package/dist/trigger/history.js +79 -4
  95. package/dist/trigger/legacy-session-history.js +2 -2
  96. package/dist/trigger/parser.js +3 -2
  97. package/dist/trigger/validation.js +6 -1
  98. package/dist/utils/atomic-write.js +27 -0
  99. package/dist/utils/ecweb-utils.js +16 -2
  100. package/dist/utils/error-utils.js +4 -1
  101. package/dist/utils/logger.js +21 -2
  102. package/dist/utils/process-tree-stats.js +24 -4
  103. package/dist/utils/process-tree-worker.js +31 -0
  104. package/dist/utils/project-path.js +1 -2
  105. package/kits/docs/INDEX.md +1 -1
  106. package/kits/docs/evolcore/INDEX.md +1 -1
  107. package/kits/docs/evolcore/contact.md +7 -1
  108. package/kits/docs/evolcore/msg.md +16 -0
  109. package/kits/schemas/_meta.json +4 -2
  110. package/kits/schemas/agent-config.schema.11.json +13 -0
  111. package/kits/schemas/daemon.schema.5.json +0 -1
  112. package/kits/schemas/daemon.schema.6.json +131 -0
  113. package/kits/schemas/defaults.schema.5.json +15 -3
  114. package/kits/schemas/migrations/README.md +3 -1
  115. package/kits/schemas/relation-config.schema.8.json +13 -0
  116. package/kits/schemas/role-config.schema.1.json +1 -2
  117. package/kits/schemas/single-session.schema.3.json +32 -0
  118. package/kits/templates/roles/admin.json +1 -0
  119. package/kits/templates/roles/member.json +1 -0
  120. package/kits/templates/roles/visitor.json +1 -0
  121. package/package.json +6 -3
  122. package/skills/eclink/SKILL.md +2 -0
  123. package/dist/config/aun-gateway-config.js +0 -2
@@ -53,8 +53,7 @@ export function defaultProjectsRoot(evolcoreRoot, options = {}) {
53
53
  export function agentProjectRootFromDefaults(defaults, evolcoreRoot, options = {}) {
54
54
  const platform = options.platform ?? process.platform;
55
55
  const pathImpl = pathForPlatform(platform);
56
- const configuredRoot = defaults?.projects?.rootPath
57
- || (defaults?.projects?.defaultPath && pathImpl.dirname(defaults.projects.defaultPath))
56
+ const configuredRoot = defaults?.projects?.defaultPath
58
57
  || defaultProjectsRoot(evolcoreRoot, options);
59
58
  return sanitizeProjectRoot(configuredRoot, options);
60
59
  }
@@ -25,7 +25,7 @@
25
25
  | 文档 | 路径 | 说明 |
26
26
  |------|------|------|
27
27
  | 命令集目录 | `evolcore/INDEX.md` | msg/group/agent/aid/storage/ctl/rpc/bench 全集索引 |
28
- | 联系人命令 | `evolcore/contact.md` | Contact Book 拉黑与托管会话权限边界 |
28
+ | 联系人命令 | `evolcore/contact.md` | Contact Book 添加申请、拉黑与托管会话权限边界 |
29
29
 
30
30
  ## 身份
31
31
 
@@ -35,7 +35,7 @@
35
35
  | `ec fs` | AUN 文件系统统一入口 | 上传/下载/看文件/列目录/删文件/配额/群空间 | 任意有渠道场景 | `fs.md` |
36
36
  | `ec storage` | 文件存储底层调试入口 | storage 调试/旧命令/底层上传下载 | 任意有渠道场景 | `storage.md` |
37
37
  | `ec agent` | EvolAgent 生命周期 | 创建/启停/热重载/改配置 | 管理员(owner/admin) | `agent.md` |
38
- | `ec contact` | Contact Book 与访问控制 | 拉黑/解除拉黑/查拉黑 | owner/admin;写仅 owner | `contact.md` |
38
+ | `ec contact` | Contact Book 与访问控制 | 申请添加、拉黑/解除拉黑、查拉黑 | Agent 当前私聊可申请添加;管理写操作按角色限制 | `contact.md` |
39
39
  | `ec rpc` | 底层 AUN RPC(逃生通道) | 直接调协议方法 | 高级/兜底 | `rpc.md` |
40
40
 
41
41
  ## 会话自管理类(不连 AUN,操作当前会话)
@@ -6,6 +6,7 @@
6
6
  ## 命令
7
7
 
8
8
  ```bash
9
+ ec contact add <aid> --self <agent-aid>
9
10
  ec contact block <aid> --self <agent-aid>
10
11
  ec contact unblock <aid> --self <agent-aid>
11
12
  ec contact list --blocked --self <agent-aid>
@@ -16,9 +17,13 @@ ec contact list --blocked --self <agent-aid>
16
17
  ## 约束
17
18
 
18
19
  - `<aid>` 和 `--self` 必须是合法 AID。
20
+ - Agent 托管会话中的 `add` 只能针对当前 AUN 私聊对端;它创建/更新 `pending`,并向本 Agent Owner 发送审核卡片。
21
+ - `add` 复用 `/request` 的联系人申请额度、过期和请求版本校验;已有 `pending`/`declined` 条目会重新走申请流程。
22
+ - Owner 在审核卡片点击“通过”后才变为 active;`blocked` 必须先执行 `unblock`。
23
+ - 直接从本机终端执行 `add` 属于本地管理操作,会直接创建或恢复 active 联系人;Connect `action=add` 同样是管理端直接操作。
19
24
  - 写入 Agent Owner 时,系统会自动创建该 Owner 的 active 联系人记录。
20
25
  - `block/unblock` 只接受已存在的联系人;不存在时返回 `NOT_FOUND`。
21
- - `block/unblock` 只改变本 Agent 的入站接收策略,不代表对端也拉黑了本 Agent。
26
+ - `block/unblock` 至少改变本 Agent 的入站接收策略;托管任务的普通私聊 `ec msg send` 对 blocked 目标也会在 daemon 侧被拒绝。非托管 AUN CLI 发送不读取本地联系人簿。不代表对端也拉黑了本 Agent。
22
27
  - Agent owner 不能被拉黑。
23
28
  - `list --blocked` 只列出当前 blocked contact,并返回 `contactRevision`。
24
29
 
@@ -31,6 +36,7 @@ ec contact list --blocked --self <agent-aid>
31
36
  | 操作 | owner | admin | 普通角色 |
32
37
  |---|---:|---:|---:|
33
38
  | `list --blocked` | 允许 | 允许 | 拒绝 |
39
+ | Agent 会话 `add` 当前私聊对端 | 允许 | 允许 | 由当前关系授权,受 AUN 私聊和申请限制 |
34
40
  | `block` / `unblock` | 允许 | 拒绝 | 拒绝 |
35
41
 
36
42
  缺少、伪造、撤销或跨会话 delegation token 时失败关闭。托管调用的 `--self` 必须等于当前任务所属 Agent。
@@ -48,6 +48,20 @@ ec msg send <from> <to> --payload '<json>'
48
48
  - `--text <说>` — 附件说明文字(仅 `--file`)
49
49
  - `--transcript <text>` — 语音转写(仅 `--as voice`)
50
50
 
51
+ 托管 Agent 通过 daemon 发送时,若发送方使用 `policyMode: contacts`,私聊普通出站只允许 Owner 或实际 `active` 联系人。无条目、`pending`、`declined` 会拒绝发送并提示:
52
+
53
+ ```bash
54
+ ec contact add <target-aid> --self <self-aid>
55
+ ```
56
+
57
+ 该命令在托管会话中会创建/更新联系人申请并给 Owner 发送审核卡片;`blocked` 目标必须先执行:
58
+
59
+ ```bash
60
+ ec contact unblock <target-aid> --self <self-aid>
61
+ ```
62
+
63
+ 非托管环境的 `ec msg send` 是独立 AUN CLI 发送,不读取或要求 `agents/<aid>/config.json`,因此不会触发这套 Agent 联系人准入判断。
64
+
51
65
  在 EvolCore 会话内,发送还会经过当前 session 的 self/peer/role 鉴权。`visitor` 或 `member`
52
66
  默认只允许回复当前对端;从一个 agent 会话转发给第三个 agent 属于 relay 操作,可能因
53
67
  `ownPeerOnly` 被拒绝。没有成功 JSON 回执(含 `message_id`/`status`)不得声称已发送。
@@ -113,6 +127,8 @@ ec msg history <self-aid> <target-aid> \
113
127
 
114
128
  历史查询读取本地 `messages.jsonl`,不调用 `message.pull`,不会读取或推进网络收件箱游标。
115
129
 
130
+ 托管任务限制:只能使用当前 self AID,并且只能读取当前 AUN 私聊对端;群聊、非 AUN 渠道和其他对端都会被拒绝。托管任务不支持 `--channel`、`--channel-name`、`--aun-path` 或 `--app`,仅可使用 `--session`、`--limit`、`--before`、`--after`、`--direction` 和 `--format`。
131
+
116
132
  - 不传 `--session`:等价于 `--session latest`。
117
133
  - `--session latest`:使用该 AID 对 `active.json` 中的最新激活会话;找不到时直接报错。
118
134
  - `--session all`:包含该 AID 对全部本地历史以及没有会话标识的旧记录。
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "schemas": {
3
- "daemon": { "currentVersion": 5 },
3
+ "daemon": { "currentVersion": 6 },
4
4
  "defaults": { "currentVersion": 5 },
5
5
  "agent-config": { "currentVersion": 11 },
6
6
  "relation-config": { "currentVersion": 8 },
7
7
  "contact-book": { "currentVersion": 3 },
8
- "single-session": { "currentVersion": 2 },
8
+ "single-session": { "currentVersion": 3 },
9
9
  "role-registry": { "currentVersion": 1 },
10
10
  "role-config": { "currentVersion": 1 }
11
11
  },
@@ -33,6 +33,7 @@
33
33
  { "schema": "agent-config", "version": 7, "date": "2026-07-27", "description": "remove Session Renew effort; auxiliary inference is response-mode owned" },
34
34
  { "schema": "relation-config", "version": 6, "date": "2026-07-27", "description": "remove relation Session Renew effort; auxiliary inference is response-mode owned" },
35
35
  { "schema": "single-session", "version": 2, "date": "2026-07-27", "description": "add optional baseagent-aware auxiliaryModel and auxiliaryEffort without factory defaults" },
36
+ { "schema": "single-session", "version": 3, "date": "2026-08-31", "description": "move Session Renew auxiliary model and effort from mode buckets into baseagent settings" },
36
37
  { "schema": "daemon", "version": 3, "date": "2026-07-29", "description": "make daemon.json the exclusive source for all process debug settings" },
37
38
  { "schema": "daemon", "version": 4, "date": "2026-08-04", "description": "add configurable default AID domain for generated identities" },
38
39
  { "schema": "defaults", "version": 3, "date": "2026-07-29", "description": "remove debug from the Agent configuration inheritance chain" },
@@ -44,6 +45,7 @@
44
45
  { "schema": "agent-config", "version": 10, "date": "2026-08-02", "description": "reject Agent-level fallback model chain" },
45
46
  { "schema": "relation-config", "version": 8, "date": "2026-08-02", "description": "reject relation-level fallback model chain" },
46
47
  { "schema": "daemon", "version": 5, "date": "2026-08-27", "description": "remove EvolCore AUN gateway override" },
48
+ { "schema": "daemon", "version": 6, "date": "2026-09-01", "description": "unify local service lifecycle and AUN proxy settings under services[]" },
47
49
  { "schema": "defaults", "version": 5, "date": "2026-08-27", "description": "remove EvolCore AUN gateway override" },
48
50
  { "schema": "agent-config", "version": 11, "date": "2026-08-27", "description": "remove EvolCore AUN gateway override" }
49
51
  ]
@@ -195,7 +195,20 @@
195
195
  "type": "object",
196
196
  "propertyNames": { "minLength": 1 },
197
197
  "additionalProperties": { "type": "string" }
198
+ },
199
+ "auxiliaryModel": {
200
+ "type": "string",
201
+ "minLength": 1,
202
+ "description": "Session Renew 语义连续性判断使用的 direct 辅助模型。"
203
+ },
204
+ "auxiliaryEffort": {
205
+ "type": "string",
206
+ "enum": ["low", "medium", "high", "xhigh", "max"],
207
+ "description": "Session Renew 辅助模型的可选推理强度。"
198
208
  }
209
+ },
210
+ "dependencies": {
211
+ "auxiliaryEffort": ["auxiliaryModel"]
199
212
  }
200
213
  }
201
214
  },
@@ -63,7 +63,6 @@
63
63
  "description": "AUN 进程配置",
64
64
  "x-merge": "dict",
65
65
  "properties": {
66
- "encryptionSeed": { "type": ["string", "null"], "description": "已废弃兼容字段;EvolCore 固定使用内置值,检测到其他值时拒绝启动并提示联系管理人员" },
67
66
  "gatewayUrl": {
68
67
  "not": {},
69
68
  "description": "已移除;网关由 fastaun 缓存和 AID discovery 决定"
@@ -0,0 +1,131 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "daemon.schema.6.json",
4
+ "title": "ProcessConfig v6 (daemon.json)",
5
+ "description": "进程级配置:daemon 自身运行配置,链外独立作用域,不进覆盖链。",
6
+ "x-logical-name": "daemon",
7
+ "x-scope": "process",
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "$schema_version": { "type": "number", "const": 6, "default": 6, "x-merge": "scalar" },
12
+ "aid": { "type": "string", "description": "daemon 默认身份 AID", "x-merge": "scalar" },
13
+ "owners": {
14
+ "type": "array",
15
+ "items": { "type": "string" },
16
+ "description": "进程控制面鉴权名单(谁能远程管 daemon)",
17
+ "x-merge": "list"
18
+ },
19
+ "fullaccess": {
20
+ "type": "object",
21
+ "description": "daemon-owner 批准的按调用宿主级执行功能;默认关闭",
22
+ "x-merge": "dict",
23
+ "additionalProperties": false,
24
+ "properties": {
25
+ "enabled": { "type": "boolean", "default": false, "description": "启用 /fa 与 Trigger permissionMode=fullaccess" }
26
+ }
27
+ },
28
+ "debug": {
29
+ "type": "object",
30
+ "description": "进程级调试配置;唯一合法来源为 daemon.json,不参与 Agent 覆盖链",
31
+ "x-merge": "dict",
32
+ "additionalProperties": false,
33
+ "properties": {
34
+ "logLevel": { "type": "string", "enum": ["DEBUG", "INFO", "WARN", "ERROR"], "description": "daemon 日志级别" },
35
+ "aunTrace": { "type": "boolean", "description": "是否记录 AUN 协议 trace" },
36
+ "aunSdkLog": { "type": "boolean", "description": "是否启用 AUN SDK 调试日志" },
37
+ "upmsg": { "type": "boolean", "description": "是否向 Agent owner 发送 daemon 上线通知" },
38
+ "eckSnapshots": { "type": "boolean", "default": false, "description": "是否写入可能包含敏感上下文的 ECK 旁路调试快照" }
39
+ }
40
+ },
41
+ "tunnel": {
42
+ "type": "object",
43
+ "description": "内网穿透配置",
44
+ "x-merge": "dict",
45
+ "properties": {
46
+ "targets": { "type": "array", "description": "穿透目标列表", "items": { "type": "object" } }
47
+ }
48
+ },
49
+ "aun": {
50
+ "type": "object",
51
+ "description": "AUN 进程配置",
52
+ "x-merge": "dict",
53
+ "properties": {
54
+ "gatewayUrl": { "not": {}, "description": "已移除;网关由 fastaun 缓存和 AID discovery 决定" },
55
+ "defaultAidDomain": {
56
+ "type": "string",
57
+ "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)+$",
58
+ "description": "自动生成控制 AID 与 benchmark AID 使用的后缀域名;不影响已有 AID"
59
+ },
60
+ "minEvolVersion": { "type": "string", "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$", "description": "AUN Menu 允许的最低 Evol 客户端版本;省略时不限制" },
61
+ "menuTokenRequired": { "type": "boolean", "default": false, "description": "是否要求普通 AUN Menu 请求携带有效 menu_token;默认 false" },
62
+ "defaultEncrypt": { "type": "boolean", "description": "所有 daemon 管理的 AUN 通道共用的出站默认加密值;省略时为 true" }
63
+ }
64
+ },
65
+ "services": {
66
+ "type": "array",
67
+ "description": "daemon 管理的本机服务及其可选 AUN 代理",
68
+ "x-merge": "list",
69
+ "items": {
70
+ "type": "object",
71
+ "additionalProperties": false,
72
+ "required": ["name", "enabled"],
73
+ "properties": {
74
+ "name": {
75
+ "type": "string",
76
+ "pattern": "^[a-z0-9_-]+$",
77
+ "description": "服务的逻辑标识,同时作为 AUN 代理路由名;ecweb 表示本机 EC Web 服务实例"
78
+ },
79
+ "enabled": { "type": "boolean", "default": true, "description": "是否启用本机服务实例" },
80
+ "port": { "type": "integer", "minimum": 1, "maximum": 65535, "description": "本机服务期望监听端口" },
81
+ "proxy": {
82
+ "type": "object",
83
+ "additionalProperties": false,
84
+ "allOf": [
85
+ {
86
+ "if": { "properties": { "enabled": { "const": true }, "source": { "const": "static" } }, "required": ["enabled", "source"] },
87
+ "then": { "required": ["endpoint", "visibility"] }
88
+ },
89
+ {
90
+ "if": { "properties": { "enabled": { "const": true } }, "required": ["enabled"] },
91
+ "then": { "required": ["source", "visibility"] }
92
+ }
93
+ ],
94
+ "properties": {
95
+ "enabled": { "type": "boolean", "default": false, "description": "是否通过 AUN Service Proxy 暴露该服务" },
96
+ "source": { "type": "string", "enum": ["instance", "static"], "description": "instance 表示自动发现同名本机服务;static 使用 endpoint 显式回连" },
97
+ "endpoint": { "type": "string", "maxLength": 2048, "description": "source=static 时使用的本机 HTTP/HTTPS 或 WS/WSS 回连地址" },
98
+ "serviceType": { "type": "string", "enum": ["http", "websocket", "ssh"], "default": "http", "description": "AUN 中公布的服务类型" },
99
+ "visibility": { "type": "string", "enum": ["public", "private", "aun-auth"], "default": "private", "description": "AUN Service Proxy 访问策略" },
100
+ "metadata": {
101
+ "type": "object",
102
+ "description": "非敏感服务描述;不得包含 endpoint、token、secret、cookie 等敏感信息",
103
+ "additionalProperties": { "type": "string", "maxLength": 8192 }
104
+ }
105
+ }
106
+ }
107
+ }
108
+ }
109
+ },
110
+ "configSnapshots": { "type": "boolean", "default": true, "description": "是否自动维护配置快照、启动日志和自检回落", "x-merge": "scalar" },
111
+ "idleMonitor": {
112
+ "type": "object",
113
+ "description": "流式输出空闲监控配置",
114
+ "x-merge": "dict",
115
+ "properties": {
116
+ "enabled": { "type": "boolean", "default": true, "description": "是否启用空闲监控" },
117
+ "timeout": { "type": "number", "default": 120, "description": "空闲超时秒数" },
118
+ "apiRetryTimeout": { "type": "number", "description": "API 重试尝试连续无事件时的超时秒数;未设置时继承 timeout" },
119
+ "maxExecutionTime": { "type": "number", "description": "单个任务总执行时限(秒);未配置、非数字或小于等于 0 表示不限制" }
120
+ }
121
+ },
122
+ "watch": {
123
+ "type": "object",
124
+ "description": "日志监听配置",
125
+ "x-merge": "dict",
126
+ "properties": {
127
+ "logTypes": { "type": "array", "description": "要监听的日志类型", "items": { "type": "string" } }
128
+ }
129
+ }
130
+ }
131
+ }
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "active_baseagent": {
26
26
  "type": "string",
27
- "description": "当前活跃的 base agent(claude/codex/gemini)。暂存于此,待权限体系实现后迁移。",
27
+ "description": "当前活跃的 base agent(claude/codex/gemini/ecagent)。暂存于此,待权限体系实现后迁移。",
28
28
  "x-merge": "scalar"
29
29
  },
30
30
  "baseagents": {
@@ -45,6 +45,16 @@
45
45
  "propertyNames": { "minLength": 1 },
46
46
  "additionalProperties": { "type": "string" }
47
47
  },
48
+ "auxiliaryModel": {
49
+ "type": "string",
50
+ "minLength": 1,
51
+ "description": "Session Renew 语义连续性判断使用的 direct 辅助模型。"
52
+ },
53
+ "auxiliaryEffort": {
54
+ "type": "string",
55
+ "enum": ["low", "medium", "high", "xhigh", "max"],
56
+ "description": "Session Renew 辅助模型的可选推理强度。"
57
+ },
48
58
  "fallbackModels": {
49
59
  "type": "array",
50
60
  "maxItems": 3,
@@ -59,6 +69,9 @@
59
69
  }
60
70
  }
61
71
  }
72
+ },
73
+ "dependencies": {
74
+ "auxiliaryEffort": ["auxiliaryModel"]
62
75
  }
63
76
  }
64
77
  },
@@ -66,8 +79,8 @@
66
79
  "type": "object",
67
80
  "description": "项目路径配置",
68
81
  "x-merge": "dict",
82
+ "additionalProperties": false,
69
83
  "properties": {
70
- "rootPath": { "type": "string", "description": "全局项目根路径" },
71
84
  "defaultPath": { "type": "string", "description": "全局默认项目路径" }
72
85
  }
73
86
  },
@@ -77,7 +90,6 @@
77
90
  "x-merge": "dict",
78
91
  "properties": {
79
92
  "keystorePath": { "type": "string" },
80
- "encryptionSeed": { "type": "string" },
81
93
  "gatewayUrl": { "not": {}, "description": "已移除;网关由 fastaun 缓存和 AID discovery 决定" },
82
94
  "defaultEncrypt": {
83
95
  "not": {},
@@ -25,4 +25,6 @@ export function migrate(old: object): object; // 旧版本完整 JSON → 新
25
25
  - 历史 schema 文件全部保留(`{逻辑名}.schema.{版本}.json`)。
26
26
  - 每个迁移函数 default-export `migrate`,由 ConfigManager 动态 import。
27
27
 
28
- 当前所有 schema 均为 v1,无迁移函数。
28
+ 当前完整配置 schema 的历史迁移仍按各自模块维护。响应模式桶的
29
+ `single-session` v2→v3 数据迁移集中在 `src/config/schema-migration.ts`,
30
+ 扫描并更新 defaults、Agent、Relation 配置文件,并在 daemon 启动前自动执行。
@@ -46,7 +46,20 @@
46
46
  "type": "object",
47
47
  "propertyNames": { "minLength": 1 },
48
48
  "additionalProperties": { "type": "string" }
49
+ },
50
+ "auxiliaryModel": {
51
+ "type": "string",
52
+ "minLength": 1,
53
+ "description": "Session Renew 语义连续性判断使用的 direct 辅助模型。"
54
+ },
55
+ "auxiliaryEffort": {
56
+ "type": "string",
57
+ "enum": ["low", "medium", "high", "xhigh", "max"],
58
+ "description": "Session Renew 辅助模型的可选推理强度。"
49
59
  }
60
+ },
61
+ "dependencies": {
62
+ "auxiliaryEffort": ["auxiliaryModel"]
50
63
  }
51
64
  }
52
65
  },
@@ -14,8 +14,7 @@
14
14
  { "value": "baseagents.claude.effort", "label": "Claude Effort", "description": "角色使用 Claude 时的默认推理强度及可覆盖范围。", "valueType": "enum", "hasOptions": true, "relationOverrideApplied": true, "constraintsApplied": true, "editable": true, "x-runtimeApplied": true, "x-optionsSource": "static-enum", "options": [{ "value": "auto", "label": "Auto" }, { "value": "low", "label": "Low" }, { "value": "medium", "label": "Medium" }, { "value": "high", "label": "High" }, { "value": "xhigh", "label": "Xhigh" }, { "value": "max", "label": "Max" }] },
15
15
  { "value": "baseagents.codex.model", "label": "Codex Model", "description": "角色可使用的 Codex 默认模型和模型白名单。", "valueType": "model", "hasOptions": true, "relationOverrideApplied": true, "constraintsApplied": true, "editable": true, "x-runtimeApplied": true, "x-optionsSource": "model-catalog", "patterns": [{ "value": "*", "label": "All Codex models" }, { "value": "gpt-5.4*", "label": "GPT-5.4 family" }, { "value": "gpt-5.3-codex*", "label": "GPT-5.3 Codex family" }] },
16
16
  { "value": "baseagents.codex.effort", "label": "Codex Effort", "description": "角色使用 Codex 时的默认推理强度及可覆盖范围。", "valueType": "enum", "hasOptions": true, "relationOverrideApplied": true, "constraintsApplied": true, "editable": true, "x-runtimeApplied": true, "x-optionsSource": "static-enum", "options": [{ "value": "auto", "label": "Auto" }, { "value": "low", "label": "Low" }, { "value": "medium", "label": "Medium" }, { "value": "high", "label": "High" }, { "value": "xhigh", "label": "Xhigh" }] },
17
- { "value": "baseagents.gemini.model", "label": "Gemini Model", "description": "角色可使用的 Gemini 默认模型和模型白名单。", "valueType": "model", "hasOptions": true, "relationOverrideApplied": true, "constraintsApplied": true, "editable": true, "x-runtimeApplied": true, "x-optionsSource": "model-catalog", "patterns": [{ "value": "*", "label": "All Gemini models" }, { "value": "gemini-*", "label": "Gemini model family" }] },
18
- { "value": "baseagents.hermes.model", "label": "Hermes Model", "description": "角色可使用的 Hermes 默认模型和模型白名单。", "valueType": "model", "hasOptions": true, "relationOverrideApplied": true, "constraintsApplied": true, "editable": true, "x-runtimeApplied": true, "x-optionsSource": "model-catalog", "patterns": [{ "value": "*", "label": "All Hermes models" }] }
17
+ { "value": "baseagents.gemini.model", "label": "Gemini Model", "description": "角色可使用的 Gemini 默认模型和模型白名单。", "valueType": "model", "hasOptions": true, "relationOverrideApplied": true, "constraintsApplied": true, "editable": true, "x-runtimeApplied": true, "x-optionsSource": "model-catalog", "patterns": [{ "value": "*", "label": "All Gemini models" }, { "value": "gemini-*", "label": "Gemini model family" }] }
19
18
  ],
20
19
  "type": "object",
21
20
  "additionalProperties": false,
@@ -0,0 +1,32 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "single-session.schema.3.json",
4
+ "title": "SingleSessionParams (responseModeParams['single-session'])",
5
+ "description": "Single-session mode parameters. Session Renew auxiliary model settings belong to baseagents.<name>.",
6
+ "x-logical-name": "single-session",
7
+ "x-scope": "mode",
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "pre_tool_1stmsgchk": {
12
+ "type": "boolean",
13
+ "enum": [true, false],
14
+ "default": true,
15
+ "description": "proactive 首个本地工具表态检查(仅 chatmode=proactive 生效):首个可被 PreToolUse 覆盖的本地工具必须是当前会话精确对应的 ec msg/group send,否则拦截;WebSearch、图像生成、浏览器和 Computer Use 等 hosted 工具不进入此硬拒绝边界。",
16
+ "x-enumDescriptions": {
17
+ "true": "启用:首个 hook 可覆盖的本地工具必须是精确会话 send",
18
+ "false": "禁用:不执行 proactive 首个本地工具 send 检查"
19
+ }
20
+ },
21
+ "tool_use_reminder": {
22
+ "type": "boolean",
23
+ "enum": [true, false],
24
+ "default": true,
25
+ "description": "proactive 工具汇报提醒(仅 chatmode=proactive 生效):启用队列未读提醒 + 每 10 次工具调用的汇报提醒。",
26
+ "x-enumDescriptions": {
27
+ "true": "启用:自动汇报工具使用情况",
28
+ "false": "禁用:静默执行工具"
29
+ }
30
+ }
31
+ }
32
+ }
@@ -8,6 +8,7 @@
8
8
  },
9
9
  "commandPermissions": {
10
10
  "contact.read": { "allow": true, "scopes": ["agent"] },
11
+ "contact.add": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true, "privateOnly": true } },
11
12
  "contact.block": {
12
13
  "allow": true,
13
14
  "scopes": ["agent"],
@@ -52,6 +52,7 @@
52
52
  "group.rulespolicy.update": { "allow": false },
53
53
  "trigger.*": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true, "targetCurrentAgentOnly": true } },
54
54
  "ec.msg.send": { "allow": true, "constraints": { "ownPeerOnly": true } },
55
+ "contact.add": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true, "privateOnly": true } },
55
56
  "ec.msg.file": { "allow": true, "constraints": { "ownPeerOnly": true } },
56
57
  "ec.msg.history": { "allow": true, "scopes": ["relation"], "constraints": { "privateOnly": true, "currentRelationOnly": true, "targetCurrentAgentOnly": true } },
57
58
  "ec.msg.online": { "allow": true, "scopes": ["relation"], "constraints": { "privateOnly": true, "currentRelationOnly": true, "targetCurrentAgentOnly": true } },
@@ -56,6 +56,7 @@
56
56
  "agent.baseagent.list": { "allow": true, "scopes": ["agent"], "constraints": { "targetCurrentAgentOnly": true } },
57
57
  "capability.read": { "allow": true, "scopes": ["agent"], "constraints": { "targetCurrentAgentOnly": true } },
58
58
  "ec.msg.send": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true, "privateOnly": true } },
59
+ "contact.add": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true, "privateOnly": true } },
59
60
  "ec.msg.file": { "allow": false },
60
61
  "ec.msg.history": { "allow": false },
61
62
  "ec.msg.online": { "allow": false },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evolcore",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "description": "AI Agent gateway connecting Claude, Codex, Gemini, and the bundled ecagent runner to messaging channels with multi-project session management",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -11,6 +11,8 @@
11
11
  "dist/",
12
12
  "ecagent/dist/",
13
13
  "!ecagent/dist/**/*.map",
14
+ "!dist/**/*.test.js",
15
+ "!dist/**/*.spec.js",
14
16
  "ecagent/LICENSE",
15
17
  "ecagent/NOTICE",
16
18
  "ecagent/README.md",
@@ -18,6 +20,7 @@
18
20
  "bin/",
19
21
  "!dist/experimental/",
20
22
  "skills/",
23
+ "!skills/eclink/IDENTITIES.md",
21
24
  "kits/",
22
25
  "!kits/.kits-version",
23
26
  "*.md",
@@ -45,7 +48,7 @@
45
48
  "prepublishOnly": "npm test"
46
49
  },
47
50
  "dependencies": {
48
- "@agentunion/fastaun": "0.5.6",
51
+ "@agentunion/fastaun": "0.5.10",
49
52
  "@anthropic-ai/claude-agent-sdk": "0.3.220",
50
53
  "@modelcontextprotocol/sdk": "^1.29.0",
51
54
  "ajv": "^8.20.0",
@@ -78,6 +81,6 @@
78
81
  "vitest": "^4.1.0"
79
82
  },
80
83
  "engines": {
81
- "node": ">=22.19.0"
84
+ "node": ">=22.16.0"
82
85
  }
83
86
  }
@@ -10,6 +10,8 @@ Use the installed `ec` CLI as the message interface. This skill is only for a st
10
10
 
11
11
  If the runtime exposes an EvolCore task/session context (for example `EVOLCORE_SESSION_ID`, `EVOLCORE_DELEGATION_TOKEN`, or an ECK-managed channel prompt), stop using this skill. Do not shell out to `ec`; let the EvolCore runtime's delegated sender enforce the current session, peer, role, and audit constraints.
12
12
 
13
+ After confirming that this is a standalone session, read [IDENTITIES.md](IDENTITIES.md) for the machine-local Codex AID registry. Do not read that registry from an EvolCore-managed task.
14
+
13
15
  ## Shell and approval boundary
14
16
 
15
17
  Every `exec_command` invocation must run exactly one `ec` command. Do not combine commands with `&&`, `||`, `;`, `|`, redirects, subshells, command substitutions, scripts, `command -v`, or wrappers such as `sh -c`/`bash -lc`.
@@ -1,2 +0,0 @@
1
- /** Compatibility exports for retired AUN gateway override handling. */
2
- export { legacyAunGatewayConfigPaths, stripLegacyAunGatewayConfig, } from './config-manager.js';