evolcore 0.0.48 → 0.0.50

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 (302) hide show
  1. package/CHANGELOG.md +97 -0
  2. package/bin/ecmsg.js +9 -4
  3. package/dist/ability/caller/authorization.js +21 -0
  4. package/dist/ability/caller/command.js +164 -0
  5. package/dist/ability/caller/contract.js +102 -0
  6. package/dist/ability/caller/daemon.js +158 -0
  7. package/dist/ability/caller/service.js +380 -0
  8. package/dist/ability/command-contract.js +5 -0
  9. package/dist/ability/daemon.js +5 -1
  10. package/dist/ability/interop-v1.js +10 -3
  11. package/dist/ability/management.js +1 -0
  12. package/dist/agent-template/jobs.js +173 -1
  13. package/dist/agent-template/runtime.js +285 -8
  14. package/dist/agent-template/service.js +1159 -40
  15. package/dist/agent-template/types.js +2 -1
  16. package/dist/agents/baseagent-availability.js +27 -3
  17. package/dist/agents/baseagent-capability-adapter.js +102 -0
  18. package/dist/agents/baseagent-plugin-descriptor.js +274 -0
  19. package/dist/agents/baseagent-plugin-loader.js +145 -0
  20. package/dist/agents/baseagent.js +68 -2
  21. package/dist/agents/claude-gateway/agent-registration.js +389 -0
  22. package/dist/agents/claude-gateway/binding.js +96 -0
  23. package/dist/agents/claude-gateway/inbox.js +138 -0
  24. package/dist/agents/claude-gateway/index.js +125 -0
  25. package/dist/agents/claude-gateway/listing.js +330 -0
  26. package/dist/agents/claude-gateway/router.js +328 -0
  27. package/dist/agents/claude-gateway/sessions.js +128 -0
  28. package/dist/agents/claude-gateway/terminal.js +250 -0
  29. package/dist/agents/claude-gateway/transcript.js +272 -0
  30. package/dist/agents/claude-gateway/types.js +14 -0
  31. package/dist/agents/claude-runner.js +6 -10
  32. package/dist/agents/codex-runner.js +9 -2
  33. package/dist/agents/{gemini-runner.js → gemini/gemini-runner.js} +17 -17
  34. package/dist/{core/session/adapters → agents/gemini}/gemini-session-file-adapter.js +2 -2
  35. package/dist/agents/gemini/index.js +51 -0
  36. package/dist/aun/aid/control-aid.js +52 -32
  37. package/dist/aun/group/invite-service.js +6 -36
  38. package/dist/aun/group/operations.js +6 -0
  39. package/dist/aun/msg/mention-schema.js +1 -1
  40. package/dist/aun/msg/p2p.js +31 -2
  41. package/dist/aun/msg/upload.js +126 -3
  42. package/dist/build-identity.json +1 -1
  43. package/dist/channels/aun.js +1175 -457
  44. package/dist/cli/ability-command.js +42 -0
  45. package/dist/cli/agent-command.js +20 -1
  46. package/dist/cli/agent-create.js +78 -18
  47. package/dist/cli/agent-template.js +5 -3
  48. package/dist/cli/agent.js +91 -0
  49. package/dist/cli/aun-commands.js +92 -34
  50. package/dist/cli/bench.js +5 -2
  51. package/dist/cli/config.js +22 -6
  52. package/dist/cli/daemon-commands.js +245 -101
  53. package/dist/cli/directory.js +6 -1
  54. package/dist/cli/ecmsg-gateway.js +11 -9
  55. package/dist/cli/index.js +30 -5
  56. package/dist/cli/init.js +39 -63
  57. package/dist/cli/managed-command-guard.js +3 -0
  58. package/dist/cli/menu-client.js +32 -7
  59. package/dist/cli/model.js +20 -5
  60. package/dist/cli/pay-command.js +30 -0
  61. package/dist/cli/provider-command.js +6 -2
  62. package/dist/cli/quota.js +89 -0
  63. package/dist/cli/restart-monitor.js +2 -2
  64. package/dist/cli/role.js +1 -0
  65. package/dist/cli/services-command.js +12 -9
  66. package/dist/cli/team-workspace-command.js +56 -2
  67. package/dist/cli/thread-command.js +78 -12
  68. package/dist/config/access-policy.js +16 -3
  69. package/dist/config/config-field-policy.js +88 -9
  70. package/dist/config/config-manager.js +97 -47
  71. package/dist/config/config-operation-service.js +22 -1
  72. package/dist/config/gateway-config.js +9 -8
  73. package/dist/config/owner-config.js +0 -16
  74. package/dist/config/peer-role-resolver.js +1 -7
  75. package/dist/config/providers-config.js +107 -20
  76. package/dist/config/providers-management.js +45 -21
  77. package/dist/config/resolved-config-op.js +4 -44
  78. package/dist/config/schema-migration.js +78 -5
  79. package/dist/config/schema-registry.js +52 -7
  80. package/dist/config-store.js +1309 -17
  81. package/dist/core/agent-application-service.js +220 -1
  82. package/dist/core/agent-ipc-registration.js +19 -2
  83. package/dist/core/agent-reload-coordinator.js +5 -0
  84. package/dist/core/agent-runtime.js +198 -54
  85. package/dist/core/auth/agent-delegation.js +14 -0
  86. package/dist/core/auth/delegation-authorization.js +33 -26
  87. package/dist/core/auth/operation-authorizer.js +16 -1
  88. package/dist/core/auth/operation-catalog.js +59 -7
  89. package/dist/core/baseagent-loader.js +30 -3
  90. package/dist/core/capability/capability-manager.js +16 -7
  91. package/dist/core/channel-runtime.js +4 -2
  92. package/dist/core/command/agent-control.js +20 -2
  93. package/dist/core/command/agent-template-menu.js +4 -3
  94. package/dist/core/command/cli-intent-parser.js +28 -0
  95. package/dist/core/command/command-handler.js +45 -2
  96. package/dist/core/command/menu-catalog.js +20 -4
  97. package/dist/core/command/menu-file-path.js +70 -0
  98. package/dist/core/command/menu-handler.js +97 -73
  99. package/dist/core/command/menu-protocol.js +29 -0
  100. package/dist/core/command/menu-query-batch.js +2 -2
  101. package/dist/core/command/private-mention-menu.js +71 -0
  102. package/dist/core/command/remote-shell.js +565 -0
  103. package/dist/core/command/slash-handler.js +17 -26
  104. package/dist/core/command/team-workspace-bootstrap.js +2 -1
  105. package/dist/core/command/topic-slash.js +7 -1
  106. package/dist/core/daemon-bootstrap.js +0 -4
  107. package/dist/core/daemon-control.js +58 -1
  108. package/dist/core/daemon-lifecycle.js +29 -7
  109. package/dist/core/evolagent-registry.js +18 -9
  110. package/dist/core/handoff/runtime.js +1 -1
  111. package/dist/core/host-snapshot.js +8 -3
  112. package/dist/core/initialization/service.js +3 -0
  113. package/dist/core/interaction-router.js +130 -0
  114. package/dist/core/ipc-registration.js +5 -0
  115. package/dist/core/memory/consolidation-context.js +2 -1
  116. package/dist/core/memory/consolidation.js +35 -64
  117. package/dist/core/message/aun-ipc-sender.js +213 -74
  118. package/dist/core/message/aun-request-registry.js +31 -0
  119. package/dist/core/message/contact-admission.js +91 -6
  120. package/dist/core/message/contact-pending-inbound.js +113 -0
  121. package/dist/core/message/contact-thread-approval.js +212 -0
  122. package/dist/core/message/im-renderer.js +40 -1
  123. package/dist/core/message/message-admission.js +5 -39
  124. package/dist/core/message/message-bridge.js +197 -45
  125. package/dist/core/message/message-log.js +32 -0
  126. package/dist/core/message/message-queue.js +102 -18
  127. package/dist/core/message/peer-mode.js +15 -4
  128. package/dist/core/message/response-engine.js +174 -26
  129. package/dist/core/message/send-options.js +37 -3
  130. package/dist/core/message/send-routing.js +11 -7
  131. package/dist/core/model/config-scope.js +6 -14
  132. package/dist/core/model/model-catalog.js +5 -5
  133. package/dist/core/model/model-diagnostics.js +19 -0
  134. package/dist/core/model/model-fallback.js +13 -2
  135. package/dist/core/ownership/owner-resolver.js +12 -86
  136. package/dist/core/pack-auth.js +7 -0
  137. package/dist/core/pack-install.js +1 -1
  138. package/dist/core/permission/ec-command-parser.js +288 -77
  139. package/dist/core/permission/protected-paths.js +64 -9
  140. package/dist/core/permission/services-path-acl.js +458 -0
  141. package/dist/core/permission/tool-policy.js +26 -10
  142. package/dist/core/relation/peer-identity.js +13 -0
  143. package/dist/core/session/adapters/claude-session-file-adapter.js +6 -2
  144. package/dist/core/session/adapters/codex-session-file-adapter.js +4 -0
  145. package/dist/core/session/session-manager.js +47 -10
  146. package/dist/core/session/session-mapper.js +16 -0
  147. package/dist/core/skill/index-generator.js +2 -3
  148. package/dist/core/skill/switch-resolver.js +3 -0
  149. package/dist/core/task/task-recovery-service.js +1 -0
  150. package/dist/core/thread/command-parser.js +4 -1
  151. package/dist/core/thread/ipc-operation.js +4 -2
  152. package/dist/core/thread/thread-operation.js +25 -10
  153. package/dist/core/thread/thread-service.js +294 -55
  154. package/dist/core/thread/topic-id.js +67 -2
  155. package/dist/core/thread/types.js +15 -1
  156. package/dist/directory/owner-directory-admission.js +11 -8
  157. package/dist/directory/owner-directory-cache.js +19 -0
  158. package/dist/directory/owner-directory-markdown.js +1 -1
  159. package/dist/directory/owner-directory-policy.js +5 -30
  160. package/dist/directory/owner-directory-request-operation.js +5 -2
  161. package/dist/eck/kit-renderer.js +3 -2
  162. package/dist/eck/message-renderer.js +28 -5
  163. package/dist/ecweb/basic-settings-service.js +5 -9
  164. package/dist/ecweb/providers-service.js +4 -2
  165. package/dist/ecweb/runtime/supervisor.js +36 -8
  166. package/dist/event-center/center-config.js +9 -5
  167. package/dist/event-center/dispatcher.js +10 -1
  168. package/dist/event-center/ipc-operation.js +19 -0
  169. package/dist/event-center/registry.js +20 -5
  170. package/dist/event-center/runtime.js +10 -7
  171. package/dist/index.js +120 -41
  172. package/dist/ipc.js +83 -3
  173. package/dist/outputs/authorization.js +16 -0
  174. package/dist/outputs/cards.js +336 -0
  175. package/dist/outputs/events.js +3 -2
  176. package/dist/outputs/protocol.js +1 -0
  177. package/dist/outputs/service.js +2 -15
  178. package/dist/paths.js +48 -1
  179. package/dist/pay/command.js +38 -0
  180. package/dist/pay/protocol.js +136 -0
  181. package/dist/pay/runtime.js +188 -0
  182. package/dist/pay/service.js +384 -0
  183. package/dist/pay/store.js +81 -0
  184. package/dist/response-system/engines/v1/proactive-flow.js +29 -2
  185. package/dist/services/dispatcher.js +23 -5
  186. package/dist/services/host/main.js +388 -0
  187. package/dist/services/host/protocol.js +118 -0
  188. package/dist/services/host/resident.js +310 -0
  189. package/dist/services/host-client.js +386 -0
  190. package/dist/services/host-deploy.js +180 -0
  191. package/dist/services/host-launch.js +117 -0
  192. package/dist/services/host-recycle.js +203 -0
  193. package/dist/services/host-runtime.js +802 -0
  194. package/dist/services/idempotency.js +44 -86
  195. package/dist/services/index-generator.js +4 -3
  196. package/dist/services/index.js +204 -22
  197. package/dist/services/ipc-operation.js +288 -44
  198. package/dist/services/pack-manager.js +1 -0
  199. package/dist/services/script-runner.js +515 -83
  200. package/dist/services/service-payload.js +13 -7
  201. package/dist/services/validation.js +109 -4
  202. package/dist/stats/budget.js +1 -1
  203. package/dist/stats/model-resolver.js +2 -2
  204. package/dist/stats/quota-query.js +95 -0
  205. package/dist/trigger/application-service.js +6 -4
  206. package/dist/trigger/local-files.js +19 -9
  207. package/dist/trigger/scheduler.js +22 -12
  208. package/dist/trigger/script-sandbox.js +51 -8
  209. package/dist/utils/aid-bind.js +3 -0
  210. package/dist/utils/atomic-write.js +22 -8
  211. package/dist/utils/evolcore-version.js +2 -2
  212. package/dist/utils/host-info.js +173 -1
  213. package/dist/utils/logger.js +2 -2
  214. package/dist/utils/media-cache.js +190 -43
  215. package/dist/utils/npm-ops.js +43 -8
  216. package/dist/utils/restart-safety.js +14 -1
  217. package/dist/utils/system-memory.js +113 -25
  218. package/dist/utils/systemd-lifecycle.js +154 -0
  219. package/dist/utils/windows-shell-trust.js +7 -3
  220. package/dist/workbench/service.js +1 -1
  221. package/kits/docs/INDEX.md +3 -2
  222. package/kits/docs/aun/AUN/346/266/210/346/201/257/347/261/273/345/236/213/344/270/216/345/261/236/346/200/247.md +1 -0
  223. package/kits/docs/channels/aun.md +1 -1
  224. package/kits/docs/evolcore/INDEX.md +9 -6
  225. package/kits/docs/evolcore/agent.md +36 -1
  226. package/kits/docs/evolcore/aid.md +45 -3
  227. package/kits/docs/evolcore/config.md +5 -2
  228. package/kits/docs/evolcore/directory.md +8 -9
  229. package/kits/docs/evolcore/group.md +2 -1
  230. package/kits/docs/evolcore/memory-tags.md +2 -0
  231. package/kits/docs/evolcore/menu-client.md +3 -3
  232. package/kits/docs/evolcore/menu-protocol.md +7 -0
  233. package/kits/docs/evolcore/model.md +3 -0
  234. package/kits/docs/evolcore/msg.md +77 -10
  235. package/kits/docs/evolcore/pay.md +34 -0
  236. package/kits/docs/evolcore/provider.md +22 -1
  237. package/kits/docs/evolcore/quota.md +54 -0
  238. package/kits/docs/evolcore/role.md +3 -0
  239. package/kits/docs/evolcore/services.md +46 -18
  240. package/kits/docs/evolcore/stats.md +2 -0
  241. package/kits/docs/evolcore/thread-chain.md +2 -0
  242. package/kits/docs/evolcore/tool-authorization.md +10 -0
  243. package/kits/docs/evolcore/trigger.md +2 -0
  244. package/kits/rules/01-overview.md +11 -32
  245. package/kits/rules/02-navigation.md +7 -0
  246. package/kits/rules/06-channel.md +3 -3
  247. package/kits/schemas/_meta.json +38 -5
  248. package/kits/schemas/agent-config.schema.20.json +24 -0
  249. package/kits/schemas/agent-config.schema.21.json +974 -0
  250. package/kits/schemas/agent-config.schema.22.json +977 -0
  251. package/kits/schemas/agent-config.schema.23.json +958 -0
  252. package/kits/schemas/daemon.schema.10.json +373 -0
  253. package/kits/schemas/daemon.schema.9.json +12 -0
  254. package/kits/schemas/defaults.schema.7.json +472 -0
  255. package/kits/schemas/providers.schema.3.json +18 -2
  256. package/kits/schemas/relation-config.schema.13.json +289 -0
  257. package/kits/skills/.switches.json +17 -1
  258. package/kits/skills/ability/SKILL.md +229 -34
  259. package/kits/skills/ability/STRUCTURE.md +333 -0
  260. package/kits/skills/ability/references/cli.md +208 -0
  261. package/kits/skills/ability/references/development.md +107 -37
  262. package/kits/skills/ability/references/management.md +106 -46
  263. package/kits/skills/ability/references/runtime-protocol.md +65 -63
  264. package/kits/skills/agent-output-cards/SKILL.md +64 -0
  265. package/kits/skills/ec-group/SKILL.md +8 -6
  266. package/kits/skills/ec-group/TASK.md +186 -0
  267. package/kits/skills/ec-group/WORKLOG.md +180 -0
  268. package/kits/skills/ec-group-collaboration/SKILL.md +3 -3
  269. package/kits/skills/ec-pay/SKILL.md +101 -0
  270. package/kits/skills/ec-pay/references/pay-cli.md +110 -0
  271. package/kits/skills/ec-provider/SKILL.md +58 -9
  272. package/kits/skills/{ec-service-proxy → ec-proxy}/SKILL.md +8 -5
  273. package/kits/skills/ec-service-call/SKILL.md +135 -0
  274. package/kits/skills/ec-service-pack/SKILL.md +277 -0
  275. package/kits/skills/ec-trigger/SKILL.md +1 -1
  276. package/kits/templates/memory-consolidation/notes.md +2 -2
  277. package/kits/templates/memory-consolidation/workflow.md +46 -0
  278. package/kits/templates/roles/visitor.json +1 -0
  279. package/kits/templates/system-fragments/channel.md +13 -4
  280. package/kits/templates/system-fragments/commands.md +5 -3
  281. package/kits/templates/system-fragments/directory-contacts.md +3 -4
  282. package/kits/templates/system-fragments/reply.md +1 -0
  283. package/kits/templates/system-fragments/session.md +1 -1
  284. package/kits/templates/system-fragments/thread.md +27 -128
  285. package/kits/templates/system-fragments/venue.md +27 -0
  286. package/package.json +4 -5
  287. package/scripts/agent-template/inspect.mjs +79 -29
  288. package/scripts/agent-template/overlay.mjs +20 -2
  289. package/scripts/agent-template/shared/common.mjs +24 -6
  290. package/scripts/agent-template/shared/team-schema.json +23 -5
  291. package/scripts/agent-template/shared/template-contract.mjs +107 -17
  292. package/scripts/agent-template/shared/template-package.mjs +254 -29
  293. package/scripts/agent-template/shared/template-runtime.mjs +145 -2
  294. package/scripts/agent-template/shared/template.mjs +67 -9
  295. package/scripts/agent-template/team-pack.mjs +132 -41
  296. package/scripts/agent-template/team-preview.mjs +249 -5
  297. package/kits/docs/aun/ABILITY_CALLING.md +0 -280
  298. package/kits/docs/evolcore/ability.md +0 -185
  299. package/kits/skills/ability/references/calling.md +0 -56
  300. package/kits/skills/ability/references/contract-checklist.md +0 -37
  301. package/kits/skills/ability/references/recovery.md +0 -27
  302. /package/dist/{core/capability/providers → agents/gemini}/gemini-capability-provider.js +0 -0
