Recommendation cards install official connectors
推荐卡片安装官方连接器
The official connectors to Feishu, WeCom, DingTalk, Tencent Meeting, Notion, Tencent Docs, and Linear are separately installed packages. Before installation the Plugins page's own lists show nothing about them, and the recommendation card could offer only the optional bundles the installation ships. When a user's task needed one of these apps, or the user asked whether DSH can reach one, the conversation offered no w
English
Problem
The official connectors to Feishu, WeCom, DingTalk, Tencent Meeting, Notion, Tencent Docs, and Linear are separately installed packages. Before installation the Plugins page's own lists show nothing about them, and the recommendation card could offer only the optional bundles the installation ships. When a user's task needed one of these apps, or the user asked whether DSH can reach one, the conversation offered no way to the connector: the model could not name it, and the card could not install it.
Decision
The official-plugins skill and the enable_official_plugin card kind of plugin recommendations also cover the connectors. dsh-official-bundles lists them as CONNECTOR_BUNDLES, apart from ON_DEMAND_BUNDLES, and the generator of the on-demand catalog also embeds OFFICIAL_CONNECTOR_CATALOG: each connector's title and description in every shipped language from its own locale/*.json, and its icon, kept current by verify-official-bundle-catalog. The plugin manager reads neither, the Host package reads the catalog, and a test fails while a connector package is missing from it; the English title is the app's name, which the skill's catalog entry also uses. The catalog the skill loads appends one English entry per connector with installed and enabled read from the same plugin manager listing and classified as the card classifies the connector, so an installed connector the card cannot enable is left out, and the skill tells the model to offer a connector when the user's own request needs its app and the connector is not enabled, or is enabled but its account is not connected, where the card's Connect account opens the connector's page, ordinary tasks included, but to offer none when one of its tools already belongs to that app, such as its MCP server, and to use that tool instead. The skill's one-line entry in the session's skill catalog, the only text the model sees before loading the skill, depends on the profile: it is composed from the plugin manager's listing and names only the apps whose connector a card could offer now, because the profile does not hold it or holds it usable and switched off. Every lookup, from any working directory, reuses the composed entry until Plugin Manager's plugin-manager/changed event discards it and invalidates the cached catalogs, so the listing is read once per start and per Plugin Manager change.
A click on the card of a connector the profile does not hold installs it in the background through pluginManager.installBundle with <name>@<DSH runtime version>, an exact saved version, and the same package and version as expected; the installation enables it. When pnpm stops the installation on install scripts, the decision records the names awaiting approval; any other failure records none, because the plugin manager lists every undecided script in the profile after any failed run. The card lists the recorded names, and the separate approve verb installs again with approvedBuilds set to exactly those names, never names the browser sends; when the connector is installed by then, approve enables it as enable does. Enable, install and approve on a connector card first switch on the Connectors tab bundle when it is off; a failure there is logged and the action continues. Once the connector is enabled, the card shows Connect account beside its status, unless the user dismissed the card or its last attempt failed; the button opens the connector's page in Plugins through the existing pluginNavigation.openBundle. A connector the profile does not hold has no plugin manager listing or details page, so its card shows the connector catalog's title and description in the interface language as plain text.
The change stays inside the two recommendation packages and dsh-official-bundles with its catalog generator: the plugin manager, the Plugins page, the action card service and frame, the connector packages, and the Connectors tab, which keeps its own connector list, are unchanged.
Alternatives considered
Opening the Plugins page install dialog from the card. The dialog already shows progress, handles blocked install scripts, and offers Enable now. Reaching it needs a new cross-plugin entry into the Plugins page, because pluginNavigation opens only a bundle's page or the list, and it moves the user away from the conversation that needed the app before anything is installed.
Registering the connectors in the on-demand official catalog. The plugin manager already lists, installs, and enables the entries of ON_DEMAND_BUNDLES. Uninstalled connectors would then appear in the Plugins page's own lists, which the Connectors tab note avoids by keeping them out of ON_DEMAND_BUNDLES; the separate CONNECTOR_BUNDLES gets the same generated metadata without entering those lists.
Recommending only the Connectors tab bundle. The bundle is already a shipped optional plugin in the catalog, but its description names no app, so the model cannot match a task to a connector, and the user still installs the connector by hand from the tab.
A separate skill for connectors. A second skill adds a second line to every conversation's skill catalog, and two skills would compete for the one card a Turn shows.
A fixed entry naming all seven apps. The entry would not depend on the profile, but a user whose connector is already enabled would load the skill on every task that names that app, only to learn that nothing is to be offered.
Consequences
The user installs and enables a connector without leaving the conversation, and the model can offer one during an ordinary task. Installing works whenever the connector package is published to npm at the running DSH version, so a build whose version is not published cannot install a connector from the card. The connector catalog carries each connector's own text in every shipped language, so the card of an uninstalled connector shows it in the interface language. The catalog is compiled into the installation, so a new connector reaches the card only in a new DSH release, and adding one updates both CONNECTOR_BUNDLES and the Connectors tab's own list. The account is connected on the connector's page in Plugins, which the card opens without tracking the connection. Allowing install scripts runs third-party code with the user's permissions, so the card lists the packages, the approval is a separate click, and the Host allows only the names the failed installation recorded. The skill catalog entry and the loaded catalog grow by the amounts the package README's Model Experience section states. When a connector is enabled, the model receives one replacement skill catalog whose entry no longer names that app, and later tasks that need the app no longer load the skill; a profile change made outside Plugin Manager reaches the entry only at the next Plugin Manager change or restart.
中文
问题
飞书、企业微信、钉钉、腾讯会议、Notion、腾讯文档和 Linear 的官方连接器都是单独安装的包。安装前,插件页自己的列表里看不到它们,推荐卡片也只能推荐随安装提供的可选 bundle。用户的任务要用到这些应用,或者用户问 DSH 能不能连上其中某个应用时,对话里没有通往连接器的路径:模型叫不出连接器的名字,卡片也装不了它。
决策
插件推荐的 official-plugins skill 和 enable_official_plugin 卡片种类同时覆盖连接器。dsh-official-bundles 把它们列为 CONNECTOR_BUNDLES,与 ON_DEMAND_BUNDLES 分开;生成按需目录的脚本同时内嵌 OFFICIAL_CONNECTOR_CATALOG:每个连接器自己的 locale/*.json 里所有随附语言的标题和描述,以及它的图标,由 verify-official-bundle-catalog 保持最新。插件管理器不读取这两者,Host 包读取这个目录,连接器包不在目录里时有测试会失败;英文标题就是应用名,skill 的目录条目也用它。skill 加载的目录为每个连接器追加一项英文条目,带上从同一次插件管理器列表读到的 installed 和 enabled,分类方式和卡片相同,所以卡片无法启用的已安装连接器不会列出;skill 要求模型在用户自己的请求要用到某个应用、而它的连接器没有启用,或者已经启用但账号没有连接时推荐这个连接器(后一种情况下卡片上的「连接账号」会打开连接器的详情页),普通任务也一样,但如果模型已有某个工具属于这个应用,例如它的 MCP 服务器,就不推荐,而是直接用那个工具。这个 skill 在会话 skill 目录里的一行条目,是模型加载它之前唯一能看到的文字,它取决于 profile:条目根据插件管理器的列表组成,只列出卡片此刻能推荐其连接器的应用,即 profile 未持有该连接器,或者已安装、可用但没有开启。不论在哪个工作目录查询,都沿用组成好的条目,直到 Plugin Manager 的 plugin-manager/changed 事件把它丢弃并让缓存的目录失效,所以每次启动和每次 Plugin Manager 变更后只读取一次列表。
用户点击 profile 未持有的连接器的卡片后,Host 在后台通过 pluginManager.installBundle 安装:安装目标是 <name>@<DSH 运行版本>,保存确切版本,并把同样的包名和版本作为 expected;安装完成即启用。pnpm 因安装脚本停止安装时,决定里记下待允许的包名;其他失败不记录,因为任何一次运行失败后,插件管理器都会列出 profile 里所有尚未决定的脚本。卡片列出记录下来的名字;单独的 approve 动作会重新安装,approvedBuilds 恰好是这些名字,不采用浏览器发来的名字;如果这时连接器已经装好,approve 像 enable 一样启用它。连接器卡片上的启用、安装和允许脚本都会先开启「连接器」标签页的 bundle(如果它还关着);这一步失败只记日志,动作照常继续。连接器启用后,卡片在状态旁边提供「连接账号」(用户已选择「暂不需要」或最近一次尝试失败的卡片除外),这个按钮通过现有的 pluginNavigation.openBundle 打开插件页里这个连接器的详情页。profile 未持有的连接器不在插件管理器的列表里,也没有详情页,所以它的卡片以普通文字显示连接器目录里界面语言的标题和描述。
改动只在两个推荐包以及 dsh-official-bundles 和它的目录生成脚本里:插件管理器、插件页、操作卡片服务和卡片框架、连接器包以及「连接器」标签页(它保留自己的连接器名单)都不变。
考虑过的替代方案
从卡片打开插件页的安装对话框。 对话框已经能显示进度、处理被拦下的安装脚本,也提供「立即启用」。但要打开它,需要新增一个从别的插件进入插件页的入口,因为 pluginNavigation 只能打开 bundle 的详情页或列表;而且在什么都还没安装之前,就把用户从需要这个应用的对话带到了另一个页面。
把连接器登记进官方按需目录。 插件管理器已经能列出、安装并启用 ON_DEMAND_BUNDLES 里的条目。但这样未安装的连接器会出现在插件页自己的列表里;“连接器”标签页的 Agent Note 正是为了避免这一点,没有把它们加入 ON_DEMAND_BUNDLES;单独的 CONNECTOR_BUNDLES 得到同样生成的元数据,又不会进入这些列表。
只推荐「连接器」标签页的 bundle。 这个 bundle 已经是目录里随安装提供的可选插件,但它的描述里没有任何应用的名字,模型无法把任务和连接器对上,用户还得自己到标签页里安装连接器。
为连接器单独建一个 skill。 第二个 skill 会让每次对话的 skill 目录多一行,两个 skill 还会争抢一轮里唯一的一张卡片。
固定列出全部 7 个应用的条目。 这样条目不随 profile 变化,但连接器已经启用的用户,每次任务提到这个应用都会加载这个 skill,结果只是得知没有什么可以推荐。
后果
用户不离开对话就能安装并启用连接器,模型在普通任务中也能推荐连接器。只要连接器包已按当前运行的 DSH 版本发布到 npm,就能从卡片安装;运行版本没有发布的构建无法从卡片安装连接器。连接器目录带有每个连接器自己在所有随附语言中的文字,所以未安装的连接器的卡片也以界面语言显示。目录编译进安装,所以新增的连接器要等新的 DSH 版本发布后才会出现在卡片上;新增连接器时,CONNECTOR_BUNDLES 和「连接器」标签页自己的名单都要更新。账号在插件页里连接器的详情页连接,卡片只负责打开这个页面,不跟踪连接状态。允许安装脚本意味着第三方代码会以用户的权限运行,所以卡片会列出这些包,允许需要单独点击,Host 也只允许失败的安装记录下来的名字。skill 目录条目和加载后的目录都会变长,具体数字见包 README 的模型体验一节。启用一个连接器之后,模型会收到一条替换 skill 目录,其中的条目不再列出这个应用,之后要用到这个应用的任务不再加载这个 skill;不经过 Plugin Manager 的 profile 修改,要等下一次 Plugin Manager 变更或重启之后才会反映到条目里。