evolcore 0.0.11 → 0.0.12
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 +22 -0
- package/bin/codex-managed-hook.mjs +80 -0
- package/dist/agents/claude-runner.js +35 -2
- package/dist/agents/codex-app-server-client.js +120 -14
- package/dist/agents/codex-runner.js +273 -35
- package/dist/agents/ecagent-runner.js +36 -4
- package/dist/agents/gemini-runner.js +1 -0
- package/dist/aun/aid/client.js +11 -21
- package/dist/aun/aid/managed-operation.js +107 -0
- package/dist/aun/msg/group.js +81 -12
- package/dist/aun/msg/managed-operation.js +804 -0
- package/dist/aun/msg/mention-schema.js +20 -0
- package/dist/aun/msg/p2p.js +7 -0
- package/dist/channels/aun.js +288 -108
- package/dist/channels/daemon.js +13 -0
- package/dist/cli/agent-command.js +56 -8
- package/dist/cli/agent.js +170 -6
- package/dist/cli/aun-commands.js +270 -69
- package/dist/cli/bench.js +12 -3
- package/dist/cli/daemon-commands.js +31 -31
- package/dist/cli/fs-command.js +60 -0
- package/dist/cli/handoff-command.js +3 -0
- package/dist/cli/index.js +30 -2
- package/dist/cli/managed-command-guard.js +41 -0
- package/dist/cli/model.js +11 -4
- package/dist/cli/queue-command.js +11 -1
- package/dist/cli/response.js +71 -0
- package/dist/cli/restart-monitor.js +4 -18
- package/dist/cli/trigger-command.js +4 -0
- package/dist/config/builtin-roles.js +4 -0
- package/dist/config/contact-book-store.js +11 -3
- package/dist/config/contact-request-service.js +161 -15
- package/dist/config/mention-mode.js +8 -24
- package/dist/core/auth/agent-delegation.js +0 -1
- package/dist/core/auth/operation-authorizer.js +30 -7
- package/dist/core/auth/operation-catalog.js +187 -25
- package/dist/core/bootstrap-messages.js +18 -0
- package/dist/core/bootstrap-service.js +63 -4
- package/dist/core/capability/providers/claude-capability-provider.js +9 -31
- package/dist/core/capability/providers/codex-capability-provider.js +4 -15
- package/dist/core/capability/skill-discovery.js +55 -0
- package/dist/core/channel-loader.js +1 -1
- package/dist/core/command/cli-intent-parser.js +9 -0
- package/dist/core/command/command-handler.js +467 -6
- package/dist/core/command/connect-menu.js +15 -0
- package/dist/core/command/group-menu.js +4 -4
- package/dist/core/command/menu-catalog.js +366 -0
- package/dist/core/command/menu-handler.js +147 -35
- package/dist/core/command/menu-protocol.js +71 -0
- package/dist/core/command/slash-gate.js +5 -2
- package/dist/core/command/slash-handler.js +41 -21
- package/dist/core/daemon-file-cache.js +2 -1
- package/dist/core/data-migration.js +9 -2
- package/dist/core/evolagent.js +4 -2
- package/dist/core/handoff/dispatcher.js +5 -2
- package/dist/core/handoff/runtime.js +145 -21
- package/dist/core/handoff/store.js +24 -0
- package/dist/core/handoff/types.js +1 -0
- package/dist/core/message/logical-queue-bridge.js +1 -0
- package/dist/core/message/mention-schema.js +126 -0
- package/dist/core/message/message-bridge.js +236 -78
- package/dist/core/message/message-log.js +1 -0
- package/dist/core/message/message-queue.js +1 -0
- package/dist/core/message/response-engine.js +54 -36
- package/dist/core/permission/ec-command-parser.js +156 -10
- package/dist/core/permission/sandbox-runtime.js +22 -1
- package/dist/core/permission/tool-policy.js +73 -30
- package/dist/core/protected-paths.js +7 -2
- package/dist/core/session/session-manager.js +21 -2
- package/dist/eck/manifest-engine.js +39 -13
- package/dist/index.js +384 -98
- package/dist/ipc.js +218 -9
- package/dist/response-system/coordinator.js +6 -4
- package/dist/response-system/engines/v1/proactive-flow.js +26 -8
- package/dist/response-system/modes/single-session/index.js +14 -1
- package/dist/response-system/selector.js +6 -5
- package/dist/trigger/anomaly-store.js +4 -0
- package/dist/trigger/script-executor.js +1 -0
- package/dist/utils/codex-app-server-registry.js +90 -0
- package/dist/utils/codex-cli.js +5 -1
- package/dist/utils/cross-platform.js +15 -0
- package/dist/utils/npm-ops.js +5 -12
- package/dist/utils/tool-summary.js +11 -0
- package/kits/docs/channels/aun.md +1 -1
- package/kits/docs/context-assembly.md +2 -2
- package/kits/docs/evolcore/agent.md +11 -6
- package/kits/docs/evolcore/aid.md +14 -0
- package/kits/docs/prompt-loading-architecture.md +1 -2
- package/kits/docs/venues/group.md +1 -1
- package/kits/eck_manifest.json +0 -12
- package/kits/rules/04-relation.md +1 -1
- package/kits/rules/05-venue.md +2 -2
- package/kits/schemas/single-session.schema.1.json +3 -3
- package/kits/schemas/single-session.schema.2.json +3 -3
- package/kits/templates/roles/admin.json +22 -0
- package/kits/templates/roles/member.json +27 -0
- package/kits/templates/roles/visitor.json +33 -3
- package/kits/templates/system-fragments/bootstrap.md +1 -1
- package/kits/templates/system-fragments/channel.md +1 -1
- package/kits/templates/system-fragments/session.md +1 -1
- package/package.json +2 -2
- package/dist/core/command/evol-menu-version-gate.js +0 -39
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MentionSchemaError, normalizeMentionEntries, } from '../../core/message/mention-schema.js';
|
|
2
|
+
const AUN_MENTION_KEYS = new Set(['aid', 'scope', 'display', 'offset', 'length']);
|
|
3
|
+
/**
|
|
4
|
+
* Validate the AUN wire schema. `userId` is deliberately excluded here:
|
|
5
|
+
* it identifies users in platform-native adapters such as Feishu/DingTalk,
|
|
6
|
+
* while AUN addresses agents with `aid` and uses `scope: 'all'` for broadcast.
|
|
7
|
+
*/
|
|
8
|
+
export function normalizeAunMentionEntries(raw) {
|
|
9
|
+
const entries = normalizeMentionEntries(raw);
|
|
10
|
+
for (const [index, entry] of entries.entries()) {
|
|
11
|
+
if ('userId' in entry) {
|
|
12
|
+
throw new MentionSchemaError('userId is not valid in AUN mentions; use {aid: "..."}', index);
|
|
13
|
+
}
|
|
14
|
+
const unsupported = Object.keys(entry).find(key => !AUN_MENTION_KEYS.has(key));
|
|
15
|
+
if (unsupported) {
|
|
16
|
+
throw new MentionSchemaError(`${unsupported} is not valid AUN mention metadata`, index);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return entries;
|
|
20
|
+
}
|
package/dist/aun/msg/p2p.js
CHANGED
|
@@ -10,6 +10,7 @@ import { resolvePaths } from '../../paths.js';
|
|
|
10
10
|
import { ipcQuery } from '../../ipc.js';
|
|
11
11
|
import { AGENT_DELEGATION_TOKEN_ENV } from '../../core/auth/agent-delegation.js';
|
|
12
12
|
import { loadDaemonConfig } from '../../config-store.js';
|
|
13
|
+
import { normalizeAunMentionEntries } from './mention-schema.js';
|
|
13
14
|
const DEFAULT_TASK_EXECUTION_MS = 60 * 60 * 1000;
|
|
14
15
|
const DAEMON_SEND_TIMEOUT_GRACE_MS = 10_000;
|
|
15
16
|
const MAX_TIMER_MS = 2_147_483_647;
|
|
@@ -206,6 +207,9 @@ export async function msgSend(args) {
|
|
|
206
207
|
let payload;
|
|
207
208
|
if (args.body.mode !== 'file') {
|
|
208
209
|
payload = buildSimplePayload(args.body);
|
|
210
|
+
if (Object.prototype.hasOwnProperty.call(payload, 'mentions')) {
|
|
211
|
+
payload.mentions = normalizeAunMentionEntries(payload.mentions);
|
|
212
|
+
}
|
|
209
213
|
applyRoutingPayloadFields(payload, args, runtimeContext, false);
|
|
210
214
|
const daemonResult = await tryDaemonMsgSend(args, payload, runtimeContext);
|
|
211
215
|
if (daemonResult)
|
|
@@ -265,6 +269,9 @@ export async function msgSend(args) {
|
|
|
265
269
|
// 5. 写入 payload.thread_id/ref_message_id(如果指定)
|
|
266
270
|
applyRoutingPayloadFields(payload, args, runtimeContext, false);
|
|
267
271
|
applyRoutingPayloadFields(payload, args, runtimeContext);
|
|
272
|
+
if (Object.prototype.hasOwnProperty.call(payload, 'mentions')) {
|
|
273
|
+
payload.mentions = normalizeAunMentionEntries(payload.mentions);
|
|
274
|
+
}
|
|
268
275
|
const encrypt = resolveAunMessageEncrypt(args.encrypt);
|
|
269
276
|
const sendParams = { to: args.to, payload, encrypt };
|
|
270
277
|
const result = await conn.call('message.send', sendParams);
|