@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
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BasePlugin } from "../../../plugin/core/BasePlugin.js";
|
|
1
2
|
import { WEB_PLUGIN_DEFAULT_REPOSITORY_URL } from "../../../plugin/builtins/web/types/WebPlugin.js";
|
|
2
3
|
import { isPluginEnabled } from "../../../plugin/core/Activation.js";
|
|
3
4
|
import { doctorWebPluginDependency, inspectWebPluginDependency, installWebPluginDependency, readWebPluginConfig, writeWebPluginConfig, } from "../../../plugin/builtins/web/Dependency.js";
|
|
@@ -48,412 +49,421 @@ function getInstallScopeOpt(opts, key) {
|
|
|
48
49
|
return value;
|
|
49
50
|
return undefined;
|
|
50
51
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
browserCommand: "agent-browser",
|
|
67
|
-
installScope: "user",
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
setup: {
|
|
71
|
-
mode: "install-configure",
|
|
72
|
-
title: "安装联网 Provider",
|
|
73
|
-
description: "把 provider 安装到统一 skill 目录,并同步当前配置。",
|
|
74
|
-
fields: [
|
|
75
|
-
{
|
|
76
|
-
key: "provider",
|
|
77
|
-
label: "联网方法",
|
|
78
|
-
type: "select",
|
|
79
|
-
required: true,
|
|
80
|
-
sourceAction: "providers",
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
key: "installScope",
|
|
84
|
-
label: "安装位置",
|
|
85
|
-
type: "select",
|
|
86
|
-
required: true,
|
|
87
|
-
options: [
|
|
88
|
-
{ label: "用户目录", value: "user", hint: "~/.agents/skills" },
|
|
89
|
-
{ label: "项目目录", value: "project", hint: "PROJECT/.agents/skills" },
|
|
90
|
-
],
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
key: "injectPrompt",
|
|
94
|
-
label: "注入 provider 提示词",
|
|
95
|
-
type: "checkbox",
|
|
96
|
-
},
|
|
97
|
-
],
|
|
98
|
-
primaryAction: "install",
|
|
99
|
-
statusAction: "status",
|
|
100
|
-
},
|
|
101
|
-
usage: {
|
|
102
|
-
title: "配置联网方式",
|
|
103
|
-
description: "选择当前 agent 默认使用的联网 provider 与提示词注入策略。",
|
|
104
|
-
fields: [
|
|
105
|
-
{
|
|
106
|
-
key: "provider",
|
|
107
|
-
label: "当前 Provider",
|
|
108
|
-
type: "select",
|
|
109
|
-
required: true,
|
|
110
|
-
sourceAction: "providers",
|
|
52
|
+
function createWebPluginDefinition(plugin) {
|
|
53
|
+
return {
|
|
54
|
+
name: "web",
|
|
55
|
+
title: "Web Access",
|
|
56
|
+
description: "Connects the agent to either web-access or agent-browser, checks provider readiness, and injects the matching guidance into the runtime prompt.",
|
|
57
|
+
config: {
|
|
58
|
+
plugin: "web",
|
|
59
|
+
scope: "project",
|
|
60
|
+
defaultValue: {
|
|
61
|
+
provider: "web-access",
|
|
62
|
+
injectPrompt: true,
|
|
63
|
+
repositoryUrl: WEB_PLUGIN_DEFAULT_REPOSITORY_URL,
|
|
64
|
+
sourceVersion: "2.4.1",
|
|
65
|
+
browserCommand: "agent-browser",
|
|
66
|
+
installScope: "user",
|
|
111
67
|
},
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
placeholder: "agent-browser",
|
|
125
|
-
description: "仅在 provider 为 agent-browser 时生效。",
|
|
126
|
-
},
|
|
127
|
-
],
|
|
128
|
-
saveAction: "configure",
|
|
129
|
-
statusAction: "status",
|
|
130
|
-
},
|
|
131
|
-
async availability(context) {
|
|
132
|
-
if (!isPluginEnabled({ plugin: webPlugin, context })) {
|
|
133
|
-
return {
|
|
134
|
-
enabled: false,
|
|
135
|
-
available: false,
|
|
136
|
-
reasons: ["web plugin disabled in city config"],
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
const dependency = await inspectWebPluginDependency(context);
|
|
140
|
-
return {
|
|
141
|
-
enabled: true,
|
|
142
|
-
available: dependency.available,
|
|
143
|
-
reasons: dependency.reasons,
|
|
144
|
-
};
|
|
145
|
-
},
|
|
146
|
-
actions: {
|
|
147
|
-
status: {
|
|
148
|
-
allowWhenDisabled: true,
|
|
149
|
-
command: {
|
|
150
|
-
description: "查看 web plugin 当前状态",
|
|
151
|
-
mapInput() {
|
|
152
|
-
return {};
|
|
68
|
+
},
|
|
69
|
+
setup: {
|
|
70
|
+
mode: "install-configure",
|
|
71
|
+
title: "安装联网 Provider",
|
|
72
|
+
description: "把 provider 安装到统一 skill 目录,并同步当前配置。",
|
|
73
|
+
fields: [
|
|
74
|
+
{
|
|
75
|
+
key: "provider",
|
|
76
|
+
label: "联网方法",
|
|
77
|
+
type: "select",
|
|
78
|
+
required: true,
|
|
79
|
+
sourceAction: "providers",
|
|
153
80
|
},
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
81
|
+
{
|
|
82
|
+
key: "installScope",
|
|
83
|
+
label: "安装位置",
|
|
84
|
+
type: "select",
|
|
85
|
+
required: true,
|
|
86
|
+
options: [
|
|
87
|
+
{ label: "用户目录", value: "user", hint: "~/.agents/skills" },
|
|
88
|
+
{ label: "项目目录", value: "project", hint: "PROJECT/.agents/skills" },
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
key: "injectPrompt",
|
|
93
|
+
label: "注入 provider 提示词",
|
|
94
|
+
type: "checkbox",
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
primaryAction: "install",
|
|
98
|
+
statusAction: "status",
|
|
172
99
|
},
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
100
|
+
usage: {
|
|
101
|
+
title: "配置联网方式",
|
|
102
|
+
description: "选择当前 agent 默认使用的联网 provider 与提示词注入策略。",
|
|
103
|
+
fields: [
|
|
104
|
+
{
|
|
105
|
+
key: "provider",
|
|
106
|
+
label: "当前 Provider",
|
|
107
|
+
type: "select",
|
|
108
|
+
required: true,
|
|
109
|
+
sourceAction: "providers",
|
|
179
110
|
},
|
|
180
|
-
|
|
181
|
-
|
|
111
|
+
{
|
|
112
|
+
key: "injectPrompt",
|
|
113
|
+
label: "注入 Provider 提示词",
|
|
114
|
+
type: "boolean",
|
|
115
|
+
trueLabel: "开启",
|
|
116
|
+
falseLabel: "关闭",
|
|
117
|
+
description: "开启后,agent system prompt 会自动注入当前 provider 的使用约束。",
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
key: "browserCommand",
|
|
121
|
+
label: "Browser 命令",
|
|
122
|
+
type: "string",
|
|
123
|
+
placeholder: "agent-browser",
|
|
124
|
+
description: "仅在 provider 为 agent-browser 时生效。",
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
saveAction: "configure",
|
|
128
|
+
statusAction: "status",
|
|
129
|
+
},
|
|
130
|
+
async availability(context) {
|
|
131
|
+
if (!isPluginEnabled({ plugin, context })) {
|
|
182
132
|
return {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
{
|
|
187
|
-
value: "web-access",
|
|
188
|
-
title: "web-access",
|
|
189
|
-
description: "适合网页搜索、信息查证与策略型联网任务",
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
value: "agent-browser",
|
|
193
|
-
title: "agent-browser",
|
|
194
|
-
description: "适合动态页面、登录态页面与真实浏览器操作",
|
|
195
|
-
},
|
|
196
|
-
],
|
|
197
|
-
providers: [
|
|
198
|
-
{
|
|
199
|
-
value: "web-access",
|
|
200
|
-
title: "web-access",
|
|
201
|
-
description: "适合网页搜索、信息查证与策略型联网任务",
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
value: "agent-browser",
|
|
205
|
-
title: "agent-browser",
|
|
206
|
-
description: "适合动态页面、登录态页面与真实浏览器操作",
|
|
207
|
-
},
|
|
208
|
-
],
|
|
209
|
-
},
|
|
133
|
+
enabled: false,
|
|
134
|
+
available: false,
|
|
135
|
+
reasons: ["web plugin disabled in city config"],
|
|
210
136
|
};
|
|
211
|
-
}
|
|
137
|
+
}
|
|
138
|
+
const dependency = await inspectWebPluginDependency(context);
|
|
139
|
+
return {
|
|
140
|
+
enabled: true,
|
|
141
|
+
available: dependency.available,
|
|
142
|
+
reasons: dependency.reasons,
|
|
143
|
+
};
|
|
212
144
|
},
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
const nextConfig = await writeWebPluginConfig({
|
|
221
|
-
context,
|
|
222
|
-
value: patch,
|
|
223
|
-
});
|
|
224
|
-
return {
|
|
225
|
-
success: true,
|
|
226
|
-
data: {
|
|
227
|
-
plugin: toJsonObject(nextConfig),
|
|
145
|
+
actions: {
|
|
146
|
+
status: {
|
|
147
|
+
allowWhenDisabled: true,
|
|
148
|
+
command: {
|
|
149
|
+
description: "查看 web plugin 当前状态",
|
|
150
|
+
mapInput() {
|
|
151
|
+
return {};
|
|
228
152
|
},
|
|
229
|
-
}
|
|
153
|
+
},
|
|
154
|
+
execute: async ({ context }) => {
|
|
155
|
+
const config = readWebPluginConfig(context);
|
|
156
|
+
const availability = await plugin.availability(context);
|
|
157
|
+
const source = await inspectWebPluginDependency(context);
|
|
158
|
+
return {
|
|
159
|
+
success: true,
|
|
160
|
+
data: {
|
|
161
|
+
plugin: toJsonObject(config),
|
|
162
|
+
availability: {
|
|
163
|
+
enabled: availability.enabled,
|
|
164
|
+
available: availability.available,
|
|
165
|
+
reasons: availability.reasons,
|
|
166
|
+
},
|
|
167
|
+
provider: source.details || null,
|
|
168
|
+
},
|
|
169
|
+
};
|
|
170
|
+
},
|
|
230
171
|
},
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
.option("--provider <provider>", "web-access 或 agent-browser")
|
|
239
|
-
.option("--repo <url>", "记录来源仓库地址")
|
|
240
|
-
.option("--version <version>", "记录来源版本")
|
|
241
|
-
.option("--browser-command <command>", "agent-browser 命令名")
|
|
242
|
-
.option("--scope <scope>", "安装位置:user 或 project")
|
|
243
|
-
.option("--no-inject-prompt", "关闭 provider 提示词注入");
|
|
172
|
+
providers: {
|
|
173
|
+
allowWhenDisabled: true,
|
|
174
|
+
command: {
|
|
175
|
+
description: "列出 web plugin 支持的 provider",
|
|
176
|
+
mapInput() {
|
|
177
|
+
return {};
|
|
178
|
+
},
|
|
244
179
|
},
|
|
245
|
-
|
|
180
|
+
execute: async () => {
|
|
246
181
|
return {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
:
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
:
|
|
262
|
-
|
|
182
|
+
success: true,
|
|
183
|
+
data: {
|
|
184
|
+
options: [
|
|
185
|
+
{
|
|
186
|
+
value: "web-access",
|
|
187
|
+
title: "web-access",
|
|
188
|
+
description: "适合网页搜索、信息查证与策略型联网任务",
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
value: "agent-browser",
|
|
192
|
+
title: "agent-browser",
|
|
193
|
+
description: "适合动态页面、登录态页面与真实浏览器操作",
|
|
194
|
+
},
|
|
195
|
+
],
|
|
196
|
+
providers: [
|
|
197
|
+
{
|
|
198
|
+
value: "web-access",
|
|
199
|
+
title: "web-access",
|
|
200
|
+
description: "适合网页搜索、信息查证与策略型联网任务",
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
value: "agent-browser",
|
|
204
|
+
title: "agent-browser",
|
|
205
|
+
description: "适合动态页面、登录态页面与真实浏览器操作",
|
|
206
|
+
},
|
|
207
|
+
],
|
|
208
|
+
},
|
|
263
209
|
};
|
|
264
210
|
},
|
|
265
211
|
},
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
212
|
+
configure: {
|
|
213
|
+
allowWhenDisabled: true,
|
|
214
|
+
execute: async ({ context, payload }) => {
|
|
215
|
+
const payloadObject = payload && typeof payload === "object" && !Array.isArray(payload)
|
|
270
216
|
? payload
|
|
271
|
-
:
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
};
|
|
278
|
-
},
|
|
279
|
-
},
|
|
280
|
-
on: {
|
|
281
|
-
allowWhenDisabled: true,
|
|
282
|
-
command: {
|
|
283
|
-
description: "启用 web plugin,并可选设置 provider",
|
|
284
|
-
configure(command) {
|
|
285
|
-
command
|
|
286
|
-
.option("--provider <provider>", "web-access 或 agent-browser")
|
|
287
|
-
.option("--repo <url>", "记录来源仓库地址")
|
|
288
|
-
.option("--version <version>", "记录来源版本")
|
|
289
|
-
.option("--browser-command <command>", "agent-browser 命令名")
|
|
290
|
-
.option("--no-inject-prompt", "关闭 provider 提示词注入");
|
|
291
|
-
},
|
|
292
|
-
mapInput({ opts }) {
|
|
217
|
+
: {};
|
|
218
|
+
const { enabled: _ignoredEnabled, enable: _ignoredEnable, ...patch } = payloadObject;
|
|
219
|
+
const nextConfig = await writeWebPluginConfig({
|
|
220
|
+
context,
|
|
221
|
+
value: patch,
|
|
222
|
+
});
|
|
293
223
|
return {
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
:
|
|
297
|
-
|
|
298
|
-
? { repositoryUrl: getStringOpt(opts, "repo") }
|
|
299
|
-
: {}),
|
|
300
|
-
...(getStringOpt(opts, "version")
|
|
301
|
-
? { sourceVersion: getStringOpt(opts, "version") }
|
|
302
|
-
: {}),
|
|
303
|
-
...(getStringOpt(opts, "browserCommand")
|
|
304
|
-
? { browserCommand: getStringOpt(opts, "browserCommand") }
|
|
305
|
-
: {}),
|
|
306
|
-
injectPrompt: getBooleanOpt(opts, "injectPrompt", true),
|
|
224
|
+
success: true,
|
|
225
|
+
data: {
|
|
226
|
+
plugin: toJsonObject(nextConfig),
|
|
227
|
+
},
|
|
307
228
|
};
|
|
308
229
|
},
|
|
309
230
|
},
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
? Boolean(payload.injectPrompt)
|
|
323
|
-
: true,
|
|
324
|
-
...(typeof payload.repositoryUrl === "string"
|
|
325
|
-
? { repositoryUrl: String(payload.repositoryUrl) }
|
|
326
|
-
: {}),
|
|
327
|
-
...(typeof payload.sourceVersion === "string"
|
|
328
|
-
? { sourceVersion: String(payload.sourceVersion) }
|
|
329
|
-
: {}),
|
|
330
|
-
...(typeof payload.browserCommand === "string"
|
|
331
|
-
? { browserCommand: String(payload.browserCommand) }
|
|
332
|
-
: {}),
|
|
231
|
+
install: {
|
|
232
|
+
allowWhenDisabled: true,
|
|
233
|
+
command: {
|
|
234
|
+
description: "安装当前 provider 对应的 skill,并写入配置",
|
|
235
|
+
configure(command) {
|
|
236
|
+
command
|
|
237
|
+
.option("--provider <provider>", "web-access 或 agent-browser")
|
|
238
|
+
.option("--repo <url>", "记录来源仓库地址")
|
|
239
|
+
.option("--version <version>", "记录来源版本")
|
|
240
|
+
.option("--browser-command <command>", "agent-browser 命令名")
|
|
241
|
+
.option("--scope <scope>", "安装位置:user 或 project")
|
|
242
|
+
.option("--no-inject-prompt", "关闭 provider 提示词注入");
|
|
333
243
|
},
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
244
|
+
mapInput({ opts }) {
|
|
245
|
+
return {
|
|
246
|
+
...(getWebProviderOpt(opts, "provider")
|
|
247
|
+
? { provider: getWebProviderOpt(opts, "provider") }
|
|
248
|
+
: {}),
|
|
249
|
+
...(getStringOpt(opts, "repo")
|
|
250
|
+
? { repositoryUrl: getStringOpt(opts, "repo") }
|
|
251
|
+
: {}),
|
|
252
|
+
...(getStringOpt(opts, "version")
|
|
253
|
+
? { sourceVersion: getStringOpt(opts, "version") }
|
|
254
|
+
: {}),
|
|
255
|
+
...(getStringOpt(opts, "browserCommand")
|
|
256
|
+
? { browserCommand: getStringOpt(opts, "browserCommand") }
|
|
257
|
+
: {}),
|
|
258
|
+
...(getInstallScopeOpt(opts, "scope")
|
|
259
|
+
? { installScope: getInstallScopeOpt(opts, "scope") }
|
|
260
|
+
: {}),
|
|
261
|
+
injectPrompt: getBooleanOpt(opts, "injectPrompt", true),
|
|
262
|
+
};
|
|
339
263
|
},
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
264
|
+
},
|
|
265
|
+
execute: async ({ context, payload }) => {
|
|
266
|
+
const result = await installWebPluginDependency({
|
|
267
|
+
context,
|
|
268
|
+
input: payload && typeof payload === "object" && !Array.isArray(payload)
|
|
269
|
+
? payload
|
|
270
|
+
: undefined,
|
|
271
|
+
});
|
|
272
|
+
return {
|
|
273
|
+
success: result.success,
|
|
274
|
+
...(result.details ? { data: result.details } : {}),
|
|
275
|
+
...(result.message ? { message: result.message } : {}),
|
|
276
|
+
};
|
|
348
277
|
},
|
|
349
278
|
},
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
279
|
+
on: {
|
|
280
|
+
allowWhenDisabled: true,
|
|
281
|
+
command: {
|
|
282
|
+
description: "启用 web plugin,并可选设置 provider",
|
|
283
|
+
configure(command) {
|
|
284
|
+
command
|
|
285
|
+
.option("--provider <provider>", "web-access 或 agent-browser")
|
|
286
|
+
.option("--repo <url>", "记录来源仓库地址")
|
|
287
|
+
.option("--version <version>", "记录来源版本")
|
|
288
|
+
.option("--browser-command <command>", "agent-browser 命令名")
|
|
289
|
+
.option("--no-inject-prompt", "关闭 provider 提示词注入");
|
|
290
|
+
},
|
|
291
|
+
mapInput({ opts }) {
|
|
292
|
+
return {
|
|
293
|
+
...(getWebProviderOpt(opts, "provider")
|
|
294
|
+
? { provider: getWebProviderOpt(opts, "provider") }
|
|
295
|
+
: {}),
|
|
296
|
+
...(getStringOpt(opts, "repo")
|
|
297
|
+
? { repositoryUrl: getStringOpt(opts, "repo") }
|
|
298
|
+
: {}),
|
|
299
|
+
...(getStringOpt(opts, "version")
|
|
300
|
+
? { sourceVersion: getStringOpt(opts, "version") }
|
|
301
|
+
: {}),
|
|
302
|
+
...(getStringOpt(opts, "browserCommand")
|
|
303
|
+
? { browserCommand: getStringOpt(opts, "browserCommand") }
|
|
304
|
+
: {}),
|
|
305
|
+
injectPrompt: getBooleanOpt(opts, "injectPrompt", true),
|
|
306
|
+
};
|
|
356
307
|
},
|
|
357
|
-
};
|
|
358
|
-
},
|
|
359
|
-
},
|
|
360
|
-
use: {
|
|
361
|
-
allowWhenDisabled: true,
|
|
362
|
-
command: {
|
|
363
|
-
description: "切换 web plugin 当前 provider",
|
|
364
|
-
configure(command) {
|
|
365
|
-
command
|
|
366
|
-
.argument("<provider>")
|
|
367
|
-
.option("--browser-command <command>", "agent-browser 命令名")
|
|
368
|
-
.option("--no-inject-prompt", "关闭 provider 提示词注入");
|
|
369
308
|
},
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
309
|
+
execute: async ({ context, payload }) => {
|
|
310
|
+
context.platform.setPluginEnabled?.("web", true);
|
|
311
|
+
const providerRaw = String(payload.provider || "").trim();
|
|
312
|
+
const provider = providerRaw === "web-access" || providerRaw === "agent-browser"
|
|
313
|
+
? providerRaw
|
|
314
|
+
: undefined;
|
|
315
|
+
const nextConfig = await writeWebPluginConfig({
|
|
316
|
+
context,
|
|
317
|
+
value: {
|
|
318
|
+
...readWebPluginConfig(context),
|
|
319
|
+
...(provider ? { provider } : {}),
|
|
320
|
+
injectPrompt: typeof payload.injectPrompt === "boolean"
|
|
321
|
+
? Boolean(payload.injectPrompt)
|
|
322
|
+
: true,
|
|
323
|
+
...(typeof payload.repositoryUrl === "string"
|
|
324
|
+
? { repositoryUrl: String(payload.repositoryUrl) }
|
|
325
|
+
: {}),
|
|
326
|
+
...(typeof payload.sourceVersion === "string"
|
|
327
|
+
? { sourceVersion: String(payload.sourceVersion) }
|
|
328
|
+
: {}),
|
|
329
|
+
...(typeof payload.browserCommand === "string"
|
|
330
|
+
? { browserCommand: String(payload.browserCommand) }
|
|
331
|
+
: {}),
|
|
332
|
+
},
|
|
333
|
+
});
|
|
374
334
|
return {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
injectPrompt: getBooleanOpt(opts, "injectPrompt", true),
|
|
335
|
+
success: true,
|
|
336
|
+
data: {
|
|
337
|
+
plugin: toJsonObject(nextConfig),
|
|
338
|
+
},
|
|
380
339
|
};
|
|
381
340
|
},
|
|
382
341
|
},
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
342
|
+
off: {
|
|
343
|
+
command: {
|
|
344
|
+
description: "关闭 web plugin",
|
|
345
|
+
mapInput() {
|
|
346
|
+
return {};
|
|
347
|
+
},
|
|
348
|
+
},
|
|
349
|
+
execute: async ({ context }) => {
|
|
350
|
+
context.platform.setPluginEnabled?.("web", false);
|
|
386
351
|
return {
|
|
387
|
-
success:
|
|
388
|
-
|
|
389
|
-
|
|
352
|
+
success: true,
|
|
353
|
+
data: {
|
|
354
|
+
plugin: toJsonObject(readWebPluginConfig(context)),
|
|
355
|
+
},
|
|
390
356
|
};
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
: {}),
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
use: {
|
|
360
|
+
allowWhenDisabled: true,
|
|
361
|
+
command: {
|
|
362
|
+
description: "切换 web plugin 当前 provider",
|
|
363
|
+
configure(command) {
|
|
364
|
+
command
|
|
365
|
+
.argument("<provider>")
|
|
366
|
+
.option("--browser-command <command>", "agent-browser 命令名")
|
|
367
|
+
.option("--no-inject-prompt", "关闭 provider 提示词注入");
|
|
403
368
|
},
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
369
|
+
mapInput({ args, opts }) {
|
|
370
|
+
const provider = String(args[0] || "").trim();
|
|
371
|
+
if (!provider)
|
|
372
|
+
throw new Error("provider is required");
|
|
373
|
+
return {
|
|
374
|
+
provider,
|
|
375
|
+
...(getStringOpt(opts, "browserCommand")
|
|
376
|
+
? { browserCommand: getStringOpt(opts, "browserCommand") }
|
|
377
|
+
: {}),
|
|
378
|
+
injectPrompt: getBooleanOpt(opts, "injectPrompt", true),
|
|
379
|
+
};
|
|
409
380
|
},
|
|
410
|
-
};
|
|
411
|
-
},
|
|
412
|
-
},
|
|
413
|
-
doctor: {
|
|
414
|
-
allowWhenDisabled: true,
|
|
415
|
-
command: {
|
|
416
|
-
description: "检查当前 provider 是否已就绪",
|
|
417
|
-
mapInput() {
|
|
418
|
-
return {};
|
|
419
381
|
},
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
382
|
+
execute: async ({ context, payload }) => {
|
|
383
|
+
const provider = String(payload.provider || "").trim();
|
|
384
|
+
if (provider !== "web-access" && provider !== "agent-browser") {
|
|
385
|
+
return {
|
|
386
|
+
success: false,
|
|
387
|
+
error: `Unsupported web provider: ${provider}`,
|
|
388
|
+
message: `Unsupported web provider: ${provider}`,
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
const nextConfig = await writeWebPluginConfig({
|
|
392
|
+
context,
|
|
393
|
+
value: {
|
|
394
|
+
...readWebPluginConfig(context),
|
|
395
|
+
provider,
|
|
396
|
+
injectPrompt: typeof payload.injectPrompt === "boolean"
|
|
397
|
+
? Boolean(payload.injectPrompt)
|
|
398
|
+
: true,
|
|
399
|
+
...(typeof payload.browserCommand === "string"
|
|
400
|
+
? { browserCommand: String(payload.browserCommand) }
|
|
401
|
+
: {}),
|
|
402
|
+
},
|
|
403
|
+
});
|
|
404
|
+
return {
|
|
405
|
+
success: true,
|
|
406
|
+
data: {
|
|
407
|
+
plugin: toJsonObject(nextConfig),
|
|
431
408
|
},
|
|
432
|
-
|
|
409
|
+
};
|
|
410
|
+
},
|
|
411
|
+
},
|
|
412
|
+
doctor: {
|
|
413
|
+
allowWhenDisabled: true,
|
|
414
|
+
command: {
|
|
415
|
+
description: "检查当前 provider 是否已就绪",
|
|
416
|
+
mapInput() {
|
|
417
|
+
return {};
|
|
433
418
|
},
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
419
|
+
},
|
|
420
|
+
execute: async ({ context }) => {
|
|
421
|
+
const availability = await plugin.availability(context);
|
|
422
|
+
const dependency = await doctorWebPluginDependency(context);
|
|
423
|
+
return {
|
|
424
|
+
success: true,
|
|
425
|
+
data: {
|
|
426
|
+
availability: {
|
|
427
|
+
enabled: availability.enabled,
|
|
428
|
+
available: availability.available,
|
|
429
|
+
reasons: availability.reasons,
|
|
430
|
+
},
|
|
431
|
+
provider: dependency.details || null,
|
|
432
|
+
},
|
|
433
|
+
message: dependency.available
|
|
434
|
+
? "web provider is available"
|
|
435
|
+
: dependency.reasons.join("; ") || "web provider is not available",
|
|
436
|
+
};
|
|
437
|
+
},
|
|
438
438
|
},
|
|
439
439
|
},
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
}
|
|
458
|
-
}
|
|
440
|
+
system(context) {
|
|
441
|
+
const config = readWebPluginConfig(context);
|
|
442
|
+
if (!isPluginEnabled({ plugin, context }) || !config.injectPrompt) {
|
|
443
|
+
return "";
|
|
444
|
+
}
|
|
445
|
+
const providerPrompt = config.provider === "agent-browser" ? AGENT_BROWSER_PROMPT : WEB_ACCESS_PROMPT;
|
|
446
|
+
return [
|
|
447
|
+
`Current web provider: ${config.provider}`,
|
|
448
|
+
config.provider === "agent-browser"
|
|
449
|
+
? `Use external CLI command: ${config.browserCommand}`
|
|
450
|
+
: "Use the installed external web-access skill/project.",
|
|
451
|
+
"",
|
|
452
|
+
WEB_PLUGIN_PROMPT,
|
|
453
|
+
"",
|
|
454
|
+
providerPrompt,
|
|
455
|
+
].join("\n");
|
|
456
|
+
},
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* WebPlugin:provider 选择器与提示词适配层。
|
|
461
|
+
*/
|
|
462
|
+
export class WebPlugin extends BasePlugin {
|
|
463
|
+
name = "web";
|
|
464
|
+
constructor(agent = null) {
|
|
465
|
+
super(agent);
|
|
466
|
+
Object.assign(this, createWebPluginDefinition(this));
|
|
467
|
+
}
|
|
468
|
+
}
|
|
459
469
|
//# sourceMappingURL=Plugin.js.map
|