npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@goodandready/dsh-im-hub-media

v0.2.1

Published

Multi-platform IM gateway for DeepSeek Harness (fork of dsh-im-hub with media): Telegram voice/photo/document/video + reply handling, STT (Deepgram primary, HF Whisper fallback), outbound MEDIA: markers. Feishu/WeCom kept as-is.

Downloads

297

Readme

dsh-im-hub-media

Telegram-first fork of dsh-im-hub for DeepSeek Harness (dsh) that adds media support to the multi-platform IM gateway. Talk to your dsh agent from Telegram (voice, photos, documents, video, replies), with Feishu/Lark and WeCom kept from the original.

One agent per chat. Multi-turn context. Whitelist access control. Idle reaping. All the dsh-im-hub adapters, plus a media pipeline on Telegram.

What's added vs. dsh-im-hub

| Area | Feature | |---|---| | Media | Incoming photos / voice / documents / video are downloaded to a local cache; supported docs are injected inline or kept for the agent. | | Voice → text (STT) | Voice messages transcribed automatically: Deepgram primary (api.deepgram.com), HuggingFace Whisper (openai/whisper-large-v3) fallback. | | On-device vision | Photos without a caption are routed to a vision model (see dsh-vision-bridge) instead of failing a text-only turn. | | Outbound media | Agents can emit MEDIA:<path> markers and the bot sends the file back into the chat. | | Reply handling | Telegram reply_to_message is passed through so the agent can answer in-context. |

Supported inbound document types follow the Hermes allowlist: PDF, Markdown, plain text, CSV, logs, JSON/XML/YAML/TOML/INI/CFG, archives, and Office (doc/xls/ppt + x). Upper 20 MB bound (public Bot API cap).

Install

# From npm after publishing:
dsh plugin --profile web add @goodandready/dsh-im-hub-media

# From GitHub:
dsh plugin --profile web add github:GooDAnDReaDY/dsh-im-hub-media

# Locally from a checkout:
dsh plugin --profile web add /path/to/dsh-im-hub-media

Restart the Web UI afterwards.

The plugin row is disabled by default — enable it and add your credentials in the profile's cordis.patch.yml:

- id: dsh-im-hub-media
  disabled: false
  config:
    adapters:
      telegram:
        enabled: true
        token: '123456:ABC-DEF...'      # from @BotFather
        allowedUserIds: []              # empty = everyone (set in production)
    media:
      stt:
        deepgramApiKey: ''              # optional STT; needs a Deepgram key
        # hfApiKey: ''                  # optional HuggingFace Whisper fallback

Configure

Web GUI (recommended)

A settings card appears at Settings → Plugins → Configurable plugins → IM Gateway. It edits the same configuration live — no restart needed (the bridge hot-reloads on save). Credential fields are stored server-side and shown as write-only "configured / not set" badges.

Adapters (kept from dsh-im-hub)

| Adapter | Default | Description | |---|---|---| | adapters.telegram.enabled | false | Telegram Bot API long polling; token from @BotFather. | | adapters.telegram.allowedUserIds | [] | Numeric Telegram user ids; empty = everyone. | | adapters.feishu.enabled / appId / appSecret | false/'' | Feishu adapter (mode: websocket by default, no public URL; webhook = HTTP callback). | | adapters.lark.* | — | International Lark edition (open.larksuite.com), same shape as Feishu. | | adapters.wecom.* | — | WeCom app-message callback (corpId/corpSecret/agentId + token/encodingAesKey). | | adapters.mock.enabled / port | false/0 | Test-only adapter (stdin + local HTTP; 0 = ephemeral port). |

See dsh-im-hub upstream README for the full adapter reference.

media schema (new in this fork)

| Field | Default | Description | |---|---|---| | media.stt.deepgramApiKey | '' (secret) | Deepgram API key for voice→text. Empty = skip Deepgram. | | media.stt.deepgramModel | nova-2 | Deepgram model. | | media.stt.language | ru | STT language hint (BCP-47). | | media.stt.hfApiKey | '' (secret) | HuggingFace token for the Whisper fallback. Empty = skip. | | media.stt.hfModel | openai/whisper-large-v3 | HuggingFace Whisper model id. | | media.maxDocBytes | 20 * 1024 * 1024 | Max inbound document bytes. | | media.maxTextInjectBytes | 100 * 1024 | Max text-file bytes injected inline into the agent message. | | media.cacheDir | ~/.dsh/im-hub-media/cache | Local cache dir for downloaded media (defaults to the user home). |

Example settings.yaml

dsh-im-hub-media:
  adapters:
    telegram:
      enabled: true
      token: '<bot token>'
  media:
    stt:
      deepgramApiKey: '<deepgram key>'
      language: ru

Usage

From Telegram, just message your bot:

  • Voice → transcribed by Deepgram/Whisper and sent to the agent as text.
  • Photo/Videos → downloaded; handled via vision if there's no caption.
  • Document / short text files → split inline or kept for the agent (respecting maxTextInjectBytes).
  • /help, /reset, /status, /model → Slack-style commands.

The agent can send media back by emitting a MEDIA:<absolute path> marker in its message.

Commands

| Command | Effect | |---|---| | /help | Show command help. | | /reset | Clear this chat's conversation context (fresh agent). | | /status | Show active chats / agents / adapters. | | /model | Show the current model selection. |

Structure

dsh-im-hub-media/
├── package.json            # dsh bundle/plugin metadata + peerDependencies
├── cordis.patch.yml        # bundle layer: plugin row (disabled by default)
├── lib/index.js            # host: settings schema + Bridge wiring (media cache)
├── lib/bridge.js           # per-chat agent lifecycle
├── lib/media.js            # document classification + outbound MEDIA markers
├── lib/stt.js              # Deepgram + HuggingFace Whisper transcription
├── lib/client.js           # browser: settings card in the Web GUI
├── lib/adapters/*          # telegram / feishu(+lark) / wecom / mock
├── README.md
└── LICENSE                 # MIT

Security notes

  • Force a whitelist. Set allowedUserIds on every enabled adapter before exposing the bot publicly. An empty list means anyone can drive your agent — which can execute tools on the host.
  • IM messages are injected into the agent session as plugin-originated user messages; they do not bypass the deployment's own approval/guardrail policy — treat them like any other user input.
  • Platform secrets (token, appSecret, encodingAesKey, STT keys) live in the profile's cordis.patch.yml / settings.yaml; keep that file private.
  • Media downloaded into cacheDir stays local; nothing is sent elsewhere except the agent conversation.

License

MIT

Credits

Fork of dsh-im-hub (MIT). All dsh-im-hub adapter logic and credit belong to the original author; this fork adds the Telegram media/STT/vision pipeline.