evolcore 0.0.28 → 0.0.29
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 +12 -0
- package/bin/ec-safe-output.js +270 -54
- package/dist/agents/baseagent-availability.js +37 -1
- package/dist/agents/baseagent.js +19 -9
- package/dist/agents/claude-runner.js +171 -13
- package/dist/agents/codex/app-server-client.js +6 -2
- package/dist/agents/codex/diagnostics.js +4 -3
- package/dist/agents/codex-runner.js +396 -95
- package/dist/agents/gemini-runner.js +35 -17
- package/dist/aun/group/history.js +130 -90
- package/dist/aun/group/operations.js +1 -3
- package/dist/aun/menu/transport.js +5 -3
- package/dist/aun/msg/managed-operation.js +70 -0
- package/dist/aun/msg/p2p.js +1 -3
- package/dist/aun/msg/upload.js +2 -2
- package/dist/aun/outbox.js +1 -37
- package/dist/channels/aun.js +249 -89
- package/dist/channels/daemon.js +18 -1
- package/dist/channels/feishu.js +1 -2
- package/dist/cli/agent-command.js +23 -3
- package/dist/cli/agent-create.js +68 -2
- package/dist/cli/agent.js +12 -2
- package/dist/cli/aun-commands.js +87 -13
- package/dist/cli/cli-argv.js +26 -0
- package/dist/cli/daemon-commands.js +40 -10
- package/dist/cli/data-command.js +4 -4
- package/dist/cli/handoff-command.js +2 -0
- package/dist/cli/index.js +18 -1
- package/dist/cli/managed-command-guard.js +10 -0
- package/dist/cli/memory-command.js +441 -0
- package/dist/cli/restart-monitor.js +62 -6
- package/dist/cli/skill-command.js +41 -0
- package/dist/cli/task-context.js +2 -23
- package/dist/cli/trigger-command.js +9 -1
- package/dist/cli/watch-msg-diag.js +209 -0
- package/dist/config/config-field-policy.js +52 -3
- package/dist/config/config-manager.js +17 -4
- package/dist/config/contact-book-store.js +2 -2
- package/dist/config/mention-mode.js +7 -2
- package/dist/config/merge.js +28 -9
- package/dist/config/resolved-config-op.js +1 -1
- package/dist/config/runtime-env.js +137 -0
- package/dist/config/schema-registry.js +11 -1
- package/dist/config-store.js +10 -10
- package/dist/core/audit/event-key.js +3 -1
- package/dist/core/audit/log-integrity.js +4 -0
- package/dist/core/auth/agent-delegation.js +2 -1
- package/dist/core/auth/auth-gateway.js +13 -6
- package/dist/core/auth/authorization-audit.js +54 -19
- package/dist/core/auth/operation-authorizer.js +17 -0
- package/dist/core/auth/operation-catalog.js +9 -0
- package/dist/core/causation/context.js +5 -1
- package/dist/core/command/agent-control.js +1 -2
- package/dist/core/command/command-handler.js +51 -23
- package/dist/core/command/memory-slash.js +270 -0
- package/dist/core/command/menu-catalog.js +1 -0
- package/dist/core/command/menu-handler.js +315 -60
- package/dist/core/command/menu-protocol.js +42 -4
- package/dist/core/command/slash-gate.js +10 -10
- package/dist/core/command/slash-handler.js +206 -64
- package/dist/core/data-migration.js +282 -505
- package/dist/core/event-catalog.js +26 -0
- package/dist/core/evolagent-registry.js +6 -0
- package/dist/core/evolagent.js +0 -10
- package/dist/core/handoff/store.js +1 -20
- package/dist/core/inference/text-inference.js +57 -1
- package/dist/core/memory/consolidation-context.js +505 -0
- package/dist/core/memory/consolidation-ops-records.js +124 -0
- package/dist/core/memory/consolidation-trigger.js +394 -0
- package/dist/core/memory/index-manager.js +308 -0
- package/dist/core/memory/launch-consolidation.js +395 -0
- package/dist/core/memory/memory-admin.js +234 -0
- package/dist/core/memory/memory-document.js +100 -0
- package/dist/core/memory/memory-session-policy.js +41 -0
- package/dist/core/memory/memory-signature.js +257 -0
- package/dist/core/memory/memory-writer.js +432 -0
- package/dist/core/memory/staleness.js +117 -0
- package/dist/core/message/auto-mention-gate.js +454 -0
- package/dist/core/message/im-renderer.js +69 -16
- package/dist/core/message/message-bridge.js +287 -21
- package/dist/core/message/message-log.js +1 -0
- package/dist/core/message/message-queue.js +114 -27
- package/dist/core/message/pending-hints.js +329 -161
- package/dist/core/message/response-engine.js +567 -80
- package/dist/core/permission/ec-command-parser.js +1029 -80
- package/dist/core/permission/protected-paths.js +376 -126
- package/dist/core/permission/sandbox-runtime.js +40 -12
- package/dist/core/permission/tool-error-code.js +96 -13
- package/dist/core/permission/tool-policy.js +276 -23
- package/dist/core/role/runtime-policy.js +3 -7
- package/dist/core/session/{runner-task-history.js → runner-event-summary.js} +1 -1
- package/dist/core/session/session-fs-store.js +0 -76
- package/dist/core/session/session-idle-monitor.js +355 -0
- package/dist/core/session/session-manager.js +478 -17
- package/dist/core/session/session-mapper.js +33 -16
- package/dist/core/session/session-renew.js +217 -155
- package/dist/core/session/{session-turns.js → session-transcript.js} +35 -6
- package/dist/core/skill/global-watcher.js +282 -0
- package/dist/core/skill/index-generator.js +84 -0
- package/dist/core/skill/startup.js +73 -0
- package/dist/core/skill/switch-resolver.js +115 -0
- package/dist/core/task/task-activity-store.js +219 -0
- package/dist/eck/kit-renderer.js +30 -3
- package/dist/eck/manifest-engine.js +26 -4
- package/dist/index.js +708 -18
- package/dist/ipc.js +564 -2
- package/dist/paths.js +30 -9
- package/dist/response-system/engines/v1/proactive-flow.js +116 -15
- package/dist/response-system/modes/single-session/index.js +3 -0
- package/dist/trigger/feedback.js +1 -0
- package/dist/trigger/manager.js +0 -10
- package/dist/trigger/scheduler.js +11 -0
- package/dist/trigger/validation.js +22 -0
- package/dist/utils/avatar-upload.js +59 -18
- package/dist/utils/error-dict.json +6 -3
- package/dist/utils/error-utils.js +27 -0
- package/dist/utils/logger.js +32 -10
- package/dist/utils/media-cache.js +84 -0
- package/dist/utils/msg-diag.js +97 -0
- package/dist/utils/welcome.js +37 -8
- package/kits/docs/AUTHORING.md +314 -0
- package/kits/docs/GUIDE.md +2 -0
- package/kits/docs/INDEX.md +2 -0
- package/kits/docs/aun/CHEATSHEET.md +4 -0
- package/kits/docs/aun/SDK.md +60 -0
- package/kits/docs/context-assembly.md +10 -6
- package/kits/docs/evolcore/INDEX.md +17 -3
- package/kits/docs/evolcore/agent-create.md +24 -0
- package/kits/docs/evolcore/agent.md +5 -2
- package/kits/docs/evolcore/config.md +1 -1
- package/kits/docs/evolcore/ec-capabilities.md +364 -0
- package/kits/docs/evolcore/group.md +34 -18
- package/kits/docs/evolcore/memory-architecture.md +78 -0
- package/kits/docs/evolcore/memory-consolidation-batches.md +133 -0
- package/kits/docs/evolcore/memory-consolidation.md +263 -0
- package/kits/docs/evolcore/memory-tags.md +63 -0
- package/kits/docs/evolcore/memory.md +110 -0
- package/kits/docs/evolcore/menu-client.md +27 -11
- package/kits/{schemas → docs/evolcore}/menu-exec-schema-commands.md +12 -6
- package/kits/docs/evolcore/menu-protocol.md +213 -0
- package/kits/docs/evolcore/msg.md +2 -0
- package/kits/docs/evolcore/trigger.md +7 -5
- package/kits/docs/path-registry.md +6 -8
- package/kits/docs/prompt-loading-architecture.md +5 -3
- package/kits/docs/venues/group.md +5 -4
- package/kits/eck_manifest.json +294 -88
- package/kits/eck_manifest.memory.json +257 -0
- package/kits/rules/03-identity.md +8 -8
- package/kits/rules/05-venue.md +4 -2
- package/kits/rules/06-channel.md +1 -1
- package/kits/schemas/_meta.json +276 -47
- package/kits/schemas/agent-config.schema.12.json +38 -2
- package/kits/schemas/agent-config.schema.13.json +591 -0
- package/kits/schemas/daemon.schema.6.json +9 -9
- package/kits/schemas/defaults.schema.5.json +29 -0
- package/kits/schemas/relation-config.schema.8.json +14 -1
- package/kits/schemas/relation-config.schema.9.json +129 -0
- package/kits/schemas/role-config.schema.1.json +3 -3
- package/kits/skills/.switches.json +3 -0
- package/kits/skills/ec-skill/SKILL.md +217 -0
- package/kits/skills/ec-skill/scripts/cli.mjs +128 -0
- package/kits/skills/ec-skill/scripts/deps.mjs +107 -0
- package/kits/skills/ec-skill/scripts/frontmatter.mjs +104 -0
- package/kits/skills/ec-skill/scripts/skill.mjs +629 -0
- package/kits/skills/ec-skill/scripts/template/SKILL.md.tmpl +30 -0
- package/kits/templates/decision/auto-mention.md +25 -0
- package/kits/templates/decision/session-renew.md +22 -0
- package/kits/templates/memory-consolidation/forget.md +104 -0
- package/kits/templates/memory-consolidation/generalize.md +76 -0
- package/kits/templates/memory-consolidation/notes.md +133 -0
- package/kits/templates/memory-consolidation/profile.md +58 -0
- package/kits/templates/memory-consolidation/promote.md +72 -0
- package/kits/templates/memory-consolidation/workflow.md +75 -0
- package/kits/templates/system-fragments/bootstrap.md +14 -5
- package/kits/templates/system-fragments/commands.md +1 -0
- package/kits/templates/system-fragments/group-history.md +6 -0
- package/kits/templates/system-fragments/identity.md +0 -3
- package/kits/templates/system-fragments/memory.md +79 -0
- package/kits/templates/system-fragments/reply.md +1 -0
- package/kits/templates/system-fragments/venue.md +1 -1
- package/package.json +4 -6
- package/dist/trigger/legacy-session-history.js +0 -19
- package/kits/templates/system-fragments/group-unread-history.md +0 -7
package/dist/aun/outbox.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import crypto from 'crypto';
|
|
2
|
-
import
|
|
3
|
-
import { agentActivityOutboxPath, agentOutboxPath, legacyAgentActivityOutboxPath, legacyAgentOutboxPath, legacyFlatOutboxPath, } from '../paths.js';
|
|
2
|
+
import { agentActivityOutboxPath, agentOutboxPath, } from '../paths.js';
|
|
4
3
|
import { atomicRead, atomicWrite } from '../utils/atomic-write.js';
|
|
5
4
|
import { isDeliveryTarget, isDeliveryTargetForChannel, sameDeliveryTarget } from '../core/message/message-utils.js';
|
|
6
5
|
export const DEFAULT_OUTBOX_MAX_ENTRIES = 200;
|
|
@@ -11,13 +10,11 @@ const MAX_TERMINAL_ENTRIES_PER_AID = 100;
|
|
|
11
10
|
const QUEUE_CONFIG = {
|
|
12
11
|
default: {
|
|
13
12
|
file: agentOutboxPath,
|
|
14
|
-
legacyFiles: aid => [legacyAgentOutboxPath(aid), legacyFlatOutboxPath(aid)],
|
|
15
13
|
maxEntries: DEFAULT_OUTBOX_MAX_ENTRIES,
|
|
16
14
|
defaultTtl: DEFAULT_OUTBOX_TTL_MS,
|
|
17
15
|
},
|
|
18
16
|
activity: {
|
|
19
17
|
file: agentActivityOutboxPath,
|
|
20
|
-
legacyFiles: aid => [legacyAgentActivityOutboxPath(aid)],
|
|
21
18
|
maxEntries: ACTIVITY_OUTBOX_MAX_ENTRIES,
|
|
22
19
|
defaultTtl: ACTIVITY_OUTBOX_TTL_MS,
|
|
23
20
|
},
|
|
@@ -31,7 +28,6 @@ export function defaultTtl(queue = 'default') {
|
|
|
31
28
|
function outboxFile(aid, queue = 'default') {
|
|
32
29
|
return queueConfig(queue).file(aid);
|
|
33
30
|
}
|
|
34
|
-
const migratedOutboxes = new Set();
|
|
35
31
|
function parseEntriesFile(file) {
|
|
36
32
|
try {
|
|
37
33
|
const content = atomicRead(file)?.trim();
|
|
@@ -50,36 +46,6 @@ function parseEntriesFile(file) {
|
|
|
50
46
|
return [];
|
|
51
47
|
}
|
|
52
48
|
}
|
|
53
|
-
/** Import old outbox layouts without deleting their recovery copies. */
|
|
54
|
-
function ensureOutboxMigrated(aid, queue) {
|
|
55
|
-
const canonical = outboxFile(aid, queue);
|
|
56
|
-
const key = canonical;
|
|
57
|
-
if (migratedOutboxes.has(key))
|
|
58
|
-
return;
|
|
59
|
-
const merged = fs.existsSync(canonical) ? parseEntriesFile(canonical) : [];
|
|
60
|
-
const ids = new Set(merged.map(entry => entry.id));
|
|
61
|
-
let changed = false;
|
|
62
|
-
for (const legacy of queueConfig(queue).legacyFiles(aid)) {
|
|
63
|
-
if (legacy === canonical || !fs.existsSync(legacy))
|
|
64
|
-
continue;
|
|
65
|
-
for (const entry of parseEntriesFile(legacy)) {
|
|
66
|
-
if (ids.has(entry.id))
|
|
67
|
-
continue;
|
|
68
|
-
ids.add(entry.id);
|
|
69
|
-
merged.push(entry);
|
|
70
|
-
changed = true;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
if (!changed) {
|
|
74
|
-
migratedOutboxes.add(key);
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
const content = merged.length > 0
|
|
78
|
-
? merged.map(entry => JSON.stringify(entry)).join('\n') + '\n'
|
|
79
|
-
: '';
|
|
80
|
-
atomicWrite(canonical, content);
|
|
81
|
-
migratedOutboxes.add(key);
|
|
82
|
-
}
|
|
83
49
|
function entryQueue(entry) {
|
|
84
50
|
return entry.queue ?? 'default';
|
|
85
51
|
}
|
|
@@ -102,11 +68,9 @@ export function isDeliveryForChannel(value, channelId) {
|
|
|
102
68
|
return isDeliveryTargetForChannel(value, channelId);
|
|
103
69
|
}
|
|
104
70
|
function readEntries(aid, queue = 'default') {
|
|
105
|
-
ensureOutboxMigrated(aid, queue);
|
|
106
71
|
return parseEntriesFile(outboxFile(aid, queue));
|
|
107
72
|
}
|
|
108
73
|
function writeEntries(aid, entries, queue = 'default') {
|
|
109
|
-
ensureOutboxMigrated(aid, queue);
|
|
110
74
|
const file = outboxFile(aid, queue);
|
|
111
75
|
const boundedEntries = trimFinalEntries(entries);
|
|
112
76
|
const content = boundedEntries.length > 0
|