@staff0rd/assist 0.607.0 → 0.609.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/claude/commands/slack-post.md +39 -0
- package/claude/settings.json +2 -0
- package/dist/commands/sessions/web/bundle.js +2 -2
- package/dist/index.js +208 -84
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,6 +65,7 @@ After installation, the `assist` command will be available globally. You can als
|
|
|
65
65
|
- `/github [action] [ref] [args]` - GitHub issue actions: `view`, `edit`, `associate`, `update`, `started`, `done`, `help`. `[ref]` is optional — it resolves from the session's backlog item. A bare `/github <ref>` runs `edit`, which opens the issue in the web preview pane; outside a web session the command prints the issue to chat instead
|
|
66
66
|
- `/journal` - Append a journal entry summarising recent work
|
|
67
67
|
- `/next [id]` - Signal completion and chain into the next backlog item
|
|
68
|
+
- `/slack-post [channel] [--thread <ts-or-permalink>] <what to say>` - Compose a markdown message, preview it in the web pane via `assist slack post`, then post the approved body to that Slack channel with the Slack MCP connector and report the permalink. The channel falls back to `slack.channel`; `--thread` posts the message as a reply in that thread
|
|
68
69
|
- `/standup` - Summarise recent journal entries as a standup update
|
|
69
70
|
- `/subtask <text>` - Add a sub-task to the session's current backlog item
|
|
70
71
|
- `/strip-code-comments` - Strip redundant comments from tracked source files
|
|
@@ -296,6 +297,7 @@ The Config tab of the sessions web dashboard never receives secret values: `GET
|
|
|
296
297
|
- `assist seq auth remove <name>` - Remove a configured connection
|
|
297
298
|
- `assist seq set-connection <name>` - Set the default Seq connection
|
|
298
299
|
- `assist seq query <filter>` - Query Seq events (`-c <connection>`, `--json`, `-n <count>`, `--from <date>`, `--to <date>`)
|
|
300
|
+
- `assist slack post [channel] --body <body|-> [--thread <ts-or-permalink>]` - Preview a markdown message bound for a Slack channel; `--body -` reads it from stdin. The channel falls back to `slack.channel` when the argument is omitted, and the command errors naming the `assist config set slack.channel` setter when neither is given. `--thread` takes a message ts (`1712345678.123456`) or a Slack archives permalink (`.../archives/C012AB3CD/p1712345678123456`, whose `thread_ts` query parameter wins when present, so a link to a reply resolves to its parent) and resolves it to the `thread_ts` the reply is posted under; anything else is a usage error. Posting is MCP-only, so the command never posts: in an assist web session it renders the markdown in the preview pane for approve/reject (with inline comments), and on approval writes the approved body — including any edit made in the pane — to a working file under `~/.assist/slack/`, printing its path on the last line — preceded by the resolved `thread_ts` — for `/slack-post` to send. On rejection it exits non-zero with the reason and any inline comments, leaving the previewed markdown in that working file to revise in place and re-preview. Outside a web session there is no preview and the body passes straight through
|
|
299
301
|
- `assist sql auth add` - Add a new MSSQL connection
|
|
300
302
|
- `assist sql auth list` - List configured SQL connections
|
|
301
303
|
- `assist sql auth remove <name>` - Remove a configured connection
|
|
@@ -424,6 +426,7 @@ Web server changes only need the `assist sessions` process restarted — session
|
|
|
424
426
|
|
|
425
427
|
## Other config keys
|
|
426
428
|
|
|
429
|
+
- `slack.channel` — the Slack channel (e.g. `#example`) that `assist slack post` and `/slack-post` target when no channel argument is given
|
|
427
430
|
- `prs.slack` — the Slack channel (e.g. `#example`) that `/prs-slack` posts pull requests to via the Slack MCP connector
|
|
428
431
|
- `prs.required` — when `true` (default `false`), `assist backlog run` cuts and records a fresh branch for a story that has no recorded branch at run start, so a new story never inherits the previous one's branch
|
|
429
432
|
- `prs.promptJira` — when `true` (default `false`), the `assist prs raise --help` `--resolves` guidance instructs asking the user for a Jira key
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Preview a markdown message, then post it to a Slack channel
|
|
3
|
+
allowed_args: "[channel] [--thread <ts-or-permalink>] <what to say>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Post a message to Slack on the user's behalf. `assist slack post` owns the preview and the approval; you own composing the markdown and sending it.
|
|
7
|
+
|
|
8
|
+
`$ARGUMENTS` may open with the target channel — `#name`, a bare name, or a channel id — followed by what the message should say. When no channel is given, omit it from the command and let `assist slack post` fall back to the `slack.channel` config key; if it errors because neither is set, pass on the setter it names rather than guessing a channel.
|
|
9
|
+
|
|
10
|
+
A `--thread <ts-or-permalink>` argument means the message is a reply: pass it straight through to `assist slack post`. The reference is either a message ts (`1712345678.123456`) or a Slack archives permalink — the command resolves it and prints the resulting `thread_ts`.
|
|
11
|
+
|
|
12
|
+
## Step 1: compose the message
|
|
13
|
+
|
|
14
|
+
Write the message as standard markdown. `slack_send_message` renders bold, italic, code, strikethrough, blockquotes, lists, links, code blocks (with a language specifier), tables and headers as they are, capped at 5000 characters — so no conversion to Slack's `*bold*` dialect, and no `<url|text>` links.
|
|
15
|
+
|
|
16
|
+
State only the confirmed conclusion and the facts behind it. No hedging, no speculative next steps, no pleasantries. Match the scope of what was asked.
|
|
17
|
+
|
|
18
|
+
Write it to a scratch file with the Write tool rather than inlining it in a shell command — the markdown will contain quotes, backticks and newlines.
|
|
19
|
+
|
|
20
|
+
## Step 2: preview it
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
assist slack post '<channel>' [--thread '<ts-or-permalink>'] --body - < <scratch file>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
In an assist web session this renders the markdown in the preview pane for approve/reject. The command posts nothing either way.
|
|
27
|
+
|
|
28
|
+
- **Approved** — the last line of stdout is the path to the approved body under `~/.assist/slack/`. That file, not your scratch file, is what gets posted: it carries any edit made in the pane. The line above it names the target channel, and the resolved `thread_ts` when `--thread` was passed.
|
|
29
|
+
- **Rejected** — the command exits non-zero with the reason and any inline comments, and names the same working file. Address every comment, rewrite that file in place, and re-run the preview against it (`assist slack post '<channel>' --body - < <working file>`). Do not post, and do not recompose the message from scratch.
|
|
30
|
+
|
|
31
|
+
Outside a web session there is no pane: the body passes straight through and the working file is written immediately.
|
|
32
|
+
|
|
33
|
+
## Step 3: post it
|
|
34
|
+
|
|
35
|
+
Read the approved body from the path the command printed, then:
|
|
36
|
+
|
|
37
|
+
1. Resolve the channel to its id with `mcp__claude_ai_Slack__slack_search_channels` — use the channel the command's `Approved for ...` line names, which is the `slack.channel` default when you passed no argument — passing `channel_types: "public_channel,private_channel"` so private channels resolve too. If the query returns no match, or more than one plausible match, stop and ask the user which channel to use — do not guess.
|
|
38
|
+
2. Post the file's contents verbatim with `mcp__claude_ai_Slack__slack_send_message` (`channel_id`, `message`), adding `thread_ts` set to the ts the command printed when it printed one. Use `slack_send_message`, not `slack_send_message_draft`: the preview pane is the user's review.
|
|
39
|
+
3. Report the permalink it returns.
|
package/claude/settings.json
CHANGED