@downcity/agent 1.1.32 → 1.1.35
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 +26 -84
- package/bin/config/Defaults.js +1 -1
- package/bin/config/Defaults.js.map +1 -1
- package/bin/config/DowncitySchema.d.ts.map +1 -1
- package/bin/config/DowncitySchema.js +2 -8
- package/bin/config/DowncitySchema.js.map +1 -1
- package/bin/config/Paths.d.ts +2 -2
- package/bin/config/Paths.js +2 -2
- package/bin/config/project/AgentInitializer.d.ts.map +1 -1
- package/bin/config/project/AgentInitializer.js +2 -2
- package/bin/config/project/AgentInitializer.js.map +1 -1
- package/bin/core/AgentContextTypes.d.ts +10 -10
- package/bin/core/AgentContextTypes.d.ts.map +1 -1
- package/bin/core/AgentContextTypes.js +1 -1
- package/bin/core/AgentCore.d.ts +14 -13
- package/bin/core/AgentCore.d.ts.map +1 -1
- package/bin/core/AgentCore.js +63 -90
- package/bin/core/AgentCore.js.map +1 -1
- package/bin/core/AgentCoreTypes.d.ts +4 -4
- package/bin/core/AgentCoreTypes.d.ts.map +1 -1
- package/bin/core/AgentCoreTypes.js +1 -1
- package/bin/{session → executor}/Executor.d.ts +4 -4
- package/bin/executor/Executor.d.ts.map +1 -0
- package/bin/executor/Executor.js.map +1 -0
- package/bin/{session → executor}/SessionRunScope.d.ts +5 -5
- package/bin/executor/SessionRunScope.d.ts.map +1 -0
- package/bin/{session → executor}/SessionRunScope.js +1 -1
- package/bin/executor/SessionRunScope.js.map +1 -0
- package/bin/{session → executor}/composer/compaction/SessionCompactionComposer.d.ts +1 -1
- package/bin/executor/composer/compaction/SessionCompactionComposer.d.ts.map +1 -0
- package/bin/executor/composer/compaction/SessionCompactionComposer.js.map +1 -0
- package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionComposer.d.ts.map +1 -0
- package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionComposer.js.map +1 -0
- package/bin/{session → executor}/composer/compaction/jsonl/JsonlSessionCompactionExecutor.d.ts +2 -2
- package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.d.ts.map +1 -0
- package/bin/executor/composer/compaction/jsonl/JsonlSessionCompactionExecutor.js.map +1 -0
- package/bin/{session → executor}/composer/context/LocalSessionContextComposer.d.ts +2 -2
- package/bin/executor/composer/context/LocalSessionContextComposer.d.ts.map +1 -0
- package/bin/executor/composer/context/LocalSessionContextComposer.js.map +1 -0
- package/bin/{session → executor}/composer/context/SessionContextComposer.d.ts +2 -2
- package/bin/executor/composer/context/SessionContextComposer.d.ts.map +1 -0
- package/bin/executor/composer/context/SessionContextComposer.js.map +1 -0
- package/bin/{session → executor}/composer/history/SessionHistoryComposer.d.ts +2 -2
- package/bin/executor/composer/history/SessionHistoryComposer.d.ts.map +1 -0
- package/bin/executor/composer/history/SessionHistoryComposer.js.map +1 -0
- package/bin/{session → executor}/composer/history/SessionHistoryWriter.d.ts +2 -2
- package/bin/executor/composer/history/SessionHistoryWriter.d.ts.map +1 -0
- package/bin/executor/composer/history/SessionHistoryWriter.js.map +1 -0
- package/bin/{session → executor}/composer/history/jsonl/JsonlSessionHistoryComposer.d.ts +2 -2
- package/bin/executor/composer/history/jsonl/JsonlSessionHistoryComposer.d.ts.map +1 -0
- package/bin/executor/composer/history/jsonl/JsonlSessionHistoryComposer.js.map +1 -0
- package/bin/executor/composer/system/SessionSystemComposer.d.ts.map +1 -0
- package/bin/executor/composer/system/SessionSystemComposer.js.map +1 -0
- package/bin/{session → executor}/composer/system/default/DefaultSessionSystemComposer.d.ts +1 -1
- package/bin/executor/composer/system/default/DefaultSessionSystemComposer.d.ts.map +1 -0
- package/bin/executor/composer/system/default/DefaultSessionSystemComposer.js.map +1 -0
- package/bin/executor/composer/system/default/InitPromptAssets.d.ts.map +1 -0
- package/bin/executor/composer/system/default/InitPromptAssets.js.map +1 -0
- package/bin/executor/composer/system/default/InitPrompts.d.ts.map +1 -0
- package/bin/executor/composer/system/default/InitPrompts.js.map +1 -0
- package/bin/executor/composer/system/default/PromptRenderer.d.ts.map +1 -0
- package/bin/executor/composer/system/default/PromptRenderer.js.map +1 -0
- package/bin/executor/composer/system/default/StaticPromptCatalog.d.ts.map +1 -0
- package/bin/executor/composer/system/default/StaticPromptCatalog.js.map +1 -0
- package/bin/{session → executor}/composer/system/default/SystemDomain.d.ts +9 -9
- package/bin/executor/composer/system/default/SystemDomain.d.ts.map +1 -0
- package/bin/{session → executor}/composer/system/default/SystemDomain.js +17 -17
- package/bin/executor/composer/system/default/SystemDomain.js.map +1 -0
- package/bin/executor/composer/system/default/SystemPromptAssets.d.ts.map +1 -0
- package/bin/executor/composer/system/default/SystemPromptAssets.js.map +1 -0
- package/bin/executor/composer/system/default/assets/core.prompt.d.ts.map +1 -0
- package/bin/{session → executor}/composer/system/default/assets/core.prompt.js +1 -1
- package/bin/executor/composer/system/default/assets/core.prompt.js.map +1 -0
- package/bin/executor/composer/system/default/assets/init/PROFILE.md.d.ts.map +1 -0
- package/bin/{session → executor}/composer/system/default/assets/init/PROFILE.md.js +1 -1
- package/bin/executor/composer/system/default/assets/init/PROFILE.md.js.map +1 -0
- package/bin/executor/composer/system/default/assets/init/SOUL.md.d.ts.map +1 -0
- package/bin/{session → executor}/composer/system/default/assets/init/SOUL.md.js +1 -1
- package/bin/executor/composer/system/default/assets/init/SOUL.md.js.map +1 -0
- package/bin/{session → executor}/composer/system/default/assets/plugin.prompt.d.ts +1 -1
- package/bin/executor/composer/system/default/assets/plugin.prompt.d.ts.map +1 -0
- package/bin/executor/composer/system/default/assets/plugin.prompt.js +8 -0
- package/bin/executor/composer/system/default/assets/plugin.prompt.js.map +1 -0
- package/bin/executor/composer/system/default/assets/task.prompt.d.ts.map +1 -0
- package/bin/{session → executor}/composer/system/default/assets/task.prompt.js +1 -1
- package/bin/executor/composer/system/default/assets/task.prompt.js.map +1 -0
- package/bin/executor/composer/system/default/variables/GeoContext.d.ts.map +1 -0
- package/bin/executor/composer/system/default/variables/GeoContext.js.map +1 -0
- package/bin/executor/composer/system/default/variables/PromptTypes.d.ts.map +1 -0
- package/bin/executor/composer/system/default/variables/PromptTypes.js.map +1 -0
- package/bin/executor/composer/system/default/variables/VariableReplacer.d.ts.map +1 -0
- package/bin/executor/composer/system/default/variables/VariableReplacer.js.map +1 -0
- package/bin/executor/core-engine/CoreEngineError.d.ts.map +1 -0
- package/bin/executor/core-engine/CoreEngineError.js.map +1 -0
- package/bin/{session → executor}/core-engine/CoreEngineLoopDecision.d.ts +1 -1
- package/bin/executor/core-engine/CoreEngineLoopDecision.d.ts.map +1 -0
- package/bin/executor/core-engine/CoreEngineLoopDecision.js.map +1 -0
- package/bin/{session → executor}/core-engine/CoreEngineMessageState.d.ts +1 -1
- package/bin/executor/core-engine/CoreEngineMessageState.d.ts.map +1 -0
- package/bin/executor/core-engine/CoreEngineMessageState.js.map +1 -0
- package/bin/{session → executor}/core-engine/CoreEngineSignals.d.ts +1 -1
- package/bin/executor/core-engine/CoreEngineSignals.d.ts.map +1 -0
- package/bin/executor/core-engine/CoreEngineSignals.js.map +1 -0
- package/bin/{session → executor}/core-engine/CoreEngineUiStreamCollector.d.ts +1 -1
- package/bin/executor/core-engine/CoreEngineUiStreamCollector.d.ts.map +1 -0
- package/bin/executor/core-engine/CoreEngineUiStreamCollector.js.map +1 -0
- package/bin/executor/ids/resolveSessionId.d.ts.map +1 -0
- package/bin/executor/ids/resolveSessionId.js.map +1 -0
- package/bin/{session → executor}/messages/AssistantResultPersistence.d.ts +1 -1
- package/bin/executor/messages/AssistantResultPersistence.d.ts.map +1 -0
- package/bin/executor/messages/AssistantResultPersistence.js.map +1 -0
- package/bin/{session → executor}/messages/SessionAttachmentMapper.d.ts +1 -1
- package/bin/executor/messages/SessionAttachmentMapper.d.ts.map +1 -0
- package/bin/executor/messages/SessionAttachmentMapper.js.map +1 -0
- package/bin/{session → executor}/messages/SessionMessageCodec.d.ts +1 -1
- package/bin/executor/messages/SessionMessageCodec.d.ts.map +1 -0
- package/bin/executor/messages/SessionMessageCodec.js.map +1 -0
- package/bin/{session → executor}/messages/SessionMessageLog.d.ts +1 -1
- package/bin/executor/messages/SessionMessageLog.d.ts.map +1 -0
- package/bin/executor/messages/SessionMessageLog.js.map +1 -0
- package/bin/{session → executor}/messages/SessionStepEventMapper.d.ts +1 -1
- package/bin/executor/messages/SessionStepEventMapper.d.ts.map +1 -0
- package/bin/executor/messages/SessionStepEventMapper.js.map +1 -0
- package/bin/{session → executor}/store/history/SessionHistoryStore.d.ts +2 -2
- package/bin/executor/store/history/SessionHistoryStore.d.ts.map +1 -0
- package/bin/executor/store/history/SessionHistoryStore.js.map +1 -0
- package/bin/{session → executor}/store/history/jsonl/JsonlSessionHistoryStore.d.ts +3 -3
- package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.d.ts.map +1 -0
- package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.js.map +1 -0
- package/bin/{session → executor}/tools/shell/ShellToolBridge.d.ts +5 -5
- package/bin/executor/tools/shell/ShellToolBridge.d.ts.map +1 -0
- package/bin/{session → executor}/tools/shell/ShellToolBridge.js +3 -3
- package/bin/executor/tools/shell/ShellToolBridge.js.map +1 -0
- package/bin/{session → executor}/tools/shell/ShellToolDefinition.d.ts +2 -2
- package/bin/executor/tools/shell/ShellToolDefinition.d.ts.map +1 -0
- package/bin/{session → executor}/tools/shell/ShellToolDefinition.js +2 -2
- package/bin/executor/tools/shell/ShellToolDefinition.js.map +1 -0
- package/bin/{session → executor}/tools/shell/ShellToolFormatting.d.ts +2 -2
- package/bin/executor/tools/shell/ShellToolFormatting.d.ts.map +1 -0
- package/bin/{session → executor}/tools/shell/ShellToolFormatting.js +2 -2
- package/bin/executor/tools/shell/ShellToolFormatting.js.map +1 -0
- package/bin/executor/tools/shell/ShellToolSchemas.d.ts.map +1 -0
- package/bin/{session → executor}/tools/shell/ShellToolSchemas.js +1 -1
- package/bin/executor/tools/shell/ShellToolSchemas.js.map +1 -0
- package/bin/{session → executor}/types/SessionExecutor.d.ts +1 -1
- package/bin/executor/types/SessionExecutor.d.ts.map +1 -0
- package/bin/executor/types/SessionExecutor.js.map +1 -0
- package/bin/executor/types/SessionHistoryMeta.d.ts.map +1 -0
- package/bin/executor/types/SessionHistoryMeta.js.map +1 -0
- package/bin/executor/types/SessionHistoryPaths.d.ts.map +1 -0
- package/bin/executor/types/SessionHistoryPaths.js.map +1 -0
- package/bin/executor/types/SessionLoop.d.ts.map +1 -0
- package/bin/executor/types/SessionLoop.js.map +1 -0
- package/bin/executor/types/SessionMessages.d.ts.map +1 -0
- package/bin/executor/types/SessionMessages.js.map +1 -0
- package/bin/executor/types/SessionPrompts.d.ts.map +1 -0
- package/bin/executor/types/SessionPrompts.js.map +1 -0
- package/bin/{session → executor}/types/SessionRun.d.ts +2 -2
- package/bin/executor/types/SessionRun.d.ts.map +1 -0
- package/bin/executor/types/SessionRun.js.map +1 -0
- package/bin/index.d.ts +26 -26
- package/bin/index.d.ts.map +1 -1
- package/bin/index.js +19 -19
- package/bin/index.js.map +1 -1
- package/bin/plugin/builtins/asr/Plugin.d.ts +7 -3
- package/bin/plugin/builtins/asr/Plugin.d.ts.map +1 -1
- package/bin/plugin/builtins/asr/Plugin.js +404 -394
- package/bin/plugin/builtins/asr/Plugin.js.map +1 -1
- package/bin/plugin/builtins/auth/Plugin.d.ts +7 -3
- package/bin/plugin/builtins/auth/Plugin.d.ts.map +1 -1
- package/bin/plugin/builtins/auth/Plugin.js +133 -123
- package/bin/plugin/builtins/auth/Plugin.js.map +1 -1
- package/bin/plugin/builtins/chat/Action.d.ts +4 -4
- package/bin/plugin/builtins/chat/Action.js +5 -5
- package/bin/plugin/builtins/chat/Action.js.map +1 -1
- package/bin/plugin/builtins/chat/ChatPlugin.js +3 -3
- package/bin/plugin/builtins/chat/ChatPlugin.js.map +1 -1
- package/bin/plugin/builtins/chat/ChatPluginTypes.d.ts +1 -1
- package/bin/plugin/builtins/chat/PROMPT.direct.d.ts +1 -1
- package/bin/plugin/builtins/chat/PROMPT.direct.d.ts.map +1 -1
- package/bin/plugin/builtins/chat/PROMPT.direct.js +1 -1
- package/bin/plugin/builtins/chat/PROMPT.direct.js.map +1 -1
- package/bin/plugin/builtins/chat/accounts/{ChannelAccountService.d.ts → ChannelAccountManager.d.ts} +4 -4
- package/bin/plugin/builtins/chat/accounts/{ChannelAccountService.d.ts.map → ChannelAccountManager.d.ts.map} +1 -1
- package/bin/plugin/builtins/chat/accounts/{ChannelAccountService.js → ChannelAccountManager.js} +4 -4
- package/bin/plugin/builtins/chat/accounts/{ChannelAccountService.js.map → ChannelAccountManager.js.map} +1 -1
- package/bin/plugin/builtins/chat/channels/feishu/types/FeishuChannel.d.ts +1 -1
- package/bin/plugin/builtins/chat/channels/feishu/types/FeishuChannel.js +1 -1
- package/bin/plugin/builtins/chat/channels/qq/PROMPT.direct.d.ts +1 -1
- package/bin/plugin/builtins/chat/channels/qq/PROMPT.direct.d.ts.map +1 -1
- package/bin/plugin/builtins/chat/channels/qq/PROMPT.direct.js +1 -1
- package/bin/plugin/builtins/chat/channels/qq/PROMPT.direct.js.map +1 -1
- package/bin/plugin/builtins/chat/channels/qq/types/QqChannel.d.ts +1 -1
- package/bin/plugin/builtins/chat/channels/qq/types/QqChannel.js +1 -1
- package/bin/plugin/builtins/chat/runtime/ChatActionExecution.d.ts +1 -1
- package/bin/plugin/builtins/chat/runtime/ChatActionExecution.js +2 -2
- package/bin/plugin/builtins/chat/runtime/ChatActionExecution.js.map +1 -1
- package/bin/plugin/builtins/chat/runtime/ChatActionInput.d.ts +1 -1
- package/bin/plugin/builtins/chat/runtime/ChatActionInput.js +1 -1
- package/bin/plugin/builtins/chat/runtime/ChatChannelConfig.js +8 -8
- package/bin/plugin/builtins/chat/runtime/ChatChannelConfig.js.map +1 -1
- package/bin/plugin/builtins/chat/runtime/ChatChannelCore.js +11 -11
- package/bin/plugin/builtins/chat/runtime/ChatChannelCore.js.map +1 -1
- package/bin/plugin/builtins/chat/runtime/ChatChannelFacade.d.ts +1 -1
- package/bin/plugin/builtins/chat/runtime/ChatChannelFacade.js +1 -1
- package/bin/plugin/builtins/chat/runtime/ChatChannelLifecycle.d.ts +1 -1
- package/bin/plugin/builtins/chat/runtime/ChatChannelLifecycle.js +1 -1
- package/bin/plugin/builtins/chat/runtime/ChatMetaStore.d.ts +2 -2
- package/bin/plugin/builtins/chat/runtime/ChatMetaStore.js +2 -2
- package/bin/plugin/builtins/chat/runtime/ChatPluginActionRegistry.d.ts +3 -3
- package/bin/plugin/builtins/chat/runtime/ChatPluginActionRegistry.js +3 -3
- package/bin/plugin/builtins/chat/runtime/ChatPluginSystem.js +2 -2
- package/bin/plugin/builtins/chat/runtime/ChatPluginSystem.js.map +1 -1
- package/bin/plugin/builtins/chat/runtime/ChatPromptAssets.d.ts +3 -3
- package/bin/plugin/builtins/chat/runtime/ChatPromptAssets.d.ts.map +1 -1
- package/bin/plugin/builtins/chat/runtime/ChatPromptAssets.js +4 -4
- package/bin/plugin/builtins/chat/runtime/ChatPromptAssets.js.map +1 -1
- package/bin/plugin/builtins/chat/runtime/ChatQueueStore.d.ts +4 -4
- package/bin/plugin/builtins/chat/runtime/ChatQueueStore.js +4 -4
- package/bin/plugin/builtins/chat/runtime/ChatQueueStore.js.map +1 -1
- package/bin/plugin/builtins/chat/runtime/ChatQueueWorker.d.ts +3 -3
- package/bin/plugin/builtins/chat/runtime/ChatQueueWorker.js +3 -3
- package/bin/plugin/builtins/chat/runtime/ChatSession.d.ts +6 -6
- package/bin/plugin/builtins/chat/runtime/ChatSession.d.ts.map +1 -1
- package/bin/plugin/builtins/chat/runtime/ChatSession.js +1 -1
- package/bin/plugin/builtins/chat/runtime/ChatSession.js.map +1 -1
- package/bin/plugin/builtins/chat/runtime/ChatSessionContextComposer.d.ts +3 -3
- package/bin/plugin/builtins/chat/runtime/ChatSessionContextComposer.d.ts.map +1 -1
- package/bin/plugin/builtins/chat/runtime/ChatSessionContextComposer.js +2 -2
- package/bin/plugin/builtins/chat/runtime/ChatSessionContextComposer.js.map +1 -1
- package/bin/plugin/builtins/chat/runtime/ChatSessionTypes.d.ts +2 -2
- package/bin/plugin/builtins/chat/runtime/ChatSessionTypes.d.ts.map +1 -1
- package/bin/plugin/builtins/chat/runtime/ChatkeySend.d.ts +1 -1
- package/bin/plugin/builtins/chat/runtime/ChatkeySend.js +1 -1
- package/bin/plugin/builtins/chat/runtime/InboundAugment.d.ts +1 -1
- package/bin/plugin/builtins/chat/runtime/InboundAugment.js +1 -1
- package/bin/plugin/builtins/chat/runtime/PluginDispatch.d.ts +2 -2
- package/bin/plugin/builtins/chat/runtime/PluginDispatch.js +2 -2
- package/bin/plugin/builtins/chat/runtime/PluginPoints.d.ts +10 -10
- package/bin/plugin/builtins/chat/runtime/PluginPoints.js +10 -10
- package/bin/plugin/builtins/chat/runtime/SystemPrompt.js +1 -1
- package/bin/plugin/builtins/chat/runtime/SystemPrompt.js.map +1 -1
- package/bin/plugin/builtins/chat/runtime/UIMessageTransformer.d.ts +1 -1
- package/bin/plugin/builtins/chat/runtime/UIMessageTransformer.d.ts.map +1 -1
- package/bin/plugin/builtins/chat/runtime/UserVisibleText.d.ts +1 -1
- package/bin/plugin/builtins/chat/runtime/UserVisibleText.d.ts.map +1 -1
- package/bin/plugin/builtins/chat/types/ChannelContext.d.ts +1 -1
- package/bin/plugin/builtins/chat/types/ChannelContext.js +1 -1
- package/bin/plugin/builtins/chat/types/ChannelStatus.d.ts +1 -1
- package/bin/plugin/builtins/chat/types/ChatMessageMarkup.d.ts +1 -1
- package/bin/plugin/builtins/chat/types/ChatMessageMarkup.js +1 -1
- package/bin/plugin/builtins/chat/types/ChatMeta.d.ts +2 -2
- package/bin/plugin/builtins/chat/types/ChatMeta.js +2 -2
- package/bin/plugin/builtins/chat/types/ChatPlugin.d.ts +6 -6
- package/bin/plugin/builtins/chat/types/ChatPlugin.js +3 -3
- package/bin/plugin/builtins/chat/types/ChatPluginActionPayload.d.ts +2 -2
- package/bin/plugin/builtins/chat/types/ChatPluginActionPayload.js +2 -2
- package/bin/plugin/builtins/chat/types/ChatPromptContext.d.ts +2 -2
- package/bin/plugin/builtins/chat/types/ChatRuntime.d.ts +3 -3
- package/bin/plugin/builtins/chat/types/ChatRuntime.js +2 -2
- package/bin/plugin/builtins/contact/Action.d.ts +3 -3
- package/bin/plugin/builtins/contact/Action.js +2 -2
- package/bin/plugin/builtins/contact/ContactPlugin.js +2 -2
- package/bin/plugin/builtins/contact/ContactPlugin.js.map +1 -1
- package/bin/plugin/builtins/contact/runtime/ContactPromptAssets.d.ts +2 -2
- package/bin/plugin/builtins/contact/runtime/ContactPromptAssets.js +2 -2
- package/bin/plugin/builtins/contact/runtime/Paths.d.ts +1 -1
- package/bin/plugin/builtins/contact/runtime/Paths.js +1 -1
- package/bin/plugin/builtins/contact/runtime/RemoteClient.d.ts +1 -1
- package/bin/plugin/builtins/contact/runtime/RemoteClient.js +2 -2
- package/bin/plugin/builtins/contact/runtime/RemoteClient.js.map +1 -1
- package/bin/plugin/builtins/contact/types/ContactCheck.d.ts +2 -2
- package/bin/plugin/builtins/contact/types/ContactCheck.d.ts.map +1 -1
- package/bin/plugin/builtins/contact/types/ContactCommand.d.ts +1 -1
- package/bin/plugin/builtins/contact/types/ContactCommand.js +1 -1
- package/bin/plugin/builtins/memory/MemoryPlugin.d.ts +1 -1
- package/bin/plugin/builtins/memory/MemoryPlugin.js +1 -1
- package/bin/plugin/builtins/memory/runtime/Search.js +1 -1
- package/bin/plugin/builtins/memory/runtime/Search.js.map +1 -1
- package/bin/plugin/builtins/memory/runtime/Store.d.ts +3 -3
- package/bin/plugin/builtins/memory/runtime/Store.js +3 -3
- package/bin/plugin/builtins/shell/ShellRuntimeTypes.d.ts +4 -4
- package/bin/plugin/builtins/shell/ShellRuntimeTypes.js +3 -3
- package/bin/plugin/builtins/shell/runtime/ShellActionRuntime.d.ts +2 -2
- package/bin/plugin/builtins/shell/runtime/ShellActionRuntime.js +2 -2
- package/bin/plugin/builtins/shell/runtime/ShellActionRuntimeSupport.d.ts +2 -2
- package/bin/plugin/builtins/shell/runtime/ShellActionRuntimeSupport.js +2 -2
- package/bin/plugin/builtins/shell/runtime/ShellProcessEvents.d.ts +1 -1
- package/bin/plugin/builtins/shell/runtime/ShellRuntimeEnvironment.js +1 -1
- package/bin/plugin/builtins/shell/runtime/ShellRuntimeEnvironment.js.map +1 -1
- package/bin/plugin/builtins/shell/types/ShellPlugin.d.ts +4 -4
- package/bin/plugin/builtins/shell/types/ShellPlugin.js +2 -2
- package/bin/plugin/builtins/skill/Plugin.d.ts +8 -4
- package/bin/plugin/builtins/skill/Plugin.d.ts.map +1 -1
- package/bin/plugin/builtins/skill/Plugin.js +215 -205
- package/bin/plugin/builtins/skill/Plugin.js.map +1 -1
- package/bin/plugin/builtins/skill/runtime/SystemProvider.js +1 -1
- package/bin/plugin/builtins/skill/runtime/SystemProvider.js.map +1 -1
- package/bin/plugin/builtins/task/PROMPT.d.ts +1 -1
- package/bin/plugin/builtins/task/PROMPT.d.ts.map +1 -1
- package/bin/plugin/builtins/task/PROMPT.js +1 -1
- package/bin/plugin/builtins/task/PROMPT.js.map +1 -1
- package/bin/plugin/builtins/task/Scheduler.d.ts +4 -4
- package/bin/plugin/builtins/task/Scheduler.d.ts.map +1 -1
- package/bin/plugin/builtins/task/Scheduler.js +2 -2
- package/bin/plugin/builtins/task/runtime/CronTrigger.d.ts +4 -4
- package/bin/plugin/builtins/task/runtime/CronTrigger.d.ts.map +1 -1
- package/bin/plugin/builtins/task/runtime/CronTrigger.js +2 -2
- package/bin/plugin/builtins/task/runtime/CronTrigger.js.map +1 -1
- package/bin/plugin/builtins/task/runtime/TaskActionExecution.d.ts +1 -1
- package/bin/plugin/builtins/task/runtime/TaskActionExecution.js +1 -1
- package/bin/plugin/builtins/task/runtime/TaskActionInput.d.ts +1 -1
- package/bin/plugin/builtins/task/runtime/TaskActionInput.js +2 -2
- package/bin/plugin/builtins/task/runtime/TaskActionInput.js.map +1 -1
- package/bin/plugin/builtins/task/runtime/TaskPluginActionRegistry.d.ts +3 -3
- package/bin/plugin/builtins/task/runtime/TaskPluginActionRegistry.js +3 -3
- package/bin/plugin/builtins/task/runtime/TaskPromptAssets.d.ts.map +1 -1
- package/bin/plugin/builtins/task/runtime/TaskPromptAssets.js +2 -2
- package/bin/plugin/builtins/task/runtime/TaskPromptAssets.js.map +1 -1
- package/bin/plugin/builtins/task/runtime/TaskRunChatDispatch.d.ts +2 -2
- package/bin/plugin/builtins/task/runtime/TaskRunChatDispatch.js +2 -2
- package/bin/plugin/builtins/task/runtime/TaskRunnerRound.d.ts +1 -1
- package/bin/plugin/builtins/task/runtime/TaskRunnerRound.d.ts.map +1 -1
- package/bin/plugin/builtins/task/runtime/TaskRunnerRound.js +1 -1
- package/bin/plugin/builtins/task/runtime/TaskRunnerRound.js.map +1 -1
- package/bin/plugin/builtins/task/runtime/TaskRunnerSession.d.ts +1 -1
- package/bin/plugin/builtins/task/runtime/TaskRunnerSession.d.ts.map +1 -1
- package/bin/plugin/builtins/task/runtime/TaskRunnerSession.js +8 -8
- package/bin/plugin/builtins/task/runtime/TaskRunnerSession.js.map +1 -1
- package/bin/plugin/builtins/task/runtime/TaskRunnerTypes.d.ts +2 -2
- package/bin/plugin/builtins/task/runtime/TaskRunnerTypes.d.ts.map +1 -1
- package/bin/plugin/builtins/task/types/Cron.d.ts +3 -3
- package/bin/plugin/builtins/task/types/Cron.d.ts.map +1 -1
- package/bin/plugin/builtins/task/types/TaskPluginTypes.d.ts +3 -3
- package/bin/plugin/builtins/task/types/TaskPluginTypes.js +3 -3
- package/bin/plugin/builtins/tts/Plugin.d.ts +7 -3
- package/bin/plugin/builtins/tts/Plugin.d.ts.map +1 -1
- package/bin/plugin/builtins/tts/Plugin.js +419 -409
- package/bin/plugin/builtins/tts/Plugin.js.map +1 -1
- package/bin/plugin/builtins/web/Plugin.d.ts +7 -3
- package/bin/plugin/builtins/web/Plugin.d.ts.map +1 -1
- package/bin/plugin/builtins/web/Plugin.js +380 -370
- package/bin/plugin/builtins/web/Plugin.js.map +1 -1
- package/bin/plugin/builtins/workboard/Plugin.d.ts +7 -3
- package/bin/plugin/builtins/workboard/Plugin.d.ts.map +1 -1
- package/bin/plugin/builtins/workboard/Plugin.js +64 -54
- package/bin/plugin/builtins/workboard/Plugin.js.map +1 -1
- package/bin/plugin/builtins/workboard/runtime/Collector.d.ts +1 -1
- package/bin/plugin/builtins/workboard/runtime/Collector.js +2 -2
- 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/Normalizer.js +1 -1
- package/bin/plugin/builtins/workboard/runtime/Normalizer.js.map +1 -1
- package/bin/plugin/core/BasePlugin.d.ts +2 -2
- package/bin/plugin/core/BasePlugin.js +2 -2
- package/bin/plugin/core/BuiltinPluginClasses.d.ts +8 -3
- package/bin/plugin/core/BuiltinPluginClasses.d.ts.map +1 -1
- package/bin/plugin/core/BuiltinPluginClasses.js +19 -2
- package/bin/plugin/core/BuiltinPluginClasses.js.map +1 -1
- package/bin/plugin/core/Catalog.d.ts +4 -3
- package/bin/plugin/core/Catalog.d.ts.map +1 -1
- package/bin/plugin/core/Catalog.js +3 -3
- package/bin/plugin/core/Catalog.js.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/HttpRoutes.js +6 -6
- package/bin/plugin/core/HttpRoutes.js.map +1 -1
- package/bin/plugin/core/LocalExecution.d.ts.map +1 -1
- package/bin/plugin/core/LocalExecution.js +15 -0
- package/bin/plugin/core/LocalExecution.js.map +1 -1
- package/bin/plugin/core/PluginActionRunner.d.ts.map +1 -1
- package/bin/plugin/core/PluginActionRunner.js +0 -1
- package/bin/plugin/core/PluginActionRunner.js.map +1 -1
- package/bin/plugin/core/PluginClassRegistry.d.ts +24 -4
- package/bin/plugin/core/PluginClassRegistry.d.ts.map +1 -1
- package/bin/plugin/core/PluginClassRegistry.js +30 -4
- package/bin/plugin/core/PluginClassRegistry.js.map +1 -1
- package/bin/plugin/core/PluginCommand.d.ts +2 -2
- package/bin/plugin/core/PluginCommand.js +4 -4
- package/bin/plugin/core/PluginCommand.js.map +1 -1
- package/bin/plugin/core/PluginCommandRequest.d.ts +4 -4
- package/bin/plugin/core/PluginCommandRequest.js +3 -3
- package/bin/plugin/core/PluginStateController.js +2 -2
- package/bin/plugin/core/PluginStateController.js.map +1 -1
- package/bin/plugin/core/schedule/Store.d.ts +2 -2
- package/bin/plugin/core/schedule/Store.js +2 -2
- package/bin/plugin/core/schedule/Time.d.ts +1 -1
- package/bin/plugin/core/schedule/Time.js +1 -1
- package/bin/plugin/types/Plugin.d.ts +17 -21
- package/bin/plugin/types/Plugin.d.ts.map +1 -1
- package/bin/plugin/types/PluginApi.d.ts +3 -3
- package/bin/plugin/types/PluginApi.d.ts.map +1 -1
- package/bin/plugin/types/PluginApi.js +1 -1
- package/bin/plugin/types/PluginState.d.ts +1 -1
- package/bin/plugin/types/PluginState.d.ts.map +1 -1
- package/bin/plugin/types/Plugins.d.ts +2 -2
- package/bin/plugin/types/Plugins.d.ts.map +1 -1
- package/bin/runtime/host/AgentHostRuntime.js +1 -1
- package/bin/runtime/host/daemon/Api.d.ts +2 -2
- package/bin/runtime/host/daemon/Api.js +1 -1
- package/bin/runtime/sandbox/types/SandboxRuntime.d.ts +1 -1
- package/bin/runtime/sandbox/types/SandboxRuntime.js +1 -1
- package/bin/runtime/server/http/Server.d.ts +8 -8
- package/bin/runtime/server/http/Server.d.ts.map +1 -1
- package/bin/runtime/server/http/Server.js +8 -30
- package/bin/runtime/server/http/Server.js.map +1 -1
- package/bin/runtime/server/http/control/ExecuteBySession.d.ts +1 -1
- package/bin/runtime/server/http/control/MessageTimeline.d.ts +1 -1
- package/bin/runtime/server/http/control/MessageTimeline.d.ts.map +1 -1
- package/bin/runtime/server/http/control/OverviewRoutes.d.ts +1 -1
- package/bin/runtime/server/http/control/OverviewRoutes.d.ts.map +1 -1
- package/bin/runtime/server/http/control/OverviewRoutes.js +2 -6
- package/bin/runtime/server/http/control/OverviewRoutes.js.map +1 -1
- package/bin/runtime/server/http/control/SessionRoutes.js +1 -1
- package/bin/runtime/server/http/control/SessionRoutes.js.map +1 -1
- package/bin/runtime/server/http/control/TaskRoutes.d.ts +1 -1
- package/bin/runtime/server/http/control/TaskRoutes.js +1 -1
- package/bin/runtime/server/http/plugins/plugins.d.ts +3 -3
- package/bin/runtime/server/http/plugins/plugins.d.ts.map +1 -1
- package/bin/runtime/server/http/plugins/plugins.js +61 -4
- package/bin/runtime/server/http/plugins/plugins.js.map +1 -1
- package/bin/runtime/server/http/sdk/Router.d.ts +2 -2
- package/bin/runtime/server/http/sdk/Router.d.ts.map +1 -1
- package/bin/runtime/server/http/sdk/Router.js +2 -2
- package/bin/runtime/server/http/sdk/Router.js.map +1 -1
- package/bin/runtime/server/http/sdk/SessionRoutes.d.ts +2 -2
- package/bin/runtime/server/http/sdk/SessionRoutes.d.ts.map +1 -1
- package/bin/runtime/server/http/sdk/SessionRoutes.js +72 -13
- package/bin/runtime/server/http/sdk/SessionRoutes.js.map +1 -1
- package/bin/runtime/server/rpc/Server.d.ts +2 -4
- package/bin/runtime/server/rpc/Server.d.ts.map +1 -1
- package/bin/runtime/server/rpc/Server.js +7 -12
- package/bin/runtime/server/rpc/Server.js.map +1 -1
- package/bin/sdk/Agent.d.ts +21 -20
- package/bin/sdk/Agent.d.ts.map +1 -1
- package/bin/sdk/Agent.js +46 -33
- package/bin/sdk/Agent.js.map +1 -1
- package/bin/sdk/AgentSdkTypes.d.ts +310 -38
- package/bin/sdk/AgentSdkTypes.d.ts.map +1 -1
- package/bin/sdk/AgentSdkTypes.js +1 -1
- package/bin/sdk/RemoteAgent.d.ts +9 -57
- package/bin/sdk/RemoteAgent.d.ts.map +1 -1
- package/bin/sdk/RemoteAgent.js +62 -14
- package/bin/sdk/RemoteAgent.js.map +1 -1
- package/bin/sdk/Session.d.ts +15 -16
- package/bin/sdk/Session.d.ts.map +1 -1
- package/bin/sdk/Session.js +47 -35
- package/bin/sdk/Session.js.map +1 -1
- package/bin/sdk/SessionSystemBuilder.d.ts +8 -8
- package/bin/sdk/SessionSystemBuilder.d.ts.map +1 -1
- package/bin/sdk/SessionSystemBuilder.js +6 -6
- package/bin/sdk/SessionSystemBuilder.js.map +1 -1
- package/bin/sdk/session/Browse.d.ts +76 -0
- package/bin/sdk/session/Browse.d.ts.map +1 -0
- package/bin/sdk/session/Browse.js +418 -0
- package/bin/sdk/session/Browse.js.map +1 -0
- package/bin/sdk/session/Metadata.d.ts +1 -1
- package/bin/sdk/session/Metadata.d.ts.map +1 -1
- package/bin/sdk/session/Persistence.d.ts +1 -1
- package/bin/sdk/session/Persistence.d.ts.map +1 -1
- package/bin/sdk/session/Persistence.js +1 -1
- package/bin/sdk/session/Persistence.js.map +1 -1
- package/bin/sdk/session/RuntimeSessionPort.d.ts +4 -4
- package/bin/sdk/session/RuntimeSessionPort.d.ts.map +1 -1
- package/bin/sdk/session/RuntimeSessionPort.js +3 -3
- package/bin/sdk/session/index.d.ts +2 -1
- package/bin/sdk/session/index.d.ts.map +1 -1
- package/bin/sdk/session/index.js +2 -1
- package/bin/sdk/session/index.js.map +1 -1
- package/bin/sdk/session/runtime/SessionPromptRuntime.d.ts +2 -2
- package/bin/sdk/session/runtime/SessionPromptRuntime.d.ts.map +1 -1
- package/bin/types/config/DowncityConfig.d.ts +132 -96
- package/bin/types/config/DowncityConfig.d.ts.map +1 -1
- package/bin/types/runtime/host/AgentHost.d.ts +1 -1
- package/bin/types/runtime/host/AgentHost.js +1 -1
- package/bin/types/runtime/http/InlineInstant.d.ts +2 -2
- package/bin/types/runtime/http/InlineInstant.d.ts.map +1 -1
- package/bin/types/runtime/platform/PlatformGateway.d.ts +10 -10
- package/bin/types/runtime/platform/PlatformGateway.d.ts.map +1 -1
- package/bin/types/sdk/AgentSessionEvent.d.ts +1 -1
- package/bin/types/sdk/AgentSessionEvent.d.ts.map +1 -1
- package/bin/types/sdk/AgentSessionTurn.d.ts +1 -1
- package/bin/types/sdk/AgentSessionTurn.d.ts.map +1 -1
- package/package.json +2 -2
- package/scripts/session-prompt-runtime.test.mjs +30 -10
- package/src/config/Defaults.ts +1 -1
- package/src/config/DowncitySchema.ts +2 -8
- package/src/config/Paths.ts +2 -2
- package/src/config/project/AgentInitializer.ts +4 -5
- package/src/core/AgentContextTypes.ts +10 -10
- package/src/core/AgentCore.ts +86 -93
- package/src/core/AgentCoreTypes.ts +4 -4
- package/src/{session → executor}/Executor.ts +21 -21
- package/src/{session → executor}/README.md +5 -5
- package/src/{session → executor}/SessionRunScope.ts +5 -5
- package/src/{session → executor}/composer/compaction/SessionCompactionComposer.ts +1 -1
- package/src/{session → executor}/composer/compaction/jsonl/JsonlSessionCompactionComposer.ts +1 -1
- package/src/{session → executor}/composer/compaction/jsonl/JsonlSessionCompactionExecutor.ts +2 -2
- package/src/{session → executor}/composer/context/LocalSessionContextComposer.ts +4 -4
- package/src/{session → executor}/composer/context/SessionContextComposer.ts +2 -2
- package/src/{session → executor}/composer/history/SessionHistoryComposer.ts +2 -2
- package/src/{session → executor}/composer/history/SessionHistoryWriter.ts +2 -2
- package/src/{session → executor}/composer/history/jsonl/JsonlSessionHistoryComposer.ts +3 -3
- package/src/{session → executor}/composer/system/default/DefaultSessionSystemComposer.ts +4 -4
- package/src/{session → executor}/composer/system/default/InitPromptAssets.ts +2 -2
- package/src/{session → executor}/composer/system/default/InitPrompts.ts +1 -1
- package/src/{session → executor}/composer/system/default/PromptRenderer.ts +1 -1
- package/src/{session → executor}/composer/system/default/StaticPromptCatalog.ts +1 -1
- package/src/{session → executor}/composer/system/default/SystemDomain.ts +26 -26
- package/src/{session → executor}/composer/system/default/SystemPromptAssets.ts +3 -3
- package/src/{session → executor}/composer/system/default/assets/core.prompt.ts +1 -1
- package/src/{session → executor}/composer/system/default/assets/init/PROFILE.md.ts +1 -1
- package/src/{session → executor}/composer/system/default/assets/init/SOUL.md.ts +1 -1
- package/src/{session → executor}/composer/system/default/assets/plugin.prompt.ts +2 -2
- package/src/{session → executor}/composer/system/default/assets/plugin.prompt.ts.txt +2 -2
- package/src/{session → executor}/composer/system/default/assets/task.prompt.ts +1 -1
- package/src/{session → executor}/composer/system/default/variables/GeoContext.ts +1 -1
- package/src/{session → executor}/composer/system/default/variables/VariableReplacer.ts +2 -2
- package/src/{session → executor}/core-engine/CoreEngineLoopDecision.ts +1 -1
- package/src/{session → executor}/core-engine/CoreEngineMessageState.ts +2 -2
- package/src/{session → executor}/core-engine/CoreEngineSignals.ts +1 -1
- package/src/{session → executor}/core-engine/CoreEngineUiStreamCollector.ts +3 -3
- package/src/{session → executor}/messages/AssistantResultPersistence.ts +1 -1
- package/src/{session → executor}/messages/SessionAttachmentMapper.ts +1 -1
- package/src/{session → executor}/messages/SessionMessageCodec.ts +2 -2
- package/src/{session → executor}/messages/SessionMessageLog.ts +1 -1
- package/src/{session → executor}/messages/SessionStepEventMapper.ts +1 -1
- package/src/{session → executor}/store/history/SessionHistoryStore.ts +2 -2
- package/src/{session → executor}/store/history/jsonl/JsonlSessionHistoryStore.ts +6 -6
- package/src/{session → executor}/tools/shell/ShellToolBridge.ts +6 -6
- package/src/{session → executor}/tools/shell/ShellToolDefinition.ts +2 -2
- package/src/{session → executor}/tools/shell/ShellToolFormatting.ts +3 -3
- package/src/{session → executor}/tools/shell/ShellToolSchemas.ts +1 -1
- package/src/{session → executor}/types/SessionExecutor.ts +1 -1
- package/src/{session → executor}/types/SessionRun.ts +2 -2
- package/src/index.ts +43 -28
- package/src/plugin/builtins/asr/Plugin.ts +24 -11
- package/src/plugin/builtins/auth/Plugin.ts +19 -6
- package/src/plugin/builtins/chat/Action.ts +5 -5
- package/src/plugin/builtins/chat/ChatPlugin.ts +3 -3
- package/src/plugin/builtins/chat/ChatPluginTypes.ts +1 -1
- package/src/plugin/builtins/chat/PROMPT.direct.ts +1 -1
- package/src/plugin/builtins/chat/PROMPT.direct.ts.txt +1 -1
- package/src/plugin/builtins/chat/accounts/{ChannelAccountService.ts → ChannelAccountManager.ts} +3 -3
- package/src/plugin/builtins/chat/channels/feishu/types/FeishuChannel.ts +1 -1
- package/src/plugin/builtins/chat/channels/qq/PROMPT.direct.ts +1 -1
- package/src/plugin/builtins/chat/channels/qq/PROMPT.direct.ts.txt +1 -1
- package/src/plugin/builtins/chat/channels/qq/types/QqChannel.ts +1 -1
- package/src/plugin/builtins/chat/runtime/ChatActionExecution.ts +2 -2
- package/src/plugin/builtins/chat/runtime/ChatActionInput.ts +1 -1
- package/src/plugin/builtins/chat/runtime/ChatChannelConfig.ts +8 -8
- package/src/plugin/builtins/chat/runtime/ChatChannelCore.ts +14 -14
- package/src/plugin/builtins/chat/runtime/ChatChannelFacade.ts +1 -1
- package/src/plugin/builtins/chat/runtime/ChatChannelLifecycle.ts +1 -1
- package/src/plugin/builtins/chat/runtime/ChatMetaStore.ts +2 -2
- package/src/plugin/builtins/chat/runtime/ChatPluginActionRegistry.ts +3 -3
- package/src/plugin/builtins/chat/runtime/ChatPluginSystem.ts +2 -2
- package/src/plugin/builtins/chat/runtime/ChatPromptAssets.ts +4 -4
- package/src/plugin/builtins/chat/runtime/ChatQueueStore.ts +5 -5
- package/src/plugin/builtins/chat/runtime/ChatQueueWorker.ts +3 -3
- package/src/plugin/builtins/chat/runtime/ChatSession.ts +7 -7
- package/src/plugin/builtins/chat/runtime/ChatSessionContextComposer.ts +4 -4
- package/src/plugin/builtins/chat/runtime/ChatSessionTypes.ts +2 -2
- package/src/plugin/builtins/chat/runtime/ChatkeySend.ts +1 -1
- package/src/plugin/builtins/chat/runtime/InboundAugment.ts +1 -1
- package/src/plugin/builtins/chat/runtime/PluginDispatch.ts +2 -2
- package/src/plugin/builtins/chat/runtime/PluginPoints.ts +10 -10
- package/src/plugin/builtins/chat/runtime/SystemPrompt.ts +1 -1
- package/src/plugin/builtins/chat/runtime/UIMessageTransformer.ts +1 -1
- package/src/plugin/builtins/chat/runtime/UserVisibleText.ts +1 -1
- package/src/plugin/builtins/chat/types/ChannelContext.ts +1 -1
- package/src/plugin/builtins/chat/types/ChannelStatus.ts +1 -1
- package/src/plugin/builtins/chat/types/ChatMessageMarkup.ts +1 -1
- package/src/plugin/builtins/chat/types/ChatMeta.ts +2 -2
- package/src/plugin/builtins/chat/types/ChatPlugin.ts +6 -6
- package/src/plugin/builtins/chat/types/ChatPluginActionPayload.ts +2 -2
- package/src/plugin/builtins/chat/types/ChatPromptContext.ts +2 -2
- package/src/plugin/builtins/chat/types/ChatRuntime.ts +3 -3
- package/src/plugin/builtins/contact/Action.ts +3 -3
- package/src/plugin/builtins/contact/ContactPlugin.ts +2 -2
- package/src/plugin/builtins/contact/runtime/ChatRuntime.ts +1 -1
- package/src/plugin/builtins/contact/runtime/ContactPromptAssets.ts +2 -2
- package/src/plugin/builtins/contact/runtime/Paths.ts +1 -1
- package/src/plugin/builtins/contact/runtime/RemoteClient.ts +2 -2
- package/src/plugin/builtins/contact/types/ContactCheck.ts +2 -2
- package/src/plugin/builtins/contact/types/ContactCommand.ts +1 -1
- package/src/plugin/builtins/memory/MemoryPlugin.ts +1 -1
- package/src/plugin/builtins/memory/runtime/Search.ts +1 -1
- package/src/plugin/builtins/memory/runtime/Store.ts +3 -3
- package/src/plugin/builtins/shell/ShellRuntimeTypes.ts +4 -4
- package/src/plugin/builtins/shell/runtime/ShellActionRuntime.ts +2 -2
- package/src/plugin/builtins/shell/runtime/ShellActionRuntimeSupport.ts +2 -2
- package/src/plugin/builtins/shell/runtime/ShellProcessEvents.ts +1 -1
- package/src/plugin/builtins/shell/runtime/ShellRuntimeEnvironment.ts +1 -1
- package/src/plugin/builtins/shell/types/ShellPlugin.ts +4 -4
- package/src/plugin/builtins/skill/Plugin.ts +21 -8
- package/src/plugin/builtins/skill/runtime/SystemProvider.ts +1 -1
- package/src/plugin/builtins/task/PROMPT.ts +1 -1
- package/src/plugin/builtins/task/PROMPT.ts.txt +5 -5
- package/src/plugin/builtins/task/Scheduler.ts +4 -4
- package/src/plugin/builtins/task/runtime/CronTrigger.ts +9 -9
- package/src/plugin/builtins/task/runtime/TaskActionExecution.ts +1 -1
- package/src/plugin/builtins/task/runtime/TaskActionInput.ts +2 -2
- package/src/plugin/builtins/task/runtime/TaskPluginActionRegistry.ts +3 -3
- package/src/plugin/builtins/task/runtime/TaskPromptAssets.ts +2 -2
- package/src/plugin/builtins/task/runtime/TaskRunChatDispatch.ts +2 -2
- package/src/plugin/builtins/task/runtime/TaskRunnerRound.ts +2 -2
- package/src/plugin/builtins/task/runtime/TaskRunnerSession.ts +10 -10
- package/src/plugin/builtins/task/runtime/TaskRunnerTypes.ts +2 -2
- package/src/plugin/builtins/task/types/Cron.ts +3 -3
- package/src/plugin/builtins/task/types/TaskPluginTypes.ts +3 -3
- package/src/plugin/builtins/tts/Plugin.ts +23 -10
- package/src/plugin/builtins/web/Plugin.ts +23 -10
- package/src/plugin/builtins/workboard/Plugin.ts +71 -58
- package/src/plugin/builtins/workboard/runtime/Collector.ts +2 -2
- package/src/plugin/builtins/workboard/runtime/Normalizer.ts +3 -3
- package/src/plugin/core/BasePlugin.ts +2 -2
- package/src/plugin/core/BuiltinPluginClasses.ts +20 -3
- package/src/plugin/core/Catalog.ts +6 -5
- package/src/plugin/core/HttpRoutes.ts +6 -6
- package/src/plugin/core/LocalExecution.ts +15 -0
- package/src/plugin/core/PluginActionRunner.ts +0 -1
- package/src/plugin/core/PluginClassRegistry.ts +33 -4
- package/src/plugin/core/PluginCommand.ts +4 -4
- package/src/plugin/core/PluginCommandRequest.ts +4 -4
- package/src/plugin/core/PluginStateController.ts +2 -2
- package/src/plugin/core/schedule/Store.ts +2 -2
- package/src/plugin/core/schedule/Time.ts +1 -1
- package/src/plugin/types/Plugin.ts +18 -22
- package/src/plugin/types/PluginApi.ts +3 -3
- package/src/plugin/types/PluginState.ts +0 -5
- package/src/plugin/types/Plugins.ts +2 -2
- package/src/runtime/host/AgentHostRuntime.ts +1 -1
- package/src/runtime/host/daemon/Api.ts +2 -2
- package/src/runtime/sandbox/types/SandboxRuntime.ts +1 -1
- package/src/runtime/server/http/Server.ts +19 -51
- package/src/runtime/server/http/control/MessageTimeline.ts +1 -1
- package/src/runtime/server/http/control/OverviewRoutes.ts +2 -6
- package/src/runtime/server/http/control/SessionRoutes.ts +1 -1
- package/src/runtime/server/http/control/TaskRoutes.ts +1 -1
- package/src/runtime/server/http/plugins/plugins.ts +71 -4
- package/src/runtime/server/http/sdk/Router.ts +3 -3
- package/src/runtime/server/http/sdk/SessionRoutes.ts +82 -14
- package/src/runtime/server/rpc/Server.ts +13 -20
- package/src/sdk/Agent.ts +57 -39
- package/src/sdk/AgentSdkTypes.ts +358 -40
- package/src/sdk/RemoteAgent.ts +93 -21
- package/src/sdk/Session.ts +61 -43
- package/src/sdk/SessionSystemBuilder.ts +12 -12
- package/src/sdk/session/Browse.ts +519 -0
- package/src/sdk/session/Metadata.ts +1 -1
- package/src/sdk/session/Persistence.ts +3 -3
- package/src/sdk/session/RuntimeSessionPort.ts +4 -4
- package/src/sdk/session/index.ts +10 -1
- package/src/sdk/session/runtime/SessionPromptRuntime.ts +2 -2
- package/src/types/config/DowncityConfig.ts +143 -96
- package/src/types/runtime/host/AgentHost.ts +1 -1
- package/src/types/runtime/http/InlineInstant.ts +2 -2
- package/src/types/runtime/platform/PlatformGateway.ts +10 -10
- package/src/types/sdk/AgentSessionEvent.ts +1 -1
- package/src/types/sdk/AgentSessionTurn.ts +1 -1
- package/tsconfig.json +1 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/bin/plugin/core/Plugins.d.ts +0 -20
- package/bin/plugin/core/Plugins.d.ts.map +0 -1
- package/bin/plugin/core/Plugins.js +0 -33
- package/bin/plugin/core/Plugins.js.map +0 -1
- package/bin/runtime/host/PluginRuntime.d.ts +0 -24
- package/bin/runtime/host/PluginRuntime.d.ts.map +0 -1
- package/bin/runtime/host/PluginRuntime.js +0 -31
- package/bin/runtime/host/PluginRuntime.js.map +0 -1
- package/bin/runtime/server/http/services/services.d.ts +0 -25
- package/bin/runtime/server/http/services/services.d.ts.map +0 -1
- package/bin/runtime/server/http/services/services.js +0 -82
- package/bin/runtime/server/http/services/services.js.map +0 -1
- package/bin/session/Executor.d.ts.map +0 -1
- package/bin/session/Executor.js.map +0 -1
- package/bin/session/SessionRunScope.d.ts.map +0 -1
- package/bin/session/SessionRunScope.js.map +0 -1
- package/bin/session/composer/compaction/SessionCompactionComposer.d.ts.map +0 -1
- package/bin/session/composer/compaction/SessionCompactionComposer.js.map +0 -1
- package/bin/session/composer/compaction/jsonl/JsonlSessionCompactionComposer.d.ts.map +0 -1
- package/bin/session/composer/compaction/jsonl/JsonlSessionCompactionComposer.js.map +0 -1
- package/bin/session/composer/compaction/jsonl/JsonlSessionCompactionExecutor.d.ts.map +0 -1
- package/bin/session/composer/compaction/jsonl/JsonlSessionCompactionExecutor.js.map +0 -1
- package/bin/session/composer/context/LocalSessionContextComposer.d.ts.map +0 -1
- package/bin/session/composer/context/LocalSessionContextComposer.js.map +0 -1
- package/bin/session/composer/context/SessionContextComposer.d.ts.map +0 -1
- package/bin/session/composer/context/SessionContextComposer.js.map +0 -1
- package/bin/session/composer/history/SessionHistoryComposer.d.ts.map +0 -1
- package/bin/session/composer/history/SessionHistoryComposer.js.map +0 -1
- package/bin/session/composer/history/SessionHistoryWriter.d.ts.map +0 -1
- package/bin/session/composer/history/SessionHistoryWriter.js.map +0 -1
- package/bin/session/composer/history/jsonl/JsonlSessionHistoryComposer.d.ts.map +0 -1
- package/bin/session/composer/history/jsonl/JsonlSessionHistoryComposer.js.map +0 -1
- package/bin/session/composer/system/SessionSystemComposer.d.ts.map +0 -1
- package/bin/session/composer/system/SessionSystemComposer.js.map +0 -1
- package/bin/session/composer/system/default/DefaultSessionSystemComposer.d.ts.map +0 -1
- package/bin/session/composer/system/default/DefaultSessionSystemComposer.js.map +0 -1
- package/bin/session/composer/system/default/InitPromptAssets.d.ts.map +0 -1
- package/bin/session/composer/system/default/InitPromptAssets.js.map +0 -1
- package/bin/session/composer/system/default/InitPrompts.d.ts.map +0 -1
- package/bin/session/composer/system/default/InitPrompts.js.map +0 -1
- package/bin/session/composer/system/default/PromptRenderer.d.ts.map +0 -1
- package/bin/session/composer/system/default/PromptRenderer.js.map +0 -1
- package/bin/session/composer/system/default/StaticPromptCatalog.d.ts.map +0 -1
- package/bin/session/composer/system/default/StaticPromptCatalog.js.map +0 -1
- package/bin/session/composer/system/default/SystemDomain.d.ts.map +0 -1
- package/bin/session/composer/system/default/SystemDomain.js.map +0 -1
- package/bin/session/composer/system/default/SystemPromptAssets.d.ts.map +0 -1
- package/bin/session/composer/system/default/SystemPromptAssets.js.map +0 -1
- package/bin/session/composer/system/default/assets/core.prompt.d.ts.map +0 -1
- package/bin/session/composer/system/default/assets/core.prompt.js.map +0 -1
- package/bin/session/composer/system/default/assets/init/PROFILE.md.d.ts.map +0 -1
- package/bin/session/composer/system/default/assets/init/PROFILE.md.js.map +0 -1
- package/bin/session/composer/system/default/assets/init/SOUL.md.d.ts.map +0 -1
- package/bin/session/composer/system/default/assets/init/SOUL.md.js.map +0 -1
- package/bin/session/composer/system/default/assets/plugin.prompt.d.ts.map +0 -1
- package/bin/session/composer/system/default/assets/plugin.prompt.js +0 -8
- package/bin/session/composer/system/default/assets/plugin.prompt.js.map +0 -1
- package/bin/session/composer/system/default/assets/task.prompt.d.ts.map +0 -1
- package/bin/session/composer/system/default/assets/task.prompt.js.map +0 -1
- package/bin/session/composer/system/default/variables/GeoContext.d.ts.map +0 -1
- package/bin/session/composer/system/default/variables/GeoContext.js.map +0 -1
- package/bin/session/composer/system/default/variables/PromptTypes.d.ts.map +0 -1
- package/bin/session/composer/system/default/variables/PromptTypes.js.map +0 -1
- package/bin/session/composer/system/default/variables/VariableReplacer.d.ts.map +0 -1
- package/bin/session/composer/system/default/variables/VariableReplacer.js.map +0 -1
- package/bin/session/core-engine/CoreEngineError.d.ts.map +0 -1
- package/bin/session/core-engine/CoreEngineError.js.map +0 -1
- package/bin/session/core-engine/CoreEngineLoopDecision.d.ts.map +0 -1
- package/bin/session/core-engine/CoreEngineLoopDecision.js.map +0 -1
- package/bin/session/core-engine/CoreEngineMessageState.d.ts.map +0 -1
- package/bin/session/core-engine/CoreEngineMessageState.js.map +0 -1
- package/bin/session/core-engine/CoreEngineSignals.d.ts.map +0 -1
- package/bin/session/core-engine/CoreEngineSignals.js.map +0 -1
- package/bin/session/core-engine/CoreEngineUiStreamCollector.d.ts.map +0 -1
- package/bin/session/core-engine/CoreEngineUiStreamCollector.js.map +0 -1
- package/bin/session/ids/resolveSessionId.d.ts.map +0 -1
- package/bin/session/ids/resolveSessionId.js.map +0 -1
- package/bin/session/messages/AssistantResultPersistence.d.ts.map +0 -1
- package/bin/session/messages/AssistantResultPersistence.js.map +0 -1
- package/bin/session/messages/SessionAttachmentMapper.d.ts.map +0 -1
- package/bin/session/messages/SessionAttachmentMapper.js.map +0 -1
- package/bin/session/messages/SessionMessageCodec.d.ts.map +0 -1
- package/bin/session/messages/SessionMessageCodec.js.map +0 -1
- package/bin/session/messages/SessionMessageLog.d.ts.map +0 -1
- package/bin/session/messages/SessionMessageLog.js.map +0 -1
- package/bin/session/messages/SessionStepEventMapper.d.ts.map +0 -1
- package/bin/session/messages/SessionStepEventMapper.js.map +0 -1
- package/bin/session/store/history/SessionHistoryStore.d.ts.map +0 -1
- package/bin/session/store/history/SessionHistoryStore.js.map +0 -1
- package/bin/session/store/history/jsonl/JsonlSessionHistoryStore.d.ts.map +0 -1
- package/bin/session/store/history/jsonl/JsonlSessionHistoryStore.js.map +0 -1
- package/bin/session/tools/shell/ShellToolBridge.d.ts.map +0 -1
- package/bin/session/tools/shell/ShellToolBridge.js.map +0 -1
- package/bin/session/tools/shell/ShellToolDefinition.d.ts.map +0 -1
- package/bin/session/tools/shell/ShellToolDefinition.js.map +0 -1
- package/bin/session/tools/shell/ShellToolFormatting.d.ts.map +0 -1
- package/bin/session/tools/shell/ShellToolFormatting.js.map +0 -1
- package/bin/session/tools/shell/ShellToolSchemas.d.ts.map +0 -1
- package/bin/session/tools/shell/ShellToolSchemas.js.map +0 -1
- package/bin/session/types/SessionExecutor.d.ts.map +0 -1
- package/bin/session/types/SessionExecutor.js.map +0 -1
- package/bin/session/types/SessionHistoryMeta.d.ts.map +0 -1
- package/bin/session/types/SessionHistoryMeta.js.map +0 -1
- package/bin/session/types/SessionHistoryPaths.d.ts.map +0 -1
- package/bin/session/types/SessionHistoryPaths.js.map +0 -1
- package/bin/session/types/SessionLoop.d.ts.map +0 -1
- package/bin/session/types/SessionLoop.js.map +0 -1
- package/bin/session/types/SessionMessages.d.ts.map +0 -1
- package/bin/session/types/SessionMessages.js.map +0 -1
- package/bin/session/types/SessionPrompts.d.ts.map +0 -1
- package/bin/session/types/SessionPrompts.js.map +0 -1
- package/bin/session/types/SessionRun.d.ts.map +0 -1
- package/bin/session/types/SessionRun.js.map +0 -1
- package/src/plugin/core/Plugins.ts +0 -39
- package/src/runtime/host/PluginRuntime.ts +0 -42
- package/src/runtime/server/http/services/services.ts +0 -114
- /package/bin/{session → executor}/Executor.js +0 -0
- /package/bin/{session → executor}/composer/compaction/SessionCompactionComposer.js +0 -0
- /package/bin/{session → executor}/composer/compaction/jsonl/JsonlSessionCompactionComposer.d.ts +0 -0
- /package/bin/{session → executor}/composer/compaction/jsonl/JsonlSessionCompactionComposer.js +0 -0
- /package/bin/{session → executor}/composer/compaction/jsonl/JsonlSessionCompactionExecutor.js +0 -0
- /package/bin/{session → executor}/composer/context/LocalSessionContextComposer.js +0 -0
- /package/bin/{session → executor}/composer/context/SessionContextComposer.js +0 -0
- /package/bin/{session → executor}/composer/history/SessionHistoryComposer.js +0 -0
- /package/bin/{session → executor}/composer/history/SessionHistoryWriter.js +0 -0
- /package/bin/{session → executor}/composer/history/jsonl/JsonlSessionHistoryComposer.js +0 -0
- /package/bin/{session → executor}/composer/system/SessionSystemComposer.d.ts +0 -0
- /package/bin/{session → executor}/composer/system/SessionSystemComposer.js +0 -0
- /package/bin/{session → executor}/composer/system/default/DefaultSessionSystemComposer.js +0 -0
- /package/bin/{session → executor}/composer/system/default/InitPromptAssets.d.ts +0 -0
- /package/bin/{session → executor}/composer/system/default/InitPromptAssets.js +0 -0
- /package/bin/{session → executor}/composer/system/default/InitPrompts.d.ts +0 -0
- /package/bin/{session → executor}/composer/system/default/InitPrompts.js +0 -0
- /package/bin/{session → executor}/composer/system/default/PromptRenderer.d.ts +0 -0
- /package/bin/{session → executor}/composer/system/default/PromptRenderer.js +0 -0
- /package/bin/{session → executor}/composer/system/default/StaticPromptCatalog.d.ts +0 -0
- /package/bin/{session → executor}/composer/system/default/StaticPromptCatalog.js +0 -0
- /package/bin/{session → executor}/composer/system/default/SystemPromptAssets.d.ts +0 -0
- /package/bin/{session → executor}/composer/system/default/SystemPromptAssets.js +0 -0
- /package/bin/{session → executor}/composer/system/default/assets/core.prompt.d.ts +0 -0
- /package/bin/{session → executor}/composer/system/default/assets/init/PROFILE.md.d.ts +0 -0
- /package/bin/{session → executor}/composer/system/default/assets/init/SOUL.md.d.ts +0 -0
- /package/bin/{session → executor}/composer/system/default/assets/task.prompt.d.ts +0 -0
- /package/bin/{session → executor}/composer/system/default/variables/GeoContext.d.ts +0 -0
- /package/bin/{session → executor}/composer/system/default/variables/GeoContext.js +0 -0
- /package/bin/{session → executor}/composer/system/default/variables/PromptTypes.d.ts +0 -0
- /package/bin/{session → executor}/composer/system/default/variables/PromptTypes.js +0 -0
- /package/bin/{session → executor}/composer/system/default/variables/VariableReplacer.d.ts +0 -0
- /package/bin/{session → executor}/composer/system/default/variables/VariableReplacer.js +0 -0
- /package/bin/{session → executor}/core-engine/CoreEngineError.d.ts +0 -0
- /package/bin/{session → executor}/core-engine/CoreEngineError.js +0 -0
- /package/bin/{session → executor}/core-engine/CoreEngineLoopDecision.js +0 -0
- /package/bin/{session → executor}/core-engine/CoreEngineMessageState.js +0 -0
- /package/bin/{session → executor}/core-engine/CoreEngineSignals.js +0 -0
- /package/bin/{session → executor}/core-engine/CoreEngineUiStreamCollector.js +0 -0
- /package/bin/{session → executor}/ids/resolveSessionId.d.ts +0 -0
- /package/bin/{session → executor}/ids/resolveSessionId.js +0 -0
- /package/bin/{session → executor}/messages/AssistantResultPersistence.js +0 -0
- /package/bin/{session → executor}/messages/SessionAttachmentMapper.js +0 -0
- /package/bin/{session → executor}/messages/SessionMessageCodec.js +0 -0
- /package/bin/{session → executor}/messages/SessionMessageLog.js +0 -0
- /package/bin/{session → executor}/messages/SessionStepEventMapper.js +0 -0
- /package/bin/{session → executor}/store/history/SessionHistoryStore.js +0 -0
- /package/bin/{session → executor}/store/history/jsonl/JsonlSessionHistoryStore.js +0 -0
- /package/bin/{session → executor}/tools/shell/ShellToolSchemas.d.ts +0 -0
- /package/bin/{session → executor}/types/SessionExecutor.js +0 -0
- /package/bin/{session → executor}/types/SessionHistoryMeta.d.ts +0 -0
- /package/bin/{session → executor}/types/SessionHistoryMeta.js +0 -0
- /package/bin/{session → executor}/types/SessionHistoryPaths.d.ts +0 -0
- /package/bin/{session → executor}/types/SessionHistoryPaths.js +0 -0
- /package/bin/{session → executor}/types/SessionLoop.d.ts +0 -0
- /package/bin/{session → executor}/types/SessionLoop.js +0 -0
- /package/bin/{session → executor}/types/SessionMessages.d.ts +0 -0
- /package/bin/{session → executor}/types/SessionMessages.js +0 -0
- /package/bin/{session → executor}/types/SessionPrompts.d.ts +0 -0
- /package/bin/{session → executor}/types/SessionPrompts.js +0 -0
- /package/bin/{session → executor}/types/SessionRun.js +0 -0
- /package/src/{session → executor}/composer/system/SessionSystemComposer.ts +0 -0
- /package/src/{session → executor}/composer/system/default/assets/core.prompt.ts.txt +0 -0
- /package/src/{session → executor}/composer/system/default/assets/init/PROFILE.md.ts.txt +0 -0
- /package/src/{session → executor}/composer/system/default/assets/init/SOUL.md.ts.txt +0 -0
- /package/src/{session → executor}/composer/system/default/assets/task.prompt.ts.txt +0 -0
- /package/src/{session → executor}/composer/system/default/variables/PromptTypes.ts +0 -0
- /package/src/{session → executor}/core-engine/CoreEngineError.ts +0 -0
- /package/src/{session → executor}/ids/resolveSessionId.ts +0 -0
- /package/src/{session → executor}/types/SessionHistoryMeta.ts +0 -0
- /package/src/{session → executor}/types/SessionHistoryPaths.ts +0 -0
- /package/src/{session → executor}/types/SessionLoop.ts +0 -0
- /package/src/{session → executor}/types/SessionMessages.ts +0 -0
- /package/src/{session → executor}/types/SessionPrompts.ts +0 -0
package/bin/sdk/Agent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Agent.js","sourceRoot":"","sources":["../../src/sdk/Agent.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"Agent.js","sourceRoot":"","sources":["../../src/sdk/Agent.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAsBH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE;;GAEG;AACH,MAAM,OAAO,KAAK;IACC,IAAI,CAAY;IACxB,EAAE,CAAS;IACX,IAAI,CAAS;IACb,KAAK,CAAuB;IAC5B,OAAO,CAAa;IACrB,cAAc,GAAG,KAAK,CAAC;IACvB,YAAY,GAAqC,IAAI,CAAC;IACtD,WAAW,GAA4B,IAAI,CAAC;IAC5C,UAAU,GAA2B,IAAI,CAAC;IACjC,iBAAiB,CAAyB;IAE3D,YAAY,OAAqB;QAC/B,IAAI,CAAC,IAAI,GAAG,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC;QACnC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,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B,CAAC;YACvC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YAC/B,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;SAChC,CAAC,CAAC;QACH,IAAI,CAAC,UAAU,GAAG;YAChB,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,MAAM;SACP,CAAC;QACF,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,OAAO;QACnB,IAAI,CAAC,IAAI,CAAC,UAAU;YAAE,OAAO;QAC7B,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC;QAChC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,MAAM,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IAC9B,CAAC;CACF"}
|
|
@@ -3,16 +3,22 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 关键点(中文)
|
|
5
5
|
* - 这里集中声明 `Agent` / `RemoteAgent` / `Session` 面向外部调用方的稳定接口。
|
|
6
|
-
* - SDK 用户通过显式 `tools` / `
|
|
6
|
+
* - SDK 用户通过显式 `tools` / `plugins` 装配能力,不直接依赖内部 runtime 单例。
|
|
7
7
|
* - 本地/远程 session 运行与基础落盘能力仍是 SDK 主路径。
|
|
8
8
|
*/
|
|
9
9
|
import type { LanguageModel, Tool } from "ai";
|
|
10
10
|
import type { BasePlugin } from "../plugin/core/BasePlugin.js";
|
|
11
|
-
import type { Plugin } from "../plugin/types/Plugin.js";
|
|
12
11
|
import type { AgentPlatformRuntime } from "../types/runtime/host/AgentHost.js";
|
|
13
12
|
import type { LocalRpcServerHandle } from "../types/runtime/rpc/LocalRpc.js";
|
|
14
13
|
import type { ServerInstance } from "../runtime/server/http/Server.js";
|
|
15
|
-
import type {
|
|
14
|
+
import type { SessionMessageV1 } from "../executor/types/SessionMessages.js";
|
|
15
|
+
import type { AgentSessionSubscriber, AgentSessionUnsubscribe } from "../types/sdk/AgentSessionEvent.js";
|
|
16
|
+
import type { AgentSessionPromptInput } from "../types/sdk/AgentSessionPrompt.js";
|
|
17
|
+
import type { AgentSessionTurnHandle } from "../types/sdk/AgentSessionTurn.js";
|
|
18
|
+
/**
|
|
19
|
+
* SDK Agent 插件装配模式。
|
|
20
|
+
*/
|
|
21
|
+
export type AgentMode = "preset" | "custom";
|
|
16
22
|
/**
|
|
17
23
|
* 本地 Agent 构造参数。
|
|
18
24
|
*/
|
|
@@ -56,39 +62,23 @@ export interface AgentOptions {
|
|
|
56
62
|
*/
|
|
57
63
|
model?: LanguageModel;
|
|
58
64
|
/**
|
|
59
|
-
* 当前 agent
|
|
60
|
-
*
|
|
61
|
-
* 关键点(中文)
|
|
62
|
-
* - 这里接收已经实例化好的 runtime plugin,而不是 plugin class。
|
|
63
|
-
* - `Agent` 会在构造阶段按名称注册这些实例,并在启动时自动绑定 runtime。
|
|
64
|
-
* - v1 推荐显式传入 `new ChatPlugin(...)` 这类实例,而不是依赖包内隐式注册表。
|
|
65
|
-
*/
|
|
66
|
-
runtimePlugins?: BasePlugin[];
|
|
67
|
-
/**
|
|
68
|
-
* 是否自动装配全部内建 runtime plugin。
|
|
65
|
+
* 当前 agent 的插件装配模式。
|
|
69
66
|
*
|
|
70
67
|
* 关键点(中文)
|
|
71
|
-
* -
|
|
72
|
-
* -
|
|
68
|
+
* - `preset` 会自动装配内建插件集合。
|
|
69
|
+
* - `custom` 只使用显式传入的 `plugins`。
|
|
70
|
+
* - 默认值为 `custom`,避免本地嵌入场景隐式打开额外能力。
|
|
73
71
|
*/
|
|
74
|
-
|
|
72
|
+
mode?: AgentMode;
|
|
75
73
|
/**
|
|
76
|
-
* 当前 agent
|
|
74
|
+
* 当前 agent 显式持有的插件实例集合。
|
|
77
75
|
*
|
|
78
76
|
* 关键点(中文)
|
|
79
|
-
* -
|
|
80
|
-
* - `Agent`
|
|
77
|
+
* - 这里接收已经实例化好的 `BasePlugin` 对象,而不是 plugin class。
|
|
78
|
+
* - `Agent` 会在构造阶段按名称注册这些实例,并自动绑定到当前 runtime。
|
|
81
79
|
* - 同名 plugin 会直接报错,避免 action / hook / resolve 行为被静默覆盖。
|
|
82
80
|
*/
|
|
83
|
-
plugins?:
|
|
84
|
-
/**
|
|
85
|
-
* 是否自动装配全部内建 plugin。
|
|
86
|
-
*
|
|
87
|
-
* 关键点(中文)
|
|
88
|
-
* - 适合 city 这类宿主进程直接 `new Agent(...)` 的场景。
|
|
89
|
-
* - 未开启时,默认只使用显式传入的 `plugins`。
|
|
90
|
-
*/
|
|
91
|
-
useBuiltinPlugins?: boolean;
|
|
81
|
+
plugins?: BasePlugin[];
|
|
92
82
|
/**
|
|
93
83
|
* 当前 agent 显式注入的平台能力集合。
|
|
94
84
|
*
|
|
@@ -104,9 +94,9 @@ export interface AgentOptions {
|
|
|
104
94
|
* - SDK 不负责默认模型策略,宿主可在这里统一为 session 注入 model 等运行配置。
|
|
105
95
|
* - 若同时传入 `model`,则会先写入默认模型,再执行这里的宿主覆写逻辑。
|
|
106
96
|
* - 该钩子对每个 session 只触发一次,适合做实例级默认装配。
|
|
107
|
-
* - 触发时机可能来自显式 `agent.
|
|
97
|
+
* - 触发时机可能来自显式 `agent.createSession()` / `agent.getSession()`,也可能来自该 session 的首次执行入口。
|
|
108
98
|
*/
|
|
109
|
-
configureSession?: (session:
|
|
99
|
+
configureSession?: (session: AgentSession) => Promise<void> | void;
|
|
110
100
|
}
|
|
111
101
|
/**
|
|
112
102
|
* Agent 启动参数。
|
|
@@ -130,13 +120,13 @@ export interface AgentStartOptions {
|
|
|
130
120
|
*/
|
|
131
121
|
rpc?: boolean;
|
|
132
122
|
/**
|
|
133
|
-
* 是否启动当前 agent 的
|
|
123
|
+
* 是否启动当前 agent 的 plugins。
|
|
134
124
|
*
|
|
135
125
|
* 关键点(中文)
|
|
136
126
|
* - 默认 `true`。
|
|
137
127
|
* - `false` 适合只需要 session 能力、不希望启动后台能力的嵌入场景。
|
|
138
128
|
*/
|
|
139
|
-
|
|
129
|
+
plugins?: boolean;
|
|
140
130
|
}
|
|
141
131
|
/**
|
|
142
132
|
* Agent 停止结果快照。
|
|
@@ -151,9 +141,9 @@ export interface AgentStopResult {
|
|
|
151
141
|
*/
|
|
152
142
|
rpcStopped: boolean;
|
|
153
143
|
/**
|
|
154
|
-
* 本次是否实际停止了
|
|
144
|
+
* 本次是否实际停止了 plugins。
|
|
155
145
|
*/
|
|
156
|
-
|
|
146
|
+
pluginsStopped: boolean;
|
|
157
147
|
}
|
|
158
148
|
/**
|
|
159
149
|
* Agent 启动后的状态快照。
|
|
@@ -168,9 +158,9 @@ export interface AgentStartResult {
|
|
|
168
158
|
*/
|
|
169
159
|
rpc?: AgentRpcBinding;
|
|
170
160
|
/**
|
|
171
|
-
* 当前 agent 是否已启动
|
|
161
|
+
* 当前 agent 是否已启动 plugins。
|
|
172
162
|
*/
|
|
173
|
-
|
|
163
|
+
pluginsStarted: boolean;
|
|
174
164
|
}
|
|
175
165
|
/**
|
|
176
166
|
* Agent HTTP 启动参数。
|
|
@@ -230,6 +220,49 @@ export interface RemoteAgentOptions {
|
|
|
230
220
|
*/
|
|
231
221
|
baseUrl: string;
|
|
232
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* 新建 session 的输入参数。
|
|
225
|
+
*/
|
|
226
|
+
export interface AgentCreateSessionInput {
|
|
227
|
+
/**
|
|
228
|
+
* 可选显式 sessionId。
|
|
229
|
+
*
|
|
230
|
+
* 关键点(中文)
|
|
231
|
+
* - 传入时表达“创建意图”。
|
|
232
|
+
* - 若该 session 已存在,SDK 应直接报错,而不是静默复用。
|
|
233
|
+
* - 省略时由 SDK 自动生成稳定且不可推导的 sessionId。
|
|
234
|
+
*/
|
|
235
|
+
sessionId?: string;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Session 列表查询输入。
|
|
239
|
+
*/
|
|
240
|
+
export interface AgentListSessionsInput {
|
|
241
|
+
/**
|
|
242
|
+
* 当前页返回上限。
|
|
243
|
+
*
|
|
244
|
+
* 说明(中文)
|
|
245
|
+
* - 省略时由 SDK 使用默认值。
|
|
246
|
+
* - 建议宿主 UI 明确传入,避免在大量 session 下拉取过多数据。
|
|
247
|
+
*/
|
|
248
|
+
limit?: number;
|
|
249
|
+
/**
|
|
250
|
+
* 分页游标。
|
|
251
|
+
*
|
|
252
|
+
* 说明(中文)
|
|
253
|
+
* - 当前使用 SDK 自身生成的透明字符串游标。
|
|
254
|
+
* - 调用方只负责透传,不应自行解析其内部格式。
|
|
255
|
+
*/
|
|
256
|
+
cursor?: string;
|
|
257
|
+
/**
|
|
258
|
+
* 关键词过滤。
|
|
259
|
+
*
|
|
260
|
+
* 说明(中文)
|
|
261
|
+
* - 推荐用于匹配 `sessionId`、标题与预览文本。
|
|
262
|
+
* - 属于轻量包含匹配,不承诺复杂搜索语义。
|
|
263
|
+
*/
|
|
264
|
+
query?: string;
|
|
265
|
+
}
|
|
233
266
|
/**
|
|
234
267
|
* Session 可变配置。
|
|
235
268
|
*/
|
|
@@ -256,6 +289,49 @@ export interface AgentSessionConfigSnapshot {
|
|
|
256
289
|
*/
|
|
257
290
|
modelLabel?: string;
|
|
258
291
|
}
|
|
292
|
+
/**
|
|
293
|
+
* Session 历史视图类型。
|
|
294
|
+
*/
|
|
295
|
+
export type AgentSessionHistoryView = "message" | "timeline";
|
|
296
|
+
/**
|
|
297
|
+
* Session 时间线事件。
|
|
298
|
+
*/
|
|
299
|
+
export interface AgentSessionTimelineEvent {
|
|
300
|
+
/**
|
|
301
|
+
* 当前事件唯一标识。
|
|
302
|
+
*/
|
|
303
|
+
id: string;
|
|
304
|
+
/**
|
|
305
|
+
* 当前事件角色。
|
|
306
|
+
*
|
|
307
|
+
* 说明(中文)
|
|
308
|
+
* - `tool-call` / `tool-result` 用于把 assistant 内部工具过程平铺给 UI。
|
|
309
|
+
*/
|
|
310
|
+
role: "user" | "assistant" | "tool-call" | "tool-result";
|
|
311
|
+
/**
|
|
312
|
+
* 事件时间戳(毫秒)。
|
|
313
|
+
*/
|
|
314
|
+
ts?: number;
|
|
315
|
+
/**
|
|
316
|
+
* 事件所属消息种类。
|
|
317
|
+
*/
|
|
318
|
+
kind?: string;
|
|
319
|
+
/**
|
|
320
|
+
* 事件来源。
|
|
321
|
+
*/
|
|
322
|
+
source?: string;
|
|
323
|
+
/**
|
|
324
|
+
* 当前事件展示文本。
|
|
325
|
+
*/
|
|
326
|
+
text: string;
|
|
327
|
+
/**
|
|
328
|
+
* 当前事件对应工具名称。
|
|
329
|
+
*
|
|
330
|
+
* 说明(中文)
|
|
331
|
+
* - 仅 `tool-call` / `tool-result` 这类事件通常会携带该字段。
|
|
332
|
+
*/
|
|
333
|
+
toolName?: string;
|
|
334
|
+
}
|
|
259
335
|
/**
|
|
260
336
|
* Session system block 来源类型。
|
|
261
337
|
*/
|
|
@@ -343,9 +419,9 @@ export interface AgentSessionSystemSnapshot {
|
|
|
343
419
|
blocks: AgentSessionSystemBlock[];
|
|
344
420
|
}
|
|
345
421
|
/**
|
|
346
|
-
* Session
|
|
422
|
+
* Session 摘要。
|
|
347
423
|
*/
|
|
348
|
-
export interface
|
|
424
|
+
export interface AgentSessionSummary {
|
|
349
425
|
/**
|
|
350
426
|
* 当前 session 所属 agentId。
|
|
351
427
|
*/
|
|
@@ -354,6 +430,22 @@ export interface AgentSessionMetadata {
|
|
|
354
430
|
* 当前 session 唯一标识。
|
|
355
431
|
*/
|
|
356
432
|
sessionId: string;
|
|
433
|
+
/**
|
|
434
|
+
* 当前 session 可读标题。
|
|
435
|
+
*
|
|
436
|
+
* 说明(中文)
|
|
437
|
+
* - 当前 SDK 不要求标题一定存在。
|
|
438
|
+
* - 若调用方需要展示列表标题,可优先使用这里;为空时再回退到 `sessionId`。
|
|
439
|
+
*/
|
|
440
|
+
title?: string;
|
|
441
|
+
/**
|
|
442
|
+
* 当前 session 的最近预览文本。
|
|
443
|
+
*
|
|
444
|
+
* 说明(中文)
|
|
445
|
+
* - 通常来自最后一条用户可见消息的裁剪文本。
|
|
446
|
+
* - 适合用于侧边栏、列表卡片或 session picker。
|
|
447
|
+
*/
|
|
448
|
+
previewText?: string;
|
|
357
449
|
/**
|
|
358
450
|
* 当前 session 首次创建时间(ms)。
|
|
359
451
|
*/
|
|
@@ -370,6 +462,110 @@ export interface AgentSessionMetadata {
|
|
|
370
462
|
* 当前 session 绑定模型的可读标签。
|
|
371
463
|
*/
|
|
372
464
|
modelLabel?: string;
|
|
465
|
+
/**
|
|
466
|
+
* 当前 session 是否处于执行中。
|
|
467
|
+
*/
|
|
468
|
+
executing?: boolean;
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Session 详情。
|
|
472
|
+
*/
|
|
473
|
+
export interface AgentSessionInfo extends AgentSessionSummary {
|
|
474
|
+
/**
|
|
475
|
+
* 当前 session 初始化时记录的时区。
|
|
476
|
+
*/
|
|
477
|
+
timezone?: string;
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Session 摘要分页结果。
|
|
481
|
+
*/
|
|
482
|
+
export interface AgentSessionSummaryPage {
|
|
483
|
+
/**
|
|
484
|
+
* 当前页 session 摘要列表。
|
|
485
|
+
*/
|
|
486
|
+
items: AgentSessionSummary[];
|
|
487
|
+
/**
|
|
488
|
+
* 当前页所对应的总条数。
|
|
489
|
+
*
|
|
490
|
+
* 说明(中文)
|
|
491
|
+
* - 这里表示过滤后的总数,不是仅当前页数量。
|
|
492
|
+
* - 对分页 UI、结果统计和空态判断更友好。
|
|
493
|
+
*/
|
|
494
|
+
total: number;
|
|
495
|
+
/**
|
|
496
|
+
* 下一页游标。
|
|
497
|
+
*/
|
|
498
|
+
nextCursor?: string;
|
|
499
|
+
/**
|
|
500
|
+
* 是否仍有更多结果。
|
|
501
|
+
*/
|
|
502
|
+
hasMore: boolean;
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Session 历史读取输入。
|
|
506
|
+
*/
|
|
507
|
+
export interface AgentSessionHistoryInput {
|
|
508
|
+
/**
|
|
509
|
+
* 当前页返回上限。
|
|
510
|
+
*/
|
|
511
|
+
limit?: number;
|
|
512
|
+
/**
|
|
513
|
+
* 分页游标。
|
|
514
|
+
*/
|
|
515
|
+
cursor?: string;
|
|
516
|
+
/**
|
|
517
|
+
* 返回顺序。
|
|
518
|
+
*
|
|
519
|
+
* 说明(中文)
|
|
520
|
+
* - `asc`:从旧到新
|
|
521
|
+
* - `desc`:从新到旧
|
|
522
|
+
*/
|
|
523
|
+
order?: "asc" | "desc";
|
|
524
|
+
/**
|
|
525
|
+
* 返回视图类型。
|
|
526
|
+
*
|
|
527
|
+
* 说明(中文)
|
|
528
|
+
* - `message`:原始 session 消息
|
|
529
|
+
* - `timeline`:适合直接渲染 UI 的平铺事件
|
|
530
|
+
*/
|
|
531
|
+
view?: AgentSessionHistoryView;
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* Session 历史分页结果。
|
|
535
|
+
*/
|
|
536
|
+
export interface AgentSessionHistoryPage {
|
|
537
|
+
/**
|
|
538
|
+
* 当前读取所对应的 session 信息。
|
|
539
|
+
*/
|
|
540
|
+
session: AgentSessionInfo;
|
|
541
|
+
/**
|
|
542
|
+
* 当前页实际返回视图。
|
|
543
|
+
*/
|
|
544
|
+
view: AgentSessionHistoryView;
|
|
545
|
+
/**
|
|
546
|
+
* 当前页数据列表。
|
|
547
|
+
*
|
|
548
|
+
* 说明(中文)
|
|
549
|
+
* - `view=message` 时返回 `SessionMessageV1[]`
|
|
550
|
+
* - `view=timeline` 时返回 `AgentSessionTimelineEvent[]`
|
|
551
|
+
*/
|
|
552
|
+
items: SessionMessageV1[] | AgentSessionTimelineEvent[];
|
|
553
|
+
/**
|
|
554
|
+
* 过滤前后的总条数。
|
|
555
|
+
*
|
|
556
|
+
* 说明(中文)
|
|
557
|
+
* - 对 `view=message` 表示消息条数。
|
|
558
|
+
* - 对 `view=timeline` 表示时间线事件条数。
|
|
559
|
+
*/
|
|
560
|
+
total: number;
|
|
561
|
+
/**
|
|
562
|
+
* 下一页游标。
|
|
563
|
+
*/
|
|
564
|
+
nextCursor?: string;
|
|
565
|
+
/**
|
|
566
|
+
* 是否仍有更多数据。
|
|
567
|
+
*/
|
|
568
|
+
hasMore: boolean;
|
|
373
569
|
}
|
|
374
570
|
/**
|
|
375
571
|
* Session fork 输入。
|
|
@@ -384,4 +580,80 @@ export interface AgentSessionForkInput {
|
|
|
384
580
|
*/
|
|
385
581
|
messageId?: string;
|
|
386
582
|
}
|
|
583
|
+
/**
|
|
584
|
+
* SDK Session 集合绑定。
|
|
585
|
+
*/
|
|
586
|
+
export interface AgentSessionCollection {
|
|
587
|
+
/**
|
|
588
|
+
* 新建一个 session。
|
|
589
|
+
*/
|
|
590
|
+
createSession(input?: AgentCreateSessionInput): Promise<AgentSession>;
|
|
591
|
+
/**
|
|
592
|
+
* 获取一个已存在的 session。
|
|
593
|
+
*/
|
|
594
|
+
getSession(sessionId: string): Promise<AgentSession>;
|
|
595
|
+
/**
|
|
596
|
+
* 列出当前 agent 的 session 摘要页。
|
|
597
|
+
*/
|
|
598
|
+
listSessions(input?: AgentListSessionsInput): Promise<AgentSessionSummaryPage>;
|
|
599
|
+
}
|
|
600
|
+
/**
|
|
601
|
+
* Session actor 公共能力。
|
|
602
|
+
*/
|
|
603
|
+
export interface AgentSessionActor {
|
|
604
|
+
/**
|
|
605
|
+
* 当前 session 稳定标识。
|
|
606
|
+
*/
|
|
607
|
+
readonly id: string;
|
|
608
|
+
/**
|
|
609
|
+
* 读取当前 session 详情。
|
|
610
|
+
*/
|
|
611
|
+
getInfo(): Promise<AgentSessionInfo>;
|
|
612
|
+
/**
|
|
613
|
+
* 追加一条新的 prompt。
|
|
614
|
+
*/
|
|
615
|
+
prompt(input: AgentSessionPromptInput): Promise<AgentSessionTurnHandle>;
|
|
616
|
+
/**
|
|
617
|
+
* 订阅当前 session 的未来事件。
|
|
618
|
+
*/
|
|
619
|
+
subscribe(subscriber: AgentSessionSubscriber): AgentSessionUnsubscribe;
|
|
620
|
+
/**
|
|
621
|
+
* 读取当前 session 历史分页。
|
|
622
|
+
*/
|
|
623
|
+
history(input?: AgentSessionHistoryInput): Promise<AgentSessionHistoryPage>;
|
|
624
|
+
/**
|
|
625
|
+
* 读取当前 session 生效的 system 快照。
|
|
626
|
+
*/
|
|
627
|
+
system(): Promise<AgentSessionSystemSnapshot>;
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
630
|
+
* 本地 Agent 返回的公开 session 接口。
|
|
631
|
+
*/
|
|
632
|
+
export interface AgentSession extends AgentSessionActor {
|
|
633
|
+
/**
|
|
634
|
+
* 当前 session 所属 agentId。
|
|
635
|
+
*/
|
|
636
|
+
readonly agentId: string;
|
|
637
|
+
/**
|
|
638
|
+
* 当前 session 配置快照。
|
|
639
|
+
*/
|
|
640
|
+
readonly config: AgentSessionConfigSnapshot;
|
|
641
|
+
/**
|
|
642
|
+
* 写入当前 session 默认配置。
|
|
643
|
+
*/
|
|
644
|
+
set(input: AgentSessionSetInput): Promise<void>;
|
|
645
|
+
/**
|
|
646
|
+
* 从当前 session 创建一个分叉会话。
|
|
647
|
+
*/
|
|
648
|
+
fork(input?: AgentSessionForkInput | string): Promise<AgentSession>;
|
|
649
|
+
}
|
|
650
|
+
/**
|
|
651
|
+
* 远程 Agent 返回的公开 session 接口。
|
|
652
|
+
*/
|
|
653
|
+
export interface RemoteAgentSession extends AgentSessionActor {
|
|
654
|
+
/**
|
|
655
|
+
* 从当前远程 session 创建一个分叉会话。
|
|
656
|
+
*/
|
|
657
|
+
fork(input?: AgentSessionForkInput | string): Promise<RemoteAgentSession>;
|
|
658
|
+
}
|
|
387
659
|
//# sourceMappingURL=AgentSdkTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentSdkTypes.d.ts","sourceRoot":"","sources":["../../src/sdk/AgentSdkTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,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稳定接口。
|
|
6
|
-
* - SDK 用户通过显式 `tools` / `
|
|
6
|
+
* - SDK 用户通过显式 `tools` / `plugins` 装配能力,不直接依赖内部 runtime 单例。
|
|
7
7
|
* - 本地/远程 session 运行与基础落盘能力仍是 SDK 主路径。
|
|
8
8
|
*/
|
|
9
9
|
export {};
|
package/bin/sdk/RemoteAgent.d.ts
CHANGED
|
@@ -6,58 +6,7 @@
|
|
|
6
6
|
* - 与本地 `Session` 保持同一套 Session actor 使用面:`prompt()` + `subscribe()`。
|
|
7
7
|
* - `RemoteAgent` 只负责 transport 与本地 turn handle 合成,不重复实现第二套会话编排器。
|
|
8
8
|
*/
|
|
9
|
-
import type {
|
|
10
|
-
import type { SessionMessageV1 } from "../session/types/SessionMessages.js";
|
|
11
|
-
import type { AgentSessionSubscriber, AgentSessionUnsubscribe } from "../types/sdk/AgentSessionEvent.js";
|
|
12
|
-
import type { AgentSessionPromptInput } from "../types/sdk/AgentSessionPrompt.js";
|
|
13
|
-
import type { AgentSessionTurnHandle } from "../types/sdk/AgentSessionTurn.js";
|
|
14
|
-
/**
|
|
15
|
-
* 远程 Session 客户端。
|
|
16
|
-
*/
|
|
17
|
-
declare class RemoteSession {
|
|
18
|
-
readonly id: string;
|
|
19
|
-
private readonly baseUrl;
|
|
20
|
-
private readonly eventHub;
|
|
21
|
-
private readonly turnsById;
|
|
22
|
-
private readonly completedTurnIds;
|
|
23
|
-
private eventPumpConnectPromise;
|
|
24
|
-
private eventPumpAbortController;
|
|
25
|
-
private eventPumpRunning;
|
|
26
|
-
private eventSubscriberCount;
|
|
27
|
-
constructor(baseUrl: string, sessionId: string);
|
|
28
|
-
/**
|
|
29
|
-
* 远程 session 当前不支持直接注入本地模型实例。
|
|
30
|
-
*/
|
|
31
|
-
set(_input: AgentSessionSetInput): Promise<void>;
|
|
32
|
-
/**
|
|
33
|
-
* 向当前远程 session 追加一条新的 prompt。
|
|
34
|
-
*/
|
|
35
|
-
prompt(input: AgentSessionPromptInput): Promise<AgentSessionTurnHandle>;
|
|
36
|
-
/**
|
|
37
|
-
* 订阅当前远程 session 的 future 事件。
|
|
38
|
-
*/
|
|
39
|
-
subscribe(subscriber: AgentSessionSubscriber): AgentSessionUnsubscribe;
|
|
40
|
-
/**
|
|
41
|
-
* 读取远程消息历史。
|
|
42
|
-
*/
|
|
43
|
-
history(): Promise<SessionMessageV1[]>;
|
|
44
|
-
/**
|
|
45
|
-
* 读取远程 session 当前生效的 system prompt 快照。
|
|
46
|
-
*/
|
|
47
|
-
system(): Promise<AgentSessionSystemSnapshot>;
|
|
48
|
-
/**
|
|
49
|
-
* 分叉远程 session。
|
|
50
|
-
*/
|
|
51
|
-
fork(messageId?: string): Promise<RemoteSession>;
|
|
52
|
-
private ensureEventPump;
|
|
53
|
-
private consumeEventConnection;
|
|
54
|
-
private handleEventLine;
|
|
55
|
-
private handleEvent;
|
|
56
|
-
private ensureTurnLifecycle;
|
|
57
|
-
private failPendingTurns;
|
|
58
|
-
private rememberCompletedTurn;
|
|
59
|
-
private maybeStopEventPump;
|
|
60
|
-
}
|
|
9
|
+
import type { AgentCreateSessionInput, AgentListSessionsInput, AgentSessionSummaryPage, RemoteAgentSession, RemoteAgentOptions } from "../sdk/AgentSdkTypes.js";
|
|
61
10
|
/**
|
|
62
11
|
* RemoteAgent:远程 Agent 客户端。
|
|
63
12
|
*/
|
|
@@ -65,13 +14,16 @@ export declare class RemoteAgent {
|
|
|
65
14
|
private readonly baseUrl;
|
|
66
15
|
constructor(options: RemoteAgentOptions);
|
|
67
16
|
/**
|
|
68
|
-
*
|
|
17
|
+
* 新建一个远程 session。
|
|
18
|
+
*/
|
|
19
|
+
createSession(input?: AgentCreateSessionInput): Promise<RemoteAgentSession>;
|
|
20
|
+
/**
|
|
21
|
+
* 获取一个已存在的远程 session。
|
|
69
22
|
*/
|
|
70
|
-
|
|
23
|
+
getSession(sessionId: string): Promise<RemoteAgentSession>;
|
|
71
24
|
/**
|
|
72
|
-
* 列出远程 agent
|
|
25
|
+
* 列出远程 agent 的 session 摘要页。
|
|
73
26
|
*/
|
|
74
|
-
|
|
27
|
+
listSessions(input?: AgentListSessionsInput): Promise<AgentSessionSummaryPage>;
|
|
75
28
|
}
|
|
76
|
-
export {};
|
|
77
29
|
//# sourceMappingURL=RemoteAgent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteAgent.d.ts","sourceRoot":"","sources":["../../src/sdk/RemoteAgent.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"RemoteAgent.d.ts","sourceRoot":"","sources":["../../src/sdk/RemoteAgent.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,uBAAuB,EACvB,sBAAsB,EAMtB,uBAAuB,EAEvB,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,wBAAwB,CAAC;AAgbhC;;GAEG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBAErB,OAAO,EAAE,kBAAkB;IAQvC;;OAEG;IACG,aAAa,CACjB,KAAK,CAAC,EAAE,uBAAuB,GAC9B,OAAO,CAAC,kBAAkB,CAAC;IAqB9B;;OAEG;IACG,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAmBhE;;OAEG;IACG,YAAY,CAChB,KAAK,CAAC,EAAE,sBAAsB,GAC7B,OAAO,CAAC,uBAAuB,CAAC;CAkBpC"}
|