Skip to content

专家的 futureRequirements 声明无法生效,且 required: true 会把专家判成 unsupported-capability #56

Open

Description

@nothingp

Existing reports / 提交前查重

  • I searched existing issues and did not find the same problem / 我已搜索现有 Issue,没有发现相同问题

Affected area / 涉及区域

Plugins or skills / 插件或技能

Operating system / 操作系统

Linux

Installation method / 安装方式

Built from source / 源码运行

WorkDSH version / WorkDSH 版本

0.1.0-alpha.14

DSH runtime version / DSH 运行时版本

0.2.0-rc.2

Usage mode / 使用方式

Personal Web / 个人 Web

Third-party plugins / 第三方插件

无

Fresh Profile comparison / 全新 Profile 对照结果

Not tested / 未测试

What happened? / 实际发生了什么?

专家定义可以声明对外部能力的需求(futureRequirements,kind 支持 'connector'——ExpertDetailModal.tsx:159 专门把它翻成「连接器」)。但这条声明目前既无法生效,写强了还会反过来让专家不可用:

1) required: true 会让专家被判定为不支持的能力,直接跳过

// packages/plugins/experts/src/services/experts-manager.ts:568
if (revision.definition.futureRequirements.some((requirement) => requirement.required)) {
  map.set(revision.revisionId, 'unsupported-capability');
  continue;
}

只要声明里有一条 required: true,该 revision 就被标成 unsupported-capability 并跳过健康检查。也就是说:想让专家带上它需要的连接器,结果专家自己先不可用了。

2) 连接器声明没有任何地方接成会话选用

连接器是按会话选用的(workdsh_connector_selections,connectorIds),而 futureRequirements 在 packages/plugins/connectors/ 与壳层里的引用数是 0。于是:

  • 声明 required: false 只会在专家详情里显示一行「连接器 · xxx · 可选 · 暂不支持接入」(ExpertUsagePreview.tsx:24,文案本身就写明了不生效);
  • 新会话的 connectorIds 恒为 [],任何专家都不会把它的连接器带上;
  • 实际使用中只能每个会话手工勾选一次连接器,否则该会话里工具根本不会交给模型(现象:助手说调不了工具,而服务端一条 MCP 请求都没有,容易误判成连接器坏了)。

Expected behavior / 期望行为

专家的能力声明应当真的接上:

  • 专家声明为必需的连接器,在执行准备(prepare-execution)阶段并入该会话的选用;未选用时给出显式提示(而不是静默地少一组工具);
  • 至少让 required: true 不再把专家判成 unsupported-capability——「声明了但平台还没实现」应当是提示,不应是惩罚;
  • 会话首次使用带连接器需求的专家时,期望有明确入口或提示,而不是要求用户自己知道"每会话要勾一次连接器"。

Steps to reproduce / 复现步骤

  1. 取一个专家定义,在 futureRequirements 里加 { kind: 'connector', key: '<任一已就绪连接器 id>', required: true, description: '…' },发布;
  2. 观察该专家被标为 unsupported-capability(列表里 availability/readiness 反映出来);
  3. 改成 required: false 再发布 → 专家可用,但详情里只显示「暂不支持接入」,连接器不会随专家选用;
  4. 新建一个会话,不发任何勾选,直接让助手调用该连接器的工具 → 服务端无任何 MCP 请求。

Logs / 日志

无(该问题不产生运行期报错,表现为专家被标记为 unsupported-capability 与会话选用为空)。

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions