evolcore 0.0.43-test.1 → 0.0.43-test.3

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 (200) hide show
  1. package/CHANGELOG.md +31 -1
  2. package/README.md +22 -0
  3. package/dist/agents/claude-runner.js +26 -2
  4. package/dist/agents/codex/app-server-client.js +12 -0
  5. package/dist/agents/codex-runner.js +49 -8
  6. package/dist/agents/ecagent-runner.js +39 -15
  7. package/dist/agents/gemini-runner.js +15 -12
  8. package/dist/agents/tool-time-context.js +55 -0
  9. package/dist/aun/aid/agentmd.js +21 -1
  10. package/dist/aun/menu/client.js +1 -1
  11. package/dist/aun/model-headers.js +17 -0
  12. package/dist/aun/msg/p2p.js +7 -2
  13. package/dist/channels/aun.js +522 -50
  14. package/dist/channels/builtin-plugins.js +16 -11
  15. package/dist/channels/daemon.js +4 -0
  16. package/dist/channels/dingtalk.js +83 -31
  17. package/dist/channels/feishu.js +29 -13
  18. package/dist/channels/qqbot.js +32 -11
  19. package/dist/channels/wechat.js +13 -3
  20. package/dist/channels/wecom.js +67 -27
  21. package/dist/cli/agent-command.js +3 -86
  22. package/dist/cli/agent-create.js +20 -6
  23. package/dist/cli/agent.js +1 -79
  24. package/dist/cli/aun-commands.js +18 -19
  25. package/dist/cli/config.js +1 -1
  26. package/dist/cli/daemon-commands.js +47 -2
  27. package/dist/cli/data-command.js +9 -1
  28. package/dist/cli/debug-mode.js +1 -1
  29. package/dist/cli/diag.js +1 -1
  30. package/dist/cli/directory.js +149 -91
  31. package/dist/cli/getmeta-command.js +1 -1
  32. package/dist/cli/index.js +79 -22
  33. package/dist/cli/init.js +1 -23
  34. package/dist/cli/link-rules.js +1 -1
  35. package/dist/cli/managed-command-guard.js +0 -1
  36. package/dist/cli/pa-workspace-command.js +36 -2
  37. package/dist/cli/peer.js +3 -2
  38. package/dist/cli/restart-monitor.js +17 -3
  39. package/dist/cli/role.js +1 -1
  40. package/dist/cli/session-command.js +1 -1
  41. package/dist/cli/stats.js +2 -2
  42. package/dist/cli/task-context.js +3 -1
  43. package/dist/cli/thread-command.js +1 -1
  44. package/dist/cli/watch-msg.js +1 -1
  45. package/dist/config/builtin-role-templates.js +2 -2
  46. package/dist/config/builtin-roles.js +2 -1
  47. package/dist/config/config-field-policy.js +7 -2
  48. package/dist/config/config-manager.js +32 -10
  49. package/dist/config/peer-role-resolver.js +23 -1
  50. package/dist/config/role-schema.js +29 -4
  51. package/dist/config/role-service.js +12 -7
  52. package/dist/config/role-store.js +30 -8
  53. package/dist/config-store.js +75 -4
  54. package/dist/core/agent-ipc-registration.js +16 -59
  55. package/dist/core/auth/auth-gateway.js +14 -4
  56. package/dist/core/auth/authorization-audit.js +52 -14
  57. package/dist/core/auth/operation-authorizer.js +17 -11
  58. package/dist/core/auth/operation-catalog.js +5 -13
  59. package/dist/core/channel-loader.js +152 -16
  60. package/dist/core/channel-runtime.js +5 -0
  61. package/dist/core/command/agent-control.js +2 -1
  62. package/dist/core/command/agentmd-menu-request.js +50 -0
  63. package/dist/core/command/agentmd-menu.js +156 -0
  64. package/dist/core/command/cli-intent-parser.js +0 -8
  65. package/dist/core/command/command-handler.js +47 -40
  66. package/dist/core/command/connect-menu.js +7 -3
  67. package/dist/core/command/menu-catalog.js +16 -2
  68. package/dist/core/command/menu-handler.js +107 -14
  69. package/dist/core/command/menu-protocol.js +28 -0
  70. package/dist/core/command/role-menu.js +23 -9
  71. package/dist/core/command/slash-handler.js +139 -51
  72. package/dist/core/daemon-file-cache.js +3 -3
  73. package/dist/core/daemon-lifecycle.js +9 -1
  74. package/dist/core/evolagent-registry.js +5 -4
  75. package/dist/core/evolagent.js +10 -12
  76. package/dist/core/handoff/argv-parse.js +115 -0
  77. package/dist/core/handoff/ipc-registration.js +1 -1
  78. package/dist/core/ipc-registration.js +19 -2
  79. package/dist/core/lifecycle-notice.js +185 -0
  80. package/dist/core/memory/consolidation.js +8 -1
  81. package/dist/core/memory/relation-sweep.js +20 -8
  82. package/dist/core/message/aun-ipc-sender.js +35 -2
  83. package/dist/core/message/contact-admission.js +530 -0
  84. package/dist/core/message/im-renderer.js +111 -16
  85. package/dist/core/message/message-admission.js +29 -54
  86. package/dist/core/message/message-bridge.js +62 -8
  87. package/dist/core/message/message-utils.js +9 -5
  88. package/dist/core/message/peer-mode.js +55 -13
  89. package/dist/core/message/response-engine.js +298 -78
  90. package/dist/core/message/retry-scheduler.js +4 -0
  91. package/dist/core/ownership/owner-resolver.js +72 -34
  92. package/dist/core/permission/ec-command-parser.js +25 -38
  93. package/dist/core/permission/readonly-shell-query.js +34 -8
  94. package/dist/core/permission/tool-policy.js +50 -5
  95. package/dist/core/relation/pa-team.js +127 -0
  96. package/dist/core/role/runtime-policy.js +18 -5
  97. package/dist/core/session/session-manager.js +9 -1
  98. package/dist/core/soul.js +66 -0
  99. package/dist/core/system-session/memory.js +2 -2
  100. package/dist/core/thread/thread-service.js +6 -4
  101. package/dist/directory/contact-admission-paths.js +9 -0
  102. package/dist/directory/owner-directory-admission.js +125 -29
  103. package/dist/directory/owner-directory-cache.js +554 -58
  104. package/dist/directory/owner-directory-identity.js +60 -0
  105. package/dist/directory/owner-directory-markdown.js +154 -58
  106. package/dist/directory/owner-directory-policy.js +108 -0
  107. package/dist/directory/owner-directory-query-operation.js +399 -90
  108. package/dist/directory/owner-directory-remarks.js +29 -2
  109. package/dist/directory/owner-directory-request-operation.js +76 -0
  110. package/dist/directory/owner-directory-scope.js +35 -4
  111. package/dist/directory/owner-directory-search.js +118 -33
  112. package/dist/directory/owner-directory-store.js +117 -30
  113. package/dist/directory/owner-directory-text.js +60 -0
  114. package/dist/eck/kit-renderer.js +18 -8
  115. package/dist/eck/manifest-engine.js +55 -6
  116. package/dist/ecweb/basic-settings-service.js +2 -2
  117. package/dist/ecweb/message-context-service.js +28 -16
  118. package/dist/index.js +20 -5
  119. package/dist/ipc.js +1 -1
  120. package/dist/paths.js +29 -1
  121. package/dist/product.js +1 -0
  122. package/dist/response-system/config-resolver.js +1 -1
  123. package/dist/response-system/engines/v1/index.js +2 -1
  124. package/dist/response-system/modes/single-session/index.js +7 -2
  125. package/dist/trigger/scheduler.js +7 -4
  126. package/dist/trigger/validation.js +4 -0
  127. package/dist/utils/error-utils.js +12 -7
  128. package/dist/utils/logger.js +13 -4
  129. package/dist/utils/npm-ops.js +2 -2
  130. package/dist/utils/windows-autostart.js +1 -1
  131. package/ecagent/README.md +18 -0
  132. package/ecagent/dist/agent-loop.js +43 -1
  133. package/ecagent/dist/harness/agent-harness.d.ts +2 -0
  134. package/ecagent/dist/harness/agent-harness.js +24 -8
  135. package/ecagent/dist/harness/compaction/compaction.js +3 -0
  136. package/ecagent/dist/harness/types.d.ts +1 -0
  137. package/kits/docs/INDEX.md +1 -0
  138. package/kits/docs/channels/aun.md +1 -1
  139. package/kits/docs/context-assembly.md +21 -6
  140. package/kits/docs/eck_templates/INDEX.template.md +1 -2
  141. package/kits/docs/evolcore/INDEX.md +4 -1
  142. package/kits/docs/evolcore/agent-create.md +5 -5
  143. package/kits/docs/evolcore/agent.md +4 -9
  144. package/kits/docs/evolcore/directory.md +227 -0
  145. package/kits/docs/evolcore/ecweb-lifecycle.md +26 -0
  146. package/kits/docs/evolcore/file-navigation.md +265 -0
  147. package/kits/docs/evolcore/menu-protocol.md +55 -0
  148. package/kits/docs/evolcore/msg.md +1 -0
  149. package/kits/docs/evolcore/peer.md +2 -1
  150. package/kits/docs/evolcore/response.md +7 -1
  151. package/kits/docs/evolcore/task.md +2 -0
  152. package/kits/docs/evolcore/tool-authorization.md +1 -1
  153. package/kits/docs/evolcore/trigger.md +4 -0
  154. package/kits/docs/identity/ROLE_DETAIL.md +2 -0
  155. package/kits/docs/prompt-loading-architecture.md +6 -2
  156. package/kits/eck_manifest.auxiliary.json +1 -0
  157. package/kits/eck_manifest.json +64 -7
  158. package/kits/eck_manifest.memory.json +93 -4
  159. package/kits/rules/01-overview.md +2 -2
  160. package/kits/rules/03-identity.md +10 -9
  161. package/kits/rules/05-venue.md +2 -4
  162. package/kits/rules/06-channel.md +1 -1
  163. package/kits/schemas/_meta.json +44 -3
  164. package/kits/schemas/agent-config.schema.18.json +5 -0
  165. package/kits/schemas/agent-config.schema.19.json +924 -0
  166. package/kits/schemas/agent-config.schema.20.json +925 -0
  167. package/kits/schemas/relation-config.schema.12.json +289 -0
  168. package/kits/schemas/relation-config.schema.13.json +289 -0
  169. package/kits/schemas/role-config.schema.2.json +215 -0
  170. package/kits/schemas/role-config.schema.3.json +1038 -0
  171. package/kits/schemas/role-registry.schema.1.json +3 -2
  172. package/kits/skills/ec-skill/scripts/cli.mjs +3 -2
  173. package/kits/skills/ec-trigger/SKILL.md +4 -4
  174. package/kits/skills/personal-assistant/SKILL.md +109 -53
  175. package/kits/skills/personal-assistant/references/02-bootstrap.md +73 -30
  176. package/kits/skills/personal-assistant/scripts/clean.mjs +35 -18
  177. package/kits/skills/personal-assistant/scripts/init.mjs +41 -2
  178. package/kits/skills/personal-assistant/scripts/lib/persona.mjs +185 -0
  179. package/kits/skills/personal-assistant/scripts/migrate.mjs +55 -4
  180. package/kits/skills/personal-assistant/scripts/pa.mjs +173 -0
  181. package/kits/skills/personal-assistant/scripts/uninstall.mjs +130 -0
  182. package/kits/skills/personal-assistant/templates/persona-section.md +3 -3
  183. package/kits/templates/message-fragments/handoff-request-to-target.md +1 -1
  184. package/kits/templates/soul/00-GUIDE.md +39 -0
  185. package/kits/templates/soul/01-identity.md +5 -0
  186. package/kits/templates/soul/02-persona.md +11 -0
  187. package/kits/templates/soul/03-duties.md +5 -0
  188. package/kits/templates/soul/04-working-style.md +5 -0
  189. package/kits/templates/system-fragments/bootstrap.md +7 -7
  190. package/kits/templates/system-fragments/channel.md +2 -2
  191. package/kits/templates/system-fragments/commands.md +3 -2
  192. package/kits/templates/system-fragments/directory-contacts.md +9 -0
  193. package/kits/templates/system-fragments/memory.md +1 -1
  194. package/kits/templates/system-fragments/personal-assistant.md +50 -0
  195. package/kits/templates/system-fragments/reply.md +7 -0
  196. package/kits/templates/system-fragments/session.md +6 -2
  197. package/package.json +3 -2
  198. package/dist/cli/handoff-command.js +0 -353
  199. package/dist/directory/owner-directory-remark-operation.js +0 -147
  200. package/kits/docs/evolcore/self-summary.md +0 -29
