Commit Graph
631 Commits
Author SHA1 Message Date
Xubin RenandGitHub dac4e39bcf Merge PR #4299: feat(cron): bind scheduled automations to sessions
feat(cron): bind scheduled automations to sessions
2026-06-13 00:07:55 +08:00
chengyongru e1ff0f37d9 fix: preserve WhatsApp forwarded metadata
maintainer edit: carry the bridge isForwarded flag into channel metadata so forwarded voice messages remain distinguishable after transcription.
2026-06-12 18:21:47 +08:00
chengyongru a50b3ac0f2 fix: harden cron session automation flows 2026-06-12 18:13:25 +08:00
chengyongru c4b64a4caf refactor: preserve origin session routing for cron 2026-06-12 14:21:09 +08:00
chengyongru 0ff8cd0cb3 fix: honor unified session for webui automations 2026-06-12 10:19:12 +08:00
2d9260cb9f feat(slack): add groupRequireMention for allowlist channels
Slack's groupPolicy could either restrict to specific channels
("allowlist") or require an @mention ("mention"), but not both: in
allowlist mode the bot replied to every message in approved channels.

Add a groupRequireMention flag so that, when groupPolicy is "allowlist",
the bot only responds in channels listed in groupAllowFrom AND only when
@mentioned. Mirrors Signal's group.requireMention. No effect for the
"mention"/"open" policies, so existing configs are unchanged.

Extract the mention check into _is_mention and reuse it from both the
mention and allowlist branches.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 00:23:27 +08:00
chengyongruandXubin Ren ffae1dca6d fix: keep Telegram streamed code blocks balanced
Maintainer edit: split final streamed Telegram markdown before rendering to HTML so long fenced code blocks do not produce unbalanced <pre><code> chunks while still respecting Telegram's rendered HTML limit.
2026-06-11 13:52:19 +08:00
axelray-devandXubin Ren a5a816abaf fix(telegram): move fenced-code-block splitting into Telegram-specific helper
Move the fenced-code-block-aware splitting logic out of the shared
split_message helper (used by Signal, Slack, Discord, Weixin, etc.)
and into a Telegram-specific _split_telegram_markdown function.

The shared split_message remains a plain-text chunker. The Telegram
channel now uses _split_telegram_markdown for its raw Markdown paths
that feed _markdown_to_telegram_html, preventing broken HTML rendering
when splits fall inside fenced code blocks.

Also fixes a regression where content beginning with whitespace before
a fence could emit a whitespace-only chunk.

Addresses review feedback on #4257.
2026-06-11 13:52:19 +08:00
chengyongruandXubin Ren 5d7f2e60c2 fix(feishu): lazy-load lark sdk during gateway startup 2026-06-10 18:09:27 +08:00
Xubin Ren 7186039be1 fix(websocket): limit final stream text to inline endings 2026-06-10 15:52:39 +08:00
4dd5b62f11 fix(websocket): always send text in stream_end when stream had content
The channel manager coalesces consecutive _stream_delta messages and
forwards a single merged message with _stream_end=True. In that path
no individual delta events ever reach the WebUI client, so the
stream_end frame is the only carrier of the text. The previous guard
only attached text when media-URL rewriting changed the string, which
silently dropped entire turns of plain-text output whenever the
agent generated tokens faster than the queue drained.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-10 15:52:39 +08:00
Xubin Ren 1432094bb5 refactor(webui): isolate fork websocket handler 2026-06-10 04:26:06 +08:00
Xubin Ren 916525f94a refactor(webui): shrink fork implementation 2026-06-10 04:26:06 +08:00
Xubin Ren 1f926e3769 refactor(webui): isolate chat fork creation 2026-06-10 04:26:06 +08:00
Xubin Ren 73d4b1cb2f feat(webui): persist fork boundary metadata 2026-06-10 04:26:06 +08:00
Bayern4ever-dotandXubin Ren 03bca4c0a9 feat(webui): add assistant reply fork-from-here 2026-06-10 04:26:06 +08:00
Flávio Veloso SoaresandXubin Ren 6de8d7f52e feat(email): add postActionExpunge option to gate broad IMAP expunge 2026-06-09 14:50:59 +08:00
Flávio Veloso SoaresandXubin Ren 1d683f0f18 style(email): fix import order via ruff 2026-06-09 14:50:59 +08:00
Flávio Veloso SoaresandXubin Ren b96ed1b7c6 docs(email): clarify _fetch_new_messages return docstring 2026-06-09 14:50:59 +08:00
Flávio Veloso SoaresandXubin Ren 4369eb20fc feat(email): support IMAP MOVE and UID expunge fallbacks 2026-06-09 14:50:59 +08:00
Flávio Veloso SoaresandXubin Ren ec5460d23e feat(email): add configurable post-action handling 2026-06-09 14:50:59 +08:00
Flávio Veloso SoaresandXubin Ren 85ab55aeee refactor(email): extract IMAP session helper 2026-06-09 14:50:59 +08:00
Xubin RenandGitHub 9c81280300 feat(transcription): add shared voice input support (#4232)
* feat(webui): add voice transcription input

* feat(webui): render ANSI output in code blocks

* refactor(webui): isolate voice recorder logic

* refactor(transcription): keep websocket ingress thin

* refactor(transcription): resolve channel audio settings on demand

* style(webui): neutralize voice waveform color

* feat(webui): add voice input tooltip

* feat(webui): add voice input keyboard shortcut

* fix(webui): distinguish voice shortcut platforms

* fix(webui): place voice button after model selector

* refactor(webui): share voice hold recording helpers

* fix(desktop): allow microphone voice input

* fix(webui): stabilize token usage month labels

* feat(webui): show voice input on settings overview

* fix(webui): label voice capability as recognition

* fix(webui): align capability overview status

* refactor(webui): isolate transcription socket handling

* fix(webui): soften silent voice waveform

* refactor(audio): clarify transcription service location

* docs(transcription): clarify audio and provider boundaries

* fix(exec): reduce session output polling flake
2026-06-09 01:08:49 +08:00
4f5f965f09 fix(whatsapp): handle LID group mentions (#2663)
Co-authored-by: Xubin Ren <52506698+Re-bin@users.noreply.github.com>
2026-06-07 18:02:39 +08:00
ab9f49970d feat(desktop): polish desktop shell and shared WebUI surfaces (#4195)
* feat(desktop): add native host scaffold

* feat(webui): track turns and usage in gateway

* feat(webui): polish desktop chat experience

* feat(apps): add ArcGIS and Joplin logos

* feat(desktop): polish shell and shared surfaces

* fix(webui): avoid preview chips for glob references

* test: align CI expectations for token fallback

* feat(webui): preview prompt rail entries

* feat(webui): add prompt navigator drawer

* style(webui): refine prompt navigator placement

* style(webui): align prompt navigator with header actions

* style(webui): simplify prompt navigator header

* refactor(webui): clean thread resource refresh

* feat(desktop): add native reply notifications

* fix(webui): preserve desktop restart and replay state

* fix(desktop): harden gateway proxy startup

* fix(web): fall back when readability is unavailable

* fix(desktop): hide window instead of closing on macos

* fix(webui): unify desktop header actions

* fix(webui): simplify prompt history rows

* fix(desktop): log notification delivery failures

* chore(desktop): clean source package artifacts

* fix(cron): support one-time relative reminders

* fix(webui): reveal scroll button in place

* Revert "fix(cron): support one-time relative reminders"

This reverts commit 4c4661da120a3c7283e0768412bae48604e7390b.

* refactor(webui): extract token usage heatmap

* docs(desktop): clarify contributor guides

---------

Co-authored-by: chengyongru <2755839590@qq.com>
2026-06-06 19:49:33 +08:00
Xubin Ren 6a0368b32f fix(telegram): route /skill command 2026-06-05 18:48:51 +08:00
chengyongruandXubin Ren 710d00a179 fix(webui): persist user messages for refresh 2026-06-05 16:13:51 +08:00
chengyongruandXubin Ren 3da68ac7fe Fix pairing for Weixin and Telegram DMs 2026-06-05 16:13:31 +08:00
chengyongruandXubin Ren c574b028c1 fix(feishu): allow punctuation after mention placeholders
maintainer edit: Keep the shared-prefix guard for Feishu numbered mention keys while still resolving placeholders followed by punctuation, matching the previous user-visible mention behavior.
2026-06-05 15:55:53 +08:00
Xubin Ren 894811db8b fix(feishu): strip leading bot mention before commands 2026-06-05 15:55:53 +08:00
yorkhellenandXubin Ren 7c3808327f fix(qq): send pairing codes for unauthorized C2C users 2026-06-04 10:42:51 +08:00
Nicolas BlondiauandXubin Ren cbf1ede179 fix(email): skip progress messages to prevent empty emails after tool calls 2026-06-03 15:01:47 +08:00
chengyongruandXubin Ren b2ae5d936f fix(email): bound outbound attachment handling
maintainer edit: apply the existing email attachment count and size limits to outbound media, and include visible fallback notes when an attachment cannot be sent.
2026-06-02 21:17:31 +08:00
PringlasandXubin Ren 25bb053206 feat(email): attach media files to outbound SMTP messages 2026-06-02 21:17:31 +08:00
chengyongruandXubin Ren 2a98360105 refactor: split WebUI gateway dependencies
Maintainer edit for PR 4115: rebase onto origin/main and split gateway HTTP routing from token, media, and workspace services so WebSocketChannel depends on explicit gateway services instead of GatewayHTTPHandler internals.

Preserve file edit channel capabilities and restore tools.restrict_to_workspace wiring through ChannelManager.
2026-06-02 17:14:38 +08:00
chengyongruandXubin Ren 2420826e05 fix: handler token issue also checks static token as fallback 2026-06-02 17:14:38 +08:00
chengyongruandXubin Ren 0acf7cd373 refactor: remove gateway-specific kwargs from WebSocketChannel 2026-06-02 17:14:38 +08:00
chengyongruandXubin Ren 1252550649 refactor: ChannelManager creates and injects GatewayHTTPHandler 2026-06-02 17:14:38 +08:00
chengyongruandXubin Ren e5eb08e3e5 refactor: WebSocketChannel accepts injected http_handler, update all tests 2026-06-02 17:14:38 +08:00
chengyongruandXubin Ren 22673c2a27 refactor: update import paths after ws_http move to webui/ 2026-06-02 17:14:38 +08:00
chengyongruandXubin Ren ca139c7031 refactor: move ws_http.py from channels/ to webui/ 2026-06-02 17:14:38 +08:00
chengyongruandXubin Ren 1a585288b2 refactor: extract GatewayHTTPHandler from WebSocketChannel
Extract all HTTP route handling (bootstrap, sessions, settings, media,
commands, sidebar state, static serving, token management) into a new
GatewayHTTPHandler class in nanobot/channels/ws_http.py.

WebSocketChannel is reduced from 1907 to 1372 lines (-28%), retaining
only WebSocket connection management and message dispatch.

No behavior change. 3730 tests pass, 0 failures.

Shared HTTP utility functions (path parsing, response builders, auth
helpers) now live in ws_http.py with websocket.py importing from there,
avoiding circular dependencies.

Backwards-compat property aliases on WebSocketChannel ensure existing
tests continue to work without modification.
2026-06-02 17:14:38 +08:00
Xubin Ren f382133bb4 refactor(webui): move media replay helpers out of websocket channel 2026-06-02 16:18:57 +08:00
Xubin Ren 8bc4a80035 fix(webui): suppress restart handshake noise 2026-06-02 16:18:57 +08:00
Xubin Ren 21c60b0c97 fix(webui): resign replayed assistant media 2026-06-02 16:18:57 +08:00
chengyongruandXubin Ren d5692bf94c fix(napcat): harden async handlers and action errors
maintainer edit: track background handler tasks, surface failed OneBot actions, reject image redirects, and add focused unit coverage for group routing and edge cases.
2026-06-02 14:10:10 +08:00
LZDQandXubin Ren 0c3063b78c Fix deadlock: get_group_member_info blocks receive loop 2026-06-02 14:10:10 +08:00
LZDQandXubin Ren b1a3053ceb Channel napcat by Claude 2026-06-02 14:10:10 +08:00
李明振andXubin Ren da0aafcfbd feat(dingtalk): add group_user_isolation to separate sessions per user in group chats
Add a new config option group_user_isolation (default: false) to the
DingTalk channel. When enabled, each user in a group chat gets their own
session while bot replies are still routed to the shared group chat.
2026-06-01 23:01:19 +08:00
chengyongruandXubin Ren ebc8c9faf9 chore: restore existing import order 2026-06-01 23:00:53 +08:00