evolcore 0.0.2 → 0.0.4

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 (206) hide show
  1. package/CHANGELOG.md +93 -778
  2. package/README.md +45 -10
  3. package/bin/ec-safe-output.js +89 -24
  4. package/dist/agents/baseagent.js +46 -0
  5. package/dist/agents/claude-runner.js +198 -48
  6. package/dist/agents/codex-app-server-client.js +68 -0
  7. package/dist/agents/codex-runner.js +203 -8
  8. package/dist/agents/runner-types.js +2 -2
  9. package/dist/aun/aid/agentmd.js +79 -0
  10. package/dist/aun/aid/encryption-seed-policy.js +29 -0
  11. package/dist/aun/aid/index.js +1 -1
  12. package/dist/aun/aid/store.js +2 -5
  13. package/dist/aun/outbox.js +8 -0
  14. package/dist/channels/aun.js +241 -116
  15. package/dist/channels/daemon.js +18 -4
  16. package/dist/channels/dingtalk.js +1005 -260
  17. package/dist/channels/feishu.js +184 -56
  18. package/dist/channels/qqbot.js +23 -1
  19. package/dist/channels/wechat.js +303 -155
  20. package/dist/channels/wecom.js +1132 -164
  21. package/dist/cli/agent-command.js +2 -1
  22. package/dist/cli/aun-commands.js +98 -43
  23. package/dist/cli/bench.js +2 -2
  24. package/dist/cli/contact.js +71 -0
  25. package/dist/cli/ctl-command.js +2 -2
  26. package/dist/cli/daemon-commands.js +77 -214
  27. package/dist/cli/handoff-command.js +4 -3
  28. package/dist/cli/help.js +9 -5
  29. package/dist/cli/index.js +132 -116
  30. package/dist/cli/init-channel.js +242 -129
  31. package/dist/cli/init.js +70 -31
  32. package/dist/cli/model.js +2 -1
  33. package/dist/cli/net-check.js +2 -2
  34. package/dist/cli/queue-command.js +30 -6
  35. package/dist/cli/raw-key-input.js +25 -0
  36. package/dist/cli/response.js +5 -6
  37. package/dist/cli/restart-monitor.js +25 -1
  38. package/dist/cli/stats.js +6 -4
  39. package/dist/cli/trigger-command.js +146 -25
  40. package/dist/cli/version.js +6 -1
  41. package/dist/config/access-policy-domain.js +38 -0
  42. package/dist/config/access-policy.js +134 -0
  43. package/dist/config/builtin-role-templates.js +42 -17
  44. package/dist/config/builtin-roles.js +31 -6
  45. package/dist/config/config-field-policy.js +17 -5
  46. package/dist/config/config-manager.js +409 -29
  47. package/dist/config/config-operation-service.js +35 -38
  48. package/dist/config/contact-alias.js +68 -0
  49. package/dist/config/contact-bind-code.js +274 -0
  50. package/dist/config/contact-book-store.js +622 -0
  51. package/dist/config/contact-book-v2-startup.js +35 -0
  52. package/dist/config/contact-book.js +185 -300
  53. package/dist/config/contact-operation-service.js +116 -0
  54. package/dist/config/contact-request-service.js +331 -0
  55. package/dist/config/peer-role-resolver.js +136 -55
  56. package/dist/config/role-ranks.js +18 -0
  57. package/dist/config/role-service.js +16 -19
  58. package/dist/config/role-store.js +16 -5
  59. package/dist/config/roles.js +10 -1
  60. package/dist/config/schema-registry.js +49 -24
  61. package/dist/config-store.js +14 -4
  62. package/dist/core/auth/agent-delegation.js +105 -11
  63. package/dist/core/auth/authorization-audit.js +16 -1
  64. package/dist/core/auth/operation-authorizer.js +10 -0
  65. package/dist/core/auth/operation-catalog.js +105 -1
  66. package/dist/core/auth/trigger-authorization.js +15 -0
  67. package/dist/core/bootstrap-service.js +2 -9
  68. package/dist/core/channel-loader.js +6 -2
  69. package/dist/core/command/command-handler.js +113 -21
  70. package/dist/core/command/connect-menu.js +599 -0
  71. package/dist/core/command/evol-menu-version-gate.js +38 -0
  72. package/dist/core/command/group-menu.js +421 -0
  73. package/dist/core/command/menu-handler.js +382 -100
  74. package/dist/core/command/menu-protocol.js +8 -2
  75. package/dist/core/command/menu-token-store.js +102 -0
  76. package/dist/core/command/role-menu.js +128 -29
  77. package/dist/core/command/slash-gate.js +1 -1
  78. package/dist/core/command/slash-handler.js +186 -49
  79. package/dist/core/daemon-file-cache.js +40 -6
  80. package/dist/core/event-catalog.js +99 -0
  81. package/dist/core/evolagent-registry.js +4 -40
  82. package/dist/core/evolagent.js +20 -9
  83. package/dist/core/handoff/runtime.js +162 -37
  84. package/dist/core/handoff/store.js +46 -2
  85. package/dist/core/handoff/types.js +1 -0
  86. package/dist/core/inference/text-inference.js +16 -74
  87. package/dist/core/message/file-markers.js +7 -0
  88. package/dist/core/message/im-renderer.js +20 -14
  89. package/dist/core/message/inbound-admission.js +124 -0
  90. package/dist/core/message/message-bridge.js +670 -57
  91. package/dist/core/message/message-log.js +1 -0
  92. package/dist/core/message/message-queue.js +195 -10
  93. package/dist/core/message/message-utils.js +8 -2
  94. package/dist/core/message/peer-mode.js +7 -8
  95. package/dist/core/message/response-engine.js +642 -96
  96. package/dist/core/message/send-receipt.js +24 -0
  97. package/dist/core/message/stream-debouncer.js +11 -2
  98. package/dist/core/permission/approval-gateway.js +17 -10
  99. package/dist/core/permission/ec-command-parser.js +101 -46
  100. package/dist/core/permission/tool-policy.js +115 -38
  101. package/dist/core/protected-paths.js +38 -11
  102. package/dist/core/session/session-fs-store.js +44 -3
  103. package/dist/core/session/session-manager.js +86 -8
  104. package/dist/core/session/session-mapper.js +2 -0
  105. package/dist/core/session/session-renew.js +125 -69
  106. package/dist/core/session/session-turn-coordinator.js +5 -1
  107. package/dist/eck/kit-renderer.js +12 -1
  108. package/dist/eck/message-renderer.js +79 -1
  109. package/dist/index.js +285 -94
  110. package/dist/ipc.js +114 -8
  111. package/dist/paths.js +3 -0
  112. package/dist/response-system/config-resolver.js +29 -0
  113. package/dist/response-system/coordinator.js +8 -32
  114. package/dist/response-system/engines/v1/proactive-flow.js +1 -1
  115. package/dist/response-system/index.js +1 -0
  116. package/dist/response-system/modes/single-session/index.js +7 -4
  117. package/dist/stats/billing.js +20 -8
  118. package/dist/trigger/manager.js +3 -0
  119. package/dist/trigger/parser.js +126 -11
  120. package/dist/trigger/patch.js +12 -2
  121. package/dist/trigger/scheduler.js +444 -40
  122. package/dist/trigger/validation.js +13 -0
  123. package/dist/utils/aid-bind.js +43 -29
  124. package/dist/utils/error-dict.json +7 -0
  125. package/dist/utils/evolcore-version.js +21 -0
  126. package/dist/utils/instance-registry.js +14 -7
  127. package/dist/utils/log-writer.js +46 -0
  128. package/dist/utils/logger.js +2 -2
  129. package/dist/utils/media-cache.js +4 -1
  130. package/dist/utils/model-prices.jsonl +6 -3
  131. package/dist/utils/restart-safety.js +31 -0
  132. package/dist/utils/stable-semver.js +21 -0
  133. package/dist/utils/stats.js +33 -9
  134. package/dist/utils/system-memory.js +62 -0
  135. package/kits/docs/INDEX.md +2 -1
  136. package/kits/docs/channels/aun.md +4 -13
  137. package/kits/docs/evolcore/INDEX.md +5 -3
  138. package/kits/docs/evolcore/agent.md +9 -1
  139. package/kits/docs/evolcore/aid.md +5 -2
  140. package/kits/docs/evolcore/config.md +47 -2
  141. package/kits/docs/evolcore/contact.md +61 -0
  142. package/kits/docs/evolcore/fs.md +9 -0
  143. package/kits/docs/evolcore/group-rules.md +46 -4
  144. package/kits/docs/evolcore/group.md +15 -6
  145. package/kits/docs/evolcore/model.md +4 -1
  146. package/kits/docs/evolcore/msg.md +12 -6
  147. package/kits/docs/evolcore/response.md +16 -21
  148. package/kits/docs/evolcore/rpc.md +2 -0
  149. package/kits/docs/evolcore/stats.md +15 -2
  150. package/kits/docs/evolcore/storage.md +1 -0
  151. package/kits/docs/evolcore/trigger.md +42 -10
  152. package/kits/docs/path-registry.md +36 -17
  153. package/kits/eck_manifest.json +12 -0
  154. package/kits/eck_message_manifest.json +12 -1
  155. package/kits/migrations/migrate-contact-book-v2.mjs +754 -0
  156. package/kits/rules/01-overview.md +17 -7
  157. package/kits/rules/02-navigation.md +38 -18
  158. package/kits/rules/03-identity.md +28 -24
  159. package/kits/rules/04-relation.md +44 -28
  160. package/kits/rules/05-venue.md +31 -15
  161. package/kits/rules/06-channel.md +11 -7
  162. package/kits/schemas/_meta.json +21 -7
  163. package/kits/schemas/agent-config.schema.6.json +322 -0
  164. package/kits/schemas/agent-config.schema.7.json +303 -0
  165. package/kits/schemas/agent-config.schema.8.json +304 -0
  166. package/kits/schemas/agent-config.schema.9.json +374 -0
  167. package/kits/schemas/contact-book.schema.2.json +43 -0
  168. package/kits/schemas/contact-book.schema.3.json +67 -0
  169. package/kits/schemas/daemon.schema.1.json +3 -2
  170. package/kits/schemas/daemon.schema.2.json +101 -0
  171. package/kits/schemas/daemon.schema.3.json +123 -0
  172. package/kits/schemas/defaults.schema.2.json +85 -0
  173. package/kits/schemas/defaults.schema.3.json +73 -0
  174. package/kits/schemas/relation-config.schema.5.json +47 -0
  175. package/kits/schemas/relation-config.schema.6.json +46 -0
  176. package/kits/schemas/relation-config.schema.7.json +59 -0
  177. package/kits/schemas/role-config.schema.1.json +1 -0
  178. package/kits/schemas/role-registry.schema.1.json +2 -2
  179. package/kits/schemas/single-session.schema.2.json +57 -0
  180. package/kits/templates/message-fragments/handoff-context-to-target.md +9 -0
  181. package/kits/templates/message-fragments/handoff-request-to-target.md +14 -8
  182. package/kits/templates/message-fragments/handoff-response-to-origin.md +5 -6
  183. package/kits/templates/roles/admin.json +47 -0
  184. package/kits/templates/roles/member.json +5 -0
  185. package/kits/templates/roles/owner.json +1 -0
  186. package/kits/templates/roles/visitor.json +5 -0
  187. package/kits/templates/system-fragments/channel.md +12 -2
  188. package/kits/templates/system-fragments/commands.md +3 -1
  189. package/kits/templates/system-fragments/identity.md +3 -1
  190. package/kits/templates/system-fragments/relation.md +1 -1
  191. package/kits/templates/system-fragments/session.md +6 -2
  192. package/package.json +7 -5
  193. package/MIGRATION-0.5.0.md +0 -378
  194. package/ROLE_ACCESS_CONTROL.md +0 -174
  195. package/assets/brand/evolcore/README.md +0 -19
  196. package/assets/brand/evolcore/evolcore-app-icon.png +0 -0
  197. package/assets/brand/evolcore/evolcore-app-icon.svg +0 -13
  198. package/assets/brand/evolcore/evolcore-brand-board.png +0 -0
  199. package/assets/brand/evolcore/evolcore-brand-board.svg +0 -126
  200. package/assets/brand/evolcore/evolcore-logo-kit.zip +0 -0
  201. package/assets/brand/evolcore/evolcore-logo-reverse.png +0 -0
  202. package/assets/brand/evolcore/evolcore-logo-reverse.svg +0 -14
  203. package/assets/brand/evolcore/evolcore-logo.png +0 -0
  204. package/assets/brand/evolcore/evolcore-logo.svg +0 -14
  205. package/assets/brand/evolcore/evolcore-mark.png +0 -0
  206. package/assets/brand/evolcore/evolcore-mark.svg +0 -10
