evolcore 0.0.3 → 0.0.5
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.
- package/CHANGELOG.md +83 -0
- package/README.md +45 -10
- package/bin/ec-safe-output.js +89 -24
- package/dist/agents/baseagent.js +46 -0
- package/dist/agents/claude-runner.js +1 -31
- package/dist/agents/codex-app-server-client.js +68 -0
- package/dist/agents/codex-runner.js +157 -5
- package/dist/agents/runner-types.js +2 -2
- package/dist/aun/aid/agentmd.js +79 -0
- package/dist/aun/aid/encryption-seed-policy.js +29 -0
- package/dist/aun/aid/index.js +1 -1
- package/dist/aun/aid/store.js +2 -5
- package/dist/channels/aun.js +220 -112
- package/dist/channels/daemon.js +18 -4
- package/dist/channels/dingtalk.js +52 -137
- package/dist/channels/feishu.js +56 -4
- package/dist/channels/qqbot.js +23 -1
- package/dist/channels/wechat.js +303 -155
- package/dist/channels/wecom.js +383 -7
- package/dist/cli/aun-commands.js +11 -11
- package/dist/cli/daemon-commands.js +46 -15
- package/dist/cli/handoff-command.js +2 -1
- package/dist/cli/init-channel.js +185 -67
- package/dist/cli/init.js +49 -27
- package/dist/cli/trigger-command.js +92 -11
- package/dist/config/access-policy-domain.js +18 -0
- package/dist/config/access-policy.js +110 -0
- package/dist/config/builtin-role-templates.js +27 -14
- package/dist/config/builtin-roles.js +25 -6
- package/dist/config/config-field-policy.js +17 -5
- package/dist/config/config-manager.js +198 -22
- package/dist/config/config-operation-service.js +35 -38
- package/dist/config/contact-bind-code.js +274 -0
- package/dist/config/contact-book-store.js +173 -5
- package/dist/config/contact-book.js +32 -0
- package/dist/config/contact-operation-service.js +9 -3
- package/dist/config/contact-request-service.js +331 -0
- package/dist/config/peer-role-resolver.js +3 -1
- package/dist/config/schema-registry.js +49 -24
- package/dist/config-store.js +14 -2
- package/dist/core/auth/agent-delegation.js +105 -11
- package/dist/core/auth/authorization-audit.js +6 -0
- package/dist/core/auth/operation-authorizer.js +8 -0
- package/dist/core/auth/operation-catalog.js +51 -3
- package/dist/core/auth/trigger-authorization.js +15 -0
- package/dist/core/bootstrap-service.js +2 -9
- package/dist/core/channel-loader.js +6 -2
- package/dist/core/command/command-handler.js +10 -13
- package/dist/core/command/connect-menu.js +229 -26
- package/dist/core/command/evol-menu-version-gate.js +38 -0
- package/dist/core/command/group-menu.js +421 -0
- package/dist/core/command/menu-handler.js +269 -85
- package/dist/core/command/menu-protocol.js +8 -2
- package/dist/core/command/menu-token-store.js +102 -0
- package/dist/core/command/role-menu.js +16 -0
- package/dist/core/command/slash-gate.js +1 -1
- package/dist/core/command/slash-handler.js +158 -31
- package/dist/core/daemon-file-cache.js +28 -0
- package/dist/core/event-catalog.js +29 -0
- package/dist/core/evolagent-registry.js +4 -39
- package/dist/core/handoff/runtime.js +162 -37
- package/dist/core/handoff/store.js +46 -2
- package/dist/core/handoff/types.js +1 -0
- package/dist/core/inference/text-inference.js +16 -74
- package/dist/core/message/file-markers.js +7 -0
- package/dist/core/message/im-renderer.js +18 -14
- package/dist/core/message/inbound-admission.js +134 -0
- package/dist/core/message/message-bridge.js +616 -74
- package/dist/core/message/message-log.js +1 -0
- package/dist/core/message/message-queue.js +185 -10
- package/dist/core/message/peer-mode.js +7 -8
- package/dist/core/message/response-engine.js +381 -79
- package/dist/core/permission/approval-gateway.js +17 -10
- package/dist/core/permission/ec-command-parser.js +101 -46
- package/dist/core/permission/tool-policy.js +69 -24
- package/dist/core/protected-paths.js +36 -11
- package/dist/core/session/session-fs-store.js +19 -4
- package/dist/core/session/session-manager.js +232 -4
- package/dist/core/session/session-mapper.js +2 -0
- package/dist/core/session/session-renew.js +125 -69
- package/dist/core/session/session-turn-coordinator.js +5 -1
- package/dist/eck/kit-renderer.js +12 -1
- package/dist/eck/message-renderer.js +79 -1
- package/dist/index.js +224 -89
- package/dist/ipc.js +81 -4
- package/dist/paths.js +3 -0
- package/dist/response-system/config-resolver.js +29 -0
- package/dist/response-system/coordinator.js +8 -32
- package/dist/response-system/engines/v1/proactive-flow.js +1 -1
- package/dist/response-system/index.js +1 -0
- package/dist/response-system/modes/single-session/index.js +7 -4
- package/dist/trigger/parser.js +55 -15
- package/dist/trigger/patch.js +4 -1
- package/dist/trigger/scheduler.js +441 -39
- package/dist/utils/cross-platform.js +8 -2
- package/dist/utils/error-dict.json +7 -0
- package/dist/utils/evolcore-version.js +21 -0
- package/dist/utils/logger.js +2 -2
- package/dist/utils/process-introspect.js +19 -3
- package/dist/utils/stable-semver.js +21 -0
- package/dist/utils/stats.js +33 -9
- package/kits/docs/channels/aun.md +4 -13
- package/kits/docs/evolcore/INDEX.md +1 -1
- package/kits/docs/evolcore/config.md +47 -2
- package/kits/docs/evolcore/contact.md +8 -3
- package/kits/docs/evolcore/group-rules.md +46 -4
- package/kits/docs/evolcore/group.md +4 -4
- package/kits/docs/evolcore/msg.md +5 -5
- package/kits/docs/evolcore/trigger.md +25 -8
- package/kits/docs/path-registry.md +36 -17
- package/kits/eck_message_manifest.json +12 -1
- package/kits/migrations/migrate-contact-book-v2.mjs +7 -0
- package/kits/rules/01-overview.md +17 -7
- package/kits/rules/02-navigation.md +38 -18
- package/kits/rules/03-identity.md +28 -24
- package/kits/rules/04-relation.md +44 -28
- package/kits/rules/05-venue.md +31 -15
- package/kits/rules/06-channel.md +11 -7
- package/kits/schemas/_meta.json +18 -7
- package/kits/schemas/agent-config.schema.7.json +303 -0
- package/kits/schemas/agent-config.schema.8.json +304 -0
- package/kits/schemas/agent-config.schema.9.json +364 -0
- package/kits/schemas/contact-book.schema.3.json +67 -0
- package/kits/schemas/daemon.schema.1.json +3 -2
- package/kits/schemas/daemon.schema.2.json +101 -0
- package/kits/schemas/daemon.schema.3.json +123 -0
- package/kits/schemas/defaults.schema.2.json +85 -0
- package/kits/schemas/defaults.schema.3.json +73 -0
- package/kits/schemas/relation-config.schema.6.json +46 -0
- package/kits/schemas/relation-config.schema.7.json +59 -0
- package/kits/schemas/single-session.schema.2.json +57 -0
- package/kits/templates/message-fragments/handoff-context-to-target.md +9 -0
- package/kits/templates/message-fragments/handoff-request-to-target.md +14 -8
- package/kits/templates/message-fragments/handoff-response-to-origin.md +5 -6
- package/kits/templates/roles/admin.json +46 -0
- package/kits/templates/roles/member.json +4 -0
- package/kits/templates/roles/visitor.json +4 -0
- package/kits/templates/system-fragments/channel.md +12 -2
- package/kits/templates/system-fragments/identity.md +3 -1
- package/kits/templates/system-fragments/relation.md +1 -1
- package/kits/templates/system-fragments/session.md +6 -2
- package/package.json +4 -2
- package/MIGRATION-0.5.0.md +0 -378
- package/ROLE_ACCESS_CONTROL.md +0 -174
- package/dist/channels/contact-bind-code.js +0 -134
- package/dist/channels/wecom-card.js +0 -101
- package/dist/channels/wecom-onboarding.js +0 -82
- package/dist/channels/wecom-state.js +0 -191
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "defaults.schema.2.json",
|
|
4
|
+
"title": "DefaultsConfig v2 (agents/defaults.json)",
|
|
5
|
+
"description": "全局默认配置。覆盖链最低层。",
|
|
6
|
+
"x-logical-name": "defaults",
|
|
7
|
+
"x-scope": "defaults",
|
|
8
|
+
"type": "object",
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"properties": {
|
|
11
|
+
"$schema_version": { "type": "number", "const": 2, "default": 2, "x-merge": "scalar" },
|
|
12
|
+
"models": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"description": "模型配置",
|
|
15
|
+
"x-merge": "dict",
|
|
16
|
+
"properties": {
|
|
17
|
+
"default": { "type": "string", "description": "全局默认模型" },
|
|
18
|
+
"allowed": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"items": { "type": "string" },
|
|
21
|
+
"description": "全局模型白名单"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"active_baseagent": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "当前活跃的 base agent(claude/codex/gemini)。暂存于此,待权限体系实现后迁移。",
|
|
28
|
+
"x-merge": "scalar"
|
|
29
|
+
},
|
|
30
|
+
"baseagents": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"description": "各 base agent 配置(model/effort/apiKey/baseUrl 等)。暂存于此,待权限体系实现后迁移。",
|
|
33
|
+
"x-merge": "dict"
|
|
34
|
+
},
|
|
35
|
+
"projects": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"description": "项目路径配置",
|
|
38
|
+
"x-merge": "dict",
|
|
39
|
+
"properties": {
|
|
40
|
+
"rootPath": { "type": "string", "description": "全局项目根路径" },
|
|
41
|
+
"defaultPath": { "type": "string", "description": "全局默认项目路径" }
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"aun": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"description": "全局 AUN 配置",
|
|
47
|
+
"x-merge": "dict",
|
|
48
|
+
"properties": {
|
|
49
|
+
"keystorePath": { "type": "string" },
|
|
50
|
+
"encryptionSeed": { "type": "string" },
|
|
51
|
+
"gatewayUrl": { "type": "string" }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"debug": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"description": "全局调试配置",
|
|
57
|
+
"x-merge": "dict",
|
|
58
|
+
"properties": {
|
|
59
|
+
"logLevel": { "type": "string", "enum": ["DEBUG", "INFO", "WARN", "ERROR"], "description": "日志级别", "x-enumDescriptions": { "DEBUG": "调试:最详细", "INFO": "信息:常规运行日志", "WARN": "警告:仅警告及以上", "ERROR": "错误:仅错误" } },
|
|
60
|
+
"flusherDiag": { "type": "boolean" },
|
|
61
|
+
"aunTrace": { "type": "boolean" },
|
|
62
|
+
"aunSdkLog": { "type": "boolean" },
|
|
63
|
+
"upmsg": { "type": "boolean" }
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"responseMode": { "type": "string", "x-merge": "scalar" },
|
|
67
|
+
"responseModeParams": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"x-merge": "dict",
|
|
70
|
+
"description": "响应模式特有参数的全局默认字典,按模式 id 分桶:{ [modeId]: {...} }"
|
|
71
|
+
},
|
|
72
|
+
"config": { "type": "object", "x-merge": "dict" },
|
|
73
|
+
"session_renew": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"description": "会话超时后的续接判定策略,默认关闭",
|
|
76
|
+
"x-merge": "dict",
|
|
77
|
+
"additionalProperties": false,
|
|
78
|
+
"properties": {
|
|
79
|
+
"enabled": { "type": "boolean", "default": false, "description": "是否启用超时后的会话连续性判定" },
|
|
80
|
+
"after_hours": { "type": "number", "exclusiveMinimum": 0, "default": 24, "description": "距最后一条有效对话超过该小时数才触发判定" },
|
|
81
|
+
"fallback_action": { "type": "string", "enum": ["continue", "new"], "default": "continue", "description": "无法判定时的兜底动作", "x-enumDescriptions": { "continue": "继续沿用当前会话", "new": "开启新会话" } }
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "defaults.schema.3.json",
|
|
4
|
+
"title": "DefaultsConfig v3 (agents/defaults.json)",
|
|
5
|
+
"description": "全局默认配置。覆盖链最低层;进程级 debug 仅允许配置在 daemon.json。",
|
|
6
|
+
"x-logical-name": "defaults",
|
|
7
|
+
"x-scope": "defaults",
|
|
8
|
+
"type": "object",
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"properties": {
|
|
11
|
+
"$schema_version": { "type": "number", "const": 3, "default": 3, "x-merge": "scalar" },
|
|
12
|
+
"models": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"description": "模型配置",
|
|
15
|
+
"x-merge": "dict",
|
|
16
|
+
"properties": {
|
|
17
|
+
"default": { "type": "string", "description": "全局默认模型" },
|
|
18
|
+
"allowed": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"items": { "type": "string" },
|
|
21
|
+
"description": "全局模型白名单"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"active_baseagent": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "当前活跃的 base agent(claude/codex/gemini)。暂存于此,待权限体系实现后迁移。",
|
|
28
|
+
"x-merge": "scalar"
|
|
29
|
+
},
|
|
30
|
+
"baseagents": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"description": "各 base agent 配置(model/effort/apiKey/baseUrl 等)。暂存于此,待权限体系实现后迁移。",
|
|
33
|
+
"x-merge": "dict"
|
|
34
|
+
},
|
|
35
|
+
"projects": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"description": "项目路径配置",
|
|
38
|
+
"x-merge": "dict",
|
|
39
|
+
"properties": {
|
|
40
|
+
"rootPath": { "type": "string", "description": "全局项目根路径" },
|
|
41
|
+
"defaultPath": { "type": "string", "description": "全局默认项目路径" }
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"aun": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"description": "全局 AUN 配置",
|
|
47
|
+
"x-merge": "dict",
|
|
48
|
+
"properties": {
|
|
49
|
+
"keystorePath": { "type": "string" },
|
|
50
|
+
"encryptionSeed": { "type": "string" },
|
|
51
|
+
"gatewayUrl": { "type": "string" }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"responseMode": { "type": "string", "x-merge": "scalar" },
|
|
55
|
+
"responseModeParams": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"x-merge": "dict",
|
|
58
|
+
"description": "响应模式特有参数的全局默认字典,按模式 id 分桶:{ [modeId]: {...} }"
|
|
59
|
+
},
|
|
60
|
+
"config": { "type": "object", "x-merge": "dict" },
|
|
61
|
+
"session_renew": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"description": "会话超时后的续接判定策略,默认关闭",
|
|
64
|
+
"x-merge": "dict",
|
|
65
|
+
"additionalProperties": false,
|
|
66
|
+
"properties": {
|
|
67
|
+
"enabled": { "type": "boolean", "default": false, "description": "是否启用超时后的会话连续性判定" },
|
|
68
|
+
"after_hours": { "type": "number", "exclusiveMinimum": 0, "default": 24, "description": "距最后一条有效对话超过该小时数才触发判定" },
|
|
69
|
+
"fallback_action": { "type": "string", "enum": ["continue", "new"], "default": "continue", "description": "无法判定时的兜底动作", "x-enumDescriptions": { "continue": "继续沿用当前会话", "new": "开启新会话" } }
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "relation-config.schema.6.json",
|
|
4
|
+
"title": "RelationConfig v6 (agents/{aid}/relations/{peerKey}/config.json)",
|
|
5
|
+
"x-logical-name": "relation-config",
|
|
6
|
+
"x-scope": "relation",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": true,
|
|
9
|
+
"not": {
|
|
10
|
+
"anyOf": [
|
|
11
|
+
{ "required": ["permissionMode"] },
|
|
12
|
+
{ "required": ["roles"] }
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"properties": {
|
|
16
|
+
"$schema_version": { "type": "number", "const": 6, "default": 6, "x-merge": "scalar" },
|
|
17
|
+
"targetKind": { "type": "string", "enum": ["private", "group"], "x-merge": "scalar" },
|
|
18
|
+
"role": { "type": ["string", "null"], "pattern": "^(?!owner$)[a-z0-9_-]+$", "x-merge": "scalar", "description": "关系角色;允许 admin/member/visitor/自定义角色,禁止 owner" },
|
|
19
|
+
"active_baseagent": { "type": "string", "x-merge": "scalar" },
|
|
20
|
+
"models": { "type": "object", "x-merge": "dict" },
|
|
21
|
+
"baseagents": { "type": "object", "x-merge": "dict" },
|
|
22
|
+
"chatmode": { "type": "object", "x-merge": "dict", "properties": { "private": { "enum": ["interactive", "proactive"] }, "group": { "enum": ["interactive", "proactive"] }, "nothuman": { "enum": ["interactive", "proactive"] } }, "additionalProperties": false },
|
|
23
|
+
"mentionMode": { "type": "string", "enum": ["disabled", "mention-only"], "x-merge": "scalar" },
|
|
24
|
+
"model": { "type": "string", "x-merge": "scalar" },
|
|
25
|
+
"responseMode": { "type": "string", "x-merge": "scalar" },
|
|
26
|
+
"responseModeParams": { "type": "object", "x-merge": "dict" },
|
|
27
|
+
"flush_delay": { "type": "number", "x-merge": "scalar" },
|
|
28
|
+
"debounce": { "type": "number", "x-merge": "scalar" },
|
|
29
|
+
"show_activities": { "type": "string", "enum": ["all", "text", "none"], "x-merge": "scalar" },
|
|
30
|
+
"enable_rich_content": { "type": "boolean", "x-merge": "scalar" },
|
|
31
|
+
"session_renew": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"x-merge": "dict",
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"properties": {
|
|
36
|
+
"enabled": { "type": "boolean" },
|
|
37
|
+
"after_hours": { "type": "number", "exclusiveMinimum": 0 },
|
|
38
|
+
"fallback_action": { "type": "string", "enum": ["continue", "new"] }
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"group_venue_sync": { "type": "object", "x-merge": "dict" },
|
|
42
|
+
"render": { "type": "object", "x-merge": "dict" },
|
|
43
|
+
"sessionManifests": { "type": "object", "x-merge": "dict" },
|
|
44
|
+
"extra_backup": { "type": "array", "items": { "type": "object" }, "x-merge": "list" }
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "relation-config.schema.7.json",
|
|
4
|
+
"title": "RelationConfig v7 (agents/{aid}/relations/{peerKey}/config.json)",
|
|
5
|
+
"x-logical-name": "relation-config",
|
|
6
|
+
"x-scope": "relation",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": true,
|
|
9
|
+
"not": {
|
|
10
|
+
"anyOf": [
|
|
11
|
+
{ "required": ["permissionMode"] },
|
|
12
|
+
{ "required": ["roles"] }
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"properties": {
|
|
16
|
+
"$schema_version": { "type": "number", "const": 7, "default": 7, "x-merge": "scalar" },
|
|
17
|
+
"targetKind": { "type": "string", "enum": ["private", "group"], "x-merge": "scalar" },
|
|
18
|
+
"role": { "type": ["string", "null"], "pattern": "^(?!owner$)[a-z0-9_-]+$", "x-merge": "scalar", "description": "关系角色;允许 admin/member/visitor/自定义角色,禁止 owner" },
|
|
19
|
+
"active_baseagent": { "type": "string", "x-merge": "scalar" },
|
|
20
|
+
"models": { "type": "object", "x-merge": "dict" },
|
|
21
|
+
"baseagents": { "type": "object", "x-merge": "dict" },
|
|
22
|
+
"chatmode": { "type": "object", "x-merge": "dict", "properties": { "private": { "enum": ["interactive", "proactive"] }, "group": { "enum": ["interactive", "proactive"] }, "nothuman": { "enum": ["interactive", "proactive"] } }, "additionalProperties": false },
|
|
23
|
+
"mentionMode": { "type": "string", "enum": ["disabled", "mention-only"], "x-merge": "scalar" },
|
|
24
|
+
"model": { "type": "string", "x-merge": "scalar" },
|
|
25
|
+
"responseMode": { "type": "string", "x-merge": "scalar" },
|
|
26
|
+
"responseModeParams": { "type": "object", "x-merge": "dict" },
|
|
27
|
+
"flush_delay": { "type": "number", "x-merge": "scalar" },
|
|
28
|
+
"debounce": { "type": "number", "x-merge": "scalar" },
|
|
29
|
+
"show_activities": { "type": "string", "enum": ["all", "text", "none"], "x-merge": "scalar" },
|
|
30
|
+
"enable_rich_content": { "type": "boolean", "x-merge": "scalar" },
|
|
31
|
+
"session_renew": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"x-merge": "dict",
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"properties": {
|
|
36
|
+
"enabled": { "type": "boolean" },
|
|
37
|
+
"after_hours": { "type": "number", "exclusiveMinimum": 0 },
|
|
38
|
+
"fallback_action": { "type": "string", "enum": ["continue", "new"] }
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"group_venue_sync": { "type": "object", "x-merge": "dict" },
|
|
42
|
+
"groupRules": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"x-merge": "dict",
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"properties": {
|
|
47
|
+
"mode": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"enum": ["load", "ignore"],
|
|
50
|
+
"default": "load",
|
|
51
|
+
"description": "是否读取并注入当前 AUN 群已发布的 /rules.md;默认 load。"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"render": { "type": "object", "x-merge": "dict" },
|
|
56
|
+
"sessionManifests": { "type": "object", "x-merge": "dict" },
|
|
57
|
+
"extra_backup": { "type": "array", "items": { "type": "object" }, "x-merge": "list" }
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "single-session.schema.2.json",
|
|
4
|
+
"title": "SingleSessionParams (responseModeParams['single-session'])",
|
|
5
|
+
"x-logical-name": "single-session",
|
|
6
|
+
"x-scope": "mode",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"auxiliaryModel": {
|
|
11
|
+
"oneOf": [
|
|
12
|
+
{
|
|
13
|
+
"type": "string",
|
|
14
|
+
"minLength": 1
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"type": "object",
|
|
18
|
+
"minProperties": 1,
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"properties": {
|
|
21
|
+
"claude": { "type": "string", "minLength": 1 },
|
|
22
|
+
"codex": { "type": "string", "minLength": 1 }
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"description": "辅助判断模型;可直接配置模型 ID,或按 claude/codex 配置映射。当前 Session 的 baseagent 在映射中无对应模型时执行 fallback_action。"
|
|
27
|
+
},
|
|
28
|
+
"auxiliaryEffort": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"enum": ["low", "medium", "high", "xhigh", "max"],
|
|
31
|
+
"description": "辅助判断推理强度;配置时同一模式桶必须同时配置 auxiliaryModel,未配置时不向模型 API 发送 effort。"
|
|
32
|
+
},
|
|
33
|
+
"pre_tool_1stmsgchk": {
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"enum": [true, false],
|
|
36
|
+
"default": true,
|
|
37
|
+
"description": "proactive 首工具表态检查(仅 chatmode=proactive 生效):首个工具调用前必须先向对端表态,否则拦截。",
|
|
38
|
+
"x-enumDescriptions": {
|
|
39
|
+
"true": "启用:首工具前必须先发送消息或文件",
|
|
40
|
+
"false": "禁用:允许直接调用工具"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"tool_use_reminder": {
|
|
44
|
+
"type": "boolean",
|
|
45
|
+
"enum": [true, false],
|
|
46
|
+
"default": true,
|
|
47
|
+
"description": "proactive 工具汇报提醒(仅 chatmode=proactive 生效):启用队列未读提醒 + 每 10 次工具调用的汇报提醒。",
|
|
48
|
+
"x-enumDescriptions": {
|
|
49
|
+
"true": "启用:自动汇报工具使用情况",
|
|
50
|
+
"false": "禁用:静默执行工具"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"auxiliaryEffort": ["auxiliaryModel"]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
说明:
|
|
2
|
-
-
|
|
3
|
-
-
|
|
4
|
-
-
|
|
5
|
-
-
|
|
6
|
-
-
|
|
2
|
+
- 以下是尚未完成的跨会话请求,仅本端可见。
|
|
3
|
+
- 请结合请求列表与当前对端回复,分别判断哪些请求已经得到充分回答。
|
|
4
|
+
- 不要在对外回复中主动提及 handoff、ID、return 命令或内部路由机制。
|
|
5
|
+
- 当前回复足以处理某项请求时,需要使用:`ec handoff return ID "<完整回流内容>"`
|
|
6
|
+
- 命令双引号内若含双引号、反引号或 Shell 展开形式的 `$`,需经转义符转义,Shell 传给 ec 时会做还原。
|
|
7
7
|
- 若回复不足,不要执行 return。
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
{{
|
|
11
|
-
|
|
9
|
+
待回流请求:
|
|
10
|
+
{{#each handoffRequiredEntries}}- ID:{{handoffId}}
|
|
11
|
+
原请求:{{previousContent}}
|
|
12
|
+
{{/each}}
|
|
13
|
+
{{?handoffContextEntries}}
|
|
14
|
+
以下本地发言只用于补充上下文,不需要回流:
|
|
15
|
+
{{#each handoffContextEntries}}- {{previousContent}}
|
|
16
|
+
{{/each}}
|
|
17
|
+
{{/}}
|
|
12
18
|
当前对端回复内容:
|
|
13
19
|
{{content}}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
说明:
|
|
2
2
|
- 跨会话结果回流,仅本端可见。
|
|
3
|
-
-
|
|
3
|
+
- 以下是此前本会话一个或多个请求的返回结果,请逐项结合当前上下文处理。
|
|
4
4
|
- 不要提及 handoff 或内部路由机制。
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
{{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
{{content}}
|
|
6
|
+
待处理结果:
|
|
7
|
+
{{#each handoffOriginEntries}}- 原请求:{{previousContent}}
|
|
8
|
+
返回结果:{{responseContent}}
|
|
9
|
+
{{/each}}
|
|
@@ -5,5 +5,51 @@
|
|
|
5
5
|
"allowAccess": true,
|
|
6
6
|
"permissions": {
|
|
7
7
|
"permissionMode": { "default": "request", "allowOverride": false }
|
|
8
|
+
},
|
|
9
|
+
"commandPermissions": {
|
|
10
|
+
"contact.read": { "allow": true, "scopes": ["agent"] },
|
|
11
|
+
"contact.block": {
|
|
12
|
+
"allow": true,
|
|
13
|
+
"scopes": ["agent"],
|
|
14
|
+
"constraints": { "requireAgentAdmin": true }
|
|
15
|
+
},
|
|
16
|
+
"connect.write": {
|
|
17
|
+
"allow": true,
|
|
18
|
+
"scopes": ["agent"],
|
|
19
|
+
"constraints": { "requireAgentAdmin": true }
|
|
20
|
+
},
|
|
21
|
+
"connect.access.write": {
|
|
22
|
+
"allow": true,
|
|
23
|
+
"scopes": ["agent"],
|
|
24
|
+
"constraints": { "requireAgentOwner": true }
|
|
25
|
+
},
|
|
26
|
+
"role.assign": { "allow": true, "scopes": ["agent"] },
|
|
27
|
+
"role.revoke": { "allow": true, "scopes": ["agent"] },
|
|
28
|
+
"role.policy.read": { "allow": true, "scopes": ["agent"] },
|
|
29
|
+
"role.relation.read": { "allow": true, "scopes": ["agent"] },
|
|
30
|
+
"config.get": { "allow": true, "scopes": ["agent", "relation"] },
|
|
31
|
+
"config.set": { "allow": true, "scopes": ["agent", "relation"] },
|
|
32
|
+
"config.unset": { "allow": true, "scopes": ["agent", "relation"] },
|
|
33
|
+
"role.policy.write": {
|
|
34
|
+
"allow": true,
|
|
35
|
+
"dangerous": true,
|
|
36
|
+
"scopes": ["agent"],
|
|
37
|
+
"constraints": { "requireAgentAdmin": true }
|
|
38
|
+
},
|
|
39
|
+
"*": { "allow": true },
|
|
40
|
+
"agent.reload": {
|
|
41
|
+
"allow": true,
|
|
42
|
+
"dangerous": true,
|
|
43
|
+
"scopes": ["agent"],
|
|
44
|
+
"constraints": {
|
|
45
|
+
"targetCurrentAgentOnly": true,
|
|
46
|
+
"requireAgentAdmin": true
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"dangerous:*": {
|
|
50
|
+
"allow": true,
|
|
51
|
+
"dangerous": true,
|
|
52
|
+
"constraints": { "requireDaemonOwner": true }
|
|
53
|
+
}
|
|
8
54
|
}
|
|
9
55
|
}
|
|
@@ -29,6 +29,10 @@
|
|
|
29
29
|
"chatmode.update": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true, "targetCurrentAgentOnly": true } },
|
|
30
30
|
"mentionmode.current": { "allow": true, "scopes": ["relation"], "constraints": { "groupOnly": true } },
|
|
31
31
|
"mentionmode.update": { "allow": false },
|
|
32
|
+
"group.mentionmode.current": { "allow": true, "scopes": ["relation"], "constraints": { "groupOnly": true, "currentRelationOnly": true, "targetCurrentAgentOnly": true } },
|
|
33
|
+
"group.mentionmode.update": { "allow": false },
|
|
34
|
+
"group.rulespolicy.current": { "allow": true, "scopes": ["relation"], "constraints": { "groupOnly": true, "currentRelationOnly": true, "targetCurrentAgentOnly": true } },
|
|
35
|
+
"group.rulespolicy.update": { "allow": false },
|
|
32
36
|
"trigger.*": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true, "targetCurrentAgentOnly": true } },
|
|
33
37
|
"ec.msg.send": { "allow": true, "constraints": { "ownPeerOnly": true } },
|
|
34
38
|
"ec.msg.file": { "allow": true, "constraints": { "ownPeerOnly": true } },
|
|
@@ -27,6 +27,10 @@
|
|
|
27
27
|
"chatmode.update": { "allow": false },
|
|
28
28
|
"mentionmode.current": { "allow": true, "scopes": ["relation"], "constraints": { "groupOnly": true } },
|
|
29
29
|
"mentionmode.update": { "allow": false },
|
|
30
|
+
"group.mentionmode.current": { "allow": true, "scopes": ["relation"], "constraints": { "groupOnly": true, "currentRelationOnly": true, "targetCurrentAgentOnly": true } },
|
|
31
|
+
"group.mentionmode.update": { "allow": false },
|
|
32
|
+
"group.rulespolicy.current": { "allow": true, "scopes": ["relation"], "constraints": { "groupOnly": true, "currentRelationOnly": true, "targetCurrentAgentOnly": true } },
|
|
33
|
+
"group.rulespolicy.update": { "allow": false },
|
|
30
34
|
"trigger.*": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true, "targetCurrentAgentOnly": true } },
|
|
31
35
|
"session.list": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true } },
|
|
32
36
|
"ec.msg.send": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true, "privateOnly": true } },
|
|
@@ -24,8 +24,13 @@ chatMode: {{chatMode}} # interactive=同步对话 / proactive=主动推送
|
|
|
24
24
|
{{/}}
|
|
25
25
|
{{?groupId}}
|
|
26
26
|
{{?channel=aun}}
|
|
27
|
-
ec group send {{selfAid}} {{groupId}} "<text>" [--encrypt|--no-encrypt] [--file <path> --as image|video|voice|file] [--payload '<json>'] [--mention <aid>] [--mention-all]
|
|
27
|
+
ec group send {{selfAid}} {{groupId}} "<text>" [--return none|required] [--encrypt|--no-encrypt] [--file <path> --as image|video|voice|file] [--payload '<json>'] [--mention <aid>] [--mention-all]
|
|
28
|
+
# 双引号正文中的双引号、反引号和 Shell 变量 `$` 需分别在其前加反斜杠;ec 收到的仍是原字符。
|
|
28
29
|
group-send 是群内公开回复;interactive 下直接输出即为公开回复,仅 @某人/发文件/手动控制加密时才需此命令
|
|
30
|
+
# 跨会话发送必须显式填写 --return none|required;同会话发送不要求。
|
|
31
|
+
{{?isTriggerTask}}
|
|
32
|
+
# Trigger 任务的跨会话发送只允许 --return none,禁止 required。
|
|
33
|
+
{{/}}
|
|
29
34
|
# 加密:消息信封头标注每条入站消息是 🔒密文 还是 ✉明文。你用 group send 时【必须】跟随本轮入站消息的加密态——
|
|
30
35
|
# 回复某条密文消息务必带 --encrypt,回复明文消息带 --no-encrypt;不带任何加密参数则默认明文发送。
|
|
31
36
|
# interactive 下你直接输出的回复由 evolcore 自动按入站加密态发送(批次含密文则整轮密文),无需你操心。
|
|
@@ -36,8 +41,13 @@ group-send 是群内公开回复;interactive 下直接输出即为公开回复
|
|
|
36
41
|
{{/}}
|
|
37
42
|
{{?peerId}}
|
|
38
43
|
{{?channel=aun}}
|
|
39
|
-
ec msg send {{selfAid}} {{peerId}} "<text>" [--text-from-file <path>] [--encrypt|--no-encrypt] [--file <path> --as image|video|voice|file] [--link <url> --title "<title>"] [--payload '<json>']
|
|
44
|
+
ec msg send {{selfAid}} {{peerId}} "<text>" [--return none|required] [--text-from-file <path>] [--encrypt|--no-encrypt] [--file <path> --as image|video|voice|file] [--link <url> --title "<title>"] [--payload '<json>']
|
|
45
|
+
# 双引号正文中的双引号、反引号和 Shell 变量 `$` 需分别在其前加反斜杠;ec 收到的仍是原字符。
|
|
40
46
|
msg-send 用于私聊对端的附加能力(文件/链接/手动控制加密);群聊中仅在确需私下联系本条消息发送者时才用,否则用上面的 group send
|
|
47
|
+
# 跨会话发送必须显式填写 --return none|required;同会话发送不要求。
|
|
48
|
+
{{?isTriggerTask}}
|
|
49
|
+
# Trigger 任务的跨会话发送只允许 --return none,禁止 required。
|
|
50
|
+
{{/}}
|
|
41
51
|
# 加密:消息信封头标注每条入站消息是 🔒密文 还是 ✉明文。你用 msg send 时【必须】跟随你所回复的那条入站消息的加密态——
|
|
42
52
|
# 回复密文消息务必带 --encrypt,回复明文消息带 --no-encrypt;不带任何加密参数则默认明文发送(密文会话漏发明文是严重事故)。
|
|
43
53
|
# interactive 下你直接输出的回复由 evolcore 自动按入站加密态发送,无需你操心;仅当你显式调用 msg send 时才需自己带加密参数。
|
|
@@ -11,7 +11,7 @@ peerKey: {{peerKey}} # 跨渠道唯一标识,格式 channel#urlEncode(peerId)
|
|
|
11
11
|
{{?groupId}}
|
|
12
12
|
groupId: {{groupId}}
|
|
13
13
|
{{?groupRulesStatus}}
|
|
14
|
-
groupRulesStatus: {{groupRulesStatus}} # synced/cached/missing/forbidden/invalid_metadata/file_mismatch/too_large/unreadable/error
|
|
14
|
+
groupRulesStatus: {{groupRulesStatus}} # ignored/synced/cached/missing/forbidden/invalid_metadata/file_mismatch/too_large/unreadable/error
|
|
15
15
|
{{/}}
|
|
16
16
|
{{?groupRulesError}}
|
|
17
17
|
groupRulesError: {{groupRulesError}}
|
|
@@ -45,9 +45,13 @@ readonly: true — 禁止写入项目目录及临时目录;如需生成文件
|
|
|
45
45
|
{{/}}
|
|
46
46
|
# 命令速查:
|
|
47
47
|
{{?chatType=group}}
|
|
48
|
-
# ec group send {{selfAid}} {{groupId}} "<text>" [--file <path>] [--mention <aid>]
|
|
48
|
+
# ec group send {{selfAid}} {{groupId}} "<text>" [--return none|required] [--file <path>] [--mention <aid>]
|
|
49
49
|
{{/}}
|
|
50
50
|
{{?chatType=private}}
|
|
51
|
-
# ec msg send {{selfAid}} {{peerId}} "<text>" [--text-from-file <path>] [--file <path>]
|
|
51
|
+
# ec msg send {{selfAid}} {{peerId}} "<text>" [--return none|required] [--text-from-file <path>] [--file <path>]
|
|
52
|
+
{{/}}
|
|
53
|
+
# 跨会话发送必须显式填写 --return none|required;同会话发送不要求。
|
|
54
|
+
{{?isTriggerTask}}
|
|
55
|
+
# Trigger 任务的跨会话发送只允许 --return none,禁止 required;需要等待人工操作时使用 Trigger 的交互/待处理机制。
|
|
52
56
|
{{/}}
|
|
53
57
|
{{/}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "evolcore",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "AI Agent gateway connecting multiple backends (Claude, Codex, Gemini) to messaging channels (Feishu, WeChat, AUN, QQ) with multi-project session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
"!kits/.kits-version",
|
|
18
18
|
"*.md",
|
|
19
19
|
"!CLAUDE.md",
|
|
20
|
+
"!COMPLETED.md",
|
|
21
|
+
"!DECISIONS_PENDING.md",
|
|
20
22
|
"!DEPLOYMENT.md",
|
|
21
23
|
"!ONBOARDING.md",
|
|
22
24
|
"!TODO.md",
|
|
@@ -35,7 +37,7 @@
|
|
|
35
37
|
},
|
|
36
38
|
"dependencies": {
|
|
37
39
|
"@agentunion/fastaun": "^0.5.4",
|
|
38
|
-
"@anthropic-ai/claude-agent-sdk": "
|
|
40
|
+
"@anthropic-ai/claude-agent-sdk": "0.3.220",
|
|
39
41
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
40
42
|
"ajv": "^8.20.0",
|
|
41
43
|
"cron-parser": "^5.5.0",
|