Commit Graph

28 Commits

Author SHA1 Message Date
Hoshina
1fcf3fde0f style: fix format 2026-02-14 17:23:18 +08:00
Hoshina
7fa641a2ed feat: add OneBot channel support 2026-02-14 16:50:21 +08:00
ex-takashima
ac79a23e0a style: fix gofmt formatting (CRLF -> LF)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 11:21:47 +09:00
ex-takashima
aa7a8b89c3 merge: resolve conflict with upstream main
Merge upstream changes (HeartbeatConfig addition) alongside LINEConfig.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 10:47:06 +09:00
ex-takashima
f294a71bc5 feat(channels): add LINE Official Account channel support
Add LINE Messaging API as the 9th messaging channel using HTTP Webhook.
Supports text/image/audio messages, group chat @mention detection,
reply with quote, and loading animation.

- No external SDK required (standard library only)
- HMAC-SHA256 webhook signature verification
- Reply Token (free) with Push API fallback
- Group chat: respond only when @mentioned
- Quote original message in replies using quoteToken

Closes #146

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 10:01:20 +09:00
lxowalle
1aea912fcd Merge pull request #83 from carzygod/main
update telegram username support
2026-02-14 00:49:14 +08:00
zeo
1e17bac9f0 fix: correct index bug in extractCodeBlocks and extractInlineCodes
The previous implementation used len(codes)-1 in ReplaceAllStringFunc,
which caused all placeholders to point to the same (last) index.
This resulted in only the last code block being displayed correctly
when multiple code blocks were present in a message.

Now using a proper counter variable that increments for each match,
ensuring each code block gets a unique placeholder index.
2026-02-13 21:38:14 +08:00
Meng Zhuo
584a3dcc87 misc: fmt code 2026-02-13 17:51:47 +08:00
yinwm
8851152cbd refactor(tools): extract shared logic for internal channels and tool definitions
- Add constants package with IsInternalChannel helper to centralize internal channel checks across agent, channels, and heartbeat services
- Add ToProviderDefs method to ToolRegistry to consolidate tool definition conversion logic used in agent loop and tool loop
- Refactor SubagentTool.Execute to use RunToolLoop for consistent tool execution with iteration tracking
- Remove duplicate inline map definitions and type assertion code throughout codebase
2026-02-13 15:05:16 +08:00
yinwm
4dfa133cb8 refactor(heartbeat): add configurable interval and channel-aware routing
feat(config): add heartbeat interval configuration with default 30 minutes

feat(state): migrate state file from workspace root to state directory

feat(channels): skip internal channels in outbound dispatcher

feat(agent): record last active channel for heartbeat context

refactor(subagent): use configurable default model instead of provider default
2026-02-13 11:13:32 +08:00
Wikig
875a16d2d6 update telegram username support 2026-02-13 02:09:59 +08:00
mxrain
1d143fa10a feat: add Telegram proxy support and flexible allow_from matching
- Add proxy config field for Telegram channel to support HTTP/SOCKS proxies
- Use telego.WithHTTPClient to route all Telegram API requests through proxy
- Add FlexibleStringSlice type so allow_from accepts both strings and numbers
- Improve IsAllowed to match numeric ID, username, and @username formats
- Update config.example.json with proxy field
2026-02-12 22:38:47 +08:00
Wutachi
d7da39d62b Fix telegram channel permission check 2026-02-12 02:39:55 -03:00
yinwm
5c8626f07b refactor(channels): consolidate media handling and improve resource cleanup
Extract common file download and audio detection logic to utils package,
implement consistent temp file cleanup with defer, add allowlist checks
before downloading attachments, and improve context management across
Discord, Slack, and Telegram channels. Replace logging with structured
logger and prevent context leaks in transcription and thinking animations.
2026-02-12 12:46:28 +08:00
yinwm
fe4962794d Merge branch 'main' into telegram-using-telego 2026-02-12 12:06:48 +08:00
yinwm
44e33d8b1c Merge branch 'main' into issue-31-feat-add-slack-channel-integration-with-socket-mode-threads-reactions-and-slash-commands 2026-02-12 11:59:05 +08:00
Artem Yadelskyi
ca189588e6 feat(telegram): Use Telego instead of go-telegram-bot-api 2026-02-11 23:51:18 +02:00
Cory LaNou
5eec80c654 feat(channels): add Slack channel integration with Socket Mode
Add Slack as a messaging channel using Socket Mode (WebSocket), bringing
the total supported channels to 8. Features include bidirectional
messaging, thread support with per-thread session context, @mention
handling, ack reactions (👀/), slash commands,
file/attachment support with Groq Whisper audio transcription, and
allowlist filtering by Slack user ID.

Closes #31

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 12:48:32 -06:00
Together
f12c337965 Remove duplicate truncate functions, reuse utils.Truncate
Multiple packages had their own private truncate implementations:
- channels/telegram.go: truncateString (byte-based, no "...")
- channels/dingtalk.go: truncateStringDingTalk (byte-based, no "...")
- voice/transcriber.go: truncateText (byte-based, with "...")

All three are functionally equivalent to the existing utils.Truncate,
which already handles rune-safe truncation and appends "..." correctly.

Replace all private copies with utils.Truncate and delete the dead code.
2026-02-12 00:46:48 +08:00
Harshdeep Sharma
9ec84c6630 Fix typos and update API keys in README 2026-02-11 20:46:01 +08:00
yinwm
4bc9e2d768 fix(cron): add one-time reminders and fix data paths to workspace
- Add at_seconds parameter for one-time reminders (e.g., "remind me in 10 minutes")
- Update every_seconds description to emphasize recurring-only usage
- Route cron delivery: deliver=true sends directly, deliver=false uses agent
- Fix cron data path from ~/.picoclaw/cron to workspace/cron
- Fix sessions path from workspace/../sessions to workspace/sessions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 20:31:41 +08:00
lxowalle
8c8daf64ef Merge branch 'pr-12' 2026-02-11 19:47:11 +08:00
yinwm
2b3de5cae5 add QQ channel support 2026-02-11 00:00:53 +08:00
w0x7ce
c5f6bec44b feat: Add DingTalk channel support via Stream Mode
- Add pkg/channels/dingtalk.go with WebSocket Stream Mode
- Add DingTalkConfig to config.go
- Register DingTalk in manager.go
- Update README with DingTalk setup instructions
- Add open-dingtalk/dingtalk-stream-sdk-go v0.9.1 dependency
2026-02-10 21:33:55 +08:00
lxowalle
9936dbce52 * Discord & Telegram support ASR through groq 2026-02-10 17:11:42 +08:00
Guoguo
f3f7ca7851 fix: enable Feishu message flow 2026-02-10 15:20:00 +08:00
Danieldd28
2df60b2fa3 feat: make context compression dynamic and add thinking animation
- Implement dynamic context window awareness for compression thresholds
- Add 'Thinking' animation for Telegram channel with auto-edit response
- Refactor summarization to handle multi-part batches and oversized messages
2026-02-10 02:00:57 +07:00
lxowalle
e17693b17c * First commit 2026-02-09 19:20:19 +08:00