@@ -0,0 +1,43 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "contact-book.schema.2.json",
4
+ "title": "ContactBook v2 (agents/{aid}/contact.json)",
5
+ "x-logical-name": "contact-book",
6
+ "x-scope": "contact",
7
+ "type": "object",
8
+ "additionalProperties": false,
9
+ "required": ["$schema_version", "contacts"],
10
+ "properties": {
11
+ "$schema_version": { "type": "number", "const": 2, "default": 2, "x-merge": "scalar" },
12
+ "contacts": {
13
+ "type": "object",
14
+ "x-merge": "dict",
15
+ "description": "AID 联系人字典;群和无 AID 对端不进入 Contact Book",
16
+ "propertyNames": {
17
+ "pattern": "^([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?\\.){2,}[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?$"
18
+ },
19
+ "additionalProperties": {
20
+ "type": "object",
21
+ "additionalProperties": false,
22
+ "properties": {
23
+ "displayName": { "type": "string", "description": "显示名" },
24
+ "aliases": {
25
+ "type": "array",
26
+ "description": "跨渠道身份映射,格式 <channelKey>:<urlEncode(peerId)>",
27
+ "items": {
28
+ "type": "string",
29
+ "pattern": "^[A-Za-z0-9_-]+#([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?\\.){2,}[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?#[A-Za-z0-9_-]+:[^:]+$"
30
+ },
31
+ "uniqueItems": true
32
+ },
33
+ "status": {
34
+ "type": "string",
35
+ "enum": ["active", "blocked", "pending"],
36
+ "default": "active",
37
+ "description": "AID 联系状态;blocked 只阻断该 AID 的 AUN 私聊"
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,67 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "contact-book.schema.3.json",
4
+ "title": "ContactBook v3 (agents/{aid}/contact.json)",
5
+ "x-logical-name": "contact-book",
6
+ "x-scope": "contact",
7
+ "type": "object",
8
+ "additionalProperties": false,
9
+ "required": ["$schema_version", "contacts"],
10
+ "properties": {
11
+ "$schema_version": { "type": "number", "const": 3, "default": 3, "x-merge": "scalar" },
12
+ "contacts": {
13
+ "type": "object",
14
+ "x-merge": "dict",
15
+ "description": "AID 联系人字典;群和无 AID 对端不进入 Contact Book",
16
+ "propertyNames": {
17
+ "pattern": "^([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?\\.){2,}[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?$"
18
+ },
19
+ "additionalProperties": {
20
+ "type": "object",
21
+ "additionalProperties": false,
22
+ "properties": {
23
+ "displayName": { "type": "string", "description": "显示名" },
24
+ "aliases": {
25
+ "type": "array",
26
+ "description": "跨渠道身份映射,格式 <channelKey>:<urlEncode(peerId)>",
27
+ "items": {
28
+ "type": "string",
29
+ "pattern": "^[A-Za-z0-9_-]+#([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?\\.){2,}[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?#[A-Za-z0-9_-]+:[^:]+$"
30
+ },
31
+ "uniqueItems": true
32
+ },
33
+ "status": {
34
+ "type": "string",
35
+ "enum": ["active", "blocked", "pending", "declined"],
36
+ "default": "active"
37
+ },
38
+ "pendingRequest": {
39
+ "type": "object",
40
+ "additionalProperties": false,
41
+ "required": ["id", "submittedAt", "expiresAt"],
42
+ "properties": {
43
+ "id": { "type": "string", "pattern": "^creq_[A-Za-z0-9_-]{8,}$" },
44
+ "submittedAt": { "type": "string", "minLength": 1 },
45
+ "expiresAt": { "type": "string", "minLength": 1 }
46
+ }
47
+ },
48
+ "declinedAt": { "type": "string", "minLength": 1 }
49
+ },
50
+ "allOf": [
51
+ {
52
+ "if": { "properties": { "status": { "const": "pending" } }, "required": ["status"] },
53
+ "then": { "required": ["pendingRequest"], "not": { "required": ["declinedAt"] } }
54
+ },
55
+ {
56
+ "if": { "properties": { "status": { "const": "declined" } }, "required": ["status"] },
57
+ "then": { "required": ["declinedAt"], "not": { "required": ["pendingRequest"] } }
58
+ },
59
+ {
60
+ "if": { "properties": { "status": { "enum": ["active", "blocked"] } }, "required": ["status"] },
61
+ "then": { "not": { "anyOf": [{ "required": ["pendingRequest"] }, { "required": ["declinedAt"] }] } }
62
+ }
63
+ ]
64
+ }
65
+ }
66
+ }
67
+ }
@@ -38,10 +38,10 @@
38
38
  },
39
39
  "aun": {
40
40
  "type": "object",
41
- "description": "keystore 加密种子等(值用 ${VAR} 引用)",
41
+ "description": "AUN 进程配置",
42
42
  "x-merge": "dict",
43
43
  "properties": {
44
- "encryptionSeed": { "type": ["string", "null"], "description": "keystore 加密种子(用 ${VAR} 引用,勿明文)" }
44
+ "encryptionSeed": { "type": ["string", "null"], "description": "已废弃兼容字段;EvolCore 固定使用内置值,检测到其他值时拒绝启动并提示联系管理人员" }
45
45
  }
46
46
  },
47
47
  "serviceProxy": {
@@ -66,6 +66,7 @@
66
66
  "properties": {
67
67
  "enabled": { "type": "boolean", "default": true, "description": "是否启用空闲监控" },
68
68
  "timeout": { "type": "number", "default": 120, "description": "空闲超时秒数" },
69
+ "retryAttemptTimeout": { "type": "number", "description": "API 重试尝试连续无事件时的超时秒数;未设置时继承 timeout" },
69
70
  "maxExecutionTime": { "type": "number", "default": 3600, "description": "单个任务总执行时限(秒),等待审批期间仍继续计时" }
70
71
  }
71
72
  },
@@ -0,0 +1,101 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "daemon.schema.2.json",
4
+ "title": "ProcessConfig (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", "default": 2, "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
+ "debug": {
20
+ "type": "object",
21
+ "description": "进程级调试配置",
22
+ "x-merge": "dict",
23
+ "properties": {
24
+ "eckSnapshots": {
25
+ "type": "boolean",
26
+ "default": false,
27
+ "description": "是否写入可能包含敏感上下文的 ECK 旁路调试快照"
28
+ }
29
+ }
30
+ },
31
+ "tunnel": {
32
+ "type": "object",
33
+ "description": "内网穿透配置",
34
+ "x-merge": "dict",
35
+ "properties": {
36
+ "targets": { "type": "array", "description": "穿透目标列表", "items": { "type": "object" } }
37
+ }
38
+ },
39
+ "aun": {
40
+ "type": "object",
41
+ "description": "AUN 进程配置",
42
+ "x-merge": "dict",
43
+ "properties": {
44
+ "encryptionSeed": { "type": ["string", "null"], "description": "已废弃兼容字段;EvolCore 固定使用内置值,检测到其他值时拒绝启动并提示联系管理人员" },
45
+ "minEvolVersion": {
46
+ "type": "string",
47
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$",
48
+ "description": "AUN Menu 允许的最低 Evol 客户端版本;省略时不限制"
49
+ },
50
+ "menuTokenRequired": {
51
+ "type": "boolean",
52
+ "default": false,
53
+ "description": "是否要求普通 AUN Menu 请求携带有效 menu_token;默认 false"
54
+ }
55
+ }
56
+ },
57
+ "serviceProxy": {
58
+ "type": "object",
59
+ "description": "AUN Service Proxy:把一个本地 HTTP/WS 服务暴露到 AUN 网络",
60
+ "x-merge": "dict",
61
+ "properties": {
62
+ "enabled": { "type": "boolean", "description": "是否启用 Service Proxy" },
63
+ "services": { "type": "array", "description": "暴露到 AUN 的本地服务列表", "items": { "type": "object" } }
64
+ }
65
+ },
66
+ "configSnapshots": {
67
+ "type": "boolean",
68
+ "default": true,
69
+ "description": "是否自动维护配置快照、启动日志和自检回落",
70
+ "x-merge": "scalar"
71
+ },
72
+ "idleMonitor": {
73
+ "type": "object",
74
+ "description": "流式输出空闲监控配置",
75
+ "x-merge": "dict",
76
+ "properties": {
77
+ "enabled": { "type": "boolean", "default": true, "description": "是否启用空闲监控" },
78
+ "timeout": { "type": "number", "default": 120, "description": "空闲超时秒数" },
79
+ "retryAttemptTimeout": { "type": "number", "description": "API 重试尝试连续无事件时的超时秒数;未设置时继承 timeout" },
80
+ "maxExecutionTime": { "type": "number", "default": 3600, "description": "单个任务总执行时限(秒),等待审批期间仍继续计时" }
81
+ }
82
+ },
83
+ "ecweb": {
84
+ "type": "object",
85
+ "description": "web 控制台开关/端口",
86
+ "x-merge": "dict",
87
+ "properties": {
88
+ "enabled": { "type": "boolean", "description": "是否启用 web 控制台" },
89
+ "port": { "type": "number", "description": "web 控制台监听端口" }
90
+ }
91
+ },
92
+ "watch": {
93
+ "type": "object",
94
+ "description": "日志监听配置",
95
+ "x-merge": "dict",
96
+ "properties": {
97
+ "logTypes": { "type": "array", "description": "要监听的日志类型", "items": { "type": "string" } }
98
+ }
99
+ }
100
+ }
101
+ }
@@ -0,0 +1,123 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "daemon.schema.3.json",
4
+ "title": "ProcessConfig v3 (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": 3, "default": 3, "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
+ "debug": {
20
+ "type": "object",
21
+ "description": "进程级调试配置;唯一合法来源为 daemon.json,不参与 Agent 覆盖链",
22
+ "x-merge": "dict",
23
+ "additionalProperties": false,
24
+ "properties": {
25
+ "logLevel": {
26
+ "type": "string",
27
+ "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
28
+ "description": "daemon 日志级别"
29
+ },
30
+ "flusherDiag": {
31
+ "type": "boolean",
32
+ "description": "是否启用消息 flusher 诊断"
33
+ },
34
+ "aunTrace": {
35
+ "type": "boolean",
36
+ "description": "是否记录 AUN 协议 trace"
37
+ },
38
+ "aunSdkLog": {
39
+ "type": "boolean",
40
+ "description": "是否启用 AUN SDK 调试日志"
41
+ },
42
+ "upmsg": {
43
+ "type": "boolean",
44
+ "description": "是否向 Agent owner 发送 daemon 上线通知"
45
+ },
46
+ "eckSnapshots": {
47
+ "type": "boolean",
48
+ "default": false,
49
+ "description": "是否写入可能包含敏感上下文的 ECK 旁路调试快照"
50
+ }
51
+ }
52
+ },
53
+ "tunnel": {
54
+ "type": "object",
55
+ "description": "内网穿透配置",
56
+ "x-merge": "dict",
57
+ "properties": {
58
+ "targets": { "type": "array", "description": "穿透目标列表", "items": { "type": "object" } }
59
+ }
60
+ },
61
+ "aun": {
62
+ "type": "object",
63
+ "description": "AUN 进程配置",
64
+ "x-merge": "dict",
65
+ "properties": {
66
+ "encryptionSeed": { "type": ["string", "null"], "description": "已废弃兼容字段;EvolCore 固定使用内置值,检测到其他值时拒绝启动并提示联系管理人员" },
67
+ "minEvolVersion": {
68
+ "type": "string",
69
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$",
70
+ "description": "AUN Menu 允许的最低 Evol 客户端版本;省略时不限制"
71
+ },
72
+ "menuTokenRequired": {
73
+ "type": "boolean",
74
+ "default": false,
75
+ "description": "是否要求普通 AUN Menu 请求携带有效 menu_token;默认 false"
76
+ }
77
+ }
78
+ },
79
+ "serviceProxy": {
80
+ "type": "object",
81
+ "description": "AUN Service Proxy:把一个本地 HTTP/WS 服务暴露到 AUN 网络",
82
+ "x-merge": "dict",
83
+ "properties": {
84
+ "enabled": { "type": "boolean", "description": "是否启用 Service Proxy" },
85
+ "services": { "type": "array", "description": "暴露到 AUN 的本地服务列表", "items": { "type": "object" } }
86
+ }
87
+ },
88
+ "configSnapshots": {
89
+ "type": "boolean",
90
+ "default": true,
91
+ "description": "是否自动维护配置快照、启动日志和自检回落",
92
+ "x-merge": "scalar"
93
+ },
94
+ "idleMonitor": {
95
+ "type": "object",
96
+ "description": "流式输出空闲监控配置",
97
+ "x-merge": "dict",
98
+ "properties": {
99
+ "enabled": { "type": "boolean", "default": true, "description": "是否启用空闲监控" },
100
+ "timeout": { "type": "number", "default": 120, "description": "空闲超时秒数" },
101
+ "retryAttemptTimeout": { "type": "number", "description": "API 重试尝试连续无事件时的超时秒数;未设置时继承 timeout" },
102
+ "maxExecutionTime": { "type": "number", "default": 3600, "description": "单个任务总执行时限(秒),等待审批期间仍继续计时" }
103
+ }
104
+ },
105
+ "ecweb": {
106
+ "type": "object",
107
+ "description": "web 控制台开关/端口",
108
+ "x-merge": "dict",
109
+ "properties": {
110
+ "enabled": { "type": "boolean", "description": "是否启用 web 控制台" },
111
+ "port": { "type": "number", "description": "web 控制台监听端口" }
112
+ }
113
+ },
114
+ "watch": {
115
+ "type": "object",
116
+ "description": "日志监听配置",
117
+ "x-merge": "dict",
118
+ "properties": {
119
+ "logTypes": { "type": "array", "description": "要监听的日志类型", "items": { "type": "string" } }
120
+ }
121
+ }
122
+ }
123
+ }
@@ -0,0 +1,85 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "defaults.schema.2.json",
4
+ "title": "DefaultsConfig v2 (agents/defaults.json)",
5
+ "description": "全局默认配置。覆盖链最低层。",
6
+ "x-logical-name": "defaults",
7
+ "x-scope": "defaults",
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "$schema_version": { "type": "number", "const": 2, "default": 2, "x-merge": "scalar" },
12
+ "models": {
13
+ "type": "object",
14
+ "description": "模型配置",
15
+ "x-merge": "dict",
16
+ "properties": {
17
+ "default": { "type": "string", "description": "全局默认模型" },
18
+ "allowed": {
19
+ "type": "array",
20
+ "items": { "type": "string" },
21
+ "description": "全局模型白名单"
22
+ }
23
+ }
24
+ },
25
+ "active_baseagent": {
26
+ "type": "string",
27
+ "description": "当前活跃的 base agent(claude/codex/gemini)。暂存于此,待权限体系实现后迁移。",
28
+ "x-merge": "scalar"
29
+ },
30
+ "baseagents": {
31
+ "type": "object",
32
+ "description": "各 base agent 配置(model/effort/apiKey/baseUrl 等)。暂存于此,待权限体系实现后迁移。",
33
+ "x-merge": "dict"
34
+ },
35
+ "projects": {
36
+ "type": "object",
37
+ "description": "项目路径配置",
38
+ "x-merge": "dict",
39
+ "properties": {
40
+ "rootPath": { "type": "string", "description": "全局项目根路径" },
41
+ "defaultPath": { "type": "string", "description": "全局默认项目路径" }
42
+ }
43
+ },
44
+ "aun": {
45
+ "type": "object",
46
+ "description": "全局 AUN 配置",
47
+ "x-merge": "dict",
48
+ "properties": {
49
+ "keystorePath": { "type": "string" },
50
+ "encryptionSeed": { "type": "string" },
51
+ "gatewayUrl": { "type": "string" }
52
+ }
53
+ },
54
+ "debug": {
55
+ "type": "object",
56
+ "description": "全局调试配置",
57
+ "x-merge": "dict",
58
+ "properties": {
59
+ "logLevel": { "type": "string", "enum": ["DEBUG", "INFO", "WARN", "ERROR"], "description": "日志级别", "x-enumDescriptions": { "DEBUG": "调试:最详细", "INFO": "信息:常规运行日志", "WARN": "警告:仅警告及以上", "ERROR": "错误:仅错误" } },
60
+ "flusherDiag": { "type": "boolean" },
61
+ "aunTrace": { "type": "boolean" },
62
+ "aunSdkLog": { "type": "boolean" },
63
+ "upmsg": { "type": "boolean" }
64
+ }
65
+ },
66
+ "responseMode": { "type": "string", "x-merge": "scalar" },
67
+ "responseModeParams": {
68
+ "type": "object",
69
+ "x-merge": "dict",
70
+ "description": "响应模式特有参数的全局默认字典,按模式 id 分桶:{ [modeId]: {...} }"
71
+ },
72
+ "config": { "type": "object", "x-merge": "dict" },
73
+ "session_renew": {
74
+ "type": "object",
75
+ "description": "会话超时后的续接判定策略,默认关闭",
76
+ "x-merge": "dict",
77
+ "additionalProperties": false,
78
+ "properties": {
79
+ "enabled": { "type": "boolean", "default": false, "description": "是否启用超时后的会话连续性判定" },
80
+ "after_hours": { "type": "number", "exclusiveMinimum": 0, "default": 24, "description": "距最后一条有效对话超过该小时数才触发判定" },
81
+ "fallback_action": { "type": "string", "enum": ["continue", "new"], "default": "continue", "description": "无法判定时的兜底动作", "x-enumDescriptions": { "continue": "继续沿用当前会话", "new": "开启新会话" } }
82
+ }
83
+ }
84
+ }
85
+ }
@@ -0,0 +1,73 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "defaults.schema.3.json",
4
+ "title": "DefaultsConfig v3 (agents/defaults.json)",
5
+ "description": "全局默认配置。覆盖链最低层;进程级 debug 仅允许配置在 daemon.json。",
6
+ "x-logical-name": "defaults",
7
+ "x-scope": "defaults",
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "$schema_version": { "type": "number", "const": 3, "default": 3, "x-merge": "scalar" },
12
+ "models": {
13
+ "type": "object",
14
+ "description": "模型配置",
15
+ "x-merge": "dict",
16
+ "properties": {
17
+ "default": { "type": "string", "description": "全局默认模型" },
18
+ "allowed": {
19
+ "type": "array",
20
+ "items": { "type": "string" },
21
+ "description": "全局模型白名单"
22
+ }
23
+ }
24
+ },
25
+ "active_baseagent": {
26
+ "type": "string",
27
+ "description": "当前活跃的 base agent(claude/codex/gemini)。暂存于此,待权限体系实现后迁移。",
28
+ "x-merge": "scalar"
29
+ },
30
+ "baseagents": {
31
+ "type": "object",
32
+ "description": "各 base agent 配置(model/effort/apiKey/baseUrl 等)。暂存于此,待权限体系实现后迁移。",
33
+ "x-merge": "dict"
34
+ },
35
+ "projects": {
36
+ "type": "object",
37
+ "description": "项目路径配置",
38
+ "x-merge": "dict",
39
+ "properties": {
40
+ "rootPath": { "type": "string", "description": "全局项目根路径" },
41
+ "defaultPath": { "type": "string", "description": "全局默认项目路径" }
42
+ }
43
+ },
44
+ "aun": {
45
+ "type": "object",
46
+ "description": "全局 AUN 配置",
47
+ "x-merge": "dict",
48
+ "properties": {
49
+ "keystorePath": { "type": "string" },
50
+ "encryptionSeed": { "type": "string" },
51
+ "gatewayUrl": { "type": "string" }
52
+ }
53
+ },
54
+ "responseMode": { "type": "string", "x-merge": "scalar" },
55
+ "responseModeParams": {
56
+ "type": "object",
57
+ "x-merge": "dict",
58
+ "description": "响应模式特有参数的全局默认字典,按模式 id 分桶:{ [modeId]: {...} }"
59
+ },
60
+ "config": { "type": "object", "x-merge": "dict" },
61
+ "session_renew": {
62
+ "type": "object",
63
+ "description": "会话超时后的续接判定策略,默认关闭",
64
+ "x-merge": "dict",
65
+ "additionalProperties": false,
66
+ "properties": {
67
+ "enabled": { "type": "boolean", "default": false, "description": "是否启用超时后的会话连续性判定" },
68
+ "after_hours": { "type": "number", "exclusiveMinimum": 0, "default": 24, "description": "距最后一条有效对话超过该小时数才触发判定" },
69
+ "fallback_action": { "type": "string", "enum": ["continue", "new"], "default": "continue", "description": "无法判定时的兜底动作", "x-enumDescriptions": { "continue": "继续沿用当前会话", "new": "开启新会话" } }
70
+ }
71
+ }
72
+ }
73
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "relation-config.schema.5.json",
4
+ "title": "RelationConfig v5 (agents/{aid}/relations/{peerKey}/config.json)",
5
+ "x-logical-name": "relation-config",
6
+ "x-scope": "relation",
7
+ "type": "object",
8
+ "additionalProperties": true,
9
+ "not": {
10
+ "anyOf": [
11
+ { "required": ["permissionMode"] },
12
+ { "required": ["roles"] }
13
+ ]
14
+ },
15
+ "properties": {
16
+ "$schema_version": { "type": "number", "const": 5, "default": 5, "x-merge": "scalar" },
17
+ "targetKind": { "type": "string", "enum": ["private", "group"], "x-merge": "scalar" },
18
+ "role": { "type": ["string", "null"], "pattern": "^(?!owner$)[a-z0-9_-]+$", "x-merge": "scalar", "description": "关系角色;允许 admin/member/visitor/自定义角色,禁止 owner" },
19
+ "active_baseagent": { "type": "string", "x-merge": "scalar" },
20
+ "models": { "type": "object", "x-merge": "dict" },
21
+ "baseagents": { "type": "object", "x-merge": "dict" },
22
+ "chatmode": { "type": "object", "x-merge": "dict", "properties": { "private": { "enum": ["interactive", "proactive"] }, "group": { "enum": ["interactive", "proactive"] }, "nothuman": { "enum": ["interactive", "proactive"] } }, "additionalProperties": false },
23
+ "mentionMode": { "type": "string", "enum": ["disabled", "mention-only"], "x-merge": "scalar" },
24
+ "model": { "type": "string", "x-merge": "scalar" },
25
+ "responseMode": { "type": "string", "x-merge": "scalar" },
26
+ "responseModeParams": { "type": "object", "x-merge": "dict" },
27
+ "flush_delay": { "type": "number", "x-merge": "scalar" },
28
+ "debounce": { "type": "number", "x-merge": "scalar" },
29
+ "show_activities": { "type": "string", "enum": ["all", "text", "none"], "x-merge": "scalar" },
30
+ "enable_rich_content": { "type": "boolean", "x-merge": "scalar" },
31
+ "session_renew": {
32
+ "type": "object",
33
+ "x-merge": "dict",
34
+ "additionalProperties": false,
35
+ "properties": {
36
+ "enabled": { "type": "boolean" },
37
+ "after_hours": { "type": "number", "exclusiveMinimum": 0 },
38
+ "effort": { "type": "string", "enum": ["low", "medium", "high", "xhigh", "max"] },
39
+ "fallback_action": { "type": "string", "enum": ["continue", "new"] }
40
+ }
41
+ },
42
+ "group_venue_sync": { "type": "object", "x-merge": "dict" },
43
+ "render": { "type": "object", "x-merge": "dict" },
44
+ "sessionManifests": { "type": "object", "x-merge": "dict" },
45
+ "extra_backup": { "type": "array", "items": { "type": "object" }, "x-merge": "list" }
46
+ }
47
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "relation-config.schema.6.json",
4
+ "title": "RelationConfig v6 (agents/{aid}/relations/{peerKey}/config.json)",
5
+ "x-logical-name": "relation-config",
6
+ "x-scope": "relation",
7
+ "type": "object",
8
+ "additionalProperties": true,
9
+ "not": {
10
+ "anyOf": [
11
+ { "required": ["permissionMode"] },
12
+ { "required": ["roles"] }
13
+ ]
14
+ },
15
+ "properties": {
16
+ "$schema_version": { "type": "number", "const": 6, "default": 6, "x-merge": "scalar" },
17
+ "targetKind": { "type": "string", "enum": ["private", "group"], "x-merge": "scalar" },
18
+ "role": { "type": ["string", "null"], "pattern": "^(?!owner$)[a-z0-9_-]+$", "x-merge": "scalar", "description": "关系角色;允许 admin/member/visitor/自定义角色,禁止 owner" },
19
+ "active_baseagent": { "type": "string", "x-merge": "scalar" },
20
+ "models": { "type": "object", "x-merge": "dict" },
21
+ "baseagents": { "type": "object", "x-merge": "dict" },
22
+ "chatmode": { "type": "object", "x-merge": "dict", "properties": { "private": { "enum": ["interactive", "proactive"] }, "group": { "enum": ["interactive", "proactive"] }, "nothuman": { "enum": ["interactive", "proactive"] } }, "additionalProperties": false },
23
+ "mentionMode": { "type": "string", "enum": ["disabled", "mention-only"], "x-merge": "scalar" },
24
+ "model": { "type": "string", "x-merge": "scalar" },
25
+ "responseMode": { "type": "string", "x-merge": "scalar" },
26
+ "responseModeParams": { "type": "object", "x-merge": "dict" },
27
+ "flush_delay": { "type": "number", "x-merge": "scalar" },
28
+ "debounce": { "type": "number", "x-merge": "scalar" },
29
+ "show_activities": { "type": "string", "enum": ["all", "text", "none"], "x-merge": "scalar" },
30
+ "enable_rich_content": { "type": "boolean", "x-merge": "scalar" },
31
+ "session_renew": {
32
+ "type": "object",
33
+ "x-merge": "dict",
34
+ "additionalProperties": false,
35
+ "properties": {
36
+ "enabled": { "type": "boolean" },
37
+ "after_hours": { "type": "number", "exclusiveMinimum": 0 },
38
+ "fallback_action": { "type": "string", "enum": ["continue", "new"] }
39
+ }
40
+ },
41
+ "group_venue_sync": { "type": "object", "x-merge": "dict" },
42
+ "render": { "type": "object", "x-merge": "dict" },
43
+ "sessionManifests": { "type": "object", "x-merge": "dict" },
44
+ "extra_backup": { "type": "array", "items": { "type": "object" }, "x-merge": "list" }
45
+ }
46
+ }