[PR #187] [MERGED] feat: add slack-cli subtree and subtree sync script #186

Closed
opened 2026-10-27 21:10:24 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/Comfy-PR/pull/187
Author: @snomiao
Created: 4/2/2026
Status: ✅ Merged
Merged: 4/5/2026
Merged by: @snomiao

Base: main ← Head: sno-bot


📝 Commits (10+)

  • 22b2c99 refactor: rename msgs.yaml to inbox.yaml for clarity
  • 22c5580 Squashed 'lib/slack-cli/' content from commit 0e5b912
  • 77898c2 Merge commit '22c558089a' as 'lib/slack-cli'
  • 30b9f3e feat: add subtree sync script and slack-cli subtree
  • e0abd3e fix: extract Slack update fn, add throttling, fix final update and input drain cleanup
  • ace0f4f fix(slack-cli): use shared reqwest Client via LazyLock for connection pooling
  • cf0707c fix(slack-cli): use valid Slack Block Kit section/mrkdwn instead of invalid markdown type
  • b8669f1 feat(slack-cli): add TS utility layer with URL parsing, markdown conversion, caching, and safe messaging
  • e481a94 feat: add prbot feedback command — posts to private #prbot-feedback Slack channel
  • 771e1d5 feat(feedback): auto-detect repo URL and CLI version in feedback posts

📊 Changes

28 files changed (+4007 additions, -325 deletions)

View changed files

📝 CLAUDE.md (+36 -0)
📝 bot/cli.ts (+48 -0)
📝 bot/slack-bot.ts (+249 -325)
📝 bun.lock (+3 -0)
📝 inbox.yaml (+0 -0)
➕ lib/slack-cli/.github/workflows/build.yml (+111 -0)
➕ lib/slack-cli/.gitignore (+4 -0)
➕ lib/slack-cli/Cargo.lock (+2146 -0)
➕ lib/slack-cli/Cargo.toml (+27 -0)
➕ lib/slack-cli/LICENSE (+21 -0)
➕ lib/slack-cli/README.md (+71 -0)
➕ lib/slack-cli/build.rs (+5 -0)
➕ lib/slack-cli/bun.lock (+231 -0)
➕ lib/slack-cli/index.d.ts (+22 -0)
➕ lib/slack-cli/index.js (+24 -0)
➕ lib/slack-cli/package.json (+24 -0)
➕ lib/slack-cli/src/lib.rs (+80 -0)
➕ lib/slack-cli/src/main.rs (+220 -0)
➕ lib/slack-cli/src/slack.rs (+198 -0)
➕ lib/slack-cli/ts/cached-client.ts (+44 -0)

...and 8 more files

📄 Description

Changes

1. Git subtree: slack-cli

  • Added snomiao/slack-cli as git subtree at lib/slack-cli/
  • Fixed reqwest Client pooling (shared via LazyLock)
  • Fixed invalid Slack Block Kit type (markdown → section/mrkdwn)

2. Subtree sync tooling

  • Added scripts/subtree-sync.sh for pulling/pushing all configured subtrees
  • Added subtree:pull and subtree:push npm scripts

3. Slack bot: migrate to Claude Agent SDK

  • Replaced claude-yes process spawning with @anthropic-ai/claude-agent-sdk (query() API)
  • Structured SDK message processing (assistant text, result events)
  • Extracted sendSlackUpdate() with 10s throttle to avoid Slack rate limits and LLM cost
  • Fixed final Slack update not running (interval was cleared before update)
  • Added abort controller cleanup for input drain on task completion
  • Renamed msgs.yaml → inbox.yaml

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/Comfy-PR/pull/187 **Author:** [@snomiao](https://github.com/snomiao) **Created:** 4/2/2026 **Status:** ✅ Merged **Merged:** 4/5/2026 **Merged by:** [@snomiao](https://github.com/snomiao) **Base:** `main` ← **Head:** `sno-bot` --- ### 📝 Commits (10+) - [`22b2c99`](https://github.com/Comfy-Org/Comfy-PR/commit/22b2c996fb7350faef0ada19dbdb97839496f62a) refactor: rename msgs.yaml to inbox.yaml for clarity - [`22c5580`](https://github.com/Comfy-Org/Comfy-PR/commit/22c558089aa94d1bbc42e28cd7ea0cb0dc825b5e) Squashed 'lib/slack-cli/' content from commit 0e5b912 - [`77898c2`](https://github.com/Comfy-Org/Comfy-PR/commit/77898c2ce1b324223444a9d057ba2ea5b41f3203) Merge commit '22c558089aa94d1bbc42e28cd7ea0cb0dc825b5e' as 'lib/slack-cli' - [`30b9f3e`](https://github.com/Comfy-Org/Comfy-PR/commit/30b9f3e3977c7f305892a2efd0e5333d959b66c3) feat: add subtree sync script and slack-cli subtree - [`e0abd3e`](https://github.com/Comfy-Org/Comfy-PR/commit/e0abd3ea246258a39adceff2caba945cdcd5f481) fix: extract Slack update fn, add throttling, fix final update and input drain cleanup - [`ace0f4f`](https://github.com/Comfy-Org/Comfy-PR/commit/ace0f4f523a1ad71e176747b07c40483b00d3ca3) fix(slack-cli): use shared reqwest Client via LazyLock for connection pooling - [`cf0707c`](https://github.com/Comfy-Org/Comfy-PR/commit/cf0707c53b27e87ae732da8e3e61bb54baf44ae2) fix(slack-cli): use valid Slack Block Kit section/mrkdwn instead of invalid markdown type - [`b8669f1`](https://github.com/Comfy-Org/Comfy-PR/commit/b8669f17ee1cb509915f3cd5a552a1e9ed6c6061) feat(slack-cli): add TS utility layer with URL parsing, markdown conversion, caching, and safe messaging - [`e481a94`](https://github.com/Comfy-Org/Comfy-PR/commit/e481a9439ec270cfec0975ef39d96ecc09375ce8) feat: add prbot feedback command — posts to private #prbot-feedback Slack channel - [`771e1d5`](https://github.com/Comfy-Org/Comfy-PR/commit/771e1d53afa93825fab6d75b664dbaed285a9bd5) feat(feedback): auto-detect repo URL and CLI version in feedback posts ### 📊 Changes **28 files changed** (+4007 additions, -325 deletions) <details> <summary>View changed files</summary> 📝 `CLAUDE.md` (+36 -0) 📝 `bot/cli.ts` (+48 -0) 📝 `bot/slack-bot.ts` (+249 -325) 📝 `bun.lock` (+3 -0) 📝 `inbox.yaml` (+0 -0) ➕ `lib/slack-cli/.github/workflows/build.yml` (+111 -0) ➕ `lib/slack-cli/.gitignore` (+4 -0) ➕ `lib/slack-cli/Cargo.lock` (+2146 -0) ➕ `lib/slack-cli/Cargo.toml` (+27 -0) ➕ `lib/slack-cli/LICENSE` (+21 -0) ➕ `lib/slack-cli/README.md` (+71 -0) ➕ `lib/slack-cli/build.rs` (+5 -0) ➕ `lib/slack-cli/bun.lock` (+231 -0) ➕ `lib/slack-cli/index.d.ts` (+22 -0) ➕ `lib/slack-cli/index.js` (+24 -0) ➕ `lib/slack-cli/package.json` (+24 -0) ➕ `lib/slack-cli/src/lib.rs` (+80 -0) ➕ `lib/slack-cli/src/main.rs` (+220 -0) ➕ `lib/slack-cli/src/slack.rs` (+198 -0) ➕ `lib/slack-cli/ts/cached-client.ts` (+44 -0) _...and 8 more files_ </details> ### 📄 Description ## Changes ### 1. Git subtree: slack-cli - Added `snomiao/slack-cli` as git subtree at `lib/slack-cli/` - Fixed reqwest Client pooling (shared via `LazyLock`) - Fixed invalid Slack Block Kit type (`markdown` → `section/mrkdwn`) ### 2. Subtree sync tooling - Added `scripts/subtree-sync.sh` for pulling/pushing all configured subtrees - Added `subtree:pull` and `subtree:push` npm scripts ### 3. Slack bot: migrate to Claude Agent SDK - Replaced `claude-yes` process spawning with `@anthropic-ai/claude-agent-sdk` (`query()` API) - Structured SDK message processing (assistant text, result events) - Extracted `sendSlackUpdate()` with 10s throttle to avoid Slack rate limits and LLM cost - Fixed final Slack update not running (interval was cleared before update) - Added abort controller cleanup for input drain on task completion - Renamed `msgs.yaml` → `inbox.yaml` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-27 21:10:24 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/Comfy-PR#186
No description provided.