Skip to main content

Slack transport plugin for Takopi.

Project description

takopi-slack-plugin

slack transport plugin for takopi. socket mode only, replies in threads, and stores per-thread context + resume tokens.

features

  • socket mode only; listens in a single channel or dm
  • thread sessions (context + resume tokens) stored at ~/.takopi/slack_thread_sessions_state.json
  • slash commands + message shortcuts for overrides and plugin commands
  • cancel button on progress messages
  • message overflow: split or trim long responses

requirements

  • python 3.14+
  • takopi >=0.20.0
  • slack bot token with chat:write, commands, app_mentions:read, and the matching history scopes for your channel type (channels:history, groups:history, im:history, mpim:history)
  • slack app token (xapp-) with connections:write

install

install into the same python environment as takopi.

uv tool install -U takopi --with takopi-slack-plugin

or, with a virtualenv:

pip install takopi-slack-plugin

setup

create a slack app and enable socket mode.

  1. create an app-level token with connections:write
  2. add the bot scopes listed above and install the app
  3. enable events for app_mention plus the right message.* event for your channel type
  4. enable interactivity & shortcuts, create a slash command (for example /takopi), and optionally add dedicated commands like /takopi-preview for common plugins plus message shortcuts with callback id takopi:<plugin_id>
  5. invite the bot to the target channel

add to ~/.takopi/takopi.toml:

transport = "slack"

[transports.slack]
bot_token = "xoxb-..."
app_token = "xapp-..."
channel_id = "C12345678"
message_overflow = "split"

set message_overflow = "trim" if you prefer truncation instead of followups.

if you use a plugin allowlist, enable this distribution:

[plugins]
enabled = ["takopi-slack-plugin"]

usage

takopi --transport slack

if you already set transport = "slack", takopi is enough.

directives are optional. use /project and @branch in the first line to target a project or worktree; otherwise the run uses the default takopi context.

inline command mode: if the remaining prompt includes a /command that matches a registered command plugin, the slack bridge dispatches it instead of running the engine.

example (inline command):

@takopi /zkp2p-clients @feat/login /preview start 3000 --dev "pnpm --filter @zkp2p/web dev -- --host 127.0.0.1 --port {port}"

example (worktree):

@takopi /zkp2p-clients @feat/web/monad-usdt0 add a retry to the api call

thread replies reuse stored context, so you can reply without repeating directives.

slash command built-ins (via /takopi <command> or /takopi-<command>):

/takopi status
/takopi engine <engine|clear>
/takopi model <engine> <model|clear>
/takopi reasoning <engine> <level|clear>
/takopi session clear

message shortcuts pass the selected message text as arguments to the plugin command identified by takopi:<plugin_id>.

progress messages include a cancel button; enable interactivity & shortcuts so clicks are delivered in socket mode.

for opinionated gating, see docs/AGENTS.example.md and docs/GATING_README.md, and customize ~/.codex/AGENTS.md.

license

mit

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

takopi_slack_plugin-0.1.3.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

takopi_slack_plugin-0.1.3-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

Details for the file takopi_slack_plugin-0.1.3.tar.gz.

File metadata

  • Download URL: takopi_slack_plugin-0.1.3.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for takopi_slack_plugin-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6292cb4a978c6057b078d8a5824380484e86409b9623b23f1c007295c8196afe
MD5 bae0ef70ee28e0863711b3eca59b9cb7
BLAKE2b-256 b246ea761efad406b7cfcdbaf8bf8cafd536253be78cdf1e00fbe63966fe2bfe

See more details on using hashes here.

Provenance

The following attestation bundles were made for takopi_slack_plugin-0.1.3.tar.gz:

Publisher: workflow.yml on richardliang/takopi-slack-plugin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file takopi_slack_plugin-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for takopi_slack_plugin-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 81b6fa22ff909272e2b4a82589dc5beee12c4dfbb3c0c48628f5a2b6af6067f4
MD5 a8208eda53bcf1c59b6e8767d4315c43
BLAKE2b-256 ddbd3df68fb0a273177f0fde23ad950cc066f494667bd5f338e6c6f460faaf0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for takopi_slack_plugin-0.1.3-py3-none-any.whl:

Publisher: workflow.yml on richardliang/takopi-slack-plugin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page