feat(signal): add Signal channel via signal-cli#630
Open
achton wants to merge 7 commits intosipeed:mainfrom
Open
feat(signal): add Signal channel via signal-cli#630achton wants to merge 7 commits intosipeed:mainfrom
achton wants to merge 7 commits intosipeed:mainfrom
Conversation
|
Note: #603 also proposes native Signal support. Both address the same feature request. Suggesting the maintainer coordinate or pick one to avoid duplicated effort. |
7 tasks
Implements Signal messaging channel (sipeed#41) using signal-cli's HTTP API: - SSE event streaming for receiving messages - JSON-RPC for sending messages - Typing indicators with continuous loop - Message chunking for Signal's ~6000 char limit - Image/voice/file attachment handling via signal-cli HTTP API - Voice transcription via Groq (same pattern as Telegram/Discord) - Group chat support with configurable group_policy - DM policy (allowlist/open/disabled) - Compound senderID format (+phone|displayName) for Bindings matching - Automatic SSE reconnection on disconnect Config: SignalConfig with enabled, account, signal_cli_url, allow_from, dm_policy, group_policy fields. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signal doesn't interpret markdown natively. Convert **bold**, *italic*, and ~~strikethrough~~ to signal-cli textStyle ranges. Also strips heading markers and converts list markers to bullets. Follows the same pattern as Telegram's markdownToTelegramHTML but outputs signal-cli positional style ranges instead of HTML tags. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Table-driven tests covering bold, italic, strikethrough, unmatched markers, heading stripping, list markers, blockquotes, Danish characters, and mixed formatting with line-level patterns. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Pass compound senderID to HandleMessage() to fix dual allowlist check mismatch (same bug as Telegram sipeed#310) - Replace dm_policy/group_policy strings with dms_enabled/groups_enabled pointer bools to match upstream config conventions - Add MONOSPACE style support for inline code and code blocks - Add markdown link conversion [text](url) → text (url) - Add tests for extensionFromMIME and SSE event deserialization Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add Signal setup guide, config reference, and channel table entry. Follows the same collapsible <details> pattern as other channels. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
markdownToSignal() only converted dash list markers (- item) to bullets but not asterisk markers (* item). The leading * was passed to the italic parser which couldn't find a closing match, leaving a literal asterisk in the Signal message. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2a9fb90 to
76bb177
Compare
Align struct field padding in SignalConfig and signalEnvelope to satisfy golangci-lint gci formatting checks. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
Adds Signal as a messaging channel, implementing the signal-cli approach proposed in #41 (Option A).
PicoClaw connects to a signal-cli daemon running in HTTP mode. Inbound messages arrive via SSE (
/api/v1/events), outbound messages are sent via JSON-RPC (/api/v1/rpc). No CGO or additional compiled dependencies are needed in PicoClaw itself.Key design points:
+phone|DisplayName) — follows the same pattern as the Telegram channel for consistent allowlist behavior viaBaseChannel.IsAllowed()**bold**,*italic*,`code`,```blocks```,~~strike~~to signal-clitextStyleranges with correct UTF-16 code unit positionsgroups_enabled/dms_enabledas optional booleans (default: enabled when omitted), rather than hardcoding group behaviorisGroupChat()heuristic, MIME type extension mapping, and signal-cli SSE event deserialization🗣️ Type of Change
🤖 AI Code Generation
🔗 Related Issue
Closes #41
📚 Technical Context (Skip for Docs)
🧪 Test Environment
📸 Evidence (Optional)
Click to view startup and message handling logs
☑️ Checklist