@staff0rd/assist 0.669.0 → 0.671.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 CHANGED
@@ -67,7 +67,7 @@ After installation, the `assist` command will be available globally. You can als
67
67
  - `/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
68
68
  - `/journal` - Append a journal entry summarising recent work
69
69
  - `/next [id]` - Signal completion and chain into the next backlog item
70
- - `/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
70
+ - `/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. Asked for a thread of several messages, it composes all of them up front and previews the batch in a single `assist slack post --parts` call — a pane per message, in order — and posts nothing until every one is approved: the first message opens the thread and the rest follow under the `thread_ts` it returns, or all of them reply under the resolved `thread_ts` when `--thread` was given. A rejection posts nothing at all; the rejected message is revised in its working file and the whole batch re-previewed from the first message
71
71
  - `/standup` - Summarise recent journal entries as a standup update
72
72
  - `/subtask <text>` - Add a sub-task to the session's current backlog item
73
73
  - `/strip-code-comments` - Strip redundant comments from tracked source files
@@ -312,7 +312,8 @@ The Config tab of the sessions web dashboard never receives secret values: `GET
312
312
  - `assist seq auth remove <name>` - Remove a configured connection
313
313
  - `assist seq set-connection <name>` - Set the default Seq connection
314
314
  - `assist seq query <filter>` - Query Seq events (`-c <connection>`, `--json`, `-n <count>`, `--from <date>`, `--to <date>`)
315
- - `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 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
315
+ - `assist slack post [channel] --body <body|-> | --parts <file>... [--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 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
316
+ - `--parts <file>...` previews a whole thread — the files holding its messages, in thread order — so none of them is handed back until all of them are approved. Each part gets its own working file under `~/.assist/slack/` (`eng-1.md`, `eng-2.md`, …) and its own preview pane, popped in sequence and titled with the target and its position in the batch (`Post to #eng (2/3)`). Only after the last part is approved does the command print anything: a line naming the target, then every working-file path in thread order prefixed with its position (`2/3`), then a line saying how to thread them — without `--thread` part 1 opens the thread and the rest carry the `thread_ts` it returns, with `--thread` every part is a reply under the resolved `thread_ts`. The first rejection halts the batch: it exits non-zero naming that part's position, the reason, every inline comment with its excerpt, and that part's working file, and prints no paths — revise that file in place and re-run the whole batch, which re-previews from part 1. A missing or empty part file, or `--parts` together with `--body`, is an error raised before any pane opens
316
317
  - `assist sql auth add` - Add a new MSSQL connection
317
318
  - `assist sql auth list` - List configured SQL connections
318
319
  - `assist sql auth remove <name>` - Remove a configured connection
@@ -3,37 +3,50 @@ description: Preview a markdown message, then post it to a Slack channel
3
3
  allowed_args: "[channel] [--thread <ts-or-permalink>] <what to say>"
4
4
  ---
5
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.
6
+ Post a message, or a thread of them, 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
7
 
8
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
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`.
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 once and applies it to every message you preview.
11
11
 
12
- ## Step 1: compose the message
12
+ Decide up front whether the ask is one message or a thread of several. Nothing is posted until the whole batch is approved, so compose every message before the first preview — never preview one, post it, then compose the next.
13
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.
14
+ ## Step 1: compose every message
15
+
16
+ Write each 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
17
 
16
18
  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
19
 
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.
20
+ Write each message to its own scratch file with the Write tool rather than inlining it in a shell command — the markdown will contain quotes, backticks and newlines. For a thread, write all of them now, in thread order.
21
+
22
+ ## Step 2: preview them
19
23
 
20
- ## Step 2: preview it
24
+ One message:
21
25
 
22
26
  ```
23
27
  assist slack post '<channel>' [--thread '<ts-or-permalink>'] --body - < <scratch file>
24
28
  ```
25
29
 
26
- In an assist web session this renders the markdown in the preview pane for approve/reject. The command posts nothing either way.
30
+ A thread, in thread order:
31
+
32
+ ```
33
+ assist slack post '<channel>' [--thread '<ts-or-permalink>'] --parts <scratch file 1> <scratch file 2> ...
34
+ ```
35
+
36
+ In an assist web session this renders each message in the preview pane for approve/reject — one pane per part, in sequence, titled with the target and the part's position in the batch (`2/3`). The command posts nothing either way.
27
37
 
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. 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.
38
+ - **Approved (`--body`)** — 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. The line above it names the target channel, and the resolved `thread_ts` when `--thread` was passed.
39
+ - **Approved (`--parts`)** — only after the last part is approved does the command print anything: a line naming the target, then one `k/N <path>` line per part in thread order under `~/.assist/slack/`, then a line saying how to thread them. Those files, not your scratch files, are what get posted.
40
+ - **Rejected** — the command exits non-zero with the reason and any inline comments, and names the working file of the message that was rejected (with its position, for a batch). No path is handed back, so nothing from the batch is posted. Address every comment, rewrite that working file in place, and re-run the same command with that working file in place of the scratch file it came from — a batch re-previews from part 1. Do not post, and do not recompose the messages from scratch.
30
41
 
31
- Outside a web session there is no pane: the body passes straight through and the working file is written immediately.
42
+ Outside a web session there is no pane: the bodies pass straight through and the working files are written immediately.
32
43
 
33
- ## Step 3: post it
44
+ ## Step 3: post them
34
45
 
35
- Read the approved body from the path the command printed, then:
46
+ Read the approved bodies from the paths the command printed, then:
36
47
 
37
48
  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.
49
+ 2. Post each file's contents verbatim with `mcp__claude_ai_Slack__slack_send_message` (`channel_id`, `message`). Use `slack_send_message`, not `slack_send_message_draft`: the preview pane is the user's review.
50
+ - With `--thread`, every message carries `thread_ts` set to the ts the command printed.
51
+ - Without it, a batch is one new thread: post `1/N` to the channel with no `thread_ts`, then post `2/N` onwards in order, each with `thread_ts` set to the `ts` the first message returned.
52
+ 3. Report the permalink of the first message.