Skip to content

feat: add MCP client sub-capability bridges#6136

Open
Last-emo-boy wants to merge 16 commits intoAstrBotDevs:devfrom
Last-emo-boy:master
Open

feat: add MCP client sub-capability bridges#6136
Last-emo-boy wants to merge 16 commits intoAstrBotDevs:devfrom
Last-emo-boy:master

Conversation

@Last-emo-boy
Copy link
Copy Markdown

• 补齐 AstrBot 对 MCP client 子能力的接线,并把这些能力接入现有 bot / dashboard 交互链路,使 MCP server 除普通 tools 外还能通过 AstrBot 使用 sampling、resources、roots、elicitation 和 prompts,且尽量不影响现有工具调用与会话流程。

Modifications / 改动点

  • 新增 MCP client 子能力桥接层,补齐并接入以下能力:

    • sampling
    • resources
    • roots
    • elicitation
    • prompts
  • 将 MCP server 的 resources / prompts 暴露为 AstrBot 可调用的 bridge tools,复用现有 FunctionTool 和 agent tool loop。

  • 为 MCP server 增加按服务粒度的 client_capabilities 配置,并在 ClientSession.initialize 时按配置声明能力。

  • 优化 stdio MCP server 接入,忽略空行和明显非 JSON-RPC 的启动输出,避免因 npm run 横幅导致解析报错。

  • 优化 WebChat 下的 elicitation 交互:

    • 枚举项显示为按钮
    • 支持额外自定义输入
    • 支持 cancel
    • 前端直接回复 pending elicitation,不再额外发起新的 chat run
  • 优化 bot 场景下的 elicitation 解析:

    • 支持自然语言 key-value 回复
    • 规则解析失败时可回退到 LLM 生成 JSON,再做 schema 校验
  • 补充 MCP bridge、dashboard、stdio 容错、chat 交互等测试,并更新中英文文档与 changelog。

  • This is NOT a breaking change. / 这不是一个破坏性变更。

Screenshots or Test Results / 运行截图或测试结果

本地已执行并通过:

  • uv sync
  • uv run ruff format --check .
  • uv run ruff check .
  • uv run pytest tests/unit/test_mcp_subcapability_bridge.py tests/unit/test_mcp_resource_bridge.py tests/unit/test_mcp_prompt_bridge.py tests/unit/test_mcp_stdio_client.py tests/test_dashboard.py tests/unit/test_astr_agent_tool_exec.py tests/test_tool_loop_agent_runner.py tests/unit/test_astr_main_agent.py -q
    • 结果:153 passed
  • cd dashboard && pnpm install && pnpm i --save-dev @types/markdown-it && pnpm run build
    • 结果:通过
  • 本地 smoke test:
    • 启动 uv run main.py
    • 检查 http://localhost:6185
    • 结果:通过
  • cd docs && npm install && npm run docs:build
    • 结果:通过

Checklist / 检查清单

  • 😊 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。/ If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
  • 👀 我的更改经过了良好的测试,并已在上方提供了“验证步骤”和“运行截图”。/ My changes have been well-tested, and "Verification Steps" and "Screenshots" have been provided above.
  • 🤓 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到了 requirements.txtpyproject.toml 文件相应位置。/ I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations in requirements.txt and pyproject.toml.
  • 😮 我的更改没有引入恶意代码。/ My changes do not introduce malicious code.

补齐 AstrBot 对 MCP client 子能力的接线,并把能力接入现有 bot / dashboard 交互链路,在尽量不影响现有工具流的前提下支持更完整的 MCP 使用场景。
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @Last-emo-boy, your pull request is larger than the review limit of 150000 diff characters

@Last-emo-boy Last-emo-boy marked this pull request as ready for review March 12, 2026 15:09
@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Mar 12, 2026
@Last-emo-boy Last-emo-boy marked this pull request as draft March 12, 2026 15:09
@dosubot dosubot bot added area:core The bug / feature is about astrbot's core, backend area:platform The bug / feature is about IM platform adapter, such as QQ, Lark, Telegram, WebChat and so on. area:webui The bug / feature is about webui(dashboard) of astrbot. labels Mar 12, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

Gemini is experiencing higher than usual traffic and was unable to create the summary. Please try again in a few hours by commenting /gemini summary.

@Last-emo-boy Last-emo-boy marked this pull request as ready for review March 12, 2026 15:12
@dosubot
Copy link
Copy Markdown

