evolcore 0.0.3 → 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 (143) hide show
  1. package/CHANGELOG.md +64 -0
  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 +1 -31
  6. package/dist/agents/codex-app-server-client.js +68 -0
  7. package/dist/agents/codex-runner.js +157 -5
  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/channels/aun.js +220 -112
  14. package/dist/channels/daemon.js +18 -4
  15. package/dist/channels/dingtalk.js +52 -137
  16. package/dist/channels/feishu.js +56 -4
  17. package/dist/channels/qqbot.js +23 -1
  18. package/dist/channels/wechat.js +303 -155
  19. package/dist/channels/wecom.js +383 -7
  20. package/dist/cli/aun-commands.js +11 -11
  21. package/dist/cli/handoff-command.js +2 -1
  22. package/dist/cli/init-channel.js +185 -67
  23. package/dist/cli/init.js +7 -5
  24. package/dist/cli/trigger-command.js +92 -11
  25. package/dist/config/access-policy-domain.js +38 -0
  26. package/dist/config/access-policy.js +134 -0
  27. package/dist/config/builtin-role-templates.js +27 -14
  28. package/dist/config/builtin-roles.js +25 -6
  29. package/dist/config/config-field-policy.js +17 -5
  30. package/dist/config/config-manager.js +198 -22
  31. package/dist/config/config-operation-service.js +35 -38
  32. package/dist/config/contact-bind-code.js +274 -0
  33. package/dist/config/contact-book-store.js +173 -5
  34. package/dist/config/contact-book.js +32 -0
  35. package/dist/config/contact-operation-service.js +9 -3
  36. package/dist/config/contact-request-service.js +331 -0
  37. package/dist/config/peer-role-resolver.js +3 -1
  38. package/dist/config/schema-registry.js +49 -24
  39. package/dist/config-store.js +14 -2
  40. package/dist/core/auth/agent-delegation.js +105 -11
  41. package/dist/core/auth/authorization-audit.js +6 -0
  42. package/dist/core/auth/operation-authorizer.js +8 -0
  43. package/dist/core/auth/operation-catalog.js +51 -3
  44. package/dist/core/auth/trigger-authorization.js +15 -0
  45. package/dist/core/bootstrap-service.js +2 -9
  46. package/dist/core/channel-loader.js +6 -2
  47. package/dist/core/command/command-handler.js +10 -13
  48. package/dist/core/command/connect-menu.js +249 -24
  49. package/dist/core/command/evol-menu-version-gate.js +38 -0
  50. package/dist/core/command/group-menu.js +421 -0
  51. package/dist/core/command/menu-handler.js +269 -85
  52. package/dist/core/command/menu-protocol.js +8 -2
  53. package/dist/core/command/menu-token-store.js +102 -0
  54. package/dist/core/command/slash-gate.js +1 -1
  55. package/dist/core/command/slash-handler.js +158 -31
  56. package/dist/core/daemon-file-cache.js +28 -0
  57. package/dist/core/event-catalog.js +29 -0
  58. package/dist/core/evolagent-registry.js +4 -39
  59. package/dist/core/handoff/runtime.js +162 -37
  60. package/dist/core/handoff/store.js +46 -2
  61. package/dist/core/handoff/types.js +1 -0
  62. package/dist/core/inference/text-inference.js +16 -74
  63. package/dist/core/message/file-markers.js +7 -0
  64. package/dist/core/message/im-renderer.js +18 -14
  65. package/dist/core/message/inbound-admission.js +124 -0
  66. package/dist/core/message/message-bridge.js +616 -74
  67. package/dist/core/message/message-log.js +1 -0
  68. package/dist/core/message/message-queue.js +185 -10
  69. package/dist/core/message/peer-mode.js +7 -8
  70. package/dist/core/message/response-engine.js +381 -79
  71. package/dist/core/permission/approval-gateway.js +17 -10
  72. package/dist/core/permission/ec-command-parser.js +101 -46
  73. package/dist/core/permission/tool-policy.js +69 -24
  74. package/dist/core/protected-paths.js +36 -11
  75. package/dist/core/session/session-manager.js +25 -3
  76. package/dist/core/session/session-mapper.js +2 -0
  77. package/dist/core/session/session-renew.js +125 -69
  78. package/dist/core/session/session-turn-coordinator.js +5 -1
  79. package/dist/eck/kit-renderer.js +12 -1
  80. package/dist/eck/message-renderer.js +79 -1
  81. package/dist/index.js +224 -89
  82. package/dist/ipc.js +81 -4
  83. package/dist/paths.js +3 -0
  84. package/dist/response-system/config-resolver.js +29 -0
  85. package/dist/response-system/coordinator.js +8 -32
  86. package/dist/response-system/engines/v1/proactive-flow.js +1 -1
  87. package/dist/response-system/index.js +1 -0
  88. package/dist/response-system/modes/single-session/index.js +7 -4
  89. package/dist/trigger/parser.js +55 -15
  90. package/dist/trigger/patch.js +4 -1
  91. package/dist/trigger/scheduler.js +441 -39
  92. package/dist/utils/error-dict.json +7 -0
  93. package/dist/utils/evolcore-version.js +21 -0
  94. package/dist/utils/logger.js +2 -2
  95. package/dist/utils/stable-semver.js +21 -0
  96. package/dist/utils/stats.js +33 -9
  97. package/kits/docs/channels/aun.md +4 -13
  98. package/kits/docs/evolcore/INDEX.md +1 -1
  99. package/kits/docs/evolcore/config.md +47 -2
  100. package/kits/docs/evolcore/contact.md +7 -3
  101. package/kits/docs/evolcore/group-rules.md +46 -4
  102. package/kits/docs/evolcore/group.md +4 -4
  103. package/kits/docs/evolcore/msg.md +5 -5
  104. package/kits/docs/evolcore/trigger.md +25 -8
  105. package/kits/docs/path-registry.md +36 -17
  106. package/kits/eck_message_manifest.json +12 -1
  107. package/kits/migrations/migrate-contact-book-v2.mjs +7 -0
  108. package/kits/rules/01-overview.md +17 -7
  109. package/kits/rules/02-navigation.md +38 -18
  110. package/kits/rules/03-identity.md +28 -24
  111. package/kits/rules/04-relation.md +44 -28
  112. package/kits/rules/05-venue.md +31 -15
  113. package/kits/rules/06-channel.md +11 -7
  114. package/kits/schemas/_meta.json +18 -7
  115. package/kits/schemas/agent-config.schema.7.json +303 -0
  116. package/kits/schemas/agent-config.schema.8.json +304 -0
  117. package/kits/schemas/agent-config.schema.9.json +374 -0
  118. package/kits/schemas/contact-book.schema.3.json +67 -0
  119. package/kits/schemas/daemon.schema.1.json +3 -2
  120. package/kits/schemas/daemon.schema.2.json +101 -0
  121. package/kits/schemas/daemon.schema.3.json +123 -0
  122. package/kits/schemas/defaults.schema.2.json +85 -0
  123. package/kits/schemas/defaults.schema.3.json +73 -0
  124. package/kits/schemas/relation-config.schema.6.json +46 -0
  125. package/kits/schemas/relation-config.schema.7.json +59 -0
  126. package/kits/schemas/single-session.schema.2.json +57 -0
  127. package/kits/templates/message-fragments/handoff-context-to-target.md +9 -0
  128. package/kits/templates/message-fragments/handoff-request-to-target.md +14 -8
  129. package/kits/templates/message-fragments/handoff-response-to-origin.md +5 -6
  130. package/kits/templates/roles/admin.json +46 -0
  131. package/kits/templates/roles/member.json +4 -0
  132. package/kits/templates/roles/visitor.json +4 -0
  133. package/kits/templates/system-fragments/channel.md +12 -2
  134. package/kits/templates/system-fragments/identity.md +3 -1
  135. package/kits/templates/system-fragments/relation.md +1 -1
  136. package/kits/templates/system-fragments/session.md +6 -2
  137. package/package.json +4 -2
  138. package/MIGRATION-0.5.0.md +0 -378
  139. package/ROLE_ACCESS_CONTROL.md +0 -174
  140. package/dist/channels/contact-bind-code.js +0 -134
  141. package/dist/channels/wecom-card.js +0 -101
  142. package/dist/channels/wecom-onboarding.js +0 -82
  143. package/dist/channels/wecom-state.js +0 -191
@@ -0,0 +1,374 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "agent-config.schema.9.json",
4
+ "title": "AgentConfig v9 (agents/{aid}/config.json)",
5
+ "description": "Agent v9 主配置。增加本地 AUN 群规则加载策略与 Agent 级消息准入策略。",
6
+ "x-logical-name": "agent-config",
7
+ "x-scope": "agent",
8
+ "type": "object",
9
+ "additionalProperties": true,
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": 9,
47
+ "default": 9,
48
+ "x-merge": "scalar",
49
+ "description": "配置 Schema 版本;v9 增加 groupRules.mode"
50
+ },
51
+ "aid": {
52
+ "type": "string",
53
+ "x-merge": "scalar",
54
+ "description": "Agent 的全局唯一身份标识"
55
+ },
56
+ "enabled": {
57
+ "type": "boolean",
58
+ "default": true,
59
+ "x-merge": "scalar",
60
+ "description": "是否启用 Agent;缺省按启用处理"
61
+ },
62
+ "lifecycle": {
63
+ "type": "string",
64
+ "enum": [
65
+ "created",
66
+ "bootstrapping",
67
+ "active"
68
+ ],
69
+ "x-merge": "scalar",
70
+ "description": "agent 生命周期状态",
71
+ "x-enumDescriptions": {
72
+ "created": "已创建,尚未进入引导流程",
73
+ "bootstrapping": "引导中(初始化配置/身份)",
74
+ "active": "已激活,正常运行"
75
+ }
76
+ },
77
+ "initialized": {
78
+ "type": "boolean",
79
+ "x-merge": "scalar",
80
+ "description": "是否已完成 Agent 初始化流程"
81
+ },
82
+ "owners": {
83
+ "type": "array",
84
+ "items": {
85
+ "type": "string",
86
+ "description": "一个 Agent owner 的身份标识,通常为 AID。"
87
+ },
88
+ "uniqueItems": true,
89
+ "x-merge": "list",
90
+ "description": "Agent 所有者身份列表;用于 owner 级控制和通知"
91
+ },
92
+ "access": {
93
+ "type": "object",
94
+ "x-merge": "dict",
95
+ "additionalProperties": false,
96
+ "required": [
97
+ "policyMode",
98
+ "allowedGroupChannels",
99
+ "requestLimit"
100
+ ],
101
+ "properties": {
102
+ "policyMode": {
103
+ "type": "string",
104
+ "enum": [
105
+ "open",
106
+ "contacts",
107
+ "owners-only"
108
+ ],
109
+ "description": "私聊准入策略:开放、仅联系人和 Owner、或仅 Owner。"
110
+ },
111
+ "allowedGroupChannels": {
112
+ "type": "array",
113
+ "items": {
114
+ "type": "string",
115
+ "minLength": 1
116
+ },
117
+ "uniqueItems": true,
118
+ "description": "允许群消息进入的完整渠道实例键;空数组表示关闭所有群聊渠道。"
119
+ },
120
+ "requestLimit": {
121
+ "type": "object",
122
+ "additionalProperties": false,
123
+ "required": [
124
+ "maxTimes",
125
+ "coolDown"
126
+ ],
127
+ "properties": {
128
+ "maxTimes": {
129
+ "type": "integer",
130
+ "minimum": 1,
131
+ "maximum": 100000,
132
+ "description": "每个 Agent、每个渠道实例在窗口内最多发送的准入控制消息数。"
133
+ },
134
+ "coolDown": {
135
+ "type": "integer",
136
+ "minimum": 1,
137
+ "maximum": 86400,
138
+ "description": "准入控制消息限额的冷却窗口,单位秒。"
139
+ }
140
+ }
141
+ }
142
+ },
143
+ "description": "Agent 自身的消息准入策略;不参与 defaults 或 relation 覆盖链。"
144
+ },
145
+ "channels": {
146
+ "type": "array",
147
+ "items": {
148
+ "type": "object",
149
+ "description": "一个渠道实例配置;具体字段由渠道类型及其适配器定义。"
150
+ },
151
+ "x-merge": "list",
152
+ "description": "Agent 绑定的消息渠道实例列表"
153
+ },
154
+ "aun": {
155
+ "type": "object",
156
+ "x-merge": "dict",
157
+ "description": "Agent 级 AUN 通信配置"
158
+ },
159
+ "models": {
160
+ "type": "object",
161
+ "x-merge": "dict",
162
+ "description": "Agent 级模型别名、注册表或模型覆盖配置"
163
+ },
164
+ "active_baseagent": {
165
+ "type": "string",
166
+ "x-merge": "scalar",
167
+ "description": "默认使用的 base agent 标识,例如 claude 或 codex"
168
+ },
169
+ "baseagents": {
170
+ "type": "object",
171
+ "x-merge": "dict",
172
+ "description": "各 base agent 的模型、推理强度及运行参数"
173
+ },
174
+ "projects": {
175
+ "type": "object",
176
+ "x-merge": "dict",
177
+ "description": "Agent 可用项目路径和项目选择配置"
178
+ },
179
+ "capabilities": {
180
+ "type": "object",
181
+ "x-merge": "dict",
182
+ "description": "Agent 能力开关及能力参数"
183
+ },
184
+ "observable": {
185
+ "type": "boolean",
186
+ "default": false,
187
+ "x-merge": "scalar",
188
+ "description": "是否将 Agent 的入站和出站消息转发给 owners;默认关闭"
189
+ },
190
+ "chatmode": {
191
+ "type": "object",
192
+ "x-merge": "dict",
193
+ "default": {
194
+ "private": "interactive",
195
+ "group": "proactive",
196
+ "nothuman": "proactive"
197
+ },
198
+ "properties": {
199
+ "private": {
200
+ "enum": [
201
+ "interactive",
202
+ "proactive"
203
+ ],
204
+ "description": "人类私聊场景的投递方式",
205
+ "x-enumDescriptions": {
206
+ "interactive": "同步交互:输出即回复",
207
+ "proactive": "主动推送:CLI 回复 + 思考投影"
208
+ }
209
+ },
210
+ "group": {
211
+ "enum": [
212
+ "interactive",
213
+ "proactive"
214
+ ],
215
+ "description": "群聊场景的投递方式",
216
+ "x-enumDescriptions": {
217
+ "interactive": "同步交互:输出即回复",
218
+ "proactive": "主动推送:CLI 回复 + 思考投影"
219
+ }
220
+ },
221
+ "nothuman": {
222
+ "enum": [
223
+ "interactive",
224
+ "proactive"
225
+ ],
226
+ "description": "非人类(agent)私聊场景的投递方式",
227
+ "x-enumDescriptions": {
228
+ "interactive": "同步交互:输出即回复",
229
+ "proactive": "主动推送:CLI 回复 + 思考投影"
230
+ }
231
+ }
232
+ },
233
+ "additionalProperties": false,
234
+ "description": "chatmode 场景默认表;出厂默认值即此 default(agent 级改默认,关系级按键覆盖)。键封闭 private/group/nothuman,值枚举 interactive/proactive"
235
+ },
236
+ "mentionMode": {
237
+ "type": "string",
238
+ "enum": [
239
+ "disabled",
240
+ "mention-only"
241
+ ],
242
+ "default": "disabled",
243
+ "x-merge": "scalar",
244
+ "description": "@ 处理策略(顶层通用参数)",
245
+ "x-enumDescriptions": {
246
+ "disabled": "处理所有消息",
247
+ "mention-only": "只处理被 @ 的消息,未 @ 作引用上下文"
248
+ }
249
+ },
250
+ "model": {
251
+ "type": "string",
252
+ "x-merge": "scalar",
253
+ "description": "主会话模型(顶层通用参数);无默认值,缺省时由响应模式/全局默认决定"
254
+ },
255
+ "responseMode": {
256
+ "type": "string",
257
+ "x-merge": "scalar",
258
+ "description": "响应模式 id(标量);候选清单/默认值来自注册表,非 schema。关系级>agent级>注册表首选"
259
+ },
260
+ "responseModeParams": {
261
+ "type": "object",
262
+ "x-merge": "dict",
263
+ "description": "响应模式特有参数字典,按模式 id 分桶:{ [modeId]: {...} }"
264
+ },
265
+ "flush_delay": {
266
+ "type": "number",
267
+ "minimum": 0,
268
+ "default": 3,
269
+ "x-merge": "scalar",
270
+ "description": "流式出站消息的批量刷新间隔,单位为秒;默认 3 秒"
271
+ },
272
+ "debounce": {
273
+ "type": "number",
274
+ "minimum": 0,
275
+ "default": 0,
276
+ "x-merge": "scalar",
277
+ "description": "入站消息合并窗口,单位为秒;0 表示不合并,默认 0"
278
+ },
279
+ "show_activities": {
280
+ "type": "string",
281
+ "enum": [
282
+ "all",
283
+ "text",
284
+ "none"
285
+ ],
286
+ "default": "all",
287
+ "x-merge": "scalar",
288
+ "description": "中间输出展示范围(仅对 interactive 私聊有意义)",
289
+ "x-enumDescriptions": {
290
+ "all": "文本 + activity",
291
+ "text": "仅文本",
292
+ "none": "全部静默"
293
+ }
294
+ },
295
+ "session_renew": {
296
+ "type": "object",
297
+ "x-merge": "dict",
298
+ "additionalProperties": false,
299
+ "description": "会话超时后的续接判定",
300
+ "properties": {
301
+ "enabled": {
302
+ "type": "boolean",
303
+ "default": false,
304
+ "description": "是否启用超时后的会话连续性判定"
305
+ },
306
+ "after_hours": {
307
+ "type": "number",
308
+ "exclusiveMinimum": 0,
309
+ "default": 24,
310
+ "description": "距最后一条有效对话超过该小时数才触发判定"
311
+ },
312
+ "fallback_action": {
313
+ "type": "string",
314
+ "enum": [
315
+ "continue",
316
+ "new"
317
+ ],
318
+ "default": "continue",
319
+ "description": "无法判定时的兜底动作",
320
+ "x-enumDescriptions": {
321
+ "continue": "继续沿用当前会话",
322
+ "new": "开启新会话"
323
+ }
324
+ }
325
+ }
326
+ },
327
+ "group_venue_sync": {
328
+ "type": "object",
329
+ "x-merge": "dict",
330
+ "description": "AUN 群资源同步配置;控制规则文件路径、资源索引路径、条目/字节限制及刷新间隔。"
331
+ },
332
+ "groupRules": {
333
+ "type": "object",
334
+ "x-merge": "dict",
335
+ "additionalProperties": false,
336
+ "properties": {
337
+ "mode": {
338
+ "type": "string",
339
+ "enum": [
340
+ "load",
341
+ "ignore"
342
+ ],
343
+ "default": "load",
344
+ "description": "是否读取并注入 AUN 群已发布的 /rules.md;默认 load。"
345
+ }
346
+ },
347
+ "description": "本 Agent 对 AUN 群规则的本地加载策略。"
348
+ },
349
+ "render": {
350
+ "type": "object",
351
+ "x-merge": "dict",
352
+ "description": "私聊、群聊及注入内容使用的渲染器标识配置。"
353
+ },
354
+ "sessionManifests": {
355
+ "type": "object",
356
+ "x-merge": "dict",
357
+ "description": "会话类型到 manifest 文件的映射,用于选择对应的系统提示词清单。"
358
+ },
359
+ "enable_rich_content": {
360
+ "type": "boolean",
361
+ "x-merge": "scalar",
362
+ "description": "是否允许渠道使用富内容消息;未设置时由渠道能力和运行时默认决定"
363
+ },
364
+ "extra_backup": {
365
+ "type": "array",
366
+ "items": {
367
+ "type": "object",
368
+ "description": "一个额外备份规则,包含相对 path 和可选的文件匹配 pattern。"
369
+ },
370
+ "x-merge": "list",
371
+ "description": "配置快照需要额外包含的文件声明;不得指向 .env。"
372
+ }
373
+ }
374
+ }
@@ -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
+ }