DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Plugin Random — DSH Plugin for DeepSeek Harness
← Plugins
P

dsh-plugin-random

Plugin Random

CSPRNG-backed random tools for DSH agents: range-bound random numbers (batch, seedable), custom-length strings from chosen character sets, random bytes, UUID v4, and unbiased shuffles. Agents call these tools instead of inventing random values.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:ziyulisiyuan/dsh-plugin-random#ffc63df51cdf5b0b2bd55c2ea4f09ac6bfacfa76
READMECompatibilityVersions

Compatibility and provenance

Plugin Random is published as dsh-plugin-random and currently resolves to version 1.0.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
any
Release source
github
Registry updated
10/15/2026

Versions

1.0.0stable
10/15/2026

Related plugins

Loading related plugins…

Latest
1.0.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
any
License
MIT
Source
github
GitHub
★ 1
Weekly downloads
0
Last push
10/15/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in

Related plugins

More verified plugins in developer-tools.

Client Ui Git Graph@linxin666/dsh-client-ui-git-graphExternal dsh web GUI plugin: a blank-session git branch selector + Git graph, with real host-side git operations and guards, as a dsh profile bundleSsh@linxin666/dsh-sshRemote SSH operations for the dsh web GUI: host config store (~/.dsh/dsh-ssh.json, import from ~/.ssh/config), a persistent ssh2 connection pool with jump-host support, exec / PTY web terminal / SFTP transfer / local port-forward tunnels / cluster executiUpdate@linxin666/dsh-updateSelf-update plugin for the dsh web GUI: probes npm for newer family releases and runs the owning profile's pnpm update in place, from a sidebar trigger beside the settings seat with a release-notes panelTui@deepseek-harness-tui/dsh-tuiInteractive terminal interface for DeepSeek Harness agents, sessions and tools.

README

dsh-plugin-random

CSPRNG-backed random tools for DSH (DeepSeek Harness) agents: uniform numbers in a range, custom-length strings from chosen character sets, secure bytes, UUID v4, and unbiased shuffles — exposed as agent tools so the model never invents random values.

LLM 无法产生可信随机数:凭空写出的值有偏、不可审计,还经常越出给定区间。本插件把随机数生成交给系统 CSPRNG,并以工具形式暴露给 Agent;同时注入一条常驻系统提示,让 Agent 在需要随机值时直接调用,无需用户提醒。

适用于:抽签、抽样、验证码、密码、密钥、ID、nonce、洗牌、造测试数据、可复现的模拟。 不适用于:用 seed 生成需要保密的值(见下文「随机性说明」)。

工具

工具用途
random_number[min, max] 内均匀分布的数;整数或浮点;支持批量;支持 seed 复现
random_string定长随机字符串,字符集可自选(命名集合或任意 Unicode 字面量)
random_bytesN 字节安全随机数,hex / base64 / base64url 编码
random_uuidUUID v4(RFC 9562,版本位与变体位正确)
random_shuffleFisher-Yates 无偏洗牌,返回新数组,不改原数组

参数

random_number

参数类型必填默认说明
minnumber是—区间下界(含)
maxnumber是—区间上界(整数模式含;浮点模式不含)
integerboolean否truetrue 返回整数,false 返回浮点
countinteger否1批量个数,1–10000,互相独立
seedinteger否—uint32 种子,同种子同参数结果逐位一致;非密码学级
random_number({ "min": 1, "max": 6, "count": 3 })      → 2, 5, 1
random_number({ "min": 0, "max": 1, "integer": false }) → 0.4713...
random_number({ "min": 1, "max": 100, "count": 4, "seed": 42 }) → 可复现

random_string

参数类型必填默认说明
lengthinteger是—字符数,1–4096(按码点计,emoji 算 1 个)
setsstring[]否["lower","upper","digits"]命名集合取并集去重:digits lower upper hex symbols
charsstring否—字面量字符集,任意 Unicode;给出时覆盖 sets

逐字符等概率:选 ["lower","digits"] 时 36 个字符每个概率相同(字母整体出现率自然高于数字)。

random_string({ "length": 6, "sets": ["digits"] })                    → 验证码
random_string({ "length": 32, "sets": ["lower","upper","digits","symbols"] }) → 强密码
random_string({ "length": 16, "sets": ["hex"] })                      → 32 位 hex 等价 16 字节
random_string({ "length": 8, "chars": "ABCDEF" })                     → 自定义字符集

random_bytes

参数类型必填默认说明
lengthinteger是—字节数,1–4096
encodingstring否hexhex / base64 / base64url

random_uuid

无参数,返回一个 UUID v4 字符串。

random_shuffle

参数类型必填默认说明
itemsarray是—待洗牌数组(任意 JSON),最多 10000 项

随机性说明

  • 整数:crypto.randomInt,内部为拒绝采样,区间内严格均匀,无取模偏差——这是「结果总是落在某几个小区间」这类问题的根因,本插件不做 random % range。
  • 浮点:取 53 位随机比特映射到区间,覆盖完整双精度。
  • 字符串:每位独立按拒绝采样取值,逐字符均匀。
  • 洗牌:Fisher-Yates,所有排列等概率。
  • 熵源:Node 内置 node:crypto(Windows 上为 BCryptGenRandom),跨调用独立。
  • seed 是唯一非密码学路径:使用 mulberry32,用于模拟与测试复现,不要用它生成密钥、nonce 或密码。已知边界:区间跨度接近 2³² 时存在格点空隙。
  • 大样本才看得出均匀性:小样本天然成簇,验证请用几千次以上样本做卡方检验,而非肉眼看几十次。

自动调用

插件注册工具的同时注入一条系统提示段(order: 9500),内容要求 Agent 在需要随机值时调用 random_* 工具而非自行编造。因此新会话无需任何配置或提醒,Agent 即可看到并使用这些工具。

验证

node --check index.js
node test.mjs

test.mjs 为离线自检,覆盖:区间包含性、卡方均匀性(防取模偏差回归)、负区间、批量、种子复现、字符集并集去重、Unicode 码点、字节编码长度、UUID v4 格式与唯一性、洗牌置换完整性、全部错误路径。

错误处理

非法参数由工具直接返回明确错误,不静默钳制、不返回越界值: min > max、min/max 非有限数、整数模式非安全整数、count 超出 1–10000、length 超出 1–4096、未知集合名、空字符集、未知编码、items 非数组。

文件结构

文件说明
index.js全部实现:五个工具与系统提示段,零依赖
cordis.patch.ymlbundle patch,插入一行插件条目
package.json清单,dsh.bundle.patch 指向 patch
locale/en.json, locale/zh.json插件管理页的标题与描述
test.mjs离线自检

兼容性

  • DSH / Cordis Host 插件,仅 Host 侧,无浏览器端代码。
  • 依赖 tools 与 systemPrompt 服务(DSH 基础组合自带)。
  • 随机源为 Node 内置 node:crypto,无第三方依赖,无构建步骤。

License

MIT