Skip to content

dsh-crosspost

Verified

dsh-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 — GitHub
  • bluesky — Bluesky
  • mastodon — 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-tools pinned to 0.1.1-rc.2

Pitfalls / 坑(从真实 spike 提炼,防呆)

  1. 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,不阻断,但建议升级。
  2. npm dist-tag trap (the big one): @deepseek-ai/dsh-tools latest is a STALE 0.0.1-rc.1; the real line is under the next tag. This scaffold pins the next-tag version for you — never npm i @deepseek-ai/dsh-tools over it.

    • npm dist-tag 坑(最大):@deepseek-ai/dsh-tools 的 latest 是过期的 0.0.1-rc.1,正确版本在 next tag。本脚手架已锁 next 版本,勿再手动 npm i 覆盖。
  3. Version-line alignment: keep every @deepseek-ai/dsh-* package on the same 0.1.0-rc.x line so pnpm does not install two module copies.

    • 版本线对齐:所有 @deepseek-ai/dsh-* 包统一用同一 0.1.0-rc.x 线,避免 pnpm 装两份模块。
  4. @deepseek-ai/cordis is a peerDependency: import only type { Context } (erased at compile). At runtime the host hands you ctx — never import cordis values at runtime.

    • @deepseek-ai/cordis 是 peerDep:只 import type(编译期擦除),运行时 ctx 由宿主传入。
  5. Pure ESM: package.json must set "type": "module"; build with module: esnext + moduleResolution: bundler to keep bare specifiers.

    • 纯 ESM:package.json 必须 "type": "module";tsc 用 module:esnext + moduleResolution:bundler 保留 bare specifier。
  6. 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 的相对路径锚定调用目录——要在插件的父目录执行。
  7. In the bundle cordis.patch.yml, name is a package name (resolved via node_modules / $DSH_HOME/profiles/node_modules), not a relative path.

    • bundle 的 cordis.patch.yml 里 name 用包名(走 node_modules 解析),不要用相对路径。
  8. Registrations are effects: ctx.tools.register() / ctx.on() auto-dispose on unload. Wrap your OWN resources (timers/connections) in ctx.effect(() => { acquire; return cleanup }).

    • 注册是 effect:ctx.tools.register()/ctx.on() 卸载自动清理;自己的资源要包 ctx.effect(() => {…; return cleanup})。
  9. Load order = service dependencies, never file order: export const inject = ['tools'] makes the plugin wait until ctx.tools is ready.

    • 加载顺序靠服务依赖(inject),不靠文件顺序。
  10. Full end-to-end (model actually calls your tool) needs DEEPSEEK_API_KEY; without it --verify proves load/list/event, and the model call fails with MISSING_CREDENTIAL.

  • 端到端(模型真正调工具)需 DEEPSEEK_API_KEY;无 key 时 --verify 只能证明加载/列出/事件。
  1. 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 能按平台重试或跳过。
  1. 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