插件目录 / Developer / dsh-plugin-manager-registry
dsh-plugin-manager-registry
未验证 Jesse-njx
功能简介
@dsh-pm/registry——通过合并awesome-dsh-plugin列表、GitHub dsh-plugin-topic搜索和npm关键字搜索,发现dsh插件,形成去重、离线容忍的注册表(dsh pm的发现引擎)。
未验证 — 尚未实测
@dsh-pm/registry——通过合并awesome-dsh-plugin列表、GitHub dsh-plugin-topic搜索和npm关键字搜索,发现dsh插件,形成去重、离线容忍的注册表(dsh pm的发现引擎)。 尚未验证——请自行安装测试。
「未验证」表示我们的自动化 CI 尚未安装过该插件。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
@dsh-pm/registry
The discovery engine of dsh pm 锟斤拷 find dsh plugins by merging three
independent sources into one deduped, sorted, offline-tolerant registry:
- awesome-list 锟斤拷 the awesome-dsh-plugin
README, parsed under its category headings (configawesomeUrl). - GitHub topic 锟斤拷 repo search for the
dsh-plugintopic via theghCLI,
with a plainapi.github.comhttps fallback. - npm keyword 锟斤拷
npm search --json <keyword>(confignpmKeyword,
defaultdsh), with a registry/-/v1/searchhttps fallback.
A GitHub hit and an npm hit for the same project collapse into oneRegistryEntry carrying both repoUrl and npmName; entries dedupe by
normalized repo URL first, then by bare name. Every source degrades
independently 锟斤拷 a dead source contributes fewer (or cached) entries and a
warning, never a rejection. Offline, the client serves whatever the local
cache last recorded per source.
This package implements the frozen RegistryClient contract from@dsh-pm/core (spec
锟斤拷5.1) and exports exactly the 锟斤拷5.2 surface: createRegistryClient and a
one-shot search convenience.
Install
Workspace package of the dsh-plugin-manager monorepo; consumed through@dsh-pm/core (workspace dep). The product that wires it into DSH is the
plugin manager CLI:
dsh plugin add github:Jesse-njx/dsh-plugin-manager
Usage
import { createRegistryClient, search } from '@dsh-pm/registry'
import type { PmConfig } from '@dsh-pm/core'
const cfg: PmConfig['registry'] = {
awesomeUrl: 'https://raw.githubusercontent.com/awesome-dsh-plugin/awesome-dsh-plugin/main/README.md',
npmKeyword: 'dsh',
}
const client = createRegistryClient(cfg)
// Filtered, sorted: stars desc, then name.
const hits = await client.search('memory')
// Exact lookup by name, npmName, owner/repo, github:owner/repo or https URL.
const entry = await client.resolve('Jesse-njx/dsh-memory')
// Update-check version: npm dist-tag `latest`, else GitHub default-branch HEAD sha.
const version = await client.latestVersion(entry ?? hits[0]!)
// Warnings of the last run (documented extra beyond the frozen interface):
console.log(client.lastWarnings) // e.g. ["github: 'gh' CLI not found; results from https search"]
// One-shot convenience (spec 锟斤拷5.2):
const all = await search('', cfg)
Result shape
search/resolve return RegistryEntry from @dsh-pm/core:
{
name: string // canonical bare name
repoUrl?: string // normalized https repo URL (dedupe key #1)
npmName?: string // npm package name when published
description: string
category: string // awesome-list heading, or ''
stars?: number // GitHub stars when known
updatedAt?: string // ISO 8601 of last repo push when known
source: ('github' | 'npm')[] // which discovery sources contributed
}
The three sources
| Source | Primary | Fallback | Contributes |
|---|---|---|---|
| awesome | fetch(awesomeUrl) |
local cache | name, repoUrl, description, category |
| github | gh api search/repositories?q=topic:dsh-plugin |
https api.github.com search |
name, repoUrl, stars, updatedAt, description |
| npm | npm search --json --searchlimit=100 <keyword> |
https registry.npmjs.org/-/v1/search |
name锟斤拷npmName, repoUrl, description |
- Dedupe 锟斤拷 normalized repo URL first (
git+https://锟斤拷,[email protected]:锟斤拷,
trailing.gitall collapse tohttps://github.com/owner/repo), then bare
name. Distinct repos that merely share a bare name stay separate. Merged
metadata is unioned andsourceaccumulates distinct contributors. - Sorting 锟斤拷
stars ?? 0descending, name ascending as tiebreak. - Warnings 锟斤拷 at most one per degraded source (
awesome: 锟斤拷,github: 锟斤拷,npm: 锟斤拷), e.g.github: 'gh api' failed (exit 1); results from https search.
An unparseable awesome row increments a singleawesome: skipped N row(s)
warning 锟斤拷 the parser never throws.
Offline behavior
Every source tries its primary path, then its https fallback, then its local
cache, then degrades to zero entries with one warning. Caches are JSON files
written atomically (temp + rename) under:
$DSH_PM_CACHE_DIRif set, else$XDG_CACHE_HOME/dsh-pm, else~/.cache/dsh-pm
Cache writes are best-effort: a failed write is swallowed, never fatal. The
default npm runner also gets its own writable cache (<cacheDir>/npm-cache)
so a broken global ~/.npm cache cannot take down the primary npm path.
Development
pnpm install # from the monorepo root (requires packages/core to exist)
pnpm --filter @dsh-pm/registry test # node --test, 43 tests
pnpm --filter @dsh-pm/registry typecheck
pnpm --filter @dsh-pm/registry build # tsc 锟斤拷 lib/
Tests never hit the network except test/live.test.ts, which skips when
offline (network guard, mirroring the suite convention). The merge/dedupe
matrix, parser goldens (fixture README committed in test/fixtures/) and
every degrade path run against injected fakes (test/helpers.ts).
dev/core/is a build-time-only stub.registryimports types from@dsh-pm/core(workspace dep) usingimport typeonly 锟斤拷 erased at runtime.
Because Session 1'scorehad not landed when this package was built, the
frozen 锟斤拷5.1 contract is transcribed verbatim intodev/core/index.d.ts,
referenced only through thepathsmapping intsconfig.json, never
emitted intolib/, and never imported at runtime. Deletedev/the
moment the realcorelinks 锟斤拷 the coordinator can diff the stub against the
landed types to catch any drift.
License
MIT 锟斤拷 see LICENSE.
安装
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 dsh-plugin-manager-registry」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:Jesse-njx/dsh-plugin-manager-registry Headless(CLI)profile:
dsh plugin --profile headless add github:Jesse-njx/dsh-plugin-manager-registry 实测报告
尚未 L3 验证——若已跑过,见下方失败备注。
备注:验证: install-fail (0.1.0-rc.6) 浏览全部待验证失败 →
使用场景
扩展 agent 的编码能力面——给它一个新工具、工作流或集成,让它接手以前做不了的开发任务。
适合谁
想让 dsh 在真实代码库上像队友一样干活的开发者——能改、能跑、能验证,而不只是回答问题。
二次开发建议
工具/命令面就是缝:暴露更多 SDK 能力、加更聪明的上下文接线,或收紧改代码与验证之间的循环。