dosubot bot commented Mar 12, 2026

Related Documentation

1 document(s) may need updating based on files changed in this PR:

AstrBotTeam's Space

pr4697的改动

[Accept] [Decline]

Note: You must be authenticated to accept/decline updates.

How did I do? Any feedback?  Join Discord

@dosubot dosubot bot added area:provider The bug / feature is about AI Provider, Models, LLM Agent, LLM Agent Runner. feature:chatui The bug / feature is about astrbot's chatui, webchat labels Mar 12, 2026
@Last-emo-boy
Copy link
Copy Markdown
Author

/gemini summary

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

This pull request significantly expands AstrBot's integration with Model Context Protocol (MCP) servers by introducing a robust bridging layer for several client-side sub-capabilities. It enables MCP servers to utilize AstrBot's conversational and agentic features for advanced interactions such as AI model sampling, user elicitation for missing information, and dynamic management of resources and prompts. This enhancement allows for more interactive and capable MCP-powered tools within the AstrBot ecosystem, improving both developer flexibility and user experience.

Highlights

  • MCP Client Sub-Capabilities Integration: Introduced support for 'sampling', 'resources', 'roots', 'elicitation', and 'prompts' within the MCP client, allowing MCP servers to leverage these functionalities through AstrBot.
  • Resource and Prompt Bridging: Exposed MCP server 'resources' and 'prompts' as callable bridge tools within AstrBot's FunctionTool system, enabling agents to interact with them.
  • Granular Capability Configuration: Added 'client_capabilities' configuration per MCP server, allowing fine-grained control over which sub-capabilities are enabled (e.g., 'elicitation', 'sampling', 'roots').
  • Improved stdio Server Handling: Enhanced the stdio MCP client to tolerate non-JSON-RPC output (like 'npm run' banners) and empty lines, preventing parsing errors during server startup.
  • Enhanced Elicitation Interaction: Optimized the user experience for elicitation requests in WebChat with interactive buttons for enumerated options, support for custom input, and a cancel option. For bot scenarios, natural language key-value replies are supported, with an LLM fallback for schema validation.
  • Comprehensive Testing and Documentation: Added new unit tests for the MCP sub-capability bridge, resource bridge, prompt bridge, and tolerant stdio client, alongside updates to the dashboard tests and both English and Chinese documentation.
