@downcity/agent 1.1.12 → 1.1.14
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/bin/{runtime → core}/AgentContextTypes.d.ts +6 -6
- package/bin/core/AgentContextTypes.d.ts.map +1 -0
- package/bin/{runtime → core}/AgentContextTypes.js +2 -2
- package/bin/core/AgentContextTypes.js.map +1 -0
- package/bin/core/AgentCore.d.ts +87 -0
- package/bin/core/AgentCore.d.ts.map +1 -0
- package/bin/core/AgentCore.js +467 -0
- package/bin/core/AgentCore.js.map +1 -0
- package/bin/{runtime/AgentRuntimeTypes.d.ts → core/AgentCoreTypes.d.ts} +10 -10
- package/bin/core/AgentCoreTypes.d.ts.map +1 -0
- package/bin/core/AgentCoreTypes.js +10 -0
- package/bin/core/AgentCoreTypes.js.map +1 -0
- package/bin/host/runtime/PluginRuntime.d.ts +1 -1
- package/bin/host/runtime/PluginRuntime.d.ts.map +1 -1
- package/bin/index.d.ts +8 -10
- package/bin/index.d.ts.map +1 -1
- package/bin/index.js +4 -7
- package/bin/index.js.map +1 -1
- package/bin/plugin/builtins/asr/InboundAugment.d.ts +1 -1
- package/bin/plugin/builtins/asr/InboundAugment.d.ts.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/AuthorizationStore.d.ts +1 -1
- package/bin/plugin/builtins/auth/runtime/AuthorizationStore.d.ts.map +1 -1
- package/bin/plugin/builtins/voice/InboundAugment.d.ts +1 -1
- package/bin/plugin/builtins/voice/InboundAugment.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 +1 -1
- 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 +1 -1
- package/bin/plugin/core/HookRegistry.d.ts.map +1 -1
- package/bin/plugin/core/HttpRoutes.d.ts +1 -1
- package/bin/plugin/core/HttpRoutes.d.ts.map +1 -1
- package/bin/plugin/core/LocalExecution.d.ts.map +1 -1
- package/bin/plugin/core/LocalExecution.js +18 -20
- package/bin/plugin/core/LocalExecution.js.map +1 -1
- package/bin/plugin/core/PluginRegistry.d.ts +1 -1
- package/bin/plugin/core/PluginRegistry.d.ts.map +1 -1
- package/bin/plugin/types/Plugin.d.ts +1 -1
- package/bin/plugin/types/Plugin.d.ts.map +1 -1
- 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/sdk/Agent.d.ts +27 -25
- package/bin/sdk/Agent.d.ts.map +1 -1
- package/bin/sdk/Agent.js +86 -365
- package/bin/sdk/Agent.js.map +1 -1
- package/bin/sdk/AgentSdkTypes.d.ts +138 -0
- package/bin/sdk/AgentSdkTypes.d.ts.map +1 -1
- package/bin/sdk/HttpServer.d.ts +9 -19
- package/bin/sdk/HttpServer.d.ts.map +1 -1
- package/bin/sdk/HttpServer.js +26 -156
- package/bin/sdk/HttpServer.js.map +1 -1
- package/bin/sdk/RpcServer.d.ts +9 -10
- package/bin/sdk/RpcServer.d.ts.map +1 -1
- package/bin/sdk/RpcServer.js +22 -178
- package/bin/sdk/RpcServer.js.map +1 -1
- package/bin/sdk/Session.d.ts +8 -8
- package/bin/sdk/Session.d.ts.map +1 -1
- package/bin/sdk/Session.js +48 -54
- package/bin/sdk/Session.js.map +1 -1
- package/bin/sdk/SessionMetadata.d.ts +3 -3
- package/bin/sdk/SessionMetadata.d.ts.map +1 -1
- package/bin/sdk/SessionMetadata.js +5 -5
- package/bin/sdk/SessionMetadata.js.map +1 -1
- package/bin/sdk/SessionPersistence.d.ts +6 -6
- package/bin/sdk/SessionPersistence.d.ts.map +1 -1
- package/bin/sdk/SessionPersistence.js +7 -7
- package/bin/sdk/SessionPersistence.js.map +1 -1
- package/bin/sdk/SessionServicePort.d.ts +6 -6
- package/bin/sdk/SessionServicePort.d.ts.map +1 -1
- package/bin/sdk/SessionServicePort.js +9 -9
- package/bin/sdk/SessionServicePort.js.map +1 -1
- package/bin/sdk/{SdkSessionSystemComposer.d.ts → SessionSystemBuilder.d.ts} +7 -7
- package/bin/sdk/SessionSystemBuilder.d.ts.map +1 -0
- package/bin/sdk/{SdkSessionSystemComposer.js → SessionSystemBuilder.js} +14 -14
- package/bin/sdk/SessionSystemBuilder.js.map +1 -0
- package/bin/server/http/Server.d.ts +10 -1
- package/bin/server/http/Server.d.ts.map +1 -1
- package/bin/server/http/Server.js +41 -15
- package/bin/server/http/Server.js.map +1 -1
- package/bin/server/http/control/AuthControlService.d.ts +1 -1
- package/bin/server/http/control/AuthControlService.d.ts.map +1 -1
- package/bin/server/http/control/ControlAuthorizationRoutes.d.ts +1 -1
- package/bin/server/http/control/ControlAuthorizationRoutes.d.ts.map +1 -1
- package/bin/server/http/control/ControlRouter.d.ts +18 -2
- package/bin/server/http/control/ControlRouter.d.ts.map +1 -1
- package/bin/server/http/control/ControlRouter.js +10 -8
- package/bin/server/http/control/ControlRouter.js.map +1 -1
- package/bin/server/http/control/ExecuteBySession.d.ts +2 -2
- package/bin/server/http/control/ExecuteBySession.d.ts.map +1 -1
- package/bin/server/http/control/OverviewRoutes.d.ts.map +1 -1
- package/bin/server/http/control/OverviewRoutes.js +6 -2
- package/bin/server/http/control/OverviewRoutes.js.map +1 -1
- package/bin/server/http/control/SessionSummaryStore.d.ts +1 -1
- package/bin/server/http/control/SessionSummaryStore.d.ts.map +1 -1
- package/bin/server/http/control/types/ControlRoutes.d.ts +2 -2
- package/bin/server/http/control/types/ControlRoutes.d.ts.map +1 -1
- package/bin/server/http/execute/execute.d.ts +13 -2
- package/bin/server/http/execute/execute.d.ts.map +1 -1
- package/bin/server/http/execute/execute.js +73 -71
- package/bin/server/http/execute/execute.js.map +1 -1
- package/bin/server/http/plugins/plugins.d.ts +13 -2
- package/bin/server/http/plugins/plugins.d.ts.map +1 -1
- package/bin/server/http/plugins/plugins.js +42 -40
- package/bin/server/http/plugins/plugins.js.map +1 -1
- package/bin/server/http/services/services.d.ts +12 -8
- package/bin/server/http/services/services.d.ts.map +1 -1
- package/bin/server/http/services/services.js +57 -64
- package/bin/server/http/services/services.js.map +1 -1
- package/bin/server/http/static/static.d.ts +13 -2
- package/bin/server/http/static/static.d.ts.map +1 -1
- package/bin/server/http/static/static.js +81 -79
- package/bin/server/http/static/static.js.map +1 -1
- package/bin/server/rpc/Server.d.ts +5 -3
- package/bin/server/rpc/Server.d.ts.map +1 -1
- package/bin/server/rpc/Server.js +22 -12
- package/bin/server/rpc/Server.js.map +1 -1
- 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 +2 -2
- package/bin/service/builtins/chat/ChatService.d.ts.map +1 -1
- package/bin/service/builtins/chat/ChatServiceTypes.d.ts +1 -1
- package/bin/service/builtins/chat/ChatServiceTypes.d.ts.map +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 +1 -1
- 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/FeishuMessageHandler.d.ts +1 -1
- package/bin/service/builtins/chat/channels/feishu/FeishuMessageHandler.d.ts.map +1 -1
- 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/qq/QQ.d.ts +1 -1
- package/bin/service/builtins/chat/channels/qq/QQ.d.ts.map +1 -1
- package/bin/service/builtins/chat/channels/qq/QQMessageHandler.d.ts +1 -1
- package/bin/service/builtins/chat/channels/qq/QQMessageHandler.d.ts.map +1 -1
- package/bin/service/builtins/chat/channels/qq/QQSupport.d.ts +1 -1
- package/bin/service/builtins/chat/channels/qq/QQSupport.d.ts.map +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/TelegramMessageHandler.d.ts +1 -1
- package/bin/service/builtins/chat/channels/telegram/TelegramMessageHandler.d.ts.map +1 -1
- 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 +1 -1
- package/bin/service/builtins/chat/runtime/ChatActionExecution.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatActionInput.d.ts +3 -36
- package/bin/service/builtins/chat/runtime/ChatActionInput.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatActionInput.js +3 -118
- package/bin/service/builtins/chat/runtime/ChatActionInput.js.map +1 -1
- 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 +1 -1
- package/bin/service/builtins/chat/runtime/ChatChannelConfig.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatChannelCore.d.ts +1 -1
- 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 +1 -1
- package/bin/service/builtins/chat/runtime/ChatHistoryStore.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatIngressStore.d.ts +1 -1
- package/bin/service/builtins/chat/runtime/ChatIngressStore.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatMetaStore.d.ts +1 -1
- package/bin/service/builtins/chat/runtime/ChatMetaStore.d.ts.map +1 -1
- 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 +1 -1
- 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/ChatServiceActions.d.ts +1 -1
- package/bin/service/builtins/chat/runtime/ChatServiceActions.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatServiceActions.js +2 -109
- package/bin/service/builtins/chat/runtime/ChatServiceActions.js.map +1 -1
- 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/ChatSession.d.ts +27 -8
- package/bin/service/builtins/chat/runtime/ChatSession.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatSession.js +9 -4
- package/bin/service/builtins/chat/runtime/ChatSession.js.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 +1 -1
- package/bin/service/builtins/chat/runtime/ChatkeySend.d.ts.map +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/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/contact/Action.d.ts +2 -2
- package/bin/service/builtins/contact/Action.d.ts.map +1 -1
- package/bin/service/builtins/contact/Action.js +2 -58
- 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/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 +0 -7
- package/bin/service/builtins/contact/runtime/ContactPayload.d.ts.map +1 -1
- package/bin/service/builtins/contact/runtime/ContactPayload.js +0 -9
- package/bin/service/builtins/contact/runtime/ContactPayload.js.map +1 -1
- 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/RemoteClient.js +37 -19
- package/bin/service/builtins/contact/runtime/RemoteClient.js.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 +1 -1
- 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/MemoryService.js +0 -27
- package/bin/service/builtins/memory/MemoryService.js.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/schedule/ScheduleService.d.ts +39 -0
- package/bin/service/builtins/schedule/ScheduleService.d.ts.map +1 -0
- package/bin/service/builtins/schedule/ScheduleService.js +106 -0
- package/bin/service/builtins/schedule/ScheduleService.js.map +1 -0
- 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 +1 -1
- package/bin/service/builtins/shell/runtime/ShellActionResponse.d.ts.map +1 -1
- 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/ShellActionRuntimeSupport.d.ts +1 -1
- package/bin/service/builtins/shell/runtime/ShellActionRuntimeSupport.d.ts.map +1 -1
- package/bin/service/builtins/shell/runtime/ShellRuntimeEnvironment.d.ts +1 -1
- package/bin/service/builtins/shell/runtime/ShellRuntimeEnvironment.d.ts.map +1 -1
- 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/Runner.d.ts +2 -2
- package/bin/service/builtins/task/runtime/Runner.d.ts.map +1 -1
- package/bin/service/builtins/task/runtime/Runner.js +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 +2 -31
- package/bin/service/builtins/task/runtime/TaskActionInput.d.ts.map +1 -1
- package/bin/service/builtins/task/runtime/TaskActionInput.js +2 -141
- package/bin/service/builtins/task/runtime/TaskActionInput.js.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 +1 -1
- package/bin/service/builtins/task/runtime/TaskRunnerRound.d.ts.map +1 -1
- package/bin/service/builtins/task/runtime/TaskRunnerScript.d.ts +1 -1
- package/bin/service/builtins/task/runtime/TaskRunnerScript.d.ts.map +1 -1
- package/bin/service/builtins/task/runtime/TaskRunnerSession.d.ts +3 -3
- package/bin/service/builtins/task/runtime/TaskRunnerSession.d.ts.map +1 -1
- package/bin/service/builtins/task/runtime/TaskRunnerSession.js +4 -4
- package/bin/service/builtins/task/runtime/TaskRunnerSession.js.map +1 -1
- package/bin/service/builtins/task/runtime/TaskRunnerTypes.d.ts +1 -1
- package/bin/service/builtins/task/runtime/TaskServiceActions.d.ts +1 -1
- package/bin/service/builtins/task/runtime/TaskServiceActions.d.ts.map +1 -1
- package/bin/service/builtins/task/runtime/TaskServiceActions.js +2 -30
- package/bin/service/builtins/task/runtime/TaskServiceActions.js.map +1 -1
- package/bin/service/core/Manager.d.ts +0 -1
- package/bin/service/core/Manager.d.ts.map +1 -1
- package/bin/service/core/Manager.js +0 -1
- package/bin/service/core/Manager.js.map +1 -1
- package/bin/service/core/ServiceActionRunner.d.ts +1 -1
- package/bin/service/core/ServiceActionRunner.d.ts.map +1 -1
- package/bin/service/core/ServiceActionRunner.js +3 -1
- package/bin/service/core/ServiceActionRunner.js.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/ServiceCommandRequest.d.ts +36 -0
- package/bin/service/core/ServiceCommandRequest.d.ts.map +1 -0
- package/bin/service/core/ServiceCommandRequest.js +53 -0
- package/bin/service/core/ServiceCommandRequest.js.map +1 -0
- package/bin/service/core/ServiceManager.d.ts +1 -1
- package/bin/service/core/ServiceManager.d.ts.map +1 -1
- package/bin/service/core/ServiceStateController.d.ts +20 -7
- package/bin/service/core/ServiceStateController.d.ts.map +1 -1
- package/bin/service/core/ServiceStateController.js +23 -20
- 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/core/Services.js +2 -0
- package/bin/service/core/Services.js.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/types/Service.d.ts +1 -23
- package/bin/service/types/Service.d.ts.map +1 -1
- package/bin/session/{Session.d.ts → Executor.d.ts} +54 -17
- package/bin/session/Executor.d.ts.map +1 -0
- package/bin/session/{Session.js → Executor.js} +60 -23
- package/bin/session/Executor.js.map +1 -0
- package/bin/session/composer/SessionComposer.d.ts +1 -1
- package/bin/session/composer/SessionComposer.js +1 -1
- package/bin/session/composer/compaction/SessionCompactionComposer.d.ts +2 -2
- package/bin/session/composer/execution/LocalSessionExecutionComposer.d.ts +1 -1
- package/bin/session/composer/execution/LocalSessionExecutionComposer.js +1 -1
- package/bin/session/composer/execution/SessionExecutionComposer.d.ts +1 -1
- package/bin/session/composer/history/SessionHistoryComposer.d.ts +1 -1
- package/bin/session/composer/system/SessionSystemComposer.d.ts +1 -1
- package/bin/session/composer/system/SessionSystemComposer.js +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 → Runner.d.ts} +10 -10
- package/bin/session/executors/local/Runner.d.ts.map +1 -0
- package/bin/session/executors/local/{LocalSessionCore.js → Runner.js} +11 -11
- package/bin/session/executors/local/Runner.js.map +1 -0
- package/bin/session/executors/local/SessionExecutionError.d.ts +1 -1
- package/bin/session/executors/local/SessionExecutionError.js +1 -1
- package/bin/session/executors/local/SessionLoopDecision.d.ts +3 -3
- package/bin/session/executors/local/SessionLoopDecision.js +3 -3
- package/bin/session/executors/local/SessionModelMessageState.d.ts +2 -2
- package/bin/session/executors/local/SessionModelMessageState.js +2 -2
- package/bin/session/executors/local/SessionSignals.d.ts +3 -3
- package/bin/session/executors/local/SessionSignals.js +3 -3
- package/bin/session/executors/local/SessionToolLoopRunner.d.ts +1 -1
- package/bin/session/executors/local/SessionToolLoopRunner.js +2 -2
- package/bin/session/executors/local/SessionToolLoopRunner.js.map +1 -1
- package/bin/session/tools/shell/ShellToolBridge.d.ts +1 -1
- package/bin/session/tools/shell/ShellToolBridge.d.ts.map +1 -1
- package/bin/session/types/SessionLoop.d.ts +1 -1
- package/bin/session/types/SessionLoop.js +1 -1
- package/bin/session/types/SessionRun.d.ts +2 -2
- package/bin/session/types/SessionRun.js +1 -1
- package/package.json +1 -1
- package/src/{runtime → core}/AgentContextTypes.ts +6 -7
- package/src/core/AgentCore.ts +527 -0
- package/src/{runtime/AgentRuntimeTypes.ts → core/AgentCoreTypes.ts} +9 -9
- package/src/host/runtime/PluginRuntime.ts +1 -1
- package/src/index.ts +26 -23
- package/src/plugin/builtins/asr/InboundAugment.ts +1 -1
- package/src/plugin/builtins/auth/runtime/AuthorizationConfig.ts +1 -1
- package/src/plugin/builtins/auth/runtime/AuthorizationStore.ts +1 -1
- package/src/plugin/builtins/voice/InboundAugment.ts +1 -1
- package/src/plugin/builtins/workboard/runtime/Collector.ts +2 -2
- package/src/plugin/builtins/workboard/runtime/Normalizer.ts +1 -1
- package/src/plugin/builtins/workboard/runtime/Store.ts +1 -1
- package/src/plugin/core/Activation.ts +2 -2
- package/src/plugin/core/HookRegistry.ts +1 -1
- package/src/plugin/core/HttpRoutes.ts +1 -1
- package/src/plugin/core/LocalExecution.ts +21 -20
- package/src/plugin/core/PluginRegistry.ts +1 -1
- package/src/plugin/types/Plugin.ts +1 -1
- package/src/sandbox/SandboxConfigResolver.ts +1 -1
- package/src/sandbox/SandboxRunner.ts +1 -1
- package/src/sdk/Agent.ts +101 -395
- package/src/sdk/AgentSdkTypes.ts +158 -0
- package/src/sdk/HttpServer.ts +27 -192
- package/src/sdk/RpcServer.ts +24 -211
- package/src/sdk/Session.ts +64 -68
- package/src/sdk/SessionMetadata.ts +5 -5
- package/src/sdk/SessionPersistence.ts +13 -13
- package/src/sdk/SessionServicePort.ts +14 -14
- package/src/sdk/{SdkSessionSystemComposer.ts → SessionSystemBuilder.ts} +24 -24
- package/src/server/http/Server.ts +63 -18
- package/src/server/http/control/AuthControlService.ts +1 -1
- package/src/server/http/control/ControlAuthorizationRoutes.ts +1 -1
- package/src/server/http/control/ControlRouter.ts +27 -11
- package/src/server/http/control/ExecuteBySession.ts +2 -2
- package/src/server/http/control/OverviewRoutes.ts +6 -2
- package/src/server/http/control/SessionSummaryStore.ts +1 -1
- package/src/server/http/control/types/ControlRoutes.ts +2 -2
- package/src/server/http/execute/execute.ts +107 -91
- package/src/server/http/plugins/plugins.ts +60 -44
- package/src/server/http/services/services.ts +68 -64
- package/src/server/http/static/static.ts +95 -79
- package/src/server/rpc/Server.ts +26 -15
- package/src/service/builtins/BaseService.ts +2 -2
- package/src/service/builtins/chat/Action.ts +1 -1
- package/src/service/builtins/chat/ChatService.ts +2 -2
- package/src/service/builtins/chat/ChatServiceTypes.ts +1 -1
- package/src/service/builtins/chat/channels/BaseChatChannel.ts +1 -1
- package/src/service/builtins/chat/channels/BaseChatChannelQueue.ts +1 -1
- package/src/service/builtins/chat/channels/BaseChatChannelSupport.ts +1 -1
- package/src/service/builtins/chat/channels/feishu/Feishu.ts +1 -1
- package/src/service/builtins/chat/channels/feishu/FeishuMessageHandler.ts +1 -1
- package/src/service/builtins/chat/channels/feishu/FeishuPlatformClient.ts +1 -1
- package/src/service/builtins/chat/channels/qq/QQ.ts +1 -1
- package/src/service/builtins/chat/channels/qq/QQMessageHandler.ts +1 -1
- package/src/service/builtins/chat/channels/qq/QQSupport.ts +1 -1
- package/src/service/builtins/chat/channels/telegram/Bot.ts +1 -1
- package/src/service/builtins/chat/channels/telegram/TelegramMessageHandler.ts +1 -1
- 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 +1 -1
- package/src/service/builtins/chat/runtime/ChatActionInput.ts +2 -158
- package/src/service/builtins/chat/runtime/ChatChannelActions.ts +1 -1
- package/src/service/builtins/chat/runtime/ChatChannelConfig.ts +1 -1
- package/src/service/builtins/chat/runtime/ChatChannelCore.ts +1 -1
- package/src/service/builtins/chat/runtime/ChatChannelLifecycle.ts +1 -1
- package/src/service/builtins/chat/runtime/ChatHistoryStore.ts +1 -1
- package/src/service/builtins/chat/runtime/ChatIngressStore.ts +1 -1
- package/src/service/builtins/chat/runtime/ChatMetaStore.ts +1 -1
- package/src/service/builtins/chat/runtime/ChatQueueReplyDispatch.ts +1 -1
- package/src/service/builtins/chat/runtime/ChatQueueSessionBridge.ts +1 -1
- package/src/service/builtins/chat/runtime/ChatQueueStore.ts +1 -1
- package/src/service/builtins/chat/runtime/ChatQueueWorker.ts +1 -1
- package/src/service/builtins/chat/runtime/ChatServiceActions.ts +1 -118
- package/src/service/builtins/chat/runtime/ChatServiceSystem.ts +1 -1
- package/src/service/builtins/chat/runtime/ChatSession.ts +37 -13
- package/src/service/builtins/chat/runtime/ChatSessionDelete.ts +1 -1
- package/src/service/builtins/chat/runtime/ChatkeySend.ts +1 -1
- package/src/service/builtins/chat/runtime/EnqueueDispatch.ts +1 -1
- package/src/service/builtins/chat/runtime/InboundAugment.ts +1 -1
- package/src/service/builtins/chat/runtime/PluginDispatch.ts +1 -1
- package/src/service/builtins/chat/runtime/ReplyDispatch.ts +1 -1
- package/src/service/builtins/chat/runtime/SystemPrompt.ts +1 -1
- package/src/service/builtins/contact/Action.ts +2 -59
- package/src/service/builtins/contact/ContactService.ts +2 -2
- package/src/service/builtins/contact/runtime/ChatRuntime.ts +1 -1
- package/src/service/builtins/contact/runtime/ContactPayload.ts +0 -12
- package/src/service/builtins/contact/runtime/RemoteClient.ts +40 -19
- package/src/service/builtins/contact/runtime/ShareBundle.ts +1 -1
- package/src/service/builtins/memory/Action.ts +1 -1
- package/src/service/builtins/memory/MemoryService.ts +1 -28
- 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/schedule/ScheduleService.ts +131 -0
- 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 +1 -1
- package/src/service/builtins/shell/runtime/ShellActionRuntime.ts +1 -1
- package/src/service/builtins/shell/runtime/ShellActionRuntimeSupport.ts +1 -1
- package/src/service/builtins/shell/runtime/ShellRuntimeEnvironment.ts +1 -1
- package/src/service/builtins/task/Action.ts +1 -1
- 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/Runner.ts +2 -2
- package/src/service/builtins/task/runtime/TaskActionExecution.ts +1 -1
- package/src/service/builtins/task/runtime/TaskActionInput.ts +3 -185
- package/src/service/builtins/task/runtime/TaskRunChatDispatch.ts +1 -1
- package/src/service/builtins/task/runtime/TaskRunnerRound.ts +1 -1
- package/src/service/builtins/task/runtime/TaskRunnerScript.ts +1 -1
- package/src/service/builtins/task/runtime/TaskRunnerSession.ts +5 -5
- package/src/service/builtins/task/runtime/TaskRunnerTypes.ts +1 -1
- package/src/service/builtins/task/runtime/TaskServiceActions.ts +1 -35
- package/src/service/core/Manager.ts +0 -1
- package/src/service/core/ServiceActionRunner.ts +4 -2
- package/src/service/core/ServiceClassRegistry.ts +1 -1
- package/src/service/core/ServiceCommandRequest.ts +93 -0
- package/src/service/core/ServiceManager.ts +0 -1
- package/src/service/core/ServiceStateController.ts +45 -20
- package/src/service/core/ServiceSystemProviders.ts +1 -1
- package/src/service/core/Services.ts +3 -1
- package/src/service/schedule/Executor.ts +1 -1
- package/src/service/types/Service.ts +1 -24
- package/src/session/{Session.ts → Executor.ts} +96 -26
- package/src/session/composer/SessionComposer.ts +1 -1
- package/src/session/composer/compaction/SessionCompactionComposer.ts +2 -2
- package/src/session/composer/execution/LocalSessionExecutionComposer.ts +1 -1
- package/src/session/composer/execution/SessionExecutionComposer.ts +1 -1
- package/src/session/composer/history/SessionHistoryComposer.ts +1 -1
- package/src/session/composer/system/SessionSystemComposer.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 → Runner.ts} +13 -13
- package/src/session/executors/local/SessionExecutionError.ts +1 -1
- package/src/session/executors/local/SessionLoopDecision.ts +3 -3
- package/src/session/executors/local/SessionModelMessageState.ts +2 -2
- package/src/session/executors/local/SessionSignals.ts +3 -3
- package/src/session/executors/local/SessionToolLoopRunner.ts +2 -2
- package/src/session/tools/shell/ShellToolBridge.ts +1 -1
- package/src/session/types/SessionLoop.ts +1 -1
- package/src/session/types/SessionRun.ts +2 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/bin/runtime/AgentContext.d.ts +0 -23
- package/bin/runtime/AgentContext.d.ts.map +0 -1
- package/bin/runtime/AgentContext.js +0 -149
- package/bin/runtime/AgentContext.js.map +0 -1
- package/bin/runtime/AgentContextTypes.d.ts.map +0 -1
- package/bin/runtime/AgentContextTypes.js.map +0 -1
- package/bin/runtime/AgentRuntime.d.ts +0 -37
- package/bin/runtime/AgentRuntime.d.ts.map +0 -1
- package/bin/runtime/AgentRuntime.js +0 -296
- package/bin/runtime/AgentRuntime.js.map +0 -1
- package/bin/runtime/AgentRuntimeState.d.ts +0 -42
- package/bin/runtime/AgentRuntimeState.d.ts.map +0 -1
- package/bin/runtime/AgentRuntimeState.js +0 -172
- package/bin/runtime/AgentRuntimeState.js.map +0 -1
- package/bin/runtime/AgentRuntimeTypes.d.ts.map +0 -1
- package/bin/runtime/AgentRuntimeTypes.js +0 -10
- package/bin/runtime/AgentRuntimeTypes.js.map +0 -1
- package/bin/sdk/SdkSessionSystemComposer.d.ts.map +0 -1
- package/bin/sdk/SdkSessionSystemComposer.js.map +0 -1
- package/bin/service/core/ServiceActionApi.d.ts +0 -15
- package/bin/service/core/ServiceActionApi.d.ts.map +0 -1
- package/bin/service/core/ServiceActionApi.js +0 -234
- package/bin/service/core/ServiceActionApi.js.map +0 -1
- package/bin/service/schedule/Runtime.d.ts +0 -17
- package/bin/service/schedule/Runtime.d.ts.map +0 -1
- package/bin/service/schedule/Runtime.js +0 -64
- package/bin/service/schedule/Runtime.js.map +0 -1
- package/bin/session/Session.d.ts.map +0 -1
- package/bin/session/Session.js.map +0 -1
- package/bin/session/executors/local/LocalSessionCore.d.ts.map +0 -1
- package/bin/session/executors/local/LocalSessionCore.js.map +0 -1
- package/bin/session/executors/local/LocalSessionExecutor.d.ts +0 -61
- package/bin/session/executors/local/LocalSessionExecutor.d.ts.map +0 -1
- package/bin/session/executors/local/LocalSessionExecutor.js +0 -36
- package/bin/session/executors/local/LocalSessionExecutor.js.map +0 -1
- package/src/runtime/AgentContext.ts +0 -182
- package/src/runtime/AgentRuntime.ts +0 -376
- package/src/runtime/AgentRuntimeState.ts +0 -213
- package/src/service/core/ServiceActionApi.ts +0 -304
- package/src/service/schedule/Runtime.ts +0 -78
- package/src/session/executors/local/LocalSessionExecutor.ts +0 -89
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* AgentCore 运行时类型定义。
|
|
3
3
|
*
|
|
4
4
|
* 关键点(中文)
|
|
5
|
-
* -
|
|
6
|
-
* -
|
|
7
|
-
* - Session / Service / Plugin
|
|
5
|
+
* - 这里表达的是单个 `AgentCore` 实例持有的长期运行状态。
|
|
6
|
+
* - 它不再依赖 `runtime/*` 兼容层,而是作为实例级主类型来源。
|
|
7
|
+
* - Session / Service / Plugin 这些长期对象都从这里挂出。
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import type { LanguageModel } from "ai";
|
|
@@ -16,10 +16,10 @@ import type {
|
|
|
16
16
|
AgentPluginConfigRuntime,
|
|
17
17
|
} from "@/types/host/AgentHost.js";
|
|
18
18
|
import type { BaseService } from "@/service/builtins/BaseService.js";
|
|
19
|
-
import type {
|
|
19
|
+
import type { Executor } from "@session/Executor.js";
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* AgentCore 启动早期的基础状态。
|
|
23
23
|
*/
|
|
24
24
|
export interface AgentRuntimeBase {
|
|
25
25
|
/**
|
|
@@ -65,7 +65,7 @@ export interface AgentRuntimeBase {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
68
|
+
* AgentCore 完整运行状态。
|
|
69
69
|
*/
|
|
70
70
|
export interface AgentRuntime extends AgentRuntimeBase {
|
|
71
71
|
/**
|
|
@@ -73,9 +73,9 @@ export interface AgentRuntime extends AgentRuntimeBase {
|
|
|
73
73
|
*/
|
|
74
74
|
model?: LanguageModel;
|
|
75
75
|
/**
|
|
76
|
-
* 读取指定 sessionId
|
|
76
|
+
* 读取指定 sessionId 对应的内部 Executor 实例。
|
|
77
77
|
*/
|
|
78
|
-
getSession(sessionId: string):
|
|
78
|
+
getSession(sessionId: string): Executor;
|
|
79
79
|
/**
|
|
80
80
|
* 返回当前执行中的 sessionId 列表。
|
|
81
81
|
*/
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* - agent runtime 仅作为 context provider 注册方,不再成为 plugin manager 的宿主。
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type { AgentContext } from "@/
|
|
10
|
+
import type { AgentContext } from "@/core/AgentContextTypes.js";
|
|
11
11
|
|
|
12
12
|
type AgentContextResolver = () => AgentContext;
|
|
13
13
|
|
package/src/index.ts
CHANGED
|
@@ -9,9 +9,17 @@
|
|
|
9
9
|
|
|
10
10
|
// SDK 入口
|
|
11
11
|
export { Agent } from "./sdk/Agent.js";
|
|
12
|
+
export { Session } from "./sdk/Session.js";
|
|
12
13
|
export { RemoteAgent } from "./sdk/RemoteAgent.js";
|
|
14
|
+
export { AgentCore } from "./core/AgentCore.js";
|
|
13
15
|
export type {
|
|
14
16
|
AgentOptions,
|
|
17
|
+
AgentHttpBinding,
|
|
18
|
+
AgentHttpStartOptions,
|
|
19
|
+
AgentRpcBinding,
|
|
20
|
+
AgentStartOptions,
|
|
21
|
+
AgentStartResult,
|
|
22
|
+
AgentStopResult,
|
|
15
23
|
RemoteAgentOptions,
|
|
16
24
|
AgentSessionConfigSnapshot,
|
|
17
25
|
AgentSessionForkInput,
|
|
@@ -25,6 +33,19 @@ export type {
|
|
|
25
33
|
AgentSessionSystemSessionInfo,
|
|
26
34
|
AgentSessionSystemSnapshot,
|
|
27
35
|
} from "./sdk/AgentSdkTypes.js";
|
|
36
|
+
export type {
|
|
37
|
+
AgentRuntime as AgentCoreRuntime,
|
|
38
|
+
AgentRuntimeBase as AgentCoreRuntimeBase,
|
|
39
|
+
} from "./core/AgentCoreTypes.js";
|
|
40
|
+
export type {
|
|
41
|
+
AgentContext as AgentContext,
|
|
42
|
+
AgentContext as AgentCoreContext,
|
|
43
|
+
ChatRuntimePort,
|
|
44
|
+
InvokeServicePort,
|
|
45
|
+
SessionCollectionPort,
|
|
46
|
+
SessionPort,
|
|
47
|
+
StructuredConfig,
|
|
48
|
+
} from "./core/AgentContextTypes.js";
|
|
28
49
|
|
|
29
50
|
// 服务与插件作者 API
|
|
30
51
|
export { BaseService } from "./service/builtins/BaseService.js";
|
|
@@ -45,23 +66,8 @@ export { asrPlugin } from "./plugin/builtins/asr/Plugin.js";
|
|
|
45
66
|
export { ttsPlugin } from "./plugin/builtins/tts/Plugin.js";
|
|
46
67
|
export { workboardPlugin } from "./plugin/builtins/workboard/Plugin.js";
|
|
47
68
|
|
|
48
|
-
// Agent 运行时集成
|
|
49
|
-
export {
|
|
50
|
-
getAgentContext,
|
|
51
|
-
getAgentRuntime,
|
|
52
|
-
getAgentRuntimeBase,
|
|
53
|
-
initAgentRuntime,
|
|
54
|
-
requireAgentModel,
|
|
55
|
-
setAgentRuntime,
|
|
56
|
-
setAgentRuntimeBase,
|
|
57
|
-
stopAgentHotReload,
|
|
58
|
-
} from "./runtime/AgentRuntime.js";
|
|
59
|
-
export { createAgentContext } from "./runtime/AgentContext.js";
|
|
60
|
-
export type { AgentRuntime, AgentRuntimeBase } from "./runtime/AgentRuntimeState.js";
|
|
61
|
-
export type { AgentContext } from "./runtime/AgentContextTypes.js";
|
|
62
|
-
|
|
63
69
|
// Session 与即时执行集成
|
|
64
|
-
export {
|
|
70
|
+
export { Executor } from "./session/Executor.js";
|
|
65
71
|
export {
|
|
66
72
|
drainDeferredPersistedUserMessages,
|
|
67
73
|
getSessionRunScope,
|
|
@@ -70,8 +76,10 @@ export { JsonlSessionHistoryComposer } from "./session/composer/history/jsonl/Js
|
|
|
70
76
|
export { JsonlSessionCompactionComposer } from "./session/composer/compaction/jsonl/JsonlSessionCompactionComposer.js";
|
|
71
77
|
export { SessionSystemComposer } from "./session/composer/system/SessionSystemComposer.js";
|
|
72
78
|
export { transformPromptsIntoSystemMessages } from "./session/composer/system/default/PromptRenderer.js";
|
|
73
|
-
export {
|
|
74
|
-
|
|
79
|
+
export {
|
|
80
|
+
loadStaticSystemPrompts,
|
|
81
|
+
StaticPromptCatalog,
|
|
82
|
+
} from "./session/composer/system/default/StaticPromptCatalog.js";
|
|
75
83
|
|
|
76
84
|
// Agent server 与 transport 集成
|
|
77
85
|
export { startServer } from "./server/http/Server.js";
|
|
@@ -84,10 +92,6 @@ export {
|
|
|
84
92
|
startAllServices,
|
|
85
93
|
stopAllServices,
|
|
86
94
|
} from "./service/core/Manager.js";
|
|
87
|
-
export {
|
|
88
|
-
startServiceScheduleRuntime,
|
|
89
|
-
stopServiceScheduleRuntime,
|
|
90
|
-
} from "./service/schedule/Runtime.js";
|
|
91
95
|
export { ServiceScheduleStore } from "./service/schedule/Store.js";
|
|
92
96
|
export { parseScheduledRunAtMsOrThrow } from "./service/schedule/Time.js";
|
|
93
97
|
export {
|
|
@@ -247,7 +251,6 @@ export type {
|
|
|
247
251
|
export type {
|
|
248
252
|
Service,
|
|
249
253
|
ServiceAction,
|
|
250
|
-
ServiceActionApi,
|
|
251
254
|
ServiceActionCommand,
|
|
252
255
|
ServiceActionCommandInput,
|
|
253
256
|
ServiceActionResult,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - 转写失败不阻塞主链路,保持 best-effort。
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import type { AgentContext } from "@/
|
|
9
|
+
import type { AgentContext } from "@/core/AgentContextTypes.js";
|
|
10
10
|
import type { ChatInboundAugmentInput } from "@/service/builtins/chat/types/ChatPlugin.js";
|
|
11
11
|
import type { JsonValue } from "@/types/common/Json.js";
|
|
12
12
|
import { transcribeWithVoiceDependency } from "@/plugin/builtins/asr/Dependency.js";
|
|
@@ -14,7 +14,7 @@ import type {
|
|
|
14
14
|
ChatAuthorizationSnapshot,
|
|
15
15
|
ChatAuthorizationStateFile,
|
|
16
16
|
} from "@/plugin/builtins/auth/types/AuthPlugin.js";
|
|
17
|
-
import type { AgentContext } from "@/
|
|
17
|
+
import type { AgentContext } from "@/core/AgentContextTypes.js";
|
|
18
18
|
import type { ChatDispatchChannel } from "@/service/builtins/chat/types/ChatDispatcher.js";
|
|
19
19
|
|
|
20
20
|
function getAuthorizationStatePath(rootPath: string): string {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - 转写失败不阻塞主链路,保持 best-effort。
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import type { AgentContext } from "@/
|
|
9
|
+
import type { AgentContext } from "@/core/AgentContextTypes.js";
|
|
10
10
|
import type { ChatInboundAugmentInput } from "@/service/builtins/chat/types/ChatPlugin.js";
|
|
11
11
|
import type { JsonValue } from "@/types/common/Json.js";
|
|
12
12
|
import { transcribeWithVoiceDependency } from "@/plugin/builtins/voice/Dependency.js";
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { listTaskDefinitions } from "@/service/builtins/task/Action.js";
|
|
10
10
|
import { listServiceStates } from "@/service/core/Manager.js";
|
|
11
11
|
import { listControlSessionSummaries } from "@/server/http/control/SessionSummaryStore.js";
|
|
12
|
-
import type { AgentContext } from "@/
|
|
12
|
+
import type { AgentContext } from "@/core/AgentContextTypes.js";
|
|
13
13
|
import type { WorkboardSnapshot } from "@/plugin/builtins/workboard/types/Workboard.js";
|
|
14
14
|
import {
|
|
15
15
|
buildIdleActivity,
|
|
@@ -36,7 +36,7 @@ export async function collectWorkboardSnapshot(
|
|
|
36
36
|
limit: WORKBOARD_RECENT_LIMIT + Math.max(executingSessionIds.size, 1),
|
|
37
37
|
executingSessionIds,
|
|
38
38
|
});
|
|
39
|
-
const services = listServiceStates();
|
|
39
|
+
const services = listServiceStates({ context });
|
|
40
40
|
const taskResult = await listTaskDefinitions({ projectRoot: context.rootPath });
|
|
41
41
|
const degradedCount = services.filter((item) => item.state !== "running").length;
|
|
42
42
|
|
|
@@ -15,7 +15,7 @@ import type {
|
|
|
15
15
|
WorkboardSignalItem,
|
|
16
16
|
WorkboardSummary,
|
|
17
17
|
} from "@/plugin/builtins/workboard/types/Workboard.js";
|
|
18
|
-
import type { AgentContext } from "@/
|
|
18
|
+
import type { AgentContext } from "@/core/AgentContextTypes.js";
|
|
19
19
|
|
|
20
20
|
function toIsoString(timestamp?: number): string {
|
|
21
21
|
if (!timestamp || !Number.isFinite(timestamp)) {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - route 与 action 共享同一份快照,确保 workboard 展示一致。
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import type { AgentContext } from "@/
|
|
9
|
+
import type { AgentContext } from "@/core/AgentContextTypes.js";
|
|
10
10
|
import type { WorkboardSnapshot } from "@/plugin/builtins/workboard/types/Workboard.js";
|
|
11
11
|
import { collectWorkboardSnapshot } from "@/plugin/builtins/workboard/runtime/Collector.js";
|
|
12
12
|
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import type { Plugin } from "@/plugin/types/Plugin.js";
|
|
10
|
-
import type { AgentContext } from "@/
|
|
11
|
-
import type { AgentRuntimeBase } from "@/
|
|
10
|
+
import type { AgentContext } from "@/core/AgentContextTypes.js";
|
|
11
|
+
import type { AgentRuntimeBase } from "@/core/AgentCoreTypes.js";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* 读取当前 city 配置下的 plugin 启用态。
|
|
@@ -13,7 +13,7 @@ import type {
|
|
|
13
13
|
PluginPipelineHook,
|
|
14
14
|
PluginResolveHook,
|
|
15
15
|
} from "@/plugin/types/Plugin.js";
|
|
16
|
-
import type { AgentContext } from "@/
|
|
16
|
+
import type { AgentContext } from "@/core/AgentContextTypes.js";
|
|
17
17
|
|
|
18
18
|
type ContextResolver = () => AgentContext;
|
|
19
19
|
type PluginEnabledChecker = (pluginName: string, context: AgentContext) => boolean;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import type { Hono } from "hono";
|
|
10
10
|
import { PLUGINS } from "@/plugin/core/Plugins.js";
|
|
11
|
-
import type { AgentContext } from "@/
|
|
11
|
+
import type { AgentContext } from "@/core/AgentContextTypes.js";
|
|
12
12
|
import type { AuthRoutePolicy } from "@/types/auth/AuthRoute.js";
|
|
13
13
|
|
|
14
14
|
function dedupeAuthPolicies(policies: AuthRoutePolicy[]): AuthRoutePolicy[] {
|
|
@@ -16,8 +16,8 @@ import {
|
|
|
16
16
|
createAgentPathRuntime,
|
|
17
17
|
createAgentPluginConfigRuntime,
|
|
18
18
|
} from "@/host/runtime/AgentHostRuntime.js";
|
|
19
|
-
import { getAgentRuntimeBase } from "@/runtime/AgentRuntimeState.js";
|
|
20
19
|
import type { JsonValue } from "@/types/common/Json.js";
|
|
20
|
+
import type { AgentPlatformRuntime } from "@/types/host/AgentHost.js";
|
|
21
21
|
import type {
|
|
22
22
|
PluginActionResult,
|
|
23
23
|
PluginAvailability,
|
|
@@ -25,6 +25,22 @@ import type {
|
|
|
25
25
|
PluginView,
|
|
26
26
|
} from "@/plugin/types/Plugin.js";
|
|
27
27
|
|
|
28
|
+
function createLocalFallbackPlatformRuntime(): AgentPlatformRuntime {
|
|
29
|
+
return {
|
|
30
|
+
getGlobalEnv: () => ({}),
|
|
31
|
+
getAgentEnv: () => ({}),
|
|
32
|
+
listModels: () => [],
|
|
33
|
+
listProviders: async () => [],
|
|
34
|
+
getModel: () => null,
|
|
35
|
+
getChannelAccount: () => null,
|
|
36
|
+
readChatAuthorizationConfig: () => ({ roles: {}, channels: {} }),
|
|
37
|
+
writeChatAuthorizationConfig: async (_projectRoot: string, nextConfig: unknown) =>
|
|
38
|
+
nextConfig as never,
|
|
39
|
+
setChatAuthorizationUserRole: async () => ({ roles: {}, channels: {} }),
|
|
40
|
+
isPluginEnabled: (pluginName: string) => pluginName === "auth",
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
28
44
|
/**
|
|
29
45
|
* 创建本地 plugin 命令上下文。
|
|
30
46
|
*/
|
|
@@ -39,25 +55,10 @@ export function createLocalPluginCommandContext(projectRoot: string): PluginComm
|
|
|
39
55
|
|
|
40
56
|
defaultLogger.bindProjectRoot(rootPath);
|
|
41
57
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return {
|
|
47
|
-
getGlobalEnv: () => ({}),
|
|
48
|
-
getAgentEnv: () => ({}),
|
|
49
|
-
listModels: () => [],
|
|
50
|
-
listProviders: async () => [],
|
|
51
|
-
getModel: () => null,
|
|
52
|
-
getChannelAccount: () => null,
|
|
53
|
-
readChatAuthorizationConfig: () => ({ roles: {}, channels: {} }),
|
|
54
|
-
writeChatAuthorizationConfig: async (_projectRoot: string, nextConfig: unknown) =>
|
|
55
|
-
nextConfig as never,
|
|
56
|
-
setChatAuthorizationUserRole: async () => ({ roles: {}, channels: {} }),
|
|
57
|
-
isPluginEnabled: (pluginName: string) => pluginName === "auth",
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
})();
|
|
58
|
+
// 关键点(中文)
|
|
59
|
+
// - 本地 plugin CLI 入口不应隐式依赖 agent 进程级 runtime。
|
|
60
|
+
// - 这里只提供最小宿主能力,保证离线/未启动 agent 的场景也能稳定执行。
|
|
61
|
+
const platform = createLocalFallbackPlatformRuntime();
|
|
61
62
|
|
|
62
63
|
return {
|
|
63
64
|
cwd: rootPath,
|
|
@@ -14,7 +14,7 @@ import type {
|
|
|
14
14
|
PluginAvailability,
|
|
15
15
|
PluginView,
|
|
16
16
|
} from "@/plugin/types/Plugin.js";
|
|
17
|
-
import type { AgentContext } from "@/
|
|
17
|
+
import type { AgentContext } from "@/core/AgentContextTypes.js";
|
|
18
18
|
import type { JsonValue } from "@/types/common/Json.js";
|
|
19
19
|
|
|
20
20
|
type ContextResolver = () => AgentContext;
|
|
@@ -17,7 +17,7 @@ import type {
|
|
|
17
17
|
import type {
|
|
18
18
|
AgentContext,
|
|
19
19
|
StructuredConfig,
|
|
20
|
-
} from "@/
|
|
20
|
+
} from "@/core/AgentContextTypes.js";
|
|
21
21
|
import type { Logger } from "@/utils/logger/Logger.js";
|
|
22
22
|
import type { DowncityConfig } from "@/types/config/DowncityConfig.js";
|
|
23
23
|
import type { JsonObject, JsonValue } from "@/types/common/Json.js";
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import path from "node:path";
|
|
11
|
-
import type { AgentContext } from "@/
|
|
11
|
+
import type { AgentContext } from "@/core/AgentContextTypes.js";
|
|
12
12
|
import type { ResolvedSandboxConfig } from "@/sandbox/types/SandboxRuntime.js";
|
|
13
13
|
|
|
14
14
|
const DEFAULT_ENV_ALLOWLIST = [
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* - shell 命令不再允许回退到宿主机普通子进程执行。
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type { AgentContext } from "@/
|
|
10
|
+
import type { AgentContext } from "@/core/AgentContextTypes.js";
|
|
11
11
|
import type { SandboxSpawnResult } from "@/sandbox/types/SandboxRuntime.js";
|
|
12
12
|
import { resolveSandboxConfig, resolveSandboxCwd } from "@/sandbox/SandboxConfigResolver.js";
|
|
13
13
|
import { spawnMacOsSeatbeltSandbox } from "@/sandbox/MacOsSeatbeltSandbox.js";
|