D

dsh-agent-dispatch

github.com/fan56/dsh-agent-dispatch

v0.2.0 其他 可执行外部程序以 shell 执行命令写入文件

dsh 生态的**事前派发建议**插件(ex-ante dispatch):在一个 turn 进入模型之前,问 TypeSafe Jev(System One)一次——该不该派、派给哪个已注册 agent——判定过阈值就在该 turn 的消息末尾追加一条四行的建议消息。插件**不拥有任何委派机制**:`use_agent`(dsh-subagent-registry)负责真正 spawning,本插件只给建议,且明说可以无视。

作者原文(英文)

dsh plugin: Jev-guided dispatch advice — before a turn starts, a TypeSafe Jev call decides whether the task belongs to a registered agent and which one, then injects a four-line, ignore-if-unsuited recommendation. Jev-optional: no key means silence.

中文简介由 DeepSeek 模型翻译,仅供参考。

dshdsh-plugindeepseek-harnessjevtypesafesubagentdispatchagent
分类
other
发布
2026-09-29
版本
v0.2.0

检测报告

关注度高。命中了不少能力模式,其中可能有需要留意的。逐条看下面的清单。
2高关注2需留意4一般16未命中
高关注需留意一般

能力清单

  • 可执行外部程序spawns-processes高关注2 处命中
    • scripts/link-dsh-closure.mjs:26import { execFileSync } from 'node:child_process'
    • scripts/smoke-boot.mjs:30import { spawnSync } from 'node:child_process'
    • 看它调用哪些程序。调用本机已有的工具是常见做法。
  • 以 shell 执行命令shell-exec高关注2 处命中
    • scripts/link-dsh-closure.mjs:57const bin = execFileSync('which', ['dsh'], { encoding: 'utf8' }).trim()
    • scripts/link-dsh-closure.mjs:67const root = execFileSync('npm', ['root', '-g'], { encoding: 'utf8' }).trim()
    • 看命令字符串是拼出来的还是写死的。拼接用户输入才是真正的风险。
  • 写入文件writes-files需留意10 处命中
    • lib/log.js:33await mkdir(logDir, { recursive: true });
    • lib/log.js:34await appendFile(join(logDir, VERDICT_FILE), `${JSON.stringify(record)}\n`, 'utf8');
    • scripts/link-dsh-closure.mjs:85mkdirSync(scopeDir, { recursive: true })
    • scripts/link-dsh-closure.mjs:93rmSync(target, { recursive: true, force: true })
    • 看写入位置。写自己的配置目录是正常的,写系统目录不是。
  • 运行时改写自身配置modifies-own-manifest需留意2 处命中
    • scripts/smoke-boot.mjs:63writeFileSync(path.join(profile, 'cordis.patch.yml'), [
    • scripts/smoke-boot.mjs:71writeFileSync(path.join(profile, 'package.json'), JSON.stringify({
    • 运行时改写自身配置会让下次启动的行为和你看过的源码不一致。
  • 接触凭据或密钥credentials一般22 处命中
    • lib/index.js:122...(deps.apiKey !== undefined ? { apiKey: deps.apiKey } : {}),
    • lib/index.js:129logger.info?.(`${PLUGIN_NAME}: no jev key configured (keychain, TYPESAFE_API_KEY, or JEV_API_KEY); dispatch stays silent…
    • lib/redact.js:7* 1. Credential-shaped strings are replaced BEFORE the state is assembled into
    • lib/redact.js:18* Credential shapes replaced in every outbound state. The built-in set covers
    • 看它读取哪些凭据、发往哪里。用于登录自己的服务是正常的。
  • 读取文件reads-files一般11 处命中
    • lib/roster.js:269if (!existsSync(dir))
    • lib/roster.js:271const entries = await readdir(dir, { withFileTypes: true });
    • lib/roster.js:278const result = parseAgentMarkdown(await readFile(path, 'utf8'), path);
    • scripts/link-dsh-closure.mjs:38if (!existsSync(join(repoRoot, 'src'))) {
    • 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
  • 读取环境变量reads-env一般7 处命中
    • lib/index.js:119const env = deps.env ?? process.env;
    • lib/roster.js:33export function expandHome(dir, env = process.env) {
    • lib/roster.js:44export function dshHome(env = process.env) {
    • lib/roster.js:48export function agentsDir(env = process.env) {
    • 环境变量里常混有密钥。看它是否把整个 env 都读走。
  • 动态加载模块dynamic-import一般1 处命中
    • lib/index.js:69const mod = await import(__rewriteRelativeImportExtension(specifier));
    • 动态导入本身无害,但会让依赖关系难以静态审阅。
逐条扫描明细
能力标识关注度命中次数
可执行外部程序spawns-processes高关注2
以 shell 执行命令shell-exec高关注2
写入文件writes-files需留意10
运行时改写自身配置modifies-own-manifest需留意2
接触凭据或密钥credentials一般22
读取文件reads-files一般11
读取环境变量reads-env一般7
动态加载模块dynamic-import一般1

这份报告的口径

扫描读的是包里的源码,全程不执行第三方代码。 本次读了 24 个文件,扫描于 2026-10-14。 命中次数只说明源码里出现过这类调用,不说明行为好坏——一个插件读写文件 500 次和 1 次 都会被记为「读取文件」。这是能力清单,不是信任评分,也不是安全结论: 没扫出来的能力可能只是写法没被规则覆盖。

依赖安全公告

已查询这个插件声明的全部依赖,没有匹配到已公开的安全公告。(含 DSH 框架包在内的 @deepseek-ai/* 不作查询——那是运行时自己的问题,不是插件的。)

← 返回全部插件