Skip to content

Comments

feat(slack): add config validation enhancements#26

Closed
hrygo wants to merge 12 commits intomainfrom
feat/slack-config-validation
Closed

feat(slack): add config validation enhancements#26
hrygo wants to merge 12 commits intomainfrom
feat/slack-config-validation

Conversation

@hrygo
Copy link
Owner

@hrygo hrygo commented Feb 24, 2026

Summary

Enhance Slack configuration validation with format checks for tokens and addresses.

Changes

  • Validate bot token format (xoxb---*)
  • Validate app token format (xapp---*)
  • Validate signing secret length (min 32 chars) and alphanumeric format
  • Validate server address format

Context

Configuration validation is important for early error detection and better developer experience. This addresses the "配置验证" gap identified in the comparison report.

Testing

  • Test token format validation
  • Test signing secret validation
  • Test server address validation

Related

黄飞虹 and others added 12 commits February 25, 2026 01:12
…al communication

- Fix Socket Mode payload parsing: use "payload" field instead of "body"
- Add proper Slack API response validation (check "ok" field)
- Fix subtype filtering: allow file_share/bot_message, only skip message_changed/deleted
- Fix nil pointer panic in EngineMessageHandler by checking workDirFn and taskInstrFn
- Preserve original message metadata (channel_id, thread_ts) in StreamCallback for replies

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When bot is mentioned in a channel with @botName, Slack sends app_mention
event instead of regular message event. Register both handlers to support
both DMs and channel mentions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Slack bot now uses current working directory (HotPlex source) as workspace
- Other platforms continue using /tmp/hotplex-chatapps for isolation
- Add app_mention handler for @mentions in channels

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add SendAttachment method for sending files/images to Slack
- Add sendFileFromURL for external URL uploads
- Integrate with defaultSender to handle RichContent attachments
- Support thread replies for attachments
- Add engine.work_dir config option in slack.yaml
- Use "." (current directory) as default for HotPlex development
- Falls back to /tmp/hotplex-chatapps if not configured

This allows the Slack bot to operate on any directory specified in config,
making it easy to use for HotPlex development or other projects.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add comprehensive comparison analysis between HotPlex and OpenClaw Slack implementations
- Document 13 feature gaps across 6 categories (P0/P1/P2 priority)
- Include 3-phase implementation roadmap (14-20 weeks estimated)
- Identify technical debt risks in socket_mode.go and retry.go
- Reference: Issue #21
- Add expandPath helper function to expand ~ to absolute paths
- Update slack.yaml with engine.work_dir config option- Falls back to /tmp/hotplex-chatapps

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove duplicate s.handleEventsAPI call that caused double message processing
- Implement ACK response for Socket Mode events (required by Slack API)
- Slack expects envelope_id acknowledgment within 3 seconds

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add Reaction type to base.RichContent
- Add AddReaction method to Slack adapter
- Integrate reactions into defaultSender
- Add SlashCommand type
- Add slash command handler at /slack endpoint
- Add SetSlashCommandHandler for custom processing
- Validate bot token format (xoxb-*-*-*)
- Validate app token format (xapp-*-*-*)
- Validate signing secret length and format
- Validate server address format
@hrygo hrygo closed this Feb 24, 2026
@hrygo hrygo deleted the feat/slack-config-validation branch February 24, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slack 实现与 OpenClaw 对比报告:功能差距分析与建议

1 participant