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
- file transfer: upload files into a project or fetch files/directories back
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) - for file transfer, add
files:readandfiles:write - slack app token (
xapp-) withconnections: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.
- create an app-level token with
connections:write - add the bot scopes listed above and install the app
- enable events for
app_mentionplus the rightmessage.*event for your channel type - enable interactivity & shortcuts, create a slash command (for example
/takopi), and optionally add dedicated commands like/takopi-previewfor common plugins plus message shortcuts with callback idtakopi:<plugin_id> - 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"
[transports.slack.files]
enabled = false
auto_put = true
auto_put_mode = "upload"
uploads_dir = "incoming"
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.
file transfer (requires files:read + files:write scopes):
/file put path/to/file.txt
/file get path/to/dir/
attach a file to /file put ... to upload it. audio file uploads can be
uploaded like any other file.
when auto_put_mode = "prompt", captions are used as prompts and include an
[uploaded files] annotation.
file transfers require a project context; use /project or @branch first.
for opinionated gating, see docs/AGENTS.example.md and docs/GATING_README.md, and
customize ~/.codex/AGENTS.md.
license
mit
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file takopi_slack_plugin-0.2.0.tar.gz.
File metadata
- Download URL: takopi_slack_plugin-0.2.0.tar.gz
- Upload date:
- Size: 26.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3db8ba0d1cd496e63b7ef70f764ece9eb7f0af7ac4a326bf377d87c92be2227a
|
|
| MD5 |
0cb8b362e49d50cee2e7c899cd6efae3
|
|
| BLAKE2b-256 |
f01302e8eb1d71abc427f7c5fc7fefd400a27947ded9c45ad19ebb2a3f2dd020
|
Provenance
The following attestation bundles were made for takopi_slack_plugin-0.2.0.tar.gz:
Publisher:
workflow.yml on richardliang/takopi-slack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
takopi_slack_plugin-0.2.0.tar.gz -
Subject digest:
3db8ba0d1cd496e63b7ef70f764ece9eb7f0af7ac4a326bf377d87c92be2227a - Sigstore transparency entry: 850081722
- Sigstore integration time:
-
Permalink:
richardliang/takopi-slack@c0f6e474bac93af8d473aa2ce47dd2a118641f8e -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/richardliang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@c0f6e474bac93af8d473aa2ce47dd2a118641f8e -
Trigger Event:
push
-
Statement type:
File details
Details for the file takopi_slack_plugin-0.2.0-py3-none-any.whl.
File metadata
- Download URL: takopi_slack_plugin-0.2.0-py3-none-any.whl
- Upload date:
- Size: 33.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d778ee7830a15ccd59d9c5f1f8c1e13c8cc171840742b120243ae17920f8025
|
|
| MD5 |
7cb8d1475256b3000f72765951043188
|
|
| BLAKE2b-256 |
bb6a9ef5263d518a401ab1d9017a2148c85e24b608443fe6f7af9c37bcf29604
|
Provenance
The following attestation bundles were made for takopi_slack_plugin-0.2.0-py3-none-any.whl:
Publisher:
workflow.yml on richardliang/takopi-slack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
takopi_slack_plugin-0.2.0-py3-none-any.whl -
Subject digest:
2d778ee7830a15ccd59d9c5f1f8c1e13c8cc171840742b120243ae17920f8025 - Sigstore transparency entry: 850081749
- Sigstore integration time:
-
Permalink:
richardliang/takopi-slack@c0f6e474bac93af8d473aa2ce47dd2a118641f8e -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/richardliang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@c0f6e474bac93af8d473aa2ce47dd2a118641f8e -
Trigger Event:
push
-
Statement type: