evolcore 0.0.48 → 0.0.50
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 +97 -0
- package/bin/ecmsg.js +9 -4
- package/dist/ability/caller/authorization.js +21 -0
- package/dist/ability/caller/command.js +164 -0
- package/dist/ability/caller/contract.js +102 -0
- package/dist/ability/caller/daemon.js +158 -0
- package/dist/ability/caller/service.js +380 -0
- package/dist/ability/command-contract.js +5 -0
- package/dist/ability/daemon.js +5 -1
- package/dist/ability/interop-v1.js +10 -3
- package/dist/ability/management.js +1 -0
- package/dist/agent-template/jobs.js +173 -1
- package/dist/agent-template/runtime.js +285 -8
- package/dist/agent-template/service.js +1159 -40
- package/dist/agent-template/types.js +2 -1
- package/dist/agents/baseagent-availability.js +27 -3
- package/dist/agents/baseagent-capability-adapter.js +102 -0
- package/dist/agents/baseagent-plugin-descriptor.js +274 -0
- package/dist/agents/baseagent-plugin-loader.js +145 -0
- package/dist/agents/baseagent.js +68 -2
- package/dist/agents/claude-gateway/agent-registration.js +389 -0
- package/dist/agents/claude-gateway/binding.js +96 -0
- package/dist/agents/claude-gateway/inbox.js +138 -0
- package/dist/agents/claude-gateway/index.js +125 -0
- package/dist/agents/claude-gateway/listing.js +330 -0
- package/dist/agents/claude-gateway/router.js +328 -0
- package/dist/agents/claude-gateway/sessions.js +128 -0
- package/dist/agents/claude-gateway/terminal.js +250 -0
- package/dist/agents/claude-gateway/transcript.js +272 -0
- package/dist/agents/claude-gateway/types.js +14 -0
- package/dist/agents/claude-runner.js +6 -10
- package/dist/agents/codex-runner.js +9 -2
- package/dist/agents/{gemini-runner.js → gemini/gemini-runner.js} +17 -17
- package/dist/{core/session/adapters → agents/gemini}/gemini-session-file-adapter.js +2 -2
- package/dist/agents/gemini/index.js +51 -0
- package/dist/aun/aid/control-aid.js +52 -32
- package/dist/aun/group/invite-service.js +6 -36
- package/dist/aun/group/operations.js +6 -0
- package/dist/aun/msg/mention-schema.js +1 -1
- package/dist/aun/msg/p2p.js +31 -2
- package/dist/aun/msg/upload.js +126 -3
- package/dist/build-identity.json +1 -1
- package/dist/channels/aun.js +1175 -457
- package/dist/cli/ability-command.js +42 -0
- package/dist/cli/agent-command.js +20 -1
- package/dist/cli/agent-create.js +78 -18
- package/dist/cli/agent-template.js +5 -3
- package/dist/cli/agent.js +91 -0
- package/dist/cli/aun-commands.js +92 -34
- package/dist/cli/bench.js +5 -2
- package/dist/cli/config.js +22 -6
- package/dist/cli/daemon-commands.js +245 -101
- package/dist/cli/directory.js +6 -1
- package/dist/cli/ecmsg-gateway.js +11 -9
- package/dist/cli/index.js +30 -5
- package/dist/cli/init.js +39 -63
- package/dist/cli/managed-command-guard.js +3 -0
- package/dist/cli/menu-client.js +32 -7
- package/dist/cli/model.js +20 -5
- package/dist/cli/pay-command.js +30 -0
- package/dist/cli/provider-command.js +6 -2
- package/dist/cli/quota.js +89 -0
- package/dist/cli/restart-monitor.js +2 -2
- package/dist/cli/role.js +1 -0
- package/dist/cli/services-command.js +12 -9
- package/dist/cli/team-workspace-command.js +56 -2
- package/dist/cli/thread-command.js +78 -12
- package/dist/config/access-policy.js +16 -3
- package/dist/config/config-field-policy.js +88 -9
- package/dist/config/config-manager.js +97 -47
- package/dist/config/config-operation-service.js +22 -1
- package/dist/config/gateway-config.js +9 -8
- package/dist/config/owner-config.js +0 -16
- package/dist/config/peer-role-resolver.js +1 -7
- package/dist/config/providers-config.js +107 -20
- package/dist/config/providers-management.js +45 -21
- package/dist/config/resolved-config-op.js +4 -44
- package/dist/config/schema-migration.js +78 -5
- package/dist/config/schema-registry.js +52 -7
- package/dist/config-store.js +1309 -17
- package/dist/core/agent-application-service.js +220 -1
- package/dist/core/agent-ipc-registration.js +19 -2
- package/dist/core/agent-reload-coordinator.js +5 -0
- package/dist/core/agent-runtime.js +198 -54
- package/dist/core/auth/agent-delegation.js +14 -0
- package/dist/core/auth/delegation-authorization.js +33 -26
- package/dist/core/auth/operation-authorizer.js +16 -1
- package/dist/core/auth/operation-catalog.js +59 -7
- package/dist/core/baseagent-loader.js +30 -3
- package/dist/core/capability/capability-manager.js +16 -7
- package/dist/core/channel-runtime.js +4 -2
- package/dist/core/command/agent-control.js +20 -2
- package/dist/core/command/agent-template-menu.js +4 -3
- package/dist/core/command/cli-intent-parser.js +28 -0
- package/dist/core/command/command-handler.js +45 -2
- package/dist/core/command/menu-catalog.js +20 -4
- package/dist/core/command/menu-file-path.js +70 -0
- package/dist/core/command/menu-handler.js +97 -73
- package/dist/core/command/menu-protocol.js +29 -0
- package/dist/core/command/menu-query-batch.js +2 -2
- package/dist/core/command/private-mention-menu.js +71 -0
- package/dist/core/command/remote-shell.js +565 -0
- package/dist/core/command/slash-handler.js +17 -26
- package/dist/core/command/team-workspace-bootstrap.js +2 -1
- package/dist/core/command/topic-slash.js +7 -1
- package/dist/core/daemon-bootstrap.js +0 -4
- package/dist/core/daemon-control.js +58 -1
- package/dist/core/daemon-lifecycle.js +29 -7
- package/dist/core/evolagent-registry.js +18 -9
- package/dist/core/handoff/runtime.js +1 -1
- package/dist/core/host-snapshot.js +8 -3
- package/dist/core/initialization/service.js +3 -0
- package/dist/core/interaction-router.js +130 -0
- package/dist/core/ipc-registration.js +5 -0
- package/dist/core/memory/consolidation-context.js +2 -1
- package/dist/core/memory/consolidation.js +35 -64
- package/dist/core/message/aun-ipc-sender.js +213 -74
- package/dist/core/message/aun-request-registry.js +31 -0
- package/dist/core/message/contact-admission.js +91 -6
- package/dist/core/message/contact-pending-inbound.js +113 -0
- package/dist/core/message/contact-thread-approval.js +212 -0
- package/dist/core/message/im-renderer.js +40 -1
- package/dist/core/message/message-admission.js +5 -39
- package/dist/core/message/message-bridge.js +197 -45
- package/dist/core/message/message-log.js +32 -0
- package/dist/core/message/message-queue.js +102 -18
- package/dist/core/message/peer-mode.js +15 -4
- package/dist/core/message/response-engine.js +174 -26
- package/dist/core/message/send-options.js +37 -3
- package/dist/core/message/send-routing.js +11 -7
- package/dist/core/model/config-scope.js +6 -14
- package/dist/core/model/model-catalog.js +5 -5
- package/dist/core/model/model-diagnostics.js +19 -0
- package/dist/core/model/model-fallback.js +13 -2
- package/dist/core/ownership/owner-resolver.js +12 -86
- package/dist/core/pack-auth.js +7 -0
- package/dist/core/pack-install.js +1 -1
- package/dist/core/permission/ec-command-parser.js +288 -77
- package/dist/core/permission/protected-paths.js +64 -9
- package/dist/core/permission/services-path-acl.js +458 -0
- package/dist/core/permission/tool-policy.js +26 -10
- package/dist/core/relation/peer-identity.js +13 -0
- package/dist/core/session/adapters/claude-session-file-adapter.js +6 -2
- package/dist/core/session/adapters/codex-session-file-adapter.js +4 -0
- package/dist/core/session/session-manager.js +47 -10
- package/dist/core/session/session-mapper.js +16 -0
- package/dist/core/skill/index-generator.js +2 -3
- package/dist/core/skill/switch-resolver.js +3 -0
- package/dist/core/task/task-recovery-service.js +1 -0
- package/dist/core/thread/command-parser.js +4 -1
- package/dist/core/thread/ipc-operation.js +4 -2
- package/dist/core/thread/thread-operation.js +25 -10
- package/dist/core/thread/thread-service.js +294 -55
- package/dist/core/thread/topic-id.js +67 -2
- package/dist/core/thread/types.js +15 -1
- package/dist/directory/owner-directory-admission.js +11 -8
- package/dist/directory/owner-directory-cache.js +19 -0
- package/dist/directory/owner-directory-markdown.js +1 -1
- package/dist/directory/owner-directory-policy.js +5 -30
- package/dist/directory/owner-directory-request-operation.js +5 -2
- package/dist/eck/kit-renderer.js +3 -2
- package/dist/eck/message-renderer.js +28 -5
- package/dist/ecweb/basic-settings-service.js +5 -9
- package/dist/ecweb/providers-service.js +4 -2
- package/dist/ecweb/runtime/supervisor.js +36 -8
- package/dist/event-center/center-config.js +9 -5
- package/dist/event-center/dispatcher.js +10 -1
- package/dist/event-center/ipc-operation.js +19 -0
- package/dist/event-center/registry.js +20 -5
- package/dist/event-center/runtime.js +10 -7
- package/dist/index.js +120 -41
- package/dist/ipc.js +83 -3
- package/dist/outputs/authorization.js +16 -0
- package/dist/outputs/cards.js +336 -0
- package/dist/outputs/events.js +3 -2
- package/dist/outputs/protocol.js +1 -0
- package/dist/outputs/service.js +2 -15
- package/dist/paths.js +48 -1
- package/dist/pay/command.js +38 -0
- package/dist/pay/protocol.js +136 -0
- package/dist/pay/runtime.js +188 -0
- package/dist/pay/service.js +384 -0
- package/dist/pay/store.js +81 -0
- package/dist/response-system/engines/v1/proactive-flow.js +29 -2
- package/dist/services/dispatcher.js +23 -5
- package/dist/services/host/main.js +388 -0
- package/dist/services/host/protocol.js +118 -0
- package/dist/services/host/resident.js +310 -0
- package/dist/services/host-client.js +386 -0
- package/dist/services/host-deploy.js +180 -0
- package/dist/services/host-launch.js +117 -0
- package/dist/services/host-recycle.js +203 -0
- package/dist/services/host-runtime.js +802 -0
- package/dist/services/idempotency.js +44 -86
- package/dist/services/index-generator.js +4 -3
- package/dist/services/index.js +204 -22
- package/dist/services/ipc-operation.js +288 -44
- package/dist/services/pack-manager.js +1 -0
- package/dist/services/script-runner.js +515 -83
- package/dist/services/service-payload.js +13 -7
- package/dist/services/validation.js +109 -4
- package/dist/stats/budget.js +1 -1
- package/dist/stats/model-resolver.js +2 -2
- package/dist/stats/quota-query.js +95 -0
- package/dist/trigger/application-service.js +6 -4
- package/dist/trigger/local-files.js +19 -9
- package/dist/trigger/scheduler.js +22 -12
- package/dist/trigger/script-sandbox.js +51 -8
- package/dist/utils/aid-bind.js +3 -0
- package/dist/utils/atomic-write.js +22 -8
- package/dist/utils/evolcore-version.js +2 -2
- package/dist/utils/host-info.js +173 -1
- package/dist/utils/logger.js +2 -2
- package/dist/utils/media-cache.js +190 -43
- package/dist/utils/npm-ops.js +43 -8
- package/dist/utils/restart-safety.js +14 -1
- package/dist/utils/system-memory.js +113 -25
- package/dist/utils/systemd-lifecycle.js +154 -0
- package/dist/utils/windows-shell-trust.js +7 -3
- package/dist/workbench/service.js +1 -1
- package/kits/docs/INDEX.md +3 -2
- package/kits/docs/aun/AUN/346/266/210/346/201/257/347/261/273/345/236/213/344/270/216/345/261/236/346/200/247.md +1 -0
- package/kits/docs/channels/aun.md +1 -1
- package/kits/docs/evolcore/INDEX.md +9 -6
- package/kits/docs/evolcore/agent.md +36 -1
- package/kits/docs/evolcore/aid.md +45 -3
- package/kits/docs/evolcore/config.md +5 -2
- package/kits/docs/evolcore/directory.md +8 -9
- package/kits/docs/evolcore/group.md +2 -1
- package/kits/docs/evolcore/memory-tags.md +2 -0
- package/kits/docs/evolcore/menu-client.md +3 -3
- package/kits/docs/evolcore/menu-protocol.md +7 -0
- package/kits/docs/evolcore/model.md +3 -0
- package/kits/docs/evolcore/msg.md +77 -10
- package/kits/docs/evolcore/pay.md +34 -0
- package/kits/docs/evolcore/provider.md +22 -1
- package/kits/docs/evolcore/quota.md +54 -0
- package/kits/docs/evolcore/role.md +3 -0
- package/kits/docs/evolcore/services.md +46 -18
- package/kits/docs/evolcore/stats.md +2 -0
- package/kits/docs/evolcore/thread-chain.md +2 -0
- package/kits/docs/evolcore/tool-authorization.md +10 -0
- package/kits/docs/evolcore/trigger.md +2 -0
- package/kits/rules/01-overview.md +11 -32
- package/kits/rules/02-navigation.md +7 -0
- package/kits/rules/06-channel.md +3 -3
- package/kits/schemas/_meta.json +38 -5
- package/kits/schemas/agent-config.schema.20.json +24 -0
- package/kits/schemas/agent-config.schema.21.json +974 -0
- package/kits/schemas/agent-config.schema.22.json +977 -0
- package/kits/schemas/agent-config.schema.23.json +958 -0
- package/kits/schemas/daemon.schema.10.json +373 -0
- package/kits/schemas/daemon.schema.9.json +12 -0
- package/kits/schemas/defaults.schema.7.json +472 -0
- package/kits/schemas/providers.schema.3.json +18 -2
- package/kits/schemas/relation-config.schema.13.json +289 -0
- package/kits/skills/.switches.json +17 -1
- package/kits/skills/ability/SKILL.md +229 -34
- package/kits/skills/ability/STRUCTURE.md +333 -0
- package/kits/skills/ability/references/cli.md +208 -0
- package/kits/skills/ability/references/development.md +107 -37
- package/kits/skills/ability/references/management.md +106 -46
- package/kits/skills/ability/references/runtime-protocol.md +65 -63
- package/kits/skills/agent-output-cards/SKILL.md +64 -0
- package/kits/skills/ec-group/SKILL.md +8 -6
- package/kits/skills/ec-group/TASK.md +186 -0
- package/kits/skills/ec-group/WORKLOG.md +180 -0
- package/kits/skills/ec-group-collaboration/SKILL.md +3 -3
- package/kits/skills/ec-pay/SKILL.md +101 -0
- package/kits/skills/ec-pay/references/pay-cli.md +110 -0
- package/kits/skills/ec-provider/SKILL.md +58 -9
- package/kits/skills/{ec-service-proxy → ec-proxy}/SKILL.md +8 -5
- package/kits/skills/ec-service-call/SKILL.md +135 -0
- package/kits/skills/ec-service-pack/SKILL.md +277 -0
- package/kits/skills/ec-trigger/SKILL.md +1 -1
- package/kits/templates/memory-consolidation/notes.md +2 -2
- package/kits/templates/memory-consolidation/workflow.md +46 -0
- package/kits/templates/roles/visitor.json +1 -0
- package/kits/templates/system-fragments/channel.md +13 -4
- package/kits/templates/system-fragments/commands.md +5 -3
- package/kits/templates/system-fragments/directory-contacts.md +3 -4
- package/kits/templates/system-fragments/reply.md +1 -0
- package/kits/templates/system-fragments/session.md +1 -1
- package/kits/templates/system-fragments/thread.md +27 -128
- package/kits/templates/system-fragments/venue.md +27 -0
- package/package.json +4 -5
- package/scripts/agent-template/inspect.mjs +79 -29
- package/scripts/agent-template/overlay.mjs +20 -2
- package/scripts/agent-template/shared/common.mjs +24 -6
- package/scripts/agent-template/shared/team-schema.json +23 -5
- package/scripts/agent-template/shared/template-contract.mjs +107 -17
- package/scripts/agent-template/shared/template-package.mjs +254 -29
- package/scripts/agent-template/shared/template-runtime.mjs +145 -2
- package/scripts/agent-template/shared/template.mjs +67 -9
- package/scripts/agent-template/team-pack.mjs +132 -41
- package/scripts/agent-template/team-preview.mjs +249 -5
- package/kits/docs/aun/ABILITY_CALLING.md +0 -280
- package/kits/docs/evolcore/ability.md +0 -185
- package/kits/skills/ability/references/calling.md +0 -56
- package/kits/skills/ability/references/contract-checklist.md +0 -37
- package/kits/skills/ability/references/recovery.md +0 -27
- /package/dist/{core/capability/providers → agents/gemini}/gemini-capability-provider.js +0 -0
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import os from 'os';
|
|
3
|
+
import path from 'node:path';
|
|
3
4
|
function readNumber(filePath) {
|
|
4
5
|
try {
|
|
5
|
-
const
|
|
6
|
-
|
|
6
|
+
const raw = fs.readFileSync(filePath, 'utf8').trim();
|
|
7
|
+
const value = /^\d+$/u.test(raw) ? Number(raw) : NaN;
|
|
8
|
+
return Number.isSafeInteger(value) && value >= 0 ? value : null;
|
|
7
9
|
}
|
|
8
10
|
catch {
|
|
9
11
|
return null;
|
|
@@ -19,39 +21,125 @@ export function parseCgroupV2MemoryStat(input) {
|
|
|
19
21
|
}
|
|
20
22
|
return values;
|
|
21
23
|
}
|
|
24
|
+
function readText(file) {
|
|
25
|
+
try {
|
|
26
|
+
return fs.readFileSync(file, 'utf8').trim();
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
return '';
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function memoryHierarchies(cgroupRoot) {
|
|
33
|
+
if (cgroupRoot !== '/sys/fs/cgroup') {
|
|
34
|
+
return [{ directory: cgroupRoot, mountPoint: cgroupRoot, version: 2 }];
|
|
35
|
+
}
|
|
36
|
+
const memberships = readText('/proc/self/cgroup').split('\n')
|
|
37
|
+
.map(line => line.match(/^\d+:([^:]*):(\/.*)$/u))
|
|
38
|
+
.filter((match) => match !== null);
|
|
39
|
+
const hierarchies = [];
|
|
40
|
+
const decode = (value) => value.replace(/\\([0-7]{3})/gu, (_match, octal) => String.fromCharCode(Number.parseInt(octal, 8)));
|
|
41
|
+
for (const line of readText('/proc/self/mountinfo').split('\n')) {
|
|
42
|
+
const [mount, filesystem] = line.split(' - ');
|
|
43
|
+
if (!mount || !filesystem)
|
|
44
|
+
continue;
|
|
45
|
+
const fields = mount.split(' ');
|
|
46
|
+
const [type, , options = ''] = filesystem.split(' ');
|
|
47
|
+
if (type !== 'cgroup2' && !(type === 'cgroup' && options.split(',').includes('memory')))
|
|
48
|
+
continue;
|
|
49
|
+
if (!fields[3] || !fields[4])
|
|
50
|
+
continue;
|
|
51
|
+
const version = type === 'cgroup2' ? 2 : 1;
|
|
52
|
+
const member = memberships.find(match => version === 2
|
|
53
|
+
? match[1] === '' : match[1].split(',').includes('memory'));
|
|
54
|
+
if (!member)
|
|
55
|
+
continue;
|
|
56
|
+
const mountPoint = decode(fields[4]);
|
|
57
|
+
const relative = path.posix.relative(decode(fields[3]), member[2]);
|
|
58
|
+
const suffix = relative === '..' || relative.startsWith('../') ? member[2] : relative;
|
|
59
|
+
const directory = path.posix.resolve(mountPoint, `./${suffix}`);
|
|
60
|
+
if (directory === mountPoint || directory.startsWith(`${mountPoint}/`)) {
|
|
61
|
+
hierarchies.push({ directory, mountPoint, version });
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (hierarchies.length === 0) {
|
|
65
|
+
for (const [mountPoint, version] of [['/sys/fs/cgroup', 2], ['/sys/fs/cgroup/memory', 1]]) {
|
|
66
|
+
const member = memberships.find(match => version === 2
|
|
67
|
+
? match[1] === '' : match[1].split(',').includes('memory'));
|
|
68
|
+
const directory = path.posix.resolve(mountPoint, `.${member?.[2] ?? '/'}`);
|
|
69
|
+
if (directory === mountPoint || directory.startsWith(`${mountPoint}/`)) {
|
|
70
|
+
hierarchies.push({ directory, mountPoint, version });
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return hierarchies;
|
|
75
|
+
}
|
|
22
76
|
/**
|
|
23
77
|
* System memory for the current container/host namespace.
|
|
24
78
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
79
|
+
* Total is bounded by visible cgroup hard limits, including ancestors. Usage
|
|
80
|
+
* excludes filesystem cache when available. Free is hard-limit headroom;
|
|
81
|
+
* available also includes the cache estimate, bounded by parent headroom and
|
|
82
|
+
* host free memory. These are estimates, not guarantees of future allocation.
|
|
29
83
|
*/
|
|
30
84
|
export function readSystemMemoryUsage(cgroupRoot = '/sys/fs/cgroup') {
|
|
31
|
-
const
|
|
32
|
-
const
|
|
85
|
+
const hostTotal = os.totalmem();
|
|
86
|
+
const hostAvailable = os.freemem();
|
|
87
|
+
let memTotal = hostTotal;
|
|
33
88
|
if (process.platform === 'linux') {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
89
|
+
let headroom = hostAvailable;
|
|
90
|
+
let available = hostAvailable;
|
|
91
|
+
let usage;
|
|
92
|
+
for (const hierarchy of memoryHierarchies(cgroupRoot)) {
|
|
93
|
+
let directory = hierarchy.directory;
|
|
94
|
+
while (true) {
|
|
95
|
+
const limit = readNumber(`${directory}/${hierarchy.version === 2 ? 'memory.max' : 'memory.limit_in_bytes'}`);
|
|
96
|
+
const current = readNumber(`${directory}/${hierarchy.version === 2 ? 'memory.current' : 'memory.usage_in_bytes'}`);
|
|
97
|
+
const stat = parseCgroupV2MemoryStat(readText(`${directory}/memory.stat`));
|
|
98
|
+
const cache = hierarchy.version === 2 ? stat.get('file') : stat.get('total_cache') ?? stat.get('cache');
|
|
99
|
+
if (directory === hierarchy.directory && current !== null) {
|
|
100
|
+
usage = { current, cache, version: hierarchy.version };
|
|
101
|
+
}
|
|
102
|
+
// v1's unlimited sentinel exceeds safe integer precision and is ignored.
|
|
103
|
+
if (limit !== null) {
|
|
104
|
+
memTotal = Math.min(memTotal, limit);
|
|
105
|
+
if (current !== null) {
|
|
106
|
+
headroom = Math.min(headroom, Math.max(0, limit - current));
|
|
107
|
+
available = Math.min(available, Math.max(0, limit - Math.max(0, current - (cache ?? 0))));
|
|
108
|
+
}
|
|
50
109
|
}
|
|
110
|
+
if (directory === hierarchy.mountPoint)
|
|
111
|
+
break;
|
|
112
|
+
directory = path.posix.dirname(directory);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
if (usage) {
|
|
116
|
+
const { current, cache, version } = usage;
|
|
117
|
+
const memUsed = Math.min(memTotal, Math.max(0, current - (cache ?? 0)));
|
|
118
|
+
return {
|
|
119
|
+
memTotal, memUsed,
|
|
120
|
+
memFree: Math.min(headroom, Math.max(0, memTotal - current)),
|
|
121
|
+
memAvailable: Math.min(available, Math.max(0, memTotal - memUsed)),
|
|
122
|
+
memorySource: version === 2
|
|
123
|
+
? cache === undefined ? 'cgroup-v2-current' : 'cgroup-v2-current-minus-file'
|
|
124
|
+
: cache === undefined ? 'cgroup-v1-usage' : 'cgroup-v1-usage-minus-cache',
|
|
125
|
+
cgroupCurrent: current,
|
|
126
|
+
...(cache === undefined ? {} : { fileCache: cache }),
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
// Even if usage files are unreadable, keep a discovered hard limit and use
|
|
130
|
+
// Node's container-aware availability instead of subtracting host metrics.
|
|
131
|
+
if (memTotal < hostTotal) {
|
|
132
|
+
let memAvailable = 0;
|
|
133
|
+
try {
|
|
134
|
+
memAvailable = process.availableMemory();
|
|
51
135
|
}
|
|
52
|
-
catch { /*
|
|
136
|
+
catch { /* conservative fallback */ }
|
|
137
|
+
memAvailable = Number.isFinite(memAvailable) ? Math.max(0, Math.min(memTotal, hostAvailable, memAvailable)) : 0;
|
|
138
|
+
return { memTotal, memUsed: memTotal - memAvailable, memFree: memAvailable,
|
|
139
|
+
memAvailable, memorySource: 'runtime-available' };
|
|
53
140
|
}
|
|
54
141
|
}
|
|
142
|
+
const memAvailable = Math.max(0, Math.min(memTotal, hostAvailable));
|
|
55
143
|
return {
|
|
56
144
|
memTotal,
|
|
57
145
|
memUsed: Math.max(0, memTotal - memAvailable),
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { execFile } from 'child_process';
|
|
4
|
+
import { promisify } from 'util';
|
|
5
|
+
import { withFileLock } from './atomic-write.js';
|
|
6
|
+
import { getProcessStartTime, startTimeMatches } from './process-introspect.js';
|
|
7
|
+
import { readRestartRequest, updateRestartRequest } from './restart-safety.js';
|
|
8
|
+
const execFileAsync = promisify(execFile);
|
|
9
|
+
const SHOW_PROPERTIES = 'Id,LoadState,ActiveState,MainPID,ControlGroup,InvocationID';
|
|
10
|
+
function processCgroup(pid) {
|
|
11
|
+
const groups = fs.readFileSync(`/proc/${pid}/cgroup`, 'utf8').trim().split('\n')
|
|
12
|
+
.map(line => line.match(/^\d+:([^:]*):(\/.*)$/))
|
|
13
|
+
.filter(match => match && (match[1] === '' || match[1].split(',').includes('name=systemd')))
|
|
14
|
+
.map(match => match[2]);
|
|
15
|
+
if (groups.length !== 1 || path.posix.normalize(groups[0]) !== groups[0]) {
|
|
16
|
+
throw new Error(`Cannot determine systemd cgroup for daemon PID ${pid}`);
|
|
17
|
+
}
|
|
18
|
+
return groups[0];
|
|
19
|
+
}
|
|
20
|
+
function assertIdentity(pid, startedAt) {
|
|
21
|
+
if (!Number.isInteger(pid) || pid <= 1 || !Number.isFinite(startedAt)
|
|
22
|
+
|| !startTimeMatches(startedAt, getProcessStartTime(pid, { fresh: true }))) {
|
|
23
|
+
throw new Error(`Daemon identity changed or is unavailable (PID ${pid}); refusing systemd restart`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function hasAncestor(pid, ancestor) {
|
|
27
|
+
const visited = new Set();
|
|
28
|
+
while (pid > 1 && visited.size < 64 && !visited.has(pid)) {
|
|
29
|
+
if (pid === ancestor)
|
|
30
|
+
return true;
|
|
31
|
+
visited.add(pid);
|
|
32
|
+
const stat = fs.readFileSync(`/proc/${pid}/stat`, 'utf8');
|
|
33
|
+
pid = Number(stat.slice(stat.lastIndexOf(')') + 2).split(' ')[1]);
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
function scopeArgs(scope) {
|
|
38
|
+
return scope === 'user' ? ['--user'] : ['--system'];
|
|
39
|
+
}
|
|
40
|
+
/** Inspect the target daemon, never the calling CLI's cgroup or environment. */
|
|
41
|
+
export async function discoverSystemdService(pid, startedAt) {
|
|
42
|
+
if (process.platform !== 'linux')
|
|
43
|
+
return null;
|
|
44
|
+
assertIdentity(pid, startedAt);
|
|
45
|
+
const controlGroup = processCgroup(pid);
|
|
46
|
+
// The innermost unit owns the process. An ancestor user@/docker service is
|
|
47
|
+
// not ownership when a session/container scope is nested underneath it.
|
|
48
|
+
const units = controlGroup.split('/').filter(part => /\.(service|scope)$/.test(part));
|
|
49
|
+
const unit = units.at(-1);
|
|
50
|
+
if (!unit?.endsWith('.service'))
|
|
51
|
+
return null;
|
|
52
|
+
if (!/^[a-zA-Z0-9_:@.\\-]+\.service$/.test(unit) || unit.startsWith('-')) {
|
|
53
|
+
throw new Error('Invalid systemd service name in daemon cgroup');
|
|
54
|
+
}
|
|
55
|
+
// A container may expose a host cgroup while having its own PID namespace.
|
|
56
|
+
// Never ask a host/container manager to restart an enclosing host service.
|
|
57
|
+
if (fs.readFileSync('/proc/1/comm', 'utf8').trim() !== 'systemd') {
|
|
58
|
+
throw new Error('Daemon has a service cgroup but its systemd manager is not visible; restart from the owning host');
|
|
59
|
+
}
|
|
60
|
+
const userManager = controlGroup.match(/\/user@(\d+)\.service\//);
|
|
61
|
+
const scope = userManager ? 'user' : 'system';
|
|
62
|
+
if (userManager && Number(userManager[1]) !== process.getuid?.()) {
|
|
63
|
+
throw new Error('User systemd restart requires the owning user and its user manager');
|
|
64
|
+
}
|
|
65
|
+
const { stdout } = await execFileAsync('systemctl', [
|
|
66
|
+
...scopeArgs(scope), '--no-ask-password', 'show', `--property=${SHOW_PROPERTIES}`, '--', unit,
|
|
67
|
+
], { encoding: 'utf8', timeout: 5_000, maxBuffer: 64 * 1024 });
|
|
68
|
+
const properties = Object.fromEntries(stdout.trim().split('\n').map(line => {
|
|
69
|
+
const equals = line.indexOf('=');
|
|
70
|
+
return [line.slice(0, equals), line.slice(equals + 1)];
|
|
71
|
+
}));
|
|
72
|
+
const mainPid = Number(properties.MainPID);
|
|
73
|
+
if (properties.Id !== unit || properties.LoadState !== 'loaded' || properties.ActiveState !== 'active'
|
|
74
|
+
|| properties.ControlGroup !== controlGroup
|
|
75
|
+
|| !/^[a-f0-9]{32}$/.test(properties.InvocationID)
|
|
76
|
+
|| !Number.isInteger(mainPid) || mainPid <= 1
|
|
77
|
+
|| !hasAncestor(pid, mainPid) || processCgroup(mainPid) !== controlGroup) {
|
|
78
|
+
throw new Error(`Cannot verify daemon ownership by ${scope} unit ${unit}; service was not stopped`);
|
|
79
|
+
}
|
|
80
|
+
const command = fs.readFileSync(`/proc/${mainPid}/cmdline`, 'utf8').split('\0');
|
|
81
|
+
if (!command.includes('start') || !command.includes('--foreground')) {
|
|
82
|
+
throw new Error(`Unit ${unit} does not run start --foreground; automatic systemd restart is unsupported`);
|
|
83
|
+
}
|
|
84
|
+
assertIdentity(pid, startedAt);
|
|
85
|
+
return { scope, unit, controlGroup, invocationId: properties.InvocationID, mainPid, daemonPid: pid, daemonStartedAt: startedAt };
|
|
86
|
+
}
|
|
87
|
+
/** Persist ownership before submission: systemd can kill this caller before execFile resolves. */
|
|
88
|
+
export async function submitSystemdRestart(file, requestId, service) {
|
|
89
|
+
await withFileLock(`${file}.systemd.lock`, async () => {
|
|
90
|
+
const pending = readRestartRequest(file, requestId);
|
|
91
|
+
if (!pending || pending.status !== 'requested' || pending.backend) {
|
|
92
|
+
throw new Error('Restart request changed or was already submitted');
|
|
93
|
+
}
|
|
94
|
+
const current = await discoverSystemdService(service.daemonPid, service.daemonStartedAt);
|
|
95
|
+
if (!current || current.invocationId !== service.invocationId || current.unit !== service.unit
|
|
96
|
+
|| current.scope !== service.scope || current.controlGroup !== service.controlGroup) {
|
|
97
|
+
throw new Error('Systemd ownership changed before restart submission');
|
|
98
|
+
}
|
|
99
|
+
if (!updateRestartRequest(file, requestId, {
|
|
100
|
+
backend: 'systemd', systemd: service, deadline: Date.now() + 120_000,
|
|
101
|
+
}))
|
|
102
|
+
throw new Error('Restart request changed before systemd submission');
|
|
103
|
+
try {
|
|
104
|
+
await execFileAsync('systemctl', [
|
|
105
|
+
...scopeArgs(service.scope), '--no-ask-password', '--no-block', 'restart', '--', service.unit,
|
|
106
|
+
], { encoding: 'utf8', timeout: 5_000, maxBuffer: 64 * 1024 });
|
|
107
|
+
updateRestartRequest(file, requestId, { status: 'accepted' });
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
111
|
+
// A timeout can happen after the job was enqueued. Keep the durable
|
|
112
|
+
// binding so a replacement can still prove ready; forbid another restart.
|
|
113
|
+
const uncertain = error.killed === true;
|
|
114
|
+
updateRestartRequest(file, requestId, { ...(uncertain ? {} : { status: 'failed' }), reason });
|
|
115
|
+
throw error;
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
/** Called only after this daemon has written its own ready signal. */
|
|
120
|
+
export async function completeSystemdRestart(file) {
|
|
121
|
+
const pending = readRestartRequest(file);
|
|
122
|
+
if (pending?.backend !== 'systemd' || !pending.systemd
|
|
123
|
+
|| !['requested', 'accepted'].includes(pending.status))
|
|
124
|
+
return false;
|
|
125
|
+
return withFileLock(`${file}.systemd.lock`, async () => {
|
|
126
|
+
const request = readRestartRequest(file, pending.requestId);
|
|
127
|
+
if (!request?.systemd || !['requested', 'accepted'].includes(request.status))
|
|
128
|
+
return false;
|
|
129
|
+
if (!await resumeSystemdRestart(file))
|
|
130
|
+
return false;
|
|
131
|
+
const startedAt = getProcessStartTime(process.pid, { fresh: true });
|
|
132
|
+
if (!startedAt)
|
|
133
|
+
return false;
|
|
134
|
+
return updateRestartRequest(file, request.requestId, {
|
|
135
|
+
status: 'ready', daemonPid: process.pid, daemonStartedAt: startedAt,
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
/** The foreground launcher must preserve pure-restart intent on the new invocation. */
|
|
140
|
+
export async function resumeSystemdRestart(file) {
|
|
141
|
+
const request = readRestartRequest(file);
|
|
142
|
+
if (request?.backend !== 'systemd' || !request.systemd
|
|
143
|
+
|| !['requested', 'accepted'].includes(request.status))
|
|
144
|
+
return null;
|
|
145
|
+
const startedAt = getProcessStartTime(process.pid, { fresh: true });
|
|
146
|
+
if (!startedAt || startedAt <= request.systemd.daemonStartedAt)
|
|
147
|
+
return null;
|
|
148
|
+
const service = await discoverSystemdService(process.pid, startedAt);
|
|
149
|
+
if (!service || service.unit !== request.systemd.unit || service.scope !== request.systemd.scope
|
|
150
|
+
|| service.controlGroup !== request.systemd.controlGroup
|
|
151
|
+
|| service.invocationId === request.systemd.invocationId)
|
|
152
|
+
return null;
|
|
153
|
+
return request;
|
|
154
|
+
}
|
|
@@ -246,16 +246,20 @@ function cacheKey(filePath) {
|
|
|
246
246
|
* the existing parser behavior; only Windows enters the Authenticode path.
|
|
247
247
|
*/
|
|
248
248
|
export function isTrustedWindowsShellExecutable(executable, kind) {
|
|
249
|
-
if (process.platform !== 'win32')
|
|
250
|
-
return true;
|
|
251
249
|
try {
|
|
252
|
-
|
|
250
|
+
requireTrustedWindowsShellExecutable(executable, kind);
|
|
253
251
|
return true;
|
|
254
252
|
}
|
|
255
253
|
catch {
|
|
256
254
|
return false;
|
|
257
255
|
}
|
|
258
256
|
}
|
|
257
|
+
/** Preserve the concrete failure for EC permission checks and CLI diagnostics. */
|
|
258
|
+
export function requireTrustedWindowsShellExecutable(executable, kind) {
|
|
259
|
+
if (process.platform !== 'win32')
|
|
260
|
+
return executable;
|
|
261
|
+
return verifyWindowsShellExecutable(executable, kind);
|
|
262
|
+
}
|
|
259
263
|
function verifyWindowsShellExecutable(executable, kind) {
|
|
260
264
|
const resolved = resolveShellPath(executable, kind);
|
|
261
265
|
if (!resolved) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import crypto from 'node:crypto';
|
|
2
2
|
import { DataRootError } from '../core/command/team-workspace-store.js';
|
|
3
3
|
import { TaskActivityStore, onTaskActivityMutation, taskActivityTitle } from '../core/task/task-activity-store.js';
|
|
4
|
-
import { authorizeOutput, currentOutputOwner } from '../outputs/
|
|
4
|
+
import { authorizeOutput, currentOutputOwner } from '../outputs/authorization.js';
|
|
5
5
|
import { WORKBENCH_EVENT, WORKBENCH_MODULES, isWorkbenchType } from './protocol.js';
|
|
6
6
|
let runtimeProvider;
|
|
7
7
|
const runtimeListeners = new Set();
|
package/kits/docs/INDEX.md
CHANGED
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
| 速查表 | `aun/CHEATSHEET.md` | AUN 协议命名空间与常用操作速查 |
|
|
19
19
|
| SDK 文档指引 | `aun/SDK.md` | AUN SDK 文档位置(`$AUN_SDK_DOCS`)、结构与常用入口;四语言版本共用同一份协议文档 |
|
|
20
20
|
| 同步协议 | `aun/SYNC_PROTOCOL.md` | 上游协议同步 SOP |
|
|
21
|
-
| Ability 调用 | `
|
|
21
|
+
| Ability 调用 | 内置 `ability` 技能 | AID 能力发现、payload、设备状态收集和请求关联;协议与调用流程都在该技能的 `SKILL.md` |
|
|
22
22
|
|
|
23
|
-
AUN Ability 规范与按任务选择提供、发现、管理和调用流程,统一从 `ability` 技能进入(`ec skill load ability
|
|
23
|
+
AUN Ability 规范与按任务选择提供、发现、管理和调用流程,统一从 `ability` 技能进入(`ec skill load ability`)。命令行语法、协议与各阶段流程全部收在该技能内;源码仓库 `$PACKAGE_ROOT/docs/ability/plugin-system/README.md` 提供实施设计与交付状态,不代替技能内说明。
|
|
24
24
|
|
|
25
25
|
## EvolCore 命令
|
|
26
26
|
|
|
@@ -30,6 +30,7 @@ AUN Ability 规范与按任务选择提供、发现、管理和调用流程,
|
|
|
30
30
|
| 文档 | 路径 | 说明 |
|
|
31
31
|
|------|------|------|
|
|
32
32
|
| 命令集目录 | `evolcore/INDEX.md` | msg/group/agent/aid/storage/ctl/rpc/bench 全集索引 |
|
|
33
|
+
| 网站订单付款 | `evolcore/pay.md` | ec pay、扫码付款卡片、订单核验与原任务恢复;流程使用 ec-pay 技能 |
|
|
33
34
|
| Provider 注册表 | `evolcore/provider.md` | 宿主进程级 Provider CRUD、JSON 导入及 CLI/Menu 边界 |
|
|
34
35
|
| 对端命令 | `evolcore/peer.md` | 对端身份表、拉黑与托管会话权限边界 |
|
|
35
36
|
| Owner 名录命令 | `evolcore/directory.md` | 名录查询、强制刷新、拉黑总览与本地备注(仅 PA 可写) |
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
| `voice`、`image`、`video`、`file` | 语音、图片、视频和文件引用 |
|
|
64
64
|
| `location`、`link` | 位置、链接卡片 |
|
|
65
65
|
| `action_card`、`action_card_reply` | 交互卡片及回复 |
|
|
66
|
+
| `widget_card`、`widget_card_reply` | HTML 附件交互卡片及 JSON 回复;Core 工作区实现,需 EvolApp 接入内置浏览器消息桥,不能据此认定客户端或线上已支持 |
|
|
66
67
|
| `merge`、`personal_card` | 合并转发、个人或 Agent 名片 |
|
|
67
68
|
| `status`、`event` | 应用状态、业务事件;这里的 `event` 是消息内容,不等同于在线 notify 或服务端协议事件 |
|
|
68
69
|
| `json`、`custom` | 结构化数据或应用自定义内容;投票可使用 `json` 加 `kind=poll` |
|
|
@@ -57,7 +57,7 @@ AUN keystore seed 由 EvolCore 使用固定应用值管理,不再提供配置
|
|
|
57
57
|
- **身份与信任**:每条入站消息携带发送者 AID,经四级 X.509 证书链(Root CA → Registry CA → Issuer CA → Agent)验签。
|
|
58
58
|
- **agent.md 缓存**:对端名片 `https://<aid>/agent.md` 由 **AUN SDK 自动拉取并缓存**(`AgentMdManager`,带 ETag/TTL,默认 1 天内不重复探测)。缓存落在 **`$EVOLCORE_HOME/AIDs/<aid>/`**,每个 AID 两个文件:`agent.md`(带签名正文)+ `agentmd.json`(元数据:etag/last_modified/checked_at/verify_status)。本端与对端的 agent.md 都缓存于此。
|
|
59
59
|
- 关系层另存一份**派生**的精简身份 `relations/<peerKey>/peer-identity.json`(type/isAgent/name),由 evolcore 从 agent.md 提取,不是 agent.md 本体。
|
|
60
|
-
- **E2EE 加密**:可选端到端加密,回复默认跟随对端消息加密状态(密文回密文,明文回明文);主动发起默认明文,只有显式 `--encrypt` 或 `aun.defaultEncrypt: true` 才加密;keystore seed 由 EvolCore 固定管理。
|
|
60
|
+
- **E2EE 加密**:可选端到端加密,回复默认跟随对端消息加密状态(密文回密文,明文回明文);主动发起默认明文,只有显式 `--encrypt yes` 或 `aun.defaultEncrypt: true` 才加密;keystore seed 由 EvolCore 固定管理。
|
|
61
61
|
- **断线重连**:SDK 内置退避策略自动重连。实时连接状态用 `ec watch aid` 查看(`ec aid` 是身份/证书管理,不显示连接状态)。
|
|
62
62
|
- **群 ID 格式**:使用 `{base}.{issuer}`,如 `ontology.agentid.cn` 或 `g-12345.agentid.cn`。EvolCore 默认创建 `g-` 加五位数字(10000–99999)的名称,issuer 以群服务返回为准。群命令支持 base 简写;不再支持或转换 `group.{issuer}/{base}`,也不支持 `base@issuer`。`g-` 是名称的一部分,不应剥离,也不能仅凭群 AID 的格式判断主体类型。
|
|
63
63
|
- **群 @ 处理策略**:`mention_mode=disabled|mention-only` 是群级配置,只决定哪些群消息进入 Agent LLM 上下文,不影响 AUN 协议层投递;被过滤消息仍应本地存档。
|
|
@@ -37,8 +37,8 @@ Windows 上 Codex 托管任务出现 `helper_sandbox_lock_failed`、`SetNamedSec
|
|
|
37
37
|
|
|
38
38
|
| 命令集 | 用途 | 触发词 | 适用场景 | 文档 |
|
|
39
39
|
|--------|------|--------|----------|------|
|
|
40
|
-
| `ecmsg` | **发送消息的统一入口**(当前会话 / `--thread` 跨话题 / `--to` 指定对端) | 回复/发消息/发文件/发链接/payload
|
|
41
|
-
| `ec msg` |
|
|
40
|
+
| `ecmsg` | **发送消息的统一入口**(当前会话 / `--thread` 跨话题 / `--to` 指定对端) | 回复/发消息/发文件/发链接/payload/加密/跨话题/WidgetCard/HTML表单 | 有对端(peerId) | `msg.md` |
|
|
41
|
+
| `ec msg` | 私聊消息查询命令(拉取/撤回/查在线/请求状态/本地历史);发送一律用 `ecmsg` | 拉取/撤回/查在线/请求等待/结果查询/request_id/call_id | 有对端(peerId) | `msg.md` |
|
|
42
42
|
| `ec thread` | 话题管理与话题链 | 话题/thread/跨会话/委托/话题链/ThreadOrigin/summary/删除话题 | 有对端(私聊或群聊) | `thread-chain.md` |
|
|
43
43
|
| `ec group` | 群聊收发与群管理 | 群发/建群/本地群历史/邀请/踢人/退群/群成员/角色/封禁/屏蔽/成员状态/规则/@提及模式/协作 | AUN 群;可从私聊发起协作 | `group.md`;协作流程用 `ec-group-collaboration` 技能 |
|
|
44
44
|
| `/invites` / `ec group invites` | 收到群邀请、Owner 卡片审核与恢复 | 入群邀请/接受邀请/拒绝邀请/审核卡片/待处理邀请 | 当前 Agent Owner 的 AUN 私聊 | `group.md` |
|
|
@@ -47,7 +47,7 @@ Windows 上 Codex 托管任务出现 `helper_sandbox_lock_failed`、`SetNamedSec
|
|
|
47
47
|
| `ec aid` | AID 身份、名片与头像管理 | 身份/证书/名片/头像/换头像/探测对端 | 任意有渠道场景 | `aid.md` |
|
|
48
48
|
| `ec fs` | AUN 文件系统统一入口 | 上传/下载/看文件/列目录/删文件/配额/群空间 | 任意有渠道场景 | `fs.md` |
|
|
49
49
|
| `ec storage` | 文件存储底层调试入口 | storage 调试/旧命令/底层上传下载 | 任意有渠道场景 | `storage.md` |
|
|
50
|
-
| `ec agent` | EvolAgent
|
|
50
|
+
| `ec agent` | EvolAgent 生命周期、主机信息、模板及项目地址变更 | 创建/启停/热重载/改配置/查主机信息/打包模板/安装模板/项目路径迁移 | 管理操作按目标与角色鉴权;template/project 要求双 Owner | `agent.md`;创建流程用 `ec-agent-create` 技能,Bootstrap 参考见 `agent-create.md` |
|
|
51
51
|
| `ec directory` | Owner 名录查询、入录申请与本地备注 | 联系人/通讯录/名录/找人的 AID/申请添加联系人/这个人是谁/内外联系人/拉黑名单/记备注 | 查询需 Owner 名录授权;申请通过 `request` 发给本端 Owner | `directory.md` |
|
|
52
52
|
| `ec rpc` | 底层 AUN RPC(逃生通道) | 直接调协议方法 | 仅宿主终端;托管会话仅可查看帮助 | `rpc.md` |
|
|
53
53
|
| `ec menu-client` | 远程 Daemon Menu 请求 | 远程诊断/远程 daemon 操作/daemon 日志/监控/原始配置/跨主机 | 运维主机或具备 `ec.menu.request` 权限的托管 Agent | `menu-client.md` |
|
|
@@ -74,18 +74,20 @@ Windows 上 Codex 托管任务出现 `helper_sandbox_lock_failed`、`SetNamedSec
|
|
|
74
74
|
|
|
75
75
|
| 命令集 | 用途 | 触发词 | 文档 |
|
|
76
76
|
|--------|------|--------|------|
|
|
77
|
-
| `ec ability` |
|
|
77
|
+
| `ec ability` | remote 发现、契约、设备、调用和结果查询;本地插件开发、管理与打包 | 手机能力/远端能力/remote/ability/能力插件/上架/下架/插件打包/插件诊断 | 内置 `ability` 技能(`ec skill load ability`) |
|
|
78
78
|
| `ec provider` | 宿主 Provider 模板、注册表 CRUD 与单项 JSON 导入(宿主 DaemonOwner 控制入口或 trusted fullaccess 托管任务) | Provider/服务商/供应商/内置模板/套餐/导入服务商/注册表 | `provider.md` |
|
|
79
79
|
| `ec model` | 模型与推理强度管理(按作用域持久化) | 切模型/列模型/当前模型/模型详情/改强度/诊断网关 | `model.md` |
|
|
80
80
|
| `ec response` | 响应模式管理(按作用域持久化) | 切换响应模式/列响应模式/看当前模式/改响应配置 | `response.md` |
|
|
81
81
|
| `ec config` | 配置体系底层入口(读写/快照/回滚) | 看配置/改配置/查字段/查schema/校验/快照/回滚/历史/启动记录 | `config.md` |
|
|
82
82
|
| `ec role` | Owner 查询/设置角色用量配额,关系角色提升申请与审批 | 角色配额/角色限额/关闭限额/恢复继承/取消配额/usageLimits/申请角色/审批角色 | `role.md` |
|
|
83
83
|
| `ec stats` | Token 用量与费用统计 | 用量/费用/统计/预算/token/cost | `stats.md` |
|
|
84
|
+
| `ec quota` | 查询 Agent 与对端的生效限额、已用及剩余(status) | 自身限额/对端限额/剩余额度/是否超限 | `quota.md` |
|
|
84
85
|
| `ec trigger` | 定时与事件触发器管理(创建用 `create`,`set` 为兼容别名) | 触发器/定时任务/cron/提醒/定时检查/自动执行/巡检/禁用 trigger/删除 trigger | `trigger.md` |
|
|
85
86
|
| `ec trigger event` | EventBus 事件目录 | 事件触发/事件目录/EventBus/source.type=event/filter.match | `event.md` |
|
|
86
87
|
| `ec events` | AUN 事件中心:注册/发布/订阅事件,事件到达跑脚本 | 事件中心/注册事件/发布事件/订阅事件/事件包/pack.json/events-config.json/scripts/AUN 事件 | `event-center.md` |
|
|
87
|
-
| `ec services` |
|
|
88
|
+
| `ec services` | 服务路由:服务包状态/诊断/重载、宿主模式开关、ACL 收口;对端 describe/schema/call | 服务路由/服务包/提供接口/被对端调用/pack.json/services.call/服务节点/宿主模式/常驻/repair-acl/建服务包/调对端服务 | `services.md` |
|
|
88
89
|
| `ec task` | 恢复暂停或异常中断的会话任务 | 任务恢复/异常中断/继续任务/resume | `task.md` |
|
|
90
|
+
| `ec pay` | 网站付款卡片、二维码、渠道切换与订单核验 | 付款/支付/微信支付/支付宝/付款二维码/订单核验 | `pay.md`;先加载 `ec-pay` 技能 |
|
|
89
91
|
| `ec skill` | EC 技能管理(新建/安装/删除/启用/禁用/校验/查路径) | 创建技能/新建 skill/安装技能/装个 skill/删除技能/禁用技能/启用技能/看看有哪些技能/技能为什么没生效 | `ec-capabilities.md` |
|
|
90
92
|
| `ec pa-workspace` | 在 Owner 的 AUN 私聊中查看和维护 PA 工作区入口导航 | 个人助理工作区/工作区入口调整/产物入口/报告入口/任务入口/隐藏入口/改名入口/排序入口 | `pa-workspace.md` |
|
|
91
93
|
| `ec pa-workspace` | 入口导航文件的位置、格式、schema 与安全改法;含跨 Agent 入口 | 导航格式/入口格式/加个入口/产物给用户看/加个报告入口/入口指向别的助理/file-navigation/导航文件在哪 | `file-navigation.md` |
|
|
@@ -105,8 +107,9 @@ Windows 上 Codex 托管任务出现 `helper_sandbox_lock_failed`、`SetNamedSec
|
|
|
105
107
|
| [`tool-authorization.md`](tool-authorization.md) | 工具执行、人工审批与 EC 授权图解;trusted fullaccess 与 DaemonOwner 对照;Owner 凭证及模型审批预留 | 工具审批/授权流程/权限图解/Owner+bypass/fullaccess/DaemonOwner/决策模型审批 |
|
|
106
108
|
| `menu-protocol.md` | Menu Protocol 规范(消息类型 / protected_headers / name→operation 映射 / 鉴权机制) | menu 消息格式/为什么被拒/服务端怎么读 menu/auth_method/凭证怎么带/Evol App 怎么调 daemon |
|
|
107
109
|
| `menu-exec-schema-commands.md` | 通过 `menu.action name=cli action=exec` 取配置 schema 的命令手册 | 配置 schema 版本/schema 内容/远程取 schema |
|
|
110
|
+
| [`aid.md`](aid.md#daemonowner-远程单命令) | DaemonOwner 在 Control AID 的 E2EE 私聊以 /exec on 进入终端后直接发命令,/stop 取消,/exec off 退出,进出使用 notice;最长 30 分钟、空闲 6 分钟 | 虚拟SSH/remote-shell/daemon执行命令/exec on/exec stop/终端状态 |
|
|
108
111
|
| `ec-capabilities.md` | EC Skill 系统机制概要(三级目录、开关覆盖链、渐进式披露、编写规范、权限) | 技能系统怎么工作/技能放在哪里/SKILL.md 怎么写/技能为什么没生效/description 怎么写 |
|
|
109
|
-
|
|
|
112
|
+
| 内置 `ability` 技能的 `SKILL.md` | AUN Ability 的发现、原始 payload、请求关联与结果查询 | 能力调用/Ability/protocol/discover/ability_path/request_id/call_id/超时查询 |
|
|
110
113
|
|
|
111
114
|
## 其他
|
|
112
115
|
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
## Agent 模板
|
|
6
6
|
|
|
7
|
+
单 Agent 可信来源绑定、周期提醒及 Owner 手动升级已加入 template Menu/CLI:`update-status`、`check-update`、`bind-update-source`、`confirm-update-source`、`preview-update`、`read-update-notice`。执行沿原 `deploy/status/resume/cancel` 作业;disabled 禁止检查/覆盖,auto 仅检查提醒。旧无来源明确未绑定,不根据 config.version 或 update.publisher 猜测。实际契约、私有目录配置、锁/提醒/恢复语义与 App 待办见[单 Agent 更新接入](../../../docs/agent-template/single-agent-manual-update-core-20261117.md)。
|
|
8
|
+
|
|
7
9
|
单成员、多成员共用 `ec agent template`。新建支持一个或多个成员,只创建成员 AID,沿用本机 Host 和经鉴权的 Owner;覆盖仅支持一个已有 Agent,保留其 AID、Owner、角色和默认项目目录。打包不带记忆、消息、私钥或 Provider 凭证;导入的 Trigger 默认停用并携带脚本。来源采集和覆盖要求操作者同时是 DaemonOwner 和对应 Agent 的协议 Owner。
|
|
8
10
|
|
|
9
11
|
```bash
|
|
@@ -22,11 +24,15 @@ ec agent template capabilities
|
|
|
22
24
|
|
|
23
25
|
`inspect/build/push/pull/preview` 的业务参数通过 JSON 文件传入。`capabilities` 返回动作输入 schema、状态及平台能力;文件模板沿用原 v1 的 `agents[]/key`、PACKAGE/MANIFEST 和资源结构。Core 作业以成员 key 关联,不按数组位置配对。Menu 使用进程级 `name: "template"`,动作与 CLI 一致;查询使用 `args.view: "job"` 或 `"capabilities"`。
|
|
24
26
|
|
|
27
|
+
模板声明 `team.json` 使用 `id` 作稳定标识、`title` 作显示名;旧顶层 `name` 只兼容输入,归一化、导入保存及打包导出均移除该字段。旧 name-only 转为 id;id/name 并存须同值,否则拒绝。旧表单 schema 的 name 约束与 required 迁到 id,不再生成 name 控件,title 保留。`PACKAGE.name` 和请求 `metadata.name` 继续表示显示名,对应 `team.title`;Agent 的 `profile.name`、成员 key 与身份 AID 保持既有语义。示例:`{"name":"demo","title":"演示团队",...}` 读入后为 `{"id":"demo","title":"演示团队",...}`,格式版本仍为 v1。
|
|
28
|
+
|
|
25
29
|
inspect 输入示例:`{"members":{"writer":{"source":{"kind":"agent","aid":"writer.agentid.cn"}}}}`。全组必须空闲,任一忙碌立即返回 AGENT_BUSY;成功后冻结任务启动与 Trigger,无确认操作 15 分钟自动释放,查询不续期。build 承接 inspectionJobId、inventoryDigest、metadata 和各成员 include;接管后由构建作业持有冻结直到结束,取消统一使用 jobId。
|
|
26
30
|
|
|
31
|
+
2026-11-17 项目文件容忍:build 仍按原 `inventoryDigest` 和候选清单验证 `include.files`,但项目增删改不再使整次快照校验失败;删除选中项跳过,修改读取当前内容,新文件不会自动加入旧文件选择。某成员选择非空而最终无可打包项目文件时报 `PROJECT_FILES_EMPTY`;原本空选择正常。成功结果 `projectFiles[key]` 返回 selected/copied/skippedMissing 数量。路径、大小及内容安全校验、非项目资源严格快照和原失败清理/冻结释放继续保留。现有完整候选清单仍可能触发响应超限;第二阶段目录选择及选择索引协议尚未实现,见[Core/App集成开发文档](../../../docs/agent-template/project-file-selection-integration.md)。
|
|
32
|
+
|
|
27
33
|
完整选项用 `ec agent template --help` 查看。上传前由 App 以 Owner 身份授予来源 Host 目录读写权限,SDK 上传需读取元数据;普通私有下载使用 `storage.create_share_link.allowed_aids` 指定目标 Host,pull 的 source 带 location、分享短码和摘要。Owner/subaid 动态授权等待新 SDK;daemon 不代设权限,模板签名延期。
|
|
28
34
|
|
|
29
|
-
preview 传 packageId、installMode 和成员 key → target/providers/externalAids。新建目标示例:`{"members":{"writer":{"target":{"aid":"auto"
|
|
35
|
+
preview 传 packageId、installMode 和成员 key → target/providers/externalAids。新建目标示例:`{"members":{"writer":{"target":{"aid":"auto"},"providers":{"ecagent":{"provider":"provider-12345678","model":"model-a"}}}}}`;aid=auto 时另传 issuer。新建可省略 target.project,由目标 Host 按默认项目根目录和最终 AID 分配不重名目录;显式 project 须为目标 Host 绝对路径。实际目录在 result.members[key].target.project 返回并持久保存,deploy/resume 不重新分配。覆盖仍须传目标当前默认项目目录。预览不注册身份;deploy 只引用可执行 previewId 和 planDigest。多成员必须全部新建,不提供已有成员配对。旧版 0.0.49 仍要求 project,以所选 Host 的 capabilities 输入 schema 为准,不能按开发机状态推定远端支持。参数错误保留具体字段及原因,不归类为模板不支持。
|
|
30
36
|
|
|
31
37
|
异步命令默认 `--wait 0`,可设 0..300 秒,超时不取消作业。失败/取消退出码 1、参数错误 2、暂停或等待超时 3。先以原 requestId 或 jobId 查询,再恢复原作业,不用新部署请求重试未知结果。Menu 事件统一为 `template.job`,seq 单调递增;状态包括 queued/running/paused/failed/cancelling/cancelled/succeeded。
|
|
32
38
|
|
|
@@ -34,6 +40,35 @@ preview 传 packageId、installMode 和成员 key → target/providers/externalA
|
|
|
34
40
|
|
|
35
41
|
工具随包位于 `scripts/agent-template/`;本机 CLI 经控制令牌 IPC,托管 CLI 经原委派通道,Menu 发往 Host Control AID。远端 Menu 不读取任意本机路径。Provider 模型通过进程级 model Menu 的 catalog 查询;作业 readiness 分别表示运行、名录和团队就绪,不以本地成员表代替 Owner 名录授权。接口细节及当前验收边界见 `docs/agent-template/agent-template-app-integration.md`。真实容器已验证注册/绑定/Storage/恢复及覆盖;App 界面、真实模型推理和名录互聊待验收。
|
|
36
42
|
|
|
43
|
+
## 本机项目地址变更
|
|
44
|
+
|
|
45
|
+
项目文件单次复制并保留源目录,迁移原基座会话、保留原 AID、话题和 session/thread ID。关联 Agent 由用户多选,默认仅当前 Agent;未选中者继续使用旧目录。Core、CLI、Menu 和 ECWeb 共用 Agent 应用服务。
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
ec agent project <aid> preview --target '<新绝对目录>' [--agents '<aid1>,<aid2>'] [--format json]
|
|
49
|
+
ec agent stop <aid> [--format json]
|
|
50
|
+
ec agent project <aid> move --target '<新绝对目录>' [--agents '<aid1>,<aid2>'] [--format json]
|
|
51
|
+
ec agent project <aid> status [--format json]
|
|
52
|
+
ec agent project <aid> resolve --conflict '<status返回的conflict.id>' --decision skip|abort [--format json]
|
|
53
|
+
ec agent start <aid> [--format json]
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
只有 preview/move 接受 --target 和 --agents;不传 --agents 为仅入口 aid。所选 Agent 须逐个显式停止。preview 不持久化计划;move 重新检查并在所选 Agent 独占门内执行。普通项目增删改不触发追平;同一实际原生文件到同一目标只复制一次。连接超时不取消操作,按 Agent 查询 status。
|
|
57
|
+
|
|
58
|
+
status 返回 currentStep、totalSteps=7、currentPhase、steps、updatedAt;阶段依次为 checking/freezing/preparing/copying/sessions/committing/finalizing。冲突为 awaiting_decision,说明原因、资源和依赖范围,用户选择 skip 或 abort。skip 不会跳过必需原生文件后继续更新其绑定;abort 恢复本次核心修改,保留源目录和普通项目副本。异常中断或恢复未完成时使用:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
ec agent project <aid> recover [--format json]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
recover 只继续恢复旧绑定,不执行用户任务;独立修改无法撤销时保持 paused 并阻止启动。成功迁移或恢复后仍保持停止,由用户显式启动。跳过整个 Agent 且恢复完成后解除它的迁移限制。停止/启动复用原生命周期入口。
|
|
65
|
+
|
|
66
|
+
Menu 使用 name=agent、action=project,args 为 aid、operation;preview/move 另传 target 和可选 aids 数组;resolve 传 conflictId、decision=skip|abort。远端请求须加密,并核验 DaemonOwner、入口 Agent 和每个所选 Agent 的新鲜 Owner 共识;托管 CLI 保留原委派 IPC。
|
|
67
|
+
|
|
68
|
+
ECWeb:Agent 列表 → 编辑 → 变更项目地址。显示新地址、Agent 多选、预览、步骤 x/7、阶段及结果。冲突显示“跳过”“终止迁移”;paused 显示“恢复旧绑定”。关闭页面不代答,重开恢复选择与冲突。停止/启动在原操作菜单完成;Evol App 原生页面按相同接口接入。
|
|
69
|
+
|
|
70
|
+
配置仅修改有关字段,索引按对应记录更新,第三种值或分叉历史不覆盖。目标冲突、核心文件变化、共享记录不能同时表达新旧路径等均明确提示跳过范围。完整流程、参数、Menu 示例与验证见[实施与用法](../../../docs/agent-template/agent-project-path-implementation.md),十类不能自动合并的情况见[修订说明](../../../docs/agent-template/agent-project-path-revision.md)。跨操作系统/跨 Host 实机续接另行验收。
|
|
71
|
+
|
|
37
72
|
## 子命令
|
|
38
73
|
|
|
39
74
|
```bash
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# ec aid — AID 身份管理
|
|
2
2
|
|
|
3
|
+
## 本机 Claude Code 网关
|
|
4
|
+
|
|
5
|
+
Claude 网关是将 AUN 消息投递到本机终端会话的入口,不是新的 baseagent。消息在
|
|
6
|
+
MessageBridge 分流,不进入普通 message-queue 或 ResponseEngine,也不加载模型 runner。
|
|
7
|
+
本机终端自身的授权及执行环境继续生效。
|
|
8
|
+
|
|
9
|
+
默认关闭。宿主 Owner 可显式设置 `ec config set ccAgent.enabled true --process`,
|
|
10
|
+
由宿主重新启动 EvolCore 后初始化网关身份。未启用时不自动注册 AID;已有网关身份也不自动删除。
|
|
11
|
+
初始化必须确认网关与 daemon 的协议 Owner 一致,不能把“已提交绑定请求”视为已就绪。
|
|
12
|
+
|
|
13
|
+
仅接受同时拥有本机与网关的 Owner 在加密设备私聊中操作。绑定按本端、Owner、设备、
|
|
14
|
+
Ownership 版本和话题隔离。主话题先选本机会话,之后的消息投递给该会话;发送“列表”可重新查看。
|
|
15
|
+
网关只回传新出现的 assistant 文本,不重放历史或工具输入;Owner 变化、关闭开关或会话解绑后停止回传。
|
|
16
|
+
|
|
3
17
|
管理本地 AID 身份(证书、私钥、agent.md 名片与头像),以及远程探测对端 AID。触发词:身份/证书/名片/头像/换头像/探测对端/创建身份。
|
|
4
18
|
|
|
5
19
|
## 运行边界
|
|
@@ -43,7 +57,7 @@ ec aid avatar <当前 self AID> (--file <path> | --url <https-url>) [--format js
|
|
|
43
57
|
|
|
44
58
|
`ec init --non-interactive --owner <aid> --format json` 首先按普通 host 类型注册控制 AID,
|
|
45
59
|
完成主机名片和配置落盘后,通过独立 `ownership-UUID` slot 的短连接调用 SDK `bindOwneraid` 发起邀约。
|
|
46
|
-
该注册调用不等待人工审批、不启动 daemon
|
|
60
|
+
该注册调用不等待人工审批、不启动 daemon;`--owner` 只作为本次邀约目标,不写入 `daemon.json`——控制 Owner 只由 ownership 协议授予。
|
|
47
61
|
SDK 不持久化 Ownership task/WAL;`OwnershipTaskResult` 只是本次调用结果。
|
|
48
62
|
提交后应以当前 NS 状态和 `checkOwnershipConsensus` 为准,不依赖重启后恢复相同 operation ID。
|
|
49
63
|
|
|
@@ -121,9 +135,12 @@ SDK 的 `transferLocalSubaid` 完成本地三身份编排;否则调用 `transf
|
|
|
121
135
|
|
|
122
136
|
## Ownership 共识缓存
|
|
123
137
|
|
|
124
|
-
Agent
|
|
138
|
+
Agent 的 Owner 只由 ownership 协议授予,配置中的 owner 字段不作为授权来源。
|
|
139
|
+
|
|
140
|
+
本机 Daemon Owner 可在该 Agent 的 AUN 私聊中发送纯 `/bind`,由 Agent
|
|
125
141
|
以发送者 AID 发起协议 ownership 绑定。带参数的 `/bind feishu [实例名]` 等仍是外部渠道联系人绑定,
|
|
126
|
-
不会修改 ownership
|
|
142
|
+
不会修改 ownership;非 Daemon Owner 不能使用纯 `/bind` 代替手动绑定,须由 Daemon Owner 在宿主端
|
|
143
|
+
为该 Agent 指定绑定目标。
|
|
127
144
|
|
|
128
145
|
Ownership 共识不再每 15 秒轮询。普通消息、控制消息、查询和路由读取复用最长 30 分钟的共识结果;敏感授权、审批授权兑现、初始化激活及高权限执行使用同一结果,但要求核验时间不超过 5 分钟。读取不会延长缓存有效期,到期本身不会发请求;需要结果的异步调用在过期后等待刷新。控制通道的配对和诊断命令按敏感操作使用 5 分钟窗口。
|
|
129
146
|
|
|
@@ -246,3 +263,28 @@ ec aid delete <aid>
|
|
|
246
263
|
- `--aun-path <path>` — 指定 AUN keystore 根;未传时可由 `AUN_HOME` 提供
|
|
247
264
|
- `aid delete --orphan|--no-cert|--unrecoverable` 默认 dry-run,`--yes` 才执行删除
|
|
248
265
|
- `--help` / `-h` — 各子命令均支持
|
|
266
|
+
|
|
267
|
+
## DaemonOwner 远程单命令
|
|
268
|
+
|
|
269
|
+
在 daemon Control AID 与其当前协议 Owner AID 的 **E2EE 私聊**中发送文本即可使用,无需客户端新增页面或手动填写 token、窗口 ID。
|
|
270
|
+
|
|
271
|
+
Owner 发送未加密的 /exec 时,daemon 会核验协议身份及发送设备,以加密消息回复 `E2EE_REQUIRED` 并提示开启端到端加密;该请求不执行,也不改变窗口状态。
|
|
272
|
+
|
|
273
|
+
| 指令 | 作用 |
|
|
274
|
+
|---|---|
|
|
275
|
+
| `/exec on` | 进入终端操作状态,以 notice 提示;最长 30 分钟,空闲 6 分钟自动退出 |
|
|
276
|
+
| `uname -a` | 进入后直接发送单条命令,返回 stdout、stderr 和退出码 |
|
|
277
|
+
| `/exec off` | 退出终端操作状态,以 notice 提示,并取消正在执行和排队的命令 |
|
|
278
|
+
| `/exec` | 查看窗口、剩余时间和当前执行状态;不自动进入终端、不续期 |
|
|
279
|
+
| `/stop` 或 `/exec stop` | 取消正在执行和排队的命令,保留终端操作状态 |
|
|
280
|
+
| `/exec uname -a` | 兼容带前缀执行单条命令 |
|
|
281
|
+
|
|
282
|
+
进入 notice 送达后,当前 Owner、设备和话题的原始 text 按命令处理;其他设备或话题需各自开启。退出后普通文字恢复 daemon 原有处理。直接发送的 on/off/status/stop 是程序名,控制指令保留斜杠;/stop 仅在 daemon 控制会话中作为取消别名,未开启时返回已关闭。
|
|
283
|
+
|
|
284
|
+
同一终端的命令按顺序执行;重复 /exec on 和 /exec 不续期,也不重复提示进入。空闲从上条实际命令完成计时,运行中仍受 30 分钟绝对期限约束。手动关闭、空闲及到期退出发送 notice;断线或 Owner 失效时立即关闭,无法投递的状态 notice 不排队到重连后重放。daemon 重启后需重新 on,开启状态不写入配置。
|
|
285
|
+
|
|
286
|
+
只接收原始 text。引用、合并消息、群消息和普通 Agent AID 不提供此入口;Agent Owner、fullaccess、Menu token 和诊断 remote_access_token 都不能替代 daemon 当前协议 Owner 身份。
|
|
287
|
+
|
|
288
|
+
按 daemon 运行账号的系统权限执行单个程序,不提供交互 stdin、PTY 或跨命令保留的 cd/环境变量状态。使用程序自身的目录选项或绝对路径;不支持 `&&`、管道、重定向、后台符及 shell 展开,EvolCore 既有危险命令命中后直接拒绝。Windows 的 shell 内建命令及不能直接启动的 .cmd/.bat 会报告启动错误。
|
|
289
|
+
|
|
290
|
+
stdout/stderr 各最多捕获 8 MiB,越限终止并报告 OUTPUT_LIMIT;长结果按 UTF-8 分片,附原消息 ID 和序号,最后返回退出状态。同一消息的重发不会重复执行;跨 daemon 重启不保证执行去重,重启后窗口默认关闭。
|