@downcity/agent 1.1.10 → 1.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +612 -139
- package/bin/config/Config.d.ts +1 -1
- package/bin/config/Config.d.ts.map +1 -1
- package/bin/config/Config.js +4 -5
- package/bin/config/Config.js.map +1 -1
- package/bin/config/DowncityDefault.d.ts +1 -1
- package/bin/config/DowncitySchema.d.ts +1 -1
- package/bin/config/DowncitySchema.d.ts.map +1 -1
- package/bin/config/Paths.d.ts +1 -1
- package/bin/config/Paths.js +2 -2
- package/bin/host/daemon/Api.d.ts +2 -2
- package/bin/host/daemon/Api.d.ts.map +1 -1
- package/bin/host/daemon/Api.js +1 -1
- package/bin/host/daemon/Client.js +2 -2
- package/bin/host/daemon/Client.js.map +1 -1
- package/bin/host/daemon/Paths.d.ts +20 -0
- package/bin/host/daemon/Paths.d.ts.map +1 -0
- package/bin/host/daemon/Paths.js +23 -0
- package/bin/host/daemon/Paths.js.map +1 -0
- package/bin/host/daemon/ProjectSetup.d.ts +1 -1
- package/bin/host/daemon/ProjectSetup.js +1 -1
- package/bin/host/daemon/ProjectSetup.js.map +1 -1
- package/bin/host/runtime/AgentHostRuntime.d.ts +1 -1
- package/bin/host/runtime/AgentHostRuntime.js +2 -2
- package/bin/host/runtime/PluginRuntime.d.ts +1 -1
- package/bin/host/runtime/PluginRuntime.d.ts.map +1 -1
- package/bin/index.d.ts +59 -77
- package/bin/index.d.ts.map +1 -1
- package/bin/index.js +42 -82
- package/bin/index.js.map +1 -1
- package/bin/model/CreateModel.d.ts +2 -2
- package/bin/model/CreateModel.js +1 -1
- package/bin/model/CreateModel.js.map +1 -1
- package/bin/model/ModelManager.d.ts +1 -1
- package/bin/plugin/builtins/asr/Config.d.ts +43 -0
- package/bin/plugin/builtins/asr/Config.d.ts.map +1 -0
- package/bin/plugin/builtins/asr/Config.js +107 -0
- package/bin/plugin/builtins/asr/Config.js.map +1 -0
- package/bin/plugin/builtins/asr/Dependency.d.ts +1 -1
- package/bin/plugin/builtins/asr/Dependency.d.ts.map +1 -1
- package/bin/plugin/builtins/asr/InboundAugment.d.ts +17 -0
- package/bin/plugin/builtins/asr/InboundAugment.d.ts.map +1 -0
- package/bin/plugin/builtins/asr/InboundAugment.js +47 -0
- package/bin/plugin/builtins/asr/InboundAugment.js.map +1 -0
- package/bin/plugin/builtins/asr/Plugin.d.ts.map +1 -1
- package/bin/plugin/builtins/asr/Plugin.js +3 -126
- package/bin/plugin/builtins/asr/Plugin.js.map +1 -1
- package/bin/plugin/builtins/auth/runtime/AuthorizationConfig.d.ts +1 -1
- package/bin/plugin/builtins/auth/runtime/AuthorizationConfig.d.ts.map +1 -1
- package/bin/plugin/builtins/auth/runtime/AuthorizationPolicy.d.ts +2 -2
- package/bin/plugin/builtins/auth/runtime/AuthorizationStore.d.ts +1 -1
- package/bin/plugin/builtins/auth/runtime/AuthorizationStore.d.ts.map +1 -1
- package/bin/plugin/builtins/skill/Config.d.ts +1 -1
- package/bin/plugin/builtins/skill/runtime/SystemProvider.d.ts +1 -1
- package/bin/plugin/builtins/skill/types/ClaudeSkill.d.ts +1 -1
- package/bin/plugin/builtins/skill/types/ClaudeSkill.d.ts.map +1 -1
- package/bin/plugin/builtins/tts/Dependency.d.ts +1 -1
- package/bin/plugin/builtins/tts/Dependency.d.ts.map +1 -1
- package/bin/plugin/builtins/tts/Plugin.d.ts.map +1 -1
- package/bin/plugin/builtins/tts/Plugin.js +1 -52
- package/bin/plugin/builtins/tts/Plugin.js.map +1 -1
- package/bin/plugin/builtins/tts/PluginSupport.d.ts +25 -0
- package/bin/plugin/builtins/tts/PluginSupport.d.ts.map +1 -0
- package/bin/plugin/builtins/tts/PluginSupport.js +72 -0
- package/bin/plugin/builtins/tts/PluginSupport.js.map +1 -0
- package/bin/plugin/builtins/tts/types/TtsPlugin.d.ts +1 -1
- package/bin/plugin/builtins/tts/types/TtsPlugin.d.ts.map +1 -1
- package/bin/plugin/builtins/voice/Config.d.ts +43 -0
- package/bin/plugin/builtins/voice/Config.d.ts.map +1 -0
- package/bin/plugin/builtins/voice/Config.js +104 -0
- package/bin/plugin/builtins/voice/Config.js.map +1 -0
- package/bin/plugin/builtins/voice/Dependency.d.ts +1 -1
- package/bin/plugin/builtins/voice/Dependency.d.ts.map +1 -1
- package/bin/plugin/builtins/voice/InboundAugment.d.ts +17 -0
- package/bin/plugin/builtins/voice/InboundAugment.d.ts.map +1 -0
- package/bin/plugin/builtins/voice/InboundAugment.js +47 -0
- package/bin/plugin/builtins/voice/InboundAugment.js.map +1 -0
- package/bin/plugin/builtins/voice/Plugin.d.ts.map +1 -1
- package/bin/plugin/builtins/voice/Plugin.js +3 -123
- package/bin/plugin/builtins/voice/Plugin.js.map +1 -1
- package/bin/plugin/builtins/voice/types/VoicePlugin.d.ts +1 -1
- package/bin/plugin/builtins/voice/types/VoicePlugin.d.ts.map +1 -1
- package/bin/plugin/builtins/web/runtime/Source.d.ts +1 -1
- package/bin/plugin/builtins/web/runtime/Source.d.ts.map +1 -1
- package/bin/plugin/builtins/web/types/WebPlugin.d.ts +1 -1
- package/bin/plugin/builtins/web/types/WebPlugin.d.ts.map +1 -1
- package/bin/plugin/builtins/workboard/runtime/Collector.d.ts +1 -1
- package/bin/plugin/builtins/workboard/runtime/Collector.d.ts.map +1 -1
- package/bin/plugin/builtins/workboard/runtime/Collector.js +1 -1
- package/bin/plugin/builtins/workboard/runtime/Collector.js.map +1 -1
- package/bin/plugin/builtins/workboard/runtime/Normalizer.d.ts +2 -2
- package/bin/plugin/builtins/workboard/runtime/Normalizer.d.ts.map +1 -1
- package/bin/plugin/builtins/workboard/runtime/Store.d.ts +1 -1
- package/bin/plugin/builtins/workboard/runtime/Store.d.ts.map +1 -1
- package/bin/plugin/core/Activation.d.ts +2 -2
- package/bin/plugin/core/Activation.d.ts.map +1 -1
- package/bin/plugin/core/HookRegistry.d.ts +2 -2
- package/bin/plugin/core/HookRegistry.d.ts.map +1 -1
- package/bin/plugin/core/HttpRoutes.d.ts +2 -2
- package/bin/plugin/core/HttpRoutes.d.ts.map +1 -1
- package/bin/plugin/core/LocalExecution.d.ts +1 -1
- package/bin/plugin/core/LocalExecution.d.ts.map +1 -1
- package/bin/plugin/core/LocalExecution.js +1 -1
- package/bin/plugin/core/LocalExecution.js.map +1 -1
- package/bin/plugin/core/PluginManager.d.ts +2 -2
- package/bin/plugin/core/PluginManager.js +2 -2
- package/bin/plugin/core/PluginRegistry.d.ts +2 -2
- package/bin/plugin/core/PluginRegistry.d.ts.map +1 -1
- package/bin/plugin/core/ProjectConfigStore.d.ts +1 -1
- package/bin/plugin/types/Plugin.d.ts +5 -5
- package/bin/plugin/types/Plugin.d.ts.map +1 -1
- package/bin/plugin/types/PluginApi.d.ts +1 -1
- package/bin/plugin/types/PluginApi.d.ts.map +1 -1
- package/bin/{agent/project → project}/AgentInitializer.d.ts +2 -2
- package/bin/project/AgentInitializer.d.ts.map +1 -0
- package/bin/{agent/project → project}/AgentInitializer.js +7 -7
- package/bin/project/AgentInitializer.js.map +1 -0
- package/bin/{agent/project → project}/ProjectExecutionBinding.d.ts +2 -2
- package/bin/project/ProjectExecutionBinding.d.ts.map +1 -0
- package/bin/project/ProjectExecutionBinding.js.map +1 -0
- package/bin/{agent/project → project}/types/AgentProject.d.ts +2 -2
- package/bin/project/types/AgentProject.d.ts.map +1 -0
- package/bin/project/types/AgentProject.js.map +1 -0
- package/bin/{agent → runtime}/AgentContext.d.ts +2 -2
- package/bin/runtime/AgentContext.d.ts.map +1 -0
- package/bin/{agent → runtime}/AgentContext.js +1 -1
- package/bin/runtime/AgentContext.js.map +1 -0
- package/bin/{agent → runtime}/AgentContextTypes.d.ts +4 -4
- package/bin/runtime/AgentContextTypes.d.ts.map +1 -0
- package/bin/runtime/AgentContextTypes.js.map +1 -0
- package/bin/{agent → runtime}/AgentRuntime.d.ts +4 -4
- package/bin/runtime/AgentRuntime.d.ts.map +1 -0
- package/bin/{agent → runtime}/AgentRuntime.js +6 -6
- package/bin/runtime/AgentRuntime.js.map +1 -0
- package/bin/{agent → runtime}/AgentRuntimeState.d.ts +3 -3
- package/bin/runtime/AgentRuntimeState.d.ts.map +1 -0
- package/bin/runtime/AgentRuntimeState.js.map +1 -0
- package/bin/{agent → runtime}/AgentRuntimeTypes.d.ts +2 -2
- package/bin/runtime/AgentRuntimeTypes.d.ts.map +1 -0
- package/bin/runtime/AgentRuntimeTypes.js.map +1 -0
- package/bin/sandbox/SandboxConfigResolver.d.ts +1 -1
- package/bin/sandbox/SandboxConfigResolver.d.ts.map +1 -1
- package/bin/sandbox/SandboxRunner.d.ts +1 -1
- package/bin/sandbox/SandboxRunner.d.ts.map +1 -1
- package/bin/{host/sdk → sdk}/Agent.d.ts +17 -12
- package/bin/sdk/Agent.d.ts.map +1 -0
- package/bin/{host/sdk → sdk}/Agent.js +73 -29
- package/bin/sdk/Agent.js.map +1 -0
- package/bin/{host/sdk → sdk}/AgentSdkTypes.d.ts +100 -5
- package/bin/sdk/AgentSdkTypes.d.ts.map +1 -0
- package/bin/sdk/AgentSdkTypes.js.map +1 -0
- package/bin/sdk/AsyncQueue.d.ts.map +1 -0
- package/bin/sdk/AsyncQueue.js.map +1 -0
- package/bin/{host/sdk → sdk}/HttpServer.d.ts +1 -1
- package/bin/sdk/HttpServer.d.ts.map +1 -0
- package/bin/{host/sdk → sdk}/HttpServer.js +8 -0
- package/bin/sdk/HttpServer.js.map +1 -0
- package/bin/sdk/Paths.d.ts.map +1 -0
- package/bin/sdk/Paths.js.map +1 -0
- package/bin/{host/sdk → sdk}/RemoteAgent.d.ts +6 -2
- package/bin/sdk/RemoteAgent.d.ts.map +1 -0
- package/bin/{host/sdk → sdk}/RemoteAgent.js +14 -0
- package/bin/sdk/RemoteAgent.js.map +1 -0
- package/bin/{host/sdk → sdk}/RpcServer.d.ts +1 -1
- package/bin/sdk/RpcServer.d.ts.map +1 -0
- package/bin/{host/sdk → sdk}/RpcServer.js +15 -1
- package/bin/sdk/RpcServer.js.map +1 -0
- package/bin/sdk/SdkSessionSystemComposer.d.ts +106 -0
- package/bin/sdk/SdkSessionSystemComposer.d.ts.map +1 -0
- package/bin/sdk/SdkSessionSystemComposer.js +150 -0
- package/bin/sdk/SdkSessionSystemComposer.js.map +1 -0
- package/bin/{host/sdk → sdk}/Session.d.ts +23 -18
- package/bin/sdk/Session.d.ts.map +1 -0
- package/bin/{host/sdk → sdk}/Session.js +86 -165
- package/bin/sdk/Session.js.map +1 -0
- package/bin/{host/sdk → sdk}/SessionMetadata.d.ts +5 -1
- package/bin/sdk/SessionMetadata.d.ts.map +1 -0
- package/bin/{host/sdk → sdk}/SessionMetadata.js +17 -1
- package/bin/sdk/SessionMetadata.js.map +1 -0
- package/bin/sdk/SessionPersistence.d.ts +63 -0
- package/bin/sdk/SessionPersistence.d.ts.map +1 -0
- package/bin/sdk/SessionPersistence.js +52 -0
- package/bin/sdk/SessionPersistence.js.map +1 -0
- package/bin/sdk/SessionServicePort.d.ts +34 -0
- package/bin/sdk/SessionServicePort.d.ts.map +1 -0
- package/bin/sdk/SessionServicePort.js +36 -0
- package/bin/sdk/SessionServicePort.js.map +1 -0
- package/bin/sdk/StreamEvents.d.ts +36 -0
- package/bin/sdk/StreamEvents.d.ts.map +1 -0
- package/bin/{host/sdk → sdk}/StreamEvents.js +27 -0
- package/bin/sdk/StreamEvents.js.map +1 -0
- package/bin/server/http/Server.d.ts.map +1 -0
- package/bin/{host → server}/http/Server.js +7 -7
- package/bin/server/http/Server.js.map +1 -0
- package/bin/server/http/auth/AuthEnv.d.ts.map +1 -0
- package/bin/server/http/auth/AuthEnv.js.map +1 -0
- package/bin/server/http/auth/AuthError.d.ts.map +1 -0
- package/bin/server/http/auth/AuthError.js.map +1 -0
- package/bin/server/http/auth/CliAuthStateStore.d.ts.map +1 -0
- package/bin/server/http/auth/CliAuthStateStore.js.map +1 -0
- package/bin/server/http/auth/PasswordHasher.d.ts.map +1 -0
- package/bin/server/http/auth/PasswordHasher.js.map +1 -0
- package/bin/server/http/auth/TokenService.d.ts.map +1 -0
- package/bin/server/http/auth/TokenService.js.map +1 -0
- package/bin/{host → server}/http/control/AuthControlService.d.ts +2 -2
- package/bin/server/http/control/AuthControlService.d.ts.map +1 -0
- package/bin/server/http/control/AuthControlService.js.map +1 -0
- package/bin/server/http/control/CommonHelpers.d.ts.map +1 -0
- package/bin/server/http/control/CommonHelpers.js.map +1 -0
- package/bin/{host → server}/http/control/ControlApiRoutes.d.ts +1 -1
- package/bin/server/http/control/ControlApiRoutes.d.ts.map +1 -0
- package/bin/{host → server}/http/control/ControlApiRoutes.js +5 -5
- package/bin/server/http/control/ControlApiRoutes.js.map +1 -0
- package/bin/{host → server}/http/control/ControlAuthorizationRoutes.d.ts +1 -1
- package/bin/server/http/control/ControlAuthorizationRoutes.d.ts.map +1 -0
- package/bin/{host → server}/http/control/ControlAuthorizationRoutes.js +2 -2
- package/bin/server/http/control/ControlAuthorizationRoutes.js.map +1 -0
- package/bin/{host → server}/http/control/ControlRouter.d.ts +1 -1
- package/bin/server/http/control/ControlRouter.d.ts.map +1 -0
- package/bin/{host → server}/http/control/ControlRouter.js +3 -3
- package/bin/server/http/control/ControlRouter.js.map +1 -0
- package/bin/{host → server}/http/control/ExecuteBySession.d.ts +3 -3
- package/bin/server/http/control/ExecuteBySession.d.ts.map +1 -0
- package/bin/server/http/control/ExecuteBySession.js.map +1 -0
- package/bin/{host → server}/http/control/ExecuteInput.d.ts +1 -1
- package/bin/server/http/control/ExecuteInput.d.ts.map +1 -0
- package/bin/server/http/control/ExecuteInput.js.map +1 -0
- package/bin/server/http/control/Helpers.d.ts.map +1 -0
- package/bin/{host/http/control/Helpers.d.ts.map → server/http/control/Helpers.js.map} +1 -1
- package/bin/{host → server}/http/control/MessageTimeline.d.ts +1 -1
- package/bin/server/http/control/MessageTimeline.d.ts.map +1 -0
- package/bin/server/http/control/MessageTimeline.js.map +1 -0
- package/bin/{host → server}/http/control/ModelRoutes.d.ts +1 -1
- package/bin/server/http/control/ModelRoutes.d.ts.map +1 -0
- package/bin/{host → server}/http/control/ModelRoutes.js +1 -1
- package/bin/server/http/control/ModelRoutes.js.map +1 -0
- package/bin/{host → server}/http/control/OverviewRoutes.d.ts +1 -1
- package/bin/server/http/control/OverviewRoutes.d.ts.map +1 -0
- package/bin/server/http/control/OverviewRoutes.js.map +1 -0
- package/bin/{host → server}/http/control/SessionRoutes.d.ts +1 -1
- package/bin/server/http/control/SessionRoutes.d.ts.map +1 -0
- package/bin/server/http/control/SessionRoutes.js.map +1 -0
- package/bin/{host → server}/http/control/SessionSummaryStore.d.ts +2 -2
- package/bin/server/http/control/SessionSummaryStore.d.ts.map +1 -0
- package/bin/server/http/control/SessionSummaryStore.js.map +1 -0
- package/bin/{host → server}/http/control/TaskRoutes.d.ts +1 -1
- package/bin/server/http/control/TaskRoutes.d.ts.map +1 -0
- package/bin/server/http/control/TaskRoutes.js.map +1 -0
- package/bin/{host → server}/http/control/TaskStore.d.ts +1 -1
- package/bin/server/http/control/TaskStore.d.ts.map +1 -0
- package/bin/server/http/control/TaskStore.js.map +1 -0
- package/bin/server/http/control/types/AuthControl.d.ts.map +1 -0
- package/bin/server/http/control/types/AuthControl.js.map +1 -0
- package/bin/{host → server}/http/control/types/ControlRoutes.d.ts +2 -2
- package/bin/server/http/control/types/ControlRoutes.d.ts.map +1 -0
- package/bin/server/http/control/types/ControlRoutes.js.map +1 -0
- package/bin/server/http/control/types/ControlSessionExecute.d.ts.map +1 -0
- package/bin/server/http/control/types/ControlSessionExecute.js.map +1 -0
- package/bin/{host → server}/http/control/types/ControlViewData.d.ts +1 -1
- package/bin/server/http/control/types/ControlViewData.d.ts.map +1 -0
- package/bin/server/http/control/types/ControlViewData.js.map +1 -0
- package/bin/server/http/execute/execute.d.ts.map +1 -0
- package/bin/{host → server}/http/execute/execute.js +1 -1
- package/bin/server/http/execute/execute.js.map +1 -0
- package/bin/server/http/health/health.d.ts.map +1 -0
- package/bin/server/http/health/health.js.map +1 -0
- package/bin/server/http/plugins/plugins.d.ts.map +1 -0
- package/bin/{host → server}/http/plugins/plugins.js +1 -1
- package/bin/server/http/plugins/plugins.js.map +1 -0
- package/bin/server/http/services/services.d.ts.map +1 -0
- package/bin/{host → server}/http/services/services.js +1 -1
- package/bin/server/http/services/services.js.map +1 -0
- package/bin/server/http/static/static.d.ts.map +1 -0
- package/bin/{host → server}/http/static/static.js +1 -1
- package/bin/server/http/static/static.js.map +1 -0
- package/bin/{host → server}/rpc/Server.d.ts +3 -3
- package/bin/server/rpc/Server.d.ts.map +1 -0
- package/bin/{host → server}/rpc/Server.js +2 -2
- package/bin/server/rpc/Server.js.map +1 -0
- package/bin/service/builtins/BaseService.d.ts +2 -2
- package/bin/service/builtins/BaseService.d.ts.map +1 -1
- package/bin/service/builtins/chat/Action.d.ts +1 -1
- package/bin/service/builtins/chat/Action.d.ts.map +1 -1
- package/bin/service/builtins/chat/ChatService.d.ts +3 -3
- package/bin/service/builtins/chat/ChatService.d.ts.map +1 -1
- package/bin/service/builtins/chat/ChatServiceTypes.d.ts +2 -2
- package/bin/service/builtins/chat/ChatServiceTypes.d.ts.map +1 -1
- package/bin/service/builtins/chat/accounts/ChannelAccountService.d.ts +1 -1
- package/bin/service/builtins/chat/channels/BaseChatChannel.d.ts +1 -1
- package/bin/service/builtins/chat/channels/BaseChatChannel.d.ts.map +1 -1
- package/bin/service/builtins/chat/channels/BaseChatChannelQueue.d.ts +1 -1
- package/bin/service/builtins/chat/channels/BaseChatChannelQueue.d.ts.map +1 -1
- package/bin/service/builtins/chat/channels/BaseChatChannelSupport.d.ts +2 -2
- package/bin/service/builtins/chat/channels/BaseChatChannelSupport.d.ts.map +1 -1
- package/bin/service/builtins/chat/channels/feishu/Feishu.d.ts +1 -1
- package/bin/service/builtins/chat/channels/feishu/Feishu.d.ts.map +1 -1
- package/bin/service/builtins/chat/channels/feishu/Feishu.js +39 -171
- package/bin/service/builtins/chat/channels/feishu/Feishu.js.map +1 -1
- package/bin/service/builtins/chat/channels/feishu/FeishuMessageHandler.d.ts +155 -0
- package/bin/service/builtins/chat/channels/feishu/FeishuMessageHandler.d.ts.map +1 -0
- package/bin/service/builtins/chat/channels/feishu/FeishuMessageHandler.js +247 -0
- package/bin/service/builtins/chat/channels/feishu/FeishuMessageHandler.js.map +1 -0
- package/bin/service/builtins/chat/channels/feishu/FeishuPlatformClient.d.ts +1 -1
- package/bin/service/builtins/chat/channels/feishu/FeishuPlatformClient.d.ts.map +1 -1
- package/bin/service/builtins/chat/channels/feishu/FeishuPlatformLookup.d.ts +1 -1
- package/bin/service/builtins/chat/channels/feishu/FeishuPlatformLookup.d.ts.map +1 -1
- package/bin/service/builtins/chat/channels/feishu/types/FeishuChannel.d.ts +1 -1
- package/bin/service/builtins/chat/channels/feishu/types/FeishuChannel.js +1 -1
- package/bin/service/builtins/chat/channels/qq/QQ.d.ts +5 -5
- package/bin/service/builtins/chat/channels/qq/QQ.d.ts.map +1 -1
- package/bin/service/builtins/chat/channels/qq/QQ.js +33 -231
- package/bin/service/builtins/chat/channels/qq/QQ.js.map +1 -1
- package/bin/service/builtins/chat/channels/qq/QQGatewayClient.d.ts +0 -24
- package/bin/service/builtins/chat/channels/qq/QQGatewayClient.d.ts.map +1 -1
- package/bin/service/builtins/chat/channels/qq/QQGatewayClient.js +68 -227
- package/bin/service/builtins/chat/channels/qq/QQGatewayClient.js.map +1 -1
- package/bin/service/builtins/chat/channels/qq/QQGatewayConnection.d.ts +65 -0
- package/bin/service/builtins/chat/channels/qq/QQGatewayConnection.d.ts.map +1 -0
- package/bin/service/builtins/chat/channels/qq/QQGatewayConnection.js +110 -0
- package/bin/service/builtins/chat/channels/qq/QQGatewayConnection.js.map +1 -0
- package/bin/service/builtins/chat/channels/qq/QQGatewayHeartbeat.d.ts +59 -0
- package/bin/service/builtins/chat/channels/qq/QQGatewayHeartbeat.d.ts.map +1 -0
- package/bin/service/builtins/chat/channels/qq/QQGatewayHeartbeat.js +58 -0
- package/bin/service/builtins/chat/channels/qq/QQGatewayHeartbeat.js.map +1 -0
- package/bin/service/builtins/chat/channels/qq/QQGatewayProtocol.d.ts +86 -0
- package/bin/service/builtins/chat/channels/qq/QQGatewayProtocol.d.ts.map +1 -0
- package/bin/service/builtins/chat/channels/qq/QQGatewayProtocol.js +93 -0
- package/bin/service/builtins/chat/channels/qq/QQGatewayProtocol.js.map +1 -0
- package/bin/service/builtins/chat/channels/qq/QQMessageHandler.d.ts +129 -0
- package/bin/service/builtins/chat/channels/qq/QQMessageHandler.d.ts.map +1 -0
- package/bin/service/builtins/chat/channels/qq/QQMessageHandler.js +284 -0
- package/bin/service/builtins/chat/channels/qq/QQMessageHandler.js.map +1 -0
- package/bin/service/builtins/chat/channels/qq/QQSupport.d.ts +2 -2
- package/bin/service/builtins/chat/channels/qq/QQSupport.d.ts.map +1 -1
- package/bin/service/builtins/chat/channels/qq/types/QqChannel.d.ts +2 -2
- package/bin/service/builtins/chat/channels/qq/types/QqChannel.d.ts.map +1 -1
- package/bin/service/builtins/chat/channels/qq/types/QqChannel.js +1 -1
- package/bin/service/builtins/chat/channels/telegram/Bot.d.ts +1 -1
- package/bin/service/builtins/chat/channels/telegram/Bot.d.ts.map +1 -1
- package/bin/service/builtins/chat/channels/telegram/Bot.js +35 -293
- package/bin/service/builtins/chat/channels/telegram/Bot.js.map +1 -1
- package/bin/service/builtins/chat/channels/telegram/TelegramMessageHandler.d.ts +142 -0
- package/bin/service/builtins/chat/channels/telegram/TelegramMessageHandler.d.ts.map +1 -0
- package/bin/service/builtins/chat/channels/telegram/TelegramMessageHandler.js +267 -0
- package/bin/service/builtins/chat/channels/telegram/TelegramMessageHandler.js.map +1 -0
- package/bin/service/builtins/chat/channels/telegram/TelegramPendingUpdates.d.ts +55 -0
- package/bin/service/builtins/chat/channels/telegram/TelegramPendingUpdates.d.ts.map +1 -0
- package/bin/service/builtins/chat/channels/telegram/TelegramPendingUpdates.js +125 -0
- package/bin/service/builtins/chat/channels/telegram/TelegramPendingUpdates.js.map +1 -0
- package/bin/service/builtins/chat/channels/telegram/TelegramPlatformClient.d.ts +1 -1
- package/bin/service/builtins/chat/channels/telegram/TelegramPlatformClient.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChannelContextStore.d.ts +1 -1
- package/bin/service/builtins/chat/runtime/ChannelContextStore.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatActionExecution.d.ts +2 -2
- package/bin/service/builtins/chat/runtime/ChatActionExecution.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatActionInput.d.ts +3 -11
- package/bin/service/builtins/chat/runtime/ChatActionInput.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatActionInput.js +3 -232
- package/bin/service/builtins/chat/runtime/ChatActionInput.js.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatActionInputSupport.d.ts +33 -0
- package/bin/service/builtins/chat/runtime/ChatActionInputSupport.d.ts.map +1 -0
- package/bin/service/builtins/chat/runtime/ChatActionInputSupport.js +66 -0
- package/bin/service/builtins/chat/runtime/ChatActionInputSupport.js.map +1 -0
- package/bin/service/builtins/chat/runtime/ChatChannelActions.d.ts +1 -1
- package/bin/service/builtins/chat/runtime/ChatChannelActions.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatChannelConfig.d.ts +3 -3
- package/bin/service/builtins/chat/runtime/ChatChannelConfig.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatChannelCore.d.ts +2 -2
- package/bin/service/builtins/chat/runtime/ChatChannelCore.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatChannelLifecycle.d.ts +1 -1
- package/bin/service/builtins/chat/runtime/ChatChannelLifecycle.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatHistoryStore.d.ts +2 -2
- package/bin/service/builtins/chat/runtime/ChatHistoryStore.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatIngressStore.d.ts +2 -2
- package/bin/service/builtins/chat/runtime/ChatIngressStore.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatMetaStore.d.ts +3 -3
- package/bin/service/builtins/chat/runtime/ChatMetaStore.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatMetaStore.js +2 -2
- package/bin/service/builtins/chat/runtime/ChatQueueReplyDispatch.d.ts +1 -1
- package/bin/service/builtins/chat/runtime/ChatQueueReplyDispatch.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatQueueSessionBridge.d.ts +2 -2
- package/bin/service/builtins/chat/runtime/ChatQueueSessionBridge.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatQueueStore.d.ts +1 -1
- package/bin/service/builtins/chat/runtime/ChatQueueStore.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatQueueWorker.d.ts +1 -1
- package/bin/service/builtins/chat/runtime/ChatQueueWorker.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatSendActionInput.d.ts +23 -0
- package/bin/service/builtins/chat/runtime/ChatSendActionInput.d.ts.map +1 -0
- package/bin/service/builtins/chat/runtime/ChatSendActionInput.js +205 -0
- package/bin/service/builtins/chat/runtime/ChatSendActionInput.js.map +1 -0
- package/bin/service/builtins/chat/runtime/ChatServiceSystem.d.ts +1 -1
- package/bin/service/builtins/chat/runtime/ChatServiceSystem.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatSessionDelete.d.ts +1 -1
- package/bin/service/builtins/chat/runtime/ChatSessionDelete.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatkeySend.d.ts +2 -2
- package/bin/service/builtins/chat/runtime/ChatkeySend.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatkeySend.js +1 -1
- package/bin/service/builtins/chat/runtime/EnqueueDispatch.d.ts +1 -1
- package/bin/service/builtins/chat/runtime/EnqueueDispatch.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/InboundAugment.d.ts +1 -1
- package/bin/service/builtins/chat/runtime/InboundAugment.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/PluginDispatch.d.ts +1 -1
- package/bin/service/builtins/chat/runtime/PluginDispatch.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ReplyContextFormatter.d.ts +1 -1
- package/bin/service/builtins/chat/runtime/ReplyContextFormatter.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ReplyDispatch.d.ts +1 -1
- package/bin/service/builtins/chat/runtime/ReplyDispatch.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/SystemPrompt.d.ts +1 -1
- package/bin/service/builtins/chat/runtime/SystemPrompt.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/UIMessageTransformer.d.ts +1 -1
- package/bin/service/builtins/chat/runtime/UIMessageTransformer.d.ts.map +1 -1
- package/bin/service/builtins/chat/types/ChannelAccount.d.ts +1 -1
- package/bin/service/builtins/chat/types/ChatHistory.d.ts +1 -1
- package/bin/service/builtins/chat/types/ChatHistory.d.ts.map +1 -1
- package/bin/service/builtins/chat/types/ChatMeta.d.ts +1 -1
- package/bin/service/builtins/chat/types/ChatMeta.js +1 -1
- package/bin/service/builtins/chat/types/ChatQueue.d.ts +1 -1
- package/bin/service/builtins/chat/types/ChatQueue.d.ts.map +1 -1
- package/bin/service/builtins/chat/types/ChatService.d.ts +1 -1
- package/bin/service/builtins/chat/types/ChatService.d.ts.map +1 -1
- package/bin/service/builtins/contact/Action.d.ts +57 -4
- package/bin/service/builtins/contact/Action.d.ts.map +1 -1
- package/bin/service/builtins/contact/Action.js +272 -4
- package/bin/service/builtins/contact/Action.js.map +1 -1
- package/bin/service/builtins/contact/ContactService.d.ts +1 -1
- package/bin/service/builtins/contact/ContactService.d.ts.map +1 -1
- package/bin/service/builtins/contact/ContactService.js +19 -293
- package/bin/service/builtins/contact/ContactService.js.map +1 -1
- package/bin/service/builtins/contact/runtime/ChatRuntime.d.ts +1 -1
- package/bin/service/builtins/contact/runtime/ChatRuntime.d.ts.map +1 -1
- package/bin/service/builtins/contact/runtime/ContactPayload.d.ts +24 -0
- package/bin/service/builtins/contact/runtime/ContactPayload.d.ts.map +1 -0
- package/bin/service/builtins/contact/runtime/ContactPayload.js +32 -0
- package/bin/service/builtins/contact/runtime/ContactPayload.js.map +1 -0
- package/bin/service/builtins/contact/runtime/RemoteClient.d.ts +1 -1
- package/bin/service/builtins/contact/runtime/RemoteClient.d.ts.map +1 -1
- package/bin/service/builtins/contact/runtime/ShareBundle.d.ts +1 -1
- package/bin/service/builtins/contact/runtime/ShareBundle.d.ts.map +1 -1
- package/bin/service/builtins/memory/Action.d.ts +2 -2
- package/bin/service/builtins/memory/Action.d.ts.map +1 -1
- package/bin/service/builtins/memory/MemoryService.d.ts +1 -1
- package/bin/service/builtins/memory/MemoryService.d.ts.map +1 -1
- package/bin/service/builtins/memory/runtime/Flush.d.ts +1 -1
- package/bin/service/builtins/memory/runtime/Flush.d.ts.map +1 -1
- package/bin/service/builtins/memory/runtime/Search.d.ts +1 -1
- package/bin/service/builtins/memory/runtime/Search.d.ts.map +1 -1
- package/bin/service/builtins/memory/runtime/Store.d.ts +1 -1
- package/bin/service/builtins/memory/runtime/Store.d.ts.map +1 -1
- package/bin/service/builtins/memory/runtime/SystemProvider.d.ts +1 -1
- package/bin/service/builtins/memory/runtime/SystemProvider.d.ts.map +1 -1
- package/bin/service/builtins/memory/runtime/Writer.d.ts +1 -1
- package/bin/service/builtins/memory/runtime/Writer.d.ts.map +1 -1
- package/bin/service/builtins/memory/types/Memory.d.ts +1 -1
- package/bin/service/builtins/memory/types/Memory.d.ts.map +1 -1
- package/bin/service/builtins/shell/ShellRuntimeTypes.d.ts +1 -1
- package/bin/service/builtins/shell/ShellRuntimeTypes.d.ts.map +1 -1
- package/bin/service/builtins/shell/ShellService.d.ts +2 -2
- package/bin/service/builtins/shell/ShellService.d.ts.map +1 -1
- package/bin/service/builtins/shell/runtime/ShellActionResponse.d.ts +52 -0
- package/bin/service/builtins/shell/runtime/ShellActionResponse.d.ts.map +1 -0
- package/bin/service/builtins/shell/runtime/ShellActionResponse.js +73 -0
- package/bin/service/builtins/shell/runtime/ShellActionResponse.js.map +1 -0
- package/bin/service/builtins/shell/runtime/ShellActionRuntime.d.ts +1 -1
- package/bin/service/builtins/shell/runtime/ShellActionRuntime.d.ts.map +1 -1
- package/bin/service/builtins/shell/runtime/ShellActionRuntime.js +3 -26
- package/bin/service/builtins/shell/runtime/ShellActionRuntime.js.map +1 -1
- package/bin/service/builtins/shell/runtime/ShellActionRuntimeSupport.d.ts +4 -32
- package/bin/service/builtins/shell/runtime/ShellActionRuntimeSupport.d.ts.map +1 -1
- package/bin/service/builtins/shell/runtime/ShellActionRuntimeSupport.js +3 -131
- package/bin/service/builtins/shell/runtime/ShellActionRuntimeSupport.js.map +1 -1
- package/bin/service/builtins/shell/runtime/ShellProcessEvents.d.ts +22 -0
- package/bin/service/builtins/shell/runtime/ShellProcessEvents.d.ts.map +1 -0
- package/bin/service/builtins/shell/runtime/ShellProcessEvents.js +41 -0
- package/bin/service/builtins/shell/runtime/ShellProcessEvents.js.map +1 -0
- package/bin/service/builtins/shell/runtime/ShellRuntimeEnvironment.d.ts +21 -0
- package/bin/service/builtins/shell/runtime/ShellRuntimeEnvironment.d.ts.map +1 -0
- package/bin/service/builtins/shell/runtime/ShellRuntimeEnvironment.js +75 -0
- package/bin/service/builtins/shell/runtime/ShellRuntimeEnvironment.js.map +1 -0
- package/bin/service/builtins/task/Action.d.ts +1 -1
- package/bin/service/builtins/task/Action.d.ts.map +1 -1
- package/bin/service/builtins/task/Scheduler.d.ts +1 -1
- package/bin/service/builtins/task/Scheduler.d.ts.map +1 -1
- package/bin/service/builtins/task/TaskService.d.ts +2 -2
- package/bin/service/builtins/task/TaskService.d.ts.map +1 -1
- package/bin/service/builtins/task/runtime/CronRuntime.d.ts +1 -1
- package/bin/service/builtins/task/runtime/CronRuntime.d.ts.map +1 -1
- package/bin/service/builtins/task/runtime/Model.d.ts +1 -1
- package/bin/service/builtins/task/runtime/Model.d.ts.map +1 -1
- package/bin/service/builtins/task/runtime/Paths.d.ts +1 -1
- package/bin/service/builtins/task/runtime/Paths.js +1 -1
- package/bin/service/builtins/task/runtime/Runner.d.ts +1 -1
- package/bin/service/builtins/task/runtime/Runner.d.ts.map +1 -1
- package/bin/service/builtins/task/runtime/Runner.js +17 -64
- package/bin/service/builtins/task/runtime/Runner.js.map +1 -1
- package/bin/service/builtins/task/runtime/TaskActionExecution.d.ts +1 -1
- package/bin/service/builtins/task/runtime/TaskActionExecution.d.ts.map +1 -1
- package/bin/service/builtins/task/runtime/TaskActionInput.d.ts +1 -1
- package/bin/service/builtins/task/runtime/TaskActionInput.d.ts.map +1 -1
- package/bin/service/builtins/task/runtime/TaskRunChatDispatch.d.ts +1 -1
- package/bin/service/builtins/task/runtime/TaskRunChatDispatch.d.ts.map +1 -1
- package/bin/service/builtins/task/runtime/TaskRunnerRound.d.ts +2 -2
- package/bin/service/builtins/task/runtime/TaskRunnerRound.d.ts.map +1 -1
- package/bin/service/builtins/task/runtime/TaskRunnerRound.js +1 -1
- package/bin/service/builtins/task/runtime/TaskRunnerRound.js.map +1 -1
- package/bin/service/builtins/task/runtime/TaskRunnerScript.d.ts +81 -0
- package/bin/service/builtins/task/runtime/TaskRunnerScript.d.ts.map +1 -0
- package/bin/service/builtins/task/runtime/TaskRunnerScript.js +96 -0
- package/bin/service/builtins/task/runtime/TaskRunnerScript.js.map +1 -0
- package/bin/service/builtins/task/runtime/TaskRunnerSession.d.ts +1 -1
- package/bin/service/builtins/task/runtime/TaskRunnerSession.d.ts.map +1 -1
- package/bin/service/core/Manager.d.ts +3 -3
- package/bin/service/core/Manager.js +3 -3
- package/bin/service/core/ServiceActionApi.d.ts +1 -1
- package/bin/service/core/ServiceActionApi.d.ts.map +1 -1
- package/bin/service/core/ServiceActionRunner.d.ts +2 -2
- package/bin/service/core/ServiceActionRunner.d.ts.map +1 -1
- package/bin/service/core/ServiceClassRegistry.d.ts +1 -1
- package/bin/service/core/ServiceClassRegistry.d.ts.map +1 -1
- package/bin/service/core/ServiceManager.d.ts +2 -2
- package/bin/service/core/ServiceManager.js +2 -2
- package/bin/service/core/ServiceStateController.d.ts +1 -1
- package/bin/service/core/ServiceStateController.d.ts.map +1 -1
- package/bin/service/core/ServiceStateController.js +1 -1
- package/bin/service/core/ServiceStateController.js.map +1 -1
- package/bin/service/core/ServiceSystemProviders.d.ts +1 -1
- package/bin/service/core/ServiceSystemProviders.d.ts.map +1 -1
- package/bin/service/core/Services.d.ts +1 -1
- package/bin/service/core/Services.d.ts.map +1 -1
- package/bin/service/schedule/Executor.d.ts +1 -1
- package/bin/service/schedule/Executor.d.ts.map +1 -1
- package/bin/service/schedule/Runtime.d.ts +1 -1
- package/bin/service/schedule/Runtime.d.ts.map +1 -1
- package/bin/service/types/Service.d.ts +2 -2
- package/bin/service/types/Service.d.ts.map +1 -1
- package/bin/service/types/ServiceSchedule.d.ts +1 -1
- package/bin/service/types/ServiceSchedule.d.ts.map +1 -1
- package/bin/service/types/ServiceState.d.ts +1 -1
- package/bin/service/types/ServiceState.js +1 -1
- package/bin/service/types/Services.d.ts +1 -1
- package/bin/service/types/Services.d.ts.map +1 -1
- package/bin/session/Session.d.ts +1 -1
- package/bin/session/Session.d.ts.map +1 -1
- package/bin/session/composer/history/SessionHistoryWriter.d.ts +1 -1
- package/bin/session/composer/history/SessionHistoryWriter.d.ts.map +1 -1
- package/bin/session/composer/system/default/DefaultSessionSystemComposer.d.ts +1 -1
- package/bin/session/composer/system/default/DefaultSessionSystemComposer.d.ts.map +1 -1
- package/bin/session/composer/system/default/SystemDomain.d.ts +1 -1
- package/bin/session/composer/system/default/SystemDomain.d.ts.map +1 -1
- package/bin/session/executors/local/LocalSessionCore.d.ts +1 -9
- package/bin/session/executors/local/LocalSessionCore.d.ts.map +1 -1
- package/bin/session/executors/local/LocalSessionCore.js +8 -392
- package/bin/session/executors/local/LocalSessionCore.js.map +1 -1
- package/bin/session/executors/local/SessionExecutionError.d.ts +26 -0
- package/bin/session/executors/local/SessionExecutionError.d.ts.map +1 -0
- package/bin/session/executors/local/SessionExecutionError.js +34 -0
- package/bin/session/executors/local/SessionExecutionError.js.map +1 -0
- package/bin/session/executors/local/SessionModelMessageState.d.ts +63 -0
- package/bin/session/executors/local/SessionModelMessageState.d.ts.map +1 -0
- package/bin/session/executors/local/SessionModelMessageState.js +90 -0
- package/bin/session/executors/local/SessionModelMessageState.js.map +1 -0
- package/bin/session/executors/local/SessionSignals.d.ts +1 -1
- package/bin/session/executors/local/SessionSignals.d.ts.map +1 -1
- package/bin/session/executors/local/SessionToolLoopRunner.d.ts +44 -0
- package/bin/session/executors/local/SessionToolLoopRunner.d.ts.map +1 -0
- package/bin/session/executors/local/SessionToolLoopRunner.js +261 -0
- package/bin/session/executors/local/SessionToolLoopRunner.js.map +1 -0
- package/bin/session/executors/local/SessionUiStreamCollector.d.ts +33 -0
- package/bin/session/executors/local/SessionUiStreamCollector.d.ts.map +1 -0
- package/bin/session/executors/local/SessionUiStreamCollector.js +64 -0
- package/bin/session/executors/local/SessionUiStreamCollector.js.map +1 -0
- package/bin/session/tools/shell/ShellToolBridge.d.ts +2 -2
- package/bin/session/tools/shell/ShellToolBridge.d.ts.map +1 -1
- package/bin/session/tools/shell/ShellToolDefinition.d.ts +1 -1
- package/bin/session/tools/shell/ShellToolDefinition.d.ts.map +1 -1
- package/bin/session/tools/shell/ShellToolFormatting.js +1 -1
- package/bin/session/tools/shell/ShellToolFormatting.js.map +1 -1
- package/bin/session/types/SessionHistoryMeta.d.ts +2 -0
- package/bin/session/types/SessionHistoryMeta.d.ts.map +1 -1
- package/bin/session/types/SessionMessages.d.ts +1 -1
- package/bin/session/types/SessionMessages.d.ts.map +1 -1
- package/bin/transport/rpc/Client.d.ts.map +1 -0
- package/bin/transport/rpc/Client.js.map +1 -0
- package/bin/transport/rpc/Paths.d.ts.map +1 -0
- package/bin/{host → transport}/rpc/Paths.js +21 -2
- package/bin/transport/rpc/Paths.js.map +1 -0
- package/bin/transport/rpc/Transport.d.ts.map +1 -0
- package/bin/transport/rpc/Transport.js.map +1 -0
- package/bin/types/auth/AuthPermission.d.ts.map +1 -0
- package/bin/types/auth/AuthPermission.js.map +1 -0
- package/bin/types/auth/AuthRoute.d.ts.map +1 -0
- package/bin/types/auth/AuthRoute.js.map +1 -0
- package/bin/types/auth/AuthToken.d.ts.map +1 -0
- package/bin/types/auth/AuthToken.js.map +1 -0
- package/bin/types/auth/AuthTypes.d.ts.map +1 -0
- package/bin/types/auth/AuthTypes.js.map +1 -0
- package/bin/types/common/Json.d.ts.map +1 -0
- package/bin/types/common/Json.js.map +1 -0
- package/bin/types/common/Template.d.ts.map +1 -0
- package/bin/types/common/Template.js.map +1 -0
- package/bin/{config/types → types/config}/DowncityConfig.d.ts +3 -3
- package/bin/{config/types → types/config}/DowncityConfig.d.ts.map +1 -1
- package/bin/types/config/DowncityConfig.js.map +1 -0
- package/bin/{config/types → types/config}/ExecutionBinding.d.ts.map +1 -1
- package/bin/types/config/ExecutionBinding.js.map +1 -0
- package/bin/{config/types → types/config}/LlmConfig.d.ts.map +1 -1
- package/bin/types/config/LlmConfig.js.map +1 -0
- package/bin/{config/types → types/config}/ModelBinding.d.ts.map +1 -1
- package/bin/types/config/ModelBinding.js.map +1 -0
- package/bin/{config/types → types/config}/Start.d.ts.map +1 -1
- package/bin/types/config/Start.js.map +1 -0
- package/bin/{host/daemon/types → types/daemon}/Daemon.d.ts +1 -1
- package/bin/types/daemon/Daemon.d.ts.map +1 -0
- package/bin/{host/daemon/types → types/daemon}/Daemon.js +1 -1
- package/bin/types/daemon/Daemon.js.map +1 -0
- package/bin/{host/types → types/host}/AgentHost.d.ts +6 -6
- package/bin/{host/types → types/host}/AgentHost.d.ts.map +1 -1
- package/bin/types/host/AgentHost.js +10 -0
- package/bin/types/host/AgentHost.js.map +1 -0
- package/bin/{host/types → types/host}/Store.d.ts +1 -1
- package/bin/{host/types → types/host}/Store.d.ts.map +1 -1
- package/bin/{host/types → types/host}/Store.js.map +1 -1
- package/bin/types/http/InlineInstant.d.ts.map +1 -0
- package/bin/types/http/InlineInstant.js.map +1 -0
- package/bin/types/platform/Platform.d.ts.map +1 -0
- package/bin/types/platform/Platform.js.map +1 -0
- package/bin/types/platform/PlatformGateway.d.ts.map +1 -0
- package/bin/types/platform/PlatformGateway.js.map +1 -0
- package/bin/{host/rpc/types → types/rpc}/LocalRpc.d.ts +2 -2
- package/bin/types/rpc/LocalRpc.d.ts.map +1 -0
- package/bin/types/rpc/LocalRpc.js.map +1 -0
- package/bin/utils/Template.d.ts +1 -1
- package/bin/utils/Template.d.ts.map +1 -1
- package/bin/utils/logger/Fetch.d.ts +1 -1
- package/bin/utils/logger/Fetch.d.ts.map +1 -1
- package/bin/utils/logger/FormatRequest.d.ts +1 -1
- package/bin/utils/logger/FormatRequest.d.ts.map +1 -1
- package/bin/utils/logger/FormatRequest.js +1 -1
- package/bin/utils/logger/FormatRequest.js.map +1 -1
- package/bin/utils/logger/FormatResponse.d.ts +1 -1
- package/bin/utils/logger/FormatResponse.d.ts.map +1 -1
- package/bin/utils/logger/FormatShared.d.ts +1 -1
- package/bin/utils/logger/FormatShared.d.ts.map +1 -1
- package/bin/utils/logger/Logger.d.ts +1 -1
- package/bin/utils/logger/Logger.d.ts.map +1 -1
- package/bin/utils/storage/index.d.ts +1 -1
- package/bin/utils/storage/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/config/Config.ts +6 -7
- package/src/config/DowncityDefault.ts +1 -1
- package/src/config/DowncitySchema.ts +1 -1
- package/src/config/Paths.ts +2 -2
- package/src/host/daemon/Api.ts +2 -2
- package/src/host/daemon/Client.ts +3 -3
- package/src/host/daemon/Paths.ts +33 -0
- package/src/host/daemon/ProjectSetup.ts +2 -2
- package/src/host/runtime/AgentHostRuntime.ts +4 -4
- package/src/host/runtime/PluginRuntime.ts +1 -1
- package/src/index.ts +280 -159
- package/src/model/CreateModel.ts +4 -4
- package/src/model/ModelManager.ts +1 -1
- package/src/plugin/builtins/asr/Config.ts +138 -0
- package/src/plugin/builtins/asr/Dependency.ts +1 -1
- package/src/plugin/builtins/asr/InboundAugment.ts +59 -0
- package/src/plugin/builtins/asr/Plugin.ts +9 -160
- package/src/plugin/builtins/auth/Plugin.ts +1 -1
- package/src/plugin/builtins/auth/runtime/AuthorizationConfig.ts +1 -1
- package/src/plugin/builtins/auth/runtime/AuthorizationPolicy.ts +2 -2
- package/src/plugin/builtins/auth/runtime/AuthorizationStore.ts +1 -1
- package/src/plugin/builtins/skill/Action.ts +1 -1
- package/src/plugin/builtins/skill/Config.ts +1 -1
- package/src/plugin/builtins/skill/Plugin.ts +1 -1
- package/src/plugin/builtins/skill/runtime/Discovery.ts +1 -1
- package/src/plugin/builtins/skill/runtime/SystemProvider.ts +1 -1
- package/src/plugin/builtins/skill/types/ClaudeSkill.ts +1 -1
- package/src/plugin/builtins/tts/Dependency.ts +1 -1
- package/src/plugin/builtins/tts/Plugin.ts +6 -63
- package/src/plugin/builtins/tts/PluginSupport.ts +85 -0
- package/src/plugin/builtins/tts/types/TtsPlugin.ts +1 -1
- package/src/plugin/builtins/voice/Config.ts +135 -0
- package/src/plugin/builtins/voice/Dependency.ts +1 -1
- package/src/plugin/builtins/voice/InboundAugment.ts +59 -0
- package/src/plugin/builtins/voice/Plugin.ts +9 -158
- package/src/plugin/builtins/voice/types/VoicePlugin.ts +1 -1
- package/src/plugin/builtins/web/Plugin.ts +1 -1
- package/src/plugin/builtins/web/runtime/Config.ts +1 -1
- package/src/plugin/builtins/web/runtime/Source.ts +1 -1
- package/src/plugin/builtins/web/types/WebPlugin.ts +1 -1
- package/src/plugin/builtins/workboard/runtime/Collector.ts +2 -2
- package/src/plugin/builtins/workboard/runtime/Normalizer.ts +2 -2
- package/src/plugin/builtins/workboard/runtime/Store.ts +1 -1
- package/src/plugin/core/Activation.ts +2 -2
- package/src/plugin/core/HookRegistry.ts +2 -2
- package/src/plugin/core/HttpRoutes.ts +2 -2
- package/src/plugin/core/LocalExecution.ts +2 -2
- package/src/plugin/core/PluginCommand.ts +1 -1
- package/src/plugin/core/PluginManager.ts +2 -2
- package/src/plugin/core/PluginRegistry.ts +2 -2
- package/src/plugin/core/ProjectConfigStore.ts +1 -1
- package/src/plugin/types/Plugin.ts +5 -5
- package/src/plugin/types/PluginApi.ts +1 -1
- package/src/{agent/project → project}/AgentInitializer.ts +4 -4
- package/src/{agent/project → project}/ProjectExecutionBinding.ts +2 -2
- package/src/{agent/project → project}/types/AgentProject.ts +2 -2
- package/src/{agent → runtime}/AgentContext.ts +4 -4
- package/src/{agent → runtime}/AgentContextTypes.ts +4 -4
- package/src/{agent → runtime}/AgentRuntime.ts +8 -8
- package/src/{agent → runtime}/AgentRuntimeState.ts +4 -4
- package/src/{agent → runtime}/AgentRuntimeTypes.ts +2 -2
- package/src/sandbox/SandboxConfigResolver.ts +1 -1
- package/src/sandbox/SandboxRunner.ts +1 -1
- package/src/{host/sdk → sdk}/Agent.ts +80 -28
- package/src/{host/sdk → sdk}/AgentSdkTypes.ts +115 -2
- package/src/{host/sdk → sdk}/HttpServer.ts +10 -1
- package/src/{host/sdk → sdk}/RemoteAgent.ts +25 -1
- package/src/{host/sdk → sdk}/RpcServer.ts +21 -3
- package/src/sdk/SdkSessionSystemComposer.ts +261 -0
- package/src/{host/sdk → sdk}/Session.ts +103 -178
- package/src/{host/sdk → sdk}/SessionMetadata.ts +19 -1
- package/src/sdk/SessionPersistence.ts +113 -0
- package/src/sdk/SessionServicePort.ts +62 -0
- package/src/{host/sdk → sdk}/StreamEvents.ts +45 -2
- package/src/{host → server}/http/Server.ts +7 -7
- package/src/{host → server}/http/control/AuthControlService.ts +3 -3
- package/src/{host → server}/http/control/ControlApiRoutes.ts +6 -6
- package/src/{host → server}/http/control/ControlAuthorizationRoutes.ts +3 -3
- package/src/{host → server}/http/control/ControlRouter.ts +3 -3
- package/src/{host → server}/http/control/ExecuteBySession.ts +4 -4
- package/src/{host → server}/http/control/ExecuteInput.ts +1 -1
- package/src/{host → server}/http/control/MessageTimeline.ts +1 -1
- package/src/{host → server}/http/control/ModelRoutes.ts +2 -2
- package/src/{host → server}/http/control/OverviewRoutes.ts +1 -1
- package/src/{host → server}/http/control/SessionRoutes.ts +2 -2
- package/src/{host → server}/http/control/SessionSummaryStore.ts +2 -2
- package/src/{host → server}/http/control/TaskRoutes.ts +1 -1
- package/src/{host → server}/http/control/TaskStore.ts +1 -1
- package/src/{host → server}/http/control/types/ControlRoutes.ts +2 -2
- package/src/{host → server}/http/control/types/ControlViewData.ts +1 -1
- package/src/{host → server}/http/execute/execute.ts +1 -1
- package/src/{host → server}/http/plugins/plugins.ts +1 -1
- package/src/{host → server}/http/services/services.ts +1 -1
- package/src/{host → server}/http/static/static.ts +1 -1
- package/src/{host → server}/rpc/Server.ts +7 -7
- package/src/service/builtins/BaseService.ts +2 -2
- package/src/service/builtins/README.md +32 -11
- package/src/service/builtins/chat/Action.ts +1 -1
- package/src/service/builtins/chat/ChatService.ts +3 -3
- package/src/service/builtins/chat/ChatServiceTypes.ts +2 -2
- package/src/service/builtins/chat/accounts/ChannelAccountService.ts +2 -2
- package/src/service/builtins/chat/channels/BaseChatChannel.ts +1 -1
- package/src/service/builtins/chat/channels/BaseChatChannelQueue.ts +2 -2
- package/src/service/builtins/chat/channels/BaseChatChannelSupport.ts +2 -2
- package/src/service/builtins/chat/channels/feishu/Feishu.ts +65 -232
- package/src/service/builtins/chat/channels/feishu/FeishuMessageHandler.ts +483 -0
- package/src/service/builtins/chat/channels/feishu/FeishuPlatformClient.ts +1 -1
- package/src/service/builtins/chat/channels/feishu/FeishuPlatformLookup.ts +1 -1
- package/src/service/builtins/chat/channels/feishu/types/FeishuChannel.ts +1 -1
- package/src/service/builtins/chat/channels/qq/QQ.ts +56 -291
- package/src/service/builtins/chat/channels/qq/QQGatewayClient.ts +76 -250
- package/src/service/builtins/chat/channels/qq/QQGatewayConnection.ts +175 -0
- package/src/service/builtins/chat/channels/qq/QQGatewayHeartbeat.ts +114 -0
- package/src/service/builtins/chat/channels/qq/QQGatewayProtocol.ts +176 -0
- package/src/service/builtins/chat/channels/qq/QQGatewaySupport.ts +1 -1
- package/src/service/builtins/chat/channels/qq/QQInbound.ts +1 -1
- package/src/service/builtins/chat/channels/qq/QQMessageHandler.ts +465 -0
- package/src/service/builtins/chat/channels/qq/QQSendSupport.ts +1 -1
- package/src/service/builtins/chat/channels/qq/QQSupport.ts +2 -2
- package/src/service/builtins/chat/channels/qq/types/QqChannel.ts +2 -2
- package/src/service/builtins/chat/channels/telegram/Bot.ts +57 -352
- package/src/service/builtins/chat/channels/telegram/StateStore.ts +1 -1
- package/src/service/builtins/chat/channels/telegram/TelegramMessageHandler.ts +485 -0
- package/src/service/builtins/chat/channels/telegram/TelegramPendingUpdates.ts +204 -0
- package/src/service/builtins/chat/channels/telegram/TelegramPlatformClient.ts +1 -1
- package/src/service/builtins/chat/runtime/ChannelContextStore.ts +1 -1
- package/src/service/builtins/chat/runtime/ChatActionExecution.ts +2 -2
- package/src/service/builtins/chat/runtime/ChatActionInput.ts +14 -281
- package/src/service/builtins/chat/runtime/ChatActionInputSupport.ts +85 -0
- package/src/service/builtins/chat/runtime/ChatChannelActions.ts +1 -1
- package/src/service/builtins/chat/runtime/ChatChannelConfig.ts +3 -3
- package/src/service/builtins/chat/runtime/ChatChannelCore.ts +2 -2
- package/src/service/builtins/chat/runtime/ChatChannelLifecycle.ts +1 -1
- package/src/service/builtins/chat/runtime/ChatHistoryStore.ts +2 -2
- package/src/service/builtins/chat/runtime/ChatIngressStore.ts +2 -2
- package/src/service/builtins/chat/runtime/ChatMetaStore.ts +3 -3
- package/src/service/builtins/chat/runtime/ChatQueueReplyDispatch.ts +1 -1
- package/src/service/builtins/chat/runtime/ChatQueueSessionBridge.ts +2 -2
- package/src/service/builtins/chat/runtime/ChatQueueStore.ts +1 -1
- package/src/service/builtins/chat/runtime/ChatQueueWorker.ts +2 -2
- package/src/service/builtins/chat/runtime/ChatSendActionInput.ts +255 -0
- package/src/service/builtins/chat/runtime/ChatServiceActions.ts +1 -1
- package/src/service/builtins/chat/runtime/ChatServiceSystem.ts +1 -1
- package/src/service/builtins/chat/runtime/ChatSessionDelete.ts +1 -1
- package/src/service/builtins/chat/runtime/ChatkeySend.ts +2 -2
- package/src/service/builtins/chat/runtime/EnqueueDispatch.ts +2 -2
- package/src/service/builtins/chat/runtime/InboundAugment.ts +2 -2
- package/src/service/builtins/chat/runtime/PluginDispatch.ts +2 -2
- package/src/service/builtins/chat/runtime/ReplyContextFormatter.ts +1 -1
- package/src/service/builtins/chat/runtime/ReplyDispatch.ts +2 -2
- package/src/service/builtins/chat/runtime/SystemPrompt.ts +1 -1
- package/src/service/builtins/chat/runtime/UIMessageTransformer.ts +1 -1
- package/src/service/builtins/chat/types/ChannelAccount.ts +1 -1
- package/src/service/builtins/chat/types/ChatHistory.ts +1 -1
- package/src/service/builtins/chat/types/ChatMeta.ts +1 -1
- package/src/service/builtins/chat/types/ChatQueue.ts +1 -1
- package/src/service/builtins/chat/types/ChatService.ts +1 -1
- package/src/service/builtins/contact/Action.ts +368 -4
- package/src/service/builtins/contact/ContactService.ts +30 -324
- package/src/service/builtins/contact/runtime/ChatRuntime.ts +1 -1
- package/src/service/builtins/contact/runtime/ContactPayload.ts +38 -0
- package/src/service/builtins/contact/runtime/RemoteClient.ts +1 -1
- package/src/service/builtins/contact/runtime/ShareBundle.ts +1 -1
- package/src/service/builtins/memory/Action.ts +2 -2
- package/src/service/builtins/memory/MemoryService.ts +2 -2
- package/src/service/builtins/memory/runtime/Flush.ts +1 -1
- package/src/service/builtins/memory/runtime/Search.ts +1 -1
- package/src/service/builtins/memory/runtime/Store.ts +1 -1
- package/src/service/builtins/memory/runtime/SystemProvider.ts +1 -1
- package/src/service/builtins/memory/runtime/Writer.ts +1 -1
- package/src/service/builtins/memory/types/Memory.ts +1 -1
- package/src/service/builtins/shell/ShellRuntimeTypes.ts +1 -1
- package/src/service/builtins/shell/ShellService.ts +2 -2
- package/src/service/builtins/shell/runtime/ShellActionResponse.ts +135 -0
- package/src/service/builtins/shell/runtime/ShellActionRuntime.ts +3 -38
- package/src/service/builtins/shell/runtime/ShellActionRuntimeSupport.ts +11 -165
- package/src/service/builtins/shell/runtime/ShellProcessEvents.ts +65 -0
- package/src/service/builtins/shell/runtime/ShellRuntimeEnvironment.ts +75 -0
- package/src/service/builtins/task/Action.ts +2 -2
- package/src/service/builtins/task/Scheduler.ts +1 -1
- package/src/service/builtins/task/TaskService.ts +2 -2
- package/src/service/builtins/task/runtime/CronRuntime.ts +1 -1
- package/src/service/builtins/task/runtime/Model.ts +1 -1
- package/src/service/builtins/task/runtime/Paths.ts +1 -1
- package/src/service/builtins/task/runtime/Runner.ts +17 -63
- package/src/service/builtins/task/runtime/TaskActionExecution.ts +1 -1
- package/src/service/builtins/task/runtime/TaskActionInput.ts +1 -1
- package/src/service/builtins/task/runtime/TaskRunChatDispatch.ts +1 -1
- package/src/service/builtins/task/runtime/TaskRunnerRound.ts +3 -3
- package/src/service/builtins/task/runtime/TaskRunnerScript.ts +175 -0
- package/src/service/builtins/task/runtime/TaskRunnerSession.ts +1 -1
- package/src/service/core/Manager.ts +3 -3
- package/src/service/core/ServiceActionApi.ts +2 -2
- package/src/service/core/ServiceActionRunner.ts +2 -2
- package/src/service/core/ServiceClassRegistry.ts +1 -1
- package/src/service/core/ServiceManager.ts +2 -2
- package/src/service/core/ServiceStateController.ts +2 -2
- package/src/service/core/ServiceSystemProviders.ts +1 -1
- package/src/service/core/Services.ts +1 -1
- package/src/service/schedule/Executor.ts +1 -1
- package/src/service/schedule/Runtime.ts +1 -1
- package/src/service/schedule/Store.ts +1 -1
- package/src/service/types/Service.ts +2 -2
- package/src/service/types/ServiceSchedule.ts +1 -1
- package/src/service/types/ServiceState.ts +1 -1
- package/src/service/types/Services.ts +1 -1
- package/src/session/Session.ts +1 -1
- package/src/session/composer/history/SessionHistoryWriter.ts +1 -1
- package/src/session/composer/system/default/DefaultSessionSystemComposer.ts +1 -1
- package/src/session/composer/system/default/SystemDomain.ts +1 -1
- package/src/session/executors/local/LocalSessionCore.ts +10 -498
- package/src/session/executors/local/SessionExecutionError.ts +47 -0
- package/src/session/executors/local/SessionModelMessageState.ts +133 -0
- package/src/session/executors/local/SessionSignals.ts +1 -1
- package/src/session/executors/local/SessionToolLoopRunner.ts +350 -0
- package/src/session/executors/local/SessionUiStreamCollector.ts +96 -0
- package/src/session/messages/SessionStepEventMapper.ts +1 -1
- package/src/session/tools/shell/ShellToolBridge.ts +2 -2
- package/src/session/tools/shell/ShellToolDefinition.ts +1 -1
- package/src/session/tools/shell/ShellToolFormatting.ts +1 -1
- package/src/session/types/SessionHistoryMeta.ts +2 -0
- package/src/session/types/SessionMessages.ts +1 -1
- package/src/{host → transport}/rpc/Client.ts +1 -1
- package/src/{host → transport}/rpc/Paths.ts +22 -2
- package/src/{config/types → types/config}/DowncityConfig.ts +3 -3
- package/src/{host/daemon/types → types/daemon}/Daemon.ts +1 -1
- package/src/{host/types → types/host}/AgentHost.ts +6 -6
- package/src/{host/types → types/host}/Store.ts +1 -1
- package/src/{host/rpc/types → types/rpc}/LocalRpc.ts +1 -1
- package/src/utils/Template.ts +1 -1
- package/src/utils/logger/Fetch.ts +1 -1
- package/src/utils/logger/FormatRequest.ts +2 -2
- package/src/utils/logger/FormatResponse.ts +1 -1
- package/src/utils/logger/FormatShared.ts +1 -1
- package/src/utils/logger/Logger.ts +1 -1
- package/src/utils/storage/index.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/bin/agent/AgentContext.d.ts.map +0 -1
- package/bin/agent/AgentContext.js.map +0 -1
- package/bin/agent/AgentContextTypes.d.ts.map +0 -1
- package/bin/agent/AgentContextTypes.js.map +0 -1
- package/bin/agent/AgentRuntime.d.ts.map +0 -1
- package/bin/agent/AgentRuntime.js.map +0 -1
- package/bin/agent/AgentRuntimeState.d.ts.map +0 -1
- package/bin/agent/AgentRuntimeState.js.map +0 -1
- package/bin/agent/AgentRuntimeTypes.d.ts.map +0 -1
- package/bin/agent/AgentRuntimeTypes.js.map +0 -1
- package/bin/agent/project/AgentInitializer.d.ts.map +0 -1
- package/bin/agent/project/AgentInitializer.js.map +0 -1
- package/bin/agent/project/ProjectExecutionBinding.d.ts.map +0 -1
- package/bin/agent/project/ProjectExecutionBinding.js.map +0 -1
- package/bin/agent/project/types/AgentProject.d.ts.map +0 -1
- package/bin/agent/project/types/AgentProject.js.map +0 -1
- package/bin/config/types/DowncityConfig.js.map +0 -1
- package/bin/config/types/ExecutionBinding.js.map +0 -1
- package/bin/config/types/LlmConfig.js.map +0 -1
- package/bin/config/types/ModelBinding.js.map +0 -1
- package/bin/config/types/Start.js.map +0 -1
- package/bin/host/daemon/Manager.d.ts +0 -92
- package/bin/host/daemon/Manager.d.ts.map +0 -1
- package/bin/host/daemon/Manager.js +0 -287
- package/bin/host/daemon/Manager.js.map +0 -1
- package/bin/host/daemon/types/Daemon.d.ts.map +0 -1
- package/bin/host/daemon/types/Daemon.js.map +0 -1
- package/bin/host/http/Server.d.ts.map +0 -1
- package/bin/host/http/Server.js.map +0 -1
- package/bin/host/http/auth/AuthEnv.d.ts.map +0 -1
- package/bin/host/http/auth/AuthEnv.js.map +0 -1
- package/bin/host/http/auth/AuthError.d.ts.map +0 -1
- package/bin/host/http/auth/AuthError.js.map +0 -1
- package/bin/host/http/auth/CliAuthStateStore.d.ts.map +0 -1
- package/bin/host/http/auth/CliAuthStateStore.js.map +0 -1
- package/bin/host/http/auth/PasswordHasher.d.ts.map +0 -1
- package/bin/host/http/auth/PasswordHasher.js.map +0 -1
- package/bin/host/http/auth/TokenService.d.ts.map +0 -1
- package/bin/host/http/auth/TokenService.js.map +0 -1
- package/bin/host/http/auth/types/AuthPermission.d.ts.map +0 -1
- package/bin/host/http/auth/types/AuthPermission.js.map +0 -1
- package/bin/host/http/auth/types/AuthRoute.d.ts.map +0 -1
- package/bin/host/http/auth/types/AuthRoute.js.map +0 -1
- package/bin/host/http/auth/types/AuthToken.d.ts.map +0 -1
- package/bin/host/http/auth/types/AuthToken.js.map +0 -1
- package/bin/host/http/auth/types/AuthTypes.d.ts.map +0 -1
- package/bin/host/http/auth/types/AuthTypes.js.map +0 -1
- package/bin/host/http/control/AuthControlService.d.ts.map +0 -1
- package/bin/host/http/control/AuthControlService.js.map +0 -1
- package/bin/host/http/control/CommonHelpers.d.ts.map +0 -1
- package/bin/host/http/control/CommonHelpers.js.map +0 -1
- package/bin/host/http/control/ControlApiRoutes.d.ts.map +0 -1
- package/bin/host/http/control/ControlApiRoutes.js.map +0 -1
- package/bin/host/http/control/ControlAuthorizationRoutes.d.ts.map +0 -1
- package/bin/host/http/control/ControlAuthorizationRoutes.js.map +0 -1
- package/bin/host/http/control/ControlRouter.d.ts.map +0 -1
- package/bin/host/http/control/ControlRouter.js.map +0 -1
- package/bin/host/http/control/ExecuteBySession.d.ts.map +0 -1
- package/bin/host/http/control/ExecuteBySession.js.map +0 -1
- package/bin/host/http/control/ExecuteInput.d.ts.map +0 -1
- package/bin/host/http/control/ExecuteInput.js.map +0 -1
- package/bin/host/http/control/Helpers.js.map +0 -1
- package/bin/host/http/control/MessageTimeline.d.ts.map +0 -1
- package/bin/host/http/control/MessageTimeline.js.map +0 -1
- package/bin/host/http/control/ModelRoutes.d.ts.map +0 -1
- package/bin/host/http/control/ModelRoutes.js.map +0 -1
- package/bin/host/http/control/OverviewRoutes.d.ts.map +0 -1
- package/bin/host/http/control/OverviewRoutes.js.map +0 -1
- package/bin/host/http/control/SessionRoutes.d.ts.map +0 -1
- package/bin/host/http/control/SessionRoutes.js.map +0 -1
- package/bin/host/http/control/SessionSummaryStore.d.ts.map +0 -1
- package/bin/host/http/control/SessionSummaryStore.js.map +0 -1
- package/bin/host/http/control/TaskRoutes.d.ts.map +0 -1
- package/bin/host/http/control/TaskRoutes.js.map +0 -1
- package/bin/host/http/control/TaskStore.d.ts.map +0 -1
- package/bin/host/http/control/TaskStore.js.map +0 -1
- package/bin/host/http/control/types/AuthControl.d.ts.map +0 -1
- package/bin/host/http/control/types/AuthControl.js.map +0 -1
- package/bin/host/http/control/types/ControlRoutes.d.ts.map +0 -1
- package/bin/host/http/control/types/ControlRoutes.js.map +0 -1
- package/bin/host/http/control/types/ControlSessionExecute.d.ts.map +0 -1
- package/bin/host/http/control/types/ControlSessionExecute.js.map +0 -1
- package/bin/host/http/control/types/ControlViewData.d.ts.map +0 -1
- package/bin/host/http/control/types/ControlViewData.js.map +0 -1
- package/bin/host/http/execute/execute.d.ts.map +0 -1
- package/bin/host/http/execute/execute.js.map +0 -1
- package/bin/host/http/execute/types/InlineInstant.d.ts.map +0 -1
- package/bin/host/http/execute/types/InlineInstant.js.map +0 -1
- package/bin/host/http/health/health.d.ts.map +0 -1
- package/bin/host/http/health/health.js.map +0 -1
- package/bin/host/http/plugins/plugins.d.ts.map +0 -1
- package/bin/host/http/plugins/plugins.js.map +0 -1
- package/bin/host/http/services/services.d.ts.map +0 -1
- package/bin/host/http/services/services.js.map +0 -1
- package/bin/host/http/static/static.d.ts.map +0 -1
- package/bin/host/http/static/static.js.map +0 -1
- package/bin/host/rpc/Client.d.ts.map +0 -1
- package/bin/host/rpc/Client.js.map +0 -1
- package/bin/host/rpc/Paths.d.ts.map +0 -1
- package/bin/host/rpc/Paths.js.map +0 -1
- package/bin/host/rpc/Server.d.ts.map +0 -1
- package/bin/host/rpc/Server.js.map +0 -1
- package/bin/host/rpc/Transport.d.ts.map +0 -1
- package/bin/host/rpc/Transport.js.map +0 -1
- package/bin/host/rpc/types/LocalRpc.d.ts.map +0 -1
- package/bin/host/rpc/types/LocalRpc.js.map +0 -1
- package/bin/host/runtime/CityPaths.d.ts +0 -50
- package/bin/host/runtime/CityPaths.d.ts.map +0 -1
- package/bin/host/runtime/CityPaths.js +0 -75
- package/bin/host/runtime/CityPaths.js.map +0 -1
- package/bin/host/runtime/CityRegistry.d.ts +0 -51
- package/bin/host/runtime/CityRegistry.d.ts.map +0 -1
- package/bin/host/runtime/CityRegistry.js +0 -217
- package/bin/host/runtime/CityRegistry.js.map +0 -1
- package/bin/host/runtime/CityRuntime.d.ts +0 -21
- package/bin/host/runtime/CityRuntime.d.ts.map +0 -1
- package/bin/host/runtime/CityRuntime.js +0 -45
- package/bin/host/runtime/CityRuntime.js.map +0 -1
- package/bin/host/runtime/ProcessSweep.d.ts +0 -76
- package/bin/host/runtime/ProcessSweep.d.ts.map +0 -1
- package/bin/host/runtime/ProcessSweep.js +0 -188
- package/bin/host/runtime/ProcessSweep.js.map +0 -1
- package/bin/host/runtime/types/Platform.d.ts.map +0 -1
- package/bin/host/runtime/types/Platform.js.map +0 -1
- package/bin/host/runtime/types/PlatformGateway.d.ts.map +0 -1
- package/bin/host/runtime/types/PlatformGateway.js.map +0 -1
- package/bin/host/sdk/Agent.d.ts.map +0 -1
- package/bin/host/sdk/Agent.js.map +0 -1
- package/bin/host/sdk/AgentSdkTypes.d.ts.map +0 -1
- package/bin/host/sdk/AgentSdkTypes.js.map +0 -1
- package/bin/host/sdk/AsyncQueue.d.ts.map +0 -1
- package/bin/host/sdk/AsyncQueue.js.map +0 -1
- package/bin/host/sdk/HttpServer.d.ts.map +0 -1
- package/bin/host/sdk/HttpServer.js.map +0 -1
- package/bin/host/sdk/Paths.d.ts.map +0 -1
- package/bin/host/sdk/Paths.js.map +0 -1
- package/bin/host/sdk/RemoteAgent.d.ts.map +0 -1
- package/bin/host/sdk/RemoteAgent.js.map +0 -1
- package/bin/host/sdk/RpcServer.d.ts.map +0 -1
- package/bin/host/sdk/RpcServer.js.map +0 -1
- package/bin/host/sdk/SdkSessionSystemComposer.d.ts +0 -43
- package/bin/host/sdk/SdkSessionSystemComposer.d.ts.map +0 -1
- package/bin/host/sdk/SdkSessionSystemComposer.js +0 -71
- package/bin/host/sdk/SdkSessionSystemComposer.js.map +0 -1
- package/bin/host/sdk/Session.d.ts.map +0 -1
- package/bin/host/sdk/Session.js.map +0 -1
- package/bin/host/sdk/SessionMetadata.d.ts.map +0 -1
- package/bin/host/sdk/SessionMetadata.js.map +0 -1
- package/bin/host/sdk/StreamEvents.d.ts +0 -14
- package/bin/host/sdk/StreamEvents.d.ts.map +0 -1
- package/bin/host/sdk/StreamEvents.js.map +0 -1
- package/bin/host/types/AgentHost.js +0 -10
- package/bin/host/types/AgentHost.js.map +0 -1
- package/bin/utils/types/Json.d.ts.map +0 -1
- package/bin/utils/types/Json.js.map +0 -1
- package/bin/utils/types/Template.d.ts.map +0 -1
- package/bin/utils/types/Template.js.map +0 -1
- package/src/host/daemon/Manager.ts +0 -344
- package/src/host/runtime/CityPaths.ts +0 -84
- package/src/host/runtime/CityRegistry.ts +0 -256
- package/src/host/runtime/CityRuntime.ts +0 -45
- package/src/host/runtime/ProcessSweep.ts +0 -239
- package/src/host/sdk/SdkSessionSystemComposer.ts +0 -113
- /package/bin/{agent/project → project}/ProjectExecutionBinding.js +0 -0
- /package/bin/{agent/project → project}/types/AgentProject.js +0 -0
- /package/bin/{agent → runtime}/AgentContextTypes.js +0 -0
- /package/bin/{agent → runtime}/AgentRuntimeState.js +0 -0
- /package/bin/{agent → runtime}/AgentRuntimeTypes.js +0 -0
- /package/bin/{host/sdk → sdk}/AgentSdkTypes.js +0 -0
- /package/bin/{host/sdk → sdk}/AsyncQueue.d.ts +0 -0
- /package/bin/{host/sdk → sdk}/AsyncQueue.js +0 -0
- /package/bin/{host/sdk → sdk}/Paths.d.ts +0 -0
- /package/bin/{host/sdk → sdk}/Paths.js +0 -0
- /package/bin/{host → server}/http/Server.d.ts +0 -0
- /package/bin/{host → server}/http/auth/AuthEnv.d.ts +0 -0
- /package/bin/{host → server}/http/auth/AuthEnv.js +0 -0
- /package/bin/{host → server}/http/auth/AuthError.d.ts +0 -0
- /package/bin/{host → server}/http/auth/AuthError.js +0 -0
- /package/bin/{host → server}/http/auth/CliAuthStateStore.d.ts +0 -0
- /package/bin/{host → server}/http/auth/CliAuthStateStore.js +0 -0
- /package/bin/{host → server}/http/auth/PasswordHasher.d.ts +0 -0
- /package/bin/{host → server}/http/auth/PasswordHasher.js +0 -0
- /package/bin/{host → server}/http/auth/TokenService.d.ts +0 -0
- /package/bin/{host → server}/http/auth/TokenService.js +0 -0
- /package/bin/{host → server}/http/control/AuthControlService.js +0 -0
- /package/bin/{host → server}/http/control/CommonHelpers.d.ts +0 -0
- /package/bin/{host → server}/http/control/CommonHelpers.js +0 -0
- /package/bin/{host → server}/http/control/ExecuteBySession.js +0 -0
- /package/bin/{host → server}/http/control/ExecuteInput.js +0 -0
- /package/bin/{host → server}/http/control/Helpers.d.ts +0 -0
- /package/bin/{host → server}/http/control/Helpers.js +0 -0
- /package/bin/{host → server}/http/control/MessageTimeline.js +0 -0
- /package/bin/{host → server}/http/control/OverviewRoutes.js +0 -0
- /package/bin/{host → server}/http/control/SessionRoutes.js +0 -0
- /package/bin/{host → server}/http/control/SessionSummaryStore.js +0 -0
- /package/bin/{host → server}/http/control/TaskRoutes.js +0 -0
- /package/bin/{host → server}/http/control/TaskStore.js +0 -0
- /package/bin/{host → server}/http/control/types/AuthControl.d.ts +0 -0
- /package/bin/{host → server}/http/control/types/AuthControl.js +0 -0
- /package/bin/{host → server}/http/control/types/ControlRoutes.js +0 -0
- /package/bin/{host → server}/http/control/types/ControlSessionExecute.d.ts +0 -0
- /package/bin/{host → server}/http/control/types/ControlSessionExecute.js +0 -0
- /package/bin/{host → server}/http/control/types/ControlViewData.js +0 -0
- /package/bin/{host → server}/http/execute/execute.d.ts +0 -0
- /package/bin/{host → server}/http/health/health.d.ts +0 -0
- /package/bin/{host → server}/http/health/health.js +0 -0
- /package/bin/{host → server}/http/plugins/plugins.d.ts +0 -0
- /package/bin/{host → server}/http/services/services.d.ts +0 -0
- /package/bin/{host → server}/http/static/static.d.ts +0 -0
- /package/bin/{host → transport}/rpc/Client.d.ts +0 -0
- /package/bin/{host → transport}/rpc/Client.js +0 -0
- /package/bin/{host → transport}/rpc/Paths.d.ts +0 -0
- /package/bin/{host → transport}/rpc/Transport.d.ts +0 -0
- /package/bin/{host → transport}/rpc/Transport.js +0 -0
- /package/bin/{host/http/auth/types → types/auth}/AuthPermission.d.ts +0 -0
- /package/bin/{host/http/auth/types → types/auth}/AuthPermission.js +0 -0
- /package/bin/{host/http/auth/types → types/auth}/AuthRoute.d.ts +0 -0
- /package/bin/{host/http/auth/types → types/auth}/AuthRoute.js +0 -0
- /package/bin/{host/http/auth/types → types/auth}/AuthToken.d.ts +0 -0
- /package/bin/{host/http/auth/types → types/auth}/AuthToken.js +0 -0
- /package/bin/{host/http/auth/types → types/auth}/AuthTypes.d.ts +0 -0
- /package/bin/{host/http/auth/types → types/auth}/AuthTypes.js +0 -0
- /package/bin/{utils/types → types/common}/Json.d.ts +0 -0
- /package/bin/{utils/types → types/common}/Json.js +0 -0
- /package/bin/{utils/types → types/common}/Template.d.ts +0 -0
- /package/bin/{utils/types → types/common}/Template.js +0 -0
- /package/bin/{config/types → types/config}/DowncityConfig.js +0 -0
- /package/bin/{config/types → types/config}/ExecutionBinding.d.ts +0 -0
- /package/bin/{config/types → types/config}/ExecutionBinding.js +0 -0
- /package/bin/{config/types → types/config}/LlmConfig.d.ts +0 -0
- /package/bin/{config/types → types/config}/LlmConfig.js +0 -0
- /package/bin/{config/types → types/config}/ModelBinding.d.ts +0 -0
- /package/bin/{config/types → types/config}/ModelBinding.js +0 -0
- /package/bin/{config/types → types/config}/Start.d.ts +0 -0
- /package/bin/{config/types → types/config}/Start.js +0 -0
- /package/bin/{host/types → types/host}/Store.js +0 -0
- /package/bin/{host/http/execute/types → types/http}/InlineInstant.d.ts +0 -0
- /package/bin/{host/http/execute/types → types/http}/InlineInstant.js +0 -0
- /package/bin/{host/runtime/types → types/platform}/Platform.d.ts +0 -0
- /package/bin/{host/runtime/types → types/platform}/Platform.js +0 -0
- /package/bin/{host/runtime/types → types/platform}/PlatformGateway.d.ts +0 -0
- /package/bin/{host/runtime/types → types/platform}/PlatformGateway.js +0 -0
- /package/bin/{host/rpc/types → types/rpc}/LocalRpc.js +0 -0
- /package/src/{host/sdk → sdk}/AsyncQueue.ts +0 -0
- /package/src/{host/sdk → sdk}/Paths.ts +0 -0
- /package/src/{host → server}/http/auth/AuthEnv.ts +0 -0
- /package/src/{host → server}/http/auth/AuthError.ts +0 -0
- /package/src/{host → server}/http/auth/CliAuthStateStore.ts +0 -0
- /package/src/{host → server}/http/auth/PasswordHasher.ts +0 -0
- /package/src/{host → server}/http/auth/TokenService.ts +0 -0
- /package/src/{host → server}/http/control/CommonHelpers.ts +0 -0
- /package/src/{host → server}/http/control/Helpers.ts +0 -0
- /package/src/{host → server}/http/control/types/AuthControl.ts +0 -0
- /package/src/{host → server}/http/control/types/ControlSessionExecute.ts +0 -0
- /package/src/{host → server}/http/health/health.ts +0 -0
- /package/src/{host → transport}/rpc/Transport.ts +0 -0
- /package/src/{host/http/auth/types → types/auth}/AuthPermission.ts +0 -0
- /package/src/{host/http/auth/types → types/auth}/AuthRoute.ts +0 -0
- /package/src/{host/http/auth/types → types/auth}/AuthToken.ts +0 -0
- /package/src/{host/http/auth/types → types/auth}/AuthTypes.ts +0 -0
- /package/src/{utils/types → types/common}/Json.ts +0 -0
- /package/src/{utils/types → types/common}/Template.ts +0 -0
- /package/src/{config/types → types/config}/ExecutionBinding.ts +0 -0
- /package/src/{config/types → types/config}/LlmConfig.ts +0 -0
- /package/src/{config/types → types/config}/ModelBinding.ts +0 -0
- /package/src/{config/types → types/config}/Start.ts +0 -0
- /package/src/{host/http/execute/types → types/http}/InlineInstant.ts +0 -0
- /package/src/{host/runtime/types → types/platform}/Platform.ts +0 -0
- /package/src/{host/runtime/types → types/platform}/PlatformGateway.ts +0 -0
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CityPaths:city 全局运行态与 control plane 共享的路径规则。
|
|
3
|
-
*
|
|
4
|
-
* 关键点(中文)
|
|
5
|
-
* - Downcity 的全局根目录固定在用户目录 `~/.downcity/`。
|
|
6
|
-
* - `~/.downcity/downcity.db`:全局 SQLite 数据库,保存模型池与平台级配置。
|
|
7
|
-
* - `~/.downcity/main/*`:city 后台与 control plane 共享的运行文件目录。
|
|
8
|
-
* - 这里定义的是“全局路径约定”,不是单个 agent 项目的 `.downcity/` 路径。
|
|
9
|
-
*/
|
|
10
|
-
import os from "node:os";
|
|
11
|
-
import path from "node:path";
|
|
12
|
-
/**
|
|
13
|
-
* 全局根目录(用户级)。
|
|
14
|
-
*/
|
|
15
|
-
export function getPlatformRootDirPath() {
|
|
16
|
-
const explicitRoot = String(process.env.DC_PLATFORM_ROOT || "").trim();
|
|
17
|
-
if (explicitRoot)
|
|
18
|
-
return path.resolve(explicitRoot);
|
|
19
|
-
return path.join(os.homedir(), ".downcity");
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* 全局 SQLite 数据库路径(用户级)。
|
|
23
|
-
*/
|
|
24
|
-
export function getPlatformStoreDbPath() {
|
|
25
|
-
return path.join(getPlatformRootDirPath(), "downcity.db");
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* city 全局运行目录(pid/log/registry)。
|
|
29
|
-
*/
|
|
30
|
-
export function getCityRuntimeDirPath() {
|
|
31
|
-
return path.join(getPlatformRootDirPath(), "main");
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* 全局模型存储密钥文件路径。
|
|
35
|
-
*/
|
|
36
|
-
export function getPlatformStoreKeyPath() {
|
|
37
|
-
return path.join(getCityRuntimeDirPath(), "model-db.key");
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* city 后台 pid 文件路径。
|
|
41
|
-
*/
|
|
42
|
-
export function getCityPidPath() {
|
|
43
|
-
return path.join(getCityRuntimeDirPath(), "city.pid");
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* city 后台日志路径(stdout/stderr 合并)。
|
|
47
|
-
*/
|
|
48
|
-
export function getCityLogPath() {
|
|
49
|
-
return path.join(getCityRuntimeDirPath(), "city.log");
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* control plane pid 文件路径。
|
|
53
|
-
*/
|
|
54
|
-
export function getControlPlanePidPath() {
|
|
55
|
-
return path.join(getCityRuntimeDirPath(), "control-plane.pid");
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* control plane 日志路径(stdout/stderr 合并)。
|
|
59
|
-
*/
|
|
60
|
-
export function getControlPlaneLogPath() {
|
|
61
|
-
return path.join(getCityRuntimeDirPath(), "control-plane.log");
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* control plane 元数据路径。
|
|
65
|
-
*/
|
|
66
|
-
export function getControlPlaneMetaPath() {
|
|
67
|
-
return path.join(getCityRuntimeDirPath(), "control-plane.json");
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* 受管 agent registry 文件路径(city 维护的 agent 清单)。
|
|
71
|
-
*/
|
|
72
|
-
export function getManagedAgentRegistryPath() {
|
|
73
|
-
return path.join(getCityRuntimeDirPath(), "agents.json");
|
|
74
|
-
}
|
|
75
|
-
//# sourceMappingURL=CityPaths.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CityPaths.js","sourceRoot":"","sources":["../../../src/host/runtime/CityPaths.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACpC,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACvE,IAAI,YAAY;QAAE,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACpD,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,CAAC,CAAC;AAC9C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACpC,OAAO,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,aAAa,CAAC,CAAC;AAC5D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB;IACnC,OAAO,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,MAAM,CAAC,CAAC;AACrD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB;IACrC,OAAO,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,cAAc,CAAC,CAAC;AAC5D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,UAAU,CAAC,CAAC;AACxD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,UAAU,CAAC,CAAC;AACxD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACpC,OAAO,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,mBAAmB,CAAC,CAAC;AACjE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACpC,OAAO,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,mBAAmB,CAAC,CAAC;AACjE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB;IACrC,OAAO,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,oBAAoB,CAAC,CAAC;AAClE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,2BAA2B;IACzC,OAAO,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,aAAa,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CityRegistry:city 后台维护的 agent registry(`~/.downcity/main/agents.json`)。
|
|
3
|
-
*
|
|
4
|
-
* 关键点(中文)
|
|
5
|
-
* - registry 只维护“city 认知到的 agent 项目列表”,用于统一观测与批量管理。
|
|
6
|
-
* - registry 不承载实时健康检查:status/list 会读取每个项目的 daemon pid 并判活。
|
|
7
|
-
* - agent daemon 启动成功后必须登记到 city 后台(强约束)。
|
|
8
|
-
*/
|
|
9
|
-
import type { ManagedAgentRegistryEntry, ManagedAgentRegistryV1 } from "../../host/runtime/types/Platform.js";
|
|
10
|
-
/**
|
|
11
|
-
* 确保 city agent registry 文件存在。
|
|
12
|
-
*
|
|
13
|
-
* 关键点(中文)
|
|
14
|
-
* - 空 city 运行态也应拥有显式的空 registry,避免 Console 将“尚未启动任何 agent”误判为异常。
|
|
15
|
-
* - 若文件已存在则不覆盖,保持历史记录不丢失。
|
|
16
|
-
*/
|
|
17
|
-
export declare function ensureManagedAgentRegistry(): Promise<void>;
|
|
18
|
-
/**
|
|
19
|
-
* 获取 city agent registry 文件路径。
|
|
20
|
-
*/
|
|
21
|
-
export declare function getManagedAgentsRegistryPath(): string;
|
|
22
|
-
/**
|
|
23
|
-
* 读取 city agent registry(容错)。
|
|
24
|
-
*
|
|
25
|
-
* 关键点(中文)
|
|
26
|
-
* - 文件不存在或损坏时返回空 registry,避免影响主流程。
|
|
27
|
-
*/
|
|
28
|
-
export declare function readManagedAgentRegistry(): Promise<ManagedAgentRegistryV1>;
|
|
29
|
-
/**
|
|
30
|
-
* 列出 city registry 中记录的 agent(按 projectRoot 排序)。
|
|
31
|
-
*/
|
|
32
|
-
export declare function listManagedAgentEntries(): Promise<ManagedAgentRegistryEntry[]>;
|
|
33
|
-
/**
|
|
34
|
-
* 新增或更新一条 city agent 记录。
|
|
35
|
-
*/
|
|
36
|
-
export declare function upsertManagedAgentEntry(input: {
|
|
37
|
-
projectRoot: string;
|
|
38
|
-
pid: number;
|
|
39
|
-
startedAt?: string;
|
|
40
|
-
status?: "running" | "stopped";
|
|
41
|
-
stoppedAt?: string;
|
|
42
|
-
}): Promise<void>;
|
|
43
|
-
/**
|
|
44
|
-
* 标记 agent 为 stopped(保留历史记录,不删除)。
|
|
45
|
-
*/
|
|
46
|
-
export declare function markManagedAgentStopped(projectRoot: string): Promise<void>;
|
|
47
|
-
/**
|
|
48
|
-
* 按 projectRoot 移除一条 agent 记录。
|
|
49
|
-
*/
|
|
50
|
-
export declare function removeManagedAgentEntry(projectRoot: string): Promise<void>;
|
|
51
|
-
//# sourceMappingURL=CityRegistry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CityRegistry.d.ts","sourceRoot":"","sources":["../../../src/host/runtime/CityRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EACV,yBAAyB,EACzB,sBAAsB,EACvB,MAAM,kCAAkC,CAAC;AA8G1C;;;;;;GAMG;AACH,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,IAAI,CAAC,CAMhE;AAED;;GAEG;AACH,wBAAgB,4BAA4B,IAAI,MAAM,CAErD;AAED;;;;;GAKG;AACH,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,sBAAsB,CAAC,CAUhF;AAED;;GAEG;AACH,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,yBAAyB,EAAE,CAAC,CAGpF;AAED;;GAEG;AACH,wBAAsB,uBAAuB,CAAC,KAAK,EAAE;IACnD,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,OAAO,CAAC,IAAI,CAAC,CAyChB;AAED;;GAEG;AACH,wBAAsB,uBAAuB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAehF;AAED;;GAEG;AACH,wBAAsB,uBAAuB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAQhF"}
|
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CityRegistry:city 后台维护的 agent registry(`~/.downcity/main/agents.json`)。
|
|
3
|
-
*
|
|
4
|
-
* 关键点(中文)
|
|
5
|
-
* - registry 只维护“city 认知到的 agent 项目列表”,用于统一观测与批量管理。
|
|
6
|
-
* - registry 不承载实时健康检查:status/list 会读取每个项目的 daemon pid 并判活。
|
|
7
|
-
* - agent daemon 启动成功后必须登记到 city 后台(强约束)。
|
|
8
|
-
*/
|
|
9
|
-
import fs from "fs-extra";
|
|
10
|
-
import path from "node:path";
|
|
11
|
-
import { getManagedAgentRegistryPath, getCityRuntimeDirPath } from "./CityPaths.js";
|
|
12
|
-
import { isCityRunning } from "./CityRuntime.js";
|
|
13
|
-
const CONSOLE_DIR = getCityRuntimeDirPath();
|
|
14
|
-
const MANAGED_AGENTS_FILE = getManagedAgentRegistryPath();
|
|
15
|
-
function buildEmptyRegistry() {
|
|
16
|
-
return {
|
|
17
|
-
v: 1,
|
|
18
|
-
updatedAt: new Date().toISOString(),
|
|
19
|
-
agents: [],
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
function normalizeProjectRoot(projectRoot) {
|
|
23
|
-
const resolved = path.resolve(String(projectRoot || "").trim());
|
|
24
|
-
if (!resolved)
|
|
25
|
-
throw new Error("projectRoot is required");
|
|
26
|
-
return resolved;
|
|
27
|
-
}
|
|
28
|
-
function normalizePid(pid) {
|
|
29
|
-
if (!Number.isFinite(pid) || Number.isNaN(pid) || !Number.isInteger(pid) || pid < 1) {
|
|
30
|
-
throw new Error(`Invalid pid: ${pid}`);
|
|
31
|
-
}
|
|
32
|
-
return pid;
|
|
33
|
-
}
|
|
34
|
-
function normalizeIsoTime(input) {
|
|
35
|
-
const value = String(input || "").trim();
|
|
36
|
-
if (!value)
|
|
37
|
-
return new Date().toISOString();
|
|
38
|
-
const ms = Date.parse(value);
|
|
39
|
-
if (!Number.isFinite(ms))
|
|
40
|
-
return new Date().toISOString();
|
|
41
|
-
return new Date(ms).toISOString();
|
|
42
|
-
}
|
|
43
|
-
function normalizeRegistryEntry(entry) {
|
|
44
|
-
try {
|
|
45
|
-
const projectRoot = normalizeProjectRoot(String(entry.projectRoot || ""));
|
|
46
|
-
const pid = normalizePid(Number(entry.pid));
|
|
47
|
-
const startedAt = normalizeIsoTime(typeof entry.startedAt === "string" ? entry.startedAt : undefined);
|
|
48
|
-
const updatedAt = normalizeIsoTime(typeof entry.updatedAt === "string" ? entry.updatedAt : undefined);
|
|
49
|
-
return {
|
|
50
|
-
projectRoot,
|
|
51
|
-
pid,
|
|
52
|
-
startedAt,
|
|
53
|
-
updatedAt,
|
|
54
|
-
status: entry.status === "stopped"
|
|
55
|
-
? "stopped"
|
|
56
|
-
: "running",
|
|
57
|
-
stoppedAt: entry.status === "stopped"
|
|
58
|
-
? normalizeIsoTime(typeof entry.stoppedAt === "string"
|
|
59
|
-
? entry.stoppedAt
|
|
60
|
-
: undefined)
|
|
61
|
-
: undefined,
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
catch {
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
function normalizeRegistry(value) {
|
|
69
|
-
if (!value || typeof value !== "object")
|
|
70
|
-
return buildEmptyRegistry();
|
|
71
|
-
const source = Array.isArray(value.agents) ? value.agents : [];
|
|
72
|
-
const normalizedAgents = [];
|
|
73
|
-
for (const item of source) {
|
|
74
|
-
if (!item || typeof item !== "object")
|
|
75
|
-
continue;
|
|
76
|
-
const normalized = normalizeRegistryEntry(item);
|
|
77
|
-
if (!normalized)
|
|
78
|
-
continue;
|
|
79
|
-
const existingIndex = normalizedAgents.findIndex((entry) => entry.projectRoot === normalized.projectRoot);
|
|
80
|
-
if (existingIndex >= 0) {
|
|
81
|
-
normalizedAgents[existingIndex] = normalized;
|
|
82
|
-
continue;
|
|
83
|
-
}
|
|
84
|
-
normalizedAgents.push(normalized);
|
|
85
|
-
}
|
|
86
|
-
return {
|
|
87
|
-
v: 1,
|
|
88
|
-
updatedAt: normalizeIsoTime(typeof value.updatedAt === "string" ? value.updatedAt : undefined),
|
|
89
|
-
agents: normalizedAgents.sort((a, b) => a.projectRoot.localeCompare(b.projectRoot)),
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
async function writeManagedAgentRegistry(registry) {
|
|
93
|
-
await fs.ensureDir(CONSOLE_DIR);
|
|
94
|
-
await fs.writeJson(MANAGED_AGENTS_FILE, normalizeRegistry(registry), {
|
|
95
|
-
spaces: 2,
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* 确保 city agent registry 文件存在。
|
|
100
|
-
*
|
|
101
|
-
* 关键点(中文)
|
|
102
|
-
* - 空 city 运行态也应拥有显式的空 registry,避免 Console 将“尚未启动任何 agent”误判为异常。
|
|
103
|
-
* - 若文件已存在则不覆盖,保持历史记录不丢失。
|
|
104
|
-
*/
|
|
105
|
-
export async function ensureManagedAgentRegistry() {
|
|
106
|
-
await fs.ensureDir(CONSOLE_DIR);
|
|
107
|
-
if (await fs.pathExists(MANAGED_AGENTS_FILE)) {
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
await writeManagedAgentRegistry(buildEmptyRegistry());
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* 获取 city agent registry 文件路径。
|
|
114
|
-
*/
|
|
115
|
-
export function getManagedAgentsRegistryPath() {
|
|
116
|
-
return MANAGED_AGENTS_FILE;
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* 读取 city agent registry(容错)。
|
|
120
|
-
*
|
|
121
|
-
* 关键点(中文)
|
|
122
|
-
* - 文件不存在或损坏时返回空 registry,避免影响主流程。
|
|
123
|
-
*/
|
|
124
|
-
export async function readManagedAgentRegistry() {
|
|
125
|
-
try {
|
|
126
|
-
if (!(await fs.pathExists(MANAGED_AGENTS_FILE))) {
|
|
127
|
-
return buildEmptyRegistry();
|
|
128
|
-
}
|
|
129
|
-
const raw = (await fs.readJson(MANAGED_AGENTS_FILE));
|
|
130
|
-
return normalizeRegistry(raw);
|
|
131
|
-
}
|
|
132
|
-
catch {
|
|
133
|
-
return buildEmptyRegistry();
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* 列出 city registry 中记录的 agent(按 projectRoot 排序)。
|
|
138
|
-
*/
|
|
139
|
-
export async function listManagedAgentEntries() {
|
|
140
|
-
const registry = await readManagedAgentRegistry();
|
|
141
|
-
return [...registry.agents].sort((a, b) => a.projectRoot.localeCompare(b.projectRoot));
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* 新增或更新一条 city agent 记录。
|
|
145
|
-
*/
|
|
146
|
-
export async function upsertManagedAgentEntry(input) {
|
|
147
|
-
// 关键点(中文):agent 必须登记到 city 后台才“有效”,因此 city 未启动时拒绝写入 registry。
|
|
148
|
-
if (!(await isCityRunning())) {
|
|
149
|
-
throw new Error("city runtime is not running");
|
|
150
|
-
}
|
|
151
|
-
const projectRoot = normalizeProjectRoot(input.projectRoot);
|
|
152
|
-
const pid = normalizePid(input.pid);
|
|
153
|
-
const nowIso = new Date().toISOString();
|
|
154
|
-
const registry = await readManagedAgentRegistry();
|
|
155
|
-
const index = registry.agents.findIndex((entry) => entry.projectRoot === projectRoot);
|
|
156
|
-
if (index >= 0) {
|
|
157
|
-
const existing = registry.agents[index];
|
|
158
|
-
registry.agents[index] = {
|
|
159
|
-
projectRoot,
|
|
160
|
-
pid,
|
|
161
|
-
startedAt: normalizeIsoTime(existing.startedAt || input.startedAt),
|
|
162
|
-
updatedAt: nowIso,
|
|
163
|
-
status: input.status === "stopped" ? "stopped" : "running",
|
|
164
|
-
stoppedAt: input.status === "stopped"
|
|
165
|
-
? normalizeIsoTime(input.stoppedAt || nowIso)
|
|
166
|
-
: undefined,
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
else {
|
|
170
|
-
registry.agents.push({
|
|
171
|
-
projectRoot,
|
|
172
|
-
pid,
|
|
173
|
-
startedAt: normalizeIsoTime(input.startedAt),
|
|
174
|
-
updatedAt: nowIso,
|
|
175
|
-
status: input.status === "stopped" ? "stopped" : "running",
|
|
176
|
-
stoppedAt: input.status === "stopped"
|
|
177
|
-
? normalizeIsoTime(input.stoppedAt || nowIso)
|
|
178
|
-
: undefined,
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
registry.updatedAt = nowIso;
|
|
182
|
-
await writeManagedAgentRegistry(registry);
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* 标记 agent 为 stopped(保留历史记录,不删除)。
|
|
186
|
-
*/
|
|
187
|
-
export async function markManagedAgentStopped(projectRoot) {
|
|
188
|
-
const key = normalizeProjectRoot(projectRoot);
|
|
189
|
-
const registry = await readManagedAgentRegistry();
|
|
190
|
-
const index = registry.agents.findIndex((entry) => entry.projectRoot === key);
|
|
191
|
-
if (index < 0)
|
|
192
|
-
return;
|
|
193
|
-
const nowIso = new Date().toISOString();
|
|
194
|
-
const current = registry.agents[index];
|
|
195
|
-
registry.agents[index] = {
|
|
196
|
-
...current,
|
|
197
|
-
status: "stopped",
|
|
198
|
-
stoppedAt: nowIso,
|
|
199
|
-
updatedAt: nowIso,
|
|
200
|
-
};
|
|
201
|
-
registry.updatedAt = nowIso;
|
|
202
|
-
await writeManagedAgentRegistry(registry);
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* 按 projectRoot 移除一条 agent 记录。
|
|
206
|
-
*/
|
|
207
|
-
export async function removeManagedAgentEntry(projectRoot) {
|
|
208
|
-
const key = normalizeProjectRoot(projectRoot);
|
|
209
|
-
const registry = await readManagedAgentRegistry();
|
|
210
|
-
const nextAgents = registry.agents.filter((entry) => entry.projectRoot !== key);
|
|
211
|
-
if (nextAgents.length === registry.agents.length)
|
|
212
|
-
return;
|
|
213
|
-
registry.agents = nextAgents;
|
|
214
|
-
registry.updatedAt = new Date().toISOString();
|
|
215
|
-
await writeManagedAgentRegistry(registry);
|
|
216
|
-
}
|
|
217
|
-
//# sourceMappingURL=CityRegistry.js.map
|
|
@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C5B,MAAM,yBAAyB,CAAC,QAAQ,CAAC,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,WAAmB;IAC/D,MAAM,GAAG,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC;IAC9C,MAAM,QAAQ,GAAG,MAAM,wBAAwB,EAAE,CAAC;IAClD,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,KAAK,GAAG,CAAC,CAAC;IAChF,IAAI,UAAU,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM,CAAC,MAAM;QAAE,OAAO;IACzD,QAAQ,CAAC,MAAM,GAAG,UAAU,CAAC;IAC7B,QAAQ,CAAC,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC9C,MAAM,yBAAyB,CAAC,QAAQ,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CityRuntime:city 后台进程状态工具。
|
|
3
|
-
*
|
|
4
|
-
* 关键点(中文)
|
|
5
|
-
* - city 后台负责统一管理/观测多个 agent daemon。
|
|
6
|
-
* - 这里处理的是 city 后台自身的 pid 与判活,不涉及 control plane 进程。
|
|
7
|
-
* - agent daemon 启动前必须确保 city 后台已启动(强约束)。
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* 读取 city 后台 pid(读取失败或内容非法返回 null)。
|
|
11
|
-
*/
|
|
12
|
-
export declare function readCityPid(): Promise<number | null>;
|
|
13
|
-
/**
|
|
14
|
-
* 判断 city 后台进程是否存活。
|
|
15
|
-
*/
|
|
16
|
-
export declare function isCityProcessAlive(pid: number): boolean;
|
|
17
|
-
/**
|
|
18
|
-
* 判断 city 后台是否在运行(基于 pid file + 判活)。
|
|
19
|
-
*/
|
|
20
|
-
export declare function isCityRunning(): Promise<boolean>;
|
|
21
|
-
//# sourceMappingURL=CityRuntime.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CityRuntime.d.ts","sourceRoot":"","sources":["../../../src/host/runtime/CityRuntime.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH;;GAEG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAQ1D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAOvD;AAED;;GAEG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAItD"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CityRuntime:city 后台进程状态工具。
|
|
3
|
-
*
|
|
4
|
-
* 关键点(中文)
|
|
5
|
-
* - city 后台负责统一管理/观测多个 agent daemon。
|
|
6
|
-
* - 这里处理的是 city 后台自身的 pid 与判活,不涉及 control plane 进程。
|
|
7
|
-
* - agent daemon 启动前必须确保 city 后台已启动(强约束)。
|
|
8
|
-
*/
|
|
9
|
-
import fs from "fs-extra";
|
|
10
|
-
import { getCityPidPath } from "./CityPaths.js";
|
|
11
|
-
/**
|
|
12
|
-
* 读取 city 后台 pid(读取失败或内容非法返回 null)。
|
|
13
|
-
*/
|
|
14
|
-
export async function readCityPid() {
|
|
15
|
-
try {
|
|
16
|
-
const raw = await fs.readFile(getCityPidPath(), "utf-8");
|
|
17
|
-
const pid = Number.parseInt(String(raw).trim(), 10);
|
|
18
|
-
return Number.isFinite(pid) && pid > 0 ? pid : null;
|
|
19
|
-
}
|
|
20
|
-
catch {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* 判断 city 后台进程是否存活。
|
|
26
|
-
*/
|
|
27
|
-
export function isCityProcessAlive(pid) {
|
|
28
|
-
try {
|
|
29
|
-
process.kill(pid, 0);
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
32
|
-
catch {
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* 判断 city 后台是否在运行(基于 pid file + 判活)。
|
|
38
|
-
*/
|
|
39
|
-
export async function isCityRunning() {
|
|
40
|
-
const pid = await readCityPid();
|
|
41
|
-
if (!pid)
|
|
42
|
-
return false;
|
|
43
|
-
return isCityProcessAlive(pid);
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=CityRuntime.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CityRuntime.js","sourceRoot":"","sources":["../../../src/host/runtime/CityRuntime.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW;IAC/B,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;QACzD,MAAM,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;QACpD,OAAO,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;IACtD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAW;IAC5C,IAAI,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,MAAM,GAAG,GAAG,MAAM,WAAW,EAAE,CAAC;IAChC,IAAI,CAAC,GAAG;QAAE,OAAO,KAAK,CAAC;IACvB,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC;AACjC,CAAC"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 孤儿进程清扫工具。
|
|
3
|
-
*
|
|
4
|
-
* 关键点(中文)
|
|
5
|
-
* - 处理“pid 文件不存在,但旧的 detached 进程还活着”的场景。
|
|
6
|
-
* - 仅匹配 Downcity CLI 自己拉起的 `run` / `console run` / `agent start --foreground true`。
|
|
7
|
-
* - 作为 stop/start 的兜底清理层,避免旧版本进程占住端口却无法被当前 pid 文件追踪。
|
|
8
|
-
* - `run` 指 city 后台,`console run` 指 control plane 命令,二者需要明确区分。
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* 构建 detached 进程停机时的信号目标。
|
|
12
|
-
*
|
|
13
|
-
* 关键点(中文)
|
|
14
|
-
* - POSIX 下 `detached: true` 会让子进程成为新的进程组 leader。
|
|
15
|
-
* - `-pid` 表示向整个进程组发信号,可覆盖 ACP、shell、watcher 等孙进程。
|
|
16
|
-
* - Windows 不支持负 pid 进程组语义,只能回退到单 pid。
|
|
17
|
-
*/
|
|
18
|
-
export declare function buildDetachedProcessSignalTargets(pid: number): number[];
|
|
19
|
-
/**
|
|
20
|
-
* 向 detached 进程发送信号。
|
|
21
|
-
*
|
|
22
|
-
* 关键点(中文)
|
|
23
|
-
* - 优先发送到进程组;失败后再尝试单 pid。
|
|
24
|
-
* - 返回值只表示至少有一个目标接收到了信号,不代表进程已经退出。
|
|
25
|
-
*/
|
|
26
|
-
export declare function signalDetachedProcess(pid: number, signal: NodeJS.Signals): boolean;
|
|
27
|
-
export declare function isDowncityCliCommand(command: string): boolean;
|
|
28
|
-
/**
|
|
29
|
-
* 判断命令行是否属于本次清扫目标。
|
|
30
|
-
*
|
|
31
|
-
* 关键点(中文)
|
|
32
|
-
* - `Index.js run` 是 city runtime。
|
|
33
|
-
* - `Index.js console run` 是 control plane runtime。
|
|
34
|
-
* - 两者都包含 `run`,因此必须按完整子命令匹配,不能只查 `run` 词元。
|
|
35
|
-
*/
|
|
36
|
-
export declare function shouldSweepDetachedCityCommand(command: string, params: {
|
|
37
|
-
includeConsole?: boolean;
|
|
38
|
-
includeUi?: boolean;
|
|
39
|
-
includeAgent?: boolean;
|
|
40
|
-
}): boolean;
|
|
41
|
-
/**
|
|
42
|
-
* 只探测失联的 Downcity detached 进程,不执行停止动作。
|
|
43
|
-
*/
|
|
44
|
-
export declare function findDetachedCityProcesses(params?: {
|
|
45
|
-
includeConsole?: boolean;
|
|
46
|
-
includeUi?: boolean;
|
|
47
|
-
includeAgent?: boolean;
|
|
48
|
-
excludePids?: number[];
|
|
49
|
-
}): Promise<Array<{
|
|
50
|
-
pid: number;
|
|
51
|
-
command: string;
|
|
52
|
-
}>>;
|
|
53
|
-
/**
|
|
54
|
-
* 清扫失联的 Downcity detached 进程。
|
|
55
|
-
*/
|
|
56
|
-
export declare function sweepDetachedCityProcesses(params?: {
|
|
57
|
-
includeConsole?: boolean;
|
|
58
|
-
includeUi?: boolean;
|
|
59
|
-
includeAgent?: boolean;
|
|
60
|
-
timeoutMs?: number;
|
|
61
|
-
excludePids?: number[];
|
|
62
|
-
}): Promise<{
|
|
63
|
-
matched: Array<{
|
|
64
|
-
pid: number;
|
|
65
|
-
command: string;
|
|
66
|
-
}>;
|
|
67
|
-
stopped: Array<{
|
|
68
|
-
pid: number;
|
|
69
|
-
command: string;
|
|
70
|
-
}>;
|
|
71
|
-
alive: Array<{
|
|
72
|
-
pid: number;
|
|
73
|
-
command: string;
|
|
74
|
-
}>;
|
|
75
|
-
}>;
|
|
76
|
-
//# sourceMappingURL=ProcessSweep.d.ts.map
|
|
@@ -1 +0,0 @@
|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