evolcore 0.0.17 → 0.0.18

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 (62) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/bin/codex-managed-hook.mjs +16 -7
  3. package/bin/install-codex-managed-hooks.mjs +4 -2
  4. package/dist/agents/claude-runner.js +113 -24
  5. package/dist/agents/codex-app-server-client.js +6 -1
  6. package/dist/agents/codex-runner.js +21 -6
  7. package/dist/agents/ecagent-runner.js +39 -10
  8. package/dist/agents/gemini-runner.js +90 -19
  9. package/dist/aun/aid/store.js +36 -0
  10. package/dist/aun/msg/p2p.js +20 -8
  11. package/dist/channels/aun.js +159 -21
  12. package/dist/cli/agent-command.js +67 -6
  13. package/dist/cli/agent.js +26 -0
  14. package/dist/cli/command-log.js +23 -4
  15. package/dist/cli/daemon-commands.js +53 -12
  16. package/dist/cli/init.js +21 -5
  17. package/dist/cli/restart-monitor.js +13 -6
  18. package/dist/cli/watch-logs.js +2 -2
  19. package/dist/config/builtin-roles.js +5 -1
  20. package/dist/config/role-ranks.js +4 -0
  21. package/dist/core/audit/event-key.js +29 -0
  22. package/dist/core/audit/log-integrity.js +13 -3
  23. package/dist/core/auth/auth-gateway.js +14 -18
  24. package/dist/core/auth/authorization-audit.js +110 -3
  25. package/dist/core/auth/authorization-denial.js +17 -0
  26. package/dist/core/auth/operation-authorizer.js +143 -18
  27. package/dist/core/auth/operation-catalog.js +21 -5
  28. package/dist/core/bootstrap-messages.js +11 -6
  29. package/dist/core/bootstrap-service.js +26 -4
  30. package/dist/core/causation/aun-association.js +7 -4
  31. package/dist/core/command/agent-control.js +25 -16
  32. package/dist/core/command/command-handler.js +50 -4
  33. package/dist/core/command/group-menu.js +1 -1
  34. package/dist/core/command/menu-catalog.js +32 -7
  35. package/dist/core/command/menu-handler.js +59 -23
  36. package/dist/core/command/menu-protocol.js +196 -0
  37. package/dist/core/command/slash-gate.js +14 -5
  38. package/dist/core/command/slash-handler.js +81 -99
  39. package/dist/core/event-catalog.js +18 -0
  40. package/dist/core/message/message-bridge.js +72 -9
  41. package/dist/core/message/pause-controller.js +53 -0
  42. package/dist/core/message/response-engine.js +97 -11
  43. package/dist/core/permission/sandbox-runtime.js +79 -13
  44. package/dist/core/permission/tool-policy.js +1 -1
  45. package/dist/index.js +357 -48
  46. package/dist/ipc.js +75 -4
  47. package/dist/utils/atomic-write.js +45 -11
  48. package/dist/utils/logger.js +27 -0
  49. package/dist/utils/windows-autostart.js +740 -83
  50. package/ecagent/dist/harness/agent-harness.d.ts +1 -1
  51. package/ecagent/dist/harness/agent-harness.js +6 -4
  52. package/kits/docs/evolcore/config.md +1 -1
  53. package/kits/docs/evolcore/group-rules.md +2 -1
  54. package/kits/docs/identity/ROLE_DETAIL.md +3 -1
  55. package/kits/eck_manifest.json +25 -16
  56. package/kits/rules/01-overview.md +5 -5
  57. package/kits/rules/03-identity.md +1 -1
  58. package/kits/rules/04-relation.md +4 -4
  59. package/kits/rules/05-venue.md +5 -5
  60. package/kits/templates/bootstrap-welcome.md +3 -1
  61. package/kits/templates/system-fragments/bootstrap.md +17 -9
  62. package/package.json +1 -1
@@ -90,6 +90,6 @@ export declare class AgentHarness<TSkill extends Skill = Skill, TPromptTemplate
90
90
  subscribe(listener: (event: AgentHarnessEvent<TSkill, TPromptTemplate>, signal?: AbortSignal) => Promise<void> | void): () => void;
