| Files | Last commit | Last update |
|---|---|---|
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 | 3 days ago | |
refactor: run built-in agents through runtime sessions (#11052) | 21 days ago | |
refactor: run built-in agents through runtime sessions (#11052) | 21 days ago | |
feat: unify session configuration mappings and overrides (#11097) * feat: unify session configuration mappings and overrides * test: update persona regression mock for session overrides * fix: preserve knowledge base IDs during session migration * fix: scope effective configuration to each pipeline execution * refactor: remove built-in persona command * refactor: remove obsolete session service and plugin managers * perf: avoid duplicate message configuration deepcopy * refactor: keep message configuration snapshots internal * refactor: make runtime configuration state explicit * refactor: rename runtime configuration to AstrBotConfigSnapshot * refactor: move config binding migration into migration package * refactor: remove obsolete session configuration code * fix: unify bot session mapping cleanup option * fix: delete complete session mappings from bot editor * test: update fixtures for effective session configuration * refactor!: remove obsolete session status and batch APIs * test: remove redundant retired endpoint assertions * test: simplify session configuration regression coverage | 17 days ago | |
fix: append steering input as user messages (#11141) * fix: append steering input as user messages * fix: group steering input into one user message * fix: continue pending steering after plain replies * test: decode prepared media file URIs on Windows * fix: preserve whitespace in steering input * fix: separate batched steering inputs with newlines * docs: remove verbose steering implementation details | 14 days ago | |
fix: deliver agent wakeup replies through the normal pipeline (#10936) * fix: deliver agent wakeup replies through the normal pipeline * fix: disable streaming output for agent wakeups * fix: buffer agent wakeup streams before sending * fix: disable wakeup streaming while retaining buffered sends * test: remove wakeup streaming buffer test | 28 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 | 30 days ago | |
fix: resolve each OneBot file segment by its own ID (#10098) | 2 months 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: remove privacy data from test case (#6803) Co-authored-by: whatevertogo <whatevertogo@users.noreply.github.com> | 8 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: improve log filtering and console workspace (#10514) | 1 month ago | |
fix(agent): interrupt model generation on steer (#11384) * fix(agent): interrupt model generation on steer * fix(agent): prompt for a brief steering update * fix(agent): shorten the steering reminder | 3 days ago | |
fix: resolve executable builtin tools for delegated sessions (#11335) * fix: resolve executable builtin tools for delegated sessions * revert: resolve executable builtin tools for delegated sessions This reverts commit 078ba3cfeec3b25b4929f9ce90c1f5d6483b2776. * refactor(agent): let runtimes own their tools Remove the shared builtin tool registry and construct runtime tools where they are used. Delegate the parent's executable tool instances and list only plugin tools in the dashboard's Function Tools panel. * refactor(agent): preserve executable tools across schema modes --------- Co-authored-by: Soulter <905617992@qq.com> | 6 days ago | |
test: mock sleep in the process_buffer split test (#11269) | 6 days ago | |
refactor: migrate config preferences to async (#9584) * refactor: migrate config preferences to async * refactor: centralize config mapping persistence | 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: keep async tool generators in one task (#10474) * fix: add demand-driven task ownership for async generators * fix: keep async tool generators in one task * fix: publish generator cleanup errors without blocking * style: format tool lifecycle regression tests | 1 month ago | |
fix: serialize Azure TTS backend client lifetimes (#10101) | 2 months 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 | |
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: append steering input as user messages (#11141) * fix: append steering input as user messages * fix: group steering input into one user message * fix: continue pending steering after plain replies * test: decode prepared media file URIs on Windows * fix: preserve whitespace in steering input * fix: separate batched steering inputs with newlines * docs: remove verbose steering implementation details | 14 days ago | |
feat: unify session configuration mappings and overrides (#11097) * feat: unify session configuration mappings and overrides * test: update persona regression mock for session overrides * fix: preserve knowledge base IDs during session migration * fix: scope effective configuration to each pipeline execution * refactor: remove built-in persona command * refactor: remove obsolete session service and plugin managers * perf: avoid duplicate message configuration deepcopy * refactor: keep message configuration snapshots internal * refactor: make runtime configuration state explicit * refactor: rename runtime configuration to AstrBotConfigSnapshot * refactor: move config binding migration into migration package * refactor: remove obsolete session configuration code * fix: unify bot session mapping cleanup option * fix: delete complete session mappings from bot editor * test: update fixtures for effective session configuration * refactor!: remove obsolete session status and batch APIs * test: remove redundant retired endpoint assertions * test: simplify session configuration regression coverage | 17 days ago | |
fix: isolate button callback storage from main database (#10908) | 2 days ago | |
fix(dashboard): store chat attachments under unique names (#10356) * fix(dashboard): store chat attachments under unique names Uploads were saved under their original filename, so two attachments with the same name (every pasted screenshot is image.png) overwrote each other, and deleting one session removed a file another session still used. Store each upload as <timestamp id>_<name> and return the original name as filename for display, with the on-disk name in stored_filename. Fixes #10352 * fix(dashboard): keep long-suffix attachment names within 255 bytes | 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 | |
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 | |
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 | |
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 | 4 days ago | |
feat(dashboard): paginate sidebar chat sessions (#10279) | 1 month ago | |
feat(chat): add voice transcription and audio messages (#11170) * feat(chat): add voice transcription and audio messages * fix(chat): store transcription audio in system temp directory * fix(chat): align attachment icon with composer placeholder | 14 days ago | |
fix: use the active session workspace in ChatUI file panel (#10883) * fix: resolve ChatUI files in the active session workspace * fix: preserve workspace downloads when closing the panel * refactor: simplify workspace download regression tests * fix: preserve legacy workspace API calls without a session * fix: resolve workspace paths from validated session records * Delete dashboard/tests/workspaceFileDownload.test.mjs --------- Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com> | 30 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 | 4 days ago | |
feat(webui): support marketplace plugin install links (#11375) * feat(webui): support marketplace plugin install links * test(webui): remove install-link frontend test additions * docs: describe WebUI marketplace installation links * fix(webui): clarify source access in install confirmation * fix: use Cloud as the backend-defined default plugin registry * fix(webui): confirm dangerous link installs and reuse source type | 4 days ago | |
feat: unify session configuration mappings and overrides (#11097) * feat: unify session configuration mappings and overrides * test: update persona regression mock for session overrides * fix: preserve knowledge base IDs during session migration * fix: scope effective configuration to each pipeline execution * refactor: remove built-in persona command * refactor: remove obsolete session service and plugin managers * perf: avoid duplicate message configuration deepcopy * refactor: keep message configuration snapshots internal * refactor: make runtime configuration state explicit * refactor: rename runtime configuration to AstrBotConfigSnapshot * refactor: move config binding migration into migration package * refactor: remove obsolete session configuration code * fix: unify bot session mapping cleanup option * fix: delete complete session mappings from bot editor * test: update fixtures for effective session configuration * refactor!: remove obsolete session status and batch APIs * test: remove redundant retired endpoint assertions * test: simplify session configuration regression coverage | 17 days ago | |
feat: unify /new and /reset behavior (#10004) * feat: unify new and reset conversation behavior * fix(i18n): align conversation isolation labels * fix(i18n): clarify group conversation permission hints * feat: centralize conversation command permissions * fix(i18n): clarify administrator-only command permissions * docs: correct conversation command permission instructions * test: isolate conversation restart command registration * feat: follow conversation isolation for restart permissions | 2 months ago | |
fix: gray out commands of disabled plugins in behavior manager (#9664) * fix: gray out commands of disabled plugins in behavior manager Show inactive-plugin commands as 未启用, dim the whole row with theme on-surface colors, and disable row actions. Fixes #9562 * fix: address review comments on disabled-plugin commands Keep the stored command enabled flag unchanged and expose plugin activation separately. Allow viewing details, keep hover tooltips, and cover serialized plugin_activated in unit tests. * fix: preserve tooltips for disabled command actions --------- Co-authored-by: Soulter <905617992@qq.com> | 3 months ago | |
refactor: run built-in agents through runtime sessions (#11052) | 21 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 | 12 days ago | |
feat: add profile-scoped subagent management (#11053) Co-authored-by: Gao Jinzhe <2968474907@qq.com> | 21 days ago | |
fix: prevent console backpressure from blocking the event loop (#10902) * fix: prevent blocked console output from stalling the event loop * fix: preserve console stream behavior and safe shutdown * fix: expose console backpressure and support bounded draining * docs: note console freeze fix in v4.29.4 changelog | 29 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: 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 | 3 days ago | |
refactor: reorganize built-in agent modules (#11051) | 21 days ago | |
fix: preserve scheduled reminders when an edit is invalid (#10075) Co-authored-by: beemines <182060364+beemines@users.noreply.github.com> | 2 months ago | |
feat: background pending tools when steering arrives (#11142) * fix: append steering input as user messages * fix: group steering input into one user message * feat: detach pending tools on steering and wake on completion * fix: continue pending steering after plain replies * test: decode prepared media file URIs on Windows * fix: preserve whitespace in steering input * fix: separate batched steering inputs with newlines * docs: remove verbose steering implementation details * fix: preserve Gemini user agents and verify background delivery * fix: honor realtime segmented replies in QQ group chats * revert: keep QQ streaming changes out of this PR * test: align plugin page expectations with view metadata * fix: preserve background tool permissions and result handling * fix: retain wakeup ownership and initialize context before appending * fix: combine background wakeup input into one user message * test: remove redundant background wakeup coverage * fix: relax background completion prompt restrictions * fix: simplify background completion prompt | 12 days ago | |
fix: inherit configured timezone for cron jobs (#9579) | 3 months ago | |
feat(cron): let AstrBot admins edit tasks in the current group (#11242) | 11 days ago | |
fix: resolve executable builtin tools for delegated sessions (#11335) * fix: resolve executable builtin tools for delegated sessions * revert: resolve executable builtin tools for delegated sessions This reverts commit 078ba3cfeec3b25b4929f9ce90c1f5d6483b2776. * refactor(agent): let runtimes own their tools Remove the shared builtin tool registry and construct runtime tools where they are used. Delegate the parent's executable tool instances and list only plugin tools in the dashboard's Function Tools panel. * refactor(agent): preserve executable tools across schema modes --------- Co-authored-by: Soulter <905617992@qq.com> | 6 days ago | |
fix(dashboard): reject stale WebUI assets in desktop-managed mode (#9898) | 2 months ago | |
feat: gzip dashboard static js, css, and html (#10187) * feat: gzip dashboard static js, css, and html Compress JS, CSS, and HTML from the dashboard static routes when the client sends Accept-Encoding: gzip. Images, fonts, event streams, and range requests stay unchanged. Cache-Control is not modified. Refs #10186 * fix: gzip dashboard static files off the event loop Read and compress in a worker thread so a large bundle does not stall other dashboard requests. --------- Co-authored-by: RuochenPan <badbatch0x01@gmail.com> | 2 months ago | |
refactor(core): migrate backend backbone from Quart to FastAPI and introduce more OpenAPI (#8688) * refactor: migrate to fastapi * structure refactor * fix: pyright fix * refactor: improve error handling and public messages in plugin services * feat(api): refactor API client integration and enhance request handling - Updated API client configuration to use a dedicated HTTP client. - Introduced utility functions for generating options, queries, and form data for API requests. - Refactored multiple API methods to utilize the new utility functions for improved consistency and readability. - Renamed types for clarity and updated import statements accordingly. feat(docs): add script to update OpenAPI JSON from YAML spec - Created a Python script to convert OpenAPI YAML specification to JSON format. - The script supports customizable input and output paths. - Ensured the script handles directory creation for output paths and validates the YAML structure. * fix * feat(auth): implement rate limiting for v1 login endpoint and enhance request handling * Refactor dashboard API routers to use legacy_router for backward compatibility - Changed all instances of dashboard_router to legacy_router across multiple API modules including platform, plugins, providers, sessions, skills, stats, subagents, t2i, tools, updates, and asgi_runtime. - Updated route definitions to ensure existing endpoints remain functional under the new router structure. - Introduced support for Quart request context in asgi_runtime to enhance compatibility with existing Quart-based plugins. - Added a test case to validate the functionality of the new Quart request context handling in plugin extensions. * chore: remove cli test * fix: update dashboard tests for fastapi migration * chore: satisfy ruff checks * fix: update openapi api key scopes * fix: sync config scope chip selection * fix: restore quart dependency * docs: clarify quart plugin api compatibility * docs: update openapi scope documentation * fix: use singular skill openapi scope * fix: hide update service exception details * fix: address fastapi review comments * fix: address dashboard review findings * docs: revert unrelated package deployment changes * docs: update agent api generation guidance * feat: add plugin page web api helpers * docs: add plugin page bridge demo * fix: type plugin upload files * fix: stabilize plugin page uploads * fix: type plugin web request proxy * docs: remove plugin page docs example * fix: authenticate plugin page SSE bridge | 5 months ago | |
fix: compare platform message history cutoff in UTC (#10246) platform_message_history.created_at stores UTC wall-clock values (written via TimestampMixin's datetime.now(timezone.utc)), but delete_platform_message_offset computed the cutoff from naive local datetime.now(). On hosts outside UTC the comparison was shifted by the local offset, so the wrong slice of history was deleted. Generated with [Devin](https://devin.ai) Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> | 2 months ago | |
fix(dashboard): complete diagnostic export improvements (#10659) * feat(dashboard): improve diagnostic export and add time ranges * refactor(dashboard): move diagnostics into maintenance settings | 1 month ago | |
| 5 months ago | ||
test: remove the timing dependency from the EventBus origin routing test (#11382) | 4 days ago | |
feat: unify session configuration mappings and overrides (#11097) * feat: unify session configuration mappings and overrides * test: update persona regression mock for session overrides * fix: preserve knowledge base IDs during session migration * fix: scope effective configuration to each pipeline execution * refactor: remove built-in persona command * refactor: remove obsolete session service and plugin managers * perf: avoid duplicate message configuration deepcopy * refactor: keep message configuration snapshots internal * refactor: make runtime configuration state explicit * refactor: rename runtime configuration to AstrBotConfigSnapshot * refactor: move config binding migration into migration package * refactor: remove obsolete session configuration code * fix: unify bot session mapping cleanup option * fix: delete complete session mappings from bot editor * test: update fixtures for effective session configuration * refactor!: remove obsolete session status and batch APIs * test: remove redundant retired endpoint assertions * test: simplify session configuration regression coverage | 17 days ago | |
feat: add role-based Local computer permissions (#9472) * feat: sandbox local member execution on Linux * feat: add macOS Seatbelt local sandbox * feat: Implement race-resistant file access for local tools - Added open_file_in_allowed_roots function in local_file_security.py to securely open files within specified directories, preventing path traversal attacks. - Updated file reading functions in file_read_utils.py to accept file descriptors, allowing for safer file operations. - Enhanced FileReadTool, FileWriteTool, and FileEditTool to utilize the new secure file access method. - Added tests to ensure restricted access works correctly, including scenarios with symlinked directories and ancestor swaps. - Improved error handling for file operations to provide clearer feedback on permission issues. * feat: add role-based Local computer permissions * fix: clarify Windows Local permission behavior * style: use neutral permission matrix border * fix: clarify Local runtime permission labels * fix: localize computer runtime options * fix: tighten default Local permission policy * fix: allow macOS sandboxed shell forks * refactor: extract platform process sandboxes * refactor: expose cross-platform sandbox limits * refactor: unify sandbox process lifecycle * refactor: seal local sandbox abstractions * test: align local sandbox tests with Windows support * fix: improve local permission settings layout * fix: initialize workspace for restricted file writes * feat: expose runtime and sandbox dependency information * feat: add disabled local access and platform-aware permission controls * feat: display runtime information in local permission controls * fix: validate local permission support before saving config * fix: use supported local permission defaults on Windows * fix: restrict local file sending and align Windows permission tests * chore: remove redundant local permission hint * fix: restore local sandbox DNS and approved file access * ci: enable bubblewrap user namespaces on Ubuntu runners * fix: report local sandbox startup failures * fix: use a portable sandbox startup probe * fix: preserve read-only Python virtualenv access in local sandboxes * fix: revoke local shell sessions when permissions change * fix: block shared-path attacks on local runtime file exchange Sandboxed processes can write to shared temp roots, so a named session log there could be replaced with a symlink to a host file that host-side reads and appends would follow. Keep managed shell output on an anonymous temporary file handle instead of a named path. Also stop _resolve_path_from_sandbox from consulting a booter under the local runtime: workspace and local-file checks already enforce caller permissions, and the fallback branch probed the host shell without them. Reject such paths with FileNotFoundError instead. * fix: revoke local shell sessions when admin access is removed * fix: skip missing default roots in local grep * test: check sandbox file readability across platforms * test: wait for watchdog retry without fixed sleeps * test: synchronize watchdog log rotation assertions --------- Co-authored-by: RuochenPan <badbatch0x01@gmail.com> | 2 months ago | |
perf: enrich knowledge base embeddings with document context (#9457) * perf: enrich knowledge base document embeddings * perf: preserve knowledge base heading paths * test: cover embedding content validation | 3 months ago | |
fix: sanitize file name in file component (#8318) * fix: sanitize remote file component names * fix: handle windows-invalid file names * test: cover windows-invalid file names --------- Co-authored-by: liuwanwan1 <243261597+liuwanwan1@users.noreply.github.com> | 6 months 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: include JSON cards in group context (#9655) * fix: include JSON cards in group context * fix: allow JSON cards to trigger active replies | 3 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 | |
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(kb): clean up KBMedia records on document delete, fix update_kb_stats (#9120) * fix(kb): clean up KBMedia records on document delete, fix update_kb_stats - delete_document_by_id now deletes associated KBMedia records before removing the KBDocument row, preventing orphaned media data. - update_kb_stats now passes kb_id filter to vec_db.count_documents, fixing chunk count that previously counted across all KBs. - add tests for document deletion cleanup and update_kb_stats behavior. * fix(kb): merge media and document deletion into single transaction | 4 months ago | |
fix: defer faiss imports during startup (#7400) * fix: defer faiss imports during startup * chore: gemini cr Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * chore: ruff format * fix: move torch import to _resolve_device method and remove obsolete tests * fix: remove obsolete test for eager loading of faiss during startup imports * test: fix kb helper patch target after faiss lazy import --------- Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Soulter <905617992@qq.com> | 7 months ago | |
refactor: reorganize built-in agent modules (#11051) | 21 days ago | |
perf: enrich knowledge base embeddings with document context (#9457) * perf: enrich knowledge base document embeddings * perf: preserve knowledge base heading paths * test: cover embedding content validation | 3 months ago | |
fix: remove knowledge base upload file limit (#9701) | 3 months 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> | 4 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: preserve attachment filenames when sending captions (#11379) | 4 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: 修复了国内配置一些模型不可用问题 (#7685) * fix: 修复了国内配置一些模型不可用问题 1. 常见的openai和anthropic协议,如 智谱的codingpan https://open.bigmodel.cn/api/coding/paas/v4 2. 新出的一些没有模型列表的自定义模型提供商,如科大讯飞 https://maas-coding-api.cn-huabei-1.xf-yun.com/v2 * feat: 提高代码复用性 * fix(network): reuse shared SSL context * test(network): cover proxy and header forwarding * fix(network): support verify overrides --------- Co-authored-by: Taois <taoist.han@vertechs.com> Co-authored-by: 邹永赫 <1259085392@qq.com> | 7 months ago | |
fix: harden API key scope boundaries (#9503) | 3 months ago | |
feat(chatui): paginate chat history (#9667) * feat(dashboard): add chat history pagination and reasoning blocks (#9652) * refactor(dashboard): remove reasoning char count and loading text * feat(dashboard): load earlier messages on scroll up * refactor(dashboard): remove reasoning retry label * refactor(dashboard): remove thread panel pagination and lazy reasoning Restore the thread panel to pre-#9652 behavior: full history without pagination and inline reasoning content. Reverts the out-of-scope thread additions while keeping main-session pagination and reasoning lazy-loading. * chore: retrigger smoke test * fix(dashboard): pause automatic history loading after failure * feat(dashboard): show progress while loading earlier messages * fix(dashboard): show reasoning loading errors and retry action * style(dashboard): align chat loading errors with chat UI * style(dashboard): make chat loading errors more compact * refactor(chat): retain complete message content in history pages * refactor(dashboard): expand reasoning directly from history pages * refactor(api): remove lazy chat message retrieval endpoint | 2 months ago | |
fix: preserve child folders when deleting persona folders (#10361) | 1 month ago | |
feat: unify session configuration mappings and overrides (#11097) * feat: unify session configuration mappings and overrides * test: update persona regression mock for session overrides * fix: preserve knowledge base IDs during session migration * fix: scope effective configuration to each pipeline execution * refactor: remove built-in persona command * refactor: remove obsolete session service and plugin managers * perf: avoid duplicate message configuration deepcopy * refactor: keep message configuration snapshots internal * refactor: make runtime configuration state explicit * refactor: rename runtime configuration to AstrBotConfigSnapshot * refactor: move config binding migration into migration package * refactor: remove obsolete session configuration code * fix: unify bot session mapping cleanup option * fix: delete complete session mappings from bot editor * test: update fixtures for effective session configuration * refactor!: remove obsolete session status and batch APIs * test: remove redundant retired endpoint assertions * test: simplify session configuration regression coverage | 17 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 | 3 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 | 3 days ago | |
refactor: reorganize built-in agent modules (#11051) | 21 days ago | |
fix(kb): restore complete knowledge base retrieval results (#9618) * fix(kb): calibrate dense scores across knowledge bases * fix(kb): retain distinct chunks from source documents | 3 months ago | |
feat: show actionable ChatUI error cards (#11259) * feat: show actionable ChatUI error cards * chore: omit documentation changes from error cards PR | 10 days ago | |
fix: resolve executable builtin tools for delegated sessions (#11335) * fix: resolve executable builtin tools for delegated sessions * revert: resolve executable builtin tools for delegated sessions This reverts commit 078ba3cfeec3b25b4929f9ce90c1f5d6483b2776. * refactor(agent): let runtimes own their tools Remove the shared builtin tool registry and construct runtime tools where they are used. Delegate the parent's executable tool instances and list only plugin tools in the dashboard's Function Tools panel. * refactor(agent): preserve executable tools across schema modes --------- Co-authored-by: Soulter <905617992@qq.com> | 6 days ago | |
feat: unify session configuration mappings and overrides (#11097) * feat: unify session configuration mappings and overrides * test: update persona regression mock for session overrides * fix: preserve knowledge base IDs during session migration * fix: scope effective configuration to each pipeline execution * refactor: remove built-in persona command * refactor: remove obsolete session service and plugin managers * perf: avoid duplicate message configuration deepcopy * refactor: keep message configuration snapshots internal * refactor: make runtime configuration state explicit * refactor: rename runtime configuration to AstrBotConfigSnapshot * refactor: move config binding migration into migration package * refactor: remove obsolete session configuration code * fix: unify bot session mapping cleanup option * fix: delete complete session mappings from bot editor * test: update fixtures for effective session configuration * refactor!: remove obsolete session status and batch APIs * test: remove redundant retired endpoint assertions * test: simplify session configuration regression coverage | 17 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 | |
feat: unify session configuration mappings and overrides (#11097) * feat: unify session configuration mappings and overrides * test: update persona regression mock for session overrides * fix: preserve knowledge base IDs during session migration * fix: scope effective configuration to each pipeline execution * refactor: remove built-in persona command * refactor: remove obsolete session service and plugin managers * perf: avoid duplicate message configuration deepcopy * refactor: keep message configuration snapshots internal * refactor: make runtime configuration state explicit * refactor: rename runtime configuration to AstrBotConfigSnapshot * refactor: move config binding migration into migration package * refactor: remove obsolete session configuration code * fix: unify bot session mapping cleanup option * fix: delete complete session mappings from bot editor * test: update fixtures for effective session configuration * refactor!: remove obsolete session status and batch APIs * test: remove redundant retired endpoint assertions * test: simplify session configuration regression coverage | 17 days ago | |
fix: wake session waiter timeout task on stop (#11349) * fix: wake session waiter timeout task on stop - Signal the active timeout wait when a session ends early. - Add a regression test and changelog entry. * fix: ignore keep on stopped sessions --------- Co-authored-by: 邹永赫 <1259085392@qq.com> | 5 days ago | |
fix: stop preloading entire preferences table into memory (#9747) * fix: stop preloading entire preferences table into memory PR #9649 fixed an event-loop deadlock by preloading every row of the preferences table into an in-memory mirror at startup. The table can hold gigabytes of plugin KV data, so this can OOM the process. - initialize() no longer performs an unfiltered get_preferences(); the in-memory cache becomes a write overlay for read-after-write visibility only - get_async() falls back to an async point query on overlay miss and never backfills the overlay - deprecated sync get() falls back to a point query through a dedicated synchronous SQLite connection (the new SQLiteDatabase.get_preference_sync), so it never blocks on or deadlocks against the async pool; failures warn and return the default instead of raising - sync range_get() now only covers values written by this process (no internal callers remain); full scans stay available via range_get_async() - FIFO write queue semantics are unchanged * fix: preserve synchronous preference range reads | 3 months ago | |
fix: lazily import BM25 dependency (#9435) | 3 months ago | |
fix(db): return aggregated PlatformStat rows from SQLiteDatabase.get_platform_stats (#11421) * fix(db): return aggregated PlatformStat rows from SQLiteDatabase.get_platform_stats * fix(db): group get_platform_stats by platform_id and populate row id | 2 days ago | |
feat(config): move text-to-image settings into the config profile extension group (#10306) * feat(star): add umo and template_name params to Star.text_to_image Plugins can now pass umo (unified_message_origin) so the t2i template is resolved from the configuration file bound to that session, falling back to the default configuration when unbound or omitted. An explicit template_name always takes precedence over configuration. * feat(config): move text-to-image settings into the config profile extension group Consolidate all t2i settings under Config Profile -> Extension Features (ext_group) so they are isolated per configuration file: - Move the t2i object (output toggle, word threshold) from platform_group to ext_group - Move t2i_strategy, t2i_endpoint, t2i_template and t2i_active_template from the system-wide settings group (Settings -> Appearance) into the same ext_group t2i object - Remove the Text-to-Image card from the Settings appearance section - Relocate the matching i18n entries in all four locales and update the zh/en docs with the new location * fix(dashboard): hide trailing divider after invisible config items getVisibleItemEntries did not filter invisible items, so an invisible last item (e.g. t2i_active_template) left a dangling divider below the last visible row. * feat(dashboard): rename the sidebar Settings entry to System Settings The Settings page now only holds global/system-wide options after behavior configs (such as text-to-image) moved into config profiles. Rename the sidebar entry in all four locales and update the zh/en docs to reference the new name. * feat(config): hide dependent t2i options when text-to-image output is off Add a t2i=true condition to the word threshold, strategy, endpoint and custom template items so they only appear when the output toggle is on. The endpoint/template items keep their t2i_strategy=remote condition. * fix(star): fall back to the default template when get_config returns None text_to_image called .get() directly on the result of context.get_config(umo), which can be None for context implementations without a default configuration. Guard the lookup so the renderer receives None instead, restoring the behavior covered by test_text_to_image_without_config. * feat(star): hold html_renderer on Context and resolve t2i endpoint per config - Context now exposes the shared html_renderer, injected by the core lifecycle, so plugins can call self.context.html_renderer directly - Star.text_to_image/html_render resolve the t2i template and render endpoint from the configuration file bound to the given umo and pass them through per call (no renderer cache, no restart needed) - The render chain (HtmlRenderer/NetworkRenderStrategy) accepts an optional per-call endpoint - The pipeline's automatic t2i conversion passes the endpoint from its own per-profile configuration * refactor(init): remove unnecessary comments and add deprecation notice for HtmlRenderer usage | 1 month ago | |
refactor: reorganize built-in agent modules (#11051) | 21 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 | 3 days ago | |
fix: keep quoted voice transcripts in replies (#11341) | 6 days ago | |
refactor: reduce path token usage (#9505) | 3 months ago | |
refactor(core): migrate backend backbone from Quart to FastAPI and introduce more OpenAPI (#8688) * refactor: migrate to fastapi * structure refactor * fix: pyright fix * refactor: improve error handling and public messages in plugin services * feat(api): refactor API client integration and enhance request handling - Updated API client configuration to use a dedicated HTTP client. - Introduced utility functions for generating options, queries, and form data for API requests. - Refactored multiple API methods to utilize the new utility functions for improved consistency and readability. - Renamed types for clarity and updated import statements accordingly. feat(docs): add script to update OpenAPI JSON from YAML spec - Created a Python script to convert OpenAPI YAML specification to JSON format. - The script supports customizable input and output paths. - Ensured the script handles directory creation for output paths and validates the YAML structure. * fix * feat(auth): implement rate limiting for v1 login endpoint and enhance request handling * Refactor dashboard API routers to use legacy_router for backward compatibility - Changed all instances of dashboard_router to legacy_router across multiple API modules including platform, plugins, providers, sessions, skills, stats, subagents, t2i, tools, updates, and asgi_runtime. - Updated route definitions to ensure existing endpoints remain functional under the new router structure. - Introduced support for Quart request context in asgi_runtime to enhance compatibility with existing Quart-based plugins. - Added a test case to validate the functionality of the new Quart request context handling in plugin extensions. * chore: remove cli test * fix: update dashboard tests for fastapi migration * chore: satisfy ruff checks * fix: update openapi api key scopes * fix: sync config scope chip selection * fix: restore quart dependency * docs: clarify quart plugin api compatibility * docs: update openapi scope documentation * fix: use singular skill openapi scope * fix: hide update service exception details * fix: address fastapi review comments * fix: address dashboard review findings * docs: revert unrelated package deployment changes * docs: update agent api generation guidance * feat: add plugin page web api helpers * docs: add plugin page bridge demo * fix: type plugin upload files * fix: stabilize plugin page uploads * fix: type plugin web request proxy * docs: remove plugin page docs example * fix: authenticate plugin page SSE bridge | 5 months ago | |
refactor: reorganize built-in agent modules (#11051) | 21 days ago | |
fix: avoid non-string enums in Gemini tool schemas (#10635) google.genai's Schema.enum only accepts strings, and the Gemini API only allows enum on STRING fields ("enum: only allowed for STRING type"). A tool parameter like {"type": "integer", "enum": [10, 20, 50]}, which FastMCP generates for Literal[10, 20, 50], made building the request fail with a ValidationError before anything was sent. String fields keep their enum. Other fields keep their type, so the model still sends e.g. an integer, and list the allowed values in the description instead. A null value is marked as nullable. Fixes #10634 | 1 month ago | |
fix: resolve executable builtin tools for delegated sessions (#11335) * fix: resolve executable builtin tools for delegated sessions * revert: resolve executable builtin tools for delegated sessions This reverts commit 078ba3cfeec3b25b4929f9ce90c1f5d6483b2776. * refactor(agent): let runtimes own their tools Remove the shared builtin tool registry and construct runtime tools where they are used. Delegate the parent's executable tool instances and list only plugin tools in the dashboard's Function Tools panel. * refactor(agent): preserve executable tools across schema modes --------- Co-authored-by: Soulter <905617992@qq.com> | 6 days ago | |
feat: add TOTP two-factor authentication for dashboard login (#8189) * feat: add TOTP two-factor authentication for dashboard login * fix: ensure TOTP verification uses UTC for accurate time comparison * fix: update recovery code validation logic for disabling TOTP * test: add unit tests for TOTP functionality and recovery code validation * chore: format * feat: add trust_proxy_headers switch for auth rate-limit IP source * feat: make dashboard auth rate-limit configurable via system settings Add auth_rate_limit config block to dashboard settings with enable (default: true), average_interval (default: 1.0s), and max_burst (default: 3) options. The dashboard auth middleware now reads from config instead of using hardcoded values. The average_interval and max_burst fields are conditionally shown only when rate limiting is enabled. * fix: normalize dashboard client IP from trusted proxy headers * refactor: encapsulate rate limiter state into registry, add TTL * feat: show dynamic page title during two-factor verification * fix: require two-factor verification for protected config saves * chore: format * refactor: reorganize TOTP verification UI components for better layout * refactor: clean up recovery stage UI by removing unused styles and improving label handling * docs: add TOTP two-factor authentication documentation for WebUI --------- Co-authored-by: Soulter <905617992@qq.com> | 5 months ago | |
feat: improve message tracing and add bounded SQLite history (#10515) (#10614) * feat: expand message tracing and redesign trace explorer * feat: add trace metadata chips and preserve response ownership * feat: show full-width tracing list with optional details * style: remove gray trace tab card * feat: unify trace toolbar controls and use Vuetify datatable * style: use native Vuetify trace table rows * fix: prevent trace platform header wrapping * feat: persist message traces in bounded SQLite storage * fix: expose trace settings and preserve long prompt attributes * docs: simplify trace storage setting hints * feat: add trace history cleanup and disk usage accounting * fix: finish event traces and fold Agent execution chains * feat: fold long trace messages and consolidate persona metadata * fix: hide redundant adapter event labels in traces * refactor: remove redundant persisted span metadata * feat: paginate trace history with Vuetify table controls * style: reduce trace table text size * style: increase trace table text to 13px * style: flatten trace status chips and narrow platform column * feat: show independent Agent and command trace types * feat: show cumulative Agent token usage in trace details * style: abbreviate trace token counts with k and M * style: reduce trace table header height * feat: show group and private chat trace types * fix: include month and day in trace timestamps * style: use system trace fonts and blue running status * style: separate trace origin and sender metadata rows * fix: trace successful proactive message tool deliveries * feat: show model persona and tool counts on Agent headings * style: prefix trace plugin chips with puzzle icons * style: add icons and spacing to Agent metadata chips * style: remove execution mode prefix from trace chips * refactor: centralize response tracing without source attribution * style: hide module metadata in trace details * refactor: omit redundant module metadata from plugin traces * refactor: remove obsolete module filtering from trace UI * feat: expose trace recording toggle in system settings * docs: simplify trace recording setting description * feat: retain traces only for command responses and Agent calls * fix: revert trace admission filtering and expand writer queue * refactor: adopt OpenTelemetry SDK and simplify trace tests * refactor: separate event and trace execution contexts * fix: include OpenTelemetry SDK in runtime requirements * refactor: dispatch session waiters in the core pipeline Preserve access and safety checks before waiter dispatch and limit built-in group context handlers to group messages. * test: remove trace dashboard tests * fix: recover orphaned traces and enforce minimum storage budget * fix: increase trace queue byte budgets and remove frame count limit | 1 month ago | |
fix(trace): use indexed state and flags in trace history responses (#11339) * fix(trace): use indexed state and flags in history responses * test(trace): cover each indexed history filter with nonmatching rows * style(trace): keep filter regression loop within formatter line width | 5 days ago | |
refactor: reduce path token usage (#9505) | 3 months 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 | 3 days ago | |
feat: unify session configuration mappings and overrides (#11097) * feat: unify session configuration mappings and overrides * test: update persona regression mock for session overrides * fix: preserve knowledge base IDs during session migration * fix: scope effective configuration to each pipeline execution * refactor: remove built-in persona command * refactor: remove obsolete session service and plugin managers * perf: avoid duplicate message configuration deepcopy * refactor: keep message configuration snapshots internal * refactor: make runtime configuration state explicit * refactor: rename runtime configuration to AstrBotConfigSnapshot * refactor: move config binding migration into migration package * refactor: remove obsolete session configuration code * fix: unify bot session mapping cleanup option * fix: delete complete session mappings from bot editor * test: update fixtures for effective session configuration * refactor!: remove obsolete session status and batch APIs * test: remove redundant retired endpoint assertions * test: simplify session configuration regression coverage | 17 days ago | |
feat: unify session configuration mappings and overrides (#11097) * feat: unify session configuration mappings and overrides * test: update persona regression mock for session overrides * fix: preserve knowledge base IDs during session migration * fix: scope effective configuration to each pipeline execution * refactor: remove built-in persona command * refactor: remove obsolete session service and plugin managers * perf: avoid duplicate message configuration deepcopy * refactor: keep message configuration snapshots internal * refactor: make runtime configuration state explicit * refactor: rename runtime configuration to AstrBotConfigSnapshot * refactor: move config binding migration into migration package * refactor: remove obsolete session configuration code * fix: unify bot session mapping cleanup option * fix: delete complete session mappings from bot editor * test: update fixtures for effective session configuration * refactor!: remove obsolete session status and batch APIs * test: remove redundant retired endpoint assertions * test: simplify session configuration regression coverage | 17 days ago | |
feat: integrate SerpApi Google News API (#10773) * refactor: migrate SerpApi requests to official Python SDK * feat: add SerpApi Google News search * refactor: restore direct HTTP requests for SerpApi * Update unreleased.md --------- Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com> | 1 month ago | |
refactor: run built-in agents through runtime sessions (#11052) | 21 days ago | |
fix(webchat): preserve reasoning in non-streaming replies (#10458) * fix: preserve segmented WebChat replies * fix: preserve reasoning in non-streaming WebChat replies * docs: sync generated WebChat OpenAPI description * fix: preserve WebSocket and button reply boundaries | 2 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 | 4 days ago | |
feat(webchat): enable reasoning display by default (#10020) * feat(webchat): enable reasoning display by default * fix(webchat): sync reasoning flag expectations and API docs | 2 months ago | |
fix(dashboard): store chat attachments under unique names (#10356) * fix(dashboard): store chat attachments under unique names Uploads were saved under their original filename, so two attachments with the same name (every pasted screenshot is image.png) overwrote each other, and deleting one session removed a file another session still used. Store each upload as <timestamp id>_<name> and return the original name as filename for display, with the on-disk name in stored_filename. Fixes #10352 * fix(dashboard): keep long-suffix attachment names within 255 bytes | 1 month ago |
| Files | Last commit | Last update |
|---|---|---|
| 3 days ago | ||
| 21 days ago | ||
| 21 days ago | ||
| 17 days ago | ||
| 14 days ago | ||
| 28 days ago | ||
| 30 days ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 8 months ago | ||
| 24 days ago | ||
| 1 month ago | ||
| 3 days ago | ||
| 6 days ago | ||
| 6 days ago | ||
| 3 months ago | ||
| 24 days ago | ||
| 1 month ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 15 days ago | ||
| 14 days ago | ||
| 17 days ago | ||
| 2 days ago | ||
| 1 month ago | ||
| 2 months ago | ||
| 15 days ago | ||
| 15 days ago | ||
| 4 days ago | ||
| 1 month ago | ||
| 14 days ago | ||
| 30 days ago | ||
| 4 days ago | ||
| 4 days ago | ||
| 17 days ago | ||
| 2 months ago | ||
| 3 months ago | ||
| 21 days ago | ||
| 12 days ago | ||
| 21 days ago | ||
| 29 days ago | ||
| 5 days ago | ||
| 3 days ago | ||
| 21 days ago | ||
| 2 months ago | ||
| 12 days ago | ||
| 3 months ago | ||
| 11 days ago | ||
| 6 days ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 5 months ago | ||
| 2 months ago | ||
| 1 month ago | ||
| 5 months ago | ||
| 4 days ago | ||
| 17 days ago | ||
| 2 months ago | ||
| 3 months ago | ||
| 6 months ago | ||
| 1 day ago | ||
| 3 months ago | ||
| 15 days ago | ||
| 24 days ago | ||
| 4 months ago | ||
| 7 months ago | ||
| 21 days ago | ||
| 3 months ago | ||
| 3 months ago | ||
| 4 days ago | ||
| 1 day ago | ||
| 4 days ago | ||
| 2 months ago | ||
| 7 months ago | ||
| 3 months ago | ||
| 2 months ago | ||
| 1 month ago | ||
| 17 days ago | ||
| 3 days ago | ||
| 3 days ago | ||
| 21 days ago | ||
| 3 months ago | ||
| 10 days ago | ||
| 6 days ago | ||
| 17 days ago | ||
| 15 days ago | ||
| 17 days ago | ||
| 5 days ago | ||
| 3 months ago | ||
| 3 months ago | ||
| 2 days ago | ||
| 1 month ago | ||
| 21 days ago | ||
| 3 days ago | ||
| 6 days ago | ||
| 3 months ago | ||
| 5 months ago | ||
| 21 days ago | ||
| 1 month ago | ||
| 6 days ago | ||
| 5 months ago | ||
| 1 month ago | ||
| 5 days ago | ||
| 3 months ago | ||
| 3 days ago | ||
| 17 days ago | ||
| 17 days ago | ||
| 1 month ago | ||
| 21 days ago | ||
| 2 days ago | ||
| 4 days ago | ||
| 2 months ago | ||
| 1 month ago |