evolcore 0.0.43-test.2 → 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 (110) hide show
  1. package/CHANGELOG.md +8 -1
  2. package/dist/agents/ecagent-runner.js +13 -6
  3. package/dist/aun/aid/agentmd.js +21 -1
  4. package/dist/aun/msg/p2p.js +4 -2
  5. package/dist/channels/aun.js +79 -48
  6. package/dist/channels/daemon.js +4 -0
  7. package/dist/cli/agent-create.js +3 -5
  8. package/dist/cli/aun-commands.js +17 -19
  9. package/dist/cli/directory.js +101 -56
  10. package/dist/cli/index.js +1 -1
  11. package/dist/cli/peer.js +2 -1
  12. package/dist/cli/task-context.js +3 -1
  13. package/dist/config/access-policy.js +0 -1
  14. package/dist/config/builtin-role-templates.js +2 -2
  15. package/dist/config/builtin-roles.js +2 -1
  16. package/dist/config/config-field-policy.js +5 -0
  17. package/dist/config/config-manager.js +25 -10
  18. package/dist/config/peer-role-resolver.js +23 -1
  19. package/dist/config/role-schema.js +26 -2
  20. package/dist/config/role-service.js +9 -4
  21. package/dist/config/role-store.js +30 -8
  22. package/dist/core/auth/auth-gateway.js +14 -4
  23. package/dist/core/auth/operation-authorizer.js +17 -0
  24. package/dist/core/auth/operation-catalog.js +12 -2
  25. package/dist/core/channel-runtime.js +5 -0
  26. package/dist/core/command/agent-control.js +1 -1
  27. package/dist/core/command/agentmd-menu-request.js +50 -0
  28. package/dist/core/command/agentmd-menu.js +156 -0
  29. package/dist/core/command/command-handler.js +39 -3
  30. package/dist/core/command/menu-catalog.js +13 -0
  31. package/dist/core/command/menu-handler.js +59 -9
  32. package/dist/core/command/menu-protocol.js +8 -0
  33. package/dist/core/command/role-menu.js +23 -9
  34. package/dist/core/command/slash-handler.js +48 -21
  35. package/dist/core/daemon-lifecycle.js +9 -1
  36. package/dist/core/evolagent.js +5 -4
  37. package/dist/core/lifecycle-notice.js +185 -0
  38. package/dist/core/message/aun-ipc-sender.js +30 -24
  39. package/dist/core/message/contact-admission.js +1 -19
  40. package/dist/core/message/im-renderer.js +64 -28
  41. package/dist/core/message/message-admission.js +15 -65
  42. package/dist/core/message/message-bridge.js +18 -5
  43. package/dist/core/message/message-utils.js +9 -0
  44. package/dist/core/message/peer-mode.js +16 -8
  45. package/dist/core/message/response-engine.js +56 -35
  46. package/dist/core/ownership/owner-resolver.js +72 -34
  47. package/dist/core/permission/ec-command-parser.js +24 -10
  48. package/dist/core/relation/pa-team.js +127 -0
  49. package/dist/core/role/runtime-policy.js +4 -3
  50. package/dist/core/thread/thread-service.js +6 -4
  51. package/dist/directory/owner-directory-admission.js +0 -3
  52. package/dist/directory/owner-directory-cache.js +197 -15
  53. package/dist/directory/owner-directory-markdown.js +44 -21
  54. package/dist/directory/owner-directory-policy.js +1 -1
  55. package/dist/directory/owner-directory-query-operation.js +219 -97
  56. package/dist/directory/owner-directory-request-operation.js +76 -0
  57. package/dist/directory/owner-directory-scope.js +35 -4
  58. package/dist/directory/owner-directory-search.js +76 -23
  59. package/dist/directory/owner-directory-store.js +5 -38
  60. package/dist/directory/owner-directory-text.js +60 -0
  61. package/dist/eck/kit-renderer.js +6 -3
  62. package/dist/eck/message-renderer.js +2 -5
  63. package/dist/ecweb/message-context-service.js +4 -0
  64. package/dist/index.js +11 -0
  65. package/dist/paths.js +4 -2
  66. package/dist/product.js +1 -0
  67. package/dist/response-system/engines/v1/index.js +2 -4
  68. package/dist/response-system/modes/single-session/index.js +1 -1
  69. package/dist/trigger/scheduler.js +8 -3
  70. package/dist/utils/error-utils.js +7 -5
  71. package/ecagent/README.md +18 -0
  72. package/ecagent/dist/harness/agent-harness.d.ts +2 -0
  73. package/ecagent/dist/harness/agent-harness.js +24 -8
  74. package/ecagent/dist/harness/compaction/compaction.js +3 -0
  75. package/ecagent/dist/harness/types.d.ts +1 -0
  76. package/kits/docs/channels/aun.md +1 -1
  77. package/kits/docs/context-assembly.md +1 -1
  78. package/kits/docs/evolcore/INDEX.md +4 -1
  79. package/kits/docs/evolcore/directory.md +125 -35
  80. package/kits/docs/evolcore/ecweb-lifecycle.md +26 -0
  81. package/kits/docs/evolcore/file-navigation.md +265 -0
  82. package/kits/docs/evolcore/msg.md +1 -0
  83. package/kits/docs/evolcore/peer.md +2 -1
  84. package/kits/docs/evolcore/response.md +2 -2
  85. package/kits/docs/evolcore/task.md +2 -0
  86. package/kits/docs/evolcore/tool-authorization.md +1 -1
  87. package/kits/docs/identity/ROLE_DETAIL.md +2 -0
  88. package/kits/eck_manifest.json +7 -3
  89. package/kits/eck_manifest.memory.json +26 -1
  90. package/kits/schemas/_meta.json +16 -3
  91. package/kits/schemas/agent-config.schema.20.json +925 -0
  92. package/kits/schemas/relation-config.schema.13.json +289 -0
  93. package/kits/schemas/role-config.schema.3.json +1038 -0
  94. package/kits/schemas/role-registry.schema.1.json +3 -2
  95. package/kits/templates/soul/00-GUIDE.md +20 -42
  96. package/kits/templates/system-fragments/channel.md +2 -2
  97. package/kits/templates/system-fragments/commands.md +1 -1
  98. package/kits/templates/system-fragments/directory-contacts.md +1 -1
  99. package/kits/templates/system-fragments/personal-assistant.md +2 -17
  100. package/kits/templates/system-fragments/reply.md +7 -0
  101. package/kits/templates/system-fragments/session.md +6 -2
  102. package/package.json +2 -2
  103. package/dist/eck/paactive-context.js +0 -45
  104. package/dist/response-system/engines/v1/paactive-flow.js +0 -18
  105. package/kits/eck_manifest.paactive.json +0 -528
  106. package/kits/eck_message_manifest.paactive.json +0 -233
  107. package/kits/templates/message-fragments/paactive/item.md +0 -3
  108. package/kits/templates/system-fragments/paactive/channel.md +0 -25
  109. package/kits/templates/system-fragments/paactive/reply.md +0 -25
  110. package/kits/templates/system-fragments/paactive/session.md +0 -32