@@ -0,0 +1,1038 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "role-config.schema.3.json",
4
+ "title": "RoleConfig (agents/{aid}/roles/{roleId}.json)",
5
+ "description": "单个角色的独立策略配置。角色 ID 由文件名表达,本文件定义访问权限、行为字段约束、命令权限和用量额度。",
6
+ "x-logical-name": "role-config",
7
+ "x-scope": "role",
8
+ "x-permission-fields": [
9
+ {
10
+ "value": "permissionMode",
11
+ "label": "Permission Mode",
12
+ "description": "角色的工具调用审批模式;只能由角色策略决定,关系级不可覆盖。",
13
+ "valueType": "enum",
14
+ "hasOptions": true,
15
+ "relationOverrideApplied": false,
16
+ "constraintsApplied": true,
17
+ "editable": true,
18
+ "x-runtimeApplied": true,
19
+ "x-optionsSource": "static-enum",
20
+ "options": [
21
+ {
22
+ "value": "readonly",
23
+ "label": "Readonly"
24
+ },
25
+ {
26
+ "value": "auto",
27
+ "label": "Auto"
28
+ },
29
+ {
30
+ "value": "request",
31
+ "label": "Request"
32
+ },
33
+ {
34
+ "value": "bypass",
35
+ "label": "Bypass"
36
+ }
37
+ ]
38
+ },
39
+ {
40
+ "value": "chatmode.private",
41
+ "label": "Private Chat Mode",
42
+ "description": "角色在私聊场景中的响应方式策略。",
43
+ "valueType": "enum",
44
+ "hasOptions": true,
45
+ "relationOverrideApplied": true,
46
+ "constraintsApplied": true,
47
+ "editable": true,
48
+ "x-runtimeApplied": true,
49
+ "x-optionsSource": "static-enum",
50
+ "options": [
51
+ {
52
+ "value": "interactive",
53
+ "label": "Interactive"
54
+ },
55
+ {
56
+ "value": "proactive",
57
+ "label": "Proactive"
58
+ },
59
+ {
60
+ "value": "paactive",
61
+ "label": "PA Activity"
62
+ }
63
+ ]
64
+ },
65
+ {
66
+ "value": "chatmode.group",
67
+ "label": "Group Chat Mode",
68
+ "description": "角色在群聊场景中的响应方式策略。",
69
+ "valueType": "enum",
70
+ "hasOptions": true,
71
+ "relationOverrideApplied": true,
72
+ "constraintsApplied": true,
73
+ "editable": true,
74
+ "x-runtimeApplied": true,
75
+ "x-optionsSource": "static-enum",
76
+ "options": [
77
+ {
78
+ "value": "proactive",
79
+ "label": "Proactive"
80
+ }
81
+ ]
82
+ },
83
+ {
84
+ "value": "mentionMode",
85
+ "label": "Group Mention Mode",
86
+ "description": "角色在群聊场景中的提及响应策略。",
87
+ "valueType": "enum",
88
+ "hasOptions": true,
89
+ "relationOverrideApplied": true,
90
+ "constraintsApplied": true,
91
+ "editable": true,
92
+ "x-runtimeApplied": true,
93
+ "x-optionsSource": "static-enum",
94
+ "options": [
95
+ {
96
+ "value": "disabled",
97
+ "label": "Disabled"
98
+ },
99
+ {
100
+ "value": "mention-only",
101
+ "label": "Mention Only"
102
+ },
103
+ {
104
+ "value": "auto",
105
+ "label": "Auto"
106
+ }
107
+ ]
108
+ },
109
+ {
110
+ "value": "baseagents.claude.model",
111
+ "label": "Claude Model",
112
+ "description": "角色对 Agent 级 Claude 模型的约束(固定模型 / 模型白名单);模型只在 Agent 级配置,角色不提供模型。",
113
+ "valueType": "model",
114
+ "hasOptions": true,
115
+ "relationOverrideApplied": false,
116
+ "constraintsApplied": true,
117
+ "editable": true,
118
+ "x-runtimeApplied": true,
119
+ "x-optionsSource": "model-catalog",
120
+ "patterns": [
121
+ {
122
+ "value": "*",
123
+ "label": "All Claude models"
124
+ },
125
+ {
126
+ "value": "claude-opus-*",
127
+ "label": "Claude Opus family"
128
+ },
129
+ {
130
+ "value": "claude-sonnet-*",
131
+ "label": "Claude Sonnet family"
132
+ },
133
+ {
134
+ "value": "claude-haiku-*",
135
+ "label": "Claude Haiku family"
136
+ }
137
+ ]
138
+ },
139
+ {
140
+ "value": "baseagents.claude.effort",
141
+ "label": "Claude Effort",
142
+ "description": "角色使用 Claude 时的默认推理强度及可覆盖范围。",
143
+ "valueType": "enum",
144
+ "hasOptions": true,
145
+ "relationOverrideApplied": false,
146
+ "constraintsApplied": true,
147
+ "editable": true,
148
+ "x-runtimeApplied": true,
149
+ "x-optionsSource": "static-enum",
150
+ "options": [
151
+ {
152
+ "value": "auto",
153
+ "label": "Auto"
154
+ },
155
+ {
156
+ "value": "low",
157
+ "label": "Low"
158
+ },
159
+ {
160
+ "value": "medium",
161
+ "label": "Medium"
162
+ },
163
+ {
164
+ "value": "high",
165
+ "label": "High"
166
+ },
167
+ {
168
+ "value": "xhigh",
169
+ "label": "Xhigh"
170
+ },
171
+ {
172
+ "value": "max",
173
+ "label": "Max"
174
+ }
175
+ ]
176
+ },
177
+ {
178
+ "value": "baseagents.codex.model",
179
+ "label": "Codex Model",
180
+ "description": "角色对 Agent 级 Codex 模型的约束(固定模型 / 模型白名单);模型只在 Agent 级配置,角色不提供模型。",
181
+ "valueType": "model",
182
+ "hasOptions": true,
183
+ "relationOverrideApplied": false,
184
+ "constraintsApplied": true,
185
+ "editable": true,
186
+ "x-runtimeApplied": true,
187
+ "x-optionsSource": "model-catalog",
188
+ "patterns": [
189
+ {
190
+ "value": "*",
191
+ "label": "All Codex models"
192
+ },
193
+ {
194
+ "value": "gpt-5.4*",
195
+ "label": "GPT-5.4 family"
196
+ },
197
+ {
198
+ "value": "gpt-5.3-codex*",
199
+ "label": "GPT-5.3 Codex family"
200
+ }
201
+ ]
202
+ },
203
+ {
204
+ "value": "baseagents.codex.effort",
205
+ "label": "Codex Effort",
206
+ "description": "角色使用 Codex 时的默认推理强度及可覆盖范围。",
207
+ "valueType": "enum",
208
+ "hasOptions": true,
209
+ "relationOverrideApplied": false,
210
+ "constraintsApplied": true,
211
+ "editable": true,
212
+ "x-runtimeApplied": true,
213
+ "x-optionsSource": "static-enum",
214
+ "options": [
215
+ {
216
+ "value": "auto",
217
+ "label": "Auto"
218
+ },
219
+ {
220
+ "value": "low",
221
+ "label": "Low"
222
+ },
223
+ {
224
+ "value": "medium",
225
+ "label": "Medium"
226
+ },
227
+ {
228
+ "value": "high",
229
+ "label": "High"
230
+ },
231
+ {
232
+ "value": "xhigh",
233
+ "label": "Xhigh"
234
+ },
235
+ {
236
+ "value": "max",
237
+ "label": "Max"
238
+ }
239
+ ]
240
+ },
241
+ {
242
+ "value": "baseagents.ecagent.model",
243
+ "label": "EC Agent Model",
244
+ "description": "角色对 Agent 级 ecagent 模型的约束(固定模型 / 模型白名单);模型只在 Agent 级配置,角色不提供模型。",
245
+ "valueType": "model",
246
+ "hasOptions": true,
247
+ "relationOverrideApplied": false,
248
+ "constraintsApplied": true,
249
+ "editable": true,
250
+ "x-runtimeApplied": true,
251
+ "x-optionsSource": "model-catalog",
252
+ "patterns": [
253
+ {
254
+ "value": "*",
255
+ "label": "All ecagent models"
256
+ }
257
+ ]
258
+ },
259
+ {
260
+ "value": "baseagents.ecagent.effort",
261
+ "label": "EC Agent Effort",
262
+ "description": "角色使用 ecagent 时的默认推理强度及可覆盖范围。",
263
+ "valueType": "enum",
264
+ "hasOptions": true,
265
+ "relationOverrideApplied": false,
266
+ "constraintsApplied": true,
267
+ "editable": true,
268
+ "x-runtimeApplied": true,
269
+ "x-optionsSource": "static-enum",
270
+ "options": [
271
+ {
272
+ "value": "auto",
273
+ "label": "Auto"
274
+ },
275
+ {
276
+ "value": "low",
277
+ "label": "Low"
278
+ },
279
+ {
280
+ "value": "medium",
281
+ "label": "Medium"
282
+ },
283
+ {
284
+ "value": "high",
285
+ "label": "High"
286
+ },
287
+ {
288
+ "value": "xhigh",
289
+ "label": "Xhigh"
290
+ },
291
+ {
292
+ "value": "max",
293
+ "label": "Max"
294
+ }
295
+ ]
296
+ },
297
+ {
298
+ "value": "baseagents.gemini.model",
299
+ "label": "Gemini Model",
300
+ "description": "角色对 Agent 级 Gemini 模型的约束(固定模型 / 模型白名单);模型只在 Agent 级配置,角色不提供模型。",
301
+ "valueType": "model",
302
+ "hasOptions": true,
303
+ "relationOverrideApplied": false,
304
+ "constraintsApplied": true,
305
+ "editable": true,
306
+ "x-runtimeApplied": true,
307
+ "x-optionsSource": "model-catalog",
308
+ "patterns": [
309
+ {
310
+ "value": "*",
311
+ "label": "All Gemini models"
312
+ },
313
+ {
314
+ "value": "gemini-*",
315
+ "label": "Gemini model family"
316
+ }
317
+ ]
318
+ }
319
+ ],
320
+ "type": "object",
321
+ "additionalProperties": false,
322
+ "required": [
323
+ "$schema_version",
324
+ "description",
325
+ "permissions"
326
+ ],
327
+ "properties": {
328
+ "$schema_version": {
329
+ "type": "number",
330
+ "const": 3,
331
+ "default": 3,
332
+ "description": "角色配置 Schema 版本;v3 固定群聊 chatmode 为 proactive"
333
+ },
334
+ "description": {
335
+ "type": "string",
336
+ "description": "角色的用途、信任级别和授权边界说明。"
337
+ },
338
+ "rank": {
339
+ "type": "integer",
340
+ "enum": [
341
+ 100,
342
+ 300,
343
+ 500,
344
+ 700,
345
+ 900
346
+ ],
347
+ "description": "角色排序系数;内置角色固定,自定义角色固定为 500。旧文件缺省时由角色加载器补齐。"
348
+ },
349
+ "allowAccess": {
350
+ "type": "boolean",
351
+ "default": true,
352
+ "description": "是否允许该角色访问 Agent;缺省为 true。"
353
+ },
354
+ "permissions": {
355
+ "type": "object",
356
+ "required": [
357
+ "permissionMode"
358
+ ],
359
+ "description": "角色对运行时行为字段施加的默认值、关系级覆盖权及候选值约束。",
360
+ "properties": {
361
+ "permissionMode": {
362
+ "type": "object",
363
+ "required": [
364
+ "default",
365
+ "allowOverride"
366
+ ],
367
+ "additionalProperties": false,
368
+ "description": "工具调用审批模式策略;该策略必须存在且不允许关系级覆盖。",
369
+ "properties": {
370
+ "default": {
371
+ "type": "string",
372
+ "enum": [
373
+ "readonly",
374
+ "auto",
375
+ "request",
376
+ "bypass"
377
+ ],
378
+ "description": "该角色实际使用的工具调用审批模式。",
379
+ "x-enumDescriptions": {
380
+ "readonly": "只读模式:明确只读工具和普通路径上的受限只读 Shell 自动执行;写入、H/L 类读取、未知 Shell 和未知工具拒绝;EC 命令仍由 daemon 鉴权",
381
+ "auto": "自动模式:常规 workspace 操作自动执行,已识别危险操作和扩权请求拒绝",
382
+ "request": "请求模式:常规操作自动执行,危险 Bash 和沙箱扩权请求人工审批",
383
+ "bypass": "放行模式:沙箱内常规和普通审批命令自动执行,强危险 Git 和越界扩权仍需审批"
384
+ }
385
+ },
386
+ "allowOverride": {
387
+ "const": false,
388
+ "default": false,
389
+ "description": "权限模式禁止关系级覆盖,固定为 false。"
390
+ },
391
+ "allowedValues": {
392
+ "type": "array",
393
+ "items": {
394
+ "type": "string",
395
+ "enum": [
396
+ "readonly",
397
+ "auto",
398
+ "request",
399
+ "bypass"
400
+ ],
401
+ "description": "一个可列入权限模式候选集合的值。",
402
+ "x-enumDescriptions": {
403
+ "readonly": "只读模式",
404
+ "auto": "自动模式",
405
+ "request": "请求人工审批模式",
406
+ "bypass": "受强制危险规则约束的放行模式"
407
+ }
408
+ },
409
+ "uniqueItems": true,
410
+ "description": "保留的权限模式候选集合;permissionMode 当前不可由关系级覆盖,通常无需配置。"
411
+ },
412
+ "reason": {
413
+ "type": "string",
414
+ "description": "采用该权限模式策略的可审计原因或管理备注。"
415
+ }
416
+ }
417
+ },
418
+ "chatmode.private": {
419
+ "type": "object",
420
+ "required": [
421
+ "default",
422
+ "allowOverride"
423
+ ],
424
+ "additionalProperties": false,
425
+ "description": "该角色在私聊场景中的响应方式策略。",
426
+ "properties": {
427
+ "default": {
428
+ "type": "string",
429
+ "enum": [
430
+ "interactive",
431
+ "proactive",
432
+ "paactive"
433
+ ],
434
+ "description": "未设置有效关系级覆盖时使用的私聊响应方式。",
435
+ "x-enumDescriptions": {
436
+ "interactive": "同步交互:输出即回复",
437
+ "proactive": "主动推送:CLI 回复 + 思考投影",
438
+ "paactive": "PA 模式:模型文本作为 activity,正式回复使用 CLI"
439
+ }
440
+ },
441
+ "allowOverride": {
442
+ "type": "boolean",
443
+ "default": false,
444
+ "description": "是否允许该角色在关系级覆盖私聊响应方式;缺省为 false。"
445
+ },
446
+ "allowedValues": {
447
+ "type": "array",
448
+ "items": {
449
+ "type": "string",
450
+ "enum": [
451
+ "interactive",
452
+ "proactive",
453
+ "paactive"
454
+ ],
455
+ "description": "一个可用于私聊响应方式覆盖的值。",
456
+ "x-enumDescriptions": {
457
+ "interactive": "同步交互:输出即回复",
458
+ "proactive": "主动推送:CLI 回复 + 思考投影",
459
+ "paactive": "PA 模式:模型文本作为 activity,正式回复使用 CLI"
460
+ }
461
+ },
462
+ "uniqueItems": true,
463
+ "description": "允许关系级覆盖到的私聊响应方式白名单;若提供,必须包含 default。"
464
+ },
465
+ "reason": {
466
+ "type": "string",
467
+ "description": "采用该私聊响应策略的可审计原因或管理备注。"
468
+ }
469
+ }
470
+ },
471
+ "chatmode.group": {
472
+ "type": "object",
473
+ "required": [
474
+ "default",
475
+ "allowOverride"
476
+ ],
477
+ "additionalProperties": false,
478
+ "description": "该角色在群聊场景中的响应方式;群聊固定为 proactive。",
479
+ "properties": {
480
+ "default": {
481
+ "type": "string",
482
+ "enum": [
483
+ "proactive"
484
+ ],
485
+ "description": "群聊唯一有效的响应方式。",
486
+ "x-enumDescriptions": {
487
+ "proactive": "主动推送:CLI 回复 + 思考投影"
488
+ }
489
+ },
490
+ "allowOverride": {
491
+ "type": "boolean",
492
+ "default": false,
493
+ "description": "是否允许该角色在关系级覆盖群聊响应方式;缺省为 false。"
494
+ },
495
+ "allowedValues": {
496
+ "type": "array",
497
+ "items": {
498
+ "type": "string",
499
+ "enum": [
500
+ "proactive"
501
+ ],
502
+ "description": "一个可用于群聊响应方式覆盖的值。",
503
+ "x-enumDescriptions": {
504
+ "proactive": "主动推送:CLI 回复 + 思考投影"
505
+ }
506
+ },
507
+ "uniqueItems": true,
508
+ "description": "群聊响应方式固定为 proactive;如存在该字段,必须包含 proactive。"
509
+ },
510
+ "reason": {
511
+ "type": "string",
512
+ "description": "采用该群聊响应策略的可审计原因或管理备注。"
513
+ }
514
+ }
515
+ },
516
+ "mentionMode": {
517
+ "type": "object",
518
+ "required": [
519
+ "default",
520
+ "allowOverride"
521
+ ],
522
+ "additionalProperties": false,
523
+ "description": "该角色在群聊场景中的提及响应策略。",
524
+ "properties": {
525
+ "default": {
526
+ "type": "string",
527
+ "enum": [
528
+ "disabled",
529
+ "mention-only",
530
+ "auto"
531
+ ],
532
+ "description": "未设置有效关系级覆盖时使用的群聊提及响应策略。",
533
+ "x-enumDescriptions": {
534
+ "disabled": "不要求被提及即可响应",
535
+ "mention-only": "仅在被明确提及时响应",
536
+ "auto": "按群内上下文自动判断"
537
+ }
538
+ },
539
+ "allowOverride": {
540
+ "type": "boolean",
541
+ "default": false,
542
+ "description": "是否允许该角色在关系级覆盖群聊提及响应策略;缺省为 false。"
543
+ },
544
+ "allowedValues": {
545
+ "type": "array",
546
+ "items": {
547
+ "type": "string",
548
+ "enum": [
549
+ "disabled",
550
+ "mention-only",
551
+ "auto"
552
+ ],
553
+ "description": "一个可用于群聊提及响应策略覆盖的值。",
554
+ "x-enumDescriptions": {
555
+ "disabled": "不要求被提及即可响应",
556
+ "mention-only": "仅在被明确提及时响应",
557
+ "auto": "按群内上下文自动判断"
558
+ }
559
+ },
560
+ "uniqueItems": true,
561
+ "description": "允许关系级覆盖到的群聊提及响应策略白名单;若提供,必须包含 default。"
562
+ },
563
+ "reason": {
564
+ "type": "string",
565
+ "description": "采用该群聊提及响应策略的可审计原因或管理备注。"
566
+ }
567
+ }
568
+ },
569
+ "baseagents.claude.effort": {
570
+ "type": "object",
571
+ "required": [
572
+ "default",
573
+ "allowOverride"
574
+ ],
575
+ "additionalProperties": false,
576
+ "description": "该角色使用 Claude runner 时的推理强度策略。",
577
+ "properties": {
578
+ "default": {
579
+ "type": "string",
580
+ "enum": [
581
+ "auto",
582
+ "low",
583
+ "medium",
584
+ "high",
585
+ "xhigh",
586
+ "max"
587
+ ],
588
+ "description": "角色默认的 Claude 推理强度。",
589
+ "x-enumDescriptions": {
590
+ "auto": "由 Claude runner 自动选择",
591
+ "low": "低",
592
+ "medium": "中",
593
+ "high": "高",
594
+ "xhigh": "很高",
595
+ "max": "最高"
596
+ }
597
+ },
598
+ "allowOverride": {
599
+ "type": "boolean",
600
+ "default": false,
601
+ "description": "是否允许该角色在关系级覆盖 Claude 推理强度;缺省为 false。"
602
+ },
603
+ "allowedValues": {
604
+ "type": "array",
605
+ "items": {
606
+ "type": "string",
607
+ "enum": [
608
+ "auto",
609
+ "low",
610
+ "medium",
611
+ "high",
612
+ "xhigh",
613
+ "max"
614
+ ],
615
+ "description": "一个允许覆盖到的 Claude 推理强度。",
616
+ "x-enumDescriptions": {
617
+ "auto": "由 Claude runner 自动选择",
618
+ "low": "低",
619
+ "medium": "中",
620
+ "high": "高",
621
+ "xhigh": "很高",
622
+ "max": "最高"
623
+ }
624
+ },
625
+ "uniqueItems": true,
626
+ "description": "允许关系级覆盖到的 Claude 推理强度白名单;若提供,必须包含 default。"
627
+ },
628
+ "reason": {
629
+ "type": "string",
630
+ "description": "采用该 Claude 推理强度策略的可审计原因或管理备注。"
631
+ }
632
+ }
633
+ },
634
+ "baseagents.codex.effort": {
635
+ "type": "object",
636
+ "required": [
637
+ "default",
638
+ "allowOverride"
639
+ ],
640
+ "additionalProperties": false,
641
+ "description": "该角色使用 Codex runner 时的推理强度策略。",
642
+ "properties": {
643
+ "default": {
644
+ "type": "string",
645
+ "enum": [
646
+ "auto",
647
+ "low",
648
+ "medium",
649
+ "high",
650
+ "xhigh",
651
+ "max"
652
+ ],
653
+ "description": "角色默认的 Codex 推理强度。",
654
+ "x-enumDescriptions": {
655
+ "auto": "由 Codex runner 自动选择",
656
+ "low": "低",
657
+ "medium": "中",
658
+ "high": "高",
659
+ "xhigh": "很高",
660
+ "max": "最高"
661
+ }
662
+ },
663
+ "allowOverride": {
664
+ "type": "boolean",
665
+ "default": false,
666
+ "description": "是否允许该角色在关系级覆盖 Codex 推理强度;缺省为 false。"
667
+ },
668
+ "allowedValues": {
669
+ "type": "array",
670
+ "items": {
671
+ "type": "string",
672
+ "enum": [
673
+ "auto",
674
+ "low",
675
+ "medium",
676
+ "high",
677
+ "xhigh",
678
+ "max"
679
+ ],
680
+ "description": "一个允许覆盖到的 Codex 推理强度。",
681
+ "x-enumDescriptions": {
682
+ "auto": "由 Codex runner 自动选择",
683
+ "low": "低",
684
+ "medium": "中",
685
+ "high": "高",
686
+ "xhigh": "很高",
687
+ "max": "最高"
688
+ }
689
+ },
690
+ "uniqueItems": true,
691
+ "description": "允许关系级覆盖到的 Codex 推理强度白名单;若提供,必须包含 default。"
692
+ },
693
+ "reason": {
694
+ "type": "string",
695
+ "description": "采用该 Codex 推理强度策略的可审计原因或管理备注。"
696
+ }
697
+ }
698
+ },
699
+ "baseagents.ecagent.effort": {
700
+ "type": "object",
701
+ "required": [
702
+ "default",
703
+ "allowOverride"
704
+ ],
705
+ "additionalProperties": false,
706
+ "description": "该角色使用 ecagent runner 时的推理强度策略。",
707
+ "properties": {
708
+ "default": {
709
+ "type": "string",
710
+ "enum": [
711
+ "auto",
712
+ "low",
713
+ "medium",
714
+ "high",
715
+ "xhigh",
716
+ "max"
717
+ ],
718
+ "description": "角色默认的 ecagent 推理强度。"
719
+ },
720
+ "allowOverride": {
721
+ "type": "boolean",
722
+ "default": false,
723
+ "description": "是否允许该角色在关系级覆盖 ecagent 推理强度;缺省为 false。"
724
+ },
725
+ "allowedValues": {
726
+ "type": "array",
727
+ "items": {
728
+ "type": "string",
729
+ "enum": [
730
+ "auto",
731
+ "low",
732
+ "medium",
733
+ "high",
734
+ "xhigh",
735
+ "max"
736
+ ]
737
+ },
738
+ "uniqueItems": true,
739
+ "description": "允许关系级覆盖到的 ecagent 推理强度白名单;若提供,必须包含 default。"
740
+ },
741
+ "reason": {
742
+ "type": "string",
743
+ "description": "采用该 ecagent 推理强度策略的可审计原因或管理备注。"
744
+ }
745
+ }
746
+ }
747
+ },
748
+ "patternProperties": {
749
+ "^baseagents\\.[a-z0-9_-]+\\.model$": {
750
+ "type": "object",
751
+ "required": [
752
+ "default",
753
+ "allowOverride",
754
+ "allowedModels"
755
+ ],
756
+ "additionalProperties": false,
757
+ "description": "指定 base agent 的角色模型策略;默认模型必须匹配 allowedModels。",
758
+ "properties": {
759
+ "default": {
760
+ "type": "string",
761
+ "minLength": 1,
762
+ "description": "该角色默认使用的模型标识;必须被 allowedModels 中的精确值或通配符允许。"
763
+ },
764
+ "allowOverride": {
765
+ "type": "boolean",
766
+ "default": false,
767
+ "description": "是否允许该角色在关系级覆盖模型;缺省为 false。"
768
+ },
769
+ "allowedModels": {
770
+ "type": "array",
771
+ "minItems": 1,
772
+ "items": {
773
+ "type": "string",
774
+ "minLength": 1,
775
+ "description": "一个允许使用的模型标识或以 * 表达的通配符模式。"
776
+ },
777
+ "uniqueItems": true,
778
+ "description": "该角色可用的模型白名单;支持通配符,且至少包含一个条目。"
779
+ },
780
+ "reason": {
781
+ "type": "string",
782
+ "description": "采用该角色模型策略的可审计原因或管理备注。"
783
+ }
784
+ }
785
+ }
786
+ },
787
+ "additionalProperties": false
788
+ },
789
+ "commandPermissions": {
790
+ "type": "object",
791
+ "x-optionsSource": "operation-catalog",
792
+ "description": "按 operation 标识定义角色的命令执行权限;候选 operation 来自运行时 operation catalog。",
793
+ "propertyNames": {
794
+ "type": "string",
795
+ "minLength": 1,
796
+ "description": "非空 operation 标识,支持精确名称及系统识别的通配规则。"
797
+ },
798
+ "additionalProperties": {
799
+ "type": "object",
800
+ "required": [
801
+ "allow"
802
+ ],
803
+ "additionalProperties": false,
804
+ "description": "一个 operation 的角色授权规则。",
805
+ "properties": {
806
+ "allow": {
807
+ "type": "boolean",
808
+ "description": "是否允许该角色执行匹配的 operation。"
809
+ },
810
+ "dangerous": {
811
+ "type": "boolean",
812
+ "default": false,
813
+ "description": "是否将该授权规则标记为危险操作规则;危险操作还会应用额外安全约束。"
814
+ },
815
+ "permissionMode": {
816
+ "type": "string",
817
+ "enum": [
818
+ "readonly",
819
+ "auto",
820
+ "request",
821
+ "bypass"
822
+ ],
823
+ "description": "临时 operation 级权限模式;后续迁移到作用域模式规则。"
824
+ },
825
+ "scopes": {
826
+ "type": "array",
827
+ "items": {
828
+ "type": "string",
829
+ "enum": [
830
+ "relation",
831
+ "role",
832
+ "agent",
833
+ "process",
834
+ "filesystem",
835
+ "control",
836
+ "raw-cli"
837
+ ],
838
+ "description": "该命令权限适用的一个配置或执行作用域。",
839
+ "x-enumDescriptions": {
840
+ "relation": "当前 Agent 与对端的关系配置域",
841
+ "role": "独立角色注册表或角色策略配置域",
842
+ "agent": "单个 Agent 的配置与生命周期域",
843
+ "process": "EvolCore 进程级配置与运行域",
844
+ "filesystem": "受控文件系统操作域",
845
+ "control": "控制面命令和管理通道域",
846
+ "raw-cli": "未经结构化 operation 封装的原始 CLI 执行域"
847
+ }
848
+ },
849
+ "uniqueItems": true,
850
+ "description": "该授权规则允许生效的作用域白名单;未配置时由 operation 自身和鉴权器决定。"
851
+ },
852
+ "constraints": {
853
+ "type": "object",
854
+ "additionalProperties": false,
855
+ "description": "operation 级附加约束,例如对端、Agent、群聊、控制通道、参数或工作目录限制。",
856
+ "properties": {
857
+ "ownPeerOnly": {
858
+ "type": "boolean"
859
+ },
860
+ "ownAgentOnly": {
861
+ "type": "boolean"
862
+ },
863
+ "targetCurrentAgentOnly": {
864
+ "type": "boolean"
865
+ },
866
+ "requireAgentAdmin": {
867
+ "type": "boolean"
868
+ },
869
+ "requireAgentOwner": {
870
+ "type": "boolean"
871
+ },
872
+ "privateOnly": {
873
+ "type": "boolean"
874
+ },
875
+ "groupOnly": {
876
+ "type": "boolean"
877
+ },
878
+ "requireDaemonOwner": {
879
+ "type": "boolean"
880
+ },
881
+ "requireControlChannel": {
882
+ "type": "boolean"
883
+ },
884
+ "requireExplicitDangerousGrant": {
885
+ "type": "boolean"
886
+ },
887
+ "currentRelationOnly": {
888
+ "type": "boolean"
889
+ },
890
+ "requireFieldOverride": {
891
+ "type": "string",
892
+ "minLength": 1
893
+ },
894
+ "configFieldPolicy": {
895
+ "type": "string",
896
+ "enum": [
897
+ "behavior-read",
898
+ "role-overridable-write"
899
+ ]
900
+ },
901
+ "allowedArgs": {
902
+ "$ref": "#/definitions/argumentConstraints"
903
+ },
904
+ "deniedArgs": {
905
+ "$ref": "#/definitions/argumentConstraints"
906
+ },
907
+ "forbiddenFlags": {
908
+ "$ref": "#/definitions/stringList"
909
+ },
910
+ "allowedConfigKeys": {
911
+ "$ref": "#/definitions/stringList"
912
+ },
913
+ "allowedPrefixes": {
914
+ "$ref": "#/definitions/stringList"
915
+ },
916
+ "timeoutMs": {
917
+ "type": "integer",
918
+ "minimum": 0
919
+ },
920
+ "outputLimitBytes": {
921
+ "type": "integer",
922
+ "minimum": 0
923
+ },
924
+ "cwdPolicy": {
925
+ "type": "string",
926
+ "enum": [
927
+ "agentProject",
928
+ "evolcoreHome",
929
+ "none"
930
+ ]
931
+ },
932
+ "envAllowlist": {
933
+ "$ref": "#/definitions/stringList"
934
+ }
935
+ }
936
+ },
937
+ "reason": {
938
+ "type": "string",
939
+ "description": "采用该命令权限规则的可审计原因或管理备注。"
940
+ }
941
+ }
942
+ }
943
+ },
944
+ "usageLimits": {
945
+ "type": "object",
946
+ "additionalProperties": false,
947
+ "description": "角色用量额度策略;enabled 未开启或未配置时不启用额度限制。",
948
+ "properties": {
949
+ "enabled": {
950
+ "type": "boolean",
951
+ "default": false,
952
+ "description": "是否启用该角色的用量额度限制;缺省为 false。"
953
+ },
954
+ "resetMode": {
955
+ "type": "string",
956
+ "enum": [
957
+ "never",
958
+ "daily",
959
+ "weekly",
960
+ "monthly"
961
+ ],
962
+ "description": "用量额度的重置周期。",
963
+ "x-enumDescriptions": {
964
+ "never": "累计额度,从不自动重置",
965
+ "daily": "每日重置",
966
+ "weekly": "每周重置",
967
+ "monthly": "每月重置"
968
+ }
969
+ },
970
+ "currency": {
971
+ "type": "string",
972
+ "enum": [
973
+ "CNY",
974
+ "USD"
975
+ ],
976
+ "description": "额度金额使用的计价货币。",
977
+ "x-enumDescriptions": {
978
+ "CNY": "人民币",
979
+ "USD": "美元"
980
+ }
981
+ },
982
+ "limitAmount": {
983
+ "type": [
984
+ "number",
985
+ "null"
986
+ ],
987
+ "minimum": 0,
988
+ "description": "额度上限金额;非负数表示上限,null 表示不限。"
989
+ },
990
+ "costBasis": {
991
+ "type": "string",
992
+ "enum": [
993
+ "gateway",
994
+ "official"
995
+ ],
996
+ "description": "额度统计采用的模型计费口径。",
997
+ "x-enumDescriptions": {
998
+ "gateway": "按实际网关计费价统计",
999
+ "official": "按模型提供商官方定价统计"
1000
+ }
1001
+ },
1002
+ "scope": {
1003
+ "type": "string",
1004
+ "enum": [
1005
+ "subject",
1006
+ "role"
1007
+ ],
1008
+ "description": "额度累计和重置的统计范围。",
1009
+ "x-enumDescriptions": {
1010
+ "subject": "按对端主体分别统计",
1011
+ "role": "同一角色的所有主体共享统计"
1012
+ }
1013
+ }
1014
+ }
1015
+ }
1016
+ },
1017
+ "definitions": {
1018
+ "stringList": {
1019
+ "type": "array",
1020
+ "items": {
1021
+ "type": "string"
1022
+ }
1023
+ },
1024
+ "argumentConstraints": {
1025
+ "type": "object",
1026
+ "additionalProperties": {
1027
+ "type": "array",
1028
+ "items": {
1029
+ "type": [
1030
+ "string",
1031
+ "number",
1032
+ "boolean"
1033
+ ]
1034
+ }
1035
+ }
1036
+ }
1037
+ }
1038
+ }