Changelog
  • astrbot/core/agent/mcp_client.py
    • Updated type hints, integrated new MCP bridge modules, enhanced configuration parsing to include client capabilities, added new attributes for managing prompts and resources, implemented methods for loading resource and prompt capabilities, and refined reconnection and cleanup logic to manage sub-capability states.
  • astrbot/core/agent/mcp_elicitation_registry.py
    • Added a new module to manage pending MCP elicitation requests, including data structures for replies and a context manager for handling elicitation lifecycles.
  • astrbot/core/agent/mcp_prompt_bridge.py
    • Introduced a new module to define and build MCP prompt-related tools, allowing AstrBot agents to list and retrieve prompts from MCP servers.
  • astrbot/core/agent/mcp_resource_bridge.py
    • Added a new module to define and build MCP resource-related tools, enabling AstrBot agents to list, read, and discover resource templates from MCP servers.
  • astrbot/core/agent/mcp_stdio_client.py
    • Implemented a new tolerant stdio client for MCP, designed to filter out non-JSON-RPC output from server processes, improving robustness.
  • astrbot/core/agent/mcp_subcapability_bridge.py
    • Created a new core module to bridge MCP client sub-capability requests (sampling, elicitation, roots) into AstrBot's runtime, including configuration normalization and interactive handling.
  • astrbot/core/pipeline/process_stage/method/agent_sub_stages/internal.py
    • Modified to incorporate the capture of pending MCP elicitation replies, ensuring that user responses to elicitation requests are processed correctly within the agent's workflow.
  • astrbot/core/platform/sources/webchat/webchat_event.py
    • Updated to support the 'elicitation' message type, allowing structured JSON payloads for interactive elicitation forms in the WebChat interface.
  • astrbot/core/provider/func_tool_manager.py
    • Refactored MCP configuration loading and saving to use Path objects and normalization, and extended tool registration to include newly introduced MCP resource and prompt bridge tools.
  • astrbot/dashboard/routes/chat.py
    • Added a new API endpoint '/api/chat/respond_elicitation' to handle user replies to MCP elicitation requests from the dashboard, and updated message streaming to support elicitation message types.
  • astrbot/dashboard/routes/live_chat.py
    • Modified the live chat message handling to correctly process and display 'elicitation' type messages.
  • astrbot/dashboard/routes/open_api.py
    • Updated the OpenAPI WebSocket message handling to support the new 'elicitation' message type.
  • astrbot/dashboard/routes/tools.py
    • Enhanced the MCP server information API to include the names of resource and prompt bridge tools, and updated the tool listing to correctly identify MCP-bound tools.
  • dashboard/src/components/chat/Chat.vue
    • Updated to pass elicitation submission functionality to the MessageList component, enabling interactive elicitation in the chat UI.
  • dashboard/src/components/chat/MessageList.vue
    • Enhanced to render interactive elicitation cards and manage their submission state, including a new prop for handling elicitation replies.
  • dashboard/src/components/chat/StandaloneChat.vue
    • Modified to integrate elicitation submission functionality, similar to Chat.vue, for standalone chat instances.
  • dashboard/src/components/chat/message_list_comps/ElicitationCard.vue
    • Added a new Vue component to render interactive elicitation forms, supporting URL-based and form-based elicitation with buttons, text fields, and boolean switches.
  • dashboard/src/components/chat/message_list_comps/MessagePartsRenderer.vue
    • Updated to include the ElicitationCard for rendering elicitation message parts within the chat display.
  • dashboard/src/composables/useMessages.ts
    • Extended with new TypeScript interfaces for ElicitationField and ElicitationPayload, added logic to normalize and handle elicitation message types, and implemented submitElicitationResponse for API interaction.
  • dashboard/src/i18n/locales/en-US/features/chat.json
    • Added new English localization strings for the elicitation feature.
  • dashboard/src/i18n/locales/zh-CN/features/chat.json
    • Added new Chinese localization strings for the elicitation feature.
  • docs/en/use/mcp.md
    • Expanded the English documentation to detail the new MCP client sub-capabilities (sampling, elicitation, roots), stdio server notes, and the resource and prompt bridging features.
  • docs/zh/use/mcp.md
    • Expanded the Chinese documentation to detail the new MCP client sub-capabilities (sampling, elicitation, roots), stdio server notes, and the resource and prompt bridging features.
  • tests/test_dashboard.py
    • Added new asynchronous tests to verify the dashboard API's handling of MCP client capabilities, resource and prompt bridge tools, and the 'respond_elicitation' endpoint.
  • tests/unit/test_mcp_prompt_bridge.py
    • Introduced new unit tests to validate the functionality of the MCP prompt bridge, including tool registration, listing, and retrieval with arguments.
  • tests/unit/test_mcp_resource_bridge.py
    • Added new unit tests to verify the MCP resource bridge's functionality, covering resource listing, template listing, and reading resources.
  • tests/unit/test_mcp_stdio_client.py
    • Created new unit tests to ensure the tolerant stdio client correctly filters non-protocol output and integrates with the MCP client.
  • tests/unit/test_mcp_subcapability_bridge.py
    • Implemented new unit tests to thoroughly test the MCP sub-capability bridge, including configuration, roots handling, sampling, and elicitation logic.
Activity
  • Gemini bot initially failed to generate a summary due to high traffic.
  • Dosu bot provided a comprehensive summary of the pull request, detailing modifications, new features, and integrations.
  • The author, Last-emo-boy, requested a Gemini summary again.

@LIghtJUNction
Copy link
Copy Markdown
Member

提交到dev分支,将更快更容易被合并!

@Last-emo-boy Last-emo-boy changed the base branch from master to dev March 15, 2026 16:54
@Last-emo-boy
Copy link
Copy Markdown
Author

/gemini summary

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

This pull request significantly expands AstrBot's integration with Model Context Protocol (MCP) servers by introducing a robust bridging layer for several client-side sub-capabilities. This enhancement allows MCP servers to utilize AstrBot's conversational and agentic features for advanced interactions, improving both developer flexibility and user experience within the AstrBot ecosystem.

Highlights

  • MCP Client Sub-Capabilities Integration: Introduced support for 'sampling', 'resources', 'roots', 'elicitation', and 'prompts' within the MCP client, allowing MCP servers to leverage these functionalities through AstrBot.
  • Resource and Prompt Bridging: Exposed MCP server 'resources' and 'prompts' as callable bridge tools within AstrBot's FunctionTool system, enabling agents to interact with them.
  • Granular Capability Configuration: Added 'client_capabilities' configuration per MCP server, allowing fine-grained control over which sub-capabilities are enabled (e.g., 'elicitation', 'sampling', 'roots').
  • Improved stdio Server Handling: Enhanced the stdio MCP client to tolerate non-JSON-RPC output (like 'npm run' banners) and empty lines, preventing parsing errors during server startup.
  • Enhanced Elicitation Interaction: Optimized the user experience for elicitation requests in WebChat with interactive buttons for enumerated options, support for custom input, and a cancel option. For bot scenarios, natural language key-value replies are supported, with an LLM fallback for schema validation.
  • Comprehensive Testing and Documentation: Added new unit tests for the MCP sub-capability bridge, resource bridge, prompt bridge, and tolerant stdio client, alongside updates to the dashboard tests and both English and Chinese documentation.
Changelog
  • astrbot/core/agent/mcp_client.py
    • Updated type hints, integrated new MCP bridge modules, enhanced configuration parsing to include client capabilities, added new attributes for managing prompts and resources, implemented methods for loading resource and prompt capabilities, and refined reconnection and cleanup logic to manage sub-capability states.
  • astrbot/core/agent/mcp_elicitation_registry.py
    • Added a new module to manage pending MCP elicitation requests, including data structures for replies and a context manager for handling elicitation lifecycles.
  • astrbot/core/agent/mcp_prompt_bridge.py
    • Introduced a new module to define and build MCP prompt-related tools, allowing AstrBot agents to list and retrieve prompts from MCP servers.
  • astrbot/core/agent/mcp_resource_bridge.py
    • Added a new module to define and build MCP resource-related tools, enabling AstrBot agents to list, read, and discover resource templates from MCP servers.
  • astrbot/core/agent/mcp_stdio_client.py
    • Implemented a new tolerant stdio client for MCP, designed to filter out non-JSON-RPC output from server processes, improving robustness.
  • astrbot/core/agent/mcp_subcapability_bridge.py
    • Created a new core module to bridge MCP client sub-capability requests (sampling, elicitation, roots) into AstrBot's runtime, including configuration normalization and interactive handling.
  • astrbot/core/pipeline/process_stage/method/agent_sub_stages/internal.py
    • Modified to incorporate the capture of pending MCP elicitation replies, ensuring that user responses to elicitation requests are processed correctly within the agent's workflow.
  • astrbot/core/platform/sources/webchat/webchat_event.py
    • Updated to support the 'elicitation' message type, allowing structured JSON payloads for interactive elicitation forms in the WebChat interface.
  • astrbot/core/provider/func_tool_manager.py
    • Refactored MCP configuration loading and saving to use Path objects and normalization, and extended tool registration to include newly introduced MCP resource and prompt bridge tools.
  • astrbot/dashboard/routes/chat.py
    • Added a new API endpoint '/api/chat/respond_elicitation' to handle user replies to MCP elicitation requests from the dashboard, and updated message streaming to support elicitation message types.
  • astrbot/dashboard/routes/live_chat.py
    • Modified the live chat message handling to correctly process and display 'elicitation' type messages.
  • astrbot/dashboard/routes/open_api.py
    • Updated the OpenAPI WebSocket message handling to support the new 'elicitation' message type.
  • astrbot/dashboard/routes/tools.py
    • Enhanced the MCP server information API to include the names of resource and prompt bridge tools, and updated the tool listing to correctly identify MCP-bound tools.
  • dashboard/src/components/chat/Chat.vue
    • Updated to pass elicitation submission functionality to the MessageList component, enabling interactive elicitation in the chat UI.
  • dashboard/src/components/chat/MessageList.vue
    • Enhanced to render interactive elicitation cards and manage their submission state, including a new prop for handling elicitation replies.
  • dashboard/src/components/chat/StandaloneChat.vue
    • Modified to integrate elicitation submission functionality, similar to Chat.vue, for standalone chat instances.
  • dashboard/src/components/chat/message_list_comps/ElicitationCard.vue
    • Added a new Vue component to render interactive elicitation forms, supporting URL-based and form-based elicitation with buttons, text fields, and boolean switches.
  • dashboard/src/components/chat/message_list_comps/MessagePartsRenderer.vue
    • Updated to include the ElicitationCard for rendering elicitation message parts within the chat display.
  • dashboard/src/composables/useMessages.ts
    • Extended with new TypeScript interfaces for ElicitationField and ElicitationPayload, added logic to normalize and handle elicitation message types, and implemented submitElicitationResponse for API interaction.
  • dashboard/src/i18n/locales/en-US/features/chat.json
    • Added new English localization strings for the elicitation feature.
  • dashboard/src/i18n/locales/zh-CN/features/chat.json
    • Added new Chinese localization strings for the elicitation feature.
  • docs/en/use/mcp.md
    • Expanded the English documentation to detail the new MCP client sub-capabilities (sampling, elicitation, roots), stdio server notes, and the resource and prompt bridging features.
  • docs/zh/use/mcp.md
    • Expanded the Chinese documentation to detail the new MCP client sub-capabilities (sampling, elicitation, roots), stdio server notes, and the resource and prompt bridging features.
  • tests/test_dashboard.py
    • Added new asynchronous tests to verify the dashboard API's handling of MCP client capabilities, resource and prompt bridge tools, and the 'respond_elicitation' endpoint.
  • tests/unit/test_mcp_prompt_bridge.py
    • Introduced new unit tests to validate the functionality of the MCP prompt bridge, including tool registration, listing, and retrieval with arguments.
  • tests/unit/test_mcp_resource_bridge.py
    • Added new unit tests to verify the MCP resource bridge's functionality, covering resource listing, template listing, and reading resources.
  • tests/unit/test_mcp_stdio_client.py
    • Created new unit tests to ensure the tolerant stdio client correctly filters non-protocol output and integrates with the MCP client.
  • tests/unit/test_mcp_subcapability_bridge.py
    • Implemented new unit tests to thoroughly test the MCP sub-capability bridge, including configuration, roots handling, sampling, and elicitation logic.
Activity
  • Gemini bot initially failed to generate a summary due to high traffic.
  • Dosu bot provided a comprehensive summary of the pull request, detailing modifications, new features, and integrations.
  • The author, Last-emo-boy, requested a Gemini summary again.
  • LIghtJUNction suggested submitting to the dev branch for faster merging.
  • The author, Last-emo-boy, requested a Gemini summary a third time.

@Last-emo-boy
Copy link
Copy Markdown
Author

@LIghtJUNction 已提交至dev,并且缓解conflict

@LIghtJUNction
Copy link
Copy Markdown
Member

PR太大了,需要时间检查

@LIghtJUNction
Copy link
Copy Markdown
Member

尽量少用Any类型

… Fixes type annotation issues (excessive use of Any) and three pre-existing failing tests in test_mcp_subcapability_bridge.py.

 ## Type Annotation Fixes

 - Replace Any with precise types in mcp_subcapability_bridge.py
   - Change `_request_context: Any` → `_request_context: None` (unused params)
   - Change `event: Any` → `event: TContext` (elicitation methods)
   - Change `plugin_context: Any` → `plugin_context: ContextWrapper[TContext]`
   - Change `raw_value: Any` → `raw_value: str | int | float | bool | list | None`

 - Add SupportsEvent Protocol for type-safe event constraints
 - Add JsonValue type alias for JSON schema values
 - Fix MCPClient to use Generic[TContext] properly
 - Fix subcapability_bridge instantiation: `MCPClientSubCapabilityBridge[TContext]()`

## Unit Test Fixes

 - Fix roots allowlist logic to support user-configured absolute paths
   - Add _user_configured_root_paths set to track explicit user paths
   - Update _resolve_root_path_entry() to record absolute paths
   - Update _is_root_path_in_allowlist() to check temporary allowlist

 - Fix interactive_call lock logic for proper serialization
   - Auto-extract umo from run_context.event.unified_msg_origin when not provided
   - Ensures per-umo locking works correctly for concurrent requests

 - Fix elicitation exception handling to prevent test timeouts
   - Extend except clause to catch ElicitationValidationError and ElicitationParseError
   - These exceptions were not being caught, causing tests to hang
Last-emo-boy and others added 9 commits March 30, 2026 23:33
Change AstrBotDashboard.run from a regular method to an async coroutine (def -> async def) so the dashboard can perform asynchronous startup and integrate with an asyncio event loop. Callers will need to await or schedule this method; no other logic changes were made in this diff.
* perf: enhance layout responsiveness and text handling in stats page

* perf: enhance subagent, future task UI

- Updated the overall structure of the SubAgentPage component for better readability and maintainability.
- Introduced a new dashboard layout with improved header and action buttons.
- Replaced the old settings card with a more visually appealing setting card design.
- Enhanced the agent list section with a more user-friendly display and added empty state handling.
- Implemented unsaved changes notification and confirmation dialogs for better user interaction.
- Refactored code for better clarity and organization, including the use of computed properties for state management.
…pability

# Conflicts:
#	dashboard/src/views/ConversationPage.vue
#	dashboard/src/views/CronJobPage.vue
#	dashboard/src/views/SubAgentPage.vue
…ility

# Conflicts:
#	astrbot/core/agent/mcp_client.py
#	astrbot/core/agent/runners/tool_loop_agent_runner.py
#	astrbot/core/config/default.py
#	astrbot/core/pipeline/process_stage/method/agent_sub_stages/internal.py
#	astrbot/core/platform/sources/lark/lark_event.py
#	astrbot/core/provider/func_tool_manager.py
#	astrbot/core/provider/provider.py
#	astrbot/core/provider/sources/gemini_source.py
#	astrbot/core/provider/sources/gsvi_tts_source.py
#	astrbot/core/provider/sources/openai_source.py
#	astrbot/dashboard/server.py
#	dashboard/src/assets/mdi-subset/materialdesignicons-subset.css
#	dashboard/src/components/chat/Chat.vue
#	dashboard/src/components/chat/message_list_comps/MessagePartsRenderer.vue
#	dashboard/src/components/platform/AddNewPlatform.vue
#	dashboard/src/components/shared/AstrBotConfigV4.vue
#	dashboard/src/components/shared/ConfigItemRenderer.vue
#	dashboard/src/components/shared/ObjectEditor.vue
#	dashboard/src/composables/useMessages.ts
#	dashboard/src/i18n/locales/ru-RU/features/cron.json
#	dashboard/src/i18n/locales/ru-RU/features/subagent.json
#	dashboard/src/layouts/full/FullLayout.vue
#	dashboard/src/layouts/full/vertical-header/VerticalHeader.vue
#	dashboard/src/stores/auth.ts
#	dashboard/src/stores/customizer.ts
#	dashboard/src/views/ConfigPage.vue
#	dashboard/src/views/ConversationPage.vue
#	dashboard/src/views/CronJobPage.vue
#	dashboard/src/views/ExtensionPage.vue
#	dashboard/src/views/SessionManagementPage.vue
#	dashboard/src/views/Settings.vue
#	dashboard/src/views/SubAgentPage.vue
#	dashboard/src/views/authentication/auth/LoginPage.vue
#	dashboard/src/views/dashboards/default/DefaultDashboard.vue
#	dashboard/src/views/dashboards/default/components/MemoryUsage.vue
#	dashboard/src/views/dashboards/default/components/MessageStat.vue
#	dashboard/src/views/dashboards/default/components/OnlinePlatform.vue
#	dashboard/src/views/dashboards/default/components/OnlineTime.vue
#	dashboard/src/views/dashboards/default/components/PlatformStat.vue
#	dashboard/src/views/dashboards/default/components/RunningTime.vue
#	dashboard/src/views/dashboards/default/components/TotalMessage.vue
#	pyproject.toml
#	requirements.txt
#	tests/test_dashboard.py
Add schema constraint metadata (format, minimum, maximum, enumNames, default) to elicitation forms and include them in the human-readable field list. Validate numeric min/max on submitted values in the backend. Update the Vue elicitation card to display constraint hints, prefill defaults on mount, use enumNames for option labels, and add minor CSS. Also update the ElicitationField TypeScript interface to include the new properties. Files changed: mcp_subcapability_bridge.py, ElicitationCard.vue, useMessages.ts.
@Last-emo-boy Last-emo-boy marked this pull request as ready for review March 30, 2026 17:32
@auto-assign auto-assign bot requested review from Fridemn and Soulter March 30, 2026 17:32
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @Last-emo-boy, your pull request is larger than the review limit of 150000 diff characters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:core The bug / feature is about astrbot's core, backend area:platform The bug / feature is about IM platform adapter, such as QQ, Lark, Telegram, WebChat and so on. area:provider The bug / feature is about AI Provider, Models, LLM Agent, LLM Agent Runner. area:webui The bug / feature is about webui(dashboard) of astrbot. feature:chatui The bug / feature is about astrbot's chatui, webchat size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants