evolcore 0.0.19 → 0.0.20

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 (44) hide show
  1. package/CHANGELOG.md +21 -1
  2. package/README.md +2 -0
  3. package/bin/install-codex-managed-hooks.mjs +61 -0
  4. package/dist/agents/claude-runner.js +4 -3
  5. package/dist/agents/codex-runner.js +3 -2
  6. package/dist/agents/ecagent-runner.js +3 -2
  7. package/dist/aun/aid/agentmd.js +7 -0
  8. package/dist/aun/msg/group.js +14 -3
  9. package/dist/aun/msg/p2p.js +21 -11
  10. package/dist/aun/outbox.js +144 -19
  11. package/dist/channels/aun.js +621 -211
  12. package/dist/cli/daemon-commands.js +12 -6
  13. package/dist/cli/index.js +1 -0
  14. package/dist/cli/init.js +55 -15
  15. package/dist/cli/restart-monitor.js +3 -3
  16. package/dist/config/aun-gateway-config.js +2 -0
  17. package/dist/config/config-manager.js +92 -8
  18. package/dist/config/config-operation-service.js +1 -2
  19. package/dist/config/gateway-config.js +9 -7
  20. package/dist/config/lifecycle.js +16 -5
  21. package/dist/config-store.js +13 -6
  22. package/dist/core/auth/authorization-audit.js +5 -2
  23. package/dist/core/bootstrap-messages.js +2 -2
  24. package/dist/core/bootstrap-service.js +21 -36
  25. package/dist/core/channel-loader.js +0 -2
  26. package/dist/core/evolagent.js +5 -4
  27. package/dist/core/message/response-engine.js +9 -4
  28. package/dist/core/permission/ec-command-parser.js +56 -3
  29. package/dist/core/permission/sandbox-runtime.js +46 -12
  30. package/dist/core/permission/tool-policy.js +98 -41
  31. package/dist/core/relation/peer-identity.js +18 -0
  32. package/dist/eck/kit-renderer.js +17 -8
  33. package/dist/index.js +30 -19
  34. package/dist/utils/stats.js +52 -18
  35. package/dist/utils/welcome.js +2 -2
  36. package/kits/rules/01-overview.md +1 -1
  37. package/kits/rules/03-identity.md +1 -1
  38. package/kits/rules/05-venue.md +1 -1
  39. package/kits/schemas/_meta.json +7 -4
  40. package/kits/schemas/agent-config.schema.10.json +2 -1
  41. package/kits/schemas/agent-config.schema.11.json +408 -0
  42. package/kits/schemas/daemon.schema.5.json +136 -0
  43. package/kits/schemas/defaults.schema.5.json +107 -0
  44. package/package.json +2 -1
@@ -0,0 +1,408 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "agent-config.schema.11.json",
4
+ "title": "AgentConfig v11 (agents/{aid}/config.json)",
5
+ "description": "Agent v11 主配置。备用模型链只允许在 defaults.json 定义。",
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": 11,
47
+ "default": 11,
48
+ "x-merge": "scalar",
49
+ "description": "配置 Schema 版本;v11 移除 AUN gateway override"
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
+ "default": "active",
65
+ "enum": [
66
+ "created",
67
+ "bootstrapping",
68
+ "active"
69
+ ],
70
+ "x-merge": "scalar",
71
+ "description": "agent 生命周期状态;缺失时按 active 处理",
72
+ "x-enumDescriptions": {
73
+ "created": "已创建,尚未进入引导流程",
74
+ "bootstrapping": "引导中(初始化配置/身份)",
75
+ "active": "已激活,正常运行"
76
+ }
77
+ },
78
+ "initialized": {
79
+ "type": "boolean",
80
+ "x-merge": "scalar",
81
+ "description": "是否已完成 Agent 初始化流程"
82
+ },
83
+ "owners": {
84
+ "type": "array",
85
+ "items": {
86
+ "type": "string",
87
+ "description": "一个 Agent owner 的身份标识,通常为 AID。"
88
+ },
89
+ "uniqueItems": true,
90
+ "x-merge": "list",
91
+ "description": "Agent 所有者身份列表;用于 owner 级控制和通知"
92
+ },
93
+ "access": {
94
+ "type": "object",
95
+ "x-merge": "dict",
96
+ "additionalProperties": false,
97
+ "required": [
98
+ "policyMode",
99
+ "requestLimit"
100
+ ],
101
+ "properties": {
102
+ "policyMode": {
103
+ "type": "string",
104
+ "enum": [
105
+ "open",
106
+ "contacts",
107
+ "owners"
108
+ ],
109
+ "description": "私聊和群聊准入策略:开放、仅联系人或仅 Owner。"
110
+ },
111
+ "requestLimit": {
112
+ "type": "object",
113
+ "additionalProperties": false,
114
+ "required": [
115
+ "maxTimes",
116
+ "coolDown"
117
+ ],
118
+ "properties": {
119
+ "maxTimes": {
120
+ "type": "integer",
121
+ "minimum": 1,
122
+ "maximum": 100000,
123
+ "description": "每个 Agent、每个渠道实例在窗口内最多发送的准入控制消息数。"
124
+ },
125
+ "coolDown": {
126
+ "type": "integer",
127
+ "minimum": 1,
128
+ "maximum": 86400,
129
+ "description": "准入控制消息限额的冷却窗口,单位秒。"
130
+ }
131
+ }
132
+ }
133
+ },
134
+ "description": "Agent 自身的消息准入策略;不参与 defaults 或 relation 覆盖链。"
135
+ },
136
+ "channels": {
137
+ "type": "array",
138
+ "items": {
139
+ "type": "object",
140
+ "allOf": [
141
+ {
142
+ "if": {
143
+ "properties": { "type": { "const": "aun" } },
144
+ "required": ["type"]
145
+ },
146
+ "then": { "not": { "required": ["gatewayUrl"] } }
147
+ }
148
+ ],
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
+ "properties": {
159
+ "gatewayUrl": {
160
+ "not": {},
161
+ "description": "已移除;网关由 fastaun 缓存和 AID discovery 决定"
162
+ },
163
+ "defaultEncrypt": {
164
+ "not": {},
165
+ "description": "不支持在 Agent 配置;请使用 daemon.json.aun.defaultEncrypt"
166
+ }
167
+ }
168
+ },
169
+ "models": {
170
+ "type": "object",
171
+ "x-merge": "dict",
172
+ "description": "Agent 级模型别名、注册表或模型覆盖配置"
173
+ },
174
+ "active_baseagent": {
175
+ "type": "string",
176
+ "x-merge": "scalar",
177
+ "description": "默认使用的 base agent 标识,例如 claude 或 codex"
178
+ },
179
+ "baseagents": {
180
+ "type": "object",
181
+ "x-merge": "dict",
182
+ "description": "各 base agent 的模型、推理强度及运行参数;备用模型链只能在 defaults.json 配置。",
183
+ "additionalProperties": {
184
+ "not": {
185
+ "type": "object",
186
+ "required": ["fallbackModels"]
187
+ },
188
+ "properties": {
189
+ "headers": {
190
+ "type": "object",
191
+ "propertyNames": { "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$" },
192
+ "additionalProperties": { "type": "string", "pattern": "^[^\\u0000\\r\\n]*$" }
193
+ },
194
+ "queryParams": {
195
+ "type": "object",
196
+ "propertyNames": { "minLength": 1 },
197
+ "additionalProperties": { "type": "string" }
198
+ }
199
+ }
200
+ }
201
+ },
202
+ "projects": {
203
+ "type": "object",
204
+ "x-merge": "dict",
205
+ "description": "Agent 可用项目路径和项目选择配置"
206
+ },
207
+ "capabilities": {
208
+ "type": "object",
209
+ "x-merge": "dict",
210
+ "description": "Agent 能力开关及能力参数"
211
+ },
212
+ "readonlySourceDiagnostics": {
213
+ "type": "boolean",
214
+ "x-merge": "scalar",
215
+ "default": false,
216
+ "description": "允许只读会话在显式源码目录内执行受限、可证明只读的诊断查询"
217
+ },
218
+ "observable": {
219
+ "type": "boolean",
220
+ "default": true,
221
+ "x-merge": "scalar",
222
+ "description": "是否将 Agent 的入站和出站消息转发给 owners;默认开启"
223
+ },
224
+ "chatmode": {
225
+ "type": "object",
226
+ "x-merge": "dict",
227
+ "default": {
228
+ "private": "interactive",
229
+ "group": "proactive",
230
+ "nothuman": "proactive"
231
+ },
232
+ "properties": {
233
+ "private": {
234
+ "enum": [
235
+ "interactive",
236
+ "proactive"
237
+ ],
238
+ "description": "人类私聊场景的投递方式",
239
+ "x-enumDescriptions": {
240
+ "interactive": "同步交互:输出即回复",
241
+ "proactive": "主动推送:CLI 回复 + 思考投影"
242
+ }
243
+ },
244
+ "group": {
245
+ "enum": [
246
+ "interactive",
247
+ "proactive"
248
+ ],
249
+ "description": "群聊场景的投递方式",
250
+ "x-enumDescriptions": {
251
+ "interactive": "同步交互:输出即回复",
252
+ "proactive": "主动推送:CLI 回复 + 思考投影"
253
+ }
254
+ },
255
+ "nothuman": {
256
+ "enum": [
257
+ "interactive",
258
+ "proactive"
259
+ ],
260
+ "description": "非人类(agent)私聊场景的投递方式",
261
+ "x-enumDescriptions": {
262
+ "interactive": "同步交互:输出即回复",
263
+ "proactive": "主动推送:CLI 回复 + 思考投影"
264
+ }
265
+ }
266
+ },
267
+ "additionalProperties": false,
268
+ "description": "chatmode 场景默认表;出厂默认值即此 default(agent 级改默认,关系级按键覆盖)。键封闭 private/group/nothuman,值枚举 interactive/proactive"
269
+ },
270
+ "mentionMode": {
271
+ "type": "string",
272
+ "enum": [
273
+ "disabled",
274
+ "mention-only"
275
+ ],
276
+ "default": "disabled",
277
+ "x-merge": "scalar",
278
+ "description": "@ 处理策略(顶层通用参数)",
279
+ "x-enumDescriptions": {
280
+ "disabled": "处理所有消息",
281
+ "mention-only": "只处理被 @ 的消息,未 @ 作引用上下文"
282
+ }
283
+ },
284
+ "model": {
285
+ "type": "string",
286
+ "x-merge": "scalar",
287
+ "description": "主会话模型(顶层通用参数);无默认值,缺省时由响应模式/全局默认决定"
288
+ },
289
+ "responseMode": {
290
+ "type": "string",
291
+ "x-merge": "scalar",
292
+ "description": "响应模式 id(标量);候选清单/默认值来自注册表,非 schema。关系级>agent级>注册表首选"
293
+ },
294
+ "responseModeParams": {
295
+ "type": "object",
296
+ "x-merge": "dict",
297
+ "description": "响应模式特有参数字典,按模式 id 分桶:{ [modeId]: {...} }"
298
+ },
299
+ "flush_delay": {
300
+ "type": "number",
301
+ "minimum": 0,
302
+ "default": 3,
303
+ "x-merge": "scalar",
304
+ "description": "流式出站消息的批量刷新间隔,单位为秒;默认 3 秒"
305
+ },
306
+ "debounce": {
307
+ "type": "number",
308
+ "minimum": 0,
309
+ "default": 0,
310
+ "x-merge": "scalar",
311
+ "description": "入站消息合并窗口,单位为秒;0 表示不合并,默认 0"
312
+ },
313
+ "show_activities": {
314
+ "type": "string",
315
+ "enum": [
316
+ "all",
317
+ "text",
318
+ "none"
319
+ ],
320
+ "default": "all",
321
+ "x-merge": "scalar",
322
+ "description": "中间输出展示范围(仅对 interactive 私聊有意义)",
323
+ "x-enumDescriptions": {
324
+ "all": "文本 + activity",
325
+ "text": "仅文本",
326
+ "none": "全部静默"
327
+ }
328
+ },
329
+ "session_renew": {
330
+ "type": "object",
331
+ "x-merge": "dict",
332
+ "additionalProperties": false,
333
+ "description": "会话超时后的续接判定",
334
+ "properties": {
335
+ "enabled": {
336
+ "type": "boolean",
337
+ "default": false,
338
+ "description": "是否启用超时后的会话连续性判定"
339
+ },
340
+ "after_hours": {
341
+ "type": "number",
342
+ "exclusiveMinimum": 0,
343
+ "default": 24,
344
+ "description": "距最后一条有效对话超过该小时数才触发判定"
345
+ },
346
+ "fallback_action": {
347
+ "type": "string",
348
+ "enum": [
349
+ "continue",
350
+ "new"
351
+ ],
352
+ "default": "continue",
353
+ "description": "无法判定时的兜底动作",
354
+ "x-enumDescriptions": {
355
+ "continue": "继续沿用当前会话",
356
+ "new": "开启新会话"
357
+ }
358
+ }
359
+ }
360
+ },
361
+ "group_venue_sync": {
362
+ "type": "object",
363
+ "x-merge": "dict",
364
+ "description": "AUN 群资源同步配置;控制规则文件路径、资源索引路径、条目/字节限制及刷新间隔。"
365
+ },
366
+ "groupRules": {
367
+ "type": "object",
368
+ "x-merge": "dict",
369
+ "additionalProperties": false,
370
+ "properties": {
371
+ "mode": {
372
+ "type": "string",
373
+ "enum": [
374
+ "load",
375
+ "ignore"
376
+ ],
377
+ "default": "load",
378
+ "description": "是否读取并注入 AUN 群已发布的 /rules.md;默认 load。"
379
+ }
380
+ },
381
+ "description": "本 Agent 对 AUN 群规则的本地加载策略。"
382
+ },
383
+ "render": {
384
+ "type": "object",
385
+ "x-merge": "dict",
386
+ "description": "私聊、群聊及注入内容使用的渲染器标识配置。"
387
+ },
388
+ "sessionManifests": {
389
+ "type": "object",
390
+ "x-merge": "dict",
391
+ "description": "会话类型到 manifest 文件的映射,用于选择对应的系统提示词清单。"
392
+ },
393
+ "enable_rich_content": {
394
+ "type": "boolean",
395
+ "x-merge": "scalar",
396
+ "description": "是否允许渠道使用富内容消息;未设置时由渠道能力和运行时默认决定"
397
+ },
398
+ "extra_backup": {
399
+ "type": "array",
400
+ "items": {
401
+ "type": "object",
402
+ "description": "一个额外备份规则,包含相对 path 和可选的文件匹配 pattern。"
403
+ },
404
+ "x-merge": "list",
405
+ "description": "配置快照需要额外包含的文件声明;不得指向 .env。"
406
+ }
407
+ }
408
+ }
@@ -0,0 +1,136 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "daemon.schema.5.json",
4
+ "title": "ProcessConfig v5 (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": 5, "default": 5, "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
+ "gatewayUrl": {
68
+ "not": {},
69
+ "description": "已移除;网关由 fastaun 缓存和 AID discovery 决定"
70
+ },
71
+ "defaultAidDomain": {
72
+ "type": "string",
73
+ "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)+$",
74
+ "description": "自动生成控制 AID 与 benchmark AID 使用的后缀域名;不影响已有 AID"
75
+ },
76
+ "minEvolVersion": {
77
+ "type": "string",
78
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$",
79
+ "description": "AUN Menu 允许的最低 Evol 客户端版本;省略时不限制"
80
+ },
81
+ "menuTokenRequired": {
82
+ "type": "boolean",
83
+ "default": false,
84
+ "description": "是否要求普通 AUN Menu 请求携带有效 menu_token;默认 false"
85
+ },
86
+ "defaultEncrypt": {
87
+ "type": "boolean",
88
+ "description": "所有 daemon 管理的 AUN 通道共用的出站默认加密值;省略时为 true"
89
+ }
90
+ }
91
+ },
92
+ "serviceProxy": {
93
+ "type": "object",
94
+ "description": "AUN Service Proxy:把一个本地 HTTP/WS 服务暴露到 AUN 网络",
95
+ "x-merge": "dict",
96
+ "properties": {
97
+ "enabled": { "type": "boolean", "description": "是否启用 Service Proxy" },
98
+ "services": { "type": "array", "description": "暴露到 AUN 的本地服务列表", "items": { "type": "object" } }
99
+ }
100
+ },
101
+ "configSnapshots": {
102
+ "type": "boolean",
103
+ "default": true,
104
+ "description": "是否自动维护配置快照、启动日志和自检回落",
105
+ "x-merge": "scalar"
106
+ },
107
+ "idleMonitor": {
108
+ "type": "object",
109
+ "description": "流式输出空闲监控配置",
110
+ "x-merge": "dict",
111
+ "properties": {
112
+ "enabled": { "type": "boolean", "default": true, "description": "是否启用空闲监控" },
113
+ "timeout": { "type": "number", "default": 120, "description": "空闲超时秒数" },
114
+ "retryAttemptTimeout": { "type": "number", "description": "API 重试尝试连续无事件时的超时秒数;未设置时继承 timeout" },
115
+ "maxExecutionTime": { "type": "number", "description": "单个任务总执行时限(秒);未配置、非数字或小于等于 0 表示不限制" }
116
+ }
117
+ },
118
+ "ecweb": {
119
+ "type": "object",
120
+ "description": "web 控制台开关/端口",
121
+ "x-merge": "dict",
122
+ "properties": {
123
+ "enabled": { "type": "boolean", "description": "是否启用 web 控制台" },
124
+ "port": { "type": "number", "description": "web 控制台监听端口" }
125
+ }
126
+ },
127
+ "watch": {
128
+ "type": "object",
129
+ "description": "日志监听配置",
130
+ "x-merge": "dict",
131
+ "properties": {
132
+ "logTypes": { "type": "array", "description": "要监听的日志类型", "items": { "type": "string" } }
133
+ }
134
+ }
135
+ }
136
+ }
@@ -0,0 +1,107 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "defaults.schema.5.json",
4
+ "title": "DefaultsConfig v5 (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": 5, "default": 5, "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 等),以及仅 defaults 可定义的备用模型链。",
33
+ "x-merge": "dict",
34
+ "additionalProperties": {
35
+ "type": "object",
36
+ "additionalProperties": true,
37
+ "properties": {
38
+ "headers": {
39
+ "type": "object",
40
+ "propertyNames": { "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$" },
41
+ "additionalProperties": { "type": "string", "pattern": "^[^\\u0000\\r\\n]*$" }
42
+ },
43
+ "queryParams": {
44
+ "type": "object",
45
+ "propertyNames": { "minLength": 1 },
46
+ "additionalProperties": { "type": "string" }
47
+ },
48
+ "fallbackModels": {
49
+ "type": "array",
50
+ "maxItems": 3,
51
+ "description": "同 base agent 的有序备用模型链;为空时禁用自动模型降级。",
52
+ "items": {
53
+ "type": "object",
54
+ "additionalProperties": false,
55
+ "required": ["model"],
56
+ "properties": {
57
+ "model": { "type": "string", "minLength": 1 },
58
+ "effort": { "type": "string", "minLength": 1 }
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
64
+ },
65
+ "projects": {
66
+ "type": "object",
67
+ "description": "项目路径配置",
68
+ "x-merge": "dict",
69
+ "properties": {
70
+ "rootPath": { "type": "string", "description": "全局项目根路径" },
71
+ "defaultPath": { "type": "string", "description": "全局默认项目路径" }
72
+ }
73
+ },
74
+ "aun": {
75
+ "type": "object",
76
+ "description": "全局 AUN 配置",
77
+ "x-merge": "dict",
78
+ "properties": {
79
+ "keystorePath": { "type": "string" },
80
+ "encryptionSeed": { "type": "string" },
81
+ "gatewayUrl": { "not": {}, "description": "已移除;网关由 fastaun 缓存和 AID discovery 决定" },
82
+ "defaultEncrypt": {
83
+ "not": {},
84
+ "description": "不支持在 Agent defaults 配置;请使用 daemon.json.aun.defaultEncrypt"
85
+ }
86
+ }
87
+ },
88
+ "responseMode": { "type": "string", "x-merge": "scalar" },
89
+ "responseModeParams": {
90
+ "type": "object",
91
+ "x-merge": "dict",
92
+ "description": "响应模式特有参数的全局默认字典,按模式 id 分桶:{ [modeId]: {...} }"
93
+ },
94
+ "config": { "type": "object", "x-merge": "dict" },
95
+ "session_renew": {
96
+ "type": "object",
97
+ "description": "会话超时后的续接判定策略,默认关闭",
98
+ "x-merge": "dict",
99
+ "additionalProperties": false,
100
+ "properties": {
101
+ "enabled": { "type": "boolean", "default": false, "description": "是否启用超时后的会话连续性判定" },
102
+ "after_hours": { "type": "number", "exclusiveMinimum": 0, "default": 24, "description": "距最后一条有效对话超过该小时数才触发判定" },
103
+ "fallback_action": { "type": "string", "enum": ["continue", "new"], "default": "continue", "description": "无法判定时的兜底动作", "x-enumDescriptions": { "continue": "继续沿用当前会话", "new": "开启新会话" } }
104
+ }
105
+ }
106
+ }
107
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evolcore",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
4
4
  "description": "AI Agent gateway connecting Claude, Codex, Gemini, and the bundled ecagent runner to messaging channels with multi-project session management",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -32,6 +32,7 @@
32
32
  "!evolcore-install-aun.md"
33
33
  ],
34
34
  "scripts": {
35
+ "postinstall": "node bin/install-codex-managed-hooks.mjs",
35
36
  "predev": "npm run build:ecagent",
36
37
  "dev": "tsx watch src/index.ts",
37
38
  "build:ecagent": "npm --prefix ecagent run build",