@@ -0,0 +1,958 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "agent-config.schema.23.json",
4
+ "title": "AgentConfig v23 (agents/{aid}/config.json)",
5
+ "description": "允许已发现的随包 baseagent 插件;插件字段由描述符 Schema 验证;默认值仅挂最低声明层。",
6
+ "x-logical-name": "agent-config",
7
+ "x-scope": "agent",
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "not": {
11
+ "description": "禁止旧权限字段和已迁移到 relation role 的 admins。",
12
+ "anyOf": [
13
+ {
14
+ "description": "禁止旧版顶层 permissionMode;权限模式由独立角色策略决定。",
15
+ "required": [
16
+ "permissionMode"
17
+ ]
18
+ },
19
+ {
20
+ "description": "禁止旧版内嵌 roles;角色定义和默认角色已迁移到独立 roles/ 配置域。",
21
+ "required": [
22
+ "roles"
23
+ ]
24
+ },
25
+ {
26
+ "description": "admin 关系身份由 AUN 私聊 relation role 管理。",
27
+ "required": [
28
+ "admins"
29
+ ]
30
+ },
31
+ {
32
+ "description": "debug 是 daemon 进程级配置,不进入 Agent 覆盖链。",
33
+ "required": [
34
+ "debug"
35
+ ]
36
+ }
37
+ ]
38
+ },
39
+ "required": [
40
+ "aid",
41
+ "channels"
42
+ ],
43
+ "properties": {
44
+ "$schema_version": {
45
+ "type": "number",
46
+ "const": 23,
47
+ "default": 23,
48
+ "x-merge": "scalar",
49
+ "description": "当前 Schema 版本号。v23 删除顶层 owner/owners,Owner 仅由 ownership 协议授予"
50
+ },
51
+ "aid": {
52
+ "type": "string",
53
+ "x-merge": "scalar",
54
+ "description": "Agent 的全局唯一身份标识"
55
+ },
56
+ "version": {
57
+ "type": "string",
58
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$",
59
+ "x-merge": "scalar",
60
+ "description": "作者显式声明的成员版本;实际已提交的安装版本从可信安装锁读取"
61
+ },
62
+ "update": {
63
+ "type": "object",
64
+ "additionalProperties": false,
65
+ "required": ["mode"],
66
+ "x-merge": "scalar",
67
+ "properties": {
68
+ "mode": {
69
+ "type": "string",
70
+ "enum": ["auto", "manual", "disabled"],
71
+ "x-merge": "scalar",
72
+ "description": "本地升级策略;auto 本期仅检查提醒,不自动执行"
73
+ },
74
+ "publisher": {
75
+ "type": "string",
76
+ "pattern": "^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\\.[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?){2,}$",
77
+ "x-merge": "scalar",
78
+ "description": "作者声明,不替代经验证安装来源"
79
+ }
80
+ }
81
+ },
82
+ "enabled": {
83
+ "type": "boolean",
84
+ "default": true,
85
+ "x-merge": "scalar",
86
+ "description": "是否启用 Agent;缺省按启用处理"
87
+ },
88
+ "lifecycle": {
89
+ "type": "string",
90
+ "default": "active",
91
+ "enum": [
92
+ "created",
93
+ "ownerpending",
94
+ "bootstrapping",
95
+ "active"
96
+ ],
97
+ "x-merge": "scalar",
98
+ "description": "agent 生命周期状态;缺失时按 active 处理",
99
+ "x-enumDescriptions": {
100
+ "created": "已创建,尚未进入引导流程",
101
+ "ownerpending": "初始名片已发布,等待协议 Owner 共识",
102
+ "bootstrapping": "引导中(初始化配置/身份)",
103
+ "active": "已激活,正常运行"
104
+ }
105
+ },
106
+ "initialization": {
107
+ "type": "object",
108
+ "x-merge": "scalar",
109
+ "additionalProperties": false,
110
+ "required": [
111
+ "mode",
112
+ "operationId"
113
+ ],
114
+ "properties": {
115
+ "mode": {
116
+ "const": "supplied"
117
+ },
118
+ "operationId": {
119
+ "type": "string",
120
+ "pattern": "^init-[a-f0-9]{24}$"
121
+ }
122
+ },
123
+ "description": "Creation-service owned initialization operation"
124
+ },
125
+ "initialized": {
126
+ "type": "boolean",
127
+ "x-merge": "scalar",
128
+ "description": "是否已完成 Agent 初始化流程"
129
+ },
130
+ "bootstrapWelcome": {
131
+ "type": "boolean",
132
+ "default": true,
133
+ "x-merge": "scalar",
134
+ "description": "激活时是否向 Owner 发送首次欢迎消息。默认 true。设为 false 时只发上下线通知,不发自我介绍;团队内成员(由别的 agent 使用而非 Owner 直接对话)建议关闭。"
135
+ },
136
+ "team": {
137
+ "type": "array",
138
+ "items": {
139
+ "type": "string",
140
+ "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?){2,}$"
141
+ },
142
+ "uniqueItems": true,
143
+ "x-merge": "list",
144
+ "description": "Team Workspace 成员 Agent AID 列表;成员关系同时必须出现在 peers.json 联系人簿中。"
145
+ },
146
+ "fullaccess": {
147
+ "type": "object",
148
+ "x-merge": "dict",
149
+ "additionalProperties": false,
150
+ "properties": {
151
+ "enabled": {
152
+ "type": "boolean",
153
+ "default": false,
154
+ "description": "允许同时属于 AgentOwner 与 daemonOwner 的直接私聊任务使用宿主级 fullaccess"
155
+ }
156
+ },
157
+ "description": "Agent 级宿主执行策略;已认证 EC Web 或目标 Agent 与 daemon 的双 Owner 直接 Menu 可设置,不从 defaults 或 relation 继承"
158
+ },
159
+ "access": {
160
+ "type": "object",
161
+ "x-merge": "dict",
162
+ "additionalProperties": false,
163
+ "properties": {
164
+ "contactAdmission": {
165
+ "type": "string",
166
+ "enum": [
167
+ "legacy",
168
+ "app-v1"
169
+ ],
170
+ "description": "联系人准入灰度:app-v1 由 Owner App 维护申请及名单,启用前须完成 App 联调;缺省保留现行流程。"
171
+ },
172
+ "allowInternalContacts": {
173
+ "type": "boolean",
174
+ "default": true,
175
+ "description": "Owner 名录中归属本 Owner 的主体(条目 owner_aid 等于本 Agent 的 Owner)能否联系本 Agent。"
176
+ },
177
+ "allowExternalContacts": {
178
+ "type": "boolean",
179
+ "description": "Owner 名录中归属其他 Owner 的主体(条目 owner_aid 不同于本 Agent 的 Owner,或缺失归属)能否联系本 Agent。"
180
+ },
181
+ "allowAllContacts": {
182
+ "type": "boolean",
183
+ "default": false,
184
+ "description": "总开关:开启后跳过 Owner 名录三档判定,内部、外部、名录外主体以及名录不可用一律放行。仍在 Agent 本地拉黑与 deniedAids 之后。Owner 与个人助理本就恒放行。群聊不按发言人判定,准入单位是整个群。"
185
+ },
186
+ "allowedAids": {
187
+ "type": "array",
188
+ "items": {
189
+ "type": "string",
190
+ "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?){2,}$"
191
+ },
192
+ "uniqueItems": true,
193
+ "default": [],
194
+ "description": "白名单例外:命中者即使落在被关闭的内部或外部档也放行;不覆盖 deniedAids、Agent 本地拉黑或 Owner 身份校验。"
195
+ },
196
+ "deniedAids": {
197
+ "type": "array",
198
+ "items": {
199
+ "type": "string",
200
+ "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?){2,}$"
201
+ },
202
+ "uniqueItems": true,
203
+ "default": [],
204
+ "description": "黑名单:命中者在名录允许范围内也被拒绝,优先于 allowedAids;不影响 Owner 与个人助理。"
205
+ },
206
+ "requestLimit": {
207
+ "type": "object",
208
+ "additionalProperties": false,
209
+ "description": "准入控制消息限额。maxTimes / coolDown 各自带默认值;不设对象级默认值,避免把未配置的整个对象当成已配置。",
210
+ "properties": {
211
+ "maxTimes": {
212
+ "type": "integer",
213
+ "minimum": 1,
214
+ "maximum": 100000,
215
+ "description": "每个 Agent、每个渠道实例在窗口内最多发送的准入控制消息数。",
216
+ "default": 600
217
+ },
218
+ "coolDown": {
219
+ "type": "integer",
220
+ "minimum": 1,
221
+ "maximum": 86400,
222
+ "description": "准入控制消息限额的冷却窗口,单位秒。",
223
+ "default": 3600
224
+ }
225
+ }
226
+ }
227
+ },
228
+ "description": "Agent 的入站消息准入策略。逐字段带默认值,整块不设默认值:allowExternalContacts 必须保留“未配置”语义(个人助理按身份默认放行),见 docs/config/11-default-value-levels.md。"
229
+ },
230
+ "channels": {
231
+ "type": "array",
232
+ "items": {
233
+ "type": "object",
234
+ "allOf": [
235
+ {
236
+ "if": {
237
+ "properties": {
238
+ "type": {
239
+ "const": "aun"
240
+ }
241
+ },
242
+ "required": [
243
+ "type"
244
+ ]
245
+ },
246
+ "then": {
247
+ "not": {
248
+ "required": [
249
+ "gatewayUrl"
250
+ ]
251
+ }
252
+ }
253
+ }
254
+ ],
255
+ "description": "一个渠道实例配置;具体字段由渠道类型及其适配器定义。"
256
+ },
257
+ "x-merge": "list",
258
+ "description": "Agent 绑定的消息渠道实例列表"
259
+ },
260
+ "aun": {
261
+ "type": "object",
262
+ "x-merge": "dict",
263
+ "description": "Agent 级 AUN 通信配置",
264
+ "properties": {
265
+ "gatewayUrl": {
266
+ "not": {},
267
+ "description": "已移除;网关由 fastaun 缓存和 AID discovery 决定"
268
+ },
269
+ "defaultEncrypt": {
270
+ "not": {},
271
+ "description": "不支持在 Agent 配置;请使用 daemon.json.aun.defaultEncrypt"
272
+ }
273
+ }
274
+ },
275
+ "active_baseagent": {
276
+ "type": "string",
277
+ "x-merge": "scalar",
278
+ "description": "默认使用的 base agent 标识:claude/codex/gemini/ecagent"
279
+ },
280
+ "baseagents": {
281
+ "type": "object",
282
+ "x-merge": "dict",
283
+ "description": "按 base agent 配置模型选择(模型 / 服务商 / 推理强度 / 降级链)与运行参数;连接地址与密钥在 providers.json。",
284
+ "propertyNames": {
285
+ "pattern": "^[a-z][a-z0-9-]{0,31}$"
286
+ },
287
+ "additionalProperties": {
288
+ "type": "object"
289
+ },
290
+ "properties": {
291
+ "claude": {
292
+ "type": "object",
293
+ "additionalProperties": false,
294
+ "properties": {
295
+ "model": {
296
+ "type": "string",
297
+ "minLength": 1,
298
+ "description": "该 base agent 使用的模型。"
299
+ },
300
+ "provider": {
301
+ "type": "string",
302
+ "minLength": 1,
303
+ "pattern": "^[A-Za-z0-9_-]+$",
304
+ "description": "providers.json 中的服务商 id;缺省用 base agent 自带网关。"
305
+ },
306
+ "effort": {
307
+ "type": "string",
308
+ "enum": [
309
+ "low",
310
+ "medium",
311
+ "high",
312
+ "xhigh",
313
+ "max"
314
+ ],
315
+ "description": "推理强度。"
316
+ },
317
+ "fallback": {
318
+ "type": "array",
319
+ "maxItems": 3,
320
+ "description": "同 provider 服务类型的降级链;每一项都要显式写明 provider、model 和 effort。",
321
+ "items": {
322
+ "type": "object",
323
+ "additionalProperties": false,
324
+ "required": [
325
+ "provider",
326
+ "model",
327
+ "effort"
328
+ ],
329
+ "properties": {
330
+ "provider": {
331
+ "type": "string",
332
+ "minLength": 1,
333
+ "pattern": "^[A-Za-z0-9_-]+$"
334
+ },
335
+ "model": {
336
+ "type": "string",
337
+ "minLength": 1
338
+ },
339
+ "effort": {
340
+ "type": "string",
341
+ "enum": [
342
+ "low",
343
+ "medium",
344
+ "high",
345
+ "xhigh",
346
+ "max"
347
+ ]
348
+ }
349
+ }
350
+ }
351
+ },
352
+ "agentProgressSummaries": {
353
+ "type": "boolean",
354
+ "description": "打开 SDK 进度摘要(默认 true)。"
355
+ },
356
+ "excludeDynamicSections": {
357
+ "type": "boolean",
358
+ "description": "系统提示词去掉动态段以稳定提示缓存(默认 false)。"
359
+ },
360
+ "useSettingSources": {
361
+ "type": "boolean",
362
+ "description": "读取 project/user 两级 settings(默认 true;fullaccess 强制不读)。"
363
+ },
364
+ "pathToClaudeCodeExecutable": {
365
+ "type": "string",
366
+ "minLength": 1,
367
+ "description": "自定义 Claude Code 可执行文件路径。"
368
+ }
369
+ }
370
+ },
371
+ "codex": {
372
+ "type": "object",
373
+ "additionalProperties": false,
374
+ "properties": {
375
+ "model": {
376
+ "type": "string",
377
+ "minLength": 1,
378
+ "description": "该 base agent 使用的模型。"
379
+ },
380
+ "provider": {
381
+ "type": "string",
382
+ "minLength": 1,
383
+ "pattern": "^[A-Za-z0-9_-]+$",
384
+ "description": "providers.json 中的服务商 id;缺省用 base agent 自带网关。"
385
+ },
386
+ "effort": {
387
+ "type": "string",
388
+ "enum": [
389
+ "low",
390
+ "medium",
391
+ "high",
392
+ "xhigh",
393
+ "max"
394
+ ],
395
+ "description": "推理强度。"
396
+ },
397
+ "fallback": {
398
+ "type": "array",
399
+ "maxItems": 3,
400
+ "description": "同 provider 服务类型的降级链;每一项都要显式写明 provider、model 和 effort。",
401
+ "items": {
402
+ "type": "object",
403
+ "additionalProperties": false,
404
+ "required": [
405
+ "provider",
406
+ "model",
407
+ "effort"
408
+ ],
409
+ "properties": {
410
+ "provider": {
411
+ "type": "string",
412
+ "minLength": 1,
413
+ "pattern": "^[A-Za-z0-9_-]+$"
414
+ },
415
+ "model": {
416
+ "type": "string",
417
+ "minLength": 1
418
+ },
419
+ "effort": {
420
+ "type": "string",
421
+ "enum": [
422
+ "low",
423
+ "medium",
424
+ "high",
425
+ "xhigh",
426
+ "max"
427
+ ]
428
+ }
429
+ }
430
+ }
431
+ },
432
+ "enableRequestUserInput": {
433
+ "type": "boolean",
434
+ "description": "Default 模式允许阻塞式 request_user_input(默认 true);不影响异步问题与审批。"
435
+ }
436
+ }
437
+ },
438
+ "gemini": {
439
+ "type": "object",
440
+ "additionalProperties": false,
441
+ "properties": {
442
+ "model": {
443
+ "type": "string",
444
+ "minLength": 1,
445
+ "description": "该 base agent 使用的模型。"
446
+ },
447
+ "provider": {
448
+ "type": "string",
449
+ "minLength": 1,
450
+ "pattern": "^[A-Za-z0-9_-]+$",
451
+ "description": "providers.json 中的服务商 id;缺省用 base agent 自带网关。"
452
+ },
453
+ "effort": {
454
+ "type": "string",
455
+ "enum": [
456
+ "low",
457
+ "medium",
458
+ "high",
459
+ "xhigh",
460
+ "max"
461
+ ],
462
+ "description": "推理强度。"
463
+ },
464
+ "fallback": {
465
+ "type": "array",
466
+ "maxItems": 3,
467
+ "description": "同 provider 服务类型的降级链;每一项都要显式写明 provider、model 和 effort。",
468
+ "items": {
469
+ "type": "object",
470
+ "additionalProperties": false,
471
+ "required": [
472
+ "provider",
473
+ "model",
474
+ "effort"
475
+ ],
476
+ "properties": {
477
+ "provider": {
478
+ "type": "string",
479
+ "minLength": 1,
480
+ "pattern": "^[A-Za-z0-9_-]+$"
481
+ },
482
+ "model": {
483
+ "type": "string",
484
+ "minLength": 1
485
+ },
486
+ "effort": {
487
+ "type": "string",
488
+ "enum": [
489
+ "low",
490
+ "medium",
491
+ "high",
492
+ "xhigh",
493
+ "max"
494
+ ]
495
+ }
496
+ }
497
+ }
498
+ },
499
+ "cliPath": {
500
+ "type": "string",
501
+ "minLength": 1,
502
+ "description": "Gemini CLI 可执行文件路径;缺省自动探测。"
503
+ }
504
+ }
505
+ },
506
+ "ecagent": {
507
+ "type": "object",
508
+ "additionalProperties": false,
509
+ "properties": {
510
+ "model": {
511
+ "type": "string",
512
+ "minLength": 1,
513
+ "description": "该 base agent 使用的模型。"
514
+ },
515
+ "provider": {
516
+ "type": "string",
517
+ "minLength": 1,
518
+ "pattern": "^[A-Za-z0-9_-]+$",
519
+ "description": "providers.json 中的服务商 id;缺省用 base agent 自带网关。"
520
+ },
521
+ "effort": {
522
+ "type": "string",
523
+ "enum": [
524
+ "low",
525
+ "medium",
526
+ "high",
527
+ "xhigh",
528
+ "max"
529
+ ],
530
+ "description": "推理强度。"
531
+ },
532
+ "fallback": {
533
+ "type": "array",
534
+ "maxItems": 3,
535
+ "description": "同 provider 服务类型的降级链;每一项都要显式写明 provider、model 和 effort。",
536
+ "items": {
537
+ "type": "object",
538
+ "additionalProperties": false,
539
+ "required": [
540
+ "provider",
541
+ "model",
542
+ "effort"
543
+ ],
544
+ "properties": {
545
+ "provider": {
546
+ "type": "string",
547
+ "minLength": 1,
548
+ "pattern": "^[A-Za-z0-9_-]+$"
549
+ },
550
+ "model": {
551
+ "type": "string",
552
+ "minLength": 1
553
+ },
554
+ "effort": {
555
+ "type": "string",
556
+ "enum": [
557
+ "low",
558
+ "medium",
559
+ "high",
560
+ "xhigh",
561
+ "max"
562
+ ]
563
+ }
564
+ }
565
+ }
566
+ },
567
+ "timeoutMs": {
568
+ "type": "number",
569
+ "minimum": 1,
570
+ "description": "单次网关请求超时毫秒(默认 120000)。"
571
+ },
572
+ "maxRetries": {
573
+ "type": "number",
574
+ "minimum": 0,
575
+ "description": "失败重试次数(默认 2;总尝试 = 重试 + 1)。"
576
+ },
577
+ "maxRetryDelayMs": {
578
+ "type": "number",
579
+ "minimum": 0,
580
+ "description": "重试退避上限毫秒(默认 4000)。"
581
+ }
582
+ }
583
+ }
584
+ }
585
+ },
586
+ "Services": {
587
+ "type": "object",
588
+ "description": "按用途选择 provider、模型、推理强度和降级链;用途名可扩展(如 decision)。",
589
+ "x-merge": "dict",
590
+ "propertyNames": {
591
+ "pattern": "^[A-Za-z0-9_-]+$"
592
+ },
593
+ "additionalProperties": {
594
+ "type": "object",
595
+ "additionalProperties": false,
596
+ "properties": {
597
+ "provider": {
598
+ "type": "string",
599
+ "minLength": 1
600
+ },
601
+ "model": {
602
+ "type": "string",
603
+ "minLength": 1
604
+ },
605
+ "effort": {
606
+ "type": "string",
607
+ "minLength": 1
608
+ },
609
+ "fallback": {
610
+ "type": "array",
611
+ "maxItems": 3,
612
+ "items": {
613
+ "type": "object",
614
+ "additionalProperties": false,
615
+ "required": [
616
+ "provider",
617
+ "model",
618
+ "effort"
619
+ ],
620
+ "properties": {
621
+ "provider": {
622
+ "type": "string",
623
+ "minLength": 1,
624
+ "pattern": "^[A-Za-z0-9_-]+$"
625
+ },
626
+ "model": {
627
+ "type": "string",
628
+ "minLength": 1
629
+ },
630
+ "effort": {
631
+ "type": "string",
632
+ "minLength": 1
633
+ }
634
+ }
635
+ }
636
+ }
637
+ }
638
+ }
639
+ },
640
+ "projects": {
641
+ "type": "object",
642
+ "x-merge": "dict",
643
+ "description": "Agent 可用项目路径和项目选择配置"
644
+ },
645
+ "capabilities": {
646
+ "type": "object",
647
+ "x-merge": "dict",
648
+ "description": "Agent 能力开关及能力参数"
649
+ },
650
+ "ability": {
651
+ "type": "object",
652
+ "x-merge": "dict",
653
+ "additionalProperties": false,
654
+ "properties": {
655
+ "codeApproval": {
656
+ "type": "object",
657
+ "x-merge": "dict",
658
+ "additionalProperties": false,
659
+ "properties": {
660
+ "enabled": {
661
+ "type": "boolean",
662
+ "default": true,
663
+ "description": "Whether the target Agent Owner may submit trusted ability code approval requests; defaults to enabled"
664
+ }
665
+ }
666
+ }
667
+ },
668
+ "description": "Agent ability plugin management policy"
669
+ },
670
+ "baseagentSkills": {
671
+ "type": "boolean",
672
+ "x-merge": "scalar",
673
+ "default": false,
674
+ "description": "开放基座 agent 自带的 skill 功能(Claude Skill 工具、Codex skills);默认 false 关闭,对所有基座统一生效。不影响 EC 技能(ec skill)"
675
+ },
676
+ "readonlySourceDiagnostics": {
677
+ "type": "boolean",
678
+ "x-merge": "scalar",
679
+ "default": false,
680
+ "description": "允许只读会话在显式源码目录内执行受限、可证明只读的诊断查询"
681
+ },
682
+ "observable": {
683
+ "type": "boolean",
684
+ "default": true,
685
+ "x-merge": "scalar",
686
+ "description": "是否将 Agent 的入站和出站消息转发给 owners;默认开启"
687
+ },
688
+ "chatmode": {
689
+ "type": "object",
690
+ "x-merge": "dict",
691
+ "description": "场景投递表:私聊支持 interactive/proactive;群聊及非人类私聊固定 proactive。个人助理与本人 Owner 的 AUN 私聊中,proactive activity 自动使用消息投递。",
692
+ "properties": {
693
+ "private": {
694
+ "enum": [
695
+ "interactive",
696
+ "proactive"
697
+ ],
698
+ "description": "人类私聊场景的投递方式",
699
+ "x-enumDescriptions": {
700
+ "interactive": "同步交互:输出即回复",
701
+ "proactive": "主动推送:CLI 回复 + 思考投影"
702
+ },
703
+ "default": "interactive"
704
+ },
705
+ "group": {
706
+ "enum": [
707
+ "proactive"
708
+ ],
709
+ "description": "群聊固定使用 proactive 投递方式",
710
+ "x-enumDescriptions": {
711
+ "proactive": "主动推送:CLI 回复 + 思考投影"
712
+ },
713
+ "default": "proactive"
714
+ },
715
+ "nothuman": {
716
+ "enum": [
717
+ "interactive",
718
+ "proactive"
719
+ ],
720
+ "description": "非人类(agent)私聊场景的投递方式",
721
+ "x-enumDescriptions": {
722
+ "interactive": "同步交互:输出即回复",
723
+ "proactive": "主动推送:CLI 回复 + 思考投影"
724
+ },
725
+ "default": "proactive"
726
+ }
727
+ },
728
+ "additionalProperties": false
729
+ },
730
+ "mentionMode": {
731
+ "type": "string",
732
+ "enum": [
733
+ "disabled",
734
+ "mention-only",
735
+ "auto"
736
+ ],
737
+ "x-merge": "scalar",
738
+ "description": "@ 处理策略(顶层通用参数)",
739
+ "x-enumDescriptions": {
740
+ "disabled": "处理所有消息",
741
+ "mention-only": "只处理被 @ 的消息,未 @ 作引用上下文"
742
+ }
743
+ },
744
+ "privateMentionMode": {
745
+ "type": "string",
746
+ "enum": [
747
+ "disabled",
748
+ "mention-only"
749
+ ],
750
+ "default": "disabled",
751
+ "x-merge": "scalar",
752
+ "description": "私聊 @ 处理策略:mention-only 时未被 @ 的消息只记录到本地历史、不进模型回合;仅 Owner 可改",
753
+ "x-enumDescriptions": {
754
+ "disabled": "处理所有私聊消息",
755
+ "mention-only": "只处理被 @ 的私聊消息,未 @ 仅记录到本地历史"
756
+ }
757
+ },
758
+ "autoMentionQuietWindowMs": {
759
+ "type": "number",
760
+ "minimum": 0,
761
+ "x-merge": "scalar",
762
+ "description": "群聊 auto 注意力分类的静默等待窗口,单位为毫秒;默认 3000"
763
+ },
764
+ "groupSlashRequireMentions": {
765
+ "type": "boolean",
766
+ "default": true,
767
+ "x-merge": "scalar",
768
+ "description": "AUN 群聊 slash 命令是否必须携带结构化 mentions;默认必须"
769
+ },
770
+ "responseMode": {
771
+ "type": "string",
772
+ "x-merge": "scalar",
773
+ "description": "响应模式 id(标量);候选清单/默认值来自注册表,非 schema。关系级>agent级>注册表首选"
774
+ },
775
+ "responseModeParams": {
776
+ "type": "object",
777
+ "x-merge": "dict",
778
+ "description": "响应模式特有参数字典,按模式 id 分桶:{ [modeId]: {...} }"
779
+ },
780
+ "flush_delay": {
781
+ "type": "number",
782
+ "minimum": 0,
783
+ "default": 3,
784
+ "x-merge": "scalar",
785
+ "description": "流式出站消息的批量刷新间隔,单位为秒;默认 3 秒"
786
+ },
787
+ "debounce": {
788
+ "type": "number",
789
+ "minimum": 0,
790
+ "default": 0,
791
+ "x-merge": "scalar",
792
+ "description": "入站消息合并窗口,单位为秒;0 表示不合并,默认 0"
793
+ },
794
+ "show_activities": {
795
+ "type": "string",
796
+ "enum": [
797
+ "all",
798
+ "text",
799
+ "none"
800
+ ],
801
+ "default": "all",
802
+ "x-merge": "scalar",
803
+ "description": "中间输出展示范围;群聊 proactive 默认 none,显式配置可覆盖。",
804
+ "x-enumDescriptions": {
805
+ "all": "文本 + activity",
806
+ "text": "仅文本",
807
+ "none": "全部静默"
808
+ }
809
+ },
810
+ "session_renew": {
811
+ "type": "object",
812
+ "x-merge": "dict",
813
+ "additionalProperties": false,
814
+ "description": "会话超时后的续接判定",
815
+ "properties": {
816
+ "enabled": {
817
+ "type": "boolean",
818
+ "description": "是否启用超时后的会话连续性判定"
819
+ },
820
+ "after_hours": {
821
+ "type": "number",
822
+ "exclusiveMinimum": 0,
823
+ "description": "距最后一条有效对话超过该小时数才触发判定"
824
+ },
825
+ "fallback_action": {
826
+ "type": "string",
827
+ "enum": [
828
+ "continue",
829
+ "new"
830
+ ],
831
+ "description": "无法判定时的兜底动作",
832
+ "x-enumDescriptions": {
833
+ "continue": "继续沿用当前会话",
834
+ "new": "开启新会话"
835
+ }
836
+ },
837
+ "new_probability_threshold": {
838
+ "type": "number",
839
+ "minimum": 0,
840
+ "maximum": 1,
841
+ "description": "noul 达到该概率后开启新会话"
842
+ }
843
+ }
844
+ },
845
+ "group_venue_sync": {
846
+ "type": "object",
847
+ "x-merge": "dict",
848
+ "description": "AUN 群资源同步配置;控制规则文件路径、资源索引路径、条目/字节限制及刷新间隔。"
849
+ },
850
+ "groupRules": {
851
+ "type": "object",
852
+ "x-merge": "dict",
853
+ "additionalProperties": false,
854
+ "properties": {
855
+ "mode": {
856
+ "type": "string",
857
+ "enum": [
858
+ "load",
859
+ "ignore"
860
+ ],
861
+ "default": "load",
862
+ "description": "是否读取并注入 AUN 群已发布的 /rules.md;默认 load。"
863
+ }
864
+ },
865
+ "description": "本 Agent 对 AUN 群规则的本地加载策略。mode 带默认值;不设对象级默认值。"
866
+ },
867
+ "render": {
868
+ "type": "object",
869
+ "x-merge": "dict",
870
+ "description": "私聊、群聊及注入内容使用的渲染器标识配置。"
871
+ },
872
+ "sessionManifests": {
873
+ "type": "object",
874
+ "x-merge": "dict",
875
+ "description": "会话类型到 manifest 文件的映射,用于选择对应的系统提示词清单。"
876
+ },
877
+ "enable_rich_content": {
878
+ "type": "boolean",
879
+ "x-merge": "scalar",
880
+ "description": "是否允许渠道使用富内容消息;未设置时由渠道能力和运行时默认决定"
881
+ },
882
+ "extra_backup": {
883
+ "type": "array",
884
+ "items": {
885
+ "type": "object",
886
+ "description": "一个额外备份规则,包含相对 path 和可选的文件匹配 pattern。"
887
+ },
888
+ "x-merge": "list",
889
+ "description": "配置快照需要额外包含的文件声明;不得指向 .env。"
890
+ },
891
+ "memory": {
892
+ "type": "object",
893
+ "x-merge": "dict",
894
+ "additionalProperties": false,
895
+ "description": "记忆系统配置。各子字段逐项带默认值;不设对象级默认值。默认值挂在本层(defaults 层不声明 memory)。",
896
+ "properties": {
897
+ "enableRelation": {
898
+ "type": "boolean",
899
+ "x-merge-logic": "AND",
900
+ "description": "启用 relation 作用域记忆。默认 true。这是总开关:关闭后 agent 级与 owner 级记忆也无从产生,note 写入、索引注入、五种整理模式的触发器与手动调用一并停用。relation 层可用此字段做 AND 合并(任意层为 false 则关闭)。",
901
+ "default": true
902
+ },
903
+ "enableAgent": {
904
+ "type": "boolean",
905
+ "description": "启用 agent 作用域记忆(泛化模式的产出)。默认 true。",
906
+ "default": true
907
+ },
908
+ "enableOwner": {
909
+ "type": "boolean",
910
+ "description": "启用 owner 作用域记忆(提升模式的产出)。默认 true。",
911
+ "default": true
912
+ },
913
+ "idleHours": {
914
+ "type": "number",
915
+ "description": "关系空闲时长(小时):一个关系最后一次活动(入站、写 note)后这么久没有新活动,触发该关系的整理链,只跑候选攒够 minBatchItems 的步骤。默认 1。",
916
+ "default": 1
917
+ },
918
+ "maxUnconsolidatedHours": {
919
+ "type": "number",
920
+ "description": "关系兜底整理时长(小时):一个关系最早一次未整理的活动满这么久,即使仍在聊也触发整理链,有 1 条候选就跑。默认 8。",
921
+ "default": 8
922
+ },
923
+ "minBatchItems": {
924
+ "type": "number",
925
+ "minimum": 1,
926
+ "description": "空闲到期时一步至少攒够多少条候选才跑(note 条数 / to-generalize 条数 / to-promote 条数),不够的留给兜底。默认 3。",
927
+ "default": 3
928
+ },
929
+ "checkIntervalHours": {
930
+ "type": "number",
931
+ "description": "定时触发器检查间隔(小时)。默认 1。",
932
+ "default": 1
933
+ },
934
+ "backlogHours": {
935
+ "type": "number",
936
+ "description": "已废弃,不再生效(pending 由关系空闲 / 兜底计时覆盖)。保留只为旧配置文件仍能通过校验。"
937
+ },
938
+ "indexMaxBytes": {
939
+ "type": "number",
940
+ "description": "MEMORY.md 索引大小上限(字节)。默认 5120(5KB)。",
941
+ "default": 5120
942
+ },
943
+ "forgetAfterDays": {
944
+ "type": "number",
945
+ "minimum": 1,
946
+ "maximum": 7,
947
+ "description": "普通记忆多久(天)未更新即进入遗忘候选。默认 3,允许 1-7。打了 long-term 的记忆固定 30 天,不受此值影响。",
948
+ "default": 3
949
+ },
950
+ "profileRegenDays": {
951
+ "type": "number",
952
+ "description": "间隔多久(天)重新生成一次画像。默认 3。",
953
+ "default": 3
954
+ }
955
+ }
956
+ }
957
+ }
958
+ }