dsh-crosspost
Verifieddsh-crosspost · v0.3.0 · MIT
dsh-crosspost — a content-automation DSH plugin.
Install
dsh plugin add dsh-crosspost Confirm the layer applied with dsh --profile default --dump-config — see the install guide.
Source
Creators
Readme
dsh-crosspost
A content-automation plugin for DeepSeek Harness (DSH), generated by create-dsh-content.
Features
- Multi-platform publishing via adapters: -
devto— Dev.to github— GitHubbluesky— Blueskymastodon— Mastodon- BYOK credential management (no platform approval needed from the plugin author)
- Cross-platform formatters: Markdown normalization, auto-split for long posts
- Structured result output with per-platform links and status
Install
# from the parent directory of this plugin:
dsh plugin --profile my-profile add ./dsh-crosspost
dsh --profile my-profile
Configure
Set your platform credentials via DSH settings (they are stored in your profile config, never hardcoded):
dsh-crosspost:
platforms:
# Fill in your credentials for each platform you want to use.
# Leave a platform out (or leave its fields empty) to disable it.
Generated from
This plugin was generated by create-dsh-content with:
- Plugin ID:
dsh-crosspost - Tool name:
dsh_crosspost - Platforms:
devto,github,bluesky,mastodon @deepseek-ai/dsh-toolspinned to0.1.1-rc.2
Pitfalls / 坑(从真实 spike 提炼,防呆)
Node version: DSH requires Node ^22.19.0 || >=24.0.0. Older Node only warns EBADENGINE but may hit runtime issues — upgrade if you can.
- Node 版本:DSH 要求 ^22.19.0 || >=24.0.0。旧版本只告警 EBADENGINE,不阻断,但建议升级。
npm dist-tag trap (the big one):
@deepseek-ai/dsh-toolslatestis a STALE 0.0.1-rc.1; the real line is under thenexttag. This scaffold pins the next-tag version for you — nevernpm i @deepseek-ai/dsh-toolsover it.- npm dist-tag 坑(最大):
@deepseek-ai/dsh-tools的 latest 是过期的 0.0.1-rc.1,正确版本在 next tag。本脚手架已锁 next 版本,勿再手动 npm i 覆盖。
- npm dist-tag 坑(最大):
Version-line alignment: keep every
@deepseek-ai/dsh-*package on the same0.1.0-rc.xline so pnpm does not install two module copies.- 版本线对齐:所有 @deepseek-ai/dsh-* 包统一用同一 0.1.0-rc.x 线,避免 pnpm 装两份模块。
@deepseek-ai/cordisis a peerDependency: import onlytype { Context }(erased at compile). At runtime the host hands youctx— never import cordis values at runtime.- @deepseek-ai/cordis 是 peerDep:只 import type(编译期擦除),运行时 ctx 由宿主传入。
Pure ESM: package.json must set
"type": "module"; build withmodule: esnext+moduleResolution: bundlerto keep bare specifiers.- 纯 ESM:package.json 必须 "type": "module";tsc 用 module:esnext + moduleResolution:bundler 保留 bare specifier。
dsh plugin add <dir>anchors relative paths to the INVOKING directory — run it from the parent directory, not from inside the plugin.- dsh plugin add 的相对路径锚定调用目录——要在插件的父目录执行。
In the bundle
cordis.patch.yml,nameis a package name (resolved via node_modules /$DSH_HOME/profiles/node_modules), not a relative path.- bundle 的 cordis.patch.yml 里 name 用包名(走 node_modules 解析),不要用相对路径。
Registrations are effects:
ctx.tools.register()/ctx.on()auto-dispose on unload. Wrap your OWN resources (timers/connections) inctx.effect(() => { acquire; return cleanup }).- 注册是 effect:ctx.tools.register()/ctx.on() 卸载自动清理;自己的资源要包 ctx.effect(() => {…; return cleanup})。
Load order = service dependencies, never file order:
export const inject = ['tools']makes the plugin wait untilctx.toolsis ready.- 加载顺序靠服务依赖(inject),不靠文件顺序。
Full end-to-end (model actually calls your tool) needs
DEEPSEEK_API_KEY; without it--verifyproves load/list/event, and the model call fails with MISSING_CREDENTIAL.
- 端到端(模型真正调工具)需 DEEPSEEK_API_KEY;无 key 时 --verify 只能证明加载/列出/事件。
- Content plugins make real network calls. Always wrap HTTP in try/catch and classify errors (rate-limit / auth / bad-request) so the agent can retry or skip per platform.
- 内容插件会发起真实网络调用。务必用 try/catch 包裹并分类错误(限流/凭证/参数错误),让 agent 能按平台重试或跳过。
- Credentials are BYOK — the plugin author needs zero platform approval. Store them in
ctx.config(not hardcoded) and validate on plugin load with clear missing/invalid/disabled states.
- 凭证 BYOK——插件作者无需任何平台审批。存在 ctx.config 里(不要硬编码),加载时校验并明确缺凭证/无效/已禁用三种状态。
License
MIT