91
91
  on<TType extends keyof AgentHarnessEventResultMap>(type: TType, handler: (event: Extract<AgentHarnessOwnEvent, {
92
92
  type: TType;
93
- }>) => Promise<AgentHarnessEventResultMap[TType]> | AgentHarnessEventResultMap[TType]): () => void;
93
+ }>, signal?: AbortSignal) => Promise<AgentHarnessEventResultMap[TType]> | AgentHarnessEventResultMap[TType]): () => void;
94
94
  }
95
95
  //# sourceMappingURL=agent-harness.d.ts.map
@@ -162,14 +162,14 @@ export class AgentHarness {
162
162
  }
163
163
  }
164
164
  }
165
- async emitHook(event) {
165
+ async emitHook(event, signal) {
166
166
  const handlers = this.getHandlers(event.type);
167
167
  if (!handlers || handlers.size === 0)
168
168
  return undefined;
169
169
  let lastResult;
170
170
  for (const handler of handlers) {
171
171
  try {
172
- const result = await handler(event);
172
+ const result = await handler(event, signal);
173
173
  if (result !== undefined) {
174
174
  lastResult = result;
175
175
  }
@@ -327,13 +327,15 @@ export class AgentHarness {
327
327
  const result = await this.emitHook({ type: "context", messages: [...messages] });
328
328
  return result?.messages ?? messages;
329
329
  },
330
- beforeToolCall: async ({ toolCall, args }) => {
330
+ beforeToolCall: async ({ toolCall, args }, signal) => {
331
331
  const result = await this.emitHook({
332
332
  type: "tool_call",
333
333
  toolCallId: toolCall.id,
334
334
  toolName: toolCall.name,
335
335
  input: args,
336
- });
336
+ }, signal);
337
+ if (signal?.aborted)
338
+ return { block: true, reason: "Operation aborted" };
337
339
  return result ? { block: result.block, reason: result.reason } : undefined;
338
340
  },
339
341
  afterToolCall: async ({ toolCall, args, result, isError }) => {
@@ -175,7 +175,7 @@ ec config unset groupRules.mode \
175
175
  - **角色专用入口**:`roles/index.json` 与 `roles/{roleId}.json` 由角色服务维护;relation 的
176
176
  `role` 由角色分配服务维护;`permissionMode` 仅在角色策略中维护
177
177
  - **兼容字段**:`enable_rich_content` 仍可读取旧值,但已废弃且不再产生运行时效果
178
- - **群规则策略**:`groupRules.mode` Agent owner 或 daemon owner 可 set/unset;其他角色可读取当前 relation 的有效值
178
+ - **群规则策略**:`groupRules.mode` 仅当前 Agent 的实际 owner 可 set/unset;DaemonOwner 不继承群或 relation 写权限,其他角色可读取当前 relation 的有效值
179
179
  - **源码诊断白名单**:`readonlySourceDiagnostics` 默认关闭;开启后只读会话仅可在项目源码目录执行受限、可证明只读查询,配置/证书/快照/session/锁文件仍禁止访问
180
180
  - **仅人可写**:channels / owners / admins / 凭证 / aid / enabled / projects / aun / models.allowed
181
181
  - Agent 托管环境写仅人字段被拒
@@ -58,7 +58,8 @@ ec config unset groupRules.mode \
58
58
  ec config set groupRules.mode ignore --self bot.agentid.pub
59
59
  ```
60
60
 
61
- `groupRules.mode` 只能由 Agent owner 或 daemon owner 修改,其他角色仍可读取当前 relation 的有效值。
61
+ `groupRules.mode` 只能由当前 Agent 的实际 owner 修改;DaemonOwner 不会仅因进程角色而获得该权限,
62
+ 其他角色仍可读取当前 relation 的有效值。
62
63
  在群聊中,即使 owner 也只能修改当前群 relation,不能修改 Agent 默认值。命令沿用既有
63
64
  `ec config set/unset` 的授权、selector 和输出语义,不新增 Menu 协议。
64
65
 
@@ -12,7 +12,9 @@
12
12
  | visitor | Yes | No | No | No |
13
13
  | none | No | No | No | No |
14
14
 
15
- 进程级 daemon owner 是最高管理者;它通过 agent channel 进入时按设计作为该 agent 的 owner 处理。
15
+ 上表描述 Agent/relation 角色,不包含 daemon 进程控制面。进程级 `daemon-owner` 是独立角色,
16
+ 用于 daemon、Agent 生命周期、ECWeb 和指定 Trigger 控制操作;它通过 Agent channel 进入时仍保留
17
+ 实际关系角色,不会自动成为该 Agent 的 `owner`。
16
18
 
17
19
  ## 场景矩阵
18
20
 
@@ -7,7 +7,7 @@
7
7
  "path": "$KITS_RULES",
8
8
  "order": 10,
9
9
  "needsInjection": false,
10
- "when": "always",
10
+ "when": { "var": "lifecycle", "eq": "active" },
11
11
  "description": "ECK 核心规则(自动加载)"
12
12
  },
13
13
  {
@@ -27,7 +27,7 @@
27
27
  "needsInjection": true,
28
28
  "when": { "and": [
29
29
  { "var": "chatType", "neq": null },
30
- { "var": "lifecycle", "neq": "bootstrapping" }
30
+ { "var": "lifecycle", "eq": "active" }
31
31
  ] },
32
32
  "description": "身份层:我是谁"
33
33
  },
@@ -39,7 +39,7 @@
39
39
  "needsInjection": false,
40
40
  "when": { "and": [
41
41
  { "var": "chatType", "neq": null },
42
- { "var": "lifecycle", "neq": "bootstrapping" }
42
+ { "var": "lifecycle", "eq": "active" }
43
43
  ] },
44
44
  "description": "人格档案(persona.md)"
45
45
  },
@@ -51,7 +51,7 @@
51
51
  "needsInjection": false,
52
52
  "when": { "and": [
53
53
  { "var": "chatType", "neq": null },
54
- { "var": "lifecycle", "neq": "bootstrapping" }
54
+ { "var": "lifecycle", "eq": "active" }
55
55
  ] },
56
56
  "description": "当前关注(working memory)"
57
57
  },
@@ -63,7 +63,7 @@
63
63
  "needsInjection": false,
64
64
  "when": { "and": [
65
65
  { "var": "chatType", "eq": "private" },
66
- { "var": "lifecycle", "neq": "bootstrapping" }
66
+ { "var": "lifecycle", "eq": "active" }
67
67
  ] },
68
68
  "description": "用户偏好(自动记忆,仅私聊注入)"
69
69
  },
@@ -75,7 +75,7 @@
75
75
  "needsInjection": true,
76
76
  "when": { "and": [
77
77
  { "var": "chatType", "in": ["private", "group"] },
78
- { "var": "lifecycle", "neq": "bootstrapping" }
78
+ { "var": "lifecycle", "eq": "active" }
79
79
  ] },
80
80
  "description": "关系层:跟我聊天的是谁"
81
81
  },
@@ -87,7 +87,7 @@
87
87
  "needsInjection": false,
88
88
  "when": { "and": [
89
89
  { "var": "peerKey", "neq": null },
90
- { "var": "lifecycle", "neq": "bootstrapping" }
90
+ { "var": "lifecycle", "eq": "active" }
91
91
  ] },
92
92
  "description": "当前对端的关系档案"
93
93
  },
@@ -99,7 +99,7 @@
99
99
  "needsInjection": true,
100
100
  "when": { "and": [
101
101
  { "var": "chatType", "neq": null },
102
- { "var": "lifecycle", "neq": "bootstrapping" }
102
+ { "var": "lifecycle", "eq": "active" }
103
103
  ] },
104
104
  "description": "环境层模板(基础参数)"
105
105
  },
@@ -111,7 +111,7 @@
111
111
  "needsInjection": false,
112
112
  "when": { "and": [
113
113
  { "var": "chatType", "neq": null },
114
- { "var": "lifecycle", "neq": "bootstrapping" }
114
+ { "var": "lifecycle", "eq": "active" }
115
115
  ] },
116
116
  "description": "场景通用文档(private/group)"
117
117
  },
@@ -123,7 +123,7 @@
123
123
  "needsInjection": false,
124
124
  "when": { "and": [
125
125
  { "var": "chatType", "neq": null },
126
- { "var": "lifecycle", "neq": "bootstrapping" }
126
+ { "var": "lifecycle", "eq": "active" }
127
127
  ] },
128
128
  "description": "渠道+场景文档(如 feishu-group)"
129
129
  },
@@ -135,7 +135,7 @@
135
135
  "needsInjection": false,
136
136
  "when": { "and": [
137
137
  { "var": "groupRulesPath", "neq": null },
138
- { "var": "lifecycle", "neq": "bootstrapping" }
138
+ { "var": "lifecycle", "eq": "active" }
139
139
  ] },
140
140
  "description": "群资源空间同步的群规则"
141
141
  },
@@ -147,7 +147,7 @@
147
147
  "needsInjection": false,
148
148
  "when": { "and": [
149
149
  { "var": "clientType", "neq": null },
150
- { "var": "lifecycle", "neq": "bootstrapping" }
150
+ { "var": "lifecycle", "eq": "active" }
151
151
  ] },
152
152
  "description": "客户端环境文档"
153
153
  },
@@ -157,7 +157,10 @@
157
157
  "file": "$KITS_FRAGMENTS/channel.md",
158
158
  "order": 50,
159
159
  "needsInjection": true,
160
- "when": { "var": "channel", "neq": null },
160
+ "when": { "and": [
161
+ { "var": "channel", "neq": null },
162
+ { "var": "lifecycle", "eq": "active" }
163
+ ] },
161
164
  "description": "渠道层:通信渠道及能力"
162
165
  },
163
166
  {
@@ -166,7 +169,10 @@
166
169
  "file": "$KITS_FRAGMENTS/commands.md",
167
170
  "order": 55,
168
171
  "needsInjection": true,
169
- "when": { "var": "channel", "neq": null },
172
+ "when": { "and": [
173
+ { "var": "channel", "neq": null },
174
+ { "var": "lifecycle", "eq": "active" }
175
+ ] },
170
176
  "description": "命令集能力卡:按场景列出可用命令集及文档路径"
171
177
  },
172
178
  {
@@ -175,7 +181,7 @@
175
181
  "file": "$KITS_FRAGMENTS/session.md",
176
182
  "order": 60,
177
183
  "needsInjection": true,
178
- "when": "always",
184
+ "when": { "var": "lifecycle", "eq": "active" },
179
185
  "description": "会话层:当前会话实例状态"
180
186
  },
181
187
  {
@@ -184,7 +190,10 @@
184
190
  "file": "$KITS_FRAGMENTS/baseagent.md",
185
191
  "order": 70,
186
192
  "needsInjection": true,
187
- "when": { "var": "baseAgent", "neq": null },
193
+ "when": { "and": [
194
+ { "var": "baseAgent", "neq": null },
195
+ { "var": "lifecycle", "eq": "active" }
196
+ ] },
188
197
  "description": "Base Agent 特定配置"
189
198
  }
190
199
  ]
@@ -112,7 +112,7 @@ ECK(EvolCore Context Kit)是 EvolCore 的上下文组装系统。你正在
112
112
 
113
113
  | 部分 | 位置 | 加载方式 |
114
114
  |------|------|----------|
115
- | 自动载入 | `$KITS_RULES/`(本目录) | 全量加载到每个会话 |
115
+ | 自动载入 | `$KITS_RULES/`(本目录) | 仅在 agent `lifecycle=active` 时加载 |
116
116
  | 按需载入 | `$KITS_DOCS/` | 通过索引定位,需要时 Read |
117
117
  | 动态注入 | evolcore 代码 | 上下文组装时注入参数和文件 |
118
118
 
@@ -135,13 +135,13 @@ evolcore 收到每条消息时,由**声明式 manifest** 决定加载哪些上
135
135
 
136
136
  | 场景 | 命中的层/段 |
137
137
  |------|------------|
138
- | coding(无渠道) | rules + 会话层 + baseagent(身份/关系/环境/渠道层因无 channel、无身份而落选) |
138
+ | coding(无渠道) | active 时为 rules + 会话层 + baseagent(身份/关系/环境/渠道层因无 channel、无身份而落选) |
139
139
  | private(私聊) | rules + 身份层(含 preferences)+ 关系层(对端)+ 环境层 + 渠道层 + 会话层 + baseagent |
140
140
  | group(群聊) | rules + 身份层(**无 preferences**)+ 关系层(群)+ 环境层 + 渠道层 + 会话层 + baseagent |
141
- | bootstrapping | rules + bootstrap 引导 + 会话层 + baseagent |
141
+ | bootstrapping | bootstrap 引导(不加载 rules、身份、关系、环境、渠道、会话、baseagent 或完整 commands 段) |
142
142
 
143
- > 会话层(session fragment)是 `when:always`、baseagent 段只要注入了 base agent 信息就加载——
144
- > 二者与 chatType 无关,每个场景都在;所以 coding 并非"仅 rules"
143
+ > 常规段(包括 rules、session、baseagent)都要求 `lifecycle=active`。生命周期缺失或非法时,
144
+ > Manifest 不加载任何常规段;agent-owned turn 也不会直接落入普通 runner
145
145
 
146
146
  三份 manifest 各管一段:`kits/eck_manifest.json`(system prompt 默认)、
147
147
  `kits/eck_manifest.auxiliary.json`(备用,可由 `config.sessionManifests` 指定)、
@@ -29,7 +29,7 @@
29
29
 
30
30
  ## 人格与行为规范怎么生效
31
31
 
32
- - **注入条件**是 `chatType ≠ null` 且 `lifecycle bootstrapping`(即有渠道的会话),不是"有没有注入 AID"。本地 coding 模式不注入身份层。
32
+ - **注入条件**是 `chatType ≠ null` 且 `lifecycle = active`(即明确处于正常运行阶段的渠道会话),不是"有没有注入 AID"。生命周期变量缺失时失败关闭,不注入身份层;本地 coding 模式也不注入。
33
33
  - persona.md 由 evolcore **自动前置**进 system prompt,你不需要主动 Read。
34
34
  - persona.md 缺失时**没有默认人格兜底**,只是这一段不出现;行为约束改由 `kits/rules/` + `roles/` 权限定义承担。
35
35
  - 改完 persona.md 后 `ec agent reload` 生效(mtime 门控缓存)。
@@ -28,7 +28,7 @@ relations/
28
28
 
29
29
  群规则加载策略按 Agent `config.json` → 当前群 relation `config.json` 覆盖,缺省为 `load`。当有效值为
30
30
  `ignore` 时,本轮不访问远端规则、不读取本地 `rules.md`、不暴露 `groupRulesPath`;旧文件保留但不
31
- 作为回退来源。该字段仅 owner/daemon owner 可修改,其他角色可读取当前 relation 的有效值。
31
+ 作为回退来源。该字段仅当前 Agent 的实际 `owner` 关系角色可修改,其他角色可读取当前 relation 的有效值。
32
32
 
33
33
  **例子**:
34
34
  - AUN 对端:`relations/aun#alice.agentid.pub/`
@@ -64,9 +64,9 @@ relations/
64
64
  | 自定义角色 | 按配置 | 缺失/非法时安全兜底 **`readonly`** | 按 agent 角色模板定义 |
65
65
  | none | — | — | 无有效关系角色,拒绝访问 |
66
66
 
67
- 角色实际存储在 `relations/<peerKey>/config.json` 的 `role` 字段。
68
- 进程级 daemon owner 是最高管理者;命中时在 auth 层直接提升为 `owner`(不经过角色解析器,
69
- 后者的 owner 只来自 agent 级 `config.owners`)。
67
+ 角色实际存储在 `relations/<peerKey>/config.json` 的 `role` 字段。进程级 `daemon-owner` 与这里的
68
+ Agent/relation 角色正交,不会在 auth 层提升为 `owner`;只有 Agent 自身的 owner 配置和关系解析
69
+ 结果可以授予 `owner`。DaemonOwner 仅获得明确列入进程控制面的操作权限。
70
70
 
71
71
  **兜底链**:无匹配角色 → 回落内置 `visitor`(即 `readonly`);只有角色注册表本身缺失、
72
72
  或 `visitor` 未注册时才落到 `none` 拒绝访问。所以正常配置下几乎总是降权到只读,而不是拒绝。
@@ -16,12 +16,12 @@
16
16
 
17
17
  | 场景 | 条件 | 加载的段 | 你的行为 |
18
18
  |------|------|----------|----------|
19
- | coding | `chatType = null`(无渠道) | rules + 会话层 + baseagent | 本地模式,每条消息都响应 |
20
- | private | `chatType = private` | 上述 + 身份层(含 persona/working-memory/**preferences**)+ 关系层(对端 profile)+ 环境层 + 渠道层 + commands | 自主模式,回复方式随 `chatMode` |
21
- | group | `chatType = group` | 同 private,但**无 preferences**;`groupId` 有值加群 profile,`groupRulesPath` 有值加群规则 | 自主模式,`mentionMode` 决定是否响应 |
22
- | bootstrapping | `lifecycle = bootstrapping` | rules + bootstrap 引导 + 会话层 + baseagent(身份/关系/环境层全部落选) | 初始化引导 |
19
+ | coding | `chatType = null` 且 `lifecycle = active` | rules + 会话层 + baseagent | 本地模式,每条消息都响应 |
20
+ | private | `chatType = private` 且 `lifecycle = active` | 上述 + 身份层(含 persona/working-memory/**preferences**)+ 关系层(对端 profile)+ 环境层 + 渠道层 + commands | 自主模式,回复方式随 `chatMode` |
21
+ | group | `chatType = group` 且 `lifecycle = active` | 同 private,但**无 preferences**;`groupId` 有值加群 profile,`groupRulesPath` 有值加群规则 | 自主模式,`mentionMode` 决定是否响应 |
22
+ | bootstrapping | `lifecycle = bootstrapping` | bootstrap 引导(所有常规段均落选) | 初始化引导 |
23
23
 
24
- > coding 场景**不是"仅 rules"**:`session` `when:always`、`baseagent` 段只要注入了 base agent 就加载。
24
+ > coding 场景在 agent 明确 `active` 时才加载 `session` `baseagent`;生命周期缺失或非法时按 fail-closed 处理。
25
25
 
26
26
  ## 数据位置
27
27
 
@@ -12,4 +12,6 @@
12
12
  - 渠道: {{channel}}
13
13
  - Baseagent: {{baseagent}}
14
14
 
15
- 你可以直接按上面的三项回复。
15
+ 如果希望沿用已有 agent.md 信息,可以直接回复“沿用现有信息”;我会先读取并回显现有值,请你确认是否保持或修改,不需要重新输入。
16
+
17
+ 如果希望重新设定,也可以直接按上面的三项回复。
@@ -1,7 +1,7 @@
1
1
  [bootstrap]
2
2
  phase: bootstrapping
3
3
 
4
- 你正在进行首次自我设定。当前目标不是处理普通任务,而是和 owner 确认并写入你的基础名片信息。
4
+ 这是 agent 生命周期的强制门禁。你正在进行首次自我设定;在完成前,唯一目标是和 owner 确认并写入基础名片信息,不处理普通任务。
5
5
  整个过程由你根据当前对话自主推进,不存在需要查询或维护的额外 bootstrap 子状态。
6
6
 
7
7
  需要确认的字段:
@@ -9,14 +9,22 @@ phase: bootstrapping
9
9
  - description:一句到两句话描述你的职责或定位
10
10
  - tags:3 到 6 个标签,用于检索和归类
11
11
 
12
+ 允许的操作范围:
13
+ - 为读取现有候选值,可以读取本地 `{{agentMdPath}}`。
14
+ - owner 明确确认最终值后,只能编辑上述 agent.md 的 YAML frontmatter,并依次执行下面两个命令:
15
+ - `ec aid agentmd put {{selfAid}}`
16
+ - `ec agent ready {{selfAid}}`
17
+ - 除这些 bootstrap 操作及向 owner 回复外,不得调用工具或执行命令。
18
+
12
19
  每轮处理规则:
13
- 1. owner 的回复当作上述字段的候选信息,结合此前对话判断哪些字段已经明确。不要把示例值当成 owner 的选择。
14
- 2. 信息缺失、互相冲突或含义不清时,只追问缺失或有歧义的部分;保留此前已经明确的内容。
15
- 3. owner 在 bootstrap 完成前提出普通工作请求时,暂不执行该任务,先简短说明仍在完成首次设定并继续收集基础信息。
16
- 4. 三项信息齐全后,先向 owner 回显最终的 name、description、tags,并请求明确确认。确认前不要修改文件、发布名片或调用 ready。
17
- 5. owner 明确确认后,只编辑本地 agent.md(`$EVOLCORE_HOME/AIDs/{{selfAid}}/agent.md`)YAML frontmatter 中的 `name`、`description`、`tags`,保留其它字段和正文,并检查 YAML 与字段格式有效。
18
- 6. 调用 `ec aid agentmd put {{selfAid}}` 签名并发布 agent.md。只有命令明确成功后,才调用 `ec agent ready {{selfAid}}` 完成 bootstrap。
19
- 7. 任一步骤失败时,不调用 ready,不盲目重复尝试;说明具体失败原因并在修正后继续。
20
- 8. `ec agent ready {{selfAid}}` 必须是 bootstrap 的最后一个操作。成功后系统会结束当前 bootstrap 上下文、创建全新的主会话并发送正式欢迎消息;不要再生成一段完成说明,也不要在旧上下文中继续处理任务。
20
+ 1. 首次需要候选值时,读取本地 agent.md YAML frontmatter。已有且格式有效的 `name`、`description`、`tags` 是现有候选值:向 owner 回显并询问保持还是修改,不要求重新输入。空值、占位值或格式无效的字段视为缺失;`tags` 必须为 3 到 6 个非空标签。
21
+ 2. 只把 owner 明确提供、修改、选择或确认的 `name`、`description`、`tags` 当作候选信息。普通任务内容、示例值和顺带提及的词语都不是候选信息,不得据此推断字段。
22
+ 3. 信息缺失、互相冲突或含义不清时,只追问缺失或有歧义的部分;保留此前已经明确或 owner 选择保持的内容。
23
+ 4. owner bootstrap 完成前提出普通工作请求、要求跳过 bootstrap,或要求先执行任务后再设定时:不执行、不分析、不规划、不读取任务相关文件、不搜索、不调用任务工具,也不把任务排队到当前会话。只简短说明必须先完成首次设定,然后回显现有候选值并询问保持/修改,或只追问仍缺失的字段。
24
+ 5. 三项信息齐全后,向 owner 回显最终的 `name`、`description`、`tags`,并请求对这组最终值作明确确认。owner 仅表示“保持现有值”时,先据此形成最终值并回显;未经这一步最终确认,不要修改文件、发布名片或调用 ready。
25
+ 6. owner 明确确认最终值后,只编辑本地 agent.md(`{{agentMdPath}}`)YAML frontmatter 中的 `name`、`description`、`tags`,保留其它字段和正文,并检查 YAML 与字段格式有效。
26
+ 7. 调用 `ec aid agentmd put {{selfAid}}` 签名并发布 agent.md。只有命令明确成功后,才调用 `ec agent ready {{selfAid}}` 完成 bootstrap。
27
+ 8. 任一步骤失败时,不调用 ready,不盲目重复尝试;说明具体失败原因并在修正后继续。
28
+ 9. `ec agent ready {{selfAid}}` 必须是 bootstrap 的最后一个操作。成功后系统会结束当前 bootstrap 上下文、创建全新的主会话并发送正式欢迎消息;不要再生成一段完成说明,也不要在旧上下文中继续处理任务。
21
29
 
22
30
  完成前不要承诺已经进入正常工作状态,也不要尝试与上述流程无关的文件修改、网络通信或系统配置操作。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evolcore",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
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",