evolcore 0.0.1 → 0.0.2
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 +813 -0
- package/LICENSE +21 -0
- package/MIGRATION-0.5.0.md +378 -0
- package/README.md +318 -14
- package/ROLE_ACCESS_CONTROL.md +174 -0
- package/assets/.env.template +4 -0
- package/assets/brand/evolcore/README.md +19 -0
- package/assets/brand/evolcore/evolcore-app-icon.png +0 -0
- package/assets/brand/evolcore/evolcore-app-icon.svg +13 -0
- package/assets/brand/evolcore/evolcore-brand-board.png +0 -0
- package/assets/brand/evolcore/evolcore-brand-board.svg +126 -0
- package/assets/brand/evolcore/evolcore-logo-kit.zip +0 -0
- package/assets/brand/evolcore/evolcore-logo-reverse.png +0 -0
- package/assets/brand/evolcore/evolcore-logo-reverse.svg +14 -0
- package/assets/brand/evolcore/evolcore-logo.png +0 -0
- package/assets/brand/evolcore/evolcore-logo.svg +14 -0
- package/assets/brand/evolcore/evolcore-mark.png +0 -0
- package/assets/brand/evolcore/evolcore-mark.svg +10 -0
- package/bin/ec-safe-output.js +161 -0
- package/bin/ec.js +29 -0
- package/dist/agents/baseagent.js +163 -0
- package/dist/agents/claude-runner.js +2385 -0
- package/dist/agents/codex-app-server-client.js +448 -0
- package/dist/agents/codex-runner.js +2639 -0
- package/dist/agents/gemini-runner.js +666 -0
- package/dist/agents/runner-types.js +75 -0
- package/dist/aun/aid/agentmd.js +216 -0
- package/dist/aun/aid/client.js +132 -0
- package/dist/aun/aid/control-aid.js +91 -0
- package/dist/aun/aid/identity.js +518 -0
- package/dist/aun/aid/index.js +4 -0
- package/dist/aun/aid/store.js +74 -0
- package/dist/aun/aid/types.js +1 -0
- package/dist/aun/aid/validation.js +21 -0
- package/dist/aun/group-identity.js +10 -0
- package/dist/aun/msg/group-index.js +6 -0
- package/dist/aun/msg/group.js +1231 -0
- package/dist/aun/msg/history.js +123 -0
- package/dist/aun/msg/index.js +5 -0
- package/dist/aun/msg/p2p.js +393 -0
- package/dist/aun/msg/payload-type.js +27 -0
- package/dist/aun/msg/upload.js +137 -0
- package/dist/aun/outbox.js +160 -0
- package/dist/aun/rpc/caller.js +42 -0
- package/dist/aun/rpc/connection.js +25 -0
- package/dist/aun/rpc/index.js +2 -0
- package/dist/aun/service-proxy.js +225 -0
- package/dist/aun/storage/download.js +29 -0
- package/dist/aun/storage/index.js +3 -0
- package/dist/aun/storage/manage.js +10 -0
- package/dist/aun/storage/upload.js +68 -0
- package/dist/channels/aun.js +4147 -0
- package/dist/channels/daemon.js +422 -0
- package/dist/channels/dingtalk.js +649 -0
- package/dist/channels/feishu.js +1789 -0
- package/dist/channels/qqbot.js +409 -0
- package/dist/channels/wechat.js +817 -0
- package/dist/channels/wecom.js +565 -0
- package/dist/cli/agent-command.js +641 -0
- package/dist/cli/agent.js +1059 -0
- package/dist/cli/aun-commands.js +1948 -0
- package/dist/cli/bench.js +1228 -0
- package/dist/cli/cli-argv.js +66 -0
- package/dist/cli/code-stats.js +329 -0
- package/dist/cli/command-log.js +82 -0
- package/dist/cli/config-selector.js +69 -0
- package/dist/cli/config.js +261 -0
- package/dist/cli/ctl-command.js +62 -0
- package/dist/cli/daemon-commands.js +2887 -0
- package/dist/cli/fs-command.js +1447 -0
- package/dist/cli/handoff-command.js +302 -0
- package/dist/cli/help.js +31 -0
- package/dist/cli/index.js +358 -0
- package/dist/cli/init-channel.js +1377 -0
- package/dist/cli/init.js +553 -0
- package/dist/cli/link-rules.js +240 -0
- package/dist/cli/model.js +590 -0
- package/dist/cli/net-check.js +723 -0
- package/dist/cli/queue-command.js +126 -0
- package/dist/cli/response.js +345 -0
- package/dist/cli/restart-monitor.js +456 -0
- package/dist/cli/stats.js +607 -0
- package/dist/cli/task-context.js +80 -0
- package/dist/cli/trigger-command.js +505 -0
- package/dist/cli/version.js +88 -0
- package/dist/cli/watch-logs.js +33 -0
- package/dist/cli/watch-msg.js +673 -0
- package/dist/config/boot-log.js +266 -0
- package/dist/config/builtin-role-templates.js +30 -0
- package/dist/config/builtin-roles.js +85 -0
- package/dist/config/config-batch-get.js +11 -0
- package/dist/config/config-field-policy.js +261 -0
- package/dist/config/config-manager.js +916 -0
- package/dist/config/config-operation-service.js +384 -0
- package/dist/config/contact-book.js +371 -0
- package/dist/config/gateway-config.js +858 -0
- package/dist/config/lifecycle.js +17 -0
- package/dist/config/mention-mode.js +27 -0
- package/dist/config/merge.js +161 -0
- package/dist/config/owner-policy.js +4 -0
- package/dist/config/peer-role-resolver.js +139 -0
- package/dist/config/resolved-config-op.js +483 -0
- package/dist/config/role-config-v4-startup.js +32 -0
- package/dist/config/role-config-v5-startup.js +27 -0
- package/dist/config/role-schema.js +105 -0
- package/dist/config/role-service.js +159 -0
- package/dist/config/role-store.js +204 -0
- package/dist/config/roles.js +55 -0
- package/dist/config/schema-registry.js +154 -0
- package/dist/config/snapshot.js +598 -0
- package/dist/config-store.js +503 -0
- package/dist/core/auth/agent-delegation.js +111 -0
- package/dist/core/auth/auth-gateway.js +166 -0
- package/dist/core/auth/authenticated-actor.js +6 -0
- package/dist/core/auth/authorization-audit.js +110 -0
- package/dist/core/auth/operation-authorizer.js +718 -0
- package/dist/core/auth/operation-catalog.js +675 -0
- package/dist/core/baseagent-loader.js +54 -0
- package/dist/core/bootstrap-service.js +175 -0
- package/dist/core/capability/capability-manager.js +316 -0
- package/dist/core/capability/providers/claude-capability-provider.js +176 -0
- package/dist/core/capability/providers/codex-capability-provider.js +148 -0
- package/dist/core/capability/providers/gemini-capability-provider.js +10 -0
- package/dist/core/capability/types.js +27 -0
- package/dist/core/causation/audit.js +103 -0
- package/dist/core/causation/aun-association.js +111 -0
- package/dist/core/causation/context.js +93 -0
- package/dist/core/causation/index.js +4 -0
- package/dist/core/causation/types.js +2 -0
- package/dist/core/channel-loader.js +277 -0
- package/dist/core/command/agent-control.js +616 -0
- package/dist/core/command/cli-intent-parser.js +225 -0
- package/dist/core/command/command-handler.js +1638 -0
- package/dist/core/command/menu-handler.js +3354 -0
- package/dist/core/command/menu-protocol.js +247 -0
- package/dist/core/command/role-menu.js +1524 -0
- package/dist/core/command/slash-gate.js +148 -0
- package/dist/core/command/slash-handler.js +3056 -0
- package/dist/core/daemon-file-cache.js +216 -0
- package/dist/core/event-bus.js +32 -0
- package/dist/core/event-catalog.js +740 -0
- package/dist/core/evolagent-registry.js +546 -0
- package/dist/core/evolagent.js +331 -0
- package/dist/core/handoff/dispatcher.js +229 -0
- package/dist/core/handoff/mutex.js +46 -0
- package/dist/core/handoff/runtime.js +324 -0
- package/dist/core/handoff/store.js +537 -0
- package/dist/core/handoff/types.js +12 -0
- package/dist/core/inference/text-inference.js +173 -0
- package/dist/core/interaction-registration.js +10 -0
- package/dist/core/interaction-router.js +278 -0
- package/dist/core/message/create-status.js +67 -0
- package/dist/core/message/im-renderer.js +657 -0
- package/dist/core/message/items-formatter.js +76 -0
- package/dist/core/message/logical-queue-bridge.js +123 -0
- package/dist/core/message/message-bridge.js +803 -0
- package/dist/core/message/message-cache.js +56 -0
- package/dist/core/message/message-log.js +339 -0
- package/dist/core/message/message-processor.js +4 -0
- package/dist/core/message/message-queue.js +1436 -0
- package/dist/core/message/message-utils.js +70 -0
- package/dist/core/message/peer-mode.js +105 -0
- package/dist/core/message/pending-hints.js +232 -0
- package/dist/core/message/response-depth.js +33 -0
- package/dist/core/message/response-engine.js +3776 -0
- package/dist/core/message/response-snapshot.js +83 -0
- package/dist/core/message/stream-debouncer.js +130 -0
- package/dist/core/message/stream-idle-monitor.js +124 -0
- package/dist/core/model/config-scope.js +162 -0
- package/dist/core/model/field-scope.js +78 -0
- package/dist/core/model/model-catalog.js +227 -0
- package/dist/core/model/model-diagnostics.js +182 -0
- package/dist/core/model/model-permission.js +90 -0
- package/dist/core/permission/approval-gateway.js +1017 -0
- package/dist/core/permission/ec-command-parser.js +347 -0
- package/dist/core/permission/execution-sandbox.js +16 -0
- package/dist/core/permission/index.js +6 -0
- package/dist/core/permission/mode.js +24 -0
- package/dist/core/permission/sandbox-runtime.js +265 -0
- package/dist/core/permission/tool-policy.js +987 -0
- package/dist/core/permission/unix-socket-policy.js +99 -0
- package/dist/core/protected-paths.js +330 -0
- package/dist/core/relation/peer-identity.js +222 -0
- package/dist/core/relation/peer-key.js +1 -0
- package/dist/core/role/runtime-policy.js +141 -0
- package/dist/core/session/adapters/claude-session-file-adapter.js +218 -0
- package/dist/core/session/adapters/codex-session-file-adapter.js +333 -0
- package/dist/core/session/adapters/gemini-session-file-adapter.js +181 -0
- package/dist/core/session/session-file-adapter.js +7 -0
- package/dist/core/session/session-file-health.js +45 -0
- package/dist/core/session/session-fs-store.js +232 -0
- package/dist/core/session/session-key.js +24 -0
- package/dist/core/session/session-manager.js +1587 -0
- package/dist/core/session/session-mapper.js +100 -0
- package/dist/core/session/session-renew.js +314 -0
- package/dist/core/session/session-title.js +128 -0
- package/dist/core/session/session-turn-coordinator.js +205 -0
- package/dist/core/session/session-turns.js +67 -0
- package/dist/core/system-channels.js +29 -0
- package/dist/eck/baseagent-caps.js +18 -0
- package/dist/eck/detect.js +47 -0
- package/dist/eck/group-rules-sync.js +345 -0
- package/dist/eck/init.js +77 -0
- package/dist/eck/kit-renderer.js +359 -0
- package/dist/eck/manifest-engine.js +446 -0
- package/dist/eck/message-renderer.js +199 -0
- package/dist/eck/rules-loader.js +28 -0
- package/dist/index.js +2870 -4
- package/dist/ipc.js +748 -0
- package/dist/paths.js +262 -0
- package/dist/product.js +18 -0
- package/dist/response-system/context-builder.js +71 -0
- package/dist/response-system/coordinator.js +117 -0
- package/dist/response-system/decision-executor.js +86 -0
- package/dist/response-system/engines/v1/index.js +21 -0
- package/dist/response-system/engines/v1/interactive-flow.js +27 -0
- package/dist/response-system/engines/v1/proactive-flow.js +137 -0
- package/dist/response-system/engines/v1/types.js +1 -0
- package/dist/response-system/extensions.js +41 -0
- package/dist/response-system/index.js +6 -0
- package/dist/response-system/modes/index.js +7 -0
- package/dist/response-system/modes/single-session/index.js +72 -0
- package/dist/response-system/queues/fifo-queue.js +44 -0
- package/dist/response-system/queues/index.js +6 -0
- package/dist/response-system/queues/lifo-queue.js +42 -0
- package/dist/response-system/queues/priority-queue.js +63 -0
- package/dist/response-system/registry.js +97 -0
- package/dist/response-system/resolver.js +37 -0
- package/dist/response-system/selector.js +23 -0
- package/dist/response-system/types.js +7 -0
- package/dist/stats/billing.js +151 -0
- package/dist/stats/budget.js +93 -0
- package/dist/stats/db.js +403 -0
- package/dist/stats/eck-vars.js +89 -0
- package/dist/stats/index.js +11 -0
- package/dist/stats/normalizer.js +80 -0
- package/dist/stats/price-resolver.js +138 -0
- package/dist/stats/query.js +763 -0
- package/dist/stats/role-budget.js +168 -0
- package/dist/stats/writer.js +151 -0
- package/dist/trigger/anomaly-store.js +258 -0
- package/dist/trigger/audit.js +152 -0
- package/dist/trigger/event-source.js +119 -0
- package/dist/trigger/feedback.js +685 -0
- package/dist/trigger/history.js +290 -0
- package/dist/trigger/manager.js +291 -0
- package/dist/trigger/parser.js +520 -0
- package/dist/trigger/patch.js +148 -0
- package/dist/trigger/scheduler.js +1600 -0
- package/dist/trigger/script-executor.js +155 -0
- package/dist/trigger/state.js +145 -0
- package/dist/trigger/types.js +1 -0
- package/dist/trigger/validation.js +621 -0
- package/dist/types.js +12 -0
- package/dist/utils/aid-bind.js +299 -0
- package/dist/utils/atomic-write.js +95 -0
- package/dist/utils/avatar-upload.js +123 -0
- package/dist/utils/cross-platform.js +297 -0
- package/dist/utils/ecweb-utils.js +73 -0
- package/dist/utils/error-dict.json +153 -0
- package/dist/utils/error-utils.js +349 -0
- package/dist/utils/instance-registry.js +437 -0
- package/dist/utils/locale.js +21 -0
- package/dist/utils/log-writer.js +224 -0
- package/dist/utils/logger.js +89 -0
- package/dist/utils/markdown-to-plain-text.js +20 -0
- package/dist/utils/media-cache.js +271 -0
- package/dist/utils/model-prices.jsonl +17 -0
- package/dist/utils/npm-ops.js +210 -0
- package/dist/utils/process-introspect.js +133 -0
- package/dist/utils/process-tree-stats.js +271 -0
- package/dist/utils/project-path.js +74 -0
- package/dist/utils/stats.js +410 -0
- package/dist/utils/tool-summary.js +284 -0
- package/dist/utils/welcome.js +268 -0
- package/kits/docs/GUIDE.md +20 -0
- package/kits/docs/INDEX.md +65 -0
- package/kits/docs/aun/CHEATSHEET.md +19 -0
- package/kits/docs/aun/SYNC_PROTOCOL.md +15 -0
- package/kits/docs/channels/aun.md +65 -0
- package/kits/docs/channels/feishu.md +56 -0
- package/kits/docs/context-assembly.md +366 -0
- package/kits/docs/eck_templates/GUIDE.template.md +22 -0
- package/kits/docs/eck_templates/INDEX.template.md +28 -0
- package/kits/docs/eck_templates/path-registry.template.md +33 -0
- package/kits/docs/eck_templates/runtime.template.md +19 -0
- package/kits/docs/evolcore/INDEX.md +66 -0
- package/kits/docs/evolcore/agent.md +69 -0
- package/kits/docs/evolcore/aid.md +49 -0
- package/kits/docs/evolcore/config.md +149 -0
- package/kits/docs/evolcore/ctl.md +46 -0
- package/kits/docs/evolcore/event.md +216 -0
- package/kits/docs/evolcore/fs-architecture.md +1215 -0
- package/kits/docs/evolcore/fs.md +101 -0
- package/kits/docs/evolcore/group-fs.md +17 -0
- package/kits/docs/evolcore/group-rules.md +226 -0
- package/kits/docs/evolcore/group.md +141 -0
- package/kits/docs/evolcore/model.md +47 -0
- package/kits/docs/evolcore/msg.md +130 -0
- package/kits/docs/evolcore/response.md +80 -0
- package/kits/docs/evolcore/rpc.md +35 -0
- package/kits/docs/evolcore/self-summary.md +29 -0
- package/kits/docs/evolcore/stats.md +70 -0
- package/kits/docs/evolcore/storage.md +49 -0
- package/kits/docs/evolcore/trigger.md +524 -0
- package/kits/docs/identity/AID_PROFILE_SPEC.md +26 -0
- package/kits/docs/identity/PATH_OPS.md +16 -0
- package/kits/docs/identity/ROLE_DETAIL.md +23 -0
- package/kits/docs/identity/identity-tools.md +26 -0
- package/kits/docs/path-registry.md +43 -0
- package/kits/docs/prompt-loading-architecture.md +266 -0
- package/kits/docs/venues/aun-group.md +45 -0
- package/kits/docs/venues/aun-private.md +10 -0
- package/kits/docs/venues/client-desktop.md +10 -0
- package/kits/docs/venues/client-mobile.md +10 -0
- package/kits/docs/venues/feishu-group.md +13 -0
- package/kits/docs/venues/feishu-private.md +9 -0
- package/kits/docs/venues/group.md +25 -0
- package/kits/docs/venues/private.md +10 -0
- package/kits/eck_manifest.auxiliary.json +43 -0
- package/kits/eck_manifest.json +191 -0
- package/kits/eck_message_manifest.json +63 -0
- package/kits/migrations/README-role-config-v4.md +32 -0
- package/kits/migrations/migrate-role-config-v4.mjs +623 -0
- package/kits/migrations/migrate-role-config-v5.mjs +346 -0
- package/kits/migrations/rename-config-file.mjs +99 -0
- package/kits/rules/01-overview.md +142 -0
- package/kits/rules/02-navigation.md +76 -0
- package/kits/rules/03-identity.md +34 -0
- package/kits/rules/04-relation.md +59 -0
- package/kits/rules/05-venue.md +44 -0
- package/kits/rules/06-channel.md +59 -0
- package/kits/schemas/_meta.json +29 -0
- package/kits/schemas/agent-config.schema.1.json +177 -0
- package/kits/schemas/agent-config.schema.2.json +239 -0
- package/kits/schemas/agent-config.schema.3.json +119 -0
- package/kits/schemas/agent-config.schema.4.json +208 -0
- package/kits/schemas/agent-config.schema.5.json +326 -0
- package/kits/schemas/contact-book.schema.1.json +36 -0
- package/kits/schemas/daemon.schema.1.json +90 -0
- package/kits/schemas/defaults.schema.1.json +81 -0
- package/kits/schemas/menu-exec-schema-commands.md +208 -0
- package/kits/schemas/migrations/README.md +28 -0
- package/kits/schemas/relation-config.schema.1.json +158 -0
- package/kits/schemas/relation-config.schema.2.json +73 -0
- package/kits/schemas/relation-config.schema.3.json +50 -0
- package/kits/schemas/relation-config.schema.4.json +47 -0
- package/kits/schemas/role-config.schema.1.json +200 -0
- package/kits/schemas/role-registry.schema.1.json +35 -0
- package/kits/schemas/single-session.schema.1.json +31 -0
- package/kits/templates/bootstrap-welcome.md +15 -0
- package/kits/templates/message-fragments/handoff-request-to-target.md +13 -0
- package/kits/templates/message-fragments/handoff-response-to-origin.md +10 -0
- package/kits/templates/message-fragments/inject-default.md +2 -0
- package/kits/templates/message-fragments/item.md +2 -0
- package/kits/templates/roles/admin.json +8 -0
- package/kits/templates/roles/member.json +40 -0
- package/kits/templates/roles/owner.json +8 -0
- package/kits/templates/roles/visitor.json +39 -0
- package/kits/templates/system-fragments/baseagent.md +14 -0
- package/kits/templates/system-fragments/bootstrap.md +16 -0
- package/kits/templates/system-fragments/channel.md +48 -0
- package/kits/templates/system-fragments/commands.md +26 -0
- package/kits/templates/system-fragments/identity.md +11 -0
- package/kits/templates/system-fragments/relation.md +19 -0
- package/kits/templates/system-fragments/session.md +53 -0
- package/kits/templates/system-fragments/venue.md +31 -0
- package/package.json +50 -15
- package/dist/index.d.ts +0 -7
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "role-config.schema.1.json",
|
|
4
|
+
"title": "RoleConfig (agents/{aid}/roles/{roleId}.json)",
|
|
5
|
+
"description": "单个角色的独立策略配置。角色 ID 由文件名表达,本文件定义访问权限、行为字段约束、命令权限和用量额度。",
|
|
6
|
+
"x-logical-name": "role-config",
|
|
7
|
+
"x-scope": "role",
|
|
8
|
+
"x-permission-fields": [
|
|
9
|
+
{ "value": "permissionMode", "label": "Permission Mode", "description": "角色的工具调用审批模式;只能由角色策略决定,关系级不可覆盖。", "valueType": "enum", "hasOptions": true, "relationOverrideApplied": false, "constraintsApplied": true, "editable": true, "x-runtimeApplied": true, "x-optionsSource": "static-enum", "options": [{ "value": "readonly", "label": "Readonly" }, { "value": "auto", "label": "Auto" }, { "value": "request", "label": "Request" }, { "value": "bypass", "label": "Bypass" }] },
|
|
10
|
+
{ "value": "chatmode.private", "label": "Private Chat Mode", "description": "角色在私聊场景中的响应方式策略。", "valueType": "enum", "hasOptions": true, "relationOverrideApplied": true, "constraintsApplied": true, "editable": true, "x-runtimeApplied": true, "x-optionsSource": "static-enum", "options": [{ "value": "interactive", "label": "Interactive" }, { "value": "proactive", "label": "Proactive" }] },
|
|
11
|
+
{ "value": "chatmode.group", "label": "Group Chat Mode", "description": "角色在群聊场景中的响应方式策略。", "valueType": "enum", "hasOptions": true, "relationOverrideApplied": true, "constraintsApplied": true, "editable": true, "x-runtimeApplied": true, "x-optionsSource": "static-enum", "options": [{ "value": "interactive", "label": "Interactive" }, { "value": "proactive", "label": "Proactive" }] },
|
|
12
|
+
{ "value": "mentionMode", "label": "Group Mention Mode", "description": "角色在群聊场景中的提及响应策略。", "valueType": "enum", "hasOptions": true, "relationOverrideApplied": true, "constraintsApplied": true, "editable": true, "x-runtimeApplied": true, "x-optionsSource": "static-enum", "options": [{ "value": "disabled", "label": "Disabled" }, { "value": "mention-only", "label": "Mention Only" }] },
|
|
13
|
+
{ "value": "baseagents.claude.model", "label": "Claude Model", "description": "角色可使用的 Claude 默认模型和模型白名单。", "valueType": "model", "hasOptions": true, "relationOverrideApplied": true, "constraintsApplied": true, "editable": true, "x-runtimeApplied": true, "x-optionsSource": "model-catalog", "patterns": [{ "value": "*", "label": "All Claude models" }, { "value": "claude-opus-*", "label": "Claude Opus family" }, { "value": "claude-sonnet-*", "label": "Claude Sonnet family" }, { "value": "claude-haiku-*", "label": "Claude Haiku family" }] },
|
|
14
|
+
{ "value": "baseagents.claude.effort", "label": "Claude Effort", "description": "角色使用 Claude 时的默认推理强度及可覆盖范围。", "valueType": "enum", "hasOptions": true, "relationOverrideApplied": true, "constraintsApplied": true, "editable": true, "x-runtimeApplied": true, "x-optionsSource": "static-enum", "options": [{ "value": "auto", "label": "Auto" }, { "value": "low", "label": "Low" }, { "value": "medium", "label": "Medium" }, { "value": "high", "label": "High" }, { "value": "xhigh", "label": "Xhigh" }, { "value": "max", "label": "Max" }] },
|
|
15
|
+
{ "value": "baseagents.codex.model", "label": "Codex Model", "description": "角色可使用的 Codex 默认模型和模型白名单。", "valueType": "model", "hasOptions": true, "relationOverrideApplied": true, "constraintsApplied": true, "editable": true, "x-runtimeApplied": true, "x-optionsSource": "model-catalog", "patterns": [{ "value": "*", "label": "All Codex models" }, { "value": "gpt-5.4*", "label": "GPT-5.4 family" }, { "value": "gpt-5.3-codex*", "label": "GPT-5.3 Codex family" }] },
|
|
16
|
+
{ "value": "baseagents.codex.reasoning", "label": "Codex Reasoning", "description": "角色使用 Codex 时的默认推理强度及可覆盖范围。", "valueType": "enum", "hasOptions": true, "relationOverrideApplied": true, "constraintsApplied": true, "editable": true, "x-runtimeApplied": true, "x-optionsSource": "static-enum", "options": [{ "value": "auto", "label": "Auto" }, { "value": "low", "label": "Low" }, { "value": "medium", "label": "Medium" }, { "value": "high", "label": "High" }, { "value": "xhigh", "label": "Xhigh" }] },
|
|
17
|
+
{ "value": "baseagents.gemini.model", "label": "Gemini Model", "description": "角色可使用的 Gemini 默认模型和模型白名单。", "valueType": "model", "hasOptions": true, "relationOverrideApplied": true, "constraintsApplied": true, "editable": true, "x-runtimeApplied": true, "x-optionsSource": "model-catalog", "patterns": [{ "value": "*", "label": "All Gemini models" }, { "value": "gemini-*", "label": "Gemini model family" }] },
|
|
18
|
+
{ "value": "baseagents.hermes.model", "label": "Hermes Model", "description": "角色可使用的 Hermes 默认模型和模型白名单。", "valueType": "model", "hasOptions": true, "relationOverrideApplied": true, "constraintsApplied": true, "editable": true, "x-runtimeApplied": true, "x-optionsSource": "model-catalog", "patterns": [{ "value": "*", "label": "All Hermes models" }] }
|
|
19
|
+
],
|
|
20
|
+
"type": "object",
|
|
21
|
+
"additionalProperties": false,
|
|
22
|
+
"required": ["$schema_version", "description", "permissions"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"$schema_version": { "type": "number", "const": 1, "default": 1, "description": "角色配置 Schema 版本,固定为 1。" },
|
|
25
|
+
"description": { "type": "string", "description": "角色的用途、信任级别和授权边界说明。" },
|
|
26
|
+
"allowAccess": { "type": "boolean", "default": true, "description": "是否允许该角色访问 Agent;缺省为 true。" },
|
|
27
|
+
"permissions": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"required": ["permissionMode"],
|
|
30
|
+
"description": "角色对运行时行为字段施加的默认值、关系级覆盖权及候选值约束。",
|
|
31
|
+
"properties": {
|
|
32
|
+
"permissionMode": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"required": ["default", "allowOverride"],
|
|
35
|
+
"additionalProperties": false,
|
|
36
|
+
"description": "工具调用审批模式策略;该策略必须存在且不允许关系级覆盖。",
|
|
37
|
+
"properties": {
|
|
38
|
+
"default": { "type": "string", "enum": ["readonly", "auto", "request", "bypass"], "description": "该角色实际使用的工具调用审批模式。", "x-enumDescriptions": { "readonly": "只读模式:明确只读工具自动执行,写入、普通 Shell 和未知工具拒绝;EC 命令仍由 daemon 鉴权", "auto": "自动模式:常规 workspace 操作自动执行,已识别危险操作和扩权请求拒绝", "request": "请求模式:常规操作自动执行,危险 Bash 和沙箱扩权请求人工审批", "bypass": "放行模式:沙箱内常规和普通审批命令自动执行,强危险 Git 和越界扩权仍需审批" } },
|
|
39
|
+
"allowOverride": { "const": false, "default": false, "description": "权限模式禁止关系级覆盖,固定为 false。" },
|
|
40
|
+
"allowedValues": { "type": "array", "items": { "type": "string", "enum": ["readonly", "auto", "request", "bypass"], "description": "一个可列入权限模式候选集合的值。", "x-enumDescriptions": { "readonly": "只读模式", "auto": "自动模式", "request": "请求人工审批模式", "bypass": "受强制危险规则约束的放行模式" } }, "uniqueItems": true, "description": "保留的权限模式候选集合;permissionMode 当前不可由关系级覆盖,通常无需配置。" },
|
|
41
|
+
"reason": { "type": "string", "description": "采用该权限模式策略的可审计原因或管理备注。" }
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"chatmode.private": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"required": ["default", "allowOverride"],
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"description": "该角色在私聊场景中的响应方式策略。",
|
|
49
|
+
"properties": {
|
|
50
|
+
"default": { "type": "string", "enum": ["interactive", "proactive"], "description": "未设置有效关系级覆盖时使用的私聊响应方式。", "x-enumDescriptions": { "interactive": "同步交互:输出即回复", "proactive": "主动推送:CLI 回复 + 思考投影" } },
|
|
51
|
+
"allowOverride": { "type": "boolean", "default": false, "description": "是否允许该角色在关系级覆盖私聊响应方式;缺省为 false。" },
|
|
52
|
+
"allowedValues": { "type": "array", "items": { "type": "string", "enum": ["interactive", "proactive"], "description": "一个可用于私聊响应方式覆盖的值。", "x-enumDescriptions": { "interactive": "同步交互:输出即回复", "proactive": "主动推送:CLI 回复 + 思考投影" } }, "uniqueItems": true, "description": "允许关系级覆盖到的私聊响应方式白名单;若提供,必须包含 default。" },
|
|
53
|
+
"reason": { "type": "string", "description": "采用该私聊响应策略的可审计原因或管理备注。" }
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"chatmode.group": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"required": ["default", "allowOverride"],
|
|
59
|
+
"additionalProperties": false,
|
|
60
|
+
"description": "该角色在群聊场景中的响应方式策略。",
|
|
61
|
+
"properties": {
|
|
62
|
+
"default": { "type": "string", "enum": ["interactive", "proactive"], "description": "未设置有效关系级覆盖时使用的群聊响应方式。", "x-enumDescriptions": { "interactive": "同步交互:输出即回复", "proactive": "主动推送:CLI 回复 + 思考投影" } },
|
|
63
|
+
"allowOverride": { "type": "boolean", "default": false, "description": "是否允许该角色在关系级覆盖群聊响应方式;缺省为 false。" },
|
|
64
|
+
"allowedValues": { "type": "array", "items": { "type": "string", "enum": ["interactive", "proactive"], "description": "一个可用于群聊响应方式覆盖的值。", "x-enumDescriptions": { "interactive": "同步交互:输出即回复", "proactive": "主动推送:CLI 回复 + 思考投影" } }, "uniqueItems": true, "description": "允许关系级覆盖到的群聊响应方式白名单;若提供,必须包含 default。" },
|
|
65
|
+
"reason": { "type": "string", "description": "采用该群聊响应策略的可审计原因或管理备注。" }
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"mentionMode": {
|
|
69
|
+
"type": "object",
|
|
70
|
+
"required": ["default", "allowOverride"],
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"description": "该角色在群聊场景中的提及响应策略。",
|
|
73
|
+
"properties": {
|
|
74
|
+
"default": { "type": "string", "enum": ["disabled", "mention-only"], "description": "未设置有效关系级覆盖时使用的群聊提及响应策略。", "x-enumDescriptions": { "disabled": "不要求被提及即可响应", "mention-only": "仅在被明确提及时响应" } },
|
|
75
|
+
"allowOverride": { "type": "boolean", "default": false, "description": "是否允许该角色在关系级覆盖群聊提及响应策略;缺省为 false。" },
|
|
76
|
+
"allowedValues": { "type": "array", "items": { "type": "string", "enum": ["disabled", "mention-only"], "description": "一个可用于群聊提及响应策略覆盖的值。", "x-enumDescriptions": { "disabled": "不要求被提及即可响应", "mention-only": "仅在被明确提及时响应" } }, "uniqueItems": true, "description": "允许关系级覆盖到的群聊提及响应策略白名单;若提供,必须包含 default。" },
|
|
77
|
+
"reason": { "type": "string", "description": "采用该群聊提及响应策略的可审计原因或管理备注。" }
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"baseagents.claude.effort": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"required": ["default", "allowOverride"],
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"description": "该角色使用 Claude runner 时的推理强度策略。",
|
|
85
|
+
"properties": {
|
|
86
|
+
"default": { "type": "string", "enum": ["auto", "low", "medium", "high", "xhigh", "max"], "description": "角色默认的 Claude 推理强度。", "x-enumDescriptions": { "auto": "由 Claude runner 自动选择", "low": "低", "medium": "中", "high": "高", "xhigh": "很高", "max": "最高" } },
|
|
87
|
+
"allowOverride": { "type": "boolean", "default": false, "description": "是否允许该角色在关系级覆盖 Claude 推理强度;缺省为 false。" },
|
|
88
|
+
"allowedValues": { "type": "array", "items": { "type": "string", "enum": ["auto", "low", "medium", "high", "xhigh", "max"], "description": "一个允许覆盖到的 Claude 推理强度。", "x-enumDescriptions": { "auto": "由 Claude runner 自动选择", "low": "低", "medium": "中", "high": "高", "xhigh": "很高", "max": "最高" } }, "uniqueItems": true, "description": "允许关系级覆盖到的 Claude 推理强度白名单;若提供,必须包含 default。" },
|
|
89
|
+
"reason": { "type": "string", "description": "采用该 Claude 推理强度策略的可审计原因或管理备注。" }
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"baseagents.codex.reasoning": {
|
|
93
|
+
"type": "object",
|
|
94
|
+
"required": ["default", "allowOverride"],
|
|
95
|
+
"additionalProperties": false,
|
|
96
|
+
"description": "该角色使用 Codex runner 时的推理强度策略。",
|
|
97
|
+
"properties": {
|
|
98
|
+
"default": { "type": "string", "enum": ["auto", "low", "medium", "high", "xhigh"], "description": "角色默认的 Codex 推理强度。", "x-enumDescriptions": { "auto": "由 Codex runner 自动选择", "low": "低", "medium": "中", "high": "高", "xhigh": "很高" } },
|
|
99
|
+
"allowOverride": { "type": "boolean", "default": false, "description": "是否允许该角色在关系级覆盖 Codex 推理强度;缺省为 false。" },
|
|
100
|
+
"allowedValues": { "type": "array", "items": { "type": "string", "enum": ["auto", "low", "medium", "high", "xhigh"], "description": "一个允许覆盖到的 Codex 推理强度。", "x-enumDescriptions": { "auto": "由 Codex runner 自动选择", "low": "低", "medium": "中", "high": "高", "xhigh": "很高" } }, "uniqueItems": true, "description": "允许关系级覆盖到的 Codex 推理强度白名单;若提供,必须包含 default。" },
|
|
101
|
+
"reason": { "type": "string", "description": "采用该 Codex 推理强度策略的可审计原因或管理备注。" }
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"patternProperties": {
|
|
106
|
+
"^baseagents\\.[a-z0-9_-]+\\.model$": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"required": ["default", "allowOverride", "allowedModels"],
|
|
109
|
+
"additionalProperties": false,
|
|
110
|
+
"description": "指定 base agent 的角色模型策略;默认模型必须匹配 allowedModels。",
|
|
111
|
+
"properties": {
|
|
112
|
+
"default": { "type": "string", "minLength": 1, "description": "该角色默认使用的模型标识;必须被 allowedModels 中的精确值或通配符允许。" },
|
|
113
|
+
"allowOverride": { "type": "boolean", "default": false, "description": "是否允许该角色在关系级覆盖模型;缺省为 false。" },
|
|
114
|
+
"allowedModels": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1, "description": "一个允许使用的模型标识或以 * 表达的通配符模式。" }, "uniqueItems": true, "description": "该角色可用的模型白名单;支持通配符,且至少包含一个条目。" },
|
|
115
|
+
"reason": { "type": "string", "description": "采用该角色模型策略的可审计原因或管理备注。" }
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"additionalProperties": false
|
|
120
|
+
},
|
|
121
|
+
"commandPermissions": {
|
|
122
|
+
"type": "object",
|
|
123
|
+
"x-optionsSource": "operation-catalog",
|
|
124
|
+
"description": "按 operation 标识定义角色的命令执行权限;候选 operation 来自运行时 operation catalog。",
|
|
125
|
+
"propertyNames": { "type": "string", "minLength": 1, "description": "非空 operation 标识,支持精确名称及系统识别的通配规则。" },
|
|
126
|
+
"additionalProperties": {
|
|
127
|
+
"type": "object",
|
|
128
|
+
"required": ["allow"],
|
|
129
|
+
"additionalProperties": false,
|
|
130
|
+
"description": "一个 operation 的角色授权规则。",
|
|
131
|
+
"properties": {
|
|
132
|
+
"allow": { "type": "boolean", "description": "是否允许该角色执行匹配的 operation。" },
|
|
133
|
+
"dangerous": { "type": "boolean", "default": false, "description": "是否将该授权规则标记为危险操作规则;危险操作还会应用额外安全约束。" },
|
|
134
|
+
"scopes": {
|
|
135
|
+
"type": "array",
|
|
136
|
+
"items": { "type": "string", "enum": ["relation", "role", "agent", "process", "filesystem", "control", "raw-cli"], "description": "该命令权限适用的一个配置或执行作用域。", "x-enumDescriptions": { "relation": "当前 Agent 与对端的关系配置域", "role": "独立角色注册表或角色策略配置域", "agent": "单个 Agent 的配置与生命周期域", "process": "EvolCore 进程级配置与运行域", "filesystem": "受控文件系统操作域", "control": "控制面命令和管理通道域", "raw-cli": "未经结构化 operation 封装的原始 CLI 执行域" } },
|
|
137
|
+
"uniqueItems": true,
|
|
138
|
+
"description": "该授权规则允许生效的作用域白名单;未配置时由 operation 自身和鉴权器决定。"
|
|
139
|
+
},
|
|
140
|
+
"constraints": {
|
|
141
|
+
"type": "object",
|
|
142
|
+
"additionalProperties": false,
|
|
143
|
+
"description": "operation 级附加约束,例如对端、Agent、群聊、控制通道、参数或工作目录限制。",
|
|
144
|
+
"properties": {
|
|
145
|
+
"ownPeerOnly": { "type": "boolean" },
|
|
146
|
+
"ownAgentOnly": { "type": "boolean" },
|
|
147
|
+
"targetCurrentAgentOnly": { "type": "boolean" },
|
|
148
|
+
"requireAgentAdmin": { "type": "boolean" },
|
|
149
|
+
"requireAgentOwner": { "type": "boolean" },
|
|
150
|
+
"privateOnly": { "type": "boolean" },
|
|
151
|
+
"groupOnly": { "type": "boolean" },
|
|
152
|
+
"requireDaemonOwner": { "type": "boolean" },
|
|
153
|
+
"requireControlChannel": { "type": "boolean" },
|
|
154
|
+
"requireExplicitDangerousGrant": { "type": "boolean" },
|
|
155
|
+
"currentRelationOnly": { "type": "boolean" },
|
|
156
|
+
"requireFieldOverride": { "type": "string", "minLength": 1 },
|
|
157
|
+
"configFieldPolicy": { "type": "string", "enum": ["behavior-read", "role-overridable-write"] },
|
|
158
|
+
"allowedArgs": { "$ref": "#/definitions/argumentConstraints" },
|
|
159
|
+
"deniedArgs": { "$ref": "#/definitions/argumentConstraints" },
|
|
160
|
+
"forbiddenFlags": { "$ref": "#/definitions/stringList" },
|
|
161
|
+
"allowedConfigKeys": { "$ref": "#/definitions/stringList" },
|
|
162
|
+
"allowedPrefixes": { "$ref": "#/definitions/stringList" },
|
|
163
|
+
"timeoutMs": { "type": "integer", "minimum": 0 },
|
|
164
|
+
"outputLimitBytes": { "type": "integer", "minimum": 0 },
|
|
165
|
+
"cwdPolicy": { "type": "string", "enum": ["agentProject", "evolcoreHome", "none"] },
|
|
166
|
+
"envAllowlist": { "$ref": "#/definitions/stringList" }
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"reason": { "type": "string", "description": "采用该命令权限规则的可审计原因或管理备注。" }
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"usageLimits": {
|
|
174
|
+
"type": "object",
|
|
175
|
+
"additionalProperties": false,
|
|
176
|
+
"description": "角色用量额度策略;enabled 未开启或未配置时不启用额度限制。",
|
|
177
|
+
"properties": {
|
|
178
|
+
"enabled": { "type": "boolean", "default": false, "description": "是否启用该角色的用量额度限制;缺省为 false。" },
|
|
179
|
+
"resetMode": { "type": "string", "enum": ["never", "daily", "weekly", "monthly"], "description": "用量额度的重置周期。", "x-enumDescriptions": { "never": "累计额度,从不自动重置", "daily": "每日重置", "weekly": "每周重置", "monthly": "每月重置" } },
|
|
180
|
+
"currency": { "type": "string", "enum": ["CNY", "USD"], "description": "额度金额使用的计价货币。", "x-enumDescriptions": { "CNY": "人民币", "USD": "美元" } },
|
|
181
|
+
"limitAmount": { "type": ["number", "null"], "minimum": 0, "description": "额度上限金额;非负数表示上限,null 表示不限。" },
|
|
182
|
+
"costBasis": { "type": "string", "enum": ["gateway", "official"], "description": "额度统计采用的模型计费口径。", "x-enumDescriptions": { "gateway": "按实际网关计费价统计", "official": "按模型提供商官方定价统计" } },
|
|
183
|
+
"scope": { "type": "string", "enum": ["subject", "role"], "description": "额度累计和重置的统计范围。", "x-enumDescriptions": { "subject": "按对端主体分别统计", "role": "同一角色的所有主体共享统计" } }
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"definitions": {
|
|
188
|
+
"stringList": {
|
|
189
|
+
"type": "array",
|
|
190
|
+
"items": { "type": "string" }
|
|
191
|
+
},
|
|
192
|
+
"argumentConstraints": {
|
|
193
|
+
"type": "object",
|
|
194
|
+
"additionalProperties": {
|
|
195
|
+
"type": "array",
|
|
196
|
+
"items": { "type": ["string", "number", "boolean"] }
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "role-registry.schema.1.json",
|
|
4
|
+
"title": "RoleRegistry (agents/{aid}/roles/index.json)",
|
|
5
|
+
"description": "Agent 的角色注册表。声明可加载的角色 ID,并配置未显式分配角色时私聊和群聊使用的默认角色。",
|
|
6
|
+
"x-logical-name": "role-registry",
|
|
7
|
+
"x-scope": "role",
|
|
8
|
+
"type": "object",
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"required": ["$schema_version", "roles", "defaultRoles"],
|
|
11
|
+
"properties": {
|
|
12
|
+
"$schema_version": { "type": "number", "const": 1, "default": 1, "x-merge": "scalar", "description": "角色注册表 Schema 版本,固定为 1。" },
|
|
13
|
+
"roles": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"minItems": 1,
|
|
16
|
+
"uniqueItems": true,
|
|
17
|
+
"contains": { "const": "visitor", "description": "注册表必须包含 visitor,以保证始终存在低权限安全回退角色。" },
|
|
18
|
+
"items": { "type": "string", "pattern": "^[a-z0-9_-]+$", "description": "一个已注册角色 ID;对应 roles/{roleId}.json 或同名内置模板。" },
|
|
19
|
+
"x-merge": "list",
|
|
20
|
+
"description": "允许加载、展示和分配的角色 ID 列表;未注册的角色文件不产生运行时权限。"
|
|
21
|
+
},
|
|
22
|
+
"defaultRoles": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": ["private", "group"],
|
|
26
|
+
"default": { "private": null, "group": null },
|
|
27
|
+
"description": "未显式分配角色时,私聊和群聊分别采用的默认角色;null 表示不自动授予角色。",
|
|
28
|
+
"properties": {
|
|
29
|
+
"private": { "type": ["string", "null"], "pattern": "^[a-z0-9_-]+$", "default": null, "description": "私聊对端的默认角色;非 null 时必须已注册、有效且不能为 owner/admin。" },
|
|
30
|
+
"group": { "type": ["string", "null"], "pattern": "^[a-z0-9_-]+$", "default": null, "description": "群聊对端的默认角色;非 null 时必须已注册、有效且不能为 owner/admin。" }
|
|
31
|
+
},
|
|
32
|
+
"x-merge": "dict"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "single-session.schema.1.json",
|
|
4
|
+
"title": "SingleSessionParams (responseModeParams['single-session'])",
|
|
5
|
+
"x-logical-name": "single-session",
|
|
6
|
+
"x-scope": "mode",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"pre_tool_1stmsgchk": {
|
|
11
|
+
"type": "boolean",
|
|
12
|
+
"enum": [true, false],
|
|
13
|
+
"default": true,
|
|
14
|
+
"description": "proactive 首工具表态检查(仅 chatmode=proactive 生效):首个工具调用前必须先向对端表态,否则拦截。",
|
|
15
|
+
"x-enumDescriptions": {
|
|
16
|
+
"true": "启用:首工具前必须先发送消息或文件",
|
|
17
|
+
"false": "禁用:允许直接调用工具"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"tool_use_reminder": {
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"enum": [true, false],
|
|
23
|
+
"default": true,
|
|
24
|
+
"description": "proactive 工具汇报提醒(仅 chatmode=proactive 生效):启用队列未读提醒 + 每 10 次工具调用的汇报提醒。",
|
|
25
|
+
"x-enumDescriptions": {
|
|
26
|
+
"true": "启用:自动汇报工具使用情况",
|
|
27
|
+
"false": "禁用:静默执行工具"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
你好,我是 {{agentName}}。
|
|
2
|
+
|
|
3
|
+
我刚刚完成连接,需要先和你确认我的基础信息,然后再进入正常工作状态。
|
|
4
|
+
|
|
5
|
+
请帮我确认三项内容:
|
|
6
|
+
1. 显示名:你希望我叫什么?
|
|
7
|
+
2. 简介:我主要负责什么?一句到两句话即可。
|
|
8
|
+
3. 标签:给我 3 到 6 个标签,例如 `代码审查`、`客服助手`、`项目管理`。
|
|
9
|
+
|
|
10
|
+
当前信息:
|
|
11
|
+
- AID: {{agentAid}}
|
|
12
|
+
- 渠道: {{channel}}
|
|
13
|
+
- Baseagent: {{baseagent}}
|
|
14
|
+
|
|
15
|
+
你可以直接按上面的三项回复。
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
说明:
|
|
2
|
+
- 跨会话请求回复,仅本端可见。
|
|
3
|
+
- 请结合下方内容理解当前对端回复。
|
|
4
|
+
- 当前回流策略:{{handoffReturnPolicy}}
|
|
5
|
+
- 若策略为 required 且当前回复足以处理请求,使用:`ec handoff return {{handoffId}} "<完整回流内容>"`
|
|
6
|
+
- 若策略为 none 且当前回复已处理请求,使用:`ec handoff return {{handoffId}}`
|
|
7
|
+
- 若回复不足,不要执行 return。
|
|
8
|
+
|
|
9
|
+
此前发给当前对端的内容:
|
|
10
|
+
{{handoffPreviousContent}}
|
|
11
|
+
|
|
12
|
+
当前对端回复内容:
|
|
13
|
+
{{content}}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
‹{{now}} · from:{{peerId}}{{?peerName}}({{peerName}}){{/}}{{?peerRole}} · role:{{peerRole}}{{/}}{{?chatType=group}} → 群:{{groupLabel}} · self:{{selfAid}}{{/}}{{?chatType=private}} → self:{{selfAid}}{{/}}{{?encrypted=true}} · 🔒密文{{/}}{{?encrypted=false}} · ✉️明文{{/}}{{?sameDevice}} · 📍同设备{{/}}{{?sameNetwork}} · 🌐同网络{{/}}{{?sameEgressIp}} · 🔀同出口IP{{/}}{{?mentionAids}} · @:{{mentionAids}}{{/}}›
|
|
2
|
+
{{content}}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema_version": 1,
|
|
3
|
+
"description": "Trusted user with own-scope access",
|
|
4
|
+
"allowAccess": true,
|
|
5
|
+
"usageLimits": {
|
|
6
|
+
"enabled": true,
|
|
7
|
+
"resetMode": "daily",
|
|
8
|
+
"currency": "CNY",
|
|
9
|
+
"limitAmount": 50,
|
|
10
|
+
"costBasis": "gateway",
|
|
11
|
+
"scope": "subject"
|
|
12
|
+
},
|
|
13
|
+
"permissions": {
|
|
14
|
+
"permissionMode": { "default": "auto", "allowOverride": false }
|
|
15
|
+
},
|
|
16
|
+
"commandPermissions": {
|
|
17
|
+
"role.assign": { "allow": false },
|
|
18
|
+
"role.revoke": { "allow": false },
|
|
19
|
+
"category:read": { "allow": true },
|
|
20
|
+
"category:write-own": { "allow": true },
|
|
21
|
+
"config.get": { "allow": true, "scopes": ["relation"], "constraints": { "currentRelationOnly": true, "targetCurrentAgentOnly": true, "configFieldPolicy": "behavior-read" } },
|
|
22
|
+
"config.set": { "allow": true, "scopes": ["relation"], "constraints": { "currentRelationOnly": true, "targetCurrentAgentOnly": true, "configFieldPolicy": "role-overridable-write" } },
|
|
23
|
+
"config.unset": { "allow": true, "scopes": ["relation"], "constraints": { "currentRelationOnly": true, "targetCurrentAgentOnly": true, "configFieldPolicy": "role-overridable-write" } },
|
|
24
|
+
"model.*": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true, "targetCurrentAgentOnly": true } },
|
|
25
|
+
"permission.current": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true, "targetCurrentAgentOnly": true } },
|
|
26
|
+
"permission.answer": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true, "targetCurrentAgentOnly": true } },
|
|
27
|
+
"chatmode.current": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true, "targetCurrentAgentOnly": true } },
|
|
28
|
+
"chatmode.update": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true, "targetCurrentAgentOnly": true } },
|
|
29
|
+
"mentionmode.current": { "allow": true, "scopes": ["relation"], "constraints": { "groupOnly": true } },
|
|
30
|
+
"mentionmode.update": { "allow": false },
|
|
31
|
+
"trigger.*": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true, "targetCurrentAgentOnly": true } },
|
|
32
|
+
"ec.msg.send": { "allow": true, "constraints": { "ownPeerOnly": true } },
|
|
33
|
+
"ec.msg.file": { "allow": true, "constraints": { "ownPeerOnly": true } },
|
|
34
|
+
"ec.group.send": { "allow": true, "constraints": { "groupOnly": true, "currentRelationOnly": true } },
|
|
35
|
+
"ec.group.file": { "allow": true, "constraints": { "groupOnly": true, "currentRelationOnly": true } },
|
|
36
|
+
"ec.ctl.*": { "allow": false },
|
|
37
|
+
"cli.exec.raw": { "allow": false, "dangerous": true },
|
|
38
|
+
"dangerous:*": { "allow": false, "dangerous": true }
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema_version": 1,
|
|
3
|
+
"description": "Low-trust visitor with minimal own-scope access",
|
|
4
|
+
"allowAccess": true,
|
|
5
|
+
"usageLimits": {
|
|
6
|
+
"enabled": true,
|
|
7
|
+
"resetMode": "daily",
|
|
8
|
+
"currency": "CNY",
|
|
9
|
+
"limitAmount": 5,
|
|
10
|
+
"costBasis": "gateway",
|
|
11
|
+
"scope": "subject"
|
|
12
|
+
},
|
|
13
|
+
"permissions": {
|
|
14
|
+
"permissionMode": { "default": "readonly", "allowOverride": false }
|
|
15
|
+
},
|
|
16
|
+
"commandPermissions": {
|
|
17
|
+
"role.assign": { "allow": false },
|
|
18
|
+
"role.revoke": { "allow": false },
|
|
19
|
+
"config.get": { "allow": true, "scopes": ["relation"], "constraints": { "currentRelationOnly": true, "targetCurrentAgentOnly": true, "configFieldPolicy": "behavior-read" } },
|
|
20
|
+
"model.list": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true, "targetCurrentAgentOnly": true } },
|
|
21
|
+
"model.current": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true, "targetCurrentAgentOnly": true } },
|
|
22
|
+
"model.use": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true, "targetCurrentAgentOnly": true } },
|
|
23
|
+
"permission.current": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true, "targetCurrentAgentOnly": true } },
|
|
24
|
+
"permission.answer": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true, "targetCurrentAgentOnly": true } },
|
|
25
|
+
"chatmode.current": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true, "targetCurrentAgentOnly": true } },
|
|
26
|
+
"chatmode.update": { "allow": false },
|
|
27
|
+
"mentionmode.current": { "allow": true, "scopes": ["relation"], "constraints": { "groupOnly": true } },
|
|
28
|
+
"mentionmode.update": { "allow": false },
|
|
29
|
+
"trigger.*": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true, "targetCurrentAgentOnly": true } },
|
|
30
|
+
"session.list": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true } },
|
|
31
|
+
"ec.msg.send": { "allow": true, "scopes": ["relation"], "constraints": { "ownPeerOnly": true, "privateOnly": true } },
|
|
32
|
+
"ec.msg.file": { "allow": false },
|
|
33
|
+
"ec.group.send": { "allow": true, "scopes": ["relation"], "constraints": { "groupOnly": true, "currentRelationOnly": true } },
|
|
34
|
+
"ec.group.file": { "allow": false },
|
|
35
|
+
"ec.ctl.*": { "allow": false },
|
|
36
|
+
"cli.exec.raw": { "allow": false, "dangerous": true },
|
|
37
|
+
"dangerous:*": { "allow": false, "dangerous": true }
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
[baseagent]
|
|
2
|
+
baseAgentName: {{baseAgentName}} # 底层推理引擎(Claude Code / Codex / Gemini CLI)
|
|
3
|
+
{{?effectiveModel}}
|
|
4
|
+
effectiveModel: {{effectiveModel}} # 当前实际生效的模型(关系级 > agent级 > 全局 优先级解析)
|
|
5
|
+
{{/}}
|
|
6
|
+
{{?baseAgentModel}}
|
|
7
|
+
baseAgentModel: {{baseAgentModel}} # base agent 引擎底座模型(evolcore 作用域无配置时的兜底)
|
|
8
|
+
{{/}}
|
|
9
|
+
{{?modelFallbackActive}}
|
|
10
|
+
modelFallbackActive: true # evolcore 配置的模型不可用,当前正在使用降级模型 {{modelFallbackModel}}
|
|
11
|
+
{{/}}
|
|
12
|
+
{{?agentSessionId}}
|
|
13
|
+
agentSessionId: {{agentSessionId}} # 底层引擎的会话 ID(区别于 evolcore sessionId)
|
|
14
|
+
{{/}}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
[bootstrap]
|
|
2
|
+
phase: bootstrapping
|
|
3
|
+
|
|
4
|
+
你正在进行首次自我设定。当前目标不是处理普通任务,而是和 owner 确认并写入你的基础名片信息。
|
|
5
|
+
|
|
6
|
+
需要确认的字段:
|
|
7
|
+
- name:显示名,简短清晰
|
|
8
|
+
- description:一句到两句话描述你的职责或定位
|
|
9
|
+
- tags:3 到 6 个标签,用于检索和归类
|
|
10
|
+
|
|
11
|
+
流程:
|
|
12
|
+
1. 如果 owner 尚未明确这些信息,继续提问并收敛选项。
|
|
13
|
+
2. 信息齐全后,编辑本地 agent.md(`$EVOLCORE_HOME/AIDs/{{selfAid}}/agent.md`)中的 YAML frontmatter:更新 `name`、`description`、`tags`。
|
|
14
|
+
3. 调用 `ec aid agentmd put {{selfAid}}` 签名并发布 agent.md。
|
|
15
|
+
4. 发布成功后,调用 `ec agent ready {{selfAid}}` 完成 bootstrap。
|
|
16
|
+
5. 完成前不要承诺已经进入正常工作状态。
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
[channel]
|
|
2
|
+
channel: {{channel}} # 渠道类型:aun|feishu|wechat|dingtalk|qqbot|wecom
|
|
3
|
+
{{?capabilities}}
|
|
4
|
+
capabilities: {{capabilities}} # 当前渠道支持的能力
|
|
5
|
+
{{/}}
|
|
6
|
+
{{?supportsFileMarker}}
|
|
7
|
+
发送文件语法:
|
|
8
|
+
[SEND_FILE:文件路径]
|
|
9
|
+
相对路径从项目根目录解析,图片自动内联预览。
|
|
10
|
+
{{/}}
|
|
11
|
+
# ── 怎么回复(唯一事实源,跟 chatMode 走)──
|
|
12
|
+
chatMode: {{chatMode}} # interactive=同步对话 / proactive=主动推送
|
|
13
|
+
{{?chatMode=interactive}}
|
|
14
|
+
# interactive:你直接输出的文本就是回复,无需调用发送命令。
|
|
15
|
+
# 下面的命令仅用于附加能力(发文件/@某人/加密/联系第三方),不是回复手段。
|
|
16
|
+
{{/}}
|
|
17
|
+
{{?chatMode=proactive}}
|
|
18
|
+
# proactive:你的普通文本被投影成「思考过程」(message.thought.put):
|
|
19
|
+
# - 前端可见,但不入历史、不触发对端 message.received 事件
|
|
20
|
+
# - 对端大模型不会被唤醒,因此不是回复
|
|
21
|
+
# 要正式回复,必须调用发送命令(message.send 协议)触发对端接收。
|
|
22
|
+
# 设计意图:避免 agent↔agent 无限循环;某一方不再发送 → 对话自然终止。
|
|
23
|
+
# 拿不到 self-aid 时可用 ec ctl send "<text>"(自动继承当前 AID 和对端)。
|
|
24
|
+
{{/}}
|
|
25
|
+
{{?groupId}}
|
|
26
|
+
{{?channel=aun}}
|
|
27
|
+
ec group send {{selfAid}} {{groupId}} "<text>" [--encrypt|--no-encrypt] [--file <path> --as image|video|voice|file] [--payload '<json>'] [--mention <aid>] [--mention-all]
|
|
28
|
+
group-send 是群内公开回复;interactive 下直接输出即为公开回复,仅 @某人/发文件/手动控制加密时才需此命令
|
|
29
|
+
# 加密:消息信封头标注每条入站消息是 🔒密文 还是 ✉明文。你用 group send 时【必须】跟随本轮入站消息的加密态——
|
|
30
|
+
# 回复某条密文消息务必带 --encrypt,回复明文消息带 --no-encrypt;不带任何加密参数则默认明文发送。
|
|
31
|
+
# interactive 下你直接输出的回复由 evolcore 自动按入站加密态发送(批次含密文则整轮密文),无需你操心。
|
|
32
|
+
{{/}}
|
|
33
|
+
{{?channel!=aun}}
|
|
34
|
+
非 aun 渠道:回复由 evolcore 自动完成,无需调用 CLI
|
|
35
|
+
{{/}}
|
|
36
|
+
{{/}}
|
|
37
|
+
{{?peerId}}
|
|
38
|
+
{{?channel=aun}}
|
|
39
|
+
ec msg send {{selfAid}} {{peerId}} "<text>" [--text-from-file <path>] [--encrypt|--no-encrypt] [--file <path> --as image|video|voice|file] [--link <url> --title "<title>"] [--payload '<json>']
|
|
40
|
+
msg-send 用于私聊对端的附加能力(文件/链接/手动控制加密);群聊中仅在确需私下联系本条消息发送者时才用,否则用上面的 group send
|
|
41
|
+
# 加密:消息信封头标注每条入站消息是 🔒密文 还是 ✉明文。你用 msg send 时【必须】跟随你所回复的那条入站消息的加密态——
|
|
42
|
+
# 回复密文消息务必带 --encrypt,回复明文消息带 --no-encrypt;不带任何加密参数则默认明文发送(密文会话漏发明文是严重事故)。
|
|
43
|
+
# interactive 下你直接输出的回复由 evolcore 自动按入站加密态发送,无需你操心;仅当你显式调用 msg send 时才需自己带加密参数。
|
|
44
|
+
{{/}}
|
|
45
|
+
{{?channel!=aun}}
|
|
46
|
+
非 aun 渠道:回复由 evolcore 自动完成,无需调用 CLI
|
|
47
|
+
{{/}}
|
|
48
|
+
{{/}}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
[commands] 当前场景可用命令集(前缀 ec,以自己 AID 为发送者;完整用法 Read 对应文档)
|
|
2
|
+
遇到明确触发词(费用/用量/统计/创建agent/建群/查群等)优先查 INDEX.md 或直接试对应 ec 命令
|
|
3
|
+
|
|
4
|
+
ec ctl 当前会话工具(主动发消息/文件、重命名、队列、项目路径、会话状态) $KITS_DOCS/evolcore/ctl.md
|
|
5
|
+
ec model 模型与推理强度管理(切模型/列模型/当前模型/模型详情/改强度/诊断网关) $KITS_DOCS/evolcore/model.md
|
|
6
|
+
ec response 响应模式管理(切换响应模式/列响应模式/看当前模式/改响应配置) $KITS_DOCS/evolcore/response.md
|
|
7
|
+
ec stats Token 用量与费用统计(用量/费用/统计/预算/token/cost) $KITS_DOCS/evolcore/stats.md
|
|
8
|
+
ec config 读配置/查字段/看生效值(get/show/list/effective/fields/history/diff/current/boots/validate);set/unset 权限由 API 层控制 $KITS_DOCS/evolcore/config.md
|
|
9
|
+
ec trigger 定时与事件触发器管理(定时任务/cron/提醒/自动执行/巡检/禁用/删除)。需要写操作的无人值守任务用 --permission bypass;单个 trigger 可用 --model/--effort 覆盖执行模型/强度 $KITS_DOCS/evolcore/trigger.md
|
|
10
|
+
ec aid 身份/证书/名片/探测对端 $KITS_DOCS/evolcore/aid.md
|
|
11
|
+
ec fs AUN 文件系统统一入口(ls/stat/cat/cp/mv/rm/mkdir/ln/chmod/setfacl/getfacl/token/find/df/mount/approve/reject/umount;个人/群空间同一入口;没有 ec group fs) $KITS_DOCS/evolcore/fs.md
|
|
12
|
+
ec storage 文件上传/下载/配额(底层调试入口,日常优先 ec fs) $KITS_DOCS/evolcore/storage.md
|
|
13
|
+
ec rpc 底层 AUN RPC 逃生通道 $KITS_DOCS/evolcore/rpc.md
|
|
14
|
+
{{?peerId}}
|
|
15
|
+
ec msg 私聊收发消息(回复/拉取/撤回) $KITS_DOCS/evolcore/msg.md
|
|
16
|
+
{{/}}
|
|
17
|
+
{{?selfAid}}
|
|
18
|
+
ec group 群聊收发与群管理(群发/建群/查群/邀请/踢人/角色/封禁/规则;高级 group.* 用 ec rpc) $KITS_DOCS/evolcore/group.md
|
|
19
|
+
{{/}}
|
|
20
|
+
{{?peerRole=owner}}
|
|
21
|
+
ec agent EvolAgent 生命周期(创建/启停/热重载/改配置)。ec agent reload 仅对配置/persona/memory 生效,改源码无效 $KITS_DOCS/evolcore/agent.md
|
|
22
|
+
{{/}}
|
|
23
|
+
{{?peerRole=admin}}
|
|
24
|
+
ec agent EvolAgent 生命周期(创建/启停/热重载/改配置)。ec agent reload 仅对配置/persona/memory 生效,改源码无效 $KITS_DOCS/evolcore/agent.md
|
|
25
|
+
{{/}}
|
|
26
|
+
完整命令集目录(含触发词与适用场景):$KITS_DOCS/evolcore/INDEX.md
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[relation]
|
|
2
|
+
{{?peerKey}}
|
|
3
|
+
peerName: {{peerName}}
|
|
4
|
+
peerId: {{peerId}} # 对端在当前渠道内的原生 ID
|
|
5
|
+
peerRole: {{peerRole}} # owner|admin|member|visitor|自定义角色|none
|
|
6
|
+
{{?peerType}}
|
|
7
|
+
peerType: {{peerType}} # human 或 agent
|
|
8
|
+
{{/}}
|
|
9
|
+
peerKey: {{peerKey}} # 跨渠道唯一标识,格式 channel#urlEncode(peerId)
|
|
10
|
+
{{/}}
|
|
11
|
+
{{?groupId}}
|
|
12
|
+
groupId: {{groupId}}
|
|
13
|
+
{{?groupRulesStatus}}
|
|
14
|
+
groupRulesStatus: {{groupRulesStatus}} # synced/cached/missing/forbidden/invalid_metadata/file_mismatch/too_large/unreadable/error
|
|
15
|
+
{{/}}
|
|
16
|
+
{{?groupRulesError}}
|
|
17
|
+
groupRulesError: {{groupRulesError}}
|
|
18
|
+
{{/}}
|
|
19
|
+
{{/}}
|