| Files | Last commit | Last update |
|---|---|---|
fix(context): truncate history by complete user turns (#11316) * fix(context): truncate history by complete user turns * fix(context): preserve internal turn boundaries | 5 days ago | |
feat: add portable message buttons (#9809) * fix: handle DingTalk app creation status * feat: add portable message buttons * test: mark command group messages as non-interactive * feat: add button action timeouts and rename plugin filter * feat: show bilingual notices for expired button actions * refactor: nest button actions and styles under Button * docs: describe current button API without draft history * docs: list supported button platforms | 29 days ago | |
fix: forward KOOK voice cards to speech-to-text (#11307) * fix: forward KOOK voice cards to speech-to-text * fix: resolve KOOK voice audio on first read | 6 days ago | |
feat: improve MCP server setup and namespace tools (#11408) * feat: improve MCP server setup and namespace tools * test: trim MCP transport coverage * refactor: derive MCP tool namespaces from the current server name * fix: lock MCP server names in the edit dialog * feat: surface saved tool settings without legacy name matching * feat: stage removal of unlisted persona tools * fix: clarify the unavailable persona tools heading * feat: delete saved settings for unregistered tools | 1 day ago | |
fix: isolate test configuration from local AstrBot data (#11231) * fix: isolate test configuration from local AstrBot data * fix: release test database handles before Windows cleanup | 11 days ago | |
feat(install): add multilingual setup and mainland China mirrors (#10629) * feat(install): add multilingual setup and mainland China mirrors * fix(install): support PowerShell 5.1 and Invoke-Expression * fix(install): support BOM-free PowerShell pipeline execution * fix(install): configure UTF-8 console output * fix(install): set Windows console code page internally * fix(install): keep IEX bootstrap menu ASCII-only * fix(install): default language selection to English * test(install): cover language source defaults * fix(test): escape PowerShell assertion patterns * fix(install): restore localized language menu * fix(install): list English as first language * fix(install): put English first in language prompt * feat(install): add indented AstrBot installer header * fix(install): apply indentation consistently * feat(install): show AstrBot startup commands * docs(install): clarify AstrBot startup steps * feat(install): fall back from Python mirror * fix(install): keep Windows setup in one console * ci: run install tests in fixed shells * fix(install): tolerate a removed current directory * docs: simplify script deployment instructions * fix(install): align Bash wizard with PowerShell flow * fix(install): refresh shell before manual startup * docs: rename deployment sidebar entries * fix: restore PowerShell 5.1 installer compatibility * test: isolate reboot thread mock from asyncio executor * test: shorten long prompt IDs for Windows * fix: keep completed traces closed when update timestamps collide | 1 month ago | |
fix(context): truncate history by complete user turns (#11316) * fix(context): truncate history by complete user turns * fix(context): preserve internal turn boundaries | 5 days ago | |
fix: unify media reference handling (#8764) * fix: unify media reference handling * fix: accept bare base64 record media refs * chore: update agents.md * fix: unify file URI handling across media components and utilities * fix: unify media reference type handling with MediaRefStr alias * Potential fix for pull request finding 'CodeQL / Incomplete URL substring sanitization' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Update astrbot/core/platform/sources/discord/discord_platform_adapter.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fix: unify media handling and improve base64 decoding across components * fix: simplify client_kwargs type definition and enhance media message handling in platform adapter * fix: unify media utility documentation and enhance function descriptions * perf: drop "pilk" requirement, improve audio outbound for tencent-related IM apps which using silk * fix: unify Tencent Silk audio handling and enhance media resolver functionality --- - Centralize media reference materialization and base64 resolution for local paths, http(s), base64://, data URIs, and legacy bare base64 payloads. - Normalize incoming Record audio to wav and Image media to temporary jpg during preprocess, with event-scoped cleanup. - Reuse the shared media resolver across OpenAI, Gemini, Anthropic, MiMo, DeerFlow, STT, and platform media paths while sanitizing logs and cleaning temporary conversion outputs. - Ensure generated TTS audio is tracked for cleanup after the event finishes. fix #8676 fix #8543 fix #7588 fix #7580 fix #8030 fix #8034 fix #7461 fix #7565 fix #6509 fix #7144 fix #7795 --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> | 5 months ago | |
fix: preserve API key headers for Anthropic-compatible providers (#10787) | 1 month ago | |
fix(anthropic): concatenate multiple text blocks in non-streaming responses (#11057) Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> | 20 days ago | |
fix: isolate test configuration from local AstrBot data (#11231) * fix: isolate test configuration from local AstrBot data * fix: release test database handles before Windows cleanup | 11 days ago | |
refactor: run built-in agents through runtime sessions (#11052) | 21 days ago | |
test: prune low-value and duplicate cases from audited suites (#11005) - remove stdlib self-tests, docs snapshots, and redundant coverage - parameterize timeout, image, download, CLI, reply, and backoff cases - merge System One template defaults and assert unknown provider no-op 5311 passed, 35 skipped (was 5345 passed) | 24 days ago | |
refactor: decouple interactive message views from WebChat (#11380) * refactor(chatui): store interactive views in the main database * refactor(chatui): initialize tables directly in the main database * refactor(chatui): use platform-neutral table names for interactive views * refactor(interactive-ui): decouple view messages from WebChat * fix(interactive-ui): preserve card sources and include them in backups * refactor(interactive-ui)!: remove the old ChatUI import path | 3 days ago | |
fix(provider): align Bailian rerank protocol with endpoint (#9413) | 4 months ago | |
test: prune low-value and duplicate cases from audited suites (#11005) - remove stdlib self-tests, docs snapshots, and redundant coverage - parameterize timeout, image, download, CLI, reply, and backoff cases - merge System One template defaults and assert unknown provider no-op 5311 passed, 35 skipped (was 5345 passed) | 24 days ago | |
test: prune low-value and duplicate cases from audited suites (#11005) - remove stdlib self-tests, docs snapshots, and redundant coverage - parameterize timeout, image, download, CLI, reply, and backoff cases - merge System One template defaults and assert unknown provider no-op 5311 passed, 35 skipped (was 5345 passed) | 24 days ago | |
feat: add built-in skill creator and document skills (#9517) * feat: add builtin skill creator * feat: add builtin PDF skill * feat: add builtin office skills * fix: align closed capability status labels | 3 months ago | |
refactor: decouple interactive message views from WebChat (#11380) * refactor(chatui): store interactive views in the main database * refactor(chatui): initialize tables directly in the main database * refactor(chatui): use platform-neutral table names for interactive views * refactor(interactive-ui): decouple view messages from WebChat * fix(interactive-ui): preserve card sources and include them in backups * refactor(interactive-ui)!: remove the old ChatUI import path | 3 days ago | |
fix: keep WebChat turns in one history record and stop blocking the loop on button callbacks (#11282) * fix(webchat): keep each assistant turn in one history record The shared chat run (used by SSE and, since #11166, WebSocket) inserted a new bot history record at every streamed segment end and for every non-streamed part such as a button card, so a reply split into several bubbles after a reload, each with its own actions. A tool call was only stored when its result arrived, so a mid-turn save cut it in two (wrong duration) and a card sent while it ran was stored before it. A call that never returned stayed "running" forever. Keep the turn's record on BotMessageAccumulator and update it on later saves. Give a tool call its place in the parts when it starts and complete it in place, and mark calls still without a result at the end of the turn as "unknown". The Open API WebSocket uses the same accumulator. * fix(chatui): show tool calls that never returned as interrupted When a turn ends before a tool call returns, the tool call card kept a running timer, live and after a reload. Mark such calls as "unknown" at the end of the stream, like the backend stores them, and show "Interrupted, result unknown" with a note that the action may have taken effect. The timer now follows the call's state, and a late result clears the mark. * fix(agent): separate consecutive WebChat messages with a paragraph break Two model messages in one turn with no tool call between them (for example after injected sub-agent results) were streamed back to back, so ChatUI showed them as one run-on paragraph. Insert a paragraph break between them on WebChat only; other platforms keep their output unchanged. * fix: register button callbacks without blocking the event loop Registering a button callback wrote to SQLite synchronously on the event loop while holding the registry lock, so a locked database could stall every platform for up to 30 seconds, and a concurrent click's resolve() blocked too. Keep the in-memory entry usable at once and save it on a worker thread outside the lock. A failed save keeps the callback cached and unsaved, and the next registration retries it, so a callback is not lost on restart. Callbacks expired for more than a day are removed from the database, and the in-memory cache is bounded without dropping unsaved callbacks. * fix(dashboard): do not leak the upload cleanup coroutine without a loop ensure_cleanup_task_started built the cleanup coroutine before asyncio rejected it for lack of a running loop, leaving a never-awaited coroutine. Get the running loop first and create the coroutine only when it exists. * docs: describe one-record turns and interrupted tool calls in ChatUI * fix(dashboard): show interrupted Python calls as interrupted in the run details The run details draw Python calls with their own label, which only knew "running" and "done", so a Python call that never returned (phase "unknown") kept showing "running". It now shows "Interrupted, result unknown" like the other tool cards. * fix: keep Open API turns in one record and show interrupted tool calls everywhere The Open API WebSocket now updates the turn's history record like the shared chat run. A failed run marks unreturned tool calls interrupted without waiting for an end event, and the remaining message lists show that state. Button callbacks expired past the retention day leave the cache, and pending callback writes are awaited on shutdown. * fix: await button callback database operations * test: trim WebChat and button callback regression coverage * fix: preserve WebChat follow-up order and disconnected replies * fix: preserve WebChat reply delivery and history * fix: simplify WebChat finalization and index callback expiry * docs: drop WebUI guide changes from turn history fix --------- Co-authored-by: Soulter <905617992@qq.com> | 3 days ago | |
fix: defer dashboard setup until startup (#9879) * fix: defer dashboard setup until startup * refactor(migration): remove logging statements from webchat session migration | 2 months ago | |
| 6 months ago | ||
fix: Enable unit test CI on three platforms (Windows, macOS, Linux). (#9954) * ci: run unit tests on ubuntu, windows, and macos * ci: promote macos lane to blocking now that it passes * fix: make the unit test suite pass on Windows * fix: address Windows CI encoding failures and review findings - Force UTF-8 stdio for python children on Windows (exec, managed sessions, python tool) so non-ASCII output survives ANSI code pages - Try cp936/gbk before mbcs in the decode fallback so Chinese output is not silently mojibake'd on non-Chinese Windows - Use PowerShell call-operator quoting for space-containing executables - Narrow the require_symlink skip to WinError 1314 and raise other OSErrors - Raise managed-shell test yield budget to absorb CI cold starts * fix: restore POSIX shell quoting in test_computer exec tests The PowerShell call-operator form is a syntax error in POSIX shells; generate the command per platform instead. * fix: support mixed platform path mappings * fix: preserve Windows shell output encoding --------- Co-authored-by: zenfun <zenfun510@gmail.com> | 2 months ago | |
feat: add startup reset password flag | 5 months ago | |
fix(dingtalk): handle command errors and rich-text mentions (#9389) | 4 months ago | |
feat: add profile-scoped subagent management (#11053) Co-authored-by: Gao Jinzhe <2968474907@qq.com> | 21 days ago | |
feat: expose prepared agent outputs and honor delivery policy (#11153) * feat: expose prepared agent outputs and honor delivery policy * fix: honor turn delivery policy in built-in media tools * test: keep agent output regression coverage minimal * docs: trim agent delivery policy explanation * docs: simplify agent output usage guide | 14 days ago | |
refactor: reorganize built-in agent modules (#11051) | 21 days ago | |
refactor: reorganize built-in agent modules (#11051) | 21 days ago | |
fix: check quoted text for content safety (#9232) * fix: check quoted text for content safety * fix: initialize content safety result * fix: combine content safety check text --------- Co-authored-by: JIANZHOU <jzhou2409324124@gmail.com> | 4 months ago | |
feat: add profile-scoped subagent management (#11053) Co-authored-by: Gao Jinzhe <2968474907@qq.com> | 21 days ago | |
refactor: migration to event log backend for conversation storage (#10077) * stage * refactor: linearize conversation events and reclaim plugin snapshots * test: adapt master tests to event-context APIs after merge - test_tool_loop_agent_runner: restore @pytest.mark.asyncio on test_step_notices_reach_model_once_per_threshold (lost in merge). - test_cron_manager: give the build_main_agent / runner mocks the conversation_events field and an awaitable aclose, matching the event-writer wiring in cron/manager.py. * style: apply ruff formatting to exclude_ids filter in sqlite.py * test: adapt gemini/message-tools tests to event-context APIs - test_gemini_source: fake_retry now accepts request_event_recorder, matching retry_provider_request's new keyword argument. - test_message_tools: _DummyRespondEvent exposes conversation_events, which call_event_hook now reads when emitting the after-send hook. * fix: merge duplicate chat history translations * refactor: consolidate plugin conversation APIs * refactor: bind conversation writers to agent execution context * refactor: separate conversation migration and display projection Remove deprecated conversation metadata methods and align architecture and plugin documentation with the current APIs. * refactor: make conversation writer ownership explicit Use per-run hooks instead of ambient writer and plugin identity bindings. Require explicit conversation IDs for append APIs and separate persistence from execution context mutation. * fix: harden conversation event writes and request capture * refactor: remove legacy checkpoints and unify conversation history * perf: incrementally project acknowledged conversation events * refactor: clarify agent event and persistence boundaries * docs: remove event context design notes * perf: reduce conversation SQL round trips and support PostgreSQL * refactor: remove PostgreSQL support while retaining SQL optimizations * refactor: store raw context once and filter temporary content on replay * test: retain essential event context regression coverage * refactor: derive conversation revisions from events Remove persisted event head, context leaf and replay baseline pointers. Derive positions through indexed queries, migrate existing databases and preserve backup compatibility. Refresh conversation activity at turn settlement instead of every execution event. * refactor: use compact IDs for conversation events | 15 days ago | |
fix: group WebChat conversations in the data workspace (#11404) | 2 days ago | |
refactor: persist model usage with assistant messages (#11158) * refactor: persist model usage with assistant messages * refactor: remove unused provider request recorders | 14 days ago | |
fix: persist assistant tool calls before execution (#11162) | 14 days ago | |
test(dashboard): mock and verify the failed login delay (#11228) | 11 days ago | |
feat: add DashScope embedding provider with multimodal model support (#9137) * feat: add DashScope embedding provider with multimodal model support * fix: use per-call base_address, handle empty input and invalid dimensions | 4 months ago | |
| 11 days ago | ||
feat: add DeepSeek STT and TTS providers (#11118) * feat: add DeepSeek speech providers * test: isolate DeepSeek STT tests from ffmpeg * test: trim redundant DeepSeek speech coverage | 15 days ago | |
feat: add DeepSeek STT and TTS providers (#11118) * feat: add DeepSeek speech providers * test: isolate DeepSeek STT tests from ffmpeg * test: trim redundant DeepSeek speech coverage | 15 days ago | |
fix: unify media reference handling (#8764) * fix: unify media reference handling * fix: accept bare base64 record media refs * chore: update agents.md * fix: unify file URI handling across media components and utilities * fix: unify media reference type handling with MediaRefStr alias * Potential fix for pull request finding 'CodeQL / Incomplete URL substring sanitization' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Update astrbot/core/platform/sources/discord/discord_platform_adapter.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fix: unify media handling and improve base64 decoding across components * fix: simplify client_kwargs type definition and enhance media message handling in platform adapter * fix: unify media utility documentation and enhance function descriptions * perf: drop "pilk" requirement, improve audio outbound for tencent-related IM apps which using silk * fix: unify Tencent Silk audio handling and enhance media resolver functionality --- - Centralize media reference materialization and base64 resolution for local paths, http(s), base64://, data URIs, and legacy bare base64 payloads. - Normalize incoming Record audio to wav and Image media to temporary jpg during preprocess, with event-scoped cleanup. - Reuse the shared media resolver across OpenAI, Gemini, Anthropic, MiMo, DeerFlow, STT, and platform media paths while sanitizing logs and cleaning temporary conversion outputs. - Ensure generated TTS audio is tracked for cleanup after the event finishes. fix #8676 fix #8543 fix #7588 fix #7580 fix #8030 fix #8034 fix #7461 fix #7565 fix #6509 fix #7144 fix #7795 --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> | 5 months ago | |
fix: align deerflow runner with deerflow 2.0 (#7500) * fix: align deerflow runner with deerflow 2.0 * fix: address deerflow review feedback | 7 months ago | |
feat: support passwordless desktop sessions (#9585) | 3 months ago | |
test: prune low-value and duplicate cases from audited suites (#11005) - remove stdlib self-tests, docs snapshots, and redundant coverage - parameterize timeout, image, download, CLI, reply, and backoff cases - merge System One template defaults and assert unknown provider no-op 5311 passed, 35 skipped (was 5345 passed) | 24 days ago | |
fix: handle DingTalk app creation status (#9808) | 3 months ago | |
refactor: reorganize built-in agent modules (#11051) | 21 days ago | |
chore: remove test | 6 months ago | |
fix: preserve inline anchor text when parsing EPUB files (#10794) | 21 days ago | |
feat: improve MCP server setup and namespace tools (#11408) * feat: improve MCP server setup and namespace tools * test: trim MCP transport coverage * refactor: derive MCP tool namespaces from the current server name * fix: lock MCP server names in the edit dialog * feat: surface saved tool settings without legacy name matching * feat: stage removal of unlisted persona tools * fix: clarify the unavailable persona tools heading * feat: delete saved settings for unregistered tools | 1 day ago | |
fix(gemini): exclude internal thinking tokens from context compression (#11087) * fix: count Gemini thinking tokens in usage * fix: capture Gemini streaming usage from terminal chunks | 2 days ago | |
refactor: run built-in agents through runtime sessions (#11052) | 21 days ago | |
fix: shut down gracefully on SIGTERM (#11290) * fix: shut down gracefully on SIGTERM Signed-off-by: Бат-Орших <34618353+orshih6@users.noreply.github.com> * fix: handle SIGTERM during startup and loaded hooks Signed-off-by: Бат-Орших <34618353+orshih6@users.noreply.github.com> * fix: let WebUI close gracefully on SIGTERM and always dispose DB Signed-off-by: Бат-Орших <34618353+orshih6@users.noreply.github.com> --------- Signed-off-by: Бат-Орших <34618353+orshih6@users.noreply.github.com> | 1 day ago | |
feat(install): add multilingual setup and mainland China mirrors (#10629) * feat(install): add multilingual setup and mainland China mirrors * fix(install): support PowerShell 5.1 and Invoke-Expression * fix(install): support BOM-free PowerShell pipeline execution * fix(install): configure UTF-8 console output * fix(install): set Windows console code page internally * fix(install): keep IEX bootstrap menu ASCII-only * fix(install): default language selection to English * test(install): cover language source defaults * fix(test): escape PowerShell assertion patterns * fix(install): restore localized language menu * fix(install): list English as first language * fix(install): put English first in language prompt * feat(install): add indented AstrBot installer header * fix(install): apply indentation consistently * feat(install): show AstrBot startup commands * docs(install): clarify AstrBot startup steps * feat(install): fall back from Python mirror * fix(install): keep Windows setup in one console * ci: run install tests in fixed shells * fix(install): tolerate a removed current directory * docs: simplify script deployment instructions * fix(install): align Bash wizard with PowerShell flow * fix(install): refresh shell before manual startup * docs: rename deployment sidebar entries * fix: restore PowerShell 5.1 installer compatibility * test: isolate reboot thread mock from asyncio executor * test: shorten long prompt IDs for Windows * fix: keep completed traces closed when update timestamps collide | 1 month ago | |
fix: isolate test configuration from local AstrBot data (#11231) * fix: isolate test configuration from local AstrBot data * fix: release test database handles before Windows cleanup | 11 days ago | |
fix(kb): space out concurrent waiters in the URL cleaning RateLimiter (#10015) * fix(kb): space out concurrent waiters in the URL cleaning RateLimiter URL content cleaning processes all chunks with asyncio.gather and a shared RateLimiter. Every coroutine read the same last_call_time before sleeping, so they all woke up at the same moment and fired their requests together; the configured RPM did not bound that burst and larger documents could trip the upstream limit. Reserve the next release slot under a lock (sleeping outside it), so waiters are released one interval apart, in order. Idle time is still credited and max_rpm=0 still disables limiting. Fixes #9995 * fix(kb): reserve RateLimiter slots under a lock so waiters do not burst The first commit only carried the test; this adds the RateLimiter change it exercises. Each waiter now reserves the next release slot under an asyncio.Lock and sleeps until that slot, so concurrent callers are released one interval apart instead of waking up together. * fix(kb): preserve rate limit spacing after event loop stalls --------- Co-authored-by: Soulter <905617992@qq.com> | 2 months ago | |
feat: supports scan QR code to configure feishu / lark (#8191) * feat(lark): implement app registration and bot info retrieval - Add app registration functionality for Lark and Feishu platforms, including endpoints and request handling. - Introduce polling mechanism for app registration status. - Create bot info retrieval functionality to fetch bot details after successful registration. - Enhance dashboard with new UI components for one-click QR setup and manual setup options. - Update internationalization files to support new features and actions. - Add unit tests for app registration endpoint resolution and data handling. * feat(weixin_oc): add WeChat login registration and QR code handling | 6 months ago | |
feat: add portable message buttons (#9809) * fix: handle DingTalk app creation status * feat: add portable message buttons * test: mark command group messages as non-interactive * feat: add button action timeouts and rename plugin filter * feat: show bilingual notices for expired button actions * refactor: nest button actions and styles under Button * docs: describe current button API without draft history * docs: list supported button platforms | 29 days ago | |
feat: add sender and umo source selectors for core and plugin (#10747) * feat(dashboard): add user and session source selectors * test(dashboard): remove selector interaction tests * docs: remove WebUI guide changes from selector PR * feat(dashboard): add session source refresh button * feat(qq_official): cache group metadata before creating events * feat(lark): cache group metadata before creating events * fix(dashboard): order session sources and deduplicate user suggestions * fix(lark): reuse sender name lookup for group chats * docs(webui): add sid command hints to user and session selectors * feat(dashboard): paginate recorded user selection * feat(dashboard): align session source display with user rows * fix(dashboard): keep session titles single-line with consistent fonts * feat(dashboard): add hover copy buttons to user and session selectors * fix(dashboard): reclaim copy button space and wrap selected session titles * fix(dashboard): disable copy button fade transitions | 1 month ago | |
refactor: migration to event log backend for conversation storage (#10077) * stage * refactor: linearize conversation events and reclaim plugin snapshots * test: adapt master tests to event-context APIs after merge - test_tool_loop_agent_runner: restore @pytest.mark.asyncio on test_step_notices_reach_model_once_per_threshold (lost in merge). - test_cron_manager: give the build_main_agent / runner mocks the conversation_events field and an awaitable aclose, matching the event-writer wiring in cron/manager.py. * style: apply ruff formatting to exclude_ids filter in sqlite.py * test: adapt gemini/message-tools tests to event-context APIs - test_gemini_source: fake_retry now accepts request_event_recorder, matching retry_provider_request's new keyword argument. - test_message_tools: _DummyRespondEvent exposes conversation_events, which call_event_hook now reads when emitting the after-send hook. * fix: merge duplicate chat history translations * refactor: consolidate plugin conversation APIs * refactor: bind conversation writers to agent execution context * refactor: separate conversation migration and display projection Remove deprecated conversation metadata methods and align architecture and plugin documentation with the current APIs. * refactor: make conversation writer ownership explicit Use per-run hooks instead of ambient writer and plugin identity bindings. Require explicit conversation IDs for append APIs and separate persistence from execution context mutation. * fix: harden conversation event writes and request capture * refactor: remove legacy checkpoints and unify conversation history * perf: incrementally project acknowledged conversation events * refactor: clarify agent event and persistence boundaries * docs: remove event context design notes * perf: reduce conversation SQL round trips and support PostgreSQL * refactor: remove PostgreSQL support while retaining SQL optimizations * refactor: store raw context once and filter temporary content on replay * test: retain essential event context regression coverage * refactor: derive conversation revisions from events Remove persisted event head, context leaf and replay baseline pointers. Derive positions through indexed queries, migrate existing databases and preserve backup compatibility. Refresh conversation activity at turn settlement instead of every execution event. * refactor: use compact IDs for conversation events | 15 days ago | |
feat: add portable message buttons (#9809) * fix: handle DingTalk app creation status * feat: add portable message buttons * test: mark command group messages as non-interactive * feat: add button action timeouts and rename plugin filter * feat: show bilingual notices for expired button actions * refactor: nest button actions and styles under Button * docs: describe current button API without draft history * docs: list supported button platforms | 29 days ago | |
feat: add sender and umo source selectors for core and plugin (#10747) * feat(dashboard): add user and session source selectors * test(dashboard): remove selector interaction tests * docs: remove WebUI guide changes from selector PR * feat(dashboard): add session source refresh button * feat(qq_official): cache group metadata before creating events * feat(lark): cache group metadata before creating events * fix(dashboard): order session sources and deduplicate user suggestions * fix(lark): reuse sender name lookup for group chats * docs(webui): add sid command hints to user and session selectors * feat(dashboard): paginate recorded user selection * feat(dashboard): align session source display with user rows * fix(dashboard): keep session titles single-line with consistent fonts * feat(dashboard): add hover copy buttons to user and session selectors * fix(dashboard): reclaim copy button space and wrap selected session titles * fix(dashboard): disable copy button fade transitions | 1 month ago | |
feat: add portable message buttons (#9809) * fix: handle DingTalk app creation status * feat: add portable message buttons * test: mark command group messages as non-interactive * feat: add button action timeouts and rename plugin filter * feat: show bilingual notices for expired button actions * refactor: nest button actions and styles under Button * docs: describe current button API without draft history * docs: list supported button platforms | 29 days ago | |
refactor: persist model usage with assistant messages (#11158) * refactor: persist model usage with assistant messages * refactor: remove unused provider request recorders | 14 days ago | |
feat: track chat token usage per request (#11392) * feat: track chat token usage per request * perf: batch chat usage writes in the background * chore: deprecate legacy provider statistics * docs: link provider statistics migration issue * feat: show cache hit rate in model statistics * chore: hide plugin usage ranking from statistics * fix: include historical turns in model performance statistics * chore: remove missing token usage notice from statistics * test: use registered plugin metadata in history hook fixture | 2 days ago | |
refactor: reorganize built-in agent modules (#11051) | 21 days ago | |
refactor: reorganize built-in agent modules (#11051) | 21 days ago | |
refactor: reorganize built-in agent modules (#11051) | 21 days ago | |
test: remove a redundant Windows PowerShell fallback test (#11263) | 6 days ago | |
fix: enforce Python 3.12 at startup and align Ruff (#11469) * fix: align runtime version comparison * fix: check the Python version before startup imports * chore: target Python 3.12 in Ruff --------- Co-authored-by: wcqqq1214 <wcqqq1214@gmail.com> | 1 day ago | |
fix: keep WebChat turns in one history record and stop blocking the loop on button callbacks (#11282) * fix(webchat): keep each assistant turn in one history record The shared chat run (used by SSE and, since #11166, WebSocket) inserted a new bot history record at every streamed segment end and for every non-streamed part such as a button card, so a reply split into several bubbles after a reload, each with its own actions. A tool call was only stored when its result arrived, so a mid-turn save cut it in two (wrong duration) and a card sent while it ran was stored before it. A call that never returned stayed "running" forever. Keep the turn's record on BotMessageAccumulator and update it on later saves. Give a tool call its place in the parts when it starts and complete it in place, and mark calls still without a result at the end of the turn as "unknown". The Open API WebSocket uses the same accumulator. * fix(chatui): show tool calls that never returned as interrupted When a turn ends before a tool call returns, the tool call card kept a running timer, live and after a reload. Mark such calls as "unknown" at the end of the stream, like the backend stores them, and show "Interrupted, result unknown" with a note that the action may have taken effect. The timer now follows the call's state, and a late result clears the mark. * fix(agent): separate consecutive WebChat messages with a paragraph break Two model messages in one turn with no tool call between them (for example after injected sub-agent results) were streamed back to back, so ChatUI showed them as one run-on paragraph. Insert a paragraph break between them on WebChat only; other platforms keep their output unchanged. * fix: register button callbacks without blocking the event loop Registering a button callback wrote to SQLite synchronously on the event loop while holding the registry lock, so a locked database could stall every platform for up to 30 seconds, and a concurrent click's resolve() blocked too. Keep the in-memory entry usable at once and save it on a worker thread outside the lock. A failed save keeps the callback cached and unsaved, and the next registration retries it, so a callback is not lost on restart. Callbacks expired for more than a day are removed from the database, and the in-memory cache is bounded without dropping unsaved callbacks. * fix(dashboard): do not leak the upload cleanup coroutine without a loop ensure_cleanup_task_started built the cleanup coroutine before asyncio rejected it for lack of a running loop, leaving a never-awaited coroutine. Get the running loop first and create the coroutine only when it exists. * docs: describe one-record turns and interrupted tool calls in ChatUI * fix(dashboard): show interrupted Python calls as interrupted in the run details The run details draw Python calls with their own label, which only knew "running" and "done", so a Python call that never returned (phase "unknown") kept showing "running". It now shows "Interrupted, result unknown" like the other tool cards. * fix: keep Open API turns in one record and show interrupted tool calls everywhere The Open API WebSocket now updates the turn's history record like the shared chat run. A failed run marks unreturned tool calls interrupted without waiting for an end event, and the remaining message lists show that state. Button callbacks expired past the retention day leave the cache, and pending callback writes are awaited on shutdown. * fix: await button callback database operations * test: trim WebChat and button callback regression coverage * fix: preserve WebChat follow-up order and disconnected replies * fix: preserve WebChat reply delivery and history * fix: simplify WebChat finalization and index callback expiry * docs: drop WebUI guide changes from turn history fix --------- Co-authored-by: Soulter <905617992@qq.com> | 3 days ago | |
feat: add DeepSeek STT and TTS providers (#11118) * feat: add DeepSeek speech providers * test: isolate DeepSeek STT tests from ffmpeg * test: trim redundant DeepSeek speech coverage | 15 days ago | |
fix: adapt MiMo STT to V2.5 models and reject non-WAV audio payloads (#9118) * fix: adapt MiMo STT to V2.5 models and reject non-WAV audio The MiMo-V2 series went offline on 2026-06-30, so the default STT model mimo-v2-omni fails for every default configuration. Switch the default to mimo-v2.5-asr, the dedicated speech recognition model whose official docs use exactly the bare input_audio payload this provider sends. For non-ASR multimodal models such as mimo-v2.5, the audio understanding docs require a text instruction alongside the audio, so restore the system/user transcription prompts for that model family only. Also validate that the resolved audio payload really is RIFF/WAVE before calling the API: when a platform voice file (e.g. Tencent SILK from QQ) slips through the WAV conversion chain unchanged, fail locally with an actionable error instead of the opaque HTTP 400 from the API. Fixes #9113 * fix: accept unpadded MiMo wav headers --------- Co-authored-by: tangtaizong666 <212687958+tangtaizong666@users.noreply.github.com> | 4 months ago | |
chore: add a new sponsor | 2 months ago | |
feat: add portable message buttons (#9809) * fix: handle DingTalk app creation status * feat: add portable message buttons * test: mark command group messages as non-interactive * feat: add button action timeouts and rename plugin filter * feat: show bilingual notices for expired button actions * refactor: nest button actions and styles under Button * docs: describe current button API without draft history * docs: list supported button platforms | 29 days ago | |
fix: bound model input images below 512 KiB (#10120) * fix: bound model input images below 512 KiB * fix: reuse compliant model image files without copying * docs: simplify image size setting hint * fix: centralize model image preparation and attachment notices * fix: clarify input image maximum edge length label | 2 months ago | |
refactor: reorganize built-in agent modules (#11051) | 21 days ago | |
refactor: reorganize built-in agent modules (#11051) | 21 days ago | |
feat(provider): add OpenAI Decisions API decision provider (#10968) * feat(provider): add OpenAI Decisions API decision provider Add an independent openai_decision provider backed by POST /v1/decisions. It reuses DecisionService (ask/choose/yes_no) and never joins the main agent flow. - Map boolean/choice/score questions to predicate/choice/score with generated names; match answers by name, keep full distributions, confidence, fractional scores and the score legend. - Send string state as text and dict/list-of-dict state as input_json; reject state and questions the API cannot express before sending. - Treat refusals and contract violations as DecisionError; reuse the existing timeout, concurrency and retry conventions. - Add the "OpenAI Decisions" config template, manager lazy import, single-string key validation, WebUI support and i18n hints. - Document configuration and supported inputs; System One is unchanged. * fix: clarify OpenAI Decisions model hint * fix(provider): harden OpenAI decision request handling * fix(provider): validate decision score consistency * fix(provider): validate decision question input types * fix(provider): support list state in OpenAI Decisions --------- Co-authored-by: Soulter <905617992@qq.com> | 19 days ago | |
fix: add embedding dimensions send modes (#9245) * fix: make embedding dimensions request optional * fix: add embedding dimensions send modes * fix: keep siliconflow qwen dimensions in auto mode * fix: harden embedding dimensions auto mode | 4 months ago | |
fix(provider): sanitize legacy tool-call history across OpenAI providers (#11223) * fix(provider): repair legacy tool call history * fix(provider): harden tool-call sanitization and apply to Responses API | 2 days ago | |
fix(provider): sanitize legacy tool-call history across OpenAI providers (#11223) * fix(provider): repair legacy tool call history * fix(provider): harden tool-call sanitization and apply to Responses API | 2 days ago | |
fix(provider): recognize thinking tags in compatible completions (#10116) Co-authored-by: konodiodaaaaa1 <konodiodaaaaa1@users.noreply.github.com> | 2 months ago | |
test: prune low-value and duplicate cases from audited suites (#11005) - remove stdlib self-tests, docs snapshots, and redundant coverage - parameterize timeout, image, download, CLI, reply, and backoff cases - merge System One template defaults and assert unknown provider no-op 5311 passed, 35 skipped (was 5345 passed) | 24 days ago | |
fix(security): verify TLS for default PyPI mirror (#10685) Remove the hard-coded --trusted-host mirrors.aliyun.com argument from the in-process pip installer so certificate verification stays enabled for the configured PyPI index. Users of self-signed/private-CA mirrors can opt in explicitly through pip_install_arg (--cert or --trusted-host). The Aliyun mirror certificate chain anchors at GlobalSign Root R46, which is included in certifi >= 2025.4.26; both pip 25.0.1 and pip 26.2.2 validate it without --trusted-host. The flag was a 2024 compatibility workaround and is no longer needed after the dependency floor updates in #10670. Fixes #10684 | 1 month ago | |
fix: unify media reference handling (#8764) * fix: unify media reference handling * fix: accept bare base64 record media refs * chore: update agents.md * fix: unify file URI handling across media components and utilities * fix: unify media reference type handling with MediaRefStr alias * Potential fix for pull request finding 'CodeQL / Incomplete URL substring sanitization' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Update astrbot/core/platform/sources/discord/discord_platform_adapter.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fix: unify media handling and improve base64 decoding across components * fix: simplify client_kwargs type definition and enhance media message handling in platform adapter * fix: unify media utility documentation and enhance function descriptions * perf: drop "pilk" requirement, improve audio outbound for tencent-related IM apps which using silk * fix: unify Tencent Silk audio handling and enhance media resolver functionality --- - Centralize media reference materialization and base64 resolution for local paths, http(s), base64://, data URIs, and legacy bare base64 payloads. - Normalize incoming Record audio to wav and Image media to temporary jpg during preprocess, with event-scoped cleanup. - Reuse the shared media resolver across OpenAI, Gemini, Anthropic, MiMo, DeerFlow, STT, and platform media paths while sanitizing logs and cleaning temporary conversion outputs. - Ensure generated TTS audio is tracked for cleanup after the event finishes. fix #8676 fix #8543 fix #7588 fix #7580 fix #8030 fix #8034 fix #7461 fix #7565 fix #6509 fix #7144 fix #7795 --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> | 5 months ago | |
test: prune low-value and duplicate cases from audited suites (#11005) - remove stdlib self-tests, docs snapshots, and redundant coverage - parameterize timeout, image, download, CLI, reply, and backoff cases - merge System One template defaults and assert unknown provider no-op 5311 passed, 35 skipped (was 5345 passed) | 24 days ago | |
feat(chatui): add tabbed workbench and resident plugin views (#11218) * feat(chatui): add tabbed workbench and persistent session layouts * feat(plugin): declare views in metadata with launcher targets | 12 days ago | |
feat: add DeepSeek STT and TTS providers (#11118) * feat: add DeepSeek speech providers * test: isolate DeepSeek STT tests from ffmpeg * test: trim redundant DeepSeek speech coverage | 15 days ago | |
feat: track chat token usage per request (#11392) * feat: track chat token usage per request * perf: batch chat usage writes in the background * chore: deprecate legacy provider statistics * docs: link provider statistics migration issue * feat: show cache hit rate in model statistics * chore: hide plugin usage ranking from statistics * fix: include historical turns in model performance statistics * chore: remove missing token usage notice from statistics * test: use registered plugin metadata in history hook fixture | 2 days ago | |
refactor: reorganize built-in agent modules (#11051) | 21 days ago | |
perf: speed up full Project reconciliation (#10935) * perf: speed up full Project reconciliation * fix: normalize nested Project field values * test: assert nested Project item pagination ID * test: verify all release commits are checked * test: assert nested field values cursor binding | 28 days ago | |
feat: gemini 4 model series reasoning effort support without bumping google-genai (#11219) * bump google-genai to 3.4.0; support gemini 4 series Modified default reason effort for gemini series * Restrict Gemini 3.8 thinking levels to LOW or above * Fix Gemini 4 reasoning effort handling; normalize model names across resource paths and casing Use only explicit reasoning_effort for Gemini 4, ignoring legacy thinking levels, and cover these cases with tests. * revert bumping google-genai due to some other issues > AstrBot <=4.29.2 有个bug,bump依赖版本会导致使用webui内升级的用户升级失败 未知枚举warning以后再修 * fix CI: Update plugin page metadata test expectations | 12 days ago | |
fix: preserve media in QQ button replies (#10903) | 21 days ago | |
feat(qqofficial): add chunked file uploads (#9646) Add a dedicated chunked uploader for large local QQ Official media. Keep C2C and group endpoints explicit, support server-provided part index bases, and retry transient upload operations. Co-authored-by: Fuyan Yuan <33221728+TheRainstorm@users.noreply.github.com> | 3 months ago | |
refactor(qqofficial)!: remove the use_markdown platform option (#11378) The QQ Official adapters now always use Markdown for proactive messages. MessageChain.use_markdown(False) remains the message-level opt-out. Existing platform configs drop the removed key when loaded. | 4 days ago | |
feat(qqofficial): allow QQ Official Webhook adapters to proactively send group messages without requiring a cached msg_id (#8841) * feat(qqofficial): support webhook QR setup * docs(qqofficial): simplify webhook QR setup step | 5 months ago | |
feat(qqofficial): support sender profiles and prefer group nicknames (#11184) * feat(qqofficial): expose sender profiles and on-demand user lookup * fix(qqofficial): decode user profile JSON returned as text * chore(tests): remove standalone QQ sender profile tests * test(qqofficial): restore sender profile regression tests * fix(qqofficial): prefer group nicknames for message senders --------- Co-authored-by: Soulter <905617992@qq.com> | 11 days ago | |
test: prune low-value and duplicate cases from audited suites (#11005) - remove stdlib self-tests, docs snapshots, and redundant coverage - parameterize timeout, image, download, CLI, reply, and backoff cases - merge System One template defaults and assert unknown provider no-op 5311 passed, 35 skipped (was 5345 passed) | 24 days ago | |
fix: preserve webhook callback responses Preserve raw webhook callback responses and fix QQ webhook validation handling. | 4 months ago | |
fix: preserve Lark rich text titles and whitespace (#10543) * fix: preserve Lark rich text titles and whitespace Preserve titles, paragraph breaks, indentation, and adjacent text in received and quoted Lark posts. Keep command matching compatible with leading whitespace and bot mentions, and add focused regression coverage. * refactor: use event extras for Lark quote metadata | 1 month ago | |
fix: isolate rate limits by unified message origin (#9814) * fix: isolate rate limits by unified message origin * refactor: clarify rate-limit UMO key --------- Co-authored-by: liruihan <liruihan@example.com> | 3 months ago | |
fix: use GitHub HEAD when repository branch is unspecified (#10080) * fix: use GitHub HEAD when repository branch is unspecified * fix: preserve download errors when archive cleanup fails | 2 months ago | |
feat(provider): add OpenAI Decisions API decision provider (#10968) * feat(provider): add OpenAI Decisions API decision provider Add an independent openai_decision provider backed by POST /v1/decisions. It reuses DecisionService (ask/choose/yes_no) and never joins the main agent flow. - Map boolean/choice/score questions to predicate/choice/score with generated names; match answers by name, keep full distributions, confidence, fractional scores and the score legend. - Send string state as text and dict/list-of-dict state as input_json; reject state and questions the API cannot express before sending. - Treat refusals and contract violations as DecisionError; reuse the existing timeout, concurrency and retry conventions. - Add the "OpenAI Decisions" config template, manager lazy import, single-string key validation, WebUI support and i18n hints. - Document configuration and supported inputs; System One is unchanged. * fix: clarify OpenAI Decisions model hint * fix(provider): harden OpenAI decision request handling * fix(provider): validate decision score consistency * fix(provider): validate decision question input types * fix(provider): support list state in OpenAI Decisions --------- Co-authored-by: Soulter <905617992@qq.com> | 19 days ago | |
fix: detect desktop runtime without frozen python (#5859) * fix: detect desktop runtime without frozen python * chore: drop planning docs from runtime fix pr | 8 months ago | |
fix: escape Satori file attributes (#11397) | 3 days ago | |
feat(platform): enrich group metadata across adapters (#9851) * feat(platform): enrich group metadata across adapters * perf(platform): make group member lookup opt-in * Revert "perf(platform): make group member lookup opt-in" This reverts commit 896b4b895bd586f7d6707bf7ec6a3e2c5348a493. | 2 months ago | |
test: prune low-value and duplicate cases from audited suites (#11005) - remove stdlib self-tests, docs snapshots, and redundant coverage - parameterize timeout, image, download, CLI, reply, and backoff cases - merge System One template defaults and assert unknown provider no-op 5311 passed, 35 skipped (was 5345 passed) | 24 days ago | |
test: remove Shipyard Neo cold start readiness test (#11270) | 6 days ago | |
fix(skills): keep one unreadable skill directory from failing the whole request (#10591) * fix(skills): keep one unreadable skill directory from failing the whole request list_skills() iterated data/skills/ and normalized each directory with no error isolation, so one unreadable entry (ACL-denied, transient I/O) raised out of the system-prompt build and killed the whole agent request even when the broken skill was unrelated to it. The workspace sibling list_workspace_skills() already guards the same iterdir with try/except OSError and continues; bring the local path to parity for the skills root listing and both per-directory normalization loops, logging the offending path and skipping the broken entry. * fix(skills): isolate unreadable skill directories --------- Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com> | 1 month ago | |
fix(skills): validate skill names and archive paths against traversal (#11399) * fix(skills): validate skill names and archive paths against traversal * fix(skills): resolve skill dirs via enumeration and guard Windows paths * test(skills): simplify path traversal regression test | 2 days ago | |
feat: add built-in skill creator and document skills (#9517) * feat: add builtin skill creator * feat: add builtin PDF skill * feat: add builtin office skills * fix: align closed capability status labels | 3 months ago | |
feat: add portable message buttons (#9809) * fix: handle DingTalk app creation status * feat: add portable message buttons * test: mark command group messages as non-interactive * feat: add button action timeouts and rename plugin filter * feat: show bilingual notices for expired button actions * refactor: nest button actions and styles under Button * docs: describe current button API without draft history * docs: list supported button platforms | 29 days ago | |
fix: resolve remote Slack file URLs before upload (#10355) * fix: resolve remote Slack file URLs before upload * fix: clean up partial media downloads on cancellation * fix: preserve Slack uploads with local file URLs * fix: validate Slack file sources and normalize URL schemes | 1 month ago | |
feat(platform): enrich group metadata across adapters (#9851) * feat(platform): enrich group metadata across adapters * perf(platform): make group member lookup opt-in * Revert "perf(platform): make group member lookup opt-in" This reverts commit 896b4b895bd586f7d6707bf7ec6a3e2c5348a493. | 2 months ago | |
fix: preserve links and mentions in Slack lists (#10447) | 1 month ago | |
fix: deliver Slack TTS audio with text fallback (#10496) * fix: deliver Slack TTS audio with text fallback * fix: avoid duplicate Slack TTS fallback text * fix: preserve Slack audio order and retry text delivery | 1 month ago | |
refactor: reorganize built-in agent modules (#11051) | 21 days ago | |
feat(provider): add SSYCloud chat completion provider (#9659) | 3 months ago | |
fix: 修复工具图片缓存目录清理后无法保存 (#9490) | 3 months ago | |
perf(ci): simplify CI and speed it up (#11226) * CI: Simplify smoke test * follow-up for standardizing uv setup and skip redundant syncs * CI: Use uv for project sync workflows Reference actions by version tag and reduce the sync timeout from 120 to 10 minutes. Drop references to the deleted delivery test and remove workflow security assertions. | 11 days ago | |
feat: improve default and local t2i rendering (#9803) * feat: redesign default t2i template * feat: improve local t2i rendering and migrate defaults * fix: install CJK fonts in Docker image * fix: preserve soft breaks and fit display math | 3 months ago | |
fix: Enable unit test CI on three platforms (Windows, macOS, Linux). (#9954) * ci: run unit tests on ubuntu, windows, and macos * ci: promote macos lane to blocking now that it passes * fix: make the unit test suite pass on Windows * fix: address Windows CI encoding failures and review findings - Force UTF-8 stdio for python children on Windows (exec, managed sessions, python tool) so non-ASCII output survives ANSI code pages - Try cp936/gbk before mbcs in the decode fallback so Chinese output is not silently mojibake'd on non-Chinese Windows - Use PowerShell call-operator quoting for space-containing executables - Narrow the require_symlink skip to WinError 1314 and raise other OSErrors - Raise managed-shell test yield budget to absorb CI cold starts * fix: restore POSIX shell quoting in test_computer exec tests The PowerShell call-operator form is a syntax error in POSIX shells; generate the command per platform instead. * fix: support mixed platform path mappings * fix: preserve Windows shell output encoding --------- Co-authored-by: zenfun <zenfun510@gmail.com> | 2 months ago | |
fix: preserve mention info in llm context (#10992) * fix: 保留群聊中 @机器人 的模型上下文 修复群聊中当前消息的 @机器人 标记未传入模型请求的问题。 - 在普通 LLM 请求中补充 DIRECTED AT YOU 标记 - 保留 Agent 运行期间追问的 @机器人 语义 - 避免 Dify 纯图片请求因标记而丢失默认描述提示 - 补充普通请求、追问和第三方 runner 的回归测试 * test: 补齐 Lark 第三方 Stage 测试配置 修复 Dify 配置读取逻辑引入后,Lark 格式化测试因直接实例化 Stage 时缺少 runner_type 和 runner_config 而导致的 CI 失败。 * feat: 保留群聊中 @机器人 的原始位置 - 在适配器中记录机器人被 @ 的位置,模型正文中原地显示为 @昵称(you) - 当前轮附加临时 DIRECTED AT YOU 提醒,不写入长期历史 - 群历史按真实消息组件顺序或 QQOfficial 原始正文投影,修复丢字、重名和顺序错位 - 保留正文、命令解析和插件请求的原有行为 - 补充 OneBot、QQOfficial、请求构建和群历史回归测试 * fix: 保留群聊中 @机器人 的原始位置 - 在 OneBot 和 QQOfficial 群消息中保留有序 Plain/At 组件\n- 在 Agent 输入边界按原位置渲染 @昵称或 @ID,并添加临时身份提醒\n- 让运行中追问保留相同语义,兼容唤醒前缀、语音、附件和显式正文\n- 补充关键行为回归测试并移除旧坐标投影实现 * fix: simplify group mention rendering * fix: preserve Telegram mention order and simplify agent input * test: remove redundant mention rendering tests --------- Co-authored-by: C₂₂H₂₅NO₆ <Sisyphbaous-DT-Project@users.noreply.github.com> Co-authored-by: Soulter <905617992@qq.com> | 6 days ago | |
feat: temporary file handling and introduce TempDirCleaner (#5026) * feat: temporary file handling and introduce TempDirCleaner - Updated various modules to use get_astrbot_temp_path() instead of get_astrbot_data_path() for temporary file storage. - Renamed temporary files for better identification and organization. - Introduced TempDirCleaner to manage the size of the temporary directory, ensuring it does not exceed a specified limit by deleting the oldest files. - Added configuration option for maximum temporary directory size in the dashboard. - Implemented tests for TempDirCleaner to verify cleanup functionality and size management. * ruff | 9 months ago | |
refactor: migration to event log backend for conversation storage (#10077) * stage * refactor: linearize conversation events and reclaim plugin snapshots * test: adapt master tests to event-context APIs after merge - test_tool_loop_agent_runner: restore @pytest.mark.asyncio on test_step_notices_reach_model_once_per_threshold (lost in merge). - test_cron_manager: give the build_main_agent / runner mocks the conversation_events field and an awaitable aclose, matching the event-writer wiring in cron/manager.py. * style: apply ruff formatting to exclude_ids filter in sqlite.py * test: adapt gemini/message-tools tests to event-context APIs - test_gemini_source: fake_retry now accepts request_event_recorder, matching retry_provider_request's new keyword argument. - test_message_tools: _DummyRespondEvent exposes conversation_events, which call_event_hook now reads when emitting the after-send hook. * fix: merge duplicate chat history translations * refactor: consolidate plugin conversation APIs * refactor: bind conversation writers to agent execution context * refactor: separate conversation migration and display projection Remove deprecated conversation metadata methods and align architecture and plugin documentation with the current APIs. * refactor: make conversation writer ownership explicit Use per-run hooks instead of ambient writer and plugin identity bindings. Require explicit conversation IDs for append APIs and separate persistence from execution context mutation. * fix: harden conversation event writes and request capture * refactor: remove legacy checkpoints and unify conversation history * perf: incrementally project acknowledged conversation events * refactor: clarify agent event and persistence boundaries * docs: remove event context design notes * perf: reduce conversation SQL round trips and support PostgreSQL * refactor: remove PostgreSQL support while retaining SQL optimizations * refactor: store raw context once and filter temporary content on replay * test: retain essential event context regression coverage * refactor: derive conversation revisions from events Remove persisted event head, context leaf and replay baseline pointers. Derive positions through indexed queries, migrate existing databases and preserve backup compatibility. Refresh conversation activity at turn settlement instead of every execution event. * refactor: use compact IDs for conversation events | 15 days ago | |
fix: restore static runtime version Fixes #8924 | 5 months ago | |
fix: attach Gemini tool images to their function responses (#11424) * fix(gemini): attach tool images to their function responses * test: simplify Gemini tool image ownership regression | 2 days ago | |
refactor: make plugin locale and agent session lookups async (#11355) * refactor: make plugin locale and agent session lookups async * test: remove standalone locale lookup test | 5 days ago | |
feat: add sender and umo source selectors for core and plugin (#10747) * feat(dashboard): add user and session source selectors * test(dashboard): remove selector interaction tests * docs: remove WebUI guide changes from selector PR * feat(dashboard): add session source refresh button * feat(qq_official): cache group metadata before creating events * feat(lark): cache group metadata before creating events * fix(dashboard): order session sources and deduplicate user suggestions * fix(lark): reuse sender name lookup for group chats * docs(webui): add sid command hints to user and session selectors * feat(dashboard): paginate recorded user selection * feat(dashboard): align session source display with user rows * fix(dashboard): keep session titles single-line with consistent fonts * feat(dashboard): add hover copy buttons to user and session selectors * fix(dashboard): reclaim copy button space and wrap selected session titles * fix(dashboard): disable copy button fade transitions | 1 month ago | |
fix: support Windows long paths during plugin archive extraction (#10193) * fix: support Windows long paths during plugin archive extraction * fix: address Windows plugin path review comments * fix: shorten archive root SHA to eight characters | 1 month ago | |
fix(dashboard): bound upload memory and add resumable chunked uploads (#10123) * refactor(dashboard): consolidate upload saves into streaming helper Five copies of the same upload-save logic existed: three file wrappers (UploadFileAdapter, RequestUploadFile, PluginUploadFile) plus one _save_upload() in each of BackupService and SkillsService. The backup variant fell back to a full-body read() for raw FastAPI UploadFile, buffering entire uploads in memory. Introduce save_upload_stream() as the single streaming implementation (1 MiB blocks, optional max_bytes with in-loop abort and partial-file cleanup). The wrappers keep their public signatures and delegate to it; skills/chat/config save paths call save() directly with max_bytes, replacing their post-save size checks. * fix(dashboard): bound backup upload size and harden chunked flow Backup routes passed raw FastAPI UploadFile into the service layer, hitting the full-body read() fallback: a single authenticated request with an oversized chunk or whole-file upload could OOM-kill the process (verified with a 512 MiB memory-limited container, exit 137). - Wrap uploads in UploadFileAdapter so all saves stream to disk - Enforce CHUNK_SIZE (1 MiB) per chunk and 128 MiB for whole-file uploads, aborting mid-stream with partial-file cleanup - Cap chunked backup totals at 8 GiB and point larger backups at manual restore via the data directory - Verify the merged backup size against the declared total * fix(dashboard): enforce MAX_CONTENT_LENGTH with per-route overrides The 128 MiB MAX_CONTENT_LENGTH value was written into the compat-layer config dict but nothing read it, so the FastAPI/hypercorn path had no request body limit at all. Add a middleware that rejects oversized bodies with 413 before auth or body parsing, using MAX_CONTENT_LENGTH as the default with per-route overrides for legitimate large uploads (attachments 512 MiB, plugin config files 500 MiB, knowledge bases 512 MiB) and a tight 2 MiB cap on the backup chunk endpoint. Requests without a Content-Length header pass through and remain bounded by per-endpoint max_bytes at save time. * refactor(dashboard): extract generic chunked upload session service Pull the chunk session machinery out of BackupService into a reusable ChunkedUploadService owning session lifecycle, chunk storage, streaming assembly and expiry cleanup, in preparation for webchat attachment chunked uploads. Sessions are now bound to an owner (the authenticated username) and a purpose; chunk/complete/abort calls from another owner fail with the same "not found or expired" error as unknown sessions, so upload IDs cannot be probed or consumed cross-user. BackupService keeps business concerns (zip validation, size caps, manifest marking) and delegates the rest; API shapes and frontend flows are unchanged. * feat(dashboard): add resumable upload status endpoint Expose per-session progress (received chunk indexes, totals, expiry) so clients can resume an interrupted chunked upload by sending only the missing chunks instead of starting over. Abuse considerations baked in: the lookup inherits owner binding and answers "not found or expired" for both unknown sessions and sessions owned by someone else (no probing), the response carries no filename (minimal disclosure), and the query is strictly read-only — it never touches last_activity, so polling it cannot anchor a session and its on-disk chunks alive past expiry. * fix(dashboard): bound file signature memory with chunked hashing getFileSignature() read the entire file into browser memory via arrayBuffer() before computing SHA-256, spiking renderer memory by the full attachment size (up to the 512 MiB upload cap). The signature is only used for in-session staging dedup and never leaves the browser, so it does not need to be the canonical whole-file SHA-256. Hash 8 MiB blocks individually and digest the concatenated block digests instead; the prefix changes to sha256m: to mark the algorithm change (old signatures vanish with the page session, so no compatibility concern). * feat(dashboard): resumable chunked upload UI for backup import Extract the chunk scheduling logic from BackupDialog into a reusable useChunkedUpload composable (5-way concurrency, per-chunk silent retries, progress accounting) and add resume support on top of the new upload status endpoint: a failed upload now offers a "Resume Upload" action that queries received chunk indexes and sends only the missing ones. Expired sessions transparently re-initialize and start over; a failed complete() drops the poisoned session by design. Wires the new /backups/upload/status endpoint through the OpenAPI spec and regenerated client, and adds the resumeUpload label to all four locales. * feat(dashboard): chunked upload endpoints for webchat attachments Mirror the backup chunked-upload flow for chat attachments so large files (>128 MiB request-body default, up to the 512 MiB attachment cap) can be uploaded in slices: POST /api/v1/files/upload/{init, chunk,complete,abort,status}, owner-bound sessions, and a per-route body limit on the chunk endpoint. ChatService reuses the generic ChunkedUploadService with a new meta passthrough carrying the client content_type through the session; completion merges outside the chunk dir and feeds the result through save_uploaded_file() unchanged via a move-based LocalUploadFile adapter, keeping MIME sniffing, type classification and attachment insertion in exactly one place. Also repairs two pre-existing test stubs that predated the max_bytes-aware save() contract and were already failing on this branch. * feat(dashboard): chunked upload with resume for webchat attachments Route staged files >= 32 MiB through the new chunked upload endpoints via useChunkedUpload; smaller files keep the single POST path so paste and quick picks stay low-latency. The content_type travels through the init payload so server-side attachment classification is unchanged. A failed chunked upload is kept as an error chip in the input area with a retry action that resumes from the last received chunk (and transparently restarts when the session expired) plus a discard action that aborts the session. Failed entries hold their uploader in a shallowRef so Vue's deep ref unwrapping cannot strip the composable's internal refs, and their signatures stay reserved to block duplicate staging while a failed entry exists. * docs: regenerate openapi artifacts for file upload endpoints * fix(dashboard): harden chunk save and request body limits Address review findings on the upload-hardening branch: - save_chunk() now writes to a uniquely named temp file, verifies the save() byte count against the expected chunk length, and publishes via atomic rename. A failed or concurrent same-index retry can no longer truncate and delete an already-received chunk (previously left received_chunks claiming data that assemble() then failed to find), and short writes are rejected instead of published. - Requests with multipart bodies but no Content-Length are rejected with 411: form parsing spools large bodies to disk before any per-file size check can run. This is a documented stopgap — other lengthless bodies still pass and are bounded only at save time; closing that fully requires counting bytes as they arrive. - Whole-file upload overrides gain 1 MiB of multipart framing slack so a file exactly at the size cap is no longer rejected with 413. The body-limit decision is extracted into a pure function for direct unit tests; the assemble-time size recheck is now covered by an out-of-band corruption test since chunk-level verification rejects short writes earlier. * fix(dashboard): drain upload pool and pin session on resume A failed chunk made runPool() reject immediately while the remaining in-flight requests kept writing; a resume could then race them on the same chunk, stale retries read the mutable uploadId (potentially writing into a re-initialized session), and late completions kept counting progress (150% after resume). The pool now stops scheduling on first failure but drains issued requests via allSettled before surfacing the error, each request pins the uploadId captured at run start, and a run-generation counter (bumped on start/resume/cancel) blocks stale completions from the progress accounting. * fix(dashboard): close 411 bypass and temp-file residue on publish Address the second round of review findings: - The 411 media-type check used a raw startswith(), but the form parser strips surrounding whitespace, so a leading-space Content-Type was let through without a Content-Length while Starlette still parsed the body as multipart. Detection now uses the same parse_options_header the parser uses. - A failing os.replace() during chunk publish left the uniquely named temp file behind; it is now covered by the same cleanup discipline as the save path. Backup direct-upload routes deliberately get no framing slack: they are legacy paths with no remaining callers, and the pre-existing exact-limit 413 edge is answered by chunked upload. * fix(dashboard): abort sessions created after a cancel Cancelling while initUpload was still in flight cleared local state before an upload id existed; when the delayed init returned, the run flipped from idle to error and the freshly created server session was never aborted. handleFailure now lets cancel win over any late resolution and aborts the session id captured at that point. * fix(dashboard): check cancel flag after completeUpload resolves Cancelling while completeUpload was in flight let the late success response flip the uploader from idle to done and hand the result to the caller, which proceeded to the precheck. completeSession() now re-checks the cancel flag after the response arrives and routes the late success through the cancelled path instead. * fix(dashboard): gate the 411 rule to body-capable methods The 411 stopgap rejected GET /api/v1/logs/live: the SSE log client sends a bogus "Content-Type: multipart/form-data" header on a GET (copy-paste relic), and a GET with no Content-Length matched the multipart-without-length rule. Body-less methods never trigger form parsing, so no disk-spool risk exists for them — the 411 now applies only to POST/PUT/PATCH. The junk header on the SSE client is removed as well; the other two SSE consumers never had it. * feat(dashboard): show in-progress chips for chunked attachments Chunked uploads gave no feedback while in flight: the staged chip only appeared after completion, leaving multi-minute uploads silent. Track in-flight uploads alongside the failed ones and render progress chips (filename, percent, thin progress bar) with a cancel action in the input area; on success the chip hands off to the staged attachment, on failure to the resumable error chip. * fix(dashboard): type active upload chips upfront and align progress bar The in-progress chip used a generic cloud icon even though the file type is known locally before the upload starts; it now derives icon/color/label from the filename via attachmentPresentation, same as the staged chip. The progress bar's left edge is aligned with the filename text instead of the card padding. * fix(dashboard): keep active-chip progress bar inside the card v-progress-linear ships width:100%, which wins over the right offset in absolute positioning; the bar ran 52px past the card's right edge and was clipped by overflow:hidden. Give it width:auto so the left/ right offsets determine the width. * fix(dashboard): rework active-chip progress track and cancel button Positioning a Vuetify component root directly proved fragile — the progress bar drifted to the card's top edge. Wrap it in a plain track div that owns the absolute positioning and let the component fill it. Replace the corner tonal badge cancel with an inline text-variant icon button after the percent label, and drop the padding reserved for the badge. * fix(dashboard): enforce session expiry and atomic save semantics Address the third review round (sourcery-ai findings): - get_session() now actually enforces the idle expiry it advertises in its "not found or expired" error; expired sessions stay abortable for cleanup, and backup upload_init starts the janitor just like chat's does, so chunk dirs cannot linger indefinitely. - cleanup_session() only unregisters a session after rmtree() succeeds, letting the janitor retry on transient filesystem errors instead of permanently leaking the chunk directory. - save_upload_stream() writes to a uniquely named temp sibling and atomically renames on success, so a failed or cancelled overwrite can no longer delete a pre-existing destination (e.g. re-uploading over an existing attachment), and all callers inherit the behavior. The write()-return-value finding is a non-issue: BufferedWriter writes fully or raises, and the chunk path already verifies byte counts. * fix(dashboard): guard failed-upload retry against double clicks retryFailedUpload() ran resume() without any in-flight marker, so a second click started a concurrent resume on the same session; the loser hit "not found or expired" and left a failed chip next to the successfully staged attachment. The entry now moves to activeUploads while resuming, which blocks the second click and shows live progress, and returns to failedUploads only if the resume errors. | 2 months ago | |
fix: correct knowledge base ranking behavior (#9454) * fix: make knowledge base rank fusion deterministic * fix: surface vllm rerank response failures | 3 months ago | |
Add Volcengine embedding provider (#10886) | 6 days ago | |
fix: resume ChatUI streams after refresh (#9259) * fix: resume ChatUI streams after refresh * fix: hide chat run service errors * fix: harden resumed chat streams | 4 months ago | |
fix: preserve webhook callback responses Preserve raw webhook callback responses and fix QQ webhook validation handling. | 4 months ago | |
feat: add portable message buttons (#9809) * fix: handle DingTalk app creation status * feat: add portable message buttons * test: mark command group messages as non-interactive * feat: add button action timeouts and rename plugin filter * feat: show bilingual notices for expired button actions * refactor: nest button actions and styles under Button * docs: describe current button API without draft history * docs: list supported button platforms | 29 days ago | |
feat: add portable message buttons (#9809) * fix: handle DingTalk app creation status * feat: add portable message buttons * test: mark command group messages as non-interactive * feat: add button action timeouts and rename plugin filter * feat: show bilingual notices for expired button actions * refactor: nest button actions and styles under Button * docs: describe current button API without draft history * docs: list supported button platforms | 29 days ago | |
feat(platform): enrich group metadata across adapters (#9851) * feat(platform): enrich group metadata across adapters * perf(platform): make group member lookup opt-in * Revert "perf(platform): make group member lookup opt-in" This reverts commit 896b4b895bd586f7d6707bf7ec6a3e2c5348a493. | 2 months ago | |
fix: keep WeCom callback receive loop responsive (#9759) * fix: keep WeCom callback receive loop responsive * fix: support Anthropic httpx2 clients --------- Co-authored-by: Soulter <905617992@qq.com> | 3 months ago | |
fix(weixin_oc): fail sends without message IDs (#11354) * fix: warn when weixin send lacks message id * fix(weixin_oc): treat missing message id as send failure * fix(weixin_oc): propagate partial send failures --------- Co-authored-by: laoyyu <laoyyu@users.noreply.github.com> | 3 days ago | |
test: prune low-value and duplicate cases from audited suites (#11005) - remove stdlib self-tests, docs snapshots, and redundant coverage - parameterize timeout, image, download, CLI, reply, and backoff cases - merge System One template defaults and assert unknown provider no-op 5311 passed, 35 skipped (was 5345 passed) | 24 days ago | |
fix: hide internal personal WeChat settings (#9827) | 3 months ago | |
feat: supports scan QR code to configure feishu / lark (#8191) * feat(lark): implement app registration and bot info retrieval - Add app registration functionality for Lark and Feishu platforms, including endpoints and request handling. - Introduce polling mechanism for app registration status. - Create bot info retrieval functionality to fetch bot details after successful registration. - Enhance dashboard with new UI components for one-click QR setup and manual setup options. - Update internationalization files to support new features and actions. - Add unit tests for app registration endpoint resolution and data handling. * feat(weixin_oc): add WeChat login registration and QR code handling | 6 months ago | |
fix: introduce asynchronous, revision-aware config snapshot saving to keep event loops responsive and prevent stale writes from overwriting newer state (#9300) * fix(platform): offload Weixin account state writes * fix(config): serialize async snapshot persistence * fix(config): preserve valid snapshot on newer save failure --------- Co-authored-by: Rhonin <rhonin@STARFORGE.localdomain> Co-authored-by: Soulter <905617992@qq.com> | 4 months ago | |
fix(stt): default the Whisper API provider to gpt-transcribe (#10330) | 2 days ago | |
refactor: reorganize built-in agent modules (#11051) | 21 days ago | |
fix: propagate Xinference rerank failures instead of returning empty results (#10051) The Xinference rerank provider swallowed upstream failures and an uninitialized model by returning an empty list, which the retrieval manager read as a legitimate empty rerank and used to overwrite the fused candidates with nothing. Other providers (e.g. TEI) raise, and the manager only preserves the fused results on that path, so a transient Xinference outage silently degraded every knowledge-base query to zero hits. Raise instead, matching the provider contract and letting the manager's degradation keep the unreranked results. Fixes #10000 | 2 months ago |
| Files | Last commit | Last update |
|---|---|---|
| 5 days ago | ||
| 29 days ago | ||
| 6 days ago | ||
| 1 day ago | ||
| 11 days ago | ||
| 1 month ago | ||
| 5 days ago | ||
| 5 months ago | ||
| 1 month ago | ||
| 20 days ago | ||
| 11 days ago | ||
| 21 days ago | ||
| 24 days ago | ||
| 3 days ago | ||
| 4 months ago | ||
| 24 days ago | ||
| 24 days ago | ||
| 3 months ago | ||
| 3 days ago | ||
| 3 days ago | ||
| 2 months ago | ||
| 6 months ago | ||
| 2 months ago | ||
| 5 months ago | ||
| 4 months ago | ||
| 21 days ago | ||
| 14 days ago | ||
| 21 days ago | ||
| 21 days ago | ||
| 4 months ago | ||
| 21 days ago | ||
| 15 days ago | ||
| 2 days ago | ||
| 14 days ago | ||
| 14 days ago | ||
| 11 days ago | ||
| 4 months ago | ||
| 11 days ago | ||
| 15 days ago | ||
| 15 days ago | ||
| 5 months ago | ||
| 7 months ago | ||
| 3 months ago | ||
| 24 days ago | ||
| 3 months ago | ||
| 21 days ago | ||
| 6 months ago | ||
| 21 days ago | ||
| 1 day ago | ||
| 2 days ago | ||
| 21 days ago | ||
| 1 day ago | ||
| 1 month ago | ||
| 11 days ago | ||
| 2 months ago | ||
| 6 months ago | ||
| 29 days ago | ||
| 1 month ago | ||
| 15 days ago | ||
| 29 days ago | ||
| 1 month ago | ||
| 29 days ago | ||
| 14 days ago | ||
| 2 days ago | ||
| 21 days ago | ||
| 21 days ago | ||
| 21 days ago | ||
| 6 days ago | ||
| 1 day ago | ||
| 3 days ago | ||
| 15 days ago | ||
| 4 months ago | ||
| 2 months ago | ||
| 29 days ago | ||
| 2 months ago | ||
| 21 days ago | ||
| 21 days ago | ||
| 19 days ago | ||
| 4 months ago | ||
| 2 days ago | ||
| 2 days ago | ||
| 2 months ago | ||
| 24 days ago | ||
| 1 month ago | ||
| 5 months ago | ||
| 24 days ago | ||
| 12 days ago | ||
| 15 days ago | ||
| 2 days ago | ||
| 21 days ago | ||
| 28 days ago | ||
| 12 days ago | ||
| 21 days ago | ||
| 3 months ago | ||
| 4 days ago | ||
| 5 months ago | ||
| 11 days ago | ||
| 24 days ago | ||
| 4 months ago | ||
| 1 month ago | ||
| 3 months ago | ||
| 2 months ago | ||
| 19 days ago | ||
| 8 months ago | ||
| 3 days ago | ||
| 2 months ago | ||
| 24 days ago | ||
| 6 days ago | ||
| 1 month ago | ||
| 2 days ago | ||
| 3 months ago | ||
| 29 days ago | ||
| 1 month ago | ||
| 2 months ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 21 days ago | ||
| 3 months ago | ||
| 3 months ago | ||
| 11 days ago | ||
| 3 months ago | ||
| 2 months ago | ||
| 6 days ago | ||
| 9 months ago | ||
| 15 days ago | ||
| 5 months ago | ||
| 2 days ago | ||
| 5 days ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 2 months ago | ||
| 3 months ago | ||
| 6 days ago | ||
| 4 months ago | ||
| 4 months ago | ||
| 29 days ago | ||
| 29 days ago | ||
| 2 months ago | ||
| 3 months ago | ||
| 3 days ago | ||
| 24 days ago | ||
| 3 months ago | ||
| 6 months ago | ||
| 4 months ago | ||
| 2 days ago | ||
| 21 days ago | ||
| 2 months ago |