@@ -1,233 +0,0 @@
1
- {
2
- "$schema_version": 1,
3
- "sections": [
4
- {
5
- "id": "msg-inject-default",
6
- "type": "file",
7
- "file": "$KITS_MESSAGE_FRAGMENTS/inject-default.md",
8
- "order": 5,
9
- "needsInjection": true,
10
- "modeType": "inject",
11
- "modeName": "default",
12
- "isDefault": true,
13
- "when": {
14
- "and": [
15
- {
16
- "var": "isOwnerHint",
17
- "eq": true
18
- },
19
- {
20
- "var": "renderMode_inject",
21
- "eq": "default"
22
- }
23
- ]
24
- },
25
- "description": "观察者插话提示渲染(owner 信封头·default 模式)"
26
- },
27
- {
28
- "id": "msg-handoff-request-to-target",
29
- "type": "file",
30
- "file": "$KITS_MESSAGE_FRAGMENTS/handoff-request-to-target.md",
31
- "order": 20,
32
- "needsInjection": true,
33
- "modeType": "handoff",
34
- "modeName": "request_to_target",
35
- "when": {
36
- "and": [
37
- {
38
- "var": "isHandoff",
39
- "eq": true
40
- },
41
- {
42
- "var": "handoffKind",
43
- "eq": "request_to_target"
44
- },
45
- {
46
- "var": "handoffReturnPolicy",
47
- "eq": "required"
48
- }
49
- ]
50
- },
51
- "description": "[DEPRECATED] msg send 跨会话请求回复上下文渲染(handoff 已被 Thread Context 取代,见 docs/thread-chain/handoff-deprecation.md)"
52
- },
53
- {
54
- "id": "msg-handoff-context-to-target",
55
- "type": "file",
56
- "file": "$KITS_MESSAGE_FRAGMENTS/handoff-context-to-target.md",
57
- "order": 20,
58
- "needsInjection": true,
59
- "modeType": "handoff",
60
- "modeName": "request_to_target",
61
- "when": {
62
- "and": [
63
- {
64
- "var": "isHandoff",
65
- "eq": true
66
- },
67
- {
68
- "var": "handoffKind",
69
- "eq": "request_to_target"
70
- },
71
- {
72
- "var": "handoffReturnPolicy",
73
- "eq": "none"
74
- }
75
- ]
76
- },
77
- "description": "[DEPRECATED] msg send 跨会话单次本地上下文渲染(handoff 已被 Thread Context 取代,见 docs/thread-chain/handoff-deprecation.md)"
78
- },
79
- {
80
- "id": "msg-handoff-response-to-origin",
81
- "type": "file",
82
- "file": "$KITS_MESSAGE_FRAGMENTS/handoff-response-to-origin.md",
83
- "order": 21,
84
- "needsInjection": true,
85
- "modeType": "handoff",
86
- "modeName": "response_to_origin",
87
- "when": {
88
- "and": [
89
- {
90
- "var": "isHandoff",
91
- "eq": true
92
- },
93
- {
94
- "var": "handoffKind",
95
- "eq": "response_to_origin"
96
- }
97
- ]
98
- },
99
- "description": "[DEPRECATED] msg send 跨会话结果回流上下文渲染(handoff 已被 Thread Context 取代,见 docs/thread-chain/handoff-deprecation.md)"
100
- },
101
- {
102
- "id": "msg-trigger-thread-check",
103
- "type": "file",
104
- "file": "$KITS_MESSAGE_FRAGMENTS/trigger-thread-check.md",
105
- "order": 5,
106
- "needsInjection": true,
107
- "modeType": "trigger-thread-check",
108
- "modeName": "default",
109
- "isDefault": true,
110
- "when": {
111
- "and": [
112
- {
113
- "var": "isTriggerMsg",
114
- "eq": true
115
- },
116
- {
117
- "var": "triggerMsgKind",
118
- "eq": "cross-thread-review"
119
- }
120
- ]
121
- },
122
- "description": "跨话题复查通知专属渲染(kind=cross-thread-review:来源话题 + 目标话题 + 周期)"
123
- },
124
- {
125
- "id": "msg-trigger-session",
126
- "type": "file",
127
- "file": "$KITS_MESSAGE_FRAGMENTS/trigger-session.md",
128
- "order": 6,
129
- "needsInjection": true,
130
- "modeType": "trigger-session",
131
- "modeName": "default",
132
- "isDefault": true,
133
- "when": {
134
- "and": [
135
- {
136
- "var": "isTriggerMsg",
137
- "eq": true
138
- },
139
- {
140
- "var": "triggerMsgKind",
141
- "neq": "cross-thread-review"
142
- }
143
- ]
144
- },
145
- "description": "Trigger 唤醒消息渲染(trigger 信封头 + 触发时间 + 正文)"
146
- },
147
- {
148
- "id": "msg-thread-context",
149
- "type": "file",
150
- "file": "$KITS_MESSAGE_FRAGMENTS/thread-context.md",
151
- "order": 8,
152
- "needsInjection": true,
153
- "modeType": "thread-context",
154
- "modeName": "default",
155
- "isDefault": true,
156
- "when": {
157
- "var": "isThreadContext",
158
- "eq": true
159
- },
160
- "description": "跨话题上下文注入(来源话题 + 空洞提示 + 复查 Trigger)"
161
- },
162
- {
163
- "id": "msg-private-default",
164
- "type": "file",
165
- "file": "$KITS_MESSAGE_FRAGMENTS/paactive/item.md",
166
- "order": 10,
167
- "needsInjection": true,
168
- "modeType": "private",
169
- "modeName": "default",
170
- "isDefault": true,
171
- "when": {
172
- "and": [
173
- {
174
- "var": "isOwnerHint",
175
- "neq": true
176
- },
177
- {
178
- "var": "isThreadContext",
179
- "neq": true
180
- },
181
- {
182
- "var": "isTriggerMsg",
183
- "neq": true
184
- },
185
- {
186
- "var": "chatType",
187
- "neq": "group"
188
- },
189
- {
190
- "var": "renderMode_private",
191
- "eq": "default"
192
- }
193
- ]
194
- },
195
- "description": "对端私聊消息渲染(default 模式;chatType 非 group 的非插话消息,含 handoff/coding/null 兜底)"
196
- },
197
- {
198
- "id": "msg-group-default",
199
- "type": "file",
200
- "file": "$KITS_MESSAGE_FRAGMENTS/item.md",
201
- "order": 10,
202
- "needsInjection": true,
203
- "modeType": "group",
204
- "modeName": "default",
205
- "isDefault": true,
206
- "when": {
207
- "and": [
208
- {
209
- "var": "isOwnerHint",
210
- "neq": true
211
- },
212
- {
213
- "var": "isThreadContext",
214
- "neq": true
215
- },
216
- {
217
- "var": "isTriggerMsg",
218
- "neq": true
219
- },
220
- {
221
- "var": "chatType",
222
- "eq": "group"
223
- },
224
- {
225
- "var": "renderMode_group",
226
- "eq": "default"
227
- }
228
- ]
229
- },
230
- "description": "群聊消息渲染(default 模式)"
231
- }
232
- ]
233
- }
@@ -1,3 +0,0 @@
1
- ‹{{now}} · from:{{peerId}}{{?peerName}}({{peerName}}){{/}}{{?peerRole}} · role:{{peerRole}}{{/}}{{?chatType=group}} → 群:{{groupLabel}} · self:{{selfAid}}{{/}}{{?chatType=private}} → self:{{selfAid}}{{/}}{{?encrypted=true}} · 🔒密文{{/}}{{?encrypted=false}} · ✉️明文{{/}}{{?sameDevice}} · 📍同设备{{/}}{{?sameNetwork}} · 🌐同网络{{/}}{{?sameEgressIp}} · 🔀同出口IP{{/}}{{?mentionAids}} · @:{{mentionAids}}{{/}}›
2
- {{?lifecycle=bootstrapping}}(本轮只推进首次设定:按 Owner 这条回复更新名片和头像,然后完成激活;回复里的普通任务记为激活后待办,不在本轮执行。)
3
- {{/}}{{?isHandoff!=true}}{{content}}{{/}}
@@ -1,25 +0,0 @@
1
- [channel]
2
- channel: {{channel}} # 渠道类型:aun|feishu|wechat|dingtalk|qqbot|wecom
3
- {{?capabilities}}
4
- capabilities: {{capabilities}} # 当前渠道支持的能力
5
- {{/}}
6
- 回复方式、托管发送边界和加密要求统一遵循 `[reply]`。
7
- {{?supportsFileMarker}}
8
- 发送文件语法:
9
- [SEND_FILE:文件路径]
10
- 相对路径从项目根目录解析,图片自动内联预览。
11
- {{/}}
12
-
13
- {{?channel=aun}}
14
- {{?groupId}}
15
- ec group send {{selfAid}} {{groupId}} '<text>' [--encrypt|--no-encrypt] [--file <path> --as image|video|voice|file] [--payload '<json>'] [--mention '<aid1>,<aid2>'] [--mention-all]
16
- group-send 用于群内公开发送:paactive 下是正式回复;interactive 下普通回复直接输出,需要 @某人、发文件或手动控制加密时使用此命令。
17
- {{/}}
18
- {{?peerId}}
19
- 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>' --return none|required --timeout <duration> --format json]
20
- msg-send 用于私聊发送:paactive 下是正式回复;interactive 下普通回复直接输出,需要文件、链接或手动控制加密时使用此命令。群聊仅在确需私下联系本条消息发送者且已获授权时使用,公开回复使用 group-send。
21
- 当用户想获取、读取、查询或汇总属于某个主体的数据时,无论主体通过“我/你”、姓名、关系称谓还是 AID 指代,都先依据当前关系层、明确 AID 或可靠身份/联系人信息确认主体是谁并解析到准确 AID;姓名不明或有歧义时才询问。必要时加载 `ec-identity` 解析姓名。随后加载内置技能 `aid-ability`,检查该主体 AID 是否发布了匹配的数据能力;数据类型和来源不设限。若数据由关联设备或服务提供,只能依据能力索引或可信身份信息确认对应 Provider AID,不得猜测。
22
- 用户要求发现或调用其他 AID 的能力时使用 `aid-ability`。用户要求给当前 Agent/主机添加、开发、安装、启用、发布、下架、升级或诊断本端插件时使用 `ec-ability`。仅出现 `ability` 等术语不足以判定要调用远端能力;按用户要做的事分流。若用户只询问远端调用流程/可行性或明确要求不要执行,只说明身份解析、能力发现与调用步骤,不读取索引、不调用能力。实际调用时不要猜测能力路径或参数:读取目标 AID 的能力索引,必要时执行在线发现,再按结构化契约构造原始 JSON。需要结果时使用 `ec msg send --return required`;它会按 `--timeout`(默认 60s,最大 3600s)使用 AUN volatile 非持久消息。等待超时后用 `ec msg request get` 查询,不要自动重发。`message_id` 只表示传输 ACK,不表示能力执行完成。
23
- {{/}}
24
- 每次调用仍须遵守 `[reply]` 的单条命令及加密要求。
25
- {{/}}
@@ -1,25 +0,0 @@
1
- [reply]
2
- selfAid: {{selfAid}}
3
- peerId: {{peerId}}
4
- peerType: {{peerType}}
5
- channel: {{channel}}
6
- chatType: {{chatType}}
7
- chatMode: paactive
8
-
9
- 普通模型文本(含进展和最终文本)会作为 activity 展示,不构成正式回复。
10
- 正式文本回复必须通过当前托管会话显式发送:
11
- ec msg send {{selfAid}} {{peerId}} '<text>' [--encrypt|--no-encrypt]
12
- 拿不到可靠 self/目标或加密状态时,用 ec ctl send '<text>' 继承当前上下文。
13
- 发送成功后继续必要工作,不重复发送相同正文,不补发“已发送”回执。
14
- 工具、文件、图片和审批/提问卡片使用框架既有能力。paactive 不设 proactive 首轮表态或周期工具门禁。
15
-
16
- 发送约束(适用于正式回复及 active 阶段的附加发送):
17
- - 只能使用当前会话的 delegated sender,经 daemon IPC 发送;保留托管环境,不另建 SDK 连接。当前会话回复使用注入的 self 和目标,不为绕过限制改写身份、对端或 thread 路由。显式 msg/group send 必须写全 from/to;拿不到 self 或目标参数时改用 ec ctl send '<text>' 继承当前会话,不猜测身份或地址。
18
- - 调用发送命令时,每次 shell 调用只能执行一条完整的 ec 命令。不要拼接探测、管道、重定向、子 shell 或其它命令;不要读取外部 coding-agent skill 寻找发送方式。
19
- - 双引号正文中的双引号、反引号和 Shell 变量 `$` 需分别在其前加反斜杠。
20
- - 以退出码和发送回执判断成败;被拒绝时说明具体原因,不通过改目标、改身份或绕开托管通道重试。
21
- - 跨会话发送:一个话题只有本端与对端两端,当前话题只能直接回复 peerId/groupId。要联系当前对端({{peerId}})或当前群({{groupId}})以外的对象,属于**跨话题**发送:先 `ec thread list <对方AID>` 选中一个已有话题,没有合适话题就 `ec thread create <对方AID> --name '...'`,再用 `ec msg send '<text>' --thread <threadId> --check-every <时长>`(群聊为 `ec group send '<text>' --thread <threadId> --check-every <时长>`)发送;from/to 由话题推断,不必手写,`--check-every` 必填。不带 `--thread` 直接改目标发送会被拒绝;同会话回复当前对端/群不需要 `--thread`。
22
- {{?channel=aun}}
23
- - 显式调用 msg/group send 时必须选择加密参数:回复 🔒密文用 --encrypt,回复 ✉明文用 --no-encrypt;批次含密文则用 --encrypt。不得省略参数后依赖默认明文;加密状态不明时使用继承当前会话状态的 ec ctl send '<text>'。
24
- - ec ctl send 由框架继承当前会话的加密状态、目标和话题,无需手动改写路由。
25
- {{/}}
@@ -1,32 +0,0 @@
1
- [session]
2
- project: {{project}} # 项目目录名
3
- CURRENT_PROJECT: {{CURRENT_PROJECT}} # 项目完整路径
4
- sessionId: {{sessionId}} # evolcore 会话 ID
5
- {{?sessionKey}}
6
- sessionKey: {{sessionKey}} # 会话路由键(channelType#urlEncode(channelId)#urlEncode(threadId))
7
- {{/}}
8
- {{?sessionName}}
9
- sessionName: {{sessionName}}
10
- {{/}}
11
- sessionCreatedAt: {{sessionCreatedAt}}
12
- {{?localDate}}
13
- localDate: {{localDate}} {{weekday}} # 当前日期与星期(每条消息的精确时刻见消息正文前缀 ‹…›)
14
- {{/}}
15
- {{?timezone}}
16
- timezone: {{timezone}} # 时区 IANA 名:把消息/记忆里的 ISO 时间戳转成本地时间字符串时按此换算
17
- {{/}}
18
- {{?tzOffset}}
19
- tzOffset: {{tzOffset}} # 当前 UTC 偏移(DST 已计入)
20
- {{/}}
21
- {{?osInfo}}
22
- os: {{osInfo}} # 当前操作系统及版本
23
- {{/}}
24
- {{?permissionMode}}
25
- permissionMode: {{permissionMode}} # readonly / auto / request / bypass
26
- {{/}}
27
- {{?threadId}}
28
- threadId: {{threadId}} # 同一会话内的话题 ID(多话题路由时)
29
- {{/}}
30
- {{?readonly}}
31
- readonly: true — 禁止写入项目目录及临时目录;如需生成文件,请先请求切换到非 readonly 模式
32
- {{/}}