Back to home@LJH-snow

dsh-tool-slack

Slack tools for DeepSeek Harness

Stars
0
Language
TypeScript
Created
Aug 30, 2026
Updated
Aug 30, 2026

Introduction

dsh-tool-slack

English | 中文

A Cordis tool plugin that gives DeepSeek Harness (dsh) focused Slack workflows: workspace auth checks, channel discovery, channel members, message history, thread replies, message search, user profiles, user groups, file metadata, rich messages, scheduled messages, and common notification actions.

The plugin registers 19 tools with the official ctx.tools.register(defineTool(...)) contract, uses presentCall/presentResult for compact replay-friendly UI cards, and treats authentication, request timeout, and cancellation as first-class concerns.

Install

Install directly from GitHub (no npm publish needed):

npm install github:LJH-snow/dsh-tool-slack
# or a specific branch/tag
npm install github:LJH-snow/dsh-tool-slack#main

Or from a local checkout:

git clone https://github.com/LJH-snow/dsh-tool-slack
cd dsh-tool-slack
npm install && npm run build   # builds to lib/
npm install /path/to/dsh-tool-slack

Requires @deepseek-ai/cordis (^4.0.1) and @deepseek-ai/dsh-tools (^0.1.0-rc.6) as peer dependencies, provided by the host dsh runtime.

Configuration

Load the plugin in a dsh composition config (cordis.yml):

- name: 'dsh-tool-slack'
  config:
    token: 'xoxb-xxx'          # required Slack bot token
    defaultChannel: 'general'  # optional default channel; tools can still override it
    baseUrl: 'https://slack.com/api'   # optional Slack Web API base URL
    timeoutMs: 15000           # optional request timeout in ms (default 15000)

Full example: examples/cordis.yml.

Tools

Read-only

ToolDescriptionChannel
slack_auth_testVerify a bot token and return workspace/user/bot metadatan/a
slack_list_channelsList public/private conversations with paginationconfig or arg
slack_get_channelGet channel metadata, member count, topic, and purposeconfig or arg
slack_list_channel_messagesList recent channel messages, optionally by time rangeconfig or arg
slack_list_channel_membersList user ids that are members of a channelconfig or arg
slack_list_scheduled_messagesList scheduled messages with channel/time filters and paginationconfig or arg
slack_list_thread_repliesList replies in a thread by parent message tsconfig or arg
slack_search_messagesSearch messages by free text with channel and permalinkn/a
slack_list_usersList workspace users with profile and role metadatan/a
slack_list_user_groupsList workspace user groups with member counts and optional usersn/a
slack_list_user_group_membersList member user ids for a user groupn/a
slack_list_filesList file metadata with channel/user/type/time filters and pagingconfig or arg
slack_get_userGet one user profile by Slack user idn/a

Write

ToolDescriptionChannel
slack_post_messagePost a message or thread reply, optionally with Block Kit/attachmentsconfig or arg
slack_update_messageUpdate an existing message, optionally with Block Kit/attachmentsconfig or arg
slack_schedule_messageSchedule a message for later deliveryconfig or arg
slack_delete_scheduled_messageDelete a message that has not been sent yetconfig or arg
slack_delete_messageDelete an existing messageconfig or arg
slack_add_reactionAdd a reaction emoji to a messageconfig or arg

Behavior contract

  • Slack Web API is auth-first, so every tool requires a plugin token.
  • The plugin always checks Slack's ok envelope. Missing resources return { found: false }, and write failures return { ok: false, reason }.
  • Infrastructure errors such as HTTP 5xx, timeout, and network failures throw SlackError or the original fetch error.
  • All requests forward exec.signal and use a 15 second timeout by default.
  • Output schemas, render, presentCall, and presentResult remain pure, so tool calls and results are replay-safe.

Development

npm install
npm run typecheck   # type check
npm test            # unit tests (vitest)
npm run build       # build to lib/

See DEVELOPMENT.md for technical notes and decisions.

Publishing

  1. Ensure npm run typecheck, npm test, and npm run build all pass.
  2. Publish with npm publish --access public.
  3. Add the dsh-plugin topic to the GitHub repository for ecosystem discovery.

License

MIT