evolcore 0.0.10 → 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 +44 -0
- package/README.md +3 -3
- package/bin/codex-managed-hook.mjs +80 -0
- package/dist/agents/baseagent.js +4 -0
- package/dist/agents/claude-runner.js +158 -44
- package/dist/agents/codex-app-server-client.js +153 -23
- package/dist/agents/codex-runner.js +331 -43
- package/dist/agents/ecagent-runner.js +53 -6
- package/dist/agents/gemini-runner.js +1 -0
- package/dist/agents/request-identity.js +55 -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/aun/outbox.js +28 -31
- package/dist/channels/aun.js +418 -235
- package/dist/channels/daemon.js +13 -0
- package/dist/cli/agent-command.js +72 -17
- package/dist/cli/agent.js +249 -22
- package/dist/cli/aun-commands.js +270 -69
- package/dist/cli/bench.js +12 -3
- package/dist/cli/daemon-commands.js +52 -33
- package/dist/cli/fs-command.js +60 -0
- package/dist/cli/handoff-command.js +3 -0
- package/dist/cli/index.js +106 -63
- package/dist/cli/init-cancel.js +208 -0
- package/dist/cli/init-channel.js +343 -195
- package/dist/cli/init.js +21 -9
- 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 +5 -0
- package/dist/config/contact-book-store.js +11 -3
- package/dist/config/contact-request-service.js +161 -15
- package/dist/config/gateway-config.js +26 -10
- package/dist/config/mention-mode.js +8 -24
- package/dist/core/agent-reload-coordinator.js +53 -0
- package/dist/core/auth/agent-delegation.js +0 -1
- package/dist/core/auth/operation-authorizer.js +62 -154
- package/dist/core/auth/operation-catalog.js +264 -22
- package/dist/core/bootstrap-messages.js +68 -0
- package/dist/core/bootstrap-service.js +144 -10
- 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 +24 -7
- package/dist/core/command/agent-control.js +14 -11
- 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 +213 -110
- 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 +45 -25
- package/dist/core/daemon-file-cache.js +2 -1
- package/dist/core/data-migration.js +9 -2
- package/dist/core/evolagent-registry.js +125 -35
- package/dist/core/evolagent.js +12 -5
- 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/inference/text-inference.js +38 -4
- 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 +237 -79
- package/dist/core/message/message-log.js +23 -0
- package/dist/core/message/message-queue.js +20 -4
- package/dist/core/message/response-engine.js +54 -36
- package/dist/core/model/model-catalog.js +143 -24
- package/dist/core/model/model-diagnostics.js +28 -10
- package/dist/core/permission/ec-command-parser.js +156 -10
- package/dist/core/permission/index.js +1 -0
- package/dist/core/permission/readonly-shell-query.js +532 -0
- package/dist/core/permission/sandbox-runtime.js +22 -1
- package/dist/core/permission/shell-environment.js +46 -0
- package/dist/core/permission/tool-policy.js +292 -111
- package/dist/core/protected-paths.js +17 -9
- package/dist/core/runner-reload-transaction.js +57 -0
- package/dist/core/session/session-manager.js +21 -2
- package/dist/eck/manifest-engine.js +39 -13
- package/dist/index.js +644 -180
- package/dist/ipc.js +246 -19
- 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/aid-bind.js +3 -8
- 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/log-writer.js +6 -10
- package/dist/utils/logger.js +5 -5
- 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/evolcore/msg.md +13 -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/01-overview.md +9 -0
- package/kits/rules/04-relation.md +1 -1
- package/kits/rules/05-venue.md +2 -2
- package/kits/schemas/agent-config.schema.3.json +1 -1
- package/kits/schemas/agent-config.schema.4.json +1 -1
- package/kits/schemas/relation-config.schema.2.json +1 -1
- package/kits/schemas/role-config.schema.1.json +1 -1
- 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 +27 -0
- package/kits/templates/roles/member.json +44 -0
- package/kits/templates/roles/visitor.json +40 -2
- package/kits/templates/system-fragments/bootstrap.md +12 -6
- package/kits/templates/system-fragments/channel.md +6 -0
- package/kits/templates/system-fragments/session.md +2 -0
- package/package.json +3 -2
- package/skills/eclink/SKILL.md +15 -3
- package/skills/eclink/agents/openai.yaml +3 -3
- package/dist/core/command/evol-menu-version-gate.js +0 -39
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { resolvePaths } from '../paths.js';
|
|
4
|
+
import { getProcessStartTime } from './process-introspect.js';
|
|
5
|
+
const CODEX_APP_SERVER_RECORD_PREFIX = 'codex-app-server-';
|
|
6
|
+
const CODEX_APP_SERVER_RECORD_SUFFIX = '.json';
|
|
7
|
+
function recordFilePath(pid) {
|
|
8
|
+
return path.join(resolvePaths().instanceDir, `${CODEX_APP_SERVER_RECORD_PREFIX}${pid}${CODEX_APP_SERVER_RECORD_SUFFIX}`);
|
|
9
|
+
}
|
|
10
|
+
function writeAtomic(filePath, data) {
|
|
11
|
+
const temporaryPath = `${filePath}.tmp`;
|
|
12
|
+
fs.writeFileSync(temporaryPath, data, { mode: 0o600 });
|
|
13
|
+
fs.renameSync(temporaryPath, filePath);
|
|
14
|
+
}
|
|
15
|
+
/** Register a Codex app-server child owned by this EvolCore runtime. */
|
|
16
|
+
export function registerCodexAppServerProcess(pid) {
|
|
17
|
+
if (!Number.isInteger(pid) || pid <= 0)
|
|
18
|
+
throw new Error(`Invalid Codex app-server PID: ${pid}`);
|
|
19
|
+
const startedAt = getProcessStartTime(pid) ?? Date.now();
|
|
20
|
+
const filePath = recordFilePath(pid);
|
|
21
|
+
const record = {
|
|
22
|
+
owner: 'evolcore',
|
|
23
|
+
pid,
|
|
24
|
+
startedAt,
|
|
25
|
+
startedAtIso: new Date(startedAt).toISOString(),
|
|
26
|
+
parentPid: process.pid,
|
|
27
|
+
};
|
|
28
|
+
fs.mkdirSync(resolvePaths().instanceDir, { recursive: true });
|
|
29
|
+
writeAtomic(filePath, JSON.stringify(record, null, 2));
|
|
30
|
+
return filePath;
|
|
31
|
+
}
|
|
32
|
+
/** Remove a process record. Safe to call after a crash or a failed spawn. */
|
|
33
|
+
export function unregisterCodexAppServerProcess(filePath) {
|
|
34
|
+
if (!filePath)
|
|
35
|
+
return;
|
|
36
|
+
try {
|
|
37
|
+
fs.unlinkSync(filePath);
|
|
38
|
+
}
|
|
39
|
+
catch { }
|
|
40
|
+
try {
|
|
41
|
+
fs.unlinkSync(`${filePath}.tmp`);
|
|
42
|
+
}
|
|
43
|
+
catch { }
|
|
44
|
+
}
|
|
45
|
+
/** Read only well-formed records; malformed records are removed as stale. */
|
|
46
|
+
export function listCodexAppServerProcesses() {
|
|
47
|
+
const directory = resolvePaths().instanceDir;
|
|
48
|
+
let names;
|
|
49
|
+
try {
|
|
50
|
+
names = fs.readdirSync(directory);
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
return [];
|
|
54
|
+
}
|
|
55
|
+
const entries = [];
|
|
56
|
+
for (const name of names) {
|
|
57
|
+
if (!new RegExp(`^${CODEX_APP_SERVER_RECORD_PREFIX}\\d+\\${CODEX_APP_SERVER_RECORD_SUFFIX}$`).test(name))
|
|
58
|
+
continue;
|
|
59
|
+
const filePath = path.join(directory, name);
|
|
60
|
+
try {
|
|
61
|
+
const value = JSON.parse(fs.readFileSync(filePath, 'utf8'));
|
|
62
|
+
const pid = value.pid;
|
|
63
|
+
const startedAt = value.startedAt;
|
|
64
|
+
const parentPid = value.parentPid;
|
|
65
|
+
if (value.owner !== 'evolcore'
|
|
66
|
+
|| typeof pid !== 'number' || !Number.isInteger(pid) || pid <= 0
|
|
67
|
+
|| typeof startedAt !== 'number' || !Number.isFinite(startedAt) || startedAt <= 0
|
|
68
|
+
|| typeof parentPid !== 'number' || !Number.isInteger(parentPid) || parentPid <= 0) {
|
|
69
|
+
unregisterCodexAppServerProcess(filePath);
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
entries.push({
|
|
73
|
+
record: {
|
|
74
|
+
owner: 'evolcore',
|
|
75
|
+
pid,
|
|
76
|
+
startedAt,
|
|
77
|
+
startedAtIso: typeof value.startedAtIso === 'string'
|
|
78
|
+
? value.startedAtIso
|
|
79
|
+
: new Date(startedAt).toISOString(),
|
|
80
|
+
parentPid,
|
|
81
|
+
},
|
|
82
|
+
filePath,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
unregisterCodexAppServerProcess(filePath);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return entries;
|
|
90
|
+
}
|
package/dist/utils/codex-cli.js
CHANGED
|
@@ -35,5 +35,9 @@ export function execCodexCliSync(args, options) {
|
|
|
35
35
|
const launchCommand = resolveCodexLaunchCommand(args, { commandPath });
|
|
36
36
|
if (!launchCommand)
|
|
37
37
|
throw new Error('Codex CLI not found');
|
|
38
|
-
return execFileSync(launchCommand.command, launchCommand.args,
|
|
38
|
+
return execFileSync(launchCommand.command, launchCommand.args, {
|
|
39
|
+
...(options ?? {}),
|
|
40
|
+
// Keep the Windows console policy authoritative for every Codex CLI call.
|
|
41
|
+
windowsHide: process.platform === 'win32',
|
|
42
|
+
});
|
|
39
43
|
}
|
|
@@ -6,6 +6,21 @@ import fs from 'fs';
|
|
|
6
6
|
import { getProcessStartTime, parseCimDate } from './process-introspect.js';
|
|
7
7
|
const execFileAsync = promisify(execFile);
|
|
8
8
|
export const isWindows = process.platform === 'win32';
|
|
9
|
+
/**
|
|
10
|
+
* Start a detached EvolCore Node process without creating a console window on
|
|
11
|
+
* Windows. The child is unref'd here so callers cannot accidentally keep the
|
|
12
|
+
* parent process alive while a lifecycle task is running.
|
|
13
|
+
*/
|
|
14
|
+
export function spawnDetachedNode(args, env = {}) {
|
|
15
|
+
const child = spawn(process.execPath, [...args], {
|
|
16
|
+
detached: true,
|
|
17
|
+
stdio: 'ignore',
|
|
18
|
+
windowsHide: isWindows,
|
|
19
|
+
env: { ...process.env, ...env },
|
|
20
|
+
});
|
|
21
|
+
child.unref();
|
|
22
|
+
return child;
|
|
23
|
+
}
|
|
9
24
|
const ENCODE_PATH_MAX = 200;
|
|
10
25
|
function encodePathHash(s) {
|
|
11
26
|
let h = 0;
|
package/dist/utils/log-writer.js
CHANGED
|
@@ -231,19 +231,14 @@ export class LogWriter {
|
|
|
231
231
|
return `${day}-${pad(d.getHours())}`;
|
|
232
232
|
}
|
|
233
233
|
cleanupOldArchives() {
|
|
234
|
-
LogWriter.cleanupArchivesIn(this.logDir, this.retentionMs);
|
|
234
|
+
LogWriter.cleanupArchivesIn(this.logDir, this.baseName, this.retentionMs);
|
|
235
235
|
}
|
|
236
236
|
/**
|
|
237
|
-
*
|
|
237
|
+
* 清理当前日志类型的归档文件,不能跨 baseName 清理。
|
|
238
238
|
*
|
|
239
239
|
* 命名约定:`<baseName>-YYYYMMDD-HH.log`(hourly)或 `<baseName>-YYYYMMDD.log`(daily),
|
|
240
|
-
* 其中 baseName 由字母/数字/连字符组成。
|
|
241
|
-
*
|
|
242
|
-
* 这条规则跨 baseName 统一——只要文件按这个 pattern 命名就认为受 LogWriter 体系管辖。
|
|
243
|
-
* 这样 conditional 启用的 LogWriter(如 aun trace 关闭时)不会留下永久无人清的归档:
|
|
244
|
-
* 任意 LogWriter 实例化都会顺便清掉它们。
|
|
245
240
|
*/
|
|
246
|
-
static cleanupArchivesIn(logDir, retentionMs) {
|
|
241
|
+
static cleanupArchivesIn(logDir, baseName, retentionMs) {
|
|
247
242
|
if (retentionMs <= 0)
|
|
248
243
|
return;
|
|
249
244
|
const cutoff = Date.now() - retentionMs;
|
|
@@ -254,9 +249,10 @@ export class LogWriter {
|
|
|
254
249
|
catch {
|
|
255
250
|
return;
|
|
256
251
|
}
|
|
257
|
-
const
|
|
252
|
+
const escapedBaseName = baseName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
253
|
+
const archivePattern = new RegExp(`^${escapedBaseName}-\\d{8}(?:-\\d{2})?\\.log$`);
|
|
258
254
|
for (const name of entries) {
|
|
259
|
-
if (!
|
|
255
|
+
if (!archivePattern.test(name))
|
|
260
256
|
continue;
|
|
261
257
|
const full = path.join(logDir, name);
|
|
262
258
|
try {
|
package/dist/utils/logger.js
CHANGED
|
@@ -24,15 +24,15 @@ function getWriters() {
|
|
|
24
24
|
closeWriters(writers);
|
|
25
25
|
writers = {
|
|
26
26
|
logDir,
|
|
27
|
-
main: new LogWriter({ baseName: 'daemon', logDir, rotation: 'hourly', retention: { hours:
|
|
27
|
+
main: new LogWriter({ baseName: 'daemon', logDir, rotation: 'hourly', retention: { hours: 48 } }),
|
|
28
28
|
message: config.messageLog
|
|
29
|
-
? new LogWriter({ baseName: 'messages', logDir, rotation: 'hourly', retention: { hours:
|
|
29
|
+
? new LogWriter({ baseName: 'messages', logDir, rotation: 'hourly', retention: { hours: 48 } })
|
|
30
30
|
: null,
|
|
31
31
|
event: config.eventLog
|
|
32
|
-
? new LogWriter({ baseName: 'events', logDir, rotation: 'hourly', retention: { hours:
|
|
32
|
+
? new LogWriter({ baseName: 'events', logDir, rotation: 'hourly', retention: { hours: 48 } })
|
|
33
33
|
: null,
|
|
34
|
-
channelIn: new LogWriter({ baseName: 'channel-in', logDir, rotation: 'hourly', retention: { hours:
|
|
35
|
-
channelOut: new LogWriter({ baseName: 'channel-out', logDir, rotation: 'hourly', retention: { hours:
|
|
34
|
+
channelIn: new LogWriter({ baseName: 'channel-in', logDir, rotation: 'hourly', retention: { hours: 48 } }),
|
|
35
|
+
channelOut: new LogWriter({ baseName: 'channel-out', logDir, rotation: 'hourly', retention: { hours: 48 } }),
|
|
36
36
|
};
|
|
37
37
|
return writers;
|
|
38
38
|
}
|
package/dist/utils/npm-ops.js
CHANGED
|
@@ -20,7 +20,7 @@ export async function npmInstallGlobal(pkg) {
|
|
|
20
20
|
// Windows: run via cmd /c to avoid shell:true deprecation warning on Node 22.
|
|
21
21
|
// Unix: npm directly, no shell needed.
|
|
22
22
|
if (isWindows) {
|
|
23
|
-
cmd = 'cmd';
|
|
23
|
+
cmd = process.env.ComSpec || path.join(process.env.SystemRoot || 'C:\\Windows', 'System32', 'cmd.exe');
|
|
24
24
|
args = ['/c', 'npm', 'install', '-g', pkg];
|
|
25
25
|
}
|
|
26
26
|
else {
|
|
@@ -28,14 +28,14 @@ export async function npmInstallGlobal(pkg) {
|
|
|
28
28
|
args = ['install', '-g', pkg];
|
|
29
29
|
}
|
|
30
30
|
try {
|
|
31
|
-
await execFileAsync(cmd, args, { timeout: 180000 });
|
|
31
|
+
await execFileAsync(cmd, args, { timeout: 180000, windowsHide: isWindows });
|
|
32
32
|
}
|
|
33
33
|
catch (e) {
|
|
34
34
|
if (e.stderr?.includes('EACCES') || e.message?.includes('EACCES')) {
|
|
35
35
|
if (isWindows) {
|
|
36
36
|
throw new Error('权限不足。请以管理员身份运行 PowerShell 或 CMD,然后重试');
|
|
37
37
|
}
|
|
38
|
-
await execFileAsync('sudo', ['npm', 'install', '-g', pkg], { timeout: 180000 });
|
|
38
|
+
await execFileAsync('sudo', ['npm', 'install', '-g', pkg], { timeout: 180000, windowsHide: false });
|
|
39
39
|
}
|
|
40
40
|
else {
|
|
41
41
|
throw e;
|
|
@@ -103,7 +103,7 @@ export function resolveGlobalPkg(pkgName) {
|
|
|
103
103
|
// 避免 "args 数组 + shell:true" 组合触发 Node DeprecationWarning,且无注入风险。
|
|
104
104
|
const npmCmd = isWindows ? 'npm.cmd' : 'npm';
|
|
105
105
|
const globalRoot = execSync(`${npmCmd} root -g`, {
|
|
106
|
-
encoding: 'utf-8', timeout: 10000,
|
|
106
|
+
encoding: 'utf-8', timeout: 10000, windowsHide: true,
|
|
107
107
|
}).trim();
|
|
108
108
|
const pkgPath = path.join(globalRoot, ...pkgName.split('/'), 'package.json');
|
|
109
109
|
if (fs.existsSync(pkgPath)) {
|
|
@@ -171,7 +171,7 @@ export async function tryUpgrade() {
|
|
|
171
171
|
/**
|
|
172
172
|
* 通用全局包升级流程:检查 → 比较 → 安装(失败重试一次)。
|
|
173
173
|
* 仅在包已安装时检查升级,未安装则跳过(resolveFn 返回 null)。
|
|
174
|
-
*
|
|
174
|
+
* 用于 EC Web 等真正独立于 EvolCore 的全局包。
|
|
175
175
|
*/
|
|
176
176
|
export async function tryUpgradeGlobalPkg(resolveInstalled, pkgName) {
|
|
177
177
|
if (isLinkedInstall()) {
|
|
@@ -201,10 +201,3 @@ export async function tryUpgradeGlobalPkg(resolveInstalled, pkgName) {
|
|
|
201
201
|
}
|
|
202
202
|
return { status: 'failed', from: localVer, to: remoteVer, error: lastError };
|
|
203
203
|
}
|
|
204
|
-
/**
|
|
205
|
-
* AUN SDK 升级流程:检查 → 比较 → 安装
|
|
206
|
-
* 仅在 SDK 已安装时检查升级,未安装则跳过。
|
|
207
|
-
*/
|
|
208
|
-
export async function tryUpgradeAunSdk(resolveAunCoreSdkPkg, AUN_CORE_SDK_PKG) {
|
|
209
|
-
return tryUpgradeGlobalPkg(resolveAunCoreSdkPkg, AUN_CORE_SDK_PKG);
|
|
210
|
-
}
|
|
@@ -63,6 +63,17 @@ export function summarizeToolInput(toolName, input) {
|
|
|
63
63
|
|| input.url
|
|
64
64
|
|| '';
|
|
65
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Audit-safe tool summary. Keep the useful operation shape while masking
|
|
68
|
+
* credentials commonly embedded in shell commands or tool arguments.
|
|
69
|
+
*/
|
|
70
|
+
export function summarizeToolInputForAudit(toolName, input) {
|
|
71
|
+
return summarizeToolInput(toolName, input)
|
|
72
|
+
.replace(/\b([A-Z0-9_]*(?:TOKEN|KEY|SECRET|PASSWORD|CREDENTIAL)[A-Z0-9_]*)\s*=\s*(?:"[^"]*"|'[^']*'|\S+)/gi, '$1=[REDACTED]')
|
|
73
|
+
.replace(/\b(authorization\s*:\s*Bearer\s+)[^\s"',;]+/gi, '$1[REDACTED]')
|
|
74
|
+
.replace(/\b(api[_-]?key|access[_-]?token|refresh[_-]?token|password|secret|authorization|cookie)\s*([=:])\s*(?:"[^"]*"|'[^']*'|\S+)/gi, '$1$2[REDACTED]')
|
|
75
|
+
.replace(/\bBearer\s+[^\s,;]+/gi, 'Bearer [REDACTED]');
|
|
76
|
+
}
|
|
66
77
|
const EDIT_PREVIEW_MAX_LINES = 14;
|
|
67
78
|
const EDIT_PREVIEW_CONTEXT_LINES = 2;
|
|
68
79
|
const EDIT_PREVIEW_INLINE_GAP_LINES = 4;
|
|
@@ -52,5 +52,5 @@ AUN keystore seed 由 EvolCore 使用固定应用值管理,不再提供配置
|
|
|
52
52
|
- **E2EE 加密**:可选端到端加密,回复默认跟随对端消息加密状态(密文回密文,明文回明文);keystore seed 由 EvolCore 固定管理。
|
|
53
53
|
- **断线重连**:SDK 内置退避策略自动重连。实时连接状态用 `ec watch aid` 查看(`ec aid` 是身份/证书管理,不显示连接状态)。
|
|
54
54
|
- **群 ID 格式**:当前协议规范使用 `g-{slug}.issuer-domain` canonical 形式,输入也可接受本域简写 `g-{slug}` 或兼容形式 `g-{slug}@issuer-domain`。历史会话里可能仍出现 `group.{issuer}/{group_no}` 一类旧格式,运行时需兼容读取。
|
|
55
|
-
-
|
|
55
|
+
- **群 @ 处理策略**:`mention_mode=disabled|mention-only` 是群级配置,只决定哪些群消息进入 Agent LLM 上下文,不影响 AUN 协议层投递;被过滤消息仍应本地存档。
|
|
56
56
|
- **身份体系**:对端以 AID 标识,关系层 peerKey 形如 `aun#alice.aid.pub`。
|
|
@@ -163,6 +163,7 @@ manifest 是 `{ "$schema_version": 1, "sections": [...] }`。每个 section:
|
|
|
163
163
|
|
|
164
164
|
- 覆盖文件含 `"mode": "replace"` → **完全替换**,只用覆盖文件的 sections。
|
|
165
165
|
- 否则 **patch 合并**:以 `id` 为键,覆盖文件里同 id 的字段浅合并进基础 section(`{...base, ...override}`),新 id 追加。
|
|
166
|
+
- 旧 patch 中的 `relation-group-profile` 已废弃并会被忽略;群与私聊 profile 统一通过 `peer-profile` 配置,避免同一文件重复加载。`mode: "replace"` 不做此兼容处理。
|
|
166
167
|
|
|
167
168
|
合并后统一按 `order` 升序排序。改某段行为(如关掉某层、调顺序、换条件)优先用覆盖文件,不动基础 manifest。
|
|
168
169
|
|
|
@@ -295,7 +296,6 @@ coding 场景(无 channel/无身份)下,`chatType`、`channel`、`selfAid`
|
|
|
295
296
|
| 40 | venue-fragment | fragment | chatType≠null | ✓ |
|
|
296
297
|
| 41 | venue-chattype | `$KITS_DOCS/venues/{{chatType}}.md` | chatType≠null | ✗ |
|
|
297
298
|
| 42 | venue-channel-chattype | `$KITS_DOCS/venues/{{channel}}-{{chatType}}.md` | chatType≠null | ✗ |
|
|
298
|
-
| 43 | relation-group-profile | `$RELATIONS_DIR/{{peerKey}}/profile.md` | groupId≠null | ✗ |
|
|
299
299
|
| 44 | venue-client | `$KITS_DOCS/venues/client-{{clientType}}.md` | clientType≠null | ✗ |
|
|
300
300
|
| 50 | channel-layer | fragment | channel≠null | ✓ |
|
|
301
301
|
| 55 | commands | fragment | channel≠null | ✓ |
|
|
@@ -322,7 +322,7 @@ $KITS_DOCS/venues/ 通用环境文档(随包发布,只读
|
|
|
322
322
|
```
|
|
323
323
|
|
|
324
324
|
> **注意**:具体群/私聊实例的 profile 数据落**关系层** `$RELATIONS_DIR/<peerKey>/profile.md`,
|
|
325
|
-
>
|
|
325
|
+
> 统一由 `peer-profile` 段注入,不在 venues 目录;群不会再通过另一个 section 重复加载。
|
|
326
326
|
|
|
327
327
|
## 输出结构
|
|
328
328
|
|
|
@@ -17,9 +17,10 @@ ec agent <aid>
|
|
|
17
17
|
ec agent new [aid]
|
|
18
18
|
|
|
19
19
|
# 创建 agent(非交互式,自动化场景)
|
|
20
|
-
ec agent new <aid> --non-interactive
|
|
21
|
-
[--baseagent claude|codex|gemini]
|
|
22
|
-
[--name "<显示名>"] [--description "<text>"]
|
|
20
|
+
ec agent new <aid> --non-interactive \
|
|
21
|
+
[--project <路径>] [--baseagent claude|codex|gemini|ecagent] \
|
|
22
|
+
[--owner <aid>] [--name "<显示名>"] [--description "<text>"] \
|
|
23
|
+
[--dry-run] [--force]
|
|
23
24
|
|
|
24
25
|
# 启用 / 停用
|
|
25
26
|
ec agent enable <aid>
|
|
@@ -44,9 +45,13 @@ ec agent delete <aid> [--purge]
|
|
|
44
45
|
|
|
45
46
|
## 非交互创建必填项
|
|
46
47
|
|
|
47
|
-
`ec agent new <aid> --non-interactive`
|
|
48
|
-
-
|
|
49
|
-
-
|
|
48
|
+
`ec agent new <aid> --non-interactive` 时,只有 `<aid>` 必填:
|
|
49
|
+
- `--project` 缺省为当前目录,并自动转为绝对路径。
|
|
50
|
+
- `--baseagent` 优先使用 `agents/defaults.json`,否则检测本机可用基座。
|
|
51
|
+
- `--owner` 缺省使用 `daemon.json` 的第一个 owner;未配置时省略。
|
|
52
|
+
- `--name` / `--description` 缺省读取当前项目 `package.json`,再回退到目录名 / 空描述。
|
|
53
|
+
- `--dry-run` 只输出最终创建计划,不注册 AID、不写配置、不上传 `agent.md`。
|
|
54
|
+
- `--force` 覆盖已有 `config.json`;AID 密钥保留。
|
|
50
55
|
|
|
51
56
|
## 头像更新
|
|
52
57
|
|
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
管理本地 AID 身份(证书、私钥、agent.md 名片),以及远程探测对端 AID。触发词:身份/证书/名片/探测对端/创建身份。
|
|
4
4
|
|
|
5
|
+
## 运行边界
|
|
6
|
+
|
|
7
|
+
本页列出独立终端中 `ec aid` 的完整 CLI 能力。在 EvolCore 托管 Agent 会话中,为防止会话枚举、创建、删除或切换身份,只允许当前 self AID 上的以下精确命令:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ec aid show <当前 self AID> [--format json]
|
|
11
|
+
ec aid lookup <当前 self AID> [--format json]
|
|
12
|
+
ec aid agentmd get <当前 self AID> [--format json]
|
|
13
|
+
# 仅 request / bypass
|
|
14
|
+
ec aid agentmd put <当前 self AID> [--format json]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
仅允许不带选项的基本形式,或在末尾附加一组完整的 `--format json`;不能使用 `--aun-path`、未知选项、管道、重定向或其他 AID。`show`、`lookup` 和 `agentmd get` 是 self-scoped 查询,可在所有 `permissionMode` 执行;`agentmd put` 会发布远端名片,属于写操作,仅允许 `request`、`bypass`,`readonly`、`auto` 和未知模式均拒绝。该身份范围边界早于模式审批,`bypass` 也不能跨越当前 self AID。`show` 会对自身身份做本地签名/验签自检,但不输出私钥;`lookup` 只探测已知的自身 AID;`get` 不改变身份或远端数据,但会下载并验签自身公开名片,同时刷新本地 AID 缓存。`list`、其他 AID 的 `show/lookup/agentmd get/put` 以及 `new/delete` 均拒绝。独立终端不受此托管会话限制。
|
|
18
|
+
|
|
5
19
|
## 子命令
|
|
6
20
|
|
|
7
21
|
```bash
|
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
私聊场景下收发消息的命令集。触发词:回复/发消息/拉取/撤回/查在线。
|
|
4
4
|
|
|
5
|
+
## Agent 会话中的 Shell 调用边界
|
|
6
|
+
|
|
7
|
+
在 EvolCore 托管会话中,每次工具调用只能执行一条完整的 `ec` 命令。禁止把
|
|
8
|
+
`command -v`、`ec aid`、`&&`、`||`、`;`、`|`、重定向、子 shell、`bash -lc` 或其它脚本
|
|
9
|
+
和 `ec msg` 拼在一起。不要做单独的 CLI 探测;直接调用本页的单条命令,读取结构化结果后
|
|
10
|
+
再决定下一步。工具审批被拒绝时应报告原始错误并停止,不要通过追加命令或提权参数重试。
|
|
11
|
+
|
|
5
12
|
以自己的 AID 为发送者(`<from>`),对端 AID 为 `<to>`。
|
|
6
13
|
|
|
7
14
|
## 发送消息
|
|
@@ -29,6 +36,8 @@ ec msg send <from> <to> --link <url> [--title "<title>"] [--description "<desc>"
|
|
|
29
36
|
ec msg send <from> <to> --payload '<json>'
|
|
30
37
|
```
|
|
31
38
|
|
|
39
|
+
每一行都必须单独执行,且是该次 shell 调用中的唯一命令。
|
|
40
|
+
|
|
32
41
|
发送相关选项:
|
|
33
42
|
- `--text-from-file <path>` — 从文件读取文本(UTF-8),用于超长消息或避免 Shell 转义
|
|
34
43
|
- `--encrypt` — 端到端加密
|
|
@@ -39,6 +48,10 @@ ec msg send <from> <to> --payload '<json>'
|
|
|
39
48
|
- `--text <说>` — 附件说明文字(仅 `--file`)
|
|
40
49
|
- `--transcript <text>` — 语音转写(仅 `--as voice`)
|
|
41
50
|
|
|
51
|
+
在 EvolCore 会话内,发送还会经过当前 session 的 self/peer/role 鉴权。`visitor` 或 `member`
|
|
52
|
+
默认只允许回复当前对端;从一个 agent 会话转发给第三个 agent 属于 relay 操作,可能因
|
|
53
|
+
`ownPeerOnly` 被拒绝。没有成功 JSON 回执(含 `message_id`/`status`)不得声称已发送。
|
|
54
|
+
|
|
42
55
|
成功输出:`✓ 已发送 <message_id> seq=<n> status=<status>`
|
|
43
56
|
|
|
44
57
|
> 正文写法:含空格/换行/特殊字符时用引号包起来;纯短词可不包,但多空格会被压成一个。
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
| **vars 粒度** | 会话级(一次构造,整批复用) | item 级(每条叠加 peerName/now/images) |
|
|
70
70
|
| **模板空行** | 删除(stripBlankLines=true,紧凑) | 保留(stripBlankLines=false,消息多段) |
|
|
71
71
|
| **content 注入** | N/A | 哨兵末步字面量注入(防二次解析) |
|
|
72
|
-
| **缓存** |
|
|
72
|
+
| **缓存** | 随包 `kits/` 文件跨 session 缓存到 reload;personal/relations 等运行时文件按 mtime 刷新 | 随包模板缓存到 reload,消息数据不缓存 |
|
|
73
73
|
| **debug 输出** | `eck-debug/context-*.md` `fragments-*.md` `manifest-*.md` `vars-*.json` | `eck-debug/msg-render-*.md` |
|
|
74
74
|
|
|
75
75
|
---
|
|
@@ -109,7 +109,6 @@
|
|
|
109
109
|
| 40 | venue-fragment | chatType≠null | ✓ | 环境层 fragment |
|
|
110
110
|
| 41 | venue-chattype | chatType≠null | ✗ | `venues/{{chatType}}.md` |
|
|
111
111
|
| 42 | venue-channel-chattype | chatType≠null | ✗ | `venues/{{channel}}-{{chatType}}.md` |
|
|
112
|
-
| 43 | venue-group-profile | groupId≠null | ✗ | 群 venue profile.md |
|
|
113
112
|
| 44 | venue-client | clientType≠null | ✗ | `venues/client-{{clientType}}.md` |
|
|
114
113
|
| 50 | channel-layer | channel≠null | ✓ | 渠道层 fragment |
|
|
115
114
|
| 55 | commands | channel≠null | ✓ | 命令集能力卡 |
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
## 行为准则
|
|
6
6
|
- `mentionMode: mention-only` — 仅响应明确 @ 自己的消息
|
|
7
7
|
- `mentionMode: disabled` — 所有消息可见,自主判断是否参与。这不是叫你每条都回,而是你可以像真人一样:感兴趣的接话,不感兴趣的就跳过。回得短一点、快一点,让对话流动起来,不要一个人长篇大论堵住别人的空间
|
|
8
|
-
-
|
|
8
|
+
- 查看关系档案(peer-profile)了解本群文化与策略
|
|
9
9
|
- 如果上下文中出现“群规则”,它来自当前群资源空间的本地同步缓存;群规则优先于通用群聊指引
|
|
10
10
|
- 群发言会被多人看到,谨言慎行
|
|
11
11
|
- 具体渠道(AUN/飞书/微信等)的群聊特有指引见对应渠道文档
|
package/kits/eck_manifest.json
CHANGED
|
@@ -127,18 +127,6 @@
|
|
|
127
127
|
] },
|
|
128
128
|
"description": "渠道+场景文档(如 feishu-group)"
|
|
129
129
|
},
|
|
130
|
-
{
|
|
131
|
-
"id": "relation-group-profile",
|
|
132
|
-
"type": "file",
|
|
133
|
-
"file": "$RELATIONS_DIR/{{peerKey}}/profile.md",
|
|
134
|
-
"order": 43,
|
|
135
|
-
"needsInjection": false,
|
|
136
|
-
"when": { "and": [
|
|
137
|
-
{ "var": "groupId", "neq": null },
|
|
138
|
-
{ "var": "lifecycle", "neq": "bootstrapping" }
|
|
139
|
-
] },
|
|
140
|
-
"description": "具体群关系文档"
|
|
141
|
-
},
|
|
142
130
|
{
|
|
143
131
|
"id": "relation-group-rules",
|
|
144
132
|
"type": "file",
|
|
@@ -6,6 +6,15 @@ ECK 的总览:前置概念和框架结构。
|
|
|
6
6
|
|
|
7
7
|
Base agent 是提供推理与生成能力的底层智能——如 Claude Code、Codex、Gemini 等。你就是当前会话的 base agent。
|
|
8
8
|
|
|
9
|
+
### 外部 Coding Agent Skills 边界
|
|
10
|
+
|
|
11
|
+
当前会话由 EvolCore 托管时,不加载、不读取、不执行工作区之外的 coding-agent `SKILL.md`,包括
|
|
12
|
+
`/home/evolcore/skills/eclink/SKILL.md`。该类 skill 只服务于独立运行、未接入 EvolCore 会话上下文的
|
|
13
|
+
Codex/Claude Code 工具实例。EvolCore 会话必须遵循本 ECK、daemon IPC 和渠道适配层提供的通信与权限路径。
|
|
14
|
+
|
|
15
|
+
尤其不要在 EvolCore 会话中因为看到 AUN/agent 间通信需求,就自行读取 `eclink` skill 或直接拼接 shell
|
|
16
|
+
命令调用 `ec`;发送必须经过当前会话的 delegated sender,以便锁定 self/peer、角色、审计和回执。
|
|
17
|
+
|
|
9
18
|
## AUN 是什么
|
|
10
19
|
|
|
11
20
|
AUN(Agent Union Network)是 agent 间安全通信的网络协议,SDK 的 npm 包名 `@agentunion/fastaun`。
|
|
@@ -39,7 +39,7 @@ relations/
|
|
|
39
39
|
|
|
40
40
|
| 条目 | 真实状态 |
|
|
41
41
|
|------|----------|
|
|
42
|
-
| `<peerKey>/profile.md` | manifest
|
|
42
|
+
| `<peerKey>/profile.md` | manifest 通过统一的 `peer-profile` 槽加载(缺失即跳过),群聊和私聊不再重复声明;目前**没有任何代码写它**,可以手写一份供上下文加载 |
|
|
43
43
|
| `_index/name_<name>.json` 名字反查索引 | 目录会被创建,但**无任何读写代码**,磁盘上全是空目录。"已知 name 反查 peerKey" 这条路走不通 |
|
|
44
44
|
| `<peerKey>/history.jsonl` | 关系层无此实现(同名文件都属于 handoff / trigger / CC 自己的历史) |
|
|
45
45
|
| `_trash/` | 只创建目录,没有 merge/split 重定向逻辑 |
|
package/kits/rules/05-venue.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
| 变量 | 取值 | 说明 |
|
|
6
6
|
|------|------|------|
|
|
7
7
|
| `chatType` | `private` / `group` / null | null = 无渠道的本地 coding 会话 |
|
|
8
|
-
| `mentionMode` | `mention-only` / `disabled` | 群内响应策略;取 agent/relation
|
|
8
|
+
| `mentionMode` | `mention-only` / `disabled` | 群内响应策略;取 agent/relation 配置,缺省时使用群服务器下发的 `mention_mode` |
|
|
9
9
|
| `clientType` | `desktop` / `web` / `mobile` | 有值时额外加载客户端场景文档 |
|
|
10
10
|
| `permissionMode` | readonly/auto/request/bypass | 当前生效权限模式 |
|
|
11
11
|
| `venueUid` | 恒为 undefined | 声明了但源码固定不填,模板有 `{{?}}` 守卫所以永不渲染——**不要依赖它** |
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
## Venue 类型抽象
|
|
40
40
|
|
|
41
41
|
环境层关注的是**类型**,而非具体实例。类型只有 `private` 和 `group` 两种(即 `chatType` 的两个非空取值)——
|
|
42
|
-
没有 `broadcast` 这个 venue
|
|
42
|
+
没有 `broadcast` 这个 venue 类型;群响应策略统一由 `mentionMode` 表达。
|
|
43
43
|
|
|
44
44
|
"张三所在的 team-alpha 这个**具体群**"不属于环境层,它是关系层的对端实例,数据落 `relations/<peerKey>/`。
|
|
45
45
|
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"x-merge": "scalar",
|
|
65
65
|
"description": "工具调用的审批策略",
|
|
66
66
|
"x-enumDescriptions": {
|
|
67
|
-
"readonly": "
|
|
67
|
+
"readonly": "只读模式:明确只读工具和普通路径上的受限只读 Shell 自动执行;写入、H/L 类读取、未知 Shell 和未知工具拒绝;EC 命令仍由 daemon 鉴权",
|
|
68
68
|
"auto": "自动模式:常规 workspace 操作自动执行,已识别危险操作和扩权请求拒绝",
|
|
69
69
|
"request": "请求模式:常规操作自动执行,危险 Bash 和沙箱扩权请求人工审批",
|
|
70
70
|
"bypass": "放行模式:沙箱内常规和普通审批命令自动执行,强危险 Git 和越界扩权仍需审批"
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"required": ["default", "allowOverride"],
|
|
89
89
|
"description": "工具调用的审批策略(角色级)",
|
|
90
90
|
"properties": {
|
|
91
|
-
"default": { "type": "string", "enum": ["readonly", "auto", "request", "bypass"], "description": "角色默认的工具调用审批策略;未得到有效角色策略时运行时安全回退为 readonly。", "x-enumDescriptions": { "readonly": "
|
|
91
|
+
"default": { "type": "string", "enum": ["readonly", "auto", "request", "bypass"], "description": "角色默认的工具调用审批策略;未得到有效角色策略时运行时安全回退为 readonly。", "x-enumDescriptions": { "readonly": "只读模式:明确只读工具和普通路径上的受限只读 Shell 自动执行;写入、H/L 类读取、未知 Shell 和未知工具拒绝;EC 命令仍由 daemon 鉴权", "auto": "自动模式:常规 workspace 操作自动执行,已识别危险操作和扩权请求拒绝", "request": "请求模式:常规操作自动执行,危险 Bash 和沙箱扩权请求人工审批", "bypass": "放行模式:沙箱内常规和普通审批命令自动执行,强危险 Git 和越界扩权仍需审批" } },
|
|
92
92
|
"allowOverride": { "const": false, "default": false, "description": "权限模式禁止关系级覆盖,固定为 false。" },
|
|
93
93
|
"allowedValues": {
|
|
94
94
|
"type": "array",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"x-enumDescriptions": {
|
|
44
44
|
"auto": "自动模式:常规 workspace 操作自动执行,已识别危险操作和扩权请求拒绝",
|
|
45
45
|
"bypass": "放行模式:沙箱内常规和普通审批命令自动执行,强危险 Git 和越界扩权仍需审批",
|
|
46
|
-
"readonly": "
|
|
46
|
+
"readonly": "只读模式:明确只读工具和普通路径上的受限只读 Shell 自动执行;写入、H/L 类读取、未知 Shell 和未知工具拒绝;EC 命令仍由 daemon 鉴权",
|
|
47
47
|
"request": "请求模式:常规操作自动执行,危险 Bash 和沙箱扩权请求人工审批",
|
|
48
48
|
"edit": "历史值:运行时按 request 迁移",
|
|
49
49
|
"plan": "历史值:运行时按 readonly 迁移,并保留 Claude plan 工作流提示",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"additionalProperties": false,
|
|
37
37
|
"description": "工具调用审批模式策略;该策略必须存在且不允许关系级覆盖。",
|
|
38
38
|
"properties": {
|
|
39
|
-
"default": { "type": "string", "enum": ["readonly", "auto", "request", "bypass"], "description": "该角色实际使用的工具调用审批模式。", "x-enumDescriptions": { "readonly": "
|
|
39
|
+
"default": { "type": "string", "enum": ["readonly", "auto", "request", "bypass"], "description": "该角色实际使用的工具调用审批模式。", "x-enumDescriptions": { "readonly": "只读模式:明确只读工具和普通路径上的受限只读 Shell 自动执行;写入、H/L 类读取、未知 Shell 和未知工具拒绝;EC 命令仍由 daemon 鉴权", "auto": "自动模式:常规 workspace 操作自动执行,已识别危险操作和扩权请求拒绝", "request": "请求模式:常规操作自动执行,危险 Bash 和沙箱扩权请求人工审批", "bypass": "放行模式:沙箱内常规和普通审批命令自动执行,强危险 Git 和越界扩权仍需审批" } },
|
|
40
40
|
"allowOverride": { "const": false, "default": false, "description": "权限模式禁止关系级覆盖,固定为 false。" },
|
|
41
41
|
"allowedValues": { "type": "array", "items": { "type": "string", "enum": ["readonly", "auto", "request", "bypass"], "description": "一个可列入权限模式候选集合的值。", "x-enumDescriptions": { "readonly": "只读模式", "auto": "自动模式", "request": "请求人工审批模式", "bypass": "受强制危险规则约束的放行模式" } }, "uniqueItems": true, "description": "保留的权限模式候选集合;permissionMode 当前不可由关系级覆盖,通常无需配置。" },
|
|
42
42
|
"reason": { "type": "string", "description": "采用该权限模式策略的可审计原因或管理备注。" }
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
"type": "boolean",
|
|
12
12
|
"enum": [true, false],
|
|
13
13
|
"default": true,
|
|
14
|
-
"description": "proactive
|
|
14
|
+
"description": "proactive 首个本地工具表态检查(仅 chatmode=proactive 生效):首个可被 PreToolUse 覆盖的本地工具必须是当前会话精确对应的 ec msg/group send,否则拦截;WebSearch、图像生成、浏览器和 Computer Use 等 hosted 工具不进入此硬拒绝边界。",
|
|
15
15
|
"x-enumDescriptions": {
|
|
16
|
-
"true": "
|
|
17
|
-
"false": "
|
|
16
|
+
"true": "启用:首个 hook 可覆盖的本地工具必须是精确会话 send",
|
|
17
|
+
"false": "禁用:不执行 proactive 首个本地工具 send 检查"
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"tool_use_reminder": {
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"type": "boolean",
|
|
35
35
|
"enum": [true, false],
|
|
36
36
|
"default": true,
|
|
37
|
-
"description": "proactive
|
|
37
|
+
"description": "proactive 首个本地工具表态检查(仅 chatmode=proactive 生效):首个可被 PreToolUse 覆盖的本地工具必须是当前会话精确对应的 ec msg/group send,否则拦截;WebSearch、图像生成、浏览器和 Computer Use 等 hosted 工具不进入此硬拒绝边界。",
|
|
38
38
|
"x-enumDescriptions": {
|
|
39
|
-
"true": "
|
|
40
|
-
"false": "
|
|
39
|
+
"true": "启用:首个 hook 可覆盖的本地工具必须是精确会话 send",
|
|
40
|
+
"false": "禁用:不执行 proactive 首个本地工具 send 检查"
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"tool_use_reminder": {
|
|
@@ -27,6 +27,21 @@
|
|
|
27
27
|
"role.revoke": { "allow": true, "scopes": ["agent"] },
|
|
28
28
|
"role.policy.read": { "allow": true, "scopes": ["agent"] },
|
|
29
29
|
"role.relation.read": { "allow": true, "scopes": ["agent"] },
|
|
30
|
+
"agent.baseagent.update": {
|
|
31
|
+
"allow": true,
|
|
32
|
+
"scopes": ["agent"],
|
|
33
|
+
"constraints": { "requireAgentOwner": true, "targetCurrentAgentOnly": true }
|
|
34
|
+
},
|
|
35
|
+
"observable.current": {
|
|
36
|
+
"allow": true,
|
|
37
|
+
"scopes": ["agent"],
|
|
38
|
+
"constraints": { "requireAgentOwner": true }
|
|
39
|
+
},
|
|
40
|
+
"observable.update": {
|
|
41
|
+
"allow": true,
|
|
42
|
+
"scopes": ["agent"],
|
|
43
|
+
"constraints": { "requireAgentOwner": true, "targetCurrentAgentOnly": true }
|
|
44
|
+
},
|
|
30
45
|
"config.get": { "allow": true, "scopes": ["agent", "relation"] },
|
|
31
46
|
"config.set": { "allow": true, "scopes": ["agent", "relation"] },
|
|
32
47
|
"config.unset": { "allow": true, "scopes": ["agent", "relation"] },
|
|
@@ -36,6 +51,18 @@
|
|
|
36
51
|
"scopes": ["agent"],
|
|
37
52
|
"constraints": { "requireAgentAdmin": true }
|
|
38
53
|
},
|
|
54
|
+
"ec.aid.show": {
|
|
55
|
+
"allow": true,
|
|
56
|
+
"dangerous": true,
|
|
57
|
+
"scopes": ["agent"],
|
|
58
|
+
"constraints": { "targetCurrentAgentOnly": true, "requireAgentAdmin": true }
|
|
59
|
+
},
|
|
60
|
+
"ec.aid.agentmd.put": {
|
|
61
|
+
"allow": true,
|
|
62
|
+
"dangerous": true,
|
|
63
|
+
"scopes": ["agent"],
|
|
64
|
+
"constraints": { "targetCurrentAgentOnly": true, "requireAgentAdmin": true }
|
|
65
|
+
},
|
|
39
66
|
"*": { "allow": true },
|
|
40
67
|
"agent.reload": {
|
|
41
68
|
"allow": true,
|