@amykit/plugin-slack
v0.6.0
Published
A Slack thread per piece of work, over the Web API, as the conversation port.
Readme
@amykit/plugin-slack
A Slack thread per piece of work, over the Web API, as the conversation port.
A plugin for amy. It provides the conversation port.
Install
# Add @amykit/plugin-slack to amy.yaml, then install configured plugins:
amy init --installThen name it in ~/.amy/config.yaml:
workflows:
your-profile:
plugins:
- "@amykit/plugin-slack"Configuration
plugins:
"@amykit/plugin-slack":
channel: <string>
defaultRetryAfterSeconds: 60
directory: "slack"
maxRateLimitRetries: 5
operator: <string>
retentionDays: 30
token: <string>| Setting | Type | Required | Default | What it is |
| :-- | :-- | :-- | :-- | :-- |
| channel | string | yes | | the channel id every work thread opens in, such as C0XXXXXXX — an id, not a name |
| defaultRetryAfterSeconds | number | no | 60 | how long to wait after a 429 that carries no Retry-After; one names its own wait, and that wins |
| directory | string | no | slack | where each work item's thread is remembered, relative to the state directory |
| maxRateLimitRetries | number | no | 5 | how many times a call Slack rate limits (HTTP 429) is waited out and tried again before it fails |
| operator | string | yes | | the user id, such as U0XXXXXXX, whose replies are answers; everybody else's are ignored |
| retentionDays | number | no | 30 | days a downloaded file or a thread's memory stays unused before it is pruned, 0 to keep everything. A pruned file is fetched again when its reply is read; a pruned thread means the next question opens a new one |
| token | string | yes | | where the bot token lives: env:SLACK_BOT_TOKEN or file:<path>#<KEY>, never the token itself |
Every field is checked at boot against the schema this package declares. A key that is not one of the above is a refusal naming the plugin and the key, not a setting that silently never applied.
Where the reasoning is
Licence
MIT
