hellosky983/dsh-qrcode

插件Plugin 原生Native ⭐ 3 MIT cat_label.deepseek-harnesscat_label.deepseek-harness

DSH插件:离线二维码(SVG/PNG/ASCII)及条形码(Code128/EAN-13)生成器,无需网络,无需shell。

项目介绍Project Overview

DSH 离线二维码与条形码生成插件,提供 qrcode 与 barcode 模型工具,支持 URL、WiFi、vCard 等内容及 Code128、EAN-13 一维码,输出 SVG、PNG 或 ASCII 格式,编码与渲染完全本地完成,零运行时依赖。适用于受限网络、沙箱或离线 DSH 会话中生成可扫描图形。注意:PNG 输出为 data URL,需文件时建议使用 format=svg 并保存为 .svg 文件;插件依赖 inject = ['tools'],安装后需确认 dsh 配置已正确加载。

dsh-qrcode is an offline QR code and barcode generator plugin for DeepSeek Harness. It provides qrcode and barcode model tools that encode and render entirely locally with zero runtime dependencies, supporting URLs, WiFi, vCard, tel/sms payloads and 1D barcodes (Code128, EAN-13) as SVG, PNG, or ASCII output. Use it inside restricted, sandboxed, or fully offline DSH sessions where network-based encoders are unavailable. Caveat: PNG output is returned as a data URL, so use format=svg and save the markup when a file artifact is required, and ensure inject = ['tools'] is declared on reinstall.

或使用命令行安装(适合开发者)Or use CLI install (for developers)

命令行安装CLI Install

dsh plugin add github:hellosky983/dsh-qrcode

hellosky983/dsh-qrcode 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-qrcode

Awesome DSH Plugin

An offline QR code and barcode generator for DeepSeek Harness. Pure local computation — no network, no shell, no dependencies.

Overview

DeepSeek Harness sessions often run with restricted network access (no npm, no CDN, no online encoder APIs), so generating a scannable code from inside a session is not trivial. This plugin solves that: it provides qrcode and barcode model tools that encode and render entirely locally, with zero runtime dependencies. It is for agents and users who need QR codes (URLs, WiFi, vCard, tel, sms) or 1D barcodes (Code128, EAN-13) as SVG / PNG / ASCII output inside any DSH session — including fully offline or sandboxed ones.

Compatibility

  • DSH version: 0.1.0-rc.6
  • Mainline: verified against deepseek-harness mainline snapshots of 2026-08-14
  • Last verified: 2026-08-14

Install / Uninstall

Install (from GitHub):

dsh plugin add github:hellosky983/dsh-qrcode

Or clone and install locally:

git clone https://github.com/hellosky983/dsh-qrcode.git
cd dsh-qrcode
dsh plugin add .

Upgrade: re-run the install command after git pull.

Disable temporarily: remove the plugin row from your profile composition, or run:

dsh plugin remove dsh-qrcode

Uninstall: remove the dsh-qrcode dependency and its bundle entry from the profile package.json, then pnpm install.

Quick start

Tell the agent:

把这个链接做成二维码: https://example.com

or call the tools directly:

qrcode text="https://example.com" format=svg
barcode text="ABC-123" symbology=code128 format=svg

qrcode returns SVG markup (save to a .svg file), PNG data URLs, or ASCII previews. barcode supports code128 and ean13.

Configuration

Tool Option Default Description
qrcode text — (required) Content to encode: URL, WIFI:..., vCard, tel/sms, or plain text
qrcode format svg svg / ascii / png
qrcode ecl M Error correction level L/M/Q/H
qrcode scale / border / fg / bg / mask 4 / 4 / #000 / #fff / auto Rendering options
barcode text — (required) Content for Code128 (ASCII) or EAN-13 (12/13 digits)
barcode symbology code128 code128 / ean13

No environment variables, no secrets.

Permissions & data

  • Reads: nothing (pure function of the input arguments).
  • Writes: nothing. Tools return text/SVG/PNG data in the result.
  • Network: none. Encoding and rendering are fully local.
  • Credentials: none.

Troubleshooting

  • Tool not visible after install: restart dsh, or check that the bundle row appears in dsh --dump-config.
  • "cannot get property tools without inject": the plugin requires inject = ['tools']; reinstall from the latest commit which declares it.
  • PNG output is a data URL: the agent should prefer format=svg and save the returned markup as a .svg file when a file artifact is needed.
  • Logs: dsh profile logs under ~/.dsh/profiles/<name>/.
  • Rollback: revert to the previous plugin version by reinstalling the earlier git commit.

Development

git clone https://github.com/hellosky983/dsh-qrcode.git
cd dsh-qrcode
node --check index.js

The encoder was validated against zxing-cpp (96/96 test vectors, versions 1–40, all masks/EC levels) and cross-checked with segno for mask scoring. The suite lives in the commit history of this repository.

Contributions: open issues and pull requests on GitHub. Keep changes dependency-free (the encoder is self-contained). Report bugs with a minimal reproduction case.

License & security

MIT — see LICENSE. No secrets are shipped; report security issues privately via GitHub issue (repo is public) or email to the repository owner.

上一个 Prev dsh-ponytail 下一个 Next dsh-skillradar