evolcore 0.0.50 → 0.0.51
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 +39 -2
- package/bin/ec-build.mjs +60 -0
- package/bin/ecmsg.js +65 -63
- package/dist/ability/caller/command.js +24 -15
- package/dist/ability/caller/contract.js +24 -9
- package/dist/ability/caller/credential-files.js +132 -0
- package/dist/ability/caller/daemon.js +32 -7
- package/dist/ability/caller/schema-view.js +157 -0
- package/dist/ability/caller/service.js +202 -63
- package/dist/ability/interop-v1.js +156 -113
- package/dist/agent-template/jobs.js +14 -110
- package/dist/agent-template/runtime.js +331 -193
- package/dist/agent-template/service.js +1029 -1104
- package/dist/agent-template/share.js +103 -0
- package/dist/agent-template/tool-runner.js +25 -0
- package/dist/agent-template/types.js +10 -3
- package/dist/agents/claude/availability.js +94 -0
- package/dist/agents/claude/capability-provider.js +154 -0
- package/dist/agents/claude/index.js +145 -0
- package/dist/agents/{claude-runner.js → claude/runner.js} +74 -158
- package/dist/agents/claude/session-file-adapter.js +246 -0
- package/dist/agents/codex/app-server-client.js +90 -10
- package/dist/agents/codex/availability.js +164 -0
- package/dist/agents/codex/capability-provider.js +138 -0
- package/dist/agents/codex/cli.js +38 -0
- package/dist/agents/codex/index.js +345 -0
- package/dist/agents/codex/mcp-elicitation.js +135 -0
- package/dist/agents/{codex-runner.js → codex/runner.js} +648 -382
- package/dist/agents/codex/session-file-adapter.js +834 -0
- package/dist/agents/dsh/availability.js +28 -0
- package/dist/agents/dsh/capability-provider.js +56 -0
- package/dist/agents/dsh/desktop-locations.ps1 +66 -0
- package/dist/agents/dsh/desktop-probe.cjs +37 -0
- package/dist/agents/dsh/index.js +98 -0
- package/dist/agents/dsh/installation.js +400 -0
- package/dist/agents/dsh/resources.js +755 -0
- package/dist/agents/dsh/runner.js +1183 -0
- package/dist/agents/dsh/runtime/README.md +243 -0
- package/dist/agents/dsh/runtime/authorization.js +23 -0
- package/dist/agents/dsh/runtime/bridge.js +837 -0
- package/dist/agents/dsh/runtime/config.js +271 -0
- package/dist/agents/dsh/runtime/entry.js +229 -0
- package/dist/agents/dsh/runtime/session-inspector.js +340 -0
- package/dist/agents/dsh/runtime/tool-policy.js +49 -0
- package/dist/agents/dsh/session-file-adapter.js +145 -0
- package/dist/agents/ecagent/index.js +215 -0
- package/dist/agents/{ecagent-runner.js → ecagent/runner.js} +592 -106
- package/dist/agents/ecagent/session-file-adapter.js +134 -0
- package/dist/agents/gemini/index.js +55 -10
- package/dist/agents/gemini/{gemini-runner.js → runner.js} +4 -9
- package/dist/aun/ability-device-routing.js +11 -17
- package/dist/aun/aid/agentmd.js +27 -1
- package/dist/aun/aid/managed-operation.js +6 -4
- package/dist/aun/group/invite-service.js +1 -1
- package/dist/aun/menu/client.js +1 -1
- package/dist/aun/msg/history.js +1 -1
- package/dist/aun/msg/managed-operation.js +93 -21
- package/dist/aun/msg/p2p.js +6 -6
- package/dist/aun/service-proxy.js +1 -1
- package/dist/aun/storage/index.js +242 -0
- package/dist/build-identity.json +1 -1
- package/dist/channels/aun.js +180 -43
- package/dist/channels/daemon.js +3 -2
- package/dist/channels/dingtalk.js +1 -1
- package/dist/channels/feishu.js +9 -9
- package/dist/channels/qqbot.js +1 -1
- package/dist/channels/wechat.js +2 -2
- package/dist/channels/wecom.js +1 -1
- package/dist/{agents/claude-gateway → claude-gateway}/agent-registration.js +13 -13
- package/dist/{agents/claude-gateway → claude-gateway}/binding.js +3 -3
- package/dist/{agents/claude-gateway → claude-gateway}/inbox.js +1 -1
- package/dist/{agents/claude-gateway → claude-gateway}/index.js +2 -2
- package/dist/{agents/claude-gateway → claude-gateway}/listing.js +3 -3
- package/dist/{agents/claude-gateway → claude-gateway}/router.js +4 -4
- package/dist/{agents/claude-gateway → claude-gateway}/sessions.js +2 -2
- package/dist/{agents/claude-gateway → claude-gateway}/terminal.js +1 -1
- package/dist/{agents/claude-gateway → claude-gateway}/transcript.js +1 -1
- package/dist/cli/ability-command.js +8 -5
- package/dist/cli/ability-output.js +182 -0
- package/dist/cli/agent-command.js +1 -1
- package/dist/cli/agent-create.js +123 -42
- package/dist/cli/agent-template.js +400 -29
- package/dist/cli/agent.js +14 -11
- package/dist/cli/aun-commands.js +167 -111
- package/dist/cli/daemon-commands.js +38 -8
- package/dist/cli/data-command.js +1 -1
- package/dist/cli/debug-mode.js +9 -0
- package/dist/cli/directory.js +1 -2
- package/dist/cli/ecmsg-gateway.js +55 -19
- package/dist/cli/fs-command.js +67 -39
- package/dist/cli/index.js +25 -11
- package/dist/cli/init.js +124 -29
- package/dist/cli/managed-command-guard.js +2 -0
- package/dist/cli/model.js +1 -1
- package/dist/cli/restart-monitor.js +2 -2
- package/dist/cli/services-command.js +24 -1
- package/dist/cli/skill-command.js +4 -4
- package/dist/cli/task-context.js +24 -14
- package/dist/cli/team-workspace-command.js +50 -52
- package/dist/cli/thread-command.js +3 -2
- package/dist/cli/trigger-command.js +47 -12
- package/dist/cli/watch-logs.js +2 -1
- package/dist/config/boot-log.js +3 -0
- package/dist/config/builtin-role-templates.js +1 -1
- package/dist/config/config-field-policy.js +10 -6
- package/dist/config/config-manager.js +33 -12
- package/dist/config/gateway-config.js +21 -37
- package/dist/config/invoke-ipc-service.js +1 -1
- package/dist/config/owner-config.js +5 -3
- package/dist/config/peer-book-store.js +2 -3
- package/dist/config/peer-book.js +2 -2
- package/dist/config/peer-role-resolver.js +2 -2
- package/dist/config/provider-identity-migration.js +24 -105
- package/dist/config/provider-ipc-service.js +13 -3
- package/dist/config/provider-local-sync.js +4 -1
- package/dist/config/provider-menu-request.js +21 -3
- package/dist/config/provider-templates.js +1 -1
- package/dist/config/providers-config.js +39 -15
- package/dist/config/providers-import.js +3 -3
- package/dist/config/providers-management.js +74 -99
- package/dist/config/schema-migration.js +177 -11
- package/dist/config/schema-registry.js +1 -1
- package/dist/config-store.js +38 -50
- package/dist/core/{agent-application-service.js → agent/agent-application-service.js} +9 -9
- package/dist/core/{agent-create-status.js → agent/agent-create-status.js} +112 -4
- package/dist/core/{agent-creation-claim.js → agent/agent-creation-claim.js} +3 -3
- package/dist/core/{agent-ipc-registration.js → agent/agent-ipc-registration.js} +102 -25
- package/dist/core/{agent-reload-coordinator.js → agent/agent-reload-coordinator.js} +61 -1
- package/dist/core/{agent-runtime.js → agent/agent-runtime.js} +53 -27
- package/dist/core/{evolagent-registry.js → agent/evolagent-registry.js} +12 -12
- package/dist/core/{evolagent.js → agent/evolagent.js} +11 -11
- package/dist/core/auth/agent-delegation.js +1 -8
- package/dist/core/auth/delegation-authorization.js +28 -0
- package/dist/core/auth/operation-authorizer.js +7 -4
- package/dist/core/auth/operation-catalog.js +34 -5
- package/dist/core/baseagent/baseagent-availability.js +197 -0
- package/dist/core/baseagent/baseagent-capability-adapter.js +288 -0
- package/dist/core/baseagent/baseagent-config-shared.js +56 -0
- package/dist/core/baseagent/baseagent-identity.js +68 -0
- package/dist/core/{baseagent-loader.js → baseagent/baseagent-loader.js} +62 -6
- package/dist/core/baseagent/baseagent-model-defaults.js +26 -0
- package/dist/{agents → core/baseagent}/baseagent-plugin-descriptor.js +107 -24
- package/dist/core/baseagent/baseagent-plugin-loader.js +367 -0
- package/dist/core/baseagent/baseagent.js +157 -0
- package/dist/{agents → core/baseagent}/runner-types.js +36 -4
- package/dist/core/capability/capability-manager.js +79 -30
- package/dist/core/capability/providers/claude-capability-provider.js +2 -154
- package/dist/core/capability/providers/codex-capability-provider.js +2 -136
- package/dist/core/{channel-loader.js → channel/channel-loader.js} +226 -38
- package/dist/core/{channel-runtime.js → channel/channel-runtime.js} +18 -18
- package/dist/core/command/agent-control.js +60 -15
- package/dist/core/command/agent-template-menu.js +21 -9
- package/dist/core/command/agentmd-menu-request.js +19 -8
- package/dist/core/command/agentmd-menu.js +14 -5
- package/dist/core/command/command-handler.js +127 -57
- package/dist/core/command/context-policy-menu.js +122 -0
- package/dist/core/command/data-root-resolver.js +157 -20
- package/dist/core/command/memory-slash.js +6 -6
- package/dist/core/command/menu-catalog.js +80 -20
- package/dist/core/command/menu-handler.js +305 -25
- package/dist/core/command/menu-protocol.js +42 -8
- package/dist/core/command/menu-query-batch.js +9 -5
- package/dist/core/command/provider-menu.js +7 -11
- package/dist/core/command/role-menu.js +1 -1
- package/dist/core/command/skill-slash.js +17 -5
- package/dist/core/command/slash-gate.js +2 -4
- package/dist/core/command/slash-handler.js +127 -96
- package/dist/core/command/team-workspace-team.js +3 -3
- package/dist/core/command/topic-slash.js +10 -10
- package/dist/core/{daemon-bootstrap.js → daemon/daemon-bootstrap.js} +14 -14
- package/dist/core/{daemon-control.js → daemon/daemon-control.js} +46 -20
- package/dist/core/{daemon-lifecycle.js → daemon/daemon-lifecycle.js} +15 -15
- package/dist/core/{host-snapshot.js → daemon/host-snapshot.js} +3 -3
- package/dist/core/{ipc-registration.js → daemon/ipc-registration.js} +98 -38
- package/dist/core/{lifecycle-notice.js → daemon/lifecycle-notice.js} +4 -5
- package/dist/core/file-integrity/store.js +1 -1
- package/dist/core/handoff/ipc-registration.js +3 -3
- package/dist/core/handoff/runtime.js +1 -1
- package/dist/{agents → core/inference}/request-identity.js +2 -2
- package/dist/core/inference/text-inference.js +4 -4
- package/dist/core/{bootstrap-messages.js → initialization/bootstrap-messages.js} +10 -10
- package/dist/core/{bootstrap-service.js → initialization/bootstrap-service.js} +24 -23
- package/dist/core/initialization/service.js +54 -9
- package/dist/core/invoke/executors/media.js +1 -1
- package/dist/core/invoke/executors/text.js +1 -1
- package/dist/core/memory/consolidation-context.js +1 -1
- package/dist/core/memory/consolidation-trigger.js +9 -3
- package/dist/core/memory/consolidation.js +4 -4
- package/dist/core/memory/memory-admin.js +6 -6
- package/dist/core/memory/memory-writer.js +1 -1
- package/dist/core/memory/relation-idle-monitor.js +1 -1
- package/dist/core/message/aun-ipc-sender.js +114 -75
- package/dist/core/message/aun-request-registry.js +13 -5
- package/dist/core/message/auto-mention-gate.js +1 -1
- package/dist/core/message/contact-admission.js +1 -1
- package/dist/core/message/im-renderer.js +19 -0
- package/dist/core/{interaction-router.js → message/interaction-router.js} +4 -4
- package/dist/core/message/items-formatter.js +5 -5
- package/dist/core/message/message-admission.js +1 -1
- package/dist/core/message/message-bridge.js +135 -54
- package/dist/core/message/message-queue.js +83 -4
- package/dist/core/message/message-utils.js +1 -1
- package/dist/core/message/peer-mode.js +1 -1
- package/dist/core/message/response-engine.js +347 -163
- package/dist/core/message/send-options.js +9 -6
- package/dist/core/message/send-routing.js +45 -109
- package/dist/core/message/stream-idle-monitor.js +1 -1
- package/dist/core/{data-migration.js → migration/data-migration.js} +29 -1
- package/dist/core/model/catalog-service.js +29 -8
- package/dist/core/model/model-capabilities.js +88 -0
- package/dist/core/model/model-catalog.js +14 -3
- package/dist/core/model/model-diagnostics.js +4 -4
- package/dist/core/ownership/owner-resolver.js +95 -15
- package/dist/core/{pack-auth.js → pack/pack-auth.js} +30 -3
- package/dist/core/{pack-install.js → pack/pack-install.js} +95 -17
- package/dist/core/permission/approval-gateway.js +9 -18
- package/dist/core/permission/ec-command-parser.js +70 -34
- package/dist/core/permission/managed-file.js +234 -0
- package/dist/core/permission/protected-paths.js +56 -0
- package/dist/core/permission/sandbox-runtime.js +267 -3
- package/dist/core/permission/session-path-grants.js +1 -1
- package/dist/core/permission/shell-environment.js +15 -1
- package/dist/core/plugin/plugin-lifecycle.js +442 -0
- package/dist/core/session/adapters/claude-session-file-adapter.js +2 -246
- package/dist/core/session/adapters/codex-session-file-adapter.js +2 -566
- package/dist/core/session/adapters/ecagent-session-file-adapter.js +2 -134
- package/dist/core/{background-session → session/background}/session-cleanup.js +2 -2
- package/dist/core/{background-session → session/background}/types.js +1 -1
- package/dist/core/session/session-file-health.js +2 -272
- package/dist/core/session/session-idle-monitor.js +1 -1
- package/dist/core/session/session-manager.js +29 -2
- package/dist/core/session/session-terminal.js +185 -0
- package/dist/core/session/session-title.js +8 -11
- package/dist/core/{system-session → session/system}/memory.js +43 -9
- package/dist/core/{system-session → session/system}/registry.js +1 -1
- package/dist/core/{system-session → session/system}/types.js +1 -1
- package/dist/core/skill/index-generator.js +1 -0
- package/dist/core/task/task-activity-store.js +112 -0
- package/dist/core/task/task-recovery-service.js +2 -2
- package/dist/core/thread/ipc-operation.js +2 -2
- package/dist/core/thread/thread-operation.js +2 -1
- package/dist/core/thread/thread-route.js +5 -3
- package/dist/core/thread/thread-service.js +14 -4
- package/dist/directory/{owner-directory-admission.js → admission.js} +3 -3
- package/dist/directory/{owner-directory-cache.js → cache.js} +90 -8
- package/dist/directory/{owner-directory-markdown.js → markdown.js} +2 -2
- package/dist/directory/{owner-directory-query-operation.js → query-operation.js} +83 -9
- package/dist/directory/{owner-directory-search.js → search.js} +50 -2
- package/dist/directory/{owner-directory-store.js → store.js} +2 -2
- package/dist/eck/kit-renderer.js +1 -1
- package/dist/eck/manifest-engine.js +64 -2
- package/dist/eck/message-renderer.js +35 -0
- package/dist/ecweb/basic-settings-service.js +9 -3
- package/dist/{contracts → ecweb/contracts}/ecweb-service-protocol.js +2 -1
- package/dist/ecweb/dsh-native-service.js +413 -0
- package/dist/ecweb/providers-service.js +1 -1
- package/dist/ecweb/runtime/lifecycle.js +1 -1
- package/dist/ecweb/runtime/supervisor.js +1 -1
- package/dist/event-center/center-config.js +2 -2
- package/dist/event-center/dispatcher.js +1 -1
- package/dist/event-center/ipc-operation.js +12 -3
- package/dist/event-center/pack-loader.js +2 -2
- package/dist/event-center/registry.js +6 -6
- package/dist/event-center/runtime.js +2 -2
- package/dist/index.js +71 -42
- package/dist/ipc.js +103 -10
- package/dist/outputs/authorization.js +27 -0
- package/dist/outputs/events.js +10 -1
- package/dist/outputs/panel-cards.js +960 -0
- package/dist/paths.js +12 -0
- package/dist/pay/command.js +1 -1
- package/dist/pay/runtime.js +18 -10
- package/dist/response-system/engines/v1/proactive-flow.js +1 -1
- package/dist/services/dispatcher.js +2 -2
- package/dist/services/host/main.js +10 -1
- package/dist/services/host/protocol.js +9 -2
- package/dist/services/host/resident.js +37 -0
- package/dist/services/host-client.js +12 -0
- package/dist/services/host-recycle.js +8 -3
- package/dist/services/host-runtime.js +54 -15
- package/dist/services/index.js +83 -19
- package/dist/services/ipc-operation.js +303 -38
- package/dist/services/pack-manager.js +2 -2
- package/dist/services/router.js +43 -3
- package/dist/services/script-runner.js +34 -25
- package/dist/services/service-payload.js +28 -1
- package/dist/services/validation.js +28 -2
- package/dist/stats/context-usage.js +110 -0
- package/dist/stats/model-resolver.js +103 -17
- package/dist/stats/query.js +5 -0
- package/dist/trigger/application-service.js +3 -2
- package/dist/trigger/authorization.js +36 -33
- package/dist/trigger/ipc-service.js +4 -4
- package/dist/trigger/local-files.js +8 -176
- package/dist/trigger/manager.js +2 -2
- package/dist/trigger/parser.js +48 -0
- package/dist/trigger/scheduler.js +14 -2
- package/dist/trigger/script-executor.js +21 -0
- package/dist/trigger/script-sandbox.js +57 -243
- package/dist/trigger/system-definitions.js +25 -0
- package/dist/trigger/validation.js +1 -1
- package/dist/utils/atomic-write.js +88 -1
- package/dist/utils/cross-platform.js +4 -42
- package/dist/utils/error-dict.json +22 -1
- package/dist/utils/error-utils.js +193 -6
- package/dist/utils/evolcore-version.js +2 -2
- package/dist/utils/host-info.js +1 -1
- package/dist/utils/logger.js +3 -1
- package/dist/utils/media-cache.js +99 -4
- package/dist/utils/startup-trace.js +20 -4
- package/dist/utils/welcome.js +64 -20
- package/ecagent/README.md +35 -0
- package/ecagent/dist/agent-loop.js +80 -30
- package/ecagent/dist/harness/env/nodejs.d.ts +16 -0
- package/ecagent/dist/harness/env/nodejs.js +49 -20
- package/ecagent/dist/harness/messages.js +3 -2
- package/ecagent/dist/harness/types.d.ts +1 -0
- package/ecagent/dist/runtime/types.d.ts +2 -0
- package/ecagent/dist/runtime/utils/validation.d.ts +7 -1
- package/ecagent/dist/runtime/utils/validation.js +42 -0
- package/ecagent/dist/types.d.ts +2 -0
- package/kits/docs/INDEX.md +1 -1
- package/kits/docs/channels/feishu.md +1 -1
- package/kits/docs/evolcore/INDEX.md +10 -7
- package/kits/docs/evolcore/agent-create.md +2 -0
- package/kits/docs/evolcore/agent.md +100 -13
- package/kits/docs/evolcore/aid.md +19 -3
- package/kits/docs/evolcore/config.md +94 -0
- package/kits/docs/evolcore/ctl.md +2 -1
- package/kits/docs/evolcore/ec-capabilities.md +7 -10
- package/kits/docs/evolcore/ecweb-lifecycle.md +5 -1
- package/kits/docs/evolcore/event.md +1 -1
- package/kits/docs/evolcore/fs.md +49 -3
- package/kits/docs/evolcore/group.md +3 -3
- package/kits/docs/evolcore/memory-consolidation.md +1 -1
- package/kits/docs/evolcore/menu-protocol.md +24 -2
- package/kits/docs/evolcore/model.md +9 -1
- package/kits/docs/evolcore/msg.md +30 -28
- package/kits/docs/evolcore/pay.md +8 -20
- package/kits/docs/evolcore/plugin.md +74 -0
- package/kits/docs/evolcore/provider.md +8 -2
- package/kits/docs/evolcore/rpc.md +2 -2
- package/kits/docs/evolcore/skill.md +17 -1
- package/kits/docs/evolcore/stats.md +5 -0
- package/kits/docs/evolcore/storage.md +22 -0
- package/kits/docs/evolcore/thread-chain.md +19 -10
- package/kits/docs/evolcore/tool-authorization.md +4 -0
- package/kits/docs/evolcore/trigger.md +89 -13
- package/kits/docs/identity/AID_PROFILE_SPEC.md +1 -1
- package/kits/docs/venues/feishu-group.md +3 -2
- package/kits/docs/venues/feishu-private.md +3 -2
- package/kits/rules/02-navigation.md +20 -13
- package/kits/rules/06-channel.md +18 -2
- package/kits/schemas/_meta.json +8 -4
- package/kits/schemas/agent-config.schema.23.json +19 -3
- package/kits/schemas/agent-config.schema.24.json +986 -0
- package/kits/schemas/agent-config.schema.25.json +986 -0
- package/kits/schemas/daemon.schema.11.json +487 -0
- package/kits/schemas/daemon.schema.12.json +505 -0
- package/kits/schemas/defaults.schema.8.json +484 -0
- package/kits/schemas/providers.schema.1.json +1 -1
- package/kits/schemas/providers.schema.2.json +1 -1
- package/kits/schemas/providers.schema.3.json +8 -2
- package/kits/skills/.switches.json +4 -0
- package/kits/skills/ability/SKILL.md +194 -27
- package/kits/skills/ability/STRUCTURE.md +5 -0
- package/kits/skills/agent-output-cards/SKILL.md +90 -54
- package/kits/skills/agent-output-cards/examples/html-surface.json +11 -0
- package/kits/skills/agent-output-cards/examples/meeting-followups.json +16 -0
- package/kits/skills/agent-output-cards/examples/meeting-latest.json +24 -0
- package/kits/skills/agent-output-cards/examples/project-metrics.json +16 -0
- package/kits/skills/agent-output-cards/examples/quick-links.json +18 -0
- package/kits/skills/agent-output-cards/examples/surface.html +8 -0
- package/kits/skills/agent-template-project/SKILL.md +51 -0
- package/kits/skills/agent-template-project/references/01-collect-and-pack.md +174 -0
- package/kits/skills/agent-template-project/references/02-upload-and-share.md +109 -0
- package/kits/skills/agent-template-project/references/03-download-and-install.md +189 -0
- package/kits/skills/agent-template-project/references/04-upgrade-and-recovery.md +74 -0
- package/kits/skills/agent-template-project/references/05-publish-to-platform.md +62 -0
- package/kits/skills/ec-group/SKILL.md +3 -3
- package/kits/skills/ec-group-collaboration/SKILL.md +4 -4
- package/kits/skills/ec-identity/SKILL.md +9 -6
- package/kits/skills/ec-pay/SKILL.md +163 -41
- package/kits/skills/ec-provider/SKILL.md +5 -5
- package/kits/skills/ec-service-call/SKILL.md +3 -0
- package/kits/skills/ec-skill/SKILL.md +25 -9
- package/kits/skills/ec-skill/scripts/cli.mjs +7 -7
- package/kits/skills/ec-skill/scripts/skill.mjs +55 -41
- package/kits/skills/ec-skill/scripts/template/SKILL.md.tmpl +9 -0
- package/kits/skills/ec-trigger/SKILL.md +2 -2
- package/kits/skills/personal-assistant/SKILL.md +22 -22
- package/kits/skills/personal-assistant/references/03-data-flow-and-gaps.md +1 -1
- package/kits/skills/scrapling-article-fetch/SKILL.md +5 -5
- package/kits/skills/thread-ops/SKILL.md +19 -9
- package/kits/skills/wechat-article-media-download/SKILL.md +2 -2
- package/kits/skills/wechat-article-reader/SKILL.md +2 -2
- package/kits/templates/system-fragments/commands.md +1 -1
- package/kits/templates/system-fragments/personal-assistant.md +2 -2
- package/kits/templates/system-fragments/reply.md +14 -9
- package/kits/templates/system-fragments/session.md +1 -1
- package/kits/templates/system-fragments/thread.md +10 -5
- package/package.json +6 -5
- package/scripts/agent-template/index.mjs +7 -1
- package/scripts/agent-template/inspect.mjs +81 -35
- package/scripts/agent-template/overlay.mjs +110 -4
- package/scripts/agent-template/shared/common.mjs +36 -4
- package/scripts/agent-template/shared/plan.mjs +4 -2
- package/scripts/agent-template/shared/service-packs.mjs +104 -0
- package/scripts/agent-template/shared/team-schema.json +467 -54
- package/scripts/agent-template/shared/template-contract.mjs +70 -68
- package/scripts/agent-template/shared/template-package.mjs +153 -36
- package/scripts/agent-template/shared/template-runtime.mjs +76 -64
- package/scripts/agent-template/shared/template.mjs +11 -46
- package/scripts/agent-template/team-pack.mjs +451 -35
- package/scripts/agent-template/team-preview.mjs +75 -226
- package/scripts/aid-batch/identity-batch.mjs +1 -1
- package/dist/agents/baseagent-availability.js +0 -176
- package/dist/agents/baseagent-capability-adapter.js +0 -102
- package/dist/agents/baseagent-plugin-loader.js +0 -145
- package/dist/agents/baseagent.js +0 -816
- package/dist/agents/codex/catalog.js +0 -80
- package/dist/agents/ecagent-plugin-lazy.js +0 -41
- package/dist/agents/tool-time-context.js +0 -55
- package/dist/core/legacy-rename.js +0 -41
- package/dist/core/plugin-lifecycle.js +0 -137
- package/dist/core/rate-window.js +0 -53
- package/dist/core/runner-reload-transaction.js +0 -60
- package/dist/core/runtime-lock.js +0 -90
- package/dist/core/soul.js +0 -66
- package/dist/core/system-session/grants.js +0 -40
- package/dist/directory/owner-directory-agentmd-sync.js +0 -89
- package/dist/directory/owner-directory-request-operation.js +0 -79
- package/dist/directory/owner-directory-text.js +0 -60
- package/kits/skills/ec-pay/references/pay-cli.md +0 -110
- /package/dist/agents/gemini/{gemini-capability-provider.js → capability-provider.js} +0 -0
- /package/dist/agents/gemini/{gemini-session-file-adapter.js → session-file-adapter.js} +0 -0
- /package/dist/{agents/claude-gateway → claude-gateway}/types.js +0 -0
- /package/dist/core/{system-channels.js → channel/system-channels.js} +0 -0
- /package/dist/core/{daemon-file-cache.js → daemon/daemon-file-cache.js} +0 -0
- /package/dist/core/{event-bus.js → event/event-bus.js} +0 -0
- /package/dist/core/{event-catalog.js → event/event-catalog.js} +0 -0
- /package/dist/core/{pack-ledger.js → pack/pack-ledger.js} +0 -0
- /package/dist/directory/{owner-directory-identity.js → identity.js} +0 -0
- /package/dist/directory/{owner-directory-policy.js → policy.js} +0 -0
- /package/dist/directory/{owner-directory-remarks.js → remarks.js} +0 -0
- /package/dist/directory/{owner-directory-scope.js → scope.js} +0 -0
- /package/dist/{contracts → ecweb/contracts}/ecweb-instance.js +0 -0
- /package/kits/templates/{bootstrap-welcome.md → bootstrap-intro.md} +0 -0
package/dist/cli/init.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
|
-
import { isSupportedBaseagent, listSupportedBaseagents } from '../
|
|
2
|
+
import { isSupportedBaseagent, listSupportedBaseagents } from '../core/baseagent/baseagent.js';
|
|
3
3
|
import os from 'os';
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import readline from 'readline';
|
|
6
6
|
import { resolvePaths, ensureDataDirs } from '../paths.js';
|
|
7
7
|
import { commandExists } from '../utils/cross-platform.js';
|
|
8
8
|
import { scanInstances } from '../utils/instance-registry.js';
|
|
9
|
-
import { saveDefaultsSafe, loadDaemonConfig, saveDaemonConfig } from '../config-store.js';
|
|
9
|
+
import { saveDefaultsSafe, loadDaemonConfig, saveDaemonConfig, loadDefaults } from '../config-store.js';
|
|
10
10
|
import { currentVersion } from '../config/schema-registry.js';
|
|
11
11
|
import { DEFAULT_ECWEB_PORT, ecwebService, setEcwebEnabled } from '../config/daemon-services.js';
|
|
12
12
|
import { buildEcwebPairingUrl, fetchRemotePairingCode } from '../ecweb/pairing.js';
|
|
@@ -14,22 +14,19 @@ import { waitForEcwebProxyAccess } from '../ecweb/runtime/proxy-access.js';
|
|
|
14
14
|
import { ipcQuery } from '../ipc.js';
|
|
15
15
|
import { ensureControlAgentMd, generateControlAid, hasLocalControlIdentity, missingControlIdentityMessage, resolveControlAidDomain, submitControlAidRegistration, } from '../aun/aid/control-aid.js';
|
|
16
16
|
import { isValidAid } from '../aun/aid/validation.js';
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
* 而 `ec start` 完全不经过 init —— 所以这里改成按需加载,别让启动路径付这个钱。
|
|
21
|
-
* 只有引导/初始化分支会真正走到。
|
|
22
|
-
*/
|
|
17
|
+
import { baseagentDeclarations, setRuntimePluginEnabled } from '../core/plugin/plugin-lifecycle.js';
|
|
18
|
+
import { getBaseagentPluginDescriptor } from '../core/baseagent/baseagent-plugin-descriptor.js';
|
|
19
|
+
/** Dependency probing shares the lightweight metadata service, without importing a Runner. */
|
|
23
20
|
async function probeCodexAvailability() {
|
|
24
|
-
const { getCodexAppServerAvailability } = await import('../
|
|
21
|
+
const { getCodexAppServerAvailability } = await import('../core/baseagent/baseagent-availability.js');
|
|
25
22
|
return getCodexAppServerAvailability();
|
|
26
23
|
}
|
|
27
|
-
import { resolveCodexCliPath, resolveCodexPowerShellShimPath, } from '../
|
|
24
|
+
import { resolveCodexCliPath, resolveCodexPowerShellShimPath, } from '../core/baseagent/baseagent.js';
|
|
28
25
|
import { assertProjectPathReference, defaultProjectsRoot, hasProjectPathEnvironmentReference } from '../utils/project-path.js';
|
|
29
26
|
import { WEB_CLI_BIN, WEB_PACKAGE_NAME, WEB_PACKAGE_LATEST } from '../product.js';
|
|
30
27
|
import { autostartInstalled, autostartPlatformLabel, configureAutostart } from '../utils/autostart.js';
|
|
31
28
|
import { askInit, printInitCancelHint } from './init-cancel.js';
|
|
32
|
-
import { AUTO_BASEAGENT_CANDIDATES, detectAvailableBaseagents, detectBaseagentDetails, } from '../
|
|
29
|
+
import { AUTO_BASEAGENT_CANDIDATES, detectAvailableBaseagents, detectBaseagentDetails, } from '../core/baseagent/baseagent-availability.js';
|
|
33
30
|
// ==================== Helpers ====================
|
|
34
31
|
function ask(rl, question) {
|
|
35
32
|
return askInit(rl, question);
|
|
@@ -43,8 +40,44 @@ export function expandLeadingTildePath(value, homeDir = os.homedir()) {
|
|
|
43
40
|
}
|
|
44
41
|
return value;
|
|
45
42
|
}
|
|
43
|
+
async function prepareBaseagentMetadata() {
|
|
44
|
+
const { runBaseagentDeclarationMigration } = await import('../config/schema-migration.js');
|
|
45
|
+
runBaseagentDeclarationMigration({ apply: true });
|
|
46
|
+
const { discoverBaseagentPlugins } = await import('../core/baseagent/baseagent-plugin-loader.js');
|
|
47
|
+
await discoverBaseagentPlugins({ quiet: true });
|
|
48
|
+
}
|
|
46
49
|
async function detectAvailable(codexAvailability) {
|
|
47
|
-
|
|
50
|
+
await prepareBaseagentMetadata();
|
|
51
|
+
return detectAvailableBaseagents(codexAvailability);
|
|
52
|
+
}
|
|
53
|
+
/** An explicit non-interactive selection substitutes for the interactive confirmation. */
|
|
54
|
+
export async function declareInstalledBaseagentsForInit(options = {}) {
|
|
55
|
+
const { scanBaseagentInstallations } = await import('../core/baseagent/baseagent-plugin-loader.js');
|
|
56
|
+
const declarations = baseagentDeclarations();
|
|
57
|
+
const installations = await scanBaseagentInstallations();
|
|
58
|
+
const saved = [];
|
|
59
|
+
for (const installation of installations) {
|
|
60
|
+
if (!installation.installed || declarations[installation.id]?.enabled === true)
|
|
61
|
+
continue;
|
|
62
|
+
const accepted = options.confirm ? await options.confirm(installation) : installation.id === options.selected;
|
|
63
|
+
if (!accepted)
|
|
64
|
+
continue;
|
|
65
|
+
if (installation.id === 'dsh' && options.deferDshSetup) {
|
|
66
|
+
// First initialization has no Owner yet. Validate the selection now;
|
|
67
|
+
// commit the resource grant only after the Owner protocol completes.
|
|
68
|
+
const { selectDshHostSetup } = await import('../agents/dsh/installation.js');
|
|
69
|
+
if (loadDefaults()?.baseagents?.dsh?.runtimeMode !== 'native-shared')
|
|
70
|
+
selectDshHostSetup();
|
|
71
|
+
const { mutateConfig, ConfigTarget } = await import('../config/config-manager.js');
|
|
72
|
+
mutateConfig(ConfigTarget.Process, undefined, config => {
|
|
73
|
+
config.plugins = { ...config.plugins, 'baseagent:dsh': { ...config.plugins?.['baseagent:dsh'], enabled: true } };
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
else
|
|
77
|
+
await setRuntimePluginEnabled('baseagent', installation.id, true);
|
|
78
|
+
saved.push(installation.id);
|
|
79
|
+
}
|
|
80
|
+
return saved;
|
|
48
81
|
}
|
|
49
82
|
/** Offer installation only when the probe positively identified an old CLI. */
|
|
50
83
|
export async function maybeUpgradeCodexForInit(availability, dependencies) {
|
|
@@ -84,11 +117,8 @@ function pickInteractiveDefault(available) {
|
|
|
84
117
|
function buildDefaults(chosen, available, projectsDefaultPath) {
|
|
85
118
|
const baseagents = {};
|
|
86
119
|
for (const b of available) {
|
|
87
|
-
baseagents[b] = {};
|
|
120
|
+
baseagents[b] = b === 'dsh' ? loadDefaults()?.baseagents?.dsh ?? {} : {};
|
|
88
121
|
}
|
|
89
|
-
// ecagent is bundled with EvolCore, so declare it even when the caller
|
|
90
|
-
// supplies a reduced availability list (for example, a test probe).
|
|
91
|
-
baseagents.ecagent = baseagents.ecagent ?? {};
|
|
92
122
|
return {
|
|
93
123
|
$schema_version: currentVersion('defaults'),
|
|
94
124
|
active_baseagent: chosen,
|
|
@@ -97,6 +127,9 @@ function buildDefaults(chosen, available, projectsDefaultPath) {
|
|
|
97
127
|
};
|
|
98
128
|
}
|
|
99
129
|
function writeDefaults(chosen, available, projectsDefaultPath) {
|
|
130
|
+
const current = detectBaseagentDetails().find(item => item.id === chosen);
|
|
131
|
+
if (!current?.detected)
|
|
132
|
+
throw new Error(`基座 ${chosen} 已不可用:${current?.reason ?? '未在 daemon 配置中声明'}`);
|
|
100
133
|
saveDefaultsSafe(buildDefaults(chosen, available, projectsDefaultPath));
|
|
101
134
|
}
|
|
102
135
|
export async function importProvidersForCliInit(available, options = {}) {
|
|
@@ -150,6 +183,8 @@ export async function importProvidersForCliInit(available, options = {}) {
|
|
|
150
183
|
defaults.baseagents ??= {};
|
|
151
184
|
for (const baseagent of available) {
|
|
152
185
|
const selection = defaults.baseagents[baseagent] ??= {};
|
|
186
|
+
if (baseagent === 'dsh' && selection.runtimeMode === 'native-shared')
|
|
187
|
+
continue;
|
|
153
188
|
const usable = (providerId) => {
|
|
154
189
|
try {
|
|
155
190
|
return !!resolveProviderServiceForBaseagent(providerId, baseagent, undefined, registry).apiKey?.trim();
|
|
@@ -439,7 +474,23 @@ export async function cmdInit(options) {
|
|
|
439
474
|
return false;
|
|
440
475
|
}
|
|
441
476
|
// ── 2. 探测 baseagent ──
|
|
442
|
-
|
|
477
|
+
await prepareBaseagentMetadata();
|
|
478
|
+
const declared = await declareInstalledBaseagentsForInit({ selected: options?.baseagent, deferDshSetup: true,
|
|
479
|
+
...(options?.nonInteractive ? {} : { confirm: async (installation) => {
|
|
480
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
481
|
+
try {
|
|
482
|
+
const answer = (await ask(rl, `已安装 ${installation.label}。是否在 daemon 中声明并启用?[y/N] `)).trim().toLowerCase();
|
|
483
|
+
return answer === 'y' || answer === 'yes';
|
|
484
|
+
}
|
|
485
|
+
finally {
|
|
486
|
+
rl.close();
|
|
487
|
+
}
|
|
488
|
+
} }),
|
|
489
|
+
});
|
|
490
|
+
if (declared.length)
|
|
491
|
+
await prepareBaseagentMetadata();
|
|
492
|
+
let codexAvailability = baseagentDeclarations().codex?.enabled === true
|
|
493
|
+
&& getBaseagentPluginDescriptor('codex') ? await probeCodexAvailability() : { available: false };
|
|
443
494
|
if (!options?.nonInteractive && codexAvailability.version) {
|
|
444
495
|
console.log(`检测到 Codex CLI: ${codexAvailability.version}`);
|
|
445
496
|
}
|
|
@@ -477,13 +528,11 @@ export async function cmdInit(options) {
|
|
|
477
528
|
}
|
|
478
529
|
}
|
|
479
530
|
}
|
|
480
|
-
const available =
|
|
531
|
+
const available = detectAvailableBaseagents(codexAvailability);
|
|
481
532
|
if (available.length === 0) {
|
|
482
|
-
console.log('❌
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
console.log(' - codex CLI with app-server');
|
|
486
|
-
console.log('\n安装后重新运行 ec init');
|
|
533
|
+
console.log('❌ 没有可用 baseagent,请检查 daemon.plugins 声明、启用状态及依赖:');
|
|
534
|
+
for (const item of detectBaseagentDetails(codexAvailability))
|
|
535
|
+
console.log(` ○ ${item.id}: ${item.reason ?? '不可用'}`);
|
|
487
536
|
return false;
|
|
488
537
|
}
|
|
489
538
|
console.log('baseagent 检测结果:');
|
|
@@ -499,7 +548,7 @@ export async function cmdInit(options) {
|
|
|
499
548
|
console.log(` ○ ${detection.id} (已安装但不可用:${detection.reason ?? '未知原因'})`);
|
|
500
549
|
}
|
|
501
550
|
else {
|
|
502
|
-
console.log(` ○ ${detection.id} (
|
|
551
|
+
console.log(` ○ ${detection.id} (${detection.reason ?? '不可用'})`);
|
|
503
552
|
}
|
|
504
553
|
}
|
|
505
554
|
console.log('');
|
|
@@ -522,9 +571,7 @@ export async function cmdInit(options) {
|
|
|
522
571
|
return false; // 硬错误:不落 tail
|
|
523
572
|
}
|
|
524
573
|
if (!available.includes(options.baseagent)) {
|
|
525
|
-
const reason =
|
|
526
|
-
? (await probeCodexAvailability()).reason
|
|
527
|
-
: undefined;
|
|
574
|
+
const reason = detectBaseagentDetails(codexAvailability).find(item => item.id === options.baseagent)?.reason;
|
|
528
575
|
console.log(`❌ ${options.baseagent} 当前环境不可用${reason ? `:${reason}` : `(可用: ${available.join('/')})`}`);
|
|
529
576
|
return false; // 硬错误:不落 tail
|
|
530
577
|
}
|
|
@@ -713,6 +760,15 @@ export async function initTail(options = {}) {
|
|
|
713
760
|
console.error(`⚠️ 控制 AID agent.md 补全失败(本次继续,后续启动会重试): ${e?.message || e}`);
|
|
714
761
|
}
|
|
715
762
|
}
|
|
763
|
+
if (baseagentDeclarations().dsh?.enabled) {
|
|
764
|
+
try {
|
|
765
|
+
await configureDshHostForInit(configuredOwner);
|
|
766
|
+
}
|
|
767
|
+
catch (error) {
|
|
768
|
+
console.error(`DSH BaseAgent 接入尚未完成:${error instanceof Error ? error.message : String(error)}`);
|
|
769
|
+
return false;
|
|
770
|
+
}
|
|
771
|
+
}
|
|
716
772
|
async function handleAutostartPrompt() {
|
|
717
773
|
if (options.autoStart !== undefined) {
|
|
718
774
|
autoStartReady = await applyAutostart(options.autoStart);
|
|
@@ -893,9 +949,11 @@ export async function cmdInitNonInteractive(opts, dependencies = {}) {
|
|
|
893
949
|
fail('DAEMON_RUNNING', `EvolCore daemon is running (PID: ${pids}); run 'ec stop' first`, EXIT_USAGE, format);
|
|
894
950
|
}
|
|
895
951
|
// ── 3. baseagent 探测 + 校验 ──
|
|
952
|
+
if (!dependencies.availableBaseagents)
|
|
953
|
+
await declareInstalledBaseagentsForInit({ selected: opts.baseagent, deferDshSetup: true });
|
|
896
954
|
const available = dependencies.availableBaseagents ?? await detectAvailable();
|
|
897
955
|
if (available.length === 0) {
|
|
898
|
-
fail('BASEAGENT_UNAVAILABLE', 'no
|
|
956
|
+
fail('BASEAGENT_UNAVAILABLE', 'no selectable declared baseagent: ' + detectBaseagentDetails().map(item => item.id + ': ' + item.reason).join('; '), EXIT_USAGE, format);
|
|
899
957
|
}
|
|
900
958
|
let chosenBaseagent;
|
|
901
959
|
if (opts.baseagent) {
|
|
@@ -903,7 +961,7 @@ export async function cmdInitNonInteractive(opts, dependencies = {}) {
|
|
|
903
961
|
fail('INVALID_BASEAGENT', `invalid baseagent: ${opts.baseagent} (choose: ${listSupportedBaseagents().join('/')})`, EXIT_USAGE, format);
|
|
904
962
|
}
|
|
905
963
|
if (!available.includes(opts.baseagent)) {
|
|
906
|
-
const reason =
|
|
964
|
+
const reason = detectBaseagentDetails().find(item => item.id === opts.baseagent)?.reason;
|
|
907
965
|
fail('BASEAGENT_UNAVAILABLE', `${opts.baseagent} not available${reason ? `: ${reason}` : ''}`, EXIT_USAGE, format);
|
|
908
966
|
}
|
|
909
967
|
chosenBaseagent = opts.baseagent;
|
|
@@ -1061,5 +1119,42 @@ export async function cmdInitNonInteractive(opts, dependencies = {}) {
|
|
|
1061
1119
|
console.error(`control AID agent.md publish warning: ${error instanceof Error ? error.message : String(error)}`);
|
|
1062
1120
|
}
|
|
1063
1121
|
}
|
|
1122
|
+
if (!dependencies.availableBaseagents && baseagentDeclarations().dsh?.enabled) {
|
|
1123
|
+
try {
|
|
1124
|
+
await configureDshHostForInit(ownerAid);
|
|
1125
|
+
}
|
|
1126
|
+
catch (error) {
|
|
1127
|
+
fail('DSH_HOST_SETUP_INCOMPLETE', error instanceof Error ? error.message : String(error), EXIT_RUNTIME, format);
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1064
1130
|
emitResult(result, format);
|
|
1065
1131
|
}
|
|
1132
|
+
/** Offline init borrows a short authenticated control connection for consensus. */
|
|
1133
|
+
async function configureDshHostForInit(ownerAid) {
|
|
1134
|
+
const { configureDshHost } = await import('../agents/dsh/installation.js');
|
|
1135
|
+
const aid = loadDaemonConfig().aid;
|
|
1136
|
+
if (!aid || !ownerAid)
|
|
1137
|
+
throw new Error('DSH_RESOURCE_OWNER_REQUIRED');
|
|
1138
|
+
const { ownerResolver } = await import('../core/ownership/owner-resolver.js');
|
|
1139
|
+
const { getAidStore, loadClient } = await import('../aun/aid/store.js');
|
|
1140
|
+
const store = await getAidStore({ slotId: `dsh-init-${Date.now()}` });
|
|
1141
|
+
let client;
|
|
1142
|
+
try {
|
|
1143
|
+
client = await loadClient(store, aid);
|
|
1144
|
+
await client.connect({ connection_kind: 'short', short_ttl_ms: 30_000, auto_reconnect: false,
|
|
1145
|
+
background_sync: false, connect_timeout: 10, call_timeout: 10 });
|
|
1146
|
+
ownerResolver.setDaemonAid(aid);
|
|
1147
|
+
ownerResolver.registerEvidenceClient(aid, client, store);
|
|
1148
|
+
await configureDshHost(undefined, ownerAid);
|
|
1149
|
+
}
|
|
1150
|
+
finally {
|
|
1151
|
+
if (client)
|
|
1152
|
+
ownerResolver.unregisterEvidenceClient(aid, client);
|
|
1153
|
+
try {
|
|
1154
|
+
await client?.close();
|
|
1155
|
+
}
|
|
1156
|
+
finally {
|
|
1157
|
+
store.close();
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
}
|
package/dist/cli/model.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* 设计见 docs/model-command-design.md。
|
|
12
12
|
*/
|
|
13
13
|
import { isHelpFlag, wantsHelp, getArgValue } from './help.js';
|
|
14
|
-
import { resolveRuntimeBaseagentModelSelection } from '../
|
|
14
|
+
import { resolveRuntimeBaseagentModelSelection } from '../core/baseagent/baseagent.js';
|
|
15
15
|
import { ModelScopeError, normalizePeer, determineScope, activeBaseagent, writeAgentModelConfig, clearAgentModelConfig, } from '../core/model/config-scope.js';
|
|
16
16
|
import { resolveEffective, resolveEffectiveFieldWithSource } from '../config/config-manager.js';
|
|
17
17
|
import { getCatalog, getModelInfo, catalogEfforts, resolveCatalogModel, assertCatalogSelectable } from '../core/model/model-catalog.js';
|
|
@@ -6,7 +6,7 @@ import { promisify } from 'util';
|
|
|
6
6
|
import { resolvePaths, getPackageRoot, daemonControlDir } from '../paths.js';
|
|
7
7
|
import { isRestartRecoveryEnabled, loadDaemonConfig } from '../config-store.js';
|
|
8
8
|
import * as platform from '../utils/cross-platform.js';
|
|
9
|
-
import { EventBus } from '../core/event-bus.js';
|
|
9
|
+
import { EventBus } from '../core/event/event-bus.js';
|
|
10
10
|
import { applyCachedPackageUpgrades, recordPackageUpgrade } from '../utils/package-version-info.js';
|
|
11
11
|
import { acknowledgeUpgradeRestart, readUpgradeJob, updateUpgradeJob } from '../utils/upgrade-jobs.js';
|
|
12
12
|
import { isValidAid } from '../aun/aid/validation.js';
|
|
@@ -14,7 +14,7 @@ import { scanInstances, cleanupInstances, writeRestartMonitor, removeRestartMoni
|
|
|
14
14
|
import { CHANNEL_LOGS_ENV, MAIN_PACKAGE_NAME, RESTART_REQUEST_ID_ENV, TARGET_PACKAGE_ROOT_ENV } from '../product.js';
|
|
15
15
|
import { readRestartRequest, updateRestartRequest, removeRestartRequest, shouldSuppressRealRestart } from '../utils/restart-safety.js';
|
|
16
16
|
import { rotateStdoutLog } from '../utils/log-writer.js';
|
|
17
|
-
import { applyDataMigration, finalizeDataMigration, planDataMigration, verifyDataMigration, } from '../core/data-migration.js';
|
|
17
|
+
import { applyDataMigration, finalizeDataMigration, planDataMigration, verifyDataMigration, } from '../core/migration/data-migration.js';
|
|
18
18
|
import { DAEMON_SHUTDOWN_TIMEOUT_MS, isRecordedProcessGone, requestDaemonShutdown, stopCodexAppServerOrphans } from './daemon-lifecycle-client.js';
|
|
19
19
|
import { getProcessSnapshotAsync, invalidateProcessSnapshot } from '../utils/process-introspect.js';
|
|
20
20
|
import { DEFAULT_ECWEB_PORT, ecwebService, serviceRuntimeMode } from '../config/daemon-services.js';
|
|
@@ -28,10 +28,12 @@ const HELP = `ec services — 服务路由运维
|
|
|
28
28
|
|
|
29
29
|
安装与卸载(L 类目录只能由 daemon 代写):
|
|
30
30
|
ec services pack add <包名> --from <源目录> [--aid <aid>]
|
|
31
|
+
ec services pack update <包名> --from <源目录> [--aid <aid>]
|
|
31
32
|
ec services pack remove <包名> [--aid <aid>] [--purge]
|
|
32
33
|
ec services pack enable / disable <包名> [--aid <aid>]
|
|
33
34
|
|
|
34
|
-
add 遇到已安装的包直接报错,先 remove
|
|
35
|
+
add 遇到已安装的包直接报错,先 remove 再装;改包用 update(原地替换,失败回滚到旧版)。
|
|
36
|
+
update 保留 logs/ 与台账,只替换声明的脚本与文件。
|
|
35
37
|
remove 默认把日志与台账归档到 <包>/logs/archive-<时间戳>/;--purge 连归档一起删。
|
|
36
38
|
ec services pack list [--aid <aid>]
|
|
37
39
|
|
|
@@ -41,6 +43,10 @@ const HELP = `ec services — 服务路由运维
|
|
|
41
43
|
ec services call --aid <对端aid> --type <type> --data '<json>'
|
|
42
44
|
[--as <发送身份>] [--timeout 12] [--encrypted]
|
|
43
45
|
|
|
46
|
+
本机自测(不经网络,直接走路由 + 权限 + 沙箱 + handler):
|
|
47
|
+
ec services call --local --type <type> [--data '<json>'] [--timeout 12]
|
|
48
|
+
模拟一个普通成员调用,因此会走沙箱;测不到准入、加密与跨机时延。
|
|
49
|
+
|
|
44
50
|
服务调用是点对点、要结果、不丢的消息:结果由 daemon 落盘,CLI 被杀也不丢。`;
|
|
45
51
|
/** 这三个子命令的回包是「对端应答」,CLI 只打印正文。 */
|
|
46
52
|
const RELAY_COMMANDS = new Set(['call', 'describe', 'schema']);
|
|
@@ -104,6 +110,17 @@ export async function runServicesCommand(argv) {
|
|
|
104
110
|
console.log(HELP);
|
|
105
111
|
return;
|
|
106
112
|
}
|
|
113
|
+
// 子命令后面跟 --help 也算求助:原来只认 args[0],于是 ec services call --help
|
|
114
|
+
// 会掉进真正的执行分支、被参数校验拒成 INVALID_ARGV("call requires --aid")。
|
|
115
|
+
// 撞到陌生命令时第一反应就是查帮助,帮助本身报错最伤。
|
|
116
|
+
if (args.slice(1).some((token) => token === 'help' || token === '--help' || token === '-h')) {
|
|
117
|
+
const sub = args[0] ?? '';
|
|
118
|
+
const usageLine = HELP.split('\n').find((line) => line.trim().startsWith(`ec services ${sub}`));
|
|
119
|
+
console.log(usageLine ? usageLine.trim() : HELP);
|
|
120
|
+
console.log('');
|
|
121
|
+
console.log('(完整列表:ec services --help)');
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
107
124
|
// `call` / `describe` / `schema` 都要等对端回包(daemon 侧是同一个 `runCall`,
|
|
108
125
|
// 默认等 30s):IPC 超时必须覆盖调用预算,否则 CLI 先断而 daemon 还在等,
|
|
109
126
|
// 空响应被误报成"daemon 不可达",request_id 也一起丢掉。
|
|
@@ -127,6 +144,12 @@ export async function runServicesCommand(argv) {
|
|
|
127
144
|
}
|
|
128
145
|
// 对端调用的成功输出是应答正文。
|
|
129
146
|
const result = response.result;
|
|
147
|
+
// 「成功但可能没按预期生效」:reload / pack add / pack enable|disable 的包状态,
|
|
148
|
+
// 以及 call 里被当传输层字段的 data 键。JSON 里看得见,但人直接看终端时容易被
|
|
149
|
+
// 一屏字段淹没,先单独提一行(stderr,不影响管道里的正文)。
|
|
150
|
+
const warning = result && typeof result === 'object' ? result.warning : undefined;
|
|
151
|
+
if (typeof warning === 'string' && warning)
|
|
152
|
+
console.error(`⚠ ${warning}`);
|
|
130
153
|
if (RELAY_COMMANDS.has(args[0] ?? '') && result && 'response' in result) {
|
|
131
154
|
const body = result.response;
|
|
132
155
|
printResult(body, json);
|
|
@@ -10,9 +10,8 @@
|
|
|
10
10
|
* 也保留了脚本「自定位、不依赖 cwd」的约束。
|
|
11
11
|
*
|
|
12
12
|
* 权限门禁同样在脚本层的 skill.mjs `assertPermission()`,本文件不复制一份。
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* 若在 CLI 层再判一遍,只是多一处会与脚本漂移的实现。
|
|
13
|
+
* 写操作由脚本通过 daemon IPC 校验当前任务和协议 Owner,
|
|
14
|
+
* 两个入口共用该门禁;此处不提前消费写操作的单次命令授权。
|
|
16
15
|
*
|
|
17
16
|
* 例外:`refresh` 不进脚本,直接走 daemon IPC(skill.refresh)——索引由 daemon
|
|
18
17
|
* 内的 index-generator 生成,鉴权也在 daemon 里做。其余子命令后续逐个迁到 IPC,
|
|
@@ -47,7 +46,8 @@ export async function cmdSkill(args) {
|
|
|
47
46
|
// 让它能定位 Agent 级 skills/ 与 .switches.json。
|
|
48
47
|
// selfAid 优先取任务运行时上下文(托管会话的权威来源),其次环境变量。
|
|
49
48
|
const env = { ...process.env };
|
|
50
|
-
const
|
|
49
|
+
const mutation = ['create', 'install', 'remove', 'enable', 'disable'].includes(args[0]);
|
|
50
|
+
const runtime = process.env.EVOLCORE_SESSION_ID && !mutation ? await authorizeLocalCommand(['skill', ...args]) : undefined;
|
|
51
51
|
const selfAid = runtime?.selfAid ?? readTaskRuntimeContextFromEnv()?.selfAid ?? process.env.EVOLCORE_SELF_AID;
|
|
52
52
|
if (runtime) {
|
|
53
53
|
env[TASK_RUNTIME_CONTEXT_ENV] = JSON.stringify(runtime);
|
package/dist/cli/task-context.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { normalizeCausation } from '../core/causation/context.js';
|
|
2
|
-
import { RUNTIME_LOCK_DIR_ENV } from '../
|
|
2
|
+
import { RUNTIME_LOCK_DIR_ENV } from '../utils/atomic-write.js';
|
|
3
3
|
import crypto from 'node:crypto';
|
|
4
4
|
import { execFile, execFileSync } from 'node:child_process';
|
|
5
5
|
import fs from 'node:fs';
|
|
@@ -239,7 +239,9 @@ function sessionRuntimeName(sessionId) {
|
|
|
239
239
|
* Windows Codex sandbox accounts and ordinary runner accounts are members of
|
|
240
240
|
* BUILTIN\Users. Session isolation is enforced by the distinct path plus the
|
|
241
241
|
* runner filesystem policy, so the runtime directory only needs a portable
|
|
242
|
-
* writable ACL rather than host-user secrecy.
|
|
242
|
+
* writable ACL rather than host-user secrecy. The host user additionally needs
|
|
243
|
+
* inheritable FullControl: DSH applies a mandatory integrity label to its private
|
|
244
|
+
* temporary children, which requires WRITE_OWNER as well as WRITE_DAC.
|
|
243
245
|
*/
|
|
244
246
|
// Reapplying an inheritable ACE can walk a large existing session tree.
|
|
245
247
|
// Read only its root DACL first; use the original grant if evidence is absent.
|
|
@@ -247,16 +249,29 @@ const WINDOWS_SESSION_ACL_CHECK = `
|
|
|
247
249
|
$ErrorActionPreference='Stop'
|
|
248
250
|
$acl=[System.IO.Directory]::GetAccessControl($env:EVOLCORE_SESSION_RUNTIME_ACL_PATH)
|
|
249
251
|
$rules=@($acl.GetAccessRules($true,$true,[System.Security.Principal.SecurityIdentifier]))
|
|
252
|
+
$user=[System.Security.Principal.WindowsIdentity]::GetCurrent().User
|
|
250
253
|
$modify=[System.Security.AccessControl.FileSystemRights]::Modify
|
|
254
|
+
$full=[System.Security.AccessControl.FileSystemRights]::FullControl
|
|
251
255
|
$inherit=[System.Security.AccessControl.InheritanceFlags]'ContainerInherit,ObjectInherit'
|
|
252
256
|
$ok=@($rules | Where-Object { $_.IdentityReference.Value -eq 'S-1-5-32-545' -and $_.AccessControlType -eq 'Allow' -and ($_.FileSystemRights -band $modify) -eq $modify -and ($_.InheritanceFlags -band $inherit) -eq $inherit -and $_.PropagationFlags -eq 'None' }).Count -gt 0
|
|
253
|
-
|
|
257
|
+
$hostOk=@($rules | Where-Object { $_.IdentityReference.Value -eq $user.Value -and $_.AccessControlType -eq 'Allow' -and ($_.FileSystemRights -band $full) -eq $full -and ($_.InheritanceFlags -band $inherit) -eq $inherit -and $_.PropagationFlags -eq 'None' }).Count -gt 0
|
|
258
|
+
if ($ok -and $hostOk -and @($rules | Where-Object { $_.AccessControlType -eq 'Deny' }).Count -eq 0) { 'ready'; exit }
|
|
259
|
+
if ($env:EVOLCORE_SESSION_RUNTIME_ACL_REPAIR -eq '1') {
|
|
260
|
+
$users=[System.Security.Principal.SecurityIdentifier]::new('S-1-5-32-545')
|
|
261
|
+
$acl.AddAccessRule([System.Security.AccessControl.FileSystemAccessRule]::new($users,$modify,$inherit,'None','Allow'))
|
|
262
|
+
$acl.AddAccessRule([System.Security.AccessControl.FileSystemAccessRule]::new($user,$full,$inherit,'None','Allow'))
|
|
263
|
+
[System.IO.Directory]::SetAccessControl($env:EVOLCORE_SESSION_RUNTIME_ACL_PATH,$acl)
|
|
264
|
+
}
|
|
254
265
|
`;
|
|
255
|
-
function windowsSessionAclQuery(directory) {
|
|
266
|
+
function windowsSessionAclQuery(directory, repair = false) {
|
|
256
267
|
return {
|
|
257
268
|
command: path.join(process.env.SystemRoot || process.env.WINDIR || 'C:\\Windows', 'System32', 'WindowsPowerShell', 'v1.0', 'powershell.exe'),
|
|
258
269
|
args: ['-NoProfile', '-NonInteractive', '-Command', WINDOWS_SESSION_ACL_CHECK],
|
|
259
|
-
|
|
270
|
+
// Updating an inheritable DACL propagates through existing descendants.
|
|
271
|
+
// Long-lived sessions may contain large worktrees and caches; ten seconds
|
|
272
|
+
// can kill a valid repair before Windows finishes applying it.
|
|
273
|
+
options: { windowsHide: true, timeout: repair ? 60_000 : 2_000,
|
|
274
|
+
env: { ...process.env, EVOLCORE_SESSION_RUNTIME_ACL_PATH: directory, EVOLCORE_SESSION_RUNTIME_ACL_REPAIR: repair ? '1' : '0' } },
|
|
260
275
|
};
|
|
261
276
|
}
|
|
262
277
|
function ensureWindowsSessionRuntimeAccess(directory, existing) {
|
|
@@ -272,13 +287,8 @@ function ensureWindowsSessionRuntimeAccess(directory, existing) {
|
|
|
272
287
|
}
|
|
273
288
|
catch { /* Unknown ACL: retain the original grant and failure behavior. */ }
|
|
274
289
|
}
|
|
275
|
-
const
|
|
276
|
-
execFileSync(
|
|
277
|
-
directory,
|
|
278
|
-
'/grant',
|
|
279
|
-
'*S-1-5-32-545:(OI)(CI)M',
|
|
280
|
-
'/Q',
|
|
281
|
-
], { windowsHide: true, stdio: 'pipe', timeout: 10_000 });
|
|
290
|
+
const repair = windowsSessionAclQuery(directory, true);
|
|
291
|
+
execFileSync(repair.command, repair.args, { ...repair.options, stdio: 'pipe' });
|
|
282
292
|
preparedWindowsSessionRuntimeDirs.add(directory);
|
|
283
293
|
}
|
|
284
294
|
/** Whether a task-provided runtime directory is a stable EvolCore session root. */
|
|
@@ -389,9 +399,9 @@ export async function ensureSessionRuntimeDirAsync(sessionId) {
|
|
|
389
399
|
execFile(query.command, query.args, query.options, (error, stdout) => resolve(!error && String(stdout).trim() === 'ready'));
|
|
390
400
|
});
|
|
391
401
|
if (!alreadyGranted) {
|
|
392
|
-
const
|
|
402
|
+
const repair = windowsSessionAclQuery(directory, true);
|
|
393
403
|
await new Promise((resolve, reject) => {
|
|
394
|
-
execFile(
|
|
404
|
+
execFile(repair.command, repair.args, repair.options, error => error ? reject(error) : resolve());
|
|
395
405
|
});
|
|
396
406
|
}
|
|
397
407
|
preparedWindowsSessionRuntimeDirs.add(directory);
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import fs from 'node:fs';
|
|
3
|
-
import crypto from 'node:crypto';
|
|
4
3
|
import { authorizeLocalCommand } from './task-context.js';
|
|
5
|
-
import {
|
|
4
|
+
import { agentWorkspaceDir, resolvePaths } from '../paths.js';
|
|
6
5
|
import { ipcQuery } from '../ipc.js';
|
|
7
|
-
import { readDelegationCredential
|
|
8
|
-
import { publishOutputCard, removeOutputCard } from '../outputs/cards.js';
|
|
6
|
+
import { readDelegationCredential } from '../core/auth/agent-delegation.js';
|
|
9
7
|
import { readTeamWorkspaceNavigation, upsertTeamWorkspaceNavigation, removeTeamWorkspaceNavigation, updateTeamWorkspaceNavigation, } from '../core/command/team-workspace-store.js';
|
|
10
8
|
import { readTeamMembers, updateTeamMembers } from '../core/command/team-workspace-team.js';
|
|
11
9
|
import { TeamWorkspaceBootstrapService, TeamWorkspaceInitializer } from '../core/command/team-workspace-bootstrap.js';
|
|
@@ -16,10 +14,13 @@ const USAGE = `用法: ec team workspace init [--workspace <绝对路径>]
|
|
|
16
14
|
ec team navigation update --replace-json <entries-json> [--expected-revision <n>]
|
|
17
15
|
ec team members show
|
|
18
16
|
ec team members update --members-json <aids-json>
|
|
19
|
-
ec team cards publish --file <card.json>
|
|
20
|
-
ec team cards remove --id <card-id>
|
|
17
|
+
ec team cards publish --file <card.json> [--expected-version <version>]
|
|
18
|
+
ec team cards remove --id <card-id> [--expected-version <version>]
|
|
19
|
+
ec team cards catalog
|
|
20
|
+
ec team cards schema
|
|
21
|
+
ec team cards validate --file <card.json>
|
|
21
22
|
|
|
22
|
-
所有命令只输出 JSON;cards
|
|
23
|
+
所有命令只输出 JSON;cards 命令支持当前 Agent Owner 的 AUN 私聊或 Owner 授权的后台任务。`;
|
|
23
24
|
class TeamWorkspaceCommandError extends Error {
|
|
24
25
|
code;
|
|
25
26
|
constructor(code, message) {
|
|
@@ -62,22 +63,45 @@ function expectedRevision(args, current) {
|
|
|
62
63
|
return revision;
|
|
63
64
|
}
|
|
64
65
|
function output(value) { process.stdout.write(`${JSON.stringify(value, null, 2)}\n`); }
|
|
65
|
-
async function
|
|
66
|
-
const
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
66
|
+
async function runPanelCards(args) {
|
|
67
|
+
const action = args[1];
|
|
68
|
+
const flags = args.slice(2);
|
|
69
|
+
const allowed = {
|
|
70
|
+
catalog: [], schema: [], validate: ['--file'],
|
|
71
|
+
publish: ['--file', '--expected-version'], remove: ['--id', '--expected-version'],
|
|
72
|
+
};
|
|
73
|
+
if (!Object.hasOwn(allowed, action ?? ''))
|
|
74
|
+
throw new TeamWorkspaceCommandError('INVALID_ARGUMENT', USAGE);
|
|
75
|
+
assertFlags(flags, allowed[action]);
|
|
76
|
+
let draft;
|
|
77
|
+
if (action === 'publish' || action === 'validate') {
|
|
78
|
+
const index = flags.indexOf('--file');
|
|
79
|
+
if (index < 0)
|
|
80
|
+
throw new TeamWorkspaceCommandError('INVALID_ARGUMENT', '--file is required');
|
|
81
|
+
const source = path.resolve(flags[index + 1]);
|
|
82
|
+
try {
|
|
83
|
+
const stat = fs.statSync(source);
|
|
84
|
+
if (!stat.isFile() || stat.size > 32 * 1024)
|
|
85
|
+
throw new Error();
|
|
86
|
+
const bytes = fs.readFileSync(source);
|
|
87
|
+
if (bytes.length > 32 * 1024)
|
|
88
|
+
throw new Error();
|
|
89
|
+
draft = JSON.parse(bytes.toString('utf8'));
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
throw new TeamWorkspaceCommandError('INVALID_CARD', 'Expected a valid card JSON file up to 32 KiB');
|
|
93
|
+
}
|
|
80
94
|
}
|
|
95
|
+
const sessionId = process.env.EVOLCORE_SESSION_ID;
|
|
96
|
+
const delegationToken = readDelegationCredential();
|
|
97
|
+
if (!sessionId || !delegationToken)
|
|
98
|
+
throw new TeamWorkspaceCommandError('NOT_ALLOWED', 'An active task delegation is required');
|
|
99
|
+
const response = await ipcQuery(resolvePaths().socket, {
|
|
100
|
+
type: 'local-command-context', argv: ['team', ...args], sessionId, delegationToken, draft,
|
|
101
|
+
}, 20_000, { throwOnError: false });
|
|
102
|
+
if (!response?.ok)
|
|
103
|
+
throw new TeamWorkspaceCommandError(response?.code ?? 'UNAVAILABLE', response?.error ?? 'Panel cards daemon is unavailable');
|
|
104
|
+
output(response.result);
|
|
81
105
|
}
|
|
82
106
|
function assertOwnerContext(context) {
|
|
83
107
|
if (context.channel !== 'aun' || context.chatType !== 'private' || context.peerRole !== 'owner' || !context.selfAid || !context.peerId) {
|
|
@@ -96,38 +120,12 @@ export async function cmdTeamWorkspace(rawArgs) {
|
|
|
96
120
|
return;
|
|
97
121
|
}
|
|
98
122
|
try {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
if (rawArgs[0] === 'cards' && rawArgs[1] === 'publish') {
|
|
102
|
-
assertFlags(rawArgs.slice(2), ['--file']);
|
|
103
|
-
const fileIndex = rawArgs.indexOf('--file');
|
|
104
|
-
if (rawArgs.length !== 4 || fileIndex < 0)
|
|
105
|
-
throw new TeamWorkspaceCommandError('INVALID_ARGUMENT', USAGE);
|
|
106
|
-
const source = path.resolve(rawArgs[fileIndex + 1]);
|
|
107
|
-
let manifest;
|
|
108
|
-
try {
|
|
109
|
-
manifest = JSON.parse(fs.readFileSync(source, 'utf8'));
|
|
110
|
-
}
|
|
111
|
-
catch {
|
|
112
|
-
throw new TeamWorkspaceCommandError('INVALID_CARD', `Cannot read a valid card JSON file: ${source}`);
|
|
113
|
-
}
|
|
114
|
-
const card = publishOutputCard(context.selfAid, manifest, agentOutputDir);
|
|
115
|
-
const notified = await publishCardChanged(context.selfAid, card.id, card.version);
|
|
116
|
-
output({ ok: true, id: card.id, version: card.version, path: path.relative(agentOutputDir(context.selfAid), path.join(agentOutputDir(context.selfAid), '.cards', `${card.id}.json`)).split(path.sep).join('/'), notified });
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
if (rawArgs[0] === 'cards' && rawArgs[1] === 'remove') {
|
|
120
|
-
assertFlags(rawArgs.slice(2), ['--id']);
|
|
121
|
-
const idIndex = rawArgs.indexOf('--id');
|
|
122
|
-
if (rawArgs.length !== 4 || idIndex < 0)
|
|
123
|
-
throw new TeamWorkspaceCommandError('INVALID_ARGUMENT', USAGE);
|
|
124
|
-
const id = rawArgs[idIndex + 1];
|
|
125
|
-
const removed = removeOutputCard(context.selfAid, id, agentOutputDir);
|
|
126
|
-
const revision = crypto.createHash('sha256').update(`${context.selfAid}:${id}:${Date.now()}`).digest('hex').slice(0, 24);
|
|
127
|
-
const notified = removed && await publishCardChanged(context.selfAid, id, revision);
|
|
128
|
-
output({ ok: true, id, removed, notified: notified || false });
|
|
123
|
+
if (rawArgs[0] === 'cards') {
|
|
124
|
+
await runPanelCards(rawArgs);
|
|
129
125
|
return;
|
|
130
126
|
}
|
|
127
|
+
const context = await authorizeLocalCommand(['team', ...rawArgs]);
|
|
128
|
+
assertOwnerContext(context);
|
|
131
129
|
if (rawArgs[0] === 'workspace' && rawArgs[1] === 'init') {
|
|
132
130
|
const pathIndex = rawArgs.indexOf('--workspace');
|
|
133
131
|
const workspace = pathIndex >= 0 ? rawArgs[pathIndex + 1] : undefined;
|
|
@@ -771,11 +771,12 @@ export async function runThreadCommand(args) {
|
|
|
771
771
|
const cursorNote = setRes?.coveredThroughTs
|
|
772
772
|
? ` 覆盖至 ${new Date(setRes.coveredThroughTs).toLocaleString('zh-CN')}`
|
|
773
773
|
: '';
|
|
774
|
-
|
|
774
|
+
const summaryStatus = setRes?.updated === false ? '未更新(正文和覆盖游标相同)' : '已写入';
|
|
775
|
+
console.log(`✓ summary ${summaryStatus} rev ${setRes?.rev}${cursorNote}`);
|
|
775
776
|
if (setRes?.renamedTo)
|
|
776
777
|
console.log(`✓ 话题已改名: ${setRes.renamedTo}`);
|
|
777
778
|
if (setRes?.renameError)
|
|
778
|
-
console.log(`⚠
|
|
779
|
+
console.log(`⚠ 改名失败(摘要${summaryStatus}): ${setRes.renameError}`);
|
|
779
780
|
}
|
|
780
781
|
else if (subCmd === 'log') {
|
|
781
782
|
const target = resolveRef(ref);
|