DeepSeek Harness 插件

dsh-authorize-app

DeepSeek Harness plugin: adds a 'Connected Apps' settings section — a central platform where other DSH plugins can surface themselves.(英文原文)

跳到安装方式

来源信息

GitHub 仓库
extension-hunter/dsh-authorize-app
最近更新
2026年8月15日
分类
工具与能力
GitHub stars
0
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/extension-hunter/dsh-authorize-app
插件名:dsh-authorize-app
作者:extension-hunter

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

dsh-authorize-app

> A DeepSeek Harness (DSH) plugin that adds a "Connected Apps / 连接应用" settings section — a central platform where other DSH plugins can surface themselves. > 一个 DSH 插件:在设置面板里新增「连接应用」区块,作为其他 DSH 插件自我展示的中央平台。

Out of the box it renders an empty list. Other apps opt in by registering a card into its slot — no registry, no network transport, no cross-plugin imports.

What it does

  • Adds a 5th entry to the Settings panel — Connected Apps (order: 25, after General / Models / Plugins / Agent Presets).
  • Declares a child slot settings.connected-apps.item (kind: list) that any DSH plugin can register into.
  • Renders that slot as the app list, with a bilingual empty state (No connectable apps yet / 暂无可连接的应用).
  • Also registers a placeholder host-side tool dsh_authorize_app.

Install

# from the npm registry
dsh plugin --profile web add dsh-authorize-app

# from a local checkout (run from the PARENT directory)
dsh plugin --profile web add ./dsh-authorize-app

Then restart the profile (dsh web) and refresh the page. Settings → 连接应用 / Connected Apps appears.

For app developers

Want your app to show up in "Connected Apps"? In your plugin's client half, register a card into the child slot:

ctx.slots.inject('settings.connected-apps.item', () =>
  ctx.slots.register({
    name: 'settings.connected-apps.item',
    id: 'your-app-id',      // unique id across all apps
    order: 0,               // sort order (ascending)
    inject: () => ({
      // anything your card needs: name, description, connection status, …
    }),
  }, YourAppCard),          // a React component; rendered inside the list
)

That is the entire contract:

  • No host-side registry. The slot ledger is the join point.
  • No transport. Your component is mounted by the platform's renderSlot, so you just render a card.
  • Install order is irrelevant. ctx.slots.inject(...) waits for the slot declaration.

YourAppCard receives the standard DSH slot props: your inject() return value, plus the locale t seat if you declare a locale: namespace. Return null to hide, or render your card row.

Minimal card example

function YourAppCard(props) {
  return React.createElement('div', { style: { padding: '12px 0' } },
    'My App', ' — ', props.t ? props.t('status') : 'connected')
}

Architecture

HalfSource → distRole
Host (Node)src/index.tsdist/index.jsregisters the dsh_authorize_app tool
Client (browser)client.jsdist/client.jsregisters the settings.section + child slot

package.json declares dsh.client (platform: web) and the ./client export. The host's client-modules scan serves dist/client.js at /plugins/dsh-authorize-app/client.js and injects it into window.__DSH_BOOT__.

Build

pnpm install
pnpm run build        # tsc → dist/index.js; copies client.js → dist/client.js
pnpm run typecheck

Layout

src/index.ts            host plugin (tool registration)
client.js               hand-authored client module bundle (window.__ModuleLoader__.load)
scripts/build-client.mjs  copies client.js → dist/client.js
cordis.patch.yml        bundle patch layer (inserts this plugin into a profile)

Pitfalls (for maintainers)

1. npm dist-tag trap@deepseek-ai/dsh-tools latest is a stale 0.0.1-rc.1; the real line is under the next tag (0.1.0-rc.x). This package pins the next version exactly; do not re-install it over the pin. 2. Client-half discovery — the host scan does require.resolve('<pkg>/package.json'), so exports MUST include "./package.json": "./package.json" and "./client". Missing either makes the client half silently skipped (host loads, /plugins/<pkg>/client.js 404s).

3. Node version — DSH requires ^22.19.0 || >=24.0.0.

4. @deepseek-ai/cordis is a peerDependency — import only type { Context } (erased at compile); the host hands you ctx at runtime.